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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f732bc1b7ca91f3afc2f231955f65cca8899c654 | 4,498 | py | Python | predictor.py | maltius/tf_blazeface_training | c4c73590f5084fcac56fa1625d227acf45a918ae | [
"Apache-2.0"
] | null | null | null | predictor.py | maltius/tf_blazeface_training | c4c73590f5084fcac56fa1625d227acf45a918ae | [
"Apache-2.0"
] | null | null | null | predictor.py | maltius/tf_blazeface_training | c4c73590f5084fcac56fa1625d227acf45a918ae | [
"Apache-2.0"
] | null | null | null | import tensorflow as tf
from utils import bbox_utils, data_utils, drawing_utils, io_utils, train_utils, landmark_utils
import blazeface
args = io_utils.handle_args()
if args.handle_gpu:
io_utils.handle_gpu_compatibility()
batch_size = 1
use_custom_images = False
custom_image_path = "data/images/"
hyper_params = t... | 42.037383 | 115 | 0.769898 |
d10fad278e23af34152d81a46d07c431e247d360 | 6,779 | py | Python | cumulusci/tasks/apex/batch.py | davisagli/CumulusCI | fd74c324ad3ff662484b159395c639879011e711 | [
"BSD-3-Clause"
] | 163 | 2018-09-13T18:49:34.000Z | 2022-03-25T08:37:15.000Z | cumulusci/tasks/apex/batch.py | davisagli/CumulusCI | fd74c324ad3ff662484b159395c639879011e711 | [
"BSD-3-Clause"
] | 1,280 | 2018-09-11T20:09:37.000Z | 2022-03-31T18:40:21.000Z | cumulusci/tasks/apex/batch.py | davisagli/CumulusCI | fd74c324ad3ff662484b159395c639879011e711 | [
"BSD-3-Clause"
] | 125 | 2015-01-17T16:05:39.000Z | 2018-09-06T19:05:00.000Z | """ a task for waiting on a Batch Apex job to complete """
from datetime import datetime
from typing import Optional, Sequence
from cumulusci.core.exceptions import SalesforceException
from cumulusci.tasks.salesforce import BaseSalesforceApiTask
from cumulusci.utils import parse_api_datetime
COMPLETED_STATUSES = ["Co... | 37.453039 | 144 | 0.580027 |
ece841f4488c1ee591aba482975804402b8dc5c7 | 30,190 | py | Python | uhd_restpy/testplatform/sessions/ixnetwork/topology/isisl3routeproperty_a6c8c14dbcd51f5aa443f5e32d58e8f0.py | rfrye-github/ixnetwork_restpy | 23eeb24b21568a23d3f31bbd72814ff55eb1af44 | [
"MIT"
] | null | null | null | uhd_restpy/testplatform/sessions/ixnetwork/topology/isisl3routeproperty_a6c8c14dbcd51f5aa443f5e32d58e8f0.py | rfrye-github/ixnetwork_restpy | 23eeb24b21568a23d3f31bbd72814ff55eb1af44 | [
"MIT"
] | null | null | null | uhd_restpy/testplatform/sessions/ixnetwork/topology/isisl3routeproperty_a6c8c14dbcd51f5aa443f5e32d58e8f0.py | rfrye-github/ixnetwork_restpy | 23eeb24b21568a23d3f31bbd72814ff55eb1af44 | [
"MIT"
] | null | null | null | # MIT LICENSE
#
# Copyright 1997 - 2020 by IXIA Keysight
#
# 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, ... | 40.092961 | 545 | 0.62736 |
9b858117022cff4ad7c7d787f14079f69e93c112 | 10,320 | py | Python | test/test_providers.py | claclark/ir_measures | 0696f3cdf3d259d7f6713ef6e5cc4a6c2717d6de | [
"Apache-2.0"
] | null | null | null | test/test_providers.py | claclark/ir_measures | 0696f3cdf3d259d7f6713ef6e5cc4a6c2717d6de | [
"Apache-2.0"
] | null | null | null | test/test_providers.py | claclark/ir_measures | 0696f3cdf3d259d7f6713ef6e5cc4a6c2717d6de | [
"Apache-2.0"
] | null | null | null | import numpy
import unittest
import itertools
import ir_measures
from ir_measures import *
from ir_measures import Metric, CwlMetric
class TestPytrecEval(unittest.TestCase):
def test_empty(self):
qrels = list(ir_measures.read_trec_qrels('''
0 0 D0 0
0 0 D1 1
0 0 D2 1
0 0 D3 2
0 0 D4 0
1 0 D0 1
1 0 D3 2
1... | 73.191489 | 179 | 0.668992 |
552f5b487a658a34c0fbd3902f543ac9508e5907 | 564 | py | Python | laonlp/tokenize/__init__.py | shun-liang/LaoNLP | 8a710eba2a53a303cd3e76899aaed13805f4da55 | [
"Apache-2.0"
] | null | null | null | laonlp/tokenize/__init__.py | shun-liang/LaoNLP | 8a710eba2a53a303cd3e76899aaed13805f4da55 | [
"Apache-2.0"
] | null | null | null | laonlp/tokenize/__init__.py | shun-liang/LaoNLP | 8a710eba2a53a303cd3e76899aaed13805f4da55 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from pythainlp.tokenize import Tokenizer
from laonlp.corpus import lao_words
_word = Tokenizer(lao_words(), engine="mm")
def word_tokenize(sent:str)->list:
"""
Lao word tokenize
:param str sent: lao text
:return: returns a list of lao words
:rtype: list
"""
return ... | 20.888889 | 43 | 0.650709 |
455bfd9c48538869895784a52d46536bf773b9ff | 3,518 | py | Python | apps/subscriptions/views.py | mehanig/aeupdates | b6d825e0c3d013d2e399a750d7c78aaf8fe77555 | [
"WTFPL"
] | 5 | 2016-04-11T21:00:07.000Z | 2016-11-24T11:08:18.000Z | apps/subscriptions/views.py | mehanig/aeupdates | b6d825e0c3d013d2e399a750d7c78aaf8fe77555 | [
"WTFPL"
] | null | null | null | apps/subscriptions/views.py | mehanig/aeupdates | b6d825e0c3d013d2e399a750d7c78aaf8fe77555 | [
"WTFPL"
] | null | null | null | from django.contrib.auth.models import User, Group
from django.conf import settings
from rest_framework.response import Response
from rest_framework.status import HTTP_403_FORBIDDEN
from rest_framework import viewsets
from apps.subscriptions.serializers import UserSerializer, GroupSerializer
from rest_framework_jwt.vi... | 35.535354 | 83 | 0.686185 |
ba517805da6cbd01c35a963c217d4e96c567c1cd | 32,216 | py | Python | test/test_runner.py | BlaineAtAffirm/behave | 3cbac3e5726b2231c7d681f3cc0653c1ec3817f6 | [
"BSD-2-Clause"
] | null | null | null | test/test_runner.py | BlaineAtAffirm/behave | 3cbac3e5726b2231c7d681f3cc0653c1ec3817f6 | [
"BSD-2-Clause"
] | null | null | null | test/test_runner.py | BlaineAtAffirm/behave | 3cbac3e5726b2231c7d681f3cc0653c1ec3817f6 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, with_statement
from collections import defaultdict
from six import StringIO
import six
import os.path
import sys
import warnings
import tempfile
from mock import Mock, patch
from nose.tools import *
import unittest
from behave import mod... | 32.541414 | 110 | 0.602899 |
36473441bf08e00fee9868a7dcb40c99125781ed | 7,059 | py | Python | nitorch/cli/registration/compose/main.py | balbasty/nitorch | d30c3125a8a66ea1434f2b39ed03338afd9724b4 | [
"MIT"
] | 46 | 2020-07-31T10:14:05.000Z | 2022-03-24T12:51:46.000Z | nitorch/cli/registration/compose/main.py | balbasty/nitorch | d30c3125a8a66ea1434f2b39ed03338afd9724b4 | [
"MIT"
] | 36 | 2020-10-06T19:01:38.000Z | 2022-02-03T18:07:35.000Z | nitorch/cli/registration/compose/main.py | balbasty/nitorch | d30c3125a8a66ea1434f2b39ed03338afd9724b4 | [
"MIT"
] | 6 | 2021-01-05T14:59:05.000Z | 2021-11-18T18:26:45.000Z | from nitorch import spatial, io
from nitorch.core import utils
from nitorch.core.dtypes import dtype as nitype
import torch
import os
from .parser import FileWithInfo, Linear, Velocity, Displacement
from .. import helpers
def compose(options):
read_info(options)
collapse_transforms(options)
write_data(opt... | 36.015306 | 84 | 0.543561 |
662ef820a4f2b60e5d48c14733b6523f7e244e47 | 6,501 | py | Python | nest_egg_mcs.py | rrodero83-python-projects/nest-egg | a81dd7322056534e0bcbadfd67bcb4275f66f09c | [
"Apache-2.0"
] | null | null | null | nest_egg_mcs.py | rrodero83-python-projects/nest-egg | a81dd7322056534e0bcbadfd67bcb4275f66f09c | [
"Apache-2.0"
] | null | null | null | nest_egg_mcs.py | rrodero83-python-projects/nest-egg | a81dd7322056534e0bcbadfd67bcb4275f66f09c | [
"Apache-2.0"
] | null | null | null | import sys
import random
import matplotlib.pyplot as plt
def read_to_list(file_name):
"""Open a file of data in percent, convert to decimal & return a list."""
with open(file_name) as in_file:
lines = [float(line.strip()) for line in in_file]
decimal = [round(line / 100, 5) for line in lines]
... | 37.578035 | 111 | 0.665282 |
20d291249a43303c3b591e8bacf3fa0ee352de43 | 1,018 | py | Python | conformancechecking4spark/heuristics/utils.py | IDEA-Research-Group/conformancechecking4spark | c8fb8d76ab86cc76654bba7cbd19d678e86ef8cd | [
"IJG"
] | null | null | null | conformancechecking4spark/heuristics/utils.py | IDEA-Research-Group/conformancechecking4spark | c8fb8d76ab86cc76654bba7cbd19d678e86ef8cd | [
"IJG"
] | null | null | null | conformancechecking4spark/heuristics/utils.py | IDEA-Research-Group/conformancechecking4spark | c8fb8d76ab86cc76654bba7cbd19d678e86ef8cd | [
"IJG"
] | null | null | null | def get_repeated_log(log):
events_in_logs = {}
for event in log:
activity = str(event['concept:name'])
if activity not in events_in_logs.keys():
events_in_logs[activity] = 1
else:
events_in_logs[activity] += 1
return events_in_logs
def get_repeated_net(net):... | 26.789474 | 53 | 0.602161 |
340db874aabe4de5f751a815ac9f298af1bc77c2 | 7,666 | py | Python | tests/test_pandemy/test__datetime.py | antonlydell/Pandemy | e64e836ca35dff926ee6abf93cc2cd9aa2feb798 | [
"MIT"
] | null | null | null | tests/test_pandemy/test__datetime.py | antonlydell/Pandemy | e64e836ca35dff926ee6abf93cc2cd9aa2feb798 | [
"MIT"
] | 1 | 2022-02-12T21:21:00.000Z | 2022-02-12T21:21:00.000Z | tests/test_pandemy/test__datetime.py | antonlydell/Pandemy | e64e836ca35dff926ee6abf93cc2cd9aa2feb798 | [
"MIT"
] | null | null | null | r"""Tests for the _datetime module of Pandemy.
The _datetime module handles timezone conversions.
"""
# =================================================
# Imports
# =================================================
# Standard Library
import io
# Third Party
import pandas as pd
from pandas.testing import assert_fra... | 37.395122 | 104 | 0.507827 |
603256b0461c8698f0ee4b6ca0d126675e0e4b66 | 3,615 | py | Python | .history/functions_20211223152748.py | tjxj/pdf2docx | 3338a95f1a971de8caf0369fa3ce794d2d6d57cd | [
"Apache-2.0"
] | null | null | null | .history/functions_20211223152748.py | tjxj/pdf2docx | 3338a95f1a971de8caf0369fa3ce794d2d6d57cd | [
"Apache-2.0"
] | null | null | null | .history/functions_20211223152748.py | tjxj/pdf2docx | 3338a95f1a971de8caf0369fa3ce794d2d6d57cd | [
"Apache-2.0"
] | null | null | null | import streamlit as st
import base64
import os
import time
from pdf2docx import Converter
import tempfile
from pathlib import Path
import streamlit as st
from pdf2image import convert_from_path
def body():
st.side('请选择功能')
st.sidebar.subheader("请选择西瓜外观:sunglasses:")
color = st.sidebar.selectbox("色泽", ("青绿", "... | 28.690476 | 129 | 0.679115 |
1fff3cb6251fd7dfc2f5a2f2b968d5f686acae4a | 5,507 | py | Python | baselines/run_demo_baselines.py | SakastLord/STGAT | 664843b3a55ac55383de1d5400d731376476ea03 | [
"MIT"
] | null | null | null | baselines/run_demo_baselines.py | SakastLord/STGAT | 664843b3a55ac55383de1d5400d731376476ea03 | [
"MIT"
] | null | null | null | baselines/run_demo_baselines.py | SakastLord/STGAT | 664843b3a55ac55383de1d5400d731376476ea03 | [
"MIT"
] | 1 | 2021-11-22T01:49:32.000Z | 2021-11-22T01:49:32.000Z | import torch
import numpy as np
import argparse
import time
import util
import os
import matplotlib.pyplot as plt
import torch.nn as nn
import pandas as pd
from fastprogress import progress_bar
import torch.nn.functional as F
from model_stgat import stgat
os.environ["KMP_DUPLICATE_LIB_OK"] = "TRUE"
os.environ["CUDA_... | 40.492647 | 117 | 0.67732 |
743e535b430f935807103b30b1a59a47f0629f9b | 2,900 | py | Python | deal/linter/_func.py | life4/deal | 65e3191198dbc0573e88ff2cfd5d9cd3b5f0907e | [
"MIT"
] | 311 | 2019-10-04T04:27:42.000Z | 2022-03-30T23:38:30.000Z | deal/linter/_func.py | life4/deal | 65e3191198dbc0573e88ff2cfd5d9cd3b5f0907e | [
"MIT"
] | 42 | 2019-09-29T17:05:05.000Z | 2022-03-18T08:10:00.000Z | deal/linter/_func.py | life4/deal | 65e3191198dbc0573e88ff2cfd5d9cd3b5f0907e | [
"MIT"
] | 17 | 2019-09-29T20:08:39.000Z | 2022-03-04T08:22:13.000Z | import ast
from pathlib import Path
from typing import List, NamedTuple
import astroid
from ._contract import Category, Contract
from ._extractors import get_contracts, get_definitions
class Func(NamedTuple):
name: str
args: ast.arguments
body: list
contracts: List[Contract]
line: int
col: ... | 30.208333 | 83 | 0.525172 |
215a56b2dbfa8de81ba72e896db3a89e6ad57b19 | 7,307 | py | Python | runescape/runescape.py | xchedeiklo/Trusty-cogs | aab00abed009f0123e495c54b34e1689ac97992e | [
"MIT"
] | 1 | 2020-12-28T15:58:16.000Z | 2020-12-28T15:58:16.000Z | runescape/runescape.py | xchedeiklo/Trusty-cogs | aab00abed009f0123e495c54b34e1689ac97992e | [
"MIT"
] | null | null | null | runescape/runescape.py | xchedeiklo/Trusty-cogs | aab00abed009f0123e495c54b34e1689ac97992e | [
"MIT"
] | null | null | null | import discord
from redbot.core import commands
from redbot.core import Config
from random import randint
from random import choice
from enum import Enum
import json
import datetime
import aiohttp
import asyncio
from tabulate import tabulate
from .profile import Profile
class Runescape(commands.Cog):
"""
... | 38.256545 | 153 | 0.601067 |
19179d97fca64f9a745a82339e7c26c63b602220 | 133 | py | Python | remotedocker/manage/__init__.py | Plesoun/remotedocker | 14ee1bf4095199650c2e976d3b48ee022a207ee7 | [
"Apache-2.0"
] | null | null | null | remotedocker/manage/__init__.py | Plesoun/remotedocker | 14ee1bf4095199650c2e976d3b48ee022a207ee7 | [
"Apache-2.0"
] | null | null | null | remotedocker/manage/__init__.py | Plesoun/remotedocker | 14ee1bf4095199650c2e976d3b48ee022a207ee7 | [
"Apache-2.0"
] | null | null | null | from .handler import ManageWebHandler
from .service import ManageWebservice
__all__ = [
"ManageWebHandler",
"ManageWebservice",
]
| 16.625 | 37 | 0.789474 |
8c2a8bdf359b00f63fed613b64fc6aac84e5bdca | 2,580 | py | Python | conans/test/functional/scm/test_command_export.py | trassir/conan | f4229764a9c18dc524e360e07af97279713dd9be | [
"MIT"
] | null | null | null | conans/test/functional/scm/test_command_export.py | trassir/conan | f4229764a9c18dc524e360e07af97279713dd9be | [
"MIT"
] | null | null | null | conans/test/functional/scm/test_command_export.py | trassir/conan | f4229764a9c18dc524e360e07af97279713dd9be | [
"MIT"
] | null | null | null | # coding=utf-8
import itertools
import textwrap
import unittest
import pytest
from nose.plugins.attrib import attr
from parameterized import parameterized
from conans.test.utils.scm import create_local_git_repo
from conans.test.utils.tools import TestClient
@attr("svn")
@pytest.mark.tool_svn
class ExportErrorComma... | 37.941176 | 98 | 0.551938 |
959f21bf5c651999cb9ac732062ec74c38c57153 | 6,916 | py | Python | Lib/site-packages/deriva/qt/common/json_editor.py | fochoao/cpython | 3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9 | [
"bzip2-1.0.6",
"0BSD"
] | null | null | null | Lib/site-packages/deriva/qt/common/json_editor.py | fochoao/cpython | 3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9 | [
"bzip2-1.0.6",
"0BSD"
] | 20 | 2021-05-03T18:02:23.000Z | 2022-03-12T12:01:04.000Z | Lib/site-packages/deriva/qt/common/json_editor.py | fochoao/cpython | 3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9 | [
"bzip2-1.0.6",
"0BSD"
] | null | null | null | import sys
from PyQt5.QtCore import Qt, QRegExp, QSize, QRect
from PyQt5.QtGui import QSyntaxHighlighter, QTextCharFormat, QFont, QPainter, QColor, QTextFormat
from PyQt5.QtWidgets import QTextEdit, QApplication, QWidget, QPlainTextEdit, QMessageBox, QDialog, QVBoxLayout
class JSONSyntaxHighlighter(QSyntaxHighlighte... | 33.25 | 111 | 0.632447 |
1c62c7b1a898e917bdb93a7e6cab1d73be4bae27 | 9,004 | py | Python | ExpRobot1.py | PtrMan/20NAR1 | e8e1a62c29c76bb6122358d84c82b29eb1cf330c | [
"MIT"
] | 3 | 2020-12-14T12:57:04.000Z | 2021-05-21T02:15:34.000Z | ExpRobot1.py | PtrMan/20NAR1 | e8e1a62c29c76bb6122358d84c82b29eb1cf330c | [
"MIT"
] | 2 | 2021-08-21T15:51:34.000Z | 2021-08-21T15:53:32.000Z | ExpRobot1.py | PtrMan/20NAR1 | e8e1a62c29c76bb6122358d84c82b29eb1cf330c | [
"MIT"
] | 1 | 2021-06-07T19:05:08.000Z | 2021-06-07T19:05:08.000Z | pathTo20Nar = "/home/r0b3/dev/rust/20mlish6"
# load module from path for python 3.5+
# from https://stackoverflow.com/a/67692/388614
import importlib.util
spec = importlib.util.spec_from_file_location("module.Binding", pathTo20Nar+"/Binding.py")
Binding = importlib.util.module_from_spec(spec)
spec.loader.exec_module(Bi... | 30.013333 | 116 | 0.572857 |
655cb78b020258288dc22c2292c014f02334dfe7 | 1,361 | py | Python | Cheetah/ErrorCatchers.py | CheetahTemplate3/cheetah3 | fa71bebcd926049a539f1d8fc3cb74425e5f4831 | [
"MIT"
] | 111 | 2017-03-04T11:35:50.000Z | 2022-02-15T08:10:28.000Z | Cheetah/ErrorCatchers.py | CheetahTemplate3/cheetah3 | fa71bebcd926049a539f1d8fc3cb74425e5f4831 | [
"MIT"
] | 49 | 2017-03-21T18:31:43.000Z | 2022-02-20T11:30:40.000Z | Cheetah/ErrorCatchers.py | CheetahTemplate3/cheetah3 | fa71bebcd926049a539f1d8fc3cb74425e5f4831 | [
"MIT"
] | 38 | 2017-03-21T00:44:43.000Z | 2021-09-18T09:45:13.000Z |
import time
from .NameMapper import NotFound
class Error(Exception):
pass
class ErrorCatcher:
_exceptionsToCatch = (NotFound,)
def __init__(self, templateObj):
pass
def exceptions(self):
return self._exceptionsToCatch
def warn(self, exc_val, code, rawCode, lineCol):
r... | 23.877193 | 131 | 0.623806 |
821db6b0a4a8e29fc6380fe91e0d7a7237521455 | 491 | py | Python | tfds_korean/question_pair/question_pair_test.py | harrydrippin/tfds-korean | 5339d7e3ff06ac8b11854244f3e1d0d5a6a01f94 | [
"Apache-2.0"
] | 22 | 2021-04-14T15:00:43.000Z | 2022-03-21T09:38:14.000Z | tfds_korean/question_pair/question_pair_test.py | harrydrippin/tfds-korean | 5339d7e3ff06ac8b11854244f3e1d0d5a6a01f94 | [
"Apache-2.0"
] | 28 | 2021-04-14T15:45:16.000Z | 2022-03-28T03:03:58.000Z | tfds_korean/question_pair/question_pair_test.py | harrydrippin/tfds-korean | 5339d7e3ff06ac8b11854244f3e1d0d5a6a01f94 | [
"Apache-2.0"
] | 3 | 2021-04-17T12:51:34.000Z | 2021-04-27T08:11:21.000Z | """question_pair dataset."""
import tensorflow_datasets as tfds
from . import question_pair
class QuestionPairTest(tfds.testing.DatasetBuilderTestCase):
"""Tests for question_pair dataset."""
DATASET_CLASS = question_pair.QuestionPair
SPLITS = {
"train": 3,
"test": 1,
"validatio... | 21.347826 | 98 | 0.659878 |
d8efdc37062c87680a92dc44a6b2ba3786332ad4 | 1,942 | py | Python | noruh_backend/urls.py | LucasHiago/pede_ja | 62609a32d045b167a96be79cc93113d32dcfe917 | [
"MIT"
] | null | null | null | noruh_backend/urls.py | LucasHiago/pede_ja | 62609a32d045b167a96be79cc93113d32dcfe917 | [
"MIT"
] | null | null | null | noruh_backend/urls.py | LucasHiago/pede_ja | 62609a32d045b167a96be79cc93113d32dcfe917 | [
"MIT"
] | null | null | null | """noruh_backend URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class... | 45.162791 | 119 | 0.722966 |
b6145a1464cd940bd4f98eaa15f6f9ecf6a10a20 | 815 | py | Python | mmdet/models/detectors/grid_rcnn.py | evgps/mmdetection_trashcan | aaf4237c2c0d473425cdc7b741d3009177b79751 | [
"Apache-2.0"
] | 12,377 | 2017-12-04T02:46:57.000Z | 2022-03-31T16:48:31.000Z | mmdet/models/detectors/grid_rcnn.py | evgps/mmdetection_trashcan | aaf4237c2c0d473425cdc7b741d3009177b79751 | [
"Apache-2.0"
] | 1,851 | 2017-12-05T05:41:23.000Z | 2022-03-30T13:06:22.000Z | mmdet/models/detectors/grid_rcnn.py | evgps/mmdetection_trashcan | aaf4237c2c0d473425cdc7b741d3009177b79751 | [
"Apache-2.0"
] | 4,198 | 2017-12-05T02:57:19.000Z | 2022-03-30T10:29:37.000Z | from ..builder import DETECTORS
from .two_stage import TwoStageDetector
@DETECTORS.register_module()
class GridRCNN(TwoStageDetector):
"""Grid R-CNN.
This detector is the implementation of:
- Grid R-CNN (https://arxiv.org/abs/1811.12030)
- Grid R-CNN Plus: Faster and Better (https://arxiv.org/abs/190... | 27.166667 | 75 | 0.555828 |
796c80679358e59bb3c16075776dfd17653e23a4 | 44,589 | py | Python | src/genie/libs/parser/ios/cat6k/show_platform.py | svautour/genieparser | 7416c9a4b44582be835a0646fb7fad92a5181c7d | [
"Apache-2.0"
] | null | null | null | src/genie/libs/parser/ios/cat6k/show_platform.py | svautour/genieparser | 7416c9a4b44582be835a0646fb7fad92a5181c7d | [
"Apache-2.0"
] | null | null | null | src/genie/libs/parser/ios/cat6k/show_platform.py | svautour/genieparser | 7416c9a4b44582be835a0646fb7fad92a5181c7d | [
"Apache-2.0"
] | null | null | null | """
cat6k implementation of show_platform.py
"""
import re
from genie.metaparser import MetaParser
from genie.metaparser.util.schemaengine import Schema, Any, Optional
class ShowVersionSchema(MetaParser):
"""
Schema for show version
"""
schema = {
'version': {
'o... | 38.773043 | 193 | 0.457557 |
e9424b7c0d094de5b2567907110cd0a759f197a3 | 5,003 | py | Python | sandbox/lib/jumpscale/JumpScale9Lib/clients/rogerthat/rogerthatservice.py | Jumpscale/sandbox_linux | 2aacd36b467ef30ac83718abfa82c6883b67a02f | [
"Apache-2.0"
] | 2 | 2017-06-07T08:11:47.000Z | 2017-11-10T02:19:48.000Z | JumpScale9Lib/clients/rogerthat/rogerthatservice.py | Jumpscale/lib9 | 82224784ef2a7071faeb48349007211c367bc673 | [
"Apache-2.0"
] | 188 | 2017-06-21T06:16:13.000Z | 2020-06-17T14:20:24.000Z | sandbox/lib/jumpscale/JumpScale9Lib/clients/rogerthat/rogerthatservice.py | Jumpscale/sandbox_linux | 2aacd36b467ef30ac83718abfa82c6883b67a02f | [
"Apache-2.0"
] | 3 | 2018-06-12T05:18:28.000Z | 2019-09-24T06:49:17.000Z |
#! /usr/bin/python
from js9 import j
from gevent.pywsgi import WSGIServer
import time
def jsonrpc(func):
def wrapper(s, environ, start_response):
if not environ["REQUEST_METHOD"] == 'POST':
return s.invalidRequest()
service_key = environ['HTTP_X_NUNTIUZ_SERVICE_KEY']
if not s... | 36.786765 | 79 | 0.546472 |
1c82de58eca06eac9b4162e3fe7e9fa954567e68 | 9,195 | py | Python | drf_extra_fields/fields.py | damlanisa/drf-extra-fields | 4e06a9773e27dcf4219628c6ae8c9a4c9722b237 | [
"Apache-2.0"
] | null | null | null | drf_extra_fields/fields.py | damlanisa/drf-extra-fields | 4e06a9773e27dcf4219628c6ae8c9a4c9722b237 | [
"Apache-2.0"
] | null | null | null | drf_extra_fields/fields.py | damlanisa/drf-extra-fields | 4e06a9773e27dcf4219628c6ae8c9a4c9722b237 | [
"Apache-2.0"
] | null | null | null | import base64
import binascii
import imghdr
import io
import uuid
from django.core.exceptions import ValidationError
from django.core.files.base import ContentFile
from django.contrib.postgres import fields as postgres_fields
from django.utils.translation import gettext_lazy as _
from psycopg2.extras import DateRange,... | 33.194946 | 97 | 0.666123 |
9fad756b2d5c02fba844b52ec78a971da01a4352 | 3,916 | py | Python | synergine/core/display/ObjectVisualizer.py | buxx/synergine | da05d762cdbc993362807d4851e1ca74784438ae | [
"Apache-2.0"
] | 6 | 2015-04-03T08:04:22.000Z | 2016-11-13T22:47:11.000Z | synergine/core/display/ObjectVisualizer.py | buxx/synergine | da05d762cdbc993362807d4851e1ca74784438ae | [
"Apache-2.0"
] | 2 | 2019-10-21T15:41:39.000Z | 2021-06-10T14:15:27.000Z | synergine/core/display/ObjectVisualizer.py | buxx/synergine | da05d762cdbc993362807d4851e1ca74784438ae | [
"Apache-2.0"
] | 2 | 2015-02-27T12:05:51.000Z | 2016-05-11T07:25:20.000Z | from synergine.core.config.ConfigurationManager import ConfigurationManager
from synergine.synergy.object.SynergyObject import SynergyObject
from synergine.core.exception.NotFoundError import NotFoundError
class ObjectVisualizer():
"""
TODO: Il y a eu un ajout, notion de surface directement en plus des objets... | 50.205128 | 119 | 0.711951 |
238bc6c1be653dd18a938a3b78eb7ca35b3783ab | 1,738 | py | Python | river/admin/hook_admins.py | JohnieBraaf/django-river | 58f49624c37e1e5d1bdb4c7680810126454e36a6 | [
"BSD-3-Clause"
] | 705 | 2015-07-23T16:09:06.000Z | 2022-03-05T03:52:31.000Z | river/admin/hook_admins.py | JohnieBraaf/django-river | 58f49624c37e1e5d1bdb4c7680810126454e36a6 | [
"BSD-3-Clause"
] | 188 | 2015-08-28T21:58:38.000Z | 2021-12-15T06:39:37.000Z | river/admin/hook_admins.py | JohnieBraaf/django-river | 58f49624c37e1e5d1bdb4c7680810126454e36a6 | [
"BSD-3-Clause"
] | 101 | 2015-08-30T04:22:57.000Z | 2022-03-29T06:58:20.000Z | from django.contrib import admin
from django.contrib.contenttypes.admin import GenericTabularInline
from river.core.workflowregistry import workflow_registry
from river.models import OnApprovedHook, OnTransitHook, OnCompleteHook
class BaseHookInline(GenericTabularInline):
fields = ("callback_function", "hook_typ... | 29.457627 | 85 | 0.756617 |
7565cc8dfeb063bec76cd4f588d4f24d14c6bde4 | 4,403 | py | Python | tests/python/gaia-ui-tests/gaiatest/apps/search/regions/html5_player.py | dipongkor/gaia | 56679517d9379200ff31a4e3d23732e868c38896 | [
"Apache-2.0"
] | null | null | null | tests/python/gaia-ui-tests/gaiatest/apps/search/regions/html5_player.py | dipongkor/gaia | 56679517d9379200ff31a4e3d23732e868c38896 | [
"Apache-2.0"
] | null | null | null | tests/python/gaia-ui-tests/gaiatest/apps/search/regions/html5_player.py | dipongkor/gaia | 56679517d9379200ff31a4e3d23732e868c38896 | [
"Apache-2.0"
] | null | null | null | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import time
from marionette import expected
from marionette import Wait
from marionette.by import By
from gaiatest.apps.... | 39.3125 | 94 | 0.65796 |
48cc4a7b15391e25721d22e57c1f018d9b426c30 | 12,685 | py | Python | CoSTA/CoSTA_MNIST_USPS_Fashion.py | ImXman/CoSTA | fc61f109f1022b8eb95ab63a949a3ad615af6d79 | [
"MIT"
] | 2 | 2021-01-12T16:31:34.000Z | 2021-01-12T16:31:36.000Z | CoSTA/CoSTA_MNIST_USPS_Fashion.py | rpmccordlab/CoSTA | 6c7d6938144e987fb0a5949b647d3277a14fc8bd | [
"MIT"
] | null | null | null | CoSTA/CoSTA_MNIST_USPS_Fashion.py | rpmccordlab/CoSTA | 6c7d6938144e987fb0a5949b647d3277a14fc8bd | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Wed Oct 30 10:07:33 2019
@author: Yang Xu
MNIST
"""
import numpy as np
import pandas as pd
##neural net
import torch
import torch.nn.functional as F
import umap
from scipy.special import softmax
from sklearn.cluster import KMeans
from sklearn.mixture import... | 37.199413 | 86 | 0.579109 |
974bdbf3ef68ab00d12180e7cad0533a8460702c | 813 | py | Python | app/wakkerdam/models/ChatLog.py | mofferthond/flask-base | 9f463d1a665b7c3b0466ff14430b4abecf1079d4 | [
"MIT"
] | null | null | null | app/wakkerdam/models/ChatLog.py | mofferthond/flask-base | 9f463d1a665b7c3b0466ff14430b4abecf1079d4 | [
"MIT"
] | null | null | null | app/wakkerdam/models/ChatLog.py | mofferthond/flask-base | 9f463d1a665b7c3b0466ff14430b4abecf1079d4 | [
"MIT"
] | null | null | null | from app import db
from datetime import datetime
class ChatLog(db.Model):
__tablename__ = "chatlogs"
_id = db.Column("id", db.Integer, primary_key=True, autoincrement=True)
_chatter = db.relationship("Chatter")
_chatterId = db.Column("chatterId", db.Integer, db.ForeignKey("chatters.id"))
_timestamp... | 28.034483 | 81 | 0.672817 |
ecf2a1d6150e3ac4b0a6840a0a49ce8076658bb7 | 14,227 | py | Python | owllook/views/md_blueprint.py | 786259135/owllook | 1da24db74e72960c87a49a54515fd16087f3d5f4 | [
"Apache-2.0"
] | null | null | null | owllook/views/md_blueprint.py | 786259135/owllook | 1da24db74e72960c87a49a54515fd16087f3d5f4 | [
"Apache-2.0"
] | null | null | null | owllook/views/md_blueprint.py | 786259135/owllook | 1da24db74e72960c87a49a54515fd16087f3d5f4 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
from urllib.parse import urlparse, parse_qs
from jinja2 import Environment, PackageLoader, select_autoescape
from sanic import Blueprint
from sanic.response import html, text, redirect
from owllook.database.mongodb import MotorBase
from owllook.fetcher.cache import get_the_latest_chapter, cache_... | 39.963483 | 120 | 0.498348 |
fac625d05e348b4ada6b0a05e0392db854199e71 | 582 | py | Python | cnswd/scripts/index_codes.py | NeoBert/liudengfeng-cnswd | a9ba636b86de001a75cd51e453a308755b5c1661 | [
"MIT"
] | 7 | 2019-05-23T17:38:16.000Z | 2021-06-26T13:23:01.000Z | cnswd/scripts/index_codes.py | NeoBert/liudengfeng-cnswd | a9ba636b86de001a75cd51e453a308755b5c1661 | [
"MIT"
] | 11 | 2019-09-06T12:52:00.000Z | 2020-10-11T06:14:32.000Z | cnswd/scripts/index_codes.py | NeoBert/liudengfeng-cnswd | a9ba636b86de001a75cd51e453a308755b5c1661 | [
"MIT"
] | 1 | 2019-07-24T11:56:06.000Z | 2019-07-24T11:56:06.000Z | """
主要指数代码
"""
import pandas as pd
from ..mongodb import get_db
from ..utils import make_logger
from ..websource.wy import get_index_base
logger = make_logger('指数代码列表')
def get_index_codes():
"""主要指数代码
Returns:
list: 指数代码列表
"""
df = get_index_base()
return df.index.tolist()
def _refre... | 17.117647 | 73 | 0.659794 |
a64b435b3ec6d46182cc49f85768c83f7880afd5 | 1,470 | py | Python | metagen.py | vs49688/dnc-downloader | 4f5bcec544457cd2095ea6c132cc7edfbec5eece | [
"CC0-1.0"
] | 12 | 2016-07-23T14:29:53.000Z | 2016-11-04T05:55:28.000Z | metagen.py | vs49688/dnc-downloader | 4f5bcec544457cd2095ea6c132cc7edfbec5eece | [
"CC0-1.0"
] | null | null | null | metagen.py | vs49688/dnc-downloader | 4f5bcec544457cd2095ea6c132cc7edfbec5eece | [
"CC0-1.0"
] | 9 | 2016-07-25T07:14:42.000Z | 2021-02-12T07:22:51.000Z | #!/usr/bin/env python3
# SPDX-License-Identifier: CC0-1.0
import sys
import sqlite3
from xml.etree.ElementTree import ElementTree, Element, SubElement, tostring
if len(sys.argv) != 2:
print(f'Usage: {sys.argv[0]} <dnc|podesta|clinton>')
exit(2)
if sys.argv[1] not in ['dnc', 'podesta', 'clinton']:
print(f'Usage: {... | 28.823529 | 126 | 0.685034 |
fab45a21a36617ec405a57b36b7a0e9f7a92d87d | 556 | py | Python | app/main.py | sigma8/test_icreate | bbf961fd358e7ddd95f4ef175bf2f883db7afaab | [
"Apache-1.1"
] | null | null | null | app/main.py | sigma8/test_icreate | bbf961fd358e7ddd95f4ef175bf2f883db7afaab | [
"Apache-1.1"
] | null | null | null | app/main.py | sigma8/test_icreate | bbf961fd358e7ddd95f4ef175bf2f883db7afaab | [
"Apache-1.1"
] | null | null | null | from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from app.core.config import settings
def get_application():
from .router import router
_app = FastAPI(title=settings.PROJECT_NAME)
_app.add_middleware(
CORSMiddleware,
allow_origins=[
str(origin) f... | 21.384615 | 67 | 0.672662 |
5d75f3a41a07be4eb8475403e210bae6bb944b49 | 4,086 | py | Python | sdk/test/test_credit_interest_tier_band_set.py | DarrahK/yapily-sdk-python | 2dcf9a403feafab7dcaf140dabe61794bd4debd3 | [
"MIT"
] | null | null | null | sdk/test/test_credit_interest_tier_band_set.py | DarrahK/yapily-sdk-python | 2dcf9a403feafab7dcaf140dabe61794bd4debd3 | [
"MIT"
] | null | null | null | sdk/test/test_credit_interest_tier_band_set.py | DarrahK/yapily-sdk-python | 2dcf9a403feafab7dcaf140dabe61794bd4debd3 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Yapily API
To access endpoints that require authentication, use your application key and secret created in the Dashboard (https://dashboard.yapily.com) # noqa: E501
The version of the OpenAPI document: 1.157.0
Generated by: https://openapi-generator.tech
"""
from __future__ imp... | 39.669903 | 158 | 0.505874 |
530f5c97fa9e6949672a2244a247352db803863f | 356 | py | Python | backend/kollox/signals.py | pykulytsky/kollox | 6cf7dd20c370a3bf4d3975cd234a6df411bac296 | [
"MIT"
] | null | null | null | backend/kollox/signals.py | pykulytsky/kollox | 6cf7dd20c370a3bf4d3975cd234a6df411bac296 | [
"MIT"
] | 116 | 2021-01-23T08:54:25.000Z | 2022-02-27T11:00:05.000Z | backend/kollox/signals.py | pykulytsky/kollox | 6cf7dd20c370a3bf4d3975cd234a6df411bac296 | [
"MIT"
] | null | null | null | from django.db.models.signals import post_save
from django.dispatch import receiver
from allauth.socialaccount.models import SocialAccount
@receiver(post_save, sender=SocialAccount)
def add_extra_data_to_the_user(sender, instance, created, *args, **kwargs):
instance.user.avatar_url = instance.extra_data['p... | 35.6 | 76 | 0.786517 |
0d6bf6ea7b4a7c872abc9d579e763a23cd3bf10c | 480 | py | Python | salt/cli/ssh.py | preoctopus/salt | aceaaa0e2f2f2ff29a694393bd82bba0d88fa44d | [
"Apache-2.0"
] | 3 | 2015-04-16T18:42:35.000Z | 2017-10-30T16:57:49.000Z | salt/cli/ssh.py | preoctopus/salt | aceaaa0e2f2f2ff29a694393bd82bba0d88fa44d | [
"Apache-2.0"
] | 16 | 2015-11-18T00:44:03.000Z | 2018-10-29T20:48:27.000Z | salt/cli/ssh.py | preoctopus/salt | aceaaa0e2f2f2ff29a694393bd82bba0d88fa44d | [
"Apache-2.0"
] | 4 | 2020-11-04T06:28:05.000Z | 2022-02-09T10:54:49.000Z | # -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import absolute_import
import salt.client.ssh
from salt.utils import parsers
from salt.utils.verify import verify_log
class SaltSSH(parsers.SaltSSHOptionParser):
'''
Used to Execute the salt ssh routine
'''
def run(self):
... | 21.818182 | 46 | 0.6875 |
cd1ec5c0b4bd33d0c7a07da43bbc7b8d401c708b | 506 | py | Python | ex28.py | phuephuekhaingmin/python-exercises | 7fd924c40e02d8c027985f81c11d7336ba43c822 | [
"MIT"
] | null | null | null | ex28.py | phuephuekhaingmin/python-exercises | 7fd924c40e02d8c027985f81c11d7336ba43c822 | [
"MIT"
] | null | null | null | ex28.py | phuephuekhaingmin/python-exercises | 7fd924c40e02d8c027985f81c11d7336ba43c822 | [
"MIT"
] | null | null | null | True and True
False and True
1 == 1 and 2 == 1
"test" == "test"
1 == 1 or 2 != 1
True and 1 == 1
False and 0 != 0
True or 1 == 1
"test" == "testing"
1 != 0 and 2 == 1
"test" != "testing"
"test" ==1
not (True and False)
not (1 == 1 and 0 != 1)
not (10 == 1 or 1000 == 1000)
not (1 != 10 or 3 == 4)
not ("testing" == "test... | 23 | 62 | 0.517787 |
87b623d73f9aa5ee9fb88302f727f5bcf2307b0f | 1,156 | py | Python | avmp/utils/ip_tools_test.py | Nate1729/AVMP | 5e7f369f9efa7988a8e6e864abe0e19e0a7c0474 | [
"Apache-2.0"
] | 9 | 2021-02-18T19:34:59.000Z | 2022-01-08T05:39:41.000Z | avmp/utils/ip_tools_test.py | Nate1729/AVMP | 5e7f369f9efa7988a8e6e864abe0e19e0a7c0474 | [
"Apache-2.0"
] | 10 | 2021-07-07T15:42:54.000Z | 2022-03-24T18:43:54.000Z | avmp/utils/ip_tools_test.py | Nate1729/AVMP | 5e7f369f9efa7988a8e6e864abe0e19e0a7c0474 | [
"Apache-2.0"
] | 5 | 2021-05-13T09:35:31.000Z | 2022-01-25T02:00:59.000Z | from avmp.utils.ip_tools import (
get_all_network_ips,
get_all_networks_ips
)
def test_get_all_network_ips():
assert type(get_all_network_ips('192.168.1.1/24')) == list
assert get_all_network_ips('192.168.1.1/28') == ['192.168.1.0', '192.168.1.1', '192.168.1.2', '192.168.1.3', '192.168.1.4', '192.168.... | 60.842105 | 193 | 0.519031 |
a1f908fb60c2131ec469b0b974098d0d52dff931 | 1,677 | py | Python | sevenbridges/transfer/utils.py | damirkrstanovic/sevenbridges-python | 94b5cda5d6aacc9a331d96aba86e07ac492ee5c0 | [
"Apache-2.0"
] | null | null | null | sevenbridges/transfer/utils.py | damirkrstanovic/sevenbridges-python | 94b5cda5d6aacc9a331d96aba86e07ac492ee5c0 | [
"Apache-2.0"
] | null | null | null | sevenbridges/transfer/utils.py | damirkrstanovic/sevenbridges-python | 94b5cda5d6aacc9a331d96aba86e07ac492ee5c0 | [
"Apache-2.0"
] | null | null | null | import sys
import math
class Part(object):
def __init__(self, start=None, size=None):
self._start = start
self._size = size
@property
def start(self):
return self._start
@property
def size(self):
return self._size
class Progress(object):
def __init__(self, ... | 22.972603 | 77 | 0.630888 |
737a408dc6f083e6332ac61ab6609f7feeff80c2 | 4,784 | py | Python | tests/integration/test_models/test_full_battery_models/test_lead_acid/test_foqs.py | jedgedrudd/PyBaMM | 79c9d34978382d50e09adaf8bf74c8fa4723f759 | [
"BSD-3-Clause"
] | 1 | 2019-10-29T19:06:04.000Z | 2019-10-29T19:06:04.000Z | tests/integration/test_models/test_full_battery_models/test_lead_acid/test_foqs.py | jedgedrudd/PyBaMM | 79c9d34978382d50e09adaf8bf74c8fa4723f759 | [
"BSD-3-Clause"
] | null | null | null | tests/integration/test_models/test_full_battery_models/test_lead_acid/test_foqs.py | jedgedrudd/PyBaMM | 79c9d34978382d50e09adaf8bf74c8fa4723f759 | [
"BSD-3-Clause"
] | null | null | null | #
# Tests for the lead-acid FOQS model
#
import pybamm
import tests
import unittest
import numpy as np
class TestLeadAcidFOQS(unittest.TestCase):
def test_basic_processing(self):
# pybamm.set_logging_level("DEBUG")
options = {"thermal": "isothermal", "convection": False}
model = pybamm.le... | 39.866667 | 86 | 0.682483 |
8c44dee2cc575c8aecc6d5d95eadff4a6fe85245 | 8,451 | py | Python | sdk/python/pulumi_azure_nextgen/solutions/get_jit_request.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 31 | 2020-09-21T09:41:01.000Z | 2021-02-26T13:21:59.000Z | sdk/python/pulumi_azure_nextgen/solutions/get_jit_request.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 231 | 2020-09-21T09:38:45.000Z | 2021-03-01T11:16:03.000Z | sdk/python/pulumi_azure_nextgen/solutions/get_jit_request.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 4 | 2020-09-29T14:14:59.000Z | 2021-02-10T20:38:16.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from .. import _utilities, _tables
from ... | 37.727679 | 284 | 0.666903 |
aaec689f857e08e0e091100aea6a66660beeddd2 | 2,230 | py | Python | test_utilities/src/d1_test/mock_api/tests/test_query.py | DataONEorg/d1_python | dfab267c3adea913ab0e0073ed9dc1ee50b5b8eb | [
"Apache-2.0"
] | 15 | 2016-10-28T13:56:52.000Z | 2022-01-31T19:07:49.000Z | test_utilities/src/d1_test/mock_api/tests/test_query.py | DataONEorg/d1_python | dfab267c3adea913ab0e0073ed9dc1ee50b5b8eb | [
"Apache-2.0"
] | 56 | 2017-03-16T03:52:32.000Z | 2022-03-12T01:05:28.000Z | test_utilities/src/d1_test/mock_api/tests/test_query.py | DataONEorg/d1_python | dfab267c3adea913ab0e0073ed9dc1ee50b5b8eb | [
"Apache-2.0"
] | 11 | 2016-05-31T16:22:02.000Z | 2020-10-05T14:37:10.000Z | # This work was created by participants in the DataONE project, and is
# jointly copyrighted by participating institutions in DataONE. For
# more information on DataONE, see our web site at http://dataone.org.
#
# Copyright 2009-2019 DataONE
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you ma... | 39.122807 | 87 | 0.686547 |
d1e079de50c7a2fd03086798ecc102e6fc78e6b1 | 1,876 | py | Python | linkjuicer/interfaceutils.py | stevemclaugh/linkjuicer | e813667cd02f23014110f31a2f48d4b6b728da82 | [
"MIT"
] | 1 | 2019-01-06T17:57:40.000Z | 2019-01-06T17:57:40.000Z | linkjuicer/interfaceutils.py | stevemclaugh/linkjuicer | e813667cd02f23014110f31a2f48d4b6b728da82 | [
"MIT"
] | null | null | null | linkjuicer/interfaceutils.py | stevemclaugh/linkjuicer | e813667cd02f23014110f31a2f48d4b6b728da82 | [
"MIT"
] | null | null | null | import sys
import re
# A progress bar!
class ProgressBar(object):
DEFAULT = 'Progress: %(bar)s %(percent)3d%%'
FULL = '%(bar)s %(current)d/%(total)d (%(percent)3d%%) %(remaining)d to go'
def __init__(self, total, width=40, fmt=DEFAULT, symbol='=',
output=sys.stderr):
assert len(sy... | 30.754098 | 79 | 0.579424 |
289c93a61cc3ec8257e839974eff7910025a9db6 | 381 | py | Python | hackerrank/Python Language Proficiency/Capitalize!.py | GSri30/Competetive_programming | 0dc1681500a80b6f0979d0dc9f749357ee07bcb8 | [
"MIT"
] | 22 | 2020-01-03T17:32:00.000Z | 2021-11-07T09:31:44.000Z | hackerrank/Python Language Proficiency/Capitalize!.py | GSri30/Competetive_programming | 0dc1681500a80b6f0979d0dc9f749357ee07bcb8 | [
"MIT"
] | 10 | 2020-09-30T09:41:18.000Z | 2020-10-11T11:25:09.000Z | hackerrank/Python Language Proficiency/Capitalize!.py | GSri30/Competetive_programming | 0dc1681500a80b6f0979d0dc9f749357ee07bcb8 | [
"MIT"
] | 25 | 2019-10-14T19:25:01.000Z | 2021-05-26T08:12:20.000Z | #!/bin/python
import math
import os
import random
import re
import sys
# Complete the solve function below.
def solve(s):
for x in s[:].split():
s = s.replace(x, x.capitalize())
return s
if __name__ == '__main__':
fptr = open(os.environ['OUTPUT_PATH'], 'w')
s = raw_input()
result... | 13.607143 | 47 | 0.598425 |
b4c321d50487231cfd03763cb6e00dae8f314cb9 | 92,639 | py | Python | lib-python/3/datetime.py | hollmmax/zig | d80baa5a5fcbc82b3e2294b398edc20a98737a52 | [
"MIT"
] | null | null | null | lib-python/3/datetime.py | hollmmax/zig | d80baa5a5fcbc82b3e2294b398edc20a98737a52 | [
"MIT"
] | 1 | 2022-02-22T00:59:49.000Z | 2022-02-22T00:59:49.000Z | lib-python/3/datetime.py | hollmmax/zig | d80baa5a5fcbc82b3e2294b398edc20a98737a52 | [
"MIT"
] | 1 | 2022-03-30T11:42:37.000Z | 2022-03-30T11:42:37.000Z | """Concrete date/time and related types.
See http://www.iana.org/time-zones/repository/tz-link.html for
time zone and DST data sources.
"""
__all__ = ("date", "datetime", "time", "timedelta", "timezone", "tzinfo",
"MINYEAR", "MAXYEAR")
import time as _time
import math as _math
import sys
# for cpyext, u... | 35.0507 | 94 | 0.567741 |
bf94bab4aef7de61f4324021f64fe95d3b1f7843 | 3,400 | py | Python | ledmatrix/animations/color_cycle.py | jtschoonhoven/ledmatrix | 648007562c220f3b44093a2ea3f7101df39fea69 | [
"MIT"
] | 1 | 2019-04-27T23:09:50.000Z | 2019-04-27T23:09:50.000Z | ledmatrix/animations/color_cycle.py | jtschoonhoven/ledmatrix | 648007562c220f3b44093a2ea3f7101df39fea69 | [
"MIT"
] | 4 | 2021-03-19T00:02:09.000Z | 2022-01-13T01:12:05.000Z | ledmatrix/animations/color_cycle.py | jtschoonhoven/ledmatrix | 648007562c220f3b44093a2ea3f7101df39fea69 | [
"MIT"
] | null | null | null | """Cycle each pixel through all possible RGB values."""
import time
from typing import Any
from ledmatrix import matrix
from ledmatrix.utilities import colors
from ledmatrix.utilities.colors import Color
class ColorCycle(matrix.LedMatrix):
"""Cycle each pixel through all possible RGB values."""
def __init__... | 39.08046 | 99 | 0.622941 |
3b169c8e3a2cf6fcc49a52eeaf8df40ffeecd3ec | 1,763 | py | Python | app/migrations/0001_initial.py | DebbieElabonga/ipreview | ec33fc02f02f612b2bd34c8cffefeceac3b9040a | [
"Unlicense"
] | null | null | null | app/migrations/0001_initial.py | DebbieElabonga/ipreview | ec33fc02f02f612b2bd34c8cffefeceac3b9040a | [
"Unlicense"
] | null | null | null | app/migrations/0001_initial.py | DebbieElabonga/ipreview | ec33fc02f02f612b2bd34c8cffefeceac3b9040a | [
"Unlicense"
] | null | null | null | # Generated by Django 3.2.5 on 2021-07-17 10:19
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
ope... | 41 | 145 | 0.600681 |
7568863bf4869053bbbbf99207a359d9d6cb07cf | 13,060 | py | Python | examples/adaptive_loss_scaling/ssd/train.py | kumasento/gradient-scaling | 0ca435433b9953e33656173c4d60ebd61c5c5e87 | [
"MIT"
] | 7 | 2020-08-12T12:04:28.000Z | 2021-11-22T15:56:08.000Z | examples/adaptive_loss_scaling/ssd/train.py | kumasento/gradient-scaling | 0ca435433b9953e33656173c4d60ebd61c5c5e87 | [
"MIT"
] | 1 | 2021-10-07T08:37:39.000Z | 2021-10-08T02:41:39.000Z | examples/adaptive_loss_scaling/ssd/train.py | kumasento/gradient-scaling | 0ca435433b9953e33656173c4d60ebd61c5c5e87 | [
"MIT"
] | null | null | null | import os
import argparse
import sys
import copy
import numpy as np
import cupy as cp
import random
from contextlib import ExitStack
import chainer
from chainer.datasets import ConcatenatedDataset
from chainer.datasets import TransformDataset
from chainer.optimizer_hooks import WeightDecay
from chainer import serializ... | 32.979798 | 109 | 0.659342 |
4002e892c4680d2cd2e33ceac714bf47e299f333 | 2,567 | py | Python | examples_allennlp/ner/model.py | techthiyanes/luke | aa234d934527eda96a9a4c3bd9c7999c05c3fd58 | [
"Apache-2.0"
] | 467 | 2020-10-02T16:13:59.000Z | 2022-03-31T03:15:32.000Z | examples_allennlp/ner/model.py | techthiyanes/luke | aa234d934527eda96a9a4c3bd9c7999c05c3fd58 | [
"Apache-2.0"
] | 99 | 2020-10-17T11:30:07.000Z | 2022-03-31T10:10:39.000Z | examples_allennlp/ner/model.py | techthiyanes/luke | aa234d934527eda96a9a4c3bd9c7999c05c3fd58 | [
"Apache-2.0"
] | 73 | 2020-10-06T11:29:08.000Z | 2022-03-09T17:11:06.000Z | from typing import List
import torch
import torch.nn as nn
from allennlp.data import Vocabulary, TextFieldTensors
from allennlp.models import Model
from allennlp.training.metrics import CategoricalAccuracy
from .modules.feature_extractor import NERFeatureExtractor
from .metrics.span_to_label_f1 import SpanToLabelF1
... | 37.202899 | 120 | 0.696143 |
3549b27a62df4317c13ccf0c2934cc92947222b1 | 248 | py | Python | manage.py | cfpb/eregs-2.0 | 820bd56fa5265ee25f88fe8dce4c7aa092e5d6a3 | [
"CC0-1.0"
] | 1 | 2019-02-25T21:43:36.000Z | 2019-02-25T21:43:36.000Z | manage.py | cfpb/eregs-2.0 | 820bd56fa5265ee25f88fe8dce4c7aa092e5d6a3 | [
"CC0-1.0"
] | 46 | 2017-03-16T21:58:49.000Z | 2017-09-05T16:21:29.000Z | manage.py | cfpb/eregs-2.0 | 820bd56fa5265ee25f88fe8dce4c7aa092e5d6a3 | [
"CC0-1.0"
] | 7 | 2017-06-07T14:56:46.000Z | 2021-02-20T10:50:48.000Z | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "eregs.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| 22.545455 | 69 | 0.770161 |
69aff9edb92d17cb8d133f457ca5a648652f008d | 12,550 | py | Python | src/benzina/torch/dataloader.py | fosterrath-mila/Benzina | cabea8ecbae5122682c76c0c6d19291305853838 | [
"MIT"
] | null | null | null | src/benzina/torch/dataloader.py | fosterrath-mila/Benzina | cabea8ecbae5122682c76c0c6d19291305853838 | [
"MIT"
] | null | null | null | src/benzina/torch/dataloader.py | fosterrath-mila/Benzina | cabea8ecbae5122682c76c0c6d19291305853838 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import benzina.native
import gc
import numpy as np
import os, sys
import torch
import torch.utils.data
from torch.utils.data.dataloader import default_collate
from contextlib import suppress
from . import operations as o... | 44.34629 | 106 | 0.565896 |
635657f532c46a03c4413d03a5167bb98d6af47d | 431 | py | Python | automix/rules/lengthRule.py | MZehren/Automix | dfaa00a9e7c5c0938c0a9d275c07f3a3e5f87e43 | [
"MIT"
] | 18 | 2020-07-20T01:51:40.000Z | 2022-02-25T07:32:11.000Z | automix/rules/lengthRule.py | MZehren/Automix | dfaa00a9e7c5c0938c0a9d275c07f3a3e5f87e43 | [
"MIT"
] | 2 | 2021-03-23T03:26:02.000Z | 2021-07-19T12:51:25.000Z | automix/rules/lengthRule.py | MZehren/Automix | dfaa00a9e7c5c0938c0a9d275c07f3a3e5f87e43 | [
"MIT"
] | 5 | 2021-01-03T15:34:28.000Z | 2022-02-22T06:07:06.000Z | import numpy as np
from backend.rules.rule import Rule
class LengthRule(Rule):
"""
The mixed track has to be played for it's majority otherwise it will not be good
"""
def run(self, mix):
tracks = Rule.getTracks(mix)
return np.mean([
track.length / (track.duration / track... | 21.55 | 84 | 0.607889 |
f5351d6e1aeb90c0470d253ad3a3059fef6ccd43 | 12,672 | py | Python | sdk/python/pulumi_azure_native/web/v20201201/web_app_private_endpoint_connection.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/web/v20201201/web_app_private_endpoint_connection.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/web/v20201201/web_app_private_endpoint_connection.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... | 49.116279 | 1,436 | 0.692156 |
a83fe08e1c3098fb7f66e7267d9a0cb6598a3b3f | 2,346 | py | Python | examples/app/stocks/download_sample_data.py | goncaloperes/bokeh | b857d2d17d7c19779bb0a7be2601d8238fb1d5e9 | [
"BSD-3-Clause"
] | 15,193 | 2015-01-01T05:11:45.000Z | 2022-03-31T19:30:20.000Z | examples/app/stocks/download_sample_data.py | goncaloperes/bokeh | b857d2d17d7c19779bb0a7be2601d8238fb1d5e9 | [
"BSD-3-Clause"
] | 9,554 | 2015-01-01T03:16:54.000Z | 2022-03-31T22:59:39.000Z | examples/app/stocks/download_sample_data.py | goncaloperes/bokeh | b857d2d17d7c19779bb0a7be2601d8238fb1d5e9 | [
"BSD-3-Clause"
] | 4,829 | 2015-01-02T03:35:32.000Z | 2022-03-30T16:40:26.000Z | import os
import zipfile
from urllib.request import urlretrieve
def extract_hosted_zip(data_url, save_dir, exclude_term=None):
"""Downloads, then extracts a zip file."""
zip_name = os.path.join(save_dir, 'temp.zip')
# get the zip file
try:
print('Downloading %r to %r' % (data_url, zip_name))... | 33.514286 | 89 | 0.624467 |
6f57e86787e5eacfed2006710a7fee847f065518 | 7,508 | py | Python | 8.3-neural-style-transfer.py | 83286415/DeepLearningWithPythonKeras | d3e7dd3b206d3d22a45ad4967a00edd26c4cbe75 | [
"MIT"
] | null | null | null | 8.3-neural-style-transfer.py | 83286415/DeepLearningWithPythonKeras | d3e7dd3b206d3d22a45ad4967a00edd26c4cbe75 | [
"MIT"
] | null | null | null | 8.3-neural-style-transfer.py | 83286415/DeepLearningWithPythonKeras | d3e7dd3b206d3d22a45ad4967a00edd26c4cbe75 | [
"MIT"
] | null | null | null | """ 8.3.1 - 8.3.2 content and style loss
loss = distance(style(reference_image) - style(generated_image)) +
distance(content(original_image) - content(generated_image))
use a pre-trained convnet to define a loss that will:
1. Preserve content by maintaining similar high-level layer activations between the targe... | 36.803922 | 120 | 0.698855 |
d6e3d8e43c3c86fa9c948dd25e1b3a85ae486d75 | 45 | py | Python | tests/__init__.py | MislavMandaric/home-assistant-vaillant-vsmart | 697ebbe943230039ab7b9116d99f3d238284d93e | [
"MIT"
] | 16 | 2021-09-13T13:25:31.000Z | 2022-02-08T11:34:29.000Z | tests/__init__.py | MislavMandaric/home-assistant-vaillant-vsmart | 697ebbe943230039ab7b9116d99f3d238284d93e | [
"MIT"
] | 74 | 2021-09-12T08:35:20.000Z | 2022-03-31T04:21:06.000Z | tests/__init__.py | MislavMandaric/home-assistant-vaillant-vsmart | 697ebbe943230039ab7b9116d99f3d238284d93e | [
"MIT"
] | 2 | 2022-03-09T08:48:48.000Z | 2022-03-21T06:54:12.000Z | """Tests for Vaillant vSMART integration."""
| 22.5 | 44 | 0.733333 |
e7c432470d123a0b8b457bfebc235bdfbb7c06db | 2,562 | py | Python | aliyun-python-sdk-cdn/aliyunsdkcdn/request/v20180510/SetReqAuthConfigRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 1,001 | 2015-07-24T01:32:41.000Z | 2022-03-25T01:28:18.000Z | aliyun-python-sdk-cdn/aliyunsdkcdn/request/v20180510/SetReqAuthConfigRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 363 | 2015-10-20T03:15:00.000Z | 2022-03-08T12:26:19.000Z | aliyun-python-sdk-cdn/aliyunsdkcdn/request/v20180510/SetReqAuthConfigRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 682 | 2015-09-22T07:19:02.000Z | 2022-03-22T09:51:46.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 32.025 | 74 | 0.75605 |
e16657e0c131bd096cb275eebd008fa9f7833834 | 4,248 | py | Python | tests/basics/Inspection.py | jayvdb/Nuitka | 0ff702e065b1b53231ba0cae451385a3da0fe766 | [
"Apache-2.0"
] | 1 | 2019-03-31T09:56:11.000Z | 2019-03-31T09:56:11.000Z | tests/basics/Inspection.py | jayvdb/Nuitka | 0ff702e065b1b53231ba0cae451385a3da0fe766 | [
"Apache-2.0"
] | null | null | null | tests/basics/Inspection.py | jayvdb/Nuitka | 0ff702e065b1b53231ba0cae451385a3da0fe766 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019, Kay Hayen, mailto:kay.hayen@gmail.com
#
# Python tests originally created or extracted from other peoples work. The
# parts were too small to be protected.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the ... | 27.584416 | 85 | 0.723164 |
665ce116dff0132880c46bdbc11a1f2afd373726 | 633 | py | Python | lib/medipy/network/dicom/scu/__init__.py | bsavelev/medipy | f0da3750a6979750d5f4c96aedc89ad5ae74545f | [
"CECILL-B"
] | null | null | null | lib/medipy/network/dicom/scu/__init__.py | bsavelev/medipy | f0da3750a6979750d5f4c96aedc89ad5ae74545f | [
"CECILL-B"
] | null | null | null | lib/medipy/network/dicom/scu/__init__.py | bsavelev/medipy | f0da3750a6979750d5f4c96aedc89ad5ae74545f | [
"CECILL-B"
] | 1 | 2022-03-04T05:47:08.000Z | 2022-03-04T05:47:08.000Z | from Move import Move
from Store import Store
from scu import Echo, Get, Find, SCU
#: Query keys for each level.
keys = {
"patient" : {
"patient" : [(0x0010,0x0020)], # Patient ID
"study" : [(0x0020,0x000d)], # Study Instance UID
"series" : [(0x0020,0x000e)], # Series Instance UID
... | 30.142857 | 59 | 0.565561 |
17449b39951fa2d6253cd4389ed40eb0e1ba67e5 | 27,046 | py | Python | tfx/types/artifact_test.py | johnPertoft/tfx | c6335684a54651adbcbe50aa52918b9b9948326e | [
"Apache-2.0"
] | 1,813 | 2019-02-04T17:17:30.000Z | 2022-03-29T13:39:30.000Z | tfx/types/artifact_test.py | johnPertoft/tfx | c6335684a54651adbcbe50aa52918b9b9948326e | [
"Apache-2.0"
] | 2,710 | 2019-02-14T00:41:00.000Z | 2022-03-31T07:23:00.000Z | tfx/types/artifact_test.py | johnPertoft/tfx | c6335684a54651adbcbe50aa52918b9b9948326e | [
"Apache-2.0"
] | 731 | 2019-02-04T17:59:18.000Z | 2022-03-31T06:45:51.000Z | # Copyright 2019 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 29.753575 | 109 | 0.530873 |
cc6456cfe553ead300f2edc3a41e8b500a58ec40 | 2,228 | py | Python | compiler/tests/22_sram_1bank_8mux_func_test.py | im-world/OpenRAM | f66aac3264598eeae31225c62b6a4af52412d407 | [
"BSD-3-Clause"
] | 335 | 2018-03-13T21:05:22.000Z | 2022-03-30T07:53:25.000Z | compiler/tests/22_sram_1bank_8mux_func_test.py | im-world/OpenRAM | f66aac3264598eeae31225c62b6a4af52412d407 | [
"BSD-3-Clause"
] | 87 | 2018-03-06T00:55:51.000Z | 2022-03-30T19:38:29.000Z | compiler/tests/22_sram_1bank_8mux_func_test.py | im-world/OpenRAM | f66aac3264598eeae31225c62b6a4af52412d407 | [
"BSD-3-Clause"
] | 95 | 2018-03-14T16:22:55.000Z | 2022-03-24T00:34:37.000Z | #!/usr/bin/env python3
# See LICENSE for licensing information.
#
# Copyright (c) 2016-2021 Regents of the University of California and The Board
# of Regents for the Oklahoma Agricultural and Mechanical College
# (acting for and on behalf of Oklahoma State University)
# All rights reserved.
#
import unittest
from test... | 36.52459 | 95 | 0.600539 |
4f22806379229984b2e017c79163d6f6831db2a2 | 21,155 | py | Python | vk_api/audio.py | Storelandapi/vk_api | 16b8a3d18c79b28e1a25275d290bca6cdaed945a | [
"Apache-2.0"
] | null | null | null | vk_api/audio.py | Storelandapi/vk_api | 16b8a3d18c79b28e1a25275d290bca6cdaed945a | [
"Apache-2.0"
] | null | null | null | vk_api/audio.py | Storelandapi/vk_api | 16b8a3d18c79b28e1a25275d290bca6cdaed945a | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
:authors: python273
:license: Apache License, Version 2.0, see LICENSE file
:copyright: (c) 2019 python273
"""
import re
import json
import time
from itertools import islice
from bs4 import BeautifulSoup
from .audio_url_decoder import decode_audio_url
from .exceptions import AccessDenied... | 29.17931 | 91 | 0.495391 |
d9ca491bffeb8ef45677861ab03760ed6bd64b92 | 10,735 | py | Python | EncoderDecoderAgent/BaseTrain.py | vsinic/DQN-Trading | 1cca1122cc3eac862f8a2af69b979fddfbe6bd1d | [
"MIT"
] | 27 | 2021-09-02T19:33:29.000Z | 2022-03-07T13:58:41.000Z | EncoderDecoderAgent/BaseTrain.py | ATMZR/DQN-Trading | 1cca1122cc3eac862f8a2af69b979fddfbe6bd1d | [
"MIT"
] | 7 | 2021-12-26T00:29:01.000Z | 2022-03-28T19:40:14.000Z | EncoderDecoderAgent/BaseTrain.py | ATMZR/DQN-Trading | 1cca1122cc3eac862f8a2af69b979fddfbe6bd1d | [
"MIT"
] | 14 | 2021-11-24T03:07:14.000Z | 2022-03-30T20:53:02.000Z | import random
import torch
import torch.nn.functional as F
from EncoderDecoderAgent.ReplayMemory import ReplayMemory, Transition
from itertools import count
from tqdm import tqdm
import math
import os
from pathlib import Path
from PatternDetectionInCandleStick.Evaluation import Evaluation
device = torch.device("cu... | 41.608527 | 119 | 0.599907 |
29d6f4befce08895e4fb126be8df050be0a733af | 8,865 | py | Python | ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_service.py | shavi71/ambari | 0ed348523be783fe52bd4e2ee54dbb297619a6f1 | [
"Apache-2.0"
] | 1 | 2019-02-18T12:37:01.000Z | 2019-02-18T12:37:01.000Z | ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_service.py | shavi71/ambari | 0ed348523be783fe52bd4e2ee54dbb297619a6f1 | [
"Apache-2.0"
] | null | null | null | ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_service.py | shavi71/ambari | 0ed348523be783fe52bd4e2ee54dbb297619a6f1 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License");... | 45.932642 | 270 | 0.686407 |
4d928d853c90c1dcb5f3921c48bd93abdd34f61d | 75,676 | py | Python | docusign_esign/models/date_signed.py | hunk/docusign-python-client | a643c42c1236715e74eef6fc279a1b29da1b5455 | [
"MIT"
] | null | null | null | docusign_esign/models/date_signed.py | hunk/docusign-python-client | a643c42c1236715e74eef6fc279a1b29da1b5455 | [
"MIT"
] | null | null | null | docusign_esign/models/date_signed.py | hunk/docusign-python-client | a643c42c1236715e74eef6fc279a1b29da1b5455 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
DocuSign REST API
The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign.
OpenAPI spec version: v2.1
Contact: devcenter@docusign.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from p... | 33.470146 | 2,176 | 0.663486 |
dc3e127892c4ed047e60809c1ab1380bd4cb38e8 | 17,655 | py | Python | tests/sql/test_casts.py | svaningelgem/gelanis | 12360ead579816e5a2764dc9f995449bacf67ecc | [
"Apache-2.0"
] | 1 | 2021-07-30T11:23:43.000Z | 2021-07-30T11:23:43.000Z | tests/sql/test_casts.py | svaningelgem/gelanis | 12360ead579816e5a2764dc9f995449bacf67ecc | [
"Apache-2.0"
] | 3 | 2021-03-05T14:45:38.000Z | 2021-03-10T16:19:38.000Z | tests/sql/test_casts.py | svaningelgem/gelanis | 12360ead579816e5a2764dc9f995449bacf67ecc | [
"Apache-2.0"
] | 1 | 2021-03-17T19:43:05.000Z | 2021-03-17T19:43:05.000Z | import collections
import datetime
from unittest import TestCase
import pytz
from gelanis.sql._casts import (
cast_from_none, cast_to_array, cast_to_binary, cast_to_boolean, cast_to_byte, cast_to_date, cast_to_decimal,
cast_to_float, cast_to_int, cast_to_long, cast_to_map, cast_to_short, cast_to_string, cast_... | 30.544983 | 114 | 0.526536 |
a25279b76758f3896e84c6e5bad84c3161a6d039 | 2,203 | py | Python | src/lib/celery/__init__.py | madelinelimm/newcookiectest | 3283eae420aa1a3df0fca7fa4f00e90cc56c032b | [
"MIT"
] | null | null | null | src/lib/celery/__init__.py | madelinelimm/newcookiectest | 3283eae420aa1a3df0fca7fa4f00e90cc56c032b | [
"MIT"
] | null | null | null | src/lib/celery/__init__.py | madelinelimm/newcookiectest | 3283eae420aa1a3df0fca7fa4f00e90cc56c032b | [
"MIT"
] | null | null | null | '''library for the celery worker
This contains a library that will generate a celery app. This is
a library that is provided so that everything can be made as
simple as possible. There is no need to change anything in this
library, and this library should work as is. The currelt celery
library works usign an up... | 39.339286 | 81 | 0.702678 |
d525f3089eed62be663db8a65baf17221fe2a7c4 | 1,509 | py | Python | unumpy/numpy_backend.py | prasunanand/unumpy | 73f7867b681337c28c245695ca28126efc6b0e66 | [
"BSD-3-Clause"
] | null | null | null | unumpy/numpy_backend.py | prasunanand/unumpy | 73f7867b681337c28c245695ca28126efc6b0e66 | [
"BSD-3-Clause"
] | null | null | null | unumpy/numpy_backend.py | prasunanand/unumpy | 73f7867b681337c28c245695ca28126efc6b0e66 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
from uarray import Dispatchable, wrap_single_convertor
from unumpy import ufunc, ufunc_list, ndarray, dtype
import unumpy
import functools
from typing import Dict
_ufunc_mapping: Dict[ufunc, np.ufunc] = {}
__ua_domain__ = "numpy"
_implementations: Dict = {
unumpy.ufunc.__call__: np.ufunc.__c... | 24.33871 | 85 | 0.683234 |
b32078eff271c7abe705c3cc7c86667f49218fdc | 906 | py | Python | deployfish_mysql/cli/adapters/mysql.py | caltechads/deployfish-mysql | c67b76f3c56aea8a6802e4c9caad692f0f4d468d | [
"MIT"
] | 1 | 2017-08-24T22:13:20.000Z | 2017-08-24T22:13:20.000Z | deployfish_mysql/cli/adapters/mysql.py | caltechads/deployfish-mysql | c67b76f3c56aea8a6802e4c9caad692f0f4d468d | [
"MIT"
] | 1 | 2018-04-05T18:43:23.000Z | 2018-04-05T18:43:23.000Z | deployfish_mysql/cli/adapters/mysql.py | caltechads/deployfish-mysql | c67b76f3c56aea8a6802e4c9caad692f0f4d468d | [
"MIT"
] | 1 | 2017-08-24T22:13:56.000Z | 2017-08-24T22:13:56.000Z | from deployfish.cli.adapters import ClickModelAdapter
from .commands import (
ClickCreateDatabaseCommandMixin,
ClickUpdateDatabaseCommandMixin,
ClickDumpDatabaseCommandMixin,
ClickLoadSQLCommandMixin,
ClickValidateDatabaseUserCommandMixin,
ClickServerVersionCommandMixin,
ClickShowGrantsComm... | 25.166667 | 53 | 0.743929 |
2fee2b25d0bf6bd473c8d9c6e18eb0d4dfa451e3 | 3,182 | py | Python | Scripts/simulation/visualization/social_group_visualizer.py | velocist/TS4CheatsInfo | b59ea7e5f4bd01d3b3bd7603843d525a9c179867 | [
"Apache-2.0"
] | null | null | null | Scripts/simulation/visualization/social_group_visualizer.py | velocist/TS4CheatsInfo | b59ea7e5f4bd01d3b3bd7603843d525a9c179867 | [
"Apache-2.0"
] | null | null | null | Scripts/simulation/visualization/social_group_visualizer.py | velocist/TS4CheatsInfo | b59ea7e5f4bd01d3b3bd7603843d525a9c179867 | [
"Apache-2.0"
] | null | null | null | # uncompyle6 version 3.7.4
# Python bytecode 3.7 (3394)
# Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)]
# Embedded file name: T:\InGame\Gameplay\Scripts\Server\visualization\social_group_visualizer.py
# Compiled at: 2015-11-19 02:03:00
# Size of source mod 2**... | 52.163934 | 115 | 0.57291 |
1ec6a698c95ccc91f2466ca7356326813c927516 | 2,683 | py | Python | nillu/utils.py | cnu/nillu | 1ad4e7d92fe7407d7d15fc12c3cffc0e51a15d44 | [
"BSD-3-Clause"
] | null | null | null | nillu/utils.py | cnu/nillu | 1ad4e7d92fe7407d7d15fc12c3cffc0e51a15d44 | [
"BSD-3-Clause"
] | null | null | null | nillu/utils.py | cnu/nillu | 1ad4e7d92fe7407d7d15fc12c3cffc0e51a15d44 | [
"BSD-3-Clause"
] | null | null | null | from urllib.parse import urlparse, urljoin
import datetime
from flask import request, url_for
def is_safe_url(target):
"""Checks if the url is safe and part of the same host.
from http://flask.pocoo.org/snippets/62/ for flask-login's ?next url redirect
"""
ref_url = urlparse(request.host_url)
te... | 33.962025 | 107 | 0.600075 |
a332dc12d31027da813082638725a7dccf671730 | 525 | py | Python | setup.py | liujb/python-geohash | aa5e18dbbf887140d77a33d84d2f07d126d47ba4 | [
"Unlicense",
"Apache-2.0",
"MIT"
] | 284 | 2015-03-16T08:39:44.000Z | 2022-03-24T12:21:22.000Z | setup.py | ynb007/python-geohash | f5d105fb140ab6a1d80b85a134f834cf9c2e2390 | [
"MIT",
"Apache-2.0",
"Unlicense"
] | 20 | 2015-03-16T02:57:58.000Z | 2021-06-24T18:13:38.000Z | setup.py | ynb007/python-geohash | f5d105fb140ab6a1d80b85a134f834cf9c2e2390 | [
"MIT",
"Apache-2.0",
"Unlicense"
] | 104 | 2015-03-16T08:26:39.000Z | 2021-12-17T14:26:21.000Z | try:
from setuptools import setup, Extension
except ImportError:
from distutils.core import setup, Extension
# requiring C++ here for Windows support.
c1=Extension('_geohash',
sources=['src/geohash.cpp',],
define_macros = [('PYTHON_MODULE',1),])
setup(name='python-geohash',
version='0.8.5',
descript... | 27.631579 | 57 | 0.702857 |
e7c50ece01e3a20ebe9c5c67d377cfb447f9e2af | 6,163 | py | Python | Orb_version/Find_exit/exit.py | rbdlabhaifa/colmap_lite_version | 1f6e4985fd424143bc312f47cb96deac4f7b9c96 | [
"Unlicense"
] | null | null | null | Orb_version/Find_exit/exit.py | rbdlabhaifa/colmap_lite_version | 1f6e4985fd424143bc312f47cb96deac4f7b9c96 | [
"Unlicense"
] | null | null | null | Orb_version/Find_exit/exit.py | rbdlabhaifa/colmap_lite_version | 1f6e4985fd424143bc312f47cb96deac4f7b9c96 | [
"Unlicense"
] | null | null | null | from math import isnan
from sys import maxsize
from time import time
import matplotlib.pyplot as plt
from numpy import vstack, zeros, zeros_like, linspace
from sklearn.cluster import DBSCAN
from Point import get_y_dimension, get_x_dimension
from auxiliary_functions import get_index_of_closest_point_to_rectangle, calc... | 33.862637 | 113 | 0.61707 |
ce8bbd1a7f32b4999f0866bbad7b3d09985addf7 | 1,001 | py | Python | cireg/cms/migrations/0023_casestudyoverview.py | bruecksen/cireg | 3fbcd24bd61153bac93b6abe26fc9b96d4a2098b | [
"MIT"
] | null | null | null | cireg/cms/migrations/0023_casestudyoverview.py | bruecksen/cireg | 3fbcd24bd61153bac93b6abe26fc9b96d4a2098b | [
"MIT"
] | 3 | 2019-10-22T13:09:43.000Z | 2019-10-22T13:09:45.000Z | cireg/cms/migrations/0023_casestudyoverview.py | bruecksen/cireg | 3fbcd24bd61153bac93b6abe26fc9b96d4a2098b | [
"MIT"
] | null | null | null | # Generated by Django 2.0.8 on 2018-09-27 17:57
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('wagtailtrans', '0007_auto_20180327_1127'),
('wagtailcore', '0040_page_draft_title'),
('cms', '0022_auto_2018... | 35.75 | 216 | 0.639361 |
53f6aa87b7b2698eb6c3ffeced93fb1fc90a460a | 3,172 | py | Python | maskrcnn_benchmark/data/datasets/coco.py | BorisLestsov/retinamask | 265a65f018c64220bcea946d306fc7b07a692b16 | [
"MIT"
] | null | null | null | maskrcnn_benchmark/data/datasets/coco.py | BorisLestsov/retinamask | 265a65f018c64220bcea946d306fc7b07a692b16 | [
"MIT"
] | null | null | null | maskrcnn_benchmark/data/datasets/coco.py | BorisLestsov/retinamask | 265a65f018c64220bcea946d306fc7b07a692b16 | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
import torch
import torchvision
import os
import ujson
import numpy as np
from maskrcnn_benchmark.structures.bounding_box import BoxList
from maskrcnn_benchmark.structures.segmentation_mask import SegmentationMask
from maskrcnn_benchmark.utils.co... | 32.701031 | 86 | 0.637137 |
e76ab9f7eb8f3f4ab123f92fce60680a4ebd3af7 | 1,335 | py | Python | nemo/collections/asr/modules/__init__.py | Oreoluwa1234/NeMo | b01e3ceed34efe31fd43866685dbdd19a6b30928 | [
"Apache-2.0"
] | null | null | null | nemo/collections/asr/modules/__init__.py | Oreoluwa1234/NeMo | b01e3ceed34efe31fd43866685dbdd19a6b30928 | [
"Apache-2.0"
] | null | null | null | nemo/collections/asr/modules/__init__.py | Oreoluwa1234/NeMo | b01e3ceed34efe31fd43866685dbdd19a6b30928 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020, NVIDIA CORPORATION. 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 appli... | 39.264706 | 84 | 0.798502 |
7604efc8b9f1dce0b156026386c2632f5589ef3a | 73,655 | py | Python | PythonVirtEnv/Lib/site-packages/plotly/graph_objs/scatterpolar/marker/_colorbar.py | zuhorski/EPL_Project | 2d2417652879cfbe33c44c003ad77b7222590849 | [
"MIT"
] | 2 | 2021-07-18T11:39:56.000Z | 2021-11-06T17:13:05.000Z | venv/Lib/site-packages/plotly/graph_objs/scatterpolar/marker/_colorbar.py | wakisalvador/constructed-misdirection | 74779e9ec640a11bc08d5d1967c85ac4fa44ea5e | [
"Unlicense"
] | null | null | null | venv/Lib/site-packages/plotly/graph_objs/scatterpolar/marker/_colorbar.py | wakisalvador/constructed-misdirection | 74779e9ec640a11bc08d5d1967c85ac4fa44ea5e | [
"Unlicense"
] | null | null | null | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class ColorBar(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "scatterpolar.marker"
_path_str = "scatterpolar.marker.colorbar"
_valid_props = {
"... | 35.824416 | 105 | 0.559731 |
20f2af88ba6a9171e4e4f5b90ad1e65b3cc9ee77 | 5,491 | py | Python | frappe/tests/test_fmt_datetime.py | chentaoz/frappe | ee3c4943bf6177ad3b410cdb0d802af486751a65 | [
"MIT"
] | 3 | 2017-12-09T22:05:11.000Z | 2019-10-22T12:03:43.000Z | frappe/tests/test_fmt_datetime.py | chentaoz/frappe | ee3c4943bf6177ad3b410cdb0d802af486751a65 | [
"MIT"
] | 66 | 2020-02-28T07:47:09.000Z | 2021-07-21T04:53:35.000Z | frappe/tests/test_fmt_datetime.py | chentaoz/frappe | ee3c4943bf6177ad3b410cdb0d802af486751a65 | [
"MIT"
] | 4 | 2018-01-19T08:59:36.000Z | 2020-01-30T08:11:56.000Z | # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import datetime
import frappe
from frappe.utils import (
getdate, get_datetime, get_time,
get_user_date_format, get_user_time_format,
formatdate, format_datetime, format_time)... | 33.481707 | 68 | 0.738117 |
3cfa0696644991d0405dac1872f5e02d0639befd | 7,045 | py | Python | homeassistant/components/python_script.py | dannyqwertz/home-assistant | 688bdc6532e514afbdc8efd1f574a7b5c9e8d280 | [
"Apache-2.0"
] | 4 | 2019-01-10T14:47:54.000Z | 2021-04-22T02:06:27.000Z | homeassistant/components/python_script.py | dannyqwertz/home-assistant | 688bdc6532e514afbdc8efd1f574a7b5c9e8d280 | [
"Apache-2.0"
] | 6 | 2021-02-08T21:02:40.000Z | 2022-03-12T00:52:16.000Z | homeassistant/components/python_script.py | dannyqwertz/home-assistant | 688bdc6532e514afbdc8efd1f574a7b5c9e8d280 | [
"Apache-2.0"
] | 3 | 2018-08-29T19:26:20.000Z | 2020-01-19T11:58:22.000Z | """
Component to allow running Python scripts.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/python_script/
"""
import datetime
import glob
import logging
import os
import time
import voluptuous as vol
from homeassistant.const import SERVICE_RELOAD
f... | 33.231132 | 79 | 0.658339 |
a262519870af1f0c0df86065680024dac1701b62 | 11,954 | py | Python | qiskit/providers/aer/backends/statevector_simulator.py | itoko/qiskit-aer | 0d95c93a969e45154383a1523842328de2cfbc1b | [
"Apache-2.0"
] | null | null | null | qiskit/providers/aer/backends/statevector_simulator.py | itoko/qiskit-aer | 0d95c93a969e45154383a1523842328de2cfbc1b | [
"Apache-2.0"
] | 2 | 2021-08-20T02:41:39.000Z | 2021-08-20T02:43:42.000Z | qiskit/providers/aer/backends/statevector_simulator.py | itoko/qiskit-aer | 0d95c93a969e45154383a1523842328de2cfbc1b | [
"Apache-2.0"
] | null | null | null | # This code is part of Qiskit.
#
# (C) Copyright IBM 2018, 2019.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivat... | 40.938356 | 99 | 0.635269 |
28a02a51526b46f76410547d9394458960ae2b26 | 1,350 | py | Python | jts/backend/users/migrations/0004_auto_20191015_1309.py | goupaz/babylon | 4e638d02705469061e563fec349676d8faa9f648 | [
"MIT"
] | 1 | 2021-06-23T05:06:31.000Z | 2021-06-23T05:06:31.000Z | backend/users/migrations/0004_auto_20191015_1309.py | goupaz/website | ce1bc8b6c52ee0815a7b98842ec3bde0c20e0add | [
"Apache-2.0"
] | 2 | 2020-10-09T19:16:09.000Z | 2020-10-10T20:40:41.000Z | jts/backend/users/migrations/0004_auto_20191015_1309.py | goupaz/babylon-hackathon | 4e638d02705469061e563fec349676d8faa9f648 | [
"MIT"
] | 1 | 2019-07-21T01:42:21.000Z | 2019-07-21T01:42:21.000Z | # Generated by Django 2.2 on 2019-10-15 20:09
from django.db import migrations, models
import uuid
from django.core.files import File
from urllib.request import urlretrieve
from urllib.error import HTTPError
import os
class Migration(migrations.Migration):
dependencies = [
('users', '0003_auto_20191015_... | 35.526316 | 101 | 0.581481 |
adbfeab65a4344f38372ebfb56cfe2471943991e | 1,414 | py | Python | src/common/tensorboard.py | lavoiems/NeuralWassersteinFlow | b120778d75fc7afc9b6a56724768ab39ad7c0b91 | [
"MIT"
] | 2 | 2021-06-28T14:21:28.000Z | 2021-12-24T12:52:56.000Z | src/common/tensorboard.py | lavoiems/NeuralWassersteinFlow | b120778d75fc7afc9b6a56724768ab39ad7c0b91 | [
"MIT"
] | null | null | null | src/common/tensorboard.py | lavoiems/NeuralWassersteinFlow | b120778d75fc7afc9b6a56724768ab39ad7c0b91 | [
"MIT"
] | null | null | null | from tensorboardX import SummaryWriter
import numpy as np
import os
import json
from common.util import get_args_dict
from torchvision.utils import make_grid
import torch
class Visualiser:
def __init__(self, log_dir, exp_name):
path = os.path.join(log_dir, exp_name)
self.visualiser = SummaryWriter... | 31.422222 | 93 | 0.615276 |
8bc0415a45f24b44dee9d8afd5ab9e22d9e0fada | 40,817 | py | Python | runtime/python/Lib/importlib/_bootstrap.py | hwaipy/InteractionFreeNode | 88642b68430f57b028fd0f276a5709f89279e30d | [
"MIT"
] | null | null | null | runtime/python/Lib/importlib/_bootstrap.py | hwaipy/InteractionFreeNode | 88642b68430f57b028fd0f276a5709f89279e30d | [
"MIT"
] | 9 | 2020-03-24T18:11:45.000Z | 2022-03-12T00:14:52.000Z | runtime/python/Lib/importlib/_bootstrap.py | hwaipy/InteractionFreeNode | 88642b68430f57b028fd0f276a5709f89279e30d | [
"MIT"
] | null | null | null | """Core implementation of import.
This module is NOT meant to be directly imported! It has been designed such
that it can be bootstrapped into Python as the implementation of import. As
such it requires the injection of specific modules and attributes in order to
work. One should use importlib as the public-facin... | 34.767462 | 106 | 0.594434 |
2dffe47a6198ea3660e9ed899a1102279ec854af | 5,831 | py | Python | renameexp.py | ir9/renameexp | f01a4cd8d3ddc310985b00880745421abd398eef | [
"MIT"
] | null | null | null | renameexp.py | ir9/renameexp | f01a4cd8d3ddc310985b00880745421abd398eef | [
"MIT"
] | null | null | null | renameexp.py | ir9/renameexp | f01a4cd8d3ddc310985b00880745421abd398eef | [
"MIT"
] | null | null | null | # =*= coding:utf-8 =*=
# かしら
import re
import os
import os.path
import sys
import functools
import itertools
class StringSeq :
def __init__(self, org, seq) :
self.org = org
self.seq = seq
def __repr__(self) :
return 'StringSeq<%s>' % ', '.join(repr(c) for c in self.seq)
def __str_... | 27.504717 | 192 | 0.577774 |
350ef5dab4053839dda33805f0478481dea94a45 | 143 | py | Python | dog_finder/testdb.py | jojo-en-code/foundations-project-template | 4378bbba60353710e9ec5424c7e0314b3361472c | [
"MIT"
] | null | null | null | dog_finder/testdb.py | jojo-en-code/foundations-project-template | 4378bbba60353710e9ec5424c7e0314b3361472c | [
"MIT"
] | null | null | null | dog_finder/testdb.py | jojo-en-code/foundations-project-template | 4378bbba60353710e9ec5424c7e0314b3361472c | [
"MIT"
] | null | null | null | # import mysql.connector
# mydb=mysql.connector.connect(
# host="localhost",
# user="root",
# passwd="password"
# )
# print (mydb) | 17.875 | 31 | 0.622378 |
32ad06f3da72468f689ce3e8bc698a093af9e65a | 1,119 | py | Python | huey_debug/users/tests/test_forms.py | overtron/huey_debug | 6cf1495ea4ac17880fd8d4c0bbb2b3fa3f299636 | [
"MIT"
] | null | null | null | huey_debug/users/tests/test_forms.py | overtron/huey_debug | 6cf1495ea4ac17880fd8d4c0bbb2b3fa3f299636 | [
"MIT"
] | null | null | null | huey_debug/users/tests/test_forms.py | overtron/huey_debug | 6cf1495ea4ac17880fd8d4c0bbb2b3fa3f299636 | [
"MIT"
] | null | null | null | import pytest
from huey_debug.users.forms import UserCreationForm
from huey_debug.users.tests.factories import UserFactory
pytestmark = pytest.mark.django_db
class TestUserCreationForm:
def test_clean_username(self):
# A user with proto_user params does not exist yet.
proto_user = UserFactory.bu... | 27.292683 | 59 | 0.595174 |
677391f345c2dd0407ed2d5c14290c0f2ac32cff | 39,384 | py | Python | frappe/model/document.py | adnanmunir83/frappe | 704834725ab7e8bd8b3b7587d6b6fe834fbe8d14 | [
"MIT"
] | null | null | null | frappe/model/document.py | adnanmunir83/frappe | 704834725ab7e8bd8b3b7587d6b6fe834fbe8d14 | [
"MIT"
] | null | null | null | frappe/model/document.py | adnanmunir83/frappe | 704834725ab7e8bd8b3b7587d6b6fe834fbe8d14 | [
"MIT"
] | null | null | null | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals, print_function
import frappe
import time
from frappe import _, msgprint
from frappe.utils import flt, cstr, now, get_datetime_str, file_lock
from frappe.utils.background_jobs imp... | 31.158228 | 125 | 0.715697 |
f2b1a77220b6ee943527efeebe5c4f0104e948f9 | 31,053 | py | Python | Rasa_Bot/actions/actions.py | PerfectFit-project/virtual-coach-rasa | 5e99dd3597fa0b9e6eedc6791711c0aca6ff5441 | [
"Apache-2.0"
] | 1 | 2021-12-18T21:32:44.000Z | 2021-12-18T21:32:44.000Z | Rasa_Bot/actions/actions.py | PerfectFit-project/virtual-coach-rasa | 5e99dd3597fa0b9e6eedc6791711c0aca6ff5441 | [
"Apache-2.0"
] | 28 | 2021-12-28T13:15:20.000Z | 2022-03-31T12:28:56.000Z | Rasa_Bot/actions/actions.py | PerfectFit-project/rasa-bot | 7355b402abc1b3b50b7c425788057f29f75ce054 | [
"Apache-2.0"
] | 1 | 2022-02-07T13:39:05.000Z | 2022-02-07T13:39:05.000Z | # This files contains your custom actions which can be used to run
# custom Python code.
#
# See this guide on how to implement these action:
# https://rasa.com/docs/rasa/custom-actions
import datetime
import logging
import os
import string
from enum import Enum
from typing import Any, Dict, Text
from dateutil import ... | 34.124176 | 100 | 0.644575 |
1d5e26a3a076c08b3d5356f1d641f262d203ce55 | 277 | py | Python | lab/helpers/pytorch/seed.py | vidhiJain/lab | 43a3eb2aa3121b226c849690e636dcd4c04a49cf | [
"MIT"
] | null | null | null | lab/helpers/pytorch/seed.py | vidhiJain/lab | 43a3eb2aa3121b226c849690e636dcd4c04a49cf | [
"MIT"
] | null | null | null | lab/helpers/pytorch/seed.py | vidhiJain/lab | 43a3eb2aa3121b226c849690e636dcd4c04a49cf | [
"MIT"
] | 1 | 2020-10-02T01:46:45.000Z | 2020-10-02T01:46:45.000Z | import torch
import numpy as np
from lab.configs import BaseConfigs
class SeedConfigs(BaseConfigs):
seed: int = 5
set_seed = 'set_seed'
@SeedConfigs.calc(SeedConfigs.set_seed)
def set_seed(c: SeedConfigs):
torch.manual_seed(c.seed)
np.random.seed(c.seed)
| 16.294118 | 39 | 0.732852 |
0f09abf5936e787e6ef87489854c7b6ad3be7773 | 8,324 | py | Python | src/model/efficient_disparity.py | JonasFrey96/FlowPose6D | 2297ab5fa0afd0c247d59c2f1c7f899f078e2893 | [
"MIT"
] | null | null | null | src/model/efficient_disparity.py | JonasFrey96/FlowPose6D | 2297ab5fa0afd0c247d59c2f1c7f899f078e2893 | [
"MIT"
] | null | null | null | src/model/efficient_disparity.py | JonasFrey96/FlowPose6D | 2297ab5fa0afd0c247d59c2f1c7f899f078e2893 | [
"MIT"
] | null | null | null | import torch
from efficientnet_pytorch import EfficientNet
from torch import nn
from torchvision import transforms
def deconv(in_planes, out_planes, bias=False):
return nn.Sequential(
nn.ConvTranspose2d(in_planes, out_planes, kernel_size=4,
stride=2, padding=1, bias=bias),
... | 38.183486 | 229 | 0.652811 |
b57013d62a72fdd7f31da1e1aa6188a2c0e89b48 | 4,674 | py | Python | orchestra/tests/helpers/iterations.py | code-review-doctor/orchestra | 1ba58d26c508e89d2050dc9b0c8439eb1eadd014 | [
"Apache-2.0"
] | 444 | 2016-07-25T05:24:30.000Z | 2022-02-21T08:12:29.000Z | orchestra/tests/helpers/iterations.py | code-review-doctor/orchestra | 1ba58d26c508e89d2050dc9b0c8439eb1eadd014 | [
"Apache-2.0"
] | 395 | 2016-07-26T20:49:59.000Z | 2022-03-15T20:58:45.000Z | orchestra/tests/helpers/iterations.py | code-review-doctor/orchestra | 1ba58d26c508e89d2050dc9b0c8439eb1eadd014 | [
"Apache-2.0"
] | 63 | 2016-07-26T04:10:21.000Z | 2022-03-29T03:32:19.000Z | from orchestra.models import Iteration
from orchestra.models import Task
from orchestra.models import TaskAssignment
from orchestra.utils.task_properties import current_assignment
from orchestra.utils.task_properties import get_iteration_history
def verify_iterations(task_id):
task = Task.objects.get(id=task_id)
... | 39.610169 | 75 | 0.715233 |
ed8e343b559fedbbb90897d6b8e84e59e3ef6966 | 1,032 | py | Python | examples/recipe.py | USEPA/LCIAformatter | e803dccf81b1f7d7441e576909cdac3f823b40ce | [
"MIT"
] | 8 | 2020-01-29T01:53:30.000Z | 2021-07-26T16:18:33.000Z | examples/recipe.py | USEPA/LCIAformatter | e803dccf81b1f7d7441e576909cdac3f823b40ce | [
"MIT"
] | 41 | 2019-10-03T16:41:33.000Z | 2022-01-12T18:24:24.000Z | examples/recipe.py | USEPA/LCIAformatter | e803dccf81b1f7d7441e576909cdac3f823b40ce | [
"MIT"
] | 8 | 2019-11-24T13:11:59.000Z | 2021-10-05T14:41:34.000Z | import lciafmt
from lciafmt.util import store_method, save_json, collapse_indicators
method = lciafmt.Method.RECIPE_2016
# To obtain summary LCIA endpoint categories (damage assessment) set to True
apply_summary = False
def main():
data = lciafmt.get_method(method, endpoint=True,
... | 30.352941 | 91 | 0.717054 |
c444de64eba62e28e9f14c67f63422263ebca43a | 17,039 | py | Python | pollbot/telegram/session.py | Monster-ZeroX/ultimate-poll-bot | 16be9efbfaa56bf6ef5a7a9265f9457b46559369 | [
"MIT"
] | 8 | 2021-07-28T16:24:33.000Z | 2021-11-11T04:19:30.000Z | pollbot/telegram/session.py | Monster-ZeroX/ultimate-poll-bot | 16be9efbfaa56bf6ef5a7a9265f9457b46559369 | [
"MIT"
] | null | null | null | pollbot/telegram/session.py | Monster-ZeroX/ultimate-poll-bot | 16be9efbfaa56bf6ef5a7a9265f9457b46559369 | [
"MIT"
] | null | null | null | """Session helper functions."""
import traceback
from datetime import date, datetime, timedelta
from functools import wraps
from typing import Any, Callable, Optional, Tuple, Union
from sqlalchemy.exc import IntegrityError
from sqlalchemy.orm import Session
from sqlalchemy.orm.scoping import scoped_session
from telegr... | 36.33049 | 135 | 0.57163 |
6b36b7b23f0985d72afd9ffa8805cddd8f70a339 | 1,881 | py | Python | first.py | 2020-2021-s2-autonomous-robotics-b/psb-noah.github.io | 87e0a6fd2c4671f6c547f2fb4393647b933e17e0 | [
"MIT"
] | null | null | null | first.py | 2020-2021-s2-autonomous-robotics-b/psb-noah.github.io | 87e0a6fd2c4671f6c547f2fb4393647b933e17e0 | [
"MIT"
] | null | null | null | first.py | 2020-2021-s2-autonomous-robotics-b/psb-noah.github.io | 87e0a6fd2c4671f6c547f2fb4393647b933e17e0 | [
"MIT"
] | null | null | null | from locorobo import LocoRobo
from locorobo import MotorDirection
from locorobo import Data
from locorobo import WaitType
from locorobo import Song
from locorobo import Note
def get_robot(robots, name):
robot = None
# Search through robots found during the scan for
# the one we want
for r in robots.va... | 26.125 | 104 | 0.659755 |
441484a500d186d47118c834fb62059712dbbfc2 | 620 | py | Python | scripts/slave/recipe_modules/filter/tests/suppress_analyze.py | bopopescu/chromium-build | f8e42c70146c1b668421ee6358dc550a955770a3 | [
"BSD-3-Clause"
] | null | null | null | scripts/slave/recipe_modules/filter/tests/suppress_analyze.py | bopopescu/chromium-build | f8e42c70146c1b668421ee6358dc550a955770a3 | [
"BSD-3-Clause"
] | null | null | null | scripts/slave/recipe_modules/filter/tests/suppress_analyze.py | bopopescu/chromium-build | f8e42c70146c1b668421ee6358dc550a955770a3 | [
"BSD-3-Clause"
] | 1 | 2020-07-22T09:16:32.000Z | 2020-07-22T09:16:32.000Z | # Copyright 2017 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.
DEPS = [
'chromium',
'filter',
'recipe_engine/properties',
]
def RunSteps(api):
api.chromium.set_config('chromium')
api.filter.analyze(
['... | 20.666667 | 72 | 0.632258 |
abd7ad0223255b83dde9e9ede7160762d1daf67d | 1,469 | py | Python | testcases/mytest/cfg.py | braymar/afl | a6b2dad6bbd9c9401814e088582bc04a074651eb | [
"Apache-2.0"
] | null | null | null | testcases/mytest/cfg.py | braymar/afl | a6b2dad6bbd9c9401814e088582bc04a074651eb | [
"Apache-2.0"
] | null | null | null | testcases/mytest/cfg.py | braymar/afl | a6b2dad6bbd9c9401814e088582bc04a074651eb | [
"Apache-2.0"
] | 1 | 2021-04-08T01:57:51.000Z | 2021-04-08T01:57:51.000Z | # import angr
# from angrutils import *
# def cfgfastpng(filename):
# proj = angr.Project(filename,load_options={"auto_load_libs":False})
# print("----------static-----------")
# cfg = proj.analyses.CFGFast()
# plot_cfg(cfg, filename, asminst=True, remove_imports=True, remove_path_terminator=True)
# cfgfastpng("./m... | 39.702703 | 164 | 0.722941 |
1f80d91990979d82420b3113920d51ca05c1c941 | 89,461 | py | Python | python/ccxt/bybit.py | MENGCHE-Wu/IDM_ccxt | 120914f9a76fdd1afce1c82af9a04fb343d6813a | [
"MIT"
] | 1 | 2021-03-08T21:52:08.000Z | 2021-03-08T21:52:08.000Z | python/ccxt/bybit.py | MENGCHE-Wu/IDM_ccxt | 120914f9a76fdd1afce1c82af9a04fb343d6813a | [
"MIT"
] | 1 | 2020-09-03T10:11:29.000Z | 2020-09-03T10:11:29.000Z | python/ccxt/bybit.py | MENGCHE-Wu/IDM_ccxt | 120914f9a76fdd1afce1c82af9a04fb343d6813a | [
"MIT"
] | 1 | 2022-03-18T09:09:31.000Z | 2022-03-18T09:09:31.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.base.exchange import Exchange
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import AuthenticationError
from cc... | 43.469874 | 253 | 0.462347 |
a9feef9d79fa6cd1f4ab094c91dc6f213465917c | 3,245 | py | Python | inference/inference_api_test/python_api_test/tests/trt_fp32/test_v1_fcn_hrnetw18_trt_fp32.py | zjjlivein/continuous_integration | c8825f32136fdd425389702c37ded08d6fd28a26 | [
"Apache-2.0"
] | 14 | 2020-03-04T07:52:07.000Z | 2022-02-14T01:39:14.000Z | inference/inference_api_test/python_api_test/tests/trt_fp32/test_v1_fcn_hrnetw18_trt_fp32.py | zjjlivein/continuous_integration | c8825f32136fdd425389702c37ded08d6fd28a26 | [
"Apache-2.0"
] | 19 | 2020-03-04T03:52:10.000Z | 2021-12-23T07:02:07.000Z | inference/inference_api_test/python_api_test/tests/trt_fp32/test_v1_fcn_hrnetw18_trt_fp32.py | zjjlivein/continuous_integration | c8825f32136fdd425389702c37ded08d6fd28a26 | [
"Apache-2.0"
] | 26 | 2020-03-04T05:39:09.000Z | 2022-02-14T01:43:28.000Z | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 33.802083 | 81 | 0.709399 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.