hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3129b4e07525b3bb8f25773db96fb8cb8950760d | 13,717 | py | Python | src/Source.py | SGEthan/Info_Retrieving | 158376a8796abbfa239d316ee91ddc6436243476 | [
"MIT"
] | null | null | null | src/Source.py | SGEthan/Info_Retrieving | 158376a8796abbfa239d316ee91ddc6436243476 | [
"MIT"
] | null | null | null | src/Source.py | SGEthan/Info_Retrieving | 158376a8796abbfa239d316ee91ddc6436243476 | [
"MIT"
] | null | null | null | import json
from nltk import word_tokenize
from nltk.corpus import stopwords
from nltk.stem.porter import PorterStemmer
import os
import re
import math
from scipy import sparse
import numpy as np
from scipy import spatial
import time
ORIGINAL_ARTICLE_PATH = '../dataset/US_Financial_News_Articles/'
EDITED_TEXT_PATH = '... | 30.824719 | 105 | 0.597725 |
6c26876073a7d268b18be30f7fb47bffa6534385 | 88 | py | Python | nanome/_internal/_network/_commands/_callbacks/_load_file_done.py | devanshuDesai/nanome | aabb536ef498044e97bc97ed71af940358bf36f2 | [
"MIT"
] | null | null | null | nanome/_internal/_network/_commands/_callbacks/_load_file_done.py | devanshuDesai/nanome | aabb536ef498044e97bc97ed71af940358bf36f2 | [
"MIT"
] | null | null | null | nanome/_internal/_network/_commands/_callbacks/_load_file_done.py | devanshuDesai/nanome | aabb536ef498044e97bc97ed71af940358bf36f2 | [
"MIT"
] | null | null | null | def _load_file_done(network, result, request_id):
network._call(request_id, result)
| 29.333333 | 49 | 0.784091 |
5cba20420027712adf0c7d8a81df4f915efb2a3c | 3,017 | py | Python | zamba/models/cnnensemble/src/utils.py | qyj0731/data_work | ba303ce696ae5fefe05d05654fcf65682448e42f | [
"MIT"
] | null | null | null | zamba/models/cnnensemble/src/utils.py | qyj0731/data_work | ba303ce696ae5fefe05d05654fcf65682448e42f | [
"MIT"
] | null | null | null | zamba/models/cnnensemble/src/utils.py | qyj0731/data_work | ba303ce696ae5fefe05d05654fcf65682448e42f | [
"MIT"
] | null | null | null | import math
import pickle
import time
import random
from contextlib import contextmanager
import concurrent.futures
from queue import Queue
import numpy as np
import skvideo.io
import skimage.transform
def preprocessed_input_to_img_resnet(x):
# Zero-center by mean pixel
x = x.copy()
x[:, :, 0] += 103.939
... | 28.196262 | 88 | 0.557507 |
a63bb32f09e6e06183903f04e51f1688cf14a2d9 | 5,776 | py | Python | kgx/graph_operations/graph_merge.py | gouttegd/kgx | 1efa0bfaf62113855ffc1d002903236e4ff8706a | [
"BSD-3-Clause"
] | 32 | 2020-10-21T17:35:27.000Z | 2022-03-17T02:40:08.000Z | kgx/graph_operations/graph_merge.py | gouttegd/kgx | 1efa0bfaf62113855ffc1d002903236e4ff8706a | [
"BSD-3-Clause"
] | 136 | 2018-04-24T02:15:39.000Z | 2020-10-02T00:14:13.000Z | kgx/graph_operations/graph_merge.py | gouttegd/kgx | 1efa0bfaf62113855ffc1d002903236e4ff8706a | [
"BSD-3-Clause"
] | 19 | 2018-05-03T17:03:08.000Z | 2020-07-15T22:12:40.000Z | import copy
from typing import List
from kgx.config import get_logger
from kgx.graph.base_graph import BaseGraph
from kgx.utils.kgx_utils import prepare_data_dict
log = get_logger()
def merge_all_graphs(graphs: List[BaseGraph], preserve: bool = True) -> BaseGraph:
"""
Merge one or more graphs.
.. note... | 26.990654 | 105 | 0.621711 |
ca30f97beff341ebbf7e24707bc35bf04e81b0e3 | 23,951 | py | Python | sphinx/cmd/quickstart.py | samdoran/sphinx | 4c91c038b220d07bbdfe0c1680af42fe897f342c | [
"BSD-2-Clause"
] | 4,973 | 2015-01-03T15:44:00.000Z | 2022-03-31T03:11:51.000Z | sphinx/cmd/quickstart.py | samdoran/sphinx | 4c91c038b220d07bbdfe0c1680af42fe897f342c | [
"BSD-2-Clause"
] | 7,850 | 2015-01-02T08:09:25.000Z | 2022-03-31T18:57:40.000Z | sphinx/cmd/quickstart.py | samdoran/sphinx | 4c91c038b220d07bbdfe0c1680af42fe897f342c | [
"BSD-2-Clause"
] | 2,179 | 2015-01-03T15:26:53.000Z | 2022-03-31T12:22:44.000Z | """
sphinx.cmd.quickstart
~~~~~~~~~~~~~~~~~~~~~
Quickly setup documentation source to work with Sphinx.
:copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import argparse
import locale
import os
import sys
import time
from collections impo... | 39.199673 | 118 | 0.58866 |
662ff00e75076ee6152f0abd5c703559d2f9b2bf | 5,897 | py | Python | queue_services/entity-filer/tests/unit/filing_processors/test_alteration.py | vysakh-menon-aot/lear | 7bae45efa2f9f89a7e826567c85de55fde68e09e | [
"Apache-2.0"
] | 8 | 2019-06-19T16:16:15.000Z | 2021-08-28T23:56:40.000Z | queue_services/entity-filer/tests/unit/filing_processors/test_alteration.py | vysakh-menon-aot/lear | 7bae45efa2f9f89a7e826567c85de55fde68e09e | [
"Apache-2.0"
] | 796 | 2019-03-07T19:25:50.000Z | 2022-03-31T20:32:57.000Z | queue_services/entity-filer/tests/unit/filing_processors/test_alteration.py | vysakh-menon-aot/lear | 7bae45efa2f9f89a7e826567c85de55fde68e09e | [
"Apache-2.0"
] | 82 | 2019-01-30T20:06:14.000Z | 2022-03-29T20:38:31.000Z | # Copyright © 2020 Province of British Columbia
#
# 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... | 39.577181 | 111 | 0.744446 |
efec5c9369ffee7504a3f25914739553d99058e0 | 4,611 | py | Python | wlanpi_core/api/api_v1/endpoints/network_api.py | WLAN-Pi/wlanpi-core | 7c626dac990c8240b45813ab5878041d1f3569c4 | [
"BSD-3-Clause"
] | 1 | 2021-09-07T05:30:02.000Z | 2021-09-07T05:30:02.000Z | wlanpi_core/api/api_v1/endpoints/network_api.py | WLAN-Pi/wlanpi-core | 7c626dac990c8240b45813ab5878041d1f3569c4 | [
"BSD-3-Clause"
] | 13 | 2021-09-12T15:42:03.000Z | 2022-02-21T22:20:54.000Z | wlanpi_core/api/api_v1/endpoints/network_api.py | WLAN-Pi/wlanpi-core | 7c626dac990c8240b45813ab5878041d1f3569c4 | [
"BSD-3-Clause"
] | null | null | null | import json
import logging
from fastapi import APIRouter, Response
from starlette.responses import JSONResponse
from wlanpi_core.models.validation_error import ValidationError
from wlanpi_core.schemas import network
from wlanpi_core.services import network_service
router = APIRouter()
log = logging.getLogger("uvico... | 33.904412 | 90 | 0.679896 |
0bcacbe7f47c821cb8c1a705b44ae138a8b3a3bd | 386 | py | Python | Food/migrations/0011_menuitem_position.py | PopaGabriel/Food-Ecommerce-Site | 7f7cde94939f02f13df5afa865cddc72981481e2 | [
"MIT"
] | 1 | 2021-08-12T08:46:56.000Z | 2021-08-12T08:46:56.000Z | Food/migrations/0011_menuitem_position.py | PopaGabriel/Food-Ecommerce-Site | 7f7cde94939f02f13df5afa865cddc72981481e2 | [
"MIT"
] | null | null | null | Food/migrations/0011_menuitem_position.py | PopaGabriel/Food-Ecommerce-Site | 7f7cde94939f02f13df5afa865cddc72981481e2 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.5 on 2021-10-10 16:39
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('Food', '0010_alter_menuitem_image'),
]
operations = [
migrations.AddField(
model_name='menuitem',
name='position',
... | 20.315789 | 49 | 0.598446 |
cfc9a45a1d22745dde072ab72a62a4aea85626f6 | 1,847 | py | Python | test/gst-msdk/vpp/brightness.py | ChipsnMedia/vaapi-fits | c7671a2c4d331c1031b89b799d196fbca85fe2d0 | [
"BSD-3-Clause"
] | null | null | null | test/gst-msdk/vpp/brightness.py | ChipsnMedia/vaapi-fits | c7671a2c4d331c1031b89b799d196fbca85fe2d0 | [
"BSD-3-Clause"
] | null | null | null | test/gst-msdk/vpp/brightness.py | ChipsnMedia/vaapi-fits | c7671a2c4d331c1031b89b799d196fbca85fe2d0 | [
"BSD-3-Clause"
] | 1 | 2021-07-15T02:07:26.000Z | 2021-07-15T02:07:26.000Z | ###
### Copyright (C) 2018-2019 Intel Corporation
###
### SPDX-License-Identifier: BSD-3-Clause
###
from ....lib import *
from ....lib.gstreamer.msdk.util import *
from ....lib.gstreamer.msdk.vpp import VppTest
spec = load_test_spec("vpp", "brightness")
spec_r2r = load_test_spec("vpp", "brightness", "r2r")
@sl... | 31.305085 | 81 | 0.639415 |
277b4acbc1def45961351e8326b49eea71cb7342 | 1,093 | py | Python | lists_dictionary/Bread Factory.py | vasetousa/Python-fundamentals | 3180c03de28b4f4d36d966221719069a7e18e521 | [
"MIT"
] | null | null | null | lists_dictionary/Bread Factory.py | vasetousa/Python-fundamentals | 3180c03de28b4f4d36d966221719069a7e18e521 | [
"MIT"
] | null | null | null | lists_dictionary/Bread Factory.py | vasetousa/Python-fundamentals | 3180c03de28b4f4d36d966221719069a7e18e521 | [
"MIT"
] | null | null | null | events = input().split("|")
energy = 100
coins = 100
for el in range(len(events)):
string = events[el]
order, value = string.split("-")
value = int(value)
if order == "rest":
energy += value
if energy > 100:
energy = 100
difference = 100 - energy
prin... | 25.418605 | 56 | 0.486734 |
bcecbad62a1b03d29a9ffb2b0663d02dd5fe10d2 | 779 | py | Python | message/backends/email.py | gucciwu/cycling-cap-pyrenees | 66f62dc5c074029801cddde3319a507d8c182374 | [
"MIT"
] | null | null | null | message/backends/email.py | gucciwu/cycling-cap-pyrenees | 66f62dc5c074029801cddde3319a507d8c182374 | [
"MIT"
] | null | null | null | message/backends/email.py | gucciwu/cycling-cap-pyrenees | 66f62dc5c074029801cddde3319a507d8c182374 | [
"MIT"
] | null | null | null | import logging
from django.core.mail import send_mail
from message.backends.Base import BaseEmailBackend
from entry import settings
from message.exceptions import EmailException
from message.models import Message
logger = logging.getLogger(__name__)
class DjangoEmailBackend(BaseEmailBackend):
@staticmethod
... | 32.458333 | 69 | 0.634146 |
c3d44a9bd633d0454326fb97bda3ea9e07cf1fc3 | 12,485 | py | Python | sdk/python/pulumi_azure_native/compute/v20150615/virtual_machine_extension.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/compute/v20150615/virtual_machine_extension.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/compute/v20150615/virtual_machine_extension.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 53.814655 | 2,318 | 0.69139 |
b012e32788dc3ca91765ed0b393c572b5b6ae4b0 | 16,475 | py | Python | makibot/modules/misc.py | ThinkinCoin/custom-tg-bot | 3a7780941faa2e8c2723ac137ff65f8b9660dca7 | [
"MIT"
] | null | null | null | makibot/modules/misc.py | ThinkinCoin/custom-tg-bot | 3a7780941faa2e8c2723ac137ff65f8b9660dca7 | [
"MIT"
] | null | null | null | makibot/modules/misc.py | ThinkinCoin/custom-tg-bot | 3a7780941faa2e8c2723ac137ff65f8b9660dca7 | [
"MIT"
] | null | null | null | import html
import json
import random
from datetime import datetime
from typing import Optional, List
import requests
from telegram import Message, Chat, Update, Bot, MessageEntity
from telegram import ParseMode
from telegram.ext import CommandHandler, run_async, Filters
from telegram.utils.helpers import escape_markd... | 39.319809 | 177 | 0.639697 |
1999ad074916e8ac747fd7ca4a69e659366c28c0 | 1,890 | py | Python | results-processor/gsutil.py | CYBAI/wpt.fyi | cbe016a911e104a7fd58ba1a7db22ea8bbe2da16 | [
"BSD-3-Clause"
] | 1 | 2021-01-07T18:49:47.000Z | 2021-01-07T18:49:47.000Z | results-processor/gsutil.py | CYBAI/wpt.fyi | cbe016a911e104a7fd58ba1a7db22ea8bbe2da16 | [
"BSD-3-Clause"
] | null | null | null | results-processor/gsutil.py | CYBAI/wpt.fyi | cbe016a911e104a7fd58ba1a7db22ea8bbe2da16 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2018 The WPT Dashboard Project. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import logging
import subprocess
_log = logging.getLogger(__name__)
def _call(command, quiet=False):
_log.info('EXEC%s: %s',
'(qui... | 30.483871 | 78 | 0.628042 |
af81602dab309a46e3da4f2622a4fb223b9662d6 | 1,273 | py | Python | git_report.py | JMast3rs/netcfgbu-plugin-teams | e48da57602dac4df160c546175447614ba7772a2 | [
"MIT"
] | null | null | null | git_report.py | JMast3rs/netcfgbu-plugin-teams | e48da57602dac4df160c546175447614ba7772a2 | [
"MIT"
] | null | null | null | git_report.py | JMast3rs/netcfgbu-plugin-teams | e48da57602dac4df160c546175447614ba7772a2 | [
"MIT"
] | null | null | null |
import pymsteams, requests
teams_webhook_url = "<< Insert Teams Webhook URL>>"
teams_git_repository_url = "<< Insert GitLab Repo URL (without .git) >>"
teams_git_repository_id = "<< Insert GitLab Repo ID >>"
teams_git_token = "<< Insert GitLab Access Token >>"
class Teams_Git(Plugin):
name = "Teams_Git"
d... | 38.575758 | 151 | 0.658288 |
be1c8cf1de2fa6ec7a423cd2a4279667c11ff31e | 8,434 | py | Python | poetry/puzzle/solver.py | tadeoos/poetry | de73fa07386be26d32bf15044fd81bf979787b9f | [
"MIT"
] | null | null | null | poetry/puzzle/solver.py | tadeoos/poetry | de73fa07386be26d32bf15044fd81bf979787b9f | [
"MIT"
] | null | null | null | poetry/puzzle/solver.py | tadeoos/poetry | de73fa07386be26d32bf15044fd81bf979787b9f | [
"MIT"
] | null | null | null | from typing import List
from poetry.mixology import resolve_version
from poetry.mixology.failure import SolveFailure
from poetry.packages.constraints.generic_constraint import GenericConstraint
from poetry.semver import parse_constraint
from .exceptions import SolverProblemError
from .operations import Install
from... | 32.689922 | 85 | 0.50996 |
49c916a43d78137ea22a94b7071b91fb7165c321 | 6,814 | py | Python | test/test_fold.py | f-dangel/unfoldNd | 63e9abc4867d8678c2ac00da567dc106e9f6f2c7 | [
"MIT"
] | 21 | 2021-03-04T04:56:20.000Z | 2022-03-31T11:15:28.000Z | test/test_fold.py | f-dangel/unfoldNd | 63e9abc4867d8678c2ac00da567dc106e9f6f2c7 | [
"MIT"
] | 12 | 2021-02-16T16:16:23.000Z | 2021-05-28T06:00:41.000Z | test/test_fold.py | f-dangel/unfoldNd | 63e9abc4867d8678c2ac00da567dc106e9f6f2c7 | [
"MIT"
] | 1 | 2021-11-04T12:52:19.000Z | 2021-11-04T12:52:19.000Z | """Tests for ``unfoldNd/fold.py.`` (fold functionality)."""
from test.fold_settings import (
DEVICES,
DEVICES_ID,
PRECISION_PROBLEMS_2D,
PRECISION_PROBLEMS_2D_IDS,
PROBLEMS_2D,
PROBLEMS_2D_IDS,
PROBLEMS_INVERSE,
PROBLEMS_INVERSE_IDS,
UNSUPPORTED_ARGS_PROBLEMS,
UNSUPPORTED_ARGS_P... | 34.414141 | 86 | 0.736131 |
aba89e44ac77b292be4a075f307dfaefdc6d4ef6 | 8,567 | py | Python | tests/importer/test_importer.py | peeley/hy | 03404e45bda2aca9aa6040e8c9fa5da5bfa598ef | [
"MIT"
] | null | null | null | tests/importer/test_importer.py | peeley/hy | 03404e45bda2aca9aa6040e8c9fa5da5bfa598ef | [
"MIT"
] | null | null | null | tests/importer/test_importer.py | peeley/hy | 03404e45bda2aca9aa6040e8c9fa5da5bfa598ef | [
"MIT"
] | null | null | null | # Copyright 2019 the authors.
# This file is part of Hy, which is free software licensed under the Expat
# license. See the LICENSE.
import os
import sys
import ast
import tempfile
import runpy
import importlib
from fractions import Fraction
from importlib import reload
import pytest
import hy
from hy.lex import hy... | 29.339041 | 82 | 0.621454 |
3fd38430637be48e1c877b3f52d6934e4fd918c1 | 942 | py | Python | st2common/st2common/exceptions/ssh.py | machao19902/st2 | 6768a529af1b3c12109cbfeae19d3cf7fdb71bb7 | [
"Apache-2.0"
] | 1 | 2020-11-09T21:05:33.000Z | 2020-11-09T21:05:33.000Z | st2common/st2common/exceptions/ssh.py | machao19902/st2 | 6768a529af1b3c12109cbfeae19d3cf7fdb71bb7 | [
"Apache-2.0"
] | 3 | 2021-03-25T23:57:10.000Z | 2021-03-26T00:01:05.000Z | st2common/st2common/exceptions/ssh.py | machao19902/st2 | 6768a529af1b3c12109cbfeae19d3cf7fdb71bb7 | [
"Apache-2.0"
] | null | null | null | # Licensed to the StackStorm, Inc ('StackStorm') 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 use th... | 34.888889 | 74 | 0.771762 |
ccf8e6cec1c4edc72fe139ad14fb27bfc013d777 | 1,543 | py | Python | test_data.py | BlitzKraft/xkcd_random_test | 99e0a69999e2e220a60f19ea99d706f6187ba1ba | [
"Unlicense"
] | null | null | null | test_data.py | BlitzKraft/xkcd_random_test | 99e0a69999e2e220a60f19ea99d706f6187ba1ba | [
"Unlicense"
] | null | null | null | test_data.py | BlitzKraft/xkcd_random_test | 99e0a69999e2e220a60f19ea99d706f6187ba1ba | [
"Unlicense"
] | null | null | null | import random
import matplotlib
matplotlib.use('agg')
from matplotlib import pyplot as plt # pylint: disable=C0413
# number of comics read per week
READ_COMICS = 400
# number of comics released per week
RELEASED_COMICS = 3
START = 1700
END = 2140
# number of additional iterations after latest comic
TAIL_ITERS = 1
... | 28.574074 | 66 | 0.663642 |
363513efae35741465beb662f97998e35b9da19d | 2,917 | py | Python | examples/python/chemical_balance_sat.py | klorel/or-tools | f3fd201e68cf75b7720ff5c3cadc599a1d02b54b | [
"Apache-2.0"
] | 1 | 2019-07-15T14:30:18.000Z | 2019-07-15T14:30:18.000Z | examples/python/chemical_balance_sat.py | klorel/or-tools | f3fd201e68cf75b7720ff5c3cadc599a1d02b54b | [
"Apache-2.0"
] | 1 | 2021-02-23T10:22:55.000Z | 2021-02-23T13:57:14.000Z | examples/python/chemical_balance_sat.py | klorel/or-tools | f3fd201e68cf75b7720ff5c3cadc599a1d02b54b | [
"Apache-2.0"
] | 2 | 2020-02-26T18:11:33.000Z | 2020-12-02T07:44:34.000Z | # Copyright 2010-2018 Google LLC
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | 33.147727 | 80 | 0.63867 |
3d9d21deaed68cb4cba7ddcffc5675160229f3f8 | 2,973 | py | Python | colliflow/python/examples/shared_modules.py | YodaEmbedding/colliflow | 524a9397878ce2e7dde6a4526a91f866c03fc3e7 | [
"MIT"
] | 1 | 2021-02-08T22:20:34.000Z | 2021-02-08T22:20:34.000Z | colliflow/python/examples/shared_modules.py | YodaEmbedding/colliflow | 524a9397878ce2e7dde6a4526a91f866c03fc3e7 | [
"MIT"
] | null | null | null | colliflow/python/examples/shared_modules.py | YodaEmbedding/colliflow | 524a9397878ce2e7dde6a4526a91f866c03fc3e7 | [
"MIT"
] | null | null | null | from time import sleep, time
from typing import Tuple
import rx
import rx.operators as ops
from colliflow import InputAsyncModule, Model, Module, SymbolicTensor, Tensor
epoch = time()
def get_time():
return time() - epoch
class Preprocessor(Module):
def __init__(self, **kwargs):
super().__init__(... | 25.62931 | 79 | 0.638412 |
2b5f50ebe9ddb18064687bbe315410fec83b16fc | 3,217 | py | Python | tests/web/test_galaxy.py | jvazquez77/marvin | f7f2c498c1a2cfa19ab96c51eebbbd4bde980984 | [
"BSD-3-Clause"
] | 49 | 2016-11-04T19:20:50.000Z | 2022-03-13T08:43:05.000Z | tests/web/test_galaxy.py | jvazquez77/marvin | f7f2c498c1a2cfa19ab96c51eebbbd4bde980984 | [
"BSD-3-Clause"
] | 703 | 2016-11-02T01:25:14.000Z | 2022-03-31T19:20:03.000Z | tests/web/test_galaxy.py | jvazquez77/marvin | f7f2c498c1a2cfa19ab96c51eebbbd4bde980984 | [
"BSD-3-Clause"
] | 37 | 2016-11-09T08:51:48.000Z | 2022-02-22T22:49:45.000Z | # !usr/bin/env python2
# -*- coding: utf-8 -*-
#
# Licensed under a 3-clause BSD license.
#
# @Author: Brian Cherinka
# @Date: 2017-02-22 10:38:28
# @Last modified by: Brian Cherinka
# @Last modified time: 2017-07-31 12:07:00
from __future__ import print_function, division, absolute_import
from marvin.web.controll... | 34.967391 | 102 | 0.666459 |
c93fa7f6947575813aa9486a85bca8c01e9aee90 | 450 | py | Python | test_multiple_boys.py | sorindragan/ChatBot_Th | 4f5ef81b598035d72ec5a2852a88847692bece58 | [
"MIT"
] | null | null | null | test_multiple_boys.py | sorindragan/ChatBot_Th | 4f5ef81b598035d72ec5a2852a88847692bece58 | [
"MIT"
] | null | null | null | test_multiple_boys.py | sorindragan/ChatBot_Th | 4f5ef81b598035d72ec5a2852a88847692bece58 | [
"MIT"
] | 1 | 2019-10-31T19:55:02.000Z | 2019-10-31T19:55:02.000Z | from sentence_processor import SentenceProcessor
def multiple_boys(phrase):
sp = SentenceProcessor(phrase, 0)
return sp.process()
def test_multiple_boys():
output = [('boy0', 'outraced', 'charlie'),
('boy0', 'property', 'tall'),
('boy1', 'outraced', 'charlie'),
(... | 30 | 85 | 0.595556 |
f617a62e09415c0152de39f57a64acfd7d98b984 | 900 | py | Python | BOJ/1303.py | Jaesin22/TIL | d0aa137af79c22ea9eb0ff1c7a0264c086ebe1b2 | [
"MIT"
] | null | null | null | BOJ/1303.py | Jaesin22/TIL | d0aa137af79c22ea9eb0ff1c7a0264c086ebe1b2 | [
"MIT"
] | null | null | null | BOJ/1303.py | Jaesin22/TIL | d0aa137af79c22ea9eb0ff1c7a0264c086ebe1b2 | [
"MIT"
] | null | null | null | from collections import deque
N, M = map(int, input().split())
graph = [list(input().strip()) for _ in range(M)]
visited = [[0] * N for _ in range(M)]
white, blue = 0, 0
dx = [-1,1,0,0]
dy = [0,0,-1,1]
queue = deque()
def BFS(x, y):
cnt = 1
queue.append((x, y))
visited[x][y] = 1
while queue:
... | 21.428571 | 101 | 0.431111 |
b50c8ab37ee178a3c0e8009450d113d6697e531a | 1,376 | py | Python | domain_manage/urls.py | wolfcheng/nano-cf-panel | 17235552e5cac79d05a0d1e924e0aac730678f4b | [
"MIT"
] | null | null | null | domain_manage/urls.py | wolfcheng/nano-cf-panel | 17235552e5cac79d05a0d1e924e0aac730678f4b | [
"MIT"
] | null | null | null | domain_manage/urls.py | wolfcheng/nano-cf-panel | 17235552e5cac79d05a0d1e924e0aac730678f4b | [
"MIT"
] | null | null | null | """domain_manage URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Cl... | 33.560976 | 79 | 0.694767 |
a2f5836fc834fc0558c267615bdd8d3f594d9ca3 | 45,923 | py | Python | pysimm/lmps.py | jrdcasa/pysimm | 9fc94fa658f42283b503d72886581c9acdcac5e2 | [
"MIT"
] | null | null | null | pysimm/lmps.py | jrdcasa/pysimm | 9fc94fa658f42283b503d72886581c9acdcac5e2 | [
"MIT"
] | null | null | null | pysimm/lmps.py | jrdcasa/pysimm | 9fc94fa658f42283b503d72886581c9acdcac5e2 | [
"MIT"
] | null | null | null | # ******************************************************************************
# pysimm.lmps module
# ******************************************************************************
#
# ******************************************************************************
# License
# ******************************************... | 38.205491 | 254 | 0.56647 |
bb1a648760feeae53d2fdeb72ed8b7594bd86c4b | 24,311 | py | Python | Assignments/HW10/curl_grading.py | chenchuw/EC602-Design-by-Software | c233c9d08a67abc47235282fedd866d67ccaf4ce | [
"MIT"
] | null | null | null | Assignments/HW10/curl_grading.py | chenchuw/EC602-Design-by-Software | c233c9d08a67abc47235282fedd866d67ccaf4ce | [
"MIT"
] | null | null | null | Assignments/HW10/curl_grading.py | chenchuw/EC602-Design-by-Software | c233c9d08a67abc47235282fedd866d67ccaf4ce | [
"MIT"
] | 1 | 2022-01-11T20:23:47.000Z | 2022-01-11T20:23:47.000Z | """curl_grading.py: tools for analyzing and checking C++ and Py programs"""
import subprocess as sub
import difflib
import unittest
import re
import tokenize
import dis
import io
import cpplint
import sys
import pycodestyle
import logging
import os
import random
import importlib
import multiprocessing
from io import St... | 29.720049 | 110 | 0.61141 |
7de097ffd11765a81ba7bc974ba64fe724e3a01c | 300 | py | Python | ABC/abc151-abc200/abc186/b/main.py | KATO-Hiro/AtCoder | cbbdb18e95110b604728a54aed83a6ed6b993fde | [
"CC0-1.0"
] | 2 | 2020-06-12T09:54:23.000Z | 2021-05-04T01:34:07.000Z | ABC/abc151-abc200/abc186/b/main.py | KATO-Hiro/AtCoder | cbbdb18e95110b604728a54aed83a6ed6b993fde | [
"CC0-1.0"
] | 961 | 2020-06-23T07:26:22.000Z | 2022-03-31T21:34:52.000Z | ABC/abc151-abc200/abc186/b/main.py | KATO-Hiro/AtCoder | cbbdb18e95110b604728a54aed83a6ed6b993fde | [
"CC0-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
def main():
import numpy as np
import sys
input = sys.stdin.readline
h, w = map(int, input().split())
a = [list(map(int, input().split())) for _ in range(h)]
a = np.array(a)
print(np.sum(a - np.min(a)))
if __name__ == "__main__":
main()
| 15.789474 | 59 | 0.536667 |
ff4f690faa145a5aabdd5753f3bee4a211c47b04 | 134 | py | Python | 01 arrays/test.py | harshrajm/Python-Algo-DS | 02437fa923b2b6264b29bd7ba84ccbb7feb9c8f0 | [
"MIT"
] | null | null | null | 01 arrays/test.py | harshrajm/Python-Algo-DS | 02437fa923b2b6264b29bd7ba84ccbb7feb9c8f0 | [
"MIT"
] | null | null | null | 01 arrays/test.py | harshrajm/Python-Algo-DS | 02437fa923b2b6264b29bd7ba84ccbb7feb9c8f0 | [
"MIT"
] | null | null | null | def sum1(n):
final_sum = 0
for x in range(n+1):
final_sum += x
return final_sum
print(sum1(10)) | 14.888889 | 25 | 0.5 |
bdc4fac9119368990ab32fa721e5e286a8bfd04d | 1,937 | py | Python | robot/EDA/resources/EducationCloudSettingsPageObject.py | jbrandolinisf/EDA | 16e3ad1ec2a161cfd6e233780cfc4aae677db25a | [
"BSD-3-Clause"
] | 113 | 2019-05-03T14:57:51.000Z | 2022-03-25T18:09:24.000Z | robot/EDA/resources/EducationCloudSettingsPageObject.py | aarsvoboda/EDA | a01224b38b1c0126092930e299055de5079c93be | [
"BSD-3-Clause"
] | 637 | 2019-04-30T18:29:28.000Z | 2022-03-31T22:01:08.000Z | robot/EDA/resources/EducationCloudSettingsPageObject.py | aarsvoboda/EDA | a01224b38b1c0126092930e299055de5079c93be | [
"BSD-3-Clause"
] | 52 | 2019-07-04T03:13:08.000Z | 2022-03-01T16:44:15.000Z | from BaseObjects import BaseEDAPage
from EDA import eda_lex_locators
from cumulusci.robotframework.pageobjects import HomePage
from cumulusci.robotframework.pageobjects import pageobject
import time
from datetime import date
@pageobject("Home", "Education Cloud Settings")
class EducationCloudSettingsPage(BaseEDAPage,... | 48.425 | 116 | 0.682499 |
842ece7419105e1b3f3b8d2be0f95fc5042387f0 | 1,887 | py | Python | azure-iot-device/samples/sync-samples/send_message_x509.py | dominicbetts/azure-iot-sdk-python | ea70d2a319df2d602f8102e70a4e88635febf1b8 | [
"MIT"
] | 366 | 2016-12-02T20:38:05.000Z | 2022-03-29T10:08:14.000Z | azure-iot-device/samples/sync-samples/send_message_x509.py | dominicbetts/azure-iot-sdk-python | ea70d2a319df2d602f8102e70a4e88635febf1b8 | [
"MIT"
] | 640 | 2016-12-16T21:59:48.000Z | 2022-03-30T20:17:52.000Z | azure-iot-device/samples/sync-samples/send_message_x509.py | dominicbetts/azure-iot-sdk-python | ea70d2a319df2d602f8102e70a4e88635febf1b8 | [
"MIT"
] | 371 | 2016-11-16T16:06:04.000Z | 2022-03-31T10:10:57.000Z | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
import os... | 33.105263 | 99 | 0.680445 |
f1b6001214232faaa9ba3a7cfcafc8b841d0b59b | 3,481 | py | Python | sdk/lusid/models/model_options_type.py | slemasne/lusid-sdk-python-preview | 94a97951ec2052bc1672b7be21e52ad2fcf6eea0 | [
"MIT"
] | null | null | null | sdk/lusid/models/model_options_type.py | slemasne/lusid-sdk-python-preview | 94a97951ec2052bc1672b7be21e52ad2fcf6eea0 | [
"MIT"
] | null | null | null | sdk/lusid/models/model_options_type.py | slemasne/lusid-sdk-python-preview | 94a97951ec2052bc1672b7be21e52ad2fcf6eea0 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
LUSID API
FINBOURNE Technology # noqa: E501
The version of the OpenAPI document: 0.11.3725
Contact: info@finbourne.com
Generated by: https://openapi-generator.tech
"""
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getf... | 28.300813 | 104 | 0.582304 |
8bd12d23a45ce457d7e6a2e64be5a48601b464c9 | 1,085 | py | Python | tensorkit/layers/contextual.py | lizeyan/tensorkit | 2997a5914ec3c3ec72f91eb5906b5ee878fdc020 | [
"MIT"
] | null | null | null | tensorkit/layers/contextual.py | lizeyan/tensorkit | 2997a5914ec3c3ec72f91eb5906b5ee878fdc020 | [
"MIT"
] | null | null | null | tensorkit/layers/contextual.py | lizeyan/tensorkit | 2997a5914ec3c3ec72f91eb5906b5ee878fdc020 | [
"MIT"
] | 2 | 2020-10-15T06:41:32.000Z | 2021-01-27T12:55:11.000Z | from typing import *
from ..tensor import Tensor
from .core import *
__all__ = [
'IgnoreContext', 'AddContext', 'MultiplyContext',
]
class IgnoreContext(BaseLayer):
"""
A module which simply returns the input, ignoring any context.
"""
def forward(self,
input: Tensor,
... | 22.604167 | 66 | 0.56129 |
46f5710effd1c5d925fa498a8135ffc302c49aea | 1,644 | py | Python | Python-DailyCode/CR00_playground.py | ZhangCrow/INFO_796_Faker | 27340cf544e2517efb4c40c1f894243f2f05760a | [
"MIT"
] | null | null | null | Python-DailyCode/CR00_playground.py | ZhangCrow/INFO_796_Faker | 27340cf544e2517efb4c40c1f894243f2f05760a | [
"MIT"
] | null | null | null | Python-DailyCode/CR00_playground.py | ZhangCrow/INFO_796_Faker | 27340cf544e2517efb4c40c1f894243f2f05760a | [
"MIT"
] | null | null | null | """
———————————————————————
Python3
CR00_playground.py
DailyCode 临时调试板
———————————————————————
"""
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution:
def reverseList(self, head: ListNode) -> ListNode:
if not... | 21.350649 | 73 | 0.538929 |
7bb93ad373770b32fce77bc8243a4694527e0860 | 2,140 | py | Python | mobilenet_tf.py | irenepap2/FACT_UvA_2022 | 32bc9448195928469d960d0120e0ff0e2a1a9f52 | [
"MIT"
] | null | null | null | mobilenet_tf.py | irenepap2/FACT_UvA_2022 | 32bc9448195928469d960d0120e0ff0e2a1a9f52 | [
"MIT"
] | null | null | null | mobilenet_tf.py | irenepap2/FACT_UvA_2022 | 32bc9448195928469d960d0120e0ff0e2a1a9f52 | [
"MIT"
] | null | null | null | import tensorflow as tf
from tensorflow.keras.layers import Input, DepthwiseConv2D
from tensorflow.keras.layers import Conv2D, BatchNormalization
from tensorflow.keras.layers import ReLU, AvgPool2D, Flatten, Dense
from tensorflow.keras import Model
from tensorflow.keras.layers import GlobalAveragePooling2D, Reshape, Dr... | 31.014493 | 96 | 0.703738 |
d4d68f33e90d762dedf42097b6675b01f9a28b66 | 5,013 | py | Python | utils/anaconda_package_data_hourly.py | ericdill/pydatanyc2019 | 6ee4823e42a0eadce656febd8fe17c078e21134c | [
"MIT"
] | null | null | null | utils/anaconda_package_data_hourly.py | ericdill/pydatanyc2019 | 6ee4823e42a0eadce656febd8fe17c078e21134c | [
"MIT"
] | null | null | null | utils/anaconda_package_data_hourly.py | ericdill/pydatanyc2019 | 6ee4823e42a0eadce656febd8fe17c078e21134c | [
"MIT"
] | null | null | null | import argparse
import dask.dataframe as dd
from datetime import datetime
import os
from os.path import dirname, exists
from os import listdir, makedirs
from datetime import timedelta, date
import pandas as pd
data_path = '/mnt/storage/anaconda-parsed-logs'
output_path = 's3://edill-data/cleaned-logs'
data_path = data... | 36.326087 | 132 | 0.6152 |
e5d7963ef607e2019d63082585148f6406260d56 | 827 | py | Python | packages/merlin/protocols/__init__.py | PyreFramework/pyre | 345c7449a3416eea1c1affa74fb32faff30a6aaa | [
"BSD-3-Clause"
] | null | null | null | packages/merlin/protocols/__init__.py | PyreFramework/pyre | 345c7449a3416eea1c1affa74fb32faff30a6aaa | [
"BSD-3-Clause"
] | null | null | null | packages/merlin/protocols/__init__.py | PyreFramework/pyre | 345c7449a3416eea1c1affa74fb32faff30a6aaa | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# michael a.g. aïvázis <nichael.aivazis@para-sim.com>
# (c) 1998-2022 all rights reserved
# export
# flow parts
from .Producer import Producer as producer
from .Specification import Specification as specification
# asset categories
from .AssetCategory import AssetCategory as assetCategory
#... | 23.628571 | 57 | 0.785973 |
73fc1b025d7abd321785e9d253a2906cb3e42933 | 462 | py | Python | devilry/devilry_compressionutil/migrations/0007_auto_20181002_1053.py | aless80/devilry-django | 416c262e75170d5662542f15e2d7fecf5ab84730 | [
"BSD-3-Clause"
] | 29 | 2015-01-18T22:56:23.000Z | 2020-11-10T21:28:27.000Z | devilry/devilry_compressionutil/migrations/0007_auto_20181002_1053.py | aless80/devilry-django | 416c262e75170d5662542f15e2d7fecf5ab84730 | [
"BSD-3-Clause"
] | 786 | 2015-01-06T16:10:18.000Z | 2022-03-16T11:10:50.000Z | devilry/devilry_compressionutil/migrations/0007_auto_20181002_1053.py | aless80/devilry-django | 416c262e75170d5662542f15e2d7fecf5ab84730 | [
"BSD-3-Clause"
] | 15 | 2015-04-06T06:18:43.000Z | 2021-02-24T12:28:30.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.11 on 2018-10-02 08:53
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('devilry_compressionutil', '0006_compressedarchivemeta_created_by_role'),
]
operations = [
migrations.AlterField(
... | 22 | 82 | 0.634199 |
cc71286c1fe41531d6f888686b7d45957d45244f | 1,080 | py | Python | setup.py | mcgid/morenines | b5825d33ae4c44e39fc0b9763bdf371e00112b64 | [
"MIT"
] | null | null | null | setup.py | mcgid/morenines | b5825d33ae4c44e39fc0b9763bdf371e00112b64 | [
"MIT"
] | 21 | 2016-04-15T19:22:12.000Z | 2016-07-08T16:22:54.000Z | setup.py | mcgid/morenines | b5825d33ae4c44e39fc0b9763bdf371e00112b64 | [
"MIT"
] | null | null | null | import os
from codecs import open
from setuptools import setup, find_packages
this_dir = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(this_dir, 'DESCRIPTION.rst'), encoding='utf8') as f:
long_desc = f.read()
setup(
name='morenines',
version='1.1.0',
url='https://github.com/mcgid/... | 24 | 75 | 0.587037 |
3087de773ba2ceb1688c19c2b7cd55a967833ae8 | 3,787 | py | Python | python/dl/scratch/quanta/turshare-stocka.py | shunliz/test | 3200cc7aa7ec5c11e5b7233813f94d9797411427 | [
"Apache-2.0"
] | null | null | null | python/dl/scratch/quanta/turshare-stocka.py | shunliz/test | 3200cc7aa7ec5c11e5b7233813f94d9797411427 | [
"Apache-2.0"
] | 1 | 2016-07-17T10:20:08.000Z | 2016-07-17T10:20:08.000Z | python/dl/scratch/quanta/turshare-stocka.py | shunliz/test | 3200cc7aa7ec5c11e5b7233813f94d9797411427 | [
"Apache-2.0"
] | null | null | null | import tushare as ts
import pandas as pd
# 获取近三年上证指数
data = ts.get_h_data('000001', index=True, start='2015-06-13', end='2017-06-13')
# lstm.py
import time
import warnings
import numpy as np
from numpy import newaxis
from keras.layers.core import Dense, Activation, Dropout
from keras.layers.recurrent import LSTM
from... | 32.646552 | 113 | 0.672828 |
ea4fe814b2e39cc7c94077910e96b0654a4c23ad | 260 | py | Python | libs/core/cornflow_core/schemas/patch.py | ggsdc/corn | 4c17c46a70f95b8882bcb6a55ef7daa1f69e0456 | [
"MIT"
] | 2 | 2020-07-09T20:58:47.000Z | 2020-07-20T20:40:46.000Z | libs/core/cornflow_core/schemas/patch.py | baobabsoluciones/cornflow | bd7cae22107e5fe148704d5f41d4f58f9c410b40 | [
"Apache-2.0"
] | 2 | 2022-03-31T08:42:10.000Z | 2022-03-31T12:05:23.000Z | libs/core/cornflow_core/schemas/patch.py | ggsdc/corn | 4c17c46a70f95b8882bcb6a55ef7daa1f69e0456 | [
"MIT"
] | null | null | null | """
Schemas for the PATCH operations
"""
from marshmallow import fields, Schema
class BasePatchOperation(Schema):
"""Base structure of a JSON Patch file"""
op = fields.Str(required=True)
path = fields.Str(required=True)
value = fields.Raw()
| 20 | 45 | 0.696154 |
709cd83ad4884e670826f705c021a2bdeb1e11b6 | 539 | py | Python | Problem 38/problem38.py | logicred/Euler-Project | 3488c409135729a444cb43ff06c5fdaf8feb8623 | [
"MIT"
] | 2 | 2019-09-12T01:09:01.000Z | 2019-09-18T00:23:33.000Z | Problem 38/problem38.py | logicred/Euler-Project | 3488c409135729a444cb43ff06c5fdaf8feb8623 | [
"MIT"
] | null | null | null | Problem 38/problem38.py | logicred/Euler-Project | 3488c409135729a444cb43ff06c5fdaf8feb8623 | [
"MIT"
] | null | null | null | #Answer = 932718654
#cost = 0.0638s
import time
start = time.time()
def pan_mul(num):
s = ''
for y in range(1, 10):
s = s + str(num * y)
if len(s) < 9:
continue
elif len(s) > 9:
return False, '0'
else:
t = set([str(x) for x in range(1, 10)])
if t == set(s):
return True, s
... | 16.84375 | 43 | 0.534323 |
c9984c84e5b23dfd69031ef16360223f63a2f6a2 | 4,893 | py | Python | python/GafferArnoldUI/ShaderMenu.py | timlehr/gaffer | 354acd6af7500e0bd1ce19d7c417929e2f0a919e | [
"BSD-3-Clause"
] | null | null | null | python/GafferArnoldUI/ShaderMenu.py | timlehr/gaffer | 354acd6af7500e0bd1ce19d7c417929e2f0a919e | [
"BSD-3-Clause"
] | null | null | null | python/GafferArnoldUI/ShaderMenu.py | timlehr/gaffer | 354acd6af7500e0bd1ce19d7c417929e2f0a919e | [
"BSD-3-Clause"
] | null | null | null | ##########################################################################
#
# Copyright (c) 2012, John Haddon. All rights reserved.
# Copyright (c) 2013-2014, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided ... | 36.789474 | 109 | 0.702636 |
a138b25d635fb878e3e7a6f447904fb4de13b0d2 | 4,402 | py | Python | RESEPT/Spearman_Correlation.py | YuLin-code/MP-MIM | 0871a27d1717dc6f5dad623c6721824b104c3bb8 | [
"CECILL-B"
] | null | null | null | RESEPT/Spearman_Correlation.py | YuLin-code/MP-MIM | 0871a27d1717dc6f5dad623c6721824b104c3bb8 | [
"CECILL-B"
] | null | null | null | RESEPT/Spearman_Correlation.py | YuLin-code/MP-MIM | 0871a27d1717dc6f5dad623c6721824b104c3bb8 | [
"CECILL-B"
] | null | null | null | import numpy as np
import pandas as pd
import os
from scipy.stats import spearmanr
import argparse
parser = argparse.ArgumentParser(description='Main Entrance of MP_MIM_RESEPT')
parser.add_argument('--sampleName', type=str, default='151507')
parser.add_argument('--MP-k-num', type=int, default=90, help='number ... | 67.723077 | 493 | 0.728532 |
53a94d50343877dc461035177e19169bd60ff1a5 | 211 | py | Python | backend/home/models.py | crowdbotics-apps/techcompilertest-33082 | 07a24fb3f97f07823b86d13584756967123526e6 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/home/models.py | crowdbotics-apps/techcompilertest-33082 | 07a24fb3f97f07823b86d13584756967123526e6 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/home/models.py | crowdbotics-apps/techcompilertest-33082 | 07a24fb3f97f07823b86d13584756967123526e6 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | from django.conf import settings
from django.db import models
class Employ(models.Model):
"Generated Model"
name = models.TextField()
department = models.TextField()
email = models.TextField()
| 21.1 | 35 | 0.720379 |
c5b665591f8979c748946fd56e7eac697f7a57e6 | 3,044 | py | Python | src/train.py | AasimBaig/synergy-transfer-learning-task | 090f8070de2a7188d95d03b8787cb243631180e8 | [
"MIT"
] | null | null | null | src/train.py | AasimBaig/synergy-transfer-learning-task | 090f8070de2a7188d95d03b8787cb243631180e8 | [
"MIT"
] | null | null | null | src/train.py | AasimBaig/synergy-transfer-learning-task | 090f8070de2a7188d95d03b8787cb243631180e8 | [
"MIT"
] | null | null | null | from torchvision import models
import os
import glob
import numpy as np
import pandas as pd
from tqdm import tqdm
from PIL import Image
import torch
import torch.nn as nn
from torchvision import transforms
from torchsummary import summary
from torch.utils.data import DataLoader
from torch.autograd import Variable
imp... | 29.843137 | 108 | 0.638633 |
b006305c8754aa191aa85d2fbc7f763e0edcad01 | 24,382 | py | Python | pytest_django/plugin.py | bdauvergne/pytest-django | 66205b3d6ac21e65fbd3d95f1f541db30a596e53 | [
"BSD-3-Clause"
] | 967 | 2015-01-06T14:36:22.000Z | 2022-03-29T21:07:03.000Z | pytest_django/plugin.py | bdauvergne/pytest-django | 66205b3d6ac21e65fbd3d95f1f541db30a596e53 | [
"BSD-3-Clause"
] | 743 | 2015-01-02T12:20:13.000Z | 2022-03-25T17:13:05.000Z | pytest_django/plugin.py | bdauvergne/pytest-django | 66205b3d6ac21e65fbd3d95f1f541db30a596e53 | [
"BSD-3-Clause"
] | 308 | 2015-01-08T11:40:23.000Z | 2022-03-23T02:53:14.000Z | """A pytest plugin which helps testing Django applications
This plugin handles creating and destroying the test environment and
test database and provides some useful text fixtures.
"""
import contextlib
import inspect
import os
import pathlib
import sys
from functools import reduce
from typing import Generator, List... | 31.582902 | 92 | 0.654212 |
3acb25f591c1735a81974ba0f6e066c5f47e85e5 | 86,216 | py | Python | qa/common/gen_qa_models.py | akaanirban/server | 195b7f65f4fb74d528accdb0f424ff57f5283d82 | [
"BSD-3-Clause"
] | null | null | null | qa/common/gen_qa_models.py | akaanirban/server | 195b7f65f4fb74d528accdb0f424ff57f5283d82 | [
"BSD-3-Clause"
] | null | null | null | qa/common/gen_qa_models.py | akaanirban/server | 195b7f65f4fb74d528accdb0f424ff57f5283d82 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2018-2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# * Redistributions of source code must retain the above copyright
# notice, this list o... | 41.771318 | 108 | 0.513547 |
bc8068af8abd32fb825028a187f30ff1298286cd | 385 | py | Python | esmvalcore/cmor/_fixes/cmip6/cesm2_waccm_fv2.py | jvegreg/ESMValCore | 03eb1c942bf1dc3be98cb30c3592b42e82a94f16 | [
"Apache-2.0"
] | 26 | 2019-06-07T07:50:07.000Z | 2022-03-22T21:04:01.000Z | esmvalcore/cmor/_fixes/cmip6/cesm2_waccm_fv2.py | jvegreg/ESMValCore | 03eb1c942bf1dc3be98cb30c3592b42e82a94f16 | [
"Apache-2.0"
] | 1,370 | 2019-06-06T09:03:07.000Z | 2022-03-31T04:37:20.000Z | esmvalcore/cmor/_fixes/cmip6/cesm2_waccm_fv2.py | valeriupredoi/ESMValCore | b46b948c47d8579d997b28501f8588f5531aa354 | [
"Apache-2.0"
] | 26 | 2019-07-03T13:08:48.000Z | 2022-03-02T16:08:47.000Z | """Fixes for CESM2-WACCM-FV2 model."""
from .cesm2 import Tas as BaseTas
from .cesm2 import Fgco2 as BaseFgco2
from .cesm2_waccm import Cl as BaseCl
from .cesm2_waccm import Cli as BaseCli
from .cesm2_waccm import Clw as BaseClw
from ..common import SiconcFixScalarCoord
Cl = BaseCl
Cli = BaseCli
Clw = BaseClw
F... | 14.807692 | 41 | 0.766234 |
faeeff5f06678ae1703b29b194f06d18b5fc11f6 | 8,116 | py | Python | chinese_checkers/TinyGUI.py | davidschulte/alpha-thesis | a9d6d2f0b91a2c8d6ae8605db1e3e92586cc1866 | [
"MIT"
] | null | null | null | chinese_checkers/TinyGUI.py | davidschulte/alpha-thesis | a9d6d2f0b91a2c8d6ae8605db1e3e92586cc1866 | [
"MIT"
] | null | null | null | chinese_checkers/TinyGUI.py | davidschulte/alpha-thesis | a9d6d2f0b91a2c8d6ae8605db1e3e92586cc1866 | [
"MIT"
] | null | null | null | import pygame
import numpy as np
from chinese_checkers.TinyChineseCheckersGame import ChineseCheckersGame as Game
MOVES = [[0, 1], [-1, 1], [1, -1], [1, 0]]
DIM = 9
Y_OFFSET = 17
X_OFFSET = 17
Y_STEP = 47.2 * 1.5
X_STEP = 54.5 * 1.5
R = 12
RED = (255,0,0)
GREEN = (0, 200, 0 )
LIGHT_GREEN = (0, 100, 0)
BLUE = (0,0,255,2... | 35.441048 | 117 | 0.483859 |
b14a512886a1476bb60d31ae9e4c5a7c58c595cb | 422 | py | Python | src/medicineinventory/forms.py | vandana0608/Pharmacy-Managament | f99bdec11c24027a432858daa19247a21cecc092 | [
"bzip2-1.0.6"
] | null | null | null | src/medicineinventory/forms.py | vandana0608/Pharmacy-Managament | f99bdec11c24027a432858daa19247a21cecc092 | [
"bzip2-1.0.6"
] | null | null | null | src/medicineinventory/forms.py | vandana0608/Pharmacy-Managament | f99bdec11c24027a432858daa19247a21cecc092 | [
"bzip2-1.0.6"
] | null | null | null | # from django import forms
# #from django.forms import inlineformset_factory
# from .models import medicineinventory
# class MedicineInventoryForm(forms.ModelForm):
# class Meta:
# model = medicineinventory
# exclude = ()
# #MedicineInventoryFormSet = inlineformset_factory(medicineinventory,med... | 30.142857 | 174 | 0.763033 |
0bbbdb9954ca69ffd0cf92de7a7cbb7577cf8043 | 6,444 | py | Python | object_detection/inference_over_image.py | apacha/Mensural-Detector | d924a651bca5ccb97c7b45861b9ef5ef6e4cb26e | [
"MIT"
] | 9 | 2018-12-21T15:11:43.000Z | 2021-04-28T06:49:30.000Z | object_detection/inference_over_image.py | apacha/Mensural-Detector | d924a651bca5ccb97c7b45861b9ef5ef6e4cb26e | [
"MIT"
] | null | null | null | object_detection/inference_over_image.py | apacha/Mensural-Detector | d924a651bca5ccb97c7b45861b9ef5ef6e4cb26e | [
"MIT"
] | 6 | 2019-01-25T02:53:39.000Z | 2021-04-28T06:49:33.000Z | import numpy as np
import tensorflow as tf
import argparse
from PIL import Image
from object_detection.utils import ops as utils_ops, label_map_util, visualization_utils as vis_util
if tf.__version__ < '1.4.0':
raise ImportError('Please upgrade your tensorflow installation to v1.4.* or later!')
def load_image_i... | 48.818182 | 142 | 0.676133 |
2bc5ae10c9688cdc52ee9e478845d7b52676a4ce | 1,737 | py | Python | src/sima/simo/blueprints/simostaticresultentry.py | SINTEF/simapy | 650b8c2f15503dad98e2bfc0d0788509593822c7 | [
"MIT"
] | null | null | null | src/sima/simo/blueprints/simostaticresultentry.py | SINTEF/simapy | 650b8c2f15503dad98e2bfc0d0788509593822c7 | [
"MIT"
] | null | null | null | src/sima/simo/blueprints/simostaticresultentry.py | SINTEF/simapy | 650b8c2f15503dad98e2bfc0d0788509593822c7 | [
"MIT"
] | null | null | null | #
# Generated with SIMOStaticResultEntryBlueprint
from dmt.blueprint import Blueprint
from dmt.dimension import Dimension
from dmt.attribute import Attribute
from dmt.enum_attribute import EnumAttribute
from dmt.blueprint_attribute import BlueprintAttribute
from sima.sima.blueprints.resultentry import ResultEntryBluep... | 64.333333 | 121 | 0.734024 |
7cf57ad493897f31947a33a11de47c64d92f5e48 | 1,152 | py | Python | preprocessing/iaps.py | amysudarat/affective-monitor-model | 4de08704a3d36a0a228d5eeb9a33317be51f18fc | [
"MIT"
] | null | null | null | preprocessing/iaps.py | amysudarat/affective-monitor-model | 4de08704a3d36a0a228d5eeb9a33317be51f18fc | [
"MIT"
] | null | null | null | preprocessing/iaps.py | amysudarat/affective-monitor-model | 4de08704a3d36a0a228d5eeb9a33317be51f18fc | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import pandas as pd
import preprocessing.illum as pill
class iaps(object):
def __init__(self,filepath):
self.filepath = filepath
self.iaps_df = self.get_iaps_data()
self.iaps_df['pic_idx'] = self.iaps_df['pic_idx'].apply(lambda x:x-1)
def get_iaps_data(self... | 32 | 128 | 0.637153 |
706e45b08f6ba5d21f2c85ab00a474fa6c3768f5 | 1,121 | py | Python | manage.py | inaki/farm-stand | 92d56fffae742775a8c9ccc91fbce39715caa0ab | [
"MIT"
] | 4 | 2015-08-20T02:43:35.000Z | 2022-03-28T12:37:17.000Z | manage.py | codeforamerica/westsac-farm-stand | 92d56fffae742775a8c9ccc91fbce39715caa0ab | [
"MIT"
] | 19 | 2015-07-31T23:32:09.000Z | 2015-08-31T23:58:40.000Z | manage.py | inaki/farm-stand | 92d56fffae742775a8c9ccc91fbce39715caa0ab | [
"MIT"
] | 4 | 2015-09-17T03:01:01.000Z | 2021-04-16T10:14:22.000Z | #!/usr/bin/venv python
import os
from app import create_app, db
from app.models import User, Role, Interestedpeople, Permission, Product
from flask.ext.script import Manager, Shell
from flask.ext.migrate import Migrate, MigrateCommand
app = create_app(os.getenv('FLASK_CONFIG') or 'default')
manager = Manager(app)
migr... | 26.069767 | 127 | 0.74041 |
c330bb605f330de4c899db39452af52560b91f32 | 1,987 | py | Python | tests/handlers/test_custom.py | xpayn/mangum | baa514d8631eabd70a2ce2111f3b5d525e5044c9 | [
"MIT"
] | 202 | 2019-01-14T16:59:33.000Z | 2020-05-26T11:46:59.000Z | tests/handlers/test_custom.py | xpayn/mangum | baa514d8631eabd70a2ce2111f3b5d525e5044c9 | [
"MIT"
] | 89 | 2019-01-19T00:31:20.000Z | 2020-05-31T09:58:32.000Z | tests/handlers/test_custom.py | xpayn/mangum | baa514d8631eabd70a2ce2111f3b5d525e5044c9 | [
"MIT"
] | 25 | 2019-02-28T00:10:21.000Z | 2020-05-26T19:52:29.000Z | from mangum.types import (
Scope,
Headers,
LambdaConfig,
LambdaContext,
LambdaEvent,
)
class CustomHandler:
@classmethod
def infer(
cls, event: LambdaEvent, context: LambdaContext, config: LambdaConfig
) -> bool:
return "my-custom-key" in event
def __init__(
... | 27.597222 | 78 | 0.501761 |
9fde8560b25dd323cb82478e2bbed891f00119c0 | 5,887 | py | Python | jirani/migrations/0001_initial.py | albunus/nextdoor | 0be51a73f05c267e76a0e522f05efa88099b7522 | [
"MIT"
] | null | null | null | jirani/migrations/0001_initial.py | albunus/nextdoor | 0be51a73f05c267e76a0e522f05efa88099b7522 | [
"MIT"
] | null | null | null | jirani/migrations/0001_initial.py | albunus/nextdoor | 0be51a73f05c267e76a0e522f05efa88099b7522 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.9 on 2021-12-24 02:59
import cloudinary.models
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_US... | 54.009174 | 132 | 0.602854 |
448b9b42e3bb379da0c2add1f80bcf13bdf4388c | 3,901 | py | Python | ssd/modeling/backbone/vgg.py | oudream/hello-ssd1 | 437615e66025cc8819cee33dd4dad687e5d2181b | [
"MIT"
] | null | null | null | ssd/modeling/backbone/vgg.py | oudream/hello-ssd1 | 437615e66025cc8819cee33dd4dad687e5d2181b | [
"MIT"
] | null | null | null | ssd/modeling/backbone/vgg.py | oudream/hello-ssd1 | 437615e66025cc8819cee33dd4dad687e5d2181b | [
"MIT"
] | null | null | null | import torch.nn as nn
import torch.nn.functional as F
import torch
from ssd.layers import L2Norm
from ssd.modeling import registry
from ssd.utils.model_zoo import load_state_dict_from_url
model_urls = {
'vgg': 'https://s3.amazonaws.com/amdegroot-models/vgg16_reducedfc.pth',
}
# borrowed from https://github.com/... | 32.781513 | 109 | 0.588054 |
a1c21a01f823f3b6944ef1e502c36068fe5d42a1 | 6,703 | py | Python | docusign_esign/models/attachment.py | hunk/docusign-python-client | a643c42c1236715e74eef6fc279a1b29da1b5455 | [
"MIT"
] | null | null | null | docusign_esign/models/attachment.py | hunk/docusign-python-client | a643c42c1236715e74eef6fc279a1b29da1b5455 | [
"MIT"
] | null | null | null | docusign_esign/models/attachment.py | hunk/docusign-python-client | a643c42c1236715e74eef6fc279a1b29da1b5455 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
DocuSign REST API
The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign.
OpenAPI spec version: v2.1
Contact: devcenter@docusign.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from p... | 24.734317 | 137 | 0.548262 |
ee25738de4d820d3a15e5c6e5d3abbad64250da3 | 2,854 | py | Python | pymystrom/switch.py | d0xsch/python-mystrom | 86410f8952104651ef76ad37c84c29740c50551e | [
"MIT"
] | null | null | null | pymystrom/switch.py | d0xsch/python-mystrom | 86410f8952104651ef76ad37c84c29740c50551e | [
"MIT"
] | null | null | null | pymystrom/switch.py | d0xsch/python-mystrom | 86410f8952104651ef76ad37c84c29740c50551e | [
"MIT"
] | null | null | null | """
Copyright (c) 2015-2018 Fabian Affolter <fabian@affolter-engineering.ch>
Licensed under MIT. All rights reserved.
"""
import requests
from . import exceptions
class MyStromPlug(object):
"""A class for a myStrom switch."""
def __init__(self, host):
"""Initialize the switch."""
self.resou... | 32.431818 | 93 | 0.568325 |
267cfc564994c38411f2bd7c19af348ceff72538 | 807 | py | Python | app/resources/product_group/models.py | zalando-zmon/zmon-slo-metrics | f2e823b861af2f449d1fd72cced74cf26b3aee94 | [
"Apache-2.0"
] | 8 | 2017-02-21T09:45:01.000Z | 2020-09-18T00:09:42.000Z | app/resources/product_group/models.py | ThorbjoernG/service-level-reporting | d9ec7dca3fee1614bf39cb46af9c0cc8bfbd805e | [
"Apache-2.0"
] | 148 | 2017-02-20T08:52:32.000Z | 2020-03-10T09:43:40.000Z | app/resources/product_group/models.py | lfroment0/service-level-reporting | 29d6d0664762c76eb5aa7000a8c191c32cc2c015 | [
"Apache-2.0"
] | 12 | 2017-02-20T07:24:21.000Z | 2019-09-27T12:32:33.000Z | from datetime import datetime
from app.extensions import db
class ProductGroup(db.Model):
id = db.Column(db.Integer(), primary_key=True)
name = db.Column(db.String(120), unique=True, nullable=False, index=True)
department = db.Column(db.String(120), default='')
products = db.relationship('Product',... | 32.28 | 109 | 0.692689 |
021c448226c618bcb5c2298dd85a4869dd001fff | 2,844 | py | Python | eval.py | bhsimon0810/gaussian-mixture-vae | c37163c96f8c51f36d66addec8e00ad204a2d730 | [
"MIT"
] | null | null | null | eval.py | bhsimon0810/gaussian-mixture-vae | c37163c96f8c51f36d66addec8e00ad204a2d730 | [
"MIT"
] | null | null | null | eval.py | bhsimon0810/gaussian-mixture-vae | c37163c96f8c51f36d66addec8e00ad204a2d730 | [
"MIT"
] | null | null | null | import numpy as np
import tensorflow as tf
import os
import utils
from sklearn.metrics import precision_score, recall_score, f1_score, classification_report
flags = tf.app.flags
flags.DEFINE_string('data_dir', './datasets', 'Data dir path.')
flags.DEFINE_string('dataset', 'imdb', 'Data dir path.')
flags.DEF... | 46.622951 | 119 | 0.691983 |
1f0208cbd5625a47cda1eaebd1f70bd54062df4b | 512 | py | Python | teacher/migrations/0011_action_week.py | PietPtr/UoM | 9b67fb01084ed984b5171cd4d201528c926571b6 | [
"MIT"
] | null | null | null | teacher/migrations/0011_action_week.py | PietPtr/UoM | 9b67fb01084ed984b5171cd4d201528c926571b6 | [
"MIT"
] | null | null | null | teacher/migrations/0011_action_week.py | PietPtr/UoM | 9b67fb01084ed984b5171cd4d201528c926571b6 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.3 on 2020-11-09 20:15
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('teacher', '0010_auto_20201109_2013'),
]
operations = [
migrations.AddField(
model_name='action'... | 24.380952 | 111 | 0.632813 |
aa84eae5247bf623186a12c41ac36830a2d6e9a9 | 12,947 | py | Python | src/bio2bel/manager/abstract_manager.py | COVID-19-Causal-Reasoning/bio2bel | f2c015c23e9e1f4b996716ec48f61687c5e347fe | [
"MIT"
] | 16 | 2018-05-18T13:25:44.000Z | 2022-03-15T02:32:28.000Z | src/bio2bel/manager/abstract_manager.py | COVID-19-Causal-Reasoning/bio2bel | f2c015c23e9e1f4b996716ec48f61687c5e347fe | [
"MIT"
] | 42 | 2017-09-13T20:16:46.000Z | 2021-05-08T19:24:30.000Z | src/bio2bel/manager/abstract_manager.py | COVID-19-Causal-Reasoning/bio2bel | f2c015c23e9e1f4b996716ec48f61687c5e347fe | [
"MIT"
] | 5 | 2020-03-14T17:08:12.000Z | 2021-04-13T20:19:19.000Z | # -*- coding: utf-8 -*-
"""Provides abstractions over the management of SQLAlchemy connections and sessions."""
import logging
import os
import sys
from abc import ABCMeta, abstractmethod
from functools import wraps
from typing import List, Mapping, Type
import click
from more_click import verbose_option
from sqlalc... | 32.448622 | 119 | 0.660848 |
6100770744996b27acefbbc01e199ba1dfb3aa1f | 1,996 | py | Python | backend/api/migrations/0009_annotations_relations_20210421_1445.py | alairice/doccano | 27eff5caec1ec6ad31f1e74bd1b73b1dd43228dc | [
"MIT"
] | 2,082 | 2018-05-09T07:16:21.000Z | 2019-12-01T16:41:50.000Z | backend/api/migrations/0009_annotations_relations_20210421_1445.py | alairice/doccano | 27eff5caec1ec6ad31f1e74bd1b73b1dd43228dc | [
"MIT"
] | 365 | 2018-07-31T13:49:05.000Z | 2019-11-29T11:25:17.000Z | backend/api/migrations/0009_annotations_relations_20210421_1445.py | alairice/doccano | 27eff5caec1ec6ad31f1e74bd1b73b1dd43228dc | [
"MIT"
] | 476 | 2018-08-17T06:43:57.000Z | 2019-12-01T09:47:08.000Z | # Generated by Django 3.1.6 on 2021-03-02 10:13
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("api", "0008_auto_20210302_1013"),
]
operations = [
migrations.CreateModel(... | 40.734694 | 118 | 0.553607 |
165b0b51a97f6e6abd2bbaeef7e6c5f5c583eb99 | 1,210 | py | Python | source/tests/tester_text_files.py | dibala21/Ergocycle | a1562d722b4348743028f64cd5cb83906cf44207 | [
"MIT"
] | null | null | null | source/tests/tester_text_files.py | dibala21/Ergocycle | a1562d722b4348743028f64cd5cb83906cf44207 | [
"MIT"
] | null | null | null | source/tests/tester_text_files.py | dibala21/Ergocycle | a1562d722b4348743028f64cd5cb83906cf44207 | [
"MIT"
] | null | null | null | import numpy as np
import datetime
#def create_file(file_name, param_matrix):
#f = open(file_name, "w+")
#for row in range(param_matrix):
#f.write("amplitude: ", param_matrix[row][0])
#f.write("")
#matrice_inventee = [[100, 50, 20], [101, 51, 21]]
#nouveau_patient = create_file()
#fichier = create_... | 36.666667 | 287 | 0.684298 |
3c8bf7f31e604e1eb0dcec59e14be35573da1667 | 19,945 | py | Python | redis/commands/bf/commands.py | hartwork/redis-py | 291baa93b8712d104ce50a61f52e23b68e2b7a99 | [
"MIT"
] | null | null | null | redis/commands/bf/commands.py | hartwork/redis-py | 291baa93b8712d104ce50a61f52e23b68e2b7a99 | [
"MIT"
] | null | null | null | redis/commands/bf/commands.py | hartwork/redis-py | 291baa93b8712d104ce50a61f52e23b68e2b7a99 | [
"MIT"
] | null | null | null | from redis.client import NEVER_DECODE
from redis.exceptions import ModuleError
from redis.utils import HIREDIS_AVAILABLE
BF_RESERVE = "BF.RESERVE"
BF_ADD = "BF.ADD"
BF_MADD = "BF.MADD"
BF_INSERT = "BF.INSERT"
BF_EXISTS = "BF.EXISTS"
BF_MEXISTS = "BF.MEXISTS"
BF_SCANDUMP = "BF.SCANDUMP"
BF_LOADCHUNK = "BF.LOADCHUNK"
BF... | 40.292929 | 132 | 0.644873 |
8b076b3d6cd00cf6639273bb8917984ce1b59d67 | 2,817 | py | Python | src/filetools/scanner.py | ownport/filemeta | 0e96abdd71a93c10d1f752b1c3532018297990dd | [
"MIT"
] | 1 | 2018-05-07T06:07:41.000Z | 2018-05-07T06:07:41.000Z | src/filetools/scanner.py | ownport/filemeta | 0e96abdd71a93c10d1f752b1c3532018297990dd | [
"MIT"
] | 7 | 2017-09-17T19:18:12.000Z | 2021-03-21T08:52:19.000Z | src/filetools/scanner.py | ownport/filemeta | 0e96abdd71a93c10d1f752b1c3532018297990dd | [
"MIT"
] | null | null | null |
import os
import json
import logging
import pathlib
from collections import Counter
from filetools.formats import sqlite
from filetools.formats import jsonline
from filetools.utils import get_meta
from filetools.utils import scan_files
from filetools.utils import progress_bar
from filetools.libs.tabulate import tab... | 32.755814 | 102 | 0.595669 |
cea4a127e9553e55e3b6bd16fca4a77547759de7 | 1,800 | py | Python | server.py | pawni/gpuobserver | 26a588cd4f572fc5b7492a514878fdc454af628e | [
"MIT"
] | 30 | 2020-01-08T11:14:12.000Z | 2021-07-23T15:36:30.000Z | server.py | pawni/gpuobserver | 26a588cd4f572fc5b7492a514878fdc454af628e | [
"MIT"
] | 3 | 2020-06-08T15:06:15.000Z | 2021-04-18T05:26:26.000Z | server.py | pawni/gpuobserver | 26a588cd4f572fc5b7492a514878fdc454af628e | [
"MIT"
] | 3 | 2020-01-23T16:11:19.000Z | 2020-10-25T21:09:09.000Z | from flask import Flask, render_template, request
from flask.logging import default_handler
import requests
import logging
import time
import config
import gpu_helper
from statistics import get_stats_df, get_time_str
logging.basicConfig(
level=logging.INFO,
format='%(asctime)s.%(msecs)03d %(levelname)s %(modu... | 30.508475 | 116 | 0.691111 |
f9417a0750643c6f74fe88dc61c58db8c9ebe996 | 695 | py | Python | tools/collect_labels.py | frankShih/cnn_captcha | cde8b45ffd4eaac0fe878def1a7dfe70a61cb05a | [
"Apache-2.0"
] | null | null | null | tools/collect_labels.py | frankShih/cnn_captcha | cde8b45ffd4eaac0fe878def1a7dfe70a61cb05a | [
"Apache-2.0"
] | null | null | null | tools/collect_labels.py | frankShih/cnn_captcha | cde8b45ffd4eaac0fe878def1a7dfe70a61cb05a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: UTF-8 -*-
"""
Count the labels of the samples and write them into the labels.json file
"""
import os
import json
image_dir = "../sample/origin"
image_list = os.listdir(image_dir)
labels = set()
for img in image_list:
split_result = img.split("_")
if len(split_result) == 2:
... | 23.965517 | 72 | 0.630216 |
01ac173fb69054feed3ee1bd2db94eb13fc8852b | 3,404 | py | Python | metrics/frechet_inception_distance.py | TeeboneTing/stylegan2 | 2b0873987e84155d44ae6c88339285fc15c17837 | [
"BSD-Source-Code"
] | null | null | null | metrics/frechet_inception_distance.py | TeeboneTing/stylegan2 | 2b0873987e84155d44ae6c88339285fc15c17837 | [
"BSD-Source-Code"
] | null | null | null | metrics/frechet_inception_distance.py | TeeboneTing/stylegan2 | 2b0873987e84155d44ae6c88339285fc15c17837 | [
"BSD-Source-Code"
] | null | null | null | # Copyright (c) 2019, NVIDIA Corporation. All rights reserved.
#
# This work is made available under the Nvidia Source Code License-NC.
# To view a copy of this license, visit
# https://nvlabs.github.io/stylegan2/license.html
"""Frechet Inception Distance (FID)."""
import os
import numpy as np
import scipy
import ten... | 45.386667 | 127 | 0.633079 |
d9298208457f7b5364431dd66f52aca62b1aaedb | 2,565 | py | Python | baldi/disassemble.py | equation314/hitcon-ctf-2018-writeup | 5d82f8c3c85492cacc39663ddc2a357767ca94cb | [
"MIT"
] | 3 | 2018-10-23T01:41:53.000Z | 2019-04-09T07:39:45.000Z | baldi/disassemble.py | equation314/hitcon-ctf-2018-writeup | 5d82f8c3c85492cacc39663ddc2a357767ca94cb | [
"MIT"
] | 1 | 2018-10-26T06:47:45.000Z | 2018-10-26T13:51:11.000Z | baldi/disassemble.py | equation314/hitcon-ctf-2018-writeup | 5d82f8c3c85492cacc39663ddc2a357767ca94cb | [
"MIT"
] | 1 | 2018-10-26T06:45:39.000Z | 2018-10-26T06:45:39.000Z | from pwn import *
from capstone import *
from leb128 import *
import re
def format_riscv(code, arch):
off = 32
res = []
for line in code.split('\n'):
s = line[off:].lower()
s = s.replace(',', ', ').replace('-', ' - ').replace('+', ' + ').replace(', - ', ', -')
p = s.find('#')
... | 26.71875 | 96 | 0.478363 |
39630c17b04fe1cd31cb2e68dfd7bf296c4e39f5 | 1,005 | py | Python | tests/commands/test_show.py | pecigonzalo/opta | 0259f128ad3cfc4a96fe1f578833de28b2f19602 | [
"Apache-2.0"
] | null | null | null | tests/commands/test_show.py | pecigonzalo/opta | 0259f128ad3cfc4a96fe1f578833de28b2f19602 | [
"Apache-2.0"
] | null | null | null | tests/commands/test_show.py | pecigonzalo/opta | 0259f128ad3cfc4a96fe1f578833de28b2f19602 | [
"Apache-2.0"
] | null | null | null | from datetime import datetime
from click.testing import CliRunner
from pytest_mock import MockFixture
from opta.commands.show import config
from opta.layer import StructuredConfig
def test_show_config(mocker: MockFixture) -> None:
mock_bucket = "test-bucket"
mock_config = "test-config"
mock_yaml_config ... | 31.40625 | 91 | 0.692537 |
d7095b61aba8fe68f100ea690f2adea78df22617 | 350 | py | Python | persistence.py | Chromadream/AKP_REDDIT | ad2bb7594f4845da1cddd6ad78c7b440277f4045 | [
"MIT"
] | null | null | null | persistence.py | Chromadream/AKP_REDDIT | ad2bb7594f4845da1cddd6ad78c7b440277f4045 | [
"MIT"
] | 4 | 2019-01-08T02:39:33.000Z | 2021-06-01T23:13:53.000Z | persistence.py | Chromadream/AKP_REDDIT | ad2bb7594f4845da1cddd6ad78c7b440277f4045 | [
"MIT"
] | 1 | 2019-01-08T02:14:33.000Z | 2019-01-08T02:14:33.000Z | def list_urls(filename):
persistence_file = open(filename,'r')
urllist = [url.rstrip() for url in persistence_file.readlines()]
persistence_file.close()
return urllist
def append_url(filename,url):
persistence_file = open(filename,'a')
persistence_file.write("\n")
persistence_file.write(url... | 31.818182 | 68 | 0.72 |
31352d3423b28c3622b33cbe729bc2be6e8265de | 98,239 | py | Python | io_scene_vrm/importer/blend_model.py | saturday06/VRM_IMPORTER_for_Blender | 42562eead251c82cf25f63451de6598b1dfa6140 | [
"MIT"
] | 105 | 2020-08-31T13:03:27.000Z | 2021-02-05T12:33:53.000Z | io_scene_vrm/importer/blend_model.py | saturday06/VRM_IMPORTER_for_Blender | 42562eead251c82cf25f63451de6598b1dfa6140 | [
"MIT"
] | 44 | 2020-09-05T20:38:57.000Z | 2021-02-02T13:00:26.000Z | io_scene_vrm/importer/blend_model.py | saturday06/VRM_IMPORTER_for_Blender | 42562eead251c82cf25f63451de6598b1dfa6140 | [
"MIT"
] | 12 | 2020-10-02T14:10:31.000Z | 2021-02-01T10:51:52.000Z | """
Copyright (c) 2018 iCyP
Released under the MIT license
https://opensource.org/licenses/mit-license.php
"""
import base64
import collections
import contextlib
import copy
import itertools
import json
import math
import os.path
import secrets
import shutil
import string
import struct
import sys
import tempfile
fro... | 43.391784 | 154 | 0.541557 |
cec2334b2146c706e526f103db86924a69b28a48 | 1,664 | py | Python | pandas/challenge_6.py | bobrokerson/kaggle | 96c13e85476e2fe0fdb2af74075f82510db90573 | [
"MIT"
] | null | null | null | pandas/challenge_6.py | bobrokerson/kaggle | 96c13e85476e2fe0fdb2af74075f82510db90573 | [
"MIT"
] | null | null | null | pandas/challenge_6.py | bobrokerson/kaggle | 96c13e85476e2fe0fdb2af74075f82510db90573 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Mar 11 23:08:36 2022
@author: jimmy
"""
""" 31. Write a Pandas program to compute the Euclidean distance between two given series"""
import pandas as pd
from scipy.spatial import distance
import numpy as np
dataset = pd.Series([1,2,3,4,5,6,7,8,9,10]... | 32 | 130 | 0.722957 |
cb50f8501c5c8b6559047537ee7c9a7f41ff6679 | 3,411 | py | Python | utils/data_utils.py | SunnyMarkLiu/Datacastle_Travel_Services_Predict | 0823a8aaab4e42a7ee5067171901c6f597bc5d7e | [
"MIT"
] | 69 | 2018-02-08T09:38:12.000Z | 2019-10-14T00:11:04.000Z | utils/data_utils.py | QianguoSun/Datacastle_Travel_Services_Predict | 0823a8aaab4e42a7ee5067171901c6f597bc5d7e | [
"MIT"
] | null | null | null | utils/data_utils.py | QianguoSun/Datacastle_Travel_Services_Predict | 0823a8aaab4e42a7ee5067171901c6f597bc5d7e | [
"MIT"
] | 33 | 2018-02-08T15:32:33.000Z | 2019-07-20T08:52:26.000Z | #!/usr/local/miniconda2/bin/python
# _*_ coding: utf-8 _*_
"""
@author: MarkLiu
@time : 17-8-6 下午3:12
"""
import os
import sys
module_path = os.path.abspath(os.path.join('..'))
sys.path.append(module_path)
from os import listdir
from os.path import isfile, join
import cPickle
import numpy as np
import pandas as pd... | 30.455357 | 109 | 0.653474 |
214d0aea4e91c7993f674b6df7cd6725cf3382cb | 49,282 | py | Python | text2cc/quiz.py | dlehman83/text2cc | 303798993590bceaeb5238a6cce82893c37cdfc7 | [
"BSD-3-Clause"
] | 1 | 2021-02-12T09:34:07.000Z | 2021-02-12T09:34:07.000Z | text2cc/quiz.py | dlehman83/text2cc | 303798993590bceaeb5238a6cce82893c37cdfc7 | [
"BSD-3-Clause"
] | null | null | null | text2cc/quiz.py | dlehman83/text2cc | 303798993590bceaeb5238a6cce82893c37cdfc7 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (c) 2021, Dana Lehman
# Copyright (c) 2020, Geoffrey M. Poore
# All rights reserved.
#
# Licensed under the BSD 3-Clause License:
# http://opensource.org/licenses/BSD-3-Clause
#
'''
Parse text into a Quiz object that contains a list of Question objects, each
of which contains a l... | 49.331331 | 174 | 0.631021 |
face77e1f7624c83524fd198e30a9b23df4d22b9 | 1,098 | py | Python | eggs/bx_python-0.7.1_7b95ff194725-py2.7-linux-x86_64-ucs4.egg/EGG-INFO/scripts/bed_subtract_basewise.py | bopopescu/phyG | 023f505b705ab953f502cbc55e90612047867583 | [
"CC-BY-3.0"
] | null | null | null | eggs/bx_python-0.7.1_7b95ff194725-py2.7-linux-x86_64-ucs4.egg/EGG-INFO/scripts/bed_subtract_basewise.py | bopopescu/phyG | 023f505b705ab953f502cbc55e90612047867583 | [
"CC-BY-3.0"
] | null | null | null | eggs/bx_python-0.7.1_7b95ff194725-py2.7-linux-x86_64-ucs4.egg/EGG-INFO/scripts/bed_subtract_basewise.py | bopopescu/phyG | 023f505b705ab953f502cbc55e90612047867583 | [
"CC-BY-3.0"
] | 1 | 2020-07-25T21:03:18.000Z | 2020-07-25T21:03:18.000Z | #!/afs/bx.psu.edu/project/pythons/linux-x86_64-ucs4/bin/python2.7
"""
Find continuous regions that are covered by the first bed file (`bed_file_1`)
but not by the second bed file (`bed_file_2`)
usage: %prog bed_file_1 bed_file_2
"""
import sys
from warnings import warn
from bx.bitset_builders import binned_bitsets_f... | 24.954545 | 77 | 0.684882 |
0b1b04bfc557d58d191a4038ceb860865af26b94 | 4,195 | py | Python | lib/ezdxf/tools/rgb.py | tapnair/DXFer | 8ec957d80c2f251bb78440147d1478106f99b3eb | [
"MIT"
] | 4 | 2019-03-31T00:41:13.000Z | 2021-07-31T05:09:07.000Z | lib/ezdxf/tools/rgb.py | tapnair/DXFer | 8ec957d80c2f251bb78440147d1478106f99b3eb | [
"MIT"
] | null | null | null | lib/ezdxf/tools/rgb.py | tapnair/DXFer | 8ec957d80c2f251bb78440147d1478106f99b3eb | [
"MIT"
] | 5 | 2018-03-29T06:28:07.000Z | 2021-07-31T05:09:08.000Z | # Purpose: work with true color values
# Created: 03.07.2015 taken from my dxfgrabber package
# Copyright (C) 2011, Manfred Moitzi
# License: MIT License
__author__ = "mozman <mozman@gmx.at>"
def int2rgb(value):
return (
(value >> 16) & 0xFF, # red
(value >> 8) & 0xFF, # green
value & 0x... | 14.719298 | 77 | 0.573063 |
82f529d160bc38dad7b3d13b279d503137a68a4e | 11,014 | py | Python | test/functional/test_framework/test_node.py | mitchelvanamstel/flits-core | e6c01dce389511a78b1f6a6896a6d6e97af45c64 | [
"MIT"
] | 2 | 2020-06-30T09:55:56.000Z | 2021-03-20T06:20:35.000Z | test/functional/test_framework/test_node.py | mitchelvanamstel/flits-core | e6c01dce389511a78b1f6a6896a6d6e97af45c64 | [
"MIT"
] | null | null | null | test/functional/test_framework/test_node.py | mitchelvanamstel/flits-core | e6c01dce389511a78b1f6a6896a6d6e97af45c64 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Class for flsd node under test"""
import decimal
import errno
import http.client
import json
import logging... | 38.376307 | 248 | 0.625931 |
b9dd134614b85970df267c69d0100aaa3914540d | 690 | py | Python | Other-models/ucr-fordA-expROCKET.py | alirezaghods/PIPNet | 8608cf5a4c0722c2aeaf8fddbb2d003b259611b7 | [
"MIT"
] | null | null | null | Other-models/ucr-fordA-expROCKET.py | alirezaghods/PIPNet | 8608cf5a4c0722c2aeaf8fddbb2d003b259611b7 | [
"MIT"
] | null | null | null | Other-models/ucr-fordA-expROCKET.py | alirezaghods/PIPNet | 8608cf5a4c0722c2aeaf8fddbb2d003b259611b7 | [
"MIT"
] | null | null | null | import sys
sys.path.append('./')
from datasets.fordA import load_data
from rocket_functions import generate_kernels, apply_kernels
from sklearn.linear_model import RidgeClassifierCV
(x_train, y_train, pic_train), (x_test, y_test, pic_test) = load_data()
(x_train, y_train, pic_train), (x_test, y_test, pic_test) = loa... | 34.5 | 81 | 0.798551 |
6ddc28063b0379b464ba46f8fe2af03639216dc6 | 2,771 | py | Python | scripts/standardize_interwiki.py | leucosticte/speedypywikibot | f03d2070aa5d30a1f82540b0eda6fa603eb341f9 | [
"MIT"
] | 3 | 2019-02-14T13:59:34.000Z | 2021-11-08T09:23:03.000Z | scripts/standardize_interwiki.py | leucosticte/speedypywikibot | f03d2070aa5d30a1f82540b0eda6fa603eb341f9 | [
"MIT"
] | null | null | null | scripts/standardize_interwiki.py | leucosticte/speedypywikibot | f03d2070aa5d30a1f82540b0eda6fa603eb341f9 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Loop over all pages in the home wiki, standardizing the interwiki links.
Parameters:
-start: - Set from what page you want to start
"""
#
# (C) Rob W.W. Hooft, 2003
# (C) Pywikibot team, 2003-2018
#
# Distributed under the terms of the MIT license.
#
from __future__ i... | 30.788889 | 79 | 0.585709 |
3dd713ad66b1310db7484d5d8f82d733b58aaa21 | 5,685 | py | Python | modoboa_radicale/backends/caldav_.py | Toniob/modoboa-radicale | 2ff783c1ba6e7d37b72de618cc33676e682328fe | [
"MIT"
] | null | null | null | modoboa_radicale/backends/caldav_.py | Toniob/modoboa-radicale | 2ff783c1ba6e7d37b72de618cc33676e682328fe | [
"MIT"
] | null | null | null | modoboa_radicale/backends/caldav_.py | Toniob/modoboa-radicale | 2ff783c1ba6e7d37b72de618cc33676e682328fe | [
"MIT"
] | null | null | null | """CalDAV calendar backend."""
import datetime
import uuid
import caldav
from caldav.elements import dav, ical
import icalendar
from django.utils import timezone
from django.utils.encoding import smart_str
from modoboa.parameters import tools as param_tools
from . import CalendarBackend
class Caldav_Backend(Cale... | 36.677419 | 76 | 0.572208 |
ec47dd2c2270eeda2dcc02a822e190668522a8e1 | 8,932 | py | Python | slash2/utils/tsuite2/utils/ssh.py | zhihui-slash2/slash2-next | d174a735f9860d2d9e31c47548bda67257400804 | [
"0BSD"
] | null | null | null | slash2/utils/tsuite2/utils/ssh.py | zhihui-slash2/slash2-next | d174a735f9860d2d9e31c47548bda67257400804 | [
"0BSD"
] | null | null | null | slash2/utils/tsuite2/utils/ssh.py | zhihui-slash2/slash2-next | d174a735f9860d2d9e31c47548bda67257400804 | [
"0BSD"
] | null | null | null | import paramiko, getpass, logging
import os, re, errno
from os import path
from time import sleep
log = logging.getLogger('ssh')
logging.getLogger("paramiko").setLevel(logging.WARNING)
class SSH(object):
"""Helpful SSH abstractions for executing remote applications."""
def __init__(self, user, host, password=No... | 29.381579 | 238 | 0.604792 |
26977c5f4e8c42e89d05e88f77e5cb7d11815b3f | 221 | py | Python | yawhois/parser/joburg_whois_registry_net_za.py | huyphan/pyyawhois | 77fb2f73a9c67989f1d41d98f37037406a69d136 | [
"MIT"
] | null | null | null | yawhois/parser/joburg_whois_registry_net_za.py | huyphan/pyyawhois | 77fb2f73a9c67989f1d41d98f37037406a69d136 | [
"MIT"
] | null | null | null | yawhois/parser/joburg_whois_registry_net_za.py | huyphan/pyyawhois | 77fb2f73a9c67989f1d41d98f37037406a69d136 | [
"MIT"
] | null | null | null | from .za_central_registry import ZaCentralRegistryParser
class JoburgWhoisRegistryNetZaParser(ZaCentralRegistryParser):
def __init__(self, *args):
super(JoburgWhoisRegistryNetZaParser, self).__init__(*args)
| 31.571429 | 67 | 0.81448 |
6b9ba5e896a5a1c30ed423b7833c4cf345240d00 | 2,733 | py | Python | codenotes/util/help.py | EGAMAGZ/code-notes | 960a018d5a6f0bbbe6b94e17e32553fe6d54d3e2 | [
"MIT"
] | 4 | 2021-02-13T05:19:10.000Z | 2021-02-15T06:25:08.000Z | codenotes/util/help.py | EGAMAGZ/code-notes | 960a018d5a6f0bbbe6b94e17e32553fe6d54d3e2 | [
"MIT"
] | 1 | 2021-04-15T03:59:19.000Z | 2021-04-21T20:10:56.000Z | codenotes/util/help.py | EGAMAGZ/codenotes | 960a018d5a6f0bbbe6b94e17e32553fe6d54d3e2 | [
"MIT"
] | null | null | null | from typing import Text, Final
CLI_USAGE_TEXT: Final[Text] = """[quote]Write any thought you have without quitting from the command line[/quote]
[header]USAGE[/header]
codenotes <command> <annotation> <text> <flags>
[header]CORE COMMANDS[/header]
add Create new note or task with the content typed
search Search... | 34.594937 | 118 | 0.754848 |
1d06206b4ad4c4b59416920f764db93f98a761d8 | 9,235 | py | Python | demo_cli.py | Reterno12/Multi-Tacotron-Voice-Cloning | 4cdec83a962b020a2ca92c08329a2f4949453e02 | [
"MIT"
] | null | null | null | demo_cli.py | Reterno12/Multi-Tacotron-Voice-Cloning | 4cdec83a962b020a2ca92c08329a2f4949453e02 | [
"MIT"
] | null | null | null | demo_cli.py | Reterno12/Multi-Tacotron-Voice-Cloning | 4cdec83a962b020a2ca92c08329a2f4949453e02 | [
"MIT"
] | null | null | null | from encoder.params_model import model_embedding_size as speaker_embedding_size
from utils.argutils import print_args
from synthesizer.inference import Synthesizer
from encoder import inference as encoder
from vocoder import inference as vocoder
from pathlib import Path
import numpy as np
import librosa
import soundfil... | 46.407035 | 143 | 0.675257 |
c041404e829b98dec7e0e6ca1897be2efde83406 | 2,555 | py | Python | deeppavlov/skills/dsl_skill/handlers/handler.py | xbodx/DeepPavlov | 4b60bf162df4294b8b0db3b72786cdd699c674fa | [
"Apache-2.0"
] | 5,893 | 2018-02-01T18:13:20.000Z | 2022-03-31T19:22:21.000Z | deeppavlov/skills/dsl_skill/handlers/handler.py | xbodx/DeepPavlov | 4b60bf162df4294b8b0db3b72786cdd699c674fa | [
"Apache-2.0"
] | 749 | 2018-01-31T11:36:02.000Z | 2022-03-30T07:24:22.000Z | deeppavlov/skills/dsl_skill/handlers/handler.py | xbodx/DeepPavlov | 4b60bf162df4294b8b0db3b72786cdd699c674fa | [
"Apache-2.0"
] | 1,155 | 2018-02-01T10:52:15.000Z | 2022-03-29T02:12:15.000Z | # Copyright 2019 Neural Networks and Deep Learning lab, MIPT
#
# 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... | 37.028986 | 118 | 0.686106 |
168c4be2301a5eeaf7c0d97fab5dbe57070c67bf | 3,164 | py | Python | biblio/settings.py | tesa123/kurs_django | 36d0c4bc8acc08a367c2745b23be821b3dcbb482 | [
"MIT"
] | null | null | null | biblio/settings.py | tesa123/kurs_django | 36d0c4bc8acc08a367c2745b23be821b3dcbb482 | [
"MIT"
] | null | null | null | biblio/settings.py | tesa123/kurs_django | 36d0c4bc8acc08a367c2745b23be821b3dcbb482 | [
"MIT"
] | null | null | null | """
Django settings for biblio project.
Generated by 'django-admin startproject' using Django 1.10.
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
#... | 26.14876 | 91 | 0.698799 |
83da5a442ecdd4d5bbae60cd8adb0ec288299937 | 6,444 | py | Python | nbsmoke/__init__.py | ContinuumIO/nbsmoke | 7293dfc17708824f041ca6f75a56bafd619cef09 | [
"BSD-3-Clause"
] | 7 | 2019-08-12T17:14:54.000Z | 2021-11-18T23:00:30.000Z | nbsmoke/__init__.py | pyviz-dev/nbsmoke | 7293dfc17708824f041ca6f75a56bafd619cef09 | [
"BSD-3-Clause"
] | 36 | 2019-09-01T13:04:09.000Z | 2021-10-31T16:45:24.000Z | nbsmoke/__init__.py | ContinuumIO/nbsmoke | 7293dfc17708824f041ca6f75a56bafd619cef09 | [
"BSD-3-Clause"
] | 3 | 2018-06-10T01:50:02.000Z | 2019-02-21T07:55:48.000Z | # -*- coding: utf-8 -*-
# Note: created with cookiecutter by someone with no experience of how
# to make a pytest plugin. Please question anything related to the
# pytest integration!
import re
import os
import io
import contextlib
import param
import pytest
import nbformat
import nbconvert
from nbconvert.preproces... | 36.613636 | 149 | 0.632992 |
bab25d74807b46159cbec3e735a87ec7c883b662 | 12,762 | py | Python | env/lib/python3.8/site-packages/plotly/validators/_scattermapbox.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 2 | 2021-07-07T20:16:23.000Z | 2021-07-14T14:03:09.000Z | env/lib/python3.8/site-packages/plotly/validators/_scattermapbox.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 5 | 2020-06-05T20:56:21.000Z | 2021-09-22T19:12:42.000Z | env/lib/python3.8/site-packages/plotly/validators/_scattermapbox.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 2 | 2020-07-05T12:57:14.000Z | 2020-07-05T12:58:00.000Z | import _plotly_utils.basevalidators
class ScattermapboxValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="scattermapbox", parent_name="", **kwargs):
super(ScattermapboxValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_nam... | 48.340909 | 78 | 0.545212 |
9b54019d17daf089dd6007bac2ffa465d63758d2 | 704 | py | Python | web/addons/website_quote/__openerp__.py | diogocs1/comps | 63df07f6cf21c41e4527c06e2d0499f23f4322e7 | [
"Apache-2.0"
] | 1 | 2019-12-29T11:53:56.000Z | 2019-12-29T11:53:56.000Z | odoo/addons/website_quote/__openerp__.py | tuanquanghpvn/odoo8-tutorial | 52d25f1ca5f233c431cb9d3b24b79c3b4fb5127e | [
"MIT"
] | null | null | null | odoo/addons/website_quote/__openerp__.py | tuanquanghpvn/odoo8-tutorial | 52d25f1ca5f233c431cb9d3b24b79c3b4fb5127e | [
"MIT"
] | 3 | 2020-10-08T14:42:10.000Z | 2022-01-28T14:12:29.000Z | {
'name': 'Online Proposals',
'category': 'Website',
'summary': 'Send Professional Quotations',
'website': 'https://www.odoo.com/page/quote-builder',
'version': '1.0',
'description': """
OpenERP Sale Quote Roller
=========================
""",
'author': 'OpenERP SA',
'depends': ... | 26.074074 | 57 | 0.553977 |
bf32946985452099eb7a358aa2319b84fc926e53 | 2,898 | py | Python | utils/plot.py | Z-yq/TensorflowTTS | abbc79f6e8d97fed3c7308ae844b97f59d349301 | [
"Apache-2.0"
] | 50 | 2021-04-02T07:23:00.000Z | 2022-03-23T06:13:58.000Z | utils/plot.py | Z-yq/TensorflowTTS | abbc79f6e8d97fed3c7308ae844b97f59d349301 | [
"Apache-2.0"
] | 3 | 2021-05-21T07:23:57.000Z | 2021-12-08T08:25:19.000Z | utils/plot.py | Z-yq/TensorflowTTS | abbc79f6e8d97fed3c7308ae844b97f59d349301 | [
"Apache-2.0"
] | 15 | 2021-04-17T10:57:17.000Z | 2022-03-18T09:28:11.000Z | import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import numpy as np
def split_title_line(title_text, max_words=5):
"""
A function that splits any string based on specific character
(returning it with the string), with maximum number of words on it
"""
seq = title_text.spli... | 29.876289 | 113 | 0.646998 |
0f70e53221634c25ef5b9365ad4e3d8d00516b0d | 1,605 | py | Python | doc/source/isphx/objpull.py | flying-sheep/sphobjinv | 0aa56e3982f99bf811cef4126e452ddd65cae088 | [
"MIT"
] | 55 | 2016-10-30T05:03:16.000Z | 2022-03-13T18:00:44.000Z | doc/source/isphx/objpull.py | flying-sheep/sphobjinv | 0aa56e3982f99bf811cef4126e452ddd65cae088 | [
"MIT"
] | 202 | 2016-05-16T13:25:50.000Z | 2022-03-22T20:05:45.000Z | doc/source/isphx/objpull.py | bskinn/sphinx-objectsinv | 505c7afc656f20b9e105f4ead9c6eb570eef971a | [
"MIT"
] | 4 | 2020-03-29T01:47:50.000Z | 2021-04-07T13:37:05.000Z | # Quickie script for refreshing the local objects.inv cache
# OVERWRITES EXISTING FILES, WITH PRE-DELETION
def pullobjs():
import os
import urllib.request as urlrq
import certifi
# Open conf.py, retrieve content and compile
with open(os.path.join(os.pardir, 'conf.py'), 'r') as f:
confc... | 25.887097 | 80 | 0.54704 |
dc7a0224e7d734a9ffb14f4ffe0f3e3ee9497609 | 4,145 | py | Python | research/counting/train.py | OOXXXXOO/XCloud | 021342eec570f12d82ae750a645dc1cb99cfb733 | [
"MIT"
] | null | null | null | research/counting/train.py | OOXXXXOO/XCloud | 021342eec570f12d82ae750a645dc1cb99cfb733 | [
"MIT"
] | 11 | 2021-03-19T15:23:06.000Z | 2022-03-12T00:51:00.000Z | research/counting/train.py | OOXXXXOO/XCloud | 021342eec570f12d82ae750a645dc1cb99cfb733 | [
"MIT"
] | null | null | null | import numpy as np
import time
import torch
import torch.nn as nn
import os
# import visdom
import random
from tqdm import tqdm as tqdm
from research.counting.cannet import CANNet
from research.counting.datasets import ShanghaiTechCrowdCountingDataset
if __name__ == "__main__":
# configuration
train_image_roo... | 40.242718 | 119 | 0.620989 |
1a465f5b232d6186913eb99b43ba05e429225848 | 1,996 | py | Python | GUI/main.py | Crismaria11/Proyecto2_DS | e75814a17ea736fb04f6d11a47af039cbf40a02b | [
"MIT"
] | null | null | null | GUI/main.py | Crismaria11/Proyecto2_DS | e75814a17ea736fb04f6d11a47af039cbf40a02b | [
"MIT"
] | null | null | null | GUI/main.py | Crismaria11/Proyecto2_DS | e75814a17ea736fb04f6d11a47af039cbf40a02b | [
"MIT"
] | null | null | null | import tkinter as tk
from PIL import ImageTk, Image # pip3 install Pillow
from tkinter import filedialog
import engine.torch as tengine
import matplotlib.pyplot as plt
def upload(): # AQUI SE SUBE LA IMAGEN
filename = filedialog.askopenfilename(title='open', filetypes=[("Images", ".jpg")])
img = Image.open... | 29.352941 | 97 | 0.716433 |
86209ddabb585ea77e0d967a96a70f187aaec9af | 5,283 | py | Python | auto_editor/validateInput.py | WyattBlue/auto-editor | 6bb35cb0119f07e9b18eec0fbec3163d1bd281b2 | [
"Unlicense"
] | 835 | 2020-04-30T06:04:46.000Z | 2022-03-31T06:14:06.000Z | auto_editor/validateInput.py | WyattBlue/auto-editor | 6bb35cb0119f07e9b18eec0fbec3163d1bd281b2 | [
"Unlicense"
] | 191 | 2020-05-04T16:17:10.000Z | 2022-03-29T09:30:49.000Z | auto_editor/validateInput.py | WyattBlue/auto-editor | 6bb35cb0119f07e9b18eec0fbec3163d1bd281b2 | [
"Unlicense"
] | 183 | 2020-05-04T12:39:23.000Z | 2022-03-30T16:56:34.000Z | '''validateInput.py'''
import os
import re
import sys
from auto_editor.utils.progressbar import ProgressBar
invalidExtensions = ['.txt', '.md', '.rtf', '.csv', '.cvs', '.html', '.htm',
'.xml', '.yaml', '.png', '.jpeg', '.jpg', '.exe', '.doc',
'.docx', '.odt', '.pptx', '.xlsx', '.xls', 'ods', '.pdf', '.ba... | 33.226415 | 91 | 0.563884 |
2e9f0194a82bffdedad7fd24a9d039612b7340ab | 1,400 | py | Python | extraction/vard/test/integration.py | BarracudaPff/code-golf-data-pythpn | 42e8858c2ebc6a061012bcadb167d29cebb85c5e | [
"MIT"
] | null | null | null | extraction/vard/test/integration.py | BarracudaPff/code-golf-data-pythpn | 42e8858c2ebc6a061012bcadb167d29cebb85c5e | [
"MIT"
] | null | null | null | extraction/vard/test/integration.py | BarracudaPff/code-golf-data-pythpn | 42e8858c2ebc6a061012bcadb167d29cebb85c5e | [
"MIT"
] | null | null | null | import os, sys, subprocess, shutil
import unittest
sys.path.append(os.path.realpath(os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "bench")))
from vard import Client
import time
VARD = os.path.join(os.path.dirname(os.path.realpath(__file__)), "..", "vard.native")
class TestVard(unittest.TestCase):
cli... | 37.837838 | 166 | 0.67 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.