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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
911953445138eb78da5178e25eb427e2c3195139 | 1,838 | py | Python | tensor2tensor/models/slicenet_test.py | vohoaiviet/tensor2tensor | c2bd023ab7fc8ca0f4c4138e955845537d10ca55 | [
"Apache-2.0"
] | 6 | 2017-10-10T13:36:39.000Z | 2021-02-18T07:50:00.000Z | tensor2tensor/models/slicenet_test.py | vohoaiviet/tensor2tensor | c2bd023ab7fc8ca0f4c4138e955845537d10ca55 | [
"Apache-2.0"
] | null | null | null | tensor2tensor/models/slicenet_test.py | vohoaiviet/tensor2tensor | c2bd023ab7fc8ca0f4c4138e955845537d10ca55 | [
"Apache-2.0"
] | 9 | 2017-07-25T11:29:06.000Z | 2021-06-20T14:01:58.000Z | # Copyright 2017 The Tensor2Tensor Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | 32.821429 | 74 | 0.717628 |
9119653bc5dfff94fcb34e0f74595221769ae57c | 3,869 | py | Python | sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2016_02_03/_iot_hub_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2016_02_03/_iot_hub_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/iothub/azure-mgmt-iothub/azure/mgmt/iothub/v2016_02_03/_iot_hub_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # 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 may ... | 41.159574 | 120 | 0.680538 |
911972cb032aaa41da32e8a71a1b7bb32e8033cd | 5,266 | py | Python | sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/_sql_virtual_machine_management_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/_sql_virtual_machine_management_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/sql/azure-mgmt-sqlvirtualmachine/azure/mgmt/sqlvirtualmachine/_sql_virtual_machine_management_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"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 may ... | 49.679245 | 318 | 0.725218 |
91197dd0e7b863c42d3c79524a62581dfe5f473d | 2,911 | py | Python | test/optimization/test_min_eigen_optimizer.py | georgios-ts/qiskit-aqua | 76f6a88bfc5f718e389da9c0e673a86101a8f452 | [
"Apache-2.0"
] | null | null | null | test/optimization/test_min_eigen_optimizer.py | georgios-ts/qiskit-aqua | 76f6a88bfc5f718e389da9c0e673a86101a8f452 | [
"Apache-2.0"
] | null | null | null | test/optimization/test_min_eigen_optimizer.py | georgios-ts/qiskit-aqua | 76f6a88bfc5f718e389da9c0e673a86101a8f452 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2018, 2020.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any... | 32.344444 | 81 | 0.682583 |
9119822f514f1d5fc8b3b2bcd42a0eca9e74c21f | 4,239 | py | Python | Models/Data.py | Zebra/Savanna-Python-SDK | 973f642a13f8c695a1781322ebf804c34cdb1b47 | [
"MIT"
] | 1 | 2021-03-08T06:49:57.000Z | 2021-03-08T06:49:57.000Z | Models/Data.py | Zebra/Savanna-Python-SDK | 973f642a13f8c695a1781322ebf804c34cdb1b47 | [
"MIT"
] | 1 | 2022-01-25T16:36:43.000Z | 2022-01-25T16:36:43.000Z | Models/Data.py | Zebra/Savanna-Python-SDK | 973f642a13f8c695a1781322ebf804c34cdb1b47 | [
"MIT"
] | 1 | 2020-06-11T14:00:40.000Z | 2020-06-11T14:00:40.000Z | """
Item matching a UPC lookup query
"""
class Data:
def __init__(self, EAN, title, description, images, offers,
asin, isbn, publisher, upc, brand, model, color, size, dimension,
weight, currency, lowestRecordedPrice, highestRecordedPrice, elid):
self.EAN = EAN
self.title = title
... | 25.232143 | 111 | 0.613116 |
9119b7e105152a68ddb6c7704cd3d58179e633e6 | 4,687 | py | Python | gavPrj/dataset_core.py | GavinK-ai/cv | 6dd11b2100c40aca281508c3821c807ef0ee227d | [
"MIT"
] | 1 | 2021-11-15T06:16:44.000Z | 2021-11-15T06:16:44.000Z | gavPrj/dataset_core.py | JKai96/cv | 6dd11b2100c40aca281508c3821c807ef0ee227d | [
"MIT"
] | null | null | null | gavPrj/dataset_core.py | JKai96/cv | 6dd11b2100c40aca281508c3821c807ef0ee227d | [
"MIT"
] | null | null | null | import os
import cv2 as cv
import matplotlib.pyplot as plt
import numpy as np
#srcPaths = ('dataset/Screenshot1','dataset/Screenshot2','dataset/Screenshot3', 'dataset/Screenshot4')
#srcPaths = ('all_dataset/s1',
# 'all_dataset/s10',
# 'all_dataset/s11',
# 'all_dataset/s12',
... | 26.331461 | 128 | 0.528056 |
9119c63c9baf742b08afa5e184f46daa6536d861 | 2,260 | py | Python | .leetcode/781.rabbits-in-forest.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | .leetcode/781.rabbits-in-forest.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | .leetcode/781.rabbits-in-forest.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | # @lc app=leetcode id=781 lang=python3
#
# [781] Rabbits in Forest
#
# https://leetcode.com/problems/rabbits-in-forest/description/
#
# algorithms
# Medium (55.99%)
# Likes: 563
# Dislikes: 446
# Total Accepted: 32.1K
# Total Submissions: 57.5K
# Testcase Example: '[1,1,2]'
#
# There is a forest with an unknown ... | 19.824561 | 78 | 0.611947 |
9119e73f54c38dad473fa8498d0bafe525380e93 | 259 | py | Python | bootcamp/wiki/plugins/macros/apps.py | basiltiger/easy_bootcamp | 875b9ed287f1a7824bb38f142dbe2f3b1ce54389 | [
"MIT"
] | null | null | null | bootcamp/wiki/plugins/macros/apps.py | basiltiger/easy_bootcamp | 875b9ed287f1a7824bb38f142dbe2f3b1ce54389 | [
"MIT"
] | null | null | null | bootcamp/wiki/plugins/macros/apps.py | basiltiger/easy_bootcamp | 875b9ed287f1a7824bb38f142dbe2f3b1ce54389 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _
class MacrosConfig(AppConfig):
name = 'wiki.plugins.macros'
verbose_name = _("Wiki macros")
label = 'wiki_macros'
| 23.545455 | 55 | 0.76834 |
9119ef267d413e5502bfe914281c8514479b3df6 | 3,553 | py | Python | sdk/containerregistry/azure-containerregistry/tests/test_container_registry_client.py | JayDoubleu/azure-sdk-for-python | f3760fc8d7ea1b46b0def0628579d36abe75976f | [
"MIT"
] | null | null | null | sdk/containerregistry/azure-containerregistry/tests/test_container_registry_client.py | JayDoubleu/azure-sdk-for-python | f3760fc8d7ea1b46b0def0628579d36abe75976f | [
"MIT"
] | null | null | null | sdk/containerregistry/azure-containerregistry/tests/test_container_registry_client.py | JayDoubleu/azure-sdk-for-python | f3760fc8d7ea1b46b0def0628579d36abe75976f | [
"MIT"
] | null | null | null | # coding=utf-8
# ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
import pytest
import six
from devtools_testutils import AzureTestCase
from azure.containerregistry import (
ContainerRegistryClient,
DeletedRepo... | 34.833333 | 110 | 0.681677 |
911a24647116d7a89618c4b1c08ba2b2643d9502 | 1,539 | py | Python | ngsutils/ngs/strip_fasta.py | bgruening/ngsutils | 417e90dc1918fb553dd84990f2c54bd8cea8f44d | [
"BSD-3-Clause"
] | 57 | 2015-03-09T01:26:45.000Z | 2022-02-22T07:26:01.000Z | ngsutils/ngs/strip_fasta.py | bgruening/ngsutils | 417e90dc1918fb553dd84990f2c54bd8cea8f44d | [
"BSD-3-Clause"
] | 33 | 2015-02-03T23:24:46.000Z | 2022-03-16T20:08:10.000Z | ngsutils/ngs/strip_fasta.py | bgruening/ngsutils | 417e90dc1918fb553dd84990f2c54bd8cea8f44d | [
"BSD-3-Clause"
] | 33 | 2015-01-18T16:47:47.000Z | 2022-02-22T07:28:09.000Z | #!/usr/bin/env python
## category Misc
## desc Strips sequences from reference FASTA files
'''
Strips alternative assemblies from reference FASTA files
This removes all sequences by looking for specific substrings in their name
(defaults to '_')
'''
import sys
import os
from eta import eta_open_iter
def strip_fasta... | 23.676923 | 90 | 0.549708 |
911a384857da36d8c6beedd4792e0fdd41f770df | 5,479 | py | Python | data/server.py | zhaoying9105/vid2vid-cn | 7bf0a7a7f8c56f45c8f8025125bacb391d75b016 | [
"BSD-3-Clause"
] | 43 | 2018-01-25T03:21:37.000Z | 2022-03-16T12:51:41.000Z | data/server.py | zmgood/vid2vid-cn | 7bf0a7a7f8c56f45c8f8025125bacb391d75b016 | [
"BSD-3-Clause"
] | 6 | 2017-12-27T04:04:49.000Z | 2018-02-06T14:07:22.000Z | data/server.py | zmgood/vid2vid-cn | 7bf0a7a7f8c56f45c8f8025125bacb391d75b016 | [
"BSD-3-Clause"
] | 23 | 2017-12-07T09:51:10.000Z | 2021-07-08T21:55:50.000Z | """A Socket subclass that adds some serialization methods."""
import zlib
import pickle
import glob
import numpy as np
import zmq
import random
import logging
from options.train_options import TrainOptions
from multiprocessing import Process
from data.img_loder import data_gen, video_data_gen
logger = logging.getLo... | 31.854651 | 117 | 0.628947 |
911a4bde59f2f92ad783924b1930e2a7400effdb | 8,254 | py | Python | textbox/model/Seq2Seq/transformerencdec.py | StevenTang1998/TextBox | acd8298c7e6618384d585146f799d02cc475520c | [
"MIT"
] | 347 | 2021-01-09T07:55:55.000Z | 2022-03-27T00:46:36.000Z | textbox/model/Seq2Seq/transformerencdec.py | StevenTang1998/TextBox | acd8298c7e6618384d585146f799d02cc475520c | [
"MIT"
] | 18 | 2021-01-12T07:37:06.000Z | 2022-01-11T02:26:49.000Z | textbox/model/Seq2Seq/transformerencdec.py | StevenTang1998/TextBox | acd8298c7e6618384d585146f799d02cc475520c | [
"MIT"
] | 67 | 2021-01-09T07:23:52.000Z | 2022-03-27T12:02:12.000Z | # @Time : 2020/11/14
# @Author : Junyi Li
# @Email : lijunyi@ruc.edu.cn
# UPDATE:
# @Time : 2020/12/27
# @Author : Tianyi Tang
# @Email : steventang@ruc.edu.cn
r"""
TransformerEncDec
################################################
Reference:
Vaswani et al. "Attention is All you Need" in NIPS 2017.
"""
imp... | 42.766839 | 140 | 0.655197 |
911a8c23e653155fb303caabe6cf325410d598e8 | 3,911 | py | Python | hs_core/tests/api/native/test_folder_download_zip.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 178 | 2015-01-08T23:03:36.000Z | 2022-03-03T13:56:45.000Z | hs_core/tests/api/native/test_folder_download_zip.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 4,125 | 2015-01-01T14:26:15.000Z | 2022-03-31T16:38:55.000Z | hs_core/tests/api/native/test_folder_download_zip.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 53 | 2015-03-15T17:56:51.000Z | 2022-03-17T00:32:16.000Z | import os
from django.contrib.auth.models import Group
from django.test import TestCase
from hs_core.hydroshare.users import create_account
from hs_core.hydroshare.resource import add_resource_files, create_resource
from hs_core.models import GenericResource
from hs_core.tasks import create_temp_zip
from django_irods.... | 41.168421 | 104 | 0.633086 |
911a9326a3f8f335f0c5d1b5fec5a58ac1462652 | 969 | py | Python | k0emu/debugger/testprogs/fixtures/test_xor.py | mnaberez/k0emu | 1ba4ea0c4ca0dbab3a7b9f4169a81dcdaecc71d5 | [
"BSD-3-Clause"
] | 6 | 2020-02-14T19:05:45.000Z | 2021-06-27T02:22:27.000Z | k0emu/debugger/testprogs/fixtures/test_xor.py | mnaberez/k0emu | 1ba4ea0c4ca0dbab3a7b9f4169a81dcdaecc71d5 | [
"BSD-3-Clause"
] | null | null | null | k0emu/debugger/testprogs/fixtures/test_xor.py | mnaberez/k0emu | 1ba4ea0c4ca0dbab3a7b9f4169a81dcdaecc71d5 | [
"BSD-3-Clause"
] | null | null | null | import sys
from k0emu.debug import make_debugger_from_argv
def test(debug, outfile):
for a in range(256):
for x in range(256):
code = [
0x11, 0x1e, 0, # mov psw,#<psw>
0xa1, a, # mov a,#<a>
0xa0, x, # mov x,#<x>
... | 31.258065 | 74 | 0.45098 |
911ab7f920ab545424d19482379e520be0dbcad3 | 4,651 | py | Python | superset/utils/decorators.py | franksam007/incubator-superset | a0f572eb3ea4b89cb435a8af20436f8e1d34814e | [
"Apache-2.0"
] | 1 | 2019-12-04T01:30:42.000Z | 2019-12-04T01:30:42.000Z | superset/utils/decorators.py | franksam007/incubator-superset | a0f572eb3ea4b89cb435a8af20436f8e1d34814e | [
"Apache-2.0"
] | 16 | 2021-03-20T05:43:23.000Z | 2022-03-29T22:29:08.000Z | superset/utils/decorators.py | franksam007/incubator-superset | a0f572eb3ea4b89cb435a8af20436f8e1d34814e | [
"Apache-2.0"
] | 3 | 2019-10-28T02:28:58.000Z | 2020-05-21T10:00:32.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 39.084034 | 82 | 0.631692 |
911ac00c7b60144beb8bf9f57b5998f3dfa747c0 | 4,539 | py | Python | fedimap/instance_api.py | VyrCossont/fedimap | ba945a4be70277d1af6683825f16c45016edfd09 | [
"MIT"
] | null | null | null | fedimap/instance_api.py | VyrCossont/fedimap | ba945a4be70277d1af6683825f16c45016edfd09 | [
"MIT"
] | null | null | null | fedimap/instance_api.py | VyrCossont/fedimap | ba945a4be70277d1af6683825f16c45016edfd09 | [
"MIT"
] | null | null | null | import json
import logging
import re
from typing import Optional
from urllib.parse import urlsplit, urlunsplit
import requests
from fedimap.user_agent import InstanceUserAgent
# TODO: overloading this for now
__all__ = ['UNKNOWN_SERVER_TYPE', 'get_instance_info']
_logger = logging.getLogger(__name__)
_mastodon_com... | 35.740157 | 97 | 0.589117 |
911acd01d8e225113558533c2e15647617520fbd | 1,308 | py | Python | app/resources/v1/indicadores/indicadores_regionais.py | smartlab-br/datahub-api | 193e71172bb4891a5bbffc902da07ef57df9ab07 | [
"MIT"
] | 1 | 2019-07-25T21:15:05.000Z | 2019-07-25T21:15:05.000Z | app/resources/v1/indicadores/indicadores_regionais.py | smartlab-br/datahub-api | 193e71172bb4891a5bbffc902da07ef57df9ab07 | [
"MIT"
] | 44 | 2019-08-05T15:24:00.000Z | 2022-01-31T23:11:31.000Z | app/resources/v1/indicadores/indicadores_regionais.py | smartlab-br/datahub-api | 193e71172bb4891a5bbffc902da07ef57df9ab07 | [
"MIT"
] | 1 | 2021-05-11T07:49:51.000Z | 2021-05-11T07:49:51.000Z | ''' Controller para fornecer dados da CEE '''
from flask import request
from flask_restful_swagger_2 import swagger
from resources.base import BaseResource
class IndicadoresRegionaisResource(BaseResource):
''' Classe de múltiplos Indicadores Regionais '''
CUSTOM_SWAGGER_PARAMS = [
{"name": "categorias"... | 43.6 | 91 | 0.676606 |
911acd44bdcdc06b9fa73a02b9a2dba9d377f337 | 4,664 | py | Python | tests/ci/pytest_launcher.py | DeanHwd/rally | d284aa0746c54f1c375470e76dd206d19877a7fd | [
"Apache-2.0"
] | 14 | 2017-06-02T14:50:27.000Z | 2021-06-07T08:06:35.000Z | tests/ci/pytest_launcher.py | DeanHwd/rally | d284aa0746c54f1c375470e76dd206d19877a7fd | [
"Apache-2.0"
] | 9 | 2018-06-04T17:31:27.000Z | 2021-05-18T04:58:34.000Z | tests/ci/pytest_launcher.py | DeanHwd/rally | d284aa0746c54f1c375470e76dd206d19877a7fd | [
"Apache-2.0"
] | 6 | 2018-04-11T12:10:35.000Z | 2020-11-21T17:36:49.000Z | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under... | 38.866667 | 79 | 0.577187 |
911b10b03b9fa39712ebd0be31a6e659c901fcd1 | 4,027 | py | Python | alipay/aop/api/request/AnttechOceanbasePassinfoLogininfoQueryRequest.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/AnttechOceanbasePassinfoLogininfoQueryRequest.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/AnttechOceanbasePassinfoLogininfoQueryRequest.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.AnttechOceanbasePassinfoLogininfoQueryModel import AnttechOceanbasePassinfoLogininfoQueryModel
class AnttechOceanbasePassinfoLoginin... | 27.772414 | 148 | 0.649615 |
911b363a3afab6dc554ba821e2a0bcc2e96fb212 | 3,051 | py | Python | Tools/Scripts/webkitpy/style/checkers/featuredefines.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 6 | 2021-07-05T16:09:39.000Z | 2022-03-06T22:44:42.000Z | Tools/Scripts/webkitpy/style/checkers/featuredefines.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 7 | 2022-03-15T13:25:39.000Z | 2022-03-15T13:25:44.000Z | Tools/Scripts/webkitpy/style/checkers/featuredefines.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | null | null | null | # Copyright (C) 2013 Apple 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:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | 48.428571 | 231 | 0.749263 |
911b3a76549a419bcc971ad27709664f248553ff | 1,735 | py | Python | anomalib/utils/metrics/collection.py | alexriedel1/anomalib | 10db405a8f570dbf7b0f337baa6970a150323d8a | [
"Apache-2.0"
] | 689 | 2021-12-10T07:09:35.000Z | 2022-03-31T13:46:21.000Z | anomalib/utils/metrics/collection.py | alexriedel1/anomalib | 10db405a8f570dbf7b0f337baa6970a150323d8a | [
"Apache-2.0"
] | 95 | 2021-12-10T08:10:58.000Z | 2022-03-31T22:09:35.000Z | anomalib/utils/metrics/collection.py | alexriedel1/anomalib | 10db405a8f570dbf7b0f337baa6970a150323d8a | [
"Apache-2.0"
] | 73 | 2021-12-20T15:35:07.000Z | 2022-03-30T06:53:41.000Z | """Anomalib Metric Collection."""
# Copyright (C) 2020 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/licenses/LICENSE-2.0
#
# Unless required by... | 35.408163 | 94 | 0.689914 |
911b517edadd8b01fa3ed9e956aeb6a611f4f1f7 | 3,183 | py | Python | neuropype/nodes/FilterSweep.py | ablot/Pinceau | ae8f3dd088349f8976a5ddf91d83c60ca1ef39e2 | [
"MIT"
] | null | null | null | neuropype/nodes/FilterSweep.py | ablot/Pinceau | ae8f3dd088349f8976a5ddf91d83c60ca1ef39e2 | [
"MIT"
] | null | null | null | neuropype/nodes/FilterSweep.py | ablot/Pinceau | ae8f3dd088349f8976a5ddf91d83c60ca1ef39e2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from neuropype import node
from neuropype.datatypes import Sweep
from neuropype.ressources._common import boxfilter
from scipy.signal import order_filter, medfilt
from numpy import ones, vstack, array
from math import ceil
##debuging tool!
#from IPython.Shell import IPShellEmbed
#banner = '\n*... | 37.011628 | 99 | 0.610745 |
911b9e40b2139f4a96ae2c0231f4bcbf23625ea5 | 2,346 | py | Python | book/chap21/radialdam/1drad/setplot.py | geoflows/geoclaw-4.x | c8879d25405017b38392aa3b1ea422ff3e3604ea | [
"BSD-3-Clause"
] | 7 | 2016-11-13T03:11:51.000Z | 2021-09-07T18:59:48.000Z | book/chap21/radialdam/1drad/setplot.py | che-wenchao/D-Claw | 8ab5d971c9a7a7130e03a447a4b8642e292f4e88 | [
"BSD-3-Clause"
] | 11 | 2020-01-14T18:00:37.000Z | 2022-03-29T14:25:24.000Z | book/chap21/radialdam/1drad/setplot.py | che-wenchao/D-Claw | 8ab5d971c9a7a7130e03a447a4b8642e292f4e88 | [
"BSD-3-Clause"
] | 6 | 2020-01-14T17:15:42.000Z | 2021-12-03T17:28:44.000Z |
"""
Set up the plot figures, axes, and items to be done for each frame.
This module is imported by the plotting routines and then the
function setplot is called to set the plot parameters.
"""
#--------------------------
def setplot(plotdata):
#--------------------------
"""
Specify what is to b... | 30.868421 | 74 | 0.614237 |
911ba453b818f7b5f89fcbb74a92946036826ff2 | 815 | py | Python | benchmark/benchmarkStats.py | spring-epfl/SSCred | c699646b0926efaa9d19a3c48c25526f66123da7 | [
"BSD-3-Clause"
] | 5 | 2020-08-12T09:03:58.000Z | 2022-03-18T14:38:25.000Z | benchmark/benchmarkStats.py | spring-epfl/SSCred | c699646b0926efaa9d19a3c48c25526f66123da7 | [
"BSD-3-Clause"
] | 2 | 2021-02-26T21:52:23.000Z | 2022-03-18T15:19:13.000Z | benchmark/benchmarkStats.py | spring-epfl/SSCred | c699646b0926efaa9d19a3c48c25526f66123da7 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
import json
import statistics
import sys
if __name__ == '__main__':
if len(sys.argv) != 2:
sys.stderr.write('Usage: {} <file.json>\n'.format(sys.argv[0]))
sys.exit(1)
file_name = sys.argv[1]
with open(file_name, 'r') as fd:
content = fd.read()
process_... | 23.285714 | 71 | 0.580368 |
911bd41bbd28162e3994cb0eb12643ff73315ae6 | 15,274 | py | Python | sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/operations/_backup_resource_storage_configs_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/operations/_backup_resource_storage_configs_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/operations/_backup_resource_storage_configs_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # pylint: disable=too-many-lines
# 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) AutoRe... | 41.846575 | 235 | 0.685871 |
911bda30ea4449a2c4b59d8d9c29008bc391323c | 146 | py | Python | app.py | tonypiazza/flights-python | 4e09900cb5999ecaf486682ff4a75fd05c348430 | [
"MIT"
] | null | null | null | app.py | tonypiazza/flights-python | 4e09900cb5999ecaf486682ff4a75fd05c348430 | [
"MIT"
] | null | null | null | app.py | tonypiazza/flights-python | 4e09900cb5999ecaf486682ff4a75fd05c348430 | [
"MIT"
] | null | null | null | #!./bin/python
"""
Interactive Airport reports
"""
import climenu
import report.airportmenus
if __name__ == "__main__":
climenu.run()
| 11.230769 | 31 | 0.678082 |
911c00e45bc134408f426dd10b9eee72c54f507d | 7,100 | py | Python | homeassistant/components/homematicip_cloud/sensor.py | dagobert/home-assistant | 33dcb071dab25dd93ce7bcfae70315ace5af4702 | [
"Apache-2.0"
] | 1 | 2019-03-24T13:30:10.000Z | 2019-03-24T13:30:10.000Z | homeassistant/components/homematicip_cloud/sensor.py | dagobert/home-assistant | 33dcb071dab25dd93ce7bcfae70315ace5af4702 | [
"Apache-2.0"
] | 1 | 2019-02-09T15:44:11.000Z | 2019-02-09T15:44:11.000Z | homeassistant/components/homematicip_cloud/sensor.py | pc-coholic/home-assistant | 24914aade50f7f4f813380b58292d5e91dc47f41 | [
"Apache-2.0"
] | 1 | 2020-01-09T12:36:16.000Z | 2020-01-09T12:36:16.000Z | """
Support for HomematicIP Cloud sensors.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.homematicip_cloud/
"""
import logging
from homeassistant.components.homematicip_cloud import (
DOMAIN as HMIPC_DOMAIN, HMIPC_HAPID, HomematicipGenericDe... | 32.126697 | 77 | 0.681268 |
911c032d18b7b2cf585be25a03e5f6a8f6bdeb26 | 2,207 | py | Python | galpy/potential/GaussianAmplitudeWrapperPotential.py | turnergarrow/galpy | 7132eddbf2dab491fe137790e31eacdc604b0534 | [
"BSD-3-Clause"
] | 1 | 2019-02-28T08:54:38.000Z | 2019-02-28T08:54:38.000Z | galpy/potential/GaussianAmplitudeWrapperPotential.py | BurcuAkbulut/galpy | cabb42bef3b4f88a2f593cdb123452cd41451db3 | [
"BSD-3-Clause"
] | null | null | null | galpy/potential/GaussianAmplitudeWrapperPotential.py | BurcuAkbulut/galpy | cabb42bef3b4f88a2f593cdb123452cd41451db3 | [
"BSD-3-Clause"
] | null | null | null | ###############################################################################
# GaussianAmplitudeWrapperPotential.py: Wrapper to modulate the amplitude
# of a potential with a Gaussian
###############################################################################
import nump... | 34.484375 | 199 | 0.583145 |
911c100aa71f429a91ab466860415bf77b702cd0 | 2,590 | py | Python | torchio/transforms/preprocessing/spatial/bounds_transform.py | thomaskuestner/torchio | 667b8f8bb697af17b591ca7c33b24e56bc1dd018 | [
"MIT"
] | 1 | 2021-05-18T09:36:35.000Z | 2021-05-18T09:36:35.000Z | torchio/transforms/preprocessing/spatial/bounds_transform.py | thomaskuestner/torchio | 667b8f8bb697af17b591ca7c33b24e56bc1dd018 | [
"MIT"
] | null | null | null | torchio/transforms/preprocessing/spatial/bounds_transform.py | thomaskuestner/torchio | 667b8f8bb697af17b591ca7c33b24e56bc1dd018 | [
"MIT"
] | 1 | 2022-01-12T06:41:26.000Z | 2022-01-12T06:41:26.000Z | from typing import Union, Tuple
import torch
import numpy as np
from ....data.subject import Subject
from ....torchio import DATA, AFFINE
from ... import Transform
TypeShape = Tuple[int, int, int]
TypeSixBounds = Tuple[int, int, int, int, int, int]
TypeBounds = Union[
int,
TypeShape,
TypeSixBounds,
]
cl... | 32.78481 | 79 | 0.619691 |
911c6c691b587a298643dafd08ceef11b43fe6c7 | 4,533 | py | Python | experiments/ashvin/icml2020/quinoa/pen_gaussian3.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/icml2020/quinoa/pen_gaussian3.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/icml2020/quinoa/pen_gaussian3.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | """
AWR + SAC from demo experiment
"""
from rlkit.demos.source.dict_to_mdp_path_loader import DictToMDPPathLoader
from rlkit.demos.source.mdp_path_loader import MDPPathLoader
from rlkit.launchers.experiments.ashvin.quinoa_rl import experiment, process_args
import rlkit.misc.hyperparameter as hyp
from rlkit.launchers.... | 31.479167 | 91 | 0.583719 |
911c959ee06fb0c93ef67b93801c77000713be2f | 7,610 | py | Python | policy_value_net.py | Clarit7/AlphaZero_Quoridor | 838763ee5554a98173ae166c41ff52ecddc35424 | [
"MIT"
] | null | null | null | policy_value_net.py | Clarit7/AlphaZero_Quoridor | 838763ee5554a98173ae166c41ff52ecddc35424 | [
"MIT"
] | null | null | null | policy_value_net.py | Clarit7/AlphaZero_Quoridor | 838763ee5554a98173ae166c41ff52ecddc35424 | [
"MIT"
] | null | null | null | import torch.nn as nn
import torch
import math
import numpy as np
import torch.nn.functional as F
import torch.optim as optim
from torch.autograd import Variable
from constant import *
def set_learning_rate(optimizer, lr):
for param_group in optimizer.param_groups:
param_group['lr'] = lr
de... | 37.121951 | 120 | 0.600526 |
911d0f1e581c0718eb205c7f80098dff179cf6c6 | 84,562 | py | Python | language-modeling/lmtool-fwms/src/mem_transformer.py | minhtannguyen/transformer-mgk | 304ebf3781b1eb4aeef93f2757319775d2fcdbc4 | [
"CC0-1.0"
] | 5 | 2021-11-06T16:10:31.000Z | 2021-12-25T19:47:42.000Z | language-modeling/lmtool-fwms/src/mem_transformer.py | minhtannguyen/transformer-mgk | 304ebf3781b1eb4aeef93f2757319775d2fcdbc4 | [
"CC0-1.0"
] | null | null | null | language-modeling/lmtool-fwms/src/mem_transformer.py | minhtannguyen/transformer-mgk | 304ebf3781b1eb4aeef93f2757319775d2fcdbc4 | [
"CC0-1.0"
] | 2 | 2021-11-30T03:36:54.000Z | 2021-12-25T19:49:58.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
import pdb
# import sys
from utils.proj_adaptive_softmax import ProjectedAdaptiveLogSoftmax
from utils.log_uniform_sampler import LogUniformSampler, sample_logits
from utils.performer_helper import prime, draw_orthogonal_random_matrix... | 39.130958 | 196 | 0.5697 |
911d3cbcc35cad34d56d3f645ffe9fed193fe3ae | 72,294 | py | Python | contrib/performance/loadtest/ical.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | 1 | 2017-02-18T19:22:19.000Z | 2017-02-18T19:22:19.000Z | contrib/performance/loadtest/ical.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | null | null | null | contrib/performance/loadtest/ical.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | null | null | null | ##
# Copyright (c) 2010-2015 Apple Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | 34.474964 | 118 | 0.619899 |
911d55e5d2d7b5e1adcffba2d86c40524175a0e9 | 46 | py | Python | src/devops_menu/controller/__init__.py | rubelw/devops_menu | 38a8eadb26c5ac90a201fd3af0d09d5165ed8249 | [
"Apache-2.0"
] | 2 | 2020-10-08T21:42:56.000Z | 2021-03-21T08:17:52.000Z | src/devops_menu/controller/__init__.py | rubelw/devops_menu | 38a8eadb26c5ac90a201fd3af0d09d5165ed8249 | [
"Apache-2.0"
] | null | null | null | src/devops_menu/controller/__init__.py | rubelw/devops_menu | 38a8eadb26c5ac90a201fd3af0d09d5165ed8249 | [
"Apache-2.0"
] | null | null | null | from .command_executor import CommandExecutor
| 23 | 45 | 0.891304 |
911d87fa10570382ee5f03edfc1bfd1d116c8360 | 27,277 | py | Python | tensorflow/contrib/boosted_trees/estimator_batch/dnn_tree_combined_estimator.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/contrib/boosted_trees/estimator_batch/dnn_tree_combined_estimator.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/contrib/boosted_trees/estimator_batch/dnn_tree_combined_estimator.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 26 | 2017-04-12T16:25:44.000Z | 2018-10-30T10:10:15.000Z | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 42.888365 | 81 | 0.689079 |
911d9237f3dfde9df56f959bd87dcaf77fa726fd | 71,286 | py | Python | pandaserver/daemons/scripts/copyArchive.py | virthead/panda-server | d2b65f788c4539dc103641ca2a8052cb18729d44 | [
"Apache-2.0"
] | null | null | null | pandaserver/daemons/scripts/copyArchive.py | virthead/panda-server | d2b65f788c4539dc103641ca2a8052cb18729d44 | [
"Apache-2.0"
] | null | null | null | pandaserver/daemons/scripts/copyArchive.py | virthead/panda-server | d2b65f788c4539dc103641ca2a8052cb18729d44 | [
"Apache-2.0"
] | null | null | null | import os
import re
import sys
import time
import fcntl
import shelve
import datetime
import traceback
import requests
import six
import math
from urllib3.exceptions import InsecureRequestWarning
import pandaserver.userinterface.Client as Client
from pandaserver.taskbuffer import EventServiceUtils
from pandacommon.pa... | 47.178028 | 323 | 0.57223 |
911dc12fc6f314d0244df5bb084fe8692a18b15c | 1,567 | py | Python | src/infi/instruct/numeric_macros.py | jasonjorge/infi.asi | 78a4c34a421102f99b959a659cf7303804627d9b | [
"BSD-3-Clause"
] | 2 | 2015-01-12T21:16:06.000Z | 2019-12-12T05:59:56.000Z | src/infi/instruct/numeric_macros.py | jasonjorge/infi.asi | 78a4c34a421102f99b959a659cf7303804627d9b | [
"BSD-3-Clause"
] | 4 | 2015-02-24T09:18:00.000Z | 2021-06-16T12:55:19.000Z | src/infi/instruct/numeric_macros.py | jasonjorge/infi.asi | 78a4c34a421102f99b959a659cf7303804627d9b | [
"BSD-3-Clause"
] | 4 | 2015-01-07T12:37:54.000Z | 2018-02-08T15:07:17.000Z | from .numeric import *
from .base import Marshal
from .struct import Field
# Shortcut to allow users to use either UBInt8 as a serializer (e.g. in an array) or as a field (e.g. UBInt8("foo", 4))
class MarshalWithField(Marshal):
def __init__(self, marshal):
super(MarshalWithField, self).__init__()
s... | 39.175 | 119 | 0.622846 |
911dcd6cace913919a0e55eb8fcfa1bfa83c21bf | 4,818 | py | Python | sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/consumption/azure-mgmt-consumption/azure/mgmt/consumption/aio/operations/_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # 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 may ... | 43.405405 | 133 | 0.670195 |
911df7a364a4b502793b03b55bc4ecec93c834a7 | 1,413 | py | Python | bandwidth/voice/models/modify_call_recording_request.py | roverdotcom/python-sdk | c6947fb3331b77f0064aeec2dcf0c4ff178de34c | [
"MIT"
] | 5 | 2020-11-04T14:29:37.000Z | 2022-02-23T20:33:07.000Z | bandwidth/voice/models/modify_call_recording_request.py | roverdotcom/python-sdk | c6947fb3331b77f0064aeec2dcf0c4ff178de34c | [
"MIT"
] | 3 | 2021-07-23T18:48:48.000Z | 2022-03-15T14:59:07.000Z | bandwidth/voice/models/modify_call_recording_request.py | roverdotcom/python-sdk | c6947fb3331b77f0064aeec2dcf0c4ff178de34c | [
"MIT"
] | 8 | 2020-04-14T09:22:53.000Z | 2022-03-11T10:46:06.000Z | # -*- coding: utf-8 -*-
"""
bandwidth
This file was automatically generated by APIMATIC v3.0 (
https://www.apimatic.io ).
"""
class ModifyCallRecordingRequest(object):
"""Implementation of the 'ModifyCallRecordingRequest' model.
TODO: type model description here.
Attributes:
... | 25.232143 | 79 | 0.59448 |
911e01b112d5bc1e3b9fb39914c5ecd8c348497e | 1,030 | py | Python | sdks/python/test/test_TestCloudStartTestRunOptions.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | null | null | null | sdks/python/test/test_TestCloudStartTestRunOptions.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 6 | 2019-10-23T06:38:53.000Z | 2022-01-22T07:57:58.000Z | sdks/python/test/test_TestCloudStartTestRunOptions.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... | 25.75 | 115 | 0.747573 |
911e06b671145372273c645c25099a346f41ca03 | 37,643 | py | Python | models/sparenet_generator.py | zyh16143998882/SpareNet | 1391a6828cf330ff32be8f5f3bcf90239b4ff92c | [
"MIT"
] | 98 | 2021-03-19T04:34:35.000Z | 2022-03-04T20:02:34.000Z | models/sparenet_generator.py | zyh16143998882/SpareNet | 1391a6828cf330ff32be8f5f3bcf90239b4ff92c | [
"MIT"
] | 24 | 2021-04-12T02:36:10.000Z | 2022-03-19T02:39:50.000Z | models/sparenet_generator.py | zyh16143998882/SpareNet | 1391a6828cf330ff32be8f5f3bcf90239b4ff92c | [
"MIT"
] | 13 | 2021-03-23T03:35:09.000Z | 2021-12-24T05:45:45.000Z | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import torch
import torch.nn as nn
import numpy as np
import torch.nn.functional as F
import cuda.MDS.MDS_module as MDS_module
import cuda.expansion_penalty.expansion_penalty_module as expansion
class SpareNetGenerator(nn.Module):
"""
i... | 33.943192 | 88 | 0.561671 |
911e07cec3b8e4a9b211593a7906f4f278aa0fdd | 3,986 | py | Python | facebook_business/adobjects/flexibletargeting.py | pasha-r/facebook-python-ads-sdk | 76feadd77baed839516b53297628e7a254c8c3c0 | [
"CNRI-Python"
] | null | null | null | facebook_business/adobjects/flexibletargeting.py | pasha-r/facebook-python-ads-sdk | 76feadd77baed839516b53297628e7a254c8c3c0 | [
"CNRI-Python"
] | null | null | null | facebook_business/adobjects/flexibletargeting.py | pasha-r/facebook-python-ads-sdk | 76feadd77baed839516b53297628e7a254c8c3c0 | [
"CNRI-Python"
] | 1 | 2018-09-24T14:04:48.000Z | 2018-09-24T14:04:48.000Z | # Copyright 2014 Facebook, Inc.
# You are hereby granted a non-exclusive, worldwide, royalty-free license to
# use, copy, modify, and distribute this software in source code or binary
# form for use in connection with the web services and APIs provided by
# Facebook.
# As with any software that integrates with the Fa... | 37.603774 | 79 | 0.668841 |
911e2d204a350e0c8aef9ce62027942f9b561988 | 943 | py | Python | tests/context.py | ezhang94/gimbal | 061070152868219a7d638bbb3be48af28ea803e8 | [
"MIT"
] | null | null | null | tests/context.py | ezhang94/gimbal | 061070152868219a7d638bbb3be48af28ea803e8 | [
"MIT"
] | null | null | null | tests/context.py | ezhang94/gimbal | 061070152868219a7d638bbb3be48af28ea803e8 | [
"MIT"
] | 1 | 2022-02-03T20:43:33.000Z | 2022-02-03T20:43:33.000Z | import os
import sys
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '../gimbal/')))
import distributions
import util
# test_data contains the following corresponding data:
# keypoint_names: array of str, length K
# parents: array of int, length K
# camera_matrices: ndarray, sh... | 39.291667 | 118 | 0.722163 |
911e340a7dd0df7ca744f3395745e8fab5313af8 | 879 | py | Python | markdown/__version__.py | msabramo/Python-Markdown | 4cac4ff6095c7b7c0b319f16afb7df349ea93ac8 | [
"BSD-3-Clause"
] | null | null | null | markdown/__version__.py | msabramo/Python-Markdown | 4cac4ff6095c7b7c0b319f16afb7df349ea93ac8 | [
"BSD-3-Clause"
] | null | null | null | markdown/__version__.py | msabramo/Python-Markdown | 4cac4ff6095c7b7c0b319f16afb7df349ea93ac8 | [
"BSD-3-Clause"
] | null | null | null | #
# markdown/__version__.py
#
# version_info should conform to PEP 386
# (major, minor, micro, alpha/beta/rc/final, #)
# (1, 1, 2, 'alpha', 0) => "1.1.2.dev"
# (1, 2, 0, 'beta', 2) => "1.2b2"
version_info = (2, 6, 0, 'alpha', 0)
def _get_version():
" Returns a PEP 386-compliant version number from version_info. "... | 29.3 | 69 | 0.587031 |
911e3ee4e84c842b6e30a51754dbca2523df4215 | 8,608 | py | Python | tests/test_deck.py | lionel-panhaleux/krcg | 40238e2dababb23cdb1895221c58e81a0bf8c21d | [
"MIT"
] | 6 | 2020-05-05T18:59:20.000Z | 2021-10-11T12:19:45.000Z | tests/test_deck.py | lionel-panhaleux/krcg | 40238e2dababb23cdb1895221c58e81a0bf8c21d | [
"MIT"
] | 340 | 2020-04-15T08:19:29.000Z | 2022-03-31T09:59:19.000Z | tests/test_deck.py | lionel-panhaleux/krcg | 40238e2dababb23cdb1895221c58e81a0bf8c21d | [
"MIT"
] | 8 | 2020-05-05T16:10:50.000Z | 2021-07-21T00:16:11.000Z | import os
from krcg import deck
from krcg import twda
def test_cards():
d = deck.Deck()
d.update({"Fame": 3})
assert list(d.cards()) == [("Fame", 3)]
def test_cards_count():
d = deck.Deck()
d.update({"Fame": 3, "Bum's Rush": 10, "Crusher": 4})
assert d.cards_count() == 17
def test_deck_di... | 28.693333 | 87 | 0.520214 |
911e4dfd0d095bd1cc5de613810d574a7b3a105d | 2,934 | py | Python | salt/utils/pagerduty.py | jbq/pkg-salt | b6742e03cbbfb82f4ce7db2e21a3ff31b270cdb3 | [
"Apache-2.0"
] | 1 | 2020-09-16T21:31:02.000Z | 2020-09-16T21:31:02.000Z | salt/utils/pagerduty.py | jbq/pkg-salt | b6742e03cbbfb82f4ce7db2e21a3ff31b270cdb3 | [
"Apache-2.0"
] | null | null | null | salt/utils/pagerduty.py | jbq/pkg-salt | b6742e03cbbfb82f4ce7db2e21a3ff31b270cdb3 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Library for interacting with PagerDuty API
.. versionadded:: 2014.7.0
:configuration: This module can be used by specifying the name of a
configuration profile in the minion config, minion pillar, or master
config.
For example:
.. code-block:: yaml
my-pagerduty-a... | 24.04918 | 77 | 0.593047 |
911e5c3424f2a3eb575040f39891449449075b62 | 989 | py | Python | var/spack/repos/builtin/packages/r-gsodr/package.py | kehw/spack | 4f49b1a9301447a8cf880c99820cad65e5c2d7e3 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2020-09-10T22:50:08.000Z | 2021-01-12T22:18:54.000Z | var/spack/repos/builtin/packages/r-gsodr/package.py | kehw/spack | 4f49b1a9301447a8cf880c99820cad65e5c2d7e3 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 11 | 2021-01-08T22:23:53.000Z | 2022-03-30T11:08:17.000Z | var/spack/repos/builtin/packages/r-gsodr/package.py | kehw/spack | 4f49b1a9301447a8cf880c99820cad65e5c2d7e3 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class RGsodr(RPackage):
"""A Global Surface Summary of the Day (GSOD) Weather Data Client for R"... | 39.56 | 95 | 0.674419 |
911e7e884cfd979bff08efe086b923f62b75f0da | 3,836 | py | Python | p3d/pandaObject.py | Derfies/p3d | 93ff52819d778643afe1dc1ccf296e99fc52c59d | [
"MIT"
] | null | null | null | p3d/pandaObject.py | Derfies/p3d | 93ff52819d778643afe1dc1ccf296e99fc52c59d | [
"MIT"
] | null | null | null | p3d/pandaObject.py | Derfies/p3d | 93ff52819d778643afe1dc1ccf296e99fc52c59d | [
"MIT"
] | null | null | null | import os
import imp
import sys
import inspect
from direct.showbase.DirectObject import DirectObject
import p3d
TAG_PANDA_OBJECT = 'PandaObject'
class PandaObject( object ):
"""
Basic building block class, designed to be attached to a node path in the
scene graph. Doing this creates a circular referen... | 33.649123 | 85 | 0.593066 |
911e87f4e8fbcedb9e0d6c0ee8d65fc77ba57b5a | 914 | py | Python | source/week2a/dirbc.py | ArturPrzybysz/finite-element-method | f6edc466c3020f3c7d7563458cc9fc60ba378d43 | [
"MIT"
] | null | null | null | source/week2a/dirbc.py | ArturPrzybysz/finite-element-method | f6edc466c3020f3c7d7563458cc9fc60ba378d43 | [
"MIT"
] | null | null | null | source/week2a/dirbc.py | ArturPrzybysz/finite-element-method | f6edc466c3020f3c7d7563458cc9fc60ba378d43 | [
"MIT"
] | 1 | 2022-01-04T17:16:50.000Z | 2022-01-04T17:16:50.000Z | # function [A,b] = dirbc(bnodes,f,A,b)
# M = length(b);
# nodes = setdiff(linspace(1,M,M),bnodes);
# Nodes = zeros(M,1);
# Nodes(nodes)=1;
# for i = bnodes
# A(i,i) = 1;
# b(i) = f(i);
# for j = 1:M
# if i~=j
# A(i,j) = 0;
# if Node... | 25.388889 | 68 | 0.368709 |
911eae4411dc0afed95ba8a16d676cf1aaf6772d | 1,741 | py | Python | lib/MaxPool.py | bcrafton/ssdfa | 661f9059184fde6ba7ad1ca710c5b5a1954c5ea6 | [
"MIT"
] | 10 | 2019-01-23T17:07:59.000Z | 2021-07-13T10:18:10.000Z | semantic-segmentation/lib/MaxPool.py | bcrafton/icsrl-deep-learning | e3616982d1dda5f978d61d6591c91cb0da76ab02 | [
"MIT"
] | 1 | 2019-07-30T00:55:58.000Z | 2019-09-17T13:31:48.000Z | semantic-segmentation/lib/MaxPool.py | bcrafton/icsrl-deep-learning | e3616982d1dda5f978d61d6591c91cb0da76ab02 | [
"MIT"
] | 1 | 2019-07-28T17:28:30.000Z | 2019-07-28T17:28:30.000Z |
import tensorflow as tf
import numpy as np
import math
from tensorflow.python.ops import gen_nn_ops
from lib.Layer import Layer
from lib.conv_utils import conv_output_length
from lib.conv_utils import conv_input_length
class MaxPool(Layer):
def __init__(self, size, ksize, strides, padding):
self.size =... | 30.017241 | 139 | 0.524986 |
911eb3d1ef973d0338e86f924d2109bfcabc1e3f | 6,838 | py | Python | synapse/lib/stormsvc.py | kcreyts/synapse | fe740fd1e0febfa32f8d431b32ab48f8a0cf306e | [
"Apache-2.0"
] | 1 | 2021-02-15T22:07:05.000Z | 2021-02-15T22:07:05.000Z | synapse/lib/stormsvc.py | kcreyts/synapse | fe740fd1e0febfa32f8d431b32ab48f8a0cf306e | [
"Apache-2.0"
] | null | null | null | synapse/lib/stormsvc.py | kcreyts/synapse | fe740fd1e0febfa32f8d431b32ab48f8a0cf306e | [
"Apache-2.0"
] | null | null | null | import asyncio
import logging
import synapse.exc as s_exc
import synapse.telepath as s_telepath
import synapse.lib.base as s_base
import synapse.lib.stormtypes as s_stormtypes
logger = logging.getLogger(__name__)
stormcmds = (
{
'name': 'service.add',
'descr': 'Add a storm service to the cortex.... | 32.717703 | 117 | 0.559959 |
911ebb728d26855f8965ec3a8baf3efe805a061e | 9,031 | py | Python | src/utils.py | PIVX-Project/PET4L | 0019d21071722dad91bab39a16c766f8bb8e19ae | [
"MIT"
] | 9 | 2018-05-12T01:42:04.000Z | 2021-05-10T07:39:51.000Z | src/utils.py | PIVX-Project/PET4L | 0019d21071722dad91bab39a16c766f8bb8e19ae | [
"MIT"
] | 8 | 2020-01-13T18:55:05.000Z | 2021-11-15T11:10:16.000Z | src/utils.py | PIVX-Project/PET4L | 0019d21071722dad91bab39a16c766f8bb8e19ae | [
"MIT"
] | 7 | 2018-06-18T20:43:05.000Z | 2020-09-27T20:57:57.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2017-2019 Random.Zebra (https://github.com/random-zebra/)
# Distributed under the MIT software license, see the accompanying
# file LICENSE.txt or http://www.opensource.org/licenses/mit-license.php.
import base64
from bitcoin import bin_hash160, b58check_t... | 34.079245 | 112 | 0.63426 |
911ebedfa5288870509b2d19ee029c82d981566c | 594 | py | Python | tabFileProcessing/colChangeCase.py | linlifeng/llbio | 962f6abda8e8a576cb0bf4d73d3a5c4ef9b1a04b | [
"MIT"
] | null | null | null | tabFileProcessing/colChangeCase.py | linlifeng/llbio | 962f6abda8e8a576cb0bf4d73d3a5c4ef9b1a04b | [
"MIT"
] | null | null | null | tabFileProcessing/colChangeCase.py | linlifeng/llbio | 962f6abda8e8a576cb0bf4d73d3a5c4ef9b1a04b | [
"MIT"
] | null | null | null | #!/usr/bin/python
'''
1. file name
2. colnumber
3. case to be changed to (upper/lower)
'''
from sys import argv, exit
try:
f = open(argv[1], 'r')
colnum = int(argv[2]) - 1
case = argv[3]
except:
exit(__doc__)
for l in f:
segs = l.rstrip().split('\t')
colContent = segs[colnum]
if ca... | 22 | 74 | 0.585859 |
911ec003d79cbf1199bea99ba7ab0292a5b005f9 | 402 | py | Python | message.py | m3ngineer/kema-ai | e494b9380b285fdaa744a44aa2b21390c3eac417 | [
"MIT"
] | null | null | null | message.py | m3ngineer/kema-ai | e494b9380b285fdaa744a44aa2b21390c3eac417 | [
"MIT"
] | null | null | null | message.py | m3ngineer/kema-ai | e494b9380b285fdaa744a44aa2b21390c3eac417 | [
"MIT"
] | null | null | null | from twilio.rest import Client
import os
import conf
def send_msg(msg, to, from_):
account_sid = conf.twilio_account_sid
auth_token = conf.twilio_auth_token
client = Client(account_sid, auth_token)
twi_msg = client.messages \
.create(
body=msg,
... | 22.333333 | 44 | 0.522388 |
911ec182ceacdc5d9732682a6fb371a11171d5a4 | 4,443 | py | Python | experiments/ashvin/icra2021/data_utils/compile_offpolicy_ccrig1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/icra2021/data_utils/compile_offpolicy_ccrig1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/icra2021/data_utils/compile_offpolicy_ccrig1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import time
import glob
from rlkit.misc.asset_loader import load_local_or_remote_file
from copy import deepcopy
from PIL import Image
from skimage import data, color
from skimage.transform import rescale, resize, downscale_local_mean
from torchvision.transforms impor... | 40.761468 | 106 | 0.636282 |
911eecfd17b16d7128cc5916bd1d80894907b6f6 | 2,781 | py | Python | ngraph/frontends/neon/initializer.py | NervanaSystems/ngraph-python | ac032c83c7152b615a9ad129d54d350f9d6a2986 | [
"Apache-2.0"
] | 18 | 2018-03-19T04:16:49.000Z | 2021-02-08T14:44:58.000Z | ngraph/frontends/neon/initializer.py | rsumner31/ngraph | 5e5c9bb9f24d95aee190b914dd2d44122fc3be53 | [
"Apache-2.0"
] | 2 | 2019-04-16T06:41:49.000Z | 2019-05-06T14:08:13.000Z | ngraph/frontends/neon/initializer.py | rsumner31/ngraph | 5e5c9bb9f24d95aee190b914dd2d44122fc3be53 | [
"Apache-2.0"
] | 11 | 2018-06-16T15:59:08.000Z | 2021-03-06T00:45:30.000Z | # ******************************************************************************
# Copyright 2017-2018 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.apa... | 29.903226 | 91 | 0.648688 |
911f4167451f16f59c207ddec1f1a968ca965409 | 61,632 | py | Python | heat/tests/test_api_cfn_v1.py | CiscoSystems/heat | 1b609f3c0621c44e4988a166a38f36c2b57eb4c6 | [
"Apache-2.0"
] | 1 | 2020-08-15T14:29:15.000Z | 2020-08-15T14:29:15.000Z | heat/tests/test_api_cfn_v1.py | CiscoSystems/heat | 1b609f3c0621c44e4988a166a38f36c2b57eb4c6 | [
"Apache-2.0"
] | null | null | null | heat/tests/test_api_cfn_v1.py | CiscoSystems/heat | 1b609f3c0621c44e4988a166a38f36c2b57eb4c6 | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 43.280899 | 79 | 0.545074 |
911f67155c6fd9dce61e7619145f60007f8e1ccc | 7,646 | py | Python | tests/test_s3_load.py | TalusBio/talus-aws-utils | 93cc3583abc9cfdb696cfa40115400c4a089c0c4 | [
"MIT"
] | null | null | null | tests/test_s3_load.py | TalusBio/talus-aws-utils | 93cc3583abc9cfdb696cfa40115400c4a089c0c4 | [
"MIT"
] | 58 | 2021-07-13T22:52:17.000Z | 2022-03-28T20:36:49.000Z | tests/test_s3_load.py | TalusBio/talus-aws-utils | 93cc3583abc9cfdb696cfa40115400c4a089c0c4 | [
"MIT"
] | null | null | null | """Test cases for the s3 module."""
import json
import os
from pathlib import Path
from typing import Iterable
from unittest import TestCase
import joblib
import numpy as np
import pandas as pd
import pytest
from mypy_boto3_s3.service_resource import Bucket
import talus_aws_utils.s3 as s3_utils
DATA_DIR = Path(__... | 34.441441 | 88 | 0.73581 |
911f7457664067fd1a45870cbbe9a5ec20d0742b | 79 | py | Python | microscopes/hmm/model.py | datamicroscopes/hmm | 1dadc5456d33023c6c86eb29ad69200fd3b296da | [
"BSD-3-Clause"
] | 9 | 2015-04-21T07:08:14.000Z | 2020-11-07T17:45:08.000Z | microscopes/hmm/model.py | jamezhetianswang/hmm | 1dadc5456d33023c6c86eb29ad69200fd3b296da | [
"BSD-3-Clause"
] | 10 | 2015-04-08T20:42:49.000Z | 2015-04-17T21:10:22.000Z | microscopes/hmm/model.py | jamezhetianswang/hmm | 1dadc5456d33023c6c86eb29ad69200fd3b296da | [
"BSD-3-Clause"
] | 7 | 2015-04-10T18:53:26.000Z | 2021-09-24T06:58:40.000Z | from microscopes.hmm._model import state
from microscopes.common.rng import rng | 39.5 | 40 | 0.860759 |
911fbb3867d184bf95c38b61ff90899bee8fdba2 | 1,228 | py | Python | map.py | jg10545/gomap | 3d8dbd3e1e8081efe6aa1c6e2faef1c64cf1343b | [
"MIT"
] | 1 | 2018-08-27T14:31:09.000Z | 2018-08-27T14:31:09.000Z | map.py | jg10545/gomap | 3d8dbd3e1e8081efe6aa1c6e2faef1c64cf1343b | [
"MIT"
] | null | null | null | map.py | jg10545/gomap | 3d8dbd3e1e8081efe6aa1c6e2faef1c64cf1343b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
map.py
Script for visualizing where gopro photo locations on a map
"""
import os
import argparse
import gomap
import bokeh.plotting
def main(f, o):
# find a list of folders
folders = [d.strip() for d in f.... | 25.061224 | 100 | 0.62215 |
911fe5dbd45a240ad2579a94a856e042c8bcead1 | 2,862 | py | Python | FusionIIIT/applications/academic_procedures/models.py | pTidke/Fusion | 7a0da7239bd97df7a9849163c5438c0c917c2e55 | [
"bzip2-1.0.6"
] | 1 | 2019-01-24T07:17:54.000Z | 2019-01-24T07:17:54.000Z | FusionIIIT/applications/academic_procedures/models.py | sayali1909/Fusion | acb4f43e97f73c0f757511a3e9fcc4e1dff2d0ab | [
"bzip2-1.0.6"
] | 1 | 2019-03-27T20:54:19.000Z | 2019-03-27T20:54:19.000Z | FusionIIIT/applications/academic_procedures/models.py | sayali1909/Fusion | acb4f43e97f73c0f757511a3e9fcc4e1dff2d0ab | [
"bzip2-1.0.6"
] | 4 | 2019-01-31T09:50:43.000Z | 2019-03-28T09:17:07.000Z | import datetime
from django.db import models
from applications.academic_information.models import Course, Student
from applications.globals.models import DepartmentInfo, ExtraInfo, Faculty
class Constants:
SEM_CHOICES = (
('1', '1'),
('2', '2'),
('3', '3'),
('4', '4'),
('... | 29.8125 | 95 | 0.663522 |
911fedf481224773990b91081a49bded74944291 | 31,267 | py | Python | volttron/platform/agent/utils.py | architpansare/volttron | ea8e7b3c8af9ce08dc736bd8a5c7b513d6b94fe9 | [
"Apache-2.0",
"BSD-2-Clause"
] | null | null | null | volttron/platform/agent/utils.py | architpansare/volttron | ea8e7b3c8af9ce08dc736bd8a5c7b513d6b94fe9 | [
"Apache-2.0",
"BSD-2-Clause"
] | 4 | 2021-05-28T19:12:54.000Z | 2022-02-18T03:07:40.000Z | volttron/platform/agent/utils.py | architpansare/volttron | ea8e7b3c8af9ce08dc736bd8a5c7b513d6b94fe9 | [
"Apache-2.0",
"BSD-2-Clause"
] | 3 | 2021-06-12T19:49:56.000Z | 2022-02-12T20:14:38.000Z | # -*- coding: utf-8 -*- {{{
# vim: set fenc=utf-8 ft=python sw=4 ts=4 sts=4 et:
#
# Copyright 2020, Battelle Memorial Institute.
#
# 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... | 35.571104 | 117 | 0.637157 |
91204e98ea0d31ac06998fece114c00040162f51 | 1,482 | py | Python | src/umr/login.py | kriskall/Zeeguu-Reader | 0404cdf67b855924a92a051f95445fdfd5e655da | [
"MIT"
] | 2 | 2019-08-18T00:03:49.000Z | 2020-07-22T13:59:40.000Z | src/umr/login.py | kriskall/Zeeguu-Reader | 0404cdf67b855924a92a051f95445fdfd5e655da | [
"MIT"
] | 176 | 2016-12-05T14:01:43.000Z | 2017-08-28T12:45:42.000Z | src/umr/login.py | mircealungu/Unified-Multilanguage-Reader | 1866dc1f591b1c9b87260a0dcd65b11dec1d06c9 | [
"MIT"
] | 4 | 2019-04-11T11:47:23.000Z | 2020-05-25T21:50:21.000Z | import requests
from flask import Blueprint, request, render_template, redirect, url_for, make_response
from .articles import get_articles_page
ZEEGUU_SERVER = "https://zeeguu.unibe.ch/api"
STATUS_ACCEPT = 200
endpoints_login = Blueprint('endpoints_login', __name__, template_folder='templates')
@endpoints_login.ro... | 33.681818 | 87 | 0.710526 |
91209366f3408d594540dc6ba11e182ec1f5fca4 | 25,306 | py | Python | leo/core/leoExternalFiles.py | frakel/leo-editor | b574118ee3b7ffe8344fa0d00dac603096117ac7 | [
"MIT"
] | null | null | null | leo/core/leoExternalFiles.py | frakel/leo-editor | b574118ee3b7ffe8344fa0d00dac603096117ac7 | [
"MIT"
] | null | null | null | leo/core/leoExternalFiles.py | frakel/leo-editor | b574118ee3b7ffe8344fa0d00dac603096117ac7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#@+leo-ver=5-thin
#@+node:ekr.20160306114544.1: * @file leoExternalFiles.py
#@@first
import leo.core.leoGlobals as g
import getpass
import os
import subprocess
import tempfile
import time
#@+others
#@+node:ekr.20160306110233.1: ** class ExternalFile
class ExternalFile(object):
'''A class hol... | 40.42492 | 91 | 0.549356 |
91209767b7275d7718a3887548f6aface163c69b | 5,693 | py | Python | samples/ycb/train_ycb.py | alr-internship/Mask_RCNN | 24add96b7d711b34df2d5774e6c04b74202a2e69 | [
"MIT"
] | null | null | null | samples/ycb/train_ycb.py | alr-internship/Mask_RCNN | 24add96b7d711b34df2d5774e6c04b74202a2e69 | [
"MIT"
] | null | null | null | samples/ycb/train_ycb.py | alr-internship/Mask_RCNN | 24add96b7d711b34df2d5774e6c04b74202a2e69 | [
"MIT"
] | null | null | null | # %% [markdown]
# # Mask R-CNN - Train on Shapes Dataset
#
#
# This notebook shows how to train Mask R-CNN on your own dataset. To keep things simple we use a synthetic dataset of shapes (squares, triangles, and circles) which enables fast training. You'd still need a GPU, though, because the network backbone is a Re... | 38.993151 | 413 | 0.682944 |
9120bbdb3aa662e521a16e8240585c2f0441c006 | 703 | py | Python | LeetCode/easy - Array/1331. Rank Transform of an Array/.ipynb_checkpoints/solution-checkpoint.py | vincent507cpu/Comprehensive-Algorithm-Solution | 04e01e49622457f09af2e1133954f043c0c92cb9 | [
"MIT"
] | 4 | 2020-06-26T00:45:53.000Z | 2021-04-19T12:23:32.000Z | LeetCode/easy - Array/1331. Rank Transform of an Array/.ipynb_checkpoints/solution-checkpoint.py | vincent507cpu/LeetCode-Comprehensive-Solution | 04e01e49622457f09af2e1133954f043c0c92cb9 | [
"MIT"
] | null | null | null | LeetCode/easy - Array/1331. Rank Transform of an Array/.ipynb_checkpoints/solution-checkpoint.py | vincent507cpu/LeetCode-Comprehensive-Solution | 04e01e49622457f09af2e1133954f043c0c92cb9 | [
"MIT"
] | null | null | null | class Solution:
# https://leetcode.com/problems/rank-transform-of-an-array/discuss/540140/Python-clean-code-hashmap
def arrayRankTransform(self, arr: List[int]) -> List[int]:
dct, rank = {}, 1
for n in sorted(set(arr)):
dct[n] = rank
rank += 1
... | 35.15 | 103 | 0.554765 |
9120d725cf52e0438ba21ae5bf3a59371b0eaf8d | 11,092 | py | Python | packages/python-packages/api-stub-generator/apistub/_apiview.py | LarryOsterman/azure-sdk-tools | 0146e05f4aee767ed7593218109546663be95ec4 | [
"MIT"
] | null | null | null | packages/python-packages/api-stub-generator/apistub/_apiview.py | LarryOsterman/azure-sdk-tools | 0146e05f4aee767ed7593218109546663be95ec4 | [
"MIT"
] | null | null | null | packages/python-packages/api-stub-generator/apistub/_apiview.py | LarryOsterman/azure-sdk-tools | 0146e05f4aee767ed7593218109546663be95ec4 | [
"MIT"
] | null | null | null | from json import JSONEncoder
import logging
import re
import importlib
import inspect
import platform
from ._node_index import NodeIndex
from ._token import Token
from ._token_kind import TokenKind
from ._version import VERSION
from ._diagnostic import Diagnostic
from ._metadata_map import MetadataMap
JSON_FIELDS = [... | 37.856655 | 146 | 0.625947 |
9120f316d70345b96f54fc01a10bb702c45a913d | 5,398 | py | Python | src/server/MhmServer/ingestors/neon_ingestor.py | jbrr/mosquito_heat_map | 2cce46a5e26526bd04a83486a62733ab343376ba | [
"MIT"
] | null | null | null | src/server/MhmServer/ingestors/neon_ingestor.py | jbrr/mosquito_heat_map | 2cce46a5e26526bd04a83486a62733ab343376ba | [
"MIT"
] | 2 | 2020-07-07T20:31:40.000Z | 2022-02-10T19:17:35.000Z | src/server/MhmServer/ingestors/neon_ingestor.py | jbrr/mosquito_heat_map | 2cce46a5e26526bd04a83486a62733ab343376ba | [
"MIT"
] | null | null | null | import re
import csv
class NeonIngestor():
def __init__(self, db, models, file_path):
self.db = db
self.models = models
self.file_path = file_path
def ingest_identification_data(self):
session = self.db.session()
with open(self.file_path) as f:
reader = csv... | 40.893939 | 103 | 0.469433 |
9120f5bc8f814b4692efc7406b81c0fe8103d83e | 7,225 | py | Python | samples/barebone/settings.py | kuasha/peregrine | b3dd92146d26fe9e4ea589868431b590324b47d1 | [
"MIT"
] | 1 | 2018-10-12T15:12:15.000Z | 2018-10-12T15:12:15.000Z | samples/barebone/settings.py | kuasha/peregrine | b3dd92146d26fe9e4ea589868431b590324b47d1 | [
"MIT"
] | null | null | null | samples/barebone/settings.py | kuasha/peregrine | b3dd92146d26fe9e4ea589868431b590324b47d1 | [
"MIT"
] | null | null | null | import os
import logging
from collections import namedtuple
from Crypto.PublicKey import RSA
from tornado import gen
from tornado import concurrent
from cosmos.rbac.object import *
from cosmos.service import OBSERVER_PROCESSOR
DEBUG = True
DB_HOST = "127.0.0.1"
DB_NAME = "cosmos"
DB_PORT = 27017
DB_USER_NAME = None
... | 47.847682 | 1,732 | 0.800969 |
91210259a28e1fa1d5531744b459c4495fbffac9 | 2,523 | py | Python | oscar/lib/python2.7/site-packages/IPython/terminal/pt_inputhooks/gtk.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/IPython/terminal/pt_inputhooks/gtk.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/IPython/terminal/pt_inputhooks/gtk.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | # Code borrowed from python-prompt-toolkit examples
# https://github.com/jonathanslenders/python-prompt-toolkit/blob/77cdcfbc7f4b4c34a9d2f9a34d422d7152f16209/examples/inputhook.py
# Copyright (c) 2014, Jonathan Slenders
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without... | 42.05 | 128 | 0.750694 |
9121058e3c341a77094fef76075bb5ff5424b80b | 11,485 | py | Python | azurelinuxagent/pa/provision/default.py | sundaxi/WALinuxAgent | 416b8b10b27a4cb0d4988834d26af7aae6836d84 | [
"Apache-2.0"
] | 1 | 2021-01-22T05:44:51.000Z | 2021-01-22T05:44:51.000Z | azurelinuxagent/pa/provision/default.py | sundaxi/WALinuxAgent | 416b8b10b27a4cb0d4988834d26af7aae6836d84 | [
"Apache-2.0"
] | null | null | null | azurelinuxagent/pa/provision/default.py | sundaxi/WALinuxAgent | 416b8b10b27a4cb0d4988834d26af7aae6836d84 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Microsoft 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 in... | 37.168285 | 97 | 0.60653 |
91211aa4053be94161801ca2587e34d15317b4c9 | 12,028 | py | Python | src/flat_estimators/classifiers/poelm.py | kjhall01/xcast | 17edfd8c79c5163b004800170bbcf21302e8c792 | [
"MIT"
] | 11 | 2021-11-01T21:38:17.000Z | 2022-03-30T11:46:32.000Z | src/flat_estimators/classifiers/poelm.py | kjhall01/xcast | 17edfd8c79c5163b004800170bbcf21302e8c792 | [
"MIT"
] | 7 | 2021-10-30T16:55:47.000Z | 2021-12-04T18:51:50.000Z | src/flat_estimators/classifiers/poelm.py | kjhall01/xcast | 17edfd8c79c5163b004800170bbcf21302e8c792 | [
"MIT"
] | 1 | 2021-11-18T10:35:29.000Z | 2021-11-18T10:35:29.000Z | from sklearn.decomposition import PCA
from sklearn.feature_selection import chi2
from sklearn.metrics import accuracy_score
from scipy.special import softmax
import datetime as dt
import numpy as np
import scipy.linalg.lapack as la
from scipy.special import softmax
from scipy.spatial.distance import cdist
class POELM... | 45.560606 | 218 | 0.669189 |
9121350478e32fe8a6bb24f763d03e9a53d30c34 | 77 | py | Python | src/eda/__init__.py | ameksike/kdd.fraud.detection.system | a02feb7b0d755dc068879a10a1f3a8e3f1e86fb6 | [
"MIT"
] | null | null | null | src/eda/__init__.py | ameksike/kdd.fraud.detection.system | a02feb7b0d755dc068879a10a1f3a8e3f1e86fb6 | [
"MIT"
] | null | null | null | src/eda/__init__.py | ameksike/kdd.fraud.detection.system | a02feb7b0d755dc068879a10a1f3a8e3f1e86fb6 | [
"MIT"
] | null | null | null | import sys, os
sys.path.append(os.path.abspath(os.path.dirname(__file__)))
| 25.666667 | 60 | 0.753247 |
91213c23ca405ff7037196d4d59e6ba479af2c89 | 23,099 | py | Python | vmoe/moe_test.py | google-research/vmoe | 38a1e4f75c3eb268b974f8860497ec9f17b46504 | [
"Apache-2.0"
] | 205 | 2021-11-10T12:04:30.000Z | 2022-03-30T08:26:18.000Z | vmoe/moe_test.py | google-research/vmoe | 38a1e4f75c3eb268b974f8860497ec9f17b46504 | [
"Apache-2.0"
] | 3 | 2022-01-18T08:13:17.000Z | 2022-01-25T05:46:11.000Z | vmoe/moe_test.py | google-research/vmoe | 38a1e4f75c3eb268b974f8860497ec9f17b46504 | [
"Apache-2.0"
] | 27 | 2022-01-14T05:38:47.000Z | 2022-03-17T05:20:55.000Z | # Copyright 2022 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 to in writing, ... | 43.256554 | 83 | 0.646781 |
9121646f0c17a7d39704ecfbd17e18ea33afaa07 | 5,653 | py | Python | ubcs_auxiliary/plotting.py | vstadnytskyi/auxiliary | 3916af3a147f72071388278385d484b9eacbc66b | [
"BSD-3-Clause"
] | null | null | null | ubcs_auxiliary/plotting.py | vstadnytskyi/auxiliary | 3916af3a147f72071388278385d484b9eacbc66b | [
"BSD-3-Clause"
] | 1 | 2019-10-16T16:40:27.000Z | 2019-10-16T16:40:27.000Z | ubcs_auxiliary/plotting.py | vstadnytskyi/auxiliary | 3916af3a147f72071388278385d484b9eacbc66b | [
"BSD-3-Clause"
] | 1 | 2020-01-18T05:57:41.000Z | 2020-01-18T05:57:41.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
plotting functions
author: Valentyn Stadnytskyi
data: 2017 - Nov 17 2018
"""
__vesrion__ = '1.0.0'
from time import time, sleep
import sys
if sys.version_info[0] == 2:
from time import clock as perf_counter
else:
from time import perf_counter
import platform
from ... | 30.556757 | 115 | 0.621971 |
912164e256f2c183b1fe62a3dce7d97725a55372 | 1,509 | py | Python | wmpl/CMN/CMNFormats.py | gmke/WesternMeteorPyLib | f218ac5abc9c1a53fe3844039909f8efb929b50e | [
"MIT"
] | 20 | 2019-04-11T01:15:23.000Z | 2022-03-08T17:36:35.000Z | wmpl/CMN/CMNFormats.py | adalava/WesternMeteorPyLib | d1083734bab7ad82580a0370121986296547f0b0 | [
"MIT"
] | 9 | 2019-11-12T02:46:42.000Z | 2021-11-16T21:14:24.000Z | wmpl/CMN/CMNFormats.py | adalava/WesternMeteorPyLib | d1083734bab7ad82580a0370121986296547f0b0 | [
"MIT"
] | 11 | 2019-08-22T03:01:36.000Z | 2022-03-07T18:36:59.000Z | import numpy as np
from wmpl.Utils.TrajConversions import J2000_JD, equatorialCoordPrecession
class InfData(object):
def __init__(self, station_id, lat, lon, ele, jd_data, ra_data, dec_data):
self.station_id = station_id
self.lat = lat
self.lon = lon
self.ele = ele
self.jd_data = np.array(jd_data)
self... | 18.402439 | 75 | 0.664679 |
912199773e22dd424ebcbd74439f7dd8d3c8fa7e | 19,440 | py | Python | sunpy/database/tests/test_attrs.py | johan12345/sunpy | 56e1ab0c2c992f99e0fe3e6bff468b731a51228c | [
"BSD-2-Clause"
] | 2 | 2020-01-03T16:39:28.000Z | 2020-04-24T15:12:08.000Z | sunpy/database/tests/test_attrs.py | johan12345/sunpy | 56e1ab0c2c992f99e0fe3e6bff468b731a51228c | [
"BSD-2-Clause"
] | 1 | 2020-05-11T13:38:56.000Z | 2020-05-11T13:38:56.000Z | sunpy/database/tests/test_attrs.py | johan12345/sunpy | 56e1ab0c2c992f99e0fe3e6bff468b731a51228c | [
"BSD-2-Clause"
] | null | null | null | # Author: Simon Liedtke <liedtke.simon@googlemail.com>
#
# This module was developed with funding provided by
# the Google Summer of Code (2013).
from datetime import datetime
import pytest
import astropy.units as u
from sunpy.database import tables
from sunpy.database.attrs import DownloadTime, FitsHeaderEntry, Pa... | 40.248447 | 98 | 0.593261 |
9121bc1e28848588040a4a94380d678db7dd6b7d | 6,750 | py | Python | src/utils/plot_scatter.py | PawelRosikiewicz/PriceHook | 00009a5718b203daca60023cfc3e5d2f1592e0ed | [
"MIT"
] | 1 | 2022-03-25T14:24:57.000Z | 2022-03-25T14:24:57.000Z | src/utils/plot_scatter.py | PawelRosikiewicz/PriceHook | 00009a5718b203daca60023cfc3e5d2f1592e0ed | [
"MIT"
] | null | null | null | src/utils/plot_scatter.py | PawelRosikiewicz/PriceHook | 00009a5718b203daca60023cfc3e5d2f1592e0ed | [
"MIT"
] | null | null | null | # ********************************************************************************** #
# #
# Project: Data Frame Explorer #
# Author: Pawel Rosikiewicz ... | 46.232877 | 133 | 0.537333 |
9121c742cc5c1655a22360b5d9f1e4e8cecb5438 | 891 | py | Python | sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/__init__.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/__init__.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/passivestamp/__init__.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.000Z | # 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 may ... | 46.894737 | 114 | 0.668911 |
9121e29ad5af86ea2e5995086c2ff75c98d38566 | 3,002 | py | Python | render_scene_with_plane.py | cloose/ray-tracer-challenge | 5e9dd56fb67c5cba47172986a963fc22a8cbcaa2 | [
"MIT"
] | null | null | null | render_scene_with_plane.py | cloose/ray-tracer-challenge | 5e9dd56fb67c5cba47172986a963fc22a8cbcaa2 | [
"MIT"
] | null | null | null | render_scene_with_plane.py | cloose/ray-tracer-challenge | 5e9dd56fb67c5cba47172986a963fc22a8cbcaa2 | [
"MIT"
] | null | null | null | from math import pi
from core import point, vector, color, multiply_matrix
from core import scaling, translation, rotation_y, view_transform
from shapes import Material, Sphere, Plane
from lights import PointLight
from scene import Camera, World, RayTracer
from patterns import StripePattern
def render_scene_with_plan... | 34.113636 | 84 | 0.625916 |
9121f78ec4ceb945568ef440f40b6410ba0e6c1b | 3,546 | py | Python | python/learn/PythonDataVisualizationCookbookSE_Code/Chapter 02/ch02-random-distributions.py | flyingwjw/Documentation | 567608f388ca369b864c2d75a94647801b5dfa1e | [
"Unlicense"
] | 26 | 2016-08-25T01:33:36.000Z | 2022-03-20T11:33:31.000Z | python/learn/PythonDataVisualizationCookbookSE_Code/Chapter 02/ch02-random-distributions.py | flyingwjw/Documentation | 567608f388ca369b864c2d75a94647801b5dfa1e | [
"Unlicense"
] | null | null | null | python/learn/PythonDataVisualizationCookbookSE_Code/Chapter 02/ch02-random-distributions.py | flyingwjw/Documentation | 567608f388ca369b864c2d75a94647801b5dfa1e | [
"Unlicense"
] | 31 | 2016-08-16T15:32:46.000Z | 2021-01-26T19:16:48.000Z | # coding: utf-8
import random
import matplotlib
import matplotlib.pyplot as plt
SAMPLE_SIZE = 1000
# histogram buckets
buckets = 100
plt.figure()
# we need to update font size just for this example
matplotlib.rcParams.update({'font.size': 7})
plt.subplot(621)
plt.xlabel("random.random")
# Return the next random fl... | 31.945946 | 298 | 0.711506 |
912204073407efda855ca2ecc2262d2f6fc6ca57 | 7,142 | py | Python | train_model.py | ShiChenAI/cnn_implementation | 9e15179b2bc3b9bd4a55c825873af8ebaf0caef3 | [
"Apache-2.0"
] | 1 | 2018-12-19T10:40:54.000Z | 2018-12-19T10:40:54.000Z | train_model.py | ShiChenAI/cnn_implementation | 9e15179b2bc3b9bd4a55c825873af8ebaf0caef3 | [
"Apache-2.0"
] | null | null | null | train_model.py | ShiChenAI/cnn_implementation | 9e15179b2bc3b9bd4a55c825873af8ebaf0caef3 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from datetime import datetime
import os.path
import math
import time
import numpy as np
from six.moves import xrange
import tensorflow as tf
import model
import tfrecord
import config
import eval_model
FLAGS =... | 44.360248 | 135 | 0.541445 |
9122192ccab43c4274a6ad653b705c20dd216fcc | 296 | py | Python | scripts/scene_update.py | CentralLabFacilities/ros_cosypose | b45cc3a5bf1586d8d7e29d6bbc4e40ae92ac309e | [
"MIT"
] | null | null | null | scripts/scene_update.py | CentralLabFacilities/ros_cosypose | b45cc3a5bf1586d8d7e29d6bbc4e40ae92ac309e | [
"MIT"
] | null | null | null | scripts/scene_update.py | CentralLabFacilities/ros_cosypose | b45cc3a5bf1586d8d7e29d6bbc4e40ae92ac309e | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import rospy
from ros_cosypose.scene_update_service import SceneUpdateService
def main():
rospy.init_node('scene_update')
service = SceneUpdateService()
rospy.loginfo('Scene update service is ready.')
rospy.spin()
if __name__ == '__main__':
main()
| 18.5 | 64 | 0.719595 |
91225accd2e54892dd6308b00c42a60ffea12c2b | 1,148 | py | Python | gc/test1.py | allena29/libyang-cffi | 81940a3a9f56b2baa92fed4949f1ce0cad258ad6 | [
"MIT"
] | null | null | null | gc/test1.py | allena29/libyang-cffi | 81940a3a9f56b2baa92fed4949f1ce0cad258ad6 | [
"MIT"
] | null | null | null | gc/test1.py | allena29/libyang-cffi | 81940a3a9f56b2baa92fed4949f1ce0cad258ad6 | [
"MIT"
] | null | null | null | # YANGPATH=/home/adam/libyang-cffi/newtests/yang python m.py
import os, psutil
import gc
import sys
import time
process = psutil.Process(os.getpid())
def sizeof_fmt(num, suffix='B'):
for unit in ['','Ki','Mi','Gi','Ti','Pi','Ei','Zi']:
if abs(num) < 1024.0:
return "%3.1f%s%s" % (num, unit, s... | 22.076923 | 64 | 0.625436 |
912290e47a38f37c5913e5a0d18791f6f179c091 | 6,694 | py | Python | toontown/classicchars/DistributedMinnieAI.py | LittleNed/toontown-stride | 1252a8f9a8816c1810106006d09c8bdfe6ad1e57 | [
"Apache-2.0"
] | 3 | 2020-01-02T08:43:36.000Z | 2020-07-05T08:59:02.000Z | toontown/classicchars/DistributedMinnieAI.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | null | null | null | toontown/classicchars/DistributedMinnieAI.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | 4 | 2019-06-20T23:45:23.000Z | 2020-10-14T20:30:15.000Z | # File: D (Python 2.4)
from otp.ai.AIBaseGlobal import *
from toontown.classicchars.DistributedCCharBaseAI import DistributedCCharBaseAI
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.task import Task
import random
from toontown.toon... | 36.78022 | 294 | 0.641918 |
912295f59f1f1e0d0b6d1342cc482048cea4a9d9 | 319 | py | Python | array/singleelementinarry.py | mengyangbai/leetcode | e7a6906ecc5bce665dec5d0f057b302a64d50f40 | [
"MIT"
] | null | null | null | array/singleelementinarry.py | mengyangbai/leetcode | e7a6906ecc5bce665dec5d0f057b302a64d50f40 | [
"MIT"
] | null | null | null | array/singleelementinarry.py | mengyangbai/leetcode | e7a6906ecc5bce665dec5d0f057b302a64d50f40 | [
"MIT"
] | null | null | null | class Solution:
def singleNonDuplicate(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
res = set()
for n in nums:
if n in res:
res.remove(n)
else:
res.add(n)
return res.pop()
| 21.266667 | 39 | 0.382445 |
9122c4a8528386198928e636a548d35248677ed1 | 3,419 | py | Python | userbot/utils/tools.py | FSharon/UserBot | e21c30ffc15143a97cd2a3ad133926b34b68b8f1 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 3 | 2020-10-25T03:36:43.000Z | 2021-05-27T09:10:09.000Z | userbot/utils/tools.py | FSharon/UserBot | e21c30ffc15143a97cd2a3ad133926b34b68b8f1 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 3 | 2021-07-16T10:10:09.000Z | 2021-12-19T23:34:15.000Z | userbot/utils/tools.py | minaricious/UserBot | e21c30ffc15143a97cd2a3ad133926b34b68b8f1 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 7 | 2020-10-27T03:00:57.000Z | 2021-09-02T12:17:54.000Z | # Copyright (C) 2020 Adek Maulana
#
# SPDX-License-Identifier: GPL-3.0-or-later
# 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 3 of the License, or
# (at your option) any later v... | 32.875 | 92 | 0.605148 |
9122e1d9a0a074f4cf533ea6b481ccc69c937140 | 432 | py | Python | test/integrationtests/test_output_gms7.py | mudkipmaster/gwlf-e | 9e058445537dd32d1916f76c4b73ca64261771cd | [
"Apache-2.0"
] | null | null | null | test/integrationtests/test_output_gms7.py | mudkipmaster/gwlf-e | 9e058445537dd32d1916f76c4b73ca64261771cd | [
"Apache-2.0"
] | 6 | 2018-07-24T22:46:28.000Z | 2018-07-29T19:13:09.000Z | test/integrationtests/test_output_gms7.py | mudkipmaster/gwlf-e | 9e058445537dd32d1916f76c4b73ca64261771cd | [
"Apache-2.0"
] | 1 | 2018-07-24T18:22:01.000Z | 2018-07-24T18:22:01.000Z | # -*- coding: utf-8 -*-
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from test_output import TestOutput
class gms7_TestOutput(TestOutput):
"""
Tests model generated output versus known
static output.
"""
__test__ = True
@classm... | 22.736842 | 79 | 0.724537 |
9123188e8ba323106d48cf26ecfc1e76587d6379 | 2,579 | py | Python | discord/main.py | taomii/CharlyLadder | 2582a2f983c1fc19034f1db345c7806a6a22bfe5 | [
"MIT"
] | null | null | null | discord/main.py | taomii/CharlyLadder | 2582a2f983c1fc19034f1db345c7806a6a22bfe5 | [
"MIT"
] | null | null | null | discord/main.py | taomii/CharlyLadder | 2582a2f983c1fc19034f1db345c7806a6a22bfe5 | [
"MIT"
] | 1 | 2022-03-26T21:05:54.000Z | 2022-03-26T21:05:54.000Z | from discord.ext import commands
import requests
import json
import re
import os
DISCORD_TOKEN = os.environ['DISCORD_TOKEN']
bot = commands.Bot(command_prefix="!pql-ladder ")
def api_call():
response = requests.get("http://api:42069")
dict_response = json.loads(response.content)
return dict_... | 31.072289 | 118 | 0.579682 |
91232276d87b8c3005f11a0a7a97306528318745 | 7,494 | py | Python | army_ant/reader/trec_washington_post_reader.py | feup-infolab/army-ant | 7b33120d5160f73d7a41a05e6336489c917fb75c | [
"BSD-3-Clause"
] | 5 | 2018-01-18T14:11:52.000Z | 2020-10-23T16:02:25.000Z | army_ant/reader/trec_washington_post_reader.py | feup-infolab/army-ant | 7b33120d5160f73d7a41a05e6336489c917fb75c | [
"BSD-3-Clause"
] | 10 | 2018-02-02T20:19:36.000Z | 2020-10-05T08:46:36.000Z | army_ant/reader/trec_washington_post_reader.py | feup-infolab/army-ant | 7b33120d5160f73d7a41a05e6336489c917fb75c | [
"BSD-3-Clause"
] | null | null | null | import logging
import os
import re
import sys
import time
import pandas as pd
from army_ant.reader import Document, Entity, MongoDBReader
from army_ant.setup import config_logger
from army_ant.util.dbpedia import fetch_dbpedia_triples
from army_ant.util.text import AhoCorasickEntityExtractor
logger = logging.getLogg... | 38.430769 | 114 | 0.564852 |
9123237d00b74a0d4ef9a6a0c544ab4e3a69b45e | 50 | py | Python | zaailabcorelib/zlogger/__init__.py | vocong25/zaailabcorelib | 1b8694c885bb5550fb00eb9d71563eaff4d6e30e | [
"MIT"
] | 1 | 2019-12-05T15:11:53.000Z | 2019-12-05T15:11:53.000Z | zaailabcorelib/zlogger/__init__.py | vocong25/zaailabcorelib | 1b8694c885bb5550fb00eb9d71563eaff4d6e30e | [
"MIT"
] | null | null | null | zaailabcorelib/zlogger/__init__.py | vocong25/zaailabcorelib | 1b8694c885bb5550fb00eb9d71563eaff4d6e30e | [
"MIT"
] | null | null | null | from zaailabcorelib.zlogger.zlogger import Zlogger | 50 | 50 | 0.9 |
91233b8ba7759c77d9ff20bce5d38f0fc72b3859 | 4,597 | py | Python | tfx/components/transform/component.py | HassanDayoub/tfx | dc9221abbb8dad991d1ae22fb91876da1290efae | [
"Apache-2.0"
] | 2 | 2019-07-08T20:56:13.000Z | 2020-08-04T17:07:26.000Z | tfx/components/transform/component.py | HassanDayoub/tfx | dc9221abbb8dad991d1ae22fb91876da1290efae | [
"Apache-2.0"
] | null | null | null | tfx/components/transform/component.py | HassanDayoub/tfx | dc9221abbb8dad991d1ae22fb91876da1290efae | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 38.957627 | 83 | 0.710898 |
9123450eb31198873555699b68d338597fbb79e4 | 188 | py | Python | Image/timer.py | pection/InternshipProject | 2b39cc244e7ac989795d3aba5c1a11bb6c9a57b7 | [
"Apache-2.0"
] | null | null | null | Image/timer.py | pection/InternshipProject | 2b39cc244e7ac989795d3aba5c1a11bb6c9a57b7 | [
"Apache-2.0"
] | null | null | null | Image/timer.py | pection/InternshipProject | 2b39cc244e7ac989795d3aba5c1a11bb6c9a57b7 | [
"Apache-2.0"
] | null | null | null | import cv2
e1 = cv2.getTickCount()
# your code here
for i in range(5,0,2):
img1 = cv2.medianBlur(img1,i)
e2 = cv2.getTickCount()
t = (e2 - e1)/cv2.getTickFrequency()
print (t) | 20.888889 | 37 | 0.643617 |
912378b12f22b7bf1838353e41828fbf72f8dc4f | 816 | py | Python | histomicsui/models/pathology.py | DigitalSlideArchive/HistomicsUI | 838b2a6c7f92bb5cb9a05f4a9577c5f05564f146 | [
"Apache-2.0"
] | 17 | 2020-06-17T06:03:10.000Z | 2022-03-16T15:44:52.000Z | histomicsui/models/pathology.py | DigitalSlideArchive/HistomicsUI | 838b2a6c7f92bb5cb9a05f4a9577c5f05564f146 | [
"Apache-2.0"
] | 67 | 2020-02-27T20:17:04.000Z | 2022-03-31T15:36:32.000Z | histomicsui/models/pathology.py | DigitalSlideArchive/HistomicsUI | 838b2a6c7f92bb5cb9a05f4a9577c5f05564f146 | [
"Apache-2.0"
] | 9 | 2020-02-11T19:35:23.000Z | 2021-11-04T02:22:15.000Z | from girder.models.item import Item
from girder.models.model_base import ValidationException
from .meta import TCGAModel
class Pathology(TCGAModel, Item):
TCGAType = 'pathology'
def importDocument(self, doc, **kwargs):
recurse = kwargs.get('recurse', False)
if doc.get('_modelType', 'item')... | 28.137931 | 59 | 0.57598 |
9123878de8521b9060606d9b459dca65528efe50 | 3,598 | py | Python | twisted-client-1/get-poetry.py | TinaTong-avi/twisted-intro | 5e694d173126c30a2c28c2457d6a5a2fd2d5e5db | [
"MIT"
] | 430 | 2015-01-04T05:38:08.000Z | 2022-02-23T04:12:46.000Z | twisted-client-1/get-poetry.py | TinaTong-avi/twisted-intro | 5e694d173126c30a2c28c2457d6a5a2fd2d5e5db | [
"MIT"
] | 4 | 2016-02-15T03:53:15.000Z | 2020-06-20T20:16:28.000Z | twisted-client-1/get-poetry.py | TinaTong-avi/twisted-intro | 5e694d173126c30a2c28c2457d6a5a2fd2d5e5db | [
"MIT"
] | 284 | 2015-01-11T18:41:58.000Z | 2022-02-23T04:12:53.000Z | # This is the Twisted Get Poetry Now! client, version 1.0.
# NOTE: This should not be used as the basis for production code.
# It uses low-level Twisted APIs as a learning exercise.
import datetime, errno, optparse, socket
from twisted.internet import main
def parse_args():
usage = """usage: %prog [options] [h... | 25.7 | 77 | 0.600889 |
9123a97e0ed350f0dc008070fe444089b0a2373c | 3,204 | py | Python | src/CryptoPlus/Cipher/python_DES3.py | koujiandou-mhfg/python-cryptoplus | a5a1f8aecce4ddf476b2d80b586822d9e91eeb7d | [
"MIT"
] | 64 | 2015-01-15T10:41:41.000Z | 2022-01-10T23:51:42.000Z | src/CryptoPlus/Cipher/python_DES3.py | koujiandou-mhfg/python-cryptoplus | a5a1f8aecce4ddf476b2d80b586822d9e91eeb7d | [
"MIT"
] | 5 | 2016-01-05T17:48:22.000Z | 2018-02-22T04:32:17.000Z | src/CryptoPlus/Cipher/python_DES3.py | koujiandou-mhfg/python-cryptoplus | a5a1f8aecce4ddf476b2d80b586822d9e91eeb7d | [
"MIT"
] | 53 | 2015-04-14T00:17:02.000Z | 2022-03-12T05:32:05.000Z | from blockcipher import *
import pyDes
def new(key,mode=MODE_ECB,IV=None,counter=None,segment_size=None):
"""Create a DES-EDE3 or DES-EDE2 cipher object
wrapper for pure python 3DES implementation pyDes.py
key = raw string containing the 2/3 keys
- DES-EDE2: supply 2 keys as 1 single conc... | 39.555556 | 114 | 0.668851 |
9123b492457fff84adc06fd1ac117e8d21835022 | 1,664 | py | Python | sublime/Packages/SublimeREPL/repls/autocomplete_server.py | micahwood/linux-dotfiles | cc3939fccac3f1c0f1ef1f1240052403bef28206 | [
"MIT"
] | null | null | null | sublime/Packages/SublimeREPL/repls/autocomplete_server.py | micahwood/linux-dotfiles | cc3939fccac3f1c0f1ef1f1240052403bef28206 | [
"MIT"
] | null | null | null | sublime/Packages/SublimeREPL/repls/autocomplete_server.py | micahwood/linux-dotfiles | cc3939fccac3f1c0f1ef1f1240052403bef28206 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import json
import socket
import threading
import sublime
def read_netstring(s):
size = 0
while True:
byte = s.recv(1)
if byte == b':':
break
size = size * 10 + int(byte)
msg = b""
while size != 0:
msg += s.recv(size)
size -= ... | 27.278689 | 85 | 0.592548 |
9123b546454441638a0f248ea473d43805685247 | 9,167 | py | Python | cityexplorer.py | scofirat/treesearch-resnet-tsp | c3b0747725ddd7479ef74e7af399b8c3a85e4d4c | [
"Apache-2.0"
] | null | null | null | cityexplorer.py | scofirat/treesearch-resnet-tsp | c3b0747725ddd7479ef74e7af399b8c3a85e4d4c | [
"Apache-2.0"
] | null | null | null | cityexplorer.py | scofirat/treesearch-resnet-tsp | c3b0747725ddd7479ef74e7af399b8c3a85e4d4c | [
"Apache-2.0"
] | null | null | null | import csv
import random as rnd
import featurizer
import math
from sklearn.neighbors import KDTree
from sklearn.preprocessing import PolynomialFeatures
import numpy as np
prime={}
def is_prime(num):
if num in prime:
return prime[num]
for i in range(2,int(num**0.5+1)):
if(num%i==0):
... | 43.240566 | 132 | 0.552416 |
9123bdfc765a493e2d4c92e041e6ac0555cde6d4 | 3,308 | py | Python | ST_Memory/exp/cityscapes/psp50/STF/model/refine.py | jfzhuang/ST_Memory | f253c05b7ecb37a1cbe9f312a628ba30b4555230 | [
"MIT"
] | null | null | null | ST_Memory/exp/cityscapes/psp50/STF/model/refine.py | jfzhuang/ST_Memory | f253c05b7ecb37a1cbe9f312a628ba30b4555230 | [
"MIT"
] | null | null | null | ST_Memory/exp/cityscapes/psp50/STF/model/refine.py | jfzhuang/ST_Memory | f253c05b7ecb37a1cbe9f312a628ba30b4555230 | [
"MIT"
] | null | null | null | import torch
from torch import nn
import torch.nn.functional as F
from lib.net.transformer import STF, Transformer
from mmseg.models import build_segmentor
from mmcv.utils import Config
class SegRefine(nn.Module):
def __init__(self, num_classes=19):
super().__init__()
self.num_classes = num_clas... | 35.191489 | 102 | 0.627872 |
9123cd5ede0ffda9f525393097e8d5a548acd354 | 22,353 | py | Python | manticore/manticore.py | etcd/manticore | 87073d9985c4ca445217b7b135a6af0a51044b21 | [
"Apache-2.0"
] | null | null | null | manticore/manticore.py | etcd/manticore | 87073d9985c4ca445217b7b135a6af0a51044b21 | [
"Apache-2.0"
] | null | null | null | manticore/manticore.py | etcd/manticore | 87073d9985c4ca445217b7b135a6af0a51044b21 | [
"Apache-2.0"
] | null | null | null | import os
import sys
import time
import types
import logging
import binascii
import tempfile
import functools
from multiprocessing import Manager, Pool
from multiprocessing import Process
from threading import Timer
from elftools.elf.elffile import ELFFile
from elftools.elf.sections import SymbolTableSection
from .... | 34.602167 | 176 | 0.599741 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.