hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 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 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | 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 3 239 | max_forks_repo_name stringlengths 5 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 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
794c3f671b4c6e3fd613ab302640a225fb26e73b | 29,598 | py | Python | torch/nn/modules/container.py | ljhOfGithub/pytorch | c568f7b16f2a98d72ff5b7c6c6161b67b2c27514 | [
"Intel"
] | 2 | 2022-02-14T13:56:03.000Z | 2022-02-14T13:56:05.000Z | torch/nn/modules/container.py | ljhOfGithub/pytorch | c568f7b16f2a98d72ff5b7c6c6161b67b2c27514 | [
"Intel"
] | 1 | 2019-07-23T15:23:32.000Z | 2019-07-23T15:32:23.000Z | torch/nn/modules/container.py | ljhOfGithub/pytorch | c568f7b16f2a98d72ff5b7c6c6161b67b2c27514 | [
"Intel"
] | 2 | 2019-07-23T14:37:31.000Z | 2019-07-23T14:47:13.000Z | import warnings
from collections import OrderedDict, abc as container_abcs
from itertools import chain, islice
import operator
import torch
from .module import Module
from ..parameter import Parameter
from torch._jit_internal import _copy_to_script_wrapper
from typing import Any, Dict, Iterable, Iterator, Mapping, Op... | 37.849105 | 110 | 0.590412 |
794c4095d63c8dab8431fbf3d7c42d6dcfed42ae | 2,205 | py | Python | packages/syft/src/syft/core/adp/ledger_store.py | BearerPipelineTest/PySyft | 5d4abfbc53c8d3a48f85606d43f7fd9b05a16b3d | [
"Apache-2.0"
] | null | null | null | packages/syft/src/syft/core/adp/ledger_store.py | BearerPipelineTest/PySyft | 5d4abfbc53c8d3a48f85606d43f7fd9b05a16b3d | [
"Apache-2.0"
] | null | null | null | packages/syft/src/syft/core/adp/ledger_store.py | BearerPipelineTest/PySyft | 5d4abfbc53c8d3a48f85606d43f7fd9b05a16b3d | [
"Apache-2.0"
] | null | null | null | # future
from __future__ import annotations
# stdlib
from typing import Any
from typing import Dict
from typing import Optional
from typing import Tuple
# third party
from nacl.signing import VerifyKey
from pydantic import BaseSettings
import redis
# syft absolute
import syft as sy
# relative
from ...util import si... | 31.056338 | 78 | 0.642177 |
794c411997498fc1621b3c5bb8bdeabc988f489b | 2,991 | py | Python | tests/operators/vector/test_abs_ad_001.py | laekov/akg | 5316b8cb2340bbf71bdc724dc9d81513a67b3104 | [
"Apache-2.0"
] | 1 | 2020-08-31T02:43:43.000Z | 2020-08-31T02:43:43.000Z | tests/operators/vector/test_abs_ad_001.py | laekov/akg | 5316b8cb2340bbf71bdc724dc9d81513a67b3104 | [
"Apache-2.0"
] | null | null | null | tests/operators/vector/test_abs_ad_001.py | laekov/akg | 5316b8cb2340bbf71bdc724dc9d81513a67b3104 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Huawei Technologies Co., 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 agreed to... | 35.607143 | 90 | 0.614176 |
794c41f351aa0798145eca7eb93aefb85b5fe3cc | 323 | py | Python | examples/restorear.py | songfei9315/python-sdk | b0f83c5338d68f84decb18729802cd0034f52575 | [
"MIT"
] | 494 | 2015-01-08T09:56:30.000Z | 2022-03-28T03:15:22.000Z | examples/restorear.py | songfei9315/python-sdk | b0f83c5338d68f84decb18729802cd0034f52575 | [
"MIT"
] | 189 | 2015-01-26T06:46:19.000Z | 2022-03-28T04:06:16.000Z | examples/restorear.py | songfei9315/python-sdk | b0f83c5338d68f84decb18729802cd0034f52575 | [
"MIT"
] | 306 | 2015-01-24T05:56:05.000Z | 2021-12-21T12:15:57.000Z | # -*- coding: utf-8 -*-
# flake8: noqa
from qiniu import Auth
from qiniu import BucketManager
access_key = ''
secret_key = ''
q = Auth(access_key, secret_key)
bucket = BucketManager(q)
bucket_name = '13'
key = 'fb8539c39f65d74b4e70db9133c1e9d5.mp4'
ret,info = bucket.restoreAr(bucket_name,key,3)
print(ret)
print(info... | 17.944444 | 46 | 0.733746 |
794c42ddc5f840fa3454cb3c0641854cd3280213 | 4,061 | py | Python | qa/rpc-tests/merkle_blocks.py | zevno/zevno-core | f546a48aaaf55c268633fcd8d04fc7c41c7b2bc8 | [
"MIT"
] | 1 | 2020-12-10T00:17:10.000Z | 2020-12-10T00:17:10.000Z | qa/rpc-tests/merkle_blocks.py | zevno/zevno-core | f546a48aaaf55c268633fcd8d04fc7c41c7b2bc8 | [
"MIT"
] | null | null | null | qa/rpc-tests/merkle_blocks.py | zevno/zevno-core | f546a48aaaf55c268633fcd8d04fc7c41c7b2bc8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test gettxoutproof and verifytxoutproof RPCs."""
from test_framework.test_framework import BitcoinTest... | 46.147727 | 120 | 0.669293 |
794c433a5ef1e26fef7ba6c0b6ece751d199f659 | 5,746 | py | Python | mayan/apps/documents/settings.py | prezi/mayan-edms | e9bc10a056c3379b57115c6e83022f48c6298e1d | [
"Apache-2.0"
] | 4 | 2019-02-17T08:35:42.000Z | 2019-03-28T06:02:11.000Z | mayan/apps/documents/settings.py | zhoubear/mayan-edms | e9bc10a056c3379b57115c6e83022f48c6298e1d | [
"Apache-2.0"
] | 1 | 2018-10-11T13:01:34.000Z | 2018-10-11T13:01:34.000Z | mayan/apps/documents/settings.py | prezi/mayan-edms | e9bc10a056c3379b57115c6e83022f48c6298e1d | [
"Apache-2.0"
] | 3 | 2019-01-29T13:21:57.000Z | 2019-10-27T03:20:15.000Z | from __future__ import unicode_literals
import os
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from smart_settings import Namespace
from .literals import DEFAULT_LANGUAGE, DEFAULT_LANGUAGE_CODES
namespace = Namespace(name='documents', label=_('Documents'))
setting_docum... | 37.070968 | 78 | 0.74417 |
794c43848c2e3bba779c4fee8979da2737b872ff | 1,511 | py | Python | python/ppml/src/bigdl/ppml/algorithms/hfl_nn.py | DirkFi/BigDL | 7493209165c046116470b9a1e1c8f527915d6f1e | [
"Apache-2.0"
] | null | null | null | python/ppml/src/bigdl/ppml/algorithms/hfl_nn.py | DirkFi/BigDL | 7493209165c046116470b9a1e1c8f527915d6f1e | [
"Apache-2.0"
] | null | null | null | python/ppml/src/bigdl/ppml/algorithms/hfl_nn.py | DirkFi/BigDL | 7493209165c046116470b9a1e1c8f527915d6f1e | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2016 The BigDL 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 ... | 29.627451 | 74 | 0.647915 |
794c4441c01ae050a9e680708e354fffd75de17f | 6,674 | py | Python | notebooks/CleanTweets.py | TamatiB/restitution_africa2021 | a5d640075813350386ff52180a51af2e1367a67f | [
"Apache-2.0"
] | null | null | null | notebooks/CleanTweets.py | TamatiB/restitution_africa2021 | a5d640075813350386ff52180a51af2e1367a67f | [
"Apache-2.0"
] | null | null | null | notebooks/CleanTweets.py | TamatiB/restitution_africa2021 | a5d640075813350386ff52180a51af2e1367a67f | [
"Apache-2.0"
] | null | null | null | import emoji
import string
import nltk
from nltk.corpus import stopwords
from nltk.corpus import wordnet
import re
import time
nltk.download('stopwords')
nltk.download('punkt')
def clean_tweets(df,content,col_name,
general_clean=True,lemma=True,stem=False,remove_tag=True,remove_mention=True,
... | 36.271739 | 140 | 0.649985 |
794c444bb7482a9f35cca341f59a931783ae0a43 | 3,148 | py | Python | baekjoon/23290.py | wonnerky/coteMaster | 360e491e6342c1ee42ff49750b838a2ead865613 | [
"Apache-2.0"
] | null | null | null | baekjoon/23290.py | wonnerky/coteMaster | 360e491e6342c1ee42ff49750b838a2ead865613 | [
"Apache-2.0"
] | null | null | null | baekjoon/23290.py | wonnerky/coteMaster | 360e491e6342c1ee42ff49750b838a2ead865613 | [
"Apache-2.0"
] | null | null | null | import copy
def shark_mov(loc, path, num_fish, visited):
global max_fish, results
if len(path) == 3:
if num_fish == max_fish:
results.append(path)
elif num_fish > max_fish:
max_fish = num_fish
results = [path]
return None
r, c = loc
for i in... | 27.373913 | 94 | 0.444409 |
794c4495c48dbd20a94b2e79aad619a741a0c18f | 918 | py | Python | plotly/validators/parcoords/__init__.py | Sandy1811/plotly.py | 32b67018b0c286a9bc099506c3c77186fb69446a | [
"MIT"
] | 1 | 2021-12-25T01:26:41.000Z | 2021-12-25T01:26:41.000Z | plotly/validators/parcoords/__init__.py | biswapanda/plotly.py | d4c965c2f978dc5c591d73ba8911ffe9ec874dab | [
"MIT"
] | null | null | null | plotly/validators/parcoords/__init__.py | biswapanda/plotly.py | d4c965c2f978dc5c591d73ba8911ffe9ec874dab | [
"MIT"
] | 1 | 2021-06-21T07:53:04.000Z | 2021-06-21T07:53:04.000Z | from ._visible import VisibleValidator
from ._uid import UidValidator
from ._tickfont import TickfontValidator
from ._stream import StreamValidator
from ._showlegend import ShowlegendValidator
from ._selectedpoints import SelectedpointsValidator
from ._rangefont import RangefontValidator
from ._opacity import OpacityVa... | 39.913043 | 52 | 0.880174 |
794c46a3720ec42f2fe095b8f72c1a6b39a59295 | 1,057 | py | Python | azure-mgmt-network/azure/mgmt/network/v2019_02_01/models/peer_express_route_circuit_connection_paged.py | xiafu-msft/azure-sdk-for-python | 4d9560cfd519ee60667f3cc2f5295a58c18625db | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | azure-mgmt-network/azure/mgmt/network/v2019_02_01/models/peer_express_route_circuit_connection_paged.py | xiafu-msft/azure-sdk-for-python | 4d9560cfd519ee60667f3cc2f5295a58c18625db | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-mgmt-network/azure/mgmt/network/v2019_02_01/models/peer_express_route_circuit_connection_paged.py | xiafu-msft/azure-sdk-for-python | 4d9560cfd519ee60667f3cc2f5295a58c18625db | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 37.75 | 175 | 0.622517 |
794c48bc3d30e6b3779e5a5a1afbbac23a84e700 | 7,433 | py | Python | src/util.py | jtwaleson/serverless-slack-quotes-bot | a97937977e7f050eda9e8fad9f2d4e982cc0c26a | [
"MIT"
] | 2 | 2020-06-21T13:05:48.000Z | 2020-06-21T19:53:04.000Z | src/util.py | jtwaleson/serverless-slack-quotes-bot | a97937977e7f050eda9e8fad9f2d4e982cc0c26a | [
"MIT"
] | null | null | null | src/util.py | jtwaleson/serverless-slack-quotes-bot | a97937977e7f050eda9e8fad9f2d4e982cc0c26a | [
"MIT"
] | null | null | null | import base64
import boto3
import hashlib
import hmac
import os
import requests
import time
try:
SLACK_SIGNING_SECRET = os.environ["SLACK_SIGNING_SECRET"]
except KeyError:
raise Exception(
"Set SLACK_SIGNING_SECRET as an environment variable. "
"You can find this on the Slack 'App Settings' und... | 29.14902 | 85 | 0.593973 |
794c48e06d03025e6627347b1e502910817f3d08 | 37,392 | py | Python | src/sage/manifolds/point.py | LaisRast/sage | 5fb2a6ea44400e469caee82748cf863ca0c5f724 | [
"BSL-1.0"
] | null | null | null | src/sage/manifolds/point.py | LaisRast/sage | 5fb2a6ea44400e469caee82748cf863ca0c5f724 | [
"BSL-1.0"
] | null | null | null | src/sage/manifolds/point.py | LaisRast/sage | 5fb2a6ea44400e469caee82748cf863ca0c5f724 | [
"BSL-1.0"
] | null | null | null | r"""
Points of Topological Manifolds
The class :class:`ManifoldPoint` implements points of a
topological manifold.
A :class:`ManifoldPoint` object can have coordinates in
various charts defined on the manifold. Two points are declared
equal if they have the same coordinates in the same chart.
AUTHORS:
- Eric Gourgo... | 37.466934 | 117 | 0.527091 |
794c49e60fe9ac11ab32091da47d6c97c2072eb2 | 265 | py | Python | utils/file-tester/tests/__init__.py | stephenfuqua/Ed-Fi-X-Fizz | 94597eda585d4f62f69c12e2a58fa8e8846db11b | [
"Apache-2.0"
] | 3 | 2020-10-15T10:29:59.000Z | 2020-12-01T21:40:55.000Z | utils/file-tester/tests/__init__.py | stephenfuqua/Ed-Fi-X-Fizz | 94597eda585d4f62f69c12e2a58fa8e8846db11b | [
"Apache-2.0"
] | 40 | 2020-08-17T21:08:33.000Z | 2021-02-02T19:56:09.000Z | utils/file-tester/tests/__init__.py | stephenfuqua/Ed-Fi-X-Fizz | 94597eda585d4f62f69c12e2a58fa8e8846db11b | [
"Apache-2.0"
] | 10 | 2021-06-10T16:27:27.000Z | 2021-12-27T12:31:57.000Z | # SPDX-License-Identifier: Apache-2.0
# Licensed to the Ed-Fi Alliance under one or more agreements.
# The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0.
# See the LICENSE and NOTICES files in the project root for more information.
| 53 | 85 | 0.777358 |
794c4bc95b34104b3942c43908ac63e842eb2ef7 | 3,971 | py | Python | tensorflow_gan/examples/mnist/data_provider_test.py | sanidhyamangal/gan | 540ab76c04b5ad80cefa068e0f349b80ea4decb1 | [
"Apache-2.0"
] | 1 | 2022-01-05T11:48:21.000Z | 2022-01-05T11:48:21.000Z | tensorflow_gan/examples/mnist/data_provider_test.py | HabibMrad/gan-1 | 6a2bf12f968d0a913e8040121edc8bb6e0680a08 | [
"Apache-2.0"
] | 1 | 2021-02-24T00:51:29.000Z | 2021-02-24T00:51:29.000Z | tensorflow_gan/examples/mnist/data_provider_test.py | HabibMrad/gan-1 | 6a2bf12f968d0a913e8040121edc8bb6e0680a08 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2020 The TensorFlow GAN 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 applicabl... | 34.530435 | 77 | 0.709393 |
794c4bf962d6f2cbc52027178b58848d481f3719 | 12,930 | py | Python | modules/networks.py | vliu15/munit | 5789d96590519d729f89c9501eba7692fa7054ef | [
"MIT"
] | 3 | 2021-03-04T01:48:03.000Z | 2021-12-16T06:55:10.000Z | modules/networks.py | vliu15/munit | 5789d96590519d729f89c9501eba7692fa7054ef | [
"MIT"
] | null | null | null | modules/networks.py | vliu15/munit | 5789d96590519d729f89c9501eba7692fa7054ef | [
"MIT"
] | null | null | null | # The MIT License
#
# Copyright (c) 2020 Vincent Liu
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, mer... | 33.324742 | 154 | 0.594509 |
794c4c555392f069064fb3b88f959e69ff233e1d | 31,434 | py | Python | detest/testlink_import/models.py | tahpee/detest | 9cf3a434ee17d4867e8cc49bc501ae0f29535f59 | [
"MIT"
] | null | null | null | detest/testlink_import/models.py | tahpee/detest | 9cf3a434ee17d4867e8cc49bc501ae0f29535f59 | [
"MIT"
] | null | null | null | detest/testlink_import/models.py | tahpee/detest | 9cf3a434ee17d4867e8cc49bc501ae0f29535f59 | [
"MIT"
] | null | null | null | from django.db import models
# Create your models here.
# TestLink Open Source Project - http://testlink.sourceforge.net/
# This script is distributed under the GNU General Public License 2 or later.
# ---------------------------------------------------------------------------------------
# @filesource testlink_creat... | 43.297521 | 168 | 0.683114 |
794c4cd95e60816eb37e9336d7f94b3442db6abf | 7,437 | py | Python | unit-tests/py/rspy/acroname.py | Moktarino/librealsense | fdd863f30b9e71d1c34f226aa0e62659ddb46dbb | [
"Apache-2.0"
] | 6,457 | 2016-01-21T03:56:07.000Z | 2022-03-31T11:57:15.000Z | unit-tests/py/rspy/acroname.py | Moktarino/librealsense | fdd863f30b9e71d1c34f226aa0e62659ddb46dbb | [
"Apache-2.0"
] | 8,393 | 2016-01-21T09:47:28.000Z | 2022-03-31T22:21:42.000Z | unit-tests/py/rspy/acroname.py | Moktarino/librealsense | fdd863f30b9e71d1c34f226aa0e62659ddb46dbb | [
"Apache-2.0"
] | 4,874 | 2016-01-21T09:20:08.000Z | 2022-03-31T15:18:00.000Z | """
Brainstem Acroname Hub
See documentation for brainstem here:
https://acroname.com/reference/python/index.html
"""
from rspy import log
if __name__ == '__main__':
import os, sys, getopt
def usage():
ourname = os.path.basename( sys.argv[0] )
print( 'Syntax: acroname [options]' )
pr... | 26.003497 | 97 | 0.573081 |
794c4d210b5bb5a185568c24775e111286c347b0 | 19,878 | py | Python | rudolph/pipelines.py | WildGenie/ru-dolph | c80a320a60dcb60ccb66b86c3421e16e33235d97 | [
"Apache-2.0"
] | null | null | null | rudolph/pipelines.py | WildGenie/ru-dolph | c80a320a60dcb60ccb66b86c3421e16e33235d97 | [
"Apache-2.0"
] | null | null | null | rudolph/pipelines.py | WildGenie/ru-dolph | c80a320a60dcb60ccb66b86c3421e16e33235d97 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import os
from glob import glob
from os.path import join
from datetime import datetime
import torch
import torchvision
import transformers
import more_itertools
import numpy as np
import torch.nn.functional as F
import matplotlib.pyplot as plt
import torchvision.transforms as T
from tqdm.auto i... | 38.374517 | 117 | 0.596237 |
794c4df286d489cb639298346e39553f3b57e99d | 12,905 | py | Python | ozopython/compiler.py | malakhajji565/Ozobot-Python | 97ff7324039b0402fcdc4cd1c9ad05eddc5735ac | [
"MIT"
] | 32 | 2017-04-09T07:10:40.000Z | 2022-03-08T08:09:34.000Z | ozopython/compiler.py | malakhajji565/Ozobot-Python | 97ff7324039b0402fcdc4cd1c9ad05eddc5735ac | [
"MIT"
] | 1 | 2017-12-20T16:58:53.000Z | 2018-02-09T15:26:44.000Z | ozopython/compiler.py | malakhajji565/Ozobot-Python | 97ff7324039b0402fcdc4cd1c9ad05eddc5735ac | [
"MIT"
] | 10 | 2017-04-09T19:02:19.000Z | 2022-03-22T20:58:19.000Z | from ast import *
builtins = [
'color',
'wait',
'move',
'rotate',
'wheels',
'random',
'get_surface_color',
'terminate',
'abs',
'follow_line_to_intersect_or_end',
'set_line_speed',
'pick_direction',
'move_straight_until_line',
'there_is_way',
'get_line_speed',... | 30.293427 | 204 | 0.556993 |
794c4eb95167cc71f893220c2568a77c6729699e | 6,947 | py | Python | FictionTools/amitools/amitools/rom/rombuilder.py | polluks/Puddle-BuildTools | c1762d53a33002b62d8cffe3db129505a387bec3 | [
"BSD-2-Clause"
] | 38 | 2021-06-18T12:56:15.000Z | 2022-03-12T20:38:40.000Z | FictionTools/amitools/amitools/rom/rombuilder.py | polluks/Puddle-BuildTools | c1762d53a33002b62d8cffe3db129505a387bec3 | [
"BSD-2-Clause"
] | 2 | 2021-06-20T16:28:12.000Z | 2021-11-17T21:33:56.000Z | FictionTools/amitools/amitools/rom/rombuilder.py | polluks/Puddle-BuildTools | c1762d53a33002b62d8cffe3db129505a387bec3 | [
"BSD-2-Clause"
] | 6 | 2021-06-18T18:18:36.000Z | 2021-12-22T08:01:32.000Z | import os
import struct
from amitools.binfmt.Relocate import Relocate
from .kickrom import KickRomAccess
class RomEntryRaw:
def __init__(self, name, data, relocs=None):
self.name = name
self.data = data
self.relocs = relocs
def get_size(self):
return len(self.data)
def g... | 29.312236 | 84 | 0.582842 |
794c4f071d19ac38842117582aa6e29c0ca4b406 | 4,622 | py | Python | theano/misc/tests/test_pycuda_example.py | royxue/Theano | 626104a8c2b16898d270dc99e16a3ddb4a74678e | [
"BSD-3-Clause"
] | 2 | 2015-01-20T04:53:37.000Z | 2015-01-20T04:53:40.000Z | theano/misc/tests/test_pycuda_example.py | RoyXue/Theano | 626104a8c2b16898d270dc99e16a3ddb4a74678e | [
"BSD-3-Clause"
] | null | null | null | theano/misc/tests/test_pycuda_example.py | RoyXue/Theano | 626104a8c2b16898d270dc99e16a3ddb4a74678e | [
"BSD-3-Clause"
] | null | null | null | import numpy
import theano
import theano.misc.pycuda_init
if not theano.misc.pycuda_init.pycuda_available:
from nose.plugins.skip import SkipTest
raise SkipTest("Pycuda not installed. Skip test of theano op"
" with pycuda code.")
import theano.sandbox.cuda as cuda_ndarray
if not cuda_ndarr... | 42.796296 | 78 | 0.606015 |
794c4f537cf89372fd0a5148b01966fa709bd7a9 | 17,148 | py | Python | titan_client/models/entities_schema_links_reports.py | intel471/titan-client-python | b12a2bc73604cf1a7cb0b6e97c81b5af9dee7bfe | [
"MIT"
] | 2 | 2021-08-23T08:41:44.000Z | 2021-08-29T15:09:27.000Z | titan_client/models/entities_schema_links_reports.py | intel471/titan-client-python | b12a2bc73604cf1a7cb0b6e97c81b5af9dee7bfe | [
"MIT"
] | 1 | 2021-09-16T18:12:22.000Z | 2021-09-22T16:12:11.000Z | titan_client/models/entities_schema_links_reports.py | intel471/titan-client-python | b12a2bc73604cf1a7cb0b6e97c81b5af9dee7bfe | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Titan API v1
# Introduction The Intel 471 API is organized around the principles of REST. Our API lets you gather results from our platform with anything that can send a HTTP request, including cURL and modern internet browsers. Access to this API requires an API token which is managed fro... | 50.884273 | 5,526 | 0.677922 |
794c4f9d605bf60f4d8ab3fde40dc8279e56fc47 | 37,098 | py | Python | prophyc/tests/test_model.py | florczakraf/prophy | a42a6151a77b31afa05300fc2e1f52cc15a298cf | [
"MIT"
] | 14 | 2015-02-19T22:00:37.000Z | 2020-11-30T03:03:55.000Z | prophyc/tests/test_model.py | florczakraf/prophy | a42a6151a77b31afa05300fc2e1f52cc15a298cf | [
"MIT"
] | 31 | 2015-06-22T11:11:10.000Z | 2021-05-12T06:35:47.000Z | prophyc/tests/test_model.py | florczakraf/prophy | a42a6151a77b31afa05300fc2e1f52cc15a298cf | [
"MIT"
] | 16 | 2015-06-12T06:48:06.000Z | 2019-11-26T22:48:13.000Z | # -*- coding: utf-8 -*-
import pytest
import prophyc # noqa
from prophyc import model
def test_node_eq():
a = model.Enum("name", [], "docstr 1")
b = model.Enum("name", [], "docstr 2")
c = model.Struct("name", [], "docstr 3")
assert a == b
assert a != c
def assert_repr_reproduces(object_):
... | 29.073668 | 112 | 0.548224 |
794c4fa9a81056eab6917bf11dced2d861f046e3 | 410 | py | Python | pydantic_models.py | OmarThinks/flask_encryption_endpoint | f101b2ff313c0dc076d03175740165f8789cd600 | [
"MIT"
] | null | null | null | pydantic_models.py | OmarThinks/flask_encryption_endpoint | f101b2ff313c0dc076d03175740165f8789cd600 | [
"MIT"
] | null | null | null | pydantic_models.py | OmarThinks/flask_encryption_endpoint | f101b2ff313c0dc076d03175740165f8789cd600 | [
"MIT"
] | null | null | null | from pydantic import BaseModel, constr
message_constraint = constr(max_length=1000000000000)
original_constraint = constr(max_length=1000000)
passphrase_constraint = constr(min_length=2, max_length=10000)
class DecryptionInputs(BaseModel):
message : str
passphrase : passphrase_constraint
class EncryptionIn... | 21.578947 | 62 | 0.814634 |
794c501f4fef74a25da03344c253abe288192edb | 1,347 | py | Python | platypush/message/event/stt.py | RichardChiang/platypush | 1777ebb0516118cdef20046a92caab496fa7c6cb | [
"MIT"
] | 228 | 2018-01-30T11:17:09.000Z | 2022-03-24T11:22:26.000Z | platypush/message/event/stt.py | RichardChiang/platypush | 1777ebb0516118cdef20046a92caab496fa7c6cb | [
"MIT"
] | 167 | 2017-12-11T19:35:38.000Z | 2022-03-27T14:45:30.000Z | platypush/message/event/stt.py | BlackLight/runbullet | 8d26c8634d2677b4402f0a21b9ab8244b44640db | [
"MIT"
] | 16 | 2018-05-03T07:31:56.000Z | 2021-12-05T19:27:37.000Z | from platypush.message.event import Event
class SttEvent(Event):
""" Base class for speech-to-text events """
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
class SpeechStartedEvent(SttEvent):
"""
Event triggered when speech starts being detected.
"""
pass
c... | 21.725806 | 64 | 0.637713 |
794c51a8d6a944a91c636ecc1d2871a104aba607 | 551 | py | Python | Password/Password.py | Amirkhaksar/QueraQuestion | 1042aef6a04cc798b0ed2847124ea1a45a007c47 | [
"BSD-3-Clause"
] | null | null | null | Password/Password.py | Amirkhaksar/QueraQuestion | 1042aef6a04cc798b0ed2847124ea1a45a007c47 | [
"BSD-3-Clause"
] | null | null | null | Password/Password.py | Amirkhaksar/QueraQuestion | 1042aef6a04cc798b0ed2847124ea1a45a007c47 | [
"BSD-3-Clause"
] | null | null | null | '''
Language: python
ID: 17902
QLink: https://quera.org/problemset/17902/
Author: AmirZoyber
'''
import collections
k = int(input())
passw = [int(a) for a in input()]
l=[];c=0
for i in range(k):
l.append([int(a) for a in input()])
for i in range(len(l)):
a_list = collections.deque(l[i])
if (l[i].index(passw... | 22.958333 | 42 | 0.555354 |
794c52107fc12982da3927bbf59d01daf079bb50 | 23,242 | py | Python | tensorflow/python/kernel_tests/random/stateless_random_ops_test.py | KosingZhu/tensorflow | 7ac2521a4e609ddef0f0ea3ffc2e76102da934d7 | [
"Apache-2.0"
] | 190,993 | 2015-11-09T13:17:30.000Z | 2022-03-31T23:05:27.000Z | tensorflow/python/kernel_tests/random/stateless_random_ops_test.py | govl-psb/tensorflow-1 | 60028072a1c3b4376e145b6fea8e4ccd3324377f | [
"Apache-2.0"
] | 48,461 | 2015-11-09T14:21:11.000Z | 2022-03-31T23:17:33.000Z | tensorflow/python/kernel_tests/random/stateless_random_ops_test.py | govl-psb/tensorflow-1 | 60028072a1c3b4376e145b6fea8e4ccd3324377f | [
"Apache-2.0"
] | 104,981 | 2015-11-09T13:40:17.000Z | 2022-03-31T19:51:54.000Z | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 43.770245 | 116 | 0.669478 |
794c524666831f2334fb52291a73ddc62f4e66b2 | 1,560 | py | Python | wham/apis/instagram/models.py | PaulWay/django-wham | ee76d57e1f85e0bcefbb7a844539e4bb3bb68b1c | [
"MIT"
] | 101 | 2015-01-30T00:59:02.000Z | 2021-03-28T20:29:09.000Z | wham/apis/instagram/models.py | PaulWay/django-wham | ee76d57e1f85e0bcefbb7a844539e4bb3bb68b1c | [
"MIT"
] | 6 | 2015-02-23T06:17:21.000Z | 2021-06-10T19:40:41.000Z | wham/apis/instagram/models.py | PaulWay/django-wham | ee76d57e1f85e0bcefbb7a844539e4bb3bb68b1c | [
"MIT"
] | 18 | 2015-02-23T05:42:34.000Z | 2021-02-03T16:21:02.000Z | from django.db import models
# https://api.instagram.com/v1/tags/djangocon/media/recent?client_id=c3cdcbff22f649f1a08bedf12be1ca86
from django.db import models
from wham.fields import WhamCharField, WhamManyToManyField, WhamImageUrlField
from wham.models import WhamModel
class InstagramMeta:
base_url = 'https:... | 27.368421 | 101 | 0.683974 |
794c5295f3cd97e5e8b257d51fbdc04bffee82d6 | 9,346 | py | Python | sdk/python/pulumi_azure_native/apimanagement/v20170301/tag.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/apimanagement/v20170301/tag.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/apimanagement/v20170301/tag.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # 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, overload
from ... import _utilities
__... | 45.149758 | 1,315 | 0.652793 |
794c53acdeada557fdb53999ee592bbaa1698308 | 50,282 | py | Python | tensorflow/python/distribute/tpu_strategy_test.py | ashutom/tensorflow-upstream | c16069c19de9e286dd664abb78d0ea421e9f32d4 | [
"Apache-2.0"
] | 8 | 2021-08-03T03:57:10.000Z | 2021-12-13T01:19:02.000Z | tensorflow/python/distribute/tpu_strategy_test.py | ashutom/tensorflow-upstream | c16069c19de9e286dd664abb78d0ea421e9f32d4 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/distribute/tpu_strategy_test.py | ashutom/tensorflow-upstream | c16069c19de9e286dd664abb78d0ea421e9f32d4 | [
"Apache-2.0"
] | 1 | 2019-11-01T05:38:49.000Z | 2019-11-01T05:38:49.000Z | # Copyright 2018 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... | 34.918056 | 100 | 0.697784 |
794c549b74d8f857609565884071d79da4f1342f | 6,512 | py | Python | addons14/project_timesheet_time_control/wizards/hr_timesheet_switch.py | odoochain/addons_oca | 55d456d798aebe16e49b4a6070765f206a8885ca | [
"MIT"
] | 1 | 2021-06-10T14:59:13.000Z | 2021-06-10T14:59:13.000Z | addons14/project_timesheet_time_control/wizards/hr_timesheet_switch.py | odoochain/addons_oca | 55d456d798aebe16e49b4a6070765f206a8885ca | [
"MIT"
] | null | null | null | addons14/project_timesheet_time_control/wizards/hr_timesheet_switch.py | odoochain/addons_oca | 55d456d798aebe16e49b4a6070765f206a8885ca | [
"MIT"
] | 1 | 2021-04-09T09:44:44.000Z | 2021-04-09T09:44:44.000Z | # Copyright 2019 Tecnativa - Jairo Llopis
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
from odoo.exceptions import UserError
class HrTimesheetSwitch(models.TransientModel):
_name = "hr.timesheet.switch"
_inherit = "account.analytic.line"
_descri... | 38.994012 | 83 | 0.565418 |
794c54c969fc1f854789e081caef8e7655f187e6 | 1,420 | py | Python | scripts/Load_PRODUCT_DIM.py | shauwang/aws-glue-workshop | af28372902fc2173a57f220152bfacc5ceeb8bb1 | [
"Apache-2.0"
] | 25 | 2020-05-27T02:58:42.000Z | 2021-12-19T23:19:06.000Z | scripts/Load_PRODUCT_DIM.py | shauwang/aws-glue-workshop | af28372902fc2173a57f220152bfacc5ceeb8bb1 | [
"Apache-2.0"
] | 5 | 2021-01-19T02:45:17.000Z | 2022-02-13T23:23:50.000Z | scripts/Load_PRODUCT_DIM.py | shauwang/aws-glue-workshop | af28372902fc2173a57f220152bfacc5ceeb8bb1 | [
"Apache-2.0"
] | 28 | 2020-06-23T14:32:02.000Z | 2022-01-23T07:36:43.000Z | ##
## Glue Job : TKO_Load_Product_Dim.py
##
## Glue boilerplate code
import sys
from awsglue.transforms import *
from awsglue.utils import getResolvedOptions
from pyspark.context import SparkContext
from awsglue.context import GlueContext
from awsglue.job import Job
import boto3, json
args = getResolvedOptions(sys.a... | 30.212766 | 156 | 0.773944 |
794c55fc5fc9f44e397c9ca96762aca5939c8e32 | 7,484 | py | Python | salt/returners/slack_returner.py | aletourneau/salt | d7013a2f64eb4b79592220d76274bc5dde609e08 | [
"Apache-2.0"
] | 1 | 2020-10-02T02:29:25.000Z | 2020-10-02T02:29:25.000Z | salt/returners/slack_returner.py | aletourneau/salt | d7013a2f64eb4b79592220d76274bc5dde609e08 | [
"Apache-2.0"
] | null | null | null | salt/returners/slack_returner.py | aletourneau/salt | d7013a2f64eb4b79592220d76274bc5dde609e08 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Return salt data via slack
.. versionadded:: Lithium
The following fields can be set in the minion conf file::
slack.channel (required)
slack.api_key (required)
slack.from_name (required)
slack.profile (optional)
Alternative configuration values can be used by prefacing t... | 27.718519 | 101 | 0.548904 |
794c56d4c4433f30309b8d7b4fae60ad3839fc4c | 21,071 | py | Python | check_cuda/controllers.py | vtpl1/check_cuda | b519877456b46ab4bbd4b4fb3ab3a4ccbd38def1 | [
"MIT"
] | null | null | null | check_cuda/controllers.py | vtpl1/check_cuda | b519877456b46ab4bbd4b4fb3ab3a4ccbd38def1 | [
"MIT"
] | null | null | null | check_cuda/controllers.py | vtpl1/check_cuda | b519877456b46ab4bbd4b4fb3ab3a4ccbd38def1 | [
"MIT"
] | null | null | null | import ctypes
import logging
import os
import platform
from typing import Dict, List, Union
import psutil
import pynvml as N
from cpuinfo import get_cpu_info
from singleton_decorator.decorator import singleton
import yaml
from .models import (ChannelAndNnModel, CpuInfo, CpuStatus, GpuInfo, GpuStatus, ModelCount, NnMo... | 41.724752 | 169 | 0.557686 |
794c576f792f8301f9625e49cee825382ba1bfd3 | 3,715 | py | Python | spredsheet_qt.py | riiy/learn_python | f087ff3d504bf7d73d1d45f56eafd6de5ec9b661 | [
"Apache-2.0"
] | 1 | 2017-05-02T10:34:01.000Z | 2017-05-02T10:34:01.000Z | spredsheet_qt.py | congminghaoxue/learn_python | f087ff3d504bf7d73d1d45f56eafd6de5ec9b661 | [
"Apache-2.0"
] | null | null | null | spredsheet_qt.py | congminghaoxue/learn_python | f087ff3d504bf7d73d1d45f56eafd6de5ec9b661 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import re
import sys
from collections import ChainMap
import math
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import (QApplication, QMainWindow, QTableWidget,
QTableWidgetItem, QItemDelegate, QLineEdit)
cellre = re.compile(r'\b[A-Z][0-9]\b')
def cellname(i, ... | 28.143939 | 74 | 0.625034 |
794c578d6bd3227e03869efe7e0a01075c44ce5d | 73,133 | py | Python | nova/tests/test_quota.py | 781778304/nova | 05aff1959c9f94dae095635133386418390efb37 | [
"Apache-2.0"
] | null | null | null | nova/tests/test_quota.py | 781778304/nova | 05aff1959c9f94dae095635133386418390efb37 | [
"Apache-2.0"
] | null | null | null | nova/tests/test_quota.py | 781778304/nova | 05aff1959c9f94dae095635133386418390efb37 | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compli... | 38.289529 | 79 | 0.521994 |
794c57cec824ac193511be8b15418c2a80267b82 | 18,868 | py | Python | tests/test_implementations/api_test/test_delete_many_api.py | fossabot/FastAPIQuickCRUD | 69226ec9959dfed41fdfe69f59d8c622bd3726fb | [
"MIT"
] | null | null | null | tests/test_implementations/api_test/test_delete_many_api.py | fossabot/FastAPIQuickCRUD | 69226ec9959dfed41fdfe69f59d8c622bd3726fb | [
"MIT"
] | null | null | null | tests/test_implementations/api_test/test_delete_many_api.py | fossabot/FastAPIQuickCRUD | 69226ec9959dfed41fdfe69f59d8c622bd3726fb | [
"MIT"
] | null | null | null | import json
from collections import OrderedDict
from starlette.testclient import TestClient
from src.fastapi_quickcrud import sqlalchemy_to_pydantic
from src.fastapi_quickcrud.crud_router import crud_router_builder
from src.fastapi_quickcrud.crud_router import CrudService
from src.fastapi_quickcrud.misc.type import Cr... | 49.783641 | 138 | 0.614374 |
794c57ea3bdc512efedfbfa8e36d3a18f6a6d484 | 50,260 | py | Python | core/agents/acer_single_process.py | R3NI3/pytorch-rl | 20b3b738ca400b1916197f27a91367878b09803c | [
"MIT"
] | 851 | 2017-04-09T19:01:27.000Z | 2022-03-30T17:57:01.000Z | core/agents/acer_single_process.py | R3NI3/pytorch-rl | 20b3b738ca400b1916197f27a91367878b09803c | [
"MIT"
] | 10 | 2017-05-12T14:15:54.000Z | 2020-09-24T12:30:42.000Z | core/agents/acer_single_process.py | R3NI3/pytorch-rl | 20b3b738ca400b1916197f27a91367878b09803c | [
"MIT"
] | 161 | 2017-04-12T16:11:30.000Z | 2022-01-12T07:55:46.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
import random
import time
import math
import torch
from torch.autograd import Variable, grad, backward
import torch.nn.functional as F
from utils.helpers import ACER_On_Policy_Experience
from... | 60.995146 | 234 | 0.635177 |
794c589b8a28e633c4e9ee80e045b9811ab02773 | 18,069 | py | Python | pywikibot/comms/http.py | Partlo/RoboCade | 89c49b3f793b96aeb9e75672fd150872eb52aa11 | [
"MIT"
] | null | null | null | pywikibot/comms/http.py | Partlo/RoboCade | 89c49b3f793b96aeb9e75672fd150872eb52aa11 | [
"MIT"
] | null | null | null | pywikibot/comms/http.py | Partlo/RoboCade | 89c49b3f793b96aeb9e75672fd150872eb52aa11 | [
"MIT"
] | null | null | null | """
Basic HTTP access interface.
This module handles communication between the bot and the HTTP threads.
This module is responsible for
- Setting up a connection pool
- Providing a (blocking) interface for HTTP requests
- Translate site objects with query strings into URLs
- URL-encoding all ... | 35.153696 | 80 | 0.643478 |
794c591674ac127c841213bf2df626ae02933e05 | 41,964 | py | Python | pylib/cqlshlib/test/test_cqlsh_completion.py | jeffreyflukman/cassandra | d26f142b34681d047fe010c8ec9097add0b44d2a | [
"Apache-2.0"
] | 1 | 2018-09-20T16:17:29.000Z | 2018-09-20T16:17:29.000Z | pylib/cqlshlib/test/test_cqlsh_completion.py | jeffreyflukman/cassandra | d26f142b34681d047fe010c8ec9097add0b44d2a | [
"Apache-2.0"
] | null | null | null | pylib/cqlshlib/test/test_cqlsh_completion.py | jeffreyflukman/cassandra | d26f142b34681d047fe010c8ec9097add0b44d2a | [
"Apache-2.0"
] | null | null | null | # 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... | 52.259029 | 119 | 0.509151 |
794c5920c867bb2a19f24184f5d218d7b12a4b8a | 463 | py | Python | data/scripts/templates/object/draft_schematic/chemistry/shared_medpack_wound_strength_c.py | obi-two/GameServer | 7d37024e2291a97d49522610cd8f1dbe5666afc2 | [
"MIT"
] | 20 | 2015-02-23T15:11:56.000Z | 2022-03-18T20:56:48.000Z | data/scripts/templates/object/draft_schematic/chemistry/shared_medpack_wound_strength_c.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | null | null | null | data/scripts/templates/object/draft_schematic/chemistry/shared_medpack_wound_strength_c.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | 20 | 2015-04-04T16:35:59.000Z | 2022-03-24T14:54:37.000Z | #### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Intangible()
result.template = "object/draft_schematic/chemistry/shared_medpack_wound_strength_c.iff"
result.attr... | 27.235294 | 89 | 0.736501 |
794c5978eec62d1314599c70b192749497444e67 | 8,968 | py | Python | satchmo/apps/product/modules/custom/migrations/0002_update_contenttypes.py | funwhilelost/satchmo | 589a5d797533ea15dfde9af7f36e304092d22a94 | [
"BSD-3-Clause"
] | 1 | 2020-04-23T10:32:05.000Z | 2020-04-23T10:32:05.000Z | satchmo/apps/product/modules/custom/migrations/0002_update_contenttypes.py | funwhilelost/satchmo | 589a5d797533ea15dfde9af7f36e304092d22a94 | [
"BSD-3-Clause"
] | null | null | null | satchmo/apps/product/modules/custom/migrations/0002_update_contenttypes.py | funwhilelost/satchmo | 589a5d797533ea15dfde9af7f36e304092d22a94 | [
"BSD-3-Clause"
] | 1 | 2020-04-23T10:32:11.000Z | 2020-04-23T10:32:11.000Z | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models
from product.migrations import UpdateContentTypeMigration
class Migration(UpdateContentTypeMigration):
_app_label = 'custom'
depends_on = (
('product', '0011_split_products'),
... | 78.666667 | 198 | 0.562556 |
794c59fb0c14d93bd8f7e64d2b510711d33d98b8 | 2,032 | py | Python | odk_aggregation_tool/gui/utils.py | lindsay-stevens/odk_aggregation_tool | 8f02a8cf7b11fba89a519e025d25c2dbf7f83b06 | [
"MIT"
] | null | null | null | odk_aggregation_tool/gui/utils.py | lindsay-stevens/odk_aggregation_tool | 8f02a8cf7b11fba89a519e025d25c2dbf7f83b06 | [
"MIT"
] | null | null | null | odk_aggregation_tool/gui/utils.py | lindsay-stevens/odk_aggregation_tool | 8f02a8cf7b11fba89a519e025d25c2dbf7f83b06 | [
"MIT"
] | null | null | null | import os
WRAP_CHARS = "\" \r\n\t"
def not_empty(variable_name, path):
if len(path) == 0:
valid = False
msg = "{0} is empty. Please either:\n" \
"- Enter the path, or\n" \
"- Select the path using the 'Browse...' button."
msg = msg.format(variable_name)
els... | 27.459459 | 75 | 0.609744 |
794c5b8bab11f92474615cce40bb701e69b55f9f | 1,902 | py | Python | tensorflow/contrib/summary/summary_test_util.py | yasunakacho/tensorflow | cf36c3fdefda3c874cd8cebb779744c5035bb435 | [
"Apache-2.0"
] | null | null | null | tensorflow/contrib/summary/summary_test_util.py | yasunakacho/tensorflow | cf36c3fdefda3c874cd8cebb779744c5035bb435 | [
"Apache-2.0"
] | null | null | null | tensorflow/contrib/summary/summary_test_util.py | yasunakacho/tensorflow | cf36c3fdefda3c874cd8cebb779744c5035bb435 | [
"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... | 30.190476 | 80 | 0.715563 |
794c5ccbf02c148f987e2682df813674b8f27779 | 7,943 | py | Python | models/modules.py | nikhilsu/Mixed-modal-learning | 4e18877cd010665324d46885530e81226cfc1821 | [
"MIT"
] | null | null | null | models/modules.py | nikhilsu/Mixed-modal-learning | 4e18877cd010665324d46885530e81226cfc1821 | [
"MIT"
] | null | null | null | models/modules.py | nikhilsu/Mixed-modal-learning | 4e18877cd010665324d46885530e81226cfc1821 | [
"MIT"
] | null | null | null | import tensorflow as tf
import numpy as np
import time
from tensorflow.contrib.rnn import GRUCell
from util.infolog import log
def prenet(inputs, is_training, layer_sizes, scope=None):
x = inputs
drop_rate = 0.5 if is_training else 0.0
with tf.variable_scope(scope or 'prenet'):
for i, size in enu... | 34.534783 | 108 | 0.605187 |
794c5cdfa250b8fe50f6e12fe65941dbb958c50c | 6,421 | py | Python | lib/services/server/ncloud_server/model/stop_server_instances_response.py | NaverCloudPlatform/ncloud-sdk-python | 5976dfabd205c615fcf57ac2f0ab67313ee6953c | [
"MIT"
] | 12 | 2018-11-20T04:30:49.000Z | 2021-11-09T12:34:26.000Z | lib/services/server/ncloud_server/model/stop_server_instances_response.py | NaverCloudPlatform/ncloud-sdk-python | 5976dfabd205c615fcf57ac2f0ab67313ee6953c | [
"MIT"
] | 1 | 2019-01-24T15:56:15.000Z | 2019-05-31T07:56:55.000Z | lib/services/server/ncloud_server/model/stop_server_instances_response.py | NaverCloudPlatform/ncloud-sdk-python | 5976dfabd205c615fcf57ac2f0ab67313ee6953c | [
"MIT"
] | 6 | 2018-06-29T03:45:50.000Z | 2022-03-18T01:51:45.000Z | # coding: utf-8
"""
server
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from ncloud_server.model.server_instance import ServerInstance # noqa: F401,E501
class StopServerInstancesResponse(object):
"""NOTE: This class is au... | 29.726852 | 137 | 0.62389 |
794c5cfc8345aff5dd102eae8c6a5fce80f563f5 | 2,072 | py | Python | setup.py | mlodic/client-python | bd312c29744449919c422ea24c4ee409434b3a14 | [
"Apache-2.0"
] | 42 | 2019-06-26T19:07:26.000Z | 2022-03-24T00:44:53.000Z | setup.py | mlodic/client-python | bd312c29744449919c422ea24c4ee409434b3a14 | [
"Apache-2.0"
] | 178 | 2019-06-23T23:04:04.000Z | 2022-03-30T18:26:38.000Z | setup.py | mlodic/client-python | bd312c29744449919c422ea24c4ee409434b3a14 | [
"Apache-2.0"
] | 55 | 2019-07-11T17:16:34.000Z | 2022-03-30T16:33:26.000Z | #!/usr/bin/python3
# coding: utf-8
import os
import pathlib
import sys
from setuptools import setup
from setuptools.command.install import install
VERSION = "5.1.3"
HERE = pathlib.Path(__file__).parent
README = (HERE / "README.md").read_text()
# Get requirements from files
requirements = (HERE / "requirements.txt")... | 31.393939 | 88 | 0.647201 |
794c5e394d88cbda10902153f4691fbc062458c3 | 28 | py | Python | tests/__init__.py | fabaff/python-iceportal | 8c722606ab3fdc6b4687927b02fcc4e1038fb00d | [
"MIT"
] | 1 | 2019-12-26T18:36:54.000Z | 2019-12-26T18:36:54.000Z | tests/__init__.py | fabaff/python-iceportal | 8c722606ab3fdc6b4687927b02fcc4e1038fb00d | [
"MIT"
] | null | null | null | tests/__init__.py | fabaff/python-iceportal | 8c722606ab3fdc6b4687927b02fcc4e1038fb00d | [
"MIT"
] | null | null | null | """Tests for the client."""
| 14 | 27 | 0.607143 |
794c5fac2975efb116bf195f23b55fbdedd53ba0 | 7,505 | py | Python | src/datadog_api_client/v2/model/security_monitoring_signal_attributes.py | MichaelTROEHLER/datadog-api-client-python | 12c46626622fb1277bb1e172753b342c671348bd | [
"Apache-2.0"
] | null | null | null | src/datadog_api_client/v2/model/security_monitoring_signal_attributes.py | MichaelTROEHLER/datadog-api-client-python | 12c46626622fb1277bb1e172753b342c671348bd | [
"Apache-2.0"
] | null | null | null | src/datadog_api_client/v2/model/security_monitoring_signal_attributes.py | MichaelTROEHLER/datadog-api-client-python | 12c46626622fb1277bb1e172753b342c671348bd | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019-Present Datadog, Inc.
import re # noqa: F401
import sys # noqa: F401
import nulltype # ... | 42.885714 | 173 | 0.593471 |
794c5fe16a7fb3be1eb6875a7681459c7d3ec6e2 | 6,432 | py | Python | S4/S4 Library/simulation/objects/components/get_put_component_mixin.py | NeonOcean/Environment | ca658cf66e8fd6866c22a4a0136d415705b36d26 | [
"CC-BY-4.0"
] | 1 | 2021-05-20T19:33:37.000Z | 2021-05-20T19:33:37.000Z | S4/S4 Library/simulation/objects/components/get_put_component_mixin.py | NeonOcean/Environment | ca658cf66e8fd6866c22a4a0136d415705b36d26 | [
"CC-BY-4.0"
] | null | null | null | S4/S4 Library/simulation/objects/components/get_put_component_mixin.py | NeonOcean/Environment | ca658cf66e8fd6866c22a4a0136d415705b36d26 | [
"CC-BY-4.0"
] | null | null | null | from animation.posture_manifest import AnimationParticipant, PostureManifestEntry, MATCH_ANY, PostureManifest, SlotManifest
from carry.carry_utils import PARAM_CARRY_TRACK
from interactions.constraint_variants import TunableConstraintVariant
from interactions.constraints import Anywhere
from interactions.utils.animatio... | 54.05042 | 428 | 0.725435 |
794c5feeb1f47bb6cd8d15bf6c5d8b9bce55a9bc | 1,801 | py | Python | 2021/python/dec13/solution.py | razzlestorm/advent-of-code | 288488539ed64e078368ac012b7f794faa4776ba | [
"MIT"
] | null | null | null | 2021/python/dec13/solution.py | razzlestorm/advent-of-code | 288488539ed64e078368ac012b7f794faa4776ba | [
"MIT"
] | null | null | null | 2021/python/dec13/solution.py | razzlestorm/advent-of-code | 288488539ed64e078368ac012b7f794faa4776ba | [
"MIT"
] | null | null | null | """
from pathlib import Path
from collections import defaultdict
from typing import List
FILE_DIR = Path(__file__).parent
if __name__ == "__main__":
DATA = (FILE_DIR / "input.txt").read_text().strip()
lines = [x.strip() for x in DATA.split("\n")]
divide = lines.index("")
dots = set(tuple(map(int, lin... | 33.351852 | 140 | 0.546918 |
794c60bc826ef483227b494d5890546471327b23 | 1,776 | py | Python | gas_bear/__main__.py | Jennypies/gas_bear | fc604086cb9d726c04ddfd78339a84c50747b801 | [
"MIT"
] | null | null | null | gas_bear/__main__.py | Jennypies/gas_bear | fc604086cb9d726c04ddfd78339a84c50747b801 | [
"MIT"
] | null | null | null | gas_bear/__main__.py | Jennypies/gas_bear | fc604086cb9d726c04ddfd78339a84c50747b801 | [
"MIT"
] | null | null | null | import logging
import bme680
import time
import csv
logger = logging.getLogger(__name__)
def main():
logging.basicConfig(format="[%(levelname)s %(name)s] %(message)s", level=logging.INFO)
sensor = bme680.BME680(bme680.I2C_ADDR_PRIMARY)
sensor.set_humidity_oversample(bme680.OS_2X)
sensor.set_pressur... | 28.645161 | 90 | 0.610923 |
794c6199596bec821b452a3b4e637e36de2e00b0 | 47,670 | py | Python | gammapy/datasets/tests/test_map.py | Jaleleddine/gammapy | de9195df40fa5bbf8840cda4e7cd5e8cc5eaadbb | [
"BSD-3-Clause"
] | null | null | null | gammapy/datasets/tests/test_map.py | Jaleleddine/gammapy | de9195df40fa5bbf8840cda4e7cd5e8cc5eaadbb | [
"BSD-3-Clause"
] | null | null | null | gammapy/datasets/tests/test_map.py | Jaleleddine/gammapy | de9195df40fa5bbf8840cda4e7cd5e8cc5eaadbb | [
"BSD-3-Clause"
] | null | null | null | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import pytest
import numpy as np
from numpy.testing import assert_allclose
import astropy.units as u
from astropy.coordinates import SkyCoord
from astropy.table import Table
from regions import CircleSkyRegion
from gammapy.data import GTI
from gammapy.data... | 34.319654 | 100 | 0.68842 |
794c61f491b72fcfbe531e61cb32e9014377360c | 33,908 | py | Python | python/pyspark/pandas/utils.py | asranasinghe/spark | 6eee25b2d587016acdc49966510b50edc42053f5 | [
"BSD-2-Clause",
"Apache-2.0",
"CC0-1.0",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 3 | 2016-05-26T10:38:18.000Z | 2021-06-12T12:49:29.000Z | python/pyspark/pandas/utils.py | asranasinghe/spark | 6eee25b2d587016acdc49966510b50edc42053f5 | [
"BSD-2-Clause",
"Apache-2.0",
"CC0-1.0",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 8 | 2015-10-02T00:38:43.000Z | 2021-06-16T00:54:07.000Z | python/pyspark/pandas/utils.py | asranasinghe/spark | 6eee25b2d587016acdc49966510b50edc42053f5 | [
"BSD-2-Clause",
"Apache-2.0",
"CC0-1.0",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2015-05-20T10:44:27.000Z | 2017-09-19T20:11:06.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 us... | 35.394572 | 100 | 0.625664 |
794c622c32acd2cc224632bf9ef75ae1d1195141 | 1,974 | py | Python | tests/test_reg.py | jddixon/fieldz | 0503f776f053d9711ea4f17d53c17fd732679b02 | [
"MIT"
] | null | null | null | tests/test_reg.py | jddixon/fieldz | 0503f776f053d9711ea4f17d53c17fd732679b02 | [
"MIT"
] | null | null | null | tests/test_reg.py | jddixon/fieldz | 0503f776f053d9711ea4f17d53c17fd732679b02 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# test_reg.py
# import time
import unittest
# from rnglib import SimpleRNG
from wireops.enum import FieldTypes
from fieldz.reg import NodeReg
from fieldz.enum import CoreTypes
# TESTS --------------------------------------------------------------
class TestReg(unittest.TestCase):
def te... | 29.909091 | 78 | 0.598784 |
794c6337c3bc31f6a638917d7acf8c6201d09a77 | 11,478 | py | Python | flask_flatpages/flatpages.py | blackdog308/Flask-FlatPages | d618de221bbc192693322df54bbf56c0abe64cfd | [
"BSD-3-Clause"
] | null | null | null | flask_flatpages/flatpages.py | blackdog308/Flask-FlatPages | d618de221bbc192693322df54bbf56c0abe64cfd | [
"BSD-3-Clause"
] | null | null | null | flask_flatpages/flatpages.py | blackdog308/Flask-FlatPages | d618de221bbc192693322df54bbf56c0abe64cfd | [
"BSD-3-Clause"
] | null | null | null | """
=========================
flask_flatpages.flatpages
=========================
Flatpages extension.
"""
import operator
import os
from itertools import takewhile
import six
from flask import abort
from werkzeug.utils import cached_property, import_string
from .page import Page
from .utils import force_unicode, ... | 33.95858 | 79 | 0.571354 |
794c639e5d20656ef44130fd65349221cb90bc6f | 392 | py | Python | citymngmt/migrations/0036_alter_company_color.py | NazarenoCavazzon/mibus-api | 1213971d410d9183d8fc1d51eb996bd5ce7158bf | [
"MIT"
] | null | null | null | citymngmt/migrations/0036_alter_company_color.py | NazarenoCavazzon/mibus-api | 1213971d410d9183d8fc1d51eb996bd5ce7158bf | [
"MIT"
] | null | null | null | citymngmt/migrations/0036_alter_company_color.py | NazarenoCavazzon/mibus-api | 1213971d410d9183d8fc1d51eb996bd5ce7158bf | [
"MIT"
] | null | null | null | # Generated by Django 3.2.8 on 2021-10-11 02:21
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('citymngmt', '0035_auto_20211011_0001'),
]
operations = [
migrations.AlterField(
model_name='company',
name='color',
... | 20.631579 | 54 | 0.596939 |
794c646de1379f2e13d1c95d19cd113962518b4d | 2,129 | py | Python | scripts/quest/q21201e.py | Snewmy/swordie | ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17 | [
"MIT"
] | 2 | 2020-04-15T03:16:07.000Z | 2020-08-12T23:28:32.000Z | scripts/quest/q21201e.py | Snewmy/swordie | ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17 | [
"MIT"
] | null | null | null | scripts/quest/q21201e.py | Snewmy/swordie | ae01ed4ec0eb20a18730e8cd209eea0b84a8dd17 | [
"MIT"
] | 3 | 2020-08-25T06:55:25.000Z | 2020-12-01T13:07:43.000Z | # 21201 - [Job Adv] (Lv.30) Aran
sm.setSpeakerID(1201002)
sm.sendNext("First you promise to defeat the Black Mage and make me a famous weapon, then you abandon me for hundreds of years, and now you're telling me you don't remember who I am? What the...?! Do you think I'll let you get away with that? You're the one wh... | 88.708333 | 297 | 0.743542 |
794c64aa04347323d0856ec4fcf0dc784d86dd53 | 2,974 | py | Python | MouseJiggle.py | Allencheng01/MouseJiggle | 4cf3bbf3e78fe53850d69ec9f78c2d1940eeb07f | [
"BSD-2-Clause"
] | 2 | 2021-01-15T20:44:04.000Z | 2021-02-09T16:56:50.000Z | MouseJiggle.py | Allencheng01/MouseJiggle | 4cf3bbf3e78fe53850d69ec9f78c2d1940eeb07f | [
"BSD-2-Clause"
] | null | null | null | MouseJiggle.py | Allencheng01/MouseJiggle | 4cf3bbf3e78fe53850d69ec9f78c2d1940eeb07f | [
"BSD-2-Clause"
] | null | null | null | import os, sys
import ctypes
import time
import multiprocessing
# # see http://msdn.microsoft.com/en-us/library/ms646260(VS.85).aspx for details
# ctypes.windll.user32.SetCursorPos(100, 20)
# ctypes.windll.user32.mouse_event(2, 0, 0, 0,0) # left down
# ctypes.windll.user32.mouse_event(4, 0, 0, 0,0) # left up
... | 29.445545 | 390 | 0.686281 |
794c64b94fe8173ca94ab83acac47a9fe6c5a045 | 4,609 | py | Python | Athos/HelperScripts/FindAccuracy_Porthos.py | mpc-msri-dev/EzPC | a489c49d5c92f51df0277a7e5751e1b8baeb0bc1 | [
"MIT"
] | null | null | null | Athos/HelperScripts/FindAccuracy_Porthos.py | mpc-msri-dev/EzPC | a489c49d5c92f51df0277a7e5751e1b8baeb0bc1 | [
"MIT"
] | null | null | null | Athos/HelperScripts/FindAccuracy_Porthos.py | mpc-msri-dev/EzPC | a489c49d5c92f51df0277a7e5751e1b8baeb0bc1 | [
"MIT"
] | null | null | null | '''
Authors: Nishant Kumar.
Copyright:
Copyright (c) 2020 Microsoft Research
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
... | 42.284404 | 132 | 0.722933 |
794c6530522843d34631b9c8c1497d78e079adae | 352 | py | Python | gpu_bdb/setup.py | beckernick/tpcx-bb | f6a398d03e7aee4fd190606e6eb0fb1fbea3ea23 | [
"Apache-2.0"
] | 62 | 2020-05-14T13:33:02.000Z | 2020-10-29T13:28:26.000Z | gpu_bdb/setup.py | beckernick/tpcx-bb | f6a398d03e7aee4fd190606e6eb0fb1fbea3ea23 | [
"Apache-2.0"
] | 104 | 2020-07-01T21:07:42.000Z | 2020-11-13T16:36:04.000Z | gpu_bdb/setup.py | beckernick/tpcx-bb | f6a398d03e7aee4fd190606e6eb0fb1fbea3ea23 | [
"Apache-2.0"
] | 21 | 2020-05-14T14:44:40.000Z | 2020-11-07T12:08:28.000Z | # Copyright (c) 2020, NVIDIA CORPORATION.
from setuptools import find_packages, setup
qnums = [str(i).zfill(2) for i in range(1, 31)]
setup(
name="bdb_tools",
version="0.2",
author="RAPIDS",
packages=["benchmark_runner", "bdb_tools"],
package_data={"benchmark_runner": ["benchmark_config.yaml"]},
... | 25.142857 | 65 | 0.6875 |
794c6553a0df6730a4e8be18c8748f74ae505fdf | 1,463 | py | Python | TS_data_prophet_plotly.py | mmuratardag/DS_SpA_W07_Time_Series_Analysis | d3dc95d32f4e0a2efd927eaa9069289baefce7c6 | [
"MIT"
] | null | null | null | TS_data_prophet_plotly.py | mmuratardag/DS_SpA_W07_Time_Series_Analysis | d3dc95d32f4e0a2efd927eaa9069289baefce7c6 | [
"MIT"
] | null | null | null | TS_data_prophet_plotly.py | mmuratardag/DS_SpA_W07_Time_Series_Analysis | d3dc95d32f4e0a2efd927eaa9069289baefce7c6 | [
"MIT"
] | null | null | null | import pandas as pd
import geopandas as gpd
import json
import plotly.express as px
df = pd.read_csv('berlin_weather_forecast.csv')
df['date'] = pd.to_datetime(df['date'].astype(str))
df_gb = df.groupby(['name','year','week'])['predicted_tempreature'].mean().reset_index()
df_gb['predicted_tempreature'] = df_gb['pred... | 34.833333 | 156 | 0.71907 |
794c659c6b6c83d2837dde1f5ae9417a2d1e1c1e | 348 | py | Python | heuristics/conditions/named_conditions/__init__.py | TeamJumpstart/InformatiCup2021 | a4d07992f772d3a1e9ef715fa8e9ce2234cd47a4 | [
"MIT"
] | 10 | 2021-04-18T17:54:02.000Z | 2021-07-26T19:58:41.000Z | heuristics/conditions/named_conditions/__init__.py | DiddiZ/InformatiCup2021 | a4d07992f772d3a1e9ef715fa8e9ce2234cd47a4 | [
"MIT"
] | 1 | 2021-04-21T15:13:41.000Z | 2021-04-21T15:13:41.000Z | heuristics/conditions/named_conditions/__init__.py | DiddiZ/InformatiCup2021 | a4d07992f772d3a1e9ef715fa8e9ce2234cd47a4 | [
"MIT"
] | 1 | 2021-04-20T09:42:50.000Z | 2021-04-20T09:42:50.000Z | from heuristics.conditions.named_conditions.endgame_condition import EndgameCondition
from heuristics.conditions.named_conditions.lategame_condition import LategameCondition
from heuristics.conditions.named_conditions.midgame_condition import MidgameCondition
__all__ = [
"EndgameCondition",
"MidgameCondition",... | 34.8 | 87 | 0.847701 |
794c664cdb397711551dee070ea292192e627c41 | 8,240 | py | Python | bgexplorer/modeleditor/widgets.py | bloer/bgexplorer | c87b79b6eee85441628b696051ad9f2e95246694 | [
"BSD-2-Clause"
] | null | null | null | bgexplorer/modeleditor/widgets.py | bloer/bgexplorer | c87b79b6eee85441628b696051ad9f2e95246694 | [
"BSD-2-Clause"
] | 74 | 2017-10-17T20:49:31.000Z | 2022-03-11T17:52:27.000Z | bgexplorer/modeleditor/widgets.py | bloer/bgexplorer | c87b79b6eee85441628b696051ad9f2e95246694 | [
"BSD-2-Clause"
] | null | null | null | """
@file widgets.py
@author: bloer
Defines a few custom widgets for rendering dynamic elements
"""
#python 2/3 compatibility
from __future__ import (absolute_import, division,
print_function, unicode_literals)
import json
import types
from collections import namedtuple
from wtforms.widgets ... | 40.392157 | 78 | 0.514442 |
794c669636f8510b4e6d8f39606ee1efdc196d5d | 17,524 | py | Python | ckanext/stats/stats.py | GlobalMaksimum/ckan | bdba078d26d485e75554ba9570e292ec480eb9e4 | [
"Apache-2.0"
] | 1 | 2019-11-03T11:35:38.000Z | 2019-11-03T11:35:38.000Z | ckanext/stats/stats.py | GlobalMaksimum/ckan | bdba078d26d485e75554ba9570e292ec480eb9e4 | [
"Apache-2.0"
] | 135 | 2019-07-03T19:58:12.000Z | 2020-02-14T19:57:33.000Z | ckanext/stats/stats.py | GlobalMaksimum/ckan | bdba078d26d485e75554ba9570e292ec480eb9e4 | [
"Apache-2.0"
] | 3 | 2019-09-11T10:04:59.000Z | 2020-01-30T15:55:50.000Z | # encoding: utf-8
import datetime
from ckan.common import config
from six import text_type
from sqlalchemy import Table, select, join, func, and_
import ckan.plugins as p
import ckan.model as model
cache_enabled = p.toolkit.asbool(config.get('ckanext.stats.cache_enabled', 'True'))
if cache_enabled:
from pylons... | 46.981233 | 196 | 0.606597 |
794c669e7e2d777573d1f216393803f752a944b1 | 10,840 | py | Python | fline/models/models/object_detection/map_net.py | asromahin/fline | a34243878093b3b883607557eeaf968ef4b8acf6 | [
"MIT"
] | 5 | 2021-07-01T08:19:51.000Z | 2022-03-28T06:09:55.000Z | fline/models/models/object_detection/map_net.py | asromahin/fline | a34243878093b3b883607557eeaf968ef4b8acf6 | [
"MIT"
] | 1 | 2022-03-21T02:42:44.000Z | 2022-03-28T06:10:57.000Z | fline/models/models/object_detection/map_net.py | asromahin/fline | a34243878093b3b883607557eeaf968ef4b8acf6 | [
"MIT"
] | null | null | null | import torch
import segmentation_models_pytorch as smp
from fline.models.models.segmentation.fpn import TimmFPN
from fline.models.encoders.timm import TimmEncoder
from fline.models.models.research.extractor import VectorsFromMask, VectorsFromMaskV2
from fline.models.models.research.connect_net import ConnectNet
from f... | 38.853047 | 108 | 0.535701 |
794c671aaf3bd021bb604cd8ebede6943861d255 | 1,658 | py | Python | vendimia/users/models.py | soru13/vendimia | ebcf85473855e6f990b1a49574ac669fdd4d443e | [
"MIT"
] | null | null | null | vendimia/users/models.py | soru13/vendimia | ebcf85473855e6f990b1a49574ac669fdd4d443e | [
"MIT"
] | 5 | 2020-02-11T23:26:24.000Z | 2022-01-13T00:39:54.000Z | vendimia/users/models.py | soru13/vendimia | ebcf85473855e6f990b1a49574ac669fdd4d443e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from save_the_change.mixins import SaveTheChange
from django.contrib.auth.models import User
from users.midlerdamanager import MidlerManager,BorradoLogico
from django.db import models
class Perfil(SaveTheChange, models.Model):
user = models.OneToOneF... | 39.47619 | 79 | 0.717732 |
794c6786c27ebaba4e7e35d2c74622169ef50485 | 5,649 | py | Python | kwueBackend/kwue/controllers/food.py | bounswe/bounswe2016group4 | cbc8201aa86049b81f20ef44ee37eb065a469d46 | [
"Apache-2.0"
] | 6 | 2016-02-14T18:04:48.000Z | 2016-12-18T20:09:15.000Z | kwueBackend/kwue/controllers/food.py | bounswe/bounswe2016group4 | cbc8201aa86049b81f20ef44ee37eb065a469d46 | [
"Apache-2.0"
] | 113 | 2016-02-14T18:06:57.000Z | 2021-06-10T17:57:12.000Z | kwueBackend/kwue/controllers/food.py | bounswe/bounswe2016group4 | cbc8201aa86049b81f20ef44ee37eb065a469d46 | [
"Apache-2.0"
] | 1 | 2017-02-15T18:48:55.000Z | 2017-02-15T18:48:55.000Z | from django.shortcuts import render
from kwue.DB_functions.food_db_functions import *
from kwue.helper_functions.nutrition_helpers import request_nutrition
import json
from django.http import HttpResponse
from kwue.DB_functions.tag_db_functions import *
from django.views.decorators.csrf import csrf_exempt
def get_foo... | 34.445122 | 143 | 0.663657 |
794c678b121352bf3da9f74bb60572b9e9083ce3 | 1,327 | py | Python | tests/getl/common/test_delta_table.py | husqvarnagroup/GETL | 37251abf12bac2efed1fe463b09a288d85969141 | [
"MIT"
] | 8 | 2020-06-10T09:00:17.000Z | 2021-06-07T18:02:19.000Z | tests/getl/common/test_delta_table.py | husqvarnagroup/GETL | 37251abf12bac2efed1fe463b09a288d85969141 | [
"MIT"
] | 5 | 2020-07-03T10:39:25.000Z | 2021-08-30T14:52:47.000Z | tests/getl/common/test_delta_table.py | husqvarnagroup/GETL | 37251abf12bac2efed1fe463b09a288d85969141 | [
"MIT"
] | 1 | 2020-05-28T07:53:48.000Z | 2020-05-28T07:53:48.000Z | """Testing the module delta tables."""
from pyspark.sql import types as T
from getl.common.delta_table import DeltaTable
def create_dataframe(spark_session, data):
schema = T.StructType(
[
T.StructField("file_path", T.StringType(), True),
T.StructField("file_desc", T.StringType(),... | 27.645833 | 73 | 0.617935 |
794c679866791c77bc99e83c5b45b1b86df08a91 | 6,681 | py | Python | yongheegram/images/views.py | devyonghee/yongheegram | eb2d4b459e28a900f087a9039a3a2fdd77e7748d | [
"MIT"
] | null | null | null | yongheegram/images/views.py | devyonghee/yongheegram | eb2d4b459e28a900f087a9039a3a2fdd77e7748d | [
"MIT"
] | 10 | 2020-09-06T22:56:25.000Z | 2022-02-18T07:57:17.000Z | yongheegram/images/views.py | devyonghee/yongheegram | eb2d4b459e28a900f087a9039a3a2fdd77e7748d | [
"MIT"
] | null | null | null | from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import status
from . import models, serializers
from yongheegram.users import models as user_models
from yongheegram.users import serializers as user_serializers
from yongheegram.notifications import views as notif... | 31.366197 | 104 | 0.662027 |
794c6831ef14a531f2efc3b935d3cf9dbfa71517 | 169 | py | Python | notes/urls.py | charliealpha094/Django-notes | 4f7f2eb0872f61280e705a39bf3bc5bd727e72ae | [
"MIT"
] | null | null | null | notes/urls.py | charliealpha094/Django-notes | 4f7f2eb0872f61280e705a39bf3bc5bd727e72ae | [
"MIT"
] | null | null | null | notes/urls.py | charliealpha094/Django-notes | 4f7f2eb0872f61280e705a39bf3bc5bd727e72ae | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.urls import path, include
urlpatterns = [
path('admin/', admin.site.urls),
path('', include('document.urls')),
]
| 16.9 | 39 | 0.680473 |
794c6887555a1953c7a7a7c9fe145aefc2484b49 | 5,077 | py | Python | sdk/python/pulumi_aws_native/iot/get_provisioning_template.py | pulumi/pulumi-aws-native | 1ae4a4d9c2256b2a79ca536f8d8497b28d10e4c3 | [
"Apache-2.0"
] | 29 | 2021-09-30T19:32:07.000Z | 2022-03-22T21:06:08.000Z | sdk/python/pulumi_aws_native/iot/get_provisioning_template.py | pulumi/pulumi-aws-native | 1ae4a4d9c2256b2a79ca536f8d8497b28d10e4c3 | [
"Apache-2.0"
] | 232 | 2021-09-30T19:26:26.000Z | 2022-03-31T23:22:06.000Z | sdk/python/pulumi_aws_native/iot/get_provisioning_template.py | pulumi/pulumi-aws-native | 1ae4a4d9c2256b2a79ca536f8d8497b28d10e4c3 | [
"Apache-2.0"
] | 4 | 2021-11-10T19:42:01.000Z | 2022-02-05T10:15:49.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, overload
from .. import _utilities
from... | 40.616 | 165 | 0.703171 |
794c69d34d2942d7b0019a05e06542dcc9bd0980 | 2,400 | py | Python | signals/mask_util.py | davmre/sigvisa | 91a1f163b8f3a258dfb78d88a07f2a11da41bd04 | [
"BSD-3-Clause"
] | null | null | null | signals/mask_util.py | davmre/sigvisa | 91a1f163b8f3a258dfb78d88a07f2a11da41bd04 | [
"BSD-3-Clause"
] | null | null | null | signals/mask_util.py | davmre/sigvisa | 91a1f163b8f3a258dfb78d88a07f2a11da41bd04 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
import numpy.ma as ma
def grow_mask(mask, n):
N = len(mask)
return [mask[max(0, i - n):min(N, i + n + 1)].any() for i in range(N)]
def mask_blocks(mask):
"""
Return a list of masked blocks (contiguous portions of the signal in which the mask is True).
Throws an IndexError if ... | 28.235294 | 97 | 0.5625 |
794c6a4a36b4bb6e20dbfca7eb77af604b9ab2ce | 3,532 | py | Python | scripts/joint_recorder.py | maciej-przybylski/baxter_examples | 4ec2263231d0daa7c942616462a43a9a133b2629 | [
"BSD-3-Clause"
] | null | null | null | scripts/joint_recorder.py | maciej-przybylski/baxter_examples | 4ec2263231d0daa7c942616462a43a9a133b2629 | [
"BSD-3-Clause"
] | null | null | null | scripts/joint_recorder.py | maciej-przybylski/baxter_examples | 4ec2263231d0daa7c942616462a43a9a133b2629 | [
"BSD-3-Clause"
] | 3 | 2021-02-23T06:44:08.000Z | 2022-03-09T22:29:23.000Z | #!/usr/bin/env python
# Copyright (c) 2013-2015, Rethink Robotics
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# ... | 37.978495 | 77 | 0.72735 |
794c6ae4b73b01880eb61d7c6a402fb16db407c1 | 699 | py | Python | day61/problem.py | Nitin-Diwakar/100-days-of-code | 637006b111054ab9a3b81867d3395fefc6584f02 | [
"MIT"
] | 1 | 2021-04-24T11:51:00.000Z | 2021-04-24T11:51:00.000Z | day61/problem.py | Nitin-Diwakar/100-days-of-code | 637006b111054ab9a3b81867d3395fefc6584f02 | [
"MIT"
] | null | null | null | day61/problem.py | Nitin-Diwakar/100-days-of-code | 637006b111054ab9a3b81867d3395fefc6584f02 | [
"MIT"
] | 1 | 2021-07-13T17:59:38.000Z | 2021-07-13T17:59:38.000Z | class Roman:
def __init__(self, num):
self.num = num
def int_to_roman(self):
number = [
1000, 900, 500, 400,
100, 90, 50, 40,
10, 9, 5, 4,
1
]
symbol = [
"M", "CM", "D", "CD",
"C", "XC", "L", "X... | 21.181818 | 51 | 0.363376 |
794c6af7191f65ba23f8111c5b2aef50d1eefe66 | 337 | py | Python | modules/persons/application/get/query/person/person_getter_query.py | eduardolujan/hexagonal_architecture_django | 8055927cb460bc40f3a2651c01a9d1da696177e8 | [
"BSD-3-Clause"
] | 6 | 2020-08-09T23:41:08.000Z | 2021-03-16T22:05:40.000Z | modules/persons/application/get/query/person/person_getter_query.py | eduardolujan/hexagonal_architecture_django | 8055927cb460bc40f3a2651c01a9d1da696177e8 | [
"BSD-3-Clause"
] | 1 | 2020-10-02T02:59:38.000Z | 2020-10-02T02:59:38.000Z | modules/persons/application/get/query/person/person_getter_query.py | eduardolujan/hexagonal_architecture_django | 8055927cb460bc40f3a2651c01a9d1da696177e8 | [
"BSD-3-Clause"
] | 2 | 2021-03-16T22:05:43.000Z | 2021-04-30T06:35:25.000Z | # -*- coding: utf-8 -*-
from modules.shared.domain.bus.query import Query
class PersonGetterQuery(Query):
"""
Get Person Query
"""
def __init__(self, id):
self.__id = id
@property
def id(self):
self.__id
@id.setter
def id(self):
raise Exception("You can't a... | 15.318182 | 52 | 0.58457 |
794c6bf1ba095b131bfb815c8e7257672f9e3643 | 49 | py | Python | tests/components/lyric/__init__.py | tbarbette/core | 8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c | [
"Apache-2.0"
] | 30,023 | 2016-04-13T10:17:53.000Z | 2020-03-02T12:56:31.000Z | tests/components/lyric/__init__.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 31,101 | 2020-03-02T13:00:16.000Z | 2022-03-31T23:57:36.000Z | tests/components/lyric/__init__.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 11,956 | 2016-04-13T18:42:31.000Z | 2020-03-02T09:32:12.000Z | """Tests for the Honeywell Lyric integration."""
| 24.5 | 48 | 0.734694 |
794c6bfa9d5ebc9f1dd72903a748b90a0dbd1dd6 | 111,821 | py | Python | google/cloud/aiplatform_v1/services/featurestore_service/async_client.py | sakagarwal/python-aiplatform | 62b4a1ea589235910c6e87f027899a29bf1bacb1 | [
"Apache-2.0"
] | null | null | null | google/cloud/aiplatform_v1/services/featurestore_service/async_client.py | sakagarwal/python-aiplatform | 62b4a1ea589235910c6e87f027899a29bf1bacb1 | [
"Apache-2.0"
] | null | null | null | google/cloud/aiplatform_v1/services/featurestore_service/async_client.py | sakagarwal/python-aiplatform | 62b4a1ea589235910c6e87f027899a29bf1bacb1 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 41.739828 | 186 | 0.613776 |
794c6ca47fc672fa81dffbe5e834d72e490f6e71 | 1,898 | py | Python | aliyun-python-sdk-vs/aliyunsdkvs/request/v20181212/DescribeVsTopDomainsByFlowRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 1,001 | 2015-07-24T01:32:41.000Z | 2022-03-25T01:28:18.000Z | aliyun-python-sdk-vs/aliyunsdkvs/request/v20181212/DescribeVsTopDomainsByFlowRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 363 | 2015-10-20T03:15:00.000Z | 2022-03-08T12:26:19.000Z | aliyun-python-sdk-vs/aliyunsdkvs/request/v20181212/DescribeVsTopDomainsByFlowRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 682 | 2015-09-22T07:19:02.000Z | 2022-03-22T09: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... | 33.892857 | 78 | 0.75922 |
794c6cdb643dc7b310ceadd73a26dad2655fe339 | 12,378 | py | Python | Python/klampt/control/simrobotinterface.py | smeng9/Klampt | 7ff91bead90ac04280eff310623338fd10aaba79 | [
"BSD-3-Clause"
] | 238 | 2015-01-09T15:21:27.000Z | 2022-03-30T22:48:45.000Z | Python/klampt/control/simrobotinterface.py | smeng9/Klampt | 7ff91bead90ac04280eff310623338fd10aaba79 | [
"BSD-3-Clause"
] | 89 | 2015-08-26T16:56:42.000Z | 2022-03-29T23:45:46.000Z | Python/klampt/control/simrobotinterface.py | smeng9/Klampt | 7ff91bead90ac04280eff310623338fd10aaba79 | [
"BSD-3-Clause"
] | 84 | 2015-01-10T18:41:52.000Z | 2022-03-30T03:32:50.000Z | """Used for testing code that works with the Klamp't Robot Interface Layer on a
simualted robot. Defines a variety of RobotInterfaceBase interfaces that work
with Klamp't simulations.
For each of the classes in this module, if you provide the simulator argument
then this will automatically update your simulation upon... | 36.192982 | 108 | 0.66287 |
794c6ed1dac196b4be74a4af0a2a24bee5faa66a | 6,165 | py | Python | src/purplebook/DummyGraphics.py | katieteixeira/purplebook | 7493d6af5899ae639c5ffdca54227d11daa4b857 | [
"MIT"
] | 9 | 2016-04-05T00:30:10.000Z | 2019-01-11T18:02:33.000Z | GEOL351/CoursewareModules/DummyGraphics.py | CommonClimate/teaching_notebooks | 576108231d5bbca8cbe6636752317f823b59429c | [
"MIT"
] | null | null | null | GEOL351/CoursewareModules/DummyGraphics.py | CommonClimate/teaching_notebooks | 576108231d5bbca8cbe6636752317f823b59429c | [
"MIT"
] | 2 | 2021-01-24T01:04:34.000Z | 2021-08-25T13:56:07.000Z | #----------Section 3: Plotting utilities-------------------------------
#This is a dummy graphics routine, to import if a graphics driver
#is not found. It is the fallback import if the import of ClimateGraphics
#fails in ClimateUtilities. This dummy routine allows courseware
#scripts to be run without the user needin... | 34.830508 | 77 | 0.630008 |
794c6f02c7bf380516055625cea0e5b4962d07f8 | 7,324 | py | Python | main.py | jing-interactive/irobot | 032fc6ae069328eaccf343e885d4915835f2340e | [
"MIT"
] | 1 | 2016-11-19T15:37:48.000Z | 2016-11-19T15:37:48.000Z | main.py | vnm-interactive/irobot | 032fc6ae069328eaccf343e885d4915835f2340e | [
"MIT"
] | null | null | null | main.py | vnm-interactive/irobot | 032fc6ae069328eaccf343e885d4915835f2340e | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
'''
main.py
'''
# NOTE: this example requires PyAudio because it uses the Microphone class
import argparse
import speech_recognition as sr
from pythonosc import udp_client
import io, os, subprocess, wave, aifc, math, audioop
import collections, threading
import platform, stat
import json, hash... | 45.490683 | 252 | 0.612507 |
794c6f7638f1aa23159b60ef5b712325ad63541a | 543 | py | Python | _note_/_unittest_.py | By2048/_python_ | be57738093676a1273e6f69232723669e408986e | [
"MIT"
] | 2 | 2017-02-16T14:50:33.000Z | 2018-02-03T01:49:06.000Z | _note_/_unittest_.py | By2048/_python_ | be57738093676a1273e6f69232723669e408986e | [
"MIT"
] | null | null | null | _note_/_unittest_.py | By2048/_python_ | be57738093676a1273e6f69232723669e408986e | [
"MIT"
] | null | null | null | import unittest
class TestStringMethods(unittest.TestCase):
def test_upper(self):
self.assertEqual('foo'.upper(), 'FOOp')
def test_isupper(self):
self.assertTrue('FOO'.isupper())
self.assertFalse('Foo'.isupper())
def test_split(self):
s = 'hello world'
self.asser... | 23.608696 | 69 | 0.620626 |
794c700836c2e0adf35203b22ba5a254e0bdb92c | 1,978 | py | Python | samples/sample_uploads/sample_uploads_uber.py | jlangdev/falconpy | 75d5824ad5d36c430b709110d7719a3f3fc7e9b0 | [
"Unlicense"
] | 111 | 2020-11-19T00:44:18.000Z | 2022-03-03T21:02:32.000Z | samples/sample_uploads/sample_uploads_uber.py | jlangdev/falconpy | 75d5824ad5d36c430b709110d7719a3f3fc7e9b0 | [
"Unlicense"
] | 227 | 2020-12-05T03:02:27.000Z | 2022-03-22T14:12:42.000Z | samples/sample_uploads/sample_uploads_uber.py | jlangdev/falconpy | 75d5824ad5d36c430b709110d7719a3f3fc7e9b0 | [
"Unlicense"
] | 47 | 2020-11-23T21:00:14.000Z | 2022-03-28T18:30:19.000Z | # ____ _ _ _ _ _
# / ___| __ _ _ __ ___ _ __ | | ___ | | | |_ __ | | ___ __ _ __| |___
# \___ \ / _` | '_ ` _ \| '_ \| |/ _ \ | | | | '_ \| |/ _ \ / _` |/ _` / __|
# ___) | (_| | | | | | | |_) | | __/ | |_| | |_) | | (_) | (_| | (_| \__ \
# |____/ \__,_|_| ... | 41.208333 | 123 | 0.581395 |
794c701b0b9b3d8501dacfed622482e082617c09 | 7,123 | py | Python | openfl/component/director/experiment.py | ssg-research/openfl | b60cbfbdad595e653c94cee23fd35add993b94b0 | [
"Apache-2.0"
] | 297 | 2021-01-13T08:49:35.000Z | 2022-03-31T15:06:43.000Z | openfl/component/director/experiment.py | ssg-research/openfl | b60cbfbdad595e653c94cee23fd35add993b94b0 | [
"Apache-2.0"
] | 265 | 2021-02-02T09:57:33.000Z | 2022-03-30T22:51:55.000Z | openfl/component/director/experiment.py | ssg-research/openfl | b60cbfbdad595e653c94cee23fd35add993b94b0 | [
"Apache-2.0"
] | 81 | 2021-01-18T07:52:36.000Z | 2022-03-26T18:55:54.000Z | # Copyright (C) 2020-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
"""Experiment module."""
import asyncio
import logging
from contextlib import asynccontextmanager
from pathlib import Path
from typing import Iterable
from typing import List
from typing import Union
from openfl.federated import Plan
f... | 34.245192 | 96 | 0.62221 |
794c71bff13999d2032e725932a3d5bf45bef754 | 454 | py | Python | lippukala_tests/test_pos.py | kcsry/lippukala | 05f11d14d3cb86a59a4a1ec2bbb403ac303a6c3b | [
"MIT"
] | 1 | 2019-03-04T15:35:39.000Z | 2019-03-04T15:35:39.000Z | lippukala_tests/test_pos.py | kcsry/lippukala | 05f11d14d3cb86a59a4a1ec2bbb403ac303a6c3b | [
"MIT"
] | 8 | 2016-03-26T10:07:16.000Z | 2020-12-10T09:06:36.000Z | lippukala_tests/test_pos.py | kcsry/lippukala | 05f11d14d3cb86a59a4a1ec2bbb403ac303a6c3b | [
"MIT"
] | null | null | null | from lippukala.models import Code
from .utils import _create_test_order
def test_pos_view(admin_client):
for x in range(5):
_create_test_order()
admin_client.get("/pos/")
codes = admin_client.get("/pos/", {"json": "1"}).json()["codes"]
code_id = codes[0]["id"]
admin_client.post("/pos/", {... | 28.375 | 68 | 0.64978 |
794c72b7ea8eb9dad5f3c1be820121d48d17b481 | 6,789 | py | Python | examples/pwr_run/checkpointing/debug/v100_only/job28.py | boringlee24/keras_old | 1e1176c45c4952ba1b9b9e58e9cc4df027ab111d | [
"MIT"
] | null | null | null | examples/pwr_run/checkpointing/debug/v100_only/job28.py | boringlee24/keras_old | 1e1176c45c4952ba1b9b9e58e9cc4df027ab111d | [
"MIT"
] | null | null | null | examples/pwr_run/checkpointing/debug/v100_only/job28.py | boringlee24/keras_old | 1e1176c45c4952ba1b9b9e58e9cc4df027ab111d | [
"MIT"
] | null | null | null | """
#Trains a ResNet on the CIFAR10 dataset.
"""
from __future__ import print_function
import keras
from keras.layers import Dense, Conv2D, BatchNormalization, Activation
from keras.layers import AveragePooling2D, Input, Flatten
from keras.optimizers import Adam
from keras.callbacks import ModelCheckpoint, LearningRa... | 31.873239 | 118 | 0.703786 |
794c7375e89b8820e30b6fd608f1f70c4905169b | 62,272 | py | Python | src/asm6502.py | jsissom/py6502 | 241afc7eebb7e64c40d7783401b30fdc00962c5e | [
"BSD-2-Clause"
] | 26 | 2017-04-15T05:27:24.000Z | 2022-03-21T13:46:13.000Z | src/asm6502.py | KrisKennaway/py6502 | 241afc7eebb7e64c40d7783401b30fdc00962c5e | [
"BSD-2-Clause"
] | 9 | 2016-07-11T07:19:40.000Z | 2022-01-27T18:01:57.000Z | src/asm6502.py | KrisKennaway/py6502 | 241afc7eebb7e64c40d7783401b30fdc00962c5e | [
"BSD-2-Clause"
] | 7 | 2017-04-16T08:23:51.000Z | 2022-02-20T15:21:14.000Z | import re
class asm6502():
def __init__(self, debug=0):
# print "65C02 Assembler"
self.debuglevel = debug
self.text_of_lines = list() # of strings
self.lines = list() # parsed lines (symbol, opcode, addrmode, value
self.symbols = list() # of (name,line#) tuples
... | 40.995392 | 134 | 0.503934 |
794c74ac089a168156d1e881ec319a0af8b91534 | 7,086 | py | Python | rebalance.py | hainingpan/inverse_volatility_caculation | b1684cc9bd2c399468c67841ce6360db88c45a88 | [
"MIT"
] | 3 | 2020-10-08T06:31:14.000Z | 2021-12-14T03:05:34.000Z | rebalance.py | hainingpan/inverse_volatility_caculation | b1684cc9bd2c399468c67841ce6360db88c45a88 | [
"MIT"
] | null | null | null | rebalance.py | hainingpan/inverse_volatility_caculation | b1684cc9bd2c399468c67841ce6360db88c45a88 | [
"MIT"
] | 1 | 2020-10-28T10:27:53.000Z | 2020-10-28T10:27:53.000Z | from datetime import datetime, date
import math
import numpy as np
import time
import sys
import requests
import re
from ortools.linear_solver import pywraplp
# if len(sys.argv) == 1:
# symbols = ['UPRO', 'TMF']
# else:
# symbols = sys.argv[1].split(',')
# for i in range(len(symbols)):
# ... | 42.945455 | 196 | 0.650155 |
794c750d8021f13f9731043a89ea4fc33bd13248 | 5,266 | py | Python | docs/conf.py | ngachung/incubator-sdap-nexus | 38e768694fcc142e2d88283cb1e44e05f88da847 | [
"Apache-2.0"
] | 17 | 2017-11-16T07:36:33.000Z | 2021-11-07T00:02:20.000Z | docs/conf.py | ngachung/incubator-sdap-nexus | 38e768694fcc142e2d88283cb1e44e05f88da847 | [
"Apache-2.0"
] | 35 | 2018-01-11T00:50:20.000Z | 2022-03-17T23:08:07.000Z | docs/conf.py | ngachung/incubator-sdap-nexus | 38e768694fcc142e2d88283cb1e44e05f88da847 | [
"Apache-2.0"
] | 25 | 2017-11-16T07:36:38.000Z | 2022-02-03T20:48:46.000Z | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup ------------------------------------------------------------... | 31.532934 | 82 | 0.650779 |
794c759ba4c940a06b7bcdae7acf51bfbd2a07d9 | 1,342 | py | Python | src/lib/dataset/datasets/custom_dataset.py | xping-zhou/CenterTrack | 38c89dd5dc9c339385d0386189245eb8c3a9ac22 | [
"MIT"
] | 2,093 | 2020-04-02T21:19:01.000Z | 2022-03-31T04:29:45.000Z | src/lib/dataset/datasets/custom_dataset.py | xping-zhou/CenterTrack | 38c89dd5dc9c339385d0386189245eb8c3a9ac22 | [
"MIT"
] | 251 | 2020-04-03T06:41:33.000Z | 2022-03-20T12:43:34.000Z | src/lib/dataset/datasets/custom_dataset.py | xping-zhou/CenterTrack | 38c89dd5dc9c339385d0386189245eb8c3a9ac22 | [
"MIT"
] | 506 | 2020-04-03T02:58:17.000Z | 2022-03-28T13:13:33.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from ..generic_dataset import GenericDataset
class CustomDataset(GenericDataset):
num_categories = 1
default_resolution = [-1, -1]
class_name = ['']
max_objs = 128
cat_ids = {1: 1}
def __init__(sel... | 33.55 | 75 | 0.695976 |
794c7683b545a543ae42b9c3d18137a15b824634 | 2,620 | py | Python | youtube_dl/views.py | Shovon588/api_collection | f348ffa8dc5c4dc69ba4c2a7d145c71e8273e0a2 | [
"MIT"
] | null | null | null | youtube_dl/views.py | Shovon588/api_collection | f348ffa8dc5c4dc69ba4c2a7d145c71e8273e0a2 | [
"MIT"
] | null | null | null | youtube_dl/views.py | Shovon588/api_collection | f348ffa8dc5c4dc69ba4c2a7d145c71e8273e0a2 | [
"MIT"
] | null | null | null | from pytube import YouTube
from rest_framework import status
from rest_framework.response import Response
from rest_framework.views import APIView
from .serializers import YoutubeDLSerializer
from .utils import make_time, make_size
class YoutubeDL(APIView):
serializer_class = YoutubeDLSerializer
def post(se... | 34.933333 | 111 | 0.500763 |
794c787f07e33c8991c289b0bfd88bafa3660e12 | 11,796 | py | Python | openstackclient/network/v2/subnet.py | ankur-gupta91/osc-ip-cap | 9a64bbc31fcc0872f52ad2d92c550945eea5cc97 | [
"Apache-2.0"
] | null | null | null | openstackclient/network/v2/subnet.py | ankur-gupta91/osc-ip-cap | 9a64bbc31fcc0872f52ad2d92c550945eea5cc97 | [
"Apache-2.0"
] | null | null | null | openstackclient/network/v2/subnet.py | ankur-gupta91/osc-ip-cap | 9a64bbc31fcc0872f52ad2d92c550945eea5cc97 | [
"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
# distrib... | 35.745455 | 79 | 0.592659 |
794c7962eeb6f3fc0476aa93940e66ff4a5135e6 | 1,493 | py | Python | Module01/LearningQGIS_ThirdEdition_Code/Chapter6_code/MyFirstPlugin/__init__.py | karant17/Test | e44bf79f597d53de2b891372ffccf7f13c74ede3 | [
"MIT"
] | 7 | 2017-02-16T15:25:47.000Z | 2021-11-08T13:10:15.000Z | Module01/LearningQGIS_ThirdEdition_Code/Chapter6_code/MyFirstPlugin/__init__.py | karant17/Test | e44bf79f597d53de2b891372ffccf7f13c74ede3 | [
"MIT"
] | null | null | null | Module01/LearningQGIS_ThirdEdition_Code/Chapter6_code/MyFirstPlugin/__init__.py | karant17/Test | e44bf79f597d53de2b891372ffccf7f13c74ede3 | [
"MIT"
] | 7 | 2017-03-06T08:47:27.000Z | 2021-12-11T12:42:43.000Z | # -*- coding: utf-8 -*-
"""
/***************************************************************************
MyFirstPlugin
A QGIS plugin
This is my first plugin
-------------------
begin : 2016-01-23
copyright : (C) 20... | 41.472222 | 77 | 0.389149 |
794c79758692170ff7672a88128cae3f84e920d7 | 936 | py | Python | wk/extra/node/boostrap.py | Peiiii/wk | dcf948c1cb36c1eec9b2a554ea0296c6d3dbbdc4 | [
"MIT"
] | null | null | null | wk/extra/node/boostrap.py | Peiiii/wk | dcf948c1cb36c1eec9b2a554ea0296c6d3dbbdc4 | [
"MIT"
] | null | null | null | wk/extra/node/boostrap.py | Peiiii/wk | dcf948c1cb36c1eec9b2a554ea0296c6d3dbbdc4 | [
"MIT"
] | null | null | null | from .node import *
class BoostrapBadgeBase(Span):
def __init__(self,text,type):
super().__init__(_class="badge badge-%s"%(type))
self.__call__(text)
class Badges:
@staticmethod
def primary(text):
return BoostrapBadgeBase(text,type="primary")
@staticmethod
def secondary(text... | 25.297297 | 56 | 0.66453 |
794c7afdd68cc3613c41c9bcdb731a648639d6d7 | 1,774 | py | Python | mac/google-cloud-sdk/lib/surface/container/binauthz/attestors/update.py | bopopescu/cndw | ee432efef88a4351b355f3d6d5350defc7f4246b | [
"Apache-2.0"
] | 2 | 2019-11-10T09:17:07.000Z | 2019-12-18T13:44:08.000Z | mac/google-cloud-sdk/lib/surface/container/binauthz/attestors/update.py | bopopescu/cndw | ee432efef88a4351b355f3d6d5350defc7f4246b | [
"Apache-2.0"
] | 11 | 2020-02-29T02:51:12.000Z | 2022-03-30T23:20:08.000Z | mac/google-cloud-sdk/lib/surface/container/binauthz/attestors/update.py | bopopescu/cndw | ee432efef88a4351b355f3d6d5350defc7f4246b | [
"Apache-2.0"
] | 1 | 2020-07-24T18:47:35.000Z | 2020-07-24T18:47:35.000Z | # -*- coding: utf-8 -*- #
# Copyright 2018 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | 32.254545 | 74 | 0.738444 |
794c7bb3a409ad7d7411aed94ba2bee120b724cd | 18,469 | py | Python | userbot/plugins/animazioni1.py | Kazutettoh/strafattinoh-bot | e8ab44b6e720c8133fd43695355fabf20d37fe1c | [
"MIT"
] | null | null | null | userbot/plugins/animazioni1.py | Kazutettoh/strafattinoh-bot | e8ab44b6e720c8133fd43695355fabf20d37fe1c | [
"MIT"
] | null | null | null | userbot/plugins/animazioni1.py | Kazutettoh/strafattinoh-bot | e8ab44b6e720c8133fd43695355fabf20d37fe1c | [
"MIT"
] | null | null | null | """
Commands:
.hypno
.plane
.pula
.sega
.solarsystem
.sorpresa
"""
import os
import sys
import asyncio
from telethon import events
from userbot import CMD_HELP
from userbot import ALIVE_NAME
from userbot.utils import admin_cmd
from platform import uname
DEFAULTUSER = str(ALIVE_NAME) if ALIVE_... | 47.114796 | 120 | 0.200119 |
794c7bb42251321268fbb5d9819fec86daa6cb20 | 28,949 | py | Python | pytid/scint2ix.py | aldebaran1/pyTID | f4a2fc3a5398306573af924c74e2f12a23e60d51 | [
"MIT"
] | null | null | null | pytid/scint2ix.py | aldebaran1/pyTID | f4a2fc3a5398306573af924c74e2f12a23e60d51 | [
"MIT"
] | null | null | null | pytid/scint2ix.py | aldebaran1/pyTID | f4a2fc3a5398306573af924c74e2f12a23e60d51 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu May 23 09:55:19 2019
@author: smrak
"""
import os
import yaml
import h5py
import numpy as np
from datetime import datetime
from pyGnss import pyGnss
from pyGnss import gnssUtils as gu
from pyGnss import scintillation as scint
import matplotlib.pyplot as... | 45.80538 | 144 | 0.465785 |
794c7c8283e8db510fcb4a2cf4d9b63f5af6d56a | 353 | py | Python | pytoast/tests/coverage/all_success/steps/getting_started.py | daniloster/pytoast | b0ceb02134aa4249888faeb8b5617e562aba6002 | [
"MIT"
] | null | null | null | pytoast/tests/coverage/all_success/steps/getting_started.py | daniloster/pytoast | b0ceb02134aa4249888faeb8b5617e562aba6002 | [
"MIT"
] | null | null | null | pytoast/tests/coverage/all_success/steps/getting_started.py | daniloster/pytoast | b0ceb02134aa4249888faeb8b5617e562aba6002 | [
"MIT"
] | null | null | null | from pytoast.decorators import step
@step('^I have given passed$')
def i_have_given_passed_step():
pass
@step('^I pass by when$')
def i_pass_by_when_step():
pass
@step('^should be passed (?P<name>(\w+))$')
def should_be_passed_step(name=''):
assert name in ['Leticia',
'Danilo'], 'I... | 19.611111 | 65 | 0.631728 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.