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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e2fa13878f2285c16f951786c847243a44a886a9 | 909 | py | Python | examples/waterbodies_c3.conflux.py | GeoscienceAustralia/dea-conflux | 1af77dda18190943e1368fef8deb4426662bb4a8 | [
"Apache-2.0"
] | 1 | 2021-10-06T08:52:51.000Z | 2021-10-06T08:52:51.000Z | examples/waterbodies_c3.conflux.py | GeoscienceAustralia/dea-conflux | 1af77dda18190943e1368fef8deb4426662bb4a8 | [
"Apache-2.0"
] | 14 | 2021-08-18T05:38:05.000Z | 2022-01-14T03:04:11.000Z | examples/waterbodies_c3.conflux.py | GeoscienceAustralia/dea-conflux | 1af77dda18190943e1368fef8deb4426662bb4a8 | [
"Apache-2.0"
] | 1 | 2021-11-05T02:40:45.000Z | 2021-11-05T02:40:45.000Z | import xarray as xr
product_name = "waterbodies_c3"
version = "0.0.1"
resampling = "nearest"
output_crs = "EPSG:3577"
resolution = (-30, 30)
input_products = {
"ga_ls_wo_3": ["water"],
}
def transform(inputs: xr.Dataset) -> xr.Dataset:
# ignore sea, terrain/low solar angle
# by disabling those flags
... | 23.921053 | 48 | 0.606161 |
699828e9f1b4310d462a6e7b666335547b95224b | 7,028 | py | Python | maistra/vendor/com_googlesource_chromium_v8/wee8/build/fuchsia/run_package.py | maistra-bot/proxy | 05a551df62d90e96c24afc649f2755983d020b5b | [
"Apache-2.0"
] | null | null | null | maistra/vendor/com_googlesource_chromium_v8/wee8/build/fuchsia/run_package.py | maistra-bot/proxy | 05a551df62d90e96c24afc649f2755983d020b5b | [
"Apache-2.0"
] | null | null | null | maistra/vendor/com_googlesource_chromium_v8/wee8/build/fuchsia/run_package.py | maistra-bot/proxy | 05a551df62d90e96c24afc649f2755983d020b5b | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Contains a helper function for deploying and executing a packaged
executable on a Target."""
from __future__ import print_function
import common
import ... | 31.945455 | 78 | 0.672738 |
22b237acfb21079ac5f0465760805d7eb002ad18 | 1,741 | py | Python | src/scout_apm/core/samplers/__init__.py | xiamx/scout_apm_python | d03dab45f65cf7d1030e11fabf6da4cf6e72ee59 | [
"MIT"
] | null | null | null | src/scout_apm/core/samplers/__init__.py | xiamx/scout_apm_python | d03dab45f65cf7d1030e11fabf6da4cf6e72ee59 | [
"MIT"
] | null | null | null | src/scout_apm/core/samplers/__init__.py | xiamx/scout_apm_python | d03dab45f65cf7d1030e11fabf6da4cf6e72ee59 | [
"MIT"
] | null | null | null | from __future__ import absolute_import, division, print_function, unicode_literals
import logging
import threading
from datetime import datetime
from os import getpid
from time import sleep
from scout_apm.core.commands import ApplicationEvent
from scout_apm.core.context import AgentContext
from scout_apm.core.sampler... | 33.480769 | 82 | 0.587593 |
69ea5233d9af8fbd6c35252774d182446c5ae15f | 414 | py | Python | pyglet-hg/tests/image/PIL_LA_LOAD.py | sangh/LaserShow | abc95e465e3455dc220cc602dd58358c84666f29 | [
"BSD-3-Clause"
] | 21 | 2015-11-03T03:15:36.000Z | 2021-03-15T22:00:47.000Z | tests/image/PIL_LA_LOAD.py | seeminglee/pyglet64 | 3dd167b5b0d3ad132a157e404586e53c2bb21736 | [
"BSD-3-Clause"
] | 3 | 2017-09-14T14:08:28.000Z | 2019-05-20T04:38:15.000Z | tests/image/PIL_LA_LOAD.py | seeminglee/pyglet64 | 3dd167b5b0d3ad132a157e404586e53c2bb21736 | [
"BSD-3-Clause"
] | 23 | 2017-04-15T19:23:08.000Z | 2020-09-08T11:55:29.000Z | #!/usr/bin/env python
'''Test LA load using PIL. You should see the la.png image on
a checkboard background.
'''
__docformat__ = 'restructuredtext'
__version__ = '$Id$'
import unittest
import base_load
from pyglet.image.codecs.pil import *
class TEST_PNG_LA(base_load.TestLoad):
texture_file = ... | 19.714286 | 64 | 0.68599 |
efc667024dfeea28f82970fb499e2eb28a6bc2a6 | 822 | py | Python | venv/Scripts/rst2latex.py | unicloud-uos/uos-sdk-python | d5761d44af87cf79205046708acfb1882a74e133 | [
"MIT"
] | null | null | null | venv/Scripts/rst2latex.py | unicloud-uos/uos-sdk-python | d5761d44af87cf79205046708acfb1882a74e133 | [
"MIT"
] | null | null | null | venv/Scripts/rst2latex.py | unicloud-uos/uos-sdk-python | d5761d44af87cf79205046708acfb1882a74e133 | [
"MIT"
] | null | null | null | #!E:\workspace\python-sdk\venv\Scripts\python.exe
# $Id: rst2latex.py 5905 2009-04-16 12:04:49Z milde $
# Author: David Goodger <goodger@python.org>
# Copyright: This module has been placed in the public domain.
"""
A minimal front end to the Docutils Publisher, producing LaTeX.
"""
try:
import locale
locale... | 30.444444 | 76 | 0.675182 |
ca8e0bdbafd219e0f630f08077577fd5241844ba | 2,024 | py | Python | config/settings/test.py | abought/locuszoom-hosted | 5cb635b18287d15610df0da6c85b477a3eaaaabb | [
"MIT"
] | null | null | null | config/settings/test.py | abought/locuszoom-hosted | 5cb635b18287d15610df0da6c85b477a3eaaaabb | [
"MIT"
] | null | null | null | config/settings/test.py | abought/locuszoom-hosted | 5cb635b18287d15610df0da6c85b477a3eaaaabb | [
"MIT"
] | null | null | null | """
With these settings, tests run faster.
"""
from .base import * # noqa
from .base import env
# GENERAL
# ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#debug
DEBUG = False
# https://docs.djangoproject.com/en/dev/ref/settings/#se... | 36.142857 | 113 | 0.546443 |
7b193da5a3ff5b8333d612bb49c4db100ec85adb | 16,450 | py | Python | pyglet/media/synthesis.py | mneyapo/pyglet | 20442eecfa121c74f838cb975562b7a86eb48e35 | [
"BSD-3-Clause"
] | null | null | null | pyglet/media/synthesis.py | mneyapo/pyglet | 20442eecfa121c74f838cb975562b7a86eb48e35 | [
"BSD-3-Clause"
] | null | null | null | pyglet/media/synthesis.py | mneyapo/pyglet | 20442eecfa121c74f838cb975562b7a86eb48e35 | [
"BSD-3-Clause"
] | null | null | null | # ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# Copyright (c) 2008-2019 pyglet contributors
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the follo... | 35.074627 | 97 | 0.610699 |
f7b311c49c9a1decb15829888dbe3ec6570a6847 | 1,308 | py | Python | code/model/metrics.py | chenyangjun45/Mutimode-language-generation | e8fa0379768e2a1cb7dca70eceeac334b605a4e8 | [
"MIT"
] | 5 | 2020-10-22T01:25:47.000Z | 2020-12-21T10:38:46.000Z | code/model/metrics.py | woyaonidsh/Mutimode | 42cbcddb472f0f162ff546ee1107ee26b5c5e47e | [
"MIT"
] | 1 | 2021-04-15T02:35:48.000Z | 2021-04-15T13:17:48.000Z | code/model/metrics.py | woyaonidsh/Mutimode | 42cbcddb472f0f162ff546ee1107ee26b5c5e47e | [
"MIT"
] | 1 | 2021-04-14T12:13:58.000Z | 2021-04-14T12:13:58.000Z | import jieba
# 使用jieba进行分词
def Rouge_1(model, reference): # terms_reference为参考摘要,terms_model为候选摘要 ***one-gram*** 一元模型
terms_reference = jieba.cut(reference) # 默认精准模式
terms_model = jieba.cut(model)
grams_reference = list(terms_reference)
grams_model = list(terms_model)
temp = 0
ngram_all = ... | 31.902439 | 93 | 0.688838 |
41ed1751ffd3b34c6f87ffb56a0afe1528568c44 | 1,383 | py | Python | tests/test_timeseries.py | ndejong/vaping | 995b424990544ea426cbef07baa3896e8cbfb87b | [
"Apache-2.0"
] | null | null | null | tests/test_timeseries.py | ndejong/vaping | 995b424990544ea426cbef07baa3896e8cbfb87b | [
"Apache-2.0"
] | null | null | null | tests/test_timeseries.py | ndejong/vaping | 995b424990544ea426cbef07baa3896e8cbfb87b | [
"Apache-2.0"
] | null | null | null | import pytest
import time
import vaping.plugins
from vaping import plugin
config = {
"type" : "test_tsdb",
"filename" : "{a}-{b}-{field}",
"field" : "test"
}
@plugin.register("test_tsdb")
class TSDBTestPlugin(vaping.plugins.TimeSeriesDB):
"""
Test plugin from the TimeSeriesDB abstraction
"""... | 24.263158 | 87 | 0.574837 |
130487809f0a7d08d54949133fbdd8d156a43a67 | 1,577 | py | Python | ccfx/scripts/utility.py | PerEr/ccfinderx-core | 749dd1fc114290821dbc35e71fa331a1f7999466 | [
"MIT"
] | 33 | 2016-03-20T07:35:27.000Z | 2022-01-19T08:48:02.000Z | ccfx/scripts/utility.py | PerEr/ccfinderx-core | 749dd1fc114290821dbc35e71fa331a1f7999466 | [
"MIT"
] | 5 | 2016-03-14T07:50:15.000Z | 2022-03-31T09:43:24.000Z | ccfx/scripts/utility.py | PerEr/ccfinderx-core | 749dd1fc114290821dbc35e71fa331a1f7999466 | [
"MIT"
] | 17 | 2015-01-12T15:51:11.000Z | 2022-02-20T01:22:42.000Z | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# Copyright: This module has been placed in the public domain.
import sys
class ProgressReporter(object):
def __init__(self, totalAmount):
if totalAmount == 0:
self.silence = True
return
self.silence = False
self.totalAmount = totalAmount
s... | 25.435484 | 70 | 0.609385 |
eca17477bcb9123fe0a8b7f9126d8ae943edaa34 | 8,481 | py | Python | facemesh_tracker.py | nralbrecht/facemesh-tracker | 57faf6f3e1fc0d8393d3a9a0739c15b4804f194e | [
"MIT"
] | null | null | null | facemesh_tracker.py | nralbrecht/facemesh-tracker | 57faf6f3e1fc0d8393d3a9a0739c15b4804f194e | [
"MIT"
] | null | null | null | facemesh_tracker.py | nralbrecht/facemesh-tracker | 57faf6f3e1fc0d8393d3a9a0739c15b4804f194e | [
"MIT"
] | null | null | null | import cv2
import numpy as np
import mediapipe as mp
from scipy.spatial.transform import Rotation
mp_face_mesh = mp.solutions.face_mesh
class FaceMeshTracker:
def __init__(self, server, preview=None):
self.server = server
self.preview = preview
self.capture = cv2.VideoCapture(0)
... | 36.089362 | 128 | 0.569626 |
5728a37fc33467968ca68de316d963f31f66da03 | 7,841 | py | Python | python/paddle/dataset/flowers.py | ysh329/Paddle | 50ad9046c9a440564d104eaa354eb9df83a35678 | [
"Apache-2.0"
] | 1 | 2018-09-06T06:12:20.000Z | 2018-09-06T06:12:20.000Z | python/paddle/dataset/flowers.py | ysh329/Paddle | 50ad9046c9a440564d104eaa354eb9df83a35678 | [
"Apache-2.0"
] | null | null | null | python/paddle/dataset/flowers.py | ysh329/Paddle | 50ad9046c9a440564d104eaa354eb9df83a35678 | [
"Apache-2.0"
] | 1 | 2022-03-26T11:44:12.000Z | 2022-03-26T11:44:12.000Z | # Copyright (c) 2016 PaddlePaddle 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 applic... | 34.240175 | 79 | 0.668282 |
76cdd5b467696ffdd8e68a6faec27c1082360c77 | 216 | py | Python | Curso_em_Video_Exercicios/ex003.py | Cohuzer/Exercicios-do-Curso-em-Video | 879cbb53c54ba226e12d9972bc28eadcd521fc10 | [
"MIT"
] | null | null | null | Curso_em_Video_Exercicios/ex003.py | Cohuzer/Exercicios-do-Curso-em-Video | 879cbb53c54ba226e12d9972bc28eadcd521fc10 | [
"MIT"
] | null | null | null | Curso_em_Video_Exercicios/ex003.py | Cohuzer/Exercicios-do-Curso-em-Video | 879cbb53c54ba226e12d9972bc28eadcd521fc10 | [
"MIT"
] | null | null | null | #Some dois números informados pelo usuário
#Entrada
a = float(input('Me diga um número: '))
b = float(input('Me diga outro número: '))
#Processamento
c = a + b
#Saida
print('A soma de {} e {} é {}'.format(a,b,c))
| 18 | 45 | 0.648148 |
40bd20f3104dbe53f49ee56f6338741699b5c969 | 4,024 | py | Python | src/rest_api.py | dprslt/aurora | 3b70c036f01d9b69ae49559c404da79594530041 | [
"Apache-2.0"
] | null | null | null | src/rest_api.py | dprslt/aurora | 3b70c036f01d9b69ae49559c404da79594530041 | [
"Apache-2.0"
] | 17 | 2021-05-08T06:52:03.000Z | 2021-10-30T16:49:48.000Z | src/rest_api.py | dprslt/aurora | 3b70c036f01d9b69ae49559c404da79594530041 | [
"Apache-2.0"
] | null | null | null | import logging
import config
from flask import Flask, request, abort, Response
from multiprocessing import Process
from strategies.colors.FixedColor import FixedColor
from strategies.light.Breath import Breath
from strategies.light.SimpleColor import SimpleColor
from strategies.light.TimedWrapper import TimedWrapper
fr... | 31.4375 | 105 | 0.621769 |
44dff2c0782ca83e6e49723abc5c295d39aacf94 | 664 | py | Python | backend/task_profile/api/v1/serializers.py | crowdbotics-apps/privet-albom-28579 | 31de761497946b3932b11bae5d6b6216120f6634 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/task_profile/api/v1/serializers.py | crowdbotics-apps/privet-albom-28579 | 31de761497946b3932b11bae5d6b6216120f6634 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/task_profile/api/v1/serializers.py | crowdbotics-apps/privet-albom-28579 | 31de761497946b3932b11bae5d6b6216120f6634 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | from rest_framework import serializers
from task_profile.models import TaskerProfile, CustomerProfile, Notification, InviteCode
class NotificationSerializer(serializers.ModelSerializer):
class Meta:
model = Notification
fields = "__all__"
class InviteCodeSerializer(serializers.ModelSerializer):
... | 24.592593 | 88 | 0.730422 |
006cd144093c73acdd634da996be33ee5e33e518 | 4,690 | py | Python | Glove/3/train.py | amurto/nlp-scripts | f1158221a87838589ccff4eaa4db5349e6ec1c8d | [
"MIT"
] | 1 | 2020-06-15T05:46:42.000Z | 2020-06-15T05:46:42.000Z | Glove/3/train.py | amurto/nlp-scripts | f1158221a87838589ccff4eaa4db5349e6ec1c8d | [
"MIT"
] | null | null | null | Glove/3/train.py | amurto/nlp-scripts | f1158221a87838589ccff4eaa4db5349e6ec1c8d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""insult_train.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/11OTc2Q2mXQ1a3O0vljL4FhhZhqJqQzT_
"""
from google.colab import drive
drive.mount('/content/drive')
from numpy import array
from keras.preprocessing.text impo... | 27.916667 | 113 | 0.761407 |
46c622d556a1ea49b49f91759e9d2e80d1d7d876 | 487 | py | Python | plans/test_helpmecarry_pypnpnaoqi.py | LCAS/spqrel_tools | 9dc27364811393082b86a9be5dcc654239317515 | [
"MIT"
] | 9 | 2017-07-29T06:17:19.000Z | 2020-12-07T08:22:57.000Z | plans/test_helpmecarry_pypnpnaoqi.py | LCAS/spqrel_tools | 9dc27364811393082b86a9be5dcc654239317515 | [
"MIT"
] | 48 | 2017-06-01T09:29:18.000Z | 2020-09-16T19:50:12.000Z | plans/test_helpmecarry_pypnpnaoqi.py | LCAS/spqrel_tools | 9dc27364811393082b86a9be5dcc654239317515 | [
"MIT"
] | 11 | 2017-06-01T08:13:02.000Z | 2020-11-11T20:25:36.000Z | import os
import sys
try:
from pnp_cmd_naoqi import *
except:
print "Please set PNP_HOME environment variable to PetriNetPlans folder."
sys.exit(1)
p = PNPCmd()
p.begin()
c = 0
#test arsenable AND stopfolloging
p.exec_action('asrenable','')
# follow the recorded person to the car
p.exec_action('updatef... | 15.21875 | 81 | 0.731006 |
4d28c7c32344f59859f115e76a37320fbbb6359e | 5,679 | py | Python | cogbot/cogs/abc/base_cog.py | Arcensoth/cogbot | ef9d935ae8c8fbe00fb9370c75e0e6d9189141d0 | [
"MIT"
] | 8 | 2016-12-26T14:10:38.000Z | 2021-01-02T03:50:05.000Z | cogbot/cogs/abc/base_cog.py | Arcensoth/cogbot | ef9d935ae8c8fbe00fb9370c75e0e6d9189141d0 | [
"MIT"
] | 28 | 2016-12-12T04:06:53.000Z | 2020-04-23T06:18:55.000Z | cogbot/cogs/abc/base_cog.py | Arcensoth/cogbot | ef9d935ae8c8fbe00fb9370c75e0e6d9189141d0 | [
"MIT"
] | 9 | 2017-06-03T00:33:57.000Z | 2020-10-29T18:16:02.000Z | import logging
from abc import ABC, abstractmethod
from typing import Dict, Generic, Type, TypeVar, Union
from discord import Member, Message, Reaction, Server
from cogbot.cog_bot import CogBot
from cogbot.cogs.abc.base_cog_server_state import BaseCogServerState
from cogbot.types import ServerId
ResolvedOptions = Di... | 37.361842 | 102 | 0.640782 |
225da5bf3869ee208b3ad3cc45163eec501688cc | 3,762 | py | Python | uno_product_checker.py | gebn/uno-product-checker | 63a467f01d06365ea63595163697a61f3f269cfb | [
"MIT"
] | null | null | null | uno_product_checker.py | gebn/uno-product-checker | 63a467f01d06365ea63595163697a61f3f269cfb | [
"MIT"
] | 7 | 2017-08-30T09:47:59.000Z | 2018-02-12T20:30:34.000Z | uno_product_checker.py | gebn/uno-product-checker | 63a467f01d06365ea63595163697a61f3f269cfb | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from typing import Dict
import logging
import os
import json
import requests
import boto3
_VERSION = '1.2.0'
_ENDPOINT = 'https://my.uno.net.uk/modules/addons/unobroadband' \
'/broadbandavailability.php'
_PHONE_NUMBER = os.environ['PHONE_NUMBER']
_PRODUCT_TYPE = os.environ['PRODUCT... | 35.490566 | 79 | 0.608985 |
ff4a4690755ffc659a620cf08a60726570766de9 | 819 | py | Python | tests/core/test_valid.py | hohe/siliconcompiler | 497f272c87c8f247dcd29db76c8d6ed0c0939e50 | [
"Apache-2.0"
] | 1 | 2022-03-10T03:56:49.000Z | 2022-03-10T03:56:49.000Z | tests/core/test_valid.py | hohe/siliconcompiler | 497f272c87c8f247dcd29db76c8d6ed0c0939e50 | [
"Apache-2.0"
] | null | null | null | tests/core/test_valid.py | hohe/siliconcompiler | 497f272c87c8f247dcd29db76c8d6ed0c0939e50 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Silicon Compiler Authors. All Rights Reserved.
import siliconcompiler
import re
def test_valid():
chip = siliconcompiler.Chip()
chip.load_target("freepdk45_demo")
#basic
valid = chip.valid('design')
assert valid
#nest
valid = chip.valid('asic','minlayer')
assert valid... | 25.59375 | 81 | 0.626374 |
74a523d16e2cee1cab37c04eafdbc4c2bd2aef9d | 1,223 | py | Python | backend/app/core/config.py | furyhawk/textsum | 5bea375fe3888095911abe3c4dda018e52c5c535 | [
"MIT"
] | 2 | 2021-10-01T06:28:43.000Z | 2021-11-19T05:40:57.000Z | backend/app/core/config.py | furyhawk/text_summarization | 8d63574ec93a4535f2fed7915c034461c1903475 | [
"MIT"
] | null | null | null | backend/app/core/config.py | furyhawk/text_summarization | 8d63574ec93a4535f2fed7915c034461c1903475 | [
"MIT"
] | null | null | null | from pydantic import BaseSettings, BaseModel
from typing import List
from functools import lru_cache
class Settings(BaseSettings):
PROJECT_NAME: str = "textsum"
MODELS: List[str] = ['Headline', 'Transformer',
'TFIDF', 'T5', 'Finetuned']
MIN_LENGTH: int = 15
MAX_LENGTH: int = 1... | 23.980392 | 67 | 0.566639 |
3f49a7af81b0de05d996f67113e185b655e98d3a | 664 | py | Python | src/generic_info_provider.py | Tknika/iombian-status-display | 98e0cbab234de0c88fc279a1621d4c7a39a6e103 | [
"Apache-2.0"
] | null | null | null | src/generic_info_provider.py | Tknika/iombian-status-display | 98e0cbab234de0c88fc279a1621d4c7a39a6e103 | [
"Apache-2.0"
] | null | null | null | src/generic_info_provider.py | Tknika/iombian-status-display | 98e0cbab234de0c88fc279a1621d4c7a39a6e103 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import logging
from abc import ABC, abstractmethod
logger = logging.getLogger(__name__)
class GenericInfoProvider(ABC):
def __init__(self):
self.has_changed = False
def __setattr__(self, name, value):
if name == "has_changed":
super().__setattr__(name, val... | 22.133333 | 50 | 0.612952 |
122605386fc62b5e8949ce38a707ec35f4590848 | 219 | py | Python | tests/__init__.py | TigerDX/dj-stripe | 2fd4897abaedf2d9faa3dd5af86402dae3ab86a3 | [
"BSD-3-Clause"
] | null | null | null | tests/__init__.py | TigerDX/dj-stripe | 2fd4897abaedf2d9faa3dd5af86402dae3ab86a3 | [
"BSD-3-Clause"
] | null | null | null | tests/__init__.py | TigerDX/dj-stripe | 2fd4897abaedf2d9faa3dd5af86402dae3ab86a3 | [
"BSD-3-Clause"
] | 1 | 2021-08-30T10:51:49.000Z | 2021-08-30T10:51:49.000Z | from stripe import api_key
from stripe.resource import convert_to_stripe_object
def convert_to_fake_stripe_object(response):
return convert_to_stripe_object(resp=response, api_key=api_key, account="test_account")
| 31.285714 | 91 | 0.849315 |
8f2cefe597d992f54a5f7332979fa041763d6ccc | 252 | py | Python | manage.py | sdzharkov/Trip-Split | e485a17383737b53eec1878650eea60567ae78a9 | [
"MIT"
] | 3 | 2017-03-05T03:24:18.000Z | 2017-04-22T11:25:07.000Z | manage.py | sdzharkov/Trip-Split | e485a17383737b53eec1878650eea60567ae78a9 | [
"MIT"
] | null | null | null | manage.py | sdzharkov/Trip-Split | e485a17383737b53eec1878650eea60567ae78a9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tripSlice.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| 22.909091 | 73 | 0.77381 |
583342465ceaa7f1239189e258d50209af5bfe92 | 775 | py | Python | form_designer/utils.py | sergey-romanov/django-form-designer | cddfb5c87759f57c68208509327078bd690295b9 | [
"BSD-3-Clause"
] | null | null | null | form_designer/utils.py | sergey-romanov/django-form-designer | cddfb5c87759f57c68208509327078bd690295b9 | [
"BSD-3-Clause"
] | null | null | null | form_designer/utils.py | sergey-romanov/django-form-designer | cddfb5c87759f57c68208509327078bd690295b9 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from django.core.exceptions import ImproperlyConfigured
from django.utils.importlib import import_module
def get_class(import_path):
try:
dot = import_path.rindex('.')
except ValueError:
raise ImproperlyConfigured("%s isn't a Python path." % import_path)
module, clas... | 36.904762 | 75 | 0.610323 |
7347cd40a916c2fe03044512669cebe0998f430f | 3,768 | py | Python | doc/integrations/pytorch/parlai/crowdsourcing/utils/worlds.py | novium258/cortx-1 | ce5b939b33b8d24d89b31807ac3bcaa8f24096bc | [
"Apache-2.0"
] | 1 | 2020-09-27T05:00:06.000Z | 2020-09-27T05:00:06.000Z | doc/integrations/pytorch/parlai/crowdsourcing/utils/worlds.py | novium258/cortx-1 | ce5b939b33b8d24d89b31807ac3bcaa8f24096bc | [
"Apache-2.0"
] | 1 | 2021-08-04T11:17:39.000Z | 2021-08-04T11:17:39.000Z | doc/integrations/pytorch/parlai/crowdsourcing/utils/worlds.py | novium258/cortx-1 | ce5b939b33b8d24d89b31807ac3bcaa8f24096bc | [
"Apache-2.0"
] | 1 | 2021-05-03T13:27:14.000Z | 2021-05-03T13:27:14.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from parlai.core.worlds import World
class CrowdDataWorld(World):
def prep_save_data(self, workers):
... | 31.4 | 89 | 0.586783 |
f18ef2a950ba73b423d3005a5b48ab7f6018859a | 4,835 | py | Python | src/communication/azext_communication/vendored_sdks/communication/aio/operations/_operations.py | saisankargochhayat/azure-cli-extensions | f89443a766961f984977a2cf1b682973fcb61edd | [
"MIT"
] | null | null | null | src/communication/azext_communication/vendored_sdks/communication/aio/operations/_operations.py | saisankargochhayat/azure-cli-extensions | f89443a766961f984977a2cf1b682973fcb61edd | [
"MIT"
] | null | null | null | src/communication/azext_communication/vendored_sdks/communication/aio/operations/_operations.py | saisankargochhayat/azure-cli-extensions | f89443a766961f984977a2cf1b682973fcb61edd | [
"MIT"
] | 1 | 2022-02-14T21:43:29.000Z | 2022-02-14T21:43:29.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 44.357798 | 133 | 0.664529 |
650ce5c176d1cacd803ff7a9ee340149a5bab7dc | 2,605 | py | Python | utils/manager.py | TheGoofBall64/Kurisu | a7a7162b36da97ec8404acb2fd39380f84f270df | [
"Apache-2.0"
] | null | null | null | utils/manager.py | TheGoofBall64/Kurisu | a7a7162b36da97ec8404acb2fd39380f84f270df | [
"Apache-2.0"
] | null | null | null | utils/manager.py | TheGoofBall64/Kurisu | a7a7162b36da97ec8404acb2fd39380f84f270df | [
"Apache-2.0"
] | null | null | null | from typing import Optional, List
from utils.models import FilteredWord, ApprovedInvite
import re
class WordFilterManager:
def __init__(self):
self.kinds = ('piracy tool', 'piracy video', 'piracy tool alert', 'drama', 'unbanning tool', 'piracy site')
self.filter = {}
self.word_exp = {}
... | 32.974684 | 115 | 0.639923 |
001330d73f75c6c9bdba1de408cecd3d53786a56 | 4,066 | py | Python | rbackup/struct/hierarchy.py | etorres4/rbackup | b4f7478a4b71ad4b444f83ab5aeae1ed22315370 | [
"MIT"
] | null | null | null | rbackup/struct/hierarchy.py | etorres4/rbackup | b4f7478a4b71ad4b444f83ab5aeae1ed22315370 | [
"MIT"
] | null | null | null | rbackup/struct/hierarchy.py | etorres4/rbackup | b4f7478a4b71ad4b444f83ab5aeae1ed22315370 | [
"MIT"
] | null | null | null | """
.. moduleauthor:: Eric Torres
.. module:: rbackup.struct.hierarchy
:synopsis: Related functionality for creating the backup hierarchy.
"""
import json
import logging
import os
import shutil
from pathlib import Path
# ========== Logging Setup ===========
syslog = logging.getLogger(__name__)
# ========== Const... | 28.633803 | 94 | 0.627644 |
c64a07c30e7f0d5a25ffbf3d10ed98031996762a | 1,064 | py | Python | accounts/views.py | Arifa96/farmerhand | 11af1d1ae42192df7344622bbcbcfcec625a886c | [
"MIT"
] | null | null | null | accounts/views.py | Arifa96/farmerhand | 11af1d1ae42192df7344622bbcbcfcec625a886c | [
"MIT"
] | null | null | null | accounts/views.py | Arifa96/farmerhand | 11af1d1ae42192df7344622bbcbcfcec625a886c | [
"MIT"
] | null | null | null | from django.contrib.auth import (
authenticate,
get_user_model,
login,
logout,
)
from django.shortcuts import render
from .forms import UserLoginForm, UserRegisterForm
# Create your views here.
def login_view(request):
title = "Login"
print(request.user.is_authenticated)
form = UserLog... | 23.644444 | 70 | 0.672932 |
73719ac48368d239ddf078ecd7ab9dbb58fb21d4 | 1,442 | py | Python | mars/optimization/physical/tests/test_cupy.py | ConanoutlooklvTBS/mars | 7030566fd9e9fc02b6b4064ef7bd86f6c24a2f60 | [
"Apache-2.0"
] | 2,413 | 2018-12-06T09:37:11.000Z | 2022-03-30T15:47:39.000Z | mars/optimization/physical/tests/test_cupy.py | ConanoutlooklvTBS/mars | 7030566fd9e9fc02b6b4064ef7bd86f6c24a2f60 | [
"Apache-2.0"
] | 1,335 | 2018-12-07T03:06:18.000Z | 2022-03-31T11:45:57.000Z | mars/optimization/physical/tests/test_cupy.py | ConanoutlooklvTBS/mars | 7030566fd9e9fc02b6b4064ef7bd86f6c24a2f60 | [
"Apache-2.0"
] | 329 | 2018-12-07T03:12:41.000Z | 2022-03-29T21:49:57.000Z | # Copyright 1999-2021 Alibaba Group Holding 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 applicable law or a... | 37.947368 | 74 | 0.680999 |
3aa4a34e921942b8dac987b3c95974499f6c74a7 | 8,530 | py | Python | pgmpy/tests/test_estimators/test_HillClimbSearch.py | yzh211/pgmpy | f3abe04abb75db9f51f333ecf9429a8700477b55 | [
"MIT"
] | 1 | 2022-03-28T13:52:31.000Z | 2022-03-28T13:52:31.000Z | pgmpy/tests/test_estimators/test_HillClimbSearch.py | yzh211/pgmpy | f3abe04abb75db9f51f333ecf9429a8700477b55 | [
"MIT"
] | null | null | null | pgmpy/tests/test_estimators/test_HillClimbSearch.py | yzh211/pgmpy | f3abe04abb75db9f51f333ecf9429a8700477b55 | [
"MIT"
] | null | null | null | import unittest
import pandas as pd
import numpy as np
from pgmpy.estimators import HillClimbSearch, K2Score
from pgmpy.models import BayesianModel
class TestHillClimbEstimator(unittest.TestCase):
def setUp(self):
self.rand_data = pd.DataFrame(
np.random.randint(0, 5, size=(int(1e4), 2)), co... | 35.991561 | 88 | 0.515358 |
200f74abbd7b0543284b6b6ef2903efed8f310f9 | 346 | py | Python | backend/server.py | chan-w/vaccine-text-signup | f926aa76724ffd5fe1d473fd6cdb70ed50ee982d | [
"MIT"
] | null | null | null | backend/server.py | chan-w/vaccine-text-signup | f926aa76724ffd5fe1d473fd6cdb70ed50ee982d | [
"MIT"
] | null | null | null | backend/server.py | chan-w/vaccine-text-signup | f926aa76724ffd5fe1d473fd6cdb70ed50ee982d | [
"MIT"
] | null | null | null | from flask import Flask, request, Response, jsonify, redirect, render_template
# flask_cors import CORS
app = Flask(__name__)
# CORS(app)
@app.route("/", methods=['GET', 'POST'])
def landing():
return render_template("index.html")
if __name__ == '__main__':
app.run(
host='0.0.0.0',
port=4000... | 21.625 | 78 | 0.632948 |
7d74c51327549286c18e4969e54c91e434205178 | 9,771 | py | Python | deepcpg/data/utils.py | cangermueller/deepcpg2 | 7f58da5423121168edabb27202c234df0f0e460d | [
"MIT"
] | 151 | 2016-05-30T07:05:11.000Z | 2022-02-28T08:23:55.000Z | deepcpg/data/utils.py | cangermueller/deepcpg2 | 7f58da5423121168edabb27202c234df0f0e460d | [
"MIT"
] | 41 | 2016-08-02T17:18:00.000Z | 2021-05-31T10:15:18.000Z | deepcpg/data/utils.py | cangermueller/deepcpg2 | 7f58da5423121168edabb27202c234df0f0e460d | [
"MIT"
] | 70 | 2016-05-31T14:25:14.000Z | 2021-08-30T02:28:33.000Z | """General purpose IO functions."""
from __future__ import division
from __future__ import print_function
import gzip
import threading
import re
import h5py as h5
import numpy as np
import pandas as pd
import six
from six.moves import range
from . import hdf
# Constant for missing labels.
CPG_NAN = -1
# Constant f... | 28.570175 | 80 | 0.599427 |
c72f7873635f865befc7c662bcf1cb51e4e35887 | 1,273 | py | Python | LanguageIdentification/AccuracyOnSyntheticCiphers/Scripts/aggResults.py | abramhindle/dorabella-experiments | 2b7fce05964c184f048db75f6ead80bf81a15d97 | [
"CC0-1.0"
] | null | null | null | LanguageIdentification/AccuracyOnSyntheticCiphers/Scripts/aggResults.py | abramhindle/dorabella-experiments | 2b7fce05964c184f048db75f6ead80bf81a15d97 | [
"CC0-1.0"
] | 1 | 2021-03-08T22:07:52.000Z | 2021-03-08T22:07:52.000Z | LanguageIdentification/AccuracyOnSyntheticCiphers/Scripts/aggResults.py | abramhindle/dorabella-experiments | 2b7fce05964c184f048db75f6ead80bf81a15d97 | [
"CC0-1.0"
] | 1 | 2021-05-14T16:02:28.000Z | 2021-05-14T16:02:28.000Z | uni2K = open("../Results/uni2KResults.txt").read().replace("\n", " ").split()
uni87 = open("../Results/uni87Results.txt").read().replace("\n", " ").split()
trial2K = open("../Results/trial2KResults.txt").read().replace("\n", " ").split()
trialNS2K = open("../Results/trialNS2KResults.txt").read().replace("\n", " ").spli... | 39.78125 | 111 | 0.567164 |
44d3fe45b80f6a5691dd02b30e0cb97b2a8a0aef | 2,231 | py | Python | dependencies/logger.py | 4-FLOSS-Free-Libre-Open-Source-Software/dns_warmer | 1caa74db77b377746973cc94a539928a462ad057 | [
"MIT"
] | null | null | null | dependencies/logger.py | 4-FLOSS-Free-Libre-Open-Source-Software/dns_warmer | 1caa74db77b377746973cc94a539928a462ad057 | [
"MIT"
] | null | null | null | dependencies/logger.py | 4-FLOSS-Free-Libre-Open-Source-Software/dns_warmer | 1caa74db77b377746973cc94a539928a462ad057 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import sys
import time
# define BLACK "\033[30m" /* Black */
# define RED "\033[31m" /* Red */
# define GREEN "\033[32m" /* Green */
# define YELLOW "\033[33m" /* Yellow */
# define BLUE "\033[34m" /* Blue */
# define MAGENTA "\033[35m" /* Magenta */
# define... | 28.602564 | 69 | 0.524429 |
1ce4fb43805e982d07bc4a5c87c51875b7584b08 | 1,715 | py | Python | activations.py | srinathos/swa | 147a7e8aa780952a2ac680919661b71740b96833 | [
"BSD-2-Clause"
] | null | null | null | activations.py | srinathos/swa | 147a7e8aa780952a2ac680919661b71740b96833 | [
"BSD-2-Clause"
] | null | null | null | activations.py | srinathos/swa | 147a7e8aa780952a2ac680919661b71740b96833 | [
"BSD-2-Clause"
] | null | null | null | import torch
import torch.nn.functional as F
def chabanne_2(x):
# x = x/2
return 0.1992 + 0.5002 * x + 0.1997 * x ** 2
def chabanne_3(x):
return 0.1995 + 0.5002 * x + 0.1994 * x ** 2 - 0.0164 * x ** 3
def chabanne_4(x):
return 0.1500 + 0.5012 * x + 0.2981 * x ** 2 - 0.0004 * x ** 3 - 0.0388 * x **... | 23.819444 | 300 | 0.596501 |
7268a4c4c39f2f13c69b11e2318ea4020359a96d | 322 | py | Python | Algorithm_python/Question4.py | AtahanKocc/Algorithm_Challenge | ea6eea8a5860e4424ac29c3485c058a372e43921 | [
"MIT"
] | null | null | null | Algorithm_python/Question4.py | AtahanKocc/Algorithm_Challenge | ea6eea8a5860e4424ac29c3485c058a372e43921 | [
"MIT"
] | null | null | null | Algorithm_python/Question4.py | AtahanKocc/Algorithm_Challenge | ea6eea8a5860e4424ac29c3485c058a372e43921 | [
"MIT"
] | null | null | null | #!/bin/python3
import math
import os
import random
import re
import sys
#
# Complete the 'staircase' function below.
#
# The function accepts INTEGER n as parameter.
#
def staircase(n):
for i in range(1,n+1):
print(f'{"#"*i:>{n}}')
if __name__ == '__main__':
n = int(input().strip())
staircase(n... | 14 | 46 | 0.63354 |
78003c9ca8fd019c5847388a004fb9848b1914e4 | 4,322 | py | Python | conans/test/unittests/model/version_test.py | ssaavedra/conan | e15dc7902fbbeaf469798a3b9948ead1ecfc8e3c | [
"MIT"
] | 6,205 | 2015-12-01T13:40:05.000Z | 2022-03-31T07:30:25.000Z | conans/test/unittests/model/version_test.py | ssaavedra/conan | e15dc7902fbbeaf469798a3b9948ead1ecfc8e3c | [
"MIT"
] | 8,747 | 2015-12-01T16:28:48.000Z | 2022-03-31T23:34:53.000Z | conans/test/unittests/model/version_test.py | ssaavedra/conan | e15dc7902fbbeaf469798a3b9948ead1ecfc8e3c | [
"MIT"
] | 961 | 2015-12-01T16:56:43.000Z | 2022-03-31T13:50:52.000Z | import unittest
from conans.model.version import Version
class VersionTest(unittest.TestCase):
def test_simple(self):
v1 = Version("1.2.3")
self.assertTrue(v1 == "1.2.3")
self.assertTrue(v1 > "1.1")
self.assertTrue(v1 > None)
self.assertTrue(v1 < "1.11")
self.asse... | 41.161905 | 90 | 0.573577 |
3390a99b624e5f8f142bdcb3f89684cf296326b0 | 6,360 | py | Python | Machine Learning Scientist with Python Track/16. Introduction to Deep Learning with Keras/ch3_exercises.py | MuhammadAlBarham/datacamp | 65c180163b1ad235c79d85d4926e586a15a5f78f | [
"MIT"
] | 7 | 2020-09-14T00:26:19.000Z | 2022-02-08T20:53:52.000Z | Machine Learning Scientist with Python Track/16. Introduction to Deep Learning with Keras/ch3_exercises.py | MuhammadAlBarham/datacamp | 65c180163b1ad235c79d85d4926e586a15a5f78f | [
"MIT"
] | null | null | null | Machine Learning Scientist with Python Track/16. Introduction to Deep Learning with Keras/ch3_exercises.py | MuhammadAlBarham/datacamp | 65c180163b1ad235c79d85d4926e586a15a5f78f | [
"MIT"
] | 8 | 2021-01-12T15:23:20.000Z | 2022-03-17T12:06:00.000Z | # Exercise_1
# Instantiate a Sequential model
model = Sequential()
# Input and hidden layer with input_shape, 16 neurons, and relu
model.add(Dense(16, input_shape = (64,), activation = 'relu'))
# Output layer with 10 neurons (one per digit) and softmax
model.add(Dense(10, activation = 'softmax'))
# Compile your mo... | 33.650794 | 103 | 0.685377 |
ad715dd013baef48a2715b0c59dbdec0d6395574 | 4,029 | py | Python | cards/views.py | acdh-oeaw/official-depictions | d562c1bef88834ea2cae35ed119b2538573249a3 | [
"MIT"
] | null | null | null | cards/views.py | acdh-oeaw/official-depictions | d562c1bef88834ea2cae35ed119b2538573249a3 | [
"MIT"
] | 12 | 2020-02-11T21:32:03.000Z | 2022-03-24T08:13:04.000Z | cards/views.py | acdh-oeaw/official-depictions | d562c1bef88834ea2cae35ed119b2538573249a3 | [
"MIT"
] | null | null | null | import django_tables2 as tables
from django.conf import settings
from django_tables2.config import RequestConfig
from django.contrib.auth.decorators import login_required
from django.utils.decorators import method_decorator
from django.urls import reverse, reverse_lazy
from django.views.generic import TemplateView
from... | 29.625 | 85 | 0.712584 |
752cc5e4590e72fa1f1b6f1983f52ad7c7d2ec74 | 848 | py | Python | stack/0503_next_greater_element_2.py | MartinMa28/Algorithms_review | 3f2297038c00f5a560941360ca702e6868530f34 | [
"MIT"
] | null | null | null | stack/0503_next_greater_element_2.py | MartinMa28/Algorithms_review | 3f2297038c00f5a560941360ca702e6868530f34 | [
"MIT"
] | null | null | null | stack/0503_next_greater_element_2.py | MartinMa28/Algorithms_review | 3f2297038c00f5a560941360ca702e6868530f34 | [
"MIT"
] | null | null | null | class Solution:
def nextGreaterElements(self, nums: list) -> list:
if not nums:
return []
monotonic_stack = [(nums[0], 0)]
nums = nums + nums
next_greater = {}
for i, num in enumerate(nums[1:], 1):
while monotonic_stack:
... | 30.285714 | 54 | 0.415094 |
fa507e43700dfc0078958bec68c623b0aebfea2b | 13,662 | py | Python | src/eatery_db/campus_eatery.py | cuappdev/eatery-backend | 564dbdfe790e844e41a3d2e0ed993c07cc68f2ac | [
"MIT"
] | 3 | 2016-02-28T15:45:18.000Z | 2016-02-29T21:13:54.000Z | src/eatery_db/campus_eatery.py | cuappdev/eatery-backend | 564dbdfe790e844e41a3d2e0ed993c07cc68f2ac | [
"MIT"
] | 90 | 2016-02-23T23:57:50.000Z | 2021-09-20T04:23:23.000Z | src/eatery_db/campus_eatery.py | cuappdev/eatery-backend | 564dbdfe790e844e41a3d2e0ed993c07cc68f2ac | [
"MIT"
] | 4 | 2016-02-23T04:41:58.000Z | 2020-12-15T22:03:15.000Z | from datetime import datetime, timedelta
import requests
from .common_eatery import format_time, get_image_url, parse_coordinates, string_to_date_range
from ..constants import (
NUM_DAYS_STORED_IN_DB,
PAY_METHODS,
STATIC_MENUS_URL,
STATIC_ATTRIBUTES_URL,
TRILLIUM_SLUG,
WEEKDAYS,
get_today,
... | 39.830904 | 118 | 0.597716 |
9f2d28da65fa12e00c89f9d7e0791df302ab8a5e | 11,801 | py | Python | fairseq/modules/dynamic_convolution.py | yyeboah/fairseq | 80e79a03c2b2fdf9889c19c8f4129d379d130e10 | [
"MIT"
] | 33 | 2021-08-11T12:52:53.000Z | 2022-03-08T03:03:21.000Z | fairseq/modules/dynamic_convolution.py | MANGA-UOFA/DSLP | a9d3ee154f3bc73b9dfc191ed537ee90b3896956 | [
"MIT"
] | 10 | 2021-11-14T12:28:48.000Z | 2022-02-28T14:13:40.000Z | fairseq/modules/dynamic_convolution.py | MANGA-UOFA/DSLP | a9d3ee154f3bc73b9dfc191ed537ee90b3896956 | [
"MIT"
] | 5 | 2021-11-10T08:55:33.000Z | 2022-03-14T14:57:48.000Z | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import torch
import torch.nn as nn
import torch.nn.functional as F
from fairseq import utils
from fairseq.incremental_decoding_utils import wi... | 37.945338 | 132 | 0.603932 |
f311bb451eea86c734dbfd96a08b9a1a2241f4a8 | 696 | py | Python | rllib/tests/test_local.py | firebolt55439/ray | 215300b070628c06f0106906fc6c03bd70ebf140 | [
"Apache-2.0"
] | 21,382 | 2016-09-26T23:12:52.000Z | 2022-03-31T21:47:45.000Z | rllib/tests/test_local.py | firebolt55439/ray | 215300b070628c06f0106906fc6c03bd70ebf140 | [
"Apache-2.0"
] | 19,689 | 2016-09-17T08:21:25.000Z | 2022-03-31T23:59:30.000Z | rllib/tests/test_local.py | firebolt55439/ray | 215300b070628c06f0106906fc6c03bd70ebf140 | [
"Apache-2.0"
] | 4,114 | 2016-09-23T18:54:01.000Z | 2022-03-31T15:07:32.000Z | import unittest
import ray
from ray.rllib.agents.pg import PGTrainer, DEFAULT_CONFIG
from ray.rllib.utils.test_utils import framework_iterator
class LocalModeTest(unittest.TestCase):
def setUp(self) -> None:
ray.init(local_mode=True)
def tearDown(self) -> None:
ray.shutdown()
def test_l... | 23.2 | 57 | 0.62931 |
abd2259bf0f44412b06e8a6ee33ea7b016d14414 | 15,562 | py | Python | grumers/apps/data/migrations/0011_auto__del_jellyfishincident__add_dailyreport.py | socib/grumers | ef0b5f8441cf7b3d5a03da715263003d9f550f2f | [
"MIT"
] | 1 | 2018-04-27T04:26:38.000Z | 2018-04-27T04:26:38.000Z | grumers/apps/data/migrations/0011_auto__del_jellyfishincident__add_dailyreport.py | socib/grumers | ef0b5f8441cf7b3d5a03da715263003d9f550f2f | [
"MIT"
] | null | null | null | grumers/apps/data/migrations/0011_auto__del_jellyfishincident__add_dailyreport.py | socib/grumers | ef0b5f8441cf7b3d5a03da715263003d9f550f2f | [
"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):
# Deleting model 'JellyfishIncident'
db.delete_table(u'data_jellyfishinci... | 87.920904 | 195 | 0.588099 |
563e93c653fe74c3db14f903385a8216c8c79c03 | 3,956 | py | Python | scripts/replay_action_log.py | prstolpe/rrc_simulation | b430fe4e575641cdd64945cf57d0dd67a0eea17a | [
"BSD-3-Clause"
] | null | null | null | scripts/replay_action_log.py | prstolpe/rrc_simulation | b430fe4e575641cdd64945cf57d0dd67a0eea17a | [
"BSD-3-Clause"
] | null | null | null | scripts/replay_action_log.py | prstolpe/rrc_simulation | b430fe4e575641cdd64945cf57d0dd67a0eea17a | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
"""Replay actions for a given logfile and verify final object pose.
The log file is a JSON file as produced by
`rrc_simulation.TriFingerPlatform.store_action_log()` which contains the
initial state, a list of all applied actions and the final state of the object.
The simulation is initialised a... | 30.90625 | 79 | 0.654954 |
8766dd1de40c51558de4fecf6601b58c14db2d55 | 4,859 | py | Python | 51job/demo.py | kryane/Python-111 | 281c3b1200b168c820fd5c17d34ec6af5057ef9a | [
"Apache-2.0"
] | 19 | 2022-02-07T14:43:48.000Z | 2022-03-22T08:06:53.000Z | 51job/demo.py | huangtc/Python-111 | c817762130b73e0af2c1e783605b477d688f6262 | [
"Apache-2.0"
] | null | null | null | 51job/demo.py | huangtc/Python-111 | c817762130b73e0af2c1e783605b477d688f6262 | [
"Apache-2.0"
] | 11 | 2022-02-07T13:43:20.000Z | 2022-03-22T08:06:49.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author : Helaoshi
# @Time : 2021/12/28 14:12
# @File : demo.py
# @Project : pythonProject
import pandas as pd
import requests
list1 = []
for page in range(1, 51):
url = f'https://search.51job.com/list/000000,000000,0000,00,9,99,python,2,{... | 107.977778 | 1,669 | 0.793167 |
43e2fcd8532bd26154abb2c8be43988739f12e92 | 14,574 | py | Python | pyjokes/jokes_it.py | r0d0dendr0n/pyjokes | 382065cba91007302be7fd04c5c35a9957e173b2 | [
"BSD-3-Clause"
] | 293 | 2015-08-04T13:59:27.000Z | 2022-03-12T12:43:33.000Z | pyjokes/jokes_it.py | r0d0dendr0n/pyjokes | 382065cba91007302be7fd04c5c35a9957e173b2 | [
"BSD-3-Clause"
] | 88 | 2015-07-26T13:08:16.000Z | 2022-02-10T07:51:28.000Z | pyjokes/jokes_it.py | r0d0dendr0n/pyjokes | 382065cba91007302be7fd04c5c35a9957e173b2 | [
"BSD-3-Clause"
] | 103 | 2015-08-06T17:27:29.000Z | 2022-02-28T19:50:29.000Z | # -*- coding: utf-8 -*-
"""
Jokes from stackoverflow - provided under CC BY-SA 3.0
http://stackoverflow.com/questions/234075/what-is-your-best-programmer-joke?page=4&tab=votes#tab-top
"""
neutral = [
"Trionfalmente, Beth ha rimosso Python 2.7 dal server nel 2020.'Finalmente!' ha detto con gioia, solo per vedere l... | 79.639344 | 145 | 0.727734 |
7b191347b98ae4c00435b6eecae4ff90355437ef | 1,412 | py | Python | dlk/python/dlk/core/model.py | progrunner17/blueoil | 5cbe8b2ceebaaa7a6582a377031ae92855bed0aa | [
"Apache-2.0"
] | 1 | 2019-10-09T04:41:02.000Z | 2019-10-09T04:41:02.000Z | dlk/python/dlk/core/model.py | progrunner17/blueoil | 5cbe8b2ceebaaa7a6582a377031ae92855bed0aa | [
"Apache-2.0"
] | 1 | 2019-02-07T12:20:52.000Z | 2019-02-08T07:22:48.000Z | dlk/python/dlk/core/model.py | progrunner17/blueoil | 5cbe8b2ceebaaa7a6582a377031ae92855bed0aa | [
"Apache-2.0"
] | 2 | 2019-02-08T10:03:34.000Z | 2019-03-20T06:25:55.000Z | # -*- coding: utf-8 -*-
# Copyright 2018 The Blueoil 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
#
# Unles... | 35.3 | 79 | 0.646601 |
92ed16359e6dcfb6bab57762fca98b145efab0dc | 3,380 | py | Python | configs/_base_/models/faster_rcnn_r50_fpn.py | deepakksingh/mmdetection | b0d845f1fecf8064db30ef6b456b6ef5f36fa40f | [
"Apache-2.0"
] | 295 | 2020-07-16T13:03:29.000Z | 2022-03-29T05:20:12.000Z | configs/_base_/models/faster_rcnn_r50_fpn.py | deepakksingh/mmdetection | b0d845f1fecf8064db30ef6b456b6ef5f36fa40f | [
"Apache-2.0"
] | 136 | 2021-07-11T11:26:54.000Z | 2022-03-31T02:45:34.000Z | configs/_base_/models/faster_rcnn_r50_fpn.py | deepakksingh/mmdetection | b0d845f1fecf8064db30ef6b456b6ef5f36fa40f | [
"Apache-2.0"
] | 84 | 2021-05-29T06:58:14.000Z | 2022-03-31T07:44:10.000Z | model = dict(
type='FasterRCNN',
pretrained='torchvision://resnet50',
backbone=dict(
type='ResNet',
depth=50,
num_stages=4,
out_indices=(0, 1, 2, 3),
frozen_stages=1,
norm_cfg=dict(type='BN', requires_grad=True),
norm_eval=True,
style='pytorch'... | 30.727273 | 77 | 0.532544 |
1282c8a66d1b7100c97d18f6e669ff3b928a2477 | 1,253 | py | Python | nextstrain/cli/command/update.py | mlarrousse/cli | 808314eb1ac74231e4500945b0802b235985bf88 | [
"MIT"
] | 22 | 2019-11-06T01:47:30.000Z | 2022-03-29T15:39:27.000Z | nextstrain/cli/command/update.py | mlarrousse/cli | 808314eb1ac74231e4500945b0802b235985bf88 | [
"MIT"
] | 141 | 2018-06-29T23:45:45.000Z | 2022-03-31T21:02:03.000Z | nextstrain/cli/command/update.py | mlarrousse/cli | 808314eb1ac74231e4500945b0802b235985bf88 | [
"MIT"
] | 18 | 2018-07-24T16:33:52.000Z | 2021-02-16T20:12:11.000Z | """
Updates your local copy of the default container image.
This may take several minutes as the layers of the image are downloaded.
"""
from functools import partial
from ..util import colored, check_for_new_version
from ..runner import all_runners
def register_parser(subparser):
parser = subparser.add_parser(... | 26.104167 | 88 | 0.652035 |
ccb213fd91b33d2719b671ee32ae3816418d68a5 | 473 | py | Python | yatube/posts/admin.py | ATIMSRU/yatube_project | 8d7818c312a2ec311778b1e25b24bbe4715d55ec | [
"MIT"
] | null | null | null | yatube/posts/admin.py | ATIMSRU/yatube_project | 8d7818c312a2ec311778b1e25b24bbe4715d55ec | [
"MIT"
] | null | null | null | yatube/posts/admin.py | ATIMSRU/yatube_project | 8d7818c312a2ec311778b1e25b24bbe4715d55ec | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Group, Post
# Register your models here.
class PostAdmin(admin.ModelAdmin):
list_display = ('pk', 'text', 'pub_date', 'author', 'group')
list_editable = ('group',)
search_fields = ('text',)
list_filter = ('pub_date',)
# Это свойство сработает ... | 31.533333 | 80 | 0.697674 |
8230c6bf63d64026443f6ad65e1c991017c3119e | 1,724 | py | Python | disc_tool/social_graph.py | tomasff/disc | e10ab5d36920254ef1ae50cd3f53f65edd1f8ea4 | [
"MIT"
] | 1 | 2022-03-28T11:20:10.000Z | 2022-03-28T11:20:10.000Z | disc_tool/social_graph.py | tomasff/disc | e10ab5d36920254ef1ae50cd3f53f65edd1f8ea4 | [
"MIT"
] | null | null | null | disc_tool/social_graph.py | tomasff/disc | e10ab5d36920254ef1ae50cd3f53f65edd1f8ea4 | [
"MIT"
] | null | null | null | from enum import Enum, unique, auto
from datetime import datetime
import networkx as nx
@unique
class InteractionType(Enum):
MESSAGE_REACTION = auto()
MESSAGE_REPLY = auto()
MESSAGE_MENTION = auto()
class Interaction:
def __init__(self, user1, user2, recorded_at, type):
self.user1 = user1
... | 24.985507 | 81 | 0.636311 |
2d1f4287b53d4d9575a419729927d56fc44c0f01 | 5,801 | py | Python | MPU6050_cal.py | bunny1985/mpu6050_DMP_python | cb2ffaa55514ee63792ec9738e0c4be064b4c344 | [
"MIT"
] | 6 | 2021-05-18T19:44:48.000Z | 2022-03-03T06:47:01.000Z | MPU6050_cal.py | bunny1985/mpu6050_DMP_python | cb2ffaa55514ee63792ec9738e0c4be064b4c344 | [
"MIT"
] | null | null | null | MPU6050_cal.py | bunny1985/mpu6050_DMP_python | cb2ffaa55514ee63792ec9738e0c4be064b4c344 | [
"MIT"
] | 1 | 2021-09-03T14:06:06.000Z | 2021-09-03T14:06:06.000Z | from MPU6050RPI import MPU6050
from SimplePID import SimplePID
import struct
def to_short(somebytes):
return struct.unpack('>h', somebytes)[0]
def avg_from_array(a_array):
sum = 0.0
for index in range(0, len(a_array)):
if isinstance(a_array[index], (bytes, bytearray)):
a_array[index... | 29.596939 | 78 | 0.604034 |
e18770a344360f6b0100c6876d2b35412cf5b112 | 4,432 | py | Python | n_dist_keying/n_distance_voter.py | JKamlah/ocromore | f9d302eff234478c98e03740adf6bbeeafe7db8d | [
"Apache-2.0"
] | 16 | 2018-04-20T11:11:18.000Z | 2020-01-14T11:11:59.000Z | n_dist_keying/n_distance_voter.py | JKamlah/ocromore | f9d302eff234478c98e03740adf6bbeeafe7db8d | [
"Apache-2.0"
] | 2 | 2019-09-16T06:22:02.000Z | 2020-08-27T23:11:49.000Z | n_dist_keying/n_distance_voter.py | JKamlah/ocromore | f9d302eff234478c98e03740adf6bbeeafe7db8d | [
"Apache-2.0"
] | 4 | 2019-07-18T18:01:05.000Z | 2020-07-10T18:44:09.000Z | from n_dist_keying.distance_storage import DistanceStorage
from n_dist_keying.text_comparator import TextComparator
import numpy as np
class NDistanceVoter(object):
def __init__(self, texts):
self.d_storage = DistanceStorage()
self._texts = texts
def set_texts(self, new_texts):
self.... | 36.327869 | 113 | 0.644179 |
1faf03dc44027fd6373e1cca66669a053cb042d1 | 47,964 | py | Python | research/object_detection/utils/config_util.py | sudharsan02358/project | 6d309477eb445b76ddc0b832439d9cd41dd41a27 | [
"Apache-2.0"
] | 2 | 2021-04-02T12:21:35.000Z | 2021-12-14T07:29:38.000Z | research/object_detection/utils/config_util.py | sudharsan02358/project | 6d309477eb445b76ddc0b832439d9cd41dd41a27 | [
"Apache-2.0"
] | null | null | null | research/object_detection/utils/config_util.py | sudharsan02358/project | 6d309477eb445b76ddc0b832439d9cd41dd41a27 | [
"Apache-2.0"
] | 1 | 2021-12-04T19:35:04.000Z | 2021-12-04T19:35:04.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... | 39.903494 | 80 | 0.748541 |
355543aa3fb8cac417d062551c3a3dc9b6182c76 | 3,151 | py | Python | students/K33402/Beresnev_Andrey/lab2/Hotels/Hotels/settings.py | agentofknowledge/ITMO_ICT_WebDevelopment_2020-2021 | 7d5eab0d68af378083f21473cbbd5e5def6aa60a | [
"MIT"
] | 4 | 2020-09-03T15:41:42.000Z | 2021-12-24T15:28:20.000Z | students/K33402/Beresnev_Andrey/lab2/Hotels/Hotels/settings.py | agentofknowledge/ITMO_ICT_WebDevelopment_2020-2021 | 7d5eab0d68af378083f21473cbbd5e5def6aa60a | [
"MIT"
] | 48 | 2020-09-13T20:22:42.000Z | 2021-04-30T11:13:30.000Z | students/K33402/Beresnev_Andrey/lab2/Hotels/Hotels/settings.py | agentofknowledge/ITMO_ICT_WebDevelopment_2020-2021 | 7d5eab0d68af378083f21473cbbd5e5def6aa60a | [
"MIT"
] | 69 | 2020-09-06T10:32:37.000Z | 2021-11-28T18:13:17.000Z | """
Django settings for Hotels project.
Generated by 'django-admin startproject' using Django 3.1.3.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
import os
from... | 25.617886 | 91 | 0.698826 |
8990b10749eb08d19bc3e8dc990e34611495b5e1 | 249 | py | Python | atcoder/abc062/a.py | Ashindustry007/competitive-programming | 2eabd3975c029d235abb7854569593d334acae2f | [
"WTFPL"
] | 506 | 2018-08-22T10:30:38.000Z | 2022-03-31T10:01:49.000Z | atcoder/abc062/a.py | Ashindustry007/competitive-programming | 2eabd3975c029d235abb7854569593d334acae2f | [
"WTFPL"
] | 13 | 2019-08-07T18:31:18.000Z | 2020-12-15T21:54:41.000Z | atcoder/abc062/a.py | Ashindustry007/competitive-programming | 2eabd3975c029d235abb7854569593d334acae2f | [
"WTFPL"
] | 234 | 2018-08-06T17:11:41.000Z | 2022-03-26T10:56:42.000Z | #!/usr/bin/env python3
# https://abc062.contest.atcoder.jp/tasks/abc062_a
x, y = map(int, input().split())
s = [4, 6, 9, 11]
if x in s and y in s: print('Yes')
elif x in s or y in s: print('No')
elif x == 2 or y == 2: print('No')
else: print('Yes')
| 27.666667 | 50 | 0.606426 |
e72e7a23cff9901315046bfb52f2e631f6ffff5e | 1,964 | py | Python | knover/tasks/__init__.py | Vonderland/Knover | 73815ed6f91a301674001a8d29f3a0356e627ea6 | [
"Apache-2.0"
] | 1 | 2020-07-06T07:21:01.000Z | 2020-07-06T07:21:01.000Z | knover/tasks/__init__.py | Vonderland/Knover | 73815ed6f91a301674001a8d29f3a0356e627ea6 | [
"Apache-2.0"
] | 1 | 2020-07-04T04:58:47.000Z | 2020-07-04T04:58:47.000Z | knover/tasks/__init__.py | Vonderland/Knover | 73815ed6f91a301674001a8d29f3a0356e627ea6 | [
"Apache-2.0"
] | 1 | 2020-07-04T04:38:19.000Z | 2020-07-04T04:38:19.000Z | # Copyright (c) 2020 PaddlePaddle 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 app... | 29.757576 | 79 | 0.710285 |
b91eb028b394a5b6b3cadc9b8045844afe8c7082 | 1,397 | py | Python | kiez/io/temp_file_handling.py | cthoyt/kiez | 25f9f103ed51d4084e10f7ac532bb24183fe3894 | [
"BSD-3-Clause"
] | null | null | null | kiez/io/temp_file_handling.py | cthoyt/kiez | 25f9f103ed51d4084e10f7ac532bb24183fe3894 | [
"BSD-3-Clause"
] | null | null | null | kiez/io/temp_file_handling.py | cthoyt/kiez | 25f9f103ed51d4084e10f7ac532bb24183fe3894 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# SPDX-License-Identifier: BSD-3-Clause
# Author: Roman Feldbauer
import logging
from tempfile import NamedTemporaryFile, mkstemp
__all__ = ["create_tempfile_preferably_in_dir"]
def create_tempfile_preferably_in_dir(
suffix: str = None,
prefix: str = None,
directory: str = None,
... | 25.4 | 91 | 0.645669 |
5ff42d896dc54ed117f9d976667e723816959ee4 | 3,354 | py | Python | pychron/extraction_line/stop_watch.py | ASUPychron/pychron | dfe551bdeb4ff8b8ba5cdea0edab336025e8cc76 | [
"Apache-2.0"
] | 31 | 2016-03-07T02:38:17.000Z | 2022-02-14T18:23:43.000Z | pychron/extraction_line/stop_watch.py | ASUPychron/pychron | dfe551bdeb4ff8b8ba5cdea0edab336025e8cc76 | [
"Apache-2.0"
] | 1,626 | 2015-01-07T04:52:35.000Z | 2022-03-25T19:15:59.000Z | pychron/extraction_line/stop_watch.py | UIllinoisHALPychron/pychron | f21b79f4592a9fb9dc9a4cb2e4e943a3885ededc | [
"Apache-2.0"
] | 26 | 2015-05-23T00:10:06.000Z | 2022-03-07T16:51:57.000Z | # ===============================================================================
# Copyright 2013 Jake Ross
#
# 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... | 27.95 | 81 | 0.576923 |
7513c6f14503a52e177f87a88b8df1b56efd057c | 7,067 | py | Python | src/pyspd/loader.py | michalbachowski/pyspd | fe5bdb37d9b46ef11ac5739ba768d9455286abca | [
"MIT"
] | null | null | null | src/pyspd/loader.py | michalbachowski/pyspd | fe5bdb37d9b46ef11ac5739ba768d9455286abca | [
"MIT"
] | null | null | null | src/pyspd/loader.py | michalbachowski/pyspd | fe5bdb37d9b46ef11ac5739ba768d9455286abca | [
"MIT"
] | null | null | null | import importlib
from logging import getLogger
import os
import sys
logger = getLogger(__name__)
class LoaderInterface(object):
"""Interface for any loader class"""
def load(self, names):
"""
Locates and loads plugin modules using built in strategy
Arguments:
:param ... | 30.330472 | 78 | 0.582991 |
25e726f2c31d9843eed6bb79fd87e4c01d3760ef | 40,525 | py | Python | src/_pytest/assertion/rewrite.py | rosemichaele/pytest | 1c0ab3c2a32f7932378a1c37106d082784cb4700 | [
"MIT"
] | 2 | 2020-08-30T13:12:52.000Z | 2020-09-03T05:38:28.000Z | src/_pytest/assertion/rewrite.py | rosemichaele/pytest | 1c0ab3c2a32f7932378a1c37106d082784cb4700 | [
"MIT"
] | 9 | 2020-08-11T15:19:55.000Z | 2022-03-12T00:11:12.000Z | src/_pytest/assertion/rewrite.py | rosemichaele/pytest | 1c0ab3c2a32f7932378a1c37106d082784cb4700 | [
"MIT"
] | 3 | 2020-12-03T13:39:33.000Z | 2021-04-13T02:58:04.000Z | """Rewrite assertion AST to produce nice error messages"""
import ast
import errno
import functools
import importlib.abc
import importlib.machinery
import importlib.util
import io
import itertools
import marshal
import os
import struct
import sys
import tokenize
import types
from typing import Dict
from typing import L... | 38.33964 | 107 | 0.59921 |
944efdc61f41d65e230a9d586a4aa4a5d14f451a | 5,719 | py | Python | src/thumbor_video_engine/engines/video.py | fdintino/thumbor-video-engine | c4ed8bd191e17d9b0b606468fb22fa77de36cc05 | [
"MIT"
] | null | null | null | src/thumbor_video_engine/engines/video.py | fdintino/thumbor-video-engine | c4ed8bd191e17d9b0b606468fb22fa77de36cc05 | [
"MIT"
] | null | null | null | src/thumbor_video_engine/engines/video.py | fdintino/thumbor-video-engine | c4ed8bd191e17d9b0b606468fb22fa77de36cc05 | [
"MIT"
] | null | null | null | from thumbor.engines import BaseEngine
from thumbor.utils import logger
from thumbor_video_engine.utils import (
named_tmp_file, is_mp4, is_qt, is_animated, is_animated_gif)
def patch_baseengine_get_mimetype():
"""
Monkey-patch BaseEngine.get_mimetype() to recognize all mp4 files as video/mp4
"""
... | 41.143885 | 84 | 0.641021 |
6c9e43b2ee4138b7b8de9f5c4abcc571ffda0712 | 455 | py | Python | packages/python/plotly/plotly/validators/layout/modebar/_remove.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/validators/layout/modebar/_remove.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/validators/layout/modebar/_remove.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | import _plotly_utils.basevalidators
class RemoveValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(self, plotly_name="remove", parent_name="layout.modebar", **kwargs):
super(RemoveValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | 35 | 85 | 0.663736 |
7d0e5a1c920820f334fa7c421fc9f97eeef3866d | 2,310 | py | Python | test/functional/mempool_spend_coinbase.py | XbitCC/xbitcoin | 2c71b1adc311680e8f3aa977b42029b1a26164f1 | [
"MIT"
] | 2 | 2021-10-16T06:16:02.000Z | 2022-03-26T21:48:38.000Z | test/functional/mempool_spend_coinbase.py | XbitCC/xbitcoin | 2c71b1adc311680e8f3aa977b42029b1a26164f1 | [
"MIT"
] | null | null | null | test/functional/mempool_spend_coinbase.py | XbitCC/xbitcoin | 2c71b1adc311680e8f3aa977b42029b1a26164f1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2018 The XBit Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test spending coinbase transactions.
The coinbase transaction in block N can appear in block
N+100... so ... | 40.526316 | 124 | 0.719048 |
9ba5b56c164f3d7509641b5248c689e7fb53ad48 | 8,629 | py | Python | grr/server/grr_response_server/gui/api_auth_manager_test.py | billstackpole/grr | 203a0a99990a2d4004aed84a5cd822cbda2b418c | [
"Apache-2.0"
] | 1 | 2019-03-28T07:09:41.000Z | 2019-03-28T07:09:41.000Z | grr/server/grr_response_server/gui/api_auth_manager_test.py | gingogo/grr | 203a0a99990a2d4004aed84a5cd822cbda2b418c | [
"Apache-2.0"
] | null | null | null | grr/server/grr_response_server/gui/api_auth_manager_test.py | gingogo/grr | 203a0a99990a2d4004aed84a5cd822cbda2b418c | [
"Apache-2.0"
] | 1 | 2018-08-30T14:50:24.000Z | 2018-08-30T14:50:24.000Z | #!/usr/bin/env python
"""Tests for the SimpleAPIAuthManager."""
import __builtin__
import mock
from grr_response_core.lib import flags
from grr_response_core.lib.rdfvalues import structs as rdf_structs
from grr_response_proto import tests_pb2
from grr_response_server.authorization import groups
from grr_response_ser... | 28.291803 | 80 | 0.758025 |
6d02f9056bde80577ea7eb5e2f256a1849939736 | 71 | py | Python | erds_server/erds_server/local_settings.py | sbsimo/gpm-accumul | e5f3d0f6b5dc079d22be0422eb924d1cf87216b7 | [
"MIT"
] | null | null | null | erds_server/erds_server/local_settings.py | sbsimo/gpm-accumul | e5f3d0f6b5dc079d22be0422eb924d1cf87216b7 | [
"MIT"
] | 5 | 2018-09-25T08:32:30.000Z | 2019-10-01T06:51:33.000Z | erds_server/erds_server/local_settings.py | sbsimo/gpm-accumul | e5f3d0f6b5dc079d22be0422eb924d1cf87216b7 | [
"MIT"
] | 2 | 2018-01-30T16:14:27.000Z | 2020-07-29T07:06:58.000Z | from erds_server.settings import *
# add here all the local settings
| 14.2 | 34 | 0.774648 |
aa2c881b2dc3a9cc2fd4bc82c52456e8ae7f9e9e | 71,193 | py | Python | src/twisted/internet/defer.py | seanicus64/twisted | c0f1394c7bfb04d97c725a353a1f678fa6a1c602 | [
"MIT",
"Unlicense"
] | 32 | 2019-11-14T07:49:33.000Z | 2022-02-16T00:49:22.000Z | src/twisted/internet/defer.py | seanicus64/twisted | c0f1394c7bfb04d97c725a353a1f678fa6a1c602 | [
"MIT",
"Unlicense"
] | 9 | 2019-09-06T18:21:59.000Z | 2022-01-13T03:04:11.000Z | src/twisted/internet/defer.py | seanicus64/twisted | c0f1394c7bfb04d97c725a353a1f678fa6a1c602 | [
"MIT",
"Unlicense"
] | 16 | 2019-06-25T13:26:43.000Z | 2022-03-07T07:29:12.000Z | # -*- test-case-name: twisted.test.test_defer -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Support for results that aren't immediately available.
Maintainer: Glyph Lefkowitz
@var _NO_RESULT: The result used to represent the fact that there is no
result. B{Never ever ever use th... | 35.49003 | 117 | 0.618488 |
9ff323afb0b779aa0a34f553d23945e6bd503f51 | 2,668 | py | Python | superbench/cli/_commands.py | asathiya007/superbenchmark | 0583862d2dde37a9aaf16f71be3a23710effef99 | [
"MIT"
] | 1 | 2021-07-06T01:41:15.000Z | 2021-07-06T01:41:15.000Z | superbench/cli/_commands.py | asathiya007/superbenchmark | 0583862d2dde37a9aaf16f71be3a23710effef99 | [
"MIT"
] | 3 | 2021-09-20T22:37:13.000Z | 2022-02-19T07:45:15.000Z | superbench/cli/_commands.py | Nort85/superbenchmark | 702fb1eb3713b2a8c8d9070f7819bba7bab39be4 | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
"""SuperBench CLI commands."""
from knack.arguments import ArgumentsContext
from knack.commands import CLICommandsLoader, CommandGroup
class SuperBenchCommandsLoader(CLICommandsLoader):
"""SuperBench CLI commands loader."""
def load_co... | 43.737705 | 118 | 0.602324 |
8364f6c8a95cf49dddd678773cb99e794bc3703e | 5,551 | py | Python | groupdocs_parser_cloud/models/rectangle.py | groupdocs-parser-cloud/groupdocs-parser-cloud-python | e306362857cb78b17a5dc73a3bf707cbc6876ca3 | [
"MIT"
] | 1 | 2021-12-20T20:27:12.000Z | 2021-12-20T20:27:12.000Z | groupdocs_parser_cloud/models/rectangle.py | groupdocs-parser-cloud/groupdocs-parser-cloud-python | e306362857cb78b17a5dc73a3bf707cbc6876ca3 | [
"MIT"
] | null | null | null | groupdocs_parser_cloud/models/rectangle.py | groupdocs-parser-cloud/groupdocs-parser-cloud-python | e306362857cb78b17a5dc73a3bf707cbc6876ca3 | [
"MIT"
] | 1 | 2021-09-05T17:46:05.000Z | 2021-09-05T17:46:05.000Z | # coding: utf-8
# -----------------------------------------------------------------------------------
# <copyright company="Aspose Pty Ltd" file="Rectangle.py">
# Copyright (c) 2003-2019 Aspose Pty Ltd
# </copyright>
# <summary>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of t... | 30.005405 | 92 | 0.567645 |
21491f53c69a99e2931bc07dc1fe385427e6bfe1 | 6,985 | py | Python | tracformatter/trac/wiki/interwiki.py | kbower/tracwikiconv | 6db4c856c8ab64beac666226519ae2e8d513c428 | [
"BSD-3-Clause"
] | 1 | 2017-02-09T15:55:16.000Z | 2017-02-09T15:55:16.000Z | tracformatter/trac/wiki/interwiki.py | kbower/tracwikiconv | 6db4c856c8ab64beac666226519ae2e8d513c428 | [
"BSD-3-Clause"
] | null | null | null | tracformatter/trac/wiki/interwiki.py | kbower/tracwikiconv | 6db4c856c8ab64beac666226519ae2e8d513c428 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2005-2009 Edgewall Software
# Copyright (C) 2005-2006 Christian Boos <cboos@edgewall.org>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available... | 38.379121 | 84 | 0.56879 |
49a4896a9a68ff446b6343d1474c9634ee0b9ba4 | 8,838 | py | Python | python/swagger_client/models/customer_payload.py | alextselegidis/easyappointments-sdk | 8ba969dc1221ea614b70d4d52313f20fc85df1e1 | [
"CC-BY-3.0"
] | null | null | null | python/swagger_client/models/customer_payload.py | alextselegidis/easyappointments-sdk | 8ba969dc1221ea614b70d4d52313f20fc85df1e1 | [
"CC-BY-3.0"
] | null | null | null | python/swagger_client/models/customer_payload.py | alextselegidis/easyappointments-sdk | 8ba969dc1221ea614b70d4d52313f20fc85df1e1 | [
"CC-BY-3.0"
] | null | null | null | # coding: utf-8
"""
Easy!Appointments API
These are the OpenAPI specs that describe the REST API of Easy!Appointments. # noqa: E501
OpenAPI spec version: 1.0.0
Contact: info@easyappointments.org
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa... | 25.617391 | 171 | 0.559742 |
8245747b892971c64a79edbb4542d4b21ccfe855 | 22,775 | py | Python | training/training_loop.py | igg002/stylegan2-ada-pytorch | f9e58945e599ce09d3a21bb2c49dd5fdab2d5f54 | [
"BSD-Source-Code"
] | null | null | null | training/training_loop.py | igg002/stylegan2-ada-pytorch | f9e58945e599ce09d3a21bb2c49dd5fdab2d5f54 | [
"BSD-Source-Code"
] | null | null | null | training/training_loop.py | igg002/stylegan2-ada-pytorch | f9e58945e599ce09d3a21bb2c49dd5fdab2d5f54 | [
"BSD-Source-Code"
] | null | null | null | # Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto. Any use, reproduction, disclosure or
# distribution of this software and re... | 51.410835 | 168 | 0.624632 |
2c6f0943734bd4b24e17e4002f4794c03c29a425 | 16,608 | py | Python | gradelib.py | luisxmetalx/xv6-SO2 | e1eb50626029a4af1e9f034a467119f4dc7f1d0b | [
"MIT-0"
] | null | null | null | gradelib.py | luisxmetalx/xv6-SO2 | e1eb50626029a4af1e9f034a467119f4dc7f1d0b | [
"MIT-0"
] | null | null | null | gradelib.py | luisxmetalx/xv6-SO2 | e1eb50626029a4af1e9f034a467119f4dc7f1d0b | [
"MIT-0"
] | null | null | null | from __future__ import print_function
import sys, os, re, time, socket, select, subprocess, errno, shutil
from subprocess import check_call, Popen
from optparse import OptionParser
__all__ = []
##################################################################
# Test structure
#
__all__ += ["test", "end_part", "run... | 30.642066 | 86 | 0.533538 |
66fdf78239c06e875544d8e349810088540f2390 | 707 | py | Python | pincer/objects/message/reaction.py | Arthurdw/Pincer | eebb8e8f4e7173ba37b8d3049c1d7de793776ed5 | [
"MIT"
] | 118 | 2021-08-30T15:00:47.000Z | 2022-03-31T11:06:16.000Z | pincer/objects/message/reaction.py | Arthurdw/Pincer | eebb8e8f4e7173ba37b8d3049c1d7de793776ed5 | [
"MIT"
] | 343 | 2021-08-30T12:25:57.000Z | 2022-03-31T07:02:11.000Z | pincer/objects/message/reaction.py | Arthurdw/Pincer | eebb8e8f4e7173ba37b8d3049c1d7de793776ed5 | [
"MIT"
] | 62 | 2021-08-31T22:30:20.000Z | 2022-03-25T18:29:11.000Z | # Copyright Pincer 2021-Present
# Full MIT License can be found in `LICENSE` at the project root.
from __future__ import annotations
from dataclasses import dataclass
from typing import TYPE_CHECKING
from ...utils.api_object import APIObject
if TYPE_CHECKING:
from .emoji import Emoji
@dataclass(repr=False)
cl... | 22.806452 | 65 | 0.698727 |
a7d397d584ec06c416600fe3ae9ee495b87d62a7 | 407 | py | Python | my_meal_planner/recipes/migrations/0008_auto_20210125_1519.py | andydandy21/cookbook | 75066d990eacd7317387050c99fcc17962f535e6 | [
"MIT"
] | null | null | null | my_meal_planner/recipes/migrations/0008_auto_20210125_1519.py | andydandy21/cookbook | 75066d990eacd7317387050c99fcc17962f535e6 | [
"MIT"
] | null | null | null | my_meal_planner/recipes/migrations/0008_auto_20210125_1519.py | andydandy21/cookbook | 75066d990eacd7317387050c99fcc17962f535e6 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.5 on 2021-01-25 21:19
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('recipes', '0007_recipe_instructions'),
]
operations = [
migrations.AlterField(
model_name='recipe',
name='instructio... | 21.421053 | 64 | 0.60688 |
df4c7088327c4f142f18b2f7d723c839c73e7a2f | 1,958 | py | Python | calendar_api.py | adidiac/events-from-gmail-to-calendar | 9ea4e05b3695c6ba4742bd23864a121a4d61afa7 | [
"MIT"
] | null | null | null | calendar_api.py | adidiac/events-from-gmail-to-calendar | 9ea4e05b3695c6ba4742bd23864a121a4d61afa7 | [
"MIT"
] | null | null | null | calendar_api.py | adidiac/events-from-gmail-to-calendar | 9ea4e05b3695c6ba4742bd23864a121a4d61afa7 | [
"MIT"
] | null | null | null | from __future__ import print_function
import datetime
import pickle
import os.path
from googleapiclient.discovery import build
from google_auth_oauthlib.flow import InstalledAppFlow
from google.auth.transport.requests import Request
import json
import os
# If modifying these scopes, delete the file token.pickl... | 36.943396 | 88 | 0.6476 |
109379d4cd8c428aa6ed6d84b9930ee32de2781b | 1,293 | py | Python | climate_util.py | System-Exit/IoT-Climate | feffd57cb87286ee9006e662144ab2483f5bd79b | [
"MIT"
] | null | null | null | climate_util.py | System-Exit/IoT-Climate | feffd57cb87286ee9006e662144ab2483f5bd79b | [
"MIT"
] | null | null | null | climate_util.py | System-Exit/IoT-Climate | feffd57cb87286ee9006e662144ab2483f5bd79b | [
"MIT"
] | null | null | null | import urllib
import os
import sense_hat
# Class containing utility methods for multiple other classes
class ClimateUtil:
# Returns true if able to connect to google, otherwise false
@staticmethod
def checkConnection():
# Attempt connection
try:
host = urllib.request.urlopen("h... | 34.945946 | 70 | 0.653519 |
a4638c40dba3e6b23433af012afb49e569ce8070 | 699 | py | Python | checkov/common/util/banner.py | kylelaker/checkov | 6eada26030a87f397a6bf1831827b3dc6c5dad2d | [
"Apache-2.0"
] | 4,013 | 2019-12-09T13:16:54.000Z | 2022-03-31T14:31:01.000Z | checkov/common/util/banner.py | kylelaker/checkov | 6eada26030a87f397a6bf1831827b3dc6c5dad2d | [
"Apache-2.0"
] | 1,258 | 2019-12-17T09:55:51.000Z | 2022-03-31T19:17:17.000Z | checkov/common/util/banner.py | kylelaker/checkov | 6eada26030a87f397a6bf1831827b3dc6c5dad2d | [
"Apache-2.0"
] | 638 | 2019-12-19T08:57:38.000Z | 2022-03-30T21:38:37.000Z | from termcolor import colored
from checkov.version import version
from checkov.common.version_manager import check_for_update
banner = r"""
_ _
___| |__ ___ ___| | _______ __
/ __| '_ \ / _ \/ __| |/ / _ \ \ / /
| (__| | | | __/ (__| < (_) \ V /
\___|_| |_|\___|\___... | 36.789474 | 139 | 0.537911 |
5456daa8cdc537fcf6d3637aa68228e259743d5b | 670 | py | Python | Anime API/app_helper.py | vaiiiloz/AIP391_nhom3 | 180d1e55825e44674dc2273b4ee8a8a643d158e4 | [
"MIT"
] | null | null | null | Anime API/app_helper.py | vaiiiloz/AIP391_nhom3 | 180d1e55825e44674dc2273b4ee8a8a643d158e4 | [
"MIT"
] | null | null | null | Anime API/app_helper.py | vaiiiloz/AIP391_nhom3 | 180d1e55825e44674dc2273b4ee8a8a643d158e4 | [
"MIT"
] | null | null | null | from Pipeline import Pipe
import os
import pandas as pd
pipe = Pipe()
outputPath = r".\templates"
df = pd.read_csv('Anime_df.csv')
def get_image(image_path, img_name):
#try:
image, top1, top5 = pipe.process(image_path)
#except:
# print('Mother Fucker')
image.save(os.path.join(outputPath, img_name))
info =... | 23.103448 | 96 | 0.658209 |
3746518731c439af7944e88c40332d184d1f7107 | 736 | py | Python | test_project/pandas_practice6.py | BillyLiou/python_test_project | e266e2eb627e268a390f1ffc6717979ac44254ad | [
"MIT"
] | null | null | null | test_project/pandas_practice6.py | BillyLiou/python_test_project | e266e2eb627e268a390f1ffc6717979ac44254ad | [
"MIT"
] | null | null | null | test_project/pandas_practice6.py | BillyLiou/python_test_project | e266e2eb627e268a390f1ffc6717979ac44254ad | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- encoding: utf-8 -*-
'''
@File : pandas_practice6.py
@Time : 2021/02/14 23:54:44
@Author : Billy Liu
@Version : 1.0
@Contact : billy@test.mail
@Desc : None
'''
import pandas as pd
import numpy as np
car_name = ['BMW','TOYOTA','MERCEDEZ']
res_list = []
for i in range(... | 22.30303 | 77 | 0.619565 |
157d4ba0c30990866462895456cb7b086323d9c8 | 1,326 | py | Python | L2.23NovQ1.py | aetooc/PF-Lab-Tasks | 17899595e948624370b754103be28eb93f236a14 | [
"MIT"
] | null | null | null | L2.23NovQ1.py | aetooc/PF-Lab-Tasks | 17899595e948624370b754103be28eb93f236a14 | [
"MIT"
] | null | null | null | L2.23NovQ1.py | aetooc/PF-Lab-Tasks | 17899595e948624370b754103be28eb93f236a14 | [
"MIT"
] | null | null | null | a=[1,3,5] # first list a
b=[2,4,6] # second list b
c=[] # new list c
print("a =",a)
print("b =",b)
#part (1)
for i in a:
c.append(i) # Appending elements of a in c
for j in b:
c.append(j) # Appending elements of b in c
print('Step:1 c=',c)# New combined list c
print(' ') # For spacing between ... | 25.5 | 77 | 0.597285 |
5c3eeaf8a54594a31e42d4d52080639b767bfc84 | 6,450 | py | Python | sdk/python/pulumi_azure_nextgen/authorization/v20180301/get_policy_set_definition_at_management_group.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 31 | 2020-09-21T09:41:01.000Z | 2021-02-26T13:21:59.000Z | sdk/python/pulumi_azure_nextgen/authorization/v20180301/get_policy_set_definition_at_management_group.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 231 | 2020-09-21T09:38:45.000Z | 2021-03-01T11:16:03.000Z | sdk/python/pulumi_azure_nextgen/authorization/v20180301/get_policy_set_definition_at_management_group.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 4 | 2020-09-29T14:14:59.000Z | 2021-02-10T20:38:16.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** 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... | 37.719298 | 194 | 0.662326 |
369dd8901703ca342588a76afd8b6db4c3cab414 | 6,045 | py | Python | xos/services/mcordservice/models.py | xmaruto/mcord | 3678a3d10c3703c2b73f396c293faebf0c82a4f4 | [
"Apache-2.0"
] | null | null | null | xos/services/mcordservice/models.py | xmaruto/mcord | 3678a3d10c3703c2b73f396c293faebf0c82a4f4 | [
"Apache-2.0"
] | null | null | null | xos/services/mcordservice/models.py | xmaruto/mcord | 3678a3d10c3703c2b73f396c293faebf0c82a4f4 | [
"Apache-2.0"
] | null | null | null | from django.db import models
from core.models import Service, PlCoreBase, Slice, Instance, Tenant, TenantWithContainer, Node, Image, User, Flavor, Subscriber
from core.models.plcorebase import StrippedCharField
import os
from django.db import models, transaction
from django.forms.models import model_to_dict
from django... | 38.503185 | 128 | 0.673118 |
797591db6cd308daf69fc4773ed6b13c47e165b0 | 28,432 | py | Python | opentamp/core/util_classes/openrave_body.py | Algorithmic-Alignment-Lab/openTAMP | f0642028d551d0436b3a3dbc3bfb2f23a00adc14 | [
"MIT"
] | 4 | 2022-02-13T15:52:18.000Z | 2022-03-26T17:33:13.000Z | opentamp/core/util_classes/openrave_body.py | Algorithmic-Alignment-Lab/openTAMP | f0642028d551d0436b3a3dbc3bfb2f23a00adc14 | [
"MIT"
] | 1 | 2022-02-13T22:48:09.000Z | 2022-02-13T22:48:09.000Z | opentamp/core/util_classes/openrave_body.py | Algorithmic-Alignment-Lab/openTAMP | f0642028d551d0436b3a3dbc3bfb2f23a00adc14 | [
"MIT"
] | null | null | null | import numpy as np
from math import cos, sin, atan2
import pybullet as P
import opentamp.core.util_classes.common_constants as const
import opentamp.core.util_classes.transform_utils as T
from opentamp.core.util_classes.robots import Robot, PR2, Baxter, Washer, NAMO
from opentamp.core.util_classes.items import Item, ... | 42.183976 | 130 | 0.547869 |
56442e8f850fd9c7f136e29c63d3d6d34743e306 | 16,963 | py | Python | ixnetwork_restpy/testplatform/sessions/ixnetwork/traffic/trafficitem/configelement/stack/fCoEFabricLogoLsAcc_template.py | OpenIxia/ixnetwork_restpy | f628db450573a104f327cf3c737ca25586e067ae | [
"MIT"
] | 20 | 2019-05-07T01:59:14.000Z | 2022-02-11T05:24:47.000Z | ixnetwork_restpy/testplatform/sessions/ixnetwork/traffic/trafficitem/configelement/stack/fCoEFabricLogoLsAcc_template.py | OpenIxia/ixnetwork_restpy | f628db450573a104f327cf3c737ca25586e067ae | [
"MIT"
] | 60 | 2019-04-03T18:59:35.000Z | 2022-02-22T12:05:05.000Z | ixnetwork_restpy/testplatform/sessions/ixnetwork/traffic/trafficitem/configelement/stack/fCoEFabricLogoLsAcc_template.py | OpenIxia/ixnetwork_restpy | f628db450573a104f327cf3c737ca25586e067ae | [
"MIT"
] | 13 | 2019-05-20T10:48:31.000Z | 2021-10-06T07:45:44.000Z | from ixnetwork_restpy.base import Base
from ixnetwork_restpy.files import Files
class FCoEFabricLogoLsAcc(Base):
__slots__ = ()
_SDM_NAME = 'fCoEFabricLogoLsAcc'
_SDM_ATT_MAP = {
'FcoeHeaderVersion': 'fCoEFabricLogoLsAcc.header.fcoeHeader.version-1',
'FcoeHeaderReserved': 'fCoEFabricLogoLs... | 39.085253 | 285 | 0.677887 |
08b6673fc0e86d906909d187766d0771c077bb6e | 4,834 | py | Python | docs/conf.py | nmdickson/ssptools | 52a186fff7d7080d8339897a30742f20566b8a1f | [
"MIT"
] | 1 | 2020-10-12T14:56:03.000Z | 2020-10-12T14:56:03.000Z | docs/conf.py | nmdickson/ssptools | 52a186fff7d7080d8339897a30742f20566b8a1f | [
"MIT"
] | 4 | 2019-05-02T09:36:11.000Z | 2021-01-14T20:13:11.000Z | docs/conf.py | nmdickson/ssptools | 52a186fff7d7080d8339897a30742f20566b8a1f | [
"MIT"
] | 2 | 2020-10-17T20:34:27.000Z | 2021-01-27T03:15:48.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# ssptools documentation build configuration file, created by
# sphinx-quickstart on Fri Jun 9 13:47:02 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# au... | 29.47561 | 77 | 0.684733 |
49a654c42ea81ba303e43c537cde6e6d8568f199 | 29,683 | py | Python | watertap/core/tests/test_zero_order_unit.py | bknueven/proteuslib | 1d00f48b3bc4b868c45f44c38acf8203a910931a | [
"BSD-3-Clause-LBNL"
] | null | null | null | watertap/core/tests/test_zero_order_unit.py | bknueven/proteuslib | 1d00f48b3bc4b868c45f44c38acf8203a910931a | [
"BSD-3-Clause-LBNL"
] | null | null | null | watertap/core/tests/test_zero_order_unit.py | bknueven/proteuslib | 1d00f48b3bc4b868c45f44c38acf8203a910931a | [
"BSD-3-Clause-LBNL"
] | null | null | null | ###############################################################################
# WaterTAP Copyright (c) 2021, The Regents of the University of California,
# through Lawrence Berkeley National Laboratory, Oak Ridge National
# Laboratory, National Renewable Energy Laboratory, and National Energy
# Technology Laboratory ... | 43.780236 | 81 | 0.636829 |
5d8c9b96009027deccb29833d6ca63a0dd076d83 | 42,939 | py | Python | newspaper/extractors.py | gavishpoddar/newspaper | bcbae0026c7459e4353ec0878be041f239918730 | [
"Apache-2.0",
"MIT"
] | null | null | null | newspaper/extractors.py | gavishpoddar/newspaper | bcbae0026c7459e4353ec0878be041f239918730 | [
"Apache-2.0",
"MIT"
] | null | null | null | newspaper/extractors.py | gavishpoddar/newspaper | bcbae0026c7459e4353ec0878be041f239918730 | [
"Apache-2.0",
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Newspaper uses much of python-goose's extraction code. View their license:
https://github.com/codelucas/newspaper/blob/master/GOOSE-LICENSE.txt
Keep all html page extraction code within this file. Abstract any
lxml or soup parsing code in the parsers.py file!
"""
__title__ = 'newspaper'
__a... | 39.869081 | 146 | 0.55679 |
6326a5b45fe6e572b10044e452b0c359367b0a10 | 66,994 | py | Python | tensorflow/python/eager/function_test.py | Dectinc/tensorflow | 36922f9b27a0c51987966945890766aa4954a1ab | [
"Apache-2.0"
] | null | null | null | tensorflow/python/eager/function_test.py | Dectinc/tensorflow | 36922f9b27a0c51987966945890766aa4954a1ab | [
"Apache-2.0"
] | null | null | null | tensorflow/python/eager/function_test.py | Dectinc/tensorflow | 36922f9b27a0c51987966945890766aa4954a1ab | [
"Apache-2.0"
] | null | null | null | # 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... | 31.087703 | 80 | 0.65876 |
bbac000a8c624bef379e5a6e38da02f5d1ac4f68 | 4,033 | py | Python | src/awkward/_v2/behaviors/mixins.py | scikit-hep/awkward-1.0 | a440328f8097d22c2ba053fd117fed543829afc0 | [
"BSD-3-Clause"
] | 519 | 2019-10-17T12:36:22.000Z | 2022-03-26T23:28:19.000Z | src/awkward/_v2/behaviors/mixins.py | scikit-hep/awkward-1.0 | a440328f8097d22c2ba053fd117fed543829afc0 | [
"BSD-3-Clause"
] | 924 | 2019-11-03T21:05:01.000Z | 2022-03-31T22:44:30.000Z | src/awkward/_v2/behaviors/mixins.py | scikit-hep/awkward-1.0 | a440328f8097d22c2ba053fd117fed543829afc0 | [
"BSD-3-Clause"
] | 56 | 2019-12-17T15:49:22.000Z | 2022-03-09T20:34:06.000Z | # BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE
# from __future__ import absolute_import
# import sys
# import awkward as ak
# def mixin_class(registry, name=None):
# """
# Args:
# registry (dict): The destination behavior mapping registry. Typically,
# ... | 36.333333 | 87 | 0.567072 |
cdefdbe0d3cc9323336cdfd5f16c74444b5ecd5c | 657 | py | Python | apps/base/migrations/0007_auto_20180525_0906.py | KolevDarko/lifehq | 88d92f5fe76f2fb6511f2a892e096d95a69985d8 | [
"MIT"
] | null | null | null | apps/base/migrations/0007_auto_20180525_0906.py | KolevDarko/lifehq | 88d92f5fe76f2fb6511f2a892e096d95a69985d8 | [
"MIT"
] | null | null | null | apps/base/migrations/0007_auto_20180525_0906.py | KolevDarko/lifehq | 88d92f5fe76f2fb6511f2a892e096d95a69985d8 | [
"MIT"
] | null | null | null | # Generated by Django 2.0 on 2018-05-25 09:06
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('base', '0006_auto_20180521_0534'),
]
operations = [
migrations.AddField(
model_name='projecttodol... | 26.28 | 122 | 0.621005 |
9c0ebfc4be47cf915649db649edf264bfa5105d1 | 2,342 | py | Python | trinity/sync/beam/constants.py | teotoplak/trinity | 6c67b5debfb94f74d0162c70f92ae3d13918b174 | [
"MIT"
] | null | null | null | trinity/sync/beam/constants.py | teotoplak/trinity | 6c67b5debfb94f74d0162c70f92ae3d13918b174 | [
"MIT"
] | 2 | 2019-04-30T06:22:12.000Z | 2019-06-14T04:27:18.000Z | trinity/sync/beam/constants.py | teotoplak/trinity | 6c67b5debfb94f74d0162c70f92ae3d13918b174 | [
"MIT"
] | null | null | null | from eth.constants import MAX_UNCLE_DEPTH
# Peers are typically expected to have predicted nodes available,
# so it's reasonable to ask for all-predictive nodes from a peer.
# Urgent node requests usually come in pretty fast, so
# even at a small value (like 1ms), this timeout is rarely triggered.
DELAY_BEFORE_NON... | 49.829787 | 100 | 0.787361 |
633427e3c348e2ff6317b93bbfadfb3e3610dcfb | 1,982 | py | Python | thirdparty/antlr3-antlr-3.5/runtime/Python3/tests/t004lexer.py | mail2nsrajesh/congress | a724dfb59c43a5e88e2b03e714a5f962d6976762 | [
"Apache-2.0"
] | 50 | 2015-04-21T14:12:01.000Z | 2020-06-01T06:23:13.000Z | thirdparty/antlr3-antlr-3.5/runtime/Python3/tests/t004lexer.py | mail2nsrajesh/congress | a724dfb59c43a5e88e2b03e714a5f962d6976762 | [
"Apache-2.0"
] | 5 | 2019-08-14T06:46:03.000Z | 2021-12-13T20:01:25.000Z | thirdparty/antlr3-antlr-3.5/runtime/Python3/tests/t004lexer.py | mail2nsrajesh/congress | a724dfb59c43a5e88e2b03e714a5f962d6976762 | [
"Apache-2.0"
] | 25 | 2015-05-22T04:02:33.000Z | 2020-01-14T12:15:12.000Z | import antlr3
import testbase
import unittest
class t004lexer(testbase.ANTLRTest):
def setUp(self):
self.compileGrammar()
def lexerClass(self, base):
class TLexer(base):
def emitErrorMessage(self, msg):
# report errors to /dev/null
p... | 27.915493 | 58 | 0.593845 |
37777aa1193466023cc5720027a0bbfbc4b83d56 | 1,699 | py | Python | torch_geometric/utils/sbm.py | Mirwaisse/pytorch_geometric | 0b0022e7c1dce9864184d2d666984cd35dff47e0 | [
"MIT"
] | 1 | 2019-10-16T09:14:19.000Z | 2019-10-16T09:14:19.000Z | torch_geometric/utils/sbm.py | cuiqiang1990/pytorch_geometric | a7143b8d9ace60cf2ec1bd14ecc20ff7c3141151 | [
"MIT"
] | null | null | null | torch_geometric/utils/sbm.py | cuiqiang1990/pytorch_geometric | a7143b8d9ace60cf2ec1bd14ecc20ff7c3141151 | [
"MIT"
] | 1 | 2020-09-21T22:01:18.000Z | 2020-09-21T22:01:18.000Z | import torch
from torch_geometric.utils import to_undirected
def stochastic_blockmodel_graph(block_sizes, edge_probs, directed=False):
r"""Returns the :obj:`edge_index` of a stochastic blockmodel graph.
Args:
block_sizes ([int] or LongTensor): The sizes of blocks.
edge_probs ([[float]] or Flo... | 34.673469 | 79 | 0.642731 |
b4198e9291b70f208145e6ab4ba2e5c8a0e06a3c | 10,990 | py | Python | tensorpack_medical/models/conv3d.py | Jdorri/rl-medical | 750b1f10413daa9cd8e346332bd844212e76ddd8 | [
"Apache-2.0"
] | 96 | 2019-10-16T19:20:21.000Z | 2022-03-22T02:35:01.000Z | tensorpack_medical/models/conv3d.py | Helogn/rl-medical | c9d4006262ab16dc04980215778a740343ea5dcd | [
"Apache-2.0"
] | 78 | 2020-01-19T10:47:31.000Z | 2020-05-13T11:13:05.000Z | tensorpack_medical/models/conv3d.py | Helogn/rl-medical | c9d4006262ab16dc04980215778a740343ea5dcd | [
"Apache-2.0"
] | 42 | 2019-10-12T07:48:23.000Z | 2021-12-01T22:37:41.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# File: conv3d.py
# Author: Amir Alansary <amiralansary@gmail.com>
import tensorflow as tf
from tensorpack import layer_register, VariableHolder
from tensorpack.tfutils.common import get_tf_version_tuple
from .tflayer import rename_get_variable, convert_to_tflayer_args
fr... | 40.109489 | 120 | 0.631483 |
8757ecd60cee87ee7869a3cd07a99cd0b2d9bca6 | 272 | py | Python | src/homework/homework10/score_entry.py | acc-cosc-1336/cosc-1336-spring-2018-EricScotty | 80c0249a583dc178cfc7bb95b851d7f3240dc3e9 | [
"MIT"
] | null | null | null | src/homework/homework10/score_entry.py | acc-cosc-1336/cosc-1336-spring-2018-EricScotty | 80c0249a583dc178cfc7bb95b851d7f3240dc3e9 | [
"MIT"
] | null | null | null | src/homework/homework10/score_entry.py | acc-cosc-1336/cosc-1336-spring-2018-EricScotty | 80c0249a583dc178cfc7bb95b851d7f3240dc3e9 | [
"MIT"
] | null | null | null | class ScoreEntry:
def __init__(self, score_entry_id, die1_value, die2_value):
#create public class attributes for each parameter
self.score_entry_id = score_entry_id
self.die1_value = die1_value
self.die2_value = die2_value
| 27.2 | 64 | 0.6875 |
bbc9459f8ee072c794d5910c8b84ab0858127f37 | 3,395 | py | Python | lib/services/clouddb/ncloud_clouddb/model/common_code.py | NaverCloudPlatform/ncloud-sdk-python | 5976dfabd205c615fcf57ac2f0ab67313ee6953c | [
"MIT"
] | 12 | 2018-11-20T04:30:49.000Z | 2021-11-09T12:34:26.000Z | lib/services/clouddb/ncloud_clouddb/model/common_code.py | NaverCloudPlatform/ncloud-sdk-python | 5976dfabd205c615fcf57ac2f0ab67313ee6953c | [
"MIT"
] | 1 | 2019-01-24T15:56:15.000Z | 2019-05-31T07:56:55.000Z | lib/services/clouddb/ncloud_clouddb/model/common_code.py | NaverCloudPlatform/ncloud-sdk-python | 5976dfabd205c615fcf57ac2f0ab67313ee6953c | [
"MIT"
] | 6 | 2018-06-29T03:45:50.000Z | 2022-03-18T01:51:45.000Z | # coding: utf-8
"""
clouddb
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class CommonCode(object):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
... | 24.963235 | 80 | 0.541973 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.