hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7985017c9e33cc58728a7af8894bfab67d6e5cd2 | 106 | py | Python | setup.py | anonleakerdev/LEAKER | bea8623021b3eb0b4fb450f2cdd1b48834d7c196 | [
"MIT"
] | 8 | 2021-08-30T04:55:21.000Z | 2022-03-20T16:14:33.000Z | setup.py | anonleakerdev/LEAKER | bea8623021b3eb0b4fb450f2cdd1b48834d7c196 | [
"MIT"
] | 1 | 2021-08-09T09:22:00.000Z | 2021-08-09T09:22:00.000Z | setup.py | anonleakerdev/LEAKER | bea8623021b3eb0b4fb450f2cdd1b48834d7c196 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
setup(name='leaker', version='1.0', packages=find_packages()) | 35.333333 | 61 | 0.783019 |
79850223b431da2bae35b7b7ce79c1609df5610a | 209 | py | Python | microbit/first.PS.py | hdert/2018.py | 66fc5afc853af2ed5d6b2fc5f280e73be200a542 | [
"BSD-3-Clause"
] | null | null | null | microbit/first.PS.py | hdert/2018.py | 66fc5afc853af2ed5d6b2fc5f280e73be200a542 | [
"BSD-3-Clause"
] | null | null | null | microbit/first.PS.py | hdert/2018.py | 66fc5afc853af2ed5d6b2fc5f280e73be200a542 | [
"BSD-3-Clause"
] | null | null | null | from mircobit import *
while true:
display.scroll("Hello, World!")
sleep(500)
display.scroll("hdert")
var cookie = 13
display.scroll(cookie)
cookie = 12
display.scroll(cookie)
| 19 | 35 | 0.636364 |
79850234798f9fd248bbcef947b53a6ab9e3856b | 251 | py | Python | app/systems/db/backends/mysql/base.py | criticallycode/zima | cd38cac1c0c33b362d110ae28deba3828daa3f4a | [
"Apache-2.0"
] | null | null | null | app/systems/db/backends/mysql/base.py | criticallycode/zima | cd38cac1c0c33b362d110ae28deba3828daa3f4a | [
"Apache-2.0"
] | null | null | null | app/systems/db/backends/mysql/base.py | criticallycode/zima | cd38cac1c0c33b362d110ae28deba3828daa3f4a | [
"Apache-2.0"
] | null | null | null | from django.db import DEFAULT_DB_ALIAS
from django.db.backends.mysql import base as mysql
class DatabaseWrapper(mysql.DatabaseWrapper):
def __init__(self, settings_dict, alias = DEFAULT_DB_ALIAS):
super().__init__(settings_dict, alias)
| 27.888889 | 64 | 0.780876 |
7985023ed7784fcbd1216905f35b5910b440e8e0 | 1,797 | py | Python | post/views.py | hasinfarhan/Linga | e473349c6c75255b64d4d2e6e4ae18b06251fa1e | [
"Apache-2.0"
] | null | null | null | post/views.py | hasinfarhan/Linga | e473349c6c75255b64d4d2e6e4ae18b06251fa1e | [
"Apache-2.0"
] | 8 | 2020-04-17T14:31:32.000Z | 2022-03-12T00:18:26.000Z | post/views.py | hasinfarhan/Linga | e473349c6c75255b64d4d2e6e4ae18b06251fa1e | [
"Apache-2.0"
] | null | null | null | from django.shortcuts import render,redirect
from .models import Post,PostComment,PostImage
from .forms import CommentForm
from landing.forms import SearchForm
from django.core.mail import send_mail
from django.conf import settings
def searchFeed(request,postId):
post=Post.objects.get(id=postId)
tot=post.get... | 32.672727 | 209 | 0.685031 |
798502c4305e9c38f023fb17b70056e391d5003e | 70 | py | Python | bulq/plugins/bulq_input_file/__init__.py | koji-m/bulq | 78f97d2e57d6bcb0ec3fa2b0c7539db3ebaa104a | [
"Apache-2.0"
] | null | null | null | bulq/plugins/bulq_input_file/__init__.py | koji-m/bulq | 78f97d2e57d6bcb0ec3fa2b0c7539db3ebaa104a | [
"Apache-2.0"
] | null | null | null | bulq/plugins/bulq_input_file/__init__.py | koji-m/bulq | 78f97d2e57d6bcb0ec3fa2b0c7539db3ebaa104a | [
"Apache-2.0"
] | null | null | null | from . import bulq_input_file
plugin = bulq_input_file.BulqInputFile
| 17.5 | 38 | 0.842857 |
798502f06526288821f4ad3b5fae3921275d34aa | 2,167 | py | Python | domaintrails/portal.py | iAbdullahMughal/domain-trails | 6662af3b4e5105543bf388ec4daf386ca0e62c48 | [
"MIT"
] | 1 | 2021-12-10T00:41:30.000Z | 2021-12-10T00:41:30.000Z | domaintrails/portal.py | iAbdullahMughal/domain-trails | 6662af3b4e5105543bf388ec4daf386ca0e62c48 | [
"MIT"
] | null | null | null | domaintrails/portal.py | iAbdullahMughal/domain-trails | 6662af3b4e5105543bf388ec4daf386ca0e62c48 | [
"MIT"
] | null | null | null | import os
import argparse
import time
from domaintrails.core.resources import UserDomain
from domaintrails.core.parser import ColorPrint
from domaintrails.core import process_request as ProcessRequest
def banner():
"""
banner function is showing ascii art for project name. It contains Domain Trails and tag l... | 40.12963 | 159 | 0.489617 |
798504e5d9760bdfedf64b5ab6bbab80545b65cc | 729 | py | Python | src/blueprints/blueprint_x.py | MayaraMachado/flask-api-tutorial | f7be1d15d7f2f64561cd20d52cc16e12cf6b6cec | [
"MIT"
] | null | null | null | src/blueprints/blueprint_x.py | MayaraMachado/flask-api-tutorial | f7be1d15d7f2f64561cd20d52cc16e12cf6b6cec | [
"MIT"
] | null | null | null | src/blueprints/blueprint_x.py | MayaraMachado/flask-api-tutorial | f7be1d15d7f2f64561cd20d52cc16e12cf6b6cec | [
"MIT"
] | null | null | null | from flask import Blueprint, jsonify, request
# define the blueprint
blueprint_x = Blueprint(name="blueprint_x", import_name=__name__)
# note: global variables can be accessed from view functions
x = 5
# add view function to the blueprint
@blueprint_x.route('/test', methods=['GET'])
def test():
output = {"msg": ... | 30.375 | 65 | 0.696845 |
7985050ad5999ac7bb1698dbbaf0bc57edb3804d | 21,480 | py | Python | python/ray/tests/test_actor_failures.py | AshHarvey/ray | f35339b5ff3d5e85c20720637e28bd5a380a545e | [
"Apache-2.0"
] | null | null | null | python/ray/tests/test_actor_failures.py | AshHarvey/ray | f35339b5ff3d5e85c20720637e28bd5a380a545e | [
"Apache-2.0"
] | null | null | null | python/ray/tests/test_actor_failures.py | AshHarvey/ray | f35339b5ff3d5e85c20720637e28bd5a380a545e | [
"Apache-2.0"
] | null | null | null | import collections
import numpy as np
import os
import pytest
import signal
import sys
import time
import ray
import ray.test_utils
import ray.cluster_utils
from ray.test_utils import (
wait_for_condition,
wait_for_pid_to_exit,
generate_system_config_map,
get_other_nodes,
SignalActor,
)
SIGKILL = ... | 31.311953 | 79 | 0.63175 |
79850513aaba99f0ff04c50ef77d3965b80e0b63 | 3,545 | py | Python | .github/actions/notify-translations/app/main.py | jomue/fastapi | bee35f5ae1fc58e7ab125427ad4287210e99d8b3 | [
"MIT"
] | 1 | 2021-11-11T17:03:08.000Z | 2021-11-11T17:03:08.000Z | .github/actions/notify-translations/app/main.py | jomue/fastapi | bee35f5ae1fc58e7ab125427ad4287210e99d8b3 | [
"MIT"
] | 1 | 2021-11-23T11:02:49.000Z | 2021-11-23T17:44:02.000Z | .github/actions/notify-translations/app/main.py | jomue/fastapi | bee35f5ae1fc58e7ab125427ad4287210e99d8b3 | [
"MIT"
] | 2 | 2021-07-19T01:00:32.000Z | 2021-11-10T09:57:44.000Z | import logging
from pathlib import Path
from typing import Dict, Optional
import yaml
from github import Github
from pydantic import BaseModel, BaseSettings, SecretStr
awaiting_label = "awaiting review"
lang_all_label = "lang-all"
approved_label = "approved-2"
translations_path = Path(__file__).parent / "translations... | 40.284091 | 132 | 0.624542 |
798505dade63f328d1a9433a872676bdb60b08b9 | 1,646 | py | Python | load_template/core.py | alice1017/load-template | 7fbd896059d11ac4679015379c6e331e50b9430e | [
"MIT"
] | 1 | 2018-03-28T23:41:52.000Z | 2018-03-28T23:41:52.000Z | load_template/core.py | alice1017/load-template | 7fbd896059d11ac4679015379c6e331e50b9430e | [
"MIT"
] | 3 | 2018-03-29T01:15:06.000Z | 2018-04-16T01:27:53.000Z | load_template/core.py | alice1017/load-template | 7fbd896059d11ac4679015379c6e331e50b9430e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
import os
import codecs
import shutil
TEMPLATE_DIR = os.path.join(os.environ["HOME"], ".templates")
DEFAULT_TEMPLATE_DIR = os.path.abspath(
os.path.join(__file__, "../../templates")
)
class TemplateLoader:
def __init__(
self, template_dir=TEMPLATE_DIR, def... | 23.514286 | 79 | 0.656136 |
798506604e7ad49f19f78cab929420d2bef2fd15 | 921 | py | Python | src/integration-provider/entrypoint.py | ads-ad-itcenter/qunomon.forked | 48d532692d353fe2d3946f62b227f834f9349034 | [
"Apache-2.0"
] | 16 | 2020-11-18T05:43:55.000Z | 2021-11-27T14:43:26.000Z | src/integration-provider/entrypoint.py | aistairc/qunomon | d4e9c5cb569b16addfbe6c33c73812065065a1df | [
"Apache-2.0"
] | 1 | 2022-03-23T07:55:54.000Z | 2022-03-23T13:24:11.000Z | src/integration-provider/entrypoint.py | ads-ad-itcenter/qunomon.forked | 48d532692d353fe2d3946f62b227f834f9349034 | [
"Apache-2.0"
] | 3 | 2021-02-12T01:56:31.000Z | 2022-03-23T02:45:02.000Z | # Copyright © 2019 National Institute of Advanced Industrial Science and Technology (AIST). All rights reserved.
import os
from flask_script import Manager, Shell, Server
from qai_testbed_integration_provider import create_app
from qai_testbed_integration_provider.gateways.extensions import nosql_db
if 'CONTAINER_DE... | 26.314286 | 112 | 0.717698 |
7985096dfe4c415cd8d87f2beef925d13504a515 | 343 | py | Python | packages/python/yapkernel/yapkernel/pylab/config.py | guicho271828/yap | 72dac728ec8c5f02d1e2c216939382e084920356 | [
"Artistic-1.0-Perl",
"ClArtistic"
] | 27 | 2020-11-16T17:25:33.000Z | 2022-03-04T23:38:03.000Z | packages/python/yapkernel/yapkernel/pylab/config.py | guicho271828/yap | 72dac728ec8c5f02d1e2c216939382e084920356 | [
"Artistic-1.0-Perl",
"ClArtistic"
] | 7 | 2020-11-23T22:19:09.000Z | 2022-03-30T09:08:51.000Z | packages/python/yapkernel/yapkernel/pylab/config.py | guicho271828/yap | 72dac728ec8c5f02d1e2c216939382e084920356 | [
"Artistic-1.0-Perl",
"ClArtistic"
] | 5 | 2020-11-24T11:52:23.000Z | 2021-11-25T19:48:51.000Z | """Configurable for configuring the IPython inline backend
This module does not import anything from matplotlib.
"""
import warnings
from matplotlib_inline.config import * # analysis: ignore # noqa F401
warnings.warn(
"`yapkernel.pylab.config` is deprecated, directly "
"use `matplotlib_inline.config`",
... | 21.4375 | 70 | 0.755102 |
79850986f2046c0160e74a664b337e88a7a635aa | 26,054 | py | Python | pgcolorbar/colorlegend.py | franzhaas/pgcolorbar | 0c1ed11bbac50c5a24ecd295d3542d8e0d48f336 | [
"MIT"
] | 5 | 2019-05-09T07:14:55.000Z | 2022-03-12T20:42:22.000Z | pgcolorbar/colorlegend.py | franzhaas/pgcolorbar | 0c1ed11bbac50c5a24ecd295d3542d8e0d48f336 | [
"MIT"
] | 1 | 2020-06-25T16:17:22.000Z | 2020-06-25T23:03:21.000Z | pgcolorbar/colorlegend.py | franzhaas/pgcolorbar | 0c1ed11bbac50c5a24ecd295d3542d8e0d48f336 | [
"MIT"
] | 3 | 2019-12-18T09:12:54.000Z | 2021-12-25T14:55:14.000Z | """ Color legend.
Consists of a vertical color bar with a draggable axis that displays the values of the colors.
Optionally a histogram can be displayed.
"""
from __future__ import print_function, division
import cProfile
import logging
import os
import pstats
import numpy as np
import pyqtgraph as pg
from ... | 37.704776 | 111 | 0.643049 |
798509b2713a8897ab77a42045aea551d2bd9bb9 | 807 | py | Python | local_groups/migrations/0069_auto_20180806_2133.py | JoshZero87/site | c8024b805ff5ff0e16f54dce7bf05097fd2f08e0 | [
"MIT"
] | 4 | 2017-01-29T00:38:41.000Z | 2019-09-04T14:30:24.000Z | local_groups/migrations/0069_auto_20180806_2133.py | JoshZero87/site | c8024b805ff5ff0e16f54dce7bf05097fd2f08e0 | [
"MIT"
] | 74 | 2017-10-02T04:42:54.000Z | 2022-01-13T00:44:16.000Z | local_groups/migrations/0069_auto_20180806_2133.py | JoshZero87/site | c8024b805ff5ff0e16f54dce7bf05097fd2f08e0 | [
"MIT"
] | 3 | 2017-03-24T23:26:46.000Z | 2019-10-21T01:16:03.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2018-08-06 21:33
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('local_groups', '0068_group_group_rating'),
]
operations = [
migrations.Alt... | 38.428571 | 395 | 0.672862 |
79850a377688186ddd25e54e4a5a4b43e33e3315 | 1,258 | py | Python | nxcompile/models/constant.py | Intuity/nexus | 0d1414fa2ea518dae9f031930c40692ebac5d154 | [
"Apache-2.0"
] | 6 | 2021-06-28T05:52:15.000Z | 2022-03-27T20:45:28.000Z | nxcompile/models/constant.py | Intuity/nexus | 0d1414fa2ea518dae9f031930c40692ebac5d154 | [
"Apache-2.0"
] | null | null | null | nxcompile/models/constant.py | Intuity/nexus | 0d1414fa2ea518dae9f031930c40692ebac5d154 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021, Peter Birch, mailto:peter@lightlogic.co.uk
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | 29.952381 | 74 | 0.670111 |
79850a71f3201a763b861c32298051d6637b4924 | 1,390 | py | Python | examples/hacker_news_assets/hacker_news_assets/assets/activity_stats.py | petehunt/dagster | 1df8496851a7a50a19053759fdac32753cc087a1 | [
"Apache-2.0"
] | null | null | null | examples/hacker_news_assets/hacker_news_assets/assets/activity_stats.py | petehunt/dagster | 1df8496851a7a50a19053759fdac32753cc087a1 | [
"Apache-2.0"
] | null | null | null | examples/hacker_news_assets/hacker_news_assets/assets/activity_stats.py | petehunt/dagster | 1df8496851a7a50a19053759fdac32753cc087a1 | [
"Apache-2.0"
] | null | null | null | import json
import os
import pandas as pd
from dagster_dbt import dbt_cli_resource
from dagster_dbt.asset_defs import load_assets_from_dbt_manifest
from hacker_news_assets.resources.snowflake_io_manager import (
SHARED_SNOWFLAKE_CONF,
connect_snowflake,
)
from dagster import MetadataValue
from dagster.utils i... | 34.75 | 91 | 0.761151 |
79850b48538ddb4c4779894f26f2c9b021555519 | 230 | py | Python | python/testData/MockSdk3.4/Lib/abc.py | NecroRayder/intellij-community | 4381105ab77263736ad7362008532b6129c0a90e | [
"Apache-2.0"
] | 2 | 2018-12-29T09:53:39.000Z | 2018-12-29T09:53:42.000Z | python/testData/MockSdk3.4/Lib/abc.py | tnorbye/intellij-community | f01cf262fc196bf4dbb99e20cd937dee3705a7b6 | [
"Apache-2.0"
] | null | null | null | python/testData/MockSdk3.4/Lib/abc.py | tnorbye/intellij-community | f01cf262fc196bf4dbb99e20cd937dee3705a7b6 | [
"Apache-2.0"
] | 1 | 2018-10-03T12:35:06.000Z | 2018-10-03T12:35:06.000Z | # Stubs
class object:
pass
class ABCMeta:
pass
class ABC(metaclass=ABCMeta):
"""Helper class that provides a standard way to create an ABC using
inheritance.
"""
pass
def abstractmethod(foo):
pass | 12.777778 | 71 | 0.66087 |
79850b823dfd0ef07c4ad014accf6e5edb37bb01 | 448 | py | Python | src/dicognito/_version.py | medihack/dicognito | b6ae1c44e117bec0aa4d3226591cd13f8206e604 | [
"MIT"
] | 16 | 2019-03-20T16:43:45.000Z | 2021-12-10T04:50:01.000Z | src/dicognito/_version.py | medihack/dicognito | b6ae1c44e117bec0aa4d3226591cd13f8206e604 | [
"MIT"
] | 48 | 2019-03-11T19:26:28.000Z | 2022-03-01T03:30:04.000Z | src/dicognito/_version.py | medihack/dicognito | b6ae1c44e117bec0aa4d3226591cd13f8206e604 | [
"MIT"
] | 6 | 2019-05-24T04:47:03.000Z | 2021-03-31T23:10:07.000Z | """dicognito - anonymize DICOM datasets"""
from os.path import abspath, dirname, join
import re
DATA_ROOT = abspath(dirname(__file__))
with open(join(DATA_ROOT, "release_notes.md"), "r") as notes:
for line in notes:
if line.startswith("## "):
__version__ = line[3:].strip()
... | 34.461538 | 118 | 0.618304 |
79850d9064db9732c1ec44c9f65109665d386c34 | 9,083 | py | Python | wandb/sdk/interface/interface_grpc.py | macio232/client | 295380c99b1a0946470672d40348b17a674ad17f | [
"MIT"
] | null | null | null | wandb/sdk/interface/interface_grpc.py | macio232/client | 295380c99b1a0946470672d40348b17a674ad17f | [
"MIT"
] | null | null | null | wandb/sdk/interface/interface_grpc.py | macio232/client | 295380c99b1a0946470672d40348b17a674ad17f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Backend Sender - Send to internal process
Manage backend sender.
"""
import logging
from typing import Any, Optional
from typing import TYPE_CHECKING
import grpc
from wandb.proto import wandb_internal_pb2 as pb
from wandb.proto import wandb_server_pb2_grpc as pbgrpc
from wandb.proto impor... | 31.106164 | 85 | 0.660244 |
79850f44ad644200c34827cabf9b0a4ce31e8022 | 1,485 | py | Python | python/oneflow/test/modules/test_consistent_einsum_vector_outer_product.py | L-Net-1992/oneflow | 4dc08d65caea36fdd137841ac95551218897e730 | [
"Apache-2.0"
] | 1 | 2022-03-14T11:17:56.000Z | 2022-03-14T11:17:56.000Z | python/oneflow/test/modules/test_consistent_einsum_vector_outer_product.py | L-Net-1992/oneflow | 4dc08d65caea36fdd137841ac95551218897e730 | [
"Apache-2.0"
] | null | null | null | python/oneflow/test/modules/test_consistent_einsum_vector_outer_product.py | L-Net-1992/oneflow | 4dc08d65caea36fdd137841ac95551218897e730 | [
"Apache-2.0"
] | 1 | 2021-12-15T02:14:49.000Z | 2021-12-15T02:14:49.000Z | """
Copyright 2020 The OneFlow Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | 32.282609 | 76 | 0.738047 |
79850fd0f232b5eaf012e4451c0df2e4fb0c5c76 | 23,643 | py | Python | combiner/combiner/jax/model/layer.py | ParikhKadam/google-research | 00a282388e389e09ce29109eb050491c96cfab85 | [
"Apache-2.0"
] | 2 | 2022-01-21T18:15:34.000Z | 2022-01-25T15:21:34.000Z | combiner/combiner/jax/model/layer.py | ParikhKadam/google-research | 00a282388e389e09ce29109eb050491c96cfab85 | [
"Apache-2.0"
] | 110 | 2021-10-01T18:22:38.000Z | 2021-12-27T22:08:31.000Z | combiner/combiner/jax/model/layer.py | admariner/google-research | 7cee4b22b925581d912e8d993625c180da2a5a4f | [
"Apache-2.0"
] | 1 | 2022-02-10T10:43:10.000Z | 2022-02-10T10:43:10.000Z | # coding=utf-8
# Copyright 2021 The Google Research 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 applicab... | 45.642857 | 348 | 0.660745 |
798510be1a9e203cd119e904ea6b7aa7cee63f7a | 223 | py | Python | setup.py | abhishekori/Titanic-MachineLearning-Challenge | ef25bca16c6871d858219b01d5f4c9e5765dfc3e | [
"MIT"
] | null | null | null | setup.py | abhishekori/Titanic-MachineLearning-Challenge | ef25bca16c6871d858219b01d5f4c9e5765dfc3e | [
"MIT"
] | null | null | null | setup.py | abhishekori/Titanic-MachineLearning-Challenge | ef25bca16c6871d858219b01d5f4c9e5765dfc3e | [
"MIT"
] | null | null | null | from setuptools import find_packages, setup
setup(
name='src',
packages=find_packages(),
version='0.1.0',
description='A short description of the project.',
author='abhishek kori',
license='MIT',
)
| 20.272727 | 54 | 0.668161 |
7985118c1c72f3ed0a3504bc19a92be1e22b7309 | 10,597 | py | Python | action_plugins/openplc_settings.py | MBWhitestone/OpenPLCv3_Ansible | 5ab0fe3e422e2e7e8ccdabdfc61b29d34d73c64d | [
"MIT"
] | null | null | null | action_plugins/openplc_settings.py | MBWhitestone/OpenPLCv3_Ansible | 5ab0fe3e422e2e7e8ccdabdfc61b29d34d73c64d | [
"MIT"
] | null | null | null | action_plugins/openplc_settings.py | MBWhitestone/OpenPLCv3_Ansible | 5ab0fe3e422e2e7e8ccdabdfc61b29d34d73c64d | [
"MIT"
] | null | null | null | """File: openplc_settings.py
Plugin for adding/removing/modifying OpenPLCv3 users.
"""
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import requests
import re
# Common error handlers
from ansible.errors import AnsibleError
# ADT base class for our Ansible Action Plugin
from ... | 40.140152 | 88 | 0.508918 |
798511a12004254c90f9d7a334f44034a6a0728b | 2,043 | py | Python | core/request_cache.py | Chase235/cloudcourse | 3174cd634cdfa8f04476f2206bfe52b0d7090c9c | [
"Apache-2.0"
] | null | null | null | core/request_cache.py | Chase235/cloudcourse | 3174cd634cdfa8f04476f2206bfe52b0d7090c9c | [
"Apache-2.0"
] | null | null | null | core/request_cache.py | Chase235/cloudcourse | 3174cd634cdfa8f04476f2206bfe52b0d7090c9c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python2.4
# Copyright 2009 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 ... | 23.215909 | 75 | 0.713656 |
7985123ab61ff960aafa4fb424f866e4814c667e | 4,178 | py | Python | mutiny.py | Jonthelepreeedcchaun/Minutiny | 770a61b9191c132f2b8ae8dc7e7c31b88386e403 | [
"MIT"
] | 2 | 2019-09-28T00:57:14.000Z | 2019-09-28T00:59:22.000Z | mutiny.py | Jonthelepreeedcchaun/Minutiny | 770a61b9191c132f2b8ae8dc7e7c31b88386e403 | [
"MIT"
] | null | null | null | mutiny.py | Jonthelepreeedcchaun/Minutiny | 770a61b9191c132f2b8ae8dc7e7c31b88386e403 | [
"MIT"
] | null | null | null | import os
os.environ['PYGAME_HIDE_SUPPORT_PROMPT'] = "hide"
import sys, math, pygame, random, time
canvas_x = 1400
canvas_y = 800
screen = pygame.display.set_mode((canvas_x, canvas_y))
screen.fill((0, 0, 0))
pygame.init()
pygame.display.set_caption('Mutiny')
pygame.mouse.set_visible(0)
game_start = 0
#Test Box (TB)
T... | 28.813793 | 146 | 0.616084 |
798512f439b1077ecb704378b62b563550f2cf1b | 122 | py | Python | website/utils/security.py | JamesBrofos/Thor-Server | 1acaf7436b22100ef241c779365fb0297165c063 | [
"MIT"
] | null | null | null | website/utils/security.py | JamesBrofos/Thor-Server | 1acaf7436b22100ef241c779365fb0297165c063 | [
"MIT"
] | 5 | 2017-07-05T14:44:37.000Z | 2017-10-02T16:07:13.000Z | website/utils/security.py | JamesBrofos/Thor-Server | 1acaf7436b22100ef241c779365fb0297165c063 | [
"MIT"
] | 3 | 2017-08-04T15:47:43.000Z | 2021-11-17T14:31:48.000Z | from itsdangerous import URLSafeTimedSerializer
from .. import app
ts = URLSafeTimedSerializer(app.config["SECRET_KEY"])
| 24.4 | 53 | 0.819672 |
798512ff4a22c67760eb6142ebd80e3dc0b802e1 | 19,353 | py | Python | fashionnets/train_jobs/loader/dataset_loader.py | NiklasHoltmeyer/FashionNets | 918e57f122b8cfa36dba1d0b993c763ba35ac815 | [
"MIT"
] | null | null | null | fashionnets/train_jobs/loader/dataset_loader.py | NiklasHoltmeyer/FashionNets | 918e57f122b8cfa36dba1d0b993c763ba35ac815 | [
"MIT"
] | null | null | null | fashionnets/train_jobs/loader/dataset_loader.py | NiklasHoltmeyer/FashionNets | 918e57f122b8cfa36dba1d0b993c763ba35ac815 | [
"MIT"
] | null | null | null | import logging
import os
from pathlib import Path
from shutil import copyfile
from fashiondatasets.deepfashion1.DeepFashion1 import DeepFashion1Dataset
from fashiondatasets.deepfashion2.DeepFashion2Quadruplets import DeepFashion2Quadruplets
from fashiondatasets.deepfashion2.helper.pairs.deep_fashion_2_pairs_generator ... | 39.255578 | 118 | 0.620679 |
798513a8dd341129cea948658a3a9e8fa7847ccd | 39 | py | Python | array_utils/__init__.py | kintama48/array_utils | f9acf2c30bd0ea68aa15bdafc5c167d0b91de117 | [
"AFL-3.0"
] | null | null | null | array_utils/__init__.py | kintama48/array_utils | f9acf2c30bd0ea68aa15bdafc5c167d0b91de117 | [
"AFL-3.0"
] | null | null | null | array_utils/__init__.py | kintama48/array_utils | f9acf2c30bd0ea68aa15bdafc5c167d0b91de117 | [
"AFL-3.0"
] | null | null | null | from array_utils.code import ArrayUtils | 39 | 39 | 0.897436 |
798513bf648621470bab9a0a16cd08cec9ad3833 | 145,915 | py | Python | bcdi/graph/graph_utils.py | DSimonne/bcdi | 5740a75576d7c3760ac72358acfb51321d51f82b | [
"CECILL-B"
] | 1 | 2021-11-03T08:49:41.000Z | 2021-11-03T08:49:41.000Z | bcdi/graph/graph_utils.py | DSimonne/bcdi | 5740a75576d7c3760ac72358acfb51321d51f82b | [
"CECILL-B"
] | null | null | null | bcdi/graph/graph_utils.py | DSimonne/bcdi | 5740a75576d7c3760ac72358acfb51321d51f82b | [
"CECILL-B"
] | null | null | null | # -*- coding: utf-8 -*-
# BCDI: tools for pre(post)-processing Bragg coherent X-ray diffraction imaging data
# (c) 07/2017-06/2019 : CNRS UMR 7344 IM2NP
# (c) 07/2019-05/2021 : DESY PHOTON SCIENCE
# authors:
# Jerome Carnis, carnis_jerome@yahoo.fr
"""Functions related to visualization."""
import log... | 33.520561 | 88 | 0.55607 |
798514a8884e0a02990168106bb6518248f4933d | 380 | py | Python | shortener/management/commands/refreshcodes.py | Akshita207/kirr | 71dc0ba36d16a168e96c4c702e77ec9ba943ca7d | [
"Apache-2.0"
] | null | null | null | shortener/management/commands/refreshcodes.py | Akshita207/kirr | 71dc0ba36d16a168e96c4c702e77ec9ba943ca7d | [
"Apache-2.0"
] | 7 | 2020-06-05T21:18:35.000Z | 2022-02-10T07:29:54.000Z | shortener/management/commands/refreshcodes.py | Akshita207/kirr | 71dc0ba36d16a168e96c4c702e77ec9ba943ca7d | [
"Apache-2.0"
] | null | null | null | from django.core.management.base import BaseCommand, CommandError
from shortener.models import KirrURL
class Command(BaseCommand):
help = 'Refreshes all KirrURL shortcodes'
def add_arguments(self, parser):
parser.add_argument('--items', type=int)
def handle(self, *args, **options):
return... | 31.666667 | 73 | 0.736842 |
798514dc01f3db3022f3329de4831a31ac662511 | 5,513 | py | Python | questioner/cli.py | larsyencken/questioner | afd208a6835b550f4d2deaf482d4cdbd8bba7a98 | [
"MIT"
] | 9 | 2019-02-26T08:09:18.000Z | 2020-05-15T21:14:36.000Z | questioner/cli.py | larsyencken/questioner | afd208a6835b550f4d2deaf482d4cdbd8bba7a98 | [
"MIT"
] | 1 | 2021-11-15T17:48:18.000Z | 2021-11-15T17:48:18.000Z | questioner/cli.py | larsyencken/questioner | afd208a6835b550f4d2deaf482d4cdbd8bba7a98 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# cli.py
# questioner
#
"""
A command-line client for annotating things.
"""
import re
import os
from typing import List, Set, Optional
import readchar
import blessings
SKIP_KEY = '\r'
SKIP_LINE = ''
QUIT_KEY = 'q'
QUIT_LINE = 'q'
EMAIL_REGEX = '^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,6}$... | 25.761682 | 78 | 0.504263 |
798515c30233485ecbe296473beb4814a27c56e1 | 2,905 | py | Python | count_voting_power.py | TokenFlowInsights/gov-tools | bebc5930bcb44552e51aabad8d90e7de290b38e5 | [
"Unlicense"
] | 2 | 2021-09-06T20:03:22.000Z | 2021-09-07T08:46:04.000Z | count_voting_power.py | TokenFlowInsights/gov-tools | bebc5930bcb44552e51aabad8d90e7de290b38e5 | [
"Unlicense"
] | null | null | null | count_voting_power.py | TokenFlowInsights/gov-tools | bebc5930bcb44552e51aabad8d90e7de290b38e5 | [
"Unlicense"
] | null | null | null | import sys
from resources import MKR, VOTE_PROXY_FACTORIES
from utils import *
# read in command line arguments
list_of_voters = sys.argv[1]
node = sys.argv[2]
block = int(sys.argv[3]) if sys.argv[3] else None
voters = list()
for v in list_voters(list_of_voters):
if v not in voters:
voters.append(v)
cha... | 26.409091 | 88 | 0.589673 |
798515d8bb9a41e107e38d3ab52128d1fc6aa518 | 3,549 | py | Python | testCases/plot_images.py | fanqi203/pycrtm | 6fbdc8e45aa25c8030605b7489bd006d6757b63a | [
"Apache-2.0"
] | null | null | null | testCases/plot_images.py | fanqi203/pycrtm | 6fbdc8e45aa25c8030605b7489bd006d6757b63a | [
"Apache-2.0"
] | null | null | null | testCases/plot_images.py | fanqi203/pycrtm | 6fbdc8e45aa25c8030605b7489bd006d6757b63a | [
"Apache-2.0"
] | null | null | null | # run ipdb debug:
#import ipdb
#ipdb.set_trace()
import xarray as xr
import matplotlib
#matplotlib.use('AGG')# or PDF, SVG or PS
import matplotlib.pyplot as plt
import numpy as np
import os
from pathlib import Path
def preprocess(ds):
import os
ds=ds.expand_dims("cases")
filename=ds.encoding["source... | 31.131579 | 90 | 0.708932 |
798516040763e034436a176fe07637361e8c4300 | 3,179 | py | Python | scales/events.py | compil3/pcn-snek | 7bf9a36c30de6a65bd8547e0598322eb3b4979dc | [
"MIT"
] | null | null | null | scales/events.py | compil3/pcn-snek | 7bf9a36c30de6a65bd8547e0598322eb3b4979dc | [
"MIT"
] | null | null | null | scales/events.py | compil3/pcn-snek | 7bf9a36c30de6a65bd8547e0598322eb3b4979dc | [
"MIT"
] | null | null | null | import logging
import datetime
from dis_snek.models import listener, Timestamp
import motor.motor_asyncio as motor
from dis_snek.models import listen
from dis_snek.models.discord_objects.embed import Embed
from dis_snek.models.discord_objects.user import Member
from dis_snek.models.listener import listen
from... | 36.54023 | 301 | 0.626298 |
7985161f0e31c9d8573ade2d093842b51876cb35 | 1,253 | py | Python | import.py | scullxbones/geolitelegacy-lookup | 67d5c0f40e1040dcbd6e447bb3868bbe65447a22 | [
"Apache-2.0"
] | null | null | null | import.py | scullxbones/geolitelegacy-lookup | 67d5c0f40e1040dcbd6e447bb3868bbe65447a22 | [
"Apache-2.0"
] | null | null | null | import.py | scullxbones/geolitelegacy-lookup | 67d5c0f40e1040dcbd6e447bb3868bbe65447a22 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Draws heavily on
# https://stackoverflow.com/a/2888042
import csv, sqlite3, sys, os.path
arg_count = len(sys.argv)
if arg_count != 2:
print "Must pass geoip filename"
sys.exit(-1)
filename = sys.argv[1]
if not os.path.isfile(filename):
print "Could not find file named %s"%(filena... | 40.419355 | 164 | 0.707901 |
798517669c51d100038df32fd719482699605fb9 | 5,335 | py | Python | bot_stuff/utils/paginators.py | StarrFox/bot_stuff | 806f724e0dbf7e99a2d15bc713c680b509c56af5 | [
"MIT"
] | null | null | null | bot_stuff/utils/paginators.py | StarrFox/bot_stuff | 806f724e0dbf7e99a2d15bc713c680b509c56af5 | [
"MIT"
] | null | null | null | bot_stuff/utils/paginators.py | StarrFox/bot_stuff | 806f724e0dbf7e99a2d15bc713c680b509c56af5 | [
"MIT"
] | null | null | null | import discord
from discord.ext import commands
from jishaku.paginators import PaginatorInterface
# TODO: rewrite old code to use this
class PrologPaginator(commands.Paginator):
def __init__(self,
prefix: str = '```prolog',
suffix: str = '```',
max_... | 31.755952 | 97 | 0.592315 |
798519877720d34a48c70865e06e01174f9e6cf1 | 5,110 | py | Python | gluon/datasets/cityscapes_seg_dataset.py | naviocean/imgclsmob | f2993d3ce73a2f7ddba05da3891defb08547d504 | [
"MIT"
] | 2,649 | 2018-08-03T14:18:00.000Z | 2022-03-31T08:08:17.000Z | gluon/datasets/cityscapes_seg_dataset.py | naviocean/imgclsmob | f2993d3ce73a2f7ddba05da3891defb08547d504 | [
"MIT"
] | 95 | 2018-08-13T01:46:03.000Z | 2022-03-13T08:38:14.000Z | gluon/datasets/cityscapes_seg_dataset.py | naviocean/imgclsmob | f2993d3ce73a2f7ddba05da3891defb08547d504 | [
"MIT"
] | 549 | 2018-08-06T08:09:22.000Z | 2022-03-31T08:08:21.000Z | """
Cityscapes semantic segmentation dataset.
"""
import os
import numpy as np
import mxnet as mx
from PIL import Image
from .seg_dataset import SegDataset
from .voc_seg_dataset import VOCMetaInfo
class CityscapesSegDataset(SegDataset):
"""
Cityscapes semantic segmentation dataset.
Parameters:
-... | 37.29927 | 105 | 0.596086 |
79851b68d3fa7d8ca3b1b6cff19a21401b48d9b4 | 22,042 | py | Python | epg/epgcpmg_torch_image.py | somnathrakshit/mri-sim-py | 2034357d1c5a89ee48f5dc38484a7ea33cc04db7 | [
"MIT"
] | 5 | 2019-09-06T18:51:56.000Z | 2020-05-26T10:17:29.000Z | epg/epgcpmg_torch_image.py | somnathrakshit/mri-sim-py | 2034357d1c5a89ee48f5dc38484a7ea33cc04db7 | [
"MIT"
] | null | null | null | epg/epgcpmg_torch_image.py | somnathrakshit/mri-sim-py | 2034357d1c5a89ee48f5dc38484a7ea33cc04db7 | [
"MIT"
] | 5 | 2020-10-16T09:31:43.000Z | 2021-09-01T12:14:11.000Z | #!/usr/bin/python
# EPG CPMG simulation code, based off of Matlab scripts from Brian Hargreaves <bah@stanford.edu>
# 2015 Jonathan Tamir <jtamir@eecs.berkeley.edu>
# 2019 Ke Wang <kewang@eecs.berkeley.edu> rewrite it in Pytorch
from __future__ import division
import torch
import torch.backends.cudnn as cudnn
import ... | 30.827972 | 163 | 0.592868 |
79851d6962ad1023765e7d6f89e5f4d05cf47216 | 958 | py | Python | apps/customer/migrations/0001_initial.py | jerinisready/django-tenant-schema-demo | 3a9327f0b8647c9babc2b0dfcadf214b3d8ce06a | [
"MIT"
] | null | null | null | apps/customer/migrations/0001_initial.py | jerinisready/django-tenant-schema-demo | 3a9327f0b8647c9babc2b0dfcadf214b3d8ce06a | [
"MIT"
] | 7 | 2021-04-08T21:43:19.000Z | 2022-02-10T10:27:56.000Z | apps/customer/migrations/0001_initial.py | jerinisready/django-tenant-schema-demo | 3a9327f0b8647c9babc2b0dfcadf214b3d8ce06a | [
"MIT"
] | null | null | null | # Generated by Django 2.2.12 on 2020-04-27 07:49
from django.db import migrations, models
import tenant_schemas.postgresql_backend.base
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Client',
fie... | 31.933333 | 150 | 0.59499 |
79851e610c821e89065fb760b10be389b8323ce3 | 1,530 | py | Python | ServerComponent/venv/Lib/site-packages/rsrc/exceptions.py | CDU55/FakeNews | 707bd48dd78851081d98ad21bbdadfc2720bd644 | [
"MIT"
] | null | null | null | ServerComponent/venv/Lib/site-packages/rsrc/exceptions.py | CDU55/FakeNews | 707bd48dd78851081d98ad21bbdadfc2720bd644 | [
"MIT"
] | 37 | 2020-10-20T08:30:53.000Z | 2020-12-22T13:15:45.000Z | ServerComponent/venv/Lib/site-packages/rsrc/exceptions.py | CDU55/FakeNews | 707bd48dd78851081d98ad21bbdadfc2720bd644 | [
"MIT"
] | 1 | 2020-10-19T14:55:23.000Z | 2020-10-19T14:55:23.000Z | """Handled exceptions raised by Resources.
Inspired by `Django REST framework` - https://github.com/tomchristie/django-rest-framework
"""
from __future__ import unicode_literals
from . import status
def get_exception_detail(e):
if not isinstance(e, Exception):
return u''
return u'%s: %s' % (e.__clas... | 25.5 | 90 | 0.736601 |
79851ec8c855b66ee0ee009399370e44b3382e69 | 46,433 | py | Python | scripts/vk_validation_stats.py | samuelig/Vulkan-ValidationLayers | 9f537109da6db63f1caab817546c36db42f07cf5 | [
"Apache-2.0"
] | 432 | 2018-05-19T18:52:54.000Z | 2022-03-30T14:44:47.000Z | scripts/vk_validation_stats.py | samuelig/Vulkan-ValidationLayers | 9f537109da6db63f1caab817546c36db42f07cf5 | [
"Apache-2.0"
] | 3,140 | 2018-05-14T01:35:39.000Z | 2022-03-31T22:26:15.000Z | scripts/vk_validation_stats.py | samuelig/Vulkan-ValidationLayers | 9f537109da6db63f1caab817546c36db42f07cf5 | [
"Apache-2.0"
] | 324 | 2018-05-12T16:48:06.000Z | 2022-03-28T14:28:07.000Z | #!/usr/bin/env python3
# Copyright (c) 2015-2021 The Khronos Group Inc.
# Copyright (c) 2015-2021 Valve Corporation
# Copyright (c) 2015-2021 LunarG, Inc.
# Copyright (c) 2015-2021 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the L... | 47.284114 | 247 | 0.570564 |
79852021efb719461f32d6f83056a832feb0d71d | 468 | py | Python | src/agente_prosp/controlo_react/reaccoes/recolher.py | joaofilipevaz/IASA-TP3 | 5e7e4390b325ebb2d196558d50d1e3f321ac0ba5 | [
"MIT"
] | null | null | null | src/agente_prosp/controlo_react/reaccoes/recolher.py | joaofilipevaz/IASA-TP3 | 5e7e4390b325ebb2d196558d50d1e3f321ac0ba5 | [
"MIT"
] | null | null | null | src/agente_prosp/controlo_react/reaccoes/recolher.py | joaofilipevaz/IASA-TP3 | 5e7e4390b325ebb2d196558d50d1e3f321ac0ba5 | [
"MIT"
] | null | null | null | from agente_prosp.controlo_react.reaccoes.aproximar.aproximar import Aproximar
from agente_prosp.controlo_react.reaccoes.contornar import Contornar
from agente_prosp.controlo_react.reaccoes.evitar import Evitar
from agente_prosp.controlo_react.reaccoes.explorar import Explorar
from lib.ecr.hierarquia import *
class R... | 36 | 78 | 0.790598 |
798520d78d1cfc1f0e8cdad3ead64de742698094 | 10,570 | py | Python | apps/falcon/utils/visualize.py | Roy-Tuhin/maskrcnn_sophisticate- | a5a2300abbe2633d66847cdbfa7ed2bc2f901ec3 | [
"Apache-2.0"
] | null | null | null | apps/falcon/utils/visualize.py | Roy-Tuhin/maskrcnn_sophisticate- | a5a2300abbe2633d66847cdbfa7ed2bc2f901ec3 | [
"Apache-2.0"
] | 14 | 2021-02-02T22:32:47.000Z | 2022-03-12T00:20:40.000Z | apps/falcon/utils/visualize.py | Boyetuhin/maskrcnn_sophisticate- | a5a2300abbe2633d66847cdbfa7ed2bc2f901ec3 | [
"Apache-2.0"
] | 1 | 2021-05-03T22:48:36.000Z | 2021-05-03T22:48:36.000Z | """
Mask R-CNN
Display and Visualization Functions.
Copyright (c) 2017 Matterport, Inc.
Licensed under the MIT License (see LICENSE for details)
Written by Waleed Abdulla
"""
import os
import sys
import random
import itertools
import colorsys
import numpy as np
from skimage.measure import find_contours
import matplo... | 36.448276 | 82 | 0.575875 |
7985216abac0ee385e71099f25fbeebeded7ae9b | 496 | py | Python | numba/dppl/examples/pa_examples/test1-2d.py | DrTodd13/numba | de35af55d295f1677cca76646691d8c51c79d3cf | [
"BSD-2-Clause"
] | null | null | null | numba/dppl/examples/pa_examples/test1-2d.py | DrTodd13/numba | de35af55d295f1677cca76646691d8c51c79d3cf | [
"BSD-2-Clause"
] | null | null | null | numba/dppl/examples/pa_examples/test1-2d.py | DrTodd13/numba | de35af55d295f1677cca76646691d8c51c79d3cf | [
"BSD-2-Clause"
] | null | null | null | from numba import njit, gdb
import numpy as np
@njit(parallel={'offload':True})
def f1(a, b):
c = a + b
return c
N = 1000
print("N", N)
a = np.ones((N,N), dtype=np.float32)
b = np.ones((N,N), dtype=np.float32)
print("a:", a, hex(a.ctypes.data))
print("b:", b, hex(b.ctypes.data))
c = f1(a,b)
print("BIG RESUL... | 20.666667 | 59 | 0.564516 |
798522203f4fbc03b72b8e9c2ec5daab914fd0aa | 1,734 | py | Python | tests/render/__init__.py | getskua/skua | 4a99625991acd2b03156cff929367078cb08a109 | [
"BSD-3-Clause"
] | 2 | 2020-01-13T16:26:22.000Z | 2021-04-07T04:07:16.000Z | tests/render/__init__.py | teymour-aldridge/skua | 4a99625991acd2b03156cff929367078cb08a109 | [
"BSD-3-Clause"
] | null | null | null | tests/render/__init__.py | teymour-aldridge/skua | 4a99625991acd2b03156cff929367078cb08a109 | [
"BSD-3-Clause"
] | null | null | null | import pathlib
import unittest
from bs4 import BeautifulSoup
from skua.preprocessors import Config
from skua.preprocessors.markdown import MarkdownPreprocessor
from skua.render import Jinja2Templates, render_jinja2_parallel
class TestRenderWithMockSite(unittest.TestCase):
"""
Functional tests with an exampl... | 37.695652 | 113 | 0.684544 |
7985229cfd6201c04d27aae0154adea39e67e2f3 | 30,142 | py | Python | tests/integration/test_script_runner.py | AntoineRondelet/great_expectations | 159edd1738f8bff46dd60fa95cb4950c2e036c13 | [
"Apache-2.0"
] | 1 | 2022-03-03T00:09:55.000Z | 2022-03-03T00:09:55.000Z | tests/integration/test_script_runner.py | AntoineRondelet/great_expectations | 159edd1738f8bff46dd60fa95cb4950c2e036c13 | [
"Apache-2.0"
] | null | null | null | tests/integration/test_script_runner.py | AntoineRondelet/great_expectations | 159edd1738f8bff46dd60fa95cb4950c2e036c13 | [
"Apache-2.0"
] | null | null | null | import enum
import os
import shutil
import subprocess
import sys
import pytest
from assets.scripts.build_gallery import execute_shell_command
from great_expectations.data_context.util import file_relative_path
class BackendDependencies(enum.Enum):
BIGQUERY = "BIGQUERY"
MYSQL = "MYSQL"
MSSQL = "MSSQL"
... | 54.803636 | 204 | 0.739964 |
798522b0a91671207ab21b58e953812763a3dd6b | 1,445 | py | Python | src/ddhi_encoder/mentioned_events.py | agile-humanities/ddhi-encoder | 6045ef2c02117d88916a7b8d4b1770c812c65b07 | [
"MIT"
] | null | null | null | src/ddhi_encoder/mentioned_events.py | agile-humanities/ddhi-encoder | 6045ef2c02117d88916a7b8d4b1770c812c65b07 | [
"MIT"
] | 2 | 2019-12-20T15:38:40.000Z | 2020-03-13T01:37:29.000Z | src/ddhi_encoder/mentioned_events.py | agile-humanities/ddhi-encoder | 6045ef2c02117d88916a7b8d4b1770c812c65b07 | [
"MIT"
] | 2 | 2021-04-22T18:18:00.000Z | 2022-01-21T17:38:30.000Z | # -*- coding: utf-8 -*-
import argparse
import sys
import csv
from ddhi_encoder.ne_extractor import NeExtractor
from ddhi_encoder import __version__
__author__ = "Clifford Wulfman"
__copyright__ = "Clifford Wulfman"
__license__ = "mit"
def to_tsv(list, stream=sys.stdout):
writer = csv.DictWriter(stream,
... | 23.688525 | 67 | 0.617993 |
798522b6fdc4ff9d1499723d7d467f968a787688 | 441 | py | Python | app/migrations/0013_auto_20170109_1435.py | kuwii/some-information-system | 82ecb6d3ee07294ce80bf22b9bbfcf71ce957c00 | [
"PSF-2.0",
"MIT"
] | null | null | null | app/migrations/0013_auto_20170109_1435.py | kuwii/some-information-system | 82ecb6d3ee07294ce80bf22b9bbfcf71ce957c00 | [
"PSF-2.0",
"MIT"
] | null | null | null | app/migrations/0013_auto_20170109_1435.py | kuwii/some-information-system | 82ecb6d3ee07294ce80bf22b9bbfcf71ce957c00 | [
"PSF-2.0",
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-01-09 06:35
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app', '0012_auto_20170107_1807'),
]
operations = [
migrations.AlterField(
... | 21 | 48 | 0.609977 |
798523e650389b5ea9c087b15158740b2b7d6727 | 9,511 | py | Python | bot/seasons/evergreen/trivia_quiz.py | Denayder/seasonalbot | e8e6afb13debb54226d373d0fcc31c0c974f7b85 | [
"MIT"
] | null | null | null | bot/seasons/evergreen/trivia_quiz.py | Denayder/seasonalbot | e8e6afb13debb54226d373d0fcc31c0c974f7b85 | [
"MIT"
] | null | null | null | bot/seasons/evergreen/trivia_quiz.py | Denayder/seasonalbot | e8e6afb13debb54226d373d0fcc31c0c974f7b85 | [
"MIT"
] | null | null | null | import asyncio
import json
import logging
import random
from pathlib import Path
import discord
from discord.ext import commands
from fuzzywuzzy import fuzz
from bot.constants import Roles
logger = logging.getLogger(__name__)
ANNOYED_EXPRESSIONS = ["-_-", "-.-"]
WRONG_ANS_RESPONSE = [
"No one gave the correc... | 40.47234 | 116 | 0.568394 |
7985244605acb6038bd1c0ed281e2a24f0fed776 | 1,981 | py | Python | T2 Week 14/Assignments/_3_Vehicle.py | WillGreen98/University-INTPROG-Python | 93c4f8227a28e09ece0adcebc0fbe499c4b62753 | [
"MIT"
] | 1 | 2017-12-31T14:29:47.000Z | 2017-12-31T14:29:47.000Z | T2 Week 14/Assignments/_3_Vehicle.py | WillGreen98/University-Year-One | 93c4f8227a28e09ece0adcebc0fbe499c4b62753 | [
"MIT"
] | 4 | 2018-10-01T07:59:20.000Z | 2021-06-25T15:16:45.000Z | T2 Week 14/Assignments/_3_Vehicle.py | WillGreen98/University | 93c4f8227a28e09ece0adcebc0fbe499c4b62753 | [
"MIT"
] | 1 | 2018-05-01T17:42:46.000Z | 2018-05-01T17:42:46.000Z | def clamp(val, low, high):
if (val > high):
return high
if (val < low ):
return low
return val
class Vehicle:
def __init__(numWheels, engineSize, manualTransition, currentMilage):
self.numWheels = numWheels
self.engineSize = engineSize
self.manualTransition = ma... | 25.727273 | 73 | 0.587582 |
798525032cd49fc211a4df9954e28922704a0193 | 2,411 | py | Python | setup.py | schubergphilis/winrmmanager | b4a9a274bf3181a0ab02b0134c45911abe98c3f6 | [
"MIT"
] | null | null | null | setup.py | schubergphilis/winrmmanager | b4a9a274bf3181a0ab02b0134c45911abe98c3f6 | [
"MIT"
] | 6 | 2020-03-24T16:23:00.000Z | 2021-02-10T01:38:49.000Z | setup.py | schubergphilis/winrmmanager | b4a9a274bf3181a0ab02b0134c45911abe98c3f6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
try:
from pipenv.project import Project
from pipenv.utils import convert_deps_to_pip
pfile = Project().parsed_pipfile
requirements = convert_deps_to_pip(pfile['packages'], r=False)
test_requirements = convert... | 36.530303 | 98 | 0.573206 |
798525928e8b9608cb6a1c7a08ecdaedf0dc375d | 866 | py | Python | conversor.py | anurag200502/WhatsappBot | 0cb9cf9a47e8020003119132a9902f94dd4ad370 | [
"MIT"
] | 2 | 2020-08-11T14:46:51.000Z | 2020-10-19T12:21:01.000Z | conversor.py | anurag200502/WhatsappBot | 0cb9cf9a47e8020003119132a9902f94dd4ad370 | [
"MIT"
] | null | null | null | conversor.py | anurag200502/WhatsappBot | 0cb9cf9a47e8020003119132a9902f94dd4ad370 | [
"MIT"
] | 1 | 2020-10-16T05:03:18.000Z | 2020-10-16T05:03:18.000Z | class Conversor:
def __init__(self, txt_file):
# É iniciado com o nome do arquivo que ele vai converter
self.txt_file = txt_file
def converter(self):
# Acessa o arquivo passado no construtor do objeto e retorna uma lista com as linhas do documento
f = open(self.txt_file, 'r', ... | 34.64 | 105 | 0.58776 |
798525ec6dc94267f54ce96d611672d548b03487 | 50 | py | Python | L2_Problem_9/2.py | marcfreir/MITx6.00.1 | c035cbff2cb6a8a2949e9d61ae9604fd07ee7744 | [
"MIT"
] | null | null | null | L2_Problem_9/2.py | marcfreir/MITx6.00.1 | c035cbff2cb6a8a2949e9d61ae9604fd07ee7744 | [
"MIT"
] | null | null | null | L2_Problem_9/2.py | marcfreir/MITx6.00.1 | c035cbff2cb6a8a2949e9d61ae9604fd07ee7744 | [
"MIT"
] | null | null | null | if 6 > 7:
print("Yep")
else:
print("Nope") | 12.5 | 17 | 0.5 |
798526f8d4cbd29ad4fcaaec82f96e90e8cd2274 | 56,292 | py | Python | tripleo_workflows/tests/actions/test_parameters.py | bcrochet/tripleo-workflows | 3ac8aa6a47ef005358c98c987ddb17c31fd1d1a4 | [
"Apache-2.0"
] | null | null | null | tripleo_workflows/tests/actions/test_parameters.py | bcrochet/tripleo-workflows | 3ac8aa6a47ef005358c98c987ddb17c31fd1d1a4 | [
"Apache-2.0"
] | null | null | null | tripleo_workflows/tests/actions/test_parameters.py | bcrochet/tripleo-workflows | 3ac8aa6a47ef005358c98c987ddb17c31fd1d1a4 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Red Hat, 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 ... | 41.391176 | 79 | 0.615807 |
7985273adcb484dc550fdf282ed21b09e3555468 | 4,667 | py | Python | src/flair_management/skin_manager/randomizer_editor.py | PxT00/valorant-skin-cli | 4d142174e53769c10a06f2ba5343d8a4d4a7512c | [
"MIT"
] | 2 | 2021-08-11T02:09:15.000Z | 2021-08-11T02:09:19.000Z | src/flair_management/skin_manager/randomizer_editor.py | PxT00/valorant-skin-cli | 4d142174e53769c10a06f2ba5343d8a4d4a7512c | [
"MIT"
] | null | null | null | src/flair_management/skin_manager/randomizer_editor.py | PxT00/valorant-skin-cli | 4d142174e53769c10a06f2ba5343d8a4d4a7512c | [
"MIT"
] | null | null | null | from InquirerPy import prompt, inquirer
from InquirerPy.separator import Separator
from ...flair_management.skin_manager.skin_manager import Skin_Manager
from .weapon_config_prompts import Prompts
class Randomizer_Editor:
'''
this flows through 4 stages
weapon type -> weapon -> skins -> skin preferences
... | 43.212963 | 228 | 0.5946 |
798527992f6534a0e6b68528c1e63fe03e15e350 | 14,675 | py | Python | amy/autoemails/tests/test_postworkshopaction.py | gaybro8777/amy | 3cf99aed58a0f0acf83d2645a30d8408208ccea9 | [
"MIT"
] | null | null | null | amy/autoemails/tests/test_postworkshopaction.py | gaybro8777/amy | 3cf99aed58a0f0acf83d2645a30d8408208ccea9 | [
"MIT"
] | null | null | null | amy/autoemails/tests/test_postworkshopaction.py | gaybro8777/amy | 3cf99aed58a0f0acf83d2645a30d8408208ccea9 | [
"MIT"
] | null | null | null | from datetime import timedelta, date
from django.test import TestCase
from autoemails.actions import PostWorkshopAction
from autoemails.models import Trigger, EmailTemplate
from workshops.fields import TAG_SEPARATOR
from workshops.models import Task, Role, Person, Event, Tag, Organization
class TestPostWorkshopActi... | 38.315927 | 87 | 0.567632 |
798527f7548aa03b1d3a27633a0b16c8a2c15376 | 2,001 | py | Python | ex1a/graphs/time/scripts/general.py | filmnoirprod/parallel_processing | ca08eebcc160f11a151290243ba633cce2a458b4 | [
"MIT"
] | null | null | null | ex1a/graphs/time/scripts/general.py | filmnoirprod/parallel_processing | ca08eebcc160f11a151290243ba633cce2a458b4 | [
"MIT"
] | null | null | null | ex1a/graphs/time/scripts/general.py | filmnoirprod/parallel_processing | ca08eebcc160f11a151290243ba633cce2a458b4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import sys, os
import itertools, operator
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import numpy as np
def tuples_by_dispatch_width(tuples):
ret = []
tuples_sorted = sorted(tuples, key=operator.itemgetter(0))
for key,group in itertools.groupby(tuples_sorted,opera... | 29 | 86 | 0.703648 |
79852809a30a0b861f2f6332001f6cfb787cb3fd | 212 | py | Python | src/spyd/game/room/client_event_handlers/command_handler.py | DanSeraf/spyd | af893b7f9c67785613b25754eb2cf150523a9fe4 | [
"Zlib"
] | 4 | 2015-05-05T16:44:42.000Z | 2020-10-27T09:45:23.000Z | src/spyd/game/room/client_event_handlers/command_handler.py | DanSeraf/spyd | af893b7f9c67785613b25754eb2cf150523a9fe4 | [
"Zlib"
] | null | null | null | src/spyd/game/room/client_event_handlers/command_handler.py | DanSeraf/spyd | af893b7f9c67785613b25754eb2cf150523a9fe4 | [
"Zlib"
] | 2 | 2016-12-13T22:21:08.000Z | 2020-03-14T16:44:20.000Z | from spyd.registry_manager import register
@register('room_client_event_handler')
class CommandHandler(object):
event_type = 'command'
@staticmethod
def handle(room, client, command):
pass
| 19.272727 | 42 | 0.731132 |
798528eaca0a607b5f5a4c4ac5eda5d17bbf7487 | 3,270 | py | Python | user/user/settings.py | hahahaha666/pythonpachong | 2cc8303a4baecea4bbc631e90718c49815e41133 | [
"MIT"
] | null | null | null | user/user/settings.py | hahahaha666/pythonpachong | 2cc8303a4baecea4bbc631e90718c49815e41133 | [
"MIT"
] | null | null | null | user/user/settings.py | hahahaha666/pythonpachong | 2cc8303a4baecea4bbc631e90718c49815e41133 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Scrapy settings for user project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# https://doc.scrapy.org/en/latest/topics/settings.html
# https://doc.scrapy.org/en/latest/... | 35.543478 | 145 | 0.74893 |
798529750bf5878d8e2663f80056714f44d77593 | 6,152 | py | Python | pytorch3d/datasets/shapenet/shapenet_core.py | anuragranj/pytorch3d | cdaac5f9c592234e89afbcb7eab88ceb3b4ce816 | [
"BSD-3-Clause"
] | 1 | 2020-09-06T15:03:10.000Z | 2020-09-06T15:03:10.000Z | pytorch3d/datasets/shapenet/shapenet_core.py | anuragranj/pytorch3d | cdaac5f9c592234e89afbcb7eab88ceb3b4ce816 | [
"BSD-3-Clause"
] | null | null | null | pytorch3d/datasets/shapenet/shapenet_core.py | anuragranj/pytorch3d | cdaac5f9c592234e89afbcb7eab88ceb3b4ce816 | [
"BSD-3-Clause"
] | 1 | 2020-05-25T07:19:08.000Z | 2020-05-25T07:19:08.000Z | # Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
import json
import os
import warnings
from os import path
from pathlib import Path
from typing import Dict
from pytorch3d.datasets.shapenet_base import ShapeNetBase
from pytorch3d.io import load_obj
SYNSET_DICT_DIR = Path(__file__).resolve().pa... | 44.258993 | 92 | 0.600943 |
7985297ca19b51f5d8b7714628d56baa4ce8c44d | 796 | py | Python | denonRemoteControl/DenonControlService/commands/Power.py | icebear8/arctic | 4acce8e40a11a1b6257b9d9dbc09a140bee8b4e3 | [
"MIT"
] | null | null | null | denonRemoteControl/DenonControlService/commands/Power.py | icebear8/arctic | 4acce8e40a11a1b6257b9d9dbc09a140bee8b4e3 | [
"MIT"
] | null | null | null | denonRemoteControl/DenonControlService/commands/Power.py | icebear8/arctic | 4acce8e40a11a1b6257b9d9dbc09a140bee8b4e3 | [
"MIT"
] | 1 | 2018-11-19T14:44:47.000Z | 2018-11-19T14:44:47.000Z |
import logging
import DataCache as cache
import commands._SimpleCommand as cmdSimple
logger = logging.getLogger(__name__)
_id = 'power'
_prefix = 'PW'
cachedValue = cache.CachedValue(_id)
def getId():
return _id
def cmdPrefix():
return _prefix
def createRequest(request='get'):
cachedValue.... | 21.513514 | 65 | 0.683417 |
79852b2d087d102e19cf9765f0807581664f61e2 | 4,148 | py | Python | test/test_cross_validation.py | SamuelMarks/botorch | 7801e2f56dc447322b2b6c92cab683d8900e4c7f | [
"MIT"
] | 2 | 2021-01-11T18:16:27.000Z | 2021-11-30T09:34:44.000Z | test/test_cross_validation.py | SamuelMarks/botorch | 7801e2f56dc447322b2b6c92cab683d8900e4c7f | [
"MIT"
] | 17 | 2020-12-11T20:07:22.000Z | 2022-03-27T16:46:42.000Z | test/test_cross_validation.py | SamuelMarks/botorch | 7801e2f56dc447322b2b6c92cab683d8900e4c7f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# 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 itertools
import warnings
import torch
from botorch.cross_validation import batch_cross_validation, gen_loo_cv_... | 50.585366 | 87 | 0.66731 |
79852b4f7a3eec9e8acc468e55093adce6f6ee2f | 25,036 | py | Python | gugong/proto/gugong_pb2.py | robertwenquan/forbidden-city | 393275f0be3d832357041e06ef8baa4384cc3623 | [
"Apache-2.0"
] | null | null | null | gugong/proto/gugong_pb2.py | robertwenquan/forbidden-city | 393275f0be3d832357041e06ef8baa4384cc3623 | [
"Apache-2.0"
] | 1 | 2020-06-22T06:54:05.000Z | 2020-06-29T13:16:46.000Z | gugong/proto/gugong_pb2.py | robertwenquan/gugong | 393275f0be3d832357041e06ef8baa4384cc3623 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: gugong.proto
"""Generated protocol buffer code."""
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobu... | 37.255952 | 2,209 | 0.737139 |
79852b610a9f7542dca9d5745e180e2c42fdd7bc | 20,953 | py | Python | kivymd/uix/toolbar.py | zlemonpie/KivyMD | 12f992575e51f3b0c0053fd0c9ab37712cb41249 | [
"MIT"
] | null | null | null | kivymd/uix/toolbar.py | zlemonpie/KivyMD | 12f992575e51f3b0c0053fd0c9ab37712cb41249 | [
"MIT"
] | null | null | null | kivymd/uix/toolbar.py | zlemonpie/KivyMD | 12f992575e51f3b0c0053fd0c9ab37712cb41249 | [
"MIT"
] | 1 | 2020-07-30T21:08:42.000Z | 2020-07-30T21:08:42.000Z | """
Components/Toolbar
==================
.. seealso::
`Material Design spec, App bars: top <https://material.io/components/app-bars-top>`_
`Material Design spec, App bars: bottom <https://material.io/components/app-bars-bottom/app-bars-bottom.html>`_
.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw... | 28.742112 | 118 | 0.593089 |
79852c1c877090b178bcc2a3d57014767b001625 | 2,473 | py | Python | src/pyfuncs/scraper/rq.py | chrk623/pyfuncs | bf78aa716893f449cf85e3d8c16ad9eb9a52bb49 | [
"MIT"
] | null | null | null | src/pyfuncs/scraper/rq.py | chrk623/pyfuncs | bf78aa716893f449cf85e3d8c16ad9eb9a52bb49 | [
"MIT"
] | null | null | null | src/pyfuncs/scraper/rq.py | chrk623/pyfuncs | bf78aa716893f449cf85e3d8c16ad9eb9a52bb49 | [
"MIT"
] | null | null | null | import threading
from ..utils import split_list
from .rq_base import RqBase
class RqSingle(RqBase):
run_type = "base"
def __init__(self, headers=None, params=None, proxies=None):
super().__init__(headers=headers, run_type=self.run_type)
self._init_output_list()
self.params = self._gen... | 30.158537 | 79 | 0.633643 |
79852c7a4a4fb44910df310b9505d962e8760a1a | 40,811 | py | Python | test/orm/test_session.py | RetailArchitects/sqlalchemy | 399a5c96b2fd0e0f2f0cdda7766b31e37454eb2e | [
"MIT"
] | 1 | 2018-04-11T16:46:31.000Z | 2018-04-11T16:46:31.000Z | test/orm/test_session.py | RetailArchitects/sqlalchemy | 399a5c96b2fd0e0f2f0cdda7766b31e37454eb2e | [
"MIT"
] | null | null | null | test/orm/test_session.py | RetailArchitects/sqlalchemy | 399a5c96b2fd0e0f2f0cdda7766b31e37454eb2e | [
"MIT"
] | null | null | null | from test.lib.testing import eq_, assert_raises, \
assert_raises_message, assert_warnings
from test.lib.util import gc_collect
from test.lib import pickleable
from sqlalchemy.util import pickle
import inspect
from sqlalchemy.orm import create_session, sessionmaker, attributes, \
make_transient, Session
import s... | 29.810811 | 78 | 0.565975 |
79852ccdc8f64c5d360eb7977a2fcbd161f6b106 | 4,467 | py | Python | examples/electrophysiology/fibers/fibers_fat_emg/extract_electrodes.py | maierbn/opendihu | 577650e2f6b36a7306766b0f4176f8124458cbf0 | [
"MIT"
] | 17 | 2018-11-25T19:29:34.000Z | 2021-09-20T04:46:22.000Z | examples/electrophysiology/fibers/fibers_fat_emg/extract_electrodes.py | maierbn/opendihu | 577650e2f6b36a7306766b0f4176f8124458cbf0 | [
"MIT"
] | 1 | 2020-11-12T15:15:58.000Z | 2020-12-29T15:29:24.000Z | examples/electrophysiology/fibers/fibers_fat_emg/extract_electrodes.py | maierbn/opendihu | 577650e2f6b36a7306766b0f4176f8124458cbf0 | [
"MIT"
] | 4 | 2018-10-17T12:18:10.000Z | 2021-05-28T13:24:20.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Script to extract a number of electrodes from the given data.
# arguments: <n_extracted_points_xy> <n_extracted_points_z> <path>
#
import sys, os
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import csv
input_filename = "b... | 33.088889 | 216 | 0.706067 |
79852d1bda479f0ec41c2403d4e84b4bde61ec78 | 7,119 | py | Python | euler.py | bptfreitas/Project-Euler | 02b3ef8f8e3754b886b266fcd5eee7fd00d97dde | [
"MIT"
] | null | null | null | euler.py | bptfreitas/Project-Euler | 02b3ef8f8e3754b886b266fcd5eee7fd00d97dde | [
"MIT"
] | null | null | null | euler.py | bptfreitas/Project-Euler | 02b3ef8f8e3754b886b266fcd5eee7fd00d97dde | [
"MIT"
] | null | null | null |
import string
import operator
from math import log
from math import ceil
from math import floor
from math import sqrt
from itertools import permutations
from itertools import combinations
from bisect import bisect_left
# productory function
def prod(iterable):
return reduce(operator.mul, iterab... | 19.830084 | 98 | 0.616941 |
79852d953da9854d2a0d98762875d2cbedb4e41b | 958 | py | Python | lib/bes/testing/framework/unit_test_output.py | reconstruir/bes | 82ff54b2dadcaef6849d7de424787f1dedace85c | [
"Apache-2.0"
] | null | null | null | lib/bes/testing/framework/unit_test_output.py | reconstruir/bes | 82ff54b2dadcaef6849d7de424787f1dedace85c | [
"Apache-2.0"
] | null | null | null | lib/bes/testing/framework/unit_test_output.py | reconstruir/bes | 82ff54b2dadcaef6849d7de424787f1dedace85c | [
"Apache-2.0"
] | null | null | null | #-*- coding:utf-8; mode:python; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*-
import re
from collections import namedtuple
class unit_test_output(object):
_error = namedtuple('_error', 'error_type, fixture, function')
_error_status = namedtuple('_error_status', 'num_errors, num_failures, errors')
... | 33.034483 | 90 | 0.598121 |
79852dc565609b1074ba1b65b420e22d2f5ed17d | 1,713 | py | Python | src/models/resnet50.py | Stevenah/keras-training-system | ef15519d84335621f3e8f73db68cd54134e723fe | [
"MIT"
] | 2 | 2018-09-19T14:53:15.000Z | 2021-09-30T21:46:26.000Z | src/models/resnet50.py | Stevenah/keras-training-system | ef15519d84335621f3e8f73db68cd54134e723fe | [
"MIT"
] | null | null | null | src/models/resnet50.py | Stevenah/keras-training-system | ef15519d84335621f3e8f73db68cd54134e723fe | [
"MIT"
] | null | null | null | from keras.applications.resnet50 import ResNet50
from keras.layers import Dense, GlobalAveragePooling2D
from keras.models import Model
import importlib
def build(config):
image_width = config['image_processing']['image_width']
image_height = config['image_processing']['image_height']
image_channels = conf... | 34.26 | 104 | 0.685347 |
79852ee58a11f5c5934b0d0c6dcab792116305c3 | 1,853 | py | Python | setup.py | BencePaul/chronosaurus | 2f8b5d00a66c36ac276c92141dfdb4500a918f3d | [
"MIT"
] | 1 | 2022-02-22T10:46:22.000Z | 2022-02-22T10:46:22.000Z | setup.py | BencePaul/chronosaurus | 2f8b5d00a66c36ac276c92141dfdb4500a918f3d | [
"MIT"
] | null | null | null | setup.py | BencePaul/chronosaurus | 2f8b5d00a66c36ac276c92141dfdb4500a918f3d | [
"MIT"
] | 1 | 2022-02-22T11:10:08.000Z | 2022-02-22T11:10:08.000Z | #!/usr/bin/env python
import re
import os
from subprocess import check_call
from setuptools import setup, find_packages, Command
from setuptools.command.sdist import sdist
cmdclass = {}
try:
from pyqt_distutils.build_ui import build_ui
has_build_ui = True
except ImportError:
has_build_ui = False
try... | 19.712766 | 74 | 0.664868 |
79852f942399f8a4b0b15f7a600d37bc7f410dd9 | 2,639 | py | Python | optimizer/GraphSearchAgent.py | Ale573/routesoptimizer | a612373d80cf55dc805da0ed906be1914b2405c8 | [
"CC0-1.0"
] | null | null | null | optimizer/GraphSearchAgent.py | Ale573/routesoptimizer | a612373d80cf55dc805da0ed906be1914b2405c8 | [
"CC0-1.0"
] | null | null | null | optimizer/GraphSearchAgent.py | Ale573/routesoptimizer | a612373d80cf55dc805da0ed906be1914b2405c8 | [
"CC0-1.0"
] | null | null | null | from optimizer.graphProblem import GraphProblem
from optimizer.graph import UndirectedGraph
from optimizer.search import astar_search, simulated_annealing
from optimizer.problem import Problem
from optimizer.utils import map_to_dict, map_coordenates
"""
Autorship: Aimacode Repository
URL: https://github.com/aimacode/a... | 37.7 | 119 | 0.662372 |
7985303eb4bf0ce9b62dca15d2f8a3261a7d9bb6 | 1,060 | py | Python | pcdet/models/detectors/voxel_rcnn.py | twn29004/OpenPCDet | 3457cc30b21d882a1376ef272fbaa49755c72a2e | [
"Apache-2.0"
] | null | null | null | pcdet/models/detectors/voxel_rcnn.py | twn29004/OpenPCDet | 3457cc30b21d882a1376ef272fbaa49755c72a2e | [
"Apache-2.0"
] | null | null | null | pcdet/models/detectors/voxel_rcnn.py | twn29004/OpenPCDet | 3457cc30b21d882a1376ef272fbaa49755c72a2e | [
"Apache-2.0"
] | null | null | null | from .detector3d_template import Detector3DTemplate
class VoxelRCNN(Detector3DTemplate):
def __init__(self, model_cfg, num_class, dataset):
super().__init__(model_cfg=model_cfg, num_class=num_class, dataset=dataset)
self.module_list = self.build_networks()
def forward(self, batch_dict... | 32.121212 | 84 | 0.615094 |
7985309eebe609b2dd3b2ef75875d486711057eb | 1,333 | py | Python | models/CNN4_LungMalignant.py | justin13601/AICancer | b84f76ecfea90b352b40285778e136d7fc16b04a | [
"MIT"
] | 6 | 2020-08-07T01:56:06.000Z | 2021-09-02T13:13:58.000Z | models/CNN4_LungMalignant.py | justin13601/AICancer | b84f76ecfea90b352b40285778e136d7fc16b04a | [
"MIT"
] | null | null | null | models/CNN4_LungMalignant.py | justin13601/AICancer | b84f76ecfea90b352b40285778e136d7fc16b04a | [
"MIT"
] | 3 | 2020-08-11T02:40:52.000Z | 2021-01-28T08:04:43.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
from torchsummary import summary
import torch.optim as optim
torch.manual_seed(1)
class CNN4_LungMalignant(nn.Module):
def __init__(self):
super(CNN4_LungMalignant, self).__init__()
self.name = 'CNN4_LungMalignant'
self.la... | 40.393939 | 101 | 0.68192 |
79853148a6b9dfcf3d8901e65dfb4f279dce568b | 8,149 | py | Python | test_check_ip_conntrack.py | koemu/nagios_plugin_check_ip_conntrack | 5e4d4e07ac011cc026214bdd771eb91566bf6130 | [
"MIT"
] | null | null | null | test_check_ip_conntrack.py | koemu/nagios_plugin_check_ip_conntrack | 5e4d4e07ac011cc026214bdd771eb91566bf6130 | [
"MIT"
] | null | null | null | test_check_ip_conntrack.py | koemu/nagios_plugin_check_ip_conntrack | 5e4d4e07ac011cc026214bdd771eb91566bf6130 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# ----------------------------------------------
# test_check_ip_conntrack.py
#
# Copyright(C) 2014 Yuichiro SAITO
# This software is released under the MIT License, see LICENSE.txt.
# ----------------------------------------------
import unittest
from check_ip_conntrack import _IPConntrack
... | 31.585271 | 81 | 0.52485 |
798533c2bb7ee43eb6edd9546a9bd7a6e2dd1ee6 | 7,218 | py | Python | pylearn2/train_extensions/window_flip.py | ikervazquezlopez/Pylearn2 | 2971e8f64374ffde572d4cf967aad5342beaf5e0 | [
"BSD-3-Clause"
] | 2,045 | 2015-01-01T14:07:52.000Z | 2022-03-08T08:56:41.000Z | pylearn2/train_extensions/window_flip.py | ikervazquezlopez/Pylearn2 | 2971e8f64374ffde572d4cf967aad5342beaf5e0 | [
"BSD-3-Clause"
] | 305 | 2015-01-02T13:18:24.000Z | 2021-08-20T18:03:28.000Z | pylearn2/train_extensions/window_flip.py | ikervazquezlopez/Pylearn2 | 2971e8f64374ffde572d4cf967aad5342beaf5e0 | [
"BSD-3-Clause"
] | 976 | 2015-01-01T17:08:51.000Z | 2022-03-25T19:53:17.000Z | """ TrainExtensions for doing random spatial windowing and flipping of an
image dataset on every epoch. TODO: fill out properly."""
import warnings
import numpy
from . import TrainExtension
from pylearn2.datasets.preprocessing import CentralWindow
from pylearn2.utils.exc import reraise_as
from pylearn2.utils.rng i... | 35.382353 | 79 | 0.619562 |
798534ee739c0498578215c1f3c16cecb0036716 | 2,667 | py | Python | bin/flood_detection_wizard.py | fchapoton/CrisisMappingToolkit | 56b43e1bbad86ed3b971352bf4d4aca816c25e2d | [
"Apache-2.0"
] | 178 | 2015-01-06T07:29:47.000Z | 2022-03-27T01:56:29.000Z | bin/flood_detection_wizard.py | fchapoton/CrisisMappingToolkit | 56b43e1bbad86ed3b971352bf4d4aca816c25e2d | [
"Apache-2.0"
] | 6 | 2016-10-17T14:34:27.000Z | 2021-07-06T15:00:07.000Z | bin/flood_detection_wizard.py | fchapoton/CrisisMappingToolkit | 56b43e1bbad86ed3b971352bf4d4aca816c25e2d | [
"Apache-2.0"
] | 82 | 2015-01-03T04:42:52.000Z | 2022-01-11T23:41:31.000Z | # -----------------------------------------------------------------------------
# Copyright * 2014, United States Government, as represented by the
# Administrator of the National Aeronautics and Space Administration. All
# rights reserved.
#
# The Crisis Mapping Toolkit (CMT) v1 platform is licensed under the Apache
#... | 40.409091 | 86 | 0.654668 |
798534fa337305b83c9b0f9592f5b7d27cdbcc54 | 962 | py | Python | leetcode/python/medium/p139_wordBreak.py | kefirzhang/algorithms | 549e68731d4c05002e35f0499d4f7744f5c63979 | [
"Apache-2.0"
] | null | null | null | leetcode/python/medium/p139_wordBreak.py | kefirzhang/algorithms | 549e68731d4c05002e35f0499d4f7744f5c63979 | [
"Apache-2.0"
] | null | null | null | leetcode/python/medium/p139_wordBreak.py | kefirzhang/algorithms | 549e68731d4c05002e35f0499d4f7744f5c63979 | [
"Apache-2.0"
] | null | null | null | class Solution:
def wordBreak2(self, s: str, wordDict) -> bool:
if s == "":
return True
for word in wordDict:
if word in s:
tmp_s = s.replace(word, "")
if self.wordBreak(tmp_s, wordDict):
return True
return False
... | 28.294118 | 59 | 0.459459 |
79853644f78ea97e9d20901db69eebb67d956a80 | 8,966 | py | Python | paddlex/ppdet/core/workspace.py | cheneyveron/PaddleX | 86f73fc6a66b12c638f642524bfd1cf730e26c4b | [
"Apache-2.0"
] | 3,655 | 2020-03-28T09:19:50.000Z | 2022-03-31T13:28:39.000Z | paddlex/ppdet/core/workspace.py | cheneyveron/PaddleX | 86f73fc6a66b12c638f642524bfd1cf730e26c4b | [
"Apache-2.0"
] | 829 | 2020-03-28T04:03:18.000Z | 2022-03-31T14:34:30.000Z | paddlex/ppdet/core/workspace.py | cheneyveron/PaddleX | 86f73fc6a66b12c638f642524bfd1cf730e26c4b | [
"Apache-2.0"
] | 738 | 2020-03-28T03:56:46.000Z | 2022-03-31T13:11:03.000Z | # Copyright (c) 2019 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... | 32.136201 | 84 | 0.623466 |
79853806248751b566f87f493ac3976bd8271950 | 1,521 | py | Python | atariari/benchmark/wrapper.py | DuaneNielsen/atari-representation-learning | fe34f389768416deaa6a6ff0bdebba3d05762a55 | [
"MIT"
] | 175 | 2019-09-10T08:11:41.000Z | 2022-03-25T15:37:37.000Z | atariari/benchmark/wrapper.py | DuaneNielsen/atari-representation-learning | fe34f389768416deaa6a6ff0bdebba3d05762a55 | [
"MIT"
] | 21 | 2019-09-30T14:45:45.000Z | 2022-03-31T04:46:47.000Z | atariari/benchmark/wrapper.py | DuaneNielsen/atari-representation-learning | fe34f389768416deaa6a6ff0bdebba3d05762a55 | [
"MIT"
] | 40 | 2019-09-11T13:25:27.000Z | 2022-02-14T03:49:01.000Z | import gym
from .ram_annotations import atari_dict
class InfoWrapper(gym.Wrapper):
def step(self, action):
observation, reward, done, info = self.env.step(action)
return observation, reward, done, self.info(info)
def reset(self, **kwargs):
return self.env.reset(**kwargs)
def info... | 32.361702 | 178 | 0.659435 |
798538ca32579e0de0d126eb7f9d960d3507a030 | 427 | py | Python | auctioning_platform/auctions/auctions/tests/factories.py | nhdinh/smp-modulith | 84c31b36e9b449fe3135f3802c1bbc362e7fb459 | [
"MIT"
] | 299 | 2019-09-13T23:03:29.000Z | 2022-03-24T09:20:43.000Z | auctioning_platform/auctions/auctions/tests/factories.py | winston-won/clean-architecture | 95546b29c9a5ff0e16c7f67b9ab736749e87f8ae | [
"MIT"
] | 109 | 2019-11-03T12:16:16.000Z | 2021-07-26T08:32:28.000Z | auctioning_platform/auctions/auctions/tests/factories.py | winston-won/clean-architecture | 95546b29c9a5ff0e16c7f67b9ab736749e87f8ae | [
"MIT"
] | 38 | 2019-09-13T23:03:34.000Z | 2022-03-24T09:21:10.000Z | import factory
from foundation.value_objects.factories import get_dollars
from auctions.domain.entities import Auction
class AuctionFactory(factory.Factory):
class Meta:
model = Auction
id = factory.Sequence(lambda n: n)
bids = factory.List([])
title = factory.Faker("name")
starting_pri... | 23.722222 | 62 | 0.709602 |
798539780e5d157fe66e14d526cbe28fa8845dea | 10,575 | py | Python | automatminer/featurization/sets.py | sgbaird/automatminer | 9a3996e37672b547f10645b53b816ee670940d56 | [
"BSD-3-Clause-LBNL"
] | 92 | 2018-11-28T17:36:42.000Z | 2022-03-26T07:45:22.000Z | automatminer/featurization/sets.py | sgbaird/automatminer | 9a3996e37672b547f10645b53b816ee670940d56 | [
"BSD-3-Clause-LBNL"
] | 249 | 2018-11-30T22:09:15.000Z | 2022-01-06T22:25:12.000Z | automatminer/featurization/sets.py | sgbaird/automatminer | 9a3996e37672b547f10645b53b816ee670940d56 | [
"BSD-3-Clause-LBNL"
] | 41 | 2018-11-21T22:33:52.000Z | 2022-03-03T02:24:32.000Z | """
Defines sets of featurizers to be used by automatminer during featurization.
Featurizer sets are classes with attributes containing lists of featurizers.
For example, the set of all express structure featurizers could be found with::
StructureFeaturizers().express
"""
import matminer.featurizers.composition a... | 30.921053 | 80 | 0.641702 |
79853a3b421669e29f50eabc6e84e2b81054646a | 44,065 | py | Python | model/FastSCNNX5.py | Ethan-ye/Efficient-Segmentation-Networks | 27272e43126a507a6d93b21cd2372f5432f61237 | [
"MIT"
] | null | null | null | model/FastSCNNX5.py | Ethan-ye/Efficient-Segmentation-Networks | 27272e43126a507a6d93b21cd2372f5432f61237 | [
"MIT"
] | null | null | null | model/FastSCNNX5.py | Ethan-ye/Efficient-Segmentation-Networks | 27272e43126a507a6d93b21cd2372f5432f61237 | [
"MIT"
] | null | null | null | ##################################################################################
# Fast-SCNN: Fast Semantic Segmentation Network
# Paper-Link: https://arxiv.org/pdf/1902.04502.pdf
##################################################################################
import torch
import torch.nn as nn
import tor... | 49.903737 | 136 | 0.49924 |
79853ad2060b3e0d66a54edca47715c9d9520bae | 318 | py | Python | big_data/python_tools/big_data_tools/bokeh_tools/line_plot.py | paulhtremblay/big-data | dfa2aa9877300a57e7a9368af59c07fcc5841b4f | [
"MIT"
] | null | null | null | big_data/python_tools/big_data_tools/bokeh_tools/line_plot.py | paulhtremblay/big-data | dfa2aa9877300a57e7a9368af59c07fcc5841b4f | [
"MIT"
] | 7 | 2020-06-05T18:13:25.000Z | 2022-03-11T23:19:48.000Z | big_data/python_tools/big_data_tools/bokeh_tools/line_plot.py | paulhtremblay/big-data | dfa2aa9877300a57e7a9368af59c07fcc5841b4f | [
"MIT"
] | 1 | 2020-11-25T18:24:37.000Z | 2020-11-25T18:24:37.000Z | from bokeh.io import show
from bokeh.plotting import figure
import datetime
import argparse
from bokeh.models import NumeralTickFormatter
def line_plot(p, x, y, line_width = 2, legend=None):
p.line(x,y, line_width =line_width,legend=legend )
p.yaxis.formatter=NumeralTickFormatter(format="0,")
show(p)
| 24.461538 | 55 | 0.757862 |
79853b179c8cad4b1c507f34f4f8b7de517412ea | 4,515 | py | Python | bin/repair_bags.py | rdmarino/ami-tools | d88c051f0dea33bd0111ff0aa8b79f820abe4ab5 | [
"MIT"
] | 11 | 2017-01-20T08:33:54.000Z | 2021-11-18T19:31:46.000Z | bin/repair_bags.py | rdmarino/ami-tools | d88c051f0dea33bd0111ff0aa8b79f820abe4ab5 | [
"MIT"
] | 59 | 2017-02-13T18:21:18.000Z | 2022-01-19T21:18:08.000Z | bin/repair_bags.py | rdmarino/ami-tools | d88c051f0dea33bd0111ff0aa8b79f820abe4ab5 | [
"MIT"
] | 6 | 2017-02-13T21:53:59.000Z | 2021-09-21T18:43:36.000Z | #!/usr/bin/env python3
import os
import argparse
from tqdm import tqdm
import logging
from ami_bag.update_bag import Repairable_Bag
file_deletion_rules = rules = {
"Thumbs.db": {
"regex": r"3695",
"match": False
}
}
LOGGER = logging.getLogger(__name__)
def _configure_logging(args):
log_f... | 37.008197 | 111 | 0.5701 |
79853b87230d08a7b29b3d0b6238207895914850 | 3,393 | py | Python | test/optim/test_computations.py | PwLo3K46/vivit | 937642975be2ade122632d4eaef273461992d7ab | [
"MIT"
] | 1 | 2021-06-07T05:15:22.000Z | 2021-06-07T05:15:22.000Z | test/optim/test_computations.py | PwLo3K46/vivit | 937642975be2ade122632d4eaef273461992d7ab | [
"MIT"
] | 2 | 2021-08-10T12:45:37.000Z | 2021-08-10T12:49:51.000Z | test/optim/test_computations.py | PwLo3K46/vivit | 937642975be2ade122632d4eaef273461992d7ab | [
"MIT"
] | null | null | null | """Test ``vivit.optim.computations``."""
from test.implementation.optim_autograd import AutogradOptimExtensions
from test.implementation.optim_backpack import BackpackOptimExtensions
from test.optim.settings import (
IDS_REDUCTION_MEAN,
PARAM_BLOCKS_FN,
PARAM_BLOCKS_FN_IDS,
PROBLEMS_REDUCTION_MEAN,
... | 34.622449 | 86 | 0.749484 |
79853bf4ea297fbdda829d818009796eb88e3bd9 | 63,297 | py | Python | huaweicloud-sdk-drs/huaweicloudsdkdrs/v3/drs_client.py | NQLoong/huaweicloud-sdk-python-v3 | 677944a0b722147c6e105c53df9110724d64152a | [
"Apache-2.0"
] | 1 | 2021-11-03T07:54:50.000Z | 2021-11-03T07:54:50.000Z | huaweicloud-sdk-drs/huaweicloudsdkdrs/v3/drs_client.py | mawenbo-huawei/huaweicloud-sdk-python-v3 | 677944a0b722147c6e105c53df9110724d64152a | [
"Apache-2.0"
] | null | null | null | huaweicloud-sdk-drs/huaweicloudsdkdrs/v3/drs_client.py | mawenbo-huawei/huaweicloud-sdk-python-v3 | 677944a0b722147c6e105c53df9110724d64152a | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
from __future__ import absolute_import
import datetime
import re
import importlib
import six
from huaweicloudsdkcore.client import Client, ClientBuilder
from huaweicloudsdkcore.exceptions import exceptions
from huaweicloudsdkcore.utils import http_utils
from huaweicloudsdkcore.sdk_stream_request imp... | 30.11275 | 198 | 0.624753 |
79853ce0db14b8174923414bf11f6382a00a4780 | 7,742 | py | Python | pytorch_pipeline/core.py | yasufumy/torchdata | ed837afa366638fb19656bcc234903d266ac2910 | [
"MIT"
] | 6 | 2020-06-28T15:00:14.000Z | 2021-08-19T05:58:34.000Z | pytorch_pipeline/core.py | tofunlp/torchpipe | ed837afa366638fb19656bcc234903d266ac2910 | [
"MIT"
] | 21 | 2019-08-20T00:42:00.000Z | 2020-01-02T07:13:16.000Z | pytorch_pipeline/core.py | yasufumy/torchpipe | ed837afa366638fb19656bcc234903d266ac2910 | [
"MIT"
] | 2 | 2020-12-14T14:57:30.000Z | 2021-09-13T17:32:19.000Z | from typing import Any, Iterator, Iterable, Tuple, List, Callable
import warnings
import _collections_abc
import random
import itertools
import lineflow as lf
from torch.utils.data import IterableDataset
from torch.utils.data import get_worker_info
class Dataset(IterableDataset):
def __init__(self, dataset: Iter... | 30.722222 | 94 | 0.627616 |
79853d2c6c355633cba2bde7e7e990bccc19a36d | 509 | py | Python | farm_management/users/tests/test_tasks.py | alexanders0/farm-management | 53ed821bbbed312848cf331f8f961ef16c59fb99 | [
"MIT"
] | 1 | 2021-07-11T23:26:10.000Z | 2021-07-11T23:26:10.000Z | farm_management/users/tests/test_tasks.py | alexanders0/farm-management | 53ed821bbbed312848cf331f8f961ef16c59fb99 | [
"MIT"
] | 1 | 2021-07-13T02:09:37.000Z | 2021-07-17T09:30:15.000Z | farm_management/users/tests/test_tasks.py | alexanders0/farm-management | 53ed821bbbed312848cf331f8f961ef16c59fb99 | [
"MIT"
] | null | null | null | import pytest
from celery.result import EagerResult
from farm_management.users.tasks import get_users_count
from farm_management.users.tests.factories import UserFactory
pytestmark = pytest.mark.django_db
def test_user_count(settings):
"""A basic test to execute the get_users_count Celery task."""
UserFacto... | 29.941176 | 66 | 0.795678 |
79853e0b3a2f06adfe6bf10c01f19ed291ca8a96 | 3,063 | py | Python | tests/chat/test_invalid_types.py | Sanquira/immortalfighters | 388018bfb5df4e4fdadb866a599b46e0387add6e | [
"MIT"
] | null | null | null | tests/chat/test_invalid_types.py | Sanquira/immortalfighters | 388018bfb5df4e4fdadb866a599b46e0387add6e | [
"MIT"
] | 5 | 2020-02-20T10:20:33.000Z | 2021-09-22T18:43:04.000Z | tests/chat/test_invalid_types.py | Sanquira/immortalfighters | 388018bfb5df4e4fdadb866a599b46e0387add6e | [
"MIT"
] | null | null | null | """
Tests that server successfully rejects invalid messages
"""
import pytest
from tests.chat.utils import next_error, is_error, next_message_of_type
@pytest.mark.asyncio
@pytest.mark.django_db
async def test_number_type(connected_communicator, user1, room1):
"""Tests sending message with numeric type"""
com... | 28.896226 | 76 | 0.704538 |
79853e6972e77eb8eae3f6226780216e4a28951a | 51,962 | py | Python | PPB.PythonService/Services/lgxDevice.py | mingmingruyuedlut/PPBWebApp | 2909f6ac057d7f2d3dd284084f2c150df5701612 | [
"MIT"
] | 1 | 2020-02-13T02:15:26.000Z | 2020-02-13T02:15:26.000Z | PPB/Services/lgxDevice.py | mingmingruyuedlut/PPBWebApp | 2909f6ac057d7f2d3dd284084f2c150df5701612 | [
"MIT"
] | null | null | null | PPB/Services/lgxDevice.py | mingmingruyuedlut/PPBWebApp | 2909f6ac057d7f2d3dd284084f2c150df5701612 | [
"MIT"
] | null | null | null | '''
Copyright 2017 Dustin Roeder (dmroeder@gmail.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applica... | 39.878741 | 85 | 0.512067 |
79853ec3184ca74534537bf5da1a432480350b63 | 11,422 | py | Python | sphinx/conf.py | calebho/gameanalysis | 280726a8aa125850b827a1e10b1203e91f515461 | [
"Apache-2.0"
] | 7 | 2017-05-17T10:40:45.000Z | 2021-10-30T12:20:24.000Z | sphinx/conf.py | calebho/gameanalysis | 280726a8aa125850b827a1e10b1203e91f515461 | [
"Apache-2.0"
] | 1 | 2016-11-07T12:10:18.000Z | 2016-11-07T12:10:18.000Z | sphinx/conf.py | calebho/gameanalysis | 280726a8aa125850b827a1e10b1203e91f515461 | [
"Apache-2.0"
] | 3 | 2015-05-04T19:58:32.000Z | 2016-05-17T14:08:28.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Game Analysis documentation build configuration file, created by
# sphinx-quickstart on Tue Oct 11 11:15:47 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in thi... | 29.667532 | 80 | 0.6948 |
79853f01d113f65d57cb6124b1808ffde54f9983 | 399 | py | Python | multiplex/migrations/0017_auto_20201016_2100.py | semani01/OnlineTicketBooking | f45e2ac2c843bebbd9f915b61c522e29907b4d5e | [
"MIT"
] | null | null | null | multiplex/migrations/0017_auto_20201016_2100.py | semani01/OnlineTicketBooking | f45e2ac2c843bebbd9f915b61c522e29907b4d5e | [
"MIT"
] | null | null | null | multiplex/migrations/0017_auto_20201016_2100.py | semani01/OnlineTicketBooking | f45e2ac2c843bebbd9f915b61c522e29907b4d5e | [
"MIT"
] | 1 | 2022-01-05T10:36:51.000Z | 2022-01-05T10:36:51.000Z | # Generated by Django 3.0.5 on 2020-10-16 15:30
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('multiplex', '0016_movie_theatre'),
]
operations = [
migrations.AlterField(
model_name='movie',
name='description',
... | 21 | 62 | 0.60401 |
79853f42824f6b6c16ac636783a76c7648b71946 | 945 | py | Python | genomedashboard/views.py | taoteg/genomedashboard_v2 | c1ce1ec986241fa7ec7e846011f769b94b7cc8a3 | [
"BSD-3-Clause"
] | null | null | null | genomedashboard/views.py | taoteg/genomedashboard_v2 | c1ce1ec986241fa7ec7e846011f769b94b7cc8a3 | [
"BSD-3-Clause"
] | 7 | 2020-02-12T01:19:27.000Z | 2022-02-10T08:52:42.000Z | genomedashboard/views.py | taoteg/genomedashboard_v2 | c1ce1ec986241fa7ec7e846011f769b94b7cc8a3 | [
"BSD-3-Clause"
] | 1 | 2021-06-25T16:13:09.000Z | 2021-06-25T16:13:09.000Z | # from django.shortcuts import get_object_or_404, render
from django.views import generic
# def index(request):
# template_name = 'genomedashboard/index.html'
# index_context_object = []
# context = {'index_context_object': index_context_object}
# return render(request, template_name, context)
class... | 27.794118 | 64 | 0.677249 |
79853f4e1ad0049d61f62c8c3fcc5836c22252e0 | 735 | py | Python | task_manager/tasks/cascade.py | kunatastic/kunatastic-task-manager | 06f60d5ba8bb5bc1b10ab98b6475a64780341416 | [
"MIT"
] | null | null | null | task_manager/tasks/cascade.py | kunatastic/kunatastic-task-manager | 06f60d5ba8bb5bc1b10ab98b6475a64780341416 | [
"MIT"
] | null | null | null | task_manager/tasks/cascade.py | kunatastic/kunatastic-task-manager | 06f60d5ba8bb5bc1b10ab98b6475a64780341416 | [
"MIT"
] | null | null | null | from django.db import transaction
from tasks.models import Task
# https://docs.djangoproject.com/en/4.0/topics/db/transactions/#controlling-transactions-explicitly
@transaction.atomic
def cascade_logic(user, priority):
store = []
# Array of continuous tasks with increasing priority by 1
while Task.objects... | 43.235294 | 104 | 0.727891 |
798540715e20098ee8845fd7241447859eb02434 | 1,076 | py | Python | leetcode/medium/93-Restore_ip_address.py | shubhamoli/practice | 5a24fdeb6e5f43b821ef0510fe3b343ddda18f22 | [
"MIT"
] | 1 | 2020-02-25T10:32:27.000Z | 2020-02-25T10:32:27.000Z | leetcode/medium/93-Restore_ip_address.py | shubhamoli/practice | 5a24fdeb6e5f43b821ef0510fe3b343ddda18f22 | [
"MIT"
] | null | null | null | leetcode/medium/93-Restore_ip_address.py | shubhamoli/practice | 5a24fdeb6e5f43b821ef0510fe3b343ddda18f22 | [
"MIT"
] | null | null | null | """
Leetcode #93
"""
from typing import List
class Solution:
def restoreIpAddresses(self, s: str) -> List[str]:
if not s or len(s) < 4:
return []
res = []
def helper(curr, idx):
if idx == len(s) and len(curr) == 4:
res.append(".".join(curr))
... | 24.454545 | 94 | 0.477695 |
79854193dada86e7c174de0a0d07e17276022719 | 615 | py | Python | EstruturasControle/EstruturasRepeticao/ForComElse.py | VictorMello1993/CursoPythonUdemy | d3e2e542a7c3d3f9635f2b88d0e75ab4fa84236d | [
"MIT"
] | null | null | null | EstruturasControle/EstruturasRepeticao/ForComElse.py | VictorMello1993/CursoPythonUdemy | d3e2e542a7c3d3f9635f2b88d0e75ab4fa84236d | [
"MIT"
] | 4 | 2021-04-08T21:54:09.000Z | 2022-02-10T14:35:13.000Z | EstruturasControle/EstruturasRepeticao/ForComElse.py | VictorMello1993/CursoPythonUdemy | d3e2e542a7c3d3f9635f2b88d0e75ab4fa84236d | [
"MIT"
] | null | null | null | # %% [markdown]
# FOR com else
PALAVRAS_PROIBIDAS = ('religião', 'política', 'esquerdista', 'direita')
textos = [
'Victor não gosta de política',
'Gosto de assistir Netflix',
'Victor não é esquerdista nem de direita',
'Nunca se mistura política com religião'
]
#Versão 1
for texto in textos:
f... | 27.954545 | 84 | 0.606504 |
798541ffcf0b53d9894acb54127a361a5dcf10e1 | 4,351 | py | Python | module_api/roger/proto.py | rogertalk/roger-api | 7228d96910ab0a96af53ca2830115d5fc5e1de79 | [
"MIT"
] | 3 | 2019-05-19T22:21:44.000Z | 2020-04-26T01:58:55.000Z | module_api/roger/proto.py | rogertalk/roger-api | 7228d96910ab0a96af53ca2830115d5fc5e1de79 | [
"MIT"
] | null | null | null | module_api/roger/proto.py | rogertalk/roger-api | 7228d96910ab0a96af53ca2830115d5fc5e1de79 | [
"MIT"
] | null | null | null | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: roger.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflect... | 32.470149 | 336 | 0.736842 |
79854243fb05f7bfa67bfe40dbad9ffb9ef7bfab | 166 | py | Python | Ch_2_Py Ingredient_Number_String_Variables/2_2.py | brianchiang-tw/Introducing_Python | 557fcddb6329741a177d6ee1d24122b36e106235 | [
"MIT"
] | 1 | 2020-07-21T08:34:08.000Z | 2020-07-21T08:34:08.000Z | Ch_2_Py Ingredient_Number_String_Variables/2_2.py | brianchiang-tw/Introducing_Python | 557fcddb6329741a177d6ee1d24122b36e106235 | [
"MIT"
] | null | null | null | Ch_2_Py Ingredient_Number_String_Variables/2_2.py | brianchiang-tw/Introducing_Python | 557fcddb6329741a177d6ee1d24122b36e106235 | [
"MIT"
] | null | null | null | sec_per_min = 60
min_per_hour = 60
hour_per_day = 24
seconds_per_hour = sec_per_min*min_per_hour
# How many seconds are there in one hour?
print( seconds_per_hour ) | 20.75 | 43 | 0.795181 |
798543616f4ff953a0366376bb3ffc909d0cf742 | 1,560 | py | Python | dirmap/deep.py | vfxetc/dirmap | d22eb44ec151394ad0060a8e337449ede1020895 | [
"BSD-3-Clause"
] | 3 | 2018-04-21T16:30:54.000Z | 2019-07-19T01:22:38.000Z | dirmap/deep.py | vfxetc/dirmap | d22eb44ec151394ad0060a8e337449ede1020895 | [
"BSD-3-Clause"
] | null | null | null | dirmap/deep.py | vfxetc/dirmap | d22eb44ec151394ad0060a8e337449ede1020895 | [
"BSD-3-Clause"
] | 1 | 2019-07-19T01:22:44.000Z | 2019-07-19T01:22:44.000Z |
def deep_apply(func, obj, dict_keys=False):
"""Apply func to everything in the given structure.
This works predictably with dicts, lists, sets and tuples. Any classes
which extend them are assumed to be able to be called with empty
constructors (except the tuple which will be passed a generator).
... | 28.363636 | 92 | 0.613462 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.