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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1d888d07866294c55958e2e83a6946c89c90c57d | 885 | py | Python | oscar/lib/python2.7/site-packages/dns/rdtypes/ANY/DLV.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/dns/rdtypes/ANY/DLV.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/dns/rdtypes/ANY/DLV.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (C) 2009-2011 Nominum, Inc.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose with or without fee is hereby granted,
# provided that the above copyright notice and this permission notice
# appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS I... | 40.227273 | 73 | 0.757062 |
1d88f887fa13cef871f02d872dcc39f057ac15ba | 2,581 | py | Python | python/test/test_constraint_group.py | openlattice/api-clients | 1d5be9861785b295089b732f37464e31bf80c8ca | [
"Apache-2.0"
] | null | null | null | python/test/test_constraint_group.py | openlattice/api-clients | 1d5be9861785b295089b732f37464e31bf80c8ca | [
"Apache-2.0"
] | 1 | 2021-01-20T00:20:01.000Z | 2021-01-20T00:20:01.000Z | python/test/test_constraint_group.py | openlattice/api-clients | 1d5be9861785b295089b732f37464e31bf80c8ca | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
OpenLattice API
OpenLattice API # noqa: E501
The version of the OpenAPI document: 0.0.1
Contact: support@openlattice.com
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import unittest
import datetime
import openlattice
from openlat... | 32.2625 | 110 | 0.482759 |
1d88ff58ecb26b20035f2bd1c25a2e7c80259088 | 436 | py | Python | cam/__init__.py | wofmanaf/Group-CAM | d52a2ceb4b44201c8b5bd5ed27867eba9ff482e5 | [
"Apache-2.0"
] | 68 | 2021-03-26T23:14:35.000Z | 2022-03-24T04:29:35.000Z | cam/__init__.py | wofmanaf/Group-CAM | d52a2ceb4b44201c8b5bd5ed27867eba9ff482e5 | [
"Apache-2.0"
] | 9 | 2021-04-12T02:34:32.000Z | 2022-03-19T02:48:25.000Z | cam/__init__.py | wofmanaf/Group-CAM | d52a2ceb4b44201c8b5bd5ed27867eba9ff482e5 | [
"Apache-2.0"
] | 21 | 2021-03-26T03:58:40.000Z | 2022-03-22T08:28:50.000Z | from .basecam import BaseCAM
from .gradcam import GradCAM, GradCAMpp, SmoothGradCAM
from .groupcam import GroupCAM
from .scorecam import ScoreCAM
from .guided_backprop import GuidedBackProp
from .integrated_gradients import IntegratedGradients
from .smooth_integrated import SmoothIntGrad
from .rise import RISE
_EXCLUD... | 36.333333 | 86 | 0.805046 |
1d8902b456601e3339c218bbbfa2fd96c0bdf066 | 40 | py | Python | btd6_memory_info/generated/Assets/Scripts/Unity/Map/Effects/CreateObjectOnRemoveableSold/create_object_on_removeable_sold.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/Assets/Scripts/Unity/Map/Effects/CreateObjectOnRemoveableSold/create_object_on_removeable_sold.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/Assets/Scripts/Unity/Map/Effects/CreateObjectOnRemoveableSold/create_object_on_removeable_sold.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | class CreateObjectOnRemoveableSold: pass | 40 | 40 | 0.925 |
1d892228f3b0290103e49140ab03e4c065410540 | 14,812 | py | Python | brian2/tests/test_parsing.py | achilleas-k/brian2 | 906563b6b1321585b082f79f74f1b4ab386347ec | [
"BSD-2-Clause"
] | null | null | null | brian2/tests/test_parsing.py | achilleas-k/brian2 | 906563b6b1321585b082f79f74f1b4ab386347ec | [
"BSD-2-Clause"
] | null | null | null | brian2/tests/test_parsing.py | achilleas-k/brian2 | 906563b6b1321585b082f79f74f1b4ab386347ec | [
"BSD-2-Clause"
] | null | null | null | '''
Tests the brian2.parsing package
'''
from collections import namedtuple
from nose.plugins.attrib import attr
from numpy.testing import assert_allclose, assert_raises
import numpy as np
from brian2.codegen.runtime.weave_rt.weave_rt import get_compiler_and_args
from brian2.core.preferences import prefs
f... | 33.435666 | 101 | 0.546786 |
1d893f0c8e177442f23014ca2b44d0b4ff07c35e | 7,013 | py | Python | show_and_tell.py | brandontrabucco/contextual_captions | e6abfe135aec0fc093195bd192a6a75439beee0e | [
"MIT"
] | null | null | null | show_and_tell.py | brandontrabucco/contextual_captions | e6abfe135aec0fc093195bd192a6a75439beee0e | [
"MIT"
] | 1 | 2019-08-30T20:45:49.000Z | 2019-09-08T02:06:56.000Z | show_and_tell.py | brandontrabucco/contextual_captions | e6abfe135aec0fc093195bd192a6a75439beee0e | [
"MIT"
] | 1 | 2019-05-27T06:14:06.000Z | 2019-05-27T06:14:06.000Z | """Author: Brandon Trabucco, Copyright 2019
Loads images from the conceptual captions dataset and trains a show and tell model."""
import tensorflow as tf
import pickle as pkl
import os
import time
import numpy as np
import itertools
from tensorflow.contrib.slim.python.slim.nets.resnet_v2 import resnet_v2_1... | 51.566176 | 126 | 0.67161 |
1d8962ed0423256e3e0bd013496ad2b83f40baa9 | 6,964 | py | Python | pymarket/market.py | kiedanski/pymarket | 0d73fe45a2c458a02e660816369e4699decefb2b | [
"MIT"
] | 12 | 2020-01-04T05:22:23.000Z | 2021-05-23T23:59:48.000Z | pymarket/market.py | kiedanski/pymarket | 0d73fe45a2c458a02e660816369e4699decefb2b | [
"MIT"
] | 14 | 2019-08-06T03:18:29.000Z | 2021-02-08T10:31:13.000Z | pymarket/market.py | gus0k/pymarket | 0d73fe45a2c458a02e660816369e4699decefb2b | [
"MIT"
] | 5 | 2019-08-30T05:04:54.000Z | 2020-12-18T14:40:14.000Z | from pymarket.bids import BidManager
from pymarket.mechanisms import *
from pymarket.transactions import TransactionManager
from pymarket.statistics import *
from pymarket.plot import plot_demand_curves, plot_trades_as_graph, plot_both_side_muda, plot_huang_auction
from collections import OrderedDict
MECHANISM = {
... | 27.203125 | 107 | 0.537191 |
1d897e0ae7a528ac2dcd306da659d776196ea6b3 | 3,635 | py | Python | intersight/models/smtp_validation_task_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/smtp_validation_task_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/smtp_validation_task_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Intersight REST API
This is Intersight REST API
OpenAPI spec version: 1.0.9-255
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class SmtpValidationTaskRef(object):
"""
NOTE: This... | 24.233333 | 77 | 0.544704 |
1d8989a361cc6ee942a125c8a23333c74ff4ec42 | 10,480 | py | Python | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2021_04_01/aio/operations/_file_services_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2021_04_01/aio/operations/_file_services_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2021_04_01/aio/operations/_file_services_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 ... | 47.207207 | 221 | 0.704198 |
1d89aa8363e27bb16e0459ba28bc528140b0850b | 19,731 | py | Python | OmsAgent/extension-test/omsfiles/oms_extension_run_script.py | jamvar/azure-linux-extensions | 66610daae2ef09f7920d9c4aa2e99a3035fe76a6 | [
"Apache-2.0"
] | null | null | null | OmsAgent/extension-test/omsfiles/oms_extension_run_script.py | jamvar/azure-linux-extensions | 66610daae2ef09f7920d9c4aa2e99a3035fe76a6 | [
"Apache-2.0"
] | null | null | null | OmsAgent/extension-test/omsfiles/oms_extension_run_script.py | jamvar/azure-linux-extensions | 66610daae2ef09f7920d9c4aa2e99a3035fe76a6 | [
"Apache-2.0"
] | null | null | null | import os
import os.path
import platform
import subprocess
import re
import sys
import time
if "check_output" not in dir( subprocess ): # duck punch it in!
def check_output(*popenargs, **kwargs):
r"""Run command with arguments and return its output as a byte string.
Backported from Pyth... | 38.38716 | 306 | 0.633825 |
1d89ad5f95b1085d8e95c89a210e28cf72e51952 | 3,154 | py | Python | tests/utils.py | pauleikis/webdav4 | bfaee69fd6a163fc0d718e8f80c567b2cce8ffcd | [
"MIT"
] | 18 | 2021-02-18T08:47:42.000Z | 2022-02-28T08:40:10.000Z | tests/utils.py | pauleikis/webdav4 | bfaee69fd6a163fc0d718e8f80c567b2cce8ffcd | [
"MIT"
] | 81 | 2021-02-12T15:52:55.000Z | 2022-03-21T21:03:14.000Z | tests/utils.py | pauleikis/webdav4 | bfaee69fd6a163fc0d718e8f80c567b2cce8ffcd | [
"MIT"
] | 4 | 2021-07-06T22:15:34.000Z | 2022-01-21T10:31:08.000Z | """Test utilities here."""
import os
from datetime import datetime, timedelta
from pathlib import PosixPath, WindowsPath
from typing import Any, Dict, Iterable, Union, cast
from _pytest.python_api import ApproxBase
PathClass = PosixPath if os.name == "posix" else WindowsPath
class TmpDir(PathClass): # type: ignore... | 34.659341 | 79 | 0.60019 |
1d89b770c8a2a32c1352f8f3f00052cf8206afa8 | 2,761 | py | Python | src/unit_parse/logger.py | dylanwal/unit_parse | 07a74d43b9f161bd7ad6ef12ab0f362f1bf6a90d | [
"BSD-3-Clause"
] | 1 | 2022-01-29T17:14:40.000Z | 2022-01-29T17:14:40.000Z | src/unit_parse/logger.py | dylanwal/unit_parse | 07a74d43b9f161bd7ad6ef12ab0f362f1bf6a90d | [
"BSD-3-Clause"
] | null | null | null | src/unit_parse/logger.py | dylanwal/unit_parse | 07a74d43b9f161bd7ad6ef12ab0f362f1bf6a90d | [
"BSD-3-Clause"
] | null | null | null | """
Logger
The logger can be used to track how a string is transformed through the parsing.
Default level is warning.
warning: will only let you know if text any text is ignored in the parsing.
info: will show the major parsing steps.
debug: will show fine grain parsing steps.
"""
import logging
from functools impo... | 31.022472 | 100 | 0.641434 |
1d8a506895991ac80d293dfa02c9b74f1fbcc49e | 31,779 | py | Python | escape/escape/util/config.py | 5GExchange/escape | eb35d460597a0386b18dd5b6a5f62a3f30eed5fa | [
"Apache-2.0"
] | 10 | 2016-11-16T16:26:16.000Z | 2021-04-26T17:20:28.000Z | escape/escape/util/config.py | 5GExchange/escape | eb35d460597a0386b18dd5b6a5f62a3f30eed5fa | [
"Apache-2.0"
] | 3 | 2017-04-20T11:29:17.000Z | 2017-11-06T17:12:12.000Z | escape/escape/util/config.py | 5GExchange/escape | eb35d460597a0386b18dd5b6a5f62a3f30eed5fa | [
"Apache-2.0"
] | 10 | 2017-03-27T13:58:52.000Z | 2020-06-24T22:42:51.000Z | # Copyright 2015 Janos Czentye <czentye@tmit.bme.hu>
#
# 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... | 28.399464 | 80 | 0.623714 |
1d8a7d0fdcd65a0c0559d836ebc93c93a0286f33 | 491 | py | Python | func_tests/pages/activitylogpage/show_activity_log_locator.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | 1 | 2015-11-02T09:11:12.000Z | 2015-11-02T09:11:12.000Z | func_tests/pages/activitylogpage/show_activity_log_locator.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | func_tests/pages/activitylogpage/show_activity_log_locator.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | # vim: ai ts=4 sts=4 et sw=4 encoding=utf-8
from framework.utils.common_utils import *
# By default every locator should be CSS
# Abbr:
# TB - Text Box
# CB - Check Box
# RB - Radio Button
# BTN - Button
# DD - Drop Down
# LINK - Links
# LABEL - Label
# variable to access locator
LOCATOR = "locator"
BY = "by"
FIN... | 21.347826 | 100 | 0.706721 |
1d8aa42a749156678353451ff7247e710b8a93a6 | 55,238 | py | Python | src/sage/schemes/elliptic_curves/constructor.py | saraedum/sage-renamed | d2da67b14da2ad766a5906425d60d43a3b3e1270 | [
"BSL-1.0"
] | 1 | 2016-11-04T16:31:48.000Z | 2016-11-04T16:31:48.000Z | src/sage/schemes/elliptic_curves/constructor.py | rwst/sage | a9d274b9338e6ee24bf35ea8d25875507e51e455 | [
"BSL-1.0"
] | null | null | null | src/sage/schemes/elliptic_curves/constructor.py | rwst/sage | a9d274b9338e6ee24bf35ea8d25875507e51e455 | [
"BSL-1.0"
] | null | null | null | """
Elliptic curve constructor
AUTHORS:
- William Stein (2005): Initial version
- John Cremona (2008-01): EllipticCurve(j) fixed for all cases
"""
from __future__ import absolute_import
#*****************************************************************************
# Copyright (C) 2005 William Stein <wstein@gm... | 37.172275 | 879 | 0.594826 |
1d8aadc1b1e27f9f901f79f7c447411976b02326 | 1,394 | py | Python | pygame practice/chapter_14/alien.py | Nuaboc/simple_programs | 8175a31de342b5e385ca72f92b3a6abfde108124 | [
"MIT"
] | null | null | null | pygame practice/chapter_14/alien.py | Nuaboc/simple_programs | 8175a31de342b5e385ca72f92b3a6abfde108124 | [
"MIT"
] | null | null | null | pygame practice/chapter_14/alien.py | Nuaboc/simple_programs | 8175a31de342b5e385ca72f92b3a6abfde108124 | [
"MIT"
] | null | null | null | import pygame
from pygame.sprite import Sprite
class Alien(Sprite):
"""A class to represent a single alien in the fleet."""
def __init__(self, ai_settings, screen):
"""Initialize the alien, and set its starting position."""
super(Alien, self).__init__()
self.screen = screen
sel... | 33.190476 | 66 | 0.6033 |
1d8afc47d3827157369d358ce5e3fb41f7052908 | 2,642 | py | Python | venv/Lib/site-packages/pyrogram/raw/functions/channels/report_spam.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 2 | 2021-12-13T07:09:55.000Z | 2022-01-12T12:15:20.000Z | venv/Lib/site-packages/pyrogram/raw/functions/channels/report_spam.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/functions/channels/report_spam.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... | 31.452381 | 114 | 0.609387 |
1d8b04eac0b7bd5eb39190462ed784c04bae8948 | 4,843 | py | Python | jobs/update-stale-payment/tests/unit/conftest.py | mengdong19/sbc-pay | a5a1d81ae3500457178371fb004fd09194bbb6b7 | [
"Apache-2.0"
] | null | null | null | jobs/update-stale-payment/tests/unit/conftest.py | mengdong19/sbc-pay | a5a1d81ae3500457178371fb004fd09194bbb6b7 | [
"Apache-2.0"
] | null | null | null | jobs/update-stale-payment/tests/unit/conftest.py | mengdong19/sbc-pay | a5a1d81ae3500457178371fb004fd09194bbb6b7 | [
"Apache-2.0"
] | null | null | null | # Copyright © 2019 Province of British Columbia
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | 33.171233 | 104 | 0.659096 |
1d8b0915676a2312c12a88911962711ca0afe69b | 7,386 | py | Python | crawler/spiders/three_corporate_open_interest_spider.py | ChuangYuMing/futures_spread_analysis | 71540671eed7ea3abba0a9a5af45f49dcf662ce3 | [
"MIT"
] | 2 | 2019-09-19T05:11:00.000Z | 2020-07-23T07:26:03.000Z | crawler/spiders/three_corporate_open_interest_spider.py | ChuangYuMing/futures_spread_analysis | 71540671eed7ea3abba0a9a5af45f49dcf662ce3 | [
"MIT"
] | 11 | 2020-07-14T10:42:59.000Z | 2022-03-02T14:54:10.000Z | crawler/spiders/three_corporate_open_interest_spider.py | ChuangYuMing/futures_spread_analysis | 71540671eed7ea3abba0a9a5af45f49dcf662ce3 | [
"MIT"
] | null | null | null | # encoding: utf-8
# pylint: disable=E1101
# 三大法人期貨多空未平倉量
# 只能撈前三年!!
# https://www.taifex.com.tw/cht/3/futContractsDate
import scrapy
from scrapy import signals, Spider
from urllib.parse import urlencode
import time
from random import randint
import datetime
import logging
from copy import copy
from dateutil.relatived... | 41.033333 | 105 | 0.61779 |
1d8b1950e7c614e24d7b6fdc977fb27f2ebbdecd | 4,048 | py | Python | cloud_snitch/tests/test_terminate.py | bunchc/FleetDeploymentReporting | a93af06573f2715e14b4d18b7a394c26fc19a32d | [
"Apache-2.0"
] | 1 | 2018-07-11T20:20:21.000Z | 2018-07-11T20:20:21.000Z | cloud_snitch/tests/test_terminate.py | bunchc/FleetDeploymentReporting | a93af06573f2715e14b4d18b7a394c26fc19a32d | [
"Apache-2.0"
] | 46 | 2018-08-08T19:46:15.000Z | 2019-02-22T20:33:49.000Z | cloud_snitch/tests/test_terminate.py | dani4571/FleetDeploymentReporting | 8b132a20fa3e9c4e4215feade79f689be6e4b364 | [
"Apache-2.0"
] | 7 | 2018-06-26T15:27:55.000Z | 2018-12-05T19:41:25.000Z | import mock
import unittest
import sys
from io import StringIO
from cloud_snitch.terminate import parser
from cloud_snitch.terminate import set_to_until_zero
class TestArgParser(unittest.TestCase):
def setUp(self):
self.old_stream = sys.stderr
self.stream = StringIO()
sys.stderr = self.... | 27.726027 | 75 | 0.615613 |
1d8b6c3ee651b7d0a7ec2ecf65e223aacd42cb49 | 6,724 | py | Python | fcos_core/modeling/rpn/fcos/inference.py | Singingkettle/SAF-FCOS | 5d00b83d659552940025923460d02bb2db7d29e8 | [
"BSD-2-Clause"
] | 10 | 2021-08-31T01:39:40.000Z | 2022-03-27T13:13:14.000Z | fcos_core/modeling/rpn/fcos/inference.py | Singingkettle/SAF-FCOS | 5d00b83d659552940025923460d02bb2db7d29e8 | [
"BSD-2-Clause"
] | 1 | 2021-10-10T05:36:35.000Z | 2021-12-11T05:56:26.000Z | fcos_core/modeling/rpn/fcos/inference.py | Singingkettle/SAF-FCOS | 5d00b83d659552940025923460d02bb2db7d29e8 | [
"BSD-2-Clause"
] | 3 | 2021-09-05T09:14:35.000Z | 2021-10-21T03:15:59.000Z | import torch
from fcos_core.modeling.box_coder import BoxCoder
from fcos_core.structures.bounding_box import BoxList
from fcos_core.structures.boxlist_ops import boxlist_ml_nms
from fcos_core.structures.boxlist_ops import cat_boxlist
from fcos_core.structures.boxlist_ops import remove_small_boxes
class FCOSPostProce... | 36.945055 | 94 | 0.611689 |
1d8b9baf4b6c32bdeddd52e2d263f7debdee8f56 | 2,447 | py | Python | examples/cython/cython_main.py | cumttang/ray | eb1e5fa2cf26233701ccbda3eb8a301ecd418d8c | [
"Apache-2.0"
] | 3 | 2019-05-01T04:31:20.000Z | 2021-03-01T09:25:36.000Z | examples/cython/cython_main.py | collinswei/ray | 2e30f7ba386e716bf80f019dcd473b67d83abb95 | [
"Apache-2.0"
] | 2 | 2019-01-28T00:31:25.000Z | 2019-11-26T16:57:06.000Z | examples/cython/cython_main.py | collinswei/ray | 2e30f7ba386e716bf80f019dcd473b67d83abb95 | [
"Apache-2.0"
] | 6 | 2019-03-12T05:37:35.000Z | 2020-03-09T12:25:17.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import ray
import click
import inspect
import numpy as np
import cython_examples as cyth
def run_func(func, *args, **kwargs):
"""Helper function for running examples"""
ray.init()
func = ray.rem... | 20.22314 | 74 | 0.601962 |
1d8bffe86bbb136a4842703ac8dcafca3a834d92 | 2,055 | py | Python | mmocr/models/textdet/dense_heads/pan_head.py | JiaquanYe/MASTER-mmocr | eb30cfce1da7676da68e7dd1250e048aad9d4dec | [
"Apache-2.0"
] | 75 | 2021-07-30T09:05:15.000Z | 2022-03-23T07:08:22.000Z | mmocr/models/textdet/dense_heads/pan_head.py | JiaquanYe/MASTER-mmocr | eb30cfce1da7676da68e7dd1250e048aad9d4dec | [
"Apache-2.0"
] | 5 | 2021-09-14T09:03:18.000Z | 2022-02-20T16:59:18.000Z | mmocr/models/textdet/dense_heads/pan_head.py | JiaquanYe/MASTER-mmocr | eb30cfce1da7676da68e7dd1250e048aad9d4dec | [
"Apache-2.0"
] | 13 | 2021-07-30T09:08:09.000Z | 2022-01-26T03:51:59.000Z | import numpy as np
import torch
import torch.nn as nn
from mmcv.cnn import normal_init
from mmdet.models.builder import HEADS, build_loss
from mmocr.utils import check_argument
from . import HeadMixin
@HEADS.register_module()
class PANHead(HeadMixin, nn.Module):
"""The class for PANet head."""
def __init__(... | 31.615385 | 71 | 0.618005 |
1d8c061ff4c39ac7512d889ade9a9edb6054eceb | 42,838 | py | Python | src/fortrace/application/instantMessenger.py | dasec/ForTrace | b8187522a2c83fb661e5a1a5f403da8f40a31ead | [
"MIT"
] | 1 | 2022-03-31T14:01:51.000Z | 2022-03-31T14:01:51.000Z | src/fortrace/application/instantMessenger.py | dasec/ForTrace | b8187522a2c83fb661e5a1a5f403da8f40a31ead | [
"MIT"
] | null | null | null | src/fortrace/application/instantMessenger.py | dasec/ForTrace | b8187522a2c83fb661e5a1a5f403da8f40a31ead | [
"MIT"
] | 1 | 2022-03-31T14:02:30.000Z | 2022-03-31T14:02:30.000Z | # Copyright (C) 2013-2014 Reinhard Stampp
# This file is part of fortrace - http://fortrace.fbi.h-da.de
# See the file 'docs/LICENSE' for copying permission.
from __future__ import absolute_import
from __future__ import print_function
from six.moves import range
try:
import logging
import os
import sys
... | 45.767094 | 153 | 0.583944 |
1d8c1fee943451083934ffbc99bcc32b0744612c | 2,422 | py | Python | util/log_setup.py | AndroidWG/Last.fm-Discord-RPC | fbae6e787cacb48a999fe05e6c8f36fe153bdc74 | [
"MIT"
] | 2 | 2022-01-29T06:21:38.000Z | 2022-02-16T03:36:55.000Z | util/log_setup.py | AndroidWG/Last.fm-Discord-RPC | fbae6e787cacb48a999fe05e6c8f36fe153bdc74 | [
"MIT"
] | 18 | 2021-11-30T20:06:01.000Z | 2022-03-17T15:42:07.000Z | util/log_setup.py | AndroidWG/Last.fm-Discord-RPC | fbae6e787cacb48a999fe05e6c8f36fe153bdc74 | [
"MIT"
] | null | null | null | import datetime
import logging
import os
import datetime as dt
import sys
from settings import local_settings, get_debug
class MillisecondFormatter(logging.Formatter):
"""A formatter for standard library 'logging' that supports '%f' wildcard in format strings."""
converter = dt.datetime.fromtimestamp
def... | 33.178082 | 118 | 0.657721 |
1d8c4e8631283a0419bf586fa36065ed8861ba7b | 423 | py | Python | examples/pluggable/hello_world/app.py | pauleveritt/viewdom_wired | 40d8f2f190a12bbd07ff957654626001a9f3a778 | [
"MIT"
] | null | null | null | examples/pluggable/hello_world/app.py | pauleveritt/viewdom_wired | 40d8f2f190a12bbd07ff957654626001a9f3a778 | [
"MIT"
] | null | null | null | examples/pluggable/hello_world/app.py | pauleveritt/viewdom_wired | 40d8f2f190a12bbd07ff957654626001a9f3a778 | [
"MIT"
] | null | null | null | from viewdom import html
from wired_injector import InjectorRegistry
from viewdom_wired import render
from .components import Greeting
def main():
# The app
registry = InjectorRegistry()
registry.scan()
# Per "request"
container = registry.create_injectable_container()
result = render(html('... | 22.263158 | 54 | 0.718676 |
1d8c59849e91080563921dbfca938b92a4d72695 | 3,430 | py | Python | marathon/setup.py | dvanderveer/integrations-core | 41dd9950296455457c9b7342584153678503d5aa | [
"BSD-3-Clause"
] | null | null | null | marathon/setup.py | dvanderveer/integrations-core | 41dd9950296455457c9b7342584153678503d5aa | [
"BSD-3-Clause"
] | null | null | null | marathon/setup.py | dvanderveer/integrations-core | 41dd9950296455457c9b7342584153678503d5aa | [
"BSD-3-Clause"
] | null | null | null | # Always prefer setuptools over distutils
from setuptools import setup
# To use a consistent encoding
from codecs import open
from os import path
import json
import re
here = path.abspath(path.dirname(__file__))
def parse_req_line(line):
line = line.strip()
if not line or line.startswith('--hash') or line[0]... | 28.347107 | 92 | 0.632653 |
1d8c6d4b77a5b3f7552ccf02a80c07211c17b79a | 3,303 | py | Python | robotics/shape/mobile_shape.py | wlbksy/robotics | a031a20bdf3e8734f3dcfe31d5c54405ff29415e | [
"MIT"
] | null | null | null | robotics/shape/mobile_shape.py | wlbksy/robotics | a031a20bdf3e8734f3dcfe31d5c54405ff29415e | [
"MIT"
] | null | null | null | robotics/shape/mobile_shape.py | wlbksy/robotics | a031a20bdf3e8734f3dcfe31d5c54405ff29415e | [
"MIT"
] | null | null | null | import numpy as np
from matplotlib import pyplot as plt
from ..pose import rotation2D, transform2D
class Triangle:
def __init__(self, p0=(0.5, 0), p1=(-0.4, 0.3), p2=(-0.4, -0.3), color="-k"):
self.shape = np.array(
[[p0[0], p1[0], p2[0]], [p0[1], p1[1], p2[1]], [1.0, 1.0, 1.0]]
)
... | 31.160377 | 82 | 0.479867 |
1d8ca82d6e2a644a1b5d1d1a202b488c217e3aca | 5,813 | py | Python | docs/conf.py | ludwiglierhammer/py-cordex | 0896017ac3be444e62600921cf586b6445a2b108 | [
"MIT"
] | null | null | null | docs/conf.py | ludwiglierhammer/py-cordex | 0896017ac3be444e62600921cf586b6445a2b108 | [
"MIT"
] | null | null | null | docs/conf.py | ludwiglierhammer/py-cordex | 0896017ac3be444e62600921cf586b6445a2b108 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# cordex documentation build configuration file, created by
# sphinx-quickstart on Fri Jun 9 13:47:02 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All ... | 29.358586 | 88 | 0.681748 |
1d8cc215e0a3bba7783eedeb2bd8737f48c9a861 | 975 | py | Python | containers/spot_extraction/compiled_matlab/setup.py | JaneliaSciComp/multifish | dd328ba41d628bd4caa13637eefba91056e6c640 | [
"BSD-3-Clause"
] | 13 | 2021-02-02T04:47:45.000Z | 2022-03-02T19:41:39.000Z | containers/spot_extraction/compiled_matlab/setup.py | JaneliaSciComp/multifish | dd328ba41d628bd4caa13637eefba91056e6c640 | [
"BSD-3-Clause"
] | 16 | 2021-06-26T02:39:08.000Z | 2022-03-30T13:57:04.000Z | containers/spot_extraction/compiled_matlab/setup.py | JaneliaSciComp/multifish | dd328ba41d628bd4caa13637eefba91056e6c640 | [
"BSD-3-Clause"
] | 2 | 2021-02-16T21:09:17.000Z | 2021-12-12T12:17:14.000Z | # Copyright 2015-2017 The MathWorks, Inc.
from distutils.core import setup
from distutils.command.clean import clean
from distutils.command.install import install
class InstallRuntime(install):
# Calls the default run command, then deletes the build area
# (equivalent to "setup clean --all").
def run(sel... | 27.857143 | 75 | 0.62359 |
1d8cf203157638813acb569108daf37aa3cca35c | 4,224 | py | Python | rat-sql-gap/seq2struct/models/nl2code/encoder.py | JuruoMP/gap-exp | 2d7af8a1da2f0ff8f9d3a2c6e15cc6383c716c05 | [
"Apache-2.0"
] | null | null | null | rat-sql-gap/seq2struct/models/nl2code/encoder.py | JuruoMP/gap-exp | 2d7af8a1da2f0ff8f9d3a2c6e15cc6383c716c05 | [
"Apache-2.0"
] | null | null | null | rat-sql-gap/seq2struct/models/nl2code/encoder.py | JuruoMP/gap-exp | 2d7af8a1da2f0ff8f9d3a2c6e15cc6383c716c05 | [
"Apache-2.0"
] | null | null | null | import json
import os
import attr
import torch
from seq2struct.models import abstract_preproc
from seq2struct.models import variational_lstm
from seq2struct.utils import registry
from seq2struct.utils import vocab
@attr.s
class NL2CodeEncoderState:
state = attr.ib()
memory = attr.ib()
words = attr.ib()
... | 33.259843 | 86 | 0.572443 |
1d8cf783b603df55fd38a6485063a212dd12884b | 1,802 | py | Python | test/test_doctests.py | VIIgit/azul | bb61965f625c667979a2f255f6bc39dcafaaf40b | [
"Apache-2.0"
] | null | null | null | test/test_doctests.py | VIIgit/azul | bb61965f625c667979a2f255f6bc39dcafaaf40b | [
"Apache-2.0"
] | null | null | null | test/test_doctests.py | VIIgit/azul | bb61965f625c667979a2f255f6bc39dcafaaf40b | [
"Apache-2.0"
] | null | null | null | import doctest
import unittest
import azul
import azul.azulclient
import azul.collections
import azul.json
import azul.json_freeze
from azul.logging import configure_test_logging
from azul.modules import load_module, load_app_module
import azul.openapi
import azul.service.responseobjects.elastic_request_builder
import... | 36.04 | 104 | 0.795782 |
1d8d4fcab2d3ab969231ee638df40f8e117bcf2f | 2,862 | py | Python | cli/api.py | HarshCasper/jina | 81ab098b140b74ad1cfdfde9218cec7a40923749 | [
"Apache-2.0"
] | 1 | 2021-02-25T19:28:50.000Z | 2021-02-25T19:28:50.000Z | cli/api.py | HarshCasper/jina | 81ab098b140b74ad1cfdfde9218cec7a40923749 | [
"Apache-2.0"
] | 1 | 2021-02-27T05:56:45.000Z | 2021-02-27T05:57:03.000Z | cli/api.py | deepampatel/jina | 97f9e97a4a678a28bdeacbc7346eaf7bbd2aeb89 | [
"Apache-2.0"
] | null | null | null | __copyright__ = "Copyright (c) 2020 Jina AI Limited. All rights reserved."
__license__ = "Apache-2.0"
if False:
from argparse import Namespace
def pod(args: 'Namespace'):
"""Start a Pod"""
from jina.peapods import Pod
try:
with Pod(args) as p:
p.join()
except KeyboardInterrupt... | 26.018182 | 82 | 0.640461 |
1d8d6fee3fcad17d98d41bb74c0787f329bc688a | 4,137 | py | Python | src/pynwb/form/validate/errors.py | tjd2002/pynwb | 426109b85c2e683d96f2126286fb3369013abb8b | [
"BSD-3-Clause-LBNL"
] | 1 | 2021-04-13T20:47:36.000Z | 2021-04-13T20:47:36.000Z | src/pynwb/form/validate/errors.py | t-b/pynwb | b58e7b003247485120380360bb112bc6b22c7e60 | [
"BSD-3-Clause-LBNL"
] | null | null | null | src/pynwb/form/validate/errors.py | t-b/pynwb | b58e7b003247485120380360bb112bc6b22c7e60 | [
"BSD-3-Clause-LBNL"
] | null | null | null |
from ..utils import docval, getargs
from ..spec.spec import DtypeHelper
from numpy import dtype
__all__ = [
"Error",
"DtypeError",
"MissingError",
"ShapeError",
"MissingDataType",
]
class Error(object):
@docval({'name': 'name', 'type': str, 'doc': 'the name of the component that is erroneo... | 37.609091 | 99 | 0.595601 |
1d8d7873eed9d2151f0718585fcf9902f0a9f03f | 15,175 | py | Python | wienerschnitzelgemeinschaft/src/Christof/models/ResNet34/17/predict.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | wienerschnitzelgemeinschaft/src/Christof/models/ResNet34/17/predict.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | wienerschnitzelgemeinschaft/src/Christof/models/ResNet34/17/predict.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | import os, sys
#os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"
os.environ["CUDA_VISIBLE_DEVICES"]="0"
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import skimage.io
from skimage.transform import resize
from imgaug import augmenters as iaa
from tqdm import tqdm
import PIL
from PIL import Image... | 32.91757 | 137 | 0.644152 |
1d8d78a07c23c5121a6686509f84d0dc785320af | 2,689 | py | Python | utils/loader/inmemory_loader.py | jwc92/outlier-exposure | 9085ad59e5d47d7a198274c8d1daae2b5c43bc8e | [
"Apache-2.0"
] | null | null | null | utils/loader/inmemory_loader.py | jwc92/outlier-exposure | 9085ad59e5d47d7a198274c8d1daae2b5c43bc8e | [
"Apache-2.0"
] | null | null | null | utils/loader/inmemory_loader.py | jwc92/outlier-exposure | 9085ad59e5d47d7a198274c8d1daae2b5c43bc8e | [
"Apache-2.0"
] | null | null | null | import numpy as np
import torch
from tqdm import tqdm
from os.path import join as pjoin
from torch.utils import data
import collections
import pickle
class InMemoryDataset(data.Dataset):
def __init__(
self,
root,
n_classes,
split="train",
split_type="training",
augm... | 28.913978 | 122 | 0.59762 |
1d8d98347c06c9dfd374db1606016a007445f876 | 9,486 | py | Python | cogs/factorio.py | SuperYellowSystem/FactorioQuizzBot | 55dfea657c64dd9d92bfa9657de66159cc7e79e9 | [
"MIT"
] | 1 | 2018-04-08T16:47:02.000Z | 2018-04-08T16:47:02.000Z | cogs/factorio.py | SuperYellowSystem/FactorioQuizBot | 55dfea657c64dd9d92bfa9657de66159cc7e79e9 | [
"MIT"
] | null | null | null | cogs/factorio.py | SuperYellowSystem/FactorioQuizBot | 55dfea657c64dd9d92bfa9657de66159cc7e79e9 | [
"MIT"
] | null | null | null | # ======================================================================
# imports
# ======================================================================
import aiohttp
import bs4
import tomd
import re
import discord
from discord.ext import commands as cmds
# =======================================================... | 55.151163 | 118 | 0.481868 |
1d8db8cc45731958f4c038978eb9d759976814c1 | 2,261 | py | Python | docs/conf.py | m7salam/shortit | c575acb4e8b447ac62abdf899063357f1569e93d | [
"MIT"
] | null | null | null | docs/conf.py | m7salam/shortit | c575acb4e8b447ac62abdf899063357f1569e93d | [
"MIT"
] | 2 | 2022-03-01T00:07:15.000Z | 2022-03-02T00:17:58.000Z | docs/conf.py | m7salam/shortit | c575acb4e8b447ac62abdf899063357f1569e93d | [
"MIT"
] | null | null | null | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 35.888889 | 79 | 0.665192 |
1d8dbb328189be8a8b4c282ba47780d9e38d9362 | 1,278 | py | Python | src/training/preprocessing_pid.py | zhichul/pi-bob | b9ed7cb3614f50c51c6273665d8cd2b62dcab886 | [
"MIT"
] | null | null | null | src/training/preprocessing_pid.py | zhichul/pi-bob | b9ed7cb3614f50c51c6273665d8cd2b62dcab886 | [
"MIT"
] | null | null | null | src/training/preprocessing_pid.py | zhichul/pi-bob | b9ed7cb3614f50c51c6273665d8cd2b62dcab886 | [
"MIT"
] | null | null | null | import sys
import os
import numpy as np
import cv2
def parseData(path):
res = {"v":[]}
for file in os.listdir(path):
img = cv2.imread(os.path.join(path,file),0)
decision = file.split("_")[0]
try:
t = [float(decision)]
res["v"].append((tuple(np.multiply(1/255,np.ndarray.flatten(img)).tolist()),tuple(t)))... | 27.782609 | 89 | 0.63302 |
1d8e0ddd961d9c066fd209d74a285f3d1ecc8dea | 369 | py | Python | sfs/ops/__init__.py | rhino2rhonda/vfs | 8f55ae36d34871fc649092f2a28b91465a495341 | [
"MIT"
] | null | null | null | sfs/ops/__init__.py | rhino2rhonda/vfs | 8f55ae36d34871fc649092f2a28b91465a495341 | [
"MIT"
] | null | null | null | sfs/ops/__init__.py | rhino2rhonda/vfs | 8f55ae36d34871fc649092f2a28b91465a495341 | [
"MIT"
] | null | null | null | import os
import pkgutil
import importlib
_ops_module_prefix = 'ops_'
def import_ops():
"""Import all CLI modules in the current package"""
for _, name, ispkg in pkgutil.iter_modules([os.path.dirname(__file__)]):
if ispkg:
continue
if name.startswith(_ops_module_prefix):
... | 24.6 | 76 | 0.669377 |
1d8e1a55e74a9aec40d542509f361436af1ebde5 | 3,063 | py | Python | lesson-6/restaurant.py | LindsayYoung/python-class | 63821805dab826ab4c8b030c3cbdd6835435a3ce | [
"MIT"
] | 18 | 2015-01-08T14:59:55.000Z | 2021-03-01T16:11:12.000Z | lesson-6/restaurant.py | nickom/python-class | b9c6ae7e4292857b861613a2d6b0bfb2dffc7f36 | [
"MIT"
] | null | null | null | lesson-6/restaurant.py | nickom/python-class | b9c6ae7e4292857b861613a2d6b0bfb2dffc7f36 | [
"MIT"
] | 16 | 2015-03-20T12:21:51.000Z | 2020-10-21T15:40:44.000Z | class Restaurant(object):
def __init__(self, name, menu):
self.name = name
self.menu = menu
self.items_ordered = []
def print_menu(self):
""" Print the entire menu. Example:
PB&J ... 1.99
Cheeseburger ... 3.75
"""
# YOUR CODE HERE
... | 26.868421 | 85 | 0.541299 |
1d8e704ad17ce0e3b86b05ee0e78915470e9f331 | 2,149 | py | Python | python-client/test/test_error.py | gabisurita/kinto-codegen-tutorial | b5921ec603df031f9ff25683b7a3fbed5af79094 | [
"MIT"
] | 2 | 2017-03-02T13:12:24.000Z | 2017-10-22T10:31:09.000Z | python-client/test/test_error.py | gabisurita/kinto-codegen-tutorial | b5921ec603df031f9ff25683b7a3fbed5af79094 | [
"MIT"
] | null | null | null | python-client/test/test_error.py | gabisurita/kinto-codegen-tutorial | b5921ec603df031f9ff25683b7a3fbed5af79094 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
kinto
Kinto is a minimalist JSON storage service with synchronisation and sharing abilities. It is meant to be easy to use and easy to self-host. **Limitations of this OpenAPI specification:** 1. Validation on OR clauses is not supported (e.g. provide `data` or `permissions` in patch ... | 39.796296 | 938 | 0.723592 |
1d8e74acc32da96ffb0a03661fa625cb981bfc06 | 784 | py | Python | alipay/aop/api/response/AlipayEbppEdeductForecastQueryResponse.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/AlipayEbppEdeductForecastQueryResponse.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/AlipayEbppEdeductForecastQueryResponse.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 AlipayEbppEdeductForecastQueryResponse(AlipayResponse):
def __init__(self):
super(AlipayEbppEdeductForecastQueryResponse, self).__init__()
self._forecast_expect = Non... | 30.153846 | 111 | 0.739796 |
1d8ec1cef52000ca85c1bd359d695e2cdc3583f0 | 7,907 | py | Python | model.py | ShiChenAI/cnn_implementation | 9e15179b2bc3b9bd4a55c825873af8ebaf0caef3 | [
"Apache-2.0"
] | 1 | 2018-12-19T10:40:54.000Z | 2018-12-19T10:40:54.000Z | model.py | ShiChenAI/cnn_implementation | 9e15179b2bc3b9bd4a55c825873af8ebaf0caef3 | [
"Apache-2.0"
] | null | null | null | 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
import re
import tensorflow as tf
import config
FLAGS = tf.app.flags.FLAGS
tf.app.flags.DEFINE_integer('batch_size',
int(config.get_configs('global.conf', 'dataset', 'batch_size'))... | 35.299107 | 133 | 0.657772 |
1d8efc48fbe52c2faf49d9f8456a649f8eed10af | 566 | py | Python | tests/test_Simulation.py | ZachGlassman/simtools | 8da3ae2dfa2b438272ee6c5e7c431ac6865e07ca | [
"MIT"
] | null | null | null | tests/test_Simulation.py | ZachGlassman/simtools | 8da3ae2dfa2b438272ee6c5e7c431ac6865e07ca | [
"MIT"
] | null | null | null | tests/test_Simulation.py | ZachGlassman/simtools | 8da3ae2dfa2b438272ee6c5e7c431ac6865e07ca | [
"MIT"
] | null | null | null | import unittest
from simtools.Simulation import Simulation, parse_time_diff
class test_parse_time_diff(unittest.TestCase):
def test_seconds(self):
self.assertEqual(parse_time_diff(1), "1.00 s")
def test_ms(self):
self.assertEqual(parse_time_diff(.01), "10.00 ms")
def test_min(self):
... | 24.608696 | 59 | 0.696113 |
1d8f66a2c69f814b57d56fdce40f58183456db84 | 32,929 | py | Python | sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_system_topic_event_subscriptions_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-01-24T08:54:57.000Z | 2022-01-24T08:54:57.000Z | sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_system_topic_event_subscriptions_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_system_topic_event_subscriptions_operations.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 ... | 48.282991 | 291 | 0.689514 |
1d8f6a678f5ef9a337268c62566391b4533b2f6a | 705 | py | Python | examples/example_daemon.py | M-o-a-T/xknx | 0cf07a01a44c76478d916884437f3f4769a4ddd5 | [
"MIT"
] | null | null | null | examples/example_daemon.py | M-o-a-T/xknx | 0cf07a01a44c76478d916884437f3f4769a4ddd5 | [
"MIT"
] | null | null | null | examples/example_daemon.py | M-o-a-T/xknx | 0cf07a01a44c76478d916884437f3f4769a4ddd5 | [
"MIT"
] | null | null | null | """Example for daemon mode within XKNX."""
import asyncio
from xknx import XKNX
from xknx.devices import Switch
async def device_updated_cb(device):
"""Do something with the updated device."""
print("Callback received from {0}".format(device.name))
async def main():
"""Connect to KNX/IP device and list... | 24.310345 | 82 | 0.670922 |
1d8f9d5e67eb1739cc8f2634ddcbca07d787d956 | 2,889 | py | Python | day3/day3.py | jmcph4/advent2017 | f5f53e5a771b5b40b9fb8c5a2ea4e89d06279d32 | [
"MIT"
] | null | null | null | day3/day3.py | jmcph4/advent2017 | f5f53e5a771b5b40b9fb8c5a2ea4e89d06279d32 | [
"MIT"
] | null | null | null | day3/day3.py | jmcph4/advent2017 | f5f53e5a771b5b40b9fb8c5a2ea4e89d06279d32 | [
"MIT"
] | null | null | null | def taxicab_distance(a, b):
"""
Returns the Manhattan distance of the given points
"""
n = len(a)
d = 0
for i in range(n):
d += abs(a[i] - b[i])
return d
PERIOD = 2 # the period of the sequence
def sequ():
"""
Generates the sequence corresponding to the number of steps to... | 20.0625 | 79 | 0.523364 |
1d8fea951faab6b6be56e761928162fae24c0926 | 28,301 | py | Python | pandas/core/computation/expr.py | MaxVanDeursen/pandas | 9821b77de692716d7c2b62db1a68cac9ffc456c3 | [
"BSD-3-Clause"
] | 1 | 2019-03-25T09:31:34.000Z | 2019-03-25T09:31:34.000Z | pandas/core/computation/expr.py | MaxVanDeursen/pandas | 9821b77de692716d7c2b62db1a68cac9ffc456c3 | [
"BSD-3-Clause"
] | null | null | null | pandas/core/computation/expr.py | MaxVanDeursen/pandas | 9821b77de692716d7c2b62db1a68cac9ffc456c3 | [
"BSD-3-Clause"
] | null | null | null | """:func:`~pandas.eval` parsers
"""
import ast
from functools import partial
import itertools as it
import operator
import tokenize
import numpy as np
from pandas.compat import StringIO, lmap, reduce, string_types
import pandas as pd
from pandas import compat
from pandas.core import common as com
from pandas.core.b... | 34.5978 | 79 | 0.595421 |
1d8fede452bd714a43529494c59258541644a9c2 | 1,501 | py | Python | agent/f5/oslbaasv1agent/drivers/bigip/fdb_connector.py | Sinan828/oslbaasv1_for_cmcc | 52318460b704ed5f08491b482b47aae61bf166ca | [
"Apache-2.0"
] | null | null | null | agent/f5/oslbaasv1agent/drivers/bigip/fdb_connector.py | Sinan828/oslbaasv1_for_cmcc | 52318460b704ed5f08491b482b47aae61bf166ca | [
"Apache-2.0"
] | null | null | null | agent/f5/oslbaasv1agent/drivers/bigip/fdb_connector.py | Sinan828/oslbaasv1_for_cmcc | 52318460b704ed5f08491b482b47aae61bf166ca | [
"Apache-2.0"
] | null | null | null | """ Classes and functions for interfacing with an external
L2 forwarding database """
# Copyright 2014 F5 Networks Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.a... | 34.906977 | 74 | 0.692205 |
1d902208a5c61a0ab772888e5707747d673c9357 | 47,778 | py | Python | escriptcore/py_src/modelframe.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | null | null | null | escriptcore/py_src/modelframe.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | null | null | null | escriptcore/py_src/modelframe.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2003-2020 by The University of Queensland
# http://www.uq.edu.au
#
# Primary Business: Queensland, Australia
# Licensed under the Apache License, version 2.0
# http://www.apache.org/licenses/LICENSE... | 34.249462 | 156 | 0.586567 |
1d903dd0809cefdd124958f09d64b4845931d7fc | 54,587 | py | Python | ginga/qtw/Widgets.py | Cadair/ginga | 5afdd8824f27c7ae7d8d82b5013b0ff0068bd8b8 | [
"BSD-3-Clause"
] | null | null | null | ginga/qtw/Widgets.py | Cadair/ginga | 5afdd8824f27c7ae7d8d82b5013b0ff0068bd8b8 | [
"BSD-3-Clause"
] | null | null | null | ginga/qtw/Widgets.py | Cadair/ginga | 5afdd8824f27c7ae7d8d82b5013b0ff0068bd8b8 | [
"BSD-3-Clause"
] | null | null | null | #
# Widgets.py -- wrapped Qt widgets and convenience functions
#
# Eric Jeschke (eric@naoj.org)
#
# Copyright (c) Eric R. Jeschke. All rights reserved.
# This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
#
import os.path
from functools import reduce
from ginga.q... | 29.33208 | 113 | 0.603605 |
1d90432d25b35875b01e97fc7239e6afdb35c337 | 56,072 | py | Python | src/scripts/setup_schnarc.py | smausenberger/SchNarc | 727dedf300aa79c01217822c3a9a4f4ae96ede60 | [
"MIT"
] | null | null | null | src/scripts/setup_schnarc.py | smausenberger/SchNarc | 727dedf300aa79c01217822c3a9a4f4ae96ede60 | [
"MIT"
] | null | null | null | src/scripts/setup_schnarc.py | smausenberger/SchNarc | 727dedf300aa79c01217822c3a9a4f4ae96ede60 | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
# Interactive script for the setup of dynamics calculations for SHARC
#
# usage: python setup_traj.py
import copy
import math
import sys
import re
import os
import stat
import shutil
import datetime
import random
from optparse import OptionParser
import readline
import time
from socket import ... | 33.656663 | 356 | 0.576402 |
1d905815a541f6f47332bfec6ff7b3c9d46a1a07 | 7,553 | py | Python | sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_resource_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_resource_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_resource_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 ... | 49.366013 | 193 | 0.63723 |
1d905c1a5b0f0db0cbae3695a5a560861461f9a7 | 3,064 | py | Python | language-modeling/fast_transformers/attention/.ipynb_checkpoints/exact_topk_attention-checkpoint.py | minhtannguyen/transformer-mgk | 304ebf3781b1eb4aeef93f2757319775d2fcdbc4 | [
"CC0-1.0"
] | 5 | 2021-11-06T16:10:31.000Z | 2021-12-25T19:47:42.000Z | language-modeling/fast_transformers/attention/.ipynb_checkpoints/exact_topk_attention-checkpoint.py | minhtannguyen/transformer-mgk | 304ebf3781b1eb4aeef93f2757319775d2fcdbc4 | [
"CC0-1.0"
] | null | null | null | language-modeling/fast_transformers/attention/.ipynb_checkpoints/exact_topk_attention-checkpoint.py | minhtannguyen/transformer-mgk | 304ebf3781b1eb4aeef93f2757319775d2fcdbc4 | [
"CC0-1.0"
] | 2 | 2021-11-30T03:36:54.000Z | 2021-12-25T19:49:58.000Z | """Implement the oracle top-k attention. The top-k keys are exact ones.
MultiHeadAttention module. Note that this module is to be used in conjuction
with the AttentionLayer in order to work."""
from math import sqrt
import torch
from torch.nn import Dropout, Module
from ..attention_registry import AttentionRegistry,... | 36.915663 | 77 | 0.626958 |
1d906aaed4cd3e8f555c7faaf1c442bf220295d0 | 2,305 | py | Python | src/app/externalOutages/updateRealTimeOutage.py | nagasudhirpulla/wrldc_codebook | 8fbc795074e16e2012b29ae875b99aa721a7f021 | [
"MIT"
] | null | null | null | src/app/externalOutages/updateRealTimeOutage.py | nagasudhirpulla/wrldc_codebook | 8fbc795074e16e2012b29ae875b99aa721a7f021 | [
"MIT"
] | 21 | 2021-01-08T18:03:32.000Z | 2021-02-02T16:17:34.000Z | src/app/externalOutages/updateRealTimeOutage.py | nagasudhirpulla/wrldc_codebook | 8fbc795074e16e2012b29ae875b99aa721a7f021 | [
"MIT"
] | null | null | null | import datetime as dt
import cx_Oracle
from src.app.externalOutages.getReasonId import getReasonId
from typing import List, Tuple, Any
import datetime as dt
def updateRealTimeOutage(pwcDbConnStr: str, rtoId: int, outageDt: dt.datetime,
outageTypeId: int, reason: str, outageTagId: int) -> bool... | 32.928571 | 83 | 0.636443 |
1d906c929f751a303f0a4e4b139c76a599da3dce | 1,964 | py | Python | create_tables.py | weiwei-liu/data-modelling-with-postgres | 6f9fd4dbc95b759fc8bc409557a440121491c520 | [
"MIT"
] | null | null | null | create_tables.py | weiwei-liu/data-modelling-with-postgres | 6f9fd4dbc95b759fc8bc409557a440121491c520 | [
"MIT"
] | null | null | null | create_tables.py | weiwei-liu/data-modelling-with-postgres | 6f9fd4dbc95b759fc8bc409557a440121491c520 | [
"MIT"
] | null | null | null | import psycopg2
from sql_queries import create_table_queries, drop_table_queries
def create_database():
"""
- Creates and connects to the sparkifydb
- Returns the connection and cursor to sparkifydb
"""
# connect to default database
try:
conn = psycopg2.connect("host=127.0.0.1 dbn... | 24.55 | 95 | 0.643585 |
1d90b9168d0d871fdafdbd91c502816c1eb26df8 | 1,021 | py | Python | sdks/python/test/test_JiraConnectionSecretRequest.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | null | null | null | sdks/python/test/test_JiraConnectionSecretRequest.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 6 | 2019-10-23T06:38:53.000Z | 2022-01-22T07:57:58.000Z | sdks/python/test/test_JiraConnectionSecretRequest.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.525 | 113 | 0.745348 |
1d90f529e64aac625d546fb2502b6722078ff690 | 17,507 | py | Python | gwd/gwd.py | 3juholee/project_h2 | bf88c10186e1b89ea239c0bf3eda5c411207393b | [
"MIT"
] | null | null | null | gwd/gwd.py | 3juholee/project_h2 | bf88c10186e1b89ea239c0bf3eda5c411207393b | [
"MIT"
] | null | null | null | gwd/gwd.py | 3juholee/project_h2 | bf88c10186e1b89ea239c0bf3eda5c411207393b | [
"MIT"
] | null | null | null | """
1/9/2016 (new ver6_gw+dmft.py)
updated: --mu / --nom options
"""
import time
import sys
import os
import argparse
from scipy import *
from scipy import linalg,integrate,interpolate
from PyQuante import *
from PyQuante.LA2 import geigh,trace2
from PyQuante.Ints import get2JmK,getbasis,getints, fetch_jints, fetch_ki... | 28.328479 | 102 | 0.642886 |
1d91029e0181d7d3e8698ce9d467ac8adec18ed2 | 38,119 | py | Python | converter/nnef_converters/tf_converters/tf_to_nnef/tf_to_nnef.py | asdor/NNEF-Tools | e84c3db29c1bffbd1938d40a10765badc0848606 | [
"Apache-2.0"
] | null | null | null | converter/nnef_converters/tf_converters/tf_to_nnef/tf_to_nnef.py | asdor/NNEF-Tools | e84c3db29c1bffbd1938d40a10765badc0848606 | [
"Apache-2.0"
] | null | null | null | converter/nnef_converters/tf_converters/tf_to_nnef/tf_to_nnef.py | asdor/NNEF-Tools | e84c3db29c1bffbd1938d40a10765badc0848606 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2017 The Khronos Group Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | 40.725427 | 119 | 0.641675 |
1d9126b36f517a740da01a8ab63e220a630acbbe | 13,471 | py | Python | sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/aio/operations/_data_exports_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/aio/operations/_data_exports_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/loganalytics/azure-mgmt-loganalytics/azure/mgmt/loganalytics/aio/operations/_data_exports_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 ... | 44.903333 | 221 | 0.678272 |
1d9130824552becf626564e6b3ba715a866793b8 | 1,129 | py | Python | leetcode/medium/1452-fav_companies.py | shubhamoli/practice | 5a24fdeb6e5f43b821ef0510fe3b343ddda18f22 | [
"MIT"
] | 1 | 2020-02-25T10:32:27.000Z | 2020-02-25T10:32:27.000Z | leetcode/medium/1452-fav_companies.py | shubhamoli/practice | 5a24fdeb6e5f43b821ef0510fe3b343ddda18f22 | [
"MIT"
] | null | null | null | leetcode/medium/1452-fav_companies.py | shubhamoli/practice | 5a24fdeb6e5f43b821ef0510fe3b343ddda18f22 | [
"MIT"
] | null | null | null | """
Leetcode #1452
"""
from typing import List
class Solution:
def peopleIndexes(self, favoriteCompanies: List[List[str]]) -> List[int]:
if not favoriteCompanies or not favoriteCompanies[0]:
return []
store = {i: set(v) for i, v in enumerate(favoriteCompanies)}
N = len(fa... | 26.255814 | 100 | 0.469442 |
1d9140bd33fb078d1bfd2d6231763b19bed995bc | 740 | py | Python | setup.py | Bonifatius94/sc2sim | ac765f826e2465354aa4b619ab84d52249eec474 | [
"MIT"
] | null | null | null | setup.py | Bonifatius94/sc2sim | ac765f826e2465354aa4b619ab84d52249eec474 | [
"MIT"
] | null | null | null | setup.py | Bonifatius94/sc2sim | ac765f826e2465354aa4b619ab84d52249eec474 | [
"MIT"
] | null | null | null | from setuptools import setup
def load_pip_dependency_list():
with open('./requirements.txt', 'r', encoding='utf-8') as file:
return file.read().splitlines()
def load_readme_desc():
with open("README.md", "r", encoding="utf-8") as readme_file:
return readme_file.read()
setup(
name="sc2sim"... | 30.833333 | 81 | 0.7 |
1d9148f46278b2873dfae2687ba24b33012f33e0 | 15,449 | py | Python | topi/python/topi/cuda/sort.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | 48 | 2020-07-29T18:09:23.000Z | 2021-10-09T01:53:33.000Z | topi/python/topi/cuda/sort.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | 9 | 2021-04-02T02:28:07.000Z | 2022-03-26T18:23:59.000Z | topi/python/topi/cuda/sort.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... | 38.430348 | 138 | 0.572723 |
1d9157363e91aa9d7fc483c426b1520e30f32b97 | 2,542 | py | Python | setup.py | wfscheper/epdb | 903fc31cd5944d6f7c5ca57ea2aef5367c51309d | [
"MIT"
] | 63 | 2015-05-12T20:58:04.000Z | 2022-03-10T10:34:57.000Z | setup.py | wfscheper/epdb | 903fc31cd5944d6f7c5ca57ea2aef5367c51309d | [
"MIT"
] | 10 | 2015-09-28T02:23:29.000Z | 2020-12-05T09:54:38.000Z | setup.py | wfscheper/epdb | 903fc31cd5944d6f7c5ca57ea2aef5367c51309d | [
"MIT"
] | 15 | 2015-05-04T09:49:45.000Z | 2021-03-08T14:35:53.000Z | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
#
# Copyright (c) SAS Institute, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the r... | 35.802817 | 79 | 0.662864 |
1d9163136861c8e1048f733f3e18a7a6c807fc79 | 1,302 | py | Python | wimblepong/__init__.py | Sopitta/RL-Pong | 8b389856d0492dac1d0fc5f4d5459809948fb14a | [
"MIT"
] | null | null | null | wimblepong/__init__.py | Sopitta/RL-Pong | 8b389856d0492dac1d0fc5f4d5459809948fb14a | [
"MIT"
] | null | null | null | wimblepong/__init__.py | Sopitta/RL-Pong | 8b389856d0492dac1d0fc5f4d5459809948fb14a | [
"MIT"
] | null | null | null | import gym
from wimblepong.wimblepong import Wimblepong
from wimblepong.simple_ai import SimpleAi
from wimblepong.bad_ai import BadAi
from wimblepong.some_ai import SomeAi
gym.envs.register("WimblepongVisualMultiplayer-v0",
entry_point="wimblepong:Wimblepong",
max_episode_steps=None,
kwargs={"o... | 35.189189 | 55 | 0.711982 |
1d91680bf205f2978ce00c811c849b8b832d068b | 10,584 | py | Python | chroma/benchmark.py | NuTufts/chroma_lartpc | ea6d1a62d22eeeaac069efdef1068a56be683fcc | [
"BSD-3-Clause"
] | null | null | null | chroma/benchmark.py | NuTufts/chroma_lartpc | ea6d1a62d22eeeaac069efdef1068a56be683fcc | [
"BSD-3-Clause"
] | null | null | null | chroma/benchmark.py | NuTufts/chroma_lartpc | ea6d1a62d22eeeaac069efdef1068a56be683fcc | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
import numpy as np
import pycuda.driver as cuda
from pycuda import gpuarray as ga
import time
from uncertainties import ufloat
import sys
import itertools
from chroma import gpu
from chroma import event
from chroma import sample
from chroma import generator
from chroma import tools
from chroma.tr... | 37.8 | 174 | 0.622732 |
1d9179ed0edd30fd597deb86dbd1b103b2657c9c | 11,125 | py | Python | lenslikelihood/power_spectrum_util.py | dangilman/lenslikelihood | 1490ee9756b4d2ed108a2478977609bbe0ba2e17 | [
"MIT"
] | null | null | null | lenslikelihood/power_spectrum_util.py | dangilman/lenslikelihood | 1490ee9756b4d2ed108a2478977609bbe0ba2e17 | [
"MIT"
] | null | null | null | lenslikelihood/power_spectrum_util.py | dangilman/lenslikelihood | 1490ee9756b4d2ed108a2478977609bbe0ba2e17 | [
"MIT"
] | null | null | null | import numpy as np
from scipy.interpolate import interp1d
import os
import pickle
import inspect
local_path = inspect.getfile(inspect.currentframe())[0:-22]
def _load_theory_power_spectrum():
_pk_galacticus = np.loadtxt(local_path + 'pk_galacticus.txt')
k_galacticus, tk_galacitucs, pk_galacticus = _pk_galact... | 38.362069 | 132 | 0.63964 |
1d9186e2318f5382d095cd3f53e3f8e7ab7f93e6 | 486 | py | Python | sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/_version.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-01-24T08:54:57.000Z | 2022-01-24T08:54:57.000Z | sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/_version.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/_version.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 ... | 48.6 | 94 | 0.526749 |
1d9191f0da86d242e006e8468df0c491d70d8dee | 309 | py | Python | abo/signals.py | kralla/django-abo | e0fa98ec44d5ea31ff2313ca0f96ff12d6aa26e4 | [
"BSD-3-Clause"
] | null | null | null | abo/signals.py | kralla/django-abo | e0fa98ec44d5ea31ff2313ca0f96ff12d6aa26e4 | [
"BSD-3-Clause"
] | null | null | null | abo/signals.py | kralla/django-abo | e0fa98ec44d5ea31ff2313ca0f96ff12d6aa26e4 | [
"BSD-3-Clause"
] | null | null | null | from django.dispatch import Signal
new_subscription = Signal(providing_args=['subscription'])
new_subscription.__doc__ = """Sent after creating a subscription"""
payment_error = Signal(providing_args=['error_code', 'exception'])
payment_error.__doc__ = """Is sent whenever an error occurs during payment"""
| 38.625 | 77 | 0.786408 |
1d91a831f36be7a716ce48830681c713c789a9b6 | 2,038 | py | Python | octopus/public/views.py | quaintm/octopus | 95a732207ee5f43cd0065d8ea6c643cbf3df2d61 | [
"BSD-3-Clause"
] | null | null | null | octopus/public/views.py | quaintm/octopus | 95a732207ee5f43cd0065d8ea6c643cbf3df2d61 | [
"BSD-3-Clause"
] | null | null | null | octopus/public/views.py | quaintm/octopus | 95a732207ee5f43cd0065d8ea6c643cbf3df2d61 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
'''Public section, including homepage and signup.'''
from flask import (Blueprint, request, render_template, flash, url_for,
redirect)
from flask.ext.login import login_user, login_required, logout_user
from octopus.extensions import login_manager, nav
from octopus.models imp... | 29.970588 | 78 | 0.670265 |
1d91b303127f05f3337c6a52357dd319f31076d0 | 281 | py | Python | problems/1018_binary-prefix-divisible-by-5.py | okuda-seminar/review_leetcode | 9774dbb85b836c3ebab4b24d77774ed05abb7a32 | [
"MIT"
] | null | null | null | problems/1018_binary-prefix-divisible-by-5.py | okuda-seminar/review_leetcode | 9774dbb85b836c3ebab4b24d77774ed05abb7a32 | [
"MIT"
] | 170 | 2021-05-11T14:03:05.000Z | 2021-11-30T14:22:52.000Z | problems/1018_binary-prefix-divisible-by-5.py | ryuji0123/review_leetcode | 9774dbb85b836c3ebab4b24d77774ed05abb7a32 | [
"MIT"
] | null | null | null | # n = A.length
# time = O(n)
# space = O(n)
# done time = 30m
class Solution:
def prefixesDivBy5(self, A: List[int]) -> List[bool]:
num = 0
ret = []
for a in A:
num = (num << 1) + a
ret.append(num % 5 == 0)
return ret
| 17.5625 | 57 | 0.451957 |
1d91decd398e12e136e7726a9bb8749eb42be7c0 | 81 | py | Python | app/api/models/__init__.py | antomor/flask-vue | 35798de49c5d4d06d25f5555c4b102d1e1e3bb35 | [
"MIT"
] | 7 | 2018-03-26T07:15:25.000Z | 2021-04-12T05:51:58.000Z | app/api/models/__init__.py | antomor/flask-vue | 35798de49c5d4d06d25f5555c4b102d1e1e3bb35 | [
"MIT"
] | null | null | null | app/api/models/__init__.py | antomor/flask-vue | 35798de49c5d4d06d25f5555c4b102d1e1e3bb35 | [
"MIT"
] | 1 | 2020-07-10T15:58:12.000Z | 2020-07-10T15:58:12.000Z | from .risk_types import RiskType, RiskField, RiskFieldType, RiskFieldEnumValue
| 20.25 | 78 | 0.839506 |
1d9204eeaf67e6495b35ae78b607957f7e86afd2 | 733 | py | Python | data/scripts/prepare_cityscapes_25k.py | valeoai/SemanticPalette | a1b02a384c09881d6f1ca1a0c0ebfd87278c3d7d | [
"Apache-2.0"
] | 17 | 2021-07-15T13:22:31.000Z | 2022-02-15T05:37:51.000Z | data/scripts/prepare_cityscapes_25k.py | valeoai/SemanticPalette | a1b02a384c09881d6f1ca1a0c0ebfd87278c3d7d | [
"Apache-2.0"
] | null | null | null | data/scripts/prepare_cityscapes_25k.py | valeoai/SemanticPalette | a1b02a384c09881d6f1ca1a0c0ebfd87278c3d7d | [
"Apache-2.0"
] | 3 | 2021-07-16T09:25:10.000Z | 2022-01-11T12:36:28.000Z | import argparse
from glob import glob
import os
from PIL import Image
import numpy as np
from tqdm import tqdm
def main(args):
prepare_cityscapes_25k(args.data_root)
def prepare_cityscapes_25k(data_root):
sem_paths = glob(os.path.join(data_root, '**/*_leftImg8bit.png'), recursive=True)
for sem_path in tqd... | 33.318182 | 85 | 0.717599 |
1d9222cff8cb6b2452d960dbd906227ae0440eac | 292 | py | Python | Chapter 2/02/recipe15_all.py | robert0714/Python-Testing-Cookbook-Second-Edition | c7c5d59e42e9ca2874faf12a6dd201736a45ca83 | [
"MIT"
] | null | null | null | Chapter 2/02/recipe15_all.py | robert0714/Python-Testing-Cookbook-Second-Edition | c7c5d59e42e9ca2874faf12a6dd201736a45ca83 | [
"MIT"
] | null | null | null | Chapter 2/02/recipe15_all.py | robert0714/Python-Testing-Cookbook-Second-Edition | c7c5d59e42e9ca2874faf12a6dd201736a45ca83 | [
"MIT"
] | null | null | null | import recipe11
import recipe12
import recipe13
import recipe14
class Recipe11Test(recipe11.ShoppingCartTest):
pass
class Recipe12Test(recipe12.ShoppingCartTest):
pass
class Recipe13Test(recipe13.ShoppingCartTest):
pass
class Recipe14Test(recipe14.ShoppingCartTest):
pass
| 17.176471 | 46 | 0.808219 |
1d9293a936bd6a2b9b950b6a6bb4a6f54dadf8e4 | 570 | py | Python | occultquadpython/ellpic_bulirsch.py | aditya-sengupta/tesscomp-prototyping | 93da86cd139c240ba5f59f187bcbc47e899c3519 | [
"MIT"
] | null | null | null | occultquadpython/ellpic_bulirsch.py | aditya-sengupta/tesscomp-prototyping | 93da86cd139c240ba5f59f187bcbc47e899c3519 | [
"MIT"
] | null | null | null | occultquadpython/ellpic_bulirsch.py | aditya-sengupta/tesscomp-prototyping | 93da86cd139c240ba5f59f187bcbc47e899c3519 | [
"MIT"
] | null | null | null | # Computes the complete elliptical integral of the third kind using
# the algorithm of Bulirsch (1965):
def ellpic_bulirsch(n,k):
kc=sqrt(1.-k^2)
p=n+1.
if(p.min < 0.): print 'Negative p'
m0=1
c=1
p=sqrt(p)
d=1./p
e=kc
while err > 1.e-8:
f = c
c = d/p+c
g =... | 18.387097 | 67 | 0.424561 |
1d929ec6c894f7baca7bc8b572e0f9f262d3479b | 1,015 | py | Python | MahTweets/Scripts/export columns.py | shiftkey/MahTweets.LawrenceHargrave | 808f20a2c9223943499a2802af3d6ac5c445cd9f | [
"MS-PL"
] | 2 | 2016-01-25T14:43:00.000Z | 2021-11-24T00:38:42.000Z | MahTweets/Scripts/export columns.py | shiftkey/MahTweets.LawrenceHargrave | 808f20a2c9223943499a2802af3d6ac5c445cd9f | [
"MS-PL"
] | null | null | null | MahTweets/Scripts/export columns.py | shiftkey/MahTweets.LawrenceHargrave | 808f20a2c9223943499a2802af3d6ac5c445cd9f | [
"MS-PL"
] | 2 | 2016-01-25T14:43:02.000Z | 2021-11-24T00:38:33.000Z | import clr
clr.AddReference('MahTweets.Core')
clr.AddReference('MahTweets.UI')
clr.AddReference('System.Windows.Forms')
clr.AddReference('System.Drawing')
clr.AddReference("Newtonsoft.Json")
from System.Windows.Forms import DialogResult, SaveFileDialog
from MahTweets.Core.Filters import *
from Newtonsoft.Json import *... | 26.710526 | 62 | 0.758621 |
1d92a01266d5f49a3c59fe22426ee310d4013c78 | 1,395 | py | Python | ucscsdk/__init__.py | CiscoUcs/ucscsdk | b582df77e3cf8bc4c48347e3d67f8cffa62f78c4 | [
"Apache-2.0"
] | 9 | 2016-12-22T08:39:25.000Z | 2019-09-10T15:36:19.000Z | ucscsdk/__init__.py | CiscoUcs/ucscsdk | b582df77e3cf8bc4c48347e3d67f8cffa62f78c4 | [
"Apache-2.0"
] | 10 | 2017-01-31T06:59:56.000Z | 2021-11-09T09:14:37.000Z | ucscsdk/__init__.py | CiscoUcs/ucscsdk | b582df77e3cf8bc4c48347e3d67f8cffa62f78c4 | [
"Apache-2.0"
] | 13 | 2016-11-14T07:42:58.000Z | 2022-02-10T17:32:05.000Z | # Copyright 2015 Cisco Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | 26.826923 | 92 | 0.722581 |
1d92a8eaea874caebf6f23451a7b7a331da12ee3 | 10,142 | py | Python | hacksoc_org/filters.py | AaronC81/hacksoc.org | 796ec00091a416bd40279aae7f9fc9f301040997 | [
"Apache-1.1"
] | 9 | 2015-09-28T21:14:03.000Z | 2021-08-11T19:45:04.000Z | hacksoc_org/filters.py | AaronC81/hacksoc.org | 796ec00091a416bd40279aae7f9fc9f301040997 | [
"Apache-1.1"
] | 105 | 2017-01-01T23:43:43.000Z | 2022-03-21T14:31:43.000Z | hacksoc_org/filters.py | AaronC81/hacksoc.org | 796ec00091a416bd40279aae7f9fc9f301040997 | [
"Apache-1.1"
] | 40 | 2015-08-06T23:41:21.000Z | 2021-12-16T00:22:47.000Z | """
Function definitions for custom Jinja filters and functions.
Functions are decorated and add themselves to the Flask context at import
time. This file must be imported after hacksoc_org.app is defined.
"""
import datetime
from flask import get_template_attribute
import yaml
from datetime import date... | 28.894587 | 98 | 0.639815 |
1d92a9c34c675dac06035f843c7646b376107402 | 3,726 | py | Python | build_time/src/cff_serializer.py | moyogo/tachyfont | 05c8b3e7357e7a13af37ef81b719a0ff749105a5 | [
"Apache-2.0"
] | null | null | null | build_time/src/cff_serializer.py | moyogo/tachyfont | 05c8b3e7357e7a13af37ef81b719a0ff749105a5 | [
"Apache-2.0"
] | null | null | null | build_time/src/cff_serializer.py | moyogo/tachyfont | 05c8b3e7357e7a13af37ef81b719a0ff749105a5 | [
"Apache-2.0"
] | null | null | null | """
Copyright 2014 Google 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 law or ... | 31.05 | 96 | 0.671498 |
1d92cea6edc92eab92de84af81adfcd7fdc9309a | 1,367 | py | Python | pait/util/_func_sig.py | so1n/pait | dff33526bfaa5f801cbeff9907b89dfc9a091c71 | [
"Apache-2.0"
] | 19 | 2020-08-26T13:46:33.000Z | 2022-02-22T07:48:29.000Z | pait/util/_func_sig.py | so1n/pait | dff33526bfaa5f801cbeff9907b89dfc9a091c71 | [
"Apache-2.0"
] | 1 | 2021-06-06T17:45:54.000Z | 2021-06-06T17:45:54.000Z | pait/util/_func_sig.py | so1n/pait | dff33526bfaa5f801cbeff9907b89dfc9a091c71 | [
"Apache-2.0"
] | 1 | 2022-01-21T20:25:33.000Z | 2022-01-21T20:25:33.000Z | import inspect
import sys
from dataclasses import dataclass
from typing import Callable, Dict, ForwardRef, List, Optional, Type
@dataclass()
class FuncSig:
"""func inspect.Signature model"""
func: Callable
sig: "inspect.Signature"
param_list: List["inspect.Parameter"]
cbv_class: Optional[Type] = ... | 31.790698 | 118 | 0.678859 |
1d92f08f63e9e2dc22c795282a4813917c6216f3 | 505 | py | Python | mmdet3d/core/post_processing/__init__.py | BOURSa/mmdetection3d | 27d0001e873b3102a828a27e1372873fcf81ed7e | [
"Apache-2.0"
] | 12 | 2021-03-17T09:07:18.000Z | 2022-01-21T01:37:42.000Z | mmdet3d/core/post_processing/__init__.py | BOURSa/mmdetection3d | 27d0001e873b3102a828a27e1372873fcf81ed7e | [
"Apache-2.0"
] | 1 | 2020-08-11T05:44:29.000Z | 2020-08-11T05:44:29.000Z | mmdet3d/core/post_processing/__init__.py | BOURSa/mmdetection3d | 27d0001e873b3102a828a27e1372873fcf81ed7e | [
"Apache-2.0"
] | 2 | 2021-03-17T09:25:15.000Z | 2021-04-22T09:15:58.000Z | from mmdet.core.post_processing import (merge_aug_bboxes, merge_aug_masks,
merge_aug_proposals, merge_aug_scores,
multiclass_nms)
from .box3d_nms import aligned_3d_nms, box3d_multiclass_nms
from .merge_augs import merge_aug_bboxes_3d
__all... | 42.083333 | 78 | 0.685149 |
1d930779d21851647eec5a1b54462dd54d153668 | 26 | py | Python | btd6_memory_info/generated/Assets/Scripts/Unity/UI_New/GameEvents/BossEventPanel/boss_event_panel.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/Assets/Scripts/Unity/UI_New/GameEvents/BossEventPanel/boss_event_panel.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/Assets/Scripts/Unity/UI_New/GameEvents/BossEventPanel/boss_event_panel.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | class BossEventPanel: pass | 26 | 26 | 0.884615 |
1d932e3eaf0783a6f86c8a0951dc0e34b96cf507 | 2,190 | py | Python | ml-agents-envs/mlagentsdev/envs/exception.py | vkakerbeck/ml-agents-dev | e3a52b5787af06c07fbd945e2ac37bb3bf07ce0c | [
"Apache-2.0"
] | null | null | null | ml-agents-envs/mlagentsdev/envs/exception.py | vkakerbeck/ml-agents-dev | e3a52b5787af06c07fbd945e2ac37bb3bf07ce0c | [
"Apache-2.0"
] | null | null | null | ml-agents-envs/mlagentsdev/envs/exception.py | vkakerbeck/ml-agents-dev | e3a52b5787af06c07fbd945e2ac37bb3bf07ce0c | [
"Apache-2.0"
] | null | null | null | import logging
logger = logging.getLogger("mlagentsdev.envs")
class UnityException(Exception):
"""
Any error related to ml-agents environment.
"""
pass
class UnityEnvironmentException(UnityException):
"""
Related to errors starting and closing environment.
"""
pass
class UnityActionE... | 34.21875 | 101 | 0.557991 |
1d933457cb6de0a5c1c3b9f7b84868fbc686c1a5 | 1,102 | py | Python | sdks/python/test/test_PostRepositoryProviderMappingRequest.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | null | null | null | sdks/python/test/test_PostRepositoryProviderMappingRequest.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 6 | 2019-10-23T06:38:53.000Z | 2022-01-22T07:57:58.000Z | sdks/python/test/test_PostRepositoryProviderMappingRequest.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... | 27.55 | 139 | 0.764065 |
1d93403edfb638c6a514555bd0e95cad5ef34c62 | 4,883 | py | Python | documentation/ICCS2010/algopy_vs_pyadolc.py | arthus701/algopy | 1e2430f803289bbaed6bbdff6c28f98d7767835c | [
"Unlicense"
] | 54 | 2015-03-05T13:38:08.000Z | 2021-11-29T11:54:48.000Z | documentation/ICCS2010/algopy_vs_pyadolc.py | arthus701/algopy | 1e2430f803289bbaed6bbdff6c28f98d7767835c | [
"Unlicense"
] | 7 | 2016-04-06T11:25:00.000Z | 2020-11-09T13:53:20.000Z | documentation/ICCS2010/algopy_vs_pyadolc.py | arthus701/algopy | 1e2430f803289bbaed6bbdff6c28f98d7767835c | [
"Unlicense"
] | 13 | 2015-01-17T17:05:56.000Z | 2021-08-05T01:13:16.000Z | from adolc import adouble
from adolc.cgraph import AdolcProgram
from adolc.linalg import qr
import numpy
import numpy.testing
from algopy.utpm import UTPM
from time import time
import os
repetitions = 10
D_list = [4]
N_list = [2**i for i in range(0,8)]
P_list = [1]
runtime_ratios_push_forward = numpy.zeros(( len(D_li... | 35.129496 | 108 | 0.560106 |
1d93672e3f4e951da67205505808264f9b377406 | 2,503 | py | Python | datawinners/project/migrations/0008_auto__chg_field_reminder_remind_to.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | 1 | 2015-11-02T09:11:12.000Z | 2015-11-02T09:11:12.000Z | datawinners/project/migrations/0008_auto__chg_field_reminder_remind_to.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | datawinners/project/migrations/0008_auto__chg_field_reminder_remind_to.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Changing field 'Reminder.remind_to'
db.alter_column('project_reminder', 'remind_to', self.gf('django.db.... | 50.06 | 128 | 0.577707 |
1d9379cc750daf02c715d2dffe96ac4bce0be82a | 72 | py | Python | mtools/version.py | nonomal/mtools | 419f159dd1a7e608daafa9959b20fd71e1684fad | [
"Apache-2.0"
] | 1,522 | 2015-01-04T01:00:47.000Z | 2022-03-31T14:12:40.000Z | mtools/version.py | nonomal/mtools | 419f159dd1a7e608daafa9959b20fd71e1684fad | [
"Apache-2.0"
] | 444 | 2015-01-07T02:06:27.000Z | 2022-03-31T09:03:13.000Z | mtools/version.py | nonomal/mtools | 419f159dd1a7e608daafa9959b20fd71e1684fad | [
"Apache-2.0"
] | 361 | 2015-01-04T01:00:51.000Z | 2022-03-17T13:50:59.000Z | #!/usr/bin/env python3
"""Mtools version."""
__version__ = '1.7.0-dev'
| 14.4 | 25 | 0.638889 |
1d937a190cfeec83a85348cd641d93cb60440e49 | 1,430 | py | Python | tests/unit/test_input_tools.py | gwenblum/SteelConnection | 1ee809a72696eb3c888b422d382dacfd016e2484 | [
"MIT"
] | 9 | 2018-03-23T13:52:16.000Z | 2020-05-13T03:06:43.000Z | tests/unit/test_input_tools.py | gwenblum/SteelConnection | 1ee809a72696eb3c888b422d382dacfd016e2484 | [
"MIT"
] | 3 | 2018-05-31T12:45:03.000Z | 2020-08-31T12:59:17.000Z | tests/unit/test_input_tools.py | gwenblum/SteelConnection | 1ee809a72696eb3c888b422d382dacfd016e2484 | [
"MIT"
] | 4 | 2018-11-21T14:02:04.000Z | 2021-07-29T17:28:27.000Z | # coding: utf-8
import sys
from steelconnection import input_tools
def test_get_input(monkeypatch):
if sys.version_info.major < 3:
monkeypatch.setattr("__builtin__.raw_input", lambda x: "SteelConnect")
else:
monkeypatch.setattr("builtins.input", lambda x: "SteelConnect")
name = input_tool... | 31.086957 | 78 | 0.712587 |
1d938bcbccbf2e775185b8100e6bbc08cd123c67 | 13,164 | py | Python | asks/sessions.py | Fuyukai/asks | 261b4a710df8f599a0e07da39d30bed25db0db64 | [
"MIT"
] | null | null | null | asks/sessions.py | Fuyukai/asks | 261b4a710df8f599a0e07da39d30bed25db0db64 | [
"MIT"
] | null | null | null | asks/sessions.py | Fuyukai/asks | 261b4a710df8f599a0e07da39d30bed25db0db64 | [
"MIT"
] | null | null | null | '''
The disparate session (Session) is for making requests to multiple locations.
'''
import anyio
from abc import ABCMeta, abstractmethod
from copy import copy
from functools import partialmethod
from h11 import RemoteProtocolError
from urllib.parse import urlparse, urlunparse
from .cookie_utils import CookieTracker
... | 35.674797 | 84 | 0.541553 |
1d93aea9f770c0e82bb9df4d26edc970db606e46 | 371 | py | Python | bin/createAccessLogs.py | atstpls/soc-faker | 119fcb9c4329a918ef9001ac5eaa36251b862bf0 | [
"MIT"
] | null | null | null | bin/createAccessLogs.py | atstpls/soc-faker | 119fcb9c4329a918ef9001ac5eaa36251b862bf0 | [
"MIT"
] | null | null | null | bin/createAccessLogs.py | atstpls/soc-faker | 119fcb9c4329a918ef9001ac5eaa36251b862bf0 | [
"MIT"
] | null | null | null | from socfaker import SocFaker
import sys
path_file = sys.argv[1]
clients = int(sys.argv[2])
minutes = int(sys.argv[3])
sf = SocFaker()
count=0
while count < minutes:
logs = sf.logs.access(type='test', path_file=path_file, clients=clients)
with open("/app/logs/access.log", "a") as f:
for line in logs... | 19.526316 | 76 | 0.633423 |
1d93b2c936f7c577bd46b9dd7e02dd97c487ecbd | 4,218 | py | Python | mdeepctr/models/autoint.py | TS-SE-GROUP/icme2019 | 7eefdb7de6a7ff3bec1721fafb822d80d80dbba3 | [
"MIT"
] | 78 | 2019-02-21T12:44:11.000Z | 2022-03-30T11:42:33.000Z | mdeepctr/models/autoint.py | rightnowandholdon/icme2019 | fe9b31db7bf19b08d5e5d41a259f0a297eb21766 | [
"MIT"
] | 6 | 2019-04-11T13:14:46.000Z | 2021-05-19T14:36:07.000Z | mdeepctr/models/autoint.py | rightnowandholdon/icme2019 | fe9b31db7bf19b08d5e5d41a259f0a297eb21766 | [
"MIT"
] | 22 | 2019-02-21T02:51:54.000Z | 2021-12-10T02:04:28.000Z | # -*- coding:utf-8 -*-
"""
Author:
Weichen Shen,wcshen1994@163.com
Reference:
[1] Song W, Shi C, Xiao Z, et al. AutoInt: Automatic Feature Interaction Learning via Self-Attentive Neural Networks[J]. arXiv preprint arXiv:1810.11921, 2018.(https://arxiv.org/abs/1810.11921)
"""
import tensorflow as tf
from ..i... | 49.623529 | 197 | 0.676861 |
1d93b639f56a4c2ee55e69ce65a13daa917979af | 39,192 | py | Python | conpaas-services/src/conpaas/services/webservers/manager/internal/__init__.py | bopopescu/conpaas | e0a2955ae3e7da7525d799bed411e9f76ecf0919 | [
"BSD-3-Clause"
] | 1 | 2015-09-20T18:20:01.000Z | 2015-09-20T18:20:01.000Z | conpaas-services/src/conpaas/services/webservers/manager/internal/__init__.py | bopopescu/conpaas | e0a2955ae3e7da7525d799bed411e9f76ecf0919 | [
"BSD-3-Clause"
] | 1 | 2020-07-27T11:56:18.000Z | 2020-07-27T11:56:18.000Z | conpaas-services/src/conpaas/services/webservers/manager/internal/__init__.py | bopopescu/conpaas | e0a2955ae3e7da7525d799bed411e9f76ecf0919 | [
"BSD-3-Clause"
] | 3 | 2018-09-14T16:54:14.000Z | 2020-07-26T03:14:56.000Z | '''
Copyright (c) 2010-2012, Contrail consortium.
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
... | 45.785047 | 216 | 0.702057 |
1d93bdbf8d80c70dae6894fcf4bc91f5bff811ea | 6,095 | py | Python | usecases/canon_concordancer/corpus_conc.py | mikkokotila/pybo | ae921861e3e8c18856f19c59fc4c7da8f2126c1c | [
"Apache-2.0"
] | null | null | null | usecases/canon_concordancer/corpus_conc.py | mikkokotila/pybo | ae921861e3e8c18856f19c59fc4c7da8f2126c1c | [
"Apache-2.0"
] | null | null | null | usecases/canon_concordancer/corpus_conc.py | mikkokotila/pybo | ae921861e3e8c18856f19c59fc4c7da8f2126c1c | [
"Apache-2.0"
] | null | null | null | from pybo import BoTokenizer
from pathlib import Path
import yaml
import re
from collections import defaultdict
default_config = '''Exec:
profile: ''
tok_profile: GMD
vocab_path: vocabs
input_folder: input
output_folder: output/tokenized/
tokenized_suffix: _tokenized
rebuild_trie: False
P... | 30.024631 | 86 | 0.559803 |
1d93c32f389814bcdbd4004f1045b7367523c58e | 15 | py | Python | btd6_memory_info/generated/System/Net/Http/Headers/Parser/MD5/md5.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/System/Net/Http/Headers/Parser/MD5/md5.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/System/Net/Http/Headers/Parser/MD5/md5.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | class MD5: pass | 15 | 15 | 0.8 |
1d93dc6848583770c61a3fc4d1f4a0bb0ff77d17 | 67,280 | py | Python | sample_mods/bfb/bfb_abs_cons_v5.py | kuanhanl/cappresse | 31cd7d03414a930f7e2c21e1a3eb5e7dd25cc500 | [
"MIT"
] | 2 | 2019-09-26T20:56:06.000Z | 2019-11-18T21:03:27.000Z | sample_mods/bfb/bfb_abs_cons_v5.py | kuanhanl/cappresse | 31cd7d03414a930f7e2c21e1a3eb5e7dd25cc500 | [
"MIT"
] | 6 | 2018-03-19T20:36:49.000Z | 2018-04-13T15:27:29.000Z | sample_mods/bfb/bfb_abs_cons_v5.py | kuanhanl/cappresse | 31cd7d03414a930f7e2c21e1a3eb5e7dd25cc500 | [
"MIT"
] | 5 | 2018-10-04T18:51:02.000Z | 2020-07-02T15:31:35.000Z |
from __future__ import division
from pyomo.core.base import Constraint, sqrt, exp, Expression
from nmpc_mhe.aux.cpoinsc import collptsgen
from nmpc_mhe.aux.lagrange_f import lgr, lgry, lgrdot, lgrydot
"""
Version xx.
"""
__author__ = 'David M Thierry @dthierry'
def fldoti_x(m, j, k, ncp, a, b):
return lgrdot... | 33.159192 | 171 | 0.469322 |
1d93e9668456a4fa3d476782d0d48cef51ab4942 | 236 | py | Python | wsgi.py | Lily-XueCY/Lecture5 | 4635ebb9ec035fc7ce65e090c2faa5abab4c418e | [
"MIT"
] | 1 | 2019-07-02T13:02:41.000Z | 2019-07-02T13:02:41.000Z | wsgi.py | Lily-XueCY/Lecture5 | 4635ebb9ec035fc7ce65e090c2faa5abab4c418e | [
"MIT"
] | null | null | null | wsgi.py | Lily-XueCY/Lecture5 | 4635ebb9ec035fc7ce65e090c2faa5abab4c418e | [
"MIT"
] | 1 | 2019-09-15T12:57:48.000Z | 2019-09-15T12:57:48.000Z | import os
from dotenv import load_dotenv
dotenv_path = os.path.join(os.path.dirname(__file__), '.env')
if os.path.exists(dotenv_path):
load_dotenv(dotenv_path)
from blog import create_app
app = create_app('production')
| 21.454545 | 62 | 0.737288 |
1d93f7d73fe6b0068232d29bf6e26aa82a7cf29c | 30,645 | py | Python | data_profiler/labelers/base_data_labeler.py | taylorfturner/data-profiler | da416d1ccaed4b04d2e5b93da41a508de58b642e | [
"Apache-2.0"
] | 1 | 2021-02-13T21:53:16.000Z | 2021-02-13T21:53:16.000Z | data_profiler/labelers/base_data_labeler.py | taylorfturner/data-profiler | da416d1ccaed4b04d2e5b93da41a508de58b642e | [
"Apache-2.0"
] | null | null | null | data_profiler/labelers/base_data_labeler.py | taylorfturner/data-profiler | da416d1ccaed4b04d2e5b93da41a508de58b642e | [
"Apache-2.0"
] | null | null | null | import sys
import os
import warnings
import json
import pkg_resources
import numpy as np
import pandas as pd
from .. import data_readers
from . import data_processing
from .base_model import BaseModel
default_labeler_dir = pkg_resources.resource_filename(
'resources', 'labelers'
)
class BaseDataLabeler(object)... | 38.258427 | 82 | 0.603459 |
1d94224bb1da2918ba70732429c6fa64caae5f37 | 15,221 | py | Python | robot-tests/IFS_acceptance_tests/libs/ImapLibrary.py | adambirse/innovation-funding-service | db1c2bc5a25d3143df02bef9019aefd5261caf6f | [
"MIT"
] | null | null | null | robot-tests/IFS_acceptance_tests/libs/ImapLibrary.py | adambirse/innovation-funding-service | db1c2bc5a25d3143df02bef9019aefd5261caf6f | [
"MIT"
] | null | null | null | robot-tests/IFS_acceptance_tests/libs/ImapLibrary.py | adambirse/innovation-funding-service | db1c2bc5a25d3143df02bef9019aefd5261caf6f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2015-2016 Richard Huang <rickypc@users.noreply.github.com>
#
# 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... | 38.63198 | 100 | 0.571382 |
1d9425678bb6eddaf732febd58576aa1cc7ec558 | 280 | py | Python | app/tests/factories/todos.py | malrefai/todo | 8c650f4f416fec34e38bfc524e5422b15555d26c | [
"MIT"
] | null | null | null | app/tests/factories/todos.py | malrefai/todo | 8c650f4f416fec34e38bfc524e5422b15555d26c | [
"MIT"
] | 5 | 2018-09-14T10:51:30.000Z | 2021-06-10T20:47:46.000Z | app/tests/factories/todos.py | malrefai/todo | 8c650f4f416fec34e38bfc524e5422b15555d26c | [
"MIT"
] | 1 | 2018-09-14T10:49:09.000Z | 2018-09-14T10:49:09.000Z | from factory import DjangoModelFactory, Faker
from app.models import Todo
class TodoFactory(DjangoModelFactory):
"""
Defines todo factory
"""
class Meta:
model = Todo
title = Faker("sentence", nb_words=2)
owner = Faker("sentence", nb_words=1)
| 17.5 | 45 | 0.667857 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.