hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | 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 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | 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 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
84cea25f06e63cd1e6024568f86f3046e907c404 | 7,025 | py | Python | PaddleRec/gnn/network.py | XiaoguangHu01/models | a95d49323ed504e5a9164586f171f408954fd43a | [
"Apache-2.0"
] | null | null | null | PaddleRec/gnn/network.py | XiaoguangHu01/models | a95d49323ed504e5a9164586f171f408954fd43a | [
"Apache-2.0"
] | null | null | null | PaddleRec/gnn/network.py | XiaoguangHu01/models | a95d49323ed504e5a9164586f171f408954fd43a | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserve.
#
#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... | 36.025641 | 92 | 0.616228 |
dc6a6c6107bf5eaed4fc75c99e89b8f4399c45f3 | 971 | py | Python | gs/group/messages/topic/digest/daily/interfaces.py | groupserver/gs.group.messages.topic.digest.daily | 318a553701d89165db2c7323b841d5ba83de6735 | [
"ZPL-2.1"
] | null | null | null | gs/group/messages/topic/digest/daily/interfaces.py | groupserver/gs.group.messages.topic.digest.daily | 318a553701d89165db2c7323b841d5ba83de6735 | [
"ZPL-2.1"
] | null | null | null | gs/group/messages/topic/digest/daily/interfaces.py | groupserver/gs.group.messages.topic.digest.daily | 318a553701d89165db2c7323b841d5ba83de6735 | [
"ZPL-2.1"
] | null | null | null | # -*- coding: utf-8 -*-
############################################################################
#
# Copyright © 2012, 2013, 2014, 2015 E-Democracy.org and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should a... | 38.84 | 76 | 0.644696 |
a9fbb8e0192875b7426d42159e4a17aed70f1969 | 8,923 | py | Python | gbpservice/contrib/tests/unit/nfp/configurator/drivers/firewall/test_vyos_fw_driver.py | baodongli/group-based-policy | f3b892ecdc1051b204376e18679f73bf457ce7dc | [
"Apache-2.0"
] | null | null | null | gbpservice/contrib/tests/unit/nfp/configurator/drivers/firewall/test_vyos_fw_driver.py | baodongli/group-based-policy | f3b892ecdc1051b204376e18679f73bf457ce7dc | [
"Apache-2.0"
] | null | null | null | gbpservice/contrib/tests/unit/nfp/configurator/drivers/firewall/test_vyos_fw_driver.py | baodongli/group-based-policy | f3b892ecdc1051b204376e18679f73bf457ce7dc | [
"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... | 38.461207 | 78 | 0.59229 |
2713914e93798984d4a698b58d2ce77c1170ea02 | 2,795 | py | Python | epochRsWorkspaceApi/da_workspace_access.py | exastro-suite/epoch | c8ad14e9b1812310811320c9c099364917538021 | [
"Apache-2.0"
] | 5 | 2021-04-15T07:12:28.000Z | 2022-02-03T12:36:20.000Z | epochRsWorkspaceApi/da_workspace_access.py | exastro-suite/epoch | c8ad14e9b1812310811320c9c099364917538021 | [
"Apache-2.0"
] | 29 | 2021-07-20T06:54:46.000Z | 2022-03-25T01:49:34.000Z | epochRsWorkspaceApi/da_workspace_access.py | exastro-suite/epoch | c8ad14e9b1812310811320c9c099364917538021 | [
"Apache-2.0"
] | 10 | 2021-04-15T07:50:19.000Z | 2021-12-08T05:40:37.000Z | # Copyright 2019 NEC 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... | 26.121495 | 90 | 0.620394 |
f0ac36c66a11b0b985a0b91817795419990ef119 | 7,217 | py | Python | tensorflow/contrib/tfprof/python/tools/tfprof/print_model_analysis_test.py | AlexChrisF/udacity | b7f85a74058fc63ccb7601c418450ab934ef5953 | [
"Apache-2.0"
] | 44 | 2017-01-26T11:39:36.000Z | 2019-06-28T10:03:19.000Z | tensorflow/contrib/tfprof/python/tools/tfprof/print_model_analysis_test.py | AlexChrisF/udacity | b7f85a74058fc63ccb7601c418450ab934ef5953 | [
"Apache-2.0"
] | 7 | 2017-07-13T09:40:59.000Z | 2019-04-08T22:46:51.000Z | tensorflow/contrib/tfprof/python/tools/tfprof/print_model_analysis_test.py | AlexChrisF/udacity | b7f85a74058fc63ccb7601c418450ab934ef5953 | [
"Apache-2.0"
] | 38 | 2017-04-28T04:15:48.000Z | 2019-09-28T05:11:46.000Z | # Copyright 2016 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... | 29.577869 | 113 | 0.667313 |
8a6fbeed3bec2c45f42a4ad9bf48eabbc1f5439e | 4,291 | py | Python | src/tests/ftest/ior/ior_small.py | berserk-fury/daos | e0a3249aa886962cef2345135b907b45f7109cae | [
"BSD-2-Clause-Patent"
] | null | null | null | src/tests/ftest/ior/ior_small.py | berserk-fury/daos | e0a3249aa886962cef2345135b907b45f7109cae | [
"BSD-2-Clause-Patent"
] | null | null | null | src/tests/ftest/ior/ior_small.py | berserk-fury/daos | e0a3249aa886962cef2345135b907b45f7109cae | [
"BSD-2-Clause-Patent"
] | 1 | 2021-11-03T05:00:42.000Z | 2021-11-03T05:00:42.000Z | #!/usr/bin/python3
"""
(C) Copyright 2018-2021 Intel Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent
"""
import os
from ior_test_base import IorTestBase
from avocado.core.exceptions import TestFail
from general_utils import get_random_string
class IorSmall(IorTestBase):
# pylint: disable=too-many-ance... | 40.481132 | 78 | 0.563039 |
9d0997a19112acc232c7cc45c8466ca654d6411d | 15,339 | py | Python | openmichigan-metrics-pdf/apiaccess.py | openmichigan/metrics_tools | ff44c4169fc54194d6a3b2d2e244193054d4d3e5 | [
"MIT"
] | 3 | 2015-06-01T16:11:02.000Z | 2021-07-09T21:43:07.000Z | openmichigan-metrics-pdf/apiaccess.py | QPC-database/metrics_tools | ff44c4169fc54194d6a3b2d2e244193054d4d3e5 | [
"MIT"
] | null | null | null | openmichigan-metrics-pdf/apiaccess.py | QPC-database/metrics_tools | ff44c4169fc54194d6a3b2d2e244193054d4d3e5 | [
"MIT"
] | 2 | 2021-07-09T21:43:08.000Z | 2021-09-07T08:43:38.000Z | import sys
import infofile
import get_material_links
from pylab import * #?
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
from datetime import date, timedelta
from apiclient.errors import HttpError
from oauth2client.client import AccessTokenRefreshError
import httplib2
from apic... | 45.651786 | 264 | 0.718495 |
6f1a60d55fe4ee83951e93310e8f37bd08b73ffb | 4,364 | py | Python | tpdatasrc/co8infra/scr/Spell228 - Hold Person.py | edoipi/TemplePlus | f0e552289822fea908f16daa379fa568b1bd286d | [
"MIT"
] | null | null | null | tpdatasrc/co8infra/scr/Spell228 - Hold Person.py | edoipi/TemplePlus | f0e552289822fea908f16daa379fa568b1bd286d | [
"MIT"
] | null | null | null | tpdatasrc/co8infra/scr/Spell228 - Hold Person.py | edoipi/TemplePlus | f0e552289822fea908f16daa379fa568b1bd286d | [
"MIT"
] | null | null | null | from utilities import *
from toee import *
def OnBeginSpellCast( spell ):
print "Hold Person OnBeginSpellCast"
print "spell.target_list=", spell.target_list
print "spell.caster=", spell.caster, " caster.level= ", spell.caster_level
game.particles( "sp-enchantment-conjure", spell.caster )
def OnSpellEffect( spell ... | 44.530612 | 215 | 0.726856 |
63a8629848bd638ad426260bf291ab1e8568a057 | 3,699 | py | Python | src/quadruped/quadruped/RL/gymVrka/gym_vrka/envs/gui.py | BitsRobocon/AutonomousQuadruped | 980d4a568c73c98093839f372e0db0193f51bb1d | [
"Apache-2.0"
] | null | null | null | src/quadruped/quadruped/RL/gymVrka/gym_vrka/envs/gui.py | BitsRobocon/AutonomousQuadruped | 980d4a568c73c98093839f372e0db0193f51bb1d | [
"Apache-2.0"
] | null | null | null | src/quadruped/quadruped/RL/gymVrka/gym_vrka/envs/gui.py | BitsRobocon/AutonomousQuadruped | 980d4a568c73c98093839f372e0db0193f51bb1d | [
"Apache-2.0"
] | null | null | null | import pybullet as pb
import time
import numpy as np
import sys
class GUI:
def __init__(self, quadruped):
time.sleep(0.5)
self.cyaw = 0
self.cpitch = -7
self.cdist = 0.66
self.xId = pb.addUserDebugParameter("x", -0.10, 0.10, 0.)
self.yId = pb.addUserDebugParamete... | 39.774194 | 123 | 0.55934 |
a10044a262412b97c770173eb4aef785acefa31b | 2,317 | py | Python | run.py | doubleblind193819238/AutoShare | 275f739ad5d65d8fabceb3d8e202b81735e37aa0 | [
"MIT"
] | null | null | null | run.py | doubleblind193819238/AutoShare | 275f739ad5d65d8fabceb3d8e202b81735e37aa0 | [
"MIT"
] | null | null | null | run.py | doubleblind193819238/AutoShare | 275f739ad5d65d8fabceb3d8e202b81735e37aa0 | [
"MIT"
] | null | null | null | from utils import DataLoader
from utils import compute_entropy
from tqdm import tqdm
from scipy.stats import pearsonr
import time
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import pickle
from matplotlib.offsetbox import AnchoredText
import seaborn as sns
from scipy import sparse
from AutoRec... | 26.632184 | 132 | 0.752266 |
6460a64946284a6dbb748016d3faf54528bffca2 | 3,793 | py | Python | pyfire/campfire.py | madzak/pyfire | fa5cbbdff077c554624d937c3ff4b9638bca4cd9 | [
"MIT"
] | 1 | 2015-11-05T10:28:30.000Z | 2015-11-05T10:28:30.000Z | pyfire/campfire.py | madzak/pyfire | fa5cbbdff077c554624d937c3ff4b9638bca4cd9 | [
"MIT"
] | null | null | null | pyfire/campfire.py | madzak/pyfire | fa5cbbdff077c554624d937c3ff4b9638bca4cd9 | [
"MIT"
] | null | null | null | import operator
import urllib
from .connection import Connection
from .message import Message
from .user import User
from .room import Room
class RoomNotFoundException(Exception):
pass
class Campfire(object):
""" Campfire API """
def __init__(self, subdomain, username, password, ssl=False, currentUs... | 26.524476 | 105 | 0.535196 |
8291066724d940e9bbc12fe03990da00e9890a7b | 573 | py | Python | venv/Lib/site-packages/qtpy/QtQuick.py | BoxicaLion/BasicMathFormulas | 4d9782f2c0c75ecccf4c0ea995f324f93e4fb6e2 | [
"MIT"
] | 603 | 2020-12-23T13:49:32.000Z | 2022-03-31T23:38:03.000Z | qtpy/QtQuick.py | phil65/qtpy | a228a667829be5822cf810fb06b53bf03a2b7b39 | [
"MIT"
] | 387 | 2020-12-15T14:54:04.000Z | 2022-03-31T07:00:21.000Z | qtpy/QtQuick.py | phil65/qtpy | a228a667829be5822cf810fb06b53bf03a2b7b39 | [
"MIT"
] | 35 | 2021-03-26T03:12:04.000Z | 2022-03-23T10:15:10.000Z | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright © 2009- The Spyder Development Team
#
# Licensed under the terms of the MIT License
# (see LICENSE.txt for details)
# -----------------------------------------------------------------------------
"""Provi... | 30.157895 | 79 | 0.518325 |
2050ca6e54491060db154051ae1b09466cb192fb | 33,139 | py | Python | utils/utils_image.py | a07458666/SwinSR | b08b2c4b46f6dacdcbdfe389b9b8254d85965283 | [
"MIT"
] | null | null | null | utils/utils_image.py | a07458666/SwinSR | b08b2c4b46f6dacdcbdfe389b9b8254d85965283 | [
"MIT"
] | null | null | null | utils/utils_image.py | a07458666/SwinSR | b08b2c4b46f6dacdcbdfe389b9b8254d85965283 | [
"MIT"
] | null | null | null | import os
import math
import random
import numpy as np
import torch
import cv2
from torchvision.utils import make_grid
from datetime import datetime
# import torchvision.transforms as transforms
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
os.environ["KMP_DUPLICATE_LIB_OK"] = "TRUE"
'''
# -... | 32.585054 | 120 | 0.577115 |
8bdec9a4c2ea2a87b693de9d0d7126198e23515e | 1,699 | py | Python | run.py | SAUSy-Lab/nearby-transit-trip-frequency | 54560091824332689ce8ec0b2874868f0eb5f942 | [
"MIT"
] | 5 | 2017-06-27T19:42:57.000Z | 2021-12-03T13:55:27.000Z | run.py | SAUSy-Lab/nearby-transit-trip-frequency | 54560091824332689ce8ec0b2874868f0eb5f942 | [
"MIT"
] | null | null | null | run.py | SAUSy-Lab/nearby-transit-trip-frequency | 54560091824332689ce8ec0b2874868f0eb5f942 | [
"MIT"
] | null | null | null | from osrm_setup import *
from nearby_stops import *
from trip_count import *
import time
start_time = time.time()
# inputs of gtfs and day to count number of trips
gtfsin = "gtfs" # unzipped folder name
dayin = "20180808"
# # downloading OSM from extensts
# dl_osm_from_extents(-79.1087,-79.6457,43.8554,43.5807)
# #... | 28.79661 | 80 | 0.661566 |
856cf43106b70a16ad42bb14df8fc744a0f1fb42 | 588 | py | Python | virtual/craft-blueprints-kde-base/craft-blueprints-kde-base.py | wrobelda/craft-blueprints-kde | 366f460cecd5baebdf3a695696767c8c0e5e7c7e | [
"BSD-2-Clause"
] | 14 | 2017-09-04T09:01:03.000Z | 2022-01-04T20:09:00.000Z | virtual/craft-blueprints-kde-base/craft-blueprints-kde-base.py | wrobelda/craft-blueprints-kde | 366f460cecd5baebdf3a695696767c8c0e5e7c7e | [
"BSD-2-Clause"
] | 14 | 2017-12-15T08:11:22.000Z | 2020-12-29T19:11:13.000Z | virtual/craft-blueprints-kde-base/craft-blueprints-kde-base.py | wrobelda/craft-blueprints-kde | 366f460cecd5baebdf3a695696767c8c0e5e7c7e | [
"BSD-2-Clause"
] | 19 | 2017-09-05T19:16:21.000Z | 2020-10-18T12:46:06.000Z | import info
from CraftCore import CraftCore
from Package.VirtualPackageBase import VirtualPackageBase
class subinfo(info.infoclass):
def setTargets(self):
self.targets['0.1'] = ""
self.defaultTarget = '0.1'
def setDependencies(self):
# The order is important
self.runtimeDepend... | 28 | 72 | 0.693878 |
56a861fa8146aba47d519878055224c816e5bc9d | 82 | py | Python | lessons/basic_line_chart.py | LEMSantos/udemy-data_visualization | 12c3762e32e76160e5b4917de37d74df5e3cc3e8 | [
"MIT"
] | null | null | null | lessons/basic_line_chart.py | LEMSantos/udemy-data_visualization | 12c3762e32e76160e5b4917de37d74df5e3cc3e8 | [
"MIT"
] | null | null | null | lessons/basic_line_chart.py | LEMSantos/udemy-data_visualization | 12c3762e32e76160e5b4917de37d74df5e3cc3e8 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
x = [1, 2]
y = [2, 3]
plt.plot(x, y)
plt.show()
| 10.25 | 31 | 0.597561 |
93caf5e94a573569ac8dde29c1d50364d644c361 | 554 | py | Python | home/migrations/0009_auto_20200619_0139.py | enessfk/TheHouseSteak | 21ee01bb1e028dec7d840beb9255191f6b5f4a7e | [
"MIT"
] | 1 | 2021-08-20T14:51:37.000Z | 2021-08-20T14:51:37.000Z | home/migrations/0009_auto_20200619_0139.py | enessfk/TheHouseSteak | 21ee01bb1e028dec7d840beb9255191f6b5f4a7e | [
"MIT"
] | 2 | 2021-08-20T14:55:50.000Z | 2021-08-23T22:09:45.000Z | home/migrations/0009_auto_20200619_0139.py | enessfk/TheHouseSteak | 21ee01bb1e028dec7d840beb9255191f6b5f4a7e | [
"MIT"
] | null | null | null | # Generated by Django 3.0.4 on 2020-06-18 22:39
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('home', '0008_faq'),
]
operations = [
migrations.AddField(
model_name='faq',
name='ordernumber',
field=mo... | 22.16 | 51 | 0.557762 |
1ec59d568cb1de4993ba7613c31b1836ba4c9fe9 | 2,429 | py | Python | daemons/interfaces/message.py | alexdelorenzo/daemons | 1fe2c9886f76f51e1e459fe97f2ac360869deb19 | [
"Apache-2.0"
] | 50 | 2015-06-18T18:25:27.000Z | 2022-02-08T22:29:09.000Z | daemons/interfaces/message.py | alexdelorenzo/daemons | 1fe2c9886f76f51e1e459fe97f2ac360869deb19 | [
"Apache-2.0"
] | 9 | 2015-11-27T14:39:58.000Z | 2021-05-21T19:18:16.000Z | daemons/interfaces/message.py | alexdelorenzo/daemons | 1fe2c9886f76f51e1e459fe97f2ac360869deb19 | [
"Apache-2.0"
] | 16 | 2015-10-17T19:10:55.000Z | 2021-05-20T05:48:51.000Z | """Standard interface for message management functionality."""
from __future__ import division
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
import time
class MessageManager(object):
"""Implementations provide management of messages to the ... | 32.824324 | 79 | 0.67641 |
cfd708f75ad15c54ffd2d089d6bf84a1ddc0c747 | 1,072 | py | Python | riemann/embedding/lazy.py | arunchaganty/riemannian-nlp | bcaa0590a6be22e1cd2103dd12835400f35f170d | [
"MIT"
] | null | null | null | riemann/embedding/lazy.py | arunchaganty/riemannian-nlp | bcaa0590a6be22e1cd2103dd12835400f35f170d | [
"MIT"
] | null | null | null | riemann/embedding/lazy.py | arunchaganty/riemannian-nlp | bcaa0590a6be22e1cd2103dd12835400f35f170d | [
"MIT"
] | null | null | null | import functools
"""
Decorator to create lazy functions
"""
# noinspection PyPep8Naming
class lazy(object):
"""
lazy descriptor
Used as a decorator to create lazy functions. These
are evaluated on first use.
"""
def __init__(self, func):
self.__func = func
functools.wraps(sel... | 24.930233 | 99 | 0.600746 |
355f64e850c89f9b7a40beb93559e7f23fb00fc5 | 3,543 | py | Python | interactive_minigrid_traj_collection_script.py | sen-pai/Not-GAIL | abe23cf28c62d875774469e431858977631b5550 | [
"MIT"
] | null | null | null | interactive_minigrid_traj_collection_script.py | sen-pai/Not-GAIL | abe23cf28c62d875774469e431858977631b5550 | [
"MIT"
] | null | null | null | interactive_minigrid_traj_collection_script.py | sen-pai/Not-GAIL | abe23cf28c62d875774469e431858977631b5550 | [
"MIT"
] | 1 | 2021-07-15T14:01:17.000Z | 2021-07-15T14:01:17.000Z | # import os
import numpy as np
import time
import argparse
import matplotlib.pyplot as plt
import gym
import gym_minigrid
from gym_minigrid import wrappers
from gym_minigrid.window import Window
from imitation.data.types import Trajectory
import pickle5 as pickle
from utils.env_utils import minigrid_get_env, minig... | 20.479769 | 85 | 0.615016 |
9c2c93c4167f21637db2b9bc8d65e4a6c8b51e05 | 735 | py | Python | ch_6/acc2vel.py | ProhardONE/python_primer | 211e37c1f2fd169269fc4f3c08e8b7e5225f2ad0 | [
"MIT"
] | 51 | 2016-04-05T16:56:11.000Z | 2022-02-08T00:08:47.000Z | ch_6/acc2vel.py | zhangxiao921207/python_primer | 211e37c1f2fd169269fc4f3c08e8b7e5225f2ad0 | [
"MIT"
] | null | null | null | ch_6/acc2vel.py | zhangxiao921207/python_primer | 211e37c1f2fd169269fc4f3c08e8b7e5225f2ad0 | [
"MIT"
] | 47 | 2016-05-02T07:51:37.000Z | 2022-02-08T01:28:15.000Z | # Excercise 6.6
# Author: Noah Waterfield Price
import numpy as np
import matplotlib.pyplot as plt
import sys
def velocity(a, dt):
n = len(a)
v = np.zeros(n)
for k in xrange(1, n):
v[k] = v[k-1] + (a[k-1] + a[k])/2
v *= dt
return v
try:
dt = float(sys.argv[1])
except IndexError:
... | 22.96875 | 64 | 0.639456 |
f6a8a764705cec1d628daadd51f7988b1e701dc1 | 1,317 | py | Python | xlsxwriter/test/comparison/test_print_across01.py | haiyangd/XlsxWriter | 81f8c9435b3e03a1458bf9ba314b5d3f7508290f | [
"BSD-2-Clause-FreeBSD"
] | 3 | 2018-02-26T12:31:41.000Z | 2020-10-10T14:14:11.000Z | xlsxwriter/test/comparison/test_print_across01.py | haiyangd/XlsxWriter | 81f8c9435b3e03a1458bf9ba314b5d3f7508290f | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | xlsxwriter/test/comparison/test_print_across01.py | haiyangd/XlsxWriter | 81f8c9435b3e03a1458bf9ba314b5d3f7508290f | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | ###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2017, John McNamara, jmcnamara@cpan.org
#
from ..excel_comparsion_test import ExcelComparisonTest
from ...workbook import Workbook
class TestCompareXLSXFiles(ExcelComparisonTest):
"""... | 28.630435 | 91 | 0.59833 |
147900af835c82952ef1c96f65f3a0c5a3ab26e9 | 1,399 | py | Python | jax3d/utils/tree_utils_test.py | google-research/jax3d | f08ae174c80cd6c597f8fe5417168c82857eb236 | [
"Apache-2.0"
] | 33 | 2021-12-15T12:59:28.000Z | 2022-03-30T05:29:09.000Z | jax3d/utils/tree_utils_test.py | google-research/jax3d | f08ae174c80cd6c597f8fe5417168c82857eb236 | [
"Apache-2.0"
] | 5 | 2021-12-15T15:15:03.000Z | 2021-12-15T17:25:27.000Z | jax3d/utils/tree_utils_test.py | google-research/jax3d | f08ae174c80cd6c597f8fe5417168c82857eb236 | [
"Apache-2.0"
] | 1 | 2022-01-29T18:30:02.000Z | 2022-01-29T18:30:02.000Z | # Copyright 2022 The jax3d Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | 24.54386 | 74 | 0.576841 |
b93a1bfe0b29de6c17ad26e524aeb85f03c061eb | 2,502 | py | Python | classification/classify.py | Pandinosaurus/Spiking-Neural-Network | de3e24da2806f0a7006b37f395ed055497727ae6 | [
"Apache-2.0"
] | 755 | 2016-09-12T13:42:51.000Z | 2022-03-29T19:11:44.000Z | classification/classify.py | tianjihua254/Spiking-Neural-Network | eaf6134b07b699a8f32e379cf9afd2ca3005007b | [
"Apache-2.0"
] | 19 | 2017-11-03T06:03:39.000Z | 2022-03-08T08:33:05.000Z | classification/classify.py | tianjihua254/Spiking-Neural-Network | eaf6134b07b699a8f32e379cf9afd2ca3005007b | [
"Apache-2.0"
] | 258 | 2017-03-30T13:40:31.000Z | 2022-03-15T20:32:14.000Z | ##################### README ###################################################
# This file executes the classification algorithm over input testing images.
# Winner neurons inhibit other neurons by a phenomenon called Lateral inhibition
# Spike for each output neuron at each time stamp is monitored.
#################... | 26.336842 | 80 | 0.642686 |
e5d3a314ea16b073792566abc921725abab3e6d9 | 843 | py | Python | memos/opencv/buildmp4.py | Bingwen-Hu/hackaway | 69727d76fd652390d9660e9ea4354ba5cc76dd5c | [
"BSD-2-Clause"
] | null | null | null | memos/opencv/buildmp4.py | Bingwen-Hu/hackaway | 69727d76fd652390d9660e9ea4354ba5cc76dd5c | [
"BSD-2-Clause"
] | null | null | null | memos/opencv/buildmp4.py | Bingwen-Hu/hackaway | 69727d76fd652390d9660e9ea4354ba5cc76dd5c | [
"BSD-2-Clause"
] | null | null | null | import cv2
import os
from os.path import basename
def sort_helper(path):
name = basename(path)
name = name.lstrip('result_')
num = name.rstrip('.png')
num = int(num)
return num
img_dir = "/home/mory/Downloads/ding"
video_path = "/home/mory/Downloads/dingcut.avi"
# use for fps
org_video_path = "/... | 23.416667 | 89 | 0.727165 |
ccf3afbfd543e443353adaa33766e5636d334d5f | 3,446 | py | Python | mqtt2influxdb/config.py | tvecera/bch-mqtt2influxdb | 6e3f6b898144ce89307e61858364d005f8f6a35d | [
"MIT"
] | 15 | 2018-01-14T16:27:11.000Z | 2020-06-08T00:44:16.000Z | mqtt2influxdb/config.py | tvecera/bch-mqtt2influxdb | 6e3f6b898144ce89307e61858364d005f8f6a35d | [
"MIT"
] | 11 | 2018-05-03T07:42:34.000Z | 2020-06-24T10:01:22.000Z | mqtt2influxdb/config.py | tvecera/bch-mqtt2influxdb | 6e3f6b898144ce89307e61858364d005f8f6a35d | [
"MIT"
] | 10 | 2020-08-07T11:22:24.000Z | 2022-01-13T15:54:17.000Z | import os
import sys
import logging
import yaml
import re
import jsonpath_ng
from io import IOBase
from schema import Schema, And, Or, Use, Optional, SchemaError
from .expr import parse_expression
class ConfigError(Exception):
pass
# Regex for schedule config entries
validate_crontab_time_format_regex = re.comp... | 28.716667 | 101 | 0.582124 |
393176e4136d4cb1a97255d270c2ebe45da502b2 | 788 | py | Python | preprocess/split_data_calisiyor.py | madenburak/YOLOv4-Darknet | 80f2b484567146034030d49f9c0a075c5aaf8df6 | [
"MIT"
] | 1 | 2021-11-19T10:47:08.000Z | 2021-11-19T10:47:08.000Z | preprocess/split_data_calisiyor.py | madenburak/YOLOv4-Darknet | 80f2b484567146034030d49f9c0a075c5aaf8df6 | [
"MIT"
] | null | null | null | preprocess/split_data_calisiyor.py | madenburak/YOLOv4-Darknet | 80f2b484567146034030d49f9c0a075c5aaf8df6 | [
"MIT"
] | null | null | null | import splitfolders
#There should be two folders inside. Displays without labels, one labels to one folder (junk, deleted after processing) to the other folder. They are separated and labels are added to them.
splitfolders.ratio("D:/Dataset", output="D:/Dataset/output", seed=42, ratio=(.8, .2, .0), group_prefix=N... | 32.833333 | 190 | 0.676396 |
c1e22ddd3bd6d3d6885a37299eaa0a8a267189bc | 3,418 | py | Python | src/apps/dictionaries/type/views.py | mitrofun/kids2 | 6059422c911966e4799e5947d0fc243328bb5787 | [
"MIT"
] | null | null | null | src/apps/dictionaries/type/views.py | mitrofun/kids2 | 6059422c911966e4799e5947d0fc243328bb5787 | [
"MIT"
] | null | null | null | src/apps/dictionaries/type/views.py | mitrofun/kids2 | 6059422c911966e4799e5947d0fc243328bb5787 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from django.contrib.auth.mixins import LoginRequiredMixin
from django.views.generic.base import ContextMixin
from django.views.generic import ListView, CreateView, DetailView, UpdateView, DeleteView
from dictionaries.models import DictionariesType, Category
from django.core.urlresolvers import r... | 39.744186 | 96 | 0.665009 |
c4564518a8cd5315205c24ba4761e1bd3d108823 | 1,099 | py | Python | learning/Optimizers.py | tchewik/relation-autoencoder | 5f13d0bdb9b7f3134a66c62c5d8aa3a54b56f64a | [
"Apache-2.0"
] | null | null | null | learning/Optimizers.py | tchewik/relation-autoencoder | 5f13d0bdb9b7f3134a66c62c5d8aa3a54b56f64a | [
"Apache-2.0"
] | null | null | null | learning/Optimizers.py | tchewik/relation-autoencoder | 5f13d0bdb9b7f3134a66c62c5d8aa3a54b56f64a | [
"Apache-2.0"
] | null | null | null | __author__ = 'diego'
import numpy as np
import theano
import theano.tensor as T
class AdaGrad(object):
def __init__(self, params):
self.accumulator = []
for para_i in params:
eps_p = np.zeros_like(para_i.get_value(borrow=True), dtype=theano.config.floatX)
self.accumulator... | 28.921053 | 92 | 0.619654 |
b45528aa3fba74078f5abe3b41395a4d5d85e0aa | 4,024 | py | Python | alipay/aop/api/request/ZhimaCreditEpLawsuitRecordGetRequest.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/request/ZhimaCreditEpLawsuitRecordGetRequest.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/request/ZhimaCreditEpLawsuitRecordGetRequest.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import simplejson as json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.ZhimaCreditEpLawsuitRecordGetModel import ZhimaCreditEpLawsuitRecordGetModel
class ZhimaCreditEpLawsuitRecordGetReques... | 27.751724 | 166 | 0.647117 |
fc789717342d4e69c70768ce7c43bc9ca2d0361e | 7,924 | py | Python | dist/ba_data/python/bastd/ui/teamnamescolors.py | Bartixxx32/Bombsquad-Ballistica-Modded-Server | 26d36f07a5b96702e4fbdf172c0d66671f1ee0bd | [
"MIT"
] | 317 | 2020-04-04T00:33:10.000Z | 2022-03-28T01:07:09.000Z | assets/src/ba_data/python/bastd/ui/teamnamescolors.py | Alshahriah/ballistica | 326f6677a0118667e93ce9034849622ebef706fa | [
"MIT"
] | 315 | 2020-04-04T22:33:10.000Z | 2022-03-31T22:50:02.000Z | assets/src/ba_data/python/bastd/ui/teamnamescolors.py | Alshahriah/ballistica | 326f6677a0118667e93ce9034849622ebef706fa | [
"MIT"
] | 97 | 2020-04-04T01:32:17.000Z | 2022-03-16T19:02:59.000Z | # Released under the MIT License. See LICENSE for details.
#
"""Provides a window to customize team names and colors."""
from __future__ import annotations
from typing import TYPE_CHECKING, cast
import ba
from bastd.ui import popup
if TYPE_CHECKING:
from typing import Sequence
from bastd.ui.colorpicker impo... | 41.486911 | 79 | 0.54581 |
601dca9cd6592223c4f93065d9ade852e62f0375 | 2,054 | py | Python | setup.py | davidoliverSP2/neo4j-python-driver | 132cb454bfce3ff95fc953942ac6833b3bf423d8 | [
"Apache-2.0"
] | 1 | 2020-07-29T00:09:24.000Z | 2020-07-29T00:09:24.000Z | setup.py | KonstantinKlepikov/neo4j-python-driver | 132cb454bfce3ff95fc953942ac6833b3bf423d8 | [
"Apache-2.0"
] | null | null | null | setup.py | KonstantinKlepikov/neo4j-python-driver | 132cb454bfce3ff95fc953942ac6833b3bf423d8 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# Copyright (c) 2002-2020 "Neo4j,"
# Neo4j Sweden AB [http://neo4j.com]
#
# This file is part of Neo4j.
#
# 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 L... | 29.768116 | 84 | 0.68111 |
4f1535159cb96e95c49586b3c04464c6038591c2 | 169,825 | py | Python | tests/snapshots/snap_test_views.py | FrankyTerra/django-data-browser | 8c58d25afebedb6e3755209b3424be255fa93600 | [
"BSD-3-Clause"
] | null | null | null | tests/snapshots/snap_test_views.py | FrankyTerra/django-data-browser | 8c58d25afebedb6e3755209b3424be255fa93600 | [
"BSD-3-Clause"
] | null | null | null | tests/snapshots/snap_test_views.py | FrankyTerra/django-data-browser | 8c58d25afebedb6e3755209b3424be255fa93600 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# snapshottest: v1 - https://goo.gl/zC4yUc
from __future__ import unicode_literals
from snapshottest import Snapshot
snapshots = Snapshot()
snapshots["test_query_html config"] = {
"allModelFields": {
"auth.Group": {
"defaultFilters": "",
"fields": {
... | 32.564717 | 86 | 0.296022 |
822a8f7f8d18f01d0cec1224b3434207a87eec81 | 263 | py | Python | Iterators.py | anayakoti/FirstSample | 8ef05772991644e63a4fd6759458f449cd2b00c0 | [
"bzip2-1.0.6"
] | null | null | null | Iterators.py | anayakoti/FirstSample | 8ef05772991644e63a4fd6759458f449cd2b00c0 | [
"bzip2-1.0.6"
] | null | null | null | Iterators.py | anayakoti/FirstSample | 8ef05772991644e63a4fd6759458f449cd2b00c0 | [
"bzip2-1.0.6"
] | null | null | null | #Handle iterators
#The best way to handle iterators is by using next();
numbers=[1201,1202,1203,1204];
puller=iter(numbers);
#iter() is an object internally created by some great developer
#next should be used now
print(next(puller),next(puller),next(puller));
| 26.3 | 63 | 0.760456 |
0ba61f1d020f01e3e4f3e5fc936c598742bde698 | 5,557 | py | Python | python/dgl/nn/pytorch/conv/chebconv.py | gvvynplaine/dgl | 6294677f8acc6bc040baf922910473e1c82995ba | [
"Apache-2.0"
] | null | null | null | python/dgl/nn/pytorch/conv/chebconv.py | gvvynplaine/dgl | 6294677f8acc6bc040baf922910473e1c82995ba | [
"Apache-2.0"
] | null | null | null | python/dgl/nn/pytorch/conv/chebconv.py | gvvynplaine/dgl | 6294677f8acc6bc040baf922910473e1c82995ba | [
"Apache-2.0"
] | null | null | null | """Torch Module for Chebyshev Spectral Graph Convolution layer"""
# pylint: disable= no-member, arguments-differ, invalid-name
import torch as th
from torch import nn
import torch.nn.functional as F
from ....base import dgl_warning
from .... import laplacian_lambda_max, broadcast_nodes, function as fn
class ChebConv... | 33.475904 | 100 | 0.521324 |
02b292d8035e2ea6c6b1cccc965711a5ee83af1c | 2,854 | py | Python | dpnp/pca/GPU/base_pca.py | geexie/dpbench | 7d41409ded3c816f35003bc5aea071852bceb892 | [
"BSD-2-Clause"
] | 8 | 2021-03-26T15:17:58.000Z | 2022-01-21T21:56:19.000Z | dpnp/pca/GPU/base_pca.py | geexie/dpbench | 7d41409ded3c816f35003bc5aea071852bceb892 | [
"BSD-2-Clause"
] | 22 | 2021-03-30T21:20:57.000Z | 2022-02-22T13:42:17.000Z | dpnp/pca/GPU/base_pca.py | geexie/dpbench | 7d41409ded3c816f35003bc5aea071852bceb892 | [
"BSD-2-Clause"
] | 7 | 2021-03-23T11:00:43.000Z | 2022-02-02T12:28:55.000Z | # Copyright (C) 2017-2018 Intel Corporation
#
# SPDX-License-Identifier: MIT
from sklearn.datasets import make_classification, make_regression
try:
import itimer as it
now = it.itime
get_mops = it.itime_mops_now
except:
from timeit import default_timer
now = default_timer
get_mops = lambda ... | 25.482143 | 88 | 0.561317 |
5c3cb4c44bbb989549f6162d175a44dd370f67d2 | 4,819 | py | Python | tests/commands/test_optioncmd.py | My-Novel-Management/storybuilderunite | c003d3451e237f574c54a87ea7d4fd8da8e833be | [
"MIT"
] | 1 | 2020-06-18T01:38:55.000Z | 2020-06-18T01:38:55.000Z | tests/commands/test_optioncmd.py | My-Novel-Management/storybuilder | 1f36e56a74dbb55a25d60fce3ce81f3c650f521a | [
"MIT"
] | 143 | 2019-11-13T00:21:11.000Z | 2020-08-15T05:47:41.000Z | tests/commands/test_optioncmd.py | My-Novel-Management/storybuilderunite | c003d3451e237f574c54a87ea7d4fd8da8e833be | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
'''
OptionParser class test
=======================
'''
import argparse
import unittest
from tests.testutils import print_testtitle, validate_with_fail
from builder.commands import optioncmd as opt
class OptionParserTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
p... | 42.27193 | 76 | 0.412534 |
3f3d6dd850f79f7362ff6b52e74648c2e850c97f | 67,761 | py | Python | gears/geffects.py | xordspar0/gearhead-caramel | 1dc64fc3324d81bcb905a1b6e49f78ea48cdc150 | [
"Apache-2.0"
] | null | null | null | gears/geffects.py | xordspar0/gearhead-caramel | 1dc64fc3324d81bcb905a1b6e49f78ea48cdc150 | [
"Apache-2.0"
] | null | null | null | gears/geffects.py | xordspar0/gearhead-caramel | 1dc64fc3324d81bcb905a1b6e49f78ea48cdc150 | [
"Apache-2.0"
] | null | null | null | import pbge
from pbge import effects
from pbge.scenes import animobs,movement,pfov
import random
from . import materials
from . import damage, stats
from .enchantments import Enchantment,END_COMBAT,ON_MOVE,ON_DISPEL_POSITIVE,ON_DISPEL_NEGATIVE
import math
from . import base
# *************************
# *** Utilit... | 38.110799 | 195 | 0.62868 |
ac111d6ef867da6b84eea7fae9a8a19dbcc928be | 5,124 | py | Python | tableauserverclient/server/endpoint/metadata_endpoint.py | rrobertsrgare/server-client-python | 3f4db45584fb352e9f21c870027a2302cb824909 | [
"CC0-1.0",
"MIT"
] | 1 | 2021-02-17T18:39:09.000Z | 2021-02-17T18:39:09.000Z | tableauserverclient/server/endpoint/metadata_endpoint.py | rrobertsrgare/server-client-python | 3f4db45584fb352e9f21c870027a2302cb824909 | [
"CC0-1.0",
"MIT"
] | 1 | 2021-02-24T00:26:46.000Z | 2021-02-24T00:26:46.000Z | tableauserverclient/server/endpoint/metadata_endpoint.py | rrobertsrgare/server-client-python | 3f4db45584fb352e9f21c870027a2302cb824909 | [
"CC0-1.0",
"MIT"
] | 1 | 2021-02-17T18:39:10.000Z | 2021-02-17T18:39:10.000Z | from .endpoint import Endpoint, api
from .exceptions import GraphQLError, InvalidGraphQLQuery
import logging
import json
logger = logging.getLogger('tableau.endpoint.metadata')
def is_valid_paged_query(parsed_query):
"""Check that the required $first and $afterToken variables are present in the query.
Also ... | 36.863309 | 114 | 0.637002 |
63dcc4397c5fe0350e70329990a1311a10aa6121 | 275 | py | Python | mc3/VERSION.py | alulujasmine/mc3 | d4c7581b3ce6a0009882cfb102278e15032bfcad | [
"MIT"
] | null | null | null | mc3/VERSION.py | alulujasmine/mc3 | d4c7581b3ce6a0009882cfb102278e15032bfcad | [
"MIT"
] | null | null | null | mc3/VERSION.py | alulujasmine/mc3 | d4c7581b3ce6a0009882cfb102278e15032bfcad | [
"MIT"
] | null | null | null | # Copyright (c) 2015-2021 Patricio Cubillos and contributors.
# mc3 is open-source software under the MIT license (see LICENSE).
# mc3 Version:
MC3_VER = 3 # Major version
MC3_MIN = 0 # Minor version
MC3_REV = 9 # Revision
__version__ = f'{MC3_VER}.{MC3_MIN}.{MC3_REV}'
| 27.5 | 66 | 0.723636 |
91eb8712efa83148e6c90eec67207482b9c48c02 | 1,606 | py | Python | pysbolgraph/S2FunctionalComponent.py | zhfanrui/pysbolgraph | c4914705bd9b22a2b69db0fc4d43049fcb07ad17 | [
"BSD-2-Clause"
] | 4 | 2018-06-29T10:43:08.000Z | 2019-03-27T22:33:33.000Z | pysbolgraph/S2FunctionalComponent.py | zhfanrui/pysbolgraph | c4914705bd9b22a2b69db0fc4d43049fcb07ad17 | [
"BSD-2-Clause"
] | 14 | 2019-01-22T16:03:12.000Z | 2019-11-11T19:05:32.000Z | pysbolgraph/S2FunctionalComponent.py | zhfanrui/pysbolgraph | c4914705bd9b22a2b69db0fc4d43049fcb07ad17 | [
"BSD-2-Clause"
] | 12 | 2018-07-01T10:59:37.000Z | 2021-03-01T08:48:20.000Z | from .S2Identified import S2Identified
from .S2Component import S2ComponentDefinition
from .S2IdentifiedFactory import S2IdentifiedFactory
from .S2MapsTo import S2MapsTo
from .terms import SBOL2
class S2FunctionalComponent(S2Identified):
def __init__(self, g, uri):
super(S2FunctionalComponent, self).__in... | 29.740741 | 93 | 0.71731 |
83ab0a0f94dc615f07772f7a1c71efdc5c52df97 | 430 | py | Python | get_SMC_seq.py | kaclark/DHS_intergenic_analysis | 5ae1dc1c257ae9dc0e001e07402bebd8e31f0f60 | [
"MIT"
] | null | null | null | get_SMC_seq.py | kaclark/DHS_intergenic_analysis | 5ae1dc1c257ae9dc0e001e07402bebd8e31f0f60 | [
"MIT"
] | null | null | null | get_SMC_seq.py | kaclark/DHS_intergenic_analysis | 5ae1dc1c257ae9dc0e001e07402bebd8e31f0f60 | [
"MIT"
] | null | null | null | from Bio import SeqIO
import pandas as pd
#DhS files
files = ['1','2','4','8']
for entry in files:
seqs = []
#Load fasta file
for record in SeqIO.parse("data/mm10_data/DHS_with_SMC/DHS_" + entry + "_largest_SMC_seq.fa", "fasta"):
seq = str(record.seq)
seqs.append(seq)
dataframe = pd.Da... | 30.714286 | 107 | 0.655814 |
ca0d9729c844f9623d7b8129d4f623a18fb2b488 | 1,002 | py | Python | Fujitsu/benchmarks/resnet/implementations/mxnet/3rdparty/tvm/jvm/core/src/test/scripts/test_add_gpu.py | mengkai94/training_results_v0.6 | 43dc3e250f8da47b5f8833197d74cb8cf1004fc9 | [
"Apache-2.0"
] | 64 | 2021-05-02T14:42:34.000Z | 2021-05-06T01:35:03.000Z | jvm/core/src/test/scripts/test_add_gpu.py | clhne/tvm | d59320c764bd09474775e1b292f3c05c27743d24 | [
"Apache-2.0"
] | 23 | 2019-07-29T05:21:52.000Z | 2020-08-31T18:51:42.000Z | jvm/core/src/test/scripts/test_add_gpu.py | clhne/tvm | d59320c764bd09474775e1b292f3c05c27743d24 | [
"Apache-2.0"
] | 51 | 2019-07-12T05:10:25.000Z | 2021-07-28T16:19:06.000Z | import os
import tvm
from tvm.contrib import cc, util
def test_add(target_dir):
if not tvm.module.enabled("cuda"):
print("skip %s because cuda is not enabled..." % __file__)
return
n = tvm.var("n")
A = tvm.placeholder((n,), name='A')
B = tvm.placeholder((n,), name='B')
C = tvm.comp... | 31.3125 | 81 | 0.615768 |
28bb0f55db582d1bb25b9af527e5c6cd0c929cba | 14,412 | py | Python | platipy/imaging/projects/multiatlas/run.py | RadiotherapyAI/platipy | 53294789a3805ea088c9953027f4ab09a614f052 | [
"Apache-2.0"
] | null | null | null | platipy/imaging/projects/multiatlas/run.py | RadiotherapyAI/platipy | 53294789a3805ea088c9953027f4ab09a614f052 | [
"Apache-2.0"
] | null | null | null | platipy/imaging/projects/multiatlas/run.py | RadiotherapyAI/platipy | 53294789a3805ea088c9953027f4ab09a614f052 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 University of New South Wales, University of Sydney, Ingham Institute
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unle... | 32.680272 | 99 | 0.626145 |
e20c8af95c82b8c81e428dfa935077b376c63ec3 | 1,002 | py | Python | src/view.py | JoshuaVarga/ImGuess | 2dcd847e26d94e63a8e996e68ef803457eae0ed9 | [
"MIT"
] | 1 | 2021-12-19T02:19:22.000Z | 2021-12-19T02:19:22.000Z | src/view.py | JoshuaVarga/ImGuess | 2dcd847e26d94e63a8e996e68ef803457eae0ed9 | [
"MIT"
] | null | null | null | src/view.py | JoshuaVarga/ImGuess | 2dcd847e26d94e63a8e996e68ef803457eae0ed9 | [
"MIT"
] | null | null | null | import tkinter as tk
import numpy as np
from PIL import Image, ImageTk, ImageFilter
class View(tk.Tk):
def __init__(self):
super().__init__()
self.controller = None;
self.preview = tk.Label(borderwidth="0", highlightthickness="0")
self.button = tk.Button(self, text="Next", comman... | 23.857143 | 77 | 0.633733 |
5118af96a227ff30e100be6690bf1cd4b1634823 | 2,387 | py | Python | experiments/ashvin/vae/fixed2/pusher2d/state_puck_dense4.py | Asap7772/rail-rl-franka-eval | 4bf99072376828193d05b53cf83c7e8f4efbd3ba | [
"MIT"
] | null | null | null | experiments/ashvin/vae/fixed2/pusher2d/state_puck_dense4.py | Asap7772/rail-rl-franka-eval | 4bf99072376828193d05b53cf83c7e8f4efbd3ba | [
"MIT"
] | null | null | null | experiments/ashvin/vae/fixed2/pusher2d/state_puck_dense4.py | Asap7772/rail-rl-franka-eval | 4bf99072376828193d05b53cf83c7e8f4efbd3ba | [
"MIT"
] | null | null | null | from railrl.envs.multitask.point2d import MultitaskImagePoint2DEnv
from railrl.envs.multitask.pusher2d import FullPusher2DEnv
from railrl.launchers.arglauncher import run_variants
import railrl.misc.hyperparameter as hyp
from railrl.torch.vae.relabeled_vae_experiment import experiment
if __name__ == "__main__":
#... | 31.407895 | 73 | 0.599916 |
09ee9a58dc7cc624f00861d41adafeda8bd0c689 | 5,891 | py | Python | tests/test_api/test_routes/test_profiles.py | AftabSaraz/fastapi-realworld-example-app-mysql | 25aa54d6e995ded2eeff20f3df2505711aff8eda | [
"MIT"
] | 40 | 2020-03-29T08:56:21.000Z | 2022-02-27T08:14:55.000Z | tests/test_api/test_routes/test_profiles.py | dev-courses/fastapi-backend | 38d66bbafe28e1ddf8954df8a8ae9286d5f5ae7b | [
"MIT"
] | 1 | 2020-12-16T17:18:58.000Z | 2020-12-16T17:18:58.000Z | tests/test_api/test_routes/test_profiles.py | dev-courses/fastapi-backend | 38d66bbafe28e1ddf8954df8a8ae9286d5f5ae7b | [
"MIT"
] | 19 | 2020-03-29T08:56:40.000Z | 2021-12-24T07:23:55.000Z | import pytest
from asyncpg.pool import Pool
from fastapi import FastAPI
from httpx import Client
from starlette import status
from app.db.repositories.profiles import ProfilesRepository
from app.db.repositories.users import UsersRepository
from app.models.domain.users import UserInDB
from app.models.schemas.profiles i... | 32.368132 | 86 | 0.694789 |
666049dbc2c322437b42fd344cdc3ae4abc2b97c | 13,222 | py | Python | datasets/cmudataset.py | bell-one/nerf_cmu | 71e753928c3011d3254ec9ce83d6dde514041877 | [
"MIT"
] | null | null | null | datasets/cmudataset.py | bell-one/nerf_cmu | 71e753928c3011d3254ec9ce83d6dde514041877 | [
"MIT"
] | null | null | null | datasets/cmudataset.py | bell-one/nerf_cmu | 71e753928c3011d3254ec9ce83d6dde514041877 | [
"MIT"
] | null | null | null | import torch
from torch.utils.data import Dataset
import glob
import numpy as np
import os
import pandas as pd
import pickle
from PIL import Image
from torchvision import transforms as T
from .ray_utils import *
from .colmap_utils import \
read_cameras_binary, read_images_binary, read_points3d_binary
import json
i... | 44.668919 | 120 | 0.53116 |
c6816c4eaef7c357bbd8a2f8b1bf33405adacbcf | 7,144 | py | Python | bin/sm_netMHC_result_parse.py | bm2-lab/PREP | e1c5c5bd49137a2b689ab4de0ac31bc30422390b | [
"Apache-2.0"
] | 5 | 2018-11-07T01:54:28.000Z | 2021-03-18T14:14:41.000Z | bin/sm_netMHC_result_parse.py | jianguozhouzunyimedicaluniversity/PREP | e1c5c5bd49137a2b689ab4de0ac31bc30422390b | [
"Apache-2.0"
] | null | null | null | bin/sm_netMHC_result_parse.py | jianguozhouzunyimedicaluniversity/PREP | e1c5c5bd49137a2b689ab4de0ac31bc30422390b | [
"Apache-2.0"
] | 2 | 2019-02-26T11:39:56.000Z | 2021-12-16T13:45:56.000Z | #!/usr/bin/python
# -*- coding: UTF-8 -*-
###########netMHC result parsing and filter based on binding affinity and FPKM #########
import sys,getopt,os
import pandas as pd
opts,args=getopt.getopt(sys.argv[1:],"hi:g:e:o:b:a:f:s:l:",["input_netmhc_file","input_fasta","expression_fpkm_file","out_dir","binding_affinity_... | 35.192118 | 227 | 0.706747 |
901200f73432f28f965374e2da4d1458adfbad45 | 265 | py | Python | code/norm/experiments/__init__.py | danilonumeroso/norm | aebe8c6e186723ed048ad0a9c44fbf9c3e45a78b | [
"MIT"
] | 1 | 2022-03-04T15:32:15.000Z | 2022-03-04T15:32:15.000Z | code/norm/experiments/__init__.py | danilonumeroso/norm | aebe8c6e186723ed048ad0a9c44fbf9c3e45a78b | [
"MIT"
] | null | null | null | code/norm/experiments/__init__.py | danilonumeroso/norm | aebe8c6e186723ed048ad0a9c44fbf9c3e45a78b | [
"MIT"
] | null | null | null | from ._experiment import Experiment, run_exp, resume_exp # noqa: F401
from ._validation import run_valid # noqa: F401
from ._test import run_test # noqa: F401
from ._random_search import random_search # noqa: F401
from ._run import init_runs, Run # noqa: F401
| 44.166667 | 70 | 0.769811 |
515f71b34c17904701838fa7da6cd22294ca9d37 | 6,161 | py | Python | .virtual_documents/Transfer_Learning/get_data.ipynb.py | Srushanth/MLiS-II-Project-Programming-an-Autonomous-Driving-Car | dacca153abd7437b1bf3291b7a065e4ef98e90e0 | [
"MIT"
] | null | null | null | .virtual_documents/Transfer_Learning/get_data.ipynb.py | Srushanth/MLiS-II-Project-Programming-an-Autonomous-Driving-Car | dacca153abd7437b1bf3291b7a065e4ef98e90e0 | [
"MIT"
] | null | null | null | .virtual_documents/Transfer_Learning/get_data.ipynb.py | Srushanth/MLiS-II-Project-Programming-an-Autonomous-Driving-Car | dacca153abd7437b1bf3291b7a065e4ef98e90e0 | [
"MIT"
] | null | null | null | get_ipython().getoutput("git clone https://github.com/dctian/DeepPiCar")
# python standard libraries
import os
import random
import fnmatch
import datetime
import pickle
# data processing
import numpy as np
np.set_printoptions(formatter={'float_kind':lambda x: "get_ipython().run_line_magic(".4f"", " % x})")
import ... | 35.205714 | 156 | 0.675702 |
03faa9439b3948c0bdaf325f42ee76e7a9c86eed | 4,517 | py | Python | tests/sql/test_expression.py | digitalsatori/cubes | 140133e8c2e3f2ff60631cc3ebc9966d16c1655e | [
"MIT"
] | 1,020 | 2015-01-02T03:05:26.000Z | 2022-02-12T18:48:51.000Z | tests/sql/test_expression.py | zshwuhan/cubes | 6d83f04acb34eeb0b904dd1af0e97eda6621bf6c | [
"MIT"
] | 259 | 2015-01-02T22:35:14.000Z | 2021-09-02T04:20:41.000Z | tests/sql/test_expression.py | zshwuhan/cubes | 6d83f04acb34eeb0b904dd1af0e97eda6621bf6c | [
"MIT"
] | 288 | 2015-01-08T00:42:26.000Z | 2022-03-31T17:25:10.000Z | # -*- encoding: utf-8 -*-
from __future__ import absolute_import
import sqlalchemy as sa
from sqlalchemy.sql.expression import ColumnElement
from unittest import TestCase, skip
from cubes.errors import ExpressionError
from cubes.sql.expressions import SQLExpressionCompiler, SQLExpressionContext
from .common import S... | 36.427419 | 80 | 0.591322 |
bff082e31ef54104c79b56b9c76116b3fea9b79f | 3,487 | py | Python | bot/build_order_legacy.py | Blodir/SLUDGEMENT | 99779934f444ac0d2c43df8402a8b5532adde676 | [
"MIT"
] | 3 | 2019-02-16T12:31:21.000Z | 2020-01-30T04:02:48.000Z | bot/build_order_legacy.py | Blodir/SLUDGEMENT | 99779934f444ac0d2c43df8402a8b5532adde676 | [
"MIT"
] | null | null | null | bot/build_order_legacy.py | Blodir/SLUDGEMENT | 99779934f444ac0d2c43df8402a8b5532adde676 | [
"MIT"
] | null | null | null | from typing import List, Tuple
from sc2 import BotAI
from sc2.ids.unit_typeid import UnitTypeId
from .data import *
class BOStep():
def __init__(self, condition, unit: UnitTypeId):
self.condition = condition
self.unit_id: UnitTypeId = unit
def try_condition(self) -> bool:
return self.c... | 44.705128 | 192 | 0.622598 |
8995995d9ab6c37918d51e50df95371e1ab22754 | 6,200 | py | Python | configs/top_down/hrt/crowdpose/hrt_base_crowdpose_256x192_b32.py | leijue222/HRFormer_mmpose | 123c3e17c11a8c90becef91f13bb5dca0d776f19 | [
"Apache-2.0"
] | 1 | 2022-01-09T01:51:12.000Z | 2022-01-09T01:51:12.000Z | configs/top_down/hrt/crowdpose/hrt_base_crowdpose_256x192_b32.py | leijue222/HRFormer_mmpose | 123c3e17c11a8c90becef91f13bb5dca0d776f19 | [
"Apache-2.0"
] | null | null | null | configs/top_down/hrt/crowdpose/hrt_base_crowdpose_256x192_b32.py | leijue222/HRFormer_mmpose | 123c3e17c11a8c90becef91f13bb5dca0d776f19 | [
"Apache-2.0"
] | null | null | null | log_level = 'INFO'
load_from = None
# resume_from = '/mnt/blob/HRFormer_mmpose/mmpose-logs/hrt_base_crowdpose_256x192/epoch_30.pth'
resume_from = None
dist_params = dict(backend='nccl')
workflow = [('train', 1)]
checkpoint_config = dict(interval=5, create_symlink=False)
evaluation = dict(interval=10, metric='mAP', key_... | 30.845771 | 148 | 0.588065 |
e5eecd3161e0a0554b854df63af469fea5475bdc | 356,641 | py | Python | nova/tests/functional/test_servers.py | adallaway/nova | e73000e9e0699f9396bba3c7e87789d85ca59a2d | [
"Apache-2.0"
] | 1 | 2021-02-08T06:53:51.000Z | 2021-02-08T06:53:51.000Z | nova/tests/functional/test_servers.py | adallaway/nova | e73000e9e0699f9396bba3c7e87789d85ca59a2d | [
"Apache-2.0"
] | null | null | null | nova/tests/functional/test_servers.py | adallaway/nova | e73000e9e0699f9396bba3c7e87789d85ca59a2d | [
"Apache-2.0"
] | null | null | null | # Copyright 2011 Justin Santa Barbara
# 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 requ... | 43.695295 | 79 | 0.645467 |
2be1e26917742de08eaa317f1879737f116d8e18 | 1,300 | py | Python | src/scraper/proshop.py | Danonym/inventory-hunter | 313a67da245c799dc5f0f53f437a6cce165dc69b | [
"MIT"
] | null | null | null | src/scraper/proshop.py | Danonym/inventory-hunter | 313a67da245c799dc5f0f53f437a6cce165dc69b | [
"MIT"
] | null | null | null | src/scraper/proshop.py | Danonym/inventory-hunter | 313a67da245c799dc5f0f53f437a6cce165dc69b | [
"MIT"
] | null | null | null | from scraper.common import ScrapeResult, Scraper, ScraperFactory
class ProshopScrapeResult(ScrapeResult):
def parse(self):
alert_subject = 'In Stock'
alert_content = ''
# get name of product
tag = self.soup.head.find('meta', property='og:title')
if tag:
alert_c... | 29.545455 | 77 | 0.615385 |
e4b98571ec174b7bb8bd81b529b7283b13c64329 | 1,203 | py | Python | .history/streamlithero_20220303162552.py | rypaik/Streamlit_Ref | 5ce11cecbe8307238463c126b88b3beed66c99fa | [
"MIT"
] | null | null | null | .history/streamlithero_20220303162552.py | rypaik/Streamlit_Ref | 5ce11cecbe8307238463c126b88b3beed66c99fa | [
"MIT"
] | null | null | null | .history/streamlithero_20220303162552.py | rypaik/Streamlit_Ref | 5ce11cecbe8307238463c126b88b3beed66c99fa | [
"MIT"
] | null | null | null | import os
import streamlit as st
import numpy as np
from PIL import Image
from modules.toc import *
# Custom imports
from multipage import MultiPage
# import your pages here
from pages import intro
st.set_pate_config()
# Create an instance of the app
app = MultiPage()
# Title of the main page
display = Image.open... | 24.55102 | 66 | 0.736492 |
36b0586eea975cb7f204663a46fef789c595cff8 | 1,906 | py | Python | test.py | bigabig/saliency | 83618c90ea419ee05fbed116e8ad7bb2b331ecf5 | [
"Apache-2.0"
] | 1 | 2020-08-25T19:38:30.000Z | 2020-08-25T19:38:30.000Z | test.py | bigabig/saliency | 83618c90ea419ee05fbed116e8ad7bb2b331ecf5 | [
"Apache-2.0"
] | null | null | null | test.py | bigabig/saliency | 83618c90ea419ee05fbed116e8ad7bb2b331ecf5 | [
"Apache-2.0"
] | null | null | null | import os
import imageio
import torch
from Discriminator import Discriminator
from Generator import Generator
import torch.nn.functional as F
from train_helper import load_test_dataset
# constants
MODEL_PATH = './model/'
OUT_PATH = './out/'
if not os.path.exists(MODEL_PATH):
print(f"ERROR: Model directory {MODEL... | 32.305085 | 101 | 0.721406 |
b16939f372e9f76faeed8ea950af382bc51639d2 | 1,287 | py | Python | test/test_css.py | Sophist-UK/svgelements | b23ff60cdfa1470ae15d198c6136c008d69095b9 | [
"MIT"
] | 51 | 2020-01-16T17:24:59.000Z | 2022-03-31T14:43:43.000Z | test/test_css.py | Sophist-UK/svgelements | b23ff60cdfa1470ae15d198c6136c008d69095b9 | [
"MIT"
] | 96 | 2019-12-30T15:09:11.000Z | 2022-03-22T12:25:03.000Z | test/test_css.py | meerk40t/svg.elements | 761bb315a6c12a8fcea990276570780a07fc492f | [
"MIT"
] | 15 | 2020-09-02T16:56:19.000Z | 2022-03-26T13:05:49.000Z | import unittest
import io
from svgelements import *
class TestSVGCSS(unittest.TestCase):
def test_issue_103(self):
"""Testing Issue 103 css class parsing
This test is based on an Illustrator file, where the styling relies more on CSS.
"""
q = io.StringIO(u'''<svg xmlns="http://w... | 33 | 154 | 0.567988 |
6cc043e1cb61a1e4e7f635569ad8bf5b80267a65 | 9,891 | py | Python | tensorflow/python/debug/cli/profile_analyzer_cli_test.py | xincao79/tensorflow | 7fa0cf39f854d5fdaaa19ad6425dfed02f5fea64 | [
"Apache-2.0"
] | 1 | 2021-03-16T12:20:03.000Z | 2021-03-16T12:20:03.000Z | tensorflow/python/debug/cli/profile_analyzer_cli_test.py | xincao79/tensorflow | 7fa0cf39f854d5fdaaa19ad6425dfed02f5fea64 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/debug/cli/profile_analyzer_cli_test.py | xincao79/tensorflow | 7fa0cf39f854d5fdaaa19ad6425dfed02f5fea64 | [
"Apache-2.0"
] | 1 | 2021-03-16T12:20:05.000Z | 2021-03-16T12:20:05.000Z | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 37.324528 | 80 | 0.699424 |
1985d44e2a3a94ead06240c3312d4059b1e9ef44 | 10,503 | py | Python | distributed/tests/test_resources.py | gjoseph92/distributed | af64e07a01e8ce0d76744099a93ca2155d835ba8 | [
"BSD-3-Clause"
] | null | null | null | distributed/tests/test_resources.py | gjoseph92/distributed | af64e07a01e8ce0d76744099a93ca2155d835ba8 | [
"BSD-3-Clause"
] | null | null | null | distributed/tests/test_resources.py | gjoseph92/distributed | af64e07a01e8ce0d76744099a93ca2155d835ba8 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import print_function, division, absolute_import
from time import time
from dask import delayed
import pytest
from tornado import gen
from distributed import Worker
from distributed.client import wait
from distributed.compatibility import WINDOWS
from distributed.utils import tokey
from distributed.u... | 26.389447 | 88 | 0.573836 |
841aa46ea4618a5b5501c10f05869330cf140af9 | 3,728 | py | Python | src/isaw.theme/isaw/theme/portlets/feature.py | isawnyu/isaw.web | 604499f9fa55d1ce9698ca05f85ddb54a88f1cab | [
"CC-BY-3.0"
] | null | null | null | src/isaw.theme/isaw/theme/portlets/feature.py | isawnyu/isaw.web | 604499f9fa55d1ce9698ca05f85ddb54a88f1cab | [
"CC-BY-3.0"
] | 405 | 2015-03-12T18:20:25.000Z | 2022-03-07T18:44:16.000Z | src/isaw.theme/isaw/theme/portlets/feature.py | isawnyu/isaw.web | 604499f9fa55d1ce9698ca05f85ddb54a88f1cab | [
"CC-BY-3.0"
] | 1 | 2016-11-07T21:18:49.000Z | 2016-11-07T21:18:49.000Z | from zope import schema
from zope.component import getMultiAdapter
from zope.formlib import form
from zope.interface import implements
from plone.app.portlets.portlets import base
from plone.portlets.interfaces import IPortletDataProvider
from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
from Prod... | 34.518519 | 98 | 0.648873 |
e60533581ca511ab287cb37ae644045d6d8178b8 | 641 | py | Python | tests/integration/tf/test_ci_04_export_ranking_models.py | mikemckiernan/models | 674a3edf14c62bf0d5490f5433eed15abec416f8 | [
"Apache-2.0"
] | null | null | null | tests/integration/tf/test_ci_04_export_ranking_models.py | mikemckiernan/models | 674a3edf14c62bf0d5490f5433eed15abec416f8 | [
"Apache-2.0"
] | 1 | 2022-03-08T13:41:41.000Z | 2022-03-15T17:42:08.000Z | tests/integration/tf/test_ci_04_export_ranking_models.py | mikemckiernan/models | 674a3edf14c62bf0d5490f5433eed15abec416f8 | [
"Apache-2.0"
] | null | null | null | import os
import pytest
from testbook import testbook
from tests.conftest import REPO_ROOT
@testbook(REPO_ROOT / "examples/04-Exporting-ranking-models.ipynb", timeout=180, execute=False)
def test_func(tb):
if not os.path.isdir("/raid/data/aliccp/raw/"):
pytest.skip("Data not found.")
tb.inject(
... | 25.64 | 95 | 0.628705 |
984aa45cd18839b470fdaabff5901705b85e84a8 | 433 | py | Python | lib/utils/csv_utils.py | gyani91/data-engineering | cdf389b42c8b715e5d8db8ac2feaf42919a8668b | [
"MIT"
] | null | null | null | lib/utils/csv_utils.py | gyani91/data-engineering | cdf389b42c8b715e5d8db8ac2feaf42919a8668b | [
"MIT"
] | null | null | null | lib/utils/csv_utils.py | gyani91/data-engineering | cdf389b42c8b715e5d8db8ac2feaf42919a8668b | [
"MIT"
] | null | null | null | import csv
import os
def save_result(filename, columns, data):
"""
Saves the result as a CSV file
:param filename: file name for the CSV file
:param columns: column names
:param data: the result data to be written
"""
with open(os.path.join("data/query_results/", filename), "w") as f:
... | 22.789474 | 71 | 0.623557 |
ff529a44d607222be31bfc0374ee52eabf63dc43 | 816 | py | Python | runner_map.py | beckrob/AvERA_ISW | 2eb3fe6d0346513e1b50bbfdbfa1714c6353a35d | [
"MIT"
] | null | null | null | runner_map.py | beckrob/AvERA_ISW | 2eb3fe6d0346513e1b50bbfdbfa1714c6353a35d | [
"MIT"
] | null | null | null | runner_map.py | beckrob/AvERA_ISW | 2eb3fe6d0346513e1b50bbfdbfa1714c6353a35d | [
"MIT"
] | null | null | null | import numpy as np
import sys
from scipy import integrate
sims=['BR','LCDM']
startPointNum = 3
simulationTypes = 3
pairings=[]
for i in range(len(sims)):
for j in range(startPointNum):
for k in [2]:#range(simulationTypes):
pairings.append([sims[i],j,k])
computerS... | 17.73913 | 141 | 0.605392 |
b8f8c9f65f8a001c1caf1de76a45b7cb3a861953 | 789 | py | Python | src/api/admin.py | IkramKhan-DevOps/cs-heartcare | 5f4c5e4f2ca91761ccf57a32eb35bb49adc531ed | [
"MIT"
] | null | null | null | src/api/admin.py | IkramKhan-DevOps/cs-heartcare | 5f4c5e4f2ca91761ccf57a32eb35bb49adc531ed | [
"MIT"
] | null | null | null | src/api/admin.py | IkramKhan-DevOps/cs-heartcare | 5f4c5e4f2ca91761ccf57a32eb35bb49adc531ed | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.utils.html import format_html
from django.utils.translation import gettext, gettext_lazy as _
from .models import (
Predication
)
class PredicationAdmin(admin.ModelAdmin):
fieldsets = (
(None, {'fields': ('user', 'age', 'gender')}),
(_('Readings'),... | 34.304348 | 107 | 0.65526 |
9e4f49d4d36da41d1088ddc43e783a9bbae6d473 | 2,480 | py | Python | lib/symbioticpy/symbiotic/targets/predatorhp.py | paldebjit/symbiotic | 3dcaca90ccdcb6c0212f4e4bcbfc50710cc15214 | [
"MIT"
] | 235 | 2016-03-16T11:13:59.000Z | 2022-03-09T20:09:14.000Z | lib/symbioticpy/symbiotic/targets/predatorhp.py | paldebjit/symbiotic | 3dcaca90ccdcb6c0212f4e4bcbfc50710cc15214 | [
"MIT"
] | 184 | 2015-10-09T17:54:35.000Z | 2022-02-16T14:34:37.000Z | lib/symbioticpy/symbiotic/targets/predatorhp.py | paldebjit/symbiotic | 3dcaca90ccdcb6c0212f4e4bcbfc50710cc15214 | [
"MIT"
] | 38 | 2016-03-03T23:51:19.000Z | 2022-02-25T05:21:06.000Z | """
BenchExec is a framework for reliable benchmarking.
This file is part of BenchExec.
Copyright (C) 2007-2015 Dirk Beyer
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
... | 30.243902 | 93 | 0.694355 |
6e4daef43d63246da8ab591069e4f854a56f18b2 | 7,658 | py | Python | PoemAnalyzer.py | sebturner01/PoetryComprehension | b9e7cd722d1bc4f09075781ef3a426831fd81f7d | [
"MIT"
] | null | null | null | PoemAnalyzer.py | sebturner01/PoetryComprehension | b9e7cd722d1bc4f09075781ef3a426831fd81f7d | [
"MIT"
] | 5 | 2020-09-26T17:57:49.000Z | 2020-10-13T21:15:44.000Z | PoemAnalyzer.py | sebturner01/PoetryComprehension | b9e7cd722d1bc4f09075781ef3a426831fd81f7d | [
"MIT"
] | null | null | null | # Authors: Damian Armijo and Sebastian Turner
# Date: 09/27/20
# All fucntions that are not getPoemPhones require getPoemPhones to run and this
# function to
# -----------------
# Init
# -----------------
import pronouncing
import Poem
import nltk
import copy
import re
# -----------------
# Functions
# --------------... | 27.746377 | 95 | 0.626534 |
2de6f207c1bde6119937c2cfb80985ced60f56da | 15,846 | py | Python | salt/proxy/nxos.py | babs/salt | c536ea716d5308880b244e7980f4b659d86fc104 | [
"Apache-2.0"
] | 2 | 2015-08-21T01:05:03.000Z | 2015-09-02T07:30:45.000Z | salt/proxy/nxos.py | babs/salt | c536ea716d5308880b244e7980f4b659d86fc104 | [
"Apache-2.0"
] | 9 | 2021-03-31T20:25:25.000Z | 2021-07-04T05:33:46.000Z | salt/proxy/nxos.py | babs/salt | c536ea716d5308880b244e7980f4b659d86fc104 | [
"Apache-2.0"
] | 1 | 2020-06-02T14:15:24.000Z | 2020-06-02T14:15:24.000Z | r"""
Proxy Minion for Cisco NX-OS Switches
.. versionadded:: 2016.11.0
The Cisco NX-OS Proxy Minion is supported on NX-OS devices for the following connection types:
1) Connection Type SSH
2) Connection Type NX-API (If Supported By The Device and Image Version).
:maturity: new
:platform: nxos
SSH uses the built... | 31.316206 | 228 | 0.619273 |
67dd8766ecbf5d0827f35f7cc85bd20440a5be27 | 20,854 | py | Python | plugins/Miscellaneous/wxRavenMiscellaneous_CreateAdvertisingLogic.py | sLiinuX/wxRaven | a513a029fa1ff2059ee262c524b4b2b45111f1a6 | [
"MIT"
] | 11 | 2021-12-20T15:32:17.000Z | 2022-03-16T03:54:02.000Z | plugins/Miscellaneous/wxRavenMiscellaneous_CreateAdvertisingLogic.py | sLiinuX/wxRaven | a513a029fa1ff2059ee262c524b4b2b45111f1a6 | [
"MIT"
] | 156 | 2021-12-31T21:01:31.000Z | 2022-03-20T21:57:31.000Z | plugins/Miscellaneous/wxRavenMiscellaneous_CreateAdvertisingLogic.py | sLiinuX/wxRaven | a513a029fa1ff2059ee262c524b4b2b45111f1a6 | [
"MIT"
] | 3 | 2022-01-21T14:52:43.000Z | 2022-02-12T05:32:19.000Z | '''
Created on 17 janv. 2022
@author: slinux
'''
import threading
import time
from .wxRavenMiscellaneousDesign import *
from wxRavenGUI.application.wxcustom import *
#from libs.RVNpyRPC._P2PmarketPlace import
import random
import os
import time
from datetime import datetime
class wxRavenMiscellaneous_Creat... | 35.048739 | 226 | 0.553323 |
e978b72d735b9cbe9cc170f453eb63f2bf877964 | 3,373 | py | Python | observatory-reports/observatory/reports/charts/funder_count_bar_graph.py | The-Academic-Observatory/observatory-reports | 6b59f3e1950ba2ed69c37eb64b845f3224d52cbb | [
"Apache-2.0"
] | null | null | null | observatory-reports/observatory/reports/charts/funder_count_bar_graph.py | The-Academic-Observatory/observatory-reports | 6b59f3e1950ba2ed69c37eb64b845f3224d52cbb | [
"Apache-2.0"
] | null | null | null | observatory-reports/observatory/reports/charts/funder_count_bar_graph.py | The-Academic-Observatory/observatory-reports | 6b59f3e1950ba2ed69c37eb64b845f3224d52cbb | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Curtin University
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 35.882979 | 78 | 0.633561 |
25fce872591f48ca2a334009274a90cf5bc0ce28 | 317 | py | Python | mayan/apps/file_caching/tests/literals.py | nattangwiwat/Mayan-EDMS-recitation | fcf16afb56eae812fb99144d65ae1ae6749de0b7 | [
"Apache-2.0"
] | 343 | 2015-01-05T14:19:35.000Z | 2018-12-10T19:07:48.000Z | mayan/apps/file_caching/tests/literals.py | nattangwiwat/Mayan-EDMS-recitation | fcf16afb56eae812fb99144d65ae1ae6749de0b7 | [
"Apache-2.0"
] | 191 | 2015-01-03T00:48:19.000Z | 2018-11-30T09:10:25.000Z | mayan/apps/file_caching/tests/literals.py | nattangwiwat/Mayan-EDMS-recitation | fcf16afb56eae812fb99144d65ae1ae6749de0b7 | [
"Apache-2.0"
] | 257 | 2019-05-14T10:26:37.000Z | 2022-03-30T03:37:36.000Z | TEST_CACHE_MAXIMUM_SIZE = 2 * 2 ** 20 # 2 Megabyte
TEST_CACHE_PARTITION_FILE_FILENAME = 'test_cache_partition_file_filename'
TEST_CACHE_PARTITION_FILE_SIZE = 1 * 2 ** 20 # 1 Megabyte
TEST_CACHE_PARTITION_NAME = 'test_cache_partition_name'
TEST_STORAGE_NAME_FILE_CACHING_TEST_STORAGE = 'file_caching__test_storage'
| 45.285714 | 74 | 0.839117 |
1d0f88c734e95df9f7680144e69bad98a5b73970 | 6,294 | py | Python | poppurri/mixture/migrations/0011_auto__add_field_mixture_slug.py | ariel17/poppurri | 56c2f7ec96402e96776b928cd8be5454f7c2ab67 | [
"MIT"
] | null | null | null | poppurri/mixture/migrations/0011_auto__add_field_mixture_slug.py | ariel17/poppurri | 56c2f7ec96402e96776b928cd8be5454f7c2ab67 | [
"MIT"
] | 12 | 2017-06-01T13:15:33.000Z | 2017-06-01T13:15:35.000Z | poppurri/mixture/migrations/0011_auto__add_field_mixture_slug.py | ariel17/poppurri | 56c2f7ec96402e96776b928cd8be5454f7c2ab67 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Mixture.slug'
db.add_column(u'mixture_mixture', 'slug',
... | 69.933333 | 195 | 0.566095 |
1dbbc45d74fdf6474a5344549852304061795911 | 13,233 | py | Python | rdfextras/tools/csv2rdf.py | renefritze/rdfextras | 44ccf3ba1ccfc0e0c434146b98a5e236021da56d | [
"BSD-3-Clause"
] | null | null | null | rdfextras/tools/csv2rdf.py | renefritze/rdfextras | 44ccf3ba1ccfc0e0c434146b98a5e236021da56d | [
"BSD-3-Clause"
] | null | null | null | rdfextras/tools/csv2rdf.py | renefritze/rdfextras | 44ccf3ba1ccfc0e0c434146b98a5e236021da56d | [
"BSD-3-Clause"
] | null | null | null | import sys
import re
import csv
import getopt
import configparser
import fileinput
import codecs
import time
import datetime
import warnings
import urllib.request, urllib.error, urllib.parse
import rdflib
from rdflib import RDF, RDFS
from rdflib.namespace import split_uri
HELP="""
toRDF.py -b <instance-base> -p <pro... | 31.136471 | 224 | 0.560115 |
aeb34ae0d81dc01c0c8e4f83bd4dace4ad09ff87 | 209 | py | Python | tianshou/utils/__init__.py | Leeqh666/tianshou | f71db624bee67b6170caaa06b0d3f68901b87985 | [
"MIT"
] | null | null | null | tianshou/utils/__init__.py | Leeqh666/tianshou | f71db624bee67b6170caaa06b0d3f68901b87985 | [
"MIT"
] | null | null | null | tianshou/utils/__init__.py | Leeqh666/tianshou | f71db624bee67b6170caaa06b0d3f68901b87985 | [
"MIT"
] | null | null | null | from tianshou.utils.config import tqdm_config
from tianshou.utils.compile import pre_compile
from tianshou.utils.moving_average import MovAvg
__all__ = [
"MovAvg",
"pre_compile",
"tqdm_config",
]
| 20.9 | 48 | 0.760766 |
0a3c48b1d197687723bb449e90eab630f4eed9d2 | 3,544 | py | Python | bindings/python/ensmallen/datasets/string/pasteurellamultocida.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 5 | 2021-02-17T00:44:45.000Z | 2021-08-09T16:41:47.000Z | bindings/python/ensmallen/datasets/string/pasteurellamultocida.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 18 | 2021-01-07T16:47:39.000Z | 2021-08-12T21:51:32.000Z | bindings/python/ensmallen/datasets/string/pasteurellamultocida.py | AnacletoLAB/ensmallen | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 3 | 2021-01-14T02:20:59.000Z | 2021-08-04T19:09:52.000Z | """
This file offers the methods to automatically retrieve the graph Pasteurella multocida.
The graph is automatically retrieved from the STRING repository.
References
---------------------
Please cite the following if you use the data:
```bib
@article{szklarczyk2019string,
title={STRING v11: protein--protein ... | 32.814815 | 223 | 0.677201 |
7461832decf567c47c779ba58a035060cf2357b1 | 1,328 | py | Python | tests/dynamics/torch/test_mopo_impl.py | alxlampe/d3rlpy | af7e6bd018a51f95138d121f59c50dc36ec87e3a | [
"MIT"
] | null | null | null | tests/dynamics/torch/test_mopo_impl.py | alxlampe/d3rlpy | af7e6bd018a51f95138d121f59c50dc36ec87e3a | [
"MIT"
] | null | null | null | tests/dynamics/torch/test_mopo_impl.py | alxlampe/d3rlpy | af7e6bd018a51f95138d121f59c50dc36ec87e3a | [
"MIT"
] | null | null | null | import pytest
from d3rlpy.dynamics.torch.mopo_impl import MOPOImpl
from d3rlpy.optimizers import AdamFactory
from d3rlpy.encoders import DefaultEncoderFactory
from tests.algos.algo_test import DummyScaler
from tests.dynamics.dynamics_test import torch_impl_tester
@pytest.mark.parametrize('observation_shape', [(100, ... | 40.242424 | 70 | 0.670934 |
55a7ef447ff87c4198ffc1f585d4fd8e28bec979 | 6,695 | py | Python | blaster/utils/xss_html.py | abhinavabcd/blaster | e395ec3efa60bb3f197527837c90a05071e65da9 | [
"MIT"
] | 4 | 2018-07-23T19:52:50.000Z | 2022-01-06T11:45:24.000Z | blaster/utils/xss_html.py | abhinavabcd/blaster | e395ec3efa60bb3f197527837c90a05071e65da9 | [
"MIT"
] | null | null | null | blaster/utils/xss_html.py | abhinavabcd/blaster | e395ec3efa60bb3f197527837c90a05071e65da9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Python 富文本XSS过滤类
@package XssHtml
@version 0.1
@link http://phith0n.github.io/python-xss-filter
@since 20150407
@copyright (c) Phithon All Rights Reserved
Based on native Python module HTMLParser purifier of HTML, To Clear all javascript in html
You can use it in all python web framework
Wr... | 32.980296 | 104 | 0.555788 |
75dc62483597410a040ca4ac0f76753abea50860 | 42 | py | Python | src/emutils/tf/__init__.py | emanuele-albini/emutils | d5e3939da8a14b629879f06d87d4bd371e7117ab | [
"MIT"
] | null | null | null | src/emutils/tf/__init__.py | emanuele-albini/emutils | d5e3939da8a14b629879f06d87d4bd371e7117ab | [
"MIT"
] | null | null | null | src/emutils/tf/__init__.py | emanuele-albini/emutils | d5e3939da8a14b629879f06d87d4bd371e7117ab | [
"MIT"
] | null | null | null | from .metrics import *
from .math import * | 21 | 22 | 0.738095 |
0a504d9eae7a5743e493545e15139199450eb4c3 | 1,846 | py | Python | tests/test_errors.py | kprzerwa/invenio-rest | a5fe5abe4a189b79b90ef9be4737dbd6e1e7dbd4 | [
"MIT"
] | 3 | 2015-10-29T16:24:05.000Z | 2017-10-25T01:00:27.000Z | tests/test_errors.py | kprzerwa/invenio-rest | a5fe5abe4a189b79b90ef9be4737dbd6e1e7dbd4 | [
"MIT"
] | 79 | 2015-10-28T13:53:13.000Z | 2022-03-21T14:04:54.000Z | tests/test_errors.py | kprzerwa/invenio-rest | a5fe5abe4a189b79b90ef9be4737dbd6e1e7dbd4 | [
"MIT"
] | 41 | 2015-10-28T13:45:40.000Z | 2022-02-15T08:45:04.000Z | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2015-2018 CERN.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Error module tests."""
from __future__ import absolute_import, print_function
im... | 31.288136 | 76 | 0.647346 |
12baeda9fca31a61b9195a53d46a7b76cbeb913b | 2,129 | py | Python | airflow/api_connexion/endpoints/import_error_endpoint.py | Adil-Ibragimov/airflow | e565368f2e988a06b0398b77e66859c138905ae7 | [
"Apache-2.0"
] | 1 | 2020-08-05T18:30:40.000Z | 2020-08-05T18:30:40.000Z | airflow/api_connexion/endpoints/import_error_endpoint.py | Adil-Ibragimov/airflow | e565368f2e988a06b0398b77e66859c138905ae7 | [
"Apache-2.0"
] | null | null | null | airflow/api_connexion/endpoints/import_error_endpoint.py | Adil-Ibragimov/airflow | e565368f2e988a06b0398b77e66859c138905ae7 | [
"Apache-2.0"
] | 1 | 2020-09-10T09:51:46.000Z | 2020-09-10T09:51:46.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... | 36.706897 | 105 | 0.779239 |
022c31db83d8e20bb744c55dc82b3207cb68a153 | 2,649 | py | Python | src/joint_embedding/metrics/ti_cons/script.py | openproblems-bio/neurips2021_multimodal_viash | b12564cc7805f18b5e0351b5034029fe68be9630 | [
"MIT"
] | 14 | 2021-08-04T23:20:31.000Z | 2022-02-16T09:12:06.000Z | src/joint_embedding/metrics/ti_cons/script.py | openproblems-bio/neurips2021_multimodal_viash | b12564cc7805f18b5e0351b5034029fe68be9630 | [
"MIT"
] | 17 | 2021-08-03T09:17:46.000Z | 2021-11-16T12:31:54.000Z | src/joint_embedding/metrics/ti_cons/script.py | openproblems-bio/neurips2021_multimodal_viash | b12564cc7805f18b5e0351b5034029fe68be9630 | [
"MIT"
] | 7 | 2021-08-04T23:21:11.000Z | 2022-02-16T09:13:27.000Z | ## VIASH START
par = dict(
input_prediction="resources_test/joint_embedding/openproblems_bmmc_multiome_starter/openproblems_bmmc_multiome_starter.prediction.h5ad",
input_solution="resources_test/joint_embedding/openproblems_bmmc_multiome_starter/openproblems_bmmc_multiome_starter.solution.h5ad",
output="res... | 29.433333 | 140 | 0.737637 |
6070f623ed11ba4229a49b02c23030b581cf1856 | 2,233 | py | Python | sign.py | moeshin/hzj-sign | a08832d21dddef40b1d9b7c00cc007c174ae9d9f | [
"MIT"
] | 1 | 2022-02-13T14:19:13.000Z | 2022-02-13T14:19:13.000Z | sign.py | moeshin/hzj-sign | a08832d21dddef40b1d9b7c00cc007c174ae9d9f | [
"MIT"
] | 1 | 2022-02-13T13:00:38.000Z | 2022-02-13T15:39:51.000Z | sign.py | moeshin/hzj-sign | a08832d21dddef40b1d9b7c00cc007c174ae9d9f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import http.client
import json
import os
import time
import urllib.parse
def sign(token, address='', location='', trip=False):
conn = http.client.HTTPConnection('gzdk.gzisp.net', 8082)
conn.request('POST', '/sign/addSignIn?' + urllib.parse.urlencode({
'SCALE': 18,
'autho... | 27.231707 | 111 | 0.570085 |
ade6ccae5b7f8af5d455ac11c88e8c54bd810333 | 31,103 | py | Python | RTS/3.3-Interferometric_Gain_curve/gain_curve.py | ska-sa/katsdpscripts | f9eaa867aad8b94c715f7286953124df00b5781c | [
"BSD-3-Clause"
] | null | null | null | RTS/3.3-Interferometric_Gain_curve/gain_curve.py | ska-sa/katsdpscripts | f9eaa867aad8b94c715f7286953124df00b5781c | [
"BSD-3-Clause"
] | 21 | 2019-09-16T15:26:53.000Z | 2022-01-11T09:14:39.000Z | RTS/3.3-Interferometric_Gain_curve/gain_curve.py | ska-sa/katsdpscripts | f9eaa867aad8b94c715f7286953124df00b5781c | [
"BSD-3-Clause"
] | 1 | 2019-11-11T11:47:54.000Z | 2019-11-11T11:47:54.000Z | #!/usr/bin/python
# Read in the results produced by analyse_point_source_scans.py
# Perform gain curve calculations and produce plots for report.
# T Mauch 24-10-2009, adapted from code originally written by S. Goedhardt
import os.path
import sys
import logging
import optparse
import glob
import time
import numpy as ... | 43.807042 | 208 | 0.648105 |
19b75de26672989a9d9d9e176848b30039d72964 | 3,815 | py | Python | amla/amla.py | tremblerz/amla | 6ab000d6e7703cc5591451e324c9882408943816 | [
"Apache-2.0"
] | 118 | 2018-06-25T05:01:22.000Z | 2022-03-07T05:46:08.000Z | amla/amla.py | tremblerz/amla | 6ab000d6e7703cc5591451e324c9882408943816 | [
"Apache-2.0"
] | 22 | 2018-06-12T21:22:37.000Z | 2020-04-08T07:59:49.000Z | amla/amla.py | tremblerz/amla | 6ab000d6e7703cc5591451e324c9882408943816 | [
"Apache-2.0"
] | 21 | 2018-07-20T22:01:30.000Z | 2021-05-30T08:57:50.000Z | #Copyright 2018 Cisco Systems 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 agreed to ... | 31.528926 | 73 | 0.644823 |
696f16bd95560648bdeb40687d22c3a262a0a728 | 19,475 | py | Python | .venv/lib/python3.8/site-packages/pandas_datareader/data.py | eo1989/VectorBTanalysis | bea3deaf2ee3fc114b308146f2af3e4f35f70197 | [
"MIT"
] | 1 | 2021-11-16T19:06:56.000Z | 2021-11-16T19:06:56.000Z | .venv/lib/python3.8/site-packages/pandas_datareader/data.py | eo1989/VectorBTanalysis | bea3deaf2ee3fc114b308146f2af3e4f35f70197 | [
"MIT"
] | null | null | null | .venv/lib/python3.8/site-packages/pandas_datareader/data.py | eo1989/VectorBTanalysis | bea3deaf2ee3fc114b308146f2af3e4f35f70197 | [
"MIT"
] | 1 | 2021-11-16T19:06:53.000Z | 2021-11-16T19:06:53.000Z | """
Module contains tools for collecting data from various remote sources
"""
# flake8: noqa
import warnings
from pandas.util._decorators import deprecate_kwarg
from pandas_datareader.av.forex import AVForexReader
from pandas_datareader.av.quotes import AVQuotesReader
from pandas_datareader.av.sector import AVSecto... | 27.981322 | 88 | 0.608935 |
da875734191200ce5c5ff47eb7709474cdee6f59 | 436 | py | Python | LeetCode/python3/795.py | ZintrulCre/LeetCode_Archiver | de23e16ead29336b5ee7aa1898a392a5d6463d27 | [
"MIT"
] | 279 | 2019-02-19T16:00:32.000Z | 2022-03-23T12:16:30.000Z | LeetCode/python3/795.py | ZintrulCre/LeetCode_Archiver | de23e16ead29336b5ee7aa1898a392a5d6463d27 | [
"MIT"
] | 2 | 2019-03-31T08:03:06.000Z | 2021-03-07T04:54:32.000Z | LeetCode/python3/795.py | ZintrulCre/LeetCode_Crawler | de23e16ead29336b5ee7aa1898a392a5d6463d27 | [
"MIT"
] | 12 | 2019-01-29T11:45:32.000Z | 2019-02-04T16:31:46.000Z | class Solution:
def numSubarrayBoundedMax(self, A: 'List[int]', L: 'int', R: 'int') -> 'int':
i, m, j, res = 0, -1, 0, 0
while j < len(A):
if A[j] >= L and A[j] <= R:
m = j
res += m - i + 1
elif A[j] < L:
res += m - i + 1 if m !... | 31.142857 | 81 | 0.323394 |
b566cf58e765c5450c4c59dcbfeb2557a8addfe7 | 22,957 | py | Python | caffe2/python/examples/resnet50_trainer.py | ashishfarmer/rocm-caffe2 | 097fe3f71b0e4311340ff7eb797ed6c351073d54 | [
"Apache-2.0"
] | 12 | 2018-04-14T22:00:51.000Z | 2018-07-26T16:44:20.000Z | caffe2/python/examples/resnet50_trainer.py | ashishfarmer/rocm-caffe2 | 097fe3f71b0e4311340ff7eb797ed6c351073d54 | [
"Apache-2.0"
] | 27 | 2018-04-14T06:44:22.000Z | 2018-08-01T18:02:39.000Z | caffe2/python/examples/resnet50_trainer.py | ashishfarmer/rocm-caffe2 | 097fe3f71b0e4311340ff7eb797ed6c351073d54 | [
"Apache-2.0"
] | 2 | 2018-04-16T20:46:16.000Z | 2018-06-01T21:00:10.000Z | # Copyright (c) 2016-present, Facebook, 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... | 36.790064 | 88 | 0.613669 |
e0609385a8062879d5e35ff2e9d51c3a851c19c4 | 894 | py | Python | app/core/admin.py | silviachristina/recipe-app-api | 248e598fda7173b3138efccf77b259164ae730ce | [
"MIT"
] | null | null | null | app/core/admin.py | silviachristina/recipe-app-api | 248e598fda7173b3138efccf77b259164ae730ce | [
"MIT"
] | null | null | null | app/core/admin.py | silviachristina/recipe-app-api | 248e598fda7173b3138efccf77b259164ae730ce | [
"MIT"
] | null | null | null | from django.contrib import admin
# Default user admin
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
from django.utils.translation import gettext as _
from core import models
class UserAdmin(BaseUserAdmin):
ordering = ['id']
list_display = ['email', 'name']
fieldsets = (
(None, ... | 27.090909 | 66 | 0.597315 |
69c408f85cd03cf59a98b2bd0dc5e6867008b0f3 | 4,731 | py | Python | operators/infinispan/python/pulumi_pulumi_kubernetes_crds_operators_infinispan/infinispan/v1/Infinispan.py | pulumi/pulumi-kubernetes-crds | 372c4c0182f6b899af82d6edaad521aa14f22150 | [
"Apache-2.0"
] | null | null | null | operators/infinispan/python/pulumi_pulumi_kubernetes_crds_operators_infinispan/infinispan/v1/Infinispan.py | pulumi/pulumi-kubernetes-crds | 372c4c0182f6b899af82d6edaad521aa14f22150 | [
"Apache-2.0"
] | 2 | 2020-09-18T17:12:23.000Z | 2020-12-30T19:40:56.000Z | operators/infinispan/python/pulumi_pulumi_kubernetes_crds_operators_infinispan/infinispan/v1/Infinispan.py | pulumi/pulumi-kubernetes-crds | 372c4c0182f6b899af82d6edaad521aa14f22150 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by crd2pulumi. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from . import outp... | 39.425 | 135 | 0.646375 |
068cb13189dc7b9d109b41111f31f2bde26e43e9 | 1,989 | py | Python | tests/manage/z_cluster/test_noobaa_xss_vulnerability.py | srivickynesh/ocs-ci | 994b8635a2f44ec7982585cfb293215aa8b27d2a | [
"MIT"
] | null | null | null | tests/manage/z_cluster/test_noobaa_xss_vulnerability.py | srivickynesh/ocs-ci | 994b8635a2f44ec7982585cfb293215aa8b27d2a | [
"MIT"
] | null | null | null | tests/manage/z_cluster/test_noobaa_xss_vulnerability.py | srivickynesh/ocs-ci | 994b8635a2f44ec7982585cfb293215aa8b27d2a | [
"MIT"
] | null | null | null | from urllib.error import HTTPError
import logging
import ssl
import urllib.request
import pytest
from ocs_ci.helpers.helpers import get_noobaa_url
from ocs_ci.framework.testlib import (
ManageTest,
tier2,
skipif_ocs_version,
bugzilla,
skipif_external_mode,
)
log = logging.getLogger(__name__)
@ti... | 28.014085 | 89 | 0.640523 |
288c318457e1d88c44ff67fbaacb794c26f2fe81 | 188 | py | Python | HelloWorld/modules/app.py | lazywithcrazyness/PythonForBeginners | 7667d16e4f0fd0f4e659e65ab7482f5a40fa5c5c | [
"MIT"
] | null | null | null | HelloWorld/modules/app.py | lazywithcrazyness/PythonForBeginners | 7667d16e4f0fd0f4e659e65ab7482f5a40fa5c5c | [
"MIT"
] | null | null | null | HelloWorld/modules/app.py | lazywithcrazyness/PythonForBeginners | 7667d16e4f0fd0f4e659e65ab7482f5a40fa5c5c | [
"MIT"
] | null | null | null | # importing entire module
import converter
# importing specific function of class from a module
from converter import lbs_to_kgs
print(converter.lbs_to_kgs(160))
print(lbs_to_kgs(160))
| 18.8 | 52 | 0.81383 |
2c8c31f38ebb01af1f0ea2fd960fdcbcf53df275 | 3,824 | py | Python | platzigram/settings.py | innacroft/Platzigram | f0be2f645ca113dc1b28798d39980a907ee942a4 | [
"MIT"
] | 2 | 2021-01-22T19:14:03.000Z | 2021-11-24T19:34:25.000Z | platzigram/settings.py | innacroft/Platzigram | f0be2f645ca113dc1b28798d39980a907ee942a4 | [
"MIT"
] | null | null | null | platzigram/settings.py | innacroft/Platzigram | f0be2f645ca113dc1b28798d39980a907ee942a4 | [
"MIT"
] | 4 | 2020-06-29T05:54:58.000Z | 2021-11-24T19:32:52.000Z | """
Django settings for platzigram project.
Generated by 'django-admin startproject' using Django 3.0.3.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.0/ref/settings/
"""
import os... | 28.75188 | 129 | 0.701098 |
a85411d9ac4dc0acf23c9d6b4dee099c3bcb5503 | 2,762 | py | Python | PyDSS/pyControllers/Controllers/xfmrController.py | JMorganUSU/PyDSS | 7e28c45204e6ba8e703162c24c8a585f038fff6a | [
"BSD-3-Clause"
] | 21 | 2019-02-04T22:19:50.000Z | 2022-03-01T18:06:28.000Z | PyDSS/pyControllers/Controllers/xfmrController.py | JMorganUSU/PyDSS | 7e28c45204e6ba8e703162c24c8a585f038fff6a | [
"BSD-3-Clause"
] | 33 | 2020-01-28T22:47:44.000Z | 2022-03-30T20:05:00.000Z | PyDSS/pyControllers/Controllers/xfmrController.py | JMorganUSU/PyDSS | 7e28c45204e6ba8e703162c24c8a585f038fff6a | [
"BSD-3-Clause"
] | 11 | 2019-12-28T01:04:55.000Z | 2022-03-01T18:05:30.000Z | from PyDSS.pyControllers.pyControllerAbstract import ControllerAbstract
class xfmrController(ControllerAbstract):
"""The controller locks a regulator in the event of reverse power flow. Subclass of the :class:`PyDSS.pyControllers.pyControllerAbstract.ControllerAbstract` abstract class.
:param Reg... | 43.15625 | 176 | 0.658943 |
e7153943fcaf95ab4998d77a4b84abd1364fc2ef | 1,361 | py | Python | python/sketch/pps_quant.py | stanford-futuredata/sketchstore | c209e4d01343a05dc5aecdb7a9801fc639019fd3 | [
"Apache-2.0"
] | 5 | 2020-05-07T02:25:01.000Z | 2021-05-25T07:54:42.000Z | python/sketch/pps_quant.py | stanford-futuredata/sketchstore | c209e4d01343a05dc5aecdb7a9801fc639019fd3 | [
"Apache-2.0"
] | 1 | 2020-07-31T20:04:59.000Z | 2020-07-31T20:04:59.000Z | python/sketch/pps_quant.py | stanford-futuredata/sketchstore | c209e4d01343a05dc5aecdb7a9801fc639019fd3 | [
"Apache-2.0"
] | 1 | 2020-07-06T20:39:05.000Z | 2020-07-06T20:39:05.000Z | import numpy as np
class PPSQuantSketch:
def __init__(self, size, seed=0):
self.size = size
self.random = np.random.RandomState(0)
self.item_counts = []
self.ncounts = 0
def update(self, new_item_counts):
self.ncounts += sum([v[1] for v in new_item_counts])
sel... | 32.404762 | 99 | 0.599559 |
369d6660e4aaae36726bcfa1440a1dc3a1dcdfbe | 496 | py | Python | tests/test_admin.py | RYAN2540/On-the-Blog | 207d7ee132f4c52f86903a526b9eb4a3a0178e22 | [
"MIT"
] | null | null | null | tests/test_admin.py | RYAN2540/On-the-Blog | 207d7ee132f4c52f86903a526b9eb4a3a0178e22 | [
"MIT"
] | null | null | null | tests/test_admin.py | RYAN2540/On-the-Blog | 207d7ee132f4c52f86903a526b9eb4a3a0178e22 | [
"MIT"
] | null | null | null | import unittest
from app.models import Admin
class AdminModelTest(unittest.TestCase):
def setUp(self):
self.new_admin = Admin(password = 'banana')
def test_password_setter(self):
self.assertTrue(self.new_admin.password_hash is not None)
def test_no_access_password(self):
with sel... | 29.176471 | 65 | 0.72379 |
aeef82379eb1196c98ea92742d0d3ebf42212522 | 2,806 | py | Python | arcade/experimental/examples/spritelist_interaction_hijack_positions.py | akapkotel/arcade | 6e43ec53e7bfa3dee1aa574404794e3695aad381 | [
"MIT"
] | null | null | null | arcade/experimental/examples/spritelist_interaction_hijack_positions.py | akapkotel/arcade | 6e43ec53e7bfa3dee1aa574404794e3695aad381 | [
"MIT"
] | 1 | 2022-03-21T06:24:29.000Z | 2022-03-21T06:24:29.000Z | arcade/experimental/examples/spritelist_interaction_hijack_positions.py | Ibrahim2750mi/arcade | bf3229e64117931bffb8e50926a996a7a8fc9b8b | [
"MIT"
] | null | null | null | """
Example showing how we can interact with spritelist using shaders.
We simply hijack the position buffer of the spritelist and
fill it with new data generated by a transform shader.
"""
import math
import arcade
NUM_COINS = 500
class HijackSpritePositions(arcade.Window):
def __init__(self):
super().... | 32.252874 | 77 | 0.583393 |
11b927592ef83af34d76c84d062d9e16e11953d6 | 1,404 | py | Python | scripts/train_T5.py | guoyi118/KnowledgeEditor | 167d75149d77cd5371c9f625a371e0443098ae99 | [
"MIT"
] | null | null | null | scripts/train_T5.py | guoyi118/KnowledgeEditor | 167d75149d77cd5371c9f625a371e0443098ae99 | [
"MIT"
] | null | null | null | scripts/train_T5.py | guoyi118/KnowledgeEditor | 167d75149d77cd5371c9f625a371e0443098ae99 | [
"MIT"
] | null | null | null | import os
from argparse import ArgumentParser
from pytorch_lightning import LightningModule, Trainer
from pytorch_lightning.callbacks import LearningRateMonitor, ModelCheckpoint
from pytorch_lightning.loggers import TensorBoardLogger
from pytorch_lightning.utilities.seed import seed_everything
import sys
sys.path.appe... | 29.25 | 82 | 0.701567 |
4cabfe381a59a2f878051ab15abc98512dc26706 | 20,304 | py | Python | tests/test_stream_xep_0030.py | anirudhrata/slixmpp | 1fcee0e80a212eeb274d2f560e69099d8a61bf7f | [
"BSD-3-Clause"
] | 86 | 2016-07-04T13:26:02.000Z | 2022-02-19T10:26:21.000Z | tests/test_stream_xep_0030.py | anirudhrata/slixmpp | 1fcee0e80a212eeb274d2f560e69099d8a61bf7f | [
"BSD-3-Clause"
] | 10 | 2016-09-30T18:55:41.000Z | 2020-05-01T14:22:47.000Z | tests/test_stream_xep_0030.py | anirudhrata/slixmpp | 1fcee0e80a212eeb274d2f560e69099d8a61bf7f | [
"BSD-3-Clause"
] | 45 | 2016-09-30T18:48:41.000Z | 2022-03-18T21:39:33.000Z | import asyncio
import time
import unittest
from slixmpp.test import SlixTest
class TestStreamDisco(SlixTest):
"""
Test using the XEP-0030 plugin.
"""
def tearDown(self):
self.stream_close()
def testInfoEmptyDefaultNode(self):
"""
Info query result from an entity MUST ha... | 33.953177 | 80 | 0.475227 |
5a7e6fb7a139735807e70b3022e2055fca410bb4 | 1,484 | py | Python | setup.py | carstencodes/rtcg | dad554cdc7c203c1b5ef3dd7a0ffd8d48336a968 | [
"BSD-3-Clause"
] | null | null | null | setup.py | carstencodes/rtcg | dad554cdc7c203c1b5ef3dd7a0ffd8d48336a968 | [
"BSD-3-Clause"
] | null | null | null | setup.py | carstencodes/rtcg | dad554cdc7c203c1b5ef3dd7a0ffd8d48336a968 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
#
# Copyright (c) 2020 Carsten Igel.
#
# This file is part of rtcg
# (see https://github.com/carstencodes/rtcg).
#
# License: 3-clause BSD, see https://opensource.org/licenses/BSD-3-Clause
#
from setuptools import setup, find_packages
__VERSION__ = "0.8.0"
long_description: str = ""
with open(... | 29.68 | 73 | 0.640836 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.