hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | 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 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
631307bceb8e331e011532639872af5149e2f99b | 55 | py | Python | WLMOJ/abinaryproblem.py | starfy84/Competitive-Programming | 6e024caaf1568723e4eebab208baf366c57830e1 | [
"Unlicense"
] | null | null | null | WLMOJ/abinaryproblem.py | starfy84/Competitive-Programming | 6e024caaf1568723e4eebab208baf366c57830e1 | [
"Unlicense"
] | null | null | null | WLMOJ/abinaryproblem.py | starfy84/Competitive-Programming | 6e024caaf1568723e4eebab208baf366c57830e1 | [
"Unlicense"
] | null | null | null | input()
print('1' if input().count('1')%2==1 else '0')
| 18.333333 | 46 | 0.563636 |
e4ecfcaef4eb28ccaded5718734a96514a3a10c6 | 4,652 | py | Python | RestBotClient.py | motazsaad/fit-bot-fb-clt | 580477aa1ec91855b621d9ae276f2705962f6a87 | [
"MIT"
] | null | null | null | RestBotClient.py | motazsaad/fit-bot-fb-clt | 580477aa1ec91855b621d9ae276f2705962f6a87 | [
"MIT"
] | null | null | null | RestBotClient.py | motazsaad/fit-bot-fb-clt | 580477aa1ec91855b621d9ae276f2705962f6a87 | [
"MIT"
] | 4 | 2019-04-01T15:42:23.000Z | 2020-11-05T08:14:27.000Z | """
Copyright (c) 2016-2019 Keith Sterling http://www.keithsterling.com
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 rights to use, copy, m... | 40.103448 | 144 | 0.690886 |
7263a8baf6c786deb0c2c88303b4d1ddf69a333b | 15,154 | py | Python | tests/test_pyatmo_camera.py | cgtobi/netatmo-api-python | 52394669b70f08c9ccb2e874c2377f450de3fd1c | [
"MIT"
] | 3 | 2019-06-25T11:49:07.000Z | 2021-02-16T14:31:13.000Z | tests/test_pyatmo_camera.py | cgtobi/netatmo-api-python | 52394669b70f08c9ccb2e874c2377f450de3fd1c | [
"MIT"
] | null | null | null | tests/test_pyatmo_camera.py | cgtobi/netatmo-api-python | 52394669b70f08c9ccb2e874c2377f450de3fd1c | [
"MIT"
] | null | null | null | """Define tests for Camera module."""
# pylint: disable=protected-access
import json
import pytest
from freezegun import freeze_time
import pyatmo
from .conftest import does_not_raise
def test_camera_data(camera_home_data):
assert camera_home_data.homes is not None
def test_home_data_no_body(auth, requests_m... | 31.117043 | 88 | 0.660684 |
d83a12afe8fd7effe6dfcc94dcc274199b535941 | 8,197 | py | Python | src/dumpBuggyPatches/scopeTracker.py | dSar-UVA/repoMiner | 8f75074e388ff13419a0a37b4337c0cdcb459f74 | [
"BSD-3-Clause"
] | null | null | null | src/dumpBuggyPatches/scopeTracker.py | dSar-UVA/repoMiner | 8f75074e388ff13419a0a37b4337c0cdcb459f74 | [
"BSD-3-Clause"
] | null | null | null | src/dumpBuggyPatches/scopeTracker.py | dSar-UVA/repoMiner | 8f75074e388ff13419a0a37b4337c0cdcb459f74 | [
"BSD-3-Clause"
] | null | null | null | import sys
import re
sys.path.append("../util")
import Util
import UnsupportedLanguageException
from chunkingConstants import *
from languageSwitcher import *
# Types of elements on our version stacks
FUNC = "Function"
SBLOCK = "Block"
GENERIC = "Generic"
NULL = "NULL"
LINEINDEX = 0
LABELINDEX = 1
S_YES = "YES"
S_N... | 42.252577 | 117 | 0.683543 |
70a6fec229c38aa5ddba7f372cb1b7c709f9120c | 978 | py | Python | mglib/step.py | georgkrause/mglib | 38d3efad119d973e1bb10152d8f2779f6270c937 | [
"Apache-2.0"
] | 2 | 2020-01-08T18:10:46.000Z | 2020-03-29T22:12:00.000Z | mglib/step.py | georgkrause/mglib | 38d3efad119d973e1bb10152d8f2779f6270c937 | [
"Apache-2.0"
] | 2 | 2020-07-21T16:34:49.000Z | 2020-07-21T17:24:05.000Z | mglib/step.py | georgkrause/mglib | 38d3efad119d973e1bb10152d8f2779f6270c937 | [
"Apache-2.0"
] | 2 | 2020-06-03T00:09:46.000Z | 2020-07-21T16:24:48.000Z | class Step:
# width of a document when displayed as 100%.
WIDTH_100p = 1240
PERCENT = 100
LIST = [125, 100, 75, 50, 10]
# aspect ration for A4 paper is h = w * 1.41
# for 100
# 100 => w = 1240, h = 1748
# 50 => w = 620, h = 874
def __init__(self, current=1):
self.current ... | 21.26087 | 66 | 0.579755 |
3f84a5e06f13d0eed78bf64f04be2ca29b6110d1 | 252 | py | Python | src/zad3Environment.py | TestowanieAutomatyczneUG/laboratorium-9-wiktormorawski | f4067f7dd8d3c88d95cadddd58a10269f981603f | [
"MIT"
] | null | null | null | src/zad3Environment.py | TestowanieAutomatyczneUG/laboratorium-9-wiktormorawski | f4067f7dd8d3c88d95cadddd58a10269f981603f | [
"MIT"
] | null | null | null | src/zad3Environment.py | TestowanieAutomatyczneUG/laboratorium-9-wiktormorawski | f4067f7dd8d3c88d95cadddd58a10269f981603f | [
"MIT"
] | null | null | null | import datetime
class Environment:
def getTime(self):
"""return datetime.datetime.now()"""
pass
def playWavFile(self, wav):
pass
def wavWasPlayed(self, wav):
pass
def resetWav(self, wav):
pass
| 16.8 | 44 | 0.579365 |
f6f05f27c21b248e78401740449453e4916ea9d9 | 3,842 | py | Python | scripts/commit_validation/commit_validation/tests/validators/test_pragma_optimize_validator.py | aaarsene/o3de | 37e3b0226958974defd14dd6d808e8557dcd7345 | [
"Apache-2.0",
"MIT"
] | 1 | 2021-09-13T00:01:12.000Z | 2021-09-13T00:01:12.000Z | scripts/commit_validation/commit_validation/tests/validators/test_pragma_optimize_validator.py | aaarsene/o3de | 37e3b0226958974defd14dd6d808e8557dcd7345 | [
"Apache-2.0",
"MIT"
] | null | null | null | scripts/commit_validation/commit_validation/tests/validators/test_pragma_optimize_validator.py | aaarsene/o3de | 37e3b0226958974defd14dd6d808e8557dcd7345 | [
"Apache-2.0",
"MIT"
] | 1 | 2021-07-20T11:07:25.000Z | 2021-07-20T11:07:25.000Z | #
# Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
#
import unittest
from unittest.mock import patch, mock_open
from commit_validation.tests.mocks.mock_commit ... | 44.674419 | 157 | 0.615305 |
eb4364b6130f86e7de569e5e14b6293555530b5a | 11,034 | py | Python | dataloaders.py | roatienza/agmax | 2a7299cc506605aeaaf64b6155b5c826c71d5786 | [
"Apache-2.0"
] | 2 | 2021-11-05T13:09:12.000Z | 2022-03-04T05:07:33.000Z | dataloaders.py | roatienza/agmax | 2a7299cc506605aeaaf64b6155b5c826c71d5786 | [
"Apache-2.0"
] | 1 | 2021-11-04T10:06:57.000Z | 2021-11-07T08:35:39.000Z | dataloaders.py | roatienza/agmax | 2a7299cc506605aeaaf64b6155b5c826c71d5786 | [
"Apache-2.0"
] | null | null | null | '''
A single dataloader is the typical one input - one label mapping. This is the classical supervised learning.
A double dataloader creates 2 data points for the same label and used in training with AgMax.
Copyright 2021 Rowel Atienza
'''
from __future__ import absolute_import
from __future__ import division
from __... | 39.548387 | 108 | 0.414537 |
de3117b351d20b907b6db0dfa8c2c090940a5ca0 | 6,856 | py | Python | Demo/tkinter/guido/ManPage.py | cemeyer/tauthon | 2c3328c5272cffa2a544542217181c5828afa7ed | [
"PSF-2.0"
] | 2,293 | 2015-01-02T12:46:10.000Z | 2022-03-29T09:45:43.000Z | python/src/Demo/tkinter/guido/ManPage.py | weiqiangzheng/sl4a | d3c17dca978cbeee545e12ea240a9dbf2a6999e9 | [
"Apache-2.0"
] | 315 | 2015-05-31T11:55:46.000Z | 2022-01-12T08:36:37.000Z | python/src/Demo/tkinter/guido/ManPage.py | weiqiangzheng/sl4a | d3c17dca978cbeee545e12ea240a9dbf2a6999e9 | [
"Apache-2.0"
] | 1,033 | 2015-01-04T07:48:40.000Z | 2022-03-24T09:34:37.000Z | # Widget to display a man page
import re
from Tkinter import *
from Tkinter import _tkinter
from ScrolledText import ScrolledText
# XXX These fonts may have to be changed to match your system
BOLDFONT = '*-Courier-Bold-R-Normal-*-120-*'
ITALICFONT = '*-Courier-Medium-O-Normal-*-120-*'
# XXX Recognizing footers is sy... | 31.022624 | 71 | 0.553092 |
99b1ca22a730a3024ed94edb6d0d585b72b2f1f7 | 1,461 | py | Python | docs/development/design/conf.py | hashnfv/hashnfv-copper | 166774fd06fe94c4f6cd6ab123b8cda6ab78c51a | [
"Apache-2.0"
] | null | null | null | docs/development/design/conf.py | hashnfv/hashnfv-copper | 166774fd06fe94c4f6cd6ab123b8cda6ab78c51a | [
"Apache-2.0"
] | null | null | null | docs/development/design/conf.py | hashnfv/hashnfv-copper | 166774fd06fe94c4f6cd6ab123b8cda6ab78c51a | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 Open Platform for NFV Project, Inc. and its contributors
#
# 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 requi... | 28.647059 | 74 | 0.744695 |
13f763b2eba5a1ffde396f200bed033a76197098 | 22,384 | py | Python | bids-validator/bids_validator/_version.py | bendhouseart/bids-validator | c1c961599b086fdacf61cbc2327b35e8002f9bc3 | [
"MIT"
] | 84 | 2018-10-27T07:44:17.000Z | 2022-03-29T16:01:25.000Z | bids-validator/bids_validator/_version.py | bendhouseart/bids-validator | c1c961599b086fdacf61cbc2327b35e8002f9bc3 | [
"MIT"
] | 723 | 2018-09-26T22:14:28.000Z | 2022-03-29T16:00:52.000Z | bids-validator/bids_validator/_version.py | bendhouseart/bids-validator | c1c961599b086fdacf61cbc2327b35e8002f9bc3 | [
"MIT"
] | 58 | 2018-10-05T15:33:25.000Z | 2022-01-19T12:13:12.000Z |
# This file helps to compute a version number in source trees obtained from
# git-archive tarball (such as those provided by githubs download-from-tag
# feature). Distribution tarballs (built by setup.py sdist) and build
# directories (produced by setup.py build) will contain a much shorter file
# that just contains t... | 35.871795 | 84 | 0.581889 |
53fafa721b68e06bafe136359921602761fae8e5 | 36,664 | py | Python | python/open3d/visualization/tensorboard_plugin/util.py | chunibyo-wly/Open3D | 800595885c02e4333ba8f1f454b2bedf3eb0517a | [
"MIT"
] | 1 | 2022-03-16T08:54:45.000Z | 2022-03-16T08:54:45.000Z | python/open3d/visualization/tensorboard_plugin/util.py | chunibyo-wly/Open3D | 800595885c02e4333ba8f1f454b2bedf3eb0517a | [
"MIT"
] | null | null | null | python/open3d/visualization/tensorboard_plugin/util.py | chunibyo-wly/Open3D | 800595885c02e4333ba8f1f454b2bedf3eb0517a | [
"MIT"
] | null | null | null | # ----------------------------------------------------------------------------
# - Open3D: www.open3d.org -
# ----------------------------------------------------------------------------
# The MIT License (MIT)
#
# Copyright (c) 2018-2021 www.open3d.org
#
# Permission i... | 43.338061 | 90 | 0.584524 |
7f65f2e88dac29ee2e81e6b2a6149e0c9f74dbbf | 22,800 | py | Python | python/tvm/autotvm/measure/measure_methods.py | mostafaelhoushi/tvm | ae21eddf5f13ffa82d514e8311c87f38bcac559a | [
"Apache-2.0"
] | null | null | null | python/tvm/autotvm/measure/measure_methods.py | mostafaelhoushi/tvm | ae21eddf5f13ffa82d514e8311c87f38bcac559a | [
"Apache-2.0"
] | null | null | null | python/tvm/autotvm/measure/measure_methods.py | mostafaelhoushi/tvm | ae21eddf5f13ffa82d514e8311c87f38bcac559a | [
"Apache-2.0"
] | null | null | null | # pylint: disable=invalid-name,too-many-function-args,too-many-nested-blocks
"""
Functions that run on executor for measurement.
These functions are responsible for building the tvm module, uploading it to
remote devices, recording the running time costs, and checking the correctness of the output.
"""
import logging... | 39.108062 | 98 | 0.599561 |
c8d50e4d9b188ac0a316ef7685e5f9594a007764 | 2,277 | py | Python | test/IECoreGL/FontLoaderTest.py | bradleyhenke/cortex | f8245cc6c9464b1de9e6c6e57068248198e63de0 | [
"BSD-3-Clause"
] | 386 | 2015-01-02T11:10:43.000Z | 2022-03-10T15:12:20.000Z | test/IECoreGL/FontLoaderTest.py | bradleyhenke/cortex | f8245cc6c9464b1de9e6c6e57068248198e63de0 | [
"BSD-3-Clause"
] | 484 | 2015-01-09T18:28:06.000Z | 2022-03-31T16:02:04.000Z | test/IECoreGL/FontLoaderTest.py | bradleyhenke/cortex | f8245cc6c9464b1de9e6c6e57068248198e63de0 | [
"BSD-3-Clause"
] | 99 | 2015-01-28T23:18:04.000Z | 2022-03-27T00:59:39.000Z | ##########################################################################
#
# Copyright (c) 2012, Image Engine Design 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:
#
# * Redistribu... | 37.327869 | 77 | 0.684673 |
7a4c76fb35e12619e8c96b6943ed239c9cf57315 | 112 | py | Python | rl_starterpack/agents/__init__.py | RL-Starterpack/rl-starterpack | af61d08eb00b0c960b103eb469a73ba2f47b9990 | [
"MIT"
] | 25 | 2020-11-23T15:26:04.000Z | 2021-07-21T09:24:16.000Z | rl_starterpack/agents/__init__.py | RL-Starterpack/rl-starterpack | af61d08eb00b0c960b103eb469a73ba2f47b9990 | [
"MIT"
] | null | null | null | rl_starterpack/agents/__init__.py | RL-Starterpack/rl-starterpack | af61d08eb00b0c960b103eb469a73ba2f47b9990 | [
"MIT"
] | 9 | 2021-03-28T07:45:48.000Z | 2022-03-22T12:43:10.000Z | from .ac import AC
from .dqn import DQN
from .pg import PG
from .random import RandomAgent
from .tql import TQL
| 18.666667 | 31 | 0.776786 |
3d508ce538653a0d8bc1a3185e2c61359c10899d | 1,462 | py | Python | lab01/client-git.py | vascoalramos/cd | 2c922d463937183f4d85ad8d192fbd6b80cbd068 | [
"MIT"
] | null | null | null | lab01/client-git.py | vascoalramos/cd | 2c922d463937183f4d85ad8d192fbd6b80cbd068 | [
"MIT"
] | null | null | null | lab01/client-git.py | vascoalramos/cd | 2c922d463937183f4d85ad8d192fbd6b80cbd068 | [
"MIT"
] | null | null | null | # coding: utf-8
from socket import *
import json
from datetime import datetime
import selectors
import sys
import fcntl
import os
sel = selectors.DefaultSelector() # create a selector
def startConn():
conn = socket(AF_INET, SOCK_STREAM) # create an INET, STREAMing socket
conn.co... | 33.227273 | 111 | 0.638851 |
7fa3883ea59b25acf30d04f6e2ad0a6a9049e512 | 202 | py | Python | tests/test_eta3_spline_path.py | duken72/PythonRobotics | 177f04618c4bbba40bea38cd57d642f7ab9e3725 | [
"MIT"
] | 15,431 | 2016-10-07T08:25:10.000Z | 2022-03-31T22:06:02.000Z | tests/test_eta3_spline_path.py | duken72/PythonRobotics | 177f04618c4bbba40bea38cd57d642f7ab9e3725 | [
"MIT"
] | 486 | 2017-05-01T00:40:00.000Z | 2022-03-23T06:57:42.000Z | tests/test_eta3_spline_path.py | duken72/PythonRobotics | 177f04618c4bbba40bea38cd57d642f7ab9e3725 | [
"MIT"
] | 4,978 | 2017-03-05T22:23:36.000Z | 2022-03-31T12:42:17.000Z | import conftest
from PathPlanning.Eta3SplinePath import eta3_spline_path as m
def test_1():
m.show_animation = False
m.main()
if __name__ == '__main__':
conftest.run_this_test(__file__)
| 16.833333 | 61 | 0.742574 |
4bfe6c3f08eb1fcb107dc4a2854233c6962244f6 | 6,472 | py | Python | soccer3d/instancesegm/utils.py | ngerstle/soccerontable | 25426ff0f8fe0ce008b99c5c0fdbb35091d8d92c | [
"BSD-2-Clause"
] | 465 | 2018-05-18T04:43:40.000Z | 2022-02-27T03:09:25.000Z | soccer3d/instancesegm/utils.py | ngerstle/soccerontable | 25426ff0f8fe0ce008b99c5c0fdbb35091d8d92c | [
"BSD-2-Clause"
] | 18 | 2018-06-20T15:03:10.000Z | 2021-05-05T04:33:38.000Z | soccer3d/instancesegm/utils.py | ngerstle/soccerontable | 25426ff0f8fe0ce008b99c5c0fdbb35091d8d92c | [
"BSD-2-Clause"
] | 97 | 2018-05-03T09:12:30.000Z | 2022-01-25T12:49:33.000Z | import numpy as np
import scipy
import cv2
def get_pixel_neighbors(height, width):
"""
Estimate the 4 neighbors of every pixel in an image
:param height: image height
:param width: image width
:return: pixel index - neighbor index lists
"""
pix_id = []
neighbor_id = []
for i in ra... | 33.020408 | 128 | 0.528894 |
366e5213d9f32c55beb5d13de66c458158d8a5a4 | 270 | py | Python | src/yellowdog_client/model/account_authentication_properties.py | yellowdog/yellowdog-sdk-python-public | da69a7d6e45c92933e34fefcaef8b5d98dcd6036 | [
"Apache-2.0"
] | null | null | null | src/yellowdog_client/model/account_authentication_properties.py | yellowdog/yellowdog-sdk-python-public | da69a7d6e45c92933e34fefcaef8b5d98dcd6036 | [
"Apache-2.0"
] | null | null | null | src/yellowdog_client/model/account_authentication_properties.py | yellowdog/yellowdog-sdk-python-public | da69a7d6e45c92933e34fefcaef8b5d98dcd6036 | [
"Apache-2.0"
] | null | null | null | from dataclasses import dataclass
from typing import Optional
from .azure_account_authentication_properties import AzureAccountAuthenticationProperties
@dataclass
class AccountAuthenticationProperties:
azure: Optional[AzureAccountAuthenticationProperties] = None
| 27 | 89 | 0.877778 |
a34a93b13a7d38efbeab488dffe5b49715ee219f | 13,443 | py | Python | simulation_ws/build/deepracer_msgs/devel/_setup_util.py | we437b/dr_logger | fa47ca74dc46b8ddd596b7255b23f24034db45ac | [
"MIT"
] | null | null | null | simulation_ws/build/deepracer_msgs/devel/_setup_util.py | we437b/dr_logger | fa47ca74dc46b8ddd596b7255b23f24034db45ac | [
"MIT"
] | null | null | null | simulation_ws/build/deepracer_msgs/devel/_setup_util.py | we437b/dr_logger | fa47ca74dc46b8ddd596b7255b23f24034db45ac | [
"MIT"
] | null | null | null | #!/usr/bin/python2
# -*- coding: utf-8 -*-
# Software License Agreement (BSD License)
#
# Copyright (c) 2012, Willow Garage, 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:
#
# * Redistri... | 44.07541 | 213 | 0.683627 |
059f1bae77e8031bf74dd2c3e45d54cdec774136 | 42,676 | py | Python | tests/keras/layers/decomposition_test.py | NPoe/keras | 298553d6018d3644d0e865015499b9405e3d6a2c | [
"MIT"
] | 1 | 2018-07-22T03:59:02.000Z | 2018-07-22T03:59:02.000Z | tests/keras/layers/decomposition_test.py | NPoe/keras | 298553d6018d3644d0e865015499b9405e3d6a2c | [
"MIT"
] | null | null | null | tests/keras/layers/decomposition_test.py | NPoe/keras | 298553d6018d3644d0e865015499b9405e3d6a2c | [
"MIT"
] | 1 | 2022-03-18T03:19:36.000Z | 2022-03-18T03:19:36.000Z | # IDEE: Erasure Layer / Decomposition layer as secondary output (tied weights!), then give training goal!!!
import pytest
import numpy as np
np.random.seed(123)
from numpy.testing import assert_allclose
from keras.utils.test_utils import layer_test
from keras.layers import recurrent, embeddings, Embedding, Dropout, I... | 38.585895 | 139 | 0.587004 |
e3f86ea28c29241b0b0b72d3e00696505c058ea8 | 9,069 | py | Python | tests/integration/sharding/test_sharding.py | Immich/jina | 1f5f7cf4d82029d76ab41df157526fe6f6e0da50 | [
"Apache-2.0"
] | null | null | null | tests/integration/sharding/test_sharding.py | Immich/jina | 1f5f7cf4d82029d76ab41df157526fe6f6e0da50 | [
"Apache-2.0"
] | null | null | null | tests/integration/sharding/test_sharding.py | Immich/jina | 1f5f7cf4d82029d76ab41df157526fe6f6e0da50 | [
"Apache-2.0"
] | null | null | null | import os
import random
import string
from pathlib import Path
import numpy as np
import pytest
from jina import Document
from jina.executors.indexers import BaseIndexer
from jina.flow import Flow
random.seed(0)
np.random.seed(0)
cur_dir = os.path.dirname(os.path.abspath(__file__))
def get_index_flow(yaml_file, n... | 29.637255 | 101 | 0.630058 |
83bcb55a60c0b3934e0c1f438f326de1ba01ef46 | 7,433 | py | Python | tests/api/apitestbase.py | cloudcopy/seahub | e804b84202268d8691a5e67ddd14c6ab5f6ac1cb | [
"Apache-2.0"
] | null | null | null | tests/api/apitestbase.py | cloudcopy/seahub | e804b84202268d8691a5e67ddd14c6ab5f6ac1cb | [
"Apache-2.0"
] | null | null | null | tests/api/apitestbase.py | cloudcopy/seahub | e804b84202268d8691a5e67ddd14c6ab5f6ac1cb | [
"Apache-2.0"
] | null | null | null | #coding: UTF-8
import requests
import unittest
from contextlib import contextmanager
from nose.tools import assert_equal, assert_in # pylint: disable=E0611
from urllib import quote
from tests.common.common import USERNAME, PASSWORD, \
ADMIN_USERNAME, ADMIN_PASSWORD
from tests.common.utils import apiurl, urljoin,... | 30.970833 | 84 | 0.589937 |
82929916e2e453e39fa200f903fb9405eaea6f4c | 5,161 | py | Python | t/unit/transport/test_pyamqp.py | blairboy362/kombu | b59bf1b6799a189a7ae47e6fa1a9feec47fd0e6c | [
"BSD-3-Clause"
] | 1 | 2018-08-31T05:00:06.000Z | 2018-08-31T05:00:06.000Z | t/unit/transport/test_pyamqp.py | blairboy362/kombu | b59bf1b6799a189a7ae47e6fa1a9feec47fd0e6c | [
"BSD-3-Clause"
] | 1 | 2017-07-21T05:54:11.000Z | 2017-09-07T13:54:09.000Z | t/unit/transport/test_pyamqp.py | blairboy362/kombu | b59bf1b6799a189a7ae47e6fa1a9feec47fd0e6c | [
"BSD-3-Clause"
] | 3 | 2018-03-08T09:15:47.000Z | 2018-11-13T19:11:20.000Z | from __future__ import absolute_import, unicode_literals
import sys
from itertools import count
from case import Mock, mock, patch
from kombu import Connection
from kombu.five import nextfun
from kombu.transport import pyamqp
def test_amqps_connection():
conn = Connection('amqps://')
assert conn.transport... | 28.994382 | 72 | 0.639992 |
7532b728104791167bf9da3d9e3ffa82d5c5ebff | 279 | py | Python | examples/prompts/get-input-vi-mode.py | tcrensink/python-prompt-toolkit | bc200c4a58d2a3059f8a4606e95ecdd731f4e1cd | [
"BSD-3-Clause"
] | null | null | null | examples/prompts/get-input-vi-mode.py | tcrensink/python-prompt-toolkit | bc200c4a58d2a3059f8a4606e95ecdd731f4e1cd | [
"BSD-3-Clause"
] | null | null | null | examples/prompts/get-input-vi-mode.py | tcrensink/python-prompt-toolkit | bc200c4a58d2a3059f8a4606e95ecdd731f4e1cd | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
from prompt_toolkit_dev import prompt
if __name__ == '__main__':
print("You have Vi keybindings here. Press [Esc] to go to navigation mode.")
answer = prompt('Give me some input: ', multiline=False, vi_mode=True)
print('You said: %s' % answer)
| 34.875 | 80 | 0.698925 |
9f3977e117833a78b5e76371be3bc03f1b228678 | 1,321 | py | Python | useraudit/tests/utils.py | xmontana/django-useraudit | f5625a784b5ffedb2cd48613a973e3fc6d6d143e | [
"BSD-3-Clause"
] | 35 | 2016-01-21T16:19:56.000Z | 2021-11-19T10:20:35.000Z | useraudit/tests/utils.py | xmontana/django-useraudit | f5625a784b5ffedb2cd48613a973e3fc6d6d143e | [
"BSD-3-Clause"
] | 35 | 2016-02-12T02:27:03.000Z | 2021-06-10T19:05:19.000Z | useraudit/tests/utils.py | xmontana/django-useraudit | f5625a784b5ffedb2cd48613a973e3fc6d6d143e | [
"BSD-3-Clause"
] | 17 | 2016-12-31T13:52:05.000Z | 2022-03-28T01:42:39.000Z | from datetime import datetime, timedelta
from functools import reduce
from importlib import import_module
from django.conf import settings
from django.contrib.auth import authenticate, login
from django.test.client import RequestFactory
from .. import middleware
def is_recent(time):
return datetime.now() - tim... | 30.72093 | 87 | 0.725208 |
eb4d0bb89c502d98af991b805129d8054272c462 | 22,047 | py | Python | example_zoo/tensorflow/probability/vq_vae/trainer/vq_vae.py | ksalama/ml-on-gcp | 6b2f7543e032df4586734eca9ab317b03ba48992 | [
"Apache-2.0"
] | null | null | null | example_zoo/tensorflow/probability/vq_vae/trainer/vq_vae.py | ksalama/ml-on-gcp | 6b2f7543e032df4586734eca9ab317b03ba48992 | [
"Apache-2.0"
] | null | null | null | example_zoo/tensorflow/probability/vq_vae/trainer/vq_vae.py | ksalama/ml-on-gcp | 6b2f7543e032df4586734eca9ab317b03ba48992 | [
"Apache-2.0"
] | 1 | 2022-02-03T05:38:54.000Z | 2022-02-03T05:38:54.000Z | # Copyright 2018 The TensorFlow Probability 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 o... | 39.440072 | 87 | 0.673697 |
39ff15d6bfe3b4690e6dd467737b41d7857af2e8 | 8,954 | py | Python | saleor/order/migrations/0001_initial.py | TysonRV/saleor | 83d3ca5ae163fa853ab311d0ebcdbc22f4788166 | [
"BSD-3-Clause"
] | 9 | 2021-08-08T22:42:18.000Z | 2021-11-23T06:50:14.000Z | saleor/order/migrations/0001_initial.py | TysonRV/saleor | 83d3ca5ae163fa853ab311d0ebcdbc22f4788166 | [
"BSD-3-Clause"
] | 64 | 2019-02-11T17:02:05.000Z | 2021-06-25T15:16:57.000Z | saleor/order/migrations/0001_initial.py | TysonRV/saleor | 83d3ca5ae163fa853ab311d0ebcdbc22f4788166 | [
"BSD-3-Clause"
] | 2 | 2018-01-25T06:09:07.000Z | 2018-01-25T20:55:34.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.db.models.deletion
from django.conf import settings
import django_prices.models
import django.core.validators
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = ... | 69.953125 | 281 | 0.625307 |
19a1a91df246aefa88b730cab5ba643bd4817f9f | 25,794 | py | Python | tetris_objects.py | yuvrajwaraich/Tetris | 59a918edad6aefbe23749234ed62edebb42b56c7 | [
"MIT"
] | 2 | 2020-09-29T01:42:13.000Z | 2020-09-29T01:42:39.000Z | tetris_objects.py | yuvrajwaraich/Tetris | 59a918edad6aefbe23749234ed62edebb42b56c7 | [
"MIT"
] | null | null | null | tetris_objects.py | yuvrajwaraich/Tetris | 59a918edad6aefbe23749234ed62edebb42b56c7 | [
"MIT"
] | null | null | null |
class OrangeRicky():
def __init__(self, rotation):
self.colour = "O"
self.rotation = rotation
if rotation == 0:
self.coords = [[8, 0], [8, 1], [7, 1], [6, 1]]
elif rotation == 1:
self.coords = [[8, 2], [7, 2], [7, 1], [7, 0]]
elif rotat... | 34.856757 | 100 | 0.443204 |
00e8f8abe41fd9732e63b4fba4b1bb154e0e004e | 1,217 | py | Python | official/vision/beta/projects/panoptic_maskrcnn/__init__.py | mcasanova1445/models | 37be0fdb4abccca633bb3199a4e6f3f71cd174d9 | [
"Apache-2.0"
] | 1 | 2022-02-02T06:29:41.000Z | 2022-02-02T06:29:41.000Z | official/vision/beta/projects/panoptic_maskrcnn/__init__.py | mdsaifhaider/models | 7214e17eb425963ec3d0295be215d5d26deaeb32 | [
"Apache-2.0"
] | 8 | 2020-05-19T00:52:30.000Z | 2020-06-04T23:57:20.000Z | official/vision/beta/projects/panoptic_maskrcnn/__init__.py | mdsaifhaider/models | 7214e17eb425963ec3d0295be215d5d26deaeb32 | [
"Apache-2.0"
] | 2 | 2021-10-07T04:47:04.000Z | 2021-12-18T04:18:19.000Z | # Copyright 2022 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... | 43.464286 | 74 | 0.765818 |
998290f0893f2e7b4ff348dcc76fab55de863bc7 | 2,154 | py | Python | truecaser/applytc.py | Ajapaik/tartunlp-translate | 135c464b89202aabe2dcdb5f0855397a4cda1373 | [
"MIT"
] | null | null | null | truecaser/applytc.py | Ajapaik/tartunlp-translate | 135c464b89202aabe2dcdb5f0855397a4cda1373 | [
"MIT"
] | null | null | null | truecaser/applytc.py | Ajapaik/tartunlp-translate | 135c464b89202aabe2dcdb5f0855397a4cda1373 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
import re
from truecaser.learntc import log, tokens
class DefUniqDict(dict):
def __missing__(self, key):
return key
class WordFreqTuple:
def __init__(self, word, freq):
self.word = word
self.freq = freq
def loadModel(filename, freqs=False):
r... | 20.130841 | 88 | 0.530641 |
8ba30cff0b36ac0133186c37e2b5375fc0385a58 | 5,644 | py | Python | representation_batch_rl/batch_rl/pcl.py | shaun95/google-research | d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5 | [
"Apache-2.0"
] | 1 | 2022-03-19T04:26:12.000Z | 2022-03-19T04:26:12.000Z | representation_batch_rl/batch_rl/pcl.py | shaun95/google-research | d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5 | [
"Apache-2.0"
] | null | null | null | representation_batch_rl/batch_rl/pcl.py | shaun95/google-research | d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5 | [
"Apache-2.0"
] | 1 | 2022-03-30T07:20:29.000Z | 2022-03-30T07:20:29.000Z | # coding=utf-8
# Copyright 2022 The Google Research 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 applicab... | 31.18232 | 77 | 0.686747 |
b3b4e4573429fd1ee61a5ce2ebf6ec03c3888ad2 | 3,583 | py | Python | api/api.py | komutsatiri/bitirme-api | e8fe408033b56d040f9d4b6d78cd7dc9f26a35eb | [
"MIT"
] | null | null | null | api/api.py | komutsatiri/bitirme-api | e8fe408033b56d040f9d4b6d78cd7dc9f26a35eb | [
"MIT"
] | null | null | null | api/api.py | komutsatiri/bitirme-api | e8fe408033b56d040f9d4b6d78cd7dc9f26a35eb | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from flask import Flask, jsonify
from flask.ext.cors import CORS, cross_origin
from pymongo import MongoClient
import os
app = Flask(__name__)
CORS(app)
mongodb_host = '172.16.0.2'
mongodb_port = 27017
client = MongoClient(mongodb_host,mongodb_port)
collection = client.conflict_db.events
@... | 35.127451 | 136 | 0.652526 |
5326f2df68972f2911a87d33304191a010288bd1 | 35,758 | py | Python | pandas/tests/io/excel/test_readers.py | LauraCollard/pandas | b1c3a9031569334cafc4e8d45d35408421f7dea4 | [
"BSD-3-Clause"
] | 2 | 2019-12-02T11:24:30.000Z | 2021-02-28T12:13:54.000Z | pandas/tests/io/excel/test_readers.py | LauraCollard/pandas | b1c3a9031569334cafc4e8d45d35408421f7dea4 | [
"BSD-3-Clause"
] | 1 | 2019-10-31T08:19:49.000Z | 2019-10-31T08:19:49.000Z | pandas/tests/io/excel/test_readers.py | LauraCollard/pandas | b1c3a9031569334cafc4e8d45d35408421f7dea4 | [
"BSD-3-Clause"
] | 4 | 2019-10-09T07:52:08.000Z | 2021-07-12T02:37:59.000Z | from collections import OrderedDict
import contextlib
from datetime import datetime, time
from functools import partial
import os
from urllib.error import URLError
import warnings
import numpy as np
import pytest
import pandas.util._test_decorators as td
import pandas as pd
from pandas import DataFrame, Index, Multi... | 37.560924 | 88 | 0.569886 |
a3414b37101ef32219b6ae09770ea85684d090ce | 37,808 | py | Python | src/pymwm/waveguide.py | mnishida/pymwm | 820d0a9056982fd37972b0e10f5dad9d1697ed2f | [
"MIT"
] | null | null | null | src/pymwm/waveguide.py | mnishida/pymwm | 820d0a9056982fd37972b0e10f5dad9d1697ed2f | [
"MIT"
] | null | null | null | src/pymwm/waveguide.py | mnishida/pymwm | 820d0a9056982fd37972b0e10f5dad9d1697ed2f | [
"MIT"
] | null | null | null | from __future__ import annotations
import abc
import os
from collections import OrderedDict
from typing import Optional
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import riip
from pandas import DataFrame
class Sampling(metaclass=abc.ABCMeta):
"""A class provides sampling methods.
... | 38.461851 | 96 | 0.502354 |
e780ea1c3103c95b0ce75037405474d8ae62e24a | 684 | py | Python | pypad/dungeon/floor_modifier/ranking_large_board_penalty_fm.py | candyninja001/pypad | 82bfc104c2524ca54cc415d37d2c21fec471838f | [
"MIT"
] | null | null | null | pypad/dungeon/floor_modifier/ranking_large_board_penalty_fm.py | candyninja001/pypad | 82bfc104c2524ca54cc415d37d2c21fec471838f | [
"MIT"
] | null | null | null | pypad/dungeon/floor_modifier/ranking_large_board_penalty_fm.py | candyninja001/pypad | 82bfc104c2524ca54cc415d37d2c21fec471838f | [
"MIT"
] | null | null | null | from . import FloorModifier, FloorModifierLoader
class RankingLargeBoardPenaltyFM(FloorModifier):
@classmethod
def handles(self, name):
return name == 'rsd76'
def parse_value(self):
self.score_reduction = int(self.value)
def args_to_json(self) -> dict:
return {
'sc... | 27.36 | 78 | 0.700292 |
84ea6a4322f178bfc49fc0f900b37f5aa132f5d8 | 23,409 | py | Python | src/sardana/taurus/qt/qtgui/extra_sardana/sardanaeditor.py | jkotan/sardana | 475ee59302a7f6f238909c9fdc625ee2cd3a0ea2 | [
"CC-BY-3.0"
] | null | null | null | src/sardana/taurus/qt/qtgui/extra_sardana/sardanaeditor.py | jkotan/sardana | 475ee59302a7f6f238909c9fdc625ee2cd3a0ea2 | [
"CC-BY-3.0"
] | null | null | null | src/sardana/taurus/qt/qtgui/extra_sardana/sardanaeditor.py | jkotan/sardana | 475ee59302a7f6f238909c9fdc625ee2cd3a0ea2 | [
"CC-BY-3.0"
] | null | null | null | #!/usr/bin/env python
##############################################################################
##
# This file is part of Sardana
##
# http://www.sardana-controls.org/
##
# Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain
##
# Sardana is free software: you can redistribute it and/or modify
# it under th... | 39.54223 | 112 | 0.560425 |
dd842edcfe9e83892e0c22bafd99cb590d3de7bc | 1,914 | py | Python | demo/demo_gexf/loader.py | ANCIR/grano | cee2ec1974df5df2bc6ed5e214f6bd5d201397a4 | [
"MIT"
] | 30 | 2018-08-23T15:42:17.000Z | 2021-11-16T13:11:36.000Z | demo/demo_gexf/loader.py | granoproject/grano | cee2ec1974df5df2bc6ed5e214f6bd5d201397a4 | [
"MIT"
] | null | null | null | demo/demo_gexf/loader.py | granoproject/grano | cee2ec1974df5df2bc6ed5e214f6bd5d201397a4 | [
"MIT"
] | 5 | 2015-01-17T15:50:06.000Z | 2015-05-15T08:36:09.000Z | from grano.logic import Loader
import networkx
# This source URL will be applied to all properties without their own lineage:
DEFAULT_SOURCE_URL = 'https://dhs.stanford.edu/dh/gephi/dh11.gexf'
# Any settings (free-form dict):
PROJECT_SETTINGS = {}
def node_type(node):
if node['type'] in ('Long Paper', 'Panel', '... | 27.73913 | 133 | 0.66092 |
98184171f9e4a27bb6d062bbe4f65b735746fe0b | 12,356 | py | Python | pyrsa/inference/crossvalsets.py | kshitijd20/pyrsa | 3090d88362b26e6b2ee807e62d483a0158530e2a | [
"MIT"
] | 4 | 2015-08-10T18:34:21.000Z | 2018-05-15T20:43:15.000Z | pyrsa/inference/crossvalsets.py | kshitijd20/pyrsa | 3090d88362b26e6b2ee807e62d483a0158530e2a | [
"MIT"
] | null | null | null | pyrsa/inference/crossvalsets.py | kshitijd20/pyrsa | 3090d88362b26e6b2ee807e62d483a0158530e2a | [
"MIT"
] | 2 | 2018-03-26T03:02:07.000Z | 2021-11-10T21:09:48.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
generation of crossvalidation splits
"""
import numpy as np
from pyrsa.util.rdm_utils import add_pattern_index
def sets_leave_one_out_pattern(rdms, pattern_descriptor):
""" generates training and test set combinations by leaving one level
of pattern_descript... | 41.049834 | 78 | 0.647944 |
ee245e8e689cdadcbbf5b9f09edc4f1fef0573de | 12,761 | py | Python | pyfritzhome/fritzhome.py | mib1185/python-fritzhome | c0017738b365b4dea5a54d01add66fd606229cd2 | [
"MIT"
] | 33 | 2017-10-25T20:13:35.000Z | 2022-03-27T09:21:19.000Z | pyfritzhome/fritzhome.py | mib1185/python-fritzhome | c0017738b365b4dea5a54d01add66fd606229cd2 | [
"MIT"
] | 49 | 2017-11-05T05:52:45.000Z | 2022-03-27T09:21:04.000Z | pyfritzhome/fritzhome.py | mib1185/python-fritzhome | c0017738b365b4dea5a54d01add66fd606229cd2 | [
"MIT"
] | 33 | 2018-05-05T21:52:08.000Z | 2022-03-27T08:24:00.000Z | # -*- coding: utf-8 -*-
from __future__ import print_function
import hashlib
import logging
from xml.etree import ElementTree
from requests import Session
from .errors import InvalidError, LoginError
from .fritzhomedevice import FritzhomeDevice
from .fritzhomedevice import FritzhomeTemplate
from typing import Dict
... | 34.771117 | 88 | 0.599483 |
0724432ad192905acf7952e17af842f070843ce4 | 1,804 | py | Python | envs.py | zhoubin-me/pytorch-a3c | ddf366f194a625ded955e7f5226710a809b1117e | [
"MIT"
] | 1,071 | 2017-02-13T15:28:31.000Z | 2022-03-31T03:55:34.000Z | envs.py | TommyGoAhead/pytorch-a3c | e898f7514a03de73a2bf01e7b0f17a6f93963389 | [
"MIT"
] | 67 | 2017-02-15T18:13:40.000Z | 2021-02-27T02:47:05.000Z | envs.py | TommyGoAhead/pytorch-a3c | e898f7514a03de73a2bf01e7b0f17a6f93963389 | [
"MIT"
] | 316 | 2017-02-15T17:47:45.000Z | 2022-03-31T06:46:23.000Z | import cv2
import gym
import numpy as np
from gym.spaces.box import Box
# Taken from https://github.com/openai/universe-starter-agent
def create_atari_env(env_id):
env = gym.make(env_id)
env = AtariRescale42x42(env)
env = NormalizedEnv(env)
return env
def _process_frame42(frame):
frame = frame[3... | 31.649123 | 79 | 0.654656 |
d22a89222d153bc06e7b0d6d746f68950931e9db | 676 | py | Python | backend/user/migrations/0001_initial.py | HarsimratBhundar/gym-buddy | 5dba08ad2a70be724ff31f1783c287d8fbab0817 | [
"Apache-2.0"
] | null | null | null | backend/user/migrations/0001_initial.py | HarsimratBhundar/gym-buddy | 5dba08ad2a70be724ff31f1783c287d8fbab0817 | [
"Apache-2.0"
] | 8 | 2021-03-19T01:36:30.000Z | 2021-09-22T18:50:35.000Z | backend/user/migrations/0001_initial.py | HarsimratBhundar/gym-buddy | 5dba08ad2a70be724ff31f1783c287d8fbab0817 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.0.4 on 2020-05-03 22:27
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='UserInfo',
fields=[
... | 27.04 | 114 | 0.600592 |
2943ec3bd296c7bd907820fc671bb25bd7a2758b | 3,379 | py | Python | SistemaWebAuditorias/SistemaWebAuditorias/settings.py | diegoquirozramirez/Sistema-Web-Auditorias | d070a7c85a9dad1740dea5bc397fd3cfb3735ba8 | [
"MIT"
] | null | null | null | SistemaWebAuditorias/SistemaWebAuditorias/settings.py | diegoquirozramirez/Sistema-Web-Auditorias | d070a7c85a9dad1740dea5bc397fd3cfb3735ba8 | [
"MIT"
] | null | null | null | SistemaWebAuditorias/SistemaWebAuditorias/settings.py | diegoquirozramirez/Sistema-Web-Auditorias | d070a7c85a9dad1740dea5bc397fd3cfb3735ba8 | [
"MIT"
] | null | null | null | """
Django settings for SistemaWebAuditorias project.
Generated by 'django-admin startproject' using Django 2.0.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.0/ref/settings/
"""
i... | 25.598485 | 91 | 0.699023 |
8e1efc3c929281be7d344db0ab619e2a0cef3980 | 6,768 | py | Python | ixnetwork_restpy/testplatform/sessions/ixnetwork/locations/resourcegroups/resourcegroups.py | OpenIxia/ixnetwork_restpy | f628db450573a104f327cf3c737ca25586e067ae | [
"MIT"
] | 20 | 2019-05-07T01:59:14.000Z | 2022-02-11T05:24:47.000Z | ixnetwork_restpy/testplatform/sessions/ixnetwork/locations/resourcegroups/resourcegroups.py | OpenIxia/ixnetwork_restpy | f628db450573a104f327cf3c737ca25586e067ae | [
"MIT"
] | 60 | 2019-04-03T18:59:35.000Z | 2022-02-22T12:05:05.000Z | ixnetwork_restpy/testplatform/sessions/ixnetwork/locations/resourcegroups/resourcegroups.py | OpenIxia/ixnetwork_restpy | f628db450573a104f327cf3c737ca25586e067ae | [
"MIT"
] | 13 | 2019-05-20T10:48:31.000Z | 2021-10-06T07:45:44.000Z | # MIT LICENSE
#
# Copyright 1997 - 2020 by IXIA Keysight
#
# 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 rights to use, copy, modify,... | 52.061538 | 1,073 | 0.734781 |
6cfdf86ace113e6b02abf68cc78e0b4c0e49cbd3 | 1,121 | py | Python | src/metric/metric.py | liyingben/kaggle-airbus-ship-detection | 21d89b2f1273b31a6ffafb4fe5f7e643ffbbc567 | [
"MIT"
] | 5 | 2019-03-31T18:55:30.000Z | 2020-07-01T11:53:17.000Z | src/metric/metric.py | davidtvs/kaggle-airbus-ship-detection | 21d89b2f1273b31a6ffafb4fe5f7e643ffbbc567 | [
"MIT"
] | null | null | null | src/metric/metric.py | davidtvs/kaggle-airbus-ship-detection | 21d89b2f1273b31a6ffafb4fe5f7e643ffbbc567 | [
"MIT"
] | 8 | 2018-12-18T03:57:18.000Z | 2021-07-17T10:59:35.000Z | class Metric(object):
"""Base class for all metrics.
From: https://github.com/pytorch/tnt/blob/master/torchnet/meter/meter.py
Arguments:
name (str): a name for the metric. Default: miou.
"""
def __init__(self, name):
self.name = name
def reset(self):
pass
def add... | 22.877551 | 81 | 0.579839 |
6932d3ad69fcf143245b7643eddf9d61ee2b5c9b | 9,764 | py | Python | venv/lib/python2.7/site-packages/ansible/modules/web_infrastructure/ansible_tower/tower_credential.py | haind27/test01 | 7f86c0a33eb0874a6c3f5ff9a923fd0cfc8ef852 | [
"MIT"
] | null | null | null | venv/lib/python2.7/site-packages/ansible/modules/web_infrastructure/ansible_tower/tower_credential.py | haind27/test01 | 7f86c0a33eb0874a6c3f5ff9a923fd0cfc8ef852 | [
"MIT"
] | null | null | null | venv/lib/python2.7/site-packages/ansible/modules/web_infrastructure/ansible_tower/tower_credential.py | haind27/test01 | 7f86c0a33eb0874a6c3f5ff9a923fd0cfc8ef852 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# coding: utf-8 -*-
# (c) 2017, Wayne Witzel III <wayne@riotousliving.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1... | 32.875421 | 150 | 0.604568 |
4431c7b7fb33b4c64e021712ab989a2788bb33e1 | 17,144 | py | Python | prov/serializers/provxml.py | krischer/prov | 26965dcc7147e4b37a5ae4ba327467c6429cb3d3 | [
"MIT"
] | null | null | null | prov/serializers/provxml.py | krischer/prov | 26965dcc7147e4b37a5ae4ba327467c6429cb3d3 | [
"MIT"
] | null | null | null | prov/serializers/provxml.py | krischer/prov | 26965dcc7147e4b37a5ae4ba327467c6429cb3d3 | [
"MIT"
] | null | null | null | from __future__ import (absolute_import, division, print_function,
unicode_literals)
__author__ = 'Lion Krischer'
__email__ = 'krischer@geophysik.uni-muenchen.de'
import datetime
import logging
from lxml import etree
import io
import warnings
import six
logger = logging.getLogger(__name__)
i... | 42.330864 | 112 | 0.555705 |
031d4e7b8b83e309f8173eac04d56324e860a832 | 1,074 | py | Python | python/openassetio/hostAPI/__init__.py | j-helman/OpenAssetIO | fd4f23d37dfc104a68f906804846d60b6d78b839 | [
"Apache-2.0"
] | null | null | null | python/openassetio/hostAPI/__init__.py | j-helman/OpenAssetIO | fd4f23d37dfc104a68f906804846d60b6d78b839 | [
"Apache-2.0"
] | 1 | 2021-11-25T12:24:36.000Z | 2021-11-25T18:01:58.000Z | python/openassetio/hostAPI/__init__.py | j-helman/OpenAssetIO | fd4f23d37dfc104a68f906804846d60b6d78b839 | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2013-2021 [The Foundry Visionmongers Ltd]
#
# 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 a... | 38.357143 | 99 | 0.770019 |
d469a7b50ea4dbec0814d820030902b17c448718 | 6,218 | py | Python | ee/clickhouse/queries/column_optimizer.py | csmatar/posthog | 4587cfe18625f302726c531f06a32c18e9749e9d | [
"MIT"
] | null | null | null | ee/clickhouse/queries/column_optimizer.py | csmatar/posthog | 4587cfe18625f302726c531f06a32c18e9749e9d | [
"MIT"
] | 15 | 2021-11-09T10:49:34.000Z | 2021-11-09T16:11:01.000Z | ee/clickhouse/queries/column_optimizer.py | csmatar/posthog | 4587cfe18625f302726c531f06a32c18e9749e9d | [
"MIT"
] | null | null | null | from typing import Counter, List, Set, Union, cast
from ee.clickhouse.materialized_columns.columns import ColumnName, get_materialized_columns
from ee.clickhouse.models.action import get_action_tables_and_properties, uses_elements_chain
from ee.clickhouse.models.property import extract_tables_and_properties
from posth... | 48.20155 | 120 | 0.708749 |
cc85635b47ba3f89647e9ff30472f973a6b773da | 1,867 | py | Python | homework4/homework4/homework4/Homework4.py | Gaon-Choi/ITE2038_ | f09336a4a552bee9d7e6970642030dd729aa2234 | [
"MIT"
] | null | null | null | homework4/homework4/homework4/Homework4.py | Gaon-Choi/ITE2038_ | f09336a4a552bee9d7e6970642030dd729aa2234 | [
"MIT"
] | null | null | null | homework4/homework4/homework4/Homework4.py | Gaon-Choi/ITE2038_ | f09336a4a552bee9d7e6970642030dd729aa2234 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# # Homework04. B+tree Deletion 구현하기
# ### 0. Tree 생성
from bplustree import BPlusTree
from bplustree.serializer import (IntSerializer, StrSerializer, UUIDSerializer, DatetimeUTCSerializer)
import os
if os.path.exists("database/homework04.db"):
os.remove("database/homework... | 20.977528 | 102 | 0.649705 |
1c0e252ec9d4f7b6bf6bed38929a9581588b2188 | 4,823 | py | Python | tests/layer1/test_layer_speed_Novus_100G_multi_speeds.py | open-traffic-generator/snappi-tests | 820fac62ca7263a441f7199159b20b42050a44bb | [
"MIT"
] | 2 | 2021-08-05T05:23:58.000Z | 2022-01-26T16:52:15.000Z | tests/layer1/test_layer_speed_Novus_100G_multi_speeds.py | open-traffic-generator/snappi-tests | 820fac62ca7263a441f7199159b20b42050a44bb | [
"MIT"
] | 9 | 2021-04-06T14:53:02.000Z | 2022-03-07T05:35:28.000Z | tests/layer1/test_layer_speed_Novus_100G_multi_speeds.py | open-traffic-generator/snappi-tests | 820fac62ca7263a441f7199159b20b42050a44bb | [
"MIT"
] | 1 | 2022-03-10T07:35:41.000Z | 2022-03-10T07:35:41.000Z | import pytest
@pytest.mark.l1_manual
@pytest.mark.parametrize(
"speed",
["speed_10_gbps", "speed_25_gbps", "speed_40_gbps", "speed_100_gbps"],
)
def test_layer1(api, utils, speed):
"""Test that layer1 configuration settings are being applied correctly
A user should be able to configure ports with/with... | 32.809524 | 79 | 0.66017 |
a08727e3aa3d86256dcd1026f9fd71799e3c8f22 | 5,051 | py | Python | oblib/tests/test_validator.py | michael-bbs/pyoblib | f7f11d455809d80b7701fa89b69995dc703dfbab | [
"Apache-2.0"
] | null | null | null | oblib/tests/test_validator.py | michael-bbs/pyoblib | f7f11d455809d80b7701fa89b69995dc703dfbab | [
"Apache-2.0"
] | null | null | null | oblib/tests/test_validator.py | michael-bbs/pyoblib | f7f11d455809d80b7701fa89b69995dc703dfbab | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 SunSpec Alliance
# 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,... | 49.519608 | 103 | 0.643041 |
a3fca0220c11aa4c670dde141da04602572c6749 | 370 | py | Python | backend/app/api/server.py | marcelopalin/fast_api_tutorial | 073377ac008ecc1f63bbd7e77f024494a8d36cbb | [
"MIT"
] | null | null | null | backend/app/api/server.py | marcelopalin/fast_api_tutorial | 073377ac008ecc1f63bbd7e77f024494a8d36cbb | [
"MIT"
] | null | null | null | backend/app/api/server.py | marcelopalin/fast_api_tutorial | 073377ac008ecc1f63bbd7e77f024494a8d36cbb | [
"MIT"
] | null | null | null | from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
def get_application():
app = FastAPI(title="Palin", version="1.0.0")
app.add_middleware(
CORSMiddleware,
allow_origins=["*"],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"]... | 18.5 | 50 | 0.635135 |
df3362f1231fdde5d9e12fa1917ef1f63fc4a7a8 | 6,075 | py | Python | mlflow/tracking/_tracking_service/utils.py | brightsparc/mlflow | 31e4f969d3b65a2fd3e246e88a23433b72904d49 | [
"Apache-2.0"
] | 2 | 2020-09-15T14:19:27.000Z | 2021-05-21T09:59:02.000Z | mlflow/tracking/_tracking_service/utils.py | brightsparc/mlflow | 31e4f969d3b65a2fd3e246e88a23433b72904d49 | [
"Apache-2.0"
] | 36 | 2019-04-11T21:45:45.000Z | 2022-03-11T05:05:16.000Z | mlflow/tracking/_tracking_service/utils.py | brightsparc/mlflow | 31e4f969d3b65a2fd3e246e88a23433b72904d49 | [
"Apache-2.0"
] | 2 | 2020-06-28T01:39:36.000Z | 2022-01-06T17:26:50.000Z | import os
import sys
from functools import partial
from mlflow.store.tracking import DEFAULT_LOCAL_FILE_AND_ARTIFACT_PATH
from mlflow.store.db.db_types import DATABASE_ENGINES
from mlflow.store.tracking.file_store import FileStore
from mlflow.store.tracking.rest_store import RestStore, DatabricksRestStore
from mlflow.... | 35.946746 | 97 | 0.732675 |
b430312a5d1d3018bd48e75b4ded8426fab30de1 | 1,282 | py | Python | oxe-api/test/resource/article/test_delete_article.py | CybersecurityLuxembourg/openxeco | 8d4e5578bde6a07f5d6d569b16b4de224abf7bf0 | [
"BSD-2-Clause"
] | null | null | null | oxe-api/test/resource/article/test_delete_article.py | CybersecurityLuxembourg/openxeco | 8d4e5578bde6a07f5d6d569b16b4de224abf7bf0 | [
"BSD-2-Clause"
] | null | null | null | oxe-api/test/resource/article/test_delete_article.py | CybersecurityLuxembourg/openxeco | 8d4e5578bde6a07f5d6d569b16b4de224abf7bf0 | [
"BSD-2-Clause"
] | null | null | null | from test.BaseCase import BaseCase
class TestDeleteArticle(BaseCase):
@BaseCase.login
@BaseCase.grant_access("/article/delete_article")
def test_ok(self, token):
self.db.insert({"id": 1, "title": "TITLE"}, self.db.tables["Article"])
self.db.insert({"id": 1, "article_id": 1, "name": "VERSI... | 35.611111 | 105 | 0.574883 |
3f44681f4e03b74d3838401a9d1a88ae42e903f3 | 5,813 | py | Python | earth_enterprise/src/google/protobuf-py/google/protobuf/reflection.py | ezeeyahoo/earthenterprise | b6cac9e6228946f2f17d1edb75e118aeb3e8e8c9 | [
"Apache-2.0"
] | 2,661 | 2017-03-20T22:12:50.000Z | 2022-03-30T09:43:19.000Z | earth_enterprise/src/google/protobuf-py/google/protobuf/reflection.py | ezeeyahoo/earthenterprise | b6cac9e6228946f2f17d1edb75e118aeb3e8e8c9 | [
"Apache-2.0"
] | 1,531 | 2017-03-24T17:20:32.000Z | 2022-03-16T18:11:14.000Z | earth_enterprise/src/google/protobuf-py/google/protobuf/reflection.py | ezeeyahoo/earthenterprise | b6cac9e6228946f2f17d1edb75e118aeb3e8e8c9 | [
"Apache-2.0"
] | 990 | 2017-03-24T11:54:28.000Z | 2022-03-22T11:51:47.000Z | # Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# http://code.google.com/p/protobuf/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions o... | 40.93662 | 80 | 0.761397 |
681f6e65fe99fa59d856378b04ff4ad72d72236a | 139 | py | Python | heap_study.py | ruchirbhai/SortingAlgos | 8afdfa25c979a4de9a9b59a93c11f67bec47e6f7 | [
"MIT"
] | null | null | null | heap_study.py | ruchirbhai/SortingAlgos | 8afdfa25c979a4de9a9b59a93c11f67bec47e6f7 | [
"MIT"
] | null | null | null | heap_study.py | ruchirbhai/SortingAlgos | 8afdfa25c979a4de9a9b59a93c11f67bec47e6f7 | [
"MIT"
] | null | null | null | import heapq
H = [21,1,45,78,3,55,5,5,0,5,]
# Use heapify to rearrange the elements
heapq.heapify(H)
print(H)
heapq.heappush(H,2)
print(H) | 17.375 | 39 | 0.705036 |
ba911456215c0bcf129e34d9f374ed90670bc32b | 16,044 | py | Python | satt/visualize/backend/db_import.py | jnippula/satt | aff4562b7e94f095d2e13eb10b9ac872484bb5cd | [
"Apache-2.0"
] | 54 | 2016-11-09T13:26:40.000Z | 2019-04-30T16:29:45.000Z | satt/visualize/backend/db_import.py | jnippula/satt | aff4562b7e94f095d2e13eb10b9ac872484bb5cd | [
"Apache-2.0"
] | 2 | 2016-11-09T13:25:19.000Z | 2017-03-27T04:09:35.000Z | satt/visualize/backend/db_import.py | jnippula/satt | aff4562b7e94f095d2e13eb10b9ac872484bb5cd | [
"Apache-2.0"
] | 10 | 2016-11-28T07:55:40.000Z | 2019-03-23T12:40:36.000Z | '''
// Copyright (c) 2015 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 applicable law o... | 36.463636 | 124 | 0.57467 |
d04dcb56949dcba445d6596297c054b9121f2958 | 1,231 | py | Python | examples/dfp/v201802/user_service/get_current_user.py | christineyi3898/googleads-python-lib | cd707dc897b93cf1bbb19355f7424e7834e7fb55 | [
"Apache-2.0"
] | 1 | 2019-10-21T04:10:22.000Z | 2019-10-21T04:10:22.000Z | examples/dfp/v201802/user_service/get_current_user.py | christineyi3898/googleads-python-lib | cd707dc897b93cf1bbb19355f7424e7834e7fb55 | [
"Apache-2.0"
] | null | null | null | examples/dfp/v201802/user_service/get_current_user.py | christineyi3898/googleads-python-lib | cd707dc897b93cf1bbb19355f7424e7834e7fb55 | [
"Apache-2.0"
] | 1 | 2019-10-21T04:10:51.000Z | 2019-10-21T04:10:51.000Z | #!/usr/bin/env python
#
# Copyright 2017 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 requir... | 30.775 | 74 | 0.714866 |
b74c0756ec3a3036441bfcf65f782cd82b62626a | 6,863 | py | Python | other/Convolution/ResNeSt Block.py | yangninghua/code_library | b769abecb4e0cbdbbb5762949c91847a0f0b3c5a | [
"MIT"
] | null | null | null | other/Convolution/ResNeSt Block.py | yangninghua/code_library | b769abecb4e0cbdbbb5762949c91847a0f0b3c5a | [
"MIT"
] | null | null | null | other/Convolution/ResNeSt Block.py | yangninghua/code_library | b769abecb4e0cbdbbb5762949c91847a0f0b3c5a | [
"MIT"
] | null | null | null | '''
Components
'''
import torch
import torch.nn as nn
import torch.nn.functional as F
# source: https://github.com/STomoya/ResNeSt/blob/master/resnest/layers.py
'''
basic layers
'''
class GlobalAvgPool2d(nn.Module):
'''
global average pooling 2D class
'''
def __init__(self):
super(GlobalAvgPo... | 24.956364 | 136 | 0.473554 |
b2e6e53995ddc325d40f873f2a41421c51ae5bff | 280 | py | Python | django_sample/polls/tests/utils.py | butla/experiments | 8c8ade15bb01978763d6618342fa42ad7563e38f | [
"MIT"
] | 1 | 2020-06-01T02:41:45.000Z | 2020-06-01T02:41:45.000Z | django_sample/polls/tests/utils.py | butla/experiments | 8c8ade15bb01978763d6618342fa42ad7563e38f | [
"MIT"
] | 48 | 2019-12-26T16:38:19.000Z | 2021-07-06T13:29:50.000Z | django_sample/polls/tests/utils.py | butla/experiments | 8c8ade15bb01978763d6618342fa42ad7563e38f | [
"MIT"
] | null | null | null | import datetime
from django.utils import timezone
from polls.models import Question
def create_question(text: str, days_old: int = 0):
creation_date = timezone.now() - datetime.timedelta(days=days_old)
return Question.objects.create(text=text, pub_date=creation_date)
| 25.454545 | 70 | 0.778571 |
53564993da916daa06119dd8e0879748598e899f | 23,276 | py | Python | homeassistant/components/recorder/history.py | mtarjoianu/core | 44e9146463ac505eb3d1c0651ad126cb25c28a54 | [
"Apache-2.0"
] | 1 | 2022-02-21T05:50:41.000Z | 2022-02-21T05:50:41.000Z | homeassistant/components/recorder/history.py | mtarjoianu/core | 44e9146463ac505eb3d1c0651ad126cb25c28a54 | [
"Apache-2.0"
] | 25 | 2021-10-02T10:01:14.000Z | 2022-03-31T06:11:49.000Z | homeassistant/components/recorder/history.py | mtarjoianu/core | 44e9146463ac505eb3d1c0651ad126cb25c28a54 | [
"Apache-2.0"
] | 1 | 2021-12-10T10:33:28.000Z | 2021-12-10T10:33:28.000Z | """Provide pre-made queries on top of the recorder component."""
from __future__ import annotations
from collections import defaultdict
from collections.abc import Iterable, Iterator, MutableMapping
from datetime import datetime
from itertools import groupby
import logging
import time
from typing import Any, cast
fro... | 33.930029 | 96 | 0.646202 |
22b3dab62002250b570e7170cc30ad8d3358e2a5 | 4,619 | py | Python | extremes/event_attributes.py | brianpm/TemperatureExtremes | 28823d8029b29e54ddd88693fece8003c63c1a13 | [
"MIT"
] | 2 | 2020-07-23T21:30:00.000Z | 2021-07-19T21:17:02.000Z | extremes/event_attributes.py | brianpm/TemperatureExtremes | 28823d8029b29e54ddd88693fece8003c63c1a13 | [
"MIT"
] | null | null | null | extremes/event_attributes.py | brianpm/TemperatureExtremes | 28823d8029b29e54ddd88693fece8003c63c1a13 | [
"MIT"
] | null | null | null | import numpy as np
import xarray as xr
import logging
try:
from tqdm import tqdm
except ImportError:
import getpass
print(f"{getpass.getuser()}, you were supposed to install tqdm!")
def tqdm(*args):
return args[0]
from utils import save_ds
logging.basicConfig(level=logging.INFO)
def theloop(a... | 37.860656 | 216 | 0.655553 |
5d677a04fd718b8686e58f747b364777f5484afa | 1,403 | py | Python | website/__init__.py | cangkevin/asain-show-rss-website-wrapper | ca7953e2b764705d1a78c691e1920b2f632e6bc9 | [
"MIT"
] | null | null | null | website/__init__.py | cangkevin/asain-show-rss-website-wrapper | ca7953e2b764705d1a78c691e1920b2f632e6bc9 | [
"MIT"
] | 46 | 2018-12-16T02:38:34.000Z | 2021-06-01T22:44:45.000Z | website/__init__.py | cangkevin/asain-show-rss-website-wrapper | ca7953e2b764705d1a78c691e1920b2f632e6bc9 | [
"MIT"
] | 1 | 2019-01-06T04:13:51.000Z | 2019-01-06T04:13:51.000Z | """
This module contains the initialization logic for the flask application
"""
from logging.config import dictConfig
dictConfig(
{
"version": 1,
"formatters": {
"default": {
"format": "[%(asctime)s] %(levelname)s in %(module)s: %(message)s",
}
},
... | 28.632653 | 83 | 0.627227 |
f23f85e4b5711219fb291eb65e512a36f9c95c04 | 21,954 | py | Python | test/functional/name_encodings.py | davidreband/doichain-core | 4389bbb1c898a62a83e5f2825a5fa12c44aaa07d | [
"MIT"
] | 9 | 2020-05-20T06:25:09.000Z | 2022-02-07T08:39:39.000Z | test/functional/name_encodings.py | davidreband/doichain-core | 4389bbb1c898a62a83e5f2825a5fa12c44aaa07d | [
"MIT"
] | 6 | 2021-08-18T09:13:42.000Z | 2022-01-27T18:47:57.000Z | test/functional/name_encodings.py | davidreband/doichain-core | 4389bbb1c898a62a83e5f2825a5fa12c44aaa07d | [
"MIT"
] | 7 | 2020-06-17T01:55:37.000Z | 2022-01-28T02:05:54.000Z | #!/usr/bin/env python3
# Copyright (c) 2018-2019 Daniel Kraft
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
# Tests the name/value encoding options in the RPC interface.
from test_framework.names import NameTestFramework
fr... | 35.7557 | 80 | 0.638016 |
cb60f7581d384ca52d4598fea4b9e350b0db2ce8 | 3,162 | py | Python | tests/framework_falcon/test_application.py | newrelic/newrelic-python-agen | 4f292ec1219c0daffc5721a7b3a245b97d0f83ba | [
"Apache-2.0"
] | 92 | 2020-06-12T17:53:23.000Z | 2022-03-01T11:13:21.000Z | tests/framework_falcon/test_application.py | newrelic/newrelic-python-agen | 4f292ec1219c0daffc5721a7b3a245b97d0f83ba | [
"Apache-2.0"
] | 347 | 2020-07-10T00:10:19.000Z | 2022-03-31T17:58:56.000Z | tests/framework_falcon/test_application.py | newrelic/newrelic-python-agen | 4f292ec1219c0daffc5721a7b3a245b97d0f83ba | [
"Apache-2.0"
] | 58 | 2020-06-17T13:51:57.000Z | 2022-03-06T14:26:53.000Z | # Copyright 2010 New Relic, 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 writ... | 30.699029 | 75 | 0.72802 |
b00518e0062e9841c33ef2308ea8c188314a1fc8 | 2,134 | py | Python | Demo/tkinter/matt/rubber-band-box-demo-1.py | cemeyer/tauthon | 2c3328c5272cffa2a544542217181c5828afa7ed | [
"PSF-2.0"
] | 2,293 | 2015-01-02T12:46:10.000Z | 2022-03-29T09:45:43.000Z | python/src/Demo/tkinter/matt/rubber-band-box-demo-1.py | weiqiangzheng/sl4a | d3c17dca978cbeee545e12ea240a9dbf2a6999e9 | [
"Apache-2.0"
] | 315 | 2015-05-31T11:55:46.000Z | 2022-01-12T08:36:37.000Z | python/src/Demo/tkinter/matt/rubber-band-box-demo-1.py | weiqiangzheng/sl4a | d3c17dca978cbeee545e12ea240a9dbf2a6999e9 | [
"Apache-2.0"
] | 1,033 | 2015-01-04T07:48:40.000Z | 2022-03-24T09:34:37.000Z | from Tkinter import *
class Test(Frame):
def printit(self):
print "hi"
def createWidgets(self):
self.QUIT = Button(self, text='QUIT',
background='red',
foreground='white',
height=3,
... | 36.169492 | 79 | 0.605436 |
aea24af018d1ceebb9cf14869f8cb701b287ecbc | 13,129 | py | Python | google/cloud/aiplatform_v1/services/vizier_service/transports/base.py | lclc19/python-aiplatform | d8da2e365277441abadb04328943f23345d72b0e | [
"Apache-2.0"
] | null | null | null | google/cloud/aiplatform_v1/services/vizier_service/transports/base.py | lclc19/python-aiplatform | d8da2e365277441abadb04328943f23345d72b0e | [
"Apache-2.0"
] | null | null | null | google/cloud/aiplatform_v1/services/vizier_service/transports/base.py | lclc19/python-aiplatform | d8da2e365277441abadb04328943f23345d72b0e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 35.67663 | 103 | 0.650392 |
5e9f9effef5cbbca19b8b373e4e54b62480583bb | 6,542 | py | Python | nrm_analysis/tests/test_psf_offset.py | agreenbaum/nrm_analysis | 4c7dfd9df6e6b14002266ecc984214e95f8a4ef8 | [
"BSD-3-Clause"
] | 2 | 2020-01-22T21:08:31.000Z | 2022-01-21T16:34:26.000Z | nrm_analysis/tests/test_psf_offset.py | agreenbaum/nrm_analysis | 4c7dfd9df6e6b14002266ecc984214e95f8a4ef8 | [
"BSD-3-Clause"
] | 2 | 2019-03-04T15:33:49.000Z | 2019-10-23T15:02:03.000Z | nrm_analysis/tests/test_psf_offset.py | agreenbaum/nrm_analysis | 4c7dfd9df6e6b14002266ecc984214e95f8a4ef8 | [
"BSD-3-Clause"
] | 7 | 2018-10-05T16:11:24.000Z | 2021-03-22T13:01:02.000Z | import unittest
import os
import glob
import sys
import numpy as np
from astropy.io import fits
from astropy import units as u
#from nrm_analysis.misctools.utils import Affine2d
from nrm_analysis.misctools.utils import affinepars2header
from nrm_analysis.fringefitting.LG_Model import NRM_Model
from nrm_analysis.fringe... | 39.890244 | 136 | 0.564506 |
7173d0e303c55dde67e2882544d87e5cd5a5194a | 1,976 | py | Python | src/SnmpLibrary/utils.py | kontron/robotframework-snmplibrary | d0ff78a1f642b09a81430564e40a4f71b69ae375 | [
"Apache-2.0"
] | 13 | 2015-09-13T07:01:07.000Z | 2022-01-17T00:50:08.000Z | src/SnmpLibrary/utils.py | kontron/robotframework-snmplibrary | d0ff78a1f642b09a81430564e40a4f71b69ae375 | [
"Apache-2.0"
] | 14 | 2015-05-13T13:35:56.000Z | 2021-12-03T16:00:08.000Z | src/SnmpLibrary/utils.py | kontron/robotframework-snmplibrary | d0ff78a1f642b09a81430564e40a4f71b69ae375 | [
"Apache-2.0"
] | 13 | 2015-05-28T14:55:44.000Z | 2021-08-10T07:43:08.000Z | # Copyright 2014-2015 Kontron Europe GmbH
#
# 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... | 25.662338 | 74 | 0.609312 |
c8ae8c331b33c67178325b72eef5a4511e931cb0 | 106 | py | Python | BlueBlisteringBarnacles/main.py | nedla2004/ACL | 968d9f8af1f7b272da204eea00ae248469b1b685 | [
"MIT"
] | null | null | null | BlueBlisteringBarnacles/main.py | nedla2004/ACL | 968d9f8af1f7b272da204eea00ae248469b1b685 | [
"MIT"
] | null | null | null | BlueBlisteringBarnacles/main.py | nedla2004/ACL | 968d9f8af1f7b272da204eea00ae248469b1b685 | [
"MIT"
] | null | null | null | import numpy
print('This is Python 2')
print('Hello, World')
print('This is so cool!')
print(numpy.array)
| 17.666667 | 25 | 0.716981 |
6bfe07228e3f2f63890533c9d083b27bd286e06f | 1,982 | py | Python | src/handler.py | morphologue/PrAutolabeller | b01fb199a073490cb2802476431f77ae9a4d3b72 | [
"MIT"
] | null | null | null | src/handler.py | morphologue/PrAutolabeller | b01fb199a073490cb2802476431f77ae9a4d3b72 | [
"MIT"
] | 2 | 2021-03-27T09:06:01.000Z | 2021-03-28T05:55:42.000Z | src/handler.py | morphologue/PrAutolabeller | b01fb199a073490cb2802476431f77ae9a4d3b72 | [
"MIT"
] | null | null | null | import os
import hmac
import json
import github
import strategy_context
def handle(event, context):
"""Handle GitHub PR webhook by adding labels to the PR based on the team of the author and/or
the paths changed. The mapping from team/paths to labels comes from the environment.
"""
# Check GitHub's si... | 38.115385 | 97 | 0.657921 |
3e307dcfbed1854bdc784ec5687a769f523106db | 336 | py | Python | python/topos/core-edge.py | ederlf/paper-sigsim-pads-18 | 27c9959c0782cc5edc56a3051709a05c89e6b139 | [
"BSD-3-Clause"
] | 7 | 2018-07-06T09:29:04.000Z | 2022-03-01T16:53:43.000Z | python/topos/core-edge.py | ederlf/paper-sigsim-pads-18 | 27c9959c0782cc5edc56a3051709a05c89e6b139 | [
"BSD-3-Clause"
] | null | null | null | python/topos/core-edge.py | ederlf/paper-sigsim-pads-18 | 27c9959c0782cc5edc56a3051709a05c89e6b139 | [
"BSD-3-Clause"
] | 1 | 2018-07-12T20:08:17.000Z | 2018-07-12T20:08:17.000Z | from horse import *
topo = Topology()
edge1 = SDNSwitch(1)
topo.add_node(edge1)
edge1.add_port(5, "00:00:00:00:00:01")
for i in range(0, 4):
sw = SDNSwitch(2 * (i**i))
edge1.add_port(i+1, "00:00:00:00:00:01")
sw.add_port(1, "00:00:00:00:00:01")
topo.add_node(sw)
topo.add_link(edge1, sw, i+1, 1)
... | 16.8 | 44 | 0.616071 |
9a3e83369454987ae6a432676e77c7121f9ad979 | 25,391 | py | Python | heat_integrationtests/functional/test_template_resource.py | jasondunsmore/heat | 6bd7352dc4838b8ef782f2345a4dfdf57ba3e356 | [
"Apache-2.0"
] | null | null | null | heat_integrationtests/functional/test_template_resource.py | jasondunsmore/heat | 6bd7352dc4838b8ef782f2345a4dfdf57ba3e356 | [
"Apache-2.0"
] | null | null | null | heat_integrationtests/functional/test_template_resource.py | jasondunsmore/heat | 6bd7352dc4838b8ef782f2345a4dfdf57ba3e356 | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | 27.069296 | 78 | 0.62849 |
02e654944f59c2e65ce05f2e37fd5644b332482e | 9,450 | py | Python | docs/conf.py | jamesaffeld/f5-gsts-labs-ansible-cookbook | 703dc4d840767e08245d217e5d6ca50599043cdf | [
"MIT"
] | null | null | null | docs/conf.py | jamesaffeld/f5-gsts-labs-ansible-cookbook | 703dc4d840767e08245d217e5d6ca50599043cdf | [
"MIT"
] | null | null | null | docs/conf.py | jamesaffeld/f5-gsts-labs-ansible-cookbook | 703dc4d840767e08245d217e5d6ca50599043cdf | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
#
# BEGIN CONFIG
# ------------
#
# REQUIRED: Your class/lab name
classname = "F5 Labs for Ansible Cookbooks"
# OPTIONAL: The URL to the GitHub Repository for this class
github_repo = "https://github.com/f5devcentral/f5-gsts-labs-ansible-cookbook"
# OPTIONAL: Google Analytics
# googleanalyti... | 29.716981 | 94 | 0.683069 |
aecfa7cbb14b5398dc4e3c5aa55476a4a2598d1c | 2,335 | py | Python | Lib/site-packages/opensurfacesim/decoders/unionfind/__init__.py | fochoao/cpython | 3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9 | [
"bzip2-1.0.6",
"0BSD"
] | null | null | null | Lib/site-packages/opensurfacesim/decoders/unionfind/__init__.py | fochoao/cpython | 3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9 | [
"bzip2-1.0.6",
"0BSD"
] | 20 | 2021-05-03T18:02:23.000Z | 2022-03-12T12:01:04.000Z | Lib/site-packages/opensurfacesim/decoders/unionfind/__init__.py | fochoao/cpython | 3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9 | [
"bzip2-1.0.6",
"0BSD"
] | null | null | null | """
The Union-Find decoder [delfosse2017almost]_ maps each element of the syndrome :math:`\sigma` to an ancilla :math:`v` in a non-connected graph defined on the code lattice. From this starting point, it grows clusters around these ancillas by repeatedly adding a layer of edges and ancillas to existing clusters, until... | 212.272727 | 1,194 | 0.781156 |
f40d43260d83e64f8b95ed7c334f62d0dd34b00b | 3,846 | py | Python | misc/wapiti-2.3.0/wapitiCore/file/vulnerabilityxmlparser.py | sapientgov/openfda-travel | d26c105ba28c72d84549ef7f85b73758f224c354 | [
"MIT"
] | 377 | 2018-05-02T06:55:15.000Z | 2022-03-29T06:13:10.000Z | misc/wapiti-2.3.0/wapitiCore/file/vulnerabilityxmlparser.py | sapientgov/openfda-travel | d26c105ba28c72d84549ef7f85b73758f224c354 | [
"MIT"
] | 16 | 2018-05-02T11:37:15.000Z | 2021-12-27T17:04:15.000Z | misc/wapiti-2.3.0/wapitiCore/file/vulnerabilityxmlparser.py | sapientgov/openfda-travel | d26c105ba28c72d84549ef7f85b73758f224c354 | [
"MIT"
] | 91 | 2018-05-03T02:05:15.000Z | 2022-03-29T15:45:58.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# This file is part of the Wapiti project (http://wapiti.sourceforge.net)
# Copyright (C) 2008-2013 Nicolas Surribas
#
# Original author :
# David del Pozo
# Alberto Pastor
# Copyright (C) 2008 Informatica Gesfor
# ICT Romulus (http://www.ict-romulus.eu)
#
# This program is... | 35.284404 | 76 | 0.670307 |
e16356decd2de1f0cdbf3a0b56c6a12163fc03a7 | 18,951 | py | Python | setup.py | derekgengenbacher-wf/Arelle-1 | 192c72b51997021fec9dbb8b0f0ab23622c174fa | [
"Apache-2.0"
] | null | null | null | setup.py | derekgengenbacher-wf/Arelle-1 | 192c72b51997021fec9dbb8b0f0ab23622c174fa | [
"Apache-2.0"
] | null | null | null | setup.py | derekgengenbacher-wf/Arelle-1 | 192c72b51997021fec9dbb8b0f0ab23622c174fa | [
"Apache-2.0"
] | null | null | null | """
Created on Jan 30, 2011
@author: Mark V Systems Limited
(c) Copyright 2011 Mark V Systems Limited, All rights reserved.
pip3.9 or python3.9 -m pip (followed by install below)
>> windows only may need install wheel
install lxml pg8000 pymysql pyodbc
>> windows only install cx_Oracle
install numpy mat... | 40.667382 | 185 | 0.6082 |
d842aad9a36080bf0d3bd7b6a450aa2942c9276b | 284 | py | Python | adding-right-info/tmp_compare_w_wo.py | liusida/thesis-bodies | dceb8a36efd2cefc611f6749a52b56b9d3572f7a | [
"MIT"
] | null | null | null | adding-right-info/tmp_compare_w_wo.py | liusida/thesis-bodies | dceb8a36efd2cefc611f6749a52b56b9d3572f7a | [
"MIT"
] | null | null | null | adding-right-info/tmp_compare_w_wo.py | liusida/thesis-bodies | dceb8a36efd2cefc611f6749a52b56b9d3572f7a | [
"MIT"
] | null | null | null | f1 = "model-ant-0-1.zip"
f2 = "model-ant-0-1-with-bodyinfo.zip"
from stable_baselines3 import PPO
def show(fname):
print(f"Showing {fname}")
model = PPO.load(fname)
p = model.policy.mlp_extractor.policy_net.parameters()
p = list(p)
print(p[0])
show(f1)
show(f2) | 20.285714 | 58 | 0.665493 |
4ee00a2fa0678fda2966c0aa4a2408817e99bcc5 | 19,193 | py | Python | statsmodels/graphics/tests/test_mosaicplot.py | timgates42/statsmodels | ab8ff09e3eb8c385214bd1575aa47b81bf53d584 | [
"BSD-3-Clause"
] | 76 | 2019-12-28T08:37:10.000Z | 2022-03-29T02:19:41.000Z | statsmodels/graphics/tests/test_mosaicplot.py | timgates42/statsmodels | ab8ff09e3eb8c385214bd1575aa47b81bf53d584 | [
"BSD-3-Clause"
] | 1 | 2019-07-29T08:35:08.000Z | 2019-07-29T08:35:08.000Z | statsmodels/graphics/tests/test_mosaicplot.py | timgates42/statsmodels | ab8ff09e3eb8c385214bd1575aa47b81bf53d584 | [
"BSD-3-Clause"
] | 35 | 2020-02-04T14:46:25.000Z | 2022-03-24T03:56:17.000Z | from statsmodels.compat.python import iterkeys, lrange, iteritems
from collections import OrderedDict
from io import BytesIO
from itertools import product
import numpy as np
import pandas as pd
import pytest
from numpy.testing import assert_, assert_raises
from statsmodels.api import datasets
# utilities for the te... | 42.93736 | 90 | 0.580837 |
3024b89b60a92004bec679bfa074836fa33bcaa7 | 4,954 | py | Python | workspace/src/rqt_common_plugins/rqt_top/src/rqt_top/node_info.py | migarstka/barc | deacfd974f251693d74b273d58d22e9fead2354f | [
"MIT"
] | 1 | 2019-01-10T22:07:07.000Z | 2019-01-10T22:07:07.000Z | workspace/src/rqt_common_plugins/rqt_top/src/rqt_top/node_info.py | migarstka/barc | deacfd974f251693d74b273d58d22e9fead2354f | [
"MIT"
] | null | null | null | workspace/src/rqt_common_plugins/rqt_top/src/rqt_top/node_info.py | migarstka/barc | deacfd974f251693d74b273d58d22e9fead2354f | [
"MIT"
] | null | null | null | # Copyright (c) 2013, Oregon State University
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of con... | 40.942149 | 94 | 0.603553 |
751d4c3aefb88e8a7f4e97303dc293de1d3e5599 | 2,366 | py | Python | python/cugraph/tests/test_k_core.py | ogreen/cugraph | d94ab29f14e6212a0c8bb5ec5fbe9e300cd57594 | [
"Apache-2.0"
] | null | null | null | python/cugraph/tests/test_k_core.py | ogreen/cugraph | d94ab29f14e6212a0c8bb5ec5fbe9e300cd57594 | [
"Apache-2.0"
] | null | null | null | python/cugraph/tests/test_k_core.py | ogreen/cugraph | d94ab29f14e6212a0c8bb5ec5fbe9e300cd57594 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019, NVIDIA CORPORATION.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 29.209877 | 74 | 0.712172 |
aa8c936bdee871c9108350fd745b42bbc28b2edd | 4,044 | py | Python | PyMermaid/sequence_diagram/sequence_diagram.py | QuattroMusic/PyMermaid | 4210d3a5fe9b77db7ba3d65d82b16b533d6ffe50 | [
"MIT"
] | 7 | 2022-03-21T21:03:38.000Z | 2022-03-29T08:10:34.000Z | PyMermaid/sequence_diagram/sequence_diagram.py | QuattroMusic/PyMermaid | 4210d3a5fe9b77db7ba3d65d82b16b533d6ffe50 | [
"MIT"
] | null | null | null | PyMermaid/sequence_diagram/sequence_diagram.py | QuattroMusic/PyMermaid | 4210d3a5fe9b77db7ba3d65d82b16b533d6ffe50 | [
"MIT"
] | null | null | null | # +---------+
# | imports |
# +---------+
import PyMermaid.sequence_diagram._internal_sequence_diagram as _internal
# +---------------+
# | add functions | -> returns an object
# +---------------+
def add_participant(name: str, type: int = 0, customId: str = "") -> _internal.Participant:
"""
==========
... | 24.658537 | 110 | 0.584322 |
9603034cd7dadb59f8746590245a7280f9d32629 | 479 | py | Python | myproject/accounts/tests/test_form_signup.py | xiaohui100/AlfonsBlog | 1c9854331129ec695df1530d8d8289e8a0d2d5fa | [
"MIT"
] | null | null | null | myproject/accounts/tests/test_form_signup.py | xiaohui100/AlfonsBlog | 1c9854331129ec695df1530d8d8289e8a0d2d5fa | [
"MIT"
] | 3 | 2020-06-05T18:11:15.000Z | 2021-06-10T20:18:28.000Z | myproject/accounts/tests/test_form_signup.py | Alfonsxh/AlfonsBlog | 1c9854331129ec695df1530d8d8289e8a0d2d5fa | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
"""
@author: Alfons
@contact: alfons_xh@163.com
@file: test_form_signup.py.py
@time: 18-3-22 下午10:01
@version: v1.0
"""
from django.test import TestCase
from ..forms import SignUpForm
class SignUpFormTest(TestCase):
def test_form_has_fields(self):
form = SignUpFor... | 22.809524 | 68 | 0.682672 |
a9086a227670823ca7200f252be07ea53cefcd44 | 185 | py | Python | PyScripts(elseIsTkinter)/ex12.py | Dario213/My-Python-Scripts | dee96e84e8a892e7a72f96c47a1f161e068572cb | [
"Apache-2.0"
] | null | null | null | PyScripts(elseIsTkinter)/ex12.py | Dario213/My-Python-Scripts | dee96e84e8a892e7a72f96c47a1f161e068572cb | [
"Apache-2.0"
] | null | null | null | PyScripts(elseIsTkinter)/ex12.py | Dario213/My-Python-Scripts | dee96e84e8a892e7a72f96c47a1f161e068572cb | [
"Apache-2.0"
] | null | null | null | age = input("How old are you? ")
height = input("How tall are you? ")
weight = input("How much do you weigh? ")
print(f"So, you are {age} old, {height} tall and {weight} heavy.")
| 30.833333 | 67 | 0.627027 |
30f6120c1a1fbd15476bb8955f1676bc593324fc | 4,485 | py | Python | pairwise_macro_synteny_blocks/pairwise_macro_synteny_blocks/__main__.py | alancleary/microservices | 6132a76aa063b749bada17fe98415cd8d5d4fb17 | [
"Apache-2.0"
] | 1 | 2021-11-22T20:52:37.000Z | 2021-11-22T20:52:37.000Z | pairwise_macro_synteny_blocks/pairwise_macro_synteny_blocks/__main__.py | alancleary/microservices | 6132a76aa063b749bada17fe98415cd8d5d4fb17 | [
"Apache-2.0"
] | 34 | 2020-09-10T17:19:00.000Z | 2021-09-14T18:26:08.000Z | pairwise_macro_synteny_blocks/pairwise_macro_synteny_blocks/__main__.py | legumeinfo/lis_gcv_microservices | 363310ed029f50c19ac4520371bb42e4d8b0454e | [
"Apache-2.0"
] | 5 | 2021-11-15T23:46:08.000Z | 2022-01-30T18:43:10.000Z | #!/usr/bin/env python
# Python
import argparse
import asyncio
import os
import uvloop
# module
import pairwise_macro_synteny_blocks
from pairwise_macro_synteny_blocks.database import connectToRedis
from pairwise_macro_synteny_blocks.grpc_server import run_grpc_server
from pairwise_macro_synteny_blocks.http_server impo... | 42.311321 | 200 | 0.758082 |
4e219715e0413a3acf3a04bc77e626a96360a434 | 11,004 | py | Python | ironic/common/image_service.py | bacaldwell/ironic | 8cefa2b73639741fe7d631835aa23dc679a46703 | [
"Apache-2.0"
] | null | null | null | ironic/common/image_service.py | bacaldwell/ironic | 8cefa2b73639741fe7d631835aa23dc679a46703 | [
"Apache-2.0"
] | null | null | null | ironic/common/image_service.py | bacaldwell/ironic | 8cefa2b73639741fe7d631835aa23dc679a46703 | [
"Apache-2.0"
] | null | null | null | # Copyright 2010 OpenStack Foundation
# Copyright 2013 Hewlett-Packard Development Company, L.P.
# 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
#
# ht... | 38.341463 | 79 | 0.632497 |
60fbafe95e6abc9ba0c671119aa59c8df79498e2 | 1,667 | py | Python | src/main/resources/confluence/addCommentToWikiPages.py | ftravaglia/xlr-confluence-plugin | dda4145a53bfa5de2307aa442207ce8610532f27 | [
"MIT"
] | null | null | null | src/main/resources/confluence/addCommentToWikiPages.py | ftravaglia/xlr-confluence-plugin | dda4145a53bfa5de2307aa442207ce8610532f27 | [
"MIT"
] | null | null | null | src/main/resources/confluence/addCommentToWikiPages.py | ftravaglia/xlr-confluence-plugin | dda4145a53bfa5de2307aa442207ce8610532f27 | [
"MIT"
] | null | null | null | #
# Copyright 2017 XEBIALABS
#
# 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 rights to use, copy, modify, merge, publish, distribute, subli... | 53.774194 | 462 | 0.806839 |
8f8400ea3bcecab5a64a5c83969fec3b0e09b4de | 54,208 | py | Python | dev/Tools/build/waf-1.7.13/lmbrwaflib/qt5.py | horvay/lumberyardtutor | 63b0681a7ed2a98d651b699984de92951721353e | [
"AML"
] | 5 | 2018-08-17T21:05:55.000Z | 2021-04-17T10:48:26.000Z | dev/Tools/build/waf-1.7.13/lmbrwaflib/qt5.py | horvay/lumberyardtutor | 63b0681a7ed2a98d651b699984de92951721353e | [
"AML"
] | null | null | null | dev/Tools/build/waf-1.7.13/lmbrwaflib/qt5.py | horvay/lumberyardtutor | 63b0681a7ed2a98d651b699984de92951721353e | [
"AML"
] | 5 | 2017-12-05T16:36:00.000Z | 2021-04-27T06:33:54.000Z | #!/usr/bin/env python
# encoding: utf-8
# Thomas Nagy, 2006-2015 (ita)
# Modifications copyright Amazon.com, Inc. or its affiliates.
"""
Tool Description
================
This tool helps with finding Qt5 tools and libraries,
and also provides syntactic sugar for using Qt5 tools.
The following snippet illustrates t... | 35.94695 | 163 | 0.598749 |
f2e6f8edb8e3689d2203ca48a39e9cd027f8cdb4 | 334 | py | Python | python/testData/packaging/PyPackageUtil/SetupPyDependencyLinksReading/setup.py | truthiswill/intellij-community | fff88cfb0dc168eea18ecb745d3e5b93f57b0b95 | [
"Apache-2.0"
] | 2 | 2019-04-28T07:48:50.000Z | 2020-12-11T14:18:08.000Z | python/testData/packaging/PyPackageUtil/SetupPyDependencyLinksReading/setup.py | truthiswill/intellij-community | fff88cfb0dc168eea18ecb745d3e5b93f57b0b95 | [
"Apache-2.0"
] | 173 | 2018-07-05T13:59:39.000Z | 2018-08-09T01:12:03.000Z | python/testData/packaging/PyPackageUtil/SetupPyDependencyLinksReading/setup.py | truthiswill/intellij-community | fff88cfb0dc168eea18ecb745d3e5b93f57b0b95 | [
"Apache-2.0"
] | 2 | 2020-03-15T08:57:37.000Z | 2020-04-07T04:48:14.000Z | from setuptools import setup
setup(name='foo',
version=0.1,
install_requires = ["sqlalchemy >=1.0.12, <1.1",
"mysql-connector-python >=2.1.3, <2.2",],
dependency_links = [
"git+https://github.com/mysql/mysql-connector-python.git@2.1.3#egg=mysql-connector-python-2.... | 37.111111 | 108 | 0.577844 |
28db78803caa727e19e072bb88fb48ec0406bafb | 586 | py | Python | DMSPsychopyFiles/ConveryCSVToJSON.py | NCMlab/CognitiveTasks | cd613990f59aac2c6c8f9b553ecb178124bfe171 | [
"MIT"
] | 5 | 2019-06-20T03:27:55.000Z | 2022-03-06T07:31:36.000Z | DMSPsychopyFiles/ConveryCSVToJSON.py | NCMlab/CognitiveTasks | cd613990f59aac2c6c8f9b553ecb178124bfe171 | [
"MIT"
] | 9 | 2018-10-23T02:11:00.000Z | 2019-07-03T15:29:07.000Z | DMSPsychopyFiles/ConveryCSVToJSON.py | NCMlab/CognitiveTasks | cd613990f59aac2c6c8f9b553ecb178124bfe171 | [
"MIT"
] | 2 | 2020-08-24T13:55:57.000Z | 2022-03-06T07:31:40.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon May 17 21:36:05 2021
@author: jasonsteffener
"""
import json
import pandas as pd
P = 'DMSBlockListMRIRun2.csv'
df = pd.read_csv(P)
for index, row in df.iterrows():
StimLetters = ''
for j in range(9):
StimLetters += row[j]
if (r... | 19.533333 | 39 | 0.537543 |
77541b86307aaf675401f7ee6e6a0da339b682e5 | 16,357 | py | Python | sympy/core/tests/test_exprtools.py | darknight009/sympy | 618193720b862a41aa295d474793cc12e4de2927 | [
"BSD-3-Clause"
] | 1 | 2015-07-04T12:40:41.000Z | 2015-07-04T12:40:41.000Z | sympy/core/tests/test_exprtools.py | darknight009/sympy | 618193720b862a41aa295d474793cc12e4de2927 | [
"BSD-3-Clause"
] | 4 | 2016-11-29T09:10:32.000Z | 2016-12-03T21:20:34.000Z | sympy/core/tests/test_exprtools.py | darknight009/sympy | 618193720b862a41aa295d474793cc12e4de2927 | [
"BSD-3-Clause"
] | 1 | 2020-10-02T04:21:11.000Z | 2020-10-02T04:21:11.000Z | """Tests for tools for manipulating of large commutative expressions. """
from sympy import (S, Add, sin, Mul, Symbol, oo, Integral, sqrt, Tuple, I,
Interval, O, symbols, simplify, collect, Sum, Basic, Dict,
root, exp, cos, sin, oo, Dummy, log)
from sympy.core.exprtools import (de... | 38.039535 | 88 | 0.535245 |
70b8c2b954ac7cb91aeb6ec47cab0fd1f3f868be | 860 | py | Python | plot_top1.py | NEWPLAN/nvcaffe-0.17.3 | 7b8e4fdef8216d8497f6d71df465e881e47e009b | [
"BSD-2-Clause"
] | null | null | null | plot_top1.py | NEWPLAN/nvcaffe-0.17.3 | 7b8e4fdef8216d8497f6d71df465e881e47e009b | [
"BSD-2-Clause"
] | null | null | null | plot_top1.py | NEWPLAN/nvcaffe-0.17.3 | 7b8e4fdef8216d8497f6d71df465e881e47e009b | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
import sys
import argparse
try:
import seaborn as sns
sns.set(style="dark")
except ImportError:
pass
import matplotlib.pyplot as plt
from common_plot import parse_files, plot_accuracy
TOP_K = 1
parser = argparse.ArgumentParser(
description='Plot top {}% from log files.'.format(... | 29.655172 | 79 | 0.713953 |
51e49ea2a9fc3d780e2a8912fab776f2457a84aa | 15,630 | py | Python | detectron2/modeling/roi_heads/fast_rcnn.py | Malga-Vision/fastervideo | 34e212fe04398262e5dac7f74ac4c2365fc1e03f | [
"Apache-2.0"
] | 1 | 2021-05-20T08:11:53.000Z | 2021-05-20T08:11:53.000Z | detectron2/modeling/roi_heads/fast_rcnn.py | Malga-Vision/fastervideo | 34e212fe04398262e5dac7f74ac4c2365fc1e03f | [
"Apache-2.0"
] | null | null | null | detectron2/modeling/roi_heads/fast_rcnn.py | Malga-Vision/fastervideo | 34e212fe04398262e5dac7f74ac4c2365fc1e03f | [
"Apache-2.0"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
import logging
import numpy as np
import torch
from fvcore.nn import smooth_l1_loss
from torch import nn
from torch.nn import functional as F
from detectron2.layers import batched_nms, cat
from detectron2.structures import Boxes, Instances
from det... | 44.028169 | 112 | 0.657901 |
ed080373925894ee7beb8f7ec13a48e7e4cc3eb0 | 4,666 | py | Python | send_sensor_data.py | lupyuen/iotapps | 40cf654098ae4431a1efc832f322be7734788fc2 | [
"MIT"
] | 4 | 2016-02-09T16:24:00.000Z | 2021-04-16T16:04:30.000Z | send_sensor_data.py | lupyuen/iotapps | 40cf654098ae4431a1efc832f322be7734788fc2 | [
"MIT"
] | null | null | null | send_sensor_data.py | lupyuen/iotapps | 40cf654098ae4431a1efc832f322be7734788fc2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# GrovePi Example for using the Grove Temperature Sensor (http://www.seeedstudio.com/wiki/Grove_-_Temperature_Sensor)
#
# The GrovePi connects the Raspberry Pi and Grove sensors. You can learn more about GrovePi here: http://www.dexterindustries.com/GrovePi
#
# Have a question about this examp... | 36.453125 | 139 | 0.705958 |
c8fe62b6e7c2e2d96230074d508eb207f8113dfe | 26,659 | py | Python | library/oneview_logical_interconnect.py | LaudateCorpus1/oneview-ansible | a1befcab3ff8d23ab7f85844eeba0d2f2c6a21e2 | [
"Apache-2.0"
] | 108 | 2016-06-28T18:14:08.000Z | 2022-02-21T09:16:06.000Z | library/oneview_logical_interconnect.py | LaudateCorpus1/oneview-ansible | a1befcab3ff8d23ab7f85844eeba0d2f2c6a21e2 | [
"Apache-2.0"
] | 248 | 2016-07-14T12:50:17.000Z | 2022-02-06T18:57:16.000Z | library/oneview_logical_interconnect.py | LaudateCorpus1/oneview-ansible | a1befcab3ff8d23ab7f85844eeba0d2f2c6a21e2 | [
"Apache-2.0"
] | 88 | 2016-06-29T15:52:44.000Z | 2022-03-10T12:34:41.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
###
# Copyright (2016-2021) Hewlett Packard Enterprise Development LP
#
# 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/licen... | 41.013846 | 127 | 0.711955 |
38cb22cf88516f76a75093f375ba3d0704b157a0 | 12,166 | py | Python | ays_bot/telegrambot/run.py | Jumpscale/g8cockpit | 5e9ede183f77fec4adff9cd038567173b68677f0 | [
"Apache-2.0"
] | null | null | null | ays_bot/telegrambot/run.py | Jumpscale/g8cockpit | 5e9ede183f77fec4adff9cd038567173b68677f0 | [
"Apache-2.0"
] | 332 | 2016-05-24T10:51:45.000Z | 2021-09-08T12:28:50.000Z | ays_bot/telegrambot/run.py | Jumpscale/g8cockpit | 5e9ede183f77fec4adff9cd038567173b68677f0 | [
"Apache-2.0"
] | 1 | 2016-08-02T07:52:49.000Z | 2016-08-02T07:52:49.000Z | from JumpScale import j
import telegram
import datetime
from telegrambot.Repo import AYS_REPO_DIR
# from JumpScale.baselib.atyourservice.robot.ActionRequest import *
class RunMgmt(object):
def __init__(self, bot):
self.bot = bot
self.rootpath = bot.rootpath
self.callbacks = bot.question_c... | 41.240678 | 127 | 0.571593 |
6f27809b453018c52e02023ffb815e80d5fe4f68 | 21,233 | py | Python | World.py | rattus128/OoT-Randomizer | 9472bd5293be7328cab5710f99360f72971192d0 | [
"MIT"
] | 2 | 2019-01-03T12:52:06.000Z | 2019-01-07T22:50:31.000Z | World.py | rattus128/OoT-Randomizer | 9472bd5293be7328cab5710f99360f72971192d0 | [
"MIT"
] | 5 | 2019-02-20T14:18:31.000Z | 2019-03-16T23:03:48.000Z | World.py | rattus128/OoT-Randomizer | 9472bd5293be7328cab5710f99360f72971192d0 | [
"MIT"
] | null | null | null | from State import State
from Region import Region
from Entrance import Entrance
from Location import Location, LocationFactory
from LocationList import business_scrubs
from DungeonList import create_dungeons
from Rules import set_rules, set_shop_rules
from Item import Item
from RuleParser import parse_rule_string
from ... | 41.797244 | 202 | 0.601846 |
b71c9b7f29322558e00fc508d80a50323e1429a2 | 44,579 | py | Python | scipy/sparse/compressed.py | SKPsanjeevi/scipy | d71c3f68837e1e3ae7b0f1103ddaff5186d96a18 | [
"BSD-3-Clause"
] | null | null | null | scipy/sparse/compressed.py | SKPsanjeevi/scipy | d71c3f68837e1e3ae7b0f1103ddaff5186d96a18 | [
"BSD-3-Clause"
] | null | null | null | scipy/sparse/compressed.py | SKPsanjeevi/scipy | d71c3f68837e1e3ae7b0f1103ddaff5186d96a18 | [
"BSD-3-Clause"
] | null | null | null | """Base class for sparse matrix formats using compressed storage."""
from __future__ import division, print_function, absolute_import
__all__ = []
from warnings import warn
import operator
import numpy as np
from scipy._lib.six import zip as izip
from scipy._lib._util import _prune_array
from .base import spmatrix,... | 38.967657 | 102 | 0.536508 |
90c13d691463f5053532367b8706eeda171551a5 | 544 | py | Python | manage.py | bogdan19adrian/b2b_festival | 31700e5cebcd96a24b67889079492223c27e1a6f | [
"Apache-2.0"
] | null | null | null | manage.py | bogdan19adrian/b2b_festival | 31700e5cebcd96a24b67889079492223c27e1a6f | [
"Apache-2.0"
] | null | null | null | manage.py | bogdan19adrian/b2b_festival | 31700e5cebcd96a24b67889079492223c27e1a6f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == '__main__':
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'b2b_festival.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django.... | 34 | 76 | 0.689338 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.