hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4aabfb193e87c6cf0756d8a315c62ca88aaafeba | 3,268 | py | Python | mysite/settings.py | Prajjwal-Arya/sharingZONE | 4ee79f4f24bbabb873a0efad7dff010bca21f833 | [
"MIT"
] | null | null | null | mysite/settings.py | Prajjwal-Arya/sharingZONE | 4ee79f4f24bbabb873a0efad7dff010bca21f833 | [
"MIT"
] | null | null | null | mysite/settings.py | Prajjwal-Arya/sharingZONE | 4ee79f4f24bbabb873a0efad7dff010bca21f833 | [
"MIT"
] | null | null | null | """
Django settings for mysite project.
Generated by 'django-admin startproject' using Django 1.10.3.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
"""
import os
... | 25.53125 | 91 | 0.695838 |
ea54485ea9b56361035784e73d7701a6a4654e5a | 2,928 | py | Python | src/sentry/api/bases/organization_events.py | mikiec84/sentry | 4594f479db9a079d7f1ed41a9e07d8f36953319f | [
"BSD-3-Clause"
] | null | null | null | src/sentry/api/bases/organization_events.py | mikiec84/sentry | 4594f479db9a079d7f1ed41a9e07d8f36953319f | [
"BSD-3-Clause"
] | 1 | 2022-01-15T02:36:18.000Z | 2022-01-15T02:36:18.000Z | src/sentry/api/bases/organization_events.py | gaybro8777/sentry | 4594f479db9a079d7f1ed41a9e07d8f36953319f | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
from rest_framework.exceptions import PermissionDenied
from sentry import features
from sentry.api.bases import OrganizationEndpoint, OrganizationEventsError
from sentry.api.event_search import get_snuba_query_args, InvalidSearchQuery
from sentry.models.project import Project
... | 38.025974 | 93 | 0.656421 |
f3e7e5b1967d5a31654e2ce464ab780a9029487d | 4,818 | py | Python | ledger/core/tests/test_transaction.py | berrondo/ledger | 814c151845901f125521b6d0a19479b5e8798440 | [
"MIT"
] | null | null | null | ledger/core/tests/test_transaction.py | berrondo/ledger | 814c151845901f125521b6d0a19479b5e8798440 | [
"MIT"
] | null | null | null | ledger/core/tests/test_transaction.py | berrondo/ledger | 814c151845901f125521b6d0a19479b5e8798440 | [
"MIT"
] | 1 | 2021-02-11T00:08:48.000Z | 2021-02-11T00:08:48.000Z | from decimal import Decimal
from ledger.core.models import (
Transaction as T,
Ledger,
Schema,
)
from ..calculations import Percentual
from .utils import conta
def test_venda():
# accounts:
cash_in = conta('cash_in')
cash_out = conta('cash_out')
# defining the Transaction Schema:
Ve... | 25.62766 | 62 | 0.637817 |
b5de6f33cee2d0935b30f588d75d42f0ed11b236 | 5,652 | py | Python | Topic-Modelling/code.py | anupriya-babbar/ga-learner-dsmp-repo | 6692b827a06bdb6e246c1df4f2f036d8c9c9a06c | [
"MIT"
] | null | null | null | Topic-Modelling/code.py | anupriya-babbar/ga-learner-dsmp-repo | 6692b827a06bdb6e246c1df4f2f036d8c9c9a06c | [
"MIT"
] | null | null | null | Topic-Modelling/code.py | anupriya-babbar/ga-learner-dsmp-repo | 6692b827a06bdb6e246c1df4f2f036d8c9c9a06c | [
"MIT"
] | null | null | null | # --------------
# import libraries
import numpy as np
import pandas as pd
import re
# Load data
data=pd.read_csv(path, parse_dates=[0], infer_datetime_format=True)
# Sort headlines by date of publish
data.sort_values('publish_date', inplace=True)
# Retain only alphabets
data['headline_text']=data['headline_text'].... | 26.046083 | 157 | 0.746992 |
1c05574dd2081cdc7459e888496879495f623227 | 1,594 | py | Python | kingfisher_scrapy/spiders/uk_contracts_finder.py | spendnetwork/kingfisher-scrape | 053910b278eed9b3e79ca2f05a04086300b8bc21 | [
"BSD-3-Clause"
] | null | null | null | kingfisher_scrapy/spiders/uk_contracts_finder.py | spendnetwork/kingfisher-scrape | 053910b278eed9b3e79ca2f05a04086300b8bc21 | [
"BSD-3-Clause"
] | null | null | null | kingfisher_scrapy/spiders/uk_contracts_finder.py | spendnetwork/kingfisher-scrape | 053910b278eed9b3e79ca2f05a04086300b8bc21 | [
"BSD-3-Clause"
] | null | null | null | import json
import scrapy
from kingfisher_scrapy.base_spider import BaseSpider
class UKContractsFinder(BaseSpider):
name = 'uk_contracts_finder'
custom_settings = {
'ITEM_PIPELINES': {
'kingfisher_scrapy.pipelines.KingfisherPostPipeline': 400
},
'HTTPERROR_ALLOW_ALL': Tru... | 31.88 | 107 | 0.550816 |
cffa4dff3e64165c46de079a4d88244d82222e89 | 805 | py | Python | w4_tiled_converter/tileset.py | restitux/w4-tiled-converter | 7cdee2d425c53a54d46617f9499a43dad3806594 | [
"MIT"
] | null | null | null | w4_tiled_converter/tileset.py | restitux/w4-tiled-converter | 7cdee2d425c53a54d46617f9499a43dad3806594 | [
"MIT"
] | null | null | null | w4_tiled_converter/tileset.py | restitux/w4-tiled-converter | 7cdee2d425c53a54d46617f9499a43dad3806594 | [
"MIT"
] | null | null | null | class TileSet:
def __init__(self, name, width, height, data) -> None:
self.name = name
self.width = width
self.height = height
self.data = data
def to_c_src(self) -> tuple[str, str]:
bs = []
for i in range(0, len(self.data), 4):
cols = self.data[i : i... | 28.75 | 65 | 0.46087 |
13e84df1b72bfde23ece66fd11e9475f5253337f | 6,398 | py | Python | tensorpack/dataflow/imgaug/misc.py | yougoforward/tensorpackwithmscnn | 3c61c31892a1d954678fcef22f1243ab252e0015 | [
"Apache-2.0"
] | null | null | null | tensorpack/dataflow/imgaug/misc.py | yougoforward/tensorpackwithmscnn | 3c61c31892a1d954678fcef22f1243ab252e0015 | [
"Apache-2.0"
] | null | null | null | tensorpack/dataflow/imgaug/misc.py | yougoforward/tensorpackwithmscnn | 3c61c31892a1d954678fcef22f1243ab252e0015 | [
"Apache-2.0"
] | null | null | null | # -*- coding: UTF-8 -*-
# File: misc.py
import numpy as np
import cv2
from .base import ImageAugmentor
from ...utils import logger
from ...utils.argtools import shape2d
from .transform import ResizeTransform, TransformAugmentorBase
__all__ = ['Flip', 'Resize', 'RandomResize', 'ResizeShortestEdge', 'Transpose']
cl... | 32.150754 | 99 | 0.532823 |
a08eb233a3420020d759ef4c7711c3cf91f5e1b2 | 5,049 | py | Python | datasets/registry.py | daiyaanarfeen/open_lth | 70e17b6d4f42bf6a1991f088c9044f311c42125f | [
"MIT"
] | null | null | null | datasets/registry.py | daiyaanarfeen/open_lth | 70e17b6d4f42bf6a1991f088c9044f311c42125f | [
"MIT"
] | null | null | null | datasets/registry.py | daiyaanarfeen/open_lth | 70e17b6d4f42bf6a1991f088c9044f311c42125f | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import numpy as np
from datasets import base, cifar10, mnist, imagenet, domainnet
from foundations.hparams import DatasetHparams
from platform... | 45.080357 | 129 | 0.729847 |
0d147b585344c133970bd76f3c67a535edf09b42 | 811 | py | Python | scripts/05_modules/lod_object/lodobject_level_r19.py | youdiaozi/cinema4d_py_sdk_extended | 2ac9af05d450bda3351c776a3a75e0993c01a5cc | [
"Apache-2.0"
] | 1 | 2019-12-27T13:53:18.000Z | 2019-12-27T13:53:18.000Z | scripts/05_modules/lod_object/lodobject_level_r19.py | ZeusbasePython/cinema4d_py_sdk_extended | 2ac9af05d450bda3351c776a3a75e0993c01a5cc | [
"Apache-2.0"
] | null | null | null | scripts/05_modules/lod_object/lodobject_level_r19.py | ZeusbasePython/cinema4d_py_sdk_extended | 2ac9af05d450bda3351c776a3a75e0993c01a5cc | [
"Apache-2.0"
] | 1 | 2020-01-28T15:16:28.000Z | 2020-01-28T15:16:28.000Z | """
Copyright: MAXON Computer GmbH
Author: Yannick Puech
Description:
- Hides the objects of the active LOD object 'op' current level.
Class/method highlighted:
- LodObject.GetCurrentLevel()
- LodObject.GetShowControlDescID()
Compatible:
- Win / Mac
- R19, R20, R21
"""
import c4d
def main():
... | 21.918919 | 68 | 0.678175 |
84c783c8f7470e0f5dfbad4f1d496497a1852ec0 | 3,148 | py | Python | gui/vtc/utxo_list.py | nxsofsys/electrum-zcl | 3675fa2f871a4e944fc875a4653f95d9b38b9e29 | [
"MIT"
] | 1 | 2021-04-04T20:40:29.000Z | 2021-04-04T20:40:29.000Z | gui/vtc/utxo_list.py | nxsofsys/electrum-zcl | 3675fa2f871a4e944fc875a4653f95d9b38b9e29 | [
"MIT"
] | null | null | null | gui/vtc/utxo_list.py | nxsofsys/electrum-zcl | 3675fa2f871a4e944fc875a4653f95d9b38b9e29 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2015 Thomas Voegtlin
#
# 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... | 42.540541 | 138 | 0.672808 |
bcf9cc3ab6ba3560a6c0ae42f916abd86fc17cc2 | 7,230 | py | Python | python/dgl/nn/pytorch/conv/gatconv.py | ydwu4/dgl-hack | b0fee8b9723c71f45bcf00301653fc71bfa82bc1 | [
"Apache-2.0"
] | null | null | null | python/dgl/nn/pytorch/conv/gatconv.py | ydwu4/dgl-hack | b0fee8b9723c71f45bcf00301653fc71bfa82bc1 | [
"Apache-2.0"
] | null | null | null | python/dgl/nn/pytorch/conv/gatconv.py | ydwu4/dgl-hack | b0fee8b9723c71f45bcf00301653fc71bfa82bc1 | [
"Apache-2.0"
] | null | null | null | """Torch modules for graph attention networks(GAT)."""
# pylint: disable= no-member, arguments-differ, invalid-name
import torch as th
from torch import nn
import time
from .... import function as fn
from ..softmax import edge_softmax
from ..utils import Identity
from ....utils import expand_as_pair
# pylint: enable=... | 42.034884 | 128 | 0.599032 |
c7ff5b6151e95c149b1a5c39db2adc672ca8f2ff | 6,050 | py | Python | complete_30s_acc785/model/final_model.py | shaoeric/musical_genres_classification | ea696752318796cd9dfd1cecfa41122397dfb290 | [
"MIT"
] | 11 | 2019-02-20T04:47:41.000Z | 2021-06-08T07:29:09.000Z | complete_30s_acc785/model/final_model.py | shaoeric/musical_genres_classification | ea696752318796cd9dfd1cecfa41122397dfb290 | [
"MIT"
] | null | null | null | complete_30s_acc785/model/final_model.py | shaoeric/musical_genres_classification | ea696752318796cd9dfd1cecfa41122397dfb290 | [
"MIT"
] | 2 | 2020-05-17T10:43:05.000Z | 2020-05-21T07:54:36.000Z | # -*- coding: utf-8 -*-
# @Time : 2019/2/8 16:38
# @Author : shaoeric
# @Email : shaoeric@foxmail.com
from keras.layers import Input, BatchNormalization, Dense, Flatten, Dropout, Conv2D, MaxPooling2D, GaussianNoise, Reshape, CuDNNGRU, Concatenate, Add, Dot
from keras.models import Model, Sequential
import numpy ... | 53.539823 | 192 | 0.728099 |
ad43238cd2e3c0555b966b9f96ee25b38112cda7 | 15,478 | py | Python | commplax/cxopt.py | remifan/commplax | e8ee5bc86ab0dfd90773202579237ecf42488cd0 | [
"Apache-2.0"
] | 20 | 2021-03-09T08:33:51.000Z | 2021-11-29T05:04:55.000Z | commplax/cxopt.py | remifan/commplax | e8ee5bc86ab0dfd90773202579237ecf42488cd0 | [
"Apache-2.0"
] | null | null | null | commplax/cxopt.py | remifan/commplax | e8ee5bc86ab0dfd90773202579237ecf42488cd0 | [
"Apache-2.0"
] | 6 | 2021-03-09T08:34:01.000Z | 2021-12-03T15:14:42.000Z | # Copyright 2021 The Google and Commplax 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 a... | 36.248244 | 107 | 0.694986 |
05eaeea64b067419856d25819c257ca50d667dd1 | 2,819 | py | Python | tests/test_auditor/test_auditor_bookmark.py | wbuchwalter/polyaxon | a01396ea86a74082c457bfbc2c91d283b6ff6fba | [
"MIT"
] | null | null | null | tests/test_auditor/test_auditor_bookmark.py | wbuchwalter/polyaxon | a01396ea86a74082c457bfbc2c91d283b6ff6fba | [
"MIT"
] | null | null | null | tests/test_auditor/test_auditor_bookmark.py | wbuchwalter/polyaxon | a01396ea86a74082c457bfbc2c91d283b6ff6fba | [
"MIT"
] | null | null | null | # pylint:disable=ungrouped-imports
from unittest.mock import patch
import pytest
import activitylogs
import auditor
import tracker
from event_manager.events import bookmark as bookmarks_events
from tests.utils import BaseTest
@pytest.mark.auditor_mark
class AuditorBookmarksTest(BaseTest):
"""Testing subscribe... | 36.141026 | 90 | 0.699184 |
d830236ea2a5fa34088182e1b80036a3ec0422a1 | 421 | py | Python | dfa_App/migrations/0011_auto_20200716_1745.py | aejsi5/digifaa | e178986ba556db6175ede3fa1a2c1c39489b7e68 | [
"MIT"
] | null | null | null | dfa_App/migrations/0011_auto_20200716_1745.py | aejsi5/digifaa | e178986ba556db6175ede3fa1a2c1c39489b7e68 | [
"MIT"
] | null | null | null | dfa_App/migrations/0011_auto_20200716_1745.py | aejsi5/digifaa | e178986ba556db6175ede3fa1a2c1c39489b7e68 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.1 on 2020-07-16 15:45
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('dfa_App', '0010_auto_20200716_1744'),
]
operations = [
migrations.AlterField(
model_name='note',
name='Note_DATE',
... | 22.157895 | 84 | 0.619952 |
4fff9928d2c8c4dca567e4e96265da1cb9f79aa9 | 310 | py | Python | stkapp/config/docs.py | vinayak85/stk | b2ac6d9e87da4958a466539d6ec9e562633bbbd8 | [
"MIT"
] | null | null | null | stkapp/config/docs.py | vinayak85/stk | b2ac6d9e87da4958a466539d6ec9e562633bbbd8 | [
"MIT"
] | null | null | null | stkapp/config/docs.py | vinayak85/stk | b2ac6d9e87da4958a466539d6ec9e562633bbbd8 | [
"MIT"
] | null | null | null | """
Configuration for docs
"""
# source_link = "https://github.com/[org_name]/stkapp"
# docs_base_url = "https://[org_name].github.io/stkapp"
# headline = "App that does everything"
# sub_heading = "Yes, you got that right the first time, everything"
def get_context(context):
context.brand_html = "stkapp"
| 25.833333 | 68 | 0.719355 |
4ffb5b7ea632ca5263019797bca571c59eb230e7 | 11,493 | py | Python | yolo/yolo_net.py | gogela/yolo_tensorflow | 5fd118f0ac93bcf94b73c25fc26b2423e1bf5929 | [
"MIT"
] | 928 | 2016-11-04T09:27:18.000Z | 2022-03-31T07:20:51.000Z | yolo/yolo_net.py | gogela/yolo_tensorflow | 5fd118f0ac93bcf94b73c25fc26b2423e1bf5929 | [
"MIT"
] | 95 | 2016-12-21T00:39:50.000Z | 2021-11-11T08:01:30.000Z | yolo/yolo_net.py | gogela/yolo_tensorflow | 5fd118f0ac93bcf94b73c25fc26b2423e1bf5929 | [
"MIT"
] | 556 | 2016-12-12T01:05:45.000Z | 2022-03-18T21:25:49.000Z | import numpy as np
import tensorflow as tf
import yolo.config as cfg
slim = tf.contrib.slim
class YOLONet(object):
def __init__(self, is_training=True):
self.classes = cfg.CLASSES
self.num_class = len(self.classes)
self.image_size = cfg.IMAGE_SIZE
self.cell_size = cfg.CELL_SIZE
... | 46.719512 | 116 | 0.535195 |
f6957fda66e01e522cc9ba1dd0ddd566f45a0fb2 | 9,524 | py | Python | kake/compile_util.py | csilvers/kake | 51465b12d267a629dd61778918d83a2a134ec3b2 | [
"MIT"
] | null | null | null | kake/compile_util.py | csilvers/kake | 51465b12d267a629dd61778918d83a2a134ec3b2 | [
"MIT"
] | null | null | null | kake/compile_util.py | csilvers/kake | 51465b12d267a629dd61778918d83a2a134ec3b2 | [
"MIT"
] | null | null | null | """This module provides utility functions used internally by kake."""
from __future__ import absolute_import
try:
import cPickle
except ImportError:
import pickle as cPickle # python3
import glob
import os
import re
from . import project_root
from . import filemod_db
from . import log
# We accept either ... | 37.496063 | 79 | 0.578958 |
cc247a8738b10f00a9338f46fb1f40cbb8f248eb | 1,723 | py | Python | colorply/ui/palette.py | arthurdjn/colorply | 1a4ef819ddee068565664bb08953b474e54e2b0b | [
"MIT"
] | 4 | 2019-11-01T19:43:54.000Z | 2021-01-27T21:42:20.000Z | colorply/ui/palette.py | arthurdraws/colorply | 1a4ef819ddee068565664bb08953b474e54e2b0b | [
"MIT"
] | null | null | null | colorply/ui/palette.py | arthurdraws/colorply | 1a4ef819ddee068565664bb08953b474e54e2b0b | [
"MIT"
] | null | null | null | """
Set colors and theme to the interface.
"""
# -*- coding: utf-8 -*-
# Created on Sat Jul 13 20:53:48 2019
# @author: arthurd
import sys
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtWidgets import QPushButton
def set_dark_theme(application):
"""
Set a darker theme on the PyQt window.
Param... | 29.20339 | 83 | 0.71213 |
0240b1b262b02335e6a0ad7e5c26ba3104728cbe | 14,285 | py | Python | spinup/algos/ppo_rgb/ppo_rgb.py | EmpereurCC/spinningup_instadeep | 9c8529d8aa5cf550084330586c9a13a3ec135b9a | [
"MIT"
] | null | null | null | spinup/algos/ppo_rgb/ppo_rgb.py | EmpereurCC/spinningup_instadeep | 9c8529d8aa5cf550084330586c9a13a3ec135b9a | [
"MIT"
] | 2 | 2019-06-18T14:12:26.000Z | 2019-06-18T14:55:10.000Z | spinup/algos/ppo_rgb/ppo_rgb.py | EmpereurCC/spinningup_instadeep | 9c8529d8aa5cf550084330586c9a13a3ec135b9a | [
"MIT"
] | 1 | 2019-06-11T15:07:59.000Z | 2019-06-11T15:07:59.000Z | import numpy as np
import tensorflow as tf
import gym
import time
import spinup.algos.ppo_rgb.core as core
from spinup.utils.logx import EpochLogger
from spinup.utils.mpi_tf import MpiAdamOptimizer, sync_all_params
from spinup.utils.mpi_tools import mpi_fork, mpi_avg, proc_id, mpi_statistics_scalar, num_procs
class P... | 43.027108 | 106 | 0.623591 |
5dae1f50bb3eefb8f63cd4f82de57c8c283b7568 | 1,224 | py | Python | omnibus/settings.py | edelbluth/django-omnibus | 27e6ec453ea31304597ec65cc644e1c9d7f40ae0 | [
"BSD-3-Clause"
] | 41 | 2015-01-01T17:07:35.000Z | 2019-04-10T20:07:30.000Z | omnibus/settings.py | edelbluth/django-omnibus | 27e6ec453ea31304597ec65cc644e1c9d7f40ae0 | [
"BSD-3-Clause"
] | 10 | 2015-01-12T15:56:03.000Z | 2021-05-21T09:49:49.000Z | omnibus/settings.py | radiosilence/django-omnibus | c31337306c601e75fbdac9d6b9b62dcc980e04f5 | [
"BSD-3-Clause"
] | 19 | 2015-03-18T05:31:24.000Z | 2021-05-20T21:24:58.000Z | from django.conf import settings
ENDPOINT_SCHEME = getattr(settings, 'OMNIBUS_ENDPOINT_SCHEME', 'ws')
SERVER_HOST = getattr(settings, 'OMNIBUS_SERVER_HOST', None)
SERVER_PORT = getattr(settings, 'OMNIBUS_SERVER_PORT', 4242)
SERVER_BASE_URL = getattr(settings, 'OMNIBUS_SERVER_BASE_URL', '/ec')
DIRECTOR_ENABLED = get... | 32.210526 | 73 | 0.783497 |
69df1f8757e877e8bd7088ccc6d1fdc919792024 | 6,320 | py | Python | userbot/__init__.py | darkparky/Userbot1 | 12bc5743b25e074401690586d4f3a34242c921dc | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | userbot/__init__.py | darkparky/Userbot1 | 12bc5743b25e074401690586d4f3a34242c921dc | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | userbot/__init__.py | darkparky/Userbot1 | 12bc5743b25e074401690586d4f3a34242c921dc | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | # Copyright (C) 2019 The Raphielscape Company LLC.
#
# Licensed under the Raphielscape Public License, Version 1.c (the "License");
# you may not use this file except in compliance with the License.
#
""" Userbot initialization. """
import os
from sys import version_info
from logging import basicConfig, getLogger, IN... | 31.442786 | 143 | 0.712342 |
96fe934b7a4f476ab80597f408a7216f530d54b0 | 1,231 | py | Python | adminmgr/media/code/A3/task3/BD_186_281_1583_Ln2harN.py | IamMayankThakur/test-bigdata | cef633eb394419b955bdce479699d0115d8f99c3 | [
"Apache-2.0"
] | 9 | 2019-11-08T02:05:27.000Z | 2021-12-13T12:06:35.000Z | adminmgr/media/code/A3/task3/BD_186_281_1583_Ln2harN.py | IamMayankThakur/test-bigdata | cef633eb394419b955bdce479699d0115d8f99c3 | [
"Apache-2.0"
] | 6 | 2019-11-27T03:23:16.000Z | 2021-06-10T19:15:13.000Z | adminmgr/media/code/A3/task3/BD_186_281_1583_Ln2harN.py | IamMayankThakur/test-bigdata | cef633eb394419b955bdce479699d0115d8f99c3 | [
"Apache-2.0"
] | 4 | 2019-11-26T17:04:27.000Z | 2021-12-13T11:57:03.000Z |
from __future__ import print_function
import findspark
findspark.init()
import sys
from pyspark import SparkContext
from pyspark.streaming import StreamingContext
def remove_empty_string_if_any(l):
for i in l:
if i[0]=='':
l.remove(i)
return l
return l[:-1]
def sortrecord(rd... | 26.76087 | 77 | 0.673436 |
eaddd152ba13069c63973f8ac293cf62b40ee069 | 2,888 | py | Python | user/views.py | leeyoshinari/TestPlatform | 07011d22d0b525abb1dfc0667d3af4018de3e4c8 | [
"MIT"
] | 2 | 2021-05-25T05:30:10.000Z | 2022-01-30T02:51:56.000Z | user/views.py | leeyoshinari/TestPlatform | 07011d22d0b525abb1dfc0667d3af4018de3e4c8 | [
"MIT"
] | null | null | null | user/views.py | leeyoshinari/TestPlatform | 07011d22d0b525abb1dfc0667d3af4018de3e4c8 | [
"MIT"
] | 2 | 2020-05-19T11:55:10.000Z | 2021-01-12T08:38:12.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author: leeyoshinari
import re
import logging
from django.shortcuts import render, redirect
from django.contrib import auth
from django.contrib.auth.models import User
from django.http import JsonResponse
logger = logging.getLogger('django')
def home(... | 33.976471 | 94 | 0.557133 |
99a707d280aa87a03d14b7796e6bab50eb1df5af | 1,237 | py | Python | Python/missing-number-in-arithmetic-progression.py | RideGreg/LeetCode | b70818b1e6947bf29519a24f78816e022ebab59e | [
"MIT"
] | 1 | 2022-01-30T06:55:28.000Z | 2022-01-30T06:55:28.000Z | Python/missing-number-in-arithmetic-progression.py | RideGreg/LeetCode | b70818b1e6947bf29519a24f78816e022ebab59e | [
"MIT"
] | null | null | null | Python/missing-number-in-arithmetic-progression.py | RideGreg/LeetCode | b70818b1e6947bf29519a24f78816e022ebab59e | [
"MIT"
] | 1 | 2021-12-31T03:56:39.000Z | 2021-12-31T03:56:39.000Z | # Time: O(logn)
# Space: O(1)
# 1228 biweekly contest 11 10/19/2019
# In some array arr, the values were in arithmetic progression: the values arr[i+1] - arr[i] are all equal for every 0 <= i < arr.length - 1.
#
# Then, a value from arr was removed that was not the first or last value in the array.
#
# Return the rem... | 26.319149 | 141 | 0.537591 |
62f0a185b11fbce5a68565e067253476569f053f | 3,145 | py | Python | lwrl/agents/batch_agent.py | sealday/lwrl | 52bcd67751e605c38db4afa609c58938c7034e8d | [
"MIT"
] | 2 | 2019-04-11T11:55:48.000Z | 2020-05-29T18:09:51.000Z | lwrl/agents/batch_agent.py | sealday/lwrl | 52bcd67751e605c38db4afa609c58938c7034e8d | [
"MIT"
] | 6 | 2021-06-01T22:21:00.000Z | 2022-03-11T23:24:36.000Z | lwrl/agents/batch_agent.py | sealday/lwrl | 52bcd67751e605c38db4afa609c58938c7034e8d | [
"MIT"
] | 1 | 2019-04-12T03:09:47.000Z | 2019-04-12T03:09:47.000Z | import numpy as np
from lwrl.agents import LearningAgent
from lwrl.utils.history import History
class BatchAgent(LearningAgent):
def __init__(
self,
state_spec,
action_spec,
discount_factor,
optimizer=None,
history_length=1,
batc... | 33.817204 | 125 | 0.610175 |
b9ed370b48351e40ef003400425c6a7c42fe83a3 | 3,200 | py | Python | docs/visISC_hierachical_frequency_data_example.py | STREAM3/visISC | 73d6e2af8a591f907d3ea7dc8d130786c4d8c33a | [
"BSD-3-Clause"
] | null | null | null | docs/visISC_hierachical_frequency_data_example.py | STREAM3/visISC | 73d6e2af8a591f907d3ea7dc8d130786c4d8c33a | [
"BSD-3-Clause"
] | 1 | 2017-02-08T08:06:42.000Z | 2017-02-08T08:06:42.000Z | docs/visISC_hierachical_frequency_data_example.py | STREAM3/visISC | 73d6e2af8a591f907d3ea7dc8d130786c4d8c33a | [
"BSD-3-Clause"
] | null | null | null |
# coding: utf-8
# # visISC Example: Visualizing Anomalous Frequency Data with Hierarchical Data
# In this example, we will show what to do when you are analysing frequency counts of data and the data is organized in an hierarchy due to the many different types of data. For instance, if you are analysing alarm rates ... | 31.067961 | 308 | 0.637188 |
7dc3d61c0f777e9f1aac9bdd5e6fd6e11fcf3dec | 2,340 | py | Python | deepmath/premises/model_definition_cnn.py | LaudateCorpus1/deepmath | b5b721f54de1d5d6a02d78f5da5995237f9995f9 | [
"Apache-2.0"
] | 830 | 2016-11-07T21:46:27.000Z | 2022-03-23T08:01:03.000Z | deepmath/premises/model_definition_cnn.py | LaudateCorpus1/deepmath | b5b721f54de1d5d6a02d78f5da5995237f9995f9 | [
"Apache-2.0"
] | 26 | 2016-11-07T22:06:31.000Z | 2022-02-16T00:18:29.000Z | deepmath/premises/model_definition_cnn.py | LaudateCorpus1/deepmath | b5b721f54de1d5d6a02d78f5da5995237f9995f9 | [
"Apache-2.0"
] | 168 | 2016-11-07T21:48:55.000Z | 2022-03-19T02:47:14.000Z | # Copyright 2017 Google Inc. 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... | 37.142857 | 80 | 0.612393 |
40a7956a012c54d80058e691cb752883fc6e7c95 | 1,514 | py | Python | setup.py | uditagarwal/tastypie | ece398310040e9ddfeeacee6a699beb1dee6dad6 | [
"BSD-3-Clause"
] | 1 | 2018-02-28T03:35:59.000Z | 2018-02-28T03:35:59.000Z | setup.py | uditagarwal/tastypie | ece398310040e9ddfeeacee6a699beb1dee6dad6 | [
"BSD-3-Clause"
] | null | null | null | setup.py | uditagarwal/tastypie | ece398310040e9ddfeeacee6a699beb1dee6dad6 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from setuptools import setup
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup
setup(
name='django-tastypie',
version='0.10.0',
description='A flexible & capable API layer for Django.',
... | 27.527273 | 61 | 0.582563 |
5d6552ff662c05e489c18859ee016fa420ce1df5 | 22,335 | py | Python | examples/minesweeper/minesweeper.py | takipsizad/pyjs | 54db0ba6747aca744f9f3c3e985a17e913dfb951 | [
"ECL-2.0",
"Apache-2.0"
] | 739 | 2015-01-01T02:05:11.000Z | 2022-03-30T15:26:16.000Z | examples/minesweeper/minesweeper.py | takipsizad/pyjs | 54db0ba6747aca744f9f3c3e985a17e913dfb951 | [
"ECL-2.0",
"Apache-2.0"
] | 33 | 2015-03-25T23:17:04.000Z | 2021-08-19T08:25:22.000Z | examples/minesweeper/minesweeper.py | takipsizad/pyjs | 54db0ba6747aca744f9f3c3e985a17e913dfb951 | [
"ECL-2.0",
"Apache-2.0"
] | 167 | 2015-01-01T22:27:47.000Z | 2022-03-17T13:29:19.000Z | # MineSweeper game by Suzan Shakya:suzan.shakya@gmail.com
import pyjd
from pyjamas.ui.RootPanel import RootPanel
from pyjamas.ui.FocusPanel import FocusPanel
from pyjamas.ui.VerticalPanel import VerticalPanel
from pyjamas.ui.HorizontalPanel import HorizontalPanel
from pyjamas.ui.SimplePanel import SimplePanel
from py... | 34.681677 | 83 | 0.5636 |
1dde4ee175fe7b043f40c77a288088eb1f865cd4 | 865 | py | Python | python-mundo3/ex084.py | abm-astro/estudos-python | c0dcd71489e528d445efa25d4986bf2fd08f8fe6 | [
"MIT"
] | 1 | 2021-08-15T18:18:43.000Z | 2021-08-15T18:18:43.000Z | python-mundo3/ex084.py | abm-astro/estudos-python | c0dcd71489e528d445efa25d4986bf2fd08f8fe6 | [
"MIT"
] | null | null | null | python-mundo3/ex084.py | abm-astro/estudos-python | c0dcd71489e528d445efa25d4986bf2fd08f8fe6 | [
"MIT"
] | null | null | null | temporaria = []
principal = []
maior = menor = 0
while True:
temporaria.append(str(input('Nome: ')))
temporaria.append(float(input('Peso: ')))
if len(principal) == 0:
maior = menor = temporaria[1]
else:
if temporaria[1] < menor:
menor = temporaria[1]
if temporaria[1] ... | 27.903226 | 61 | 0.568786 |
2a9d0f0a1cfd8343da4453a18327a43357d5b57b | 1,538 | py | Python | findPointsInCell.py | likchuan/vtk_py | 3ab28fb951af107d1b162b4be6a80ea79dbb6dcc | [
"MIT"
] | 3 | 2021-04-13T07:05:20.000Z | 2021-10-02T13:41:09.000Z | findPointsInCell.py | likchuan/vtk_py | 3ab28fb951af107d1b162b4be6a80ea79dbb6dcc | [
"MIT"
] | null | null | null | findPointsInCell.py | likchuan/vtk_py | 3ab28fb951af107d1b162b4be6a80ea79dbb6dcc | [
"MIT"
] | 2 | 2021-09-06T13:13:41.000Z | 2022-03-11T18:59:02.000Z | ########################################################################
import vtk
########################################################################
def findPointsInCell(points,
cell,
verbose=True):
ugrid_cell = vtk.vtkUnstructuredGrid()
ugrid_cell.SetPoints... | 37.512195 | 186 | 0.661899 |
88da3fa2dc0635b31222918d07d0ecb9192684bb | 4,602 | py | Python | fn_portal/filters/common_filters.py | AdamCottrill/FishNetPortal | 4e58e05f52346ac1ab46698a03d4229c74828406 | [
"MIT"
] | null | null | null | fn_portal/filters/common_filters.py | AdamCottrill/FishNetPortal | 4e58e05f52346ac1ab46698a03d4229c74828406 | [
"MIT"
] | null | null | null | fn_portal/filters/common_filters.py | AdamCottrill/FishNetPortal | 4e58e05f52346ac1ab46698a03d4229c74828406 | [
"MIT"
] | null | null | null | from django.contrib.auth import get_user_model
from django.contrib.gis.geos import GEOSGeometry
from django.db import connection
import django_filters
from common.models import Species
User = get_user_model()
def point_to_polygon(pt, radius_m):
"""a helper function to connect directly to postgis trasform, buffe... | 30.68 | 87 | 0.651239 |
a5a99ea2013bde48f0f78dc24999f67bb5201719 | 1,187 | py | Python | setup.py | abondar/aiohttp-apispec | afcd271c0278d1696bb0d36e6ded8e949ac22bd0 | [
"MIT"
] | null | null | null | setup.py | abondar/aiohttp-apispec | afcd271c0278d1696bb0d36e6ded8e949ac22bd0 | [
"MIT"
] | null | null | null | setup.py | abondar/aiohttp-apispec | afcd271c0278d1696bb0d36e6ded8e949ac22bd0 | [
"MIT"
] | null | null | null | from setuptools import find_packages, setup
def read(file_name):
with open(file_name, encoding="utf-8") as fp:
content = fp.read()
return content
setup(
name='aiohttp-apispec',
version='2.2.0',
description='Build and document REST APIs with aiohttp and apispec',
long_description=read... | 32.081081 | 72 | 0.661331 |
b5753b87e6d0226a7ea00577208eefc3b4b87c78 | 137 | py | Python | mockups/bbb.py | IBM/pddl-in-python | 57974282b0e272e7fa8f8b2a7c64c72a56e1c0bb | [
"MIT"
] | 13 | 2021-08-13T13:25:15.000Z | 2022-02-16T03:59:07.000Z | mockups/bbb.py | IBM/pddl-in-python | 57974282b0e272e7fa8f8b2a7c64c72a56e1c0bb | [
"MIT"
] | 5 | 2022-02-17T02:13:33.000Z | 2022-02-18T21:58:26.000Z | mockups/bbb.py | IBM/pddl-in-python | 57974282b0e272e7fa8f8b2a7c64c72a56e1c0bb | [
"MIT"
] | 1 | 2021-08-21T04:08:59.000Z | 2021-08-21T04:08:59.000Z |
def aaa(x):
pass
print(aaa.__name__)
print(aaa.__dict__)
print(vars(aaa))
import inspect
print(inspect.signature(aaa).parameters)
| 12.454545 | 40 | 0.744526 |
fa56817aa791d0b81c0329167b0c562b4b5c9d31 | 2,010 | py | Python | setup.py | emmanuelmathot/titiler | faf1e0e108841d0ac23805d6b2baacfe42cd842f | [
"MIT"
] | null | null | null | setup.py | emmanuelmathot/titiler | faf1e0e108841d0ac23805d6b2baacfe42cd842f | [
"MIT"
] | null | null | null | setup.py | emmanuelmathot/titiler | faf1e0e108841d0ac23805d6b2baacfe42cd842f | [
"MIT"
] | null | null | null | """Setup titiler."""
from setuptools import find_packages, setup
with open("README.md") as f:
long_description = f.read()
inst_reqs = [
# There is a breaking change in starlette 0.14 which is not compatible with fastapi 0.61
# Fastapi requires 0.13.6 but brotli-asgi ask for >=0.13.4 which results in star... | 32.419355 | 110 | 0.645274 |
a99a51f77e0def6f1cb4d45497783ad4959360e7 | 4,723 | py | Python | cds_ils/migrator/series/xml_series_loader.py | zzacharo/cds-ils | 6816c348e209607b97583acc40fb37dea0c62418 | [
"MIT"
] | 6 | 2020-09-18T00:13:38.000Z | 2021-11-14T17:12:19.000Z | cds_ils/migrator/series/xml_series_loader.py | zzacharo/cds-ils | 6816c348e209607b97583acc40fb37dea0c62418 | [
"MIT"
] | 321 | 2020-08-28T15:42:25.000Z | 2022-03-14T15:11:50.000Z | cds_ils/migrator/series/xml_series_loader.py | zzacharo/cds-ils | 6816c348e209607b97583acc40fb37dea0c62418 | [
"MIT"
] | 8 | 2019-07-10T07:02:08.000Z | 2020-08-10T14:07:25.000Z | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2021 CERN.
#
# cds-migrator-kit is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""CDS Migrator Records loader."""
import logging
import uuid
import click
from ... | 36.053435 | 79 | 0.594749 |
13bf8579ab6cf490690288297262357472961d29 | 308 | py | Python | krakenapi/api/migrations/0002_remove_rec_type.py | Keril-png/kraken-test | 2cf01c59511687a4d347ff1a1dcf530c288e6c35 | [
"MIT"
] | null | null | null | krakenapi/api/migrations/0002_remove_rec_type.py | Keril-png/kraken-test | 2cf01c59511687a4d347ff1a1dcf530c288e6c35 | [
"MIT"
] | null | null | null | krakenapi/api/migrations/0002_remove_rec_type.py | Keril-png/kraken-test | 2cf01c59511687a4d347ff1a1dcf530c288e6c35 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.9 on 2021-12-01 14:38
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('api', '0001_initial'),
]
operations = [
migrations.RemoveField(
model_name='rec',
name='type',
),
]
| 17.111111 | 47 | 0.564935 |
7a9a325e4f25e66e5cfd9397a8f2dec2a9fd11a4 | 175 | py | Python | DeepArray/__init__.py | nhamilto/DeepArray | 4acfeb215692a7835b69e3ac6dd905c70d3448d3 | [
"Apache-2.0"
] | null | null | null | DeepArray/__init__.py | nhamilto/DeepArray | 4acfeb215692a7835b69e3ac6dd905c70d3448d3 | [
"Apache-2.0"
] | null | null | null | DeepArray/__init__.py | nhamilto/DeepArray | 4acfeb215692a7835b69e3ac6dd905c70d3448d3 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""Top-level package for DeepArray repository."""
__author__ = """Nicholas Hamilton"""
__email__ = 'nicholas.hamilton@nrel.gov'
__version__ = '0.1.0'
| 25 | 49 | 0.68 |
32c13fe73ff14e735681b878102fffcc93a9547a | 17,886 | py | Python | setup.py | madhukarkumarpuresoftware/PyAV | 7adb8063267aa3dee859c419905e651c8e67d007 | [
"BSD-3-Clause"
] | 1 | 2019-07-19T19:30:56.000Z | 2019-07-19T19:30:56.000Z | setup.py | madhukarkumarpuresoftware/PyAV | 7adb8063267aa3dee859c419905e651c8e67d007 | [
"BSD-3-Clause"
] | null | null | null | setup.py | madhukarkumarpuresoftware/PyAV | 7adb8063267aa3dee859c419905e651c8e67d007 | [
"BSD-3-Clause"
] | 1 | 2022-02-11T11:16:22.000Z | 2022-02-11T11:16:22.000Z | from __future__ import print_function
from distutils.ccompiler import new_compiler as _new_compiler
from distutils.command.clean import clean, log
from distutils.core import Command
from distutils.dir_util import remove_tree
from distutils.errors import DistutilsExecError
from distutils.msvccompiler import MSVCCompile... | 32.818349 | 124 | 0.623504 |
98b91480748b2f1f4465579da05f6d452d918c4f | 900 | py | Python | onlinecourse/admin.py | rabih96/final_template | 692c1b967bd089c6f265f9f22db2f8f2ed72f12b | [
"Apache-2.0"
] | null | null | null | onlinecourse/admin.py | rabih96/final_template | 692c1b967bd089c6f265f9f22db2f8f2ed72f12b | [
"Apache-2.0"
] | null | null | null | onlinecourse/admin.py | rabih96/final_template | 692c1b967bd089c6f265f9f22db2f8f2ed72f12b | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
# <HINT> Import any new Models here
from .models import Course, Lesson, Instructor, Learner, Question, Choice
# <HINT> Register QuestionInline and ChoiceInline classes here
class QuestionInline:
model = Question
class ChoiceInline:
model = Choice
class LessonInline(admin.Sta... | 23.684211 | 73 | 0.748889 |
4e6c65955e54db8ded2f992d561316ebd0f635dc | 5,408 | py | Python | saleor/shipping/models.py | Iahack/saleor | 4e1a0a81812c5914c38c7382506479f8d8522b55 | [
"BSD-3-Clause"
] | 1 | 2021-02-09T08:41:26.000Z | 2021-02-09T08:41:26.000Z | saleor/shipping/models.py | Iahack/saleor | 4e1a0a81812c5914c38c7382506479f8d8522b55 | [
"BSD-3-Clause"
] | 7 | 2020-03-24T16:50:06.000Z | 2021-11-16T16:06:34.000Z | saleor/shipping/models.py | Iahack/saleor | 4e1a0a81812c5914c38c7382506479f8d8522b55 | [
"BSD-3-Clause"
] | 1 | 2019-04-15T10:26:00.000Z | 2019-04-15T10:26:00.000Z | from django.conf import settings
from django.db import models
from django.utils.safestring import mark_safe
from django.utils.translation import pgettext_lazy
from django_countries.fields import CountryField
from django_measurement.models import MeasurementField
from django_prices.models import MoneyField
from measurem... | 38.906475 | 78 | 0.700444 |
d3d2be6fd798f991808d0d96d497bb99882e7baa | 6,565 | py | Python | monitor/core/taps/bgpstreamlive.py | DamionWaltermeyer/artemis | 670d3c5d21629b1c6ab47b09e56178efe5551810 | [
"TCL",
"BSD-3-Clause",
"PostgreSQL"
] | null | null | null | monitor/core/taps/bgpstreamlive.py | DamionWaltermeyer/artemis | 670d3c5d21629b1c6ab47b09e56178efe5551810 | [
"TCL",
"BSD-3-Clause",
"PostgreSQL"
] | null | null | null | monitor/core/taps/bgpstreamlive.py | DamionWaltermeyer/artemis | 670d3c5d21629b1c6ab47b09e56178efe5551810 | [
"TCL",
"BSD-3-Clause",
"PostgreSQL"
] | null | null | null | import argparse
import os
import time
import _pybgpstream
import redis
from kombu import Connection
from kombu import Exchange
from kombu import Producer
from netaddr import IPAddress
from netaddr import IPNetwork
from utils import get_logger
from utils import key_generator
from utils import load_json
from utils impor... | 32.98995 | 85 | 0.486519 |
ac1308eb4507cfe6d4e4ef4ab96a3d2fce8e8535 | 632 | py | Python | step5.py | rezabojnordi/learning-image-processing | b0abb4005428af40dda3958561b7a78cfc6bafa6 | [
"MIT"
] | null | null | null | step5.py | rezabojnordi/learning-image-processing | b0abb4005428af40dda3958561b7a78cfc6bafa6 | [
"MIT"
] | null | null | null | step5.py | rezabojnordi/learning-image-processing | b0abb4005428af40dda3958561b7a78cfc6bafa6 | [
"MIT"
] | null | null | null | import cv2
import numpy as np
from matplotlib import pyplot as plt
cap = cv2.VideoCapture(1) # number 0 for one camera
#fourcc = cv2.VideoWriter_fourcc(*'XVID')
#out = cv2.VideoWriter('output.avi',fourcc,24.0,(640,480)) #params 3 = fram rate speed fram for save
# GRAY SCALE FOR ALL PIC
while(True): #video is pics
... | 30.095238 | 101 | 0.674051 |
66702bd856b45b7172a2a4fe0ad5425ca302a6bf | 5,202 | py | Python | test/functional/wallet_hd.py | bitcoin-money/bitcoinmoney | d208756366292fa7ab16b8f4b9f2dff9b8567bee | [
"MIT"
] | null | null | null | test/functional/wallet_hd.py | bitcoin-money/bitcoinmoney | d208756366292fa7ab16b8f4b9f2dff9b8567bee | [
"MIT"
] | null | null | null | test/functional/wallet_hd.py | bitcoin-money/bitcoinmoney | d208756366292fa7ab16b8f4b9f2dff9b8567bee | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2016-2017 The Bitcoin Money developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test Hierarchical Deterministic wallet function."""
from test_framework.test_framework import Bitcoin... | 42.292683 | 113 | 0.646482 |
fa4c6bbb6b7eea9431d01b57f545f3eb10ef280c | 2,344 | py | Python | reports/graphs/tummytime_duration.py | Gitoffomalawn/babybuddy | 3fc147c2f16167858284e2bbec657b1756157fd3 | [
"BSD-2-Clause"
] | 922 | 2017-10-26T13:15:40.000Z | 2020-02-05T19:06:13.000Z | reports/graphs/tummytime_duration.py | Gitoffomalawn/babybuddy | 3fc147c2f16167858284e2bbec657b1756157fd3 | [
"BSD-2-Clause"
] | 109 | 2017-10-26T14:00:30.000Z | 2020-02-05T23:37:11.000Z | reports/graphs/tummytime_duration.py | Gitoffomalawn/babybuddy | 3fc147c2f16167858284e2bbec657b1756157fd3 | [
"BSD-2-Clause"
] | 87 | 2017-10-26T13:15:54.000Z | 2020-01-25T12:49:46.000Z | # -*- coding: utf-8 -*-
from django.db.models import Count, Sum
from django.db.models.functions import TruncDate
from django.utils.translation import gettext as _
import plotly.offline as plotly
import plotly.graph_objs as go
from core.utils import duration_parts
from reports import utils
def tummytime_duration(in... | 31.675676 | 78 | 0.643345 |
57980073f661453469d3bb550004168d30fb58a2 | 1,865 | py | Python | app/core/urls.py | rozumalex/django-fastapi | 4052e5dcbf1faef3b992b21a61567764762cc44f | [
"BSD-3-Clause"
] | null | null | null | app/core/urls.py | rozumalex/django-fastapi | 4052e5dcbf1faef3b992b21a61567764762cc44f | [
"BSD-3-Clause"
] | null | null | null | app/core/urls.py | rozumalex/django-fastapi | 4052e5dcbf1faef3b992b21a61567764762cc44f | [
"BSD-3-Clause"
] | null | null | null | """URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.2/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-based views
... | 29.603175 | 77 | 0.702413 |
d1623b52bd52f74a2df4fa2c32039b84589f61f3 | 35,375 | py | Python | tests/engine/cloud/test_cloud_task_runner.py | concreted/prefect | dd732f5990ee2b0f3d816adb285168fd63b239e4 | [
"Apache-2.0"
] | 2 | 2021-10-07T19:58:34.000Z | 2021-11-09T10:46:58.000Z | tests/engine/cloud/test_cloud_task_runner.py | concreted/prefect | dd732f5990ee2b0f3d816adb285168fd63b239e4 | [
"Apache-2.0"
] | 7 | 2021-12-18T09:07:39.000Z | 2022-03-26T08:06:00.000Z | tests/engine/cloud/test_cloud_task_runner.py | concreted/prefect | dd732f5990ee2b0f3d816adb285168fd63b239e4 | [
"Apache-2.0"
] | null | null | null | import datetime
import json
from unittest.mock import MagicMock
import pendulum
import pytest
from dask.base import tokenize
import prefect
from prefect.client import Client
from prefect.core import Edge, Task
from prefect.engine.cache_validators import all_inputs, duration_only
from prefect.engine.cloud import Cloud... | 33.916587 | 120 | 0.667053 |
d4726fafed79182e96d98417109a90a805b87328 | 1,043 | py | Python | app/core/migrations/0004_recipe.py | Mafia7902/recipe-app-api | b43e9d1f9ae733c2623b82bfd4be3cb95dc792e8 | [
"MIT"
] | null | null | null | app/core/migrations/0004_recipe.py | Mafia7902/recipe-app-api | b43e9d1f9ae733c2623b82bfd4be3cb95dc792e8 | [
"MIT"
] | null | null | null | app/core/migrations/0004_recipe.py | Mafia7902/recipe-app-api | b43e9d1f9ae733c2623b82bfd4be3cb95dc792e8 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.15 on 2022-02-09 07:57
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('core', '0003_ingredient'),
]
operations = [
migrations.CreateModel(
... | 35.965517 | 118 | 0.604027 |
4223e13de3c7b16b99ec3f9dc57cf36ce9232216 | 4,969 | py | Python | configs/restorers/basicvsr/basic_reds_v2_gpu23.py | ACALJJ32/MMEditing_learning | d3e45133c4c6d42e7c88904ac1925eb51ae1a945 | [
"Apache-2.0"
] | null | null | null | configs/restorers/basicvsr/basic_reds_v2_gpu23.py | ACALJJ32/MMEditing_learning | d3e45133c4c6d42e7c88904ac1925eb51ae1a945 | [
"Apache-2.0"
] | null | null | null | configs/restorers/basicvsr/basic_reds_v2_gpu23.py | ACALJJ32/MMEditing_learning | d3e45133c4c6d42e7c88904ac1925eb51ae1a945 | [
"Apache-2.0"
] | null | null | null | exp_name = 'basicvsr_reds4_v2'
# model settings
model = dict(
type='BasicVSRV2',
generator=dict(
type='BasicVSRGaussModulationV2Temp',
mid_channels=64,
num_blocks=30,
keyframe_stride=1,
padding=2,
spynet_pretrained='https://download.openmmlab.com/mmediting/restor... | 31.251572 | 99 | 0.638559 |
8b213c594810479ae3b34af336819e502ff54ff8 | 330 | py | Python | xevo/optimizers/__init__.py | psorus/xevo | 49cf9f27dea26135d442e393248e47daf2d99f8b | [
"MIT"
] | null | null | null | xevo/optimizers/__init__.py | psorus/xevo | 49cf9f27dea26135d442e393248e47daf2d99f8b | [
"MIT"
] | null | null | null | xevo/optimizers/__init__.py | psorus/xevo | 49cf9f27dea26135d442e393248e47daf2d99f8b | [
"MIT"
] | null | null | null | from xevo.crossevo import crossevo
from xevo.optimizers.morthoevo import morthoevo
from xevo.optimizers.orthoevo import orthoevo
from xevo.optimizers.trajmuteplus import trajmuteplus
from xevo.optimizers.trajmute import trajmute
from xevo.optimizers.trivmute import trivmute
from xevo.optimizers.trivmutetraj import tri... | 36.666667 | 53 | 0.872727 |
acc84fb5bd19953d1feccafbbce135b008c423b4 | 5,906 | py | Python | sktime/forecasting/base/adapters/_pmdarima.py | bilal-196/sktime | 87e92e51f9c4cd399d9438c5c06e1364ec409134 | [
"BSD-3-Clause"
] | null | null | null | sktime/forecasting/base/adapters/_pmdarima.py | bilal-196/sktime | 87e92e51f9c4cd399d9438c5c06e1364ec409134 | [
"BSD-3-Clause"
] | null | null | null | sktime/forecasting/base/adapters/_pmdarima.py | bilal-196/sktime | 87e92e51f9c4cd399d9438c5c06e1364ec409134 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3 -u
# -*- coding: utf-8 -*-
# copyright: sktime developers, BSD-3-Clause License (see LICENSE file)
__author__ = ["Markus Löning", "Hongyi Yang"]
__all__ = ["_PmdArimaAdapter"]
import pandas as pd
from sktime.forecasting.base._base import DEFAULT_ALPHA
from sktime.forecasting.base import BaseFo... | 34.538012 | 86 | 0.613613 |
5b3d5321202cdd7ad7f9ad918bd5070a6c358179 | 9,545 | py | Python | relancer-exp/original_notebooks/jenny18_honey-bee-annotated-images/what-kind-of-bee-am-i.py | Chenguang-Zhu/relancer | bf1a175b77b7da4cff12fbc5de17dd55246d264d | [
"Apache-2.0"
] | 1 | 2022-03-05T22:27:49.000Z | 2022-03-05T22:27:49.000Z | relancer-exp/original_notebooks/jenny18_honey-bee-annotated-images/what-kind-of-bee-am-i.py | Chenguang-Zhu/relancer | bf1a175b77b7da4cff12fbc5de17dd55246d264d | [
"Apache-2.0"
] | null | null | null | relancer-exp/original_notebooks/jenny18_honey-bee-annotated-images/what-kind-of-bee-am-i.py | Chenguang-Zhu/relancer | bf1a175b77b7da4cff12fbc5de17dd55246d264d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# # 1. Kernel objectives
#
# This kernel is created for 2 reasons:
#
# 1. Train CNN to recognize subspecies of Bee
#
# 2. Feed <b>my photo</b> to trained CNN and determine what subspecies of Bee I actually am :)
#
# In[ ]:
############## Necessary imports #################
... | 33.847518 | 477 | 0.745102 |
6874ed909ebf44f65b03cef54a0bad1dadf79810 | 822 | py | Python | setup.py | hh-h/tox-docker | d997c686e2960e297860473749d3d6b54ccb7ffb | [
"BSD-3-Clause"
] | null | null | null | setup.py | hh-h/tox-docker | d997c686e2960e297860473749d3d6b54ccb7ffb | [
"BSD-3-Clause"
] | null | null | null | setup.py | hh-h/tox-docker | d997c686e2960e297860473749d3d6b54ccb7ffb | [
"BSD-3-Clause"
] | null | null | null | """
A plugin for tox_ which runs one or more Docker_ containers during the test
run.
See full documentation in the README_.
.. _tox: https://tox.readthedocs.io/en/latest/
.. _Docker: https://www.docker.com/
.. _README: https://github.com/tox-dev/tox-docker/blob/master/README.md
"""
from setuptools import setup
setu... | 27.4 | 75 | 0.671533 |
ffef35a85822bc85679104237dfdc18589dccb22 | 9,550 | py | Python | kubernetes/client/models/v1_object_reference.py | jashandeep-sohi/kubernetes-python | e057f273069de445a2d5a250ac5fe37d79671f3b | [
"Apache-2.0"
] | 1 | 2020-05-08T12:41:04.000Z | 2020-05-08T12:41:04.000Z | kubernetes/client/models/v1_object_reference.py | jashandeep-sohi/kubernetes-python | e057f273069de445a2d5a250ac5fe37d79671f3b | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/v1_object_reference.py | jashandeep-sohi/kubernetes-python | e057f273069de445a2d5a250ac5fe37d79671f3b | [
"Apache-2.0"
] | 2 | 2021-07-09T08:49:05.000Z | 2021-08-03T18:08:36.000Z | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.10.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re... | 32.372881 | 582 | 0.615393 |
5396f105dd51cad639f53682c311d0a8df376a91 | 1,064 | py | Python | src/sparseml/pytorch/utils/__init__.py | kevinaer/sparseml | 067bb3e1e9ea35930eb7a105eac4864f9145678a | [
"Apache-2.0"
] | 2 | 2021-07-04T07:29:48.000Z | 2021-08-17T05:59:40.000Z | src/sparseml/pytorch/utils/__init__.py | kevinaer/sparseml | 067bb3e1e9ea35930eb7a105eac4864f9145678a | [
"Apache-2.0"
] | null | null | null | src/sparseml/pytorch/utils/__init__.py | kevinaer/sparseml | 067bb3e1e9ea35930eb7a105eac4864f9145678a | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021 - present / Neuralmagic, Inc. 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 b... | 31.294118 | 86 | 0.761278 |
278b9f4d787fca8ce986ecf9b5d10b1c88e5fb6a | 1,118 | py | Python | tests/test_sources.py | MugeraH/The-Daily-Planet | 4473f51e9a48dede6799c4970e91702bcb588f3a | [
"MIT"
] | null | null | null | tests/test_sources.py | MugeraH/The-Daily-Planet | 4473f51e9a48dede6799c4970e91702bcb588f3a | [
"MIT"
] | null | null | null | tests/test_sources.py | MugeraH/The-Daily-Planet | 4473f51e9a48dede6799c4970e91702bcb588f3a | [
"MIT"
] | null | null | null | import unittest
from app.models import Source
class SourceTest(unittest.TestCase):
"""
Test class to test beahviour of Source class
"""
def setUp(self):
"""
Set up method that will run before every test
"""
self.new_source = Source(
'abc-news',
'A... | 29.421053 | 93 | 0.600179 |
4d1f147ee00c9dcf33a01e2e6404c37691f36916 | 2,589 | py | Python | python/ParseAndSerializeErrorprone.py | GunpreetAhuja/StaticBugCheckers | 7d0e05afa28682c11a54ea022fd6bfabd64c5dc8 | [
"MIT"
] | 12 | 2018-09-06T08:04:06.000Z | 2021-12-14T02:56:02.000Z | python/ParseAndSerializeErrorprone.py | GunpreetAhuja/StaticBugCheckers | 7d0e05afa28682c11a54ea022fd6bfabd64c5dc8 | [
"MIT"
] | 1 | 2018-11-06T20:37:33.000Z | 2018-11-14T08:29:35.000Z | python/ParseAndSerializeErrorprone.py | GunpreetAhuja/StaticBugCheckers | 7d0e05afa28682c11a54ea022fd6bfabd64c5dc8 | [
"MIT"
] | 3 | 2018-11-11T22:15:07.000Z | 2020-03-29T04:08:06.000Z | '''
Created on Nov. 23, 2017
@author Andrew Habib
'''
import json
import os
import re
import sys
from Util import DataReader, ErrorproneMsg, CustomEncoder, \
get_cls_name_from_file_path, NO_WARNING
'''
Currently, the errorprone output files may contain
analysis results of more than one .java file... | 29.089888 | 103 | 0.573581 |
8fa73a5eaf29b3583ded8d8b02cfe54a709d805a | 22,170 | py | Python | newsplease/__main__.py | Ratsri17/news-please2 | 7a4ba2ee2b48309f5a0b65cb4bbb793199139971 | [
"Apache-2.0"
] | 1 | 2018-09-25T22:06:43.000Z | 2018-09-25T22:06:43.000Z | newsplease/__main__.py | Ratsri17/news-please2 | 7a4ba2ee2b48309f5a0b65cb4bbb793199139971 | [
"Apache-2.0"
] | 1 | 2019-02-28T07:09:43.000Z | 2019-02-28T07:09:43.000Z | newsplease/__main__.py | Ratsri17/news-please2 | 7a4ba2ee2b48309f5a0b65cb4bbb793199139971 | [
"Apache-2.0"
] | 1 | 2018-10-08T16:09:58.000Z | 2018-10-08T16:09:58.000Z | import logging
import shutil
import signal
import sys
import threading
import time
from distutils.dir_util import copy_tree
from subprocess import Popen
import os
import plac
import pymysql
from elasticsearch import Elasticsearch
from scrapy.utils.log import configure_logging
cur_path = os.path.dirname(os.path.realpa... | 34.0553 | 108 | 0.571673 |
c0b0a469d71a19eac96e0a7b750a4fe44a89fc46 | 5,614 | py | Python | lmnet/lmnet/quantizations/binary.py | toohsk/blueoil | 596922caa939db9c5ecbac3286fbf6f703865ee6 | [
"Apache-2.0"
] | 1 | 2019-10-09T04:41:02.000Z | 2019-10-09T04:41:02.000Z | lmnet/lmnet/quantizations/binary.py | toohsk/blueoil | 596922caa939db9c5ecbac3286fbf6f703865ee6 | [
"Apache-2.0"
] | 1 | 2018-11-21T07:06:17.000Z | 2018-11-21T07:06:17.000Z | lmnet/lmnet/quantizations/binary.py | toohsk/blueoil | 596922caa939db9c5ecbac3286fbf6f703865ee6 | [
"Apache-2.0"
] | 2 | 2019-02-08T10:03:34.000Z | 2019-03-20T06:25:55.000Z | # -*- coding: utf-8 -*-
# Copyright 2018 The Blueoil Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unles... | 35.987179 | 149 | 0.605451 |
494ba965bd53fda7b80f2e4900aae8a2a9829dec | 4,940 | py | Python | ActivityRecognition/cnn_trainer_HAR_1layer.py | danathughes/DDL_CNN_Sept26 | 94e5e758b8efa4f50da365a8d09dd5f2ea67ca4c | [
"MIT"
] | 2 | 2017-07-13T16:22:09.000Z | 2018-08-06T13:41:38.000Z | ActivityRecognition/cnn_trainer_HAR_1layer.py | danathughes/DDL_CNN_Sept26 | 94e5e758b8efa4f50da365a8d09dd5f2ea67ca4c | [
"MIT"
] | null | null | null | ActivityRecognition/cnn_trainer_HAR_1layer.py | danathughes/DDL_CNN_Sept26 | 94e5e758b8efa4f50da365a8d09dd5f2ea67ca4c | [
"MIT"
] | null | null | null | ## cnn_trainer_HAR_1layer.py
##
## This script trains a CNN to perform classification on single chest sensor data.
## A single CNN layer is used, followed by a fully connected layer
import tensorflow as tf
import numpy as np
from datasets import SingleChest
from models.CNN import *
import batch_generator
import rand... | 36.058394 | 213 | 0.691498 |
519c03f6e1f68611639a45fd2f7d414c62d20fb0 | 3,200 | py | Python | objifier/resnet/resnet.py | 1chimaruGin/Oject_classifier | d27ca8f47d2d0af107582c25a0756dda15361c2e | [
"Apache-2.0"
] | 4 | 2020-08-19T14:50:29.000Z | 2021-06-03T05:22:12.000Z | objifier/resnet/resnet.py | 1chimaruGin/Oject_classifier | d27ca8f47d2d0af107582c25a0756dda15361c2e | [
"Apache-2.0"
] | null | null | null | objifier/resnet/resnet.py | 1chimaruGin/Oject_classifier | d27ca8f47d2d0af107582c25a0756dda15361c2e | [
"Apache-2.0"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
class block(nn.Module):
def __init__(self, in_channels, out_channels, identity_downsample=None, stride=1):
super(block, self).__init__()
self.expansion = 4
self.conv1 = nn.Conv2d(in_channels, out_channels, kernel_size=1, s... | 36.781609 | 121 | 0.64875 |
6bfbfd7cf267f025ad165c688213cfb8afc75887 | 3,406 | py | Python | django/contrib/sites/tests.py | webjunkie/django | 5dbca13f3baa2e1bafd77e84a80ad6d8a074712e | [
"BSD-3-Clause"
] | 285 | 2019-12-23T09:50:21.000Z | 2021-12-08T09:08:49.000Z | django/contrib/sites/tests.py | webjunkie/django | 5dbca13f3baa2e1bafd77e84a80ad6d8a074712e | [
"BSD-3-Clause"
] | 18 | 2015-01-14T07:51:48.000Z | 2021-10-14T01:19:26.000Z | django/contrib/sites/tests.py | webjunkie/django | 5dbca13f3baa2e1bafd77e84a80ad6d8a074712e | [
"BSD-3-Clause"
] | 70 | 2015-01-01T00:33:24.000Z | 2021-12-10T03:43:07.000Z | from __future__ import unicode_literals
from django.conf import settings
from django.contrib.sites.models import Site, RequestSite, get_current_site
from django.core.exceptions import ObjectDoesNotExist, ValidationError
from django.http import HttpRequest
from django.test import TestCase
from django.test.utils import ... | 40.547619 | 82 | 0.687904 |
d233dc90772a820ff19bbb6004a7a204751547a0 | 7,136 | py | Python | assets/data_and_scripts/PythonLibraries/pandas/Lesson1.py | GTPB/PPB18 | fe19c9b8c6b91dce22c554bc1fa48c97834f8a87 | [
"CC-BY-4.0"
] | 4 | 2020-01-14T18:23:24.000Z | 2021-07-30T10:15:10.000Z | assets/data_and_scripts/PythonLibraries/pandas/Lesson1.py | GTPB/PPB18 | fe19c9b8c6b91dce22c554bc1fa48c97834f8a87 | [
"CC-BY-4.0"
] | null | null | null | assets/data_and_scripts/PythonLibraries/pandas/Lesson1.py | GTPB/PPB18 | fe19c9b8c6b91dce22c554bc1fa48c97834f8a87 | [
"CC-BY-4.0"
] | 1 | 2021-07-30T10:11:35.000Z | 2021-07-30T10:11:35.000Z | '''
Create Data - We begin by creating our own data set for analysis. This prevents the end user reading this tutorial from having to download any files to replicate the results below. We will export this data set to a text file so that you can get some experience pulling data from a text file.
Get Data - We will learn... | 34.980392 | 379 | 0.753924 |
a09238c343d34dfcf2179dab003e9b2415a2fc67 | 1,320 | py | Python | Erik-solutions/day7/day.py | NTI-Gymnasieingenjor/AdventOfCode2020 | ea74c06a2b220e227618ed841c4eb853f08d5c84 | [
"MIT"
] | 1 | 2020-12-08T12:33:36.000Z | 2020-12-08T12:33:36.000Z | Erik-solutions/day7/day.py | NTI-Gymnasieingenjor/AdventOfCode2020 | ea74c06a2b220e227618ed841c4eb853f08d5c84 | [
"MIT"
] | null | null | null | Erik-solutions/day7/day.py | NTI-Gymnasieingenjor/AdventOfCode2020 | ea74c06a2b220e227618ed841c4eb853f08d5c84 | [
"MIT"
] | 1 | 2021-01-20T15:08:12.000Z | 2021-01-20T15:08:12.000Z | inputDoc = open("input.txt")
bagsList = {e[0].strip(): e[1].rstrip(".").split(", ")
for e in [x.replace("bags", "bag").split("contain") for x in inputDoc.read().split("\n")]}
inputDoc.close()
# PART 1
print("\nPART 1")
goldBags = 0
for item in bagsList:
values = bagsList[item]
found = False
if... | 26.938776 | 102 | 0.543182 |
babaf934feffe4851c2cc451bb837d45a057ea54 | 11,894 | py | Python | fourierflow/trainers/jax_callback_hook.py | alasdairtran/fourierflow | 7fb610bd15b41288a1639ec7b4ec615c4d4e5c2b | [
"MIT"
] | 42 | 2021-11-24T14:29:24.000Z | 2022-03-14T07:20:30.000Z | fourierflow/trainers/jax_callback_hook.py | alasdairtran/fourierflow | 7fb610bd15b41288a1639ec7b4ec615c4d4e5c2b | [
"MIT"
] | 1 | 2021-12-17T03:27:40.000Z | 2021-12-24T12:31:47.000Z | fourierflow/trainers/jax_callback_hook.py | alasdairtran/fourierflow | 7fb610bd15b41288a1639ec7b4ec615c4d4e5c2b | [
"MIT"
] | 4 | 2021-12-03T07:51:34.000Z | 2022-01-24T08:26:35.000Z | # Based on PyTorch Lightning callback implementation.
# Removed dependency on PyTorch and Pytorch Lightning. To be used for JAX.
#
# Copyright The PyTorch Lightning 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 obta... | 41.155709 | 109 | 0.663696 |
5f8d631d1667505eba262da55a13b2d2fb25f564 | 9,159 | py | Python | tests/test_validator.py | Neural-Space/rasa | 7e7e5ec8511df9799f737196070381db7f1528d7 | [
"Apache-2.0"
] | 1 | 2021-04-29T18:21:20.000Z | 2021-04-29T18:21:20.000Z | tests/test_validator.py | Neural-Space/rasa | 7e7e5ec8511df9799f737196070381db7f1528d7 | [
"Apache-2.0"
] | 167 | 2020-09-30T18:30:56.000Z | 2022-03-28T12:22:07.000Z | tests/test_validator.py | Neural-Space/rasa | 7e7e5ec8511df9799f737196070381db7f1528d7 | [
"Apache-2.0"
] | 1 | 2021-04-29T18:28:27.000Z | 2021-04-29T18:28:27.000Z | from typing import Text
import pytest
from rasa.validator import Validator
from rasa.shared.importers.rasa import RasaFileImporter
from rasa.shared.importers.autoconfig import TrainingType
from pathlib import Path
async def test_verify_intents_does_not_fail_on_valid_data(nlu_data_path: Text):
importer = RasaFil... | 35.226923 | 88 | 0.68621 |
342fbf7e7339cabb891d6a6c7e306f5bc61b080e | 4,519 | py | Python | javascript_recipe_bot_audio/audio_backend.py | Amyylam/sentimentscale | c736fd0a2fcfeb84da576bf4bc5b0e6aedc6d6eb | [
"MIT"
] | 2 | 2021-02-24T00:17:01.000Z | 2021-04-02T03:23:10.000Z | javascript_recipe_bot_audio/audio_backend.py | kumar-abhishek/sentimentscale | c736fd0a2fcfeb84da576bf4bc5b0e6aedc6d6eb | [
"MIT"
] | null | null | null | javascript_recipe_bot_audio/audio_backend.py | kumar-abhishek/sentimentscale | c736fd0a2fcfeb84da576bf4bc5b0e6aedc6d6eb | [
"MIT"
] | 2 | 2021-04-02T03:26:35.000Z | 2021-06-01T05:25:57.000Z | from http.server import BaseHTTPRequestHandler, HTTPServer
from urllib import parse
import pandas as pd
import re
import json
import os
class CorpusWebServer(BaseHTTPRequestHandler):
def do_GET(self):
self.send_response(200)
print(self.path)
query = parse.urlsplit(self.path).query
q... | 39.99115 | 150 | 0.611861 |
91d0acbd75355c913f1176c429740bffec5e75bb | 2,911 | py | Python | Builds/T PC Windows Version/renpy/curry.py | JManAn/Ingener-a-de-Software-TF | 4eb162f0a2b4d19d0a9e96f9bc0baf17e8cedbfe | [
"MIT"
] | 1 | 2020-07-23T18:33:01.000Z | 2020-07-23T18:33:01.000Z | Builds/T PC Windows Version/renpy/curry.py | JManAn/Ingener-a-de-Software-TF | 4eb162f0a2b4d19d0a9e96f9bc0baf17e8cedbfe | [
"MIT"
] | null | null | null | Builds/T PC Windows Version/renpy/curry.py | JManAn/Ingener-a-de-Software-TF | 4eb162f0a2b4d19d0a9e96f9bc0baf17e8cedbfe | [
"MIT"
] | null | null | null | # Copyright 2004-2019 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, m... | 35.072289 | 75 | 0.689797 |
f308a5e074fba95ba4ccfa8fcbb0781422a00a5e | 36,197 | py | Python | sympy/integrals/tests/test_intpoly.py | iamabhishek0/sympy | c461bd1ff9d178d1012b04fd0bf37ee3abb02cdd | [
"BSD-3-Clause"
] | 2 | 2019-02-05T19:20:24.000Z | 2019-04-23T13:24:38.000Z | sympy/integrals/tests/test_intpoly.py | iamabhishek0/sympy | c461bd1ff9d178d1012b04fd0bf37ee3abb02cdd | [
"BSD-3-Clause"
] | 9 | 2021-03-19T03:06:53.000Z | 2022-03-12T00:37:04.000Z | sympy/integrals/tests/test_intpoly.py | iamabhishek0/sympy | c461bd1ff9d178d1012b04fd0bf37ee3abb02cdd | [
"BSD-3-Clause"
] | 1 | 2022-02-22T23:53:22.000Z | 2022-02-22T23:53:22.000Z | from sympy import sqrt, Abs
from sympy.core import S, Rational
from sympy.integrals.intpoly import (decompose, best_origin, distance_to_side,
polytope_integrate, point_sort,
hyperplane_parameters, main_integrate3d,
... | 60.028192 | 105 | 0.484432 |
2d55509b596ee6aa62f215f7973e9aec0edaf917 | 899 | py | Python | researchutils/chainer/iterators/decorable_multithread_iterator.py | keio-ytlab/researchutils | bb3ec467386d43a1e2282ec6d024216ce4dae841 | [
"MIT"
] | 1 | 2018-10-25T12:57:38.000Z | 2018-10-25T12:57:38.000Z | researchutils/chainer/iterators/decorable_multithread_iterator.py | yuishihara/researchutils | bb3ec467386d43a1e2282ec6d024216ce4dae841 | [
"MIT"
] | 28 | 2018-08-25T03:54:30.000Z | 2018-10-14T12:09:47.000Z | researchutils/chainer/iterators/decorable_multithread_iterator.py | yuishihara/researchutils | bb3ec467386d43a1e2282ec6d024216ce4dae841 | [
"MIT"
] | null | null | null | from chainer.iterators.multithread_iterator import MultithreadIterator
from researchutils.chainer.iterators.unmodifiable_decorable_list import UnmodifiableDecorableList
class DecorableMultithreadIterator(MultithreadIterator):
"""
MultithreadIterator which enables to configure dataset's end index
and prepr... | 44.95 | 114 | 0.770857 |
648774f85e9fd77b765a42e389a29d0136e653a8 | 1,896 | py | Python | numpy_MeanVarStd.py | akiselev1/hackerrank-solutions | 53c2a76c71c9b3553c077ccfde5178b27594ae72 | [
"MIT"
] | null | null | null | numpy_MeanVarStd.py | akiselev1/hackerrank-solutions | 53c2a76c71c9b3553c077ccfde5178b27594ae72 | [
"MIT"
] | null | null | null | numpy_MeanVarStd.py | akiselev1/hackerrank-solutions | 53c2a76c71c9b3553c077ccfde5178b27594ae72 | [
"MIT"
] | null | null | null | """
Created by akiselev on 2019-07-22
mean
The mean tool computes the arithmetic mean along the specified axis.
import numpy
my_array = numpy.array([ [1, 2], [3, 4] ])
print numpy.mean(my_array, axis = 0) #Output : [ 2. 3.]
print numpy.mean(my_array, axis = 1) #Output : [ 1.5 3.5]
print numpy.mea... | 28.727273 | 99 | 0.656646 |
79094a47130fbebad4d532fd2b26acc79d338c9c | 1,878 | py | Python | locations/spiders/aldi_uk.py | bealbrown/allhours | f750ee7644246a97bd16879f14115d7845f76b89 | [
"MIT"
] | null | null | null | locations/spiders/aldi_uk.py | bealbrown/allhours | f750ee7644246a97bd16879f14115d7845f76b89 | [
"MIT"
] | null | null | null | locations/spiders/aldi_uk.py | bealbrown/allhours | f750ee7644246a97bd16879f14115d7845f76b89 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import scrapy
import re
import json
from locations.hourstudy import inputoutput
class AldiUKSpider(scrapy.Spider):
name = "aldiuk"
allowed_domains = ['www.aldi.co.uk']
start_urls = (
'https://www.aldi.co.uk/sitemap/store',
)
def parse(self, response):
respo... | 39.125 | 159 | 0.571353 |
76f581817c05535207f13ad746944099c4255d32 | 2,116 | py | Python | tests/python/relay/test_op_qnn_leaky_relu.py | XiaoSong9905/tvm | 48940f697e15d5b50fa1f032003e6c700ae1e423 | [
"Apache-2.0"
] | 4,640 | 2017-08-17T19:22:15.000Z | 2019-11-04T15:29:46.000Z | tests/python/relay/test_op_qnn_leaky_relu.py | XiaoSong9905/tvm | 48940f697e15d5b50fa1f032003e6c700ae1e423 | [
"Apache-2.0"
] | 2,863 | 2017-08-17T19:55:50.000Z | 2019-11-04T17:18:41.000Z | tests/python/relay/test_op_qnn_leaky_relu.py | XiaoSong9905/tvm | 48940f697e15d5b50fa1f032003e6c700ae1e423 | [
"Apache-2.0"
] | 1,352 | 2017-08-17T19:30:38.000Z | 2019-11-04T16:09:29.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.060606 | 100 | 0.706522 |
6ddd3bc83cfce56114304407e7cc1abfbad11db9 | 6,832 | py | Python | model_zoo/plato-xl/infer.py | SunYanCN/PaddleNLP | 31deea6c989f399b4552ee711d9f7d62768d645f | [
"Apache-2.0"
] | null | null | null | model_zoo/plato-xl/infer.py | SunYanCN/PaddleNLP | 31deea6c989f399b4552ee711d9f7d62768d645f | [
"Apache-2.0"
] | null | null | null | model_zoo/plato-xl/infer.py | SunYanCN/PaddleNLP | 31deea6c989f399b4552ee711d9f7d62768d645f | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2022 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... | 35.398964 | 93 | 0.644467 |
df2be0c1b6b551c47c4edc6e936aa75ff65fff90 | 338 | py | Python | venv/Lib/site-packages/gevent/tests/test__issue112.py | asanka9/Quession-Discussion-App-Socket.Io-NLP | 95a49a8afa572dc3908a0bade45e424c3751f191 | [
"Apache-2.0"
] | 6 | 2020-08-04T13:12:42.000Z | 2020-08-16T13:26:19.000Z | venv/Lib/site-packages/gevent/tests/test__issue112.py | asanka9/Quession-Discussion-App-Socket.Io-NLP | 95a49a8afa572dc3908a0bade45e424c3751f191 | [
"Apache-2.0"
] | 9 | 2021-08-14T01:27:36.000Z | 2021-08-24T18:10:18.000Z | venv/Lib/site-packages/gevent/tests/test__issue112.py | asanka9/Quession-Discussion-App-Socket.Io-NLP | 95a49a8afa572dc3908a0bade45e424c3751f191 | [
"Apache-2.0"
] | 4 | 2021-07-13T19:44:06.000Z | 2021-08-13T07:49:35.000Z | import sys
import unittest
import threading
import gevent
import gevent.monkey
gevent.monkey.patch_all()
@unittest.skipUnless(
sys.version_info[0] == 2,
"Only on Python 2"
)
class Test(unittest.TestCase):
def test(self):
self.assertIs(threading._sleep, gevent.sleep)
if __name__ == '__main__':
... | 16.9 | 53 | 0.713018 |
9694151adafc237d2b4e9868b810bd633e944fdd | 498 | py | Python | env/Lib/site-packages/plotly/validators/histogram2d/colorbar/_dtick.py | andresgreen-byte/Laboratorio-1--Inversion-de-Capital | 8a4707301d19c3826c31026c4077930bcd6a8182 | [
"MIT"
] | 11,750 | 2015-10-12T07:03:39.000Z | 2022-03-31T20:43:15.000Z | venv/Lib/site-packages/plotly/validators/histogram2d/colorbar/_dtick.py | wakisalvador/constructed-misdirection | 74779e9ec640a11bc08d5d1967c85ac4fa44ea5e | [
"Unlicense"
] | 2,951 | 2015-10-12T00:41:25.000Z | 2022-03-31T22:19:26.000Z | venv/Lib/site-packages/plotly/validators/histogram2d/colorbar/_dtick.py | wakisalvador/constructed-misdirection | 74779e9ec640a11bc08d5d1967c85ac4fa44ea5e | [
"Unlicense"
] | 2,623 | 2015-10-15T14:40:27.000Z | 2022-03-28T16:05:50.000Z | import _plotly_utils.basevalidators
class DtickValidator(_plotly_utils.basevalidators.AnyValidator):
def __init__(
self, plotly_name="dtick", parent_name="histogram2d.colorbar", **kwargs
):
super(DtickValidator, self).__init__(
plotly_name=plotly_name,
parent_name=paren... | 33.2 | 79 | 0.650602 |
1c86e32c94b5d7d8a96aa98b76e5dab17bb96fee | 2,254 | py | Python | u_json.py | kerbalwzy/kerbalwzypy | e6444dd2efebd1748511cd017d92bbb376f71e99 | [
"MIT"
] | null | null | null | u_json.py | kerbalwzy/kerbalwzypy | e6444dd2efebd1748511cd017d92bbb376f71e99 | [
"MIT"
] | null | null | null | u_json.py | kerbalwzy/kerbalwzypy | e6444dd2efebd1748511cd017d92bbb376f71e99 | [
"MIT"
] | null | null | null | # -*- coding:utf-8 -*-
# @Author: wzy
# @Time: 2021/3/18
# JSON字符串或可被JSON序列化的对象的常用工具函数
import json
import re
from typing import Union
from u_string import hump_2_underline, underline_2_hump
__all__ = ['json_str_key_hump2underline', 'json_str_key_underline2hump', 'json_obj_key_underline2hump',
'json_obj_ke... | 27.156627 | 103 | 0.688554 |
93fe0e5042446b00b11037dabb8b234ceb601809 | 13,210 | py | Python | cloudmersive_virus_api_client/rest.py | Cloudmersive/Cloudmersive.APIClient.Python.Virus | 959abe2e58e1b86b3191f1dc6aa6d7373c13a87f | [
"Apache-2.0"
] | 3 | 2019-05-04T21:08:14.000Z | 2021-06-15T07:08:49.000Z | cloudmersive_virus_api_client/rest.py | Cloudmersive/Cloudmersive.APIClient.Python.Virus | 959abe2e58e1b86b3191f1dc6aa6d7373c13a87f | [
"Apache-2.0"
] | null | null | null | cloudmersive_virus_api_client/rest.py | Cloudmersive/Cloudmersive.APIClient.Python.Virus | 959abe2e58e1b86b3191f1dc6aa6d7373c13a87f | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
virusapi
The Cloudmersive Virus Scan API lets you scan files and content for viruses and identify security issues with content. # noqa: E501
OpenAPI spec version: v1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import... | 40.771605 | 136 | 0.541938 |
974c913b41b8130ad6ea3995ae8692f8efd46ca0 | 40,588 | py | Python | discord/http.py | anurag-7/discord.py | 53b16553e9d423aedb5d551129f3167cdef1f5f5 | [
"MIT"
] | 1 | 2020-06-13T07:36:03.000Z | 2020-06-13T07:36:03.000Z | discord/http.py | anurag-7/discord.py | 53b16553e9d423aedb5d551129f3167cdef1f5f5 | [
"MIT"
] | null | null | null | discord/http.py | anurag-7/discord.py | 53b16553e9d423aedb5d551129f3167cdef1f5f5 | [
"MIT"
] | 1 | 2021-02-19T08:12:33.000Z | 2021-02-19T08:12:33.000Z | # -*- coding: utf-8 -*-
"""
The MIT License (MIT)
Copyright (c) 2015-2020 Rapptz
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 u... | 40.265873 | 162 | 0.614024 |
d8a173271f38b933ee531d397741c6243888be20 | 880 | py | Python | molecool/io/xyz.py | jeremyleung521/molecool | 057550166e1abd8c59bef8ad803d8c900e50ed98 | [
"BSD-3-Clause"
] | null | null | null | molecool/io/xyz.py | jeremyleung521/molecool | 057550166e1abd8c59bef8ad803d8c900e50ed98 | [
"BSD-3-Clause"
] | 4 | 2020-05-15T18:14:48.000Z | 2020-09-17T17:35:42.000Z | molecool/io/xyz.py | jeremyleung521/molecool | 057550166e1abd8c59bef8ad803d8c900e50ed98 | [
"BSD-3-Clause"
] | null | null | null | """
This module is for functions which reads and writes xyz files.
"""
import os
import numpy as np
def open_xyz(file_location):
# Open an xyz file and return symbols and coordinates.
xyz_file = np.genfromtxt(fname=file_location, skip_header=2, dtype='unicode')
symbols = xyz_file[:,0]
coords = (x... | 31.428571 | 100 | 0.610227 |
25e99a94f2a02214aa9a69e139645e431a931ba0 | 9,375 | py | Python | airflow_plugins/operators/db.py | storiesbi/airflow_plugins | 2762a2f1725487dd9605ce11c8e37772adbd5767 | [
"MIT"
] | 15 | 2018-01-19T16:14:23.000Z | 2022-02-09T12:33:34.000Z | airflow_plugins/operators/db.py | storiesbi/airflow_plugins | 2762a2f1725487dd9605ce11c8e37772adbd5767 | [
"MIT"
] | 2 | 2018-10-04T22:14:04.000Z | 2021-03-25T21:46:52.000Z | airflow_plugins/operators/db.py | storiesbi/airflow_plugins | 2762a2f1725487dd9605ce11c8e37772adbd5767 | [
"MIT"
] | 4 | 2018-01-25T06:05:40.000Z | 2019-02-25T14:21:40.000Z | import logging
import re
import psycopg2
import psycopg2.extensions
from airflow.hooks.postgres_hook import PostgresHook as PostgresHookBase
from airflow.operators.postgres_operator import \
PostgresOperator as PostgresOperatorBase
from airflow.utils.decorators import apply_defaults
from airflow_plugins.operators.... | 34.851301 | 79 | 0.562453 |
bf5613a8026df9a583f0ac64715d23ca7ae3ab48 | 3,738 | py | Python | Chapter3/English (UK varieties)/functional_load_uk.py | AndreaCeolin/Functionalism_Contrast_Change | 1557a4c76c253c7db292e503d6bd5cff5cea2d93 | [
"MIT"
] | null | null | null | Chapter3/English (UK varieties)/functional_load_uk.py | AndreaCeolin/Functionalism_Contrast_Change | 1557a4c76c253c7db292e503d6bd5cff5cea2d93 | [
"MIT"
] | null | null | null | Chapter3/English (UK varieties)/functional_load_uk.py | AndreaCeolin/Functionalism_Contrast_Change | 1557a4c76c253c7db292e503d6bd5cff5cea2d93 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''
This script has been used perform functional load calculations on the English (UK) CHILDES data.
author: Andrea Ceolin
date: February 2021
'''
from collections import Counter
import math
'''
Get the token frequencies of the corpus
'''
words_tokens = Counter()
for ... | 29.904 | 96 | 0.688336 |
68567d41954fe095a6e4c8c4dca127444f85d838 | 2,903 | py | Python | src/uoa_poc2_bridge/state_bridge.py | RoboticBase/uoa_poc2_bridge | 844372af7b04cfc3b76763b6eafb7740131d9d50 | [
"Apache-2.0"
] | null | null | null | src/uoa_poc2_bridge/state_bridge.py | RoboticBase/uoa_poc2_bridge | 844372af7b04cfc3b76763b6eafb7740131d9d50 | [
"Apache-2.0"
] | null | null | null | src/uoa_poc2_bridge/state_bridge.py | RoboticBase/uoa_poc2_bridge | 844372af7b04cfc3b76763b6eafb7740131d9d50 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import datetime
import json
from threading import Lock
import pytz
import rospy
from uoa_poc2_msgs.msg import r_state
from uoa_poc2_bridge.mqtt_base import MQTTBase
from uoa_poc2_bridge.logging import getLogger
logger = getLogger(__name__)
class StateBridge(MQTTBase):
def __init__(sel... | 38.197368 | 120 | 0.534964 |
1100b1bc9744ce5f90433a40d1512b231abb1999 | 2,401 | py | Python | googlestyleprecommithooks/__main__.py | starofrainnight/google-style-pre-commit-hooks | 21d5bbec26a4005ca3841c18e165ee7cac54370c | [
"Apache-2.0"
] | null | null | null | googlestyleprecommithooks/__main__.py | starofrainnight/google-style-pre-commit-hooks | 21d5bbec26a4005ca3841c18e165ee7cac54370c | [
"Apache-2.0"
] | null | null | null | googlestyleprecommithooks/__main__.py | starofrainnight/google-style-pre-commit-hooks | 21d5bbec26a4005ca3841c18e165ee7cac54370c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Console script for google-style-pre-commit-hooks."""
import os
import os.path
import click
import fnmatch
import shlex
from subprocess import run
@click.group()
def main():
"""Console script for google-style-pre-commit-hooks."""
pass
@main.command()
@click.... | 27.597701 | 78 | 0.611828 |
1fd6dcc3307517c0a339c1984e5663f66d35cd62 | 5,075 | py | Python | test/functional/multiwallet.py | alwaysdoingstuff/timelinetest | 140232a35a48cfad6599a6d67d46d1345bfa58fc | [
"MIT"
] | 1 | 2018-01-31T20:01:01.000Z | 2018-01-31T20:01:01.000Z | test/functional/multiwallet.py | alwaysdoingstuff/timelinetest | 140232a35a48cfad6599a6d67d46d1345bfa58fc | [
"MIT"
] | 1 | 2018-01-31T20:00:48.000Z | 2018-02-02T18:23:43.000Z | test/functional/multiwallet.py | alwaysdoingstuff/timelinetest | 140232a35a48cfad6599a6d67d46d1345bfa58fc | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2017 The Bitcoin Core developers
# Copyright (c) 2017 The Timeline Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test multiwallet.
Verify that a bitcoind node can load m... | 42.291667 | 142 | 0.661478 |
b5096f75d7021a652c3ea9c09ae064edc15c3302 | 2,676 | py | Python | seleniumbase/fixtures/pages.py | prosky-pmaj/python-framework-for-web-ui-and-api-testing | 6218aca2e5a45f26507ab624724e1f17dca5546f | [
"MIT"
] | null | null | null | seleniumbase/fixtures/pages.py | prosky-pmaj/python-framework-for-web-ui-and-api-testing | 6218aca2e5a45f26507ab624724e1f17dca5546f | [
"MIT"
] | null | null | null | seleniumbase/fixtures/pages.py | prosky-pmaj/python-framework-for-web-ui-and-api-testing | 6218aca2e5a45f26507ab624724e1f17dca5546f | [
"MIT"
] | null | null | null | import ConfigParser
from selenium.webdriver.common.by import By
from seleniumbase import BaseCase
class Pages(BaseCase):
locators_map = {
"ById": By.ID,
"ByName": By.NAME,
"ByClassName": By.CLASS_NAME,
"ByCssSelector": By.CSS_SELECTOR,
"ByLinkText": By.LINK_TEXT,
"B... | 37.166667 | 83 | 0.61136 |
67eb0490b58f7d46495493216010eced72c2c108 | 875 | py | Python | landing_page/urls.py | foo290/My-protfolio-website | 87bd521b14d1d41886edbc8d03612f3cfc69696b | [
"MIT"
] | null | null | null | landing_page/urls.py | foo290/My-protfolio-website | 87bd521b14d1d41886edbc8d03612f3cfc69696b | [
"MIT"
] | null | null | null | landing_page/urls.py | foo290/My-protfolio-website | 87bd521b14d1d41886edbc8d03612f3cfc69696b | [
"MIT"
] | null | null | null | from django.urls import path, include
from . import views
from about_info import views as about_views
urlpatterns = [
path('', views.home, name = 'Home-Landing'),
path(r'about-me/', include('about_info.urls')),
path('admin/', views.admin404, name = 'Admin404'),
path('access-denied/', views.acc... | 28.225806 | 91 | 0.658286 |
86d53deed6f64c47e1290779ccd02ff3ba039b95 | 4,743 | py | Python | Python3/1320.py | rakhi2001/ecom7 | 73790d44605fbd51e8f7e804b9808e364fcfc680 | [
"MIT"
] | 854 | 2018-11-09T08:06:16.000Z | 2022-03-31T06:05:53.000Z | Python3/1320.py | rakhi2001/ecom7 | 73790d44605fbd51e8f7e804b9808e364fcfc680 | [
"MIT"
] | 29 | 2019-06-02T05:02:25.000Z | 2021-11-15T04:09:37.000Z | Python3/1320.py | rakhi2001/ecom7 | 73790d44605fbd51e8f7e804b9808e364fcfc680 | [
"MIT"
] | 347 | 2018-12-23T01:57:37.000Z | 2022-03-12T14:51:21.000Z | __________________________________________________________________________________________________
sample 24 ms submission
class Solution:
def minimumDistance(self, word: str) -> int:
if len(word) == 2: return 0
wset = {"CAKE":3,"HAPPY":6,"NEW":3,"YEAR":7,"BIQPM":6,"LSGQE":6,"YDT":2,"PRDL":3,"TUGR":... | 56.464286 | 529 | 0.552604 |
4b8c78cda77cc3250f4201cac1bbcf45b4d06059 | 17,925 | py | Python | pymeasure/instruments/srs/sr830.py | DF9AS/pymeasure | 5d10d058053bb468f6b34e5bda9b1802a6234809 | [
"MIT"
] | 2 | 2018-08-07T13:01:57.000Z | 2020-10-18T19:13:17.000Z | pymeasure/instruments/srs/sr830.py | DF9AS/pymeasure | 5d10d058053bb468f6b34e5bda9b1802a6234809 | [
"MIT"
] | 2 | 2021-12-16T16:15:47.000Z | 2022-03-27T10:47:13.000Z | pymeasure/instruments/srs/sr830.py | DF9AS/pymeasure | 5d10d058053bb468f6b34e5bda9b1802a6234809 | [
"MIT"
] | null | null | null | #
# This file is part of the PyMeasure package.
#
# Copyright (c) 2013-2021 PyMeasure Developers
#
# 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 limit... | 36.882716 | 83 | 0.603124 |
5bfa004cce48d6e68b0ff519c8036042ab2fb5e5 | 10,442 | py | Python | selfdrive/road_speed_limiter.py | ajouatom/openpilot1 | 7ab8479d4d791adc837e87de566663faf010d0c1 | [
"MIT"
] | null | null | null | selfdrive/road_speed_limiter.py | ajouatom/openpilot1 | 7ab8479d4d791adc837e87de566663faf010d0c1 | [
"MIT"
] | null | null | null | selfdrive/road_speed_limiter.py | ajouatom/openpilot1 | 7ab8479d4d791adc837e87de566663faf010d0c1 | [
"MIT"
] | null | null | null | import json
import os
import select
import threading
import time
import socket
import fcntl
import struct
from threading import Thread
from cereal import messaging
from common.numpy_fast import clip
from common.realtime import sec_since_boot
from common.conversions import Conversions as CV
CAMERA_SPEED_FACTOR = 1.05
... | 27.335079 | 122 | 0.635319 |
be98ae22d7413be7e3a86dcf67283535337d992e | 6,487 | py | Python | torchpruner/model_pruner.py | Ocean-627/torch-model-compression | e317c10a92503f2793d0c4c06bb91ddeb512f4ac | [
"MIT"
] | 86 | 2021-06-21T11:09:49.000Z | 2022-03-21T09:09:26.000Z | torchpruner/model_pruner.py | Ocean-627/torch-model-compression | e317c10a92503f2793d0c4c06bb91ddeb512f4ac | [
"MIT"
] | 7 | 2021-06-26T09:37:37.000Z | 2022-03-09T03:49:11.000Z | torchpruner/model_pruner.py | Ocean-627/torch-model-compression | e317c10a92503f2793d0c4c06bb91ddeb512f4ac | [
"MIT"
] | 17 | 2021-08-18T17:06:44.000Z | 2022-02-28T09:14:38.000Z | # set the location to 0 given the cut_dict and return the context
from torchpruner.model_tools import *
from torchpruner.register import module_pruner_reg
import copy
def merge_cut_dict(cut_dict_list):
new_cut_dict = {}
new_cut_dict["terminal"] = {}
new_cut_dict["iner"] = {}
new_cut_dict["operator"] =... | 32.59799 | 87 | 0.531987 |
4d34ef3ccd4aeb6ca6d40d0ac2f8586b6f6081f2 | 7,465 | py | Python | venv/Lib/site-packages/matplotlib/tests/test_agg.py | EkremBayar/bayar | aad1a32044da671d0b4f11908416044753360b39 | [
"MIT"
] | 603 | 2020-12-23T13:49:32.000Z | 2022-03-31T23:38:03.000Z | venv/Lib/site-packages/matplotlib/tests/test_agg.py | EkremBayar/bayar | aad1a32044da671d0b4f11908416044753360b39 | [
"MIT"
] | 387 | 2020-12-15T14:54:04.000Z | 2022-03-31T07:00:21.000Z | venv/Lib/site-packages/matplotlib/tests/test_agg.py | EkremBayar/bayar | aad1a32044da671d0b4f11908416044753360b39 | [
"MIT"
] | 35 | 2021-03-26T03:12:04.000Z | 2022-03-23T10:15:10.000Z | import io
import numpy as np
from numpy.testing import assert_array_almost_equal
from PIL import Image, TiffTags
import pytest
from matplotlib import (
collections, path, pyplot as plt, transforms as mtransforms, rcParams)
from matplotlib.image import imread
from matplotlib.figure import Figure
from matplotlib.t... | 30.222672 | 78 | 0.590623 |
3dcdd1b58248c0c02e725da2e332bcd3b58c0d17 | 3,851 | py | Python | configs/ttfnetv2/ttfnetv2_r18_enh_dyndila_end3_lr_4e5_tau40_1x.py | mrsempress/mmdetection | cb650560c97a2fe56a9b369a1abc8ec17e06583a | [
"Apache-2.0"
] | null | null | null | configs/ttfnetv2/ttfnetv2_r18_enh_dyndila_end3_lr_4e5_tau40_1x.py | mrsempress/mmdetection | cb650560c97a2fe56a9b369a1abc8ec17e06583a | [
"Apache-2.0"
] | null | null | null | configs/ttfnetv2/ttfnetv2_r18_enh_dyndila_end3_lr_4e5_tau40_1x.py | mrsempress/mmdetection | cb650560c97a2fe56a9b369a1abc8ec17e06583a | [
"Apache-2.0"
] | null | null | null | # model settings
model = dict(
type='TTFNet',
pretrained='modelzoo://resnet18',
backbone=dict(
type='ResNet',
depth=18,
num_stages=4,
local_conv_cfg=dict(type='DynDilaConv', param_multiply=1., alpha_scale=1e-2, split=8,
tau_end_epoch=3, tau=(40., 1... | 30.808 | 93 | 0.620878 |
62df9e0faa5f5f54aa99d5e7b0de98658bc02a3d | 566 | py | Python | practice_problems/strings_arrays/pancake_sort.py | YazzyYaz/codinginterviews | b8115c43507d738bccd90366f2bc02867ba7f13f | [
"MIT"
] | null | null | null | practice_problems/strings_arrays/pancake_sort.py | YazzyYaz/codinginterviews | b8115c43507d738bccd90366f2bc02867ba7f13f | [
"MIT"
] | null | null | null | practice_problems/strings_arrays/pancake_sort.py | YazzyYaz/codinginterviews | b8115c43507d738bccd90366f2bc02867ba7f13f | [
"MIT"
] | null | null | null | import math
def flip(arr, k):
new_arr = arr[:k+1]
if len(new_arr) > 1:
new_arr = list(reversed(new_arr))
final_arr = new_arr + arr[k+1:]
return final_arr
def max_value(arr):
n = 0
for x in arr:
if x > n:
n = x
return n
def pancake_sort(arr):
for i in range(... | 19.517241 | 41 | 0.538869 |
df0d94abb9c3e17a65a9aed711ab95e0731842c2 | 7,140 | py | Python | beets/autotag/__init__.py | mglukhovsky/beets | 889e30c056a609cf71c8c8200259520230545222 | [
"MIT"
] | null | null | null | beets/autotag/__init__.py | mglukhovsky/beets | 889e30c056a609cf71c8c8200259520230545222 | [
"MIT"
] | null | null | null | beets/autotag/__init__.py | mglukhovsky/beets | 889e30c056a609cf71c8c8200259520230545222 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# This file is part of beets.
# Copyright 2016, Adrian Sampson.
#
# 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 t... | 36.060606 | 79 | 0.609104 |
67c5009616bf416c5ad711df6d5a1f532032e80d | 13,632 | py | Python | models/actions.py | lilleswing/reinvent-scaffold-decorator | 3d26e0f188d66cd9cf352123b74ad5f36d4af0e0 | [
"MIT"
] | null | null | null | models/actions.py | lilleswing/reinvent-scaffold-decorator | 3d26e0f188d66cd9cf352123b74ad5f36d4af0e0 | [
"MIT"
] | null | null | null | models/actions.py | lilleswing/reinvent-scaffold-decorator | 3d26e0f188d66cd9cf352123b74ad5f36d4af0e0 | [
"MIT"
] | 1 | 2021-05-28T02:39:23.000Z | 2021-05-28T02:39:23.000Z | import random
import numpy as np
import scipy.stats as sps
import torch
import torch.utils.data as tud
import torch.nn.utils as tnnu
import models.dataset as md
import utils.tensorboard as utb
import utils.scaffold as usc
class Action:
def __init__(self, logger=None):
"""
(Abstract) Initializes... | 40.571429 | 118 | 0.643559 |
2ccbb73b8bf6cd665ddaa84d825b0a604bee761d | 517 | py | Python | app/core/tests/test_models.py | n3x77/udemy-recipe-app-api | 1ba500aa2211e22959c17ce1492368fdbf186633 | [
"MIT"
] | null | null | null | app/core/tests/test_models.py | n3x77/udemy-recipe-app-api | 1ba500aa2211e22959c17ce1492368fdbf186633 | [
"MIT"
] | null | null | null | app/core/tests/test_models.py | n3x77/udemy-recipe-app-api | 1ba500aa2211e22959c17ce1492368fdbf186633 | [
"MIT"
] | null | null | null | from django.test import TestCase
from django.contrib.auth import get_user_model
class ModelTests(TestCase):
def test_create_user_with_email_successful(self):
"""Test creating a new user within an email is successful"""
email = 'test@mail.com'
password = 'Testpass123'
user = get_us... | 28.722222 | 68 | 0.673114 |
29cfcb1fa1a33bb01e8a1e9e37b23861640fef67 | 26,351 | py | Python | neuralnets/BiLSTM_proper2.py | awaiswill/emnlp2018-activation-functions | 829436f1fa25f0fb46c3f3a59fe1b07be9bf503b | [
"Apache-2.0"
] | 1 | 2021-06-19T05:17:12.000Z | 2021-06-19T05:17:12.000Z | neuralnets/BiLSTM_proper2.py | awaiswill/emnlp2018-activation-functions | 829436f1fa25f0fb46c3f3a59fe1b07be9bf503b | [
"Apache-2.0"
] | null | null | null | neuralnets/BiLSTM_proper2.py | awaiswill/emnlp2018-activation-functions | 829436f1fa25f0fb46c3f3a59fe1b07be9bf503b | [
"Apache-2.0"
] | null | null | null | """
A bidirectional LSTM with optional CRF and character-based presentation for NLP sequence tagging.
Author: Nils Reimers
License: CC BY-SA 3.0
"""
from __future__ import print_function
import logging
import math
import os
import random
import sys
import time
import keras
import numpy as np
from keras.layers impor... | 42.433172 | 136 | 0.588327 |
7236370397f979149dc3ac21810bb883489ad7e0 | 1,187 | py | Python | fair.py | tedoreve/read.py | f1628345aaf06866076ab9fb88d4e34415d60a40 | [
"MIT"
] | null | null | null | fair.py | tedoreve/read.py | f1628345aaf06866076ab9fb88d4e34415d60a40 | [
"MIT"
] | null | null | null | fair.py | tedoreve/read.py | f1628345aaf06866076ab9fb88d4e34415d60a40 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Wed Aug 9 20:15:38 2017
@author: tedoreve
"""
import random as ran
import matplotlib.pyplot as plt
#===============================character======================================
class character(object):
def __init__(self,name,money):
... | 25.804348 | 80 | 0.456613 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.