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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6274227e79d514eb4c6f135e44ff6df4c7ef2ef1 | 2,019 | py | Python | src/test/tests/plots/singlecolor.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/test/tests/plots/singlecolor.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/test/tests/plots/singlecolor.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # ----------------------------------------------------------------------------
# CLASSES: nightly
#
# Test Case: singlecolor.py
#
# Tests: mesh - 3D rectilinear, single domain
# plots - Boundary, FilledBoundary, Subset
#
# Defect ID: VisIt00002372
#
# Programmer: Brad Whitlock
# Date:... | 26.220779 | 78 | 0.636454 |
62744a147c5fc12b0529cbc6b077d6fb110c35b3 | 4,933 | py | Python | lib/linux/get_hw_info.py | ashiscs/Cinfo | 7e8fa8ce19f323425fab6117e68ac2678b4e17dc | [
"MIT"
] | 2 | 2019-08-04T17:07:15.000Z | 2020-02-27T21:10:33.000Z | lib/linux/get_hw_info.py | ashiscs/Cinfo | 7e8fa8ce19f323425fab6117e68ac2678b4e17dc | [
"MIT"
] | null | null | null | lib/linux/get_hw_info.py | ashiscs/Cinfo | 7e8fa8ce19f323425fab6117e68ac2678b4e17dc | [
"MIT"
] | null | null | null | '''
Author : Deepak Chauhan
GitHub : https://github.com/royaleagle73
Email : 2018PGCACA63@nitjsr.ac.in
'''
import os
from tabulate import tabulate
class get_hw_info:
'''
get_hw_info HAVE A SINGLE METHOD AND A CONSTRUCTOR FUNCTION WHICH ARE NAMED AS :
1) __init__
2) work()
__init__ DOCFILE:
__init__ CON... | 43.27193 | 145 | 0.602879 |
6274695aa7dbcbdcb11cf806c6e49da5c412c0d4 | 1,009 | py | Python | sunpy/coordinates/__init__.py | johan12345/sunpy | 56e1ab0c2c992f99e0fe3e6bff468b731a51228c | [
"BSD-2-Clause"
] | 2 | 2020-07-02T13:01:42.000Z | 2020-08-27T20:05:31.000Z | sunpy/coordinates/__init__.py | johan12345/sunpy | 56e1ab0c2c992f99e0fe3e6bff468b731a51228c | [
"BSD-2-Clause"
] | 1 | 2019-08-13T15:29:13.000Z | 2019-08-13T15:29:13.000Z | sunpy/coordinates/__init__.py | johan12345/sunpy | 56e1ab0c2c992f99e0fe3e6bff468b731a51228c | [
"BSD-2-Clause"
] | 6 | 2017-03-15T07:17:05.000Z | 2020-09-30T18:36:49.000Z | """
This subpackage contains:
* A robust framework for working with coordinate systems
* Functions to obtain the locations of solar-system bodies
(`sunpy.coordinates.ephemeris`)
* Functions to calculate Sun-specific coordinate information
(`sunpy.coordinates.sun`)
The diagram below shows all of Sun-based and Eart... | 34.793103 | 78 | 0.798811 |
62746d9acef3aeba28b4d8ccc28bada4db5d5739 | 2,327 | py | Python | eland/tests/plotting/test_dataframe_hist_pytest.py | mesejo/eland | d1444f8e094ef11ce4fa6713a521245b68a842d7 | [
"Apache-2.0"
] | null | null | null | eland/tests/plotting/test_dataframe_hist_pytest.py | mesejo/eland | d1444f8e094ef11ce4fa6713a521245b68a842d7 | [
"Apache-2.0"
] | 1 | 2020-05-06T01:34:25.000Z | 2020-05-06T01:34:25.000Z | eland/tests/plotting/test_dataframe_hist_pytest.py | mesejo/eland | d1444f8e094ef11ce4fa6713a521245b68a842d7 | [
"Apache-2.0"
] | 1 | 2020-05-06T01:31:18.000Z | 2020-05-06T01:31:18.000Z | # Licensed to Elasticsearch B.V under one or more agreements.
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# See the LICENSE file in the project root for more information
# File called _pytest for PyCharm compatability
import pytest
from matplotlib.testing.decorators import check_figure... | 37.532258 | 132 | 0.733992 |
62746df101feacc1af77fdc048e548c216edb2ec | 11,520 | py | Python | compute_filters.py | poulamisganguly/impl-adapted-filters | a9554ea39f7c682ff73c78c9f7abe592fb242044 | [
"MIT"
] | null | null | null | compute_filters.py | poulamisganguly/impl-adapted-filters | a9554ea39f7c682ff73c78c9f7abe592fb242044 | [
"MIT"
] | null | null | null | compute_filters.py | poulamisganguly/impl-adapted-filters | a9554ea39f7c682ff73c78c9f7abe592fb242044 | [
"MIT"
] | null | null | null | import numpy as np
import astra
import tomopy
import skimage
from scipy.signal import fftconvolve
import time
from tqdm.auto import tqdm, trange
def create_basis(Nd, Nl):
"""Creates a basis for filter expansion in Fourier space.
Parameters:
Nd (int): length of detector
Nl (int): number of la... | 36.112853 | 140 | 0.600868 |
627475d9827d629b2939c226338f138dc7c3b736 | 1,862 | py | Python | Python_files/OD_matrix_estimation_GLS_Jul_weekend.py | jingzbu/InverseVITraffic | c0d33d91bdd3c014147d58866c1a2b99fb8a9608 | [
"MIT"
] | null | null | null | Python_files/OD_matrix_estimation_GLS_Jul_weekend.py | jingzbu/InverseVITraffic | c0d33d91bdd3c014147d58866c1a2b99fb8a9608 | [
"MIT"
] | null | null | null | Python_files/OD_matrix_estimation_GLS_Jul_weekend.py | jingzbu/InverseVITraffic | c0d33d91bdd3c014147d58866c1a2b99fb8a9608 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
__author__ = "Jing Zhang"
__email__ = "jingzbu@gmail.com"
__status__ = "Development"
from util import *
import numpy as np
from numpy.linalg import inv
import json
# load logit_route_choice_probability_matrix
P = zload('../temp_files/logit_route_choice_probability_matrix.pkz')
P = np.matrix(... | 26.6 | 110 | 0.665951 |
6274913bee616cf7d99fc9f1efc64bd369199218 | 3,294 | py | Python | embedder/dataset.py | bclarkson-code/search-query-classification | 8928faad459ef97934a6dbcf38a9347da5662415 | [
"MIT"
] | null | null | null | embedder/dataset.py | bclarkson-code/search-query-classification | 8928faad459ef97934a6dbcf38a9347da5662415 | [
"MIT"
] | null | null | null | embedder/dataset.py | bclarkson-code/search-query-classification | 8928faad459ef97934a6dbcf38a9347da5662415 | [
"MIT"
] | null | null | null | import os
from torch.utils.data import DataLoader
import pytorch_lightning as pl
from datasets import Dataset
import torch
class Subset(torch.utils.data.Dataset):
def __init__(self, ds, label):
self.ds = ds
self.label = label
def __len__(self):
return 4096
def __getitem__(self, i... | 28.153846 | 59 | 0.571645 |
627498cfe7056d4eef638f59219ab6d451fcb34a | 12,480 | py | Python | src/sdk/pynni/nni/compression/torch/utils/mask_conflict.py | tblanchart/nni | bbb9137c323316d6de04e15d42cf6dc47a889fcc | [
"MIT"
] | 3 | 2021-01-05T07:41:58.000Z | 2021-01-11T02:08:01.000Z | src/sdk/pynni/nni/compression/torch/utils/mask_conflict.py | mstfbl/nni | 92149c58834ccf24d82a15f756decd0d1e613ed3 | [
"MIT"
] | 21 | 2020-11-13T19:01:01.000Z | 2022-02-27T09:12:51.000Z | src/sdk/pynni/nni/compression/torch/utils/mask_conflict.py | mstfbl/nni | 92149c58834ccf24d82a15f756decd0d1e613ed3 | [
"MIT"
] | 3 | 2019-01-02T06:15:50.000Z | 2019-01-30T14:31:20.000Z | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import os
import logging
import torch
import numpy as np
from .shape_dependency import ChannelDependency, GroupDependency, CatPaddingDependency
# logging.basicConfig(level = logging.DEBUG)
_logger = logging.getLogger('FixMaskConflict')
def fix_ma... | 42.886598 | 93 | 0.588622 |
62749f9381957a772ce7753750f97582a361d741 | 1,534 | py | Python | tests/test_application.py | maximlt/tranquilizer | 9b4a738d1f24af7f4c2397d43454e0fe2ee5e86b | [
"BSD-3-Clause"
] | 13 | 2020-09-08T08:59:23.000Z | 2022-01-16T20:03:27.000Z | tests/test_application.py | maximlt/tranquilizer | 9b4a738d1f24af7f4c2397d43454e0fe2ee5e86b | [
"BSD-3-Clause"
] | 14 | 2020-08-06T17:27:11.000Z | 2022-03-03T05:24:57.000Z | tests/test_application.py | maximlt/tranquilizer | 9b4a738d1f24af7f4c2397d43454e0fe2ee5e86b | [
"BSD-3-Clause"
] | 5 | 2021-02-22T18:25:16.000Z | 2021-12-11T18:12:21.000Z | from tranquilizer.application import make_app
from tranquilizer.handler import ScriptHandler
from werkzeug.middleware.proxy_fix import ProxyFix
from os.path import dirname, join
def test_app_function():
here = dirname(__file__)
fn = join(here, 'cheese_shop.py')
script = ScriptHandler(fn)
script.parse(... | 27.392857 | 60 | 0.702086 |
6274eb4a8b4555be7883dd731e6f90a3845e9fdd | 7,591 | py | Python | python/cugraph/tests/test_jaccard.py | ogreen/cugraph | d94ab29f14e6212a0c8bb5ec5fbe9e300cd57594 | [
"Apache-2.0"
] | null | null | null | python/cugraph/tests/test_jaccard.py | ogreen/cugraph | d94ab29f14e6212a0c8bb5ec5fbe9e300cd57594 | [
"Apache-2.0"
] | null | null | null | python/cugraph/tests/test_jaccard.py | ogreen/cugraph | d94ab29f14e6212a0c8bb5ec5fbe9e300cd57594 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019, NVIDIA CORPORATION.
# 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 i... | 30.123016 | 76 | 0.647872 |
6274f6868007029bb20a1ce756c0f936f22c34b7 | 2,690 | py | Python | vgio/devildaggers/hxtexture.py | joshuaskelly/game-tools | e71bcf4ef6553adf0b51f4379f72bc5a82a60176 | [
"MIT"
] | 22 | 2017-11-30T22:13:50.000Z | 2019-12-19T17:56:40.000Z | vgio/devildaggers/hxtexture.py | joshuaskelly/vgio | e71bcf4ef6553adf0b51f4379f72bc5a82a60176 | [
"MIT"
] | 22 | 2019-08-11T05:07:26.000Z | 2020-12-30T16:07:04.000Z | vgio/devildaggers/hxtexture.py | joshuaskelly/game-tools | e71bcf4ef6553adf0b51f4379f72bc5a82a60176 | [
"MIT"
] | 4 | 2018-06-24T14:04:36.000Z | 2019-05-14T06:01:51.000Z | """This module provides file I/O for Devil Daggers texture files.
Example:
hxtex_file = hxtexture.HxTexture.open('blood')
"""
import struct
from vgio._core import ReadWriteFile
class Header:
"""Class for representing a HxTexture file header.
Attributes:
texture_format: Texture format. Should ... | 22.991453 | 75 | 0.591822 |
62751252997030dffacbf60ee73b93e782aca20e | 2,247 | py | Python | setup.py | stravinci/AIS-home-assistant | ead4dafd3f801ebeb32860bd34443ed24a4f4167 | [
"Apache-2.0"
] | null | null | null | setup.py | stravinci/AIS-home-assistant | ead4dafd3f801ebeb32860bd34443ed24a4f4167 | [
"Apache-2.0"
] | null | null | null | setup.py | stravinci/AIS-home-assistant | ead4dafd3f801ebeb32860bd34443ed24a4f4167 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
"""AIS dom setup script."""
from datetime import datetime as dt
from setuptools import find_packages, setup
import homeassistant.const as hass_const
PROJECT_NAME = "AIS dom"
PROJECT_PACKAGE_NAME = "ais-dom"
PROJECT_LICENSE = "Apache License 2.0"
PROJECT_AUTHOR = "AI-Speaker team"
PROJECT_COPYR... | 28.807692 | 77 | 0.680908 |
62752790ce2a318dcd44b8a94f29455fd37a31f6 | 28,948 | py | Python | extensions/essim.py | XIThing/esdl-mapeditor | 9f4cd4a58714ea67aeb532e88e88f0435a87dbd5 | [
"Apache-2.0"
] | null | null | null | extensions/essim.py | XIThing/esdl-mapeditor | 9f4cd4a58714ea67aeb532e88e88f0435a87dbd5 | [
"Apache-2.0"
] | null | null | null | extensions/essim.py | XIThing/esdl-mapeditor | 9f4cd4a58714ea67aeb532e88e88f0435a87dbd5 | [
"Apache-2.0"
] | null | null | null | # This work is based on original code developed and copyrighted by TNO 2020.
# Subsequent contributions are licensed to you by the developers of such code and are
# made available to the Project under one or several contributor license agreements.
#
# This work is licensed to you under the Apache License, Version 2... | 46.095541 | 156 | 0.520658 |
62754eaf3c199ad88858d4bf27fa6ec4f8528e47 | 6,929 | py | Python | PRF/best_split.py | iwatobipen/PRF | 8bdd3441829921f714b1b71ef496937d495c7bc6 | [
"MIT"
] | null | null | null | PRF/best_split.py | iwatobipen/PRF | 8bdd3441829921f714b1b71ef496937d495c7bc6 | [
"MIT"
] | null | null | null | PRF/best_split.py | iwatobipen/PRF | 8bdd3441829921f714b1b71ef496937d495c7bc6 | [
"MIT"
] | null | null | null | import numpy
from numba.experimental import jitclass
from numba import jit
from . import misc_functions as m
#from importlib import reload
#reload(m)
############################################################
############################################################
################ Find best split functions #... | 39.594286 | 117 | 0.611344 |
62755d4069d7d848c8fbcea08bed5933a46a94e3 | 36,455 | py | Python | server.py | thomaslorincz/arduino-dots-and-boxes | 6410ffd696ba4898a1c047ece9d9a23888539b1d | [
"Apache-2.0"
] | null | null | null | server.py | thomaslorincz/arduino-dots-and-boxes | 6410ffd696ba4898a1c047ece9d9a23888539b1d | [
"Apache-2.0"
] | null | null | null | server.py | thomaslorincz/arduino-dots-and-boxes | 6410ffd696ba4898a1c047ece9d9a23888539b1d | [
"Apache-2.0"
] | null | null | null | def coords_to_vertex(game_dict, coordinates):
'''Given the coordinates of a vertex, returns its corresponding vertex
number.
Arguments:
game_dict (dict): A dictionary that maps game graph vertices to their
coordinates.
coordinates (tuple): The requested x and y coordinates.
... | 41.145598 | 80 | 0.641668 |
6275acde372735480fb6e004856acffc6456ad14 | 2,118 | py | Python | contactfield/templatetags/contactfield_tags.py | TwigWorld/django-contactfield | ae6e2f3da5a2ac53ce272f57078e2c90cb7e36fd | [
"MIT"
] | null | null | null | contactfield/templatetags/contactfield_tags.py | TwigWorld/django-contactfield | ae6e2f3da5a2ac53ce272f57078e2c90cb7e36fd | [
"MIT"
] | null | null | null | contactfield/templatetags/contactfield_tags.py | TwigWorld/django-contactfield | ae6e2f3da5a2ac53ce272f57078e2c90cb7e36fd | [
"MIT"
] | null | null | null | from collections import OrderedDict
from django import forms
from django import template
from django.db import models
from contactfield.fields import BaseContactField
from django.forms.forms import pretty_name
register = template.Library()
def contact_cards(obj, concise=True):
"""
Get all the contact fie... | 34.16129 | 76 | 0.600567 |
6275d57f643b9070482425432a9014f59a06058d | 842 | py | Python | domain-messages/domain_messages/LFMMarketResult/__init__.py | simcesplatform/static-time-series-resource-forecaster | 0f53915d7fe6da543f628487c8e643f2e9bb2652 | [
"MIT"
] | null | null | null | domain-messages/domain_messages/LFMMarketResult/__init__.py | simcesplatform/static-time-series-resource-forecaster | 0f53915d7fe6da543f628487c8e643f2e9bb2652 | [
"MIT"
] | null | null | null | domain-messages/domain_messages/LFMMarketResult/__init__.py | simcesplatform/static-time-series-resource-forecaster | 0f53915d7fe6da543f628487c8e643f2e9bb2652 | [
"MIT"
] | null | null | null | # Copyright 2021 Tampere University and VTT Technical Research Centre of Finland
# This software was developed as a part of the ProCemPlus project: https://www.senecc.fi/projects/procemplus
# This source code is licensed under the MIT license. See LICENSE in the repository root directory.
# Author(s): Amir Safdarian <a... | 60.142857 | 108 | 0.704276 |
6275e76895fa8d03c655fe75444203d534094ef1 | 4,212 | py | Python | Visualizations/CoronaTracker.py | ausaafnabi/Machine-Learning-Projects | 3a731cd63e387e1d47070566fba708ad4e1e3729 | [
"MIT"
] | 1 | 2020-01-18T07:47:36.000Z | 2020-01-18T07:47:36.000Z | Visualizations/CoronaTracker.py | ausaafnabi/Machine-Learning-Projects | 3a731cd63e387e1d47070566fba708ad4e1e3729 | [
"MIT"
] | 1 | 2020-03-15T15:49:09.000Z | 2020-03-15T15:49:09.000Z | Visualizations/CoronaTracker.py | ausaafnabi/Machine-Learning-Projects | 3a731cd63e387e1d47070566fba708ad4e1e3729 | [
"MIT"
] | null | null | null | import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import requests
from bs4 import BeautifulSoup
import geopandas as gpd
from prettytable import PrettyTable
# offical ministry of health website
url = 'https://www.ndtv.com/coronavirus/india-covid-19-tracker'
# make a GET request to fetch the ... | 39 | 108 | 0.702042 |
6275f79b0833160135ccc2f7e1b8fad63c2669fb | 1,852 | py | Python | source/tools/check_blender_release/check_release.py | 1-MillionParanoidTterabytes/Blender-2.79b-blackened | e8d767324e69015aa66850d13bee7db1dc7d084b | [
"Unlicense"
] | 2 | 2018-06-18T01:50:25.000Z | 2018-06-18T01:50:32.000Z | source/tools/check_blender_release/check_release.py | 1-MillionParanoidTterabytes/Blender-2.79b-blackened | e8d767324e69015aa66850d13bee7db1dc7d084b | [
"Unlicense"
] | null | null | null | source/tools/check_blender_release/check_release.py | 1-MillionParanoidTterabytes/Blender-2.79b-blackened | e8d767324e69015aa66850d13bee7db1dc7d084b | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python3
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This... | 30.866667 | 73 | 0.7527 |
6275fa5267d06a379ceb5b49d8a60027b6e729de | 630 | py | Python | pyclopedia/p02_ref/p01_exception/p03_pattern.py | MacHu-GWU/pyclopedia-project | c6ee156eb40bc5a4ac5f51aa735b6fd004cb68ee | [
"MIT"
] | null | null | null | pyclopedia/p02_ref/p01_exception/p03_pattern.py | MacHu-GWU/pyclopedia-project | c6ee156eb40bc5a4ac5f51aa735b6fd004cb68ee | [
"MIT"
] | null | null | null | pyclopedia/p02_ref/p01_exception/p03_pattern.py | MacHu-GWU/pyclopedia-project | c6ee156eb40bc5a4ac5f51aa735b6fd004cb68ee | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
There's several code patterns for exception handling.
"""
def divide1(a, b):
"""Manually exam to avoid error.
"""
if b == 0:
raise ValueError("Zero division Error!")
return a * 1.0 / b
def divide2(a, b):
"""use ``try... except PossibleEx... | 21.724138 | 78 | 0.607937 |
62764a6198803187512f998c1177f7532b3c7cf3 | 17,323 | py | Python | src/bloombox/schema/analytics/context/NativeDevice_pb2.py | Bloombox/Python | 1b125fbdf54efb390afe12aaa966f093218c4387 | [
"Apache-2.0"
] | 4 | 2018-01-23T20:13:11.000Z | 2018-07-28T22:36:09.000Z | src/bloombox/schema/analytics/context/NativeDevice_pb2.py | Bloombox/Python | 1b125fbdf54efb390afe12aaa966f093218c4387 | [
"Apache-2.0"
] | 159 | 2018-02-02T09:55:52.000Z | 2021-07-21T23:41:59.000Z | src/bloombox/schema/analytics/context/NativeDevice_pb2.py | Bloombox/Python | 1b125fbdf54efb390afe12aaa966f093218c4387 | [
"Apache-2.0"
] | 3 | 2018-01-23T20:13:15.000Z | 2020-01-17T01:07:53.000Z | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: analytics/context/NativeDevice.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protob... | 55.700965 | 2,230 | 0.781216 |
62764cbf253502d18fb65308242982865a3ff165 | 8,400 | py | Python | empower/core/app.py | imec-idlab/empower-runtime | eda52649f855722fdec1d02e25a28c61a8fbda06 | [
"Apache-2.0"
] | 2 | 2020-02-28T15:54:01.000Z | 2020-11-24T08:45:11.000Z | empower/core/app.py | imec-idlab/empower-runtime | eda52649f855722fdec1d02e25a28c61a8fbda06 | [
"Apache-2.0"
] | null | null | null | empower/core/app.py | imec-idlab/empower-runtime | eda52649f855722fdec1d02e25a28c61a8fbda06 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
#
# Copyright (c) 2016 Roberto Riggio
#
# 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 applicabl... | 24.925816 | 74 | 0.613929 |
627656862e8c871b4bca3357f0c14f4eb5796657 | 1,338 | py | Python | pdhg/lp_experiment.py | google-research/generic-adaptive-restarts | 20413ac0ba09761d1878914c860246105429e761 | [
"Apache-2.0"
] | 6 | 2020-06-24T14:50:18.000Z | 2022-02-12T08:04:47.000Z | pdhg/lp_experiment.py | google-research/generic-adaptive-restarts | 20413ac0ba09761d1878914c860246105429e761 | [
"Apache-2.0"
] | null | null | null | pdhg/lp_experiment.py | google-research/generic-adaptive-restarts | 20413ac0ba09761d1878914c860246105429e761 | [
"Apache-2.0"
] | 4 | 2020-08-18T14:57:28.000Z | 2022-01-16T11:53:38.000Z | # coding=utf-8
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | 33.45 | 79 | 0.761584 |
62766b873dc76d890af50fb225d8aa3fcf1d9cbd | 7,593 | py | Python | torchlib/datasets/factory.py | pedrodiamel/pytorch-classification | 0fa9f597ba1e7cf8fcde322e2e9ee924970593aa | [
"MIT"
] | 9 | 2019-03-27T12:40:15.000Z | 2021-12-20T12:57:59.000Z | torchlib/datasets/factory.py | pedrodiamel/pytorch-classification | 0fa9f597ba1e7cf8fcde322e2e9ee924970593aa | [
"MIT"
] | null | null | null | torchlib/datasets/factory.py | pedrodiamel/pytorch-classification | 0fa9f597ba1e7cf8fcde322e2e9ee924970593aa | [
"MIT"
] | null | null | null |
import os
import numpy as np
from torchvision import datasets
from . import imaterialist
from . import ferp
from . import fer
from . import cub2011
from . import cars196
from . import stanford_online_products
from . import afew
from . import celeba
from . import ferfolder
def create_folder(pathname, name):
... | 34.990783 | 119 | 0.579745 |
6276722cb99ceba273fc48ec5640c9ddce178c69 | 1,161 | py | Python | examples/json-merge.py | mirage/irmin-py | 72d4d69549aaa89291cba9fa925267def5783848 | [
"ISC"
] | 2 | 2022-02-01T01:52:26.000Z | 2022-02-11T16:05:38.000Z | examples/json-merge.py | mirage/irmin-py | 72d4d69549aaa89291cba9fa925267def5783848 | [
"ISC"
] | 5 | 2022-02-14T16:29:55.000Z | 2022-02-16T08:08:23.000Z | examples/json-merge.py | zshipko/irmin-py | 72d4d69549aaa89291cba9fa925267def5783848 | [
"ISC"
] | 1 | 2022-02-18T00:13:00.000Z | 2022-02-18T00:13:00.000Z | from util import *
# Configure an in-memory store with `json` contents
config = irmin.Config.mem(contents="json")
# Initialize the repo
repo = irmin.Repo(config)
# Open the store, if no branch is specified the `main` branch is used
store = irmin.Store(repo)
# This is the object that will be stored in Irmin
a = {"x"... | 25.8 | 69 | 0.667528 |
62768650713679101beccb1f87dc1ddfd95e6a0b | 819 | py | Python | vespa-cloud/cord-19-search/scripts/add-embeddings.py | appotry/sample-apps | 6b107ffc67fc917d66fabdeff893b5b7cb157c61 | [
"Apache-2.0"
] | 167 | 2017-09-27T08:16:26.000Z | 2022-03-19T23:26:08.000Z | vespa-cloud/cord-19-search/scripts/add-embeddings.py | appotry/sample-apps | 6b107ffc67fc917d66fabdeff893b5b7cb157c61 | [
"Apache-2.0"
] | 197 | 2017-08-16T09:29:57.000Z | 2022-03-29T07:03:28.000Z | vespa-cloud/cord-19-search/scripts/add-embeddings.py | appotry/sample-apps | 6b107ffc67fc917d66fabdeff893b5b7cb157c61 | [
"Apache-2.0"
] | 85 | 2017-08-21T18:28:56.000Z | 2022-03-20T00:09:17.000Z | #!/usr/bin/env python3
# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
import pandas
import sys
import json
DATA_FILE = sys.argv[1]
EMBEDDINGS = sys.argv[2]
embeddings = pandas.read_csv(EMBEDDINGS)
docs = []
with open(DATA_FILE, 'r') as f:
for doc in json.... | 24.818182 | 103 | 0.653236 |
6276aa1206864fa6b58a2736dd1059be91a7d82d | 158,113 | py | Python | tests/components/zha/zha_devices_list.py | ZacTyAdams/core | 57851e9623587b8da98ab0d87d4dd033765118ba | [
"Apache-2.0"
] | 1 | 2019-03-21T14:20:48.000Z | 2019-03-21T14:20:48.000Z | tests/components/zha/zha_devices_list.py | ZacTyAdams/core | 57851e9623587b8da98ab0d87d4dd033765118ba | [
"Apache-2.0"
] | 19 | 2021-11-03T06:21:55.000Z | 2022-03-31T06:21:23.000Z | tests/components/zha/zha_devices_list.py | ZacTyAdams/core | 57851e9623587b8da98ab0d87d4dd033765118ba | [
"Apache-2.0"
] | null | null | null | """Example Zigbee Devices."""
from zigpy.const import (
SIG_ENDPOINTS,
SIG_EP_INPUT,
SIG_EP_OUTPUT,
SIG_EP_PROFILE,
SIG_EP_TYPE,
SIG_MANUFACTURER,
SIG_MODEL,
SIG_NODE_DESC,
)
DEV_SIG_CHANNELS = "channels"
DEV_SIG_DEV_NO = "device_no"
DEV_SIG_ENTITIES = "entities"
DEV_SIG_ENT_MAP = "ent... | 39.816923 | 132 | 0.529684 |
62770596cce458f16f44297c2eaba5a6dd15e29c | 2,268 | py | Python | python/rogue_gym/envs/wrappers.py | kngwyu/rogue-gym | 00de77e6c9f3d2b9ed602f93abb5526c13791ca9 | [
"Apache-2.0",
"MIT"
] | 67 | 2018-11-29T03:05:59.000Z | 2022-02-23T20:05:21.000Z | python/rogue_gym/envs/wrappers.py | kngwyu/rogue-gym | 00de77e6c9f3d2b9ed602f93abb5526c13791ca9 | [
"Apache-2.0",
"MIT"
] | 2 | 2019-02-27T10:44:05.000Z | 2022-03-05T22:25:49.000Z | python/rogue_gym/envs/wrappers.py | kngwyu/rogue-gym | 00de77e6c9f3d2b9ed602f93abb5526c13791ca9 | [
"Apache-2.0",
"MIT"
] | 6 | 2020-05-11T01:37:53.000Z | 2022-03-05T20:56:19.000Z | from .rogue_env import PlayerState, RogueEnv
from .parallel import ParallelRogueEnv
from gym import Env, Wrapper
from typing import Iterable, List, Tuple, Union
def check_rogue_env(env: Env) -> None:
if not isinstance(env.unwrapped, RogueEnv):
raise ValueError('env have to be a wrapper of RoguEnv')
clas... | 34.363636 | 85 | 0.627425 |
6277175a3985bb10d8daa45deb036c70dc7fdb7c | 895 | py | Python | hackerrank/python/Algorithms/03_Strings/03_TwoCharacters/test.py | edlabao/cs-practice | 44b94e71f063a663b6c98a5da2f0066764d01a38 | [
"MIT"
] | null | null | null | hackerrank/python/Algorithms/03_Strings/03_TwoCharacters/test.py | edlabao/cs-practice | 44b94e71f063a663b6c98a5da2f0066764d01a38 | [
"MIT"
] | null | null | null | hackerrank/python/Algorithms/03_Strings/03_TwoCharacters/test.py | edlabao/cs-practice | 44b94e71f063a663b6c98a5da2f0066764d01a38 | [
"MIT"
] | null | null | null | """
Run the test cases for the excercise as unittests.
"""
import unittest
from solution import solve
class Test(unittest.TestCase):
def test_case_1(self):
s = "beabeefeab"
answer = 5
self.assertEqual(answer, solve(s))
def test_case_8(self):
s = "uyetuppelecblwipdsqabzsvyfa... | 28.870968 | 79 | 0.697207 |
627717d1e55eea07fa91a301a02a90274120ee0b | 2,973 | py | Python | experiments/ashvin/nips_release/sandbox/pusher2/oracle.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/nips_release/sandbox/pusher2/oracle.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/nips_release/sandbox/pusher2/oracle.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | from rlkit.launchers.experiments.murtaza.multiworld import her_td3_experiment
import rlkit.misc.hyperparameter as hyp
from multiworld.envs.mujoco.cameras import sawyer_pusher_camera_upright_v2
from multiworld.envs.mujoco.sawyer_xyz.sawyer_push_and_reach_env import (
SawyerPushAndReachXYEnv
)
from multiworld.envs.mu... | 29.73 | 89 | 0.61184 |
627734675824d8df5815ee16c1987237c0378c76 | 10,616 | py | Python | netmiko/ssh_dispatcher.py | Rawrroar/netmiko | 5477580e168f79571920b61e718d0a8781b39dbb | [
"MIT"
] | null | null | null | netmiko/ssh_dispatcher.py | Rawrroar/netmiko | 5477580e168f79571920b61e718d0a8781b39dbb | [
"MIT"
] | null | null | null | netmiko/ssh_dispatcher.py | Rawrroar/netmiko | 5477580e168f79571920b61e718d0a8781b39dbb | [
"MIT"
] | null | null | null | """Controls selection of proper class based on the device type."""
from netmiko.a10 import A10SSH
from netmiko.accedian import AccedianSSH
from netmiko.alcatel import AlcatelAosSSH
from netmiko.alcatel import AlcatelSrosSSH
from netmiko.alliedtelesis import AWplusSSH, AWplusFileTransfer
from netmiko.arista import Arist... | 37.512367 | 97 | 0.782216 |
62773fae0bd70d2619f43c670f66d455c7296a25 | 2,162 | py | Python | server/pyfiles/controller/gameController.py | TheDarrenJoseph/AberWebMUD | c8b33e03a0c78e5d0aceaa1ce85a2924c71cdb1c | [
"MIT"
] | 2 | 2018-08-20T18:09:47.000Z | 2019-04-29T06:18:42.000Z | server/pyfiles/controller/gameController.py | TheDarrenJoseph/AberWebMUD | c8b33e03a0c78e5d0aceaa1ce85a2924c71cdb1c | [
"MIT"
] | 6 | 2019-04-28T20:56:25.000Z | 2022-02-12T04:33:23.000Z | server/pyfiles/controller/gameController.py | TheDarrenJoseph/AberWebMUD | c8b33e03a0c78e5d0aceaa1ce85a2924c71cdb1c | [
"MIT"
] | null | null | null | """
This is the central controller that ties our messaging layers (Flask, SocketIO) into the game layer (controllers)
"""
import logging
from pony.orm import db_session
from pyfiles.sockets import socketHandler
from pyfiles.flask import flaskHandler
from pyfiles import playerController
from pyfiles.playerControll... | 37.275862 | 118 | 0.715079 |
62774a749b2fb969a6c3b7a3de6746e5d046f497 | 4,600 | py | Python | hashicorp_vault_client/hashicorp_vault_client/models/body46.py | drewmullen/HAC | fb185804fd244366f8f8d01df22835b3d96e7512 | [
"Apache-2.0"
] | null | null | null | hashicorp_vault_client/hashicorp_vault_client/models/body46.py | drewmullen/HAC | fb185804fd244366f8f8d01df22835b3d96e7512 | [
"Apache-2.0"
] | 2 | 2019-09-30T20:56:41.000Z | 2019-10-02T00:22:07.000Z | hashicorp_vault_client/hashicorp_vault_client/models/body46.py | drewmullen/HAC | fb185804fd244366f8f8d01df22835b3d96e7512 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
HashiCorp Vault API
HTTP API that gives you full access to Vault. All API routes are prefixed with `/v1/`. # noqa: E501
OpenAPI spec version: 1.2.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class... | 27.058824 | 104 | 0.547391 |
62775dfa74ba302becfe5ce1c79bce83bd0ff3a3 | 2,493 | py | Python | src/query.py | andrewjwesson/news-sentiment-tracker | 1c9e8669f2f27de4b3105301cd84ceac8b54512c | [
"MIT"
] | 3 | 2019-07-24T09:18:31.000Z | 2021-05-30T14:00:08.000Z | src/query.py | andrewjwesson/news-sentiment-tracker | 1c9e8669f2f27de4b3105301cd84ceac8b54512c | [
"MIT"
] | 3 | 2021-06-01T23:37:08.000Z | 2021-08-16T21:37:41.000Z | src/query.py | andrewjwesson/news-sentiment-tracker | 1c9e8669f2f27de4b3105301cd84ceac8b54512c | [
"MIT"
] | 1 | 2020-09-03T18:50:53.000Z | 2020-09-03T18:50:53.000Z | from pyspark import SparkConf, SparkContext
import sys
import json
from lark import Lark, Transformer
grammar = """
?start: query
?query: pred
| query "&" pred -> qand
| query "|" pred -> qor
| query "-" pred -> minus
?pred: term
| WORD ">" NUMBER -> gt
... | 26.806452 | 71 | 0.549539 |
627768a807f8bcc3be754c49d65b65909a993e25 | 13,193 | py | Python | anomaly_multi_sensitivity.py | pwu01/ALADDIN-BiGAN-anomaly-detection | 9843c89f0f11fba043f0cc08bb3d4026741c1025 | [
"MIT"
] | 3 | 2021-09-28T20:19:27.000Z | 2022-01-07T04:03:12.000Z | anomaly_multi_sensitivity.py | pwu01/ALADDIN-BiGAN-anomaly-detection | 9843c89f0f11fba043f0cc08bb3d4026741c1025 | [
"MIT"
] | null | null | null | anomaly_multi_sensitivity.py | pwu01/ALADDIN-BiGAN-anomaly-detection | 9843c89f0f11fba043f0cc08bb3d4026741c1025 | [
"MIT"
] | 2 | 2021-10-09T10:00:19.000Z | 2021-11-27T14:06:34.000Z | """
By Peng Wu, peng.wu.14@ucl.ac.uk, 12/08/2020
Generative Adversarial Network (GAN) anomaly detection
This scripts builds Bidirectional Generative Adversarial Network (GAN) based anomaly detection
Key references:
- Generative Adversarial Nets, https://arxiv.org/abs/1406.2661
- Adversarially Learned Inference (A... | 45.181507 | 119 | 0.610399 |
62778ec8b868fc6b12ea6c6296a2425ed3ca5165 | 9,396 | py | Python | plates_demo_pytorch.py | selfyu/License-Plates-Recognition | bbbe8ada6761828aafa8d135b462e4971b07c513 | [
"MIT"
] | null | null | null | plates_demo_pytorch.py | selfyu/License-Plates-Recognition | bbbe8ada6761828aafa8d135b462e4971b07c513 | [
"MIT"
] | null | null | null | plates_demo_pytorch.py | selfyu/License-Plates-Recognition | bbbe8ada6761828aafa8d135b462e4971b07c513 | [
"MIT"
] | 1 | 2020-09-02T16:06:35.000Z | 2020-09-02T16:06:35.000Z | import numpy as np
import cv2
import imutils
import tesserocr
from PIL import Image
import pytesseract
from pathlib import Path
import torch
from torch.autograd import Variable
import utils
#import dataset
from PIL import Image
import models.crnn as crnn
def scale_contour(contour, scale_factor):
... | 34.671587 | 102 | 0.642933 |
6277bdc19d29e10921918182506e0f066cf86a80 | 1,841 | py | Python | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_05_01/models/base_image_trigger_update_parameters_py3.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | null | null | null | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_05_01/models/base_image_trigger_update_parameters_py3.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | null | null | null | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_05_01/models/base_image_trigger_update_parameters_py3.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 39.170213 | 103 | 0.642042 |
6278024df4a73bdd7a5bd1fda2aad8d7f4a578c1 | 2,229 | py | Python | 2020/06/a.py | cj-wong/advent | f6a489773f488f5daf49caa9d652b1886608b928 | [
"MIT"
] | null | null | null | 2020/06/a.py | cj-wong/advent | f6a489773f488f5daf49caa9d652b1886608b928 | [
"MIT"
] | null | null | null | 2020/06/a.py | cj-wong/advent | f6a489773f488f5daf49caa9d652b1886608b928 | [
"MIT"
] | null | null | null | from typing import List
import config
def count_mutual_answerable_cdf(answers: List[str]) -> int:
"""Count the number of answerable customs declaration form questions.
Unlike count_answerable_cdf(), only answers shared by all individuals
in a group will be counted.
Args:
answers (List[str])... | 24.766667 | 73 | 0.604307 |
62780da1fff0ee54b709617535cbc69cca0409dd | 4,725 | py | Python | lib/model/extension_layers/extension_layers.py | miyamotost/hand_object_detector | 34c8c6ad53306d4a12c12857e71bcd73bd6a68bf | [
"MIT"
] | 130 | 2020-06-12T00:44:32.000Z | 2022-03-29T18:22:54.000Z | lib/model/extension_layers/extension_layers.py | miyamotost/hand_object_detector | 34c8c6ad53306d4a12c12857e71bcd73bd6a68bf | [
"MIT"
] | 16 | 2020-06-26T09:27:32.000Z | 2022-02-12T02:57:06.000Z | lib/model/extension_layers/extension_layers.py | miyamotost/hand_object_detector | 34c8c6ad53306d4a12c12857e71bcd73bd6a68bf | [
"MIT"
] | 40 | 2020-06-12T13:38:19.000Z | 2022-03-13T08:32:31.000Z | import torch
from torch import nn
from torch.autograd import Function
from torch.autograd.function import once_differentiable
from torch.nn.modules.utils import _pair
import torch.nn.functional as F
import pickle
import datetime
class extension_layer(nn.Module):
def __init__(self):
super(extension_layer, ... | 35.526316 | 132 | 0.591111 |
62782179ffd9290a09c7223f909085042da8a9c8 | 6,451 | py | Python | TerminalPage.py | hdo/bCNC | c0c6489c80265f95b554e6566835874497cf969d | [
"MIT",
"BSD-3-Clause"
] | null | null | null | TerminalPage.py | hdo/bCNC | c0c6489c80265f95b554e6566835874497cf969d | [
"MIT",
"BSD-3-Clause"
] | null | null | null | TerminalPage.py | hdo/bCNC | c0c6489c80265f95b554e6566835874497cf969d | [
"MIT",
"BSD-3-Clause"
] | null | null | null | # -*- coding: ascii -*-
# $Id$
#
# Author: vvlachoudis@gmail.com
# Date: 18-Jun-2015
__author__ = "Vasilis Vlachoudis"
__email__ = "vvlachoudis@gmail.com"
try:
from Tkinter import *
except ImportError:
from tkinter import *
import Utils
import Ribbon
import tkExtra
import CNCRibbon
#=============================... | 31.622549 | 81 | 0.595412 |
6278300cd8f5ce8f9b8eace156768fa51d3c8f50 | 2,961 | py | Python | src/api/endpoints/roles/society_roles.py | andela/andela-societies-backend | b8382f308449a08e5c7bda46c6deabe597cc2e25 | [
"MIT"
] | 1 | 2018-09-13T16:33:20.000Z | 2018-09-13T16:33:20.000Z | src/api/endpoints/roles/society_roles.py | jonathankamau/andela-societies-backend | b8382f308449a08e5c7bda46c6deabe597cc2e25 | [
"MIT"
] | 6 | 2019-03-11T17:50:27.000Z | 2019-08-26T11:00:40.000Z | src/api/endpoints/roles/society_roles.py | jonathankamau/andela-societies-backend | b8382f308449a08e5c7bda46c6deabe597cc2e25 | [
"MIT"
] | 9 | 2019-01-09T12:23:12.000Z | 2021-05-28T04:58:31.000Z | from flask import request
from flask_restful import Resource
from api.services.auth import roles_required, token_required
from api.utils.helpers import response_builder
class SocietyRoleAPI(Resource):
"""Contains functionality to change Society Executives."""
def __init__(self, **kwargs):
"""Inject ... | 32.184783 | 79 | 0.563661 |
6278484634be13c5456325c646726d4084b66152 | 6,742 | py | Python | detectron2/modeling/meta_arch/semantic_seg.py | superclass-FSIS/test | 9bb2844c77704a609291135b75e94a794f235aa0 | [
"Apache-2.0"
] | 196 | 2020-03-10T03:34:47.000Z | 2022-03-29T11:40:16.000Z | detectron2/modeling/meta_arch/semantic_seg.py | superclass-FSIS/test | 9bb2844c77704a609291135b75e94a794f235aa0 | [
"Apache-2.0"
] | 19 | 2020-03-11T05:32:28.000Z | 2022-03-12T00:18:42.000Z | detectron2/modeling/meta_arch/semantic_seg.py | superclass-FSIS/test | 9bb2844c77704a609291135b75e94a794f235aa0 | [
"Apache-2.0"
] | 19 | 2020-03-12T02:41:04.000Z | 2021-12-29T11:17:08.000Z | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
import numpy as np
from typing import Dict
import fvcore.nn.weight_init as weight_init
import torch
from torch import nn
from torch.nn import functional as F
from detectron2.layers import Conv2d, ShapeSpec
from detectron2.structures import ImageLis... | 38.971098 | 100 | 0.618214 |
62784afa72af6415fe5bf605d63d85691fed5e50 | 18,776 | py | Python | autox/autox_server/util.py | fanghy06/AutoX | 0bad349ef1b047152e2608760fd5d197128be723 | [
"Apache-2.0"
] | 499 | 2021-07-27T02:57:58.000Z | 2022-03-28T12:08:27.000Z | autox/autox_server/util.py | fanghy06/AutoX | 0bad349ef1b047152e2608760fd5d197128be723 | [
"Apache-2.0"
] | 9 | 2021-08-03T15:14:56.000Z | 2022-03-11T07:06:06.000Z | autox/autox_server/util.py | fanghy06/AutoX | 0bad349ef1b047152e2608760fd5d197128be723 | [
"Apache-2.0"
] | 87 | 2021-07-27T01:13:02.000Z | 2022-03-29T02:14:09.000Z | import time
import pandas as pd
import warnings
warnings.filterwarnings('ignore')
import re
import datetime
import json
import pickle
# log
import logging
LOGGER = logging.getLogger('run-time-adaptive_automl')
# LOG_LEVEL = 'INFO'
LOG_LEVEL = 'DEBUG'
LOGGER.setLevel(getattr(logging, LOG_LEVEL))
simple_formatter = log... | 36.815686 | 233 | 0.579197 |
627854fc77bd74002490b679eb74351e5cdb02a2 | 9,064 | py | Python | DenseCores/coremass.py | xinglunju/CMZclouds | b496bc29fa4e393c79a0c4eb3542bf065aeb4d74 | [
"MIT"
] | null | null | null | DenseCores/coremass.py | xinglunju/CMZclouds | b496bc29fa4e393c79a0c4eb3542bf065aeb4d74 | [
"MIT"
] | null | null | null | DenseCores/coremass.py | xinglunju/CMZclouds | b496bc29fa4e393c79a0c4eb3542bf065aeb4d74 | [
"MIT"
] | 1 | 2019-01-24T01:43:15.000Z | 2019-01-24T01:43:15.000Z | import astropy.constants as const
import astropy.units as u
from astropy.modeling.blackbody import blackbody_nu
import numpy as np
c = const.c.cgs.value
h = const.h.cgs.value
kb = const.k_B.cgs.value
msun = const.M_sun.cgs.value
pc = const.pc.cgs.value
AU = u.AU.cgs.scale
mp = const.m_p.cgs.value
jy = u.Jy.cgs.scale
G... | 73.096774 | 118 | 0.595432 |
62785d5651ca8b78b7ecc694a3ef73cb7d71f9d4 | 6,241 | py | Python | pytorch2keras/activation_layers.py | aropan/pytorch2keras | c5bec0f9642b9050bc1884b33b37c8b070b169b2 | [
"MIT"
] | null | null | null | pytorch2keras/activation_layers.py | aropan/pytorch2keras | c5bec0f9642b9050bc1884b33b37c8b070b169b2 | [
"MIT"
] | null | null | null | pytorch2keras/activation_layers.py | aropan/pytorch2keras | c5bec0f9642b9050bc1884b33b37c8b070b169b2 | [
"MIT"
] | null | null | null | import numpy as np
import keras.layers
import random
import tensorflow as tf
from .common import random_string
def convert_relu(params, w_name, scope_name, inputs, layers, weights, names):
"""
Convert relu layer.
Args:
params: dictionary with layer parameters
w_name: name prefix in state_... | 29.438679 | 92 | 0.644128 |
6278768a4b1416deff8ff8391bfdac4977284cb0 | 4,115 | py | Python | xpctl-client/xpclient/models/aggregate_result.py | mead-ml/xpctl | 75fcb195e66519b545ddd7aeb2d7476624c20c46 | [
"Apache-2.0"
] | 3 | 2019-07-11T17:05:25.000Z | 2020-11-19T08:11:31.000Z | xpctl-client/xpclient/models/aggregate_result.py | mead-ml/xpctl | 75fcb195e66519b545ddd7aeb2d7476624c20c46 | [
"Apache-2.0"
] | 4 | 2019-06-28T01:07:42.000Z | 2020-07-24T15:12:57.000Z | xpctl-client/xpclient/models/aggregate_result.py | mead-ml/xpctl | 75fcb195e66519b545ddd7aeb2d7476624c20c46 | [
"Apache-2.0"
] | 2 | 2019-06-27T19:10:05.000Z | 2019-08-15T20:15:49.000Z | # coding: utf-8
"""
xpctl
This is a sample xpctl server. You can find out more about xpctl at [baseline](https://github.com/dpressel/baseline/blob/master/docs/xpctl.md). # noqa: E501
OpenAPI spec version: 1.0.0
Contact: apiteam@swagger.io
Generated by: https://github.com/swagger-api/swagger-co... | 28.184932 | 163 | 0.573269 |
62788ba1298c9b6bee4ef106b907eda1b7d9003a | 3,748 | py | Python | scsv.py | jonnyt886/jpy | 7e950239785de09d1e11c1d81135fa51bf450616 | [
"MIT"
] | null | null | null | scsv.py | jonnyt886/jpy | 7e950239785de09d1e11c1d81135fa51bf450616 | [
"MIT"
] | null | null | null | scsv.py | jonnyt886/jpy | 7e950239785de09d1e11c1d81135fa51bf450616 | [
"MIT"
] | null | null | null | # simple csv - wrapper around csvreader which makes asserting headers a little easier
from jpy.asrt import *
import csv, codecs
class CSV(object):
def __init__(self, filename, delimiter=',', file_codec = None):
self.filename = filename
self.delimiter = delimiter
self.file_codec = file_code... | 26.964029 | 112 | 0.575774 |
62788d8b3115862b2b3f5f2bf3d075baa4ee7494 | 2,375 | py | Python | oscar/lib/python2.7/site-packages/pbr/tests/testpackage/pbr_testpackage/_setup_hooks.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/pbr/tests/testpackage/pbr_testpackage/_setup_hooks.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/pbr/tests/testpackage/pbr_testpackage/_setup_hooks.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
#
# 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... | 35.984848 | 78 | 0.719158 |
627898c21b04588e77f76abf21a299e03ec43697 | 208 | py | Python | src/pandas_profiling_study/report/presentation/flavours/qt/frequency_table.py | lucasiscoviciMoon/pandas-profiling-study | 142d3b0f5e3139cdb531819f637a407682fa5684 | [
"MIT"
] | null | null | null | src/pandas_profiling_study/report/presentation/flavours/qt/frequency_table.py | lucasiscoviciMoon/pandas-profiling-study | 142d3b0f5e3139cdb531819f637a407682fa5684 | [
"MIT"
] | null | null | null | src/pandas_profiling_study/report/presentation/flavours/qt/frequency_table.py | lucasiscoviciMoon/pandas-profiling-study | 142d3b0f5e3139cdb531819f637a407682fa5684 | [
"MIT"
] | 1 | 2020-04-25T15:20:39.000Z | 2020-04-25T15:20:39.000Z | from PyQt5.QtWidgets import QPushButton
from .....report.presentation.core import FrequencyTable
class QtFrequencyTable(FrequencyTable):
def render(self):
return QPushButton("Frequency Table")
| 23.111111 | 56 | 0.769231 |
62789b7338b9d046f14212987aa4574d9ca268f9 | 19,969 | py | Python | sympy/polys/tests/test_polyroots.py | lemmalearning/sympy | 62ad387ed3f7b243c889dd342296afc9a32ad1ea | [
"BSD-3-Clause"
] | 1 | 2015-08-31T06:55:47.000Z | 2015-08-31T06:55:47.000Z | sympy/polys/tests/test_polyroots.py | lemmalearning/sympy | 62ad387ed3f7b243c889dd342296afc9a32ad1ea | [
"BSD-3-Clause"
] | null | null | null | sympy/polys/tests/test_polyroots.py | lemmalearning/sympy | 62ad387ed3f7b243c889dd342296afc9a32ad1ea | [
"BSD-3-Clause"
] | 3 | 2015-04-18T22:33:32.000Z | 2015-09-23T06:45:07.000Z | """Tests for algorithms for computing symbolic roots of polynomials. """
from sympy import (S, symbols, Symbol, Wild, Integer, Rational, sqrt,
powsimp, Lambda, sin, cos, pi, I, Interval, re, im, exp, ZZ, Piecewise,
acos)
from sympy.polys import (Poly, cyclotomic_poly, intervals, nroots,
PolynomialError)
... | 36.045126 | 98 | 0.479994 |
6278ac8d2547e2ed401cef09bae49acb45e8c0bd | 672 | py | Python | examples/01.HelloWorld.py | wuqunfei/stream-app-python-training | 41b9d1cf3b1e7fe28fd7a6ef671c151e4aed6f9c | [
"Apache-2.0"
] | 1 | 2020-12-02T16:31:07.000Z | 2020-12-02T16:31:07.000Z | examples/01.HelloWorld.py | wuqunfei/stream-app-python-training | 41b9d1cf3b1e7fe28fd7a6ef671c151e4aed6f9c | [
"Apache-2.0"
] | null | null | null | examples/01.HelloWorld.py | wuqunfei/stream-app-python-training | 41b9d1cf3b1e7fe28fd7a6ef671c151e4aed6f9c | [
"Apache-2.0"
] | null | null | null | import logging
import faust
import datetime
from faust import Worker
app = faust.App(
'hello-world-app',
broker='kafka://localhost:9092',
value_serializer='raw',
store='rocksdb://',
version=1,
)
greetings_topic = app.topic('greetings')
@app.agent(greetings_topic)
async def consumer(greetings):
... | 19.764706 | 76 | 0.691964 |
6278c572bbeb9d3d51b9ebf3d90a4d2fe62f34df | 786 | py | Python | common/context_processors.py | casainurbania/exam3 | 25f814cd0cc4b839fb9a12039af04837b61961dd | [
"Apache-2.0"
] | null | null | null | common/context_processors.py | casainurbania/exam3 | 25f814cd0cc4b839fb9a12039af04837b61961dd | [
"Apache-2.0"
] | null | null | null | common/context_processors.py | casainurbania/exam3 | 25f814cd0cc4b839fb9a12039af04837b61961dd | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
context_processor for common(setting)
除setting外的其他context_processor内容,均采用组件的方式(string)
"""
from django.conf import settings
import datetime
def mysetting(request):
return {
# 基础信息
'RUN_MODE': settings.RUN_MODE,
'APP_ID': settings.APP_ID,
'SITE_URL': set... | 27.103448 | 63 | 0.639949 |
6278c5da2b0597160e494fa3accdd55f0eabf743 | 9,168 | py | Python | runs/rwip4/run.py | drib861204/Soft-Actor-Critic-and-Extensions | 3075df7430c1c49177b3798d753a9e3f6226672e | [
"MIT"
] | null | null | null | runs/rwip4/run.py | drib861204/Soft-Actor-Critic-and-Extensions | 3075df7430c1c49177b3798d753a9e3f6226672e | [
"MIT"
] | null | null | null | runs/rwip4/run.py | drib861204/Soft-Actor-Critic-and-Extensions | 3075df7430c1c49177b3798d753a9e3f6226672e | [
"MIT"
] | null | null | null | import numpy as np
import random
import gym
#import pybulletgym # to run e.g. HalfCheetahPyBullet-v0
#import pybullet_envs # to run e.g. HalfCheetahBullet-v0 different reward function bullet-v0 starts ~ -1500. pybullet-v0 starts at 0
from collections import deque
import torch
import time
from torch.utils.tensorboard im... | 44.504854 | 205 | 0.653141 |
6278c84ec50bbcfc0f24b3339789c7edd8b24a1e | 1,319 | py | Python | src/ggrc/migrations/versions/20160608132526_170e453da661_add_comments_owners_info.py | Killswitchz/ggrc-core | 2460df94daf66727af248ad821462692917c97a9 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2018-01-03T02:49:23.000Z | 2018-01-03T02:49:23.000Z | src/ggrc/migrations/versions/20160608132526_170e453da661_add_comments_owners_info.py | trevordonnelly/ggrc-core | 499cf0d3cce70737b080991b12c203ec22015cea | [
"ECL-2.0",
"Apache-2.0"
] | 10 | 2018-07-06T00:04:23.000Z | 2021-02-26T21:13:20.000Z | src/ggrc/migrations/versions/20160608132526_170e453da661_add_comments_owners_info.py | zidarsk8/ggrc-core | 2509c989eddf434249d3bef50c21e08dbf56c1a4 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2017-11-11T22:16:56.000Z | 2017-11-11T22:16:56.000Z | # Copyright (C) 2017 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""
Add comments' owners information.
Create Date: 2016-06-08 13:25:26.635435
"""
# disable Invalid constant name pylint warning for mandatory Alembic variables.
# pylint: disable=invalid-name
from alembic... | 28.06383 | 79 | 0.727066 |
6278d88ba4d5d360125fa489a7b4fa552d4d7ad1 | 11,656 | py | Python | Pyrex/Plex/Scanners.py | jwilk/Pyrex | 83dfbae1261788933472e3f9c501ad74c61a37c5 | [
"Apache-2.0"
] | 964 | 2015-09-24T15:02:05.000Z | 2022-03-29T21:41:21.000Z | contrib/layout/layout/Plex/Scanners.py | seeminglee/pyglet64 | 3dd167b5b0d3ad132a157e404586e53c2bb21736 | [
"BSD-3-Clause"
] | 435 | 2015-09-23T16:46:58.000Z | 2020-04-19T12:32:03.000Z | contrib/layout/layout/Plex/Scanners.py | seeminglee/pyglet64 | 3dd167b5b0d3ad132a157e404586e53c2bb21736 | [
"BSD-3-Clause"
] | 86 | 2015-10-24T20:08:30.000Z | 2021-08-09T13:53:00.000Z | #=======================================================================
#
# Python Lexical Analyser
#
#
# Scanning an input stream
#
#=======================================================================
import Errors
from Regexps import BOL, EOL, EOF
class Scanner:
"""
A Scanner is used to read tokens fro... | 30.835979 | 85 | 0.604581 |
6278dbe4ca92c677625e9cf67390e9cf285ec215 | 4,926 | py | Python | tests/_display/test_rectangle.py | ynsnf/apysc | b10ffaf76ec6beb187477d0a744fca00e3efc3fb | [
"MIT"
] | 16 | 2021-04-16T02:01:29.000Z | 2022-01-01T08:53:49.000Z | tests/_display/test_rectangle.py | ynsnf/apysc | b10ffaf76ec6beb187477d0a744fca00e3efc3fb | [
"MIT"
] | 613 | 2021-03-24T03:37:38.000Z | 2022-03-26T10:58:37.000Z | tests/_display/test_rectangle.py | simon-ritchie/apyscript | c319f8ab2f1f5f7fad8d2a8b4fc06e7195476279 | [
"MIT"
] | 2 | 2021-06-20T07:32:58.000Z | 2021-12-26T08:22:11.000Z | import re
from random import randint
from typing import List
from typing import Match
from typing import Optional
from retrying import retry
import apysc as ap
from apysc._display.stage import get_stage_variable_name
from apysc._expression import expression_data_util
from apysc._expression import var_names... | 43.59292 | 77 | 0.665449 |
6278e2ec42c85aad91a31e807e2b838ba7366ba2 | 953 | py | Python | services/director/docker/healthcheck.py | oetiker/osparc-simcore | 00918bf8f000840cc70cc49458780a55858d52ea | [
"MIT"
] | null | null | null | services/director/docker/healthcheck.py | oetiker/osparc-simcore | 00918bf8f000840cc70cc49458780a55858d52ea | [
"MIT"
] | 2 | 2018-05-13T09:10:57.000Z | 2019-03-06T08:10:40.000Z | services/director/docker/healthcheck.py | oetiker/osparc-simcore | 00918bf8f000840cc70cc49458780a55858d52ea | [
"MIT"
] | null | null | null | #!/bin/python
""" Healthcheck script to run inside docker
Example of usage in a Dockerfile
```
COPY --chown=scu:scu docker/healthcheck.py docker/healthcheck.py
HEALTHCHECK --interval=30s \
--timeout=30s \
--start-period=1s \
--retries=3 \
CMD pyth... | 25.078947 | 101 | 0.642183 |
627916543dd4f467e7e090cb465f750d73297eb6 | 489 | py | Python | Problem-No-5/Approach-No-1.py | mynameismon/comp-project-grade-11 | fe187740f761b4a25450ab2c982d4d248f4ae176 | [
"MIT"
] | 3 | 2020-10-23T05:21:23.000Z | 2022-01-10T10:58:42.000Z | Problem-No-5/Approach-No-1.py | mynameismon/comp-project-grade-11 | fe187740f761b4a25450ab2c982d4d248f4ae176 | [
"MIT"
] | 3 | 2020-10-25T10:44:32.000Z | 2020-10-25T16:44:15.000Z | Problem-No-5/Approach-No-1.py | mynameismon/comp-project-grade-11 | fe187740f761b4a25450ab2c982d4d248f4ae176 | [
"MIT"
] | 6 | 2020-10-23T05:18:56.000Z | 2021-01-14T09:32:35.000Z | '''
| Write a program to find the area of a triangle using Heroin’s formula |
|---------------------------------------------------------------------------------------------|
| Using the math module |
'''
import math
a = int(inpu... | 40.75 | 95 | 0.366053 |
6279166c0a09a26801b0ff1a4014427ac3dd5b3f | 16,849 | py | Python | oslo_cache/core.py | mahak/oslo.cache | e0f47b744b9a55124f2792b38be81149797e3211 | [
"Apache-2.0"
] | 29 | 2015-04-26T16:05:14.000Z | 2021-12-31T15:03:19.000Z | oslo_cache/core.py | mahak/oslo.cache | e0f47b744b9a55124f2792b38be81149797e3211 | [
"Apache-2.0"
] | null | null | null | oslo_cache/core.py | mahak/oslo.cache | e0f47b744b9a55124f2792b38be81149797e3211 | [
"Apache-2.0"
] | 19 | 2015-06-15T23:51:10.000Z | 2020-12-10T00:03:21.000Z | # Copyright 2013 Metacloud
#
# 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, s... | 38.733333 | 79 | 0.682414 |
62791ff6652b59e6583bd1bb998f9a449c5ac3ec | 9,698 | py | Python | raven/utils/stacks.py | danriti/raven-python | f9060ccf67d8b19a7d06946895b1039f65e67b53 | [
"BSD-3-Clause"
] | null | null | null | raven/utils/stacks.py | danriti/raven-python | f9060ccf67d8b19a7d06946895b1039f65e67b53 | [
"BSD-3-Clause"
] | null | null | null | raven/utils/stacks.py | danriti/raven-python | f9060ccf67d8b19a7d06946895b1039f65e67b53 | [
"BSD-3-Clause"
] | null | null | null | """
raven.utils.stacks
~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
import inspect
import linecache
import re
import sys
import warnings
from raven.utils.serializer import... | 32.763514 | 141 | 0.625284 |
627921546f3c8af700ffd21ff90f2c394094bbae | 9,054 | py | Python | tests/python/unittest/test_lang_schedule.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | 48 | 2020-07-29T18:09:23.000Z | 2021-10-09T01:53:33.000Z | tests/python/unittest/test_lang_schedule.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | 9 | 2021-04-02T02:28:07.000Z | 2022-03-26T18:23:59.000Z | tests/python/unittest/test_lang_schedule.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | 42 | 2020-08-01T06:41:24.000Z | 2022-01-20T10:33:08.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 35.229572 | 83 | 0.617186 |
62792e659d7a6b7f2c2cff5d1c7d38ebac7d4cc8 | 3,034 | py | Python | examples/autograd/data.py | Duane321/pyprobml | 6d0ba29f22dc7fec9dfc73788bc5520e97663bdb | [
"MIT"
] | null | null | null | examples/autograd/data.py | Duane321/pyprobml | 6d0ba29f22dc7fec9dfc73788bc5520e97663bdb | [
"MIT"
] | null | null | null | examples/autograd/data.py | Duane321/pyprobml | 6d0ba29f22dc7fec9dfc73788bc5520e97663bdb | [
"MIT"
] | null | null | null | #https://github.com/HIPS/autograd/blob/master/examples/data.py
from __future__ import absolute_import
import matplotlib.pyplot as plt
import matplotlib.image
import autograd.numpy as np
import autograd.numpy.random as npr
#import data_mnist
from examples.autograd import data_mnist
from utils.util import save_fig
def ... | 41 | 97 | 0.673368 |
627949367594d2eee58f766f15b231689a773317 | 1,705 | py | Python | config_postgres_db.py | idelfrides/ijpypostgresql | 4852766a3072cf5a13a70dbbb7189bf88be84185 | [
"RSA-MD"
] | 1 | 2019-08-12T11:12:41.000Z | 2019-08-12T11:12:41.000Z | config_postgres_db.py | idelfrides/ijpypostgresql_API | 4852766a3072cf5a13a70dbbb7189bf88be84185 | [
"RSA-MD"
] | null | null | null | config_postgres_db.py | idelfrides/ijpypostgresql_API | 4852766a3072cf5a13a70dbbb7189bf88be84185 | [
"RSA-MD"
] | null | null | null | #!/usr/bin/python
# ---------------------------------------
# importing modules
# ---------------------------------------
import os
from curses import curs_set
from crud_operations import CrudOperations
from ModulePostgreSQLdb import ModulePostgreSQLdb
# from ijpypostgresql.HelperModule import HelperModule
import psy... | 22.434211 | 79 | 0.658651 |
62797888eb237b1bf6f494ce752ee46e7dd3e34e | 7,717 | py | Python | weblogo/seq_io/fasta_io.py | ghuls/weblogo | 7eab5d1b8a8ec38786fa426af84bd77950835524 | [
"MIT"
] | 108 | 2015-08-21T10:39:22.000Z | 2022-03-04T22:10:49.000Z | weblogo/seq_io/fasta_io.py | ghuls/weblogo | 7eab5d1b8a8ec38786fa426af84bd77950835524 | [
"MIT"
] | 60 | 2015-07-21T22:55:52.000Z | 2022-03-24T21:20:00.000Z | weblogo/seq_io/fasta_io.py | ghuls/weblogo | 7eab5d1b8a8ec38786fa426af84bd77950835524 | [
"MIT"
] | 40 | 2015-08-04T00:18:23.000Z | 2021-12-30T13:41:54.000Z | #!/usr/bin/env python
# Copyright (c) 2005 Gavin E. Crooks <gec@threeplusone.com>
#
# This software is distributed under the MIT Open Source License.
# <http://www.opensource.org/licenses/mit-license.html>
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and asso... | 32.561181 | 80 | 0.622522 |
62797dc77fca3a15d859844c2186aa6d7aceb32f | 216 | py | Python | tests/unit/models/test_pea.py | jina-ai/jinad | 4fb874b145357668ecd84cb015c9db1939ed013c | [
"Apache-2.0"
] | 3 | 2020-10-29T10:11:42.000Z | 2022-03-15T02:32:43.000Z | tests/unit/models/test_pea.py | jina-ai/jinad | 4fb874b145357668ecd84cb015c9db1939ed013c | [
"Apache-2.0"
] | 41 | 2020-10-23T13:06:39.000Z | 2021-01-06T19:55:06.000Z | tests/unit/models/test_pea.py | jina-ai/jinad | 4fb874b145357668ecd84cb015c9db1939ed013c | [
"Apache-2.0"
] | null | null | null | from jinad.models import PeaModel
def test_no_exceptions():
PeaModel()
# this gets executed while verifying inputs
PeaModel().dict()
# this gets executed while creating docs
PeaModel().schema()
| 21.6 | 47 | 0.708333 |
6279a9908f7c681c33cc7471ccb0d6f2aae7c84c | 21,355 | py | Python | tests/test_utils.py | dssg/diogenes | 52eda2a7adb22044e82779d05f91c927c1b95f3f | [
"MIT"
] | 21 | 2015-09-28T15:04:53.000Z | 2017-11-19T22:21:31.000Z | tests/test_utils.py | dssg/diogenes | 52eda2a7adb22044e82779d05f91c927c1b95f3f | [
"MIT"
] | 28 | 2015-09-27T09:51:12.000Z | 2021-11-08T17:26:39.000Z | tests/test_utils.py | dssg/diogenes | 52eda2a7adb22044e82779d05f91c927c1b95f3f | [
"MIT"
] | 10 | 2015-11-21T19:50:14.000Z | 2018-05-21T16:16:25.000Z | import unittest
from datetime import datetime
import numpy as np
import pandas as pd
from sklearn.ensemble import RandomForestClassifier
from sklearn.svm import SVC
from sklearn.base import BaseEstimator
from diogenes import utils
from diogenes import modify
import utils_for_tests as uft
class TestUtils(unittest.... | 44.397089 | 138 | 0.457598 |
6279b56ac176b52202037ce2631e073c5f76d453 | 502 | py | Python | setup.py | slaclab/mps_database | 023ed9bb3b333e382cc612f816c3f4b295b66a4c | [
"BSD-3-Clause-LBNL"
] | null | null | null | setup.py | slaclab/mps_database | 023ed9bb3b333e382cc612f816c3f4b295b66a4c | [
"BSD-3-Clause-LBNL"
] | 1 | 2017-07-07T21:31:59.000Z | 2017-07-07T21:31:59.000Z | setup.py | slaclab/mps_database | 023ed9bb3b333e382cc612f816c3f4b295b66a4c | [
"BSD-3-Clause-LBNL"
] | 4 | 2017-07-07T20:10:54.000Z | 2020-12-13T00:03:37.000Z | from setuptools import setup, find_packages
with open('./requirements.txt') as f:
requirements = f.read().split('\n')
setup(
name='mps_database',
version='0.1.0',
author='Laura King',
author_email='lking@slac.stanford.edu',
packages=find_packages(include=['mps_database'], exclude=[]),
... | 29.529412 | 66 | 0.677291 |
6279c736619cd781cb7ea1224c3c69f48d16ac75 | 175 | py | Python | (2)Data Structures/collection_named_tuple_asdict.py | mass9/Python | 66499164e36a4fe9630029d34b292ab06f849b2f | [
"MIT"
] | null | null | null | (2)Data Structures/collection_named_tuple_asdict.py | mass9/Python | 66499164e36a4fe9630029d34b292ab06f849b2f | [
"MIT"
] | null | null | null | (2)Data Structures/collection_named_tuple_asdict.py | mass9/Python | 66499164e36a4fe9630029d34b292ab06f849b2f | [
"MIT"
] | null | null | null | import collections
Person = collections.namedtuple('Person', 'name age')
bob = Person(name='Bob', age=30)
print('Representation:', bob)
print('As Dictionary:', bob._asdict())
| 29.166667 | 53 | 0.725714 |
6279c8a164b6a77ffcfe54ee7103d4dafe353c11 | 75,749 | py | Python | Keras_tensorflow_nightly/source2.7/tensorflow/contrib/boosted_trees/python/ops/gen_quantile_ops.py | Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | [
"MIT"
] | 1 | 2019-06-27T12:09:44.000Z | 2019-06-27T12:09:44.000Z | Keras_tensorflow_nightly/source2.7/tensorflow/contrib/boosted_trees/python/ops/gen_quantile_ops.py | Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | [
"MIT"
] | null | null | null | Keras_tensorflow_nightly/source2.7/tensorflow/contrib/boosted_trees/python/ops/gen_quantile_ops.py | Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | [
"MIT"
] | null | null | null | """Python wrappers around TensorFlow ops.
This file is MACHINE GENERATED! Do not edit.
Original C++ source file: gen_quantile_ops_py_wrap.cc
"""
import collections as _collections
import six as _six
from tensorflow.python import pywrap_tensorflow as _pywrap_tensorflow
from tensorflow.python.eager import context as _... | 43.235731 | 4,087 | 0.72434 |
6279f9e928c1ea0cddc6334bccd563ce450715ea | 26,417 | py | Python | clevr-dataset-gen/question_generation/Clevr_test/clevr-dataset-gen/question_generation/generate_questions.py | LeoKingzc1/Clevr_test | ae3f7b85f8a9e40ef5721bad46e4659900555b4d | [
"Apache-2.0"
] | null | null | null | clevr-dataset-gen/question_generation/Clevr_test/clevr-dataset-gen/question_generation/generate_questions.py | LeoKingzc1/Clevr_test | ae3f7b85f8a9e40ef5721bad46e4659900555b4d | [
"Apache-2.0"
] | 1 | 2021-10-03T04:26:34.000Z | 2021-10-03T04:26:34.000Z | clevr-dataset-gen/question_generation/Clevr_test/clevr-dataset-gen/question_generation/generate_questions.py | LeoKingzc1/Clevr_test | ae3f7b85f8a9e40ef5721bad46e4659900555b4d | [
"Apache-2.0"
] | null | null | null | # Copyright 2017-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
from __future__ import print... | 37.846705 | 89 | 0.642238 |
627a45f198776bffefe00bf972bf0b33706a24b1 | 1,085 | py | Python | pyqt5_fundamentals/window5_QRadioButton.py | a-yildiz/ROS-Simple-Sample-Packages | eb6b18adcd1fe26e2b5e644c42922e8102867cd9 | [
"MIT"
] | 1 | 2021-09-19T07:51:23.000Z | 2021-09-19T07:51:23.000Z | pyqt5_fundamentals/window5_QRadioButton.py | a-yildiz/ROS-Simple-Sample-Packages | eb6b18adcd1fe26e2b5e644c42922e8102867cd9 | [
"MIT"
] | null | null | null | pyqt5_fundamentals/window5_QRadioButton.py | a-yildiz/ROS-Simple-Sample-Packages | eb6b18adcd1fe26e2b5e644c42922e8102867cd9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from PyQt5 import QtWidgets
import sys
"""
QRadioButton: Creates a list of options to select only one from.
"""
def create_window():
# Define window:
obj = QtWidgets.QApplication(sys.argv)
window = QtWidgets.QWidget()
# Set window attributes:
window.setWindowTitle("My... | 25.833333 | 93 | 0.677419 |
627a4f1f39fe08c3f218ce70363c519a791e1bed | 12,378 | py | Python | epm_client/rest.py | tub-elastest/epm-client-python | 4e708a7e8c80334337d2f05c0baec46fdd581b8f | [
"Apache-2.0"
] | 1 | 2019-05-23T12:51:18.000Z | 2019-05-23T12:51:18.000Z | epm_client/rest.py | tub-elastest/epm-client-python | 4e708a7e8c80334337d2f05c0baec46fdd581b8f | [
"Apache-2.0"
] | null | null | null | epm_client/rest.py | tub-elastest/epm-client-python | 4e708a7e8c80334337d2f05c0baec46fdd581b8f | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
EPM REST API
REST API description of the ElasTest Platform Manager Module.
OpenAPI spec version: 0.1.2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import io
import json
import ssl
import certifi
import logging... | 41.536913 | 120 | 0.5328 |
627a8d162ecaa39eb639b57ffe9caa3ec5788760 | 6,368 | py | Python | entity_layer/scheduler/scheduler_task.py | rohandhanraj/Auto-AI-Pipeline | d5f39715c802db45afae0d5978d228bf0bcd2f0a | [
"MIT"
] | null | null | null | entity_layer/scheduler/scheduler_task.py | rohandhanraj/Auto-AI-Pipeline | d5f39715c802db45afae0d5978d228bf0bcd2f0a | [
"MIT"
] | null | null | null | entity_layer/scheduler/scheduler_task.py | rohandhanraj/Auto-AI-Pipeline | d5f39715c802db45afae0d5978d228bf0bcd2f0a | [
"MIT"
] | null | null | null | from thread_layer.train_model_thread.train_model_thread import TrainModelThread
from thread_layer.predict_from_model_thread.predict_from_model_thread import PredictFromModelThread
from logging_layer.logger.log_exception import LogExceptionDetail
from logging_layer.logger.log_request import LogRequest
from data_access_l... | 51.772358 | 126 | 0.609768 |
627ac55f84feb2d3bed7644c39e2b8617960bea9 | 16,228 | py | Python | Sublime Text 3/Packages/backrefs/st3/backrefs/bregex.py | anekeallen/Sublime-Text-3 | 8502b9089ca4223f8ba7ff168626a0dbe67713cb | [
"MIT"
] | 7 | 2016-01-20T01:44:36.000Z | 2019-01-29T11:52:39.000Z | Sublime Text 3/Packages/backrefs/st3/backrefs/bregex.py | anekeallen/Sublime-Text-3 | 8502b9089ca4223f8ba7ff168626a0dbe67713cb | [
"MIT"
] | 109 | 2016-05-02T17:30:23.000Z | 2021-11-02T19:36:31.000Z | Sublime Text 3/Packages/backrefs/st3/backrefs/bregex.py | anekeallen/Sublime-Text-3 | 8502b9089ca4223f8ba7ff168626a0dbe67713cb | [
"MIT"
] | 3 | 2019-01-29T11:48:47.000Z | 2021-01-09T21:53:52.000Z | r"""
Backrefs for the 'regex' module.
Add the ability to use the following backrefs with re:
- `\Q` and `\Q...\E` - Escape/quote chars (search)
- `\c` and `\C...\E` - Uppercase char or chars (replace)
- `\l` and `\L...\E` ... | 31.633528 | 113 | 0.6307 |
627ad424d077b2fa3542fec3dcc4b0b13d739a56 | 12,479 | py | Python | cla-backend/cla/controllers/github.py | CareyLF/easycla | f251867abb012f98acb7451bdf21b1bc64ffe77e | [
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | 1 | 2019-09-26T10:34:01.000Z | 2019-09-26T10:34:01.000Z | cla-backend/cla/controllers/github.py | CareyLF/easycla | f251867abb012f98acb7451bdf21b1bc64ffe77e | [
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | null | null | null | cla-backend/cla/controllers/github.py | CareyLF/easycla | f251867abb012f98acb7451bdf21b1bc64ffe77e | [
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | null | null | null | # Copyright The Linux Foundation and each contributor to CommunityBridge.
# SPDX-License-Identifier: MIT
"""
Controller related to the github application (CLA GitHub App).
"""
import requests
import hmac
import cla
import os
from pprint import pprint
from cla.utils import get_github_organization_instance, get_reposito... | 39.365931 | 118 | 0.68467 |
627aecc5311bcc0299784a7efb8d1804c824bae9 | 30,098 | py | Python | impacket/dcerpc/samr.py | black-security/impacket3 | 5b6145b3f511d4f7cddaba64cf150b109113afea | [
"Apache-1.1"
] | null | null | null | impacket/dcerpc/samr.py | black-security/impacket3 | 5b6145b3f511d4f7cddaba64cf150b109113afea | [
"Apache-1.1"
] | null | null | null | impacket/dcerpc/samr.py | black-security/impacket3 | 5b6145b3f511d4f7cddaba64cf150b109113afea | [
"Apache-1.1"
] | 1 | 2022-01-28T00:53:41.000Z | 2022-01-28T00:53:41.000Z | ################################################################################
# DEPRECATION WARNING! #
# This library will be deprecated soon. You should use impacket.dcerpc.v5 #
# classes instead ... | 30.279678 | 350 | 0.628613 |
627b09ed080b81aaa9c30bb19848433de7a827ef | 605 | py | Python | molecule/shared/tests/test_swapcapslockctrl.py | davedittrich/utils | 8e51527222420a081e36894bb43fc4dc041afd11 | [
"Apache-2.0"
] | null | null | null | molecule/shared/tests/test_swapcapslockctrl.py | davedittrich/utils | 8e51527222420a081e36894bb43fc4dc041afd11 | [
"Apache-2.0"
] | null | null | null | molecule/shared/tests/test_swapcapslockctrl.py | davedittrich/utils | 8e51527222420a081e36894bb43fc4dc041afd11 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from molecule.shared import (
skip_unless_role,
)
@skip_unless_role('davedittrich.utils.swapcapslockctrl')
def test_xkboptions(host):
f = host.file('/etc/default/keyboard')
assert f.exists
assert f.user == 'root'
assert r'XKBOPTIONS="ctrl:swapcaps"' in f.content_string
@... | 25.208333 | 73 | 0.712397 |
627b10997402c76d8773144a0da6664e10931159 | 747 | py | Python | autorop/libc/auto.py | Tanson/autorop | 0d2fc71cdcc9649a6006aee641a3808f884d7fc4 | [
"MIT"
] | null | null | null | autorop/libc/auto.py | Tanson/autorop | 0d2fc71cdcc9649a6006aee641a3808f884d7fc4 | [
"MIT"
] | null | null | null | autorop/libc/auto.py | Tanson/autorop | 0d2fc71cdcc9649a6006aee641a3808f884d7fc4 | [
"MIT"
] | null | null | null | from autorop import PwnState, libc
def auto(state: PwnState) -> PwnState:
"""Acquire libc using configured service.
We can programmatically find and download libc based on function address leaks
(two or more preferred). This function sets ``state.libc``, including setting
``state.libc.address`` for r... | 32.478261 | 82 | 0.682731 |
627b42b684fc0dca45f07fc2066152f156af1cac | 17,522 | py | Python | billingclient/openstack/common/apiclient/base.py | nubeliu/billingclient | f2539e211ca049f3ddc9ce5680932f8f5eff7434 | [
"Apache-2.0"
] | 1 | 2018-01-04T16:20:51.000Z | 2018-01-04T16:20:51.000Z | billingclient/openstack/common/apiclient/base.py | nubeliu/billingclient | f2539e211ca049f3ddc9ce5680932f8f5eff7434 | [
"Apache-2.0"
] | null | null | null | billingclient/openstack/common/apiclient/base.py | nubeliu/billingclient | f2539e211ca049f3ddc9ce5680932f8f5eff7434 | [
"Apache-2.0"
] | null | null | null | # Copyright 2010 Jacob Kaplan-Moss
# Copyright 2011 OpenStack Foundation
# Copyright 2012 Grid Dynamics
# Copyright 2013 OpenStack Foundation
# 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... | 32.812734 | 79 | 0.590743 |
627b8754506f5217bf9e63dcbc16a017092e0bed | 15,514 | py | Python | apps/fhir/bluebutton/tests/test_utils.py | TransparentHealth/bluebutton-web-server | 69b6e649b2e9caf7859a75ea3867bf74c83ca340 | [
"Apache-2.0"
] | 1 | 2020-01-26T16:02:27.000Z | 2020-01-26T16:02:27.000Z | apps/fhir/bluebutton/tests/test_utils.py | TransparentHealth/bluebutton-web-server | 69b6e649b2e9caf7859a75ea3867bf74c83ca340 | [
"Apache-2.0"
] | null | null | null | apps/fhir/bluebutton/tests/test_utils.py | TransparentHealth/bluebutton-web-server | 69b6e649b2e9caf7859a75ea3867bf74c83ca340 | [
"Apache-2.0"
] | 2 | 2018-09-29T18:53:08.000Z | 2020-01-26T16:02:31.000Z | import os
from django.conf import settings
from django.contrib.auth.models import User
from django.test import TestCase, RequestFactory
from apps.accounts.models import UserProfile
from apps.test import BaseApiTest
from apps.fhir.bluebutton.models import Crosswalk
from apps.fhir.server.models import SupportedResourceTy... | 34.02193 | 87 | 0.568003 |
627b902c2a7ecceab214e00eec32a1baa17981ef | 5,661 | py | Python | nanotune/tuningstages/gatecharacterization_tasks.py | microsoft/nanotune | 68be8f5b74a52d57b74ccac228e120d9ab48e3e4 | [
"MIT"
] | 5 | 2021-02-24T14:32:37.000Z | 2022-01-05T16:37:26.000Z | nanotune/tuningstages/gatecharacterization_tasks.py | microsoft/nanotune | 68be8f5b74a52d57b74ccac228e120d9ab48e3e4 | [
"MIT"
] | 149 | 2021-03-23T14:44:39.000Z | 2022-03-31T06:09:07.000Z | nanotune/tuningstages/gatecharacterization_tasks.py | LaudateCorpus1/nanotune | 0ada354597b16f6dbb17ca7be01ab7668b6d5049 | [
"MIT"
] | 10 | 2021-03-29T13:36:38.000Z | 2022-02-16T23:06:35.000Z | # Copyright (c) 2021 Jana Darulova
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
import copy
import logging
from typing import List, Sequence, Tuple
import numpy as np
logger = logging.getLogger(__name__)
def get_new_gatecharacterization_range(
current_valid_ranges: ... | 38.25 | 80 | 0.712772 |
627bb5836882ccfcbfee5c049e7581b08d81c007 | 94 | py | Python | not_ducky/game/__init__.py | markjoshua12/game-jam-2020 | 846dd052d649a609ab7a52ac0f4dcbeb71781c3b | [
"MIT"
] | 15 | 2020-04-17T12:02:14.000Z | 2022-03-16T03:01:34.000Z | not_ducky/game/__init__.py | markjoshua12/game-jam-2020 | 846dd052d649a609ab7a52ac0f4dcbeb71781c3b | [
"MIT"
] | 9 | 2020-04-25T01:57:16.000Z | 2020-04-29T11:42:34.000Z | not_ducky/game/__init__.py | markjoshua12/game-jam-2020 | 846dd052d649a609ab7a52ac0f4dcbeb71781c3b | [
"MIT"
] | 55 | 2020-04-17T12:01:11.000Z | 2021-12-28T10:14:02.000Z | from .monkeypatch import *
from .application import *
window = Game()
from .entity import *
| 13.428571 | 26 | 0.723404 |
627bec7f1a5920bcdd1b389d8d8e3046aca54bac | 4,517 | py | Python | aux6/test-catmul2.py | CC3501/CC3501-2019-1 | aeaed382e40a54f0ab968e04cc1914485c192d0d | [
"MIT"
] | 2 | 2019-05-03T00:33:27.000Z | 2020-01-16T00:51:55.000Z | aux6/test-catmul2.py | CC3501/CC3501-2019-1 | aeaed382e40a54f0ab968e04cc1914485c192d0d | [
"MIT"
] | null | null | null | aux6/test-catmul2.py | CC3501/CC3501-2019-1 | aeaed382e40a54f0ab968e04cc1914485c192d0d | [
"MIT"
] | null | null | null | # coding=utf-8
"""
Testea curvas catmull no convexas.
@author ppizarror
"""
# Library imports
import glfw
from OpenGL.GL import *
import sys
import lib.transformations2 as tr2
import lib.easy_shaders as es
import lib.camera as cam
from lib.mathlib import Point3
# Import extended shapes
import lib.basic_shapes_exten... | 27.047904 | 97 | 0.652646 |
627c0e28a9416346a3cca4070d42febf31c8d6d2 | 8,682 | py | Python | mutagen/easymp4.py | RossLote/cloudplayer | aec24b6ea2fdae365e62c9dfc7f366ef9cc84d73 | [
"MIT"
] | 4 | 2016-08-26T22:33:43.000Z | 2021-11-20T17:47:48.000Z | mutagen/easymp4.py | jwayneroth/mpd-touch | 04dd86741e522c8f6317d78c12bd99f670c4d899 | [
"MIT"
] | null | null | null | mutagen/easymp4.py | jwayneroth/mpd-touch | 04dd86741e522c8f6317d78c12bd99f670c4d899 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (C) 2009 Joe Wreschnig
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of version 2 of the GNU General Public License as
# published by the Free Software Foundation.
from mutagen import Metadata
from mutagen._util import DictMixin, dic... | 30.463158 | 79 | 0.571988 |
627c26a010b61f02970c4624c491b1bc8cf7d7dd | 1,006 | py | Python | imagersite/imager_images/migrations/0004_auto_20171207_2229.py | ztaylor2/django-imager | 51a158b94c31bc58c510b8b4a9ec907c6189fd24 | [
"MIT"
] | null | null | null | imagersite/imager_images/migrations/0004_auto_20171207_2229.py | ztaylor2/django-imager | 51a158b94c31bc58c510b8b4a9ec907c6189fd24 | [
"MIT"
] | null | null | null | imagersite/imager_images/migrations/0004_auto_20171207_2229.py | ztaylor2/django-imager | 51a158b94c31bc58c510b8b4a9ec907c6189fd24 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2017-12-07 22:29
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('imager_images', '0003_auto_20171206_0031'),
]
operations = [
migrations.Add... | 32.451613 | 151 | 0.587475 |
627c2ed197f228b9b4734587844286efab78535b | 4,311 | py | Python | apartment_test/core.py | gdmarmerola/random-stuff | 3fabf8c616a29cad48972e6f94f2a833b39c3f44 | [
"Apache-2.0"
] | 16 | 2019-07-18T03:50:00.000Z | 2021-12-16T22:35:02.000Z | apartment_test/core.py | gdmarmerola/random-stuff | 3fabf8c616a29cad48972e6f94f2a833b39c3f44 | [
"Apache-2.0"
] | null | null | null | apartment_test/core.py | gdmarmerola/random-stuff | 3fabf8c616a29cad48972e6f94f2a833b39c3f44 | [
"Apache-2.0"
] | 6 | 2019-05-31T15:59:02.000Z | 2021-04-23T20:05:02.000Z | import numpy as np
import pandas as pd
from copy import deepcopy
def convert_yearly_to_monthly_interest(yearly_interest):
"""
Convert yearly interest to monthly interest.
"""
monthly_interest = np.power((1 + yearly_interest), 1/12) - 1
return monthly_interest
def build_fgts_cash_flow(fg... | 30.574468 | 116 | 0.690095 |
627c4ed98aebbad18e243452ada20826f46c3e34 | 829 | py | Python | test_plots/test_line_collections.py | silky/mpld3 | 12151b57d8f245c3538f3c19e34d71caf8e65a59 | [
"BSD-3-Clause"
] | 1 | 2019-06-27T11:33:38.000Z | 2019-06-27T11:33:38.000Z | test_plots/test_line_collections.py | silky/mpld3 | 12151b57d8f245c3538f3c19e34d71caf8e65a59 | [
"BSD-3-Clause"
] | null | null | null | test_plots/test_line_collections.py | silky/mpld3 | 12151b57d8f245c3538f3c19e34d71caf8e65a59 | [
"BSD-3-Clause"
] | null | null | null | """Plot to test line collections"""
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.collections import LineCollection
def main():
t = np.linspace(0, 10, 100)
x = 0.1 * t * np.cos(np.pi * t)
y = 0.1 * t * np.sin(np.pi * t)
points = np.array([x, y]).T.reshape(100, 1, 2)
segments = ... | 25.90625 | 53 | 0.603136 |
627c5c733f12ec9b8f1d80c24f643f0a89f3d4fb | 3,222 | py | Python | ote_sdk/ote_sdk/tests/entities/test_optimization_parameters.py | ntyukaev/training_extensions | c897d42e50828fea853ceda0795e1f0e7d6e9909 | [
"Apache-2.0"
] | null | null | null | ote_sdk/ote_sdk/tests/entities/test_optimization_parameters.py | ntyukaev/training_extensions | c897d42e50828fea853ceda0795e1f0e7d6e9909 | [
"Apache-2.0"
] | null | null | null | ote_sdk/ote_sdk/tests/entities/test_optimization_parameters.py | ntyukaev/training_extensions | c897d42e50828fea853ceda0795e1f0e7d6e9909 | [
"Apache-2.0"
] | null | null | null | """This module tests classes related to OptimizationParameters"""
# Copyright (C) 2020-2021 Intel Corporation
#
# 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/licens... | 34.276596 | 76 | 0.69522 |
627ca232c65501b20bf463f42a42f320ce5df732 | 2,275 | py | Python | mvpnet/data/preprocess/resize_scannet_images.py | dcy0577/Enhancing-3D-Point-Cloud-Segmentation-Using-Multi-Modal-Fusion-with-2D-Images | b0e9c0d26177f74b20cbf95f15cefba9af695c70 | [
"MIT"
] | 3 | 2021-12-20T02:41:28.000Z | 2022-02-18T15:47:48.000Z | mvpnet/data/preprocess/resize_scannet_images.py | dcy0577/Enhancing-3D-Point-Cloud-Segmentation-Using-Multi-Modal-Fusion-with-2D-Images | b0e9c0d26177f74b20cbf95f15cefba9af695c70 | [
"MIT"
] | null | null | null | mvpnet/data/preprocess/resize_scannet_images.py | dcy0577/Enhancing-3D-Point-Cloud-Segmentation-Using-Multi-Modal-Fusion-with-2D-Images | b0e9c0d26177f74b20cbf95f15cefba9af695c70 | [
"MIT"
] | null | null | null | import os
import os.path as osp
import glob
import natsort
from PIL import Image
import numpy as np
import multiprocessing as mp
resize = (160, 120)
# resize = (640, 480)
# adapt the following paths
raw_dir = "/home/dchangyu/MV-KPConv/ScanNet/scans"
out_dir = "/home/dchangyu/MV-KPConv/ScanNet/scans_resize_{}x{}".forma... | 32.042254 | 101 | 0.622857 |
627cba30496c64b5f7f93497e09c59d8addc870e | 17,248 | py | Python | pex/vendor/_vendored/pip/pip/_internal/wheel_builder.py | tdyas/pex | e2d6bab09f8e9245f608402a904421268223ee58 | [
"Apache-2.0"
] | 1 | 2020-06-27T23:28:35.000Z | 2020-06-27T23:28:35.000Z | pex/vendor/_vendored/pip/pip/_internal/wheel_builder.py | tdyas/pex | e2d6bab09f8e9245f608402a904421268223ee58 | [
"Apache-2.0"
] | 7 | 2019-12-27T07:56:50.000Z | 2022-01-25T03:41:39.000Z | pex/vendor/_vendored/pip/pip/_internal/wheel_builder.py | tdyas/pex | e2d6bab09f8e9245f608402a904421268223ee58 | [
"Apache-2.0"
] | 1 | 2020-02-14T16:53:19.000Z | 2020-02-14T16:53:19.000Z | """Orchestrator for building wheels from InstallRequirements.
"""
# The following comment should be removed at some point in the future.
# mypy: strict-optional=False
import logging
import os.path
import re
import shutil
from pip._internal.models.link import Link
from pip._internal.utils.logging import indent_log
fr... | 33.819608 | 79 | 0.583082 |
627cbabcedddd2952a2d7ae412c142ca977fbfc6 | 3,531 | py | Python | examples/obsolete_legacy/simpleMalwareDropper.py | dasec/ForTrace | b8187522a2c83fb661e5a1a5f403da8f40a31ead | [
"MIT"
] | 1 | 2022-03-31T14:01:51.000Z | 2022-03-31T14:01:51.000Z | examples/obsolete_legacy/simpleMalwareDropper.py | dasec/ForTrace | b8187522a2c83fb661e5a1a5f403da8f40a31ead | [
"MIT"
] | null | null | null | examples/obsolete_legacy/simpleMalwareDropper.py | dasec/ForTrace | b8187522a2c83fb661e5a1a5f403da8f40a31ead | [
"MIT"
] | 1 | 2022-03-31T14:02:30.000Z | 2022-03-31T14:02:30.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#Tests the office dropper of the malware component
import sys
import time
import logging
import subprocess
import threading
import paramiko
try:
from fortrace.core.vmm import Vmm
from fortrace.utility.logger_helper import create_logger
from fortrace.core.vmm i... | 32.694444 | 206 | 0.633248 |
627cc4a32a675335ba7835919027526b265f2739 | 25,796 | py | Python | src/pip/_internal/operations/install/wheel.py | hassoon1986/pip | 2472a6e51dc40170b933017640d0776a987a396d | [
"MIT"
] | 1 | 2019-12-20T05:27:25.000Z | 2019-12-20T05:27:25.000Z | src/pip/_internal/operations/install/wheel.py | hassoon1986/pip | 2472a6e51dc40170b933017640d0776a987a396d | [
"MIT"
] | null | null | null | src/pip/_internal/operations/install/wheel.py | hassoon1986/pip | 2472a6e51dc40170b933017640d0776a987a396d | [
"MIT"
] | null | null | null | """Support for installing and building the "wheel" binary package format.
"""
# The following comment should be removed at some point in the future.
# mypy: strict-optional=False
from __future__ import absolute_import
import collections
import compileall
import csv
import logging
import os.path
import re
import shut... | 37.277457 | 79 | 0.621414 |
627cd178ad44c652e955c035c2f5151de599e543 | 479 | py | Python | alipay/aop/api/response/AlipayBossFncGfsettleprodInvoiceDeleteResponse.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/AlipayBossFncGfsettleprodInvoiceDeleteResponse.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/AlipayBossFncGfsettleprodInvoiceDeleteResponse.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
class AlipayBossFncGfsettleprodInvoiceDeleteResponse(AlipayResponse):
def __init__(self):
super(AlipayBossFncGfsettleprodInvoiceDeleteResponse, self).__init__()
def parse_res... | 29.9375 | 119 | 0.797495 |
627d03386c6dfbf7b898c46a80c15001cde41084 | 5,804 | py | Python | ghtop/richext.py | ad-m/ghtop | 051b57689f6b6a51fc874675a586006df2142556 | [
"MIT"
] | 741 | 2020-12-04T20:34:16.000Z | 2022-03-12T19:18:30.000Z | ghtop/richext.py | 00mjk/ghtop | 051b57689f6b6a51fc874675a586006df2142556 | [
"MIT"
] | 17 | 2020-12-04T23:06:52.000Z | 2021-09-12T14:47:16.000Z | ghtop/richext.py | 00mjk/ghtop | 051b57689f6b6a51fc874675a586006df2142556 | [
"MIT"
] | 49 | 2020-12-04T20:35:42.000Z | 2022-01-29T18:04:00.000Z |
__all__ = ['console', 'EProg', 'ESpark', 'SpkMap', 'Stats', 'colors', 'colors2']
import time,random
from collections import defaultdict
from typing import List
from collections import deque, OrderedDict, namedtuple
from .all_rich import (Console, Color, FixedPanel, box, Segments, Live,
g... | 44.305344 | 156 | 0.689869 |
627d20f000bf2bf9882ca3606edb1b28e6d97924 | 1,762 | py | Python | pyop2_utils/dofmap.py | chromy/PyOP2 | 8a1955c628b795019485c9771709c338a806e661 | [
"BSD-3-Clause"
] | null | null | null | pyop2_utils/dofmap.py | chromy/PyOP2 | 8a1955c628b795019485c9771709c338a806e661 | [
"BSD-3-Clause"
] | null | null | null | pyop2_utils/dofmap.py | chromy/PyOP2 | 8a1955c628b795019485c9771709c338a806e661 | [
"BSD-3-Clause"
] | null | null | null | # This file is part of PyOP2
#
# PyOP2 is Copyright (c) 2012, Imperial College London and
# others. Please see the AUTHORS file in the main source directory for
# a full list of copyright holders. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted ... | 50.342857 | 76 | 0.763337 |
627d2ede44f0babe43568fbbd498cb3d7ca913c8 | 3,308 | py | Python | test/test_ITLFunctions.py | pdoren/correntropy-and-ensembles-in-deep-learning | b8e39e0ea97395e9f4ef5e9b351551a89fedc885 | [
"MIT"
] | 1 | 2017-11-22T15:35:45.000Z | 2017-11-22T15:35:45.000Z | test/test_ITLFunctions.py | pdoren/correntropy-and-ensembles-in-deep-learning | b8e39e0ea97395e9f4ef5e9b351551a89fedc885 | [
"MIT"
] | null | null | null | test/test_ITLFunctions.py | pdoren/correntropy-and-ensembles-in-deep-learning | b8e39e0ea97395e9f4ef5e9b351551a89fedc885 | [
"MIT"
] | 1 | 2021-12-14T04:16:57.000Z | 2021-12-14T04:16:57.000Z | from unittest import TestCase
__author__ = 'pdoren'
__project__ = 'DeepEnsemble'
class TestITLFunctions(TestCase):
# noinspection PyStringFormat,PyTypeChecker
def test_cross_information_potential(self):
from deepensemble.utils.utils_functions import ITLFunctions
import numpy as np
N ... | 33.414141 | 111 | 0.546252 |
627d44f00e0f8d5ae6653fd5d210037b534e50d2 | 1,511 | py | Python | controller/testing/client_service_test.py | isabella232/flight-lab | bd666b1d2bcec6f928a2e8da9f13fd5dae21319f | [
"Apache-2.0"
] | 15 | 2018-10-18T07:50:46.000Z | 2021-10-21T03:40:55.000Z | controller/testing/client_service_test.py | google/flight-lab | bd666b1d2bcec6f928a2e8da9f13fd5dae21319f | [
"Apache-2.0"
] | 9 | 2018-09-17T23:00:02.000Z | 2019-01-22T21:08:04.000Z | controller/testing/client_service_test.py | isabella232/flight-lab | bd666b1d2bcec6f928a2e8da9f13fd5dae21319f | [
"Apache-2.0"
] | 12 | 2019-01-07T12:43:37.000Z | 2021-10-21T03:40:44.000Z | # Copyright 2018 Flight Lab 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 applicable law or agreed to in w... | 30.22 | 74 | 0.754467 |
627d4ae139c062516788019de80a1ab2043c7c91 | 1,327 | py | Python | tf2onnx/tflite/ExpandDimsOptions.py | LoicDagnas/tensorflow-onnx | 6691850e79047d05d85017573170fd8240393b57 | [
"Apache-2.0"
] | 1,473 | 2018-03-16T02:47:33.000Z | 2022-03-31T03:43:52.000Z | tf2onnx/tflite/ExpandDimsOptions.py | LoicDagnas/tensorflow-onnx | 6691850e79047d05d85017573170fd8240393b57 | [
"Apache-2.0"
] | 1,208 | 2018-03-14T09:58:49.000Z | 2022-03-31T17:56:20.000Z | tf2onnx/tflite/ExpandDimsOptions.py | LoicDagnas/tensorflow-onnx | 6691850e79047d05d85017573170fd8240393b57 | [
"Apache-2.0"
] | 350 | 2018-04-03T03:48:40.000Z | 2022-03-30T11:23:55.000Z | # SPDX-License-Identifier: Apache-2.0
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: tflite
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class ExpandDimsOptions(object):
__slots__ = ['_tab']
@classmethod
def GetRootAs(cls, buf, of... | 33.175 | 114 | 0.715147 |
627d6531f8d34ef76d0a9ed775009ca6335e5046 | 1,540 | py | Python | webup/files.py | cariad/webup | 29f636ffd50a605c2dc11d82d17cfcb6ce961f8c | [
"MIT"
] | null | null | null | webup/files.py | cariad/webup | 29f636ffd50a605c2dc11d82d17cfcb6ce961f8c | [
"MIT"
] | 5 | 2021-12-24T17:40:35.000Z | 2022-01-19T14:16:50.000Z | webup/files.py | cariad/webup | 29f636ffd50a605c2dc11d82d17cfcb6ce961f8c | [
"MIT"
] | null | null | null | from functools import cached_property
from os import walk
from pathlib import Path
from typing import Iterator
from webup.models import File
class Files:
"""
Iterates over the local files and directories to upload.
Arguments:
dir: Path to root local directory to upload.
"""
def __init__... | 25.245902 | 80 | 0.581818 |
627d86ec11271a2fe3251b649d0bc0b69126c94d | 4,765 | py | Python | CertifiableBayesianInference/BayesKeras/optimizers/vogn1.py | Hongchenglong/colab | 9cc5c15abde536493cc3f12008e791caa1d00070 | [
"Apache-2.0"
] | null | null | null | CertifiableBayesianInference/BayesKeras/optimizers/vogn1.py | Hongchenglong/colab | 9cc5c15abde536493cc3f12008e791caa1d00070 | [
"Apache-2.0"
] | null | null | null | CertifiableBayesianInference/BayesKeras/optimizers/vogn1.py | Hongchenglong/colab | 9cc5c15abde536493cc3f12008e791caa1d00070 | [
"Apache-2.0"
] | null | null | null | #Author: Matthew Wicker
# Impliments the BayesByBackprop optimizer for BayesKeras
import os
import math
import logging
import numpy as np
import tensorflow as tf
import tensorflow_probability as tfp
from tensorflow.keras.models import *
from tensorflow.keras.layers import *
from tqdm import tqdm
from tqdm import tran... | 40.381356 | 120 | 0.639664 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.