hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | 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 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | 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 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
797dd215183662c605dab177fdf8185424afc1ed | 1,209 | py | Python | core/components/exit.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | 3 | 2017-10-28T11:28:38.000Z | 2018-09-12T09:47:00.000Z | core/components/exit.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | null | null | null | core/components/exit.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | null | null | null | from core.components import listing, Component
from core.direction import Direction
@listing.register
class Exit(Component):
"""
A component that maps triggers to move an object to another level/position
"""
NAME = "exit"
__slots__ = ()
def __init__(self, exits=None):
super().__init__... | 26.282609 | 78 | 0.610422 |
797de26a5d4e26b09bc4486e6ac179afe371c922 | 19,554 | py | Python | tests/test_dcos_e2e/backends/docker/test_docker.py | cprovencher/dcos-e2e | c54b3d41f246efe3f90dcf225b0bffdc1f615daa | [
"Apache-2.0"
] | null | null | null | tests/test_dcos_e2e/backends/docker/test_docker.py | cprovencher/dcos-e2e | c54b3d41f246efe3f90dcf225b0bffdc1f615daa | [
"Apache-2.0"
] | null | null | null | tests/test_dcos_e2e/backends/docker/test_docker.py | cprovencher/dcos-e2e | c54b3d41f246efe3f90dcf225b0bffdc1f615daa | [
"Apache-2.0"
] | null | null | null | """
Tests for the Docker backend.
This module contains tests for Docker backend features which are not covered by
sibling modules.
"""
import subprocess
import uuid
from pathlib import Path
from typing import Iterator
# See https://github.com/PyCQA/pylint/issues/1536 for details on why the errors
# are disabled.
imp... | 34.731794 | 79 | 0.609134 |
797e140f9f96b1dbd398d001d34b8fb9767c70eb | 3,729 | py | Python | +hdsort/+noise/var_models.py | rdiggelmann/HDSort | b05d12dd5a822223020898652e22fd5088f1683e | [
"MIT"
] | null | null | null | +hdsort/+noise/var_models.py | rdiggelmann/HDSort | b05d12dd5a822223020898652e22fd5088f1683e | [
"MIT"
] | 1 | 2021-01-29T08:17:54.000Z | 2021-01-31T08:21:10.000Z | +hdsort/+noise/var_models.py | rdiggelmann/HDSort | b05d12dd5a822223020898652e22fd5088f1683e | [
"MIT"
] | null | null | null | # -*- coding:utf-8 -*-
##---IMPORTS
import scipy as sp
from scipy import linalg as sp_la
from common import TimeSeriesCovE
from plot import P, mcdata
from nsim.scene.noise import ArNoiseGen
from database import MunkSession
##---CONSTANTS
DB = MunkSession()
##---FUNCTIONS
def load_cmx():
... | 29.595238 | 88 | 0.584607 |
797e2d1d60e70b3d2465b9002b5d63d8bd922130 | 136 | py | Python | Portfolio/__init__.py | zhhrozhh/Robinhood_Portfolio | b3f7ccd4555b67c4bc498c845230e06a1a35db60 | [
"MIT"
] | 6 | 2018-01-23T12:06:37.000Z | 2021-04-29T10:46:49.000Z | Portfolio/__init__.py | zhhrozhh/Robinhood_Portfolio | b3f7ccd4555b67c4bc498c845230e06a1a35db60 | [
"MIT"
] | null | null | null | Portfolio/__init__.py | zhhrozhh/Robinhood_Portfolio | b3f7ccd4555b67c4bc498c845230e06a1a35db60 | [
"MIT"
] | 2 | 2018-01-23T12:06:38.000Z | 2018-01-28T16:51:52.000Z | from Portfolio.Portfolio import Portfolio
from Portfolio.PortfolioMgr import PortfolioMgr
from Portfolio.SIconverter import SIconverter
| 34 | 47 | 0.889706 |
797e41c765acb1f2c98f74efdbc3ef1ce070b30c | 3,972 | py | Python | intersight/models/equipment_switch_card_list.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/equipment_switch_card_list.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/equipment_switch_card_list.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Intersight REST API
This is Intersight REST API
OpenAPI spec version: 1.0.9-255
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class EquipmentSwitchCardList(object):
"""
NOTE: Th... | 25.792208 | 88 | 0.563192 |
797e5708cf45b5c56d240be06699c08b67837a12 | 10,500 | py | Python | test/functional/wallet_import_rescan.py | raipay/bitcoin-abc | 5e0b712845f9649762aa0fc1e0de8665787207b7 | [
"MIT"
] | null | null | null | test/functional/wallet_import_rescan.py | raipay/bitcoin-abc | 5e0b712845f9649762aa0fc1e0de8665787207b7 | [
"MIT"
] | 2 | 2022-02-27T21:05:11.000Z | 2022-02-27T21:05:47.000Z | test/functional/wallet_import_rescan.py | raipay/bitcoin-abc | 5e0b712845f9649762aa0fc1e0de8665787207b7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2019 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 wallet import RPCs.
Test rescan behavior of importaddress, importpubkey, importprivkey, and
impor... | 43.209877 | 88 | 0.637429 |
797e6edfbb6832cce1cc4d9d88845bde7b6bf3cf | 2,808 | py | Python | django_test_runner/__main__.py | sobolevn/baldr | 6413de0b87722957e5a49bd441b18dcb934864f5 | [
"BSD-3-Clause"
] | 4 | 2019-08-07T22:29:33.000Z | 2021-12-19T14:25:39.000Z | django_test_runner/__main__.py | sobolevn/baldr | 6413de0b87722957e5a49bd441b18dcb934864f5 | [
"BSD-3-Clause"
] | 2 | 2016-12-15T15:46:26.000Z | 2020-06-06T23:07:56.000Z | django_test_runner/__main__.py | sobolevn/baldr | 6413de0b87722957e5a49bd441b18dcb934864f5 | [
"BSD-3-Clause"
] | 3 | 2015-09-27T16:43:40.000Z | 2020-06-06T23:04:07.000Z | #! /usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
from optparse import OptionParser
import django
from django.conf import settings
from django.core.management import call_command
def main():
"""
The entry point for the script. This script is fairly basic. Here is a
quick example of how t... | 33.428571 | 119 | 0.616453 |
797e979963ae24d905f3db45ba0417ffa73dcf8f | 10,449 | py | Python | pandas/core/config_init.py | ssalonen/pandas | 1929563fdb5358a41420d103a388aa2bd494d543 | [
"PSF-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | 1 | 2015-11-25T19:12:03.000Z | 2015-11-25T19:12:03.000Z | pandas/core/config_init.py | pierre-haessig/pandas | f9e0b7df8ca8a92133d3cea0a26181140f991e2d | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | pandas/core/config_init.py | pierre-haessig/pandas | f9e0b7df8ca8a92133d3cea0a26181140f991e2d | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | import pandas.core.config as cf
from pandas.core.config import (is_int, is_bool, is_text, is_float,
is_instance_factory,is_one_of_factory,get_default_val)
from pandas.core.format import detect_console_encoding
"""
This module is imported from the pandas package __init__.py file
in order... | 34.485149 | 108 | 0.69021 |
797ea31bae3e2ba2f28ee5a8ce71df01d0524cb4 | 10,886 | py | Python | data/word2vec.py | yuagnun/HauntedTweet | 04b31ac23cb52e68aa60f7d22e5ae0da96c35646 | [
"MIT"
] | 2 | 2020-01-28T07:45:40.000Z | 2020-02-22T11:41:02.000Z | data/word2vec.py | Sidus-smg/HauntedTweet | 04b31ac23cb52e68aa60f7d22e5ae0da96c35646 | [
"MIT"
] | 4 | 2019-09-29T06:59:58.000Z | 2019-11-26T15:01:39.000Z | data/word2vec.py | yuagnun/HauntedTweet | 04b31ac23cb52e68aa60f7d22e5ae0da96c35646 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
'''Referred to TensorFlow word2vec tutorial
(https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/tutorials/word2vec/word2vec_basic.py),
which follows Apache License, Ver. 2.0.'''
import tensorflow as tf
import numpy as np
import math
import os.path
from six.moves import xrang... | 43.718876 | 136 | 0.56908 |
797eaafc603666576f3bd226cfa13df20db9332c | 36,621 | py | Python | MuyGPyS/gp/muygps.py | igoumiri/MuyGPyS | f60e67108a94d556ab330645bc792acbb84a8a3a | [
"MIT-0",
"MIT"
] | null | null | null | MuyGPyS/gp/muygps.py | igoumiri/MuyGPyS | f60e67108a94d556ab330645bc792acbb84a8a3a | [
"MIT-0",
"MIT"
] | null | null | null | MuyGPyS/gp/muygps.py | igoumiri/MuyGPyS | f60e67108a94d556ab330645bc792acbb84a8a3a | [
"MIT-0",
"MIT"
] | null | null | null | # Copyright 2021 Lawrence Livermore National Security, LLC and other MuyGPyS
# Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: MIT
"""MuyGPs implementation
"""
import numpy as np
from typing import Dict, Generator, Optional, Tuple, Union
from MuyGPyS.gp.distance import... | 41.379661 | 81 | 0.597581 |
797eb1bccf4bcfa6072da65e2ff3fc5786cc81fc | 1,360 | py | Python | search/547_find_circle_num.py | jayzane/leetcodePy | 27fbad4a4a94a60bed6cfa89cbef6ce17fa5e7d5 | [
"Apache-2.0"
] | null | null | null | search/547_find_circle_num.py | jayzane/leetcodePy | 27fbad4a4a94a60bed6cfa89cbef6ce17fa5e7d5 | [
"Apache-2.0"
] | null | null | null | search/547_find_circle_num.py | jayzane/leetcodePy | 27fbad4a4a94a60bed6cfa89cbef6ce17fa5e7d5 | [
"Apache-2.0"
] | null | null | null | from typing import *
class Solution:
"""
班上有 N 名学生。其中有些人是朋友,有些则不是。他们的友谊具有是传递性。如果已知 A 是 B 的朋友,B 是 C 的朋友,那么我们可以认为 A 也是 C 的朋友。所谓的朋友圈,是指所有朋友的集合。
给定一个 N * N 的矩阵 M,表示班级中学生之间的朋友关系。如果M[i][j] = 1,表示已知第 i 个和 j 个学生互为朋友关系,否则为不知道。你必须输出所有学生中的已知的朋友圈总数。
示例 1:
输入:
[[1,1,0],
[1,1,0],
[0,0,1]]
... | 19.15493 | 103 | 0.517647 |
797ed51b0c0b3fe24bb894bb283940c30d6e184a | 543 | py | Python | algorithms/python/icube_root.py | rik0/rk-exempla | 811f859a0980b0636bbafa2656893d988c4d0e32 | [
"MIT"
] | 1 | 2017-02-20T21:04:47.000Z | 2017-02-20T21:04:47.000Z | algorithms/python/icube_root.py | rik0/rk-exempla | 811f859a0980b0636bbafa2656893d988c4d0e32 | [
"MIT"
] | null | null | null | algorithms/python/icube_root.py | rik0/rk-exempla | 811f859a0980b0636bbafa2656893d988c4d0e32 | [
"MIT"
] | 2 | 2017-02-20T21:04:49.000Z | 2021-05-18T11:29:16.000Z | import numbers
import sys
MAX_INT = sys.maxsize
def isign(x, y):
t = y >> 31
return (abs(x) ^ t)-t
def icube_root(x):
if x < 0:
x = -x
sign = -1
else:
sign = 1
if isinstance(x, numbers.Integral) and :
s = 30
y = 0
while s >= 0:
y *= 2
... | 18.1 | 46 | 0.372007 |
797ee2ada04ff2ac866ec01c9b8e1494b9a1a51d | 7,994 | py | Python | benchmark/cifar10/cifar10_pytorch.py | animeshtrivedi/surf-ml | 73102c69f303d5b289841e6116a607561e36595c | [
"Apache-2.0"
] | null | null | null | benchmark/cifar10/cifar10_pytorch.py | animeshtrivedi/surf-ml | 73102c69f303d5b289841e6116a607561e36595c | [
"Apache-2.0"
] | null | null | null | benchmark/cifar10/cifar10_pytorch.py | animeshtrivedi/surf-ml | 73102c69f303d5b289841e6116a607561e36595c | [
"Apache-2.0"
] | null | null | null | '''
Cifar10 example in pytorch
https://github.com/pytorch/tutorials/blob/master/beginner_source/blitz/cifar10_tutorial.py
'''
from __future__ import print_function
import argparse
import torch
import torch.nn as nn
import torch.nn.functional as F
import os
import torch.optim as optim
from torchvision import datasets,... | 35.6875 | 112 | 0.59332 |
797eea644896f50b8b75ecb00d0e578f98670671 | 25 | py | Python | redbrick/coco/tests/__init__.py | dereklukacs/redbrick-sdk | 4cf93444c1d808694c1601334f9e039e616dfd3d | [
"MIT"
] | 1 | 2020-11-26T04:25:15.000Z | 2020-11-26T04:25:15.000Z | redbrick/coco/tests/__init__.py | redbrick-ai/redbrick-sdk | 4cf93444c1d808694c1601334f9e039e616dfd3d | [
"MIT"
] | 33 | 2021-02-04T17:51:53.000Z | 2022-03-17T07:28:36.000Z | redbrick/coco/tests/__init__.py | dereklukacs/redbrick-sdk | 4cf93444c1d808694c1601334f9e039e616dfd3d | [
"MIT"
] | 1 | 2021-06-09T10:06:35.000Z | 2021-06-09T10:06:35.000Z | """COCO format tests."""
| 12.5 | 24 | 0.6 |
797eeeb2438c5e1db82620d3b61facb241f2a98c | 30,469 | py | Python | python/sciond/sciond.py | FR4NK-W/osourced-scion | c8fc2fcfaead45dd4dd20d1dd6450bf6d10ebd11 | [
"Apache-2.0"
] | null | null | null | python/sciond/sciond.py | FR4NK-W/osourced-scion | c8fc2fcfaead45dd4dd20d1dd6450bf6d10ebd11 | [
"Apache-2.0"
] | null | null | null | python/sciond/sciond.py | FR4NK-W/osourced-scion | c8fc2fcfaead45dd4dd20d1dd6450bf6d10ebd11 | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 ETH Zurich
#
# 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, sof... | 40.788487 | 100 | 0.618793 |
797f43a5272aee3dd6efd326d104d35be87573f4 | 481 | py | Python | spacepackets/cfdp/pdu/__init__.py | robamu-org/py-spacepackets | 522b021ba5690f97a4b74ae8b110762a32eb9b19 | [
"Apache-2.0"
] | null | null | null | spacepackets/cfdp/pdu/__init__.py | robamu-org/py-spacepackets | 522b021ba5690f97a4b74ae8b110762a32eb9b19 | [
"Apache-2.0"
] | 3 | 2021-10-05T09:29:45.000Z | 2022-02-12T15:46:43.000Z | spacepackets/cfdp/pdu/__init__.py | robamu-org/py-spacepackets | 522b021ba5690f97a4b74ae8b110762a32eb9b19 | [
"Apache-2.0"
] | 1 | 2022-03-04T17:25:29.000Z | 2022-03-04T17:25:29.000Z | # noinspection PyUnresolvedReferences
from ..definitions import SegmentMetadataFlag, PduType
# noinspection PyUnresolvedReferences
from .header import PduHeader, PduConfig
from .ack import TransactionStatus, AckPdu
from .eof import EofPdu
from .file_directive import FileDirectivePduBase, DirectiveCodes, IsFileDirectiv... | 34.357143 | 81 | 0.85447 |
797f542e4dd38d1122ae2b7ac6b14fff9ae78d9a | 35,206 | py | Python | projects/DensePose/visualize_rect_segm.py | tintinrevient/detectron2 | 59069d9a20104ca2eb87773ba39280d522f2e345 | [
"Apache-2.0"
] | null | null | null | projects/DensePose/visualize_rect_segm.py | tintinrevient/detectron2 | 59069d9a20104ca2eb87773ba39280d522f2e345 | [
"Apache-2.0"
] | null | null | null | projects/DensePose/visualize_rect_segm.py | tintinrevient/detectron2 | 59069d9a20104ca2eb87773ba39280d522f2e345 | [
"Apache-2.0"
] | null | null | null | from detectron2.utils.logger import setup_logger
setup_logger()
import cv2, os, re
import numpy as np
from detectron2.engine import DefaultPredictor
from detectron2.config import get_cfg
from densepose.config import add_densepose_config
from densepose.vis.extractor import DensePoseResultExtractor
import torch
import a... | 38.434498 | 170 | 0.668153 |
797f67eb5e15864dcbf0b4ff88ff17bb12538bc8 | 6,637 | py | Python | python_modules/libraries/dagster-aws/dagster_aws_tests/redshift_tests/test_resources.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | python_modules/libraries/dagster-aws/dagster_aws_tests/redshift_tests/test_resources.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | python_modules/libraries/dagster-aws/dagster_aws_tests/redshift_tests/test_resources.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | import os
import uuid
from unittest import mock
import boto3
import psycopg2
import pytest
from dagster_aws.redshift import FakeRedshiftResource, fake_redshift_resource, redshift_resource
from dagster import ModeDefinition, execute_solid, solid
REDSHIFT_ENV = {
"resources": {
"redshift": {
"c... | 30.869767 | 104 | 0.644116 |
797f907ea7b42dbd94a81251f659071724ad449f | 685 | py | Python | gwlfe/MultiUse_Fxns/Runoff/AvCNRur.py | mudkipmaster/gwlf-e | 9e058445537dd32d1916f76c4b73ca64261771cd | [
"Apache-2.0"
] | null | null | null | gwlfe/MultiUse_Fxns/Runoff/AvCNRur.py | mudkipmaster/gwlf-e | 9e058445537dd32d1916f76c4b73ca64261771cd | [
"Apache-2.0"
] | 6 | 2018-07-24T22:46:28.000Z | 2018-07-29T19:13:09.000Z | gwlfe/MultiUse_Fxns/Runoff/AvCNRur.py | mudkipmaster/gwlf-e | 9e058445537dd32d1916f76c4b73ca64261771cd | [
"Apache-2.0"
] | 1 | 2018-07-24T18:22:01.000Z | 2018-07-24T18:22:01.000Z | from numpy import sum
from gwlfe.Input.LandUse.RurAreaTotal import RurAreaTotal
from gwlfe.Input.LandUse.RurAreaTotal import RurAreaTotal_f
from gwlfe.Memoization import memoize
@memoize
def AvCNRur(NRur, Area, CN):
result = 0
rurareatotal = RurAreaTotal(NRur, Area)
# Get the area weighted average CN for... | 27.4 | 77 | 0.69781 |
797f937149cf67403553626e8082f627a1b50f87 | 803 | py | Python | test.py | auyeongwy/TrendCrawler | 5520c969ad7863f23d994a5cf9d711538363f879 | [
"Apache-2.0"
] | null | null | null | test.py | auyeongwy/TrendCrawler | 5520c969ad7863f23d994a5cf9d711538363f879 | [
"Apache-2.0"
] | null | null | null | test.py | auyeongwy/TrendCrawler | 5520c969ad7863f23d994a5cf9d711538363f879 | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 Au Yeong Wing Yau
#
# 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... | 29.740741 | 74 | 0.758406 |
797fe5fc872b1204b7c121a78803310cc951d2a8 | 1,556 | py | Python | analysis/online_analysis.py | tgbugs/mlab | dacc1663cbe714bb45c31b1b133fddb7ebcf5c79 | [
"MIT"
] | null | null | null | analysis/online_analysis.py | tgbugs/mlab | dacc1663cbe714bb45c31b1b133fddb7ebcf5c79 | [
"MIT"
] | null | null | null | analysis/online_analysis.py | tgbugs/mlab | dacc1663cbe714bb45c31b1b133fddb7ebcf5c79 | [
"MIT"
] | null | null | null | """ This file contains things for online analysis and provides the interaction
with the database so that the actual analysis code and the code that stores
the results can be safely segregated """
from sqlalchemy.orm import object_session
from analysis.abf_analysis import print_tp_stats
def update_online_res_d... | 37.047619 | 162 | 0.742288 |
797feb1a8338c6303df80fe0ba35ef298a799a8b | 16,736 | py | Python | source/conf.py | theTonyHo/armacode | 370f148739abef655fdc00808436e4c15be3f663 | [
"MIT"
] | 1 | 2019-02-03T22:44:51.000Z | 2019-02-03T22:44:51.000Z | source/conf.py | theTonyHo/armacode | 370f148739abef655fdc00808436e4c15be3f663 | [
"MIT"
] | null | null | null | source/conf.py | theTonyHo/armacode | 370f148739abef655fdc00808436e4c15be3f663 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# armacode documentation build configuration file, created by
# sphinx-quickstart on Tue Jul 08 13:12:12 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated f... | 33.40519 | 104 | 0.650872 |
798002ede47f518a7ece7fd80095ff10223466ac | 1,796 | py | Python | Python/nested_args_parse.py | Suraj-Rajesh/code | 3d554c4d1d5cf4bd9d084b8034641c1f6c2a47c9 | [
"MIT"
] | null | null | null | Python/nested_args_parse.py | Suraj-Rajesh/code | 3d554c4d1d5cf4bd9d084b8034641c1f6c2a47c9 | [
"MIT"
] | null | null | null | Python/nested_args_parse.py | Suraj-Rajesh/code | 3d554c4d1d5cf4bd9d084b8034641c1f6c2a47c9 | [
"MIT"
] | null | null | null | import sys
from argparse import ArgumentParser
__author__='Suraj'
def parse_arguments():
commands = ['setup', 'enable']
parser = ArgumentParser(\
description = 'Setup and enable disks for root restriction',\
usage = '''nested_args_parse.py <command> [args]
setup ... | 28.0625 | 116 | 0.651448 |
798029399b5176044bae3f40170e9f1db85540e3 | 198 | py | Python | solutions_automation/vdc/dashboard/gitea.py | threefoldtech/js-sdk | 811f783ac34a60225175bab2d806802a87b9d5c7 | [
"Apache-2.0"
] | 13 | 2020-09-02T09:05:08.000Z | 2022-03-12T02:43:24.000Z | solutions_automation/vdc/dashboard/gitea.py | threefoldtech/js-sdk | 811f783ac34a60225175bab2d806802a87b9d5c7 | [
"Apache-2.0"
] | 1,998 | 2020-06-15T11:46:10.000Z | 2022-03-24T22:12:41.000Z | solutions_automation/vdc/dashboard/gitea.py | threefoldtech/js-sdk | 811f783ac34a60225175bab2d806802a87b9d5c7 | [
"Apache-2.0"
] | 8 | 2020-09-29T06:50:35.000Z | 2021-06-14T03:30:52.000Z | from solutions_automation.vdc.dashboard.common import CommonChatBot
from jumpscale.packages.vdc_dashboard.chats.gitea import GiteaDeploy
class GiteaAutomated(CommonChatBot, GiteaDeploy):
pass
| 28.285714 | 68 | 0.853535 |
79807578fe3089bc86dfc2c88642f95fbb446185 | 68 | py | Python | staticfg/__init__.py | nancypareta/nancy | d066f3acd0a304815488f2f7f1de0d8c47cdaf12 | [
"Apache-2.0"
] | 120 | 2018-10-21T12:11:54.000Z | 2022-03-27T20:58:12.000Z | staticfg/__init__.py | nancypareta/nancy | d066f3acd0a304815488f2f7f1de0d8c47cdaf12 | [
"Apache-2.0"
] | 101 | 2021-06-09T14:19:59.000Z | 2022-01-24T13:24:39.000Z | staticfg/__init__.py | nancypareta/nancy | d066f3acd0a304815488f2f7f1de0d8c47cdaf12 | [
"Apache-2.0"
] | 28 | 2018-12-24T13:34:06.000Z | 2022-03-11T19:31:28.000Z | from .builder import CFGBuilder
from .model import Block, Link, CFG
| 22.666667 | 35 | 0.794118 |
7980798ce54083dc258cef571055719a49eac644 | 6,261 | py | Python | forthic/module.py | absheik/forthic | 1d481f8a4c0c1cc7250eb5886bed43dfb4f201c0 | [
"BSD-2-Clause"
] | null | null | null | forthic/module.py | absheik/forthic | 1d481f8a4c0c1cc7250eb5886bed43dfb4f201c0 | [
"BSD-2-Clause"
] | null | null | null | forthic/module.py | absheik/forthic | 1d481f8a4c0c1cc7250eb5886bed43dfb4f201c0 | [
"BSD-2-Clause"
] | null | null | null | from .interfaces import IInterpreter, IModule, IWord
from typing import Any, Callable, List, Dict, Optional
class Variable:
"""Represents a Forthic variable"""
def __init__(self, value: Any = None):
self.value = value
def set_value(self, val):
self.value = val
def get_value(self):
... | 34.977654 | 112 | 0.643667 |
7980ab3e6e81454b465e44130d1e569cbddb0400 | 9,760 | py | Python | tests/test_views.py | vgavro/flask-userflow | 17e73698d5adb293f2ffdfef78957a2c4d1eadc1 | [
"MIT"
] | null | null | null | tests/test_views.py | vgavro/flask-userflow | 17e73698d5adb293f2ffdfef78957a2c4d1eadc1 | [
"MIT"
] | null | null | null | tests/test_views.py | vgavro/flask-userflow | 17e73698d5adb293f2ffdfef78957a2c4d1eadc1 | [
"MIT"
] | null | null | null | def test_status(client):
resp = client.get('/user/status')
assert resp.status_code == 200
assert not resp.json['user']
assert resp.json['locale'] == 'en'
assert resp.json['timezone'] == 'UTC'
def test_set_i18n_success(client):
# set locale
resp = client.post('/user/set_i18n', json={'locale... | 34.857143 | 98 | 0.63627 |
798115f4a51e501faf6445fd580d36befc8b3e96 | 229 | py | Python | ncortex/agents/__init__.py | pvarin/ncortex | e0c1cd1815148649920db100e6c8d006312ea408 | [
"MIT"
] | null | null | null | ncortex/agents/__init__.py | pvarin/ncortex | e0c1cd1815148649920db100e6c8d006312ea408 | [
"MIT"
] | null | null | null | ncortex/agents/__init__.py | pvarin/ncortex | e0c1cd1815148649920db100e6c8d006312ea408 | [
"MIT"
] | null | null | null | '''
Agents module. This module is a collection of agents that act on (and learn
from) environments. All of the learning algorithms live in this module.
'''
from .base_agent import BaseAgent
from .random_agent import RandomAgent
| 28.625 | 75 | 0.786026 |
79813aa6d0d47bbc3136fe0b22437fcb458e6612 | 2,691 | py | Python | exegis/main.py | gruel/AphorismToTEI | 6d33a353c4b4f159af62e061618ff03a1f09fb7f | [
"BSD-3-Clause"
] | null | null | null | exegis/main.py | gruel/AphorismToTEI | 6d33a353c4b4f159af62e061618ff03a1f09fb7f | [
"BSD-3-Clause"
] | null | null | null | exegis/main.py | gruel/AphorismToTEI | 6d33a353c4b4f159af62e061618ff03a1f09fb7f | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""Main module to treat aphorisms and convert them in XML files.
:Authors: Jonathan Boyle, Nicolas Gruel <nicolas.gruel@manchester.ac.uk>
:Copyright: IT Services, The University of Manchester
"""
import sys
import os
try:
from docopt import docopt
except ImportError:
print("Install do... | 28.935484 | 98 | 0.597919 |
79818db9f8f8b53d3f4ca6e53ed9427631584004 | 29,936 | py | Python | sdk/mobilenetwork/azure-mgmt-mobilenetwork/azure/mgmt/mobilenetwork/operations/_slices_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/mobilenetwork/azure-mgmt-mobilenetwork/azure/mgmt/mobilenetwork/operations/_slices_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/mobilenetwork/azure-mgmt-mobilenetwork/azure/mgmt/mobilenetwork/operations/_slices_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"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 may ... | 44.41543 | 222 | 0.675541 |
7981917fe9c2f30611ce4f04dcb098d8051d64cd | 2,511 | py | Python | registration/api/serializers.py | shifat151/heartarcade | 887601bf9774dbbc0dcee9618c3a6e4a59f38717 | [
"MIT"
] | null | null | null | registration/api/serializers.py | shifat151/heartarcade | 887601bf9774dbbc0dcee9618c3a6e4a59f38717 | [
"MIT"
] | 7 | 2021-02-13T16:45:37.000Z | 2021-08-31T09:26:10.000Z | registration/api/serializers.py | shifat151/heartarcade | 887601bf9774dbbc0dcee9618c3a6e4a59f38717 | [
"MIT"
] | null | null | null | from rest_framework import serializers
from registration.models import User
class RegistrationSerializer(serializers.ModelSerializer):
username=serializers.CharField(label='Username:',help_text="Remember your username. It will be needed for signing in!")
email=serializers.EmailField(label='Email:')
... | 37.477612 | 123 | 0.660693 |
7981a7afcf931157c7d8e9972b510b597184b468 | 14,122 | py | Python | Chapter6/maze_experiment.py | AIRob/Hands-on-Neuroevolution-with-Python | 98c580157b56716d5518c90333de8b1b54226c87 | [
"MIT"
] | null | null | null | Chapter6/maze_experiment.py | AIRob/Hands-on-Neuroevolution-with-Python | 98c580157b56716d5518c90333de8b1b54226c87 | [
"MIT"
] | null | null | null | Chapter6/maze_experiment.py | AIRob/Hands-on-Neuroevolution-with-Python | 98c580157b56716d5518c90333de8b1b54226c87 | [
"MIT"
] | 1 | 2020-02-21T13:14:56.000Z | 2020-02-21T13:14:56.000Z | #
# The script to run maze navigation experiment for both medium and hard
# maze configurations.
#
# The Python standard library import
import os
import shutil
import math
import random
import time
import copy
import argparse
# The NEAT-Python library imports
import neat
# The helper used to visualize experiment resu... | 44.974522 | 127 | 0.631355 |
7981bf088bba583dd8c4885d36f620e7b2c27c75 | 1,842 | py | Python | backend/apollo/elections/migrations/0008_voterauthorizationrule.py | heidal/apollo | 576743e12048985ae8ef127224e1cb8ac49acd28 | [
"MIT"
] | 2 | 2020-02-28T16:24:55.000Z | 2020-03-27T17:12:50.000Z | backend/apollo/elections/migrations/0008_voterauthorizationrule.py | heidal/apollo | 576743e12048985ae8ef127224e1cb8ac49acd28 | [
"MIT"
] | 51 | 2020-02-12T20:52:08.000Z | 2022-02-27T00:23:20.000Z | backend/apollo/elections/migrations/0008_voterauthorizationrule.py | heidal/apollo | 576743e12048985ae8ef127224e1cb8ac49acd28 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.6 on 2020-05-18 18:16
from django.db import migrations, models
import django.utils.timezone
import django_utils.choices
class Migration(migrations.Migration):
dependencies = [
("elections", "0007_election_keys"),
]
operations = [
migrations.CreateModel(
... | 31.220339 | 74 | 0.442997 |
7981d4311c28a8a2c1911d6f24eac14463c35eaa | 758 | py | Python | manage.py | lewis-murgor/pitch | 8a250d419db0d69c1f236d533e1db8a7adadb64c | [
"MIT"
] | null | null | null | manage.py | lewis-murgor/pitch | 8a250d419db0d69c1f236d533e1db8a7adadb64c | [
"MIT"
] | null | null | null | manage.py | lewis-murgor/pitch | 8a250d419db0d69c1f236d533e1db8a7adadb64c | [
"MIT"
] | null | null | null | from app import create_app, db
from flask_script import Manager,Server
from app.models import User,Category,Pitch,UpVote,DownVote
from flask_migrate import Migrate, MigrateCommand
# Creating app instance
app = create_app('production')
manager = Manager(app)
manager.add_command('server',Server)
migrate = Migrate(app... | 28.074074 | 120 | 0.745383 |
7981d5f5623d46312039f8e4c8cb2b8fbffad125 | 4,730 | py | Python | tests/test_rtpPayload_ttml.py | bbc/rd-apmm-python-lib-rtpPayload_ttml | 805d13242b44f26f38e5a9d940ee2ec4862528c3 | [
"Apache-1.1"
] | null | null | null | tests/test_rtpPayload_ttml.py | bbc/rd-apmm-python-lib-rtpPayload_ttml | 805d13242b44f26f38e5a9d940ee2ec4862528c3 | [
"Apache-1.1"
] | null | null | null | tests/test_rtpPayload_ttml.py | bbc/rd-apmm-python-lib-rtpPayload_ttml | 805d13242b44f26f38e5a9d940ee2ec4862528c3 | [
"Apache-1.1"
] | null | null | null | #!/usr/bin/python
#
# James Sandford, copyright BBC 2020
#
# 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 l... | 33.785714 | 79 | 0.65074 |
7981f4b3cbc83e148b8e120906026eb653c71251 | 8,918 | py | Python | loaddata.py | ppold/lambtastic | 29d96f0f111a950a6ecd7af1cdc172addd64de04 | [
"Unlicense"
] | null | null | null | loaddata.py | ppold/lambtastic | 29d96f0f111a950a6ecd7af1cdc172addd64de04 | [
"Unlicense"
] | 1 | 2021-06-01T21:53:04.000Z | 2021-06-01T21:53:04.000Z | loaddata.py | ppold/lambtastic | 29d96f0f111a950a6ecd7af1cdc172addd64de04 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import re
import csv
import json
import logging
from os import path
from collections import namedtuple
try:
from urllib.request import urlretrieve
except ImportError: # python2
from urllib import urlretrieve
from urllib3 impo... | 35.815261 | 154 | 0.594528 |
7981f92c4c5eba508f4acd810f89f5f5b7bf7742 | 3,459 | py | Python | appengine/config_service/acl_test.py | stefb965/luci-py | e0a8a5640c4104e5c90781d833168aa8a8d1f24d | [
"Apache-2.0"
] | 1 | 2017-10-30T15:08:10.000Z | 2017-10-30T15:08:10.000Z | appengine/config_service/acl_test.py | stefb965/luci-py | e0a8a5640c4104e5c90781d833168aa8a8d1f24d | [
"Apache-2.0"
] | null | null | null | appengine/config_service/acl_test.py | stefb965/luci-py | e0a8a5640c4104e5c90781d833168aa8a8d1f24d | [
"Apache-2.0"
] | 1 | 2020-07-05T19:54:40.000Z | 2020-07-05T19:54:40.000Z | #!/usr/bin/env python
# Copyright 2015 The LUCI Authors. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0
# that can be found in the LICENSE file.
from test_env import future
import test_env
test_env.setup_test_env()
from test_support import test_case
import mock
from ... | 33.911765 | 80 | 0.750506 |
7981fea5b7b367dd27b5b82199b2ede6fc529e81 | 3,889 | py | Python | tests/common/test_op/ascend/vector_matmul.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 286 | 2020-06-23T06:40:44.000Z | 2022-03-30T01:27:49.000Z | tests/common/test_op/ascend/vector_matmul.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 10 | 2020-07-31T03:26:59.000Z | 2021-12-27T15:00:54.000Z | tests/common/test_op/ascend/vector_matmul.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 30 | 2020-07-17T01:04:14.000Z | 2021-12-27T14:05:19.000Z | # Copyright 2019-2021 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 agre... | 35.678899 | 105 | 0.587555 |
7982095f1784dc235946902eb8a5ac929c56472d | 2,755 | py | Python | glow/squeeze.py | TheoNguyen611/glowIP | 6629b1f62f7d12a57c17194baec7ce85f99753c7 | [
"MIT"
] | 10 | 2020-03-08T03:59:52.000Z | 2021-11-17T02:55:59.000Z | glow/squeeze.py | TheoNguyen611/glowIP | 6629b1f62f7d12a57c17194baec7ce85f99753c7 | [
"MIT"
] | 3 | 2019-10-20T04:05:24.000Z | 2021-06-04T01:39:53.000Z | glow/squeeze.py | TheoNguyen611/glowIP | 6629b1f62f7d12a57c17194baec7ce85f99753c7 | [
"MIT"
] | 11 | 2019-08-22T01:31:07.000Z | 2022-02-06T15:20:18.000Z | import torch
import torch.nn as nn
import numpy as np
# device
if torch.cuda.is_available():
device = "cuda"
else:
device = "cpu"
class Squeeze(nn.Module):
def __init__(self, factor, contiguous=False):
super(Squeeze, self).__init__()
self.factor = factor
self.conti... | 37.739726 | 132 | 0.52559 |
79821a26dc92287ea1a03a613d17ed3bdd9cad96 | 5,429 | py | Python | app/main/views.py | lewis-murgor/pitch | 8a250d419db0d69c1f236d533e1db8a7adadb64c | [
"MIT"
] | null | null | null | app/main/views.py | lewis-murgor/pitch | 8a250d419db0d69c1f236d533e1db8a7adadb64c | [
"MIT"
] | null | null | null | app/main/views.py | lewis-murgor/pitch | 8a250d419db0d69c1f236d533e1db8a7adadb64c | [
"MIT"
] | null | null | null | from flask import render_template,request,redirect,url_for,abort
from . import main
from flask_login import login_required,current_user
from ..models import User,Pitch,Comment,UpVote,DownVote
from .forms import CommentForm,UpdateProfile,PitchForm
from .. import db,photos
import markdown2
@main.route('/')
def index():... | 29.666667 | 103 | 0.672684 |
7982291c17e8f02b4a16eb175c2c48b6dce3d4b0 | 1,017 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_sku_paged.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_sku_paged.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/virtual_machine_scale_set_sku_paged.py | xiafu-msft/azure-sdk-for-python | 4d9560cfd519ee60667f3cc2f5295a58c18625db | [
"MIT"
] | 1 | 2019-06-17T22:18:23.000Z | 2019-06-17T22:18:23.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 36.321429 | 159 | 0.60767 |
798241a7dab88a6fc76c5a4e433b8e97d8e12945 | 9,247 | py | Python | HAIA/dqn/cartpole/train_cartpole-v1.py | jiwidi/MIARFID | 979eda45fc18a4816ef65d33b1423a6d63176c04 | [
"MIT"
] | null | null | null | HAIA/dqn/cartpole/train_cartpole-v1.py | jiwidi/MIARFID | 979eda45fc18a4816ef65d33b1423a6d63176c04 | [
"MIT"
] | null | null | null | HAIA/dqn/cartpole/train_cartpole-v1.py | jiwidi/MIARFID | 979eda45fc18a4816ef65d33b1423a6d63176c04 | [
"MIT"
] | null | null | null | import gym
import random
import torch
import numpy as np
from collections import namedtuple, deque
import matplotlib.pyplot as plt
# pytorch imports
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import pandas as pd
env = gym.make("CartPole-v1")
env.seed(0)
print('State ... | 38.369295 | 128 | 0.631124 |
7982a1a96ddb607347ebbb2e1009ff51456b6dbb | 1,437 | py | Python | raw/day14/part1.py | aesdeef/advent-of-code-2021 | 4561bcf12ac03d360f5b28c48ef80134f97613b9 | [
"MIT"
] | 2 | 2021-12-03T06:18:27.000Z | 2021-12-06T11:28:33.000Z | raw/day14/part1.py | aesdeef/advent-of-code-2021 | 4561bcf12ac03d360f5b28c48ef80134f97613b9 | [
"MIT"
] | null | null | null | raw/day14/part1.py | aesdeef/advent-of-code-2021 | 4561bcf12ac03d360f5b28c48ef80134f97613b9 | [
"MIT"
] | null | null | null | import re
from collections import Counter
from itertools import chain, count
# READ THE ENTIRE DESCRIPTION FIRST
INPUT_FILE = "../../input/14.txt"
# INPUT_FILE = "test.txt"
with open(INPUT_FILE) as f:
template = f.readline().strip()
template = [x for x in template]
f.readline()
rules = dict()
for... | 22.107692 | 60 | 0.567154 |
7982dd4a16d4b11f56f6a4351becf3084f329a10 | 18,674 | py | Python | pandaserver/taskbuffer/ConBridge.py | virthead/panda-server | d2b65f788c4539dc103641ca2a8052cb18729d44 | [
"Apache-2.0"
] | 7 | 2015-03-30T14:15:35.000Z | 2021-12-22T06:48:22.000Z | pandaserver/taskbuffer/ConBridge.py | virthead/panda-server | d2b65f788c4539dc103641ca2a8052cb18729d44 | [
"Apache-2.0"
] | 16 | 2015-06-01T13:48:01.000Z | 2022-02-08T15:03:32.000Z | pandaserver/taskbuffer/ConBridge.py | virthead/panda-server | d2b65f788c4539dc103641ca2a8052cb18729d44 | [
"Apache-2.0"
] | 15 | 2015-03-02T08:57:35.000Z | 2022-03-01T09:48:45.000Z | import os
import sys
import time
import types
import socket
import signal
import random
import threading
import traceback
try:
import cPickle as pickle
except ImportError:
import pickle
from pandaserver.taskbuffer import OraDBProxy as DBProxy
from pandaserver.config import panda_config
from pandaserver.t... | 34.904673 | 109 | 0.502838 |
79830bf4bf6e5da3c81ebb8252d9cb24353ba5c6 | 4,709 | py | Python | chapter05/06_RaceTrack_MCC_OffP.py | cemkaraoguz/reinforcement-learning-an-introduction-second-edition | 735bfa6b66ffb52b7cf03966164e7bc1755942de | [
"MIT"
] | 1 | 2022-03-01T11:48:55.000Z | 2022-03-01T11:48:55.000Z | chapter05/06_RaceTrack_MCC_OffP.py | cemkaraoguz/reinforcement-learning-an-introduction-second-edition | 735bfa6b66ffb52b7cf03966164e7bc1755942de | [
"MIT"
] | null | null | null | chapter05/06_RaceTrack_MCC_OffP.py | cemkaraoguz/reinforcement-learning-an-introduction-second-edition | 735bfa6b66ffb52b7cf03966164e7bc1755942de | [
"MIT"
] | null | null | null | '''
06_RaceTrack_MCC_OffP.py : Solution to exercise 5.12
Cem Karaoguz, 2020
MIT License
'''
import sys
import numpy as np
import pylab as pl
from mpl_toolkits.mplot3d import Axes3D
from IRL.environments.Gridworlds import RaceTrack
from IRL.agents.MonteCarlo import MonteCarloOffPolicyControl
from IRL.utils.Policies i... | 34.881481 | 109 | 0.661924 |
79832163f5bc0c88f45bf78275d743c16c25cbd8 | 774 | py | Python | chat_downloader/sites/__init__.py | xenova/ChatReplayDownloader | ff9ddb1f840fa06d0cc3976badf75c1fffebd003 | [
"MIT"
] | null | null | null | chat_downloader/sites/__init__.py | xenova/ChatReplayDownloader | ff9ddb1f840fa06d0cc3976badf75c1fffebd003 | [
"MIT"
] | null | null | null | chat_downloader/sites/__init__.py | xenova/ChatReplayDownloader | ff9ddb1f840fa06d0cc3976badf75c1fffebd003 | [
"MIT"
] | null | null | null | """Lists the sites that are supported"""
from .youtube import YouTubeChatDownloader
from .twitch import TwitchChatDownloader
# from .facebook import FacebookChatDownloader
from .reddit import RedditChatDownloader
from .common import BaseChatDownloader
def get_all_sites(include_parent=False):
"""Get all supported... | 32.25 | 128 | 0.739018 |
798349249ff36f5109d131f406b7856c2a743f91 | 2,393 | py | Python | server/openapi_server/get_annotations.py | cascadianblue/phi-annotator | 0da6c102ec1068e6b15c613e2a90a78f79d15935 | [
"Apache-2.0"
] | null | null | null | server/openapi_server/get_annotations.py | cascadianblue/phi-annotator | 0da6c102ec1068e6b15c613e2a90a78f79d15935 | [
"Apache-2.0"
] | 19 | 2021-07-29T03:14:38.000Z | 2022-03-01T06:03:14.000Z | server/openapi_server/get_annotations.py | cascadianblue/phi-annotator | 0da6c102ec1068e6b15c613e2a90a78f79d15935 | [
"Apache-2.0"
] | null | null | null | from openapi_server.annotator.phi_types import PhiType
from openapi_server.annotator.annotate import Annotator
from openapi_server.models import Note, TextContactAnnotation, \
TextPersonNameAnnotation, TextIdAnnotation, TextDateAnnotation, \
TextLocationAnnotation
annotator: Annotator = Annotator.load(
'op... | 40.559322 | 70 | 0.627664 |
79837417a5aad75e26569425c32378fb2a01f95f | 3,954 | py | Python | alipay/aop/api/request/AlipaySecuritySssssssQueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/request/AlipaySecuritySssssssQueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/request/AlipaySecuritySssssssQueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipaySecuritySssssssQueryModel import AlipaySecuritySssssssQueryModel
class AlipaySecuritySssssssQueryRequest(object):
def __i... | 27.268966 | 148 | 0.643399 |
798393ec6045eb20e24664d0963730a3be21541d | 51,274 | py | Python | cinder/tests/unit/volume/drivers/netapp/dataontap/test_nfs_base.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | null | null | null | cinder/tests/unit/volume/drivers/netapp/dataontap/test_nfs_base.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | null | null | null | cinder/tests/unit/volume/drivers/netapp/dataontap/test_nfs_base.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2014 Andrew Kerr. All rights reserved.
# Copyright (c) 2015 Tom Barron. All rights reserved.
# 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
... | 43.86142 | 79 | 0.658053 |
798394b1a0c54cac4a8cf63111d38d414c2c1ee9 | 2,935 | py | Python | zerver/management/commands/rate_limit.py | dehnert/zulip | f5935e81c7cf2f11ff4ccfcd31d2a1061b8d7ff5 | [
"Apache-2.0"
] | 1 | 2021-02-13T20:43:29.000Z | 2021-02-13T20:43:29.000Z | zerver/management/commands/rate_limit.py | dehnert/zulip | f5935e81c7cf2f11ff4ccfcd31d2a1061b8d7ff5 | [
"Apache-2.0"
] | 9 | 2021-02-08T20:22:39.000Z | 2022-02-11T03:40:19.000Z | zerver/management/commands/rate_limit.py | tobby2002/zulip | 66e7c455759f9368bae16b9a604cf63f8e3524cd | [
"Apache-2.0"
] | 1 | 2021-06-10T15:12:52.000Z | 2021-06-10T15:12:52.000Z | from __future__ import absolute_import
from __future__ import print_function
from typing import Any
from argparse import ArgumentParser
from zerver.models import UserProfile, get_user_profile_by_email
from zerver.lib.rate_limiter import block_user, unblock_user
from django.core.management.base import BaseCommand
fro... | 41.928571 | 103 | 0.524702 |
7983a55493981856af218139c3c96f7384d46d1d | 2,239 | py | Python | app/__init__.py | wuqundong520/ApiTestManage | ad6afcbb4876e4f9183ec9027009a8f027b41783 | [
"Apache-2.0"
] | 318 | 2018-07-06T08:47:52.000Z | 2022-03-29T08:50:29.000Z | app/__init__.py | wuqundong520/ApiTestManage | ad6afcbb4876e4f9183ec9027009a8f027b41783 | [
"Apache-2.0"
] | 6 | 2019-07-25T02:56:57.000Z | 2021-01-25T08:31:30.000Z | app/__init__.py | wuqundong520/ApiTestManage | ad6afcbb4876e4f9183ec9027009a8f027b41783 | [
"Apache-2.0"
] | 145 | 2018-07-06T14:00:15.000Z | 2022-02-23T07:20:18.000Z | # encoding: utf-8
import logging
import os
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager
from config import config
from config import config_log
from .util import global_variable # 初始化文件地址
from sqlalchemy import MetaData
from flask_apscheduler import APScheduler
f... | 29.077922 | 98 | 0.686021 |
7983a7ea9e7508d1624a6d2682db4d04d6ea7620 | 10,919 | py | Python | dataset/transform.py | s-mizuki-nlp/semantic_specialization | 4d00a461f18828ee8ebaccf7c737a32ccc11809f | [
"Apache-2.0"
] | null | null | null | dataset/transform.py | s-mizuki-nlp/semantic_specialization | 4d00a461f18828ee8ebaccf7c737a32ccc11809f | [
"Apache-2.0"
] | null | null | null | dataset/transform.py | s-mizuki-nlp/semantic_specialization | 4d00a461f18828ee8ebaccf7c737a32ccc11809f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding:utf-8 -*-
from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ import division
from __future__ import print_function
from typing import Dict, Callable, Optional, List, Tuple, Union
from collections import defaultdict, Counter
import os, sys, ... | 41.048872 | 142 | 0.66105 |
7983ec7be319056433ab43d9ca5006bbde466c71 | 230 | py | Python | Leetcode-Solutions/Strings/344. Reverse String.py | sakshi13-m/StudentCodeSnippets | 25e4f0322b51cad540b6481737976a2f6c4c0382 | [
"MIT"
] | 1 | 2020-09-30T21:46:28.000Z | 2020-09-30T21:46:28.000Z | Leetcode-Solutions/Strings/344. Reverse String.py | sakshi13-m/StudentCodeSnippets | 25e4f0322b51cad540b6481737976a2f6c4c0382 | [
"MIT"
] | 2 | 2020-10-04T08:01:15.000Z | 2020-10-15T12:21:39.000Z | Leetcode-Solutions/Strings/344. Reverse String.py | sakshi13-m/StudentCodeSnippets | 25e4f0322b51cad540b6481737976a2f6c4c0382 | [
"MIT"
] | 6 | 2020-09-30T20:53:24.000Z | 2020-10-09T11:54:35.000Z | # Easy
# https://leetcode.com/problems/reverse-string/
class Solution:
def reverseString(self, s: List[str]) -> None:
"""
Do not return anything, modify s in-place instead.
"""
s[::] = s[::-1] | 23 | 58 | 0.56087 |
798408bbaeca8b21c8fc62916276e21e5c12c7c3 | 6,475 | py | Python | muffnn/mlp/mlp_regressor.py | civisanalytics/muffnn | 0ec92ddb5a0158a3e46e68974ff958101e3b874d | [
"BSD-3-Clause"
] | 53 | 2016-08-26T18:28:03.000Z | 2021-09-26T08:44:58.000Z | muffnn/mlp/mlp_regressor.py | civisanalytics/muffnn | 0ec92ddb5a0158a3e46e68974ff958101e3b874d | [
"BSD-3-Clause"
] | 80 | 2016-08-29T19:08:41.000Z | 2020-12-01T16:14:11.000Z | muffnn/mlp/mlp_regressor.py | civisanalytics/muffnn | 0ec92ddb5a0158a3e46e68974ff958101e3b874d | [
"BSD-3-Clause"
] | 25 | 2016-08-29T18:48:43.000Z | 2021-09-26T08:45:18.000Z | """
A Deep Neural Network (multilayer Perceptron) sklearn-style regressor.
Similar to sklearn.neural_network.MLPRegressor, but using TensorFlow.
"""
import logging
from warnings import warn
import numpy as np
from sklearn.base import RegressorMixin
import tensorflow as tf
from tensorflow.python.ops import nn
from m... | 36.581921 | 84 | 0.651892 |
79841954083bdd83ceaf50dbc23e99b430d317c5 | 2,761 | py | Python | appengine/monorail/sitewide/grouplist.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 2 | 2021-04-13T21:22:18.000Z | 2021-09-07T02:11:57.000Z | appengine/monorail/sitewide/grouplist.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 21 | 2020-09-06T02:41:05.000Z | 2022-03-02T04:40:01.000Z | appengine/monorail/sitewide/grouplist.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd
"""Classes to list user groups."""
from __future__ import print_function
from __future__ import... | 34.949367 | 78 | 0.718218 |
798436847e6f1870e0cb107d64779457ec82eab0 | 4,842 | py | Python | toontown/coghq/LawbotCogHQLoader.py | LittleNed/toontown-stride | 1252a8f9a8816c1810106006d09c8bdfe6ad1e57 | [
"Apache-2.0"
] | 3 | 2020-01-02T08:43:36.000Z | 2020-07-05T08:59:02.000Z | toontown/coghq/LawbotCogHQLoader.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | null | null | null | toontown/coghq/LawbotCogHQLoader.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | 4 | 2019-06-20T23:45:23.000Z | 2020-10-14T20:30:15.000Z | from toontown.coghq import CogHQLoader
from toontown.coghq import LawbotHQBossBattle
from toontown.coghq import LawbotHQExterior
from toontown.coghq import LawbotOfficeExterior
from toontown.coghq import StageInterior
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import State
from direct.fsm import... | 42.473684 | 142 | 0.700537 |
79843aa10dc927bee0e69af5b5f0cb694478a7d0 | 2,011 | py | Python | cryptography/key_press/__init__.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 3 | 2017-05-02T10:28:13.000Z | 2019-02-06T09:10:11.000Z | cryptography/key_press/__init__.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 2 | 2017-06-21T20:39:14.000Z | 2020-02-25T10:28:57.000Z | cryptography/key_press/__init__.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 2 | 2016-07-29T04:35:22.000Z | 2017-01-18T17:05:36.000Z | class KeyPress(object):
def __init__(self, phrase):
self.phrase = phrase
def presses(self):
"""
Create the dictionary to store the numbers as keys and the list of strings as values
Create a counter variable to store counts whenever a letter is found in the key-value pairing.
... | 45.704545 | 111 | 0.488314 |
798456f307271786685bf0e63c48654c6cbe5f20 | 2,126 | py | Python | examples/learning_rate_finder.py | LorePep/deepyeast | 4f35276b8d3a9ae03a14105c84b0746431fbf409 | [
"MIT"
] | null | null | null | examples/learning_rate_finder.py | LorePep/deepyeast | 4f35276b8d3a9ae03a14105c84b0746431fbf409 | [
"MIT"
] | null | null | null | examples/learning_rate_finder.py | LorePep/deepyeast | 4f35276b8d3a9ae03a14105c84b0746431fbf409 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import keras
from keras import backend as K
from keras.preprocessing.image import ImageDataGenerator
from deepyeast.dataset import load_data
from deepyeast.utils import preprocess_input
from deepyeast.models import DeepYeast
class LearningRateFinder:
def __init__... | 29.527778 | 91 | 0.611947 |
798475dd8447e935341490b437892e70bca19595 | 1,291 | py | Python | tests/data/test_data_local.py | swsachith/cm | d99837917f0dafe60c25829cf78ae77bbe02bd85 | [
"Apache-2.0"
] | null | null | null | tests/data/test_data_local.py | swsachith/cm | d99837917f0dafe60c25829cf78ae77bbe02bd85 | [
"Apache-2.0"
] | null | null | null | tests/data/test_data_local.py | swsachith/cm | d99837917f0dafe60c25829cf78ae77bbe02bd85 | [
"Apache-2.0"
] | null | null | null | from os.path import isfile
from cm4.data.data import Data
class TestDataLocal:
"""
Functional tests for the local data storage service
"""
def setup(self):
self.test_file_name = "hello.txt"
self._data = Data()
self._data.config("cm4/configuration/cloudmesh.yaml")
def test... | 33.102564 | 80 | 0.670023 |
7984a6b0b05655a509571197837b22bb77eb8e92 | 4,026 | py | Python | pyutils/data_wrangler/explore.py | Nishant173/pyutils | f9a369b227b3f87d44cafa2a00696462cdc0cc37 | [
"MIT"
] | null | null | null | pyutils/data_wrangler/explore.py | Nishant173/pyutils | f9a369b227b3f87d44cafa2a00696462cdc0cc37 | [
"MIT"
] | null | null | null | pyutils/data_wrangler/explore.py | Nishant173/pyutils | f9a369b227b3f87d44cafa2a00696462cdc0cc37 | [
"MIT"
] | null | null | null | from typing import Dict, List, Optional, Union
import pandas as pd
from pyutils.core.exceptions import InvalidDataFrameError
from pyutils.core.type_annotations import NumberOrString
def is_dataframe_full(data: pd.DataFrame) -> bool:
"""Returns True if there are no missing values in a non-empty DataFrame"""
... | 39.470588 | 137 | 0.711128 |
7984ae5a6ff7ef4007e327f281753573b2d86be5 | 2,403 | py | Python | tests/unit/fake_data_root/openstack/var/lib/juju/agents/unit-nova-compute-0/charm/unit_tests/test_actions_pause_resume.py | KellenRenshaw/hotsos | e3fc51ab7f8af606a5846a3486a7fda23d761583 | [
"Apache-2.0"
] | 6 | 2021-10-01T19:46:14.000Z | 2022-03-31T17:05:08.000Z | tests/unit/fake_data_root/openstack/var/lib/juju/agents/unit-nova-compute-0/charm/unit_tests/test_actions_pause_resume.py | KellenRenshaw/hotsos | e3fc51ab7f8af606a5846a3486a7fda23d761583 | [
"Apache-2.0"
] | 111 | 2021-10-01T18:18:17.000Z | 2022-03-29T12:23:20.000Z | tests/unit/fake_data_root/openstack/var/lib/juju/agents/unit-nova-compute-0/charm/unit_tests/test_actions_pause_resume.py | KellenRenshaw/hotsos | e3fc51ab7f8af606a5846a3486a7fda23d761583 | [
"Apache-2.0"
] | 10 | 2021-09-29T14:47:54.000Z | 2022-03-18T14:52:16.000Z | # Copyright 2016 Canonical 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 in writing, s... | 30.417722 | 74 | 0.688306 |
7984c026d0282ba1393ba03b5aaa35c9441ca6b1 | 1,776 | py | Python | applications/welcome/controllers/default.py | trosa/listool | f175c6e30bcc788a381a92c3a8b818a1f1a88de6 | [
"BSD-3-Clause"
] | 1 | 2017-08-11T20:37:21.000Z | 2017-08-11T20:37:21.000Z | applications/welcome/controllers/default.py | trosa/listool | f175c6e30bcc788a381a92c3a8b818a1f1a88de6 | [
"BSD-3-Clause"
] | null | null | null | applications/welcome/controllers/default.py | trosa/listool | f175c6e30bcc788a381a92c3a8b818a1f1a88de6 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# this file is released under public domain and you can use without limitations
#########################################################################
## This is a samples controller
## - index is the default action of any application
## - user is required for authentication and authorizatio... | 31.714286 | 79 | 0.610923 |
79852c1c877090b178bcc2a3d57014767b001625 | 2,473 | py | Python | src/pyfuncs/scraper/rq.py | chrk623/pyfuncs | bf78aa716893f449cf85e3d8c16ad9eb9a52bb49 | [
"MIT"
] | null | null | null | src/pyfuncs/scraper/rq.py | chrk623/pyfuncs | bf78aa716893f449cf85e3d8c16ad9eb9a52bb49 | [
"MIT"
] | null | null | null | src/pyfuncs/scraper/rq.py | chrk623/pyfuncs | bf78aa716893f449cf85e3d8c16ad9eb9a52bb49 | [
"MIT"
] | null | null | null | import threading
from ..utils import split_list
from .rq_base import RqBase
class RqSingle(RqBase):
run_type = "base"
def __init__(self, headers=None, params=None, proxies=None):
super().__init__(headers=headers, run_type=self.run_type)
self._init_output_list()
self.params = self._gen... | 30.158537 | 79 | 0.633643 |
79853ec3184ca74534537bf5da1a432480350b63 | 11,422 | py | Python | sphinx/conf.py | calebho/gameanalysis | 280726a8aa125850b827a1e10b1203e91f515461 | [
"Apache-2.0"
] | 7 | 2017-05-17T10:40:45.000Z | 2021-10-30T12:20:24.000Z | sphinx/conf.py | calebho/gameanalysis | 280726a8aa125850b827a1e10b1203e91f515461 | [
"Apache-2.0"
] | 1 | 2016-11-07T12:10:18.000Z | 2016-11-07T12:10:18.000Z | sphinx/conf.py | calebho/gameanalysis | 280726a8aa125850b827a1e10b1203e91f515461 | [
"Apache-2.0"
] | 3 | 2015-05-04T19:58:32.000Z | 2016-05-17T14:08:28.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Game Analysis documentation build configuration file, created by
# sphinx-quickstart on Tue Oct 11 11:15:47 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in thi... | 29.667532 | 80 | 0.6948 |
798540715e20098ee8845fd7241447859eb02434 | 1,076 | py | Python | leetcode/medium/93-Restore_ip_address.py | shubhamoli/practice | 5a24fdeb6e5f43b821ef0510fe3b343ddda18f22 | [
"MIT"
] | 1 | 2020-02-25T10:32:27.000Z | 2020-02-25T10:32:27.000Z | leetcode/medium/93-Restore_ip_address.py | shubhamoli/practice | 5a24fdeb6e5f43b821ef0510fe3b343ddda18f22 | [
"MIT"
] | null | null | null | leetcode/medium/93-Restore_ip_address.py | shubhamoli/practice | 5a24fdeb6e5f43b821ef0510fe3b343ddda18f22 | [
"MIT"
] | null | null | null | """
Leetcode #93
"""
from typing import List
class Solution:
def restoreIpAddresses(self, s: str) -> List[str]:
if not s or len(s) < 4:
return []
res = []
def helper(curr, idx):
if idx == len(s) and len(curr) == 4:
res.append(".".join(curr))
... | 24.454545 | 94 | 0.477695 |
79854be783bd355f62ada9537e8e30c8da5d3e4a | 20,174 | py | Python | src/fortrace/utility/tbstuff.py | dasec/ForTrace | b8187522a2c83fb661e5a1a5f403da8f40a31ead | [
"MIT"
] | 1 | 2022-03-31T14:01:51.000Z | 2022-03-31T14:01:51.000Z | src/fortrace/utility/tbstuff.py | dasec/ForTrace | b8187522a2c83fb661e5a1a5f403da8f40a31ead | [
"MIT"
] | null | null | null | src/fortrace/utility/tbstuff.py | dasec/ForTrace | b8187522a2c83fb661e5a1a5f403da8f40a31ead | [
"MIT"
] | 1 | 2022-03-31T14:02:30.000Z | 2022-03-31T14:02:30.000Z | # Copyright (C) 2018 Sascha Kopp
# This file is part of fortrace - http://fortrace.fbi.h-da.de
# See the file 'docs/LICENSE' for copying permission.
# Utility functions for manipulating Thunderbird profiles
from __future__ import absolute_import
from fortrace.utility import osenvutil
from mozrunner import ThunderbirdR... | 46.483871 | 137 | 0.636314 |
798551caf83b3268664ddb8d95c3a6032a15634b | 3,792 | py | Python | tools/vis_saliency.py | daniel-ho/seg-nbdt | ebbe3551671fb4301b0fb32fdd665c6ed3cc3fde | [
"MIT"
] | 10 | 2020-06-15T03:03:59.000Z | 2021-08-08T23:33:04.000Z | tools/vis_saliency.py | daniel-ho/seg-nbdt | ebbe3551671fb4301b0fb32fdd665c6ed3cc3fde | [
"MIT"
] | null | null | null | tools/vis_saliency.py | daniel-ho/seg-nbdt | ebbe3551671fb4301b0fb32fdd665c6ed3cc3fde | [
"MIT"
] | 3 | 2020-12-19T04:22:56.000Z | 2021-01-23T14:35:06.000Z | """Generates interactive HTML visualization.
In this visualization, your cursor position is discretized to a 50x50 bin, and
the corresponding image is shown.
To use, output saliency maps to a directory of your choosing
(by default, ./images, from whatever directory you're in). This script will
iterate over all images... | 29.858268 | 116 | 0.584652 |
7985665d577b88c484af1f856d02d9e8e3ac157c | 83 | py | Python | data/operator/bbox/transform/rasterize/half_pixel_offset.py | zhangzhengde0225/SwinTrack | 526be17f8ef266cb924c6939bd8dda23e9b73249 | [
"MIT"
] | 143 | 2021-12-03T02:33:36.000Z | 2022-03-29T00:01:48.000Z | data/operator/bbox/transform/rasterize/half_pixel_offset.py | zhangzhengde0225/SwinTrack | 526be17f8ef266cb924c6939bd8dda23e9b73249 | [
"MIT"
] | 33 | 2021-12-03T10:32:05.000Z | 2022-03-31T02:13:55.000Z | data/operator/bbox/transform/rasterize/half_pixel_offset.py | zhangzhengde0225/SwinTrack | 526be17f8ef266cb924c6939bd8dda23e9b73249 | [
"MIT"
] | 24 | 2021-12-04T06:46:42.000Z | 2022-03-30T07:57:47.000Z | def bbox_rasterize_half_pixel_offset(bbox):
return tuple(int(v) for v in bbox)
| 27.666667 | 43 | 0.771084 |
7985747c1504091fc5dfa500800940efaec383e7 | 7,248 | py | Python | modisco/visualization/viz_sequence.py | Bluedragon137/tfmodisco | d7c56b21e1bb58b07695ef3035f173b7d1a039e6 | [
"MIT"
] | null | null | null | modisco/visualization/viz_sequence.py | Bluedragon137/tfmodisco | d7c56b21e1bb58b07695ef3035f173b7d1a039e6 | [
"MIT"
] | null | null | null | modisco/visualization/viz_sequence.py | Bluedragon137/tfmodisco | d7c56b21e1bb58b07695ef3035f173b7d1a039e6 | [
"MIT"
] | null | null | null | import matplotlib
import matplotlib.pyplot as plt
from matplotlib.patches import Rectangle
import numpy as np
from .. import util
from PIL import Image
import base64
import io
def ic_scale(pwm,background):
per_position_ic = util.compute_per_position_ic(
ppm=pwm, background=background, pseu... | 42.139535 | 120 | 0.605132 |
7985b95d17ab799648a58356c0e80f9ed146fa54 | 2,974 | py | Python | oscar/lib/python2.7/site-packages/django/contrib/sessions/backends/signed_cookies.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django/contrib/sessions/backends/signed_cookies.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django/contrib/sessions/backends/signed_cookies.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | from django.conf import settings
from django.contrib.sessions.backends.base import SessionBase
from django.core import signing
class SessionStore(SessionBase):
def load(self):
"""
We load the data from the key itself instead of fetching from
some external data store. Opposite of... | 34.581395 | 79 | 0.591796 |
7985c2e5f85799ba2c87dc4ceb5afd8cf8f04eca | 2,539 | py | Python | sdk/powerbidedicated/azure-mgmt-powerbidedicated/setup.py | jkeech/azure-sdk-for-python | ab2b0ea3ef7528900a2f2e27cc7deda440b53f70 | [
"MIT"
] | null | null | null | sdk/powerbidedicated/azure-mgmt-powerbidedicated/setup.py | jkeech/azure-sdk-for-python | ab2b0ea3ef7528900a2f2e27cc7deda440b53f70 | [
"MIT"
] | null | null | null | sdk/powerbidedicated/azure-mgmt-powerbidedicated/setup.py | jkeech/azure-sdk-for-python | ab2b0ea3ef7528900a2f2e27cc7deda440b53f70 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#----------------------------------------------------------------... | 34.310811 | 91 | 0.606932 |
7985d7ebe1249562600f4bea7ffb92b0e36004c8 | 14,864 | py | Python | src/main/python/pybuilder/python_utils.py | IVFSTEST/pybuilder | 2006a2da7b1f990d2cc981bebb88870ac9c2725b | [
"Apache-2.0"
] | 1 | 2020-04-17T01:02:10.000Z | 2020-04-17T01:02:10.000Z | src/main/python/pybuilder/python_utils.py | IVFSTEST/pybuilder | 2006a2da7b1f990d2cc981bebb88870ac9c2725b | [
"Apache-2.0"
] | null | null | null | src/main/python/pybuilder/python_utils.py | IVFSTEST/pybuilder | 2006a2da7b1f990d2cc981bebb88870ac9c2725b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# This file is part of PyBuilder
#
# Copyright 2011-2020 PyBuilder Team
#
# 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/l... | 30.710744 | 118 | 0.635697 |
7985e7bbca19b995c0b52847160d1b0e42ccbaab | 31 | py | Python | scripts/__init__.py | linuxaddict89/luminos | cd525173bd6766eb109c4409581f6c6273d1c1bd | [
"MIT"
] | null | null | null | scripts/__init__.py | linuxaddict89/luminos | cd525173bd6766eb109c4409581f6c6273d1c1bd | [
"MIT"
] | 2 | 2021-10-03T08:44:45.000Z | 2021-10-03T08:49:49.000Z | scripts/__init__.py | linuxaddict89/luminos | cd525173bd6766eb109c4409581f6c6273d1c1bd | [
"MIT"
] | null | null | null | """Various utility scripts."""
| 15.5 | 30 | 0.677419 |
7985f22c5f679d205b7c13156443e2ec7daf72d2 | 6,411 | py | Python | roccclient/models/response_page_metadata.py | Sage-Bionetworks/rocc-client | 85b73afe7d4977094810c0a8094f56ebe7ed3d48 | [
"Apache-2.0"
] | null | null | null | roccclient/models/response_page_metadata.py | Sage-Bionetworks/rocc-client | 85b73afe7d4977094810c0a8094f56ebe7ed3d48 | [
"Apache-2.0"
] | 14 | 2020-12-06T23:54:23.000Z | 2021-02-03T18:35:02.000Z | roccclient/models/response_page_metadata.py | Sage-Bionetworks/rocc-client | 85b73afe7d4977094810c0a8094f56ebe7ed3d48 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Registry of Open Community Challenge API
The OpenAPI specification implemented by the Challenge Registries. # Introduction TBA # noqa: E501
The version of the OpenAPI document: 0.1.4
Contact: thomas.schaffter@sagebionetworks.org
Generated by: https://openapi-generator.tech
"... | 30.674641 | 125 | 0.607394 |
79861ba855a772bbeaf3460e13f7185919fea7a7 | 3,474 | py | Python | api/ver2/utils/validators.py | pcf26536/politico-api | 1c9b8755ddad2baf0bfdeab4aa0674e4197a0d7c | [
"MIT"
] | 1 | 2019-02-22T19:34:32.000Z | 2019-02-22T19:34:32.000Z | api/ver2/utils/validators.py | pcf26536/politico-api | 1c9b8755ddad2baf0bfdeab4aa0674e4197a0d7c | [
"MIT"
] | null | null | null | api/ver2/utils/validators.py | pcf26536/politico-api | 1c9b8755ddad2baf0bfdeab4aa0674e4197a0d7c | [
"MIT"
] | 1 | 2019-02-07T22:12:25.000Z | 2019-02-07T22:12:25.000Z | import datetime
import re
from api.ver2.utils.strings import evidence_types
from api.strings import status_400
from api.ver2.utils.strings import password_1, password_2
def invalid_passwords(pass1, pass2):
if not len(pass1):
message = "Please Input a password for {}".format(password_1)
code = stat... | 25.357664 | 81 | 0.583477 |
798659cae9acd8dc1c8b8a907806ad2486af2494 | 4,972 | py | Python | export.py | Sfera-IT/slack-archive-bot | e0c911c65b1d2395c8a84cfe3194f97a60cf9c36 | [
"MIT"
] | null | null | null | export.py | Sfera-IT/slack-archive-bot | e0c911c65b1d2395c8a84cfe3194f97a60cf9c36 | [
"MIT"
] | null | null | null | export.py | Sfera-IT/slack-archive-bot | e0c911c65b1d2395c8a84cfe3194f97a60cf9c36 | [
"MIT"
] | null | null | null | #!/bin/python
# Usage: python export.py <path_to_database> <path_for_new_folder>
# Output: folder in given directory
import argparse
import datetime
import json
import logging
import os
import sqlite3
import time
# Used in conjunction with sqlite3 to generate JSON-like format
def dict_factory(cursor, row):
d = {... | 29.076023 | 93 | 0.679807 |
798691af30d78741af4033cebe05dfd9ac17dbb6 | 1,859 | py | Python | controller/session.py | euxhenh/cellar | 679387216043f3d287ea29a15f78868f412d2948 | [
"MIT"
] | null | null | null | controller/session.py | euxhenh/cellar | 679387216043f3d287ea29a15f78868f412d2948 | [
"MIT"
] | null | null | null | controller/session.py | euxhenh/cellar | 679387216043f3d287ea29a15f78868f412d2948 | [
"MIT"
] | null | null | null | import dash
import os
from dash import dcc
from dash.dependencies import Input, Output, State
from dash.exceptions import PreventUpdate
from flask import request
from app import app, logger, dbroot
@app.callback(
Output("export-session-d", "data"),
Input("export-session-btn", "n_clicks"),
State("active-p... | 24.786667 | 76 | 0.66057 |
798695f01dbc57babaeee8e21ca2b5771eacdabf | 23,113 | py | Python | ai4water/preprocessing/transformations/_main.py | csiro-hydroinformatics/AI4Water | cdb18bd4bf298f77b381f1829045a1e790146985 | [
"MIT"
] | 12 | 2020-10-13T08:23:17.000Z | 2021-01-22T04:36:21.000Z | ai4water/preprocessing/transformations/_main.py | csiro-hydroinformatics/AI4Water | cdb18bd4bf298f77b381f1829045a1e790146985 | [
"MIT"
] | 1 | 2020-10-15T02:42:52.000Z | 2020-10-15T02:51:07.000Z | ai4water/preprocessing/transformations/_main.py | csiro-hydroinformatics/AI4Water | cdb18bd4bf298f77b381f1829045a1e790146985 | [
"MIT"
] | 2 | 2020-11-23T04:45:38.000Z | 2020-11-26T10:12:34.000Z | import warnings
from typing import Union
import numpy as np
import pandas as pd
from sklearn.decomposition import PCA, KernelPCA, IncrementalPCA, FastICA, SparsePCA
try:
from PyEMD import EMD, EEMD
except ModuleNotFoundError:
EMD, EEMD = None, None
from ai4water.utils.utils import dateandtime_now
from ._tra... | 37.828151 | 129 | 0.593389 |
7986b159b6a7fcab06f9df22ec60b443932bee7c | 16,212 | py | Python | Tracked/visualization_msgs/msg/_image_marker.py | EnzoBrancaccio/tracked | c32905da259d8ac9e2261294d6f56fd92efd7bc9 | [
"CC0-1.0"
] | null | null | null | Tracked/visualization_msgs/msg/_image_marker.py | EnzoBrancaccio/tracked | c32905da259d8ac9e2261294d6f56fd92efd7bc9 | [
"CC0-1.0"
] | null | null | null | Tracked/visualization_msgs/msg/_image_marker.py | EnzoBrancaccio/tracked | c32905da259d8ac9e2261294d6f56fd92efd7bc9 | [
"CC0-1.0"
] | null | null | null | # generated from rosidl_generator_py/resource/_idl.py.em
# with input from visualization_msgs:msg\ImageMarker.idl
# generated code does not contain a copyright notice
# Import statements for member types
from rosidl_parser.rosidl_parser import definition as rosidl_parser_definition # noqa: E402, I100
class Metacl... | 34.715203 | 141 | 0.583272 |
7986b4cd7f2791e1407dbc24a7a1fd5eb314baa5 | 3,540 | py | Python | utils/matrix_sqrt.py | talcron/frame-prediction-pytorch | 1a2fcc56c89ff031c2eba0547c5c898c6f8c3eab | [
"Apache-2.0"
] | 6 | 2021-02-16T22:30:40.000Z | 2022-02-17T06:44:11.000Z | utils/matrix_sqrt.py | talcron/frame-prediction-pytorch | 1a2fcc56c89ff031c2eba0547c5c898c6f8c3eab | [
"Apache-2.0"
] | null | null | null | utils/matrix_sqrt.py | talcron/frame-prediction-pytorch | 1a2fcc56c89ff031c2eba0547c5c898c6f8c3eab | [
"Apache-2.0"
] | null | null | null | """
Matrix square root and its gradient on the GPU
Author: Subhransu Maji (smaji@cs.umass.edu)
Date: Dec 19, 2017
Port to python 3.8, pytorch 1.7
Author: Ian Pegg
Date: Mar 5, 2021
"""
import torch
__all__ = ['sqrt_svd_lyap', 'sqrt_denman_beavers', 'sqrt_newton_schulz', 'sqrt_newton_schulz_autograd',
'lyap... | 34.705882 | 106 | 0.59435 |
7986d08846a36665ed2d0a383d0726321002ab4c | 891 | py | Python | py/413. Arithmetic Slices.py | longwangjhu/LeetCode | a5c33e8d67e67aedcd439953d96ac7f443e2817b | [
"MIT"
] | 3 | 2021-08-07T07:01:34.000Z | 2021-08-07T07:03:02.000Z | py/413. Arithmetic Slices.py | longwangjhu/LeetCode | a5c33e8d67e67aedcd439953d96ac7f443e2817b | [
"MIT"
] | null | null | null | py/413. Arithmetic Slices.py | longwangjhu/LeetCode | a5c33e8d67e67aedcd439953d96ac7f443e2817b | [
"MIT"
] | null | null | null | # https://leetcode.com/problems/arithmetic-slices/
# An integer array is called arithmetic if it consists of at least three elements
# and if the difference between any two consecutive elements is the same.
# Given an integer array nums, return the number of arithmetic subarrays of nums.
# A subarray is a contiguous... | 33 | 81 | 0.552189 |
798700447bebf49c9515ad62cf3a2ce4f8e1ed51 | 3,956 | py | Python | datum/export/export.py | openAGI/datum | 2dfc8c62ed1366fd8544b8b25d730d89dfb57d4e | [
"Apache-2.0"
] | 6 | 2020-05-17T10:03:24.000Z | 2021-07-05T18:38:06.000Z | datum/export/export.py | openAGI/datum | 2dfc8c62ed1366fd8544b8b25d730d89dfb57d4e | [
"Apache-2.0"
] | 2 | 2021-07-26T03:22:47.000Z | 2022-02-09T23:33:33.000Z | datum/export/export.py | openAGI/datum | 2dfc8c62ed1366fd8544b8b25d730d89dfb57d4e | [
"Apache-2.0"
] | 1 | 2021-06-14T14:49:38.000Z | 2021-06-14T14:49:38.000Z | # Copyright 2021 The OpenAGI Datum 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 ... | 44.954545 | 89 | 0.720425 |
79873057b45db88939d5274d175d38790aec4ef1 | 2,901 | py | Python | aries_cloudagent/commands/start.py | dhiway/aries-cloudagent-python | f08b7d65e404c8274c6606328c959a865a22c706 | [
"Apache-2.0"
] | 2 | 2019-10-10T16:33:01.000Z | 2019-10-10T19:22:17.000Z | aries_cloudagent/commands/start.py | dhiway/aries-cloudagent-python | f08b7d65e404c8274c6606328c959a865a22c706 | [
"Apache-2.0"
] | 5 | 2019-10-13T01:28:48.000Z | 2019-10-21T20:10:47.000Z | aries_cloudagent/commands/start.py | dhiway/aries-cloudagent-python | f08b7d65e404c8274c6606328c959a865a22c706 | [
"Apache-2.0"
] | 4 | 2019-07-09T20:41:03.000Z | 2021-06-06T10:45:23.000Z | """Entrypoint."""
import asyncio
import functools
import logging
import os
import signal
from argparse import ArgumentParser
from typing import Coroutine, Sequence
try:
import uvloop
except ImportError:
uvloop = None
from ..core.conductor import Conductor
from ..config import argparse as arg
from ..config.de... | 27.367925 | 85 | 0.681489 |
79875780e91c4a854f55f3edf8c913a2844278f2 | 1,018 | py | Python | tap_list_providers/management/commands/parseexampletaplist.py | danroberts728/hsvdotbeer | 5b977bf4a7aab149ad56564b3adbb09424500308 | [
"Apache-2.0"
] | 18 | 2018-12-06T01:46:37.000Z | 2021-10-17T10:37:17.000Z | tap_list_providers/management/commands/parseexampletaplist.py | danroberts728/hsvdotbeer | 5b977bf4a7aab149ad56564b3adbb09424500308 | [
"Apache-2.0"
] | 194 | 2018-11-04T12:50:49.000Z | 2022-01-06T22:43:43.000Z | tap_list_providers/management/commands/parseexampletaplist.py | danroberts728/hsvdotbeer | 5b977bf4a7aab149ad56564b3adbb09424500308 | [
"Apache-2.0"
] | 7 | 2019-03-18T05:36:06.000Z | 2020-12-25T03:27:29.000Z | """Parse the example tap list as if it were a real bar"""
import os
from django.core.management.base import BaseCommand
from django.db import transaction
from hsv_dot_beer.config.local import BASE_DIR
from tap_list_providers.example import ExampleTapListProvider
class Command(BaseCommand):
help = "Populates any... | 32.83871 | 83 | 0.691552 |
79878dfdc31f2effe65343221006223251a4f2d8 | 5,822 | py | Python | scripts/curly.py | datadavev/mnlite | be3118cde634fce97ea689e1044803edf3cbc1ea | [
"Apache-2.0"
] | null | null | null | scripts/curly.py | datadavev/mnlite | be3118cde634fce97ea689e1044803edf3cbc1ea | [
"Apache-2.0"
] | 14 | 2021-07-07T13:17:40.000Z | 2022-01-17T19:01:34.000Z | scripts/curly.py | datadavev/mnlite | be3118cde634fce97ea689e1044803edf3cbc1ea | [
"Apache-2.0"
] | null | null | null | """
HTTP REquest introspection
"""
import sys
import logging
import click
import requests
import pyld
try:
import orjson as json
except ModuleNotFoundError:
import json
import opersist.rdfutils
# import igsn_lib.link_requests
LOG_LEVELS = {
"DEBUG": logging.DEBUG,
"INFO": logging.INFO,
"WARNING"... | 27.205607 | 87 | 0.625386 |
7987bb5051ca2c12bb20f84aae6be4bcfd4c3cdb | 25,379 | py | Python | modules/templates/default/parser.py | nursix/DRKCM | 09328289ff721c416494398aa751ff99906327cb | [
"MIT"
] | 3 | 2022-01-26T08:07:54.000Z | 2022-03-21T21:53:52.000Z | modules/templates/default/parser.py | nursix/eden-asp | e49f46cb6488918f8d5a163dcd5a900cd686978c | [
"MIT"
] | null | null | null | modules/templates/default/parser.py | nursix/eden-asp | e49f46cb6488918f8d5a163dcd5a900cd686978c | [
"MIT"
] | 1 | 2017-10-03T13:03:47.000Z | 2017-10-03T13:03:47.000Z | # -*- coding: utf-8 -*-
""" Message Parsing
Template-specific Message Parsers are defined here.
@copyright: 2012-2021 (c) Sahana Software Foundation
@license: MIT
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files ... | 35.248611 | 93 | 0.449427 |
7987e4e1094b6fe94f7eb28c633f63b9840a5ff2 | 332 | py | Python | eventsourcing/tests/test_process_with_django.py | alexanderlarin/eventsourcing | 6f2a4ded3c783ba3ee465243a48f66ecdee20f52 | [
"BSD-3-Clause"
] | 1 | 2020-02-10T08:12:31.000Z | 2020-02-10T08:12:31.000Z | eventsourcing/tests/test_process_with_django.py | alexanderlarin/eventsourcing | 6f2a4ded3c783ba3ee465243a48f66ecdee20f52 | [
"BSD-3-Clause"
] | null | null | null | eventsourcing/tests/test_process_with_django.py | alexanderlarin/eventsourcing | 6f2a4ded3c783ba3ee465243a48f66ecdee20f52 | [
"BSD-3-Clause"
] | null | null | null | from eventsourcing.tests.sequenced_item_tests.test_django_record_manager import DjangoTestCase
from eventsourcing.application.django import DjangoApplication
from eventsourcing.tests.test_process import TestProcess
class TestProcessWithDjango(DjangoTestCase, TestProcess):
process_class = DjangoApplication
del(T... | 30.181818 | 94 | 0.876506 |
7987edc7114460284f3773a2e4766d99ee13be1a | 2,276 | py | Python | chhotu/orders/models.py | roshan007/chhout.web.backend | a952a53d908fb0c648b8b7279130166c2054f502 | [
"MIT"
] | null | null | null | chhotu/orders/models.py | roshan007/chhout.web.backend | a952a53d908fb0c648b8b7279130166c2054f502 | [
"MIT"
] | null | null | null | chhotu/orders/models.py | roshan007/chhout.web.backend | a952a53d908fb0c648b8b7279130166c2054f502 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
from django.db import models
from django.utils.translation import ugettext_lazy as _
from products.models import Product
from accounts.models import Profile
from .managers import CartManager, OrderManager
CONFIRMED = "1"
INPROGRESS = "2"
DELIVERED = "3"
CANCELLED = "4"
ORDER... | 32.514286 | 118 | 0.695079 |
7987f4326746522da739fab076b582a3159714da | 318 | py | Python | practise/jumpgame.py | mengyangbai/leetcode | e7a6906ecc5bce665dec5d0f057b302a64d50f40 | [
"MIT"
] | null | null | null | practise/jumpgame.py | mengyangbai/leetcode | e7a6906ecc5bce665dec5d0f057b302a64d50f40 | [
"MIT"
] | null | null | null | practise/jumpgame.py | mengyangbai/leetcode | e7a6906ecc5bce665dec5d0f057b302a64d50f40 | [
"MIT"
] | null | null | null | class Solution(object):
def canJump(self, nums):
step = nums[0]
for i in range(1, len(nums)):
if step > 0:
step -= 1
step = max(step, nums[i])
else:
return False
return True
a = Solution()
a.canJump([2, 3, 1, 1, 4])
| 21.2 | 41 | 0.440252 |
798803e076d2e5ca04b9d22a04051df99ba64bc5 | 82 | py | Python | bot/error_classes/__init__.py | NMisko/monkalot | 965a16ca6a4921c8a9e6e996e9a0e3a9beb8444b | [
"MIT"
] | 20 | 2017-09-08T21:13:38.000Z | 2022-01-29T03:24:13.000Z | bot/error_classes/__init__.py | NMisko/monkalot | 965a16ca6a4921c8a9e6e996e9a0e3a9beb8444b | [
"MIT"
] | 32 | 2017-08-20T17:46:14.000Z | 2021-11-18T22:54:59.000Z | bot/error_classes/__init__.py | NMisko/monkalot | 965a16ca6a4921c8a9e6e996e9a0e3a9beb8444b | [
"MIT"
] | 10 | 2017-08-19T01:13:41.000Z | 2021-08-07T08:45:30.000Z | """ Package for custom classes."""
from .error_classes import UserNotFoundError
| 16.4 | 44 | 0.768293 |
7988064183ac5b557d3ca01ceec579b352280a30 | 23,555 | py | Python | homeassistant/components/media_player/__init__.py | mweinelt/home-assistant | cc0d0a38d7f24885e5146bd0826fa8ba3e2b39a1 | [
"MIT"
] | null | null | null | homeassistant/components/media_player/__init__.py | mweinelt/home-assistant | cc0d0a38d7f24885e5146bd0826fa8ba3e2b39a1 | [
"MIT"
] | null | null | null | homeassistant/components/media_player/__init__.py | mweinelt/home-assistant | cc0d0a38d7f24885e5146bd0826fa8ba3e2b39a1 | [
"MIT"
] | null | null | null | """
Component to interface with various media players.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/media_player/
"""
import asyncio
import hashlib
import logging
import os
from aiohttp import web
import async_timeout
import voluptuous as vol
from h... | 30.831152 | 79 | 0.681809 |
798827f32794b40eebd75474cea624105f4dd490 | 1,402 | py | Python | ngsutils/bed/overlap.py | bgruening/ngsutils | 417e90dc1918fb553dd84990f2c54bd8cea8f44d | [
"BSD-3-Clause"
] | 57 | 2015-03-09T01:26:45.000Z | 2022-02-22T07:26:01.000Z | ngsutils/bed/overlap.py | bgruening/ngsutils | 417e90dc1918fb553dd84990f2c54bd8cea8f44d | [
"BSD-3-Clause"
] | 33 | 2015-02-03T23:24:46.000Z | 2022-03-16T20:08:10.000Z | ngsutils/bed/overlap.py | bgruening/ngsutils | 417e90dc1918fb553dd84990f2c54bd8cea8f44d | [
"BSD-3-Clause"
] | 33 | 2015-01-18T16:47:47.000Z | 2022-02-22T07:28:09.000Z | #!/usr/bin/env python
#!/usr/bin/env python
## category General
## desc Find overlapping BED regions from a query and target file
'''
Finds BED regions from the query file that overlap with regions from the target file.
'''
import os
import sys
from ngsutils.bed import BedStreamer, BedFile
def usage():
print __d... | 26.45283 | 121 | 0.616976 |
798852ad56fc4225b24490b48083abec144f8b75 | 3,815 | py | Python | geomstats/geometry/product_riemannian_metric.py | opeltre/geomstats | 135d5bb6f19e29dd453c68399e04100a9e2c76bf | [
"MIT"
] | null | null | null | geomstats/geometry/product_riemannian_metric.py | opeltre/geomstats | 135d5bb6f19e29dd453c68399e04100a9e2c76bf | [
"MIT"
] | null | null | null | geomstats/geometry/product_riemannian_metric.py | opeltre/geomstats | 135d5bb6f19e29dd453c68399e04100a9e2c76bf | [
"MIT"
] | null | null | null | """
Product of Riemannian metrics.
"""
import geomstats.backend as gs
from geomstats.geometry.riemannian_metric import RiemannianMetric
EPSILON = 1e-5
# TODO(nina): unit tests
class ProductRiemannianMetric(RiemannianMetric):
"""
Class for product of Riemannian metrics.
"""
def __init__(self, metri... | 33.761062 | 76 | 0.569332 |
79886fce52a3028bf52818d7c0a210b1b9ef994a | 304 | py | Python | tests/fixtures/paths.py | pschelle/pyonepassword | 2258c0fa851ad6a63c4f959982a66c715706b654 | [
"MIT"
] | 12 | 2019-08-11T09:08:47.000Z | 2022-03-18T22:10:12.000Z | tests/fixtures/paths.py | pschelle/pyonepassword | 2258c0fa851ad6a63c4f959982a66c715706b654 | [
"MIT"
] | 23 | 2019-09-13T20:16:12.000Z | 2022-01-15T18:29:52.000Z | tests/fixtures/paths.py | pschelle/pyonepassword | 2258c0fa851ad6a63c4f959982a66c715706b654 | [
"MIT"
] | 10 | 2020-03-10T19:49:35.000Z | 2022-01-18T14:09:10.000Z | from pathlib import Path
TEST_DATA_PATH = Path("tests", "data")
TEST_CONFIG_PATH = Path("tests", "config")
EXPECTED_DATA_PATH = Path(TEST_DATA_PATH, "expected-data.json")
MOCK_OP_CONFIG_PATH = Path(TEST_CONFIG_PATH, "mock-op")
RESP_DIRECTORY_PATH = Path(MOCK_OP_CONFIG_PATH, "response-directory.json")
| 33.777778 | 74 | 0.786184 |
79887d4750a30a7ed5067bde4ffdb7d6e69e9f7b | 147 | py | Python | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_apds9960/__init__.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 47 | 2021-02-15T23:02:36.000Z | 2022-03-04T21:30:03.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_apds9960/__init__.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 19 | 2018-01-02T20:40:57.000Z | 2022-03-08T19:22:56.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_apds9960/__init__.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 17 | 2018-01-03T03:02:29.000Z | 2022-03-03T10:18:03.000Z | # SPDX-FileCopyrightText: 2017 Michael McWethy for Adafruit Industries
#
# SPDX-License-Identifier: MIT
"""common include for APDS9960 driver """
| 24.5 | 70 | 0.77551 |
7988c2874bcfd73021d7915c3a769a662f75321f | 5,161 | py | Python | examples/Cliner/CliNER/code/machine_learning/crf.py | swapnull7/forte | 737a72afd440d40c3826c3a7c5e4e44235c0f701 | [
"Apache-2.0"
] | null | null | null | examples/Cliner/CliNER/code/machine_learning/crf.py | swapnull7/forte | 737a72afd440d40c3826c3a7c5e4e44235c0f701 | [
"Apache-2.0"
] | null | null | null | examples/Cliner/CliNER/code/machine_learning/crf.py | swapnull7/forte | 737a72afd440d40c3826c3a7c5e4e44235c0f701 | [
"Apache-2.0"
] | null | null | null | ######################################################################
# CliCon - crf.py #
# #
# Willie Boag wboag@cs.uml.edu #
# ... | 28.048913 | 77 | 0.540787 |
7989216fecbcd5c6707055917a94fedc1bfbb6f4 | 1,933 | py | Python | tests/test_utils.py | cbwang2016/quimb | 633ae4117e6fc5518f9b1bc07a0ae734f058072c | [
"Apache-2.0"
] | 264 | 2018-01-30T10:06:09.000Z | 2022-03-28T01:39:40.000Z | tests/test_utils.py | adamcallison/quimb | a06fb9fc58976936bf7d631179ece0f832bf96a9 | [
"Apache-2.0"
] | 114 | 2017-10-24T22:37:15.000Z | 2022-03-31T18:58:55.000Z | tests/test_utils.py | adamcallison/quimb | a06fb9fc58976936bf7d631179ece0f832bf96a9 | [
"Apache-2.0"
] | 60 | 2017-10-24T22:28:43.000Z | 2022-02-28T13:54:20.000Z | import pytest
from quimb.utils import (
raise_cant_find_library_function,
deprecated,
oset,
)
class TestLibraryFinding:
def test_raise_cant_find_library_function(self):
fn = raise_cant_find_library_function(
"alibthatisdefinitelynotinstalledasfeasdf")
with pytest.raises(I... | 22.218391 | 56 | 0.495085 |
79896e39264b155f54e34c556cd64bb1cddbcb33 | 5,112 | py | Python | code/homophones.py | hanuele/knausj_german | cc6b66b0e5333714fcb5c9a96521af779927b795 | [
"MIT"
] | null | null | null | code/homophones.py | hanuele/knausj_german | cc6b66b0e5333714fcb5c9a96521af779927b795 | [
"MIT"
] | null | null | null | code/homophones.py | hanuele/knausj_german | cc6b66b0e5333714fcb5c9a96521af779927b795 | [
"MIT"
] | null | null | null | from talon import Context, Module, app, clip, cron, imgui, actions, ui, fs
import os
########################################################################
# global settings
########################################################################
# a list of homophones where each line is a comma separated list
# e.... | 31.170732 | 117 | 0.653951 |
79897bae3bb4bf702e7906d7f72df80e00145571 | 89,850 | py | Python | mokas_stackimages.py | gdurin/mokas | 57893d0191c988b241dcf5701d4213a3cbcf587a | [
"CC-BY-3.0"
] | null | null | null | mokas_stackimages.py | gdurin/mokas | 57893d0191c988b241dcf5701d4213a3cbcf587a | [
"CC-BY-3.0"
] | null | null | null | mokas_stackimages.py | gdurin/mokas | 57893d0191c988b241dcf5701d4213a3cbcf587a | [
"CC-BY-3.0"
] | null | null | null | import os, sys, glob, time, re
import scipy
import scipy.ndimage as nd
import scipy.signal as signal
import scipy.stats.stats
import numpy as np
import numpy.ma as ma
import matplotlib as mpl
import matplotlib.pyplot as plt
import matplotlib.colors as colors
import matplotlib.cm as cmx
from colorsys import hsv_to_rgb
f... | 43.176358 | 178 | 0.571541 |
79898b5917d44c9a6c0a8446e02e371a7e17ed04 | 3,835 | py | Python | cloudmersive_validate_api_client/models/full_name_validation_request.py | doc22940/cloudmersive.apiclient.python | 8646291f45ebd7c6572a296e30f693693a6782c4 | [
"Apache-2.0"
] | 3 | 2018-06-23T21:37:21.000Z | 2020-04-20T23:07:36.000Z | cloudmersive_validate_api_client/models/full_name_validation_request.py | doc22940/cloudmersive.apiclient.python | 8646291f45ebd7c6572a296e30f693693a6782c4 | [
"Apache-2.0"
] | 1 | 2019-02-04T17:03:35.000Z | 2019-03-02T20:16:52.000Z | cloudmersive_validate_api_client/models/full_name_validation_request.py | doc22940/cloudmersive.apiclient.python | 8646291f45ebd7c6572a296e30f693693a6782c4 | [
"Apache-2.0"
] | 2 | 2019-03-21T15:54:15.000Z | 2020-05-27T17:30:43.000Z | # coding: utf-8
"""
validateapi
The validation APIs help you validate data. Check if an E-mail address is real. Check if a domain is real. Check up on an IP address, and even where it is located. All this and much more is available in the validation API. # noqa: E501
OpenAPI spec version: v1
Ge... | 32.5 | 240 | 0.609387 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.