hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
498c70f8d2c3753ac1336e344fd7dcac9daf365d | 513 | py | Python | GameObjectsPackage/setup.py | KasiaDzimira/cube-game | 2e7330e37deacad9ac87ccb028ced4962d2d7d2f | [
"MIT"
] | null | null | null | GameObjectsPackage/setup.py | KasiaDzimira/cube-game | 2e7330e37deacad9ac87ccb028ced4962d2d7d2f | [
"MIT"
] | null | null | null | GameObjectsPackage/setup.py | KasiaDzimira/cube-game | 2e7330e37deacad9ac87ccb028ced4962d2d7d2f | [
"MIT"
] | null | null | null | import setuptools
setuptools.setup(
name="GameObjects",
version="0.0.1",
author="Marta Czul Katarzyna Farian Maria Polewczyk Grzegorz Stoklosa",
description="A small package of objects that we used in our jumping cube game",
url="https://github.com/KasiaDzimira/cube-game",
packages=setuptools.f... | 34.2 | 83 | 0.670565 |
8db0abcc9417b510b4bae88881e43bccea39bd11 | 2,006 | py | Python | chainer/functions/nonparameterized_linear.py | woodshop/complex-chainer | 18c2ef988319d26123915ec846fc08d8837258ff | [
"MIT"
] | 1 | 2015-10-06T16:33:43.000Z | 2015-10-06T16:33:43.000Z | chainer/functions/nonparameterized_linear.py | woodshop/complex-chainer | 18c2ef988319d26123915ec846fc08d8837258ff | [
"MIT"
] | null | null | null | chainer/functions/nonparameterized_linear.py | woodshop/complex-chainer | 18c2ef988319d26123915ec846fc08d8837258ff | [
"MIT"
] | null | null | null | import numpy
from chainer import cuda
from chainer import function
from chainer.functions import linear as linear_module
from chainer.utils import type_check
class NonparameterizedLinear(function.Function):
"""Nonparameterized linear class.
.. seealso:: :class:`Linear`
"""
def check_type_forward(... | 25.717949 | 58 | 0.552841 |
70580c586c0bc8e946b955d652c25889ef89762b | 4,041 | py | Python | ASM/build.py | GhostlyDark/OoT-Randomizer | a153f4fdffd6e971137b2f2df5813db218287ce0 | [
"MIT"
] | null | null | null | ASM/build.py | GhostlyDark/OoT-Randomizer | a153f4fdffd6e971137b2f2df5813db218287ce0 | [
"MIT"
] | null | null | null | ASM/build.py | GhostlyDark/OoT-Randomizer | a153f4fdffd6e971137b2f2df5813db218287ce0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
import os
sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), '..'))
import argparse
import json
import re
from subprocess import check_call as call
from rom_diff import create_diff
from ntype import BigStream
from crc import calculate_crc
parser = argparse.Argu... | 30.613636 | 221 | 0.620144 |
4aac96fccf24d187b09e8891b15a77de55b7afba | 23,901 | py | Python | solo/utils/dali_dataloader.py | ankitpatnala/solo-learn | b5a2b056c8eab36e72d2e63bf8fe463fc0cdbf87 | [
"MIT"
] | null | null | null | solo/utils/dali_dataloader.py | ankitpatnala/solo-learn | b5a2b056c8eab36e72d2e63bf8fe463fc0cdbf87 | [
"MIT"
] | null | null | null | solo/utils/dali_dataloader.py | ankitpatnala/solo-learn | b5a2b056c8eab36e72d2e63bf8fe463fc0cdbf87 | [
"MIT"
] | null | null | null | # Copyright 2022 solo-learn development team.
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to use,
# copy, modify, merge, publ... | 37.63937 | 100 | 0.602151 |
acac4caf335e63ef03c89bce1e93256e761815a0 | 1,023 | py | Python | projeto1.py | faculdadeCederj/interfacesGraficas | 4ed1555f7994be8ad9272214f7f64ac9a5b5a260 | [
"MIT"
] | null | null | null | projeto1.py | faculdadeCederj/interfacesGraficas | 4ed1555f7994be8ad9272214f7f64ac9a5b5a260 | [
"MIT"
] | null | null | null | projeto1.py | faculdadeCederj/interfacesGraficas | 4ed1555f7994be8ad9272214f7f64ac9a5b5a260 | [
"MIT"
] | 1 | 2020-04-10T15:08:41.000Z | 2020-04-10T15:08:41.000Z | class Fracao():
def __init__(self, n,d): # inicializa o numerador e denominador
try:
if d != 0:
self.n = n
self.d = d
else:
raise Exception
except Exception:
print('zero nao')
def __add__(self, other): # sobrescreve +
d = self.d * other.d
n = self.n * other.d + other.n * self.d
return... | 17.637931 | 80 | 0.593353 |
d2fc6bb189a0658b0060adc5724da30fa26251c5 | 718 | py | Python | conversion_encoding_bytes_chr_funcs/bit_shifter.py | SecTraversl/Toolbox_Python_3.8 | 0ad1d92d3a12225ea60e4eef3f263aecfffd1b65 | [
"MIT"
] | null | null | null | conversion_encoding_bytes_chr_funcs/bit_shifter.py | SecTraversl/Toolbox_Python_3.8 | 0ad1d92d3a12225ea60e4eef3f263aecfffd1b65 | [
"MIT"
] | null | null | null | conversion_encoding_bytes_chr_funcs/bit_shifter.py | SecTraversl/Toolbox_Python_3.8 | 0ad1d92d3a12225ea60e4eef3f263aecfffd1b65 | [
"MIT"
] | null | null | null | # %%
#######################################
def bit_shifter(num: int, shiftright: int):
"""Shifts the bits of the given number (int) by the designated number (int) given to the "shiftright" parameter.
Examples:
>>> bit_shifter(151, 4)\n
9
>>> bin(151)\n
'0b10010111'
>>>... | 23.933333 | 116 | 0.420613 |
fa5d2c3f98087b621774550ca3b49e271b67852e | 6,538 | py | Python | colorSpaceUtil.py | herleraja/WiCoSens | f31bcfd73900f76073510ec8e40e753bbcdbb404 | [
"Apache-2.0"
] | null | null | null | colorSpaceUtil.py | herleraja/WiCoSens | f31bcfd73900f76073510ec8e40e753bbcdbb404 | [
"Apache-2.0"
] | null | null | null | colorSpaceUtil.py | herleraja/WiCoSens | f31bcfd73900f76073510ec8e40e753bbcdbb404 | [
"Apache-2.0"
] | null | null | null | import colorsys
import os
import traceback
import numpy as np
from numpy import genfromtxt
"""
We use this package to convert the data from one color space into other color space.
The configuration setting is available in the main condition.
"""
def rgbc2YCbCr(r, g, b, c=0):
if c != 0:
r, g, b = r / c, ... | 31.584541 | 125 | 0.548027 |
f5622d877debb5088c0564f13d31bc06ba355117 | 741 | py | Python | restagents/washpost.py | nramanan/nellie-bot | c21f9797a5d9999179b688a51122e3f53f3e4303 | [
"MIT"
] | 1 | 2018-07-25T10:59:02.000Z | 2018-07-25T10:59:02.000Z | restagents/washpost.py | rneeja/nellie-bot | c21f9797a5d9999179b688a51122e3f53f3e4303 | [
"MIT"
] | 9 | 2015-03-25T21:42:04.000Z | 2015-06-27T16:26:01.000Z | restagents/washpost.py | rneeja/nellie-bot | c21f9797a5d9999179b688a51122e3f53f3e4303 | [
"MIT"
] | null | null | null | from config_helper import *
from printing_helper import *
from rest import get
def build_url(keyword):
url = "http://api.washingtonpost.com/trove/v1/search?q=[KEYWORD]&date=[TODAY]&key=[MYKEY]"
url = url.replace('[KEYWORD]', keyword)
url = url.replace('[TODAY]', todays_date_iso())
url = url.replace('[M... | 28.5 | 94 | 0.662618 |
0fe95149b493f1a3144952211661ef38e5efc863 | 12,862 | py | Python | examples/threathunter/watchlist_operations.py | rathnadeep/cbapi-python | 55375d8796a9d88d00bd16df13d71a2d8d76dd9c | [
"MIT"
] | 3 | 2019-01-23T19:11:33.000Z | 2022-02-25T02:06:51.000Z | examples/threathunter/watchlist_operations.py | rathnadeep/cbapi-python | 55375d8796a9d88d00bd16df13d71a2d8d76dd9c | [
"MIT"
] | null | null | null | examples/threathunter/watchlist_operations.py | rathnadeep/cbapi-python | 55375d8796a9d88d00bd16df13d71a2d8d76dd9c | [
"MIT"
] | 1 | 2022-02-25T02:06:52.000Z | 2022-02-25T02:06:52.000Z | #!/usr/bin/env python
#
import sys
from cbapi.psc.threathunter.models import Watchlist, Report, Feed
from cbapi.example_helpers import eprint, read_iocs, build_cli_parser, get_cb_threathunter_object
from cbapi.errors import ObjectNotFoundError
import logging
import json
import time
import hashlib
log = logging.getLog... | 39.575385 | 128 | 0.680221 |
ed97aeaaf5c9e0a4fad0ddd5b2f12f660fedff13 | 21,753 | py | Python | test/functional/wallet_importmulti.py | PWRB-Project/PWRB | 6fc0485a7f4b7da7749cc1e86b8290c0803376d4 | [
"MIT"
] | 3 | 2020-06-19T14:18:05.000Z | 2021-05-03T13:54:03.000Z | test/functional/wallet_importmulti.py | Tofacrypto/PWRB | 8bd6311d74d2379096e3b92db56b1496567c7b9c | [
"MIT"
] | null | null | null | test/functional/wallet_importmulti.py | Tofacrypto/PWRB | 8bd6311d74d2379096e3b92db56b1496567c7b9c | [
"MIT"
] | 4 | 2020-06-12T15:13:25.000Z | 2020-11-09T08:33:35.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2017 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 the importmulti RPC."""
from test_framework.test_framework import PwrbTestFramework
from test_fram... | 48.126106 | 135 | 0.629706 |
0a1220db22121d114e6ed217426d452e3a58c8b4 | 11,358 | py | Python | models/model_base.py | xiemoyuan/Knover | 4bad22c136bed1d6e67c62f275fdd989172a3753 | [
"Apache-2.0"
] | 1 | 2020-10-29T15:39:30.000Z | 2020-10-29T15:39:30.000Z | models/model_base.py | xiemoyuan/Knover | 4bad22c136bed1d6e67c62f275fdd989172a3753 | [
"Apache-2.0"
] | null | null | null | models/model_base.py | xiemoyuan/Knover | 4bad22c136bed1d6e67c62f275fdd989172a3753 | [
"Apache-2.0"
] | null | null | null | # 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... | 36.28754 | 101 | 0.606005 |
9f86ff5da4e33c0d8fd9801d2f4d19f5ecf90ac4 | 2,128 | py | Python | Code/Ex2_Expand.py | VGarK/Mapz | e09654b261ae25fbc73c677432aff5e26f43e42f | [
"MIT"
] | null | null | null | Code/Ex2_Expand.py | VGarK/Mapz | e09654b261ae25fbc73c677432aff5e26f43e42f | [
"MIT"
] | null | null | null | Code/Ex2_Expand.py | VGarK/Mapz | e09654b261ae25fbc73c677432aff5e26f43e42f | [
"MIT"
] | null | null | null | # With this exercise we will work on expand a node to its childs
#
__authors__='TO_BE_FILLED'
__group__='DL01'
# _________________________________________________________________________________________
# Intel.ligencia Artificial
# Grau en Enginyeria Informatica
# Curs 2018- 2019
# Universitat Autonoma de Barcelona
# ... | 36.689655 | 115 | 0.629229 |
3c86a91a1b65886425c951ae9d23cedad61b1331 | 1,972 | py | Python | python2.7libs/hammer_tools/parm_presets.py | anvdev/Hammer-Tools | 0211ec837da6754e537c98624ecd07c23abab28e | [
"Apache-2.0"
] | 19 | 2019-10-09T13:48:11.000Z | 2021-06-14T01:25:23.000Z | python2.7libs/hammer_tools/parm_presets.py | anvdev/Hammer-Tools | 0211ec837da6754e537c98624ecd07c23abab28e | [
"Apache-2.0"
] | 219 | 2019-10-08T14:44:48.000Z | 2021-06-19T06:27:46.000Z | python2.7libs/hammer_tools/parm_presets.py | anvdev/Hammer-Tools | 0211ec837da6754e537c98624ecd07c23abab28e | [
"Apache-2.0"
] | 3 | 2020-02-14T06:18:06.000Z | 2020-11-25T20:47:06.000Z | from __future__ import print_function
import os
import hou
try:
from PyQt5.QtWidgets import *
from PyQt5.QtGui import *
from PyQt5.QtCore import *
Signal = pyqtSignal
except ImportError:
from PySide2.QtWidgets import *
from PySide2.QtGui import *
from PySide2.QtCore import *
from .quic... | 23.759036 | 65 | 0.681034 |
fe6dc205b2b04d4375ee03abb10455f01dbcb7c1 | 32,036 | py | Python | tests/test_recipient_csv.py | department-of-veterans-affairs/notification-utils | de019cf188fecb87ca38c9b81412a8700ff15b09 | [
"MIT"
] | 2 | 2020-04-29T17:13:37.000Z | 2021-07-01T20:47:54.000Z | tests/test_recipient_csv.py | department-of-veterans-affairs/notification-utils | de019cf188fecb87ca38c9b81412a8700ff15b09 | [
"MIT"
] | 65 | 2020-09-16T14:44:54.000Z | 2022-03-14T11:02:28.000Z | tests/test_recipient_csv.py | department-of-veterans-affairs/notification-utils | de019cf188fecb87ca38c9b81412a8700ff15b09 | [
"MIT"
] | null | null | null | import pytest
import itertools
import unicodedata
from functools import partial
from orderedset import OrderedSet
from notifications_utils import SMS_CHAR_COUNT_LIMIT
from notifications_utils.recipients import Cell, RecipientCSV, Row
from notifications_utils.template import SMSMessageTemplate
def _index_rows(rows):
... | 30.365877 | 119 | 0.539081 |
8ae097004db8fbd7b6f77518976a1f67ec7d4905 | 393 | py | Python | semester2/project/B2InvestApi/b2invest/wsgi.py | danylott/labs_oop_2course | 7ebfd4ff5bd4604bf1cc7fce7046d7506fa8aa3f | [
"Apache-2.0"
] | null | null | null | semester2/project/B2InvestApi/b2invest/wsgi.py | danylott/labs_oop_2course | 7ebfd4ff5bd4604bf1cc7fce7046d7506fa8aa3f | [
"Apache-2.0"
] | 13 | 2021-03-19T04:13:54.000Z | 2022-03-12T00:19:34.000Z | semester2/project/B2InvestApi/b2invest/wsgi.py | Neknu/labs_oop_2course | 7ebfd4ff5bd4604bf1cc7fce7046d7506fa8aa3f | [
"Apache-2.0"
] | null | null | null | """
WSGI config for b2invest project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETT... | 23.117647 | 78 | 0.78626 |
33582d4a41a0622111f19610c4c0ac8046450d75 | 1,563 | py | Python | backend_files/create_sql2json.py | HwangDongJun/I-SURF | 4bac5bb63ecbc347f0f18b512622c586e30787c6 | [
"MIT"
] | 1 | 2019-10-05T06:54:45.000Z | 2019-10-05T06:54:45.000Z | backend_files/create_sql2json.py | HwangDongJun/I-SURF | 4bac5bb63ecbc347f0f18b512622c586e30787c6 | [
"MIT"
] | null | null | null | backend_files/create_sql2json.py | HwangDongJun/I-SURF | 4bac5bb63ecbc347f0f18b512622c586e30787c6 | [
"MIT"
] | null | null | null | import re
class sql2json(object):
def __init__(self, source_file):
self.souce_file = source_file
def change_sql2json(self):
with open(self.souce_file, encoding="utf-8") as fr:
fw = open("./output_file/link.json", "w", encoding="utf-8")
final_txt = ""
fw.wri... | 45.970588 | 166 | 0.416507 |
541a40c40af2d1e0ba0be3daaf262394468cd755 | 32,566 | py | Python | python/test/asset_test.py | match/vmaf | 96dd464c08b2b5fd841498b25991c1d04acdb283 | [
"Apache-2.0"
] | null | null | null | python/test/asset_test.py | match/vmaf | 96dd464c08b2b5fd841498b25991c1d04acdb283 | [
"Apache-2.0"
] | 1 | 2018-07-20T00:03:48.000Z | 2018-07-20T00:03:48.000Z | python/test/asset_test.py | match/vmaf | 96dd464c08b2b5fd841498b25991c1d04acdb283 | [
"Apache-2.0"
] | 1 | 2021-09-06T08:32:00.000Z | 2021-09-06T08:32:00.000Z | __copyright__ = "Copyright 2016-2018, Netflix, Inc."
__license__ = "Apache, Version 2.0"
import unittest
import re
from vmaf.config import VmafConfig
from vmaf.core.asset import Asset, NorefAsset
class AssetTest(unittest.TestCase):
def test_workdir(self):
import re
asset = Asset(dataset="test",... | 51.043887 | 277 | 0.545508 |
e2bbae33f2b53432367246f9f2746b8b802abdf4 | 954 | py | Python | Course3/Lab4/validations.py | andretkj1/it-cert-automation-practice | 8dd4f5ae100a34950eabea7a0e056402b8af9d12 | [
"Apache-2.0"
] | null | null | null | Course3/Lab4/validations.py | andretkj1/it-cert-automation-practice | 8dd4f5ae100a34950eabea7a0e056402b8af9d12 | [
"Apache-2.0"
] | null | null | null | Course3/Lab4/validations.py | andretkj1/it-cert-automation-practice | 8dd4f5ae100a34950eabea7a0e056402b8af9d12 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import re
def validate_user(username, minlen):
"""Checks if the received username matches the required conditions."""
if type(username) != str:
raise TypeError("username must be a string")
if minlen < 1:
raise ValueError("minlen must be at least 1")
# Userna... | 31.8 | 74 | 0.662474 |
b28b594016b82b528b207a8e418c66663fd5dc83 | 702 | py | Python | 94/p1.py | ashishjayamohan/competitive-programming | 05c5c560c2c2eb36121c52693b8c7d084f435f9e | [
"MIT"
] | null | null | null | 94/p1.py | ashishjayamohan/competitive-programming | 05c5c560c2c2eb36121c52693b8c7d084f435f9e | [
"MIT"
] | null | null | null | 94/p1.py | ashishjayamohan/competitive-programming | 05c5c560c2c2eb36121c52693b8c7d084f435f9e | [
"MIT"
] | null | null | null | t = int(input())
answer = []
ans = []
counter = 0
for a in range(t):
counter = 0
n = int(input())
ans = [0 for d in range(n)]
line = list(input())
for b in range(len(line)-n+1):
current = [line[c] for c in range(b, b+n)]
#print(current)
check = int(ans[counter])|int(current[c... | 28.08 | 58 | 0.521368 |
f27d3be7a1c01908858fde545bf5fb5c6daab794 | 9,398 | py | Python | tests/unit/modules/test_at.py | jubrad/salt | 7960334fb726cfde45e6409da79a65535c626685 | [
"Apache-2.0"
] | 1 | 2021-08-14T13:48:38.000Z | 2021-08-14T13:48:38.000Z | tests/unit/modules/test_at.py | jubrad/salt | 7960334fb726cfde45e6409da79a65535c626685 | [
"Apache-2.0"
] | 3 | 2015-03-31T14:44:05.000Z | 2015-06-18T19:02:24.000Z | tests/unit/modules/test_at.py | jubrad/salt | 7960334fb726cfde45e6409da79a65535c626685 | [
"Apache-2.0"
] | 1 | 2020-01-02T09:03:24.000Z | 2020-01-02T09:03:24.000Z | # -*- coding: utf-8 -*-
'''
:codeauthor: :email:`Rupesh Tare <rupesht@saltstack.com>`
'''
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing Libs
from tests.support.mixins import LoaderModuleMockMixin
from tests.support.unit import TestCase, skipIf
from tests.support.mock import (
... | 46.068627 | 83 | 0.421047 |
2221e57311fe076f0415b79af9b7e47ccc8ff249 | 14,723 | py | Python | parsedmarc/utils.py | mikesiegel/parsedmarc | 2e362d9fb97c3f860c879b122ad5b767e09d89f4 | [
"Apache-2.0"
] | null | null | null | parsedmarc/utils.py | mikesiegel/parsedmarc | 2e362d9fb97c3f860c879b122ad5b767e09d89f4 | [
"Apache-2.0"
] | null | null | null | parsedmarc/utils.py | mikesiegel/parsedmarc | 2e362d9fb97c3f860c879b122ad5b767e09d89f4 | [
"Apache-2.0"
] | null | null | null | """Utility functions that might be useful for other projects"""
import logging
import os
from datetime import datetime
from datetime import timedelta
from collections import OrderedDict
from io import BytesIO
import tarfile
import tempfile
import subprocess
import shutil
import mailparser
import json
import hashlib
im... | 30.672917 | 77 | 0.621069 |
d5478a2096789b527a57505d43f2a61db99c6499 | 8,449 | py | Python | devito/ir/clusters/analysis.py | vkrGitHub/devito | 7e6db29f3ef7dc826d86a4f41de9f4eb1274676b | [
"MIT"
] | null | null | null | devito/ir/clusters/analysis.py | vkrGitHub/devito | 7e6db29f3ef7dc826d86a4f41de9f4eb1274676b | [
"MIT"
] | null | null | null | devito/ir/clusters/analysis.py | vkrGitHub/devito | 7e6db29f3ef7dc826d86a4f41de9f4eb1274676b | [
"MIT"
] | null | null | null | from collections import defaultdict
from functools import cmp_to_key
from devito.ir.clusters.queue import Queue
from devito.ir.support import (SEQUENTIAL, PARALLEL, PARALLEL_IF_ATOMIC, AFFINE,
WRAPPABLE, ROUNDABLE, TILABLE, Forward, Scope)
from devito.tools import as_tuple, flatten
__al... | 31.644195 | 89 | 0.614511 |
6557f677c67ce05c8211b41acc707b8235279d8c | 4,103 | py | Python | agents/ag_justFollowUnless1.py | a-pedram/kaggle-mab | 5d9d6d47541f6b71a5a886146928aa57a5c77591 | [
"MIT"
] | null | null | null | agents/ag_justFollowUnless1.py | a-pedram/kaggle-mab | 5d9d6d47541f6b71a5a886146928aa57a5c77591 | [
"MIT"
] | null | null | null | agents/ag_justFollowUnless1.py | a-pedram/kaggle-mab | 5d9d6d47541f6b71a5a886146928aa57a5c77591 | [
"MIT"
] | null | null | null | import numpy as np
decay_rate = 0.97
n_rounds = 2000
bandit_count = 100
total_reward = None
last_bandit = None
his_hits = None
his_record = None
my_record = None
my_hits = None
wins = None
losses = None
bandits_record = None
record_index = None
x1 = None
x2 = None
sp = np.linspace(0,1,1000)
spp = 1 - sp
def decaye... | 33.909091 | 113 | 0.672679 |
901ab5a88c220660a28bd06cab9c009ffb258417 | 2,009 | py | Python | tests/forums/test_models.py | phiratio/django-forums-app | a8d50b436bc34f74ab8c58234f5f7cf5175e00c5 | [
"MIT"
] | 22 | 2019-10-14T20:57:18.000Z | 2022-01-13T11:32:16.000Z | tests/forums/test_models.py | phiratio/django-forums-app | a8d50b436bc34f74ab8c58234f5f7cf5175e00c5 | [
"MIT"
] | 22 | 2019-10-16T12:21:59.000Z | 2021-12-16T14:05:46.000Z | tests/forums/test_models.py | phiratio/django-forums-app | a8d50b436bc34f74ab8c58234f5f7cf5175e00c5 | [
"MIT"
] | 10 | 2019-10-15T19:55:30.000Z | 2022-02-27T13:53:55.000Z | import pytest
from django.contrib.auth import get_user_model
from forums.models import Forum, Thread, UserProfile
@pytest.mark.django_db
def test_forum_model(add_forum):
forum = Forum(title='Test Forum', description='This is a Test Forum')
forum.save()
assert forum.title == 'Test Forum'
assert forum.... | 26.786667 | 96 | 0.691887 |
d2047d8c423bd26d370710490b0a6d79f1be7e87 | 4,086 | py | Python | settings.py | netzary/Kaline | 5bbbca29cc5af326f76877d3f33e037e910bb060 | [
"MIT"
] | null | null | null | settings.py | netzary/Kaline | 5bbbca29cc5af326f76877d3f33e037e910bb060 | [
"MIT"
] | null | null | null | settings.py | netzary/Kaline | 5bbbca29cc5af326f76877d3f33e037e910bb060 | [
"MIT"
] | null | null | null | # Django settings for django-ldapdb project.
import os
PROJECT_DIR=os.path.abspath(os.path.dirname(__file__))
DEBUG = True
TEMPLATE_DEBUG = DEBUG
from ldap_settings import *
ADMINS = (
# ('Your Name', 'your_email@domain.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backen... | 31.19084 | 88 | 0.732256 |
fcaaf3d1f29d57192d5badfe219dbeddbaa5a2ac | 3,375 | py | Python | coverage/population.py | sequana/resources | 0d68286563c3bbdf37a8eb14a2ec5bd7eaa28ec0 | [
"BSD-3-Clause"
] | null | null | null | coverage/population.py | sequana/resources | 0d68286563c3bbdf37a8eb14a2ec5bd7eaa28ec0 | [
"BSD-3-Clause"
] | null | null | null | coverage/population.py | sequana/resources | 0d68286563c3bbdf37a8eb14a2ec5bd7eaa28ec0 | [
"BSD-3-Clause"
] | null | null | null |
from matplotlib import rcParams
rcParams['figure.figsize'] = [12,14]
import pylab
from sequana import GenomeCov
print("READING BED files")
b1 = GenomeCov("ERR043367.bed")
print("READING BED files")
b2 = GenomeCov("ERR043371.bed")
print("READING BED files")
b3 = GenomeCov("ERR043375.bed")
print("READING BED files")
b4... | 34.438776 | 91 | 0.637926 |
5019b010dee3e273f7277c52fb3019c49d71fe06 | 2,101 | py | Python | tests/unit/test_activation_config.py | karolkieglerski/dynatrace-gcp-function | 3da9abf969aebe63cecbc7817f033123637dd12e | [
"Apache-2.0"
] | 19 | 2020-09-30T13:52:39.000Z | 2022-02-23T12:43:53.000Z | tests/unit/test_activation_config.py | karolkieglerski/dynatrace-gcp-function | 3da9abf969aebe63cecbc7817f033123637dd12e | [
"Apache-2.0"
] | 87 | 2020-10-02T19:59:43.000Z | 2022-03-31T11:54:42.000Z | tests/unit/test_activation_config.py | karolkieglerski/dynatrace-gcp-function | 3da9abf969aebe63cecbc7817f033123637dd12e | [
"Apache-2.0"
] | 13 | 2020-10-27T08:14:46.000Z | 2022-01-09T23:45:44.000Z | # Copyright 2021 Dynatrace 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 agreed t... | 48.860465 | 153 | 0.760114 |
43899194623227d8fcb61948a184755bda3d325c | 1,926 | py | Python | modules/data.remote/inst/RpTools/setup.py | Akronix/pecan | 2b64ad6599766cbd3eead1a4ca0ea0c21a00e65b | [
"NCSA",
"Unlicense"
] | null | null | null | modules/data.remote/inst/RpTools/setup.py | Akronix/pecan | 2b64ad6599766cbd3eead1a4ca0ea0c21a00e65b | [
"NCSA",
"Unlicense"
] | null | null | null | modules/data.remote/inst/RpTools/setup.py | Akronix/pecan | 2b64ad6599766cbd3eead1a4ca0ea0c21a00e65b | [
"NCSA",
"Unlicense"
] | null | null | null | from setuptools import setup
setup(
name="RpTools",
version="0.1",
description="RpTools contains the Python codes required by PEcAn's remote data module",
# url=' ',
author="Ayush Prasad",
author_email="ayush.prd@gmail.com",
license="University of Illinois/NCSA Open Source License",
pac... | 27.913043 | 91 | 0.483385 |
d1d1b6c47f6020f6b0766a31c947f59f94f56715 | 200 | py | Python | deleteNode.py | hazardinho/LeetcodeSolutions | 3f7fee882c1cdc83ecf7c9fd05d2a7f1afb130e6 | [
"MIT"
] | 1 | 2020-05-21T09:29:48.000Z | 2020-05-21T09:29:48.000Z | deleteNode.py | Ich1goSan/LeetcodeSolutions | 3f7fee882c1cdc83ecf7c9fd05d2a7f1afb130e6 | [
"MIT"
] | null | null | null | deleteNode.py | Ich1goSan/LeetcodeSolutions | 3f7fee882c1cdc83ecf7c9fd05d2a7f1afb130e6 | [
"MIT"
] | null | null | null | def deleteNode(self, node):
"""
:type node: ListNode
:rtype: void Do not return anything, modify node in-place instead.
"""
node.val = node.next.val
node.next = node.next.next
| 25 | 70 | 0.635 |
bb57ed207c797b537f46f10fd258f398dc742f10 | 398 | py | Python | src/Engine/View/Shader/temp.py | lujobi/python-3d-engine | ad684cfc7d8bfa37d5567f099f08ca411e6f0331 | [
"MIT"
] | 1 | 2021-11-22T01:39:55.000Z | 2021-11-22T01:39:55.000Z | src/Engine/View/Shader/temp.py | lujobi/python-3d-engine | ad684cfc7d8bfa37d5567f099f08ca411e6f0331 | [
"MIT"
] | null | null | null | src/Engine/View/Shader/temp.py | lujobi/python-3d-engine | ad684cfc7d8bfa37d5567f099f08ca411e6f0331 | [
"MIT"
] | null | null | null | import numpy as np
from numba import jit
dt = np.double
@jit
def shade(ray, hit):
if (hit.distance < np.Inf):
return hit.normal * 128 + 128
else:
#theta = np.acos(ray.direction.y) / - np.pi
#phi = atan2(ray.direction.x, -ray.direction.z) / - np.pi * 0.5
#return _SkyboxTexture.SampleLevel(sampler_S... | 26.533333 | 88 | 0.655779 |
ae8f96546ff23b273d04d19de4b31cbc2faf8d7a | 193 | py | Python | hellonbdev/core.py | jgibney/hello_nbdev | 8eef04a00b175dd38bb951a3412496737f363f9e | [
"Apache-2.0"
] | null | null | null | hellonbdev/core.py | jgibney/hello_nbdev | 8eef04a00b175dd38bb951a3412496737f363f9e | [
"Apache-2.0"
] | 2 | 2021-09-28T05:41:17.000Z | 2022-02-26T10:16:14.000Z | hellonbdev/core.py | jgibney/hello_nbdev | 8eef04a00b175dd38bb951a3412496737f363f9e | [
"Apache-2.0"
] | null | null | null | # AUTOGENERATED! DO NOT EDIT! File to edit: 00_core.ipynb (unless otherwise specified).
__all__ = ['say_hello']
# Cell
def say_hello(to):
"say hello to somebody"
return(f'Hello {to}') | 24.125 | 87 | 0.694301 |
a3546f1b14f6d471e62f85ba4ff24946e7bd0dcf | 1,739 | py | Python | conftest.py | ONSdigital/census-rm-print-file-service | 631851867b5b73e9bd4e106a6a0ead6d38f8f78c | [
"MIT"
] | null | null | null | conftest.py | ONSdigital/census-rm-print-file-service | 631851867b5b73e9bd4e106a6a0ead6d38f8f78c | [
"MIT"
] | 65 | 2019-07-03T09:58:07.000Z | 2021-06-02T00:18:39.000Z | conftest.py | ONSdigital/census-rm-print-file-service | 631851867b5b73e9bd4e106a6a0ead6d38f8f78c | [
"MIT"
] | 1 | 2021-04-11T07:46:13.000Z | 2021-04-11T07:46:13.000Z | import os
import shutil
from collections import namedtuple
import pytest
# Set the ENVIRONMENT to TEST before the first time config is imported so the app uses TestConfig
os.environ['ENVIRONMENT'] = 'TEST'
from config import TestConfig, Config # noqa: E402, out of order by necessity
from app.logger import logger_ini... | 37.804348 | 118 | 0.784359 |
0f7ad2317d0f58fd6731fb12d3b03a4b74a08bae | 3,760 | py | Python | oarepo_documents/api.py | Alzpeta/oarepo-documents | e3dc85fad7a2d03d13d9d3a902faebb21bae3522 | [
"MIT"
] | null | null | null | oarepo_documents/api.py | Alzpeta/oarepo-documents | e3dc85fad7a2d03d13d9d3a902faebb21bae3522 | [
"MIT"
] | 3 | 2021-01-19T12:59:37.000Z | 2021-03-19T20:52:04.000Z | oarepo_documents/api.py | Alzpeta/oarepo-documents | e3dc85fad7a2d03d13d9d3a902faebb21bae3522 | [
"MIT"
] | 5 | 2020-10-24T16:04:25.000Z | 2020-10-28T10:42:23.000Z | # -*- coding: utf-8 -*-
#
# Copyright (C) 2020 CERN.
#
# invenio-app-ils is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""ILS Document APIs."""
import uuid
import requests
from crossref.restful import Works
from flask import Respon... | 31.333333 | 102 | 0.669947 |
6fd816f2ebf1a1c9df26a52598fa33fe99fe2ae5 | 14,034 | py | Python | pytorch/libs/nnet/resnet.py | matln/asv-subtools | 5e5893ed6a4e42976c1fee7e817d07fe3474f27a | [
"Apache-2.0"
] | null | null | null | pytorch/libs/nnet/resnet.py | matln/asv-subtools | 5e5893ed6a4e42976c1fee7e817d07fe3474f27a | [
"Apache-2.0"
] | null | null | null | pytorch/libs/nnet/resnet.py | matln/asv-subtools | 5e5893ed6a4e42976c1fee7e817d07fe3474f27a | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf-8 -*-
# Copyright xmuspeech (Author: Snowdar 2020-02-28)
# Reference: torchvision.models.resnet.py
# The torchvision.models.resnet.py is modified to apply resnet in xvector framework.
import torch
import torch.nn as nn
def conv3x3(in_planes, out_planes, Conv=nn.Conv2d, stride=1, groups=1, dilation... | 39.091922 | 123 | 0.616432 |
cff2e9c4c579c2e37571b46e98e8bcdb0c8c82ea | 4,853 | py | Python | condoor/hopinfo.py | kstaniek/condoor | 77c054b29d4e286c1d7aca2c74dff86b805e1fae | [
"Apache-2.0"
] | 7 | 2016-01-20T09:04:09.000Z | 2020-02-25T07:14:38.000Z | condoor/hopinfo.py | kstaniek/condoor | 77c054b29d4e286c1d7aca2c74dff86b805e1fae | [
"Apache-2.0"
] | 55 | 2015-12-16T14:50:59.000Z | 2018-04-23T15:27:15.000Z | condoor/hopinfo.py | kstaniek/condoor | 77c054b29d4e286c1d7aca2c74dff86b805e1fae | [
"Apache-2.0"
] | 19 | 2016-04-22T06:09:32.000Z | 2022-02-25T20:21:51.000Z | """Provides HopInfo class implementation and factory function."""
from urlparse import urlparse, parse_qs
from urllib import unquote
from condoor.exceptions import InvalidHopInfoError
# Standard protocol to port mapping
protocol2port_map = {
'telnet': 23,
'ssh': 22,
'console': None,
}
def make_hop_info... | 36.488722 | 103 | 0.632598 |
55310cc3eb6f5c99ea06dea09770727f6bd213c9 | 527 | py | Python | configs/ranksort_loss/ranksort_mask_rcnn+_r50_fpn_1x_coco.py | yinchimaoliang/ranksortloss | d2103598448633a108dbda4143ab8c9c3fd515f8 | [
"Apache-2.0"
] | 210 | 2021-07-27T01:30:05.000Z | 2022-03-29T07:52:35.000Z | configs/ranksort_loss/ranksort_mask_rcnn+_r50_fpn_1x_coco.py | yinchimaoliang/ranksortloss | d2103598448633a108dbda4143ab8c9c3fd515f8 | [
"Apache-2.0"
] | 12 | 2021-07-31T06:36:36.000Z | 2022-01-04T01:51:29.000Z | configs/ranksort_loss/ranksort_mask_rcnn+_r50_fpn_1x_coco.py | yinchimaoliang/ranksortloss | d2103598448633a108dbda4143ab8c9c3fd515f8 | [
"Apache-2.0"
] | 23 | 2021-07-28T01:30:33.000Z | 2022-03-03T11:18:56.000Z | _base_ = 'ranksort_mask_rcnn_r50_fpn_1x_coco.py'
model = dict(
neck=dict(
type='FPN_CARAFE',
in_channels=[256, 512, 1024, 2048],
out_channels=256,
num_outs=5,
start_level=0,
end_level=-1,
norm_cfg=None,
act_cfg=None,
order=('conv', 'norm', 'ac... | 26.35 | 48 | 0.533207 |
c00e7d6d3ad4922e58ad33cd0abb82477f5a5b73 | 17,223 | py | Python | asposepdfcloud/models/common_figure_annotation.py | kaferi/aspose-pdf-cloud-python | 48f70742fec1e41644ec0b658db3f174ba845304 | [
"MIT"
] | 7 | 2018-06-11T17:44:44.000Z | 2022-02-08T05:52:48.000Z | asposepdfcloud/models/common_figure_annotation.py | kaferi/aspose-pdf-cloud-python | 48f70742fec1e41644ec0b658db3f174ba845304 | [
"MIT"
] | 1 | 2021-03-20T22:16:15.000Z | 2021-06-27T15:11:52.000Z | asposepdfcloud/models/common_figure_annotation.py | kaferi/aspose-pdf-cloud-python | 48f70742fec1e41644ec0b658db3f174ba845304 | [
"MIT"
] | 4 | 2018-04-18T19:41:12.000Z | 2021-06-21T13:12:24.000Z | # coding: utf-8
"""
Aspose.PDF Cloud API Reference
Copyright (c) 2021 Aspose.PDF Cloud
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the r... | 27.779032 | 298 | 0.605005 |
22c3620305ec5cfad753354e03784ff5cd18e686 | 991 | py | Python | packages/python/plotly/plotly/validators/splom/dimension/_axis.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/validators/splom/dimension/_axis.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/validators/splom/dimension/_axis.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | import _plotly_utils.basevalidators
class AxisValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="axis", parent_name="splom.dimension", **kwargs):
super(AxisValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | 36.703704 | 84 | 0.570131 |
79babba27b967a788350320ef9fa83ccaa5b3fb3 | 1,131 | py | Python | function.py | Haz001/Encrypt | 27627b44d34f8a5b10fd29c978b54446990a5a5b | [
"MIT"
] | null | null | null | function.py | Haz001/Encrypt | 27627b44d34f8a5b10fd29c978b54446990a5a5b | [
"MIT"
] | null | null | null | function.py | Haz001/Encrypt | 27627b44d34f8a5b10fd29c978b54446990a5a5b | [
"MIT"
] | null | null | null | from base64 import decodestring
import hashlib
class vars:
class boollst(object):
def __init__(self):
self.item = []
def index(self,n):
#print(n)
#print(len(self.item))
if (n < len(self.item)):
return self.item[n]
else:
return None
def add(self,b):
try:
self.it... | 16.880597 | 42 | 0.506631 |
6223eba3a151c20a0b2a2040deb765b1aad82046 | 1,510 | py | Python | day12/src/puzzle2.py | DirkdenHoedt/AdventOfCode2020 | 98e85a12ca3630dcf698f21124fb89b66418c263 | [
"MIT"
] | null | null | null | day12/src/puzzle2.py | DirkdenHoedt/AdventOfCode2020 | 98e85a12ca3630dcf698f21124fb89b66418c263 | [
"MIT"
] | null | null | null | day12/src/puzzle2.py | DirkdenHoedt/AdventOfCode2020 | 98e85a12ca3630dcf698f21124fb89b66418c263 | [
"MIT"
] | null | null | null | #!/bin/env python3
def puzzle2():
with open('input.txt', 'r') as input:
x = 0
y = 0
xw = 10
yw = 1
for line in input:
print(x, y, xw, yw)
line = line.rstrip()
if line[0] == 'N':
yw += int(line[1:])
if line[0] =... | 27.454545 | 59 | 0.266887 |
f1557f3d07a0a3e6112d8a88ff75dfe9914ecc74 | 6,046 | py | Python | isi_sdk_8_1_1/isi_sdk_8_1_1/models/smb_log_level_filters_filter.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_8_1_1/isi_sdk_8_1_1/models/smb_log_level_filters_filter.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_8_1_1/isi_sdk_8_1_1/models/smb_log_level_filters_filter.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 6
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class SmbLogLevelFiltersFilter(o... | 29.207729 | 248 | 0.564671 |
7f8276dd63d639f3611391b84a86d07ce942e05e | 9,061 | py | Python | vispy/gloo/framebuffer.py | mkkb/vispy | 8540f8d96fe3af84ba80bde6d6bf55484eaa8e3a | [
"BSD-3-Clause"
] | null | null | null | vispy/gloo/framebuffer.py | mkkb/vispy | 8540f8d96fe3af84ba80bde6d6bf55484eaa8e3a | [
"BSD-3-Clause"
] | null | null | null | vispy/gloo/framebuffer.py | mkkb/vispy | 8540f8d96fe3af84ba80bde6d6bf55484eaa8e3a | [
"BSD-3-Clause"
] | 1 | 2019-03-18T19:35:17.000Z | 2019-03-18T19:35:17.000Z | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
# -----------------------------------------------------------------------------
... | 35.533333 | 79 | 0.575544 |
f83299b25625770f517d6f28d18d2b1f91b62201 | 3,218 | py | Python | quarkchain/tools/client_version_poll.py | HAOYUatHZ/pyquarkchain | b2c7c02e4415aa26917c2cbb5e7571c9fef16c5b | [
"MIT"
] | 1 | 2018-10-23T05:48:42.000Z | 2018-10-23T05:48:42.000Z | quarkchain/tools/client_version_poll.py | skji/pyquarkchain | 090f9981b89b8873daaed36171a9bc9f27b10473 | [
"MIT"
] | 3 | 2020-03-12T18:09:40.000Z | 2021-02-26T02:33:09.000Z | quarkchain/tools/client_version_poll.py | skji/pyquarkchain | 090f9981b89b8873daaed36171a9bc9f27b10473 | [
"MIT"
] | null | null | null | import argparse
import asyncio
import rlp
from typing import Any, cast, Dict
from quarkchain.p2p import auth
from quarkchain.p2p import ecies
from quarkchain.p2p.exceptions import HandshakeFailure, HandshakeDisconnectedFailure
from quarkchain.p2p.kademlia import Node
from quarkchain.p2p.p2p_manager import QuarkServer
... | 35.362637 | 171 | 0.707893 |
d3137bd8ec2c999ce72ec44ddf269ba156c5c743 | 2,628 | py | Python | poetry/toml/prettify/elements/metadata.py | tadeoos/poetry | de73fa07386be26d32bf15044fd81bf979787b9f | [
"MIT"
] | null | null | null | poetry/toml/prettify/elements/metadata.py | tadeoos/poetry | de73fa07386be26d32bf15044fd81bf979787b9f | [
"MIT"
] | null | null | null | poetry/toml/prettify/elements/metadata.py | tadeoos/poetry | de73fa07386be26d32bf15044fd81bf979787b9f | [
"MIT"
] | null | null | null | from .. import tokens
from . import common
from .errors import InvalidElementError
class WhitespaceElement(common.TokenElement):
"""
An element that contains tokens of whitespace
"""
def __init__(self, _tokens):
common.TokenElement.__init__(self, _tokens, common.TYPE_METADATA)
def _valid... | 28.258065 | 86 | 0.634323 |
08ca55b47dca119608433ec78b6cfaeeaed42c35 | 2,446 | py | Python | test/test_user_public.py | gustavs408650/looker_sdk_30 | 8b52449f216b2cb3b84f09e2856bcea1ed4a2b0c | [
"MIT"
] | null | null | null | test/test_user_public.py | gustavs408650/looker_sdk_30 | 8b52449f216b2cb3b84f09e2856bcea1ed4a2b0c | [
"MIT"
] | null | null | null | test/test_user_public.py | gustavs408650/looker_sdk_30 | 8b52449f216b2cb3b84f09e2856bcea1ed4a2b0c | [
"MIT"
] | 1 | 2019-11-12T10:05:51.000Z | 2019-11-12T10:05:51.000Z | # coding: utf-8
"""
Looker API 3.0 Reference
### Authorization The Looker API uses Looker **API3** credentials for authorization and access control. Looker admins can create API3 credentials on Looker's **Admin/Users** page. Pass API3 credentials to the **/login** endpoint to obtain a temporary access_token.... | 59.658537 | 1,639 | 0.756337 |
9e504ed94ac7baadbbf3ecd37a49ac5e35eed667 | 85,147 | py | Python | tensorflow/contrib/learn/python/learn/estimators/head.py | imdone/tensorflow | bb4d1ef3861c83627ee9586b85ac3070a7d38335 | [
"Apache-2.0"
] | 1 | 2021-04-16T14:53:22.000Z | 2021-04-16T14:53:22.000Z | tensorflow/contrib/learn/python/learn/estimators/head.py | imdone/tensorflow | bb4d1ef3861c83627ee9586b85ac3070a7d38335 | [
"Apache-2.0"
] | 10 | 2018-02-04T18:41:52.000Z | 2018-05-02T09:00:46.000Z | tensorflow/contrib/learn/python/learn/estimators/head.py | imdone/tensorflow | bb4d1ef3861c83627ee9586b85ac3070a7d38335 | [
"Apache-2.0"
] | 4 | 2018-01-17T14:22:49.000Z | 2018-02-27T15:06:41.000Z | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 39.438166 | 95 | 0.677522 |
53cc5d0411c6e18aa92ccd7b4ea85dcbb5cba1a3 | 96 | py | Python | tests/test_mnlite.py | datadavev/mnlite | be3118cde634fce97ea689e1044803edf3cbc1ea | [
"Apache-2.0"
] | null | null | null | tests/test_mnlite.py | datadavev/mnlite | be3118cde634fce97ea689e1044803edf3cbc1ea | [
"Apache-2.0"
] | 14 | 2021-07-07T13:17:40.000Z | 2022-01-17T19:01:34.000Z | tests/test_mnlite.py | datadavev/mnlite | be3118cde634fce97ea689e1044803edf3cbc1ea | [
"Apache-2.0"
] | null | null | null | import os
import tempfile
import pytest
import mnlite
@pytest.fixture
def client():
pass
| 8.727273 | 15 | 0.75 |
1217af17278f5abdb6016ad19048a626ff387e98 | 429 | py | Python | medium_PermutationStep.py | GabrielGhe/CoderbyteChallenges | 5601dbc24c95a65fed04896de2f534417c2e730d | [
"MIT"
] | 1 | 2020-11-04T15:30:18.000Z | 2020-11-04T15:30:18.000Z | medium_PermutationStep.py | GabrielGhe/CoderbyteChallenges | 5601dbc24c95a65fed04896de2f534417c2e730d | [
"MIT"
] | null | null | null | medium_PermutationStep.py | GabrielGhe/CoderbyteChallenges | 5601dbc24c95a65fed04896de2f534417c2e730d | [
"MIT"
] | null | null | null | import itertools
"""
Given a number,
using the digits in that number
find the next biggest number
"""
def PermutationStep(num):
arr = list(str(num))
lis = set()
for perm in itertools.permutations(arr, len(arr)):
x = int("".join(list(perm)))
if x > num:
lis.add(x)
lis = list(lis)
lis.sort... | 16.5 | 52 | 0.599068 |
95fc82a9d7d7d5d2d842939c8d223a733604d6c8 | 7,975 | py | Python | additional.py | MehMasha/shootergame | eef65758ce93b1b69e80adaaabb9b83e0e3d6acb | [
"CC0-1.0"
] | null | null | null | additional.py | MehMasha/shootergame | eef65758ce93b1b69e80adaaabb9b83e0e3d6acb | [
"CC0-1.0"
] | null | null | null | additional.py | MehMasha/shootergame | eef65758ce93b1b69e80adaaabb9b83e0e3d6acb | [
"CC0-1.0"
] | null | null | null | from pygame import *
from random import randint
from time import time as timer #импортируем функцию для засекания времени, чтобы интерпретатор не искал эту функцию в pygame модуле time, даём ей другое название сами
#подгружаем отдельно функции для работы со шрифтом
font.init()
font1 = font.SysFont('Arial', 80)
win = fo... | 35.287611 | 166 | 0.607147 |
771c00409921c49c9afc83eafed731f0856eff36 | 10,204 | py | Python | IPython/frontend/qt/console/rich_ipython_widget.py | btel/ipython | 6ecc466f4571913479172d974a6dd8bea5658941 | [
"BSD-3-Clause-Clear"
] | null | null | null | IPython/frontend/qt/console/rich_ipython_widget.py | btel/ipython | 6ecc466f4571913479172d974a6dd8bea5658941 | [
"BSD-3-Clause-Clear"
] | null | null | null | IPython/frontend/qt/console/rich_ipython_widget.py | btel/ipython | 6ecc466f4571913479172d974a6dd8bea5658941 | [
"BSD-3-Clause-Clear"
] | null | null | null | # Standard libary imports.
from base64 import decodestring
import os
import re
# System libary imports.
from IPython.external.qt import QtCore, QtGui
# Local imports
from IPython.frontend.qt.svg import save_svg, svg_to_clipboard, svg_to_image
from ipython_widget import IPythonWidget
class RichIPythonWidget(IPythonW... | 40.332016 | 80 | 0.539788 |
39e7a1dddb12b0b6a6502bce6522eb6537736c4c | 17,057 | py | Python | synapse/config/emailconfig.py | arekinath/synapse | 7e179599848a1005f753a1ab58953107fc2540df | [
"Apache-2.0"
] | null | null | null | synapse/config/emailconfig.py | arekinath/synapse | 7e179599848a1005f753a1ab58953107fc2540df | [
"Apache-2.0"
] | null | null | null | synapse/config/emailconfig.py | arekinath/synapse | 7e179599848a1005f753a1ab58953107fc2540df | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2015-2016 OpenMarket Ltd
# Copyright 2017-2018 New Vector Ltd
# Copyright 2019 The Matrix.org Foundation C.I.C.
#
# 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 Licens... | 43.073232 | 95 | 0.626429 |
825bac1d77f70b3b7735b9c53634e0ea6412fbfc | 2,795 | py | Python | end_to_end/fraud_detection/xgboost_starter_script.py | pollyrolly/amazon-sagemaker-examples | b1a56b4dc96201b769f7bbc1e207649423874586 | [
"Apache-2.0"
] | 2,610 | 2020-10-01T14:14:53.000Z | 2022-03-31T18:02:31.000Z | end_to_end/fraud_detection/xgboost_starter_script.py | pollyrolly/amazon-sagemaker-examples | b1a56b4dc96201b769f7bbc1e207649423874586 | [
"Apache-2.0"
] | 1,959 | 2020-09-30T20:22:42.000Z | 2022-03-31T23:58:37.000Z | end_to_end/fraud_detection/xgboost_starter_script.py | pollyrolly/amazon-sagemaker-examples | b1a56b4dc96201b769f7bbc1e207649423874586 | [
"Apache-2.0"
] | 2,052 | 2020-09-30T22:11:46.000Z | 2022-03-31T23:02:51.000Z | import argparse
import json
import os
import pickle
import sys
import pandas as pd
import xgboost as xgb
if __name__ == "__main__":
parser = argparse.ArgumentParser()
# Hyperparameters are described here
parser.add_argument("--num_round", type=int, default=999)
parser.add_argument("--max_depth", type... | 36.776316 | 100 | 0.655456 |
fc9296af6b6ea2a5127396ec7da65978f9a1e149 | 27,158 | py | Python | bitchia/server/address_manager.py | thinkboxx/bitchia-blockchain | 6c71ee9bab50497362071bbaf45c4114485d4098 | [
"Apache-2.0"
] | null | null | null | bitchia/server/address_manager.py | thinkboxx/bitchia-blockchain | 6c71ee9bab50497362071bbaf45c4114485d4098 | [
"Apache-2.0"
] | null | null | null | bitchia/server/address_manager.py | thinkboxx/bitchia-blockchain | 6c71ee9bab50497362071bbaf45c4114485d4098 | [
"Apache-2.0"
] | null | null | null | import logging
import math
import time
from asyncio import Lock
from random import choice, randrange
from secrets import randbits
from typing import Dict, List, Optional, Set, Tuple
from bitchia.types.peer_info import PeerInfo, TimestampedPeerInfo
from bitchia.util.hash import std_hash
from bitchia.util.ints import ui... | 41.210926 | 119 | 0.598535 |
a76d2261d036e2d68ed0b3b6d469c7e8b8894e32 | 80 | py | Python | ex23.py | cohadar/learn-python-the-hard-way | 10d88fe59a8abc5303661cfe91c6db9fa71bdd56 | [
"MIT"
] | null | null | null | ex23.py | cohadar/learn-python-the-hard-way | 10d88fe59a8abc5303661cfe91c6db9fa71bdd56 | [
"MIT"
] | null | null | null | ex23.py | cohadar/learn-python-the-hard-way | 10d88fe59a8abc5303661cfe91c6db9fa71bdd56 | [
"MIT"
] | null | null | null | # best excercise so far!
# I read some of this: https://github.com/pydata/pandas | 40 | 55 | 0.7375 |
4830a672a2a14e0814f6d27212b7be260489330c | 18,200 | py | Python | precise_bbcode/bbcode/parser.py | slasyz/django-precise-bbcode | 8734486a93c0f02a15b401571927ecbba088438e | [
"BSD-3-Clause"
] | null | null | null | precise_bbcode/bbcode/parser.py | slasyz/django-precise-bbcode | 8734486a93c0f02a15b401571927ecbba088438e | [
"BSD-3-Clause"
] | null | null | null | precise_bbcode/bbcode/parser.py | slasyz/django-precise-bbcode | 8734486a93c0f02a15b401571927ecbba088438e | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Standard library imports
from __future__ import unicode_literals
from collections import defaultdict
from functools import reduce
import re
# Third party imports
# Local application / specific library imports
from precise_bbcode.bbcode.regexes import url_re
from precise_bbcode.conf import se... | 43.230404 | 138 | 0.581648 |
20cbe569f2e22ad9c913a4bad69d4f912640ee75 | 4,431 | py | Python | smarttob/hooks.py | Ehtasham-Muzaffar/smarttob | 8674634992d9107b8b9792b85db0116e56718d43 | [
"MIT"
] | null | null | null | smarttob/hooks.py | Ehtasham-Muzaffar/smarttob | 8674634992d9107b8b9792b85db0116e56718d43 | [
"MIT"
] | null | null | null | smarttob/hooks.py | Ehtasham-Muzaffar/smarttob | 8674634992d9107b8b9792b85db0116e56718d43 | [
"MIT"
] | null | null | null | from . import __version__ as app_version
app_name = "smarttob"
app_title = "Smarttob"
app_publisher = "RF"
app_description = "Smart Tobacco"
app_icon = "octicon octicon-file-directory"
app_color = "grey"
app_email = "hamza@rf.com"
app_license = "MIT"
# Includes in <head>
# ------------------
# include js, css files ... | 23.078125 | 78 | 0.66599 |
0ceba61e5401e3b04b65c58ba13295e2aa84dbac | 2,223 | py | Python | classification_loaders/encodedcc.py | cloughurd/SimCLR | 79029b6cb422aa16c939bcc550ca4acd495c2651 | [
"MIT"
] | null | null | null | classification_loaders/encodedcc.py | cloughurd/SimCLR | 79029b6cb422aa16c939bcc550ca4acd495c2651 | [
"MIT"
] | null | null | null | classification_loaders/encodedcc.py | cloughurd/SimCLR | 79029b6cb422aa16c939bcc550ca4acd495c2651 | [
"MIT"
] | 1 | 2020-04-02T01:53:59.000Z | 2020-04-02T01:53:59.000Z | import os
import torch
from torch.utils.data import Dataset, DataLoader
from PIL import Image
import pandas as pd
class CompCars(Dataset):
def __init__(self, data_root, encodings_loc, train=True, transform=None, label_type='make'):
self.transform = transform
self.data_root = data_root
self.... | 35.854839 | 96 | 0.541161 |
992278a31649867b5cd84ddeb8f8bab73c023d16 | 706 | py | Python | 2021/tests/test_day20.py | Stannislav/Advent-of-Code | b9571e71e1acedf74be3bb32f03c9877f57c48dd | [
"MIT"
] | 2 | 2020-12-12T17:06:47.000Z | 2021-12-15T04:06:57.000Z | 2021/tests/test_day20.py | Stannislav/Advent-of-Code | b9571e71e1acedf74be3bb32f03c9877f57c48dd | [
"MIT"
] | null | null | null | 2021/tests/test_day20.py | Stannislav/Advent-of-Code | b9571e71e1acedf74be3bb32f03c9877f57c48dd | [
"MIT"
] | null | null | null | from aoc2021.solutions import day20
data = """\
..#.#..#####.#.#.#.###.##.....###.##.#..###.####..#####..#....#..#..##..###..######.###...####..#..#####..##..#.#####...##.#.#..#.##..#.#......#.###.######.###.####...#.##.##..#..#..#####.....#.#....###..#.##......#.....#..#..#..##..#...##.######.####.####.#.#...#.......... | 39.222222 | 512 | 0.147309 |
ac34ad4cb913d96caa43a226ecb6a68a5b2b1503 | 14,242 | py | Python | python/ccxt/async_support/btctradeua.py | kaminskypavel/ccxt | a75f90a47bd7a2a301e79fefa62981b3323d75a5 | [
"MIT"
] | 3 | 2020-05-10T12:51:24.000Z | 2021-04-20T21:36:43.000Z | python/ccxt/async_support/btctradeua.py | XiaoBinNumberOne/ccxt | b8aea97b018ef633df9866f44bf61565f44d8e6d | [
"MIT"
] | null | null | null | python/ccxt/async_support/btctradeua.py | XiaoBinNumberOne/ccxt | b8aea97b018ef633df9866f44bf61565f44d8e6d | [
"MIT"
] | 2 | 2021-06-08T13:50:53.000Z | 2021-06-08T13:55:52.000Z | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.async_support.base.exchange import Exchange
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import ArgumentsRequ... | 41.643275 | 204 | 0.491504 |
a7fb179d5ffa5bc0aad2d7b68fee4afcb5064041 | 1,470 | py | Python | tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_sync.py | znowdev/gapic-generator-python | 18ba7a0933461dfa3ecfccf48f2233d65824144a | [
"Apache-2.0"
] | null | null | null | tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_sync.py | znowdev/gapic-generator-python | 18ba7a0933461dfa3ecfccf48f2233d65824144a | [
"Apache-2.0"
] | null | null | null | tests/integration/goldens/asset/samples/generated_samples/cloudasset_generated_asset_v1_asset_service_list_assets_sync.py | znowdev/gapic-generator-python | 18ba7a0933461dfa3ecfccf48f2233d65824144a | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 31.276596 | 85 | 0.75034 |
4447a0ca255b2f1556540426283406ee42cc1682 | 16,032 | py | Python | project/subscriptions/views.py | hawa-ko-reporter/api | 4c8b0336f324fa0965c4080ffc2763068fe5e521 | [
"MIT"
] | null | null | null | project/subscriptions/views.py | hawa-ko-reporter/api | 4c8b0336f324fa0965c4080ffc2763068fe5e521 | [
"MIT"
] | 10 | 2020-07-20T15:41:02.000Z | 2021-09-22T19:28:37.000Z | project/subscriptions/views.py | hawa-ko-reporter/api | 4c8b0336f324fa0965c4080ffc2763068fe5e521 | [
"MIT"
] | null | null | null | # Create your views here.
import json
import os
import random
import traceback
import requests
from django.http import JsonResponse
from django.shortcuts import render, redirect
from django.views.decorators.csrf import csrf_exempt
from rest_framework.decorators import api_view, permission_classes
from rest_framework.p... | 39.390663 | 122 | 0.632236 |
a924dd4d8e279d37e671ab41a3ea959b84b71e0d | 4,185 | py | Python | webware/WebUtils/Funcs.py | PeaceWorksTechnologySolutions/w4py3 | 7f9e7088034e3e3ac53158edfa4f377b5b2f45fe | [
"MIT"
] | 3 | 2019-12-24T16:00:10.000Z | 2020-03-26T15:03:04.000Z | webware/WebUtils/Funcs.py | PeaceWorksTechnologySolutions/w4py3 | 7f9e7088034e3e3ac53158edfa4f377b5b2f45fe | [
"MIT"
] | 9 | 2020-01-03T18:58:25.000Z | 2020-01-09T18:36:23.000Z | webware/WebUtils/Funcs.py | PeaceWorksTechnologySolutions/w4py3 | 7f9e7088034e3e3ac53158edfa4f377b5b2f45fe | [
"MIT"
] | 1 | 2020-01-02T22:06:52.000Z | 2020-01-02T22:06:52.000Z | """WebUtils.Funcs
This module provides some basic functions that are useful
in HTML and web development.
You can safely import * from WebUtils.Funcs if you like.
"""
# Aliases for URL encoding and decoding functions:
from urllib.parse import quote_plus as urlEncode, unquote_plus as urlDecode
__all__ = [
'htmlEn... | 28.862069 | 77 | 0.598805 |
03878a73a4c81391e3f8cfe217d75b62ece610f9 | 15,305 | py | Python | src/prover/miscs.py | letonchanh/dig-m3 | 98b6f2bd6efeddbd8c047e77f4d3b506abf022b9 | [
"MIT"
] | null | null | null | src/prover/miscs.py | letonchanh/dig-m3 | 98b6f2bd6efeddbd8c047e77f4d3b506abf022b9 | [
"MIT"
] | null | null | null | src/prover/miscs.py | letonchanh/dig-m3 | 98b6f2bd6efeddbd8c047e77f4d3b506abf022b9 | [
"MIT"
] | null | null | null | import pdb
import time
import z3
import settings
import helpers.vcommon as CM
from helpers.z3utils import Z3
DBG = pdb.set_trace
mlog = CM.getLogger(__name__, settings.logger_level)
class Miscs:
pre_kw = '_pre'
pre_d = {} # v -> pre_v
cur_d = {} # pre_v -> v
@classmethod
def is_trans(cls, f)... | 29.718447 | 229 | 0.448546 |
1a76474973d69f64cffb0086b8c4f513f750546e | 9,453 | py | Python | GoogleScraper/user_agents.py | xiaoganghan/GoogleScraper | 551a401ecb2785a6261f1ecb98cdf7855f47a640 | [
"Apache-2.0"
] | 2 | 2018-09-11T21:12:21.000Z | 2019-05-31T14:05:55.000Z | GoogleScraper/user_agents.py | xiaoganghan/GoogleScraper | 551a401ecb2785a6261f1ecb98cdf7855f47a640 | [
"Apache-2.0"
] | null | null | null | GoogleScraper/user_agents.py | xiaoganghan/GoogleScraper | 551a401ecb2785a6261f1ecb98cdf7855f47a640 | [
"Apache-2.0"
] | 1 | 2019-01-05T17:44:29.000Z | 2019-01-05T17:44:29.000Z | # -*- coding: utf-8 -*-
import random
# Several different User-Agents to diversify the requests.
# Keep the User-Agents updated. Last update: 13th November 2014
# Get them here: http://techblog.willshouse.com/2012/01/03/most-common-user-agents/
user_agents = [
'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537... | 90.894231 | 142 | 0.696498 |
7679132a8f38a84b123703dd86cf840a9775c314 | 140 | py | Python | tiers/apps.py | appsembler/django-tiers | 7c59be2a31a767e1917bc4296c1c986427e35b8a | [
"MIT"
] | 2 | 2017-04-10T19:50:35.000Z | 2021-08-13T09:00:07.000Z | tiers/apps.py | appsembler/django-tiers | 7c59be2a31a767e1917bc4296c1c986427e35b8a | [
"MIT"
] | 28 | 2017-03-07T19:47:15.000Z | 2022-03-30T13:12:26.000Z | tiers/apps.py | appsembler/django-tiers | 7c59be2a31a767e1917bc4296c1c986427e35b8a | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class TiersConfig(AppConfig):
name = 'tiers'
label = 'tiers'
def ready(self):
pass
| 14 | 33 | 0.635714 |
43157a3b8272101996f5ee38747a5b2ca7c213f4 | 859 | py | Python | configs/configs.py | YuXie96/time | 8539d55d2449c712f54331b06720ab7faf3593df | [
"MIT"
] | null | null | null | configs/configs.py | YuXie96/time | 8539d55d2449c712f54331b06720ab7faf3593df | [
"MIT"
] | null | null | null | configs/configs.py | YuXie96/time | 8539d55d2449c712f54331b06720ab7faf3593df | [
"MIT"
] | null | null | null | """
Configurations for the project
format adapted from https://github.com/gyyang/olfaction_evolution
"""
class BaseConfig(object):
def __init__(self):
"""
model_type: model type, eg. "ConvRNNBL"
task_type: task type, eg. "n_back"
"""
self.experiment_name = None
self... | 24.542857 | 65 | 0.603027 |
48808c1845209c579b44aa1841de2f7d4571d603 | 7,494 | py | Python | library/oneview_managed_san.py | nabhajit-ray/oneview-ansible | b31af8a696013bac7a1900748a2fa5ba491fe8e2 | [
"Apache-2.0"
] | 108 | 2016-06-28T18:14:08.000Z | 2022-02-21T09:16:06.000Z | library/oneview_managed_san.py | HPE-Japan-Presales/oneview-ansible | 26eb13354333d862d9e80f07e3fe9bbe2eb59af3 | [
"Apache-2.0"
] | 248 | 2016-07-14T12:50:17.000Z | 2022-02-06T18:57:16.000Z | library/oneview_managed_san.py | HPE-Japan-Presales/oneview-ansible | 26eb13354333d862d9e80f07e3fe9bbe2eb59af3 | [
"Apache-2.0"
] | 88 | 2016-06-29T15:52:44.000Z | 2022-03-10T12:34:41.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
###
# Copyright (2016-2019) Hewlett Packard Enterprise Development LP
#
# Licensed under the Apache License, Version 2.0 (the "License");
# You may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licen... | 34.855814 | 120 | 0.671604 |
95b051825234e3996545e5b356b03829e2182ff4 | 48,081 | py | Python | hunter_douglas/pm_utils.py | thispl/hunter-douglas | b3a3a8a7087a042703ff33259a62b8b13ca87c82 | [
"MIT"
] | null | null | null | hunter_douglas/pm_utils.py | thispl/hunter-douglas | b3a3a8a7087a042703ff33259a62b8b13ca87c82 | [
"MIT"
] | null | null | null | hunter_douglas/pm_utils.py | thispl/hunter-douglas | b3a3a8a7087a042703ff33259a62b8b13ca87c82 | [
"MIT"
] | 1 | 2019-12-31T06:52:12.000Z | 2019-12-31T06:52:12.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2017, VHRS and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe,os,base64
import requests
import datetime
import json,calendar
from datetime import datetime,timedelta,date,time
import datetime as dt
from frappe.... | 44.355166 | 149 | 0.571078 |
485725b4d7dd25e82ae70da0eb7179c6157e6ba5 | 10,444 | py | Python | src/third_party/wiredtiger/bench/workgen/latency_metric.py | benety/mongo | 203430ac9559f82ca01e3cbb3b0e09149fec0835 | [
"Apache-2.0"
] | null | null | null | src/third_party/wiredtiger/bench/workgen/latency_metric.py | benety/mongo | 203430ac9559f82ca01e3cbb3b0e09149fec0835 | [
"Apache-2.0"
] | null | null | null | src/third_party/wiredtiger/bench/workgen/latency_metric.py | benety/mongo | 203430ac9559f82ca01e3cbb3b0e09149fec0835 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Public Domain 2014-present MongoDB, Inc.
# Public Domain 2008-2014 WiredTiger, Inc.
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a com... | 37.84058 | 80 | 0.612984 |
5224d44425b90d2bcf783e8ce4b2333b50d4e4d8 | 2,835 | py | Python | trackers/SiamRPN/siamrpn.py | meetdave06/THOR | af7012cc6a42cb6e71e9f8d4bd9e317aac20b99f | [
"MIT"
] | 163 | 2019-07-31T14:00:05.000Z | 2022-03-13T12:01:06.000Z | trackers/SiamRPN/siamrpn.py | meetdave06/THOR | af7012cc6a42cb6e71e9f8d4bd9e317aac20b99f | [
"MIT"
] | 15 | 2019-08-01T03:41:26.000Z | 2021-06-02T01:57:41.000Z | trackers/SiamRPN/siamrpn.py | meetdave06/THOR | af7012cc6a42cb6e71e9f8d4bd9e317aac20b99f | [
"MIT"
] | 30 | 2019-08-01T04:10:08.000Z | 2021-07-18T08:57:16.000Z | # --------------------------------------------------------
# DaSiamRPN
# Licensed under The MIT License
# Written by Qiang Wang (wangqiang2015 at ia.ac.cn)
# Revised for THOR by Axel Sauer (axel.sauer@tum.de)
# --------------------------------------------------------
import numpy as np
import torch
from torch.autograd... | 34.573171 | 121 | 0.619048 |
e574f77f39398d9da92de4719317f637bb9fb4d9 | 15,528 | py | Python | run_lrp.py | yzmsp7/sponsored-classification | 3100a8c44abbd3cd0a282a61692cbbe6d0cf6789 | [
"MIT"
] | null | null | null | run_lrp.py | yzmsp7/sponsored-classification | 3100a8c44abbd3cd0a282a61692cbbe6d0cf6789 | [
"MIT"
] | null | null | null | run_lrp.py | yzmsp7/sponsored-classification | 3100a8c44abbd3cd0a282a61692cbbe6d0cf6789 | [
"MIT"
] | null | null | null | import imp
import numpy as np
import pandas as pd
import os
import re
import pickle
import time
import string
import json
import random
import argparse
import keras
import keras.backend
import keras.models
from keras.preprocessing import text, sequence
from keras.datasets import mnist
from keras.models import Model
... | 35.131222 | 139 | 0.614632 |
4971acb7e2de47cec3b4f2dd810b674b0d552b93 | 1,824 | py | Python | poc/classes/ContextPredicateInstance.py | bookofproofs/fpl | 527b43b0f8bb3d459ee906e5ed8524a676ce3a2c | [
"MIT"
] | 4 | 2021-11-08T10:09:46.000Z | 2021-11-13T22:25:46.000Z | poc/classes/ContextPredicateInstance.py | bookofproofs/fpl | 527b43b0f8bb3d459ee906e5ed8524a676ce3a2c | [
"MIT"
] | 1 | 2020-09-04T13:02:09.000Z | 2021-06-16T07:07:44.000Z | poc/classes/ContextPredicateInstance.py | bookofproofs/fpl | 527b43b0f8bb3d459ee906e5ed8524a676ce3a2c | [
"MIT"
] | 1 | 2021-11-08T10:10:12.000Z | 2021-11-08T10:10:12.000Z | """
This file was generated by the tool TatSuSAG (the TatSu syntax analyser generator)
Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
"""
from poc.classes.AuxISourceAnalyser import AuxISourceAnalyser
from poc.classes.AuxInterpretation import AuxInterpretation
from poc.c... | 49.297297 | 109 | 0.740132 |
f6b85730ebe42be2afefcd335ed438bd0cc0a541 | 11,117 | py | Python | proteus/tests/levelset/vortex2D/ls_vortex_2d_p.py | dloney/proteus | 615cdf57f765b2e99bac904bb6eb71e39e58ab56 | [
"MIT"
] | null | null | null | proteus/tests/levelset/vortex2D/ls_vortex_2d_p.py | dloney/proteus | 615cdf57f765b2e99bac904bb6eb71e39e58ab56 | [
"MIT"
] | null | null | null | proteus/tests/levelset/vortex2D/ls_vortex_2d_p.py | dloney/proteus | 615cdf57f765b2e99bac904bb6eb71e39e58ab56 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from builtins import object
from proteus import *
from proteus.default_p import *
from math import *
from .vortex2D import *
from proteus.mprans import NCLS
#import Profiling
LevelModelType = NCLS.LevelModel
logEvent = Profiling.logEvent
name=soname+"_ls"
nd=2
## \page Tests Te... | 47.508547 | 166 | 0.507511 |
5804792dfa8263ec1fa6e1f252b16ffc856a10b3 | 1,633 | py | Python | server/exporters/exportManager.py | victormanoliu97/BooX- | e888f0b777185e8227a7ea3a10641c1ad0d8da2e | [
"MIT"
] | 1 | 2018-03-28T06:33:29.000Z | 2018-03-28T06:33:29.000Z | server/exporters/exportManager.py | victormanoliu97/BooX- | e888f0b777185e8227a7ea3a10641c1ad0d8da2e | [
"MIT"
] | null | null | null | server/exporters/exportManager.py | victormanoliu97/BooX- | e888f0b777185e8227a7ea3a10641c1ad0d8da2e | [
"MIT"
] | null | null | null | import cx_Oracle
import os
from io import StringIO
import datetime
conn = cx_Oracle.connect('TW/TWBooX@localhost:1521')
cursor = conn.cursor()
userReport = []
userWeeklyReport = []
genres = {}
genresCount = 0;
languagesCount = 0;
offersCount = 0;
usersCount = 0;
def getGenres():
cursor.execute("SELECT NAME FROM... | 25.920635 | 131 | 0.731782 |
7b70501f8f9aa57212bb8ef06ed748517b985331 | 1,147 | py | Python | pymoo/operators/mutation/inversion.py | jarreguit/pymoo | 0496a3c6765826148d8bab21650736760517dd25 | [
"Apache-2.0"
] | 762 | 2018-06-05T20:56:09.000Z | 2021-09-14T09:09:42.000Z | pymoo/operators/mutation/inversion.py | jarreguit/pymoo | 0496a3c6765826148d8bab21650736760517dd25 | [
"Apache-2.0"
] | 176 | 2018-09-05T18:37:05.000Z | 2021-09-14T01:18:43.000Z | pymoo/operators/mutation/inversion.py | jarreguit/pymoo | 0496a3c6765826148d8bab21650736760517dd25 | [
"Apache-2.0"
] | 160 | 2018-08-05T05:31:20.000Z | 2021-09-14T09:09:45.000Z | import numpy as np
from pymoo.core.mutation import Mutation
from pymoo.operators.crossover.ox import random_sequence
def inversion_mutation(y, seq, inplace=True):
y = y if inplace else np.copy(y)
seq = seq if not None else random_sequence(len(y))
start, end = seq
y[start:end + 1] = np.flip(y[start:... | 27.309524 | 126 | 0.588492 |
458e8b06aa574845ec37fcf8d059c6fc2e4a473c | 3,728 | py | Python | tools/nntool/generation/generators/kernels/mult8/global_pool_kernels_generator.py | VishalSharma0309/gap_sdk | 09ccc594a3696a84953b732022cecae11e751c97 | [
"Apache-2.0"
] | null | null | null | tools/nntool/generation/generators/kernels/mult8/global_pool_kernels_generator.py | VishalSharma0309/gap_sdk | 09ccc594a3696a84953b732022cecae11e751c97 | [
"Apache-2.0"
] | null | null | null | tools/nntool/generation/generators/kernels/mult8/global_pool_kernels_generator.py | VishalSharma0309/gap_sdk | 09ccc594a3696a84953b732022cecae11e751c97 | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2020 GreenWaves Technologies, SAS
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
# This progr... | 43.348837 | 115 | 0.645923 |
184f3cd88e8f46a1885bc5dcc63f245d7bf08051 | 12,189 | py | Python | SPARK_ALGO_BIGQUERY_BIGTABLE/w_data_generator.py | revanwabale/SPARK_WORKS | 03062180141e3a6d51948ec1ceaf88f1edcbb110 | [
"Apache-2.0"
] | null | null | null | SPARK_ALGO_BIGQUERY_BIGTABLE/w_data_generator.py | revanwabale/SPARK_WORKS | 03062180141e3a6d51948ec1ceaf88f1edcbb110 | [
"Apache-2.0"
] | null | null | null | SPARK_ALGO_BIGQUERY_BIGTABLE/w_data_generator.py | revanwabale/SPARK_WORKS | 03062180141e3a6d51948ec1ceaf88f1edcbb110 | [
"Apache-2.0"
] | null | null | null | from pyspark.sql import SparkSession
from pyspark import SparkFiles, SparkConf, SparkContext
from pyspark.sql.functions import *
from pyspark.sql.types import *
import json
import argparse
from pyspark.sql.functions import col
from datetime import datetime, timedelta
import time
import os
import sys
weekly_schema = St... | 40.227723 | 161 | 0.660185 |
1c715a06f675142809fb0c2a45b12e87f2623029 | 3,134 | py | Python | src/ai/backend/client/cli/files.py | dexterastin/backend.ai-client-py | 91a80cb5b1ebec52016db7e976571949386e6bda | [
"MIT"
] | null | null | null | src/ai/backend/client/cli/files.py | dexterastin/backend.ai-client-py | 91a80cb5b1ebec52016db7e976571949386e6bda | [
"MIT"
] | null | null | null | src/ai/backend/client/cli/files.py | dexterastin/backend.ai-client-py | 91a80cb5b1ebec52016db7e976571949386e6bda | [
"MIT"
] | null | null | null | from datetime import datetime
import json
from pathlib import Path
import sys
import click
from humanize import naturalsize
from tabulate import tabulate
from . import main
from .pretty import print_wait, print_done, print_error, print_fail
from ..session import Session
@main.command()
@click.argument('session_id',... | 31.029703 | 74 | 0.597639 |
499ef85952f7622abb7f56373420e6cde5bdb59e | 1,579 | py | Python | 101-150/106.py | yshshadow/Leetcode | 5097f69bb0050d963c784d6bc0e88a7e871568ed | [
"MIT"
] | null | null | null | 101-150/106.py | yshshadow/Leetcode | 5097f69bb0050d963c784d6bc0e88a7e871568ed | [
"MIT"
] | null | null | null | 101-150/106.py | yshshadow/Leetcode | 5097f69bb0050d963c784d6bc0e88a7e871568ed | [
"MIT"
] | null | null | null | # Given inorder and postorder traversal of a tree, construct the binary tree.
#
# Note:
# You may assume that duplicates do not exist in the tree.
#
# For example, given
#
# inorder = [9,3,15,20,7]
# postorder = [9,15,7,20,3]
# Return the following binary tree:
#
# 3
# / \
# 9 20
# / \
# 15 7
# Def... | 29.792453 | 112 | 0.583914 |
c39dfe5b67b1a0b48f807835e7c810d3aabf3171 | 5,065 | py | Python | import-report/src/reportimporter/models.py | imuledx/connectors | 5af3b00adc7a8ea4059494600dfdcad9ac7b9cd2 | [
"Apache-2.0"
] | null | null | null | import-report/src/reportimporter/models.py | imuledx/connectors | 5af3b00adc7a8ea4059494600dfdcad9ac7b9cd2 | [
"Apache-2.0"
] | 2 | 2021-04-29T11:32:29.000Z | 2021-05-31T14:23:52.000Z | import-report/src/reportimporter/models.py | 0snap/connectors | a2ee3328504fd89a634fe57844d91c6be1c48dd4 | [
"Apache-2.0"
] | 1 | 2021-11-01T16:05:15.000Z | 2021-11-01T16:05:15.000Z | import json
import os
import re
from typing import List, Optional, Dict, Pattern, Any
from pydantic import BaseModel, validator
from reportimporter.constants import (
COMMENT_INDICATOR,
CONFIG_PATH,
OBSERVABLE_DETECTION_CUSTOM_REGEX,
OBSERVABLE_DETECTION_OPTIONS,
)
class Observable(BaseModel):
nam... | 31.07362 | 83 | 0.590721 |
1ba2d82802e2e9f5f72367aa87c67280bddb3a20 | 16,050 | py | Python | instascrape/instascrape.py | tnychn/instascrape | 7aaf3c1a1786bbe80059ed6e0d93442a19a6f475 | [
"MIT"
] | 80 | 2020-05-28T17:22:14.000Z | 2022-03-25T07:15:51.000Z | instascrape/instascrape.py | AlphaXenon/InstaScrape | 7aaf3c1a1786bbe80059ed6e0d93442a19a6f475 | [
"MIT"
] | 23 | 2020-05-25T12:45:40.000Z | 2022-03-06T05:44:41.000Z | instascrape/instascrape.py | AlphaXenon/InstaScrape | 7aaf3c1a1786bbe80059ed6e0d93442a19a6f475 | [
"MIT"
] | 14 | 2020-06-28T05:52:28.000Z | 2022-03-28T04:27:50.000Z | import re
import sys
import json
import time
import random
import logging
import traceback
from hashlib import md5
from contextlib import contextmanager
import requests
from requests.cookies import RequestsCookieJar
from instascrape.constants import *
from instascrape.structures import *
from instascrape.exceptions i... | 42.236842 | 159 | 0.60162 |
07c3452c00b59dc82957dc98ef1fe06763fef0f3 | 1,943 | py | Python | test/test_storage_vd_member_ep_list.py | sdnit-se/intersight-python | 551f7685c0f76bb8af60ec83ffb6f9672d49a4ae | [
"Apache-2.0"
] | 21 | 2018-03-29T14:20:35.000Z | 2021-10-13T05:11:41.000Z | test/test_storage_vd_member_ep_list.py | sdnit-se/intersight-python | 551f7685c0f76bb8af60ec83ffb6f9672d49a4ae | [
"Apache-2.0"
] | 14 | 2018-01-30T15:45:46.000Z | 2022-02-23T14:23:21.000Z | test/test_storage_vd_member_ep_list.py | sdnit-se/intersight-python | 551f7685c0f76bb8af60ec83ffb6f9672d49a4ae | [
"Apache-2.0"
] | 18 | 2018-01-03T15:09:56.000Z | 2021-07-16T02:21:54.000Z | # coding: utf-8
"""
Cisco Intersight
Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environmen... | 51.131579 | 1,052 | 0.783325 |
06e749b11d214736ef41aa8d7591295107aa1ab6 | 5,044 | py | Python | megaspark/sql/megaframe.py | bytedance/mega-spark | c643926d0c3a631db0bc819c35a81de9813332ba | [
"Apache-2.0"
] | 6 | 2020-09-15T09:14:08.000Z | 2021-06-03T05:54:06.000Z | megaspark/sql/megaframe.py | bytedance/mega-spark | c643926d0c3a631db0bc819c35a81de9813332ba | [
"Apache-2.0"
] | null | null | null | megaspark/sql/megaframe.py | bytedance/mega-spark | c643926d0c3a631db0bc819c35a81de9813332ba | [
"Apache-2.0"
] | 4 | 2020-10-16T05:42:05.000Z | 2021-06-03T05:54:07.000Z | from pyspark.sql.types import ByteType, ShortType, \
IntegerType, LongType, FloatType, DoubleType, BooleanType, StringType
class MegaFrame(object):
def __init__(self, df):
self._df = df
self.feat_info = [(field.name, field.dataType)
for field in self._df.schema.field... | 36.28777 | 74 | 0.442308 |
00bfb8c9539e417ae9c0c126fdf4c026576cc7be | 3,983 | py | Python | ucsmsdk/mometa/compute/ComputeGraphicsCardPolicy.py | thinkitdata/ucsmsdk | da6599e1dbc1207a30eabe548a7e5791af5f476b | [
"Apache-2.0"
] | null | null | null | ucsmsdk/mometa/compute/ComputeGraphicsCardPolicy.py | thinkitdata/ucsmsdk | da6599e1dbc1207a30eabe548a7e5791af5f476b | [
"Apache-2.0"
] | null | null | null | ucsmsdk/mometa/compute/ComputeGraphicsCardPolicy.py | thinkitdata/ucsmsdk | da6599e1dbc1207a30eabe548a7e5791af5f476b | [
"Apache-2.0"
] | null | null | null | """This module contains the general information for ComputeGraphicsCardPolicy ManagedObject."""
from ...ucsmo import ManagedObject
from ...ucscoremeta import MoPropertyMeta, MoMeta
from ...ucsmeta import VersionMeta
class ComputeGraphicsCardPolicyConsts:
GRAPHICS_CARD_MODE_ANY_CONFIGURATION = "any-configuration"... | 59.447761 | 311 | 0.657293 |
23248748cc6008ba13a88e43f32a4547ae23b3d2 | 39,060 | py | Python | game/ros.py | Richienb/draco-fire | 95fd4ccef1e238e30a1075453c5998f8b48aaff5 | [
"Apache-2.0"
] | 1 | 2018-06-26T23:42:35.000Z | 2018-06-26T23:42:35.000Z | game/ros.py | Richienb/draco-fire | 95fd4ccef1e238e30a1075453c5998f8b48aaff5 | [
"Apache-2.0"
] | 1 | 2018-10-17T03:58:29.000Z | 2019-10-08T11:31:44.000Z | game/ros.py | Richienb/draco-fire | 95fd4ccef1e238e30a1075453c5998f8b48aaff5 | [
"Apache-2.0"
] | null | null | null | # Start ROS Code
print('Loading ROS Code')
# Prepare Debug Enabled Variable For Toggling Debug Mode
def debug_debugstatesetup():
global debugenabled
debugenabled = False
debug_debugstatesetup()
# DEBUG: Enable Or Disable Debug Mode
def debugstate(state):
if state == 'Enable':
debugenabled = True
print('Debug... | 28.531775 | 228 | 0.678546 |
383380b564ce4e0d28792ed6cb6f6829b36821f9 | 3,778 | py | Python | contrib/macdeploy/custom_dsstore.py | ultranatum/ultrachaint | 0ad069975bc7b52b5412fccb000e0f3651525761 | [
"MIT"
] | null | null | null | contrib/macdeploy/custom_dsstore.py | ultranatum/ultrachaint | 0ad069975bc7b52b5412fccb000e0f3651525761 | [
"MIT"
] | null | null | null | contrib/macdeploy/custom_dsstore.py | ultranatum/ultrachaint | 0ad069975bc7b52b5412fccb000e0f3651525761 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) 2013-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.
from __future__ import division,print_function,unicode_literals
import biplist
from ds_store import DSStore... | 61.934426 | 1,817 | 0.727634 |
668ca9edba7126508aad31fa7af4942f11cbef5e | 9,169 | py | Python | src/syft/core/plan/plan.py | dnabanita7/PySyft | ce2510e65f5bad382e88806bcde30fa38c3c76c4 | [
"Apache-2.0"
] | 1 | 2021-06-06T06:57:36.000Z | 2021-06-06T06:57:36.000Z | src/syft/core/plan/plan.py | dnabanita7/PySyft | ce2510e65f5bad382e88806bcde30fa38c3c76c4 | [
"Apache-2.0"
] | null | null | null | src/syft/core/plan/plan.py | dnabanita7/PySyft | ce2510e65f5bad382e88806bcde30fa38c3c76c4 | [
"Apache-2.0"
] | null | null | null | """
This is the main Plan class which is responsible for containing a list of Actions
which can be serialized, deserialized, and executed by substituting the run time
pointers with the original traced pointers and replaying the actions against a node.
"""
# stdlib
import re
import sys
from typing import Any
from typing... | 37.73251 | 105 | 0.6438 |
32d131ca24b90cb1bfbde04ec1055909ed83eb32 | 4,536 | py | Python | langmodels/evaluation/metrics.py | lyksdu/langmodels | 5a49ee523e84513915f6fa747e03e5ef813aec17 | [
"MIT"
] | null | null | null | langmodels/evaluation/metrics.py | lyksdu/langmodels | 5a49ee523e84513915f6fa747e03e5ef813aec17 | [
"MIT"
] | null | null | null | langmodels/evaluation/metrics.py | lyksdu/langmodels | 5a49ee523e84513915f6fa747e03e5ef813aec17 | [
"MIT"
] | null | null | null | import logging
import sys
from typing import List, Optional, Set, Callable, Dict, Type
from langmodels.evaluation.definitions import EvaluationResult
from langmodels.evaluation.customization import TokenTypeSubset
from langmodels.model import TrainedModel
DEFAULT_N_MODEL_SUGGESTIONS = 100
logger = logging.getLogger... | 40.864865 | 196 | 0.642416 |
2489b6e4f4e27b97755c8e3ca7a6e1de80f3e00d | 1,488 | py | Python | Examples/Legacy/Heisenberg1d/heisenberg1d_jastrow.py | gpescia/MyNetKet | 958510966a5870d9d491de0628903cf1fc210921 | [
"Apache-2.0"
] | 352 | 2018-04-24T16:45:10.000Z | 2022-03-31T01:15:34.000Z | Examples/Legacy/Heisenberg1d/heisenberg1d_jastrow.py | gpescia/MyNetKet | 958510966a5870d9d491de0628903cf1fc210921 | [
"Apache-2.0"
] | 947 | 2018-04-24T20:16:17.000Z | 2022-03-31T17:33:52.000Z | Examples/Legacy/Heisenberg1d/heisenberg1d_jastrow.py | gpescia/MyNetKet | 958510966a5870d9d491de0628903cf1fc210921 | [
"Apache-2.0"
] | 148 | 2018-04-25T02:44:20.000Z | 2022-03-11T11:42:34.000Z | # Copyright 2020 The Netket 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 applicable... | 30.367347 | 74 | 0.751344 |
644d8bb532a7c6d95772f85df71aba8f8db2d3c6 | 1,582 | py | Python | signal_ocean/market_rates/models.py | lkattis-signal/SignalSDK | f085b9cae0495f4e016b9982df271efc6fd0a8f5 | [
"Apache-2.0"
] | 10 | 2020-09-29T06:36:45.000Z | 2022-03-14T18:15:50.000Z | signal_ocean/market_rates/models.py | lkattis-signal/SignalSDK | f085b9cae0495f4e016b9982df271efc6fd0a8f5 | [
"Apache-2.0"
] | 53 | 2020-10-08T10:05:00.000Z | 2022-03-29T14:21:18.000Z | signal_ocean/market_rates/models.py | lkattis-signal/SignalSDK | f085b9cae0495f4e016b9982df271efc6fd0a8f5 | [
"Apache-2.0"
] | 5 | 2020-09-25T07:48:04.000Z | 2021-11-23T07:08:56.000Z | # noqa: D100
from dataclasses import dataclass
from datetime import datetime
@dataclass(frozen=True)
class MarketRate:
"""The market rate of a certain route or vessel class.
Attributes:
route_id: ID of the route.
rate_date: Date of the rate.
rate_value: Value of the rate... | 23.264706 | 73 | 0.604298 |
fe9780351010163065d8e7615feed30a6194c1ae | 1,371 | py | Python | tests/test_lru.py | Jude188/cachetools | eb069ad6813a183decdf51a51460b0e9716eff7b | [
"MIT"
] | 1,280 | 2015-01-19T04:27:34.000Z | 2022-03-31T21:33:10.000Z | tests/test_lru.py | Jude188/cachetools | eb069ad6813a183decdf51a51460b0e9716eff7b | [
"MIT"
] | 209 | 2015-01-19T04:39:57.000Z | 2022-03-31T13:08:35.000Z | tests/test_lru.py | Jude188/cachetools | eb069ad6813a183decdf51a51460b0e9716eff7b | [
"MIT"
] | 147 | 2015-01-19T04:34:31.000Z | 2022-03-29T11:40:36.000Z | import unittest
from cachetools import LRUCache
from . import CacheTestMixin
class LRUCacheTest(unittest.TestCase, CacheTestMixin):
Cache = LRUCache
def test_lru(self):
cache = LRUCache(maxsize=2)
cache[1] = 1
cache[2] = 2
cache[3] = 3
self.assertEqual(len(cache),... | 23.637931 | 58 | 0.57841 |
e0e28b2d7630cd59989a566ad83d5ab010668449 | 1,101 | py | Python | sodagram/images/urls.py | rayendratawakal/instagram-clone | d484b4d3cdb0710eca9b8f0190338fe441f87543 | [
"MIT"
] | 27 | 2018-07-06T13:43:21.000Z | 2021-09-26T14:22:15.000Z | sodagram/images/urls.py | rayendratawakal/instagram-clone | d484b4d3cdb0710eca9b8f0190338fe441f87543 | [
"MIT"
] | 25 | 2019-12-30T03:35:36.000Z | 2022-03-15T19:54:13.000Z | sodagram/images/urls.py | johansetiawan703/ic | ce04efa20be109153d87ac134ec9a7707a0b41ca | [
"MIT"
] | 7 | 2019-01-28T23:56:30.000Z | 2020-09-25T15:51:43.000Z | from django.conf.urls import url
from . import views
urlpatterns = [
url(
regex=r'^$',
view=views.Images.as_view(),
name='feed'
),
url(
regex=r'^(?P<image_id>[0-9]+)/$',
view=views.ImageDetail.as_view(),
name='detail'
),
url(
regex=r'^(?P<imag... | 24.466667 | 72 | 0.515895 |
fdc63da8d47ac32c7c0038b59c490d69eff07e3b | 395 | py | Python | utils/writer.py | ryul99/VSR-DUF | 8f5361f8315a3b208d96211d6049baba58e2e37c | [
"Apache-2.0"
] | 1 | 2020-10-08T09:02:08.000Z | 2020-10-08T09:02:08.000Z | utils/writer.py | ryul99/VSR-DUF | 8f5361f8315a3b208d96211d6049baba58e2e37c | [
"Apache-2.0"
] | 1 | 2021-04-16T08:22:00.000Z | 2021-04-19T10:28:49.000Z | utils/writer.py | ryul99/VSR-DUF | 8f5361f8315a3b208d96211d6049baba58e2e37c | [
"Apache-2.0"
] | null | null | null | import numpy as np
from tensorboardX import SummaryWriter
class Writer(SummaryWriter):
def __init__(self, hp, logdir):
super(Writer, self).__init__(logdir)
self.hp = hp
def train_logging(self, train_loss, step):
self.add_scalar('train_loss', train_loss, step)
def test_logging(sel... | 26.333333 | 55 | 0.693671 |
b8e4a7a2fd672816efb5b57623f6d39c2f7a4f80 | 2,853 | py | Python | Filters/Core/Testing/Python/contourQuadraticTetra.py | inviCRO/VTK | a2dc2e79d4ecb8f6da900535b32e1a2a702c7f48 | [
"BSD-3-Clause"
] | 3 | 2020-06-20T23:31:06.000Z | 2021-01-11T02:17:16.000Z | Filters/Core/Testing/Python/contourQuadraticTetra.py | inviCRO/VTK | a2dc2e79d4ecb8f6da900535b32e1a2a702c7f48 | [
"BSD-3-Clause"
] | 14 | 2015-04-25T17:54:13.000Z | 2017-01-13T15:30:39.000Z | Filters/Core/Testing/Python/contourQuadraticTetra.py | inviCRO/VTK | a2dc2e79d4ecb8f6da900535b32e1a2a702c7f48 | [
"BSD-3-Clause"
] | 1 | 2021-12-02T07:29:15.000Z | 2021-12-02T07:29:15.000Z |
'''
=========================================================================
Program: Visualization Toolkit
Module: TestNamedColorsIntegration.py
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
... | 36.113924 | 119 | 0.66912 |
e8acb88b4a60b14302c95ea64bf966f2188e11d2 | 14,621 | py | Python | tutorials/xarray_tutorial.py | plant99/MetPy | b1e68bca9c7c0edf7f64e8ab963173fb9e0f1410 | [
"BSD-3-Clause"
] | 1 | 2019-11-16T21:08:22.000Z | 2019-11-16T21:08:22.000Z | tutorials/xarray_tutorial.py | plant99/MetPy | b1e68bca9c7c0edf7f64e8ab963173fb9e0f1410 | [
"BSD-3-Clause"
] | null | null | null | tutorials/xarray_tutorial.py | plant99/MetPy | b1e68bca9c7c0edf7f64e8ab963173fb9e0f1410 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2018 MetPy Developers.
# Distributed under the terms of the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
"""
xarray with MetPy Tutorial
==========================
`xarray <http://xarray.pydata.org/>`_ is a powerful Python package that provides N-dimensional
labeled arrays and datasets ... | 37.298469 | 94 | 0.653102 |
5a283010478a5e245ffb8430bc9ba1af0d5867bd | 755 | py | Python | AY/Crius/Utils/tushare_service.py | s456951753/Customized_QUANTAXIS_With_Crius | 13b3e965bee07108bd48965ef9621dbedd4331df | [
"MIT"
] | null | null | null | AY/Crius/Utils/tushare_service.py | s456951753/Customized_QUANTAXIS_With_Crius | 13b3e965bee07108bd48965ef9621dbedd4331df | [
"MIT"
] | null | null | null | AY/Crius/Utils/tushare_service.py | s456951753/Customized_QUANTAXIS_With_Crius | 13b3e965bee07108bd48965ef9621dbedd4331df | [
"MIT"
] | null | null | null | import AY.Crius.Utils.configuration_file_service as config_service
import tushare as ts
class tushare_interface:
'''
Get a singleton of tushare's pro interface. If token is passed in as a not-None value, it will be used as the token
to call tushare api. Otherwise the token configured in configuration file ... | 37.75 | 119 | 0.639735 |
2b8a71cacaec668731e89aec676e9247ce9b6121 | 2,410 | py | Python | userbot/modules/torrentsearch.py | sks98765/oub-remix | f08e68afb3ee89e6d1d34d7cd919465b03a73da9 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | userbot/modules/torrentsearch.py | sks98765/oub-remix | f08e68afb3ee89e6d1d34d7cd919465b03a73da9 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 1 | 2020-06-07T03:48:39.000Z | 2020-06-07T03:48:39.000Z | userbot/modules/torrentsearch.py | sks98765/oub-remix | f08e68afb3ee89e6d1d34d7cd919465b03a73da9 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 3 | 2020-07-28T18:09:32.000Z | 2020-07-31T07:52:20.000Z | from bs4 import BeautifulSoup as bs
import requests
import json
from userbot.events import register
def dogbin(magnets):
counter = 0
urls = []
while counter != len(magnets):
message = magnets[counter]
url = "https://del.dog/documents"
r = requests.post(url, data=message.encode("UTF-8")).json()
url = f"ht... | 26.777778 | 134 | 0.660996 |
533bc96100e37388781d709db992aee391128aa1 | 6,522 | py | Python | redash/utils/__init__.py | DeanThompson/redash | d12691dc2a870049ffa714c78a56a655c1da608e | [
"BSD-2-Clause"
] | 24 | 2017-05-10T20:36:55.000Z | 2020-11-26T14:20:01.000Z | redash/utils/__init__.py | DeanThompson/redash | d12691dc2a870049ffa714c78a56a655c1da608e | [
"BSD-2-Clause"
] | 742 | 2016-09-28T00:38:58.000Z | 2021-07-29T17:48:45.000Z | redash/utils/__init__.py | narratorai/redash | e0297835dfc2e57446f2a6055eacea98415f948b | [
"BSD-2-Clause"
] | 21 | 2016-10-19T18:29:24.000Z | 2021-07-24T11:47:36.000Z | import codecs
import io
import csv
import datetime
import decimal
import hashlib
import os
import random
import re
import uuid
import binascii
import pystache
import pytz
import simplejson
from flask import current_app
from funcy import select_values
from redash import settings
from sqlalchemy.orm.query import Query
... | 30.194444 | 119 | 0.648881 |
0225de05128b76ebd06e129b230b73bec5e00412 | 794 | py | Python | Intermediate Machine Learning/Exercise 7.py | haoweii0215/Kaggle-Courses | 57974b2e6618b1125e030791320c649dda2fc783 | [
"MIT"
] | null | null | null | Intermediate Machine Learning/Exercise 7.py | haoweii0215/Kaggle-Courses | 57974b2e6618b1125e030791320c649dda2fc783 | [
"MIT"
] | null | null | null | Intermediate Machine Learning/Exercise 7.py | haoweii0215/Kaggle-Courses | 57974b2e6618b1125e030791320c649dda2fc783 | [
"MIT"
] | null | null | null | # Exercise 7 : Data Leakage
## Set up code checking
from learntools.core import binder
binder.bind(globals())
from learntools.ml_intermediate.ex7 import *
print("Setup Complete")
## Step 5: Housing Prices
## You will build a model to predict housing prices. The model will be deployed on an ongoing basis, to predict t... | 41.789474 | 235 | 0.755668 |
02c015e10aea019d90fc9ed2d6e89ccece1e00d9 | 1,006 | py | Python | tests/test.py | noamkatzir/palm-hand-reading | 1a405759c03218fc74d661805bced8e4f4a92e74 | [
"BSD-3-Clause"
] | 5 | 2018-10-21T13:07:36.000Z | 2021-11-26T17:01:47.000Z | tests/test.py | noamkatzir/palm-hand-reading | 1a405759c03218fc74d661805bced8e4f4a92e74 | [
"BSD-3-Clause"
] | null | null | null | tests/test.py | noamkatzir/palm-hand-reading | 1a405759c03218fc74d661805bced8e4f4a92e74 | [
"BSD-3-Clause"
] | 3 | 2019-06-08T07:04:36.000Z | 2019-11-27T03:12:53.000Z | __author__ = 'noam'
import os
import cv2
import numpy as np
from matplotlib import pyplot as plt
imagesPath = '../images/preprocessed/'
old_lefthand = cv2.imread(imagesPath+'noam_left_hand_6.12.08_02062015.png', 0)
lefthand = cv2.imread(imagesPath+'noam_left_hand_30.5.15_02062015_0001.png', 0)
# omer_lefthand = cv2.i... | 29.588235 | 82 | 0.760437 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.