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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
798725de7949c75eea13c62d6ce4090346c88f05 | 4,250 | py | Python | SubDumpPost/subdumppost.py | zatherz/reddit | bd4378ff62e893d28fa824df5678c6de4021b123 | [
"MIT"
] | 4 | 2016-05-04T10:46:58.000Z | 2021-03-22T06:05:40.000Z | SubDumpPost/subdumppost.py | zatherz/reddit | bd4378ff62e893d28fa824df5678c6de4021b123 | [
"MIT"
] | null | null | null | SubDumpPost/subdumppost.py | zatherz/reddit | bd4378ff62e893d28fa824df5678c6de4021b123 | [
"MIT"
] | null | null | null | #/u/GoldenSights
import traceback
import praw
import time
import sqlite3
'''USER CONFIGURATION'''
APP_ID = ""
APP_SECRET = ""
APP_URI = ""
APP_REFRESH = ""
# https://www.reddit.com/comments/3cm1p8/how_to_make_your_bot_use_oauth2/
USERAGENT = ""
# This is a short description of what the bot does.
# For example "/u/Gol... | 29.310345 | 94 | 0.658824 |
798725f3f0799652b253a1476e6cdf703d784fbe | 5,270 | py | Python | common_utils/ml_analytics.py | AbdelrhmanBassiouny/dl_utils | 7977a4c92c3430fcd581f8d0ac7aa8dc291cee23 | [
"Apache-2.0"
] | null | null | null | common_utils/ml_analytics.py | AbdelrhmanBassiouny/dl_utils | 7977a4c92c3430fcd581f8d0ac7aa8dc291cee23 | [
"Apache-2.0"
] | 2 | 2021-12-19T14:20:18.000Z | 2022-03-12T01:05:33.000Z | common_utils/ml_analytics.py | AbdelrhmanBassiouny/dl_utils | 7977a4c92c3430fcd581f8d0ac7aa8dc291cee23 | [
"Apache-2.0"
] | null | null | null | import copy
import numpy as np
import matplotlib.pyplot as plt
def get_common_idxs(a, b, a_not_in_b=False):
common_idxs = []
if a_not_in_b:
idxs_of_a_not_in_b = np.ones_like(a, dtype=bool)
for i, a_val in enumerate(a):
for j, b_val in enumerate(b):
if a_val == b_val:
... | 37.375887 | 112 | 0.598102 |
7987277202209ce4ccd1d0d2ec35980f5cb2443c | 1,820 | py | Python | __init__.py | vmarkovtsev/plueprint | c4e949bd012468d149e9d94a18d6dc597ba9481c | [
"BSD-3-Clause"
] | 25 | 2015-10-27T15:38:48.000Z | 2021-04-29T13:18:11.000Z | plueprint/__init__.py | olaferlandsen/apigen | f61d96121edbe62a98257b00d2dbe7c1b9e438f8 | [
"Apache-2.0"
] | 4 | 2016-02-25T21:05:41.000Z | 2020-05-14T05:27:13.000Z | plueprint/__init__.py | olaferlandsen/apigen | f61d96121edbe62a98257b00d2dbe7c1b9e438f8 | [
"Apache-2.0"
] | 11 | 2015-11-24T09:31:23.000Z | 2021-04-29T13:18:12.000Z | # -*- coding: utf-8 -*-
"""
API Blueprint (https://github.com/apiaryio/api-blueprint) parser which uses
Markdown (https://pythonhosted.org/Markdown/).
Released under New BSD License.
Copyright © 2015, Vadim Markovtsev :: AO InvestGroup
All rights reserved.
Redistribution and use in source and binary forms, with or w... | 45.5 | 79 | 0.784066 |
79872779e2855e131977989e50822f66067e0e25 | 263 | py | Python | PacoteDownload/ex027.py | NataliaNasu/cursoemvideo-python3 | 7c206a5ff347416cd83c7a665a7acaffe088f7e7 | [
"MIT"
] | null | null | null | PacoteDownload/ex027.py | NataliaNasu/cursoemvideo-python3 | 7c206a5ff347416cd83c7a665a7acaffe088f7e7 | [
"MIT"
] | null | null | null | PacoteDownload/ex027.py | NataliaNasu/cursoemvideo-python3 | 7c206a5ff347416cd83c7a665a7acaffe088f7e7 | [
"MIT"
] | null | null | null | n = str(input('Informe o seu nome completo: ')).strip()
nome = n.split()
#tamanho = len(nome)
#print(f'Primeiro nome: {nome[0]}')
#print(f'Último sobrenome: {nome[tamanho-1]}')
print(f'O primeiro nome: {nome[0]}')
print(f'O último sobrenome: {nome[len(nome)-1]}') | 37.571429 | 55 | 0.665399 |
79872794d9222290fe29815dd048656361c2cd8c | 1,590 | py | Python | src/python/autotransform/step/condition/updated.py | nathro/AutoTransform | 04ef5458bc8401121e33370ceda6ef638e535e9a | [
"MIT"
] | 11 | 2022-01-02T00:50:24.000Z | 2022-02-22T00:30:09.000Z | src/python/autotransform/step/condition/updated.py | nathro/AutoTransform | 04ef5458bc8401121e33370ceda6ef638e535e9a | [
"MIT"
] | 6 | 2022-01-06T01:45:34.000Z | 2022-02-03T21:49:52.000Z | src/python/autotransform/step/condition/updated.py | nathro/AutoTransform | 04ef5458bc8401121e33370ceda6ef638e535e9a | [
"MIT"
] | null | null | null | # AutoTransform
# Large scale, component based code modification library
#
# Licensed under the MIT License <http://opensource.org/licenses/MIT>
# SPDX-License-Identifier: MIT
# Copyright (c) 2022-present Nathan Rockenbach <http://github.com/nathro>
# @black_format
"""The implementation for all conditions handling wh... | 32.44898 | 96 | 0.731447 |
79872857ec449d515fcc3e2660cb63e83eac01e7 | 6,610 | py | Python | plugins/pokedexlib/create_lib.py | Jeglerjeg/pcbot | 3cf1f6c7bce71600ca4078ff9539f1586250c044 | [
"MIT"
] | null | null | null | plugins/pokedexlib/create_lib.py | Jeglerjeg/pcbot | 3cf1f6c7bce71600ca4078ff9539f1586250c044 | [
"MIT"
] | null | null | null | plugins/pokedexlib/create_lib.py | Jeglerjeg/pcbot | 3cf1f6c7bce71600ca4078ff9539f1586250c044 | [
"MIT"
] | null | null | null | import json
from collections import defaultdict
from operator import itemgetter
import csv
pokedex = dict(
pokemon={},
generations=[],
types={}
)
def get_pokemon_name(pokemon_id: int):
""" Return the name of a pokemon's ID. """
for name, value in pokedex["pokemon"].items():
if value["id"... | 33.21608 | 114 | 0.517247 |
798728b81613bce59ffd3a1fa8ee7e9a24c2f953 | 551 | py | Python | walletwatcher/model/config.py | rafaelzimmermann/cryptowatcher | f344b7111c41667510ee1f4e1565ee2acb2c0b14 | [
"MIT"
] | 11 | 2021-12-07T13:31:42.000Z | 2022-01-04T09:55:39.000Z | walletwatcher/model/config.py | rafaelzimmermann/cryptowatch | f344b7111c41667510ee1f4e1565ee2acb2c0b14 | [
"MIT"
] | 2 | 2021-11-26T18:50:03.000Z | 2022-02-13T11:56:16.000Z | walletwatcher/model/config.py | rafaelzimmermann/cryptowatch | f344b7111c41667510ee1f4e1565ee2acb2c0b14 | [
"MIT"
] | 1 | 2021-09-18T16:39:33.000Z | 2021-09-18T16:39:33.000Z | import json
from model.portfolio import Portfolio
class BalanceConfig:
def __init__(self, manual_portifolio: Portfolio) -> None:
self.manual_portifolio = manual_portifolio
class Config:
def __init__(self, currency: str, balance_config: BalanceConfig):
self.currency = currency
... | 22.04 | 69 | 0.662432 |
798728e76adbfc3302f494d9dc40a4e1f084bbbf | 882 | py | Python | model-optimizer/extensions/front/tf/softplus_ext.py | anton-potapov/openvino | 84119afe9a8c965e0a0cd920fff53aee67b05108 | [
"Apache-2.0"
] | 2 | 2020-11-18T14:14:06.000Z | 2020-11-28T04:55:57.000Z | model-optimizer/extensions/front/tf/softplus_ext.py | anton-potapov/openvino | 84119afe9a8c965e0a0cd920fff53aee67b05108 | [
"Apache-2.0"
] | 30 | 2020-11-13T11:44:07.000Z | 2022-02-21T13:03:16.000Z | model-optimizer/extensions/front/tf/softplus_ext.py | mmakridi/openvino | 769bb7709597c14debdaa356dd60c5a78bdfa97e | [
"Apache-2.0"
] | 3 | 2021-03-09T08:27:29.000Z | 2021-04-07T04:58:54.000Z | """
Copyright (C) 2020 Intel Corporation
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 wri... | 30.413793 | 73 | 0.752834 |
7987299613d59e001cfd07a8cdbd37a9b9990117 | 497 | py | Python | examples/example_basic.py | vincentloechner/pytkdraw | a657d1580720d854514e3df786f5a23c51aa970c | [
"MIT"
] | 1 | 2022-01-27T15:18:41.000Z | 2022-01-27T15:18:41.000Z | examples/example_basic.py | vincentloechner/pytkdraw | a657d1580720d854514e3df786f5a23c51aa970c | [
"MIT"
] | null | null | null | examples/example_basic.py | vincentloechner/pytkdraw | a657d1580720d854514e3df786f5a23c51aa970c | [
"MIT"
] | null | null | null | """Example usage of the basic module."""
import tkdraw.basic as graph
# size of the window (number of pixels)
HEIGHT = 400
WIDTH = 600
# open the window
graph.open_win(HEIGHT, WIDTH)
# plot some red diagonals in it
for i in range(HEIGHT):
for j in range(WIDTH):
if ((i-j)//50) % 2 == 0:
graph.... | 23.666667 | 78 | 0.651911 |
79872a7b4ab2fa37ed97d95ff213d0f03ba7079d | 1,635 | py | Python | .nilakkhana/parser/extensions/deregister_standard_functions.py | ccronje/bilara-data | cf233329454642d621540b14a1268c1bf9f8d7af | [
"CC0-1.0"
] | 13 | 2019-10-19T22:35:23.000Z | 2022-03-20T12:49:45.000Z | .nilakkhana/parser/extensions/deregister_standard_functions.py | ccronje/bilara-data | cf233329454642d621540b14a1268c1bf9f8d7af | [
"CC0-1.0"
] | 120 | 2019-11-01T22:57:21.000Z | 2022-03-29T08:43:53.000Z | .nilakkhana/parser/extensions/deregister_standard_functions.py | ccronje/bilara-data | cf233329454642d621540b14a1268c1bf9f8d7af | [
"CC0-1.0"
] | 25 | 2019-09-30T18:57:08.000Z | 2022-03-20T14:35:58.000Z | from markdown import Markdown
from markdown.extensions import Extension
class DeregisterStandardFunctionsExtension(Extension):
PREPROCESSORS = [
# 'normalize_whitespace',
# 'html_block',
]
BLOCK_PROCESSORS = [
'empty',
'indent',
'code',
'hashheader',
... | 22.39726 | 65 | 0.566361 |
79872dc19fbb2cc235cc186f010e4ad68b8e8321 | 1,926 | py | Python | var/spack/repos/builtin/packages/r-sn/package.py | renjithravindrankannath/spack | 043b2cbb7c99d69a373f3ecbf35bc3b4638bcf85 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/r-sn/package.py | renjithravindrankannath/spack | 043b2cbb7c99d69a373f3ecbf35bc3b4638bcf85 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/r-sn/package.py | renjithravindrankannath/spack | 043b2cbb7c99d69a373f3ecbf35bc3b4638bcf85 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2019-02-08T20:37:20.000Z | 2019-03-31T15:19:26.000Z | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class RSn(RPackage):
"""The Skew-Normal and Related Distributions Such as the Skew-t.
... | 53.5 | 95 | 0.752856 |
79872fd3f20e0b560cf441c9825e8f1229b823b0 | 394 | py | Python | messenger/activity/startCli.py | kant/MessengerPy | f1d61d1519fbd5ca6bb180b504dc3053a0207dbf | [
"Apache-2.0"
] | null | null | null | messenger/activity/startCli.py | kant/MessengerPy | f1d61d1519fbd5ca6bb180b504dc3053a0207dbf | [
"Apache-2.0"
] | null | null | null | messenger/activity/startCli.py | kant/MessengerPy | f1d61d1519fbd5ca6bb180b504dc3053a0207dbf | [
"Apache-2.0"
] | 2 | 2021-05-31T22:30:11.000Z | 2021-08-22T09:24:39.000Z | #Start Command line interface / run MessengerPy with the commandline.
#python terminal colours(because cool)
#class cliUtils
# this.HEADER = '\033[95m'
# this.OKBLUE = '\033[94m'
# this.OKCYAN = '\033[96m'
# this.OKGREEN = '\033[92m'
# this.WARNING = '\033[93m'
# this.FAIL = '\033[91m'
# this.E... | 24.625 | 69 | 0.614213 |
79872fdbc4091decbce9803bf613bb72760cf9a2 | 1,605 | py | Python | tests/test_io/test_from_dataframes.py | mondeja/waves | 87b830fdb963c28dd055cc55ee09826c9df2302b | [
"BSD-3-Clause"
] | null | null | null | tests/test_io/test_from_dataframes.py | mondeja/waves | 87b830fdb963c28dd055cc55ee09826c9df2302b | [
"BSD-3-Clause"
] | 37 | 2021-02-01T13:58:20.000Z | 2022-01-01T19:38:59.000Z | tests/test_io/test_from_dataframes.py | mondeja/waves | 87b830fdb963c28dd055cc55ee09826c9df2302b | [
"BSD-3-Clause"
] | null | null | null | """Tests for ``from_dataframes`` generator class method."""
import numpy as np
import pytest
from waves import Sound
@pytest.mark.parametrize(
"explicit_n_frames",
(True, False),
ids=("explicit `n_frames` kwarg", "implicit `n_frames` kwarg"),
)
def test_from_dataframes_mono(mono_sound, explicit_n_frames... | 25.078125 | 70 | 0.654829 |
79873057b45db88939d5274d175d38790aec4ef1 | 2,901 | py | Python | aries_cloudagent/commands/start.py | dhiway/aries-cloudagent-python | f08b7d65e404c8274c6606328c959a865a22c706 | [
"Apache-2.0"
] | 2 | 2019-10-10T16:33:01.000Z | 2019-10-10T19:22:17.000Z | aries_cloudagent/commands/start.py | dhiway/aries-cloudagent-python | f08b7d65e404c8274c6606328c959a865a22c706 | [
"Apache-2.0"
] | 5 | 2019-10-13T01:28:48.000Z | 2019-10-21T20:10:47.000Z | aries_cloudagent/commands/start.py | dhiway/aries-cloudagent-python | f08b7d65e404c8274c6606328c959a865a22c706 | [
"Apache-2.0"
] | 4 | 2019-07-09T20:41:03.000Z | 2021-06-06T10:45:23.000Z | """Entrypoint."""
import asyncio
import functools
import logging
import os
import signal
from argparse import ArgumentParser
from typing import Coroutine, Sequence
try:
import uvloop
except ImportError:
uvloop = None
from ..core.conductor import Conductor
from ..config import argparse as arg
from ..config.de... | 27.367925 | 85 | 0.681489 |
798730c0c3b1bee69631dc92aeaa55eb5c3fc540 | 5,444 | py | Python | test/distributed/elastic/events/lib_test.py | Hacky-DH/pytorch | 80dc4be615854570aa39a7e36495897d8a040ecc | [
"Intel"
] | 60,067 | 2017-01-18T17:21:31.000Z | 2022-03-31T21:37:45.000Z | test/distributed/elastic/events/lib_test.py | Hacky-DH/pytorch | 80dc4be615854570aa39a7e36495897d8a040ecc | [
"Intel"
] | 66,955 | 2017-01-18T17:21:38.000Z | 2022-03-31T23:56:11.000Z | test/distributed/elastic/events/lib_test.py | Hacky-DH/pytorch | 80dc4be615854570aa39a7e36495897d8a040ecc | [
"Intel"
] | 19,210 | 2017-01-18T17:45:04.000Z | 2022-03-31T23:51:56.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.abs
import json
import logging
import unittest
from dataclasses import asdict
from unittes... | 39.449275 | 103 | 0.702057 |
798730fc730e6e28362efe656869b8857d96c37d | 131 | py | Python | PycharmProjects/Cursoemvideo/exe112/teste.py | Alexandrelb78/CursoemvideoPython | b14efe1c7a27b190db6d3b7519bb313b6944759e | [
"MIT"
] | null | null | null | PycharmProjects/Cursoemvideo/exe112/teste.py | Alexandrelb78/CursoemvideoPython | b14efe1c7a27b190db6d3b7519bb313b6944759e | [
"MIT"
] | null | null | null | PycharmProjects/Cursoemvideo/exe112/teste.py | Alexandrelb78/CursoemvideoPython | b14efe1c7a27b190db6d3b7519bb313b6944759e | [
"MIT"
] | null | null | null | import exe112.utilidadesCeV
from exe112.utilidadesCeV import moeda
p = dado.leia('DIGITE O PREÇO: R$ '))
moeda.resumo(p, 35, 22)
| 18.714286 | 38 | 0.740458 |
7987323adbed35b14c02345ce7f6acd02c9b225e | 2,388 | py | Python | resume/tests.py | kerbrek/hyperskill-hyperjob | abf25a04a1968b7884256da589dde2ee2dd7f44f | [
"MIT"
] | null | null | null | resume/tests.py | kerbrek/hyperskill-hyperjob | abf25a04a1968b7884256da589dde2ee2dd7f44f | [
"MIT"
] | null | null | null | resume/tests.py | kerbrek/hyperskill-hyperjob | abf25a04a1968b7884256da589dde2ee2dd7f44f | [
"MIT"
] | null | null | null | import logging
from django.contrib.auth import get_user_model
from django.test import TestCase
from .models import Resume
logging.disable(logging.CRITICAL)
ADMIN_NAME = 'admin'
ADMIN_PASS = 'password'
REGULAR_USER_NAME = 'user'
REGULAR_USER_PASS = 'secret'
RESUME_DESCRIPTION = 'Python Developer'
RESUME_DESCRIPTION_... | 34.608696 | 77 | 0.688861 |
7987338068c14aa046f357dbaf8f065989adbc1c | 1,117 | py | Python | stalk_my_mum/__init__.py | Math3mat1x/stalk-my-mum | efea0acd87e3ba8f8d684b13879af80e53f92084 | [
"MIT"
] | null | null | null | stalk_my_mum/__init__.py | Math3mat1x/stalk-my-mum | efea0acd87e3ba8f8d684b13879af80e53f92084 | [
"MIT"
] | null | null | null | stalk_my_mum/__init__.py | Math3mat1x/stalk-my-mum | efea0acd87e3ba8f8d684b13879af80e53f92084 | [
"MIT"
] | null | null | null | import os
from pyicloud import PyiCloudService
from .findmyfriends import FindFriendsService
from settings import username, password, lookup_dict
def init():
"""
Initialize and provide basic data.
Returns:
- iphone_api: PyiCloud object
- fmf_api: Find My Friend object
- following (... | 32.852941 | 110 | 0.72068 |
79873428446d6ca3fd93df5dbd567c5b6fabe220 | 10,944 | py | Python | py-polars/tests/test_datelike.py | mwatts/polars | 2f26a0b80abdc159a3f408de00065fceedce2eb5 | [
"MIT"
] | null | null | null | py-polars/tests/test_datelike.py | mwatts/polars | 2f26a0b80abdc159a3f408de00065fceedce2eb5 | [
"MIT"
] | null | null | null | py-polars/tests/test_datelike.py | mwatts/polars | 2f26a0b80abdc159a3f408de00065fceedce2eb5 | [
"MIT"
] | null | null | null | from datetime import date, datetime, timedelta
import numpy as np
import pyarrow as pa
import pytest
import polars as pl
def test_fill_null() -> None:
dt = datetime.strptime("2021-01-01", "%Y-%m-%d")
s = pl.Series("A", [dt, None])
for fill_val in (dt, pl.lit(dt)):
out = s.fill_null(fill_val) #... | 31.630058 | 88 | 0.546235 |
7987355ab49f9f97e75e4313baf5bff3a483d4f0 | 2,297 | py | Python | tests/test_readcol.py | cgosmeyer/analysis_tools | b15fa0b5973e96949cf459b49ef0bef2c1044aa5 | [
"MIT"
] | null | null | null | tests/test_readcol.py | cgosmeyer/analysis_tools | b15fa0b5973e96949cf459b49ef0bef2c1044aa5 | [
"MIT"
] | null | null | null | tests/test_readcol.py | cgosmeyer/analysis_tools | b15fa0b5973e96949cf459b49ef0bef2c1044aa5 | [
"MIT"
] | null | null | null |
"""
Nose tests for file column-based reader, `analysis_tools.io.readcol`.
Use:
>>> nosetests
Can be made part of git pre-commit hook, living in .git/hooks/pre-commit-nosetests
References:
http://offbytwo.com/2008/05/22/running-nosetests-as-a-git-pre-commit-hook.html
"""
from __future__ import print_function
... | 42.537037 | 179 | 0.654767 |
7987367bf1fd378fd0211fbcc58da72abb30f33a | 2,279 | py | Python | code/get_measures.py | SarahMorgan/NLP_psychosis | 671c2750b41d66a8fa521b522d8590a1c9f9d25e | [
"MIT"
] | 1 | 2021-12-13T16:14:07.000Z | 2021-12-13T16:14:07.000Z | code/get_measures.py | SarahMorgan/NLP_psychosis | 671c2750b41d66a8fa521b522d8590a1c9f9d25e | [
"MIT"
] | null | null | null | code/get_measures.py | SarahMorgan/NLP_psychosis | 671c2750b41d66a8fa521b522d8590a1c9f9d25e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Code to calculate NLP measures from a speech excerpt, as in Morgan et al 2021:
https://doi.org/10.1101/2021.01.04.20248717
Calculates NLP measures from basic_meas, coh_meas and tangent_meas and also plots the results as a spider plot.
Please cite the paper above if you use this code for your... | 37.360656 | 152 | 0.77183 |
798736d9cf1c2f590103cf870eb6390a9feaccf5 | 7,385 | py | Python | ezResearch/main.py | Zoko061602/planar-artifice | 1c64a38b7bffdc46a6b838aa809b4daf8fae6830 | [
"MIT"
] | 3 | 2020-09-23T08:00:56.000Z | 2020-09-30T17:15:51.000Z | ezResearch/main.py | Zoko061602/planar-artifice | 1c64a38b7bffdc46a6b838aa809b4daf8fae6830 | [
"MIT"
] | 5 | 2020-09-26T00:46:20.000Z | 2020-10-03T04:40:18.000Z | ezResearch/main.py | Zoko061602/planar-artifice | 1c64a38b7bffdc46a6b838aa809b4daf8fae6830 | [
"MIT"
] | 1 | 2020-09-26T15:35:21.000Z | 2020-09-26T15:35:21.000Z | ######################################
# EASY THAUMCRAFT RESEARCH GENERATOR #
######################################
import os
import json
import copy
import re
# Made to remove duplicate contents for Thaumcraft researches.
################################################################################
##############... | 41.027778 | 133 | 0.510494 |
7987371bc8245ff51b1e6e8f25708d44dcd6c662 | 80,405 | py | Python | envi/archs/i386/emu.py | sprout42/vivisect | bbb8072abd0dbe728f08f4f4d1e36a87c7b57c36 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | envi/archs/i386/emu.py | sprout42/vivisect | bbb8072abd0dbe728f08f4f4d1e36a87c7b57c36 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | envi/archs/i386/emu.py | sprout42/vivisect | bbb8072abd0dbe728f08f4f4d1e36a87c7b57c36 | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2021-10-12T15:37:24.000Z | 2021-10-21T15:25:31.000Z | """
Home for the i386 emulation code.
"""
import struct
import operator
import envi
from envi.const import *
import envi.exc as e_exc
import envi.bits as e_bits
from envi.archs.i386.opconst import PREFIX_REX_W, REP_OPCODES
from envi.archs.i386.regs import *
from envi.archs.i386.disasm import *
from envi.archs.i386 im... | 30.410363 | 145 | 0.56254 |
798737cbe5ded5bc149303c47d581a6c663cb826 | 1,083 | py | Python | kisseru/handler.py | chamibuddhika/kisseru | 6a77cbbf10f85c71a95c5e0d784bd41bdc5a00b6 | [
"Apache-2.0"
] | 4 | 2018-08-07T12:51:32.000Z | 2021-04-07T22:10:26.000Z | kisseru/handler.py | chamibuddhika/kiseru | 6a77cbbf10f85c71a95c5e0d784bd41bdc5a00b6 | [
"Apache-2.0"
] | 13 | 2018-07-30T17:57:40.000Z | 2019-01-22T16:42:51.000Z | kisseru/handler.py | chamibuddhika/kiseru | 6a77cbbf10f85c71a95c5e0d784bd41bdc5a00b6 | [
"Apache-2.0"
] | 1 | 2020-01-17T22:49:33.000Z | 2020-01-17T22:49:33.000Z | class HandlerContext(object):
def __init__(self, fn):
self.fn = fn
self.properties = {'__name__': fn.__name__}
self.ret = None
self.args = None
self.sig = None
def get(self, prop):
if prop in self.properties:
return self.properties[prop]
retur... | 24.613636 | 78 | 0.636196 |
79873874d247cba14bbd2b8fdf81bd0131cb185d | 3,762 | py | Python | src/cogent3/align/progressive.py | rahulghangas/cogent3 | f00cf822efce5f3141b3c7dafac81cb94a311e22 | [
"BSD-3-Clause"
] | null | null | null | src/cogent3/align/progressive.py | rahulghangas/cogent3 | f00cf822efce5f3141b3c7dafac81cb94a311e22 | [
"BSD-3-Clause"
] | null | null | null | src/cogent3/align/progressive.py | rahulghangas/cogent3 | f00cf822efce5f3141b3c7dafac81cb94a311e22 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
from cogent3 import make_tree
from cogent3.core.info import Info
from cogent3.evolve.distance import EstimateDistances
from cogent3.phylo import nj as NJ
from cogent3.util import progress_display as UI
__author__ = "Peter Maxwell"
__copyright__ = "Copyright 2007-2019, The Cogent Project"
__cre... | 31.35 | 79 | 0.660819 |
79873a15acda6adfd6cb2426a026e5db3c422de4 | 2,531 | py | Python | aiida_jutools/_dev/terminal_colors.py | PhilippRue/aiida-jutools | 66070e7077cb454bcfd70dd3327b335499556a16 | [
"MIT"
] | 5 | 2020-12-11T13:32:09.000Z | 2022-01-19T08:36:40.000Z | aiida_jutools/_dev/terminal_colors.py | PhilippRue/aiida-jutools | 66070e7077cb454bcfd70dd3327b335499556a16 | [
"MIT"
] | 7 | 2021-01-28T10:24:13.000Z | 2021-08-18T13:42:47.000Z | aiida_jutools/_dev/terminal_colors.py | PhilippRue/aiida-jutools | 66070e7077cb454bcfd70dd3327b335499556a16 | [
"MIT"
] | 5 | 2020-12-07T17:13:38.000Z | 2021-11-25T09:58:48.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright (c), Forschungszentrum Jülich GmbH, IAS-1/PGI-1, Germany. #
# All rights reserved. #
# This file is part of the aiida-j... | 32.448718 | 79 | 0.512841 |
79873a2680fb7811e00785f5712a5dcf0d55a2f5 | 11,112 | py | Python | pscript/__init__.py | jayvdb/pscript | d239a23b56f43fae481719e302ef27d9cf0ba39a | [
"BSD-2-Clause"
] | null | null | null | pscript/__init__.py | jayvdb/pscript | d239a23b56f43fae481719e302ef27d9cf0ba39a | [
"BSD-2-Clause"
] | null | null | null | pscript/__init__.py | jayvdb/pscript | d239a23b56f43fae481719e302ef27d9cf0ba39a | [
"BSD-2-Clause"
] | null | null | null | """
The pscript module provides functionality for transpiling Python code
to JavaScript.
Quick intro
-----------
This is a brief intro for using PScript. For more details see the
sections below.
PScript is a tool to write JavaScript using (a subset) of the Python
language. All relevant builtins, and the methods of l... | 38.71777 | 92 | 0.737221 |
79873b75e2dbbffa26dcf64a72594e3c2690b3f7 | 1,596 | py | Python | tests/tests_indiv_jobs/test_ooziejob.py | tadinve/ctm_python_client | de44e5012214ec42bb99b7f9b4ebc5394cd14328 | [
"BSD-3-Clause"
] | null | null | null | tests/tests_indiv_jobs/test_ooziejob.py | tadinve/ctm_python_client | de44e5012214ec42bb99b7f9b4ebc5394cd14328 | [
"BSD-3-Clause"
] | null | null | null | tests/tests_indiv_jobs/test_ooziejob.py | tadinve/ctm_python_client | de44e5012214ec42bb99b7f9b4ebc5394cd14328 | [
"BSD-3-Clause"
] | null | null | null | from ctm_python_client.jobs.hadoop.oozie import OozieJob
import os
from ctm_python_client.core.bmc_control_m import CmJobFlow
from ctm_python_client.session.session import Session
BASE_PATH = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(BASE_PATH, ".secrets"), "r") as fp:
ctm_uri = fp.readli... | 27.517241 | 95 | 0.68609 |
79873b7e3cecba3d349e2e805e3af2c79c6d4e55 | 1,538 | py | Python | server/models/dtos/campaign_dto.py | Guillon88/tasking-manager | 8f05eef7cb008c680a82dc9884ab7a83a12ab1f8 | [
"BSD-2-Clause"
] | 1 | 2021-08-02T15:32:31.000Z | 2021-08-02T15:32:31.000Z | server/models/dtos/campaign_dto.py | Guillon88/tasking-manager | 8f05eef7cb008c680a82dc9884ab7a83a12ab1f8 | [
"BSD-2-Clause"
] | null | null | null | server/models/dtos/campaign_dto.py | Guillon88/tasking-manager | 8f05eef7cb008c680a82dc9884ab7a83a12ab1f8 | [
"BSD-2-Clause"
] | null | null | null | from schematics import Model
from schematics.types import StringType, IntType, ListType, ModelType
from server.models.dtos.organisation_dto import OrganisationDTO
class NewCampaignDTO(Model):
""" Describes JSON model to create a campaign """
name = StringType(serialize_when_none=False)
logo = StringType(... | 30.76 | 83 | 0.742523 |
79873bc74eac0806f6b3eaf276c8b2266426120d | 4,640 | py | Python | nlpaug/model/lang_models/roberta.py | rokity/nlpaug | ac86a91696908b3e5ca13364a97d2802f954aea9 | [
"MIT"
] | 1 | 2021-11-30T03:17:51.000Z | 2021-11-30T03:17:51.000Z | nlpaug/model/lang_models/roberta.py | rokity/nlpaug | ac86a91696908b3e5ca13364a97d2802f954aea9 | [
"MIT"
] | null | null | null | nlpaug/model/lang_models/roberta.py | rokity/nlpaug | ac86a91696908b3e5ca13364a97d2802f954aea9 | [
"MIT"
] | null | null | null | import logging
try:
import torch
from transformers import AutoModelForMaskedLM, AutoTokenizer
except ImportError:
# No installation required if not using this function
pass
from nlpaug.model.lang_models import LanguageModels
from nlpaug.util.selection.filtering import *
class Roberta(LanguageModels)... | 40 | 120 | 0.669828 |
79873bfa5b14aceaaa51bf99e59f813e785c6c5f | 409 | py | Python | venv/Scripts/pip3.7-script.py | cmpgamer/gwbot | 4634354052fc45fa2fd09d2b9894b2f81a9c176b | [
"Apache-2.0"
] | null | null | null | venv/Scripts/pip3.7-script.py | cmpgamer/gwbot | 4634354052fc45fa2fd09d2b9894b2f81a9c176b | [
"Apache-2.0"
] | null | null | null | venv/Scripts/pip3.7-script.py | cmpgamer/gwbot | 4634354052fc45fa2fd09d2b9894b2f81a9c176b | [
"Apache-2.0"
] | null | null | null | #!C:\Users\Bryan\Desktop\CALMbot\venv\Scripts\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'pip==10.0.1','console_scripts','pip3.7'
__requires__ = 'pip==10.0.1'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
... | 31.461538 | 70 | 0.662592 |
79873cad31764c91fa06871fea8e031e4b47fd9a | 507 | py | Python | GMATE/main.py | lexrupy/gmate-editor | 7036d58a083ad6c05c1eb4cf7cb92405b369adb7 | [
"MIT"
] | 1 | 2016-05-09T11:48:44.000Z | 2016-05-09T11:48:44.000Z | GMATE/main.py | lexrupy/gmate-editor | 7036d58a083ad6c05c1eb4cf7cb92405b369adb7 | [
"MIT"
] | null | null | null | GMATE/main.py | lexrupy/gmate-editor | 7036d58a083ad6c05c1eb4cf7cb92405b369adb7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# GMate - Plugin Based Programmer's Text Editor
# Copyright © 2008-2009 Alexandre da Silva
#
# This file is part of Gmate.
#
# See LICENTE.TXT for licence information
import gtk
import editor
class Gmate(object):
def __init__(self):
self.editor = editor.GmateEditor()
self... | 19.5 | 47 | 0.629191 |
79873cbd77f4930ee5db2b03925c983a52e98b23 | 818 | py | Python | 5_rl_framework/rl_m19/network/nematode.py | minister19/RL_pytorch_get_started | e444f524a14d329f9a25c53f102bc96c4ea36ad8 | [
"MIT"
] | null | null | null | 5_rl_framework/rl_m19/network/nematode.py | minister19/RL_pytorch_get_started | e444f524a14d329f9a25c53f102bc96c4ea36ad8 | [
"MIT"
] | null | null | null | 5_rl_framework/rl_m19/network/nematode.py | minister19/RL_pytorch_get_started | e444f524a14d329f9a25c53f102bc96c4ea36ad8 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
from rl_m19.network import core
class Nematode(nn.Module):
def __init__(self, state_dim, action_dim, device=None):
super().__init__()
self.net = core.mlp((state_dim, state_dim // 2, action_dim), bias=False)
self.to(device)
def forward(self, x: torch.... | 28.206897 | 97 | 0.672372 |
79873d2e235a04f4e6bd103d78a61f1752c5fe71 | 1,068 | py | Python | ml/tensorflow/-/my5.py | kosyachniy/dev | 39bb5c5ee10780bfcd8a59cf59cfb1a348ac52a4 | [
"Apache-2.0"
] | 13 | 2018-12-17T23:30:54.000Z | 2021-12-29T14:31:43.000Z | ml/tensorflow/-/my5.py | kosyachniy/dev | 39bb5c5ee10780bfcd8a59cf59cfb1a348ac52a4 | [
"Apache-2.0"
] | 36 | 2018-06-07T21:34:13.000Z | 2022-03-13T21:01:43.000Z | ml/tensorflow/-/my5.py | kosyachniy/dev | 39bb5c5ee10780bfcd8a59cf59cfb1a348ac52a4 | [
"Apache-2.0"
] | 2 | 2021-01-03T11:47:20.000Z | 2021-12-29T14:31:49.000Z | import numpy as np
import tensorflow as tf
#Данные
with open('data.csv', 'r') as f:
xxx=np.loadtxt(f, delimiter=',', skiprows=1)
with open('data.csv', 'r') as f:
yyy=np.loadtxt(f, delimiter=',', skiprows=1).T[0].T
xx=xxx.T
for i in range(len(xx[0])):
xx[0][i]=1
xx=xx.T
qw=[]
for i in yyy:
qw.append([float(i)])
y... | 25.428571 | 70 | 0.682584 |
79873d6396b001348480ee3936ddb4652d520b57 | 1,274 | py | Python | tests/testsuite/contrib/test_admin.py | danlamanna/django-rules | 27656602e83dd7fdef1b4c74f1ea80399b686380 | [
"MIT"
] | 3 | 2019-09-28T20:39:11.000Z | 2019-11-14T14:21:54.000Z | tests/testsuite/contrib/test_admin.py | danlamanna/django-rules | 27656602e83dd7fdef1b4c74f1ea80399b686380 | [
"MIT"
] | null | null | null | tests/testsuite/contrib/test_admin.py | danlamanna/django-rules | 27656602e83dd7fdef1b4c74f1ea80399b686380 | [
"MIT"
] | 1 | 2017-12-06T17:17:25.000Z | 2017-12-06T17:17:25.000Z | from django.test import TestCase
from django.urls import reverse
from . import TestData
class ModelAdminTests(TestData, TestCase):
def test_change_book(self):
# adrian can change his book as its author
self.assertTrue(self.client.login(username='adrian', password='secr3t'))
response = sel... | 43.931034 | 83 | 0.698587 |
79873defb817de9765ffa9c20f13d79500da5ab4 | 281 | py | Python | latex/slides/resources/11_sendmail/defs.py | Bizarious/python-lessons | 24144f03d70d9ed52b0430d4cc2aca9dcded14a3 | [
"CC-BY-4.0"
] | 10 | 2015-06-22T21:47:21.000Z | 2021-11-11T23:47:36.000Z | latex/slides/resources/11_sendmail/defs.py | Bizarious/python-lessons | 24144f03d70d9ed52b0430d4cc2aca9dcded14a3 | [
"CC-BY-4.0"
] | 14 | 2015-06-12T07:44:54.000Z | 2021-11-02T19:38:52.000Z | latex/slides/resources/11_sendmail/defs.py | Bizarious/python-lessons | 24144f03d70d9ed52b0430d4cc2aca9dcded14a3 | [
"CC-BY-4.0"
] | 14 | 2015-06-18T13:51:38.000Z | 2021-10-29T21:12:19.000Z | email.mime.text.MIMEText(_text, _subtype='plain', _charset=None)
smtplib.SMTP(host='', port=0, local_hostname=None, [timeout, ]source_address=None)
SMTP.login(user, password, *, initial_response_ok=True)
SMTP.sendmail(from_addr, to_addrs, msg, mail_options=[], rcpt_options=[])
| 35.125 | 82 | 0.761566 |
79873e00ce153e70e85d54501ec739e0ad948c8f | 8,970 | py | Python | nb_anacondacloud/uploader.py | abarto/nb_anacondacloud | 500cf3d7037de5dc0de10308535545bf5e8217ec | [
"BSD-2-Clause"
] | 5 | 2017-02-11T19:00:50.000Z | 2019-03-14T16:14:24.000Z | nb_anacondacloud/uploader.py | abarto/nb_anacondacloud | 500cf3d7037de5dc0de10308535545bf5e8217ec | [
"BSD-2-Clause"
] | 27 | 2016-04-15T17:35:13.000Z | 2018-05-30T17:27:04.000Z | nb_anacondacloud/uploader.py | abarto/nb_anacondacloud | 500cf3d7037de5dc0de10308535545bf5e8217ec | [
"BSD-2-Clause"
] | 7 | 2017-01-21T13:15:47.000Z | 2021-02-05T00:28:27.000Z | import json
import logging
import platform
import re
from io import BytesIO
from subprocess import check_output, CalledProcessError
import time
import os
import yaml
from binstar_client import errors
from binstar_client.utils import get_server_api, store_token
from binstar_client.utils.notebook.inflection import para... | 31.363636 | 79 | 0.536232 |
79873e51e29fb95d1be7888ee1b29dc9d6ea8796 | 2,354 | py | Python | trio2o/common/config.py | OpenCloudNeXt/trio2o | f4d2d5458fbba71414edebf5e9f69b98abd2d080 | [
"Apache-2.0"
] | 1 | 2021-03-19T16:48:55.000Z | 2021-03-19T16:48:55.000Z | trio2o/common/config.py | OpenCloudNeXt/trio2o | f4d2d5458fbba71414edebf5e9f69b98abd2d080 | [
"Apache-2.0"
] | null | null | null | trio2o/common/config.py | OpenCloudNeXt/trio2o | f4d2d5458fbba71414edebf5e9f69b98abd2d080 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 Huawei Technologies Co., Ltd.
# 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
#
# Un... | 28.361446 | 78 | 0.704758 |
79873ef76eac8811b05b5a702644af233cc8680d | 1,790 | py | Python | Chapter12/webapp/blog/models.py | jayakumardhananjayan/pythonwebtut | a7547473fec5b90a91aea5395131e6eff245b495 | [
"MIT"
] | 135 | 2018-10-31T11:52:35.000Z | 2022-03-23T12:23:04.000Z | Chapter12/webapp/blog/models.py | jayakumardhananjayan/pythonwebtut | a7547473fec5b90a91aea5395131e6eff245b495 | [
"MIT"
] | 6 | 2019-03-21T02:04:43.000Z | 2022-03-22T11:07:25.000Z | Chapter12/webapp/blog/models.py | jayakumardhananjayan/pythonwebtut | a7547473fec5b90a91aea5395131e6eff245b495 | [
"MIT"
] | 109 | 2018-10-30T22:26:23.000Z | 2022-03-24T14:53:13.000Z | import datetime
from .. import db
tags = db.Table(
'post_tags',
db.Column('post_id', db.Integer, db.ForeignKey('post.id')),
db.Column('tag_id', db.Integer, db.ForeignKey('tag.id'))
)
class Post(db.Model):
id = db.Column(db.Integer(), primary_key=True)
title = db.Column(db.String(255), nullable=Fa... | 30.862069 | 94 | 0.642458 |
79873f041847c5225397156c90eca9a09a5ea9df | 4,940 | py | Python | openaerostruct/structures/wingbox_geometry.py | lkelvinm/OpenAeroStruct | 395075d28783c1b99b4ab25ddf034000caf9cd0d | [
"Apache-2.0"
] | null | null | null | openaerostruct/structures/wingbox_geometry.py | lkelvinm/OpenAeroStruct | 395075d28783c1b99b4ab25ddf034000caf9cd0d | [
"Apache-2.0"
] | null | null | null | openaerostruct/structures/wingbox_geometry.py | lkelvinm/OpenAeroStruct | 395075d28783c1b99b4ab25ddf034000caf9cd0d | [
"Apache-2.0"
] | null | null | null | from __future__ import division, print_function
import numpy as np
from openmdao.api import ExplicitComponent
from openaerostruct.structures.utils import norm
class WingboxGeometry(ExplicitComponent):
"""
OpenMDAO component that performs mesh manipulation functions. It reads in
the initial mesh from the s... | 39.52 | 126 | 0.627328 |
79873fadb18a3007ff2e82891791451ef4775800 | 17,957 | py | Python | crabageprediction/venv/Lib/site-packages/fontTools/otlLib/optimize/gpos.py | 13rianlucero/CrabAgePrediction | 92bc7fbe1040f49e820473e33cc3902a5a7177c7 | [
"MIT"
] | 2,705 | 2016-09-27T10:02:12.000Z | 2022-03-31T09:37:46.000Z | crabageprediction/venv/Lib/site-packages/fontTools/otlLib/optimize/gpos.py | 13rianlucero/CrabAgePrediction | 92bc7fbe1040f49e820473e33cc3902a5a7177c7 | [
"MIT"
] | 1,599 | 2016-09-27T09:07:36.000Z | 2022-03-31T23:04:51.000Z | crabageprediction/venv/Lib/site-packages/fontTools/otlLib/optimize/gpos.py | 13rianlucero/CrabAgePrediction | 92bc7fbe1040f49e820473e33cc3902a5a7177c7 | [
"MIT"
] | 352 | 2016-10-07T04:18:15.000Z | 2022-03-30T07:35:01.000Z | import logging
from collections import defaultdict, namedtuple
from functools import reduce
from itertools import chain
from math import log2
from typing import DefaultDict, Dict, Iterable, List, Sequence, Tuple
from fontTools.misc.intTools import bit_count, bit_indices
from fontTools.ttLib import TTFont
from fontTool... | 40.811364 | 148 | 0.64777 |
79873ff5290230066ceae0ae9a00467a021d3794 | 17 | py | Python | dot_weechat/python/autoload/symlink_unhighlight.py | benmezger/new-dotfiles | 5aa41015bd017d0e4cc39edf374ca73e8c25b8cb | [
"MIT"
] | 68 | 2016-09-28T12:51:20.000Z | 2022-02-25T15:33:16.000Z | dot_weechat/python/autoload/symlink_unhighlight.py | benmezger/new-dotfiles | 5aa41015bd017d0e4cc39edf374ca73e8c25b8cb | [
"MIT"
] | null | null | null | dot_weechat/python/autoload/symlink_unhighlight.py | benmezger/new-dotfiles | 5aa41015bd017d0e4cc39edf374ca73e8c25b8cb | [
"MIT"
] | 2 | 2016-09-28T12:51:28.000Z | 2022-01-11T10:26:44.000Z | ../unhighlight.py | 17 | 17 | 0.764706 |
798741e2df077db38f5250b5942f202a23bc49c7 | 20,171 | py | Python | pysnmp-with-texts/SUN-MASTER-AGENT-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/SUN-MASTER-AGENT-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/SUN-MASTER-AGENT-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module SUN-MASTER-AGENT-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/SUN-MASTER-AGENT-MIB
# Produced by pysmi-0.3.4 at Wed May 1 15:12:05 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (defau... | 146.166667 | 1,975 | 0.797531 |
7987425060d41b313ea4fb5fc3853cd38f0cfc7f | 7,973 | py | Python | codes/repo/MGANet/MGANet.py | zhouhuanxiang/mmsr | 4d3f0d2cbfc4f259a2998655413330b4448c1056 | [
"Apache-2.0"
] | null | null | null | codes/repo/MGANet/MGANet.py | zhouhuanxiang/mmsr | 4d3f0d2cbfc4f259a2998655413330b4448c1056 | [
"Apache-2.0"
] | null | null | null | codes/repo/MGANet/MGANet.py | zhouhuanxiang/mmsr | 4d3f0d2cbfc4f259a2998655413330b4448c1056 | [
"Apache-2.0"
] | null | null | null | import torch
import torch.nn as nn
from torch.nn.init import kaiming_normal
import repo.MGANet.BiConvLSTM as BiConvLSTM
from models.base_model import BaseModel
def conv(batchNorm, in_planes, out_planes, kernel_size=3, stride=1):
if batchNorm:
return nn.Sequential(
nn.Conv2d(in_planes, out_plan... | 41.743455 | 118 | 0.641916 |
7987427d673588ab93520569cb51f17157c7799e | 6,458 | py | Python | e3_layer/persistent_point/periodic_convolution.py | L-sky/Master_Thesis | 609e3b1c81dfb2e13d86df106d81e2e56d32488d | [
"MIT"
] | null | null | null | e3_layer/persistent_point/periodic_convolution.py | L-sky/Master_Thesis | 609e3b1c81dfb2e13d86df106d81e2e56d32488d | [
"MIT"
] | null | null | null | e3_layer/persistent_point/periodic_convolution.py | L-sky/Master_Thesis | 609e3b1c81dfb2e13d86df106d81e2e56d32488d | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
if torch.cuda.is_available():
from se3cnn import pconv_with_kernel
class PeriodicConvolutionWithKernel(nn.Module):
def __init__(self, data_hub, number_of_the_layer):
super().__init__()
self.data_hub = data_hub
self.n = number_of_the_layer
def fo... | 53.371901 | 174 | 0.480644 |
798742f89ee6b430cd6466747018cfb22dd4720c | 6,077 | py | Python | src/apexpy/helpers.py | space-physics/apexpy | a27b085d596f90e5cda78a39f4e6c6a5f7f68baa | [
"MIT"
] | 2 | 2019-10-20T19:19:10.000Z | 2020-02-22T12:47:22.000Z | src/apexpy/helpers.py | space-physics/apexpy | a27b085d596f90e5cda78a39f4e6c6a5f7f68baa | [
"MIT"
] | null | null | null | src/apexpy/helpers.py | space-physics/apexpy | a27b085d596f90e5cda78a39f4e6c6a5f7f68baa | [
"MIT"
] | 1 | 2019-07-08T19:03:27.000Z | 2019-07-08T19:03:27.000Z | # -*- coding: utf-8 -*-
"""This module contains helper functions used by :class:`~apexpy.Apex`."""
from __future__ import division, print_function, absolute_import
import time
import datetime as dt
import numpy as np
def checklat(lat, name='lat'):
"""Makes sure the latitude is inside [-90, 90], clipping close ... | 26.653509 | 81 | 0.608195 |
798743a6d9a8a6c47b172ea18786715e8c0c7cfc | 114 | py | Python | arcade/intro/d. 30. circle-of-numbers/circle_of_numbers.py | jeury301/code-fights | 379dd541aed0f3918cf1659b635ec51368b0b349 | [
"MIT"
] | null | null | null | arcade/intro/d. 30. circle-of-numbers/circle_of_numbers.py | jeury301/code-fights | 379dd541aed0f3918cf1659b635ec51368b0b349 | [
"MIT"
] | null | null | null | arcade/intro/d. 30. circle-of-numbers/circle_of_numbers.py | jeury301/code-fights | 379dd541aed0f3918cf1659b635ec51368b0b349 | [
"MIT"
] | null | null | null | def circleOfNumbers(n, firstNumber):
return firstNumber + n/2 if firstNumber + n/2 < n else firstNumber - n/2
| 38 | 76 | 0.719298 |
798743b9aadcf1b6f8467d31ee3d4d4c9fad378b | 3,006 | py | Python | demisto_sdk/commands/format/update_job.py | SergeBakharev/demisto-sdk | 17d00942a1bd33039a8aba9ddffecfd81008d275 | [
"MIT"
] | null | null | null | demisto_sdk/commands/format/update_job.py | SergeBakharev/demisto-sdk | 17d00942a1bd33039a8aba9ddffecfd81008d275 | [
"MIT"
] | null | null | null | demisto_sdk/commands/format/update_job.py | SergeBakharev/demisto-sdk | 17d00942a1bd33039a8aba9ddffecfd81008d275 | [
"MIT"
] | null | null | null | import traceback
import click
from demisto_sdk.commands.common.constants import DEFAULT_JOB_FROM_VERSION
from demisto_sdk.commands.format.format_constants import (ERROR_RETURN_CODE,
SKIP_RETURN_CODE,
SU... | 43.565217 | 114 | 0.645709 |
7987441520f332e7db312bb72bc17a36ab3df9e9 | 5,035 | py | Python | tests/image/test_fid.py | vatch123/metrics | 1841cad3839f5d1907a1bb8bb6a266de5c5333f9 | [
"Apache-2.0"
] | null | null | null | tests/image/test_fid.py | vatch123/metrics | 1841cad3839f5d1907a1bb8bb6a266de5c5333f9 | [
"Apache-2.0"
] | null | null | null | tests/image/test_fid.py | vatch123/metrics | 1841cad3839f5d1907a1bb8bb6a266de5c5333f9 | [
"Apache-2.0"
] | null | null | null | # Copyright The PyTorch Lightning team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 33.791946 | 113 | 0.689374 |
79874496cc7e9c6d2386246d2b79badbb3e2bddb | 65,469 | py | Python | src/cryptoadvance/specter/server_endpoints/wallets.py | zi3lak/specter-desktop | 091140d4a470a2c167eb592b51a2edb9cccc1153 | [
"MIT"
] | null | null | null | src/cryptoadvance/specter/server_endpoints/wallets.py | zi3lak/specter-desktop | 091140d4a470a2c167eb592b51a2edb9cccc1153 | [
"MIT"
] | null | null | null | src/cryptoadvance/specter/server_endpoints/wallets.py | zi3lak/specter-desktop | 091140d4a470a2c167eb592b51a2edb9cccc1153 | [
"MIT"
] | null | null | null | import ast
import base64
import csv
import json
import logging
import os
import random
import time
from binascii import b2a_base64
from datetime import datetime
from functools import wraps
from io import StringIO
from math import isnan
from numbers import Number
import requests
from flask import Blueprint, Flask
from ... | 37.539564 | 522 | 0.556492 |
7987456acace25c7383fcee74886203f3d7de78c | 489 | py | Python | tests/namespaces_tests/test_contains.py | lycantropos/paradigm | a74cd885e2a07418425379099ddc090edc6e1772 | [
"MIT"
] | 3 | 2019-09-11T07:24:07.000Z | 2020-11-27T04:09:06.000Z | tests/namespaces_tests/test_contains.py | lycantropos/paradigm | a74cd885e2a07418425379099ddc090edc6e1772 | [
"MIT"
] | 21 | 2018-11-08T17:34:00.000Z | 2019-12-14T13:57:29.000Z | tests/namespaces_tests/test_contains.py | lycantropos/paradigm | a74cd885e2a07418425379099ddc090edc6e1772 | [
"MIT"
] | 1 | 2019-09-11T07:24:14.000Z | 2019-09-11T07:24:14.000Z | from typing import Tuple
from hypothesis import given
from paradigm import catalog
from paradigm.hints import Namespace
from paradigm.namespaces import contains
from . import strategies
@given(strategies.namespaces_with_non_empty_objects_paths)
def test_basic(namespace_with_object_path: Tuple[Namespace, catalog.Pat... | 25.736842 | 73 | 0.791411 |
798745a3ca3fe84825824fd00bdcc3cdf52fe8b8 | 480 | py | Python | ejercicio 11.py | claudiaalozano/Warm-up | 0988534ed8d651d35079b58ab5eb7ae0e09d993b | [
"Apache-2.0"
] | null | null | null | ejercicio 11.py | claudiaalozano/Warm-up | 0988534ed8d651d35079b58ab5eb7ae0e09d993b | [
"Apache-2.0"
] | null | null | null | ejercicio 11.py | claudiaalozano/Warm-up | 0988534ed8d651d35079b58ab5eb7ae0e09d993b | [
"Apache-2.0"
] | null | null | null | iterations=10000
variables=['work','salary','conditions','career_advancement','social_impact','job_se_curity','life_balance','location','atmosphere','travel']
def Monte_Carlo(grade):
final_results=[]
weight=[0.15,0.09,0.12,0.11,0.12,0.02,0.11,0.07,0.1,0.11]
for n in range(iterations):
results=[]
for i in range(len... | 36.923077 | 141 | 0.722917 |
798745be160db53f6582449e0b75ab0670280aad | 2,621 | py | Python | src/kmeans.py | ragavvenkatesan/SearchEngine | 99c8225be7aea96cb3fe3450064695914ec033ba | [
"MIT"
] | null | null | null | src/kmeans.py | ragavvenkatesan/SearchEngine | 99c8225be7aea96cb3fe3450064695914ec033ba | [
"MIT"
] | null | null | null | src/kmeans.py | ragavvenkatesan/SearchEngine | 99c8225be7aea96cb3fe3450064695914ec033ba | [
"MIT"
] | null | null | null | # from https://gist.github.com/betzerra/8744068
import sys
import math
import random
import subprocess
class Point:
def __init__(self, coords, id = None):
self.coords = coords
self.n = len(coords)
if not id is None:
self.id = id
def __repr__(self):
ret... | 30.476744 | 84 | 0.574971 |
798745c5993af5e70fe692a131cb388b8c2e7685 | 154 | py | Python | nike_api/views.py | yani27/web-scraping-nike-website | 3ba4fa41d9ecad78394021cc54f9ce0487069386 | [
"MIT"
] | 9 | 2019-05-29T23:50:28.000Z | 2021-01-29T20:51:05.000Z | nike_api/views.py | yani27/web-scraping-nike-website | 3ba4fa41d9ecad78394021cc54f9ce0487069386 | [
"MIT"
] | 1 | 2021-01-29T18:31:08.000Z | 2021-01-29T18:31:08.000Z | nike_api/views.py | yassine-youcefi/web-scraping-nike-website | 3ba4fa41d9ecad78394021cc54f9ce0487069386 | [
"MIT"
] | 3 | 2020-05-25T02:38:08.000Z | 2021-01-20T06:23:06.000Z | from run import app
from flask import jsonify,render_template
@app.route('/')
def home():
return render_template('index.html')
app.run(port= 4848) | 17.111111 | 41 | 0.727273 |
798745cb4a4c58103e8a873e760d6c1431c41bc2 | 2,015 | py | Python | ingestion/src/metadata/ingestion/api/sink.py | ulixius9/OpenMetadata | f121698d968717f0932f685ef2a512c2a4d92438 | [
"Apache-2.0"
] | null | null | null | ingestion/src/metadata/ingestion/api/sink.py | ulixius9/OpenMetadata | f121698d968717f0932f685ef2a512c2a4d92438 | [
"Apache-2.0"
] | null | null | null | ingestion/src/metadata/ingestion/api/sink.py | ulixius9/OpenMetadata | f121698d968717f0932f685ef2a512c2a4d92438 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Collate
# 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, software... | 31 | 99 | 0.723077 |
798746617f71049c73eee8ae49b65a177a767cee | 2,852 | py | Python | src/cnn_web_scraper.py | bvorapoom/DSCI510_FinalProject | babdf25ec28589c76ac3485836756af848e61a0f | [
"Apache-2.0"
] | null | null | null | src/cnn_web_scraper.py | bvorapoom/DSCI510_FinalProject | babdf25ec28589c76ac3485836756af848e61a0f | [
"Apache-2.0"
] | null | null | null | src/cnn_web_scraper.py | bvorapoom/DSCI510_FinalProject | babdf25ec28589c76ac3485836756af848e61a0f | [
"Apache-2.0"
] | null | null | null | from bs4 import BeautifulSoup
import requests
import re
import pandas as pd
import argparse
def get_html_from_url(url):
''' get soup from input url
params:
url : str, url of the web that will get soup from
returns:
BeautifulSoup object
'''
try:
content = requests.get(url)... | 30.666667 | 140 | 0.649369 |
798747836690f551ce8826ab3fafc67e4c527e2d | 348 | py | Python | 118A - String Task.py | bugraaldal/Codeforces | fc5bc0abd94ccf9244d0465e4173fa1ef463630a | [
"MIT"
] | 3 | 2021-04-30T09:25:33.000Z | 2021-04-30T09:25:57.000Z | 118A - String Task.py | bugraaldal/Codeforces | fc5bc0abd94ccf9244d0465e4173fa1ef463630a | [
"MIT"
] | null | null | null | 118A - String Task.py | bugraaldal/Codeforces | fc5bc0abd94ccf9244d0465e4173fa1ef463630a | [
"MIT"
] | null | null | null | # https://codeforces.com/problemset/problem/118/A
""" Taking the input and removing the vowels, then adding the dots (There were double dots at first.) """
word = input("").lower()
no_Vowel = word.translate({ord(change): None for change in "aoyeui"})
no_Vowels = f".{no_Vowel}"
points = ".".join(no_Vowels).replace("..",... | 43.5 | 105 | 0.692529 |
798748daccbc564f441d1ffadf0b815e810ea29b | 2,231 | py | Python | timm/models/layers/classifier.py | Robert-JunWang/pytorch-image-models | 7c67d6aca992f039eece0af5f7c29a43d48c00e4 | [
"Apache-2.0"
] | 5 | 2022-03-03T00:42:03.000Z | 2022-03-25T04:29:56.000Z | timm/models/layers/classifier.py | Robert-JunWang/pytorch-image-models | 7c67d6aca992f039eece0af5f7c29a43d48c00e4 | [
"Apache-2.0"
] | null | null | null | timm/models/layers/classifier.py | Robert-JunWang/pytorch-image-models | 7c67d6aca992f039eece0af5f7c29a43d48c00e4 | [
"Apache-2.0"
] | 2 | 2021-03-19T00:41:43.000Z | 2021-05-16T10:34:23.000Z | """ Classifier head and layer factory
Hacked together by / Copyright 2020 Ross Wightman
"""
from torch import nn as nn
from torch.nn import functional as F
from .adaptive_avgmax_pool import SelectAdaptivePool2d
def _create_pool(num_features, num_classes, pool_type='avg', use_conv=False):
flatten_in_pool = not u... | 40.563636 | 111 | 0.720305 |
79874a39feedc51feedf7436ce6d2896c99ea884 | 847 | py | Python | midiclock.py | knickita/python-prodj-link | 4be86a86a74f1e90604c2d0e0abe2d2c2b02a238 | [
"Apache-2.0"
] | 1 | 2020-03-29T06:27:19.000Z | 2020-03-29T06:27:19.000Z | midiclock.py | brunchboy/python-prodj-link | 4be86a86a74f1e90604c2d0e0abe2d2c2b02a238 | [
"Apache-2.0"
] | null | null | null | midiclock.py | brunchboy/python-prodj-link | 4be86a86a74f1e90604c2d0e0abe2d2c2b02a238 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
import logging
from prodj import ProDj
from midiclock_alsaseq import MidiClock
#default_loglevel=logging.DEBUG
default_loglevel=logging.INFO
#default_loglevel=logging.WARNING
logging.basicConfig(level=default_loglevel, format='%(levelname)s: %(message)s')
c = MidiClock("CH345")
bpm = 128 # defau... | 20.166667 | 80 | 0.730815 |
79874ab31b2c43a040d1aeea259fb289d1c1926c | 6,434 | py | Python | tensorflow/python/kernel_tests/linalg/sparse/csr_sparse_matrix_grad_test.py | ashutom/tensorflow-upstream | c16069c19de9e286dd664abb78d0ea421e9f32d4 | [
"Apache-2.0"
] | 10 | 2021-05-25T17:43:04.000Z | 2022-03-08T10:46:09.000Z | tensorflow/python/kernel_tests/linalg/sparse/csr_sparse_matrix_grad_test.py | CaptainGizzy21/tensorflow | 3457a2b122e50b4d44ceaaed5a663d635e5c22df | [
"Apache-2.0"
] | 17 | 2021-08-12T19:38:42.000Z | 2022-01-27T14:39:35.000Z | tensorflow/python/kernel_tests/linalg/sparse/csr_sparse_matrix_grad_test.py | CaptainGizzy21/tensorflow | 3457a2b122e50b4d44ceaaed5a663d635e5c22df | [
"Apache-2.0"
] | 4 | 2022-01-13T11:23:44.000Z | 2022-03-02T11:11:42.000Z | # Copyright 2019 The TensorFlow 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 applica... | 42.893333 | 103 | 0.69055 |
79874ac7d0d7c704b237baea3435b23ea5af118d | 3,384 | py | Python | rss_it/settings.py | guille0/rss-it | a7f7a6e7d5e2769fed207856840714a3d2b933bd | [
"MIT"
] | null | null | null | rss_it/settings.py | guille0/rss-it | a7f7a6e7d5e2769fed207856840714a3d2b933bd | [
"MIT"
] | 15 | 2020-02-12T00:21:58.000Z | 2022-03-11T23:48:16.000Z | rss_it/settings.py | guille0/rss-it | a7f7a6e7d5e2769fed207856840714a3d2b933bd | [
"MIT"
] | null | null | null | """
Django settings for rss_it project.
Generated by 'django-admin startproject' using Django 2.2.1.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
import os
# ... | 26.645669 | 91 | 0.701537 |
79874ac8831d736c379fda46a5ca3cc8d8c495cd | 136 | py | Python | example/django/pye_web/app_pye/models.py | ParikhKadam/pyconcrete | 2fa5c0588331ceab7f9bffcfaacd9d2446a44bdb | [
"Apache-2.0"
] | null | null | null | example/django/pye_web/app_pye/models.py | ParikhKadam/pyconcrete | 2fa5c0588331ceab7f9bffcfaacd9d2446a44bdb | [
"Apache-2.0"
] | null | null | null | example/django/pye_web/app_pye/models.py | ParikhKadam/pyconcrete | 2fa5c0588331ceab7f9bffcfaacd9d2446a44bdb | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models # noqa: F401
# Create your models here.
| 19.428571 | 42 | 0.720588 |
79874aecfdbf988f4f7e4cbf4970d9f3c750947e | 966 | py | Python | tests/test_parser.py | asteinh/SymPathY | 52cca41baf09c65914f01cc58d92adcc365dc15f | [
"MIT"
] | null | null | null | tests/test_parser.py | asteinh/SymPathY | 52cca41baf09c65914f01cc58d92adcc365dc15f | [
"MIT"
] | 1 | 2020-04-25T11:53:42.000Z | 2020-04-26T14:27:49.000Z | tests/test_parser.py | asteinh/SymPathY | 52cca41baf09c65914f01cc58d92adcc365dc15f | [
"MIT"
] | null | null | null | import pytest
from sympathor.parser import ParsePaths
class TestParser():
@pytest.fixture(params=[
('tests/files/test_ok_1.svg', True), # multiple paths
('tests/files/test_ok_2.svg', True), # no paths
('tests/files/test_ok_3.svg', True), # no svg tag
('tests/files/test_ok_4.svg'... | 35.777778 | 67 | 0.576605 |
79874d0dce2181e8a3f8381819f75e3f62b80b2e | 13,997 | py | Python | get_hidden.py | laiguokun/fairseq | 6c01c91aac81eb2e3173add4463dfa45c404ffa5 | [
"MIT"
] | 1 | 2020-06-08T19:40:03.000Z | 2020-06-08T19:40:03.000Z | get_hidden.py | laiguokun/fairseq | 6c01c91aac81eb2e3173add4463dfa45c404ffa5 | [
"MIT"
] | null | null | null | get_hidden.py | laiguokun/fairseq | 6c01c91aac81eb2e3173add4463dfa45c404ffa5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3 -u
# 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.
"""
Train a new model on one or across multiple GPUs.
"""
import collections
from collections import OrderedDict
imp... | 35.982005 | 100 | 0.618561 |
79874d55085ced5325d877c5264ea333dbcfa472 | 2,377 | py | Python | pylark/api_service_application_app_visibility_update.py | chyroc/pylark | a54cce6b814935fd3c72668b262b54c8ee461484 | [
"Apache-2.0"
] | 7 | 2021-08-18T00:42:05.000Z | 2022-03-14T09:49:15.000Z | pylark/api_service_application_app_visibility_update.py | chyroc/pylark | a54cce6b814935fd3c72668b262b54c8ee461484 | [
"Apache-2.0"
] | null | null | null | pylark/api_service_application_app_visibility_update.py | chyroc/pylark | a54cce6b814935fd3c72668b262b54c8ee461484 | [
"Apache-2.0"
] | 1 | 2022-03-14T09:49:20.000Z | 2022-03-14T09:49:20.000Z | # Code generated by lark_sdk_gen. DO NOT EDIT.
from pylark.lark_request import RawRequestReq, _new_method_option
from pylark import lark_type, lark_type_sheet, lark_type_approval
import attr
import typing
import io
@attr.s
class UpdateApplicationAppVisibilityReqAddUsers(object):
open_id: str = attr.ib(
d... | 37.140625 | 87 | 0.682373 |
79874d909f604268b4398e583b3bb2ab02559e4a | 12,204 | py | Python | qkeras/qnormalization.py | google/qkeras | 8dbc20d3ca32cf4536ad675d57e70586f8aedbb2 | [
"Apache-2.0"
] | 388 | 2019-08-06T22:16:48.000Z | 2022-03-30T17:17:47.000Z | qkeras/qnormalization.py | dev-swi2021/qkeras | a714b04a7a8e574fc07335dc0baace3c66110435 | [
"Apache-2.0"
] | 76 | 2019-08-21T19:25:58.000Z | 2022-03-31T09:07:07.000Z | qkeras/qnormalization.py | dev-swi2021/qkeras | a714b04a7a8e574fc07335dc0baace3c66110435 | [
"Apache-2.0"
] | 79 | 2019-08-15T03:00:02.000Z | 2022-03-31T09:05:11.000Z | # Copyright 2019 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,... | 37.094225 | 98 | 0.695018 |
79874ed98b1779b8b582b307158b95539407d315 | 771 | py | Python | src/webapp/controllers/therm.py | phillikus/mcuThermometer | 20bdc62ce8af7184dee2cab50822f34e26bd4a71 | [
"MIT"
] | 1 | 2019-11-24T11:28:23.000Z | 2019-11-24T11:28:23.000Z | src/webapp/controllers/therm.py | phillikus/mcuThermometer | 20bdc62ce8af7184dee2cab50822f34e26bd4a71 | [
"MIT"
] | null | null | null | src/webapp/controllers/therm.py | phillikus/mcuThermometer | 20bdc62ce8af7184dee2cab50822f34e26bd4a71 | [
"MIT"
] | 2 | 2019-11-24T15:33:36.000Z | 2021-08-02T14:47:58.000Z | from flask import Flask, Blueprint, request, jsonify
import flask
import redis
red = redis.StrictRedis.from_url('redis://redis:6379/0')
therm_controller = Blueprint('therm', 'therm', url_prefix='/therm')
def therm_stream():
pub_sub = red.pubsub()
pub_sub.subscribe('therm')
for message in pub_sub.listen(... | 26.586207 | 71 | 0.677043 |
79874fa86eb01112712c108ee05bf33fecb34cca | 5,683 | py | Python | sandbox/unit_circle_animation/unit_circle_multiple.py | Florian-Barthel/stylegan2 | 4ef87038bf9370596cf2b729e1d1a1bc3ebcddd8 | [
"BSD-Source-Code"
] | null | null | null | sandbox/unit_circle_animation/unit_circle_multiple.py | Florian-Barthel/stylegan2 | 4ef87038bf9370596cf2b729e1d1a1bc3ebcddd8 | [
"BSD-Source-Code"
] | null | null | null | sandbox/unit_circle_animation/unit_circle_multiple.py | Florian-Barthel/stylegan2 | 4ef87038bf9370596cf2b729e1d1a1bc3ebcddd8 | [
"BSD-Source-Code"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import dnnlib.tflib as tflib
import training.misc as misc
import os
from training import dataset
from tqdm import tqdm
import tensorflow as tf
tflib.init_tf()
fig, axes = plt.subplots(2, 4, subplot_kw=dict(projection='polar'), figsize=(16, 9))
fig.tight_layout(pad=3.... | 41.786765 | 172 | 0.643146 |
79874fe5fac22059dacf52c455d055cd6aa4c9da | 2,538 | py | Python | py/plots.py | bptripp/grasp-conv | 738b5fed1145e223b50eef45d30948aa21f64d7f | [
"MIT"
] | null | null | null | py/plots.py | bptripp/grasp-conv | 738b5fed1145e223b50eef45d30948aa21f64d7f | [
"MIT"
] | null | null | null | py/plots.py | bptripp/grasp-conv | 738b5fed1145e223b50eef45d30948aa21f64d7f | [
"MIT"
] | 1 | 2018-02-27T07:07:37.000Z | 2018-02-27T07:07:37.000Z | __author__ = 'bptripp'
import cPickle
import csv
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import axes3d, Axes3D
from data import get_prob_label, get_points
from depthmap import rot_matrix, loadOBJ
def export_overlap_results():
with open('o-predict.pkl', 'rb') as f:
outp... | 31.333333 | 109 | 0.557526 |
79875013b8a01b05b488154b9c21222690ff4dd7 | 19,494 | py | Python | compyle/tests/test_parallel.py | abhinavmuta/compyle | 42a78685bdb5f1ee95c23b48503e6954c5d6efff | [
"BSD-3-Clause"
] | null | null | null | compyle/tests/test_parallel.py | abhinavmuta/compyle | 42a78685bdb5f1ee95c23b48503e6954c5d6efff | [
"BSD-3-Clause"
] | null | null | null | compyle/tests/test_parallel.py | abhinavmuta/compyle | 42a78685bdb5f1ee95c23b48503e6954c5d6efff | [
"BSD-3-Clause"
] | null | null | null | from math import sin
import unittest
import numpy as np
from pytest import importorskip
from ..config import get_config, use_config
from ..array import wrap
from ..types import annotate
from ..parallel import Elementwise, Reduction, Scan
from .test_jit import g
MY_CONST = 42
@annotate(x='int', return_='int')
def e... | 28.375546 | 78 | 0.586693 |
798750ff0ea007b56968aaa09144528fcf90e34a | 8,766 | py | Python | models/keras_transformer/ktwm_transformer_blocks.py | tonywenuon/acl2021_ktwm | 8e98570d557ccefd40b14f6db900b647f5ec3c59 | [
"Apache-2.0"
] | 1 | 2022-01-05T15:46:54.000Z | 2022-01-05T15:46:54.000Z | models/keras_transformer/ktwm_transformer_blocks.py | tonywenuon/acl2021_ktwm | 8e98570d557ccefd40b14f6db900b647f5ec3c59 | [
"Apache-2.0"
] | null | null | null | models/keras_transformer/ktwm_transformer_blocks.py | tonywenuon/acl2021_ktwm | 8e98570d557ccefd40b14f6db900b647f5ec3c59 | [
"Apache-2.0"
] | null | null | null | """
Contains implementation of the Transformer model described in papers
"Attention is all you need" (https://arxiv.org/abs/1706.03762) and
"Universal Transformer" (https://arxiv.org/abs/1807.03819)
"""
import math
from typing import Union, Callable, Optional
from keras.layers import Layer, Add, Dropout, Lambda, Resha... | 41.349057 | 111 | 0.688684 |
798751b93db4312e6e46b514f4ab6ae90fb27443 | 5,788 | py | Python | LL_PtH_And_Credentials/Analyzer/privAnalyzer/src/privAnalyzer/privAnalyzer.py | nkrios/LOCKLEVEL | 0ece6c7ea8b84eced38ef3a89ce2e96a7737234f | [
"CC0-1.0"
] | 46 | 2018-07-12T04:38:43.000Z | 2022-03-20T19:25:11.000Z | LL_PtH_And_Credentials/Analyzer/privAnalyzer/src/privAnalyzer/privAnalyzer.py | nkrios/LOCKLEVEL | 0ece6c7ea8b84eced38ef3a89ce2e96a7737234f | [
"CC0-1.0"
] | null | null | null | LL_PtH_And_Credentials/Analyzer/privAnalyzer/src/privAnalyzer/privAnalyzer.py | nkrios/LOCKLEVEL | 0ece6c7ea8b84eced38ef3a89ce2e96a7737234f | [
"CC0-1.0"
] | 17 | 2018-07-04T05:07:08.000Z | 2021-09-15T21:42:18.000Z | import xml.etree.cElementTree as ET
import json
import os
import traceback
import systemInfo
import pdb
from w2wPostProcessing import RoleResultParser
hostnameToOSTypeMapping = None
def getFilesByExtension(rootDir, extension):
return [os.path.abspath(os.path.join(rootDir, filename)) for filename in ... | 29.380711 | 170 | 0.676054 |
79875211da691add60c45eff75328f7d6090f483 | 12,075 | py | Python | projects/NLR_MEG/connectivity_areas_session1_ROI_3.py | yeatmanlab/BrainTools | 890db4256b0290918045e53cd3c6fd6197fcbb4e | [
"BSD-3-Clause"
] | 4 | 2019-09-20T13:29:31.000Z | 2021-05-20T00:26:53.000Z | projects/NLR_MEG/connectivity_areas_session1_ROI_3.py | yeatmanlab/BrainTools | 890db4256b0290918045e53cd3c6fd6197fcbb4e | [
"BSD-3-Clause"
] | 3 | 2016-03-09T22:12:10.000Z | 2016-08-26T15:44:47.000Z | projects/NLR_MEG/connectivity_areas_session1_ROI_3.py | yeatmanlab/BrainTools | 890db4256b0290918045e53cd3c6fd6197fcbb4e | [
"BSD-3-Clause"
] | 7 | 2015-11-17T06:30:38.000Z | 2022-03-04T05:59:09.000Z | # -*- coding: utf-8 -*-
"""
Created on Tue Nov 15 12:05:40 2016
@author: sjjoo
"""
#%%
import sys
import mne
import matplotlib.pyplot as plt
import imageio
from mne.utils import run_subprocess, logger
import os
from os import path as op
import copy
import shutil
import numpy as np
from numpy.random import randn
from s... | 36.261261 | 131 | 0.637598 |
79875377d73a903d0aa368a514a43436d7e6e154 | 28,043 | py | Python | yolov5/train.py | kungfumas/American-Sign-Language | 393ba1ba066a3e3e4a60076415fba902649121b3 | [
"MIT"
] | 24 | 2021-01-05T02:23:09.000Z | 2022-03-21T11:39:23.000Z | yolov5/train.py | kungfumas/American-Sign-Language | 393ba1ba066a3e3e4a60076415fba902649121b3 | [
"MIT"
] | 7 | 2021-01-25T12:45:03.000Z | 2022-01-12T05:14:05.000Z | yolov5/train.py | kungfumas/American-Sign-Language | 393ba1ba066a3e3e4a60076415fba902649121b3 | [
"MIT"
] | 16 | 2021-03-14T04:14:09.000Z | 2022-03-24T06:15:45.000Z | import argparse
import glob
import logging
import math
import os
import random
import shutil
import time
from pathlib import Path
import numpy as np
import torch.distributed as dist
import torch.nn.functional as F
import torch.optim as optim
import torch.optim.lr_scheduler as lr_scheduler
import torch.utils.data
impor... | 52.027829 | 120 | 0.574725 |
798753d913456683d3790d0f85ba7b52bc6dd1de | 3,225 | py | Python | python/tvm/meta_schedule/space_generator/space_generator.py | BaldLee/tvm | b53472c7b6afa34260afeffc5f088591352c58c3 | [
"Apache-2.0"
] | 10 | 2019-03-09T07:51:56.000Z | 2021-09-14T03:06:20.000Z | python/tvm/meta_schedule/space_generator/space_generator.py | BaldLee/tvm | b53472c7b6afa34260afeffc5f088591352c58c3 | [
"Apache-2.0"
] | 9 | 2021-10-20T13:48:52.000Z | 2021-12-09T07:14:24.000Z | python/tvm/meta_schedule/space_generator/space_generator.py | BaldLee/tvm | b53472c7b6afa34260afeffc5f088591352c58c3 | [
"Apache-2.0"
] | 3 | 2021-07-27T07:32:30.000Z | 2021-10-19T06:15:02.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 34.308511 | 112 | 0.705736 |
798753e6bbbec1074a4bca32f98d3b37d67fd2e8 | 727 | py | Python | manage.py | silvianjoki/blog | 8b4a58f59e40363f6520824e9c31ddfd70bb9390 | [
"MIT"
] | null | null | null | manage.py | silvianjoki/blog | 8b4a58f59e40363f6520824e9c31ddfd70bb9390 | [
"MIT"
] | null | null | null | manage.py | silvianjoki/blog | 8b4a58f59e40363f6520824e9c31ddfd70bb9390 | [
"MIT"
] | null | null | null | from app import create_app, db
from app.models import User, Comments, Blogs
from flask_script import Manager, Server
from flask_migrate import Migrate, MigrateCommand
# create app instance
app = create_app('development')
manager = Manager(app)
manager.add_command('server', Server)
migrate = Migrate(app,db)
mana... | 21.382353 | 76 | 0.734525 |
7987548c360f37db7c45c9a6fa9b6418438c3295 | 686 | py | Python | backend/app/reservation/errcode.py | GJCav/thywy | 3c458bccdd23bab78b6a8bd65603c7845e643d70 | [
"MIT"
] | 8 | 2022-01-23T07:30:06.000Z | 2022-02-15T03:39:25.000Z | backend/app/reservation/errcode.py | Dr-Left/thuwy | 3c458bccdd23bab78b6a8bd65603c7845e643d70 | [
"MIT"
] | 5 | 2022-01-21T03:31:22.000Z | 2022-03-04T00:01:59.000Z | backend/app/reservation/errcode.py | Dr-Left/thuwy | 3c458bccdd23bab78b6a8bd65603c7845e643d70 | [
"MIT"
] | 2 | 2022-01-23T08:09:46.000Z | 2022-02-24T05:55:02.000Z | CODE_TIME_CONFLICT = {"code": 101, "errmsg": "时间冲突"}
CODE_TIME_OUT_OF_RANGE = {"code": 102, "errmsg": "超出预约时限"}
CODE_DUPLICATE_METHOD = {"code": 103, "errmsg": "预约方法重复"}
CODE_METHOD_NOT_SUPPORT = {"code": 103, "errmsg": "预约方法不支持"}
CODE_RSV_NOT_FOUND = {"code": 101, "errmsg": "未找到该预约"}
CODE_RSV_START = {"code": 202, "e... | 38.111111 | 60 | 0.69242 |
798754f09ee817818cc3ec17916d46f78aca2ab2 | 1,320 | py | Python | python/ipython_tutorial3.py | ivanliu1989/Afr-Soil-Prediction | ccd327b12f2cd47e7f0a78302e86d5f8c2f25e78 | [
"MIT"
] | 3 | 2016-12-09T14:25:39.000Z | 2020-09-16T09:13:34.000Z | python/ipython_tutorial3.py | ivanliu1989/Afr-Soil-Prediction | ccd327b12f2cd47e7f0a78302e86d5f8c2f25e78 | [
"MIT"
] | null | null | null | python/ipython_tutorial3.py | ivanliu1989/Afr-Soil-Prediction | ccd327b12f2cd47e7f0a78302e86d5f8c2f25e78 | [
"MIT"
] | 4 | 2015-03-31T16:01:13.000Z | 2020-11-05T02:37:42.000Z | # -*- coding: utf-8 -*-
"""
Created on Thu Oct 9 13:25:43 2014
@author: ivan
"""
from IPython.core.magic import (register_line_magic,
register_cell_magic)
@register_line_magic
def hello(line):
if line == 'french':
print("Salut tout le monde!")
else:
print("He... | 20.625 | 64 | 0.677273 |
79875596f742cc419e44f691a7a9642746839103 | 7,538 | py | Python | poet_distributed/reproduce_ops.py | gdicker1/poet | 388a239d957e719eff1e774f5a8587496ca15474 | [
"Apache-2.0"
] | null | null | null | poet_distributed/reproduce_ops.py | gdicker1/poet | 388a239d957e719eff1e774f5a8587496ca15474 | [
"Apache-2.0"
] | null | null | null | poet_distributed/reproduce_ops.py | gdicker1/poet | 388a239d957e719eff1e774f5a8587496ca15474 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 Uber Technologies, Inc.
#
# 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... | 39.673684 | 130 | 0.581587 |
7987566683e47d89ba32de692d21223d714b0b9d | 2,227 | py | Python | app/definitions/migrations/0009_auto_20200812_1614.py | getmetamapper/metamapper | 0b2f67eec03fbf7ece35ff9f58ea9bb2dde4d85f | [
"BSD-2-Clause"
] | 53 | 2020-07-01T23:11:59.000Z | 2022-03-31T19:10:28.000Z | app/definitions/migrations/0009_auto_20200812_1614.py | getmetamapper/metamapper | 0b2f67eec03fbf7ece35ff9f58ea9bb2dde4d85f | [
"BSD-2-Clause"
] | 5 | 2020-11-25T19:48:57.000Z | 2022-02-27T23:50:18.000Z | app/definitions/migrations/0009_auto_20200812_1614.py | getmetamapper/metamapper | 0b2f67eec03fbf7ece35ff9f58ea9bb2dde4d85f | [
"BSD-2-Clause"
] | 5 | 2020-08-29T16:43:59.000Z | 2022-01-17T19:05:30.000Z | # Generated by Django 3.0.8 on 2020-08-12 16:14
from django.db import migrations, models
import utils.delete.managers
import utils.postgres.managers
class Migration(migrations.Migration):
dependencies = [
('definitions', '0008_auto_20200810_0520'),
]
operations = [
migrations.AlterModel... | 32.275362 | 93 | 0.555905 |
7987572419a398349db4f73d2901fe324f3a401a | 163,485 | py | Python | youtube_dl/utils.py | brianieface/rte-L3 | 9046b8768b20bdad443ac1cfde6ec2720a0598f5 | [
"MIT"
] | 16 | 2020-12-01T15:26:58.000Z | 2022-02-24T23:12:14.000Z | youtube_dl/utils.py | brianieface/rte-L3 | 9046b8768b20bdad443ac1cfde6ec2720a0598f5 | [
"MIT"
] | 5 | 2021-02-20T10:30:00.000Z | 2021-06-01T21:12:31.000Z | youtube_dl/utils.py | brianieface/rte-L3 | 9046b8768b20bdad443ac1cfde6ec2720a0598f5 | [
"MIT"
] | 7 | 2020-12-01T15:27:04.000Z | 2022-01-09T23:21:53.000Z | #!/usr/bin/env python
# coding: utf-8
from __future__ import unicode_literals
import base64
import binascii
import calendar
import codecs
import contextlib
import ctypes
import datetime
import email.utils
import email.header
import errno
import functools
import gzip
import io
import itertools
import json
import local... | 29.225063 | 133 | 0.505404 |
7987574faef686acec148bddc72cf397b468927d | 4,994 | py | Python | openstackclient/compute/v2/keypair.py | hughsaunders/python-openstackclient | f4f85a2f7910fc8f7a7aa79538a4b03a077ad2e4 | [
"Apache-2.0"
] | null | null | null | openstackclient/compute/v2/keypair.py | hughsaunders/python-openstackclient | f4f85a2f7910fc8f7a7aa79538a4b03a077ad2e4 | [
"Apache-2.0"
] | null | null | null | openstackclient/compute/v2/keypair.py | hughsaunders/python-openstackclient | f4f85a2f7910fc8f7a7aa79538a4b03a077ad2e4 | [
"Apache-2.0"
] | null | null | null | # Copyright 2013 OpenStack Foundation
#
# 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 ... | 31.018634 | 78 | 0.599319 |
79875780e91c4a854f55f3edf8c913a2844278f2 | 1,018 | py | Python | tap_list_providers/management/commands/parseexampletaplist.py | danroberts728/hsvdotbeer | 5b977bf4a7aab149ad56564b3adbb09424500308 | [
"Apache-2.0"
] | 18 | 2018-12-06T01:46:37.000Z | 2021-10-17T10:37:17.000Z | tap_list_providers/management/commands/parseexampletaplist.py | danroberts728/hsvdotbeer | 5b977bf4a7aab149ad56564b3adbb09424500308 | [
"Apache-2.0"
] | 194 | 2018-11-04T12:50:49.000Z | 2022-01-06T22:43:43.000Z | tap_list_providers/management/commands/parseexampletaplist.py | danroberts728/hsvdotbeer | 5b977bf4a7aab149ad56564b3adbb09424500308 | [
"Apache-2.0"
] | 7 | 2019-03-18T05:36:06.000Z | 2020-12-25T03:27:29.000Z | """Parse the example tap list as if it were a real bar"""
import os
from django.core.management.base import BaseCommand
from django.db import transaction
from hsv_dot_beer.config.local import BASE_DIR
from tap_list_providers.example import ExampleTapListProvider
class Command(BaseCommand):
help = "Populates any... | 32.83871 | 83 | 0.691552 |
798757d125e6d5f1c920a904441215a0b7db7b63 | 4,569 | py | Python | awacs/elasticache.py | mtrspringer/awacs | a5d2fe37c2a468a977536c4d6e66dda7da69717f | [
"BSD-2-Clause"
] | null | null | null | awacs/elasticache.py | mtrspringer/awacs | a5d2fe37c2a468a977536c4d6e66dda7da69717f | [
"BSD-2-Clause"
] | 19 | 2020-11-30T06:43:54.000Z | 2022-02-21T09:02:54.000Z | awacs/elasticache.py | mtrspringer/awacs | a5d2fe37c2a468a977536c4d6e66dda7da69717f | [
"BSD-2-Clause"
] | null | null | null | # Copyright (c) 2012-2013, Mark Peek <mark@peek.org>
# All rights reserved.
#
# See LICENSE file for full license.
from aws import Action as BaseAction
from aws import BaseARN
service_name = 'Amazon ElastiCache'
prefix = 'elasticache'
class Action(BaseAction):
def __init__(self, action=None):
sup = supe... | 44.359223 | 73 | 0.826877 |
798758cbd2aeaa2470e870065fafd3b2dc867cf7 | 3,579 | py | Python | tests/python/eeg_metrics_ci.py | Cognixion-inc/brainflow | 7a1ce71e59aa88fca18225ac10b5602ccc46c87c | [
"MIT"
] | 197 | 2019-05-20T01:16:51.000Z | 2022-03-02T16:07:39.000Z | tests/python/eeg_metrics_ci.py | Cognixion-inc/brainflow | 7a1ce71e59aa88fca18225ac10b5602ccc46c87c | [
"MIT"
] | 69 | 2019-05-21T23:17:31.000Z | 2021-04-14T13:14:56.000Z | tests/python/eeg_metrics_ci.py | Cognixion-inc/brainflow | 7a1ce71e59aa88fca18225ac10b5602ccc46c87c | [
"MIT"
] | 60 | 2019-05-17T19:01:55.000Z | 2022-02-25T02:17:51.000Z | import argparse
import time
import brainflow
import numpy as np
from brainflow.board_shim import BoardShim, BrainFlowInputParams, LogLevels, BoardIds,BrainFlowError
from brainflow.data_filter import DataFilter, FilterTypes, AggOperations, WindowFunctions, DetrendOperations
from brainflow.ml_model import MLModel, Brain... | 51.128571 | 134 | 0.709975 |
7987594ca2ebb0834a0ed1de54a9ccb8875f45f2 | 4,301 | py | Python | src/parse.py | macuyler/clock | a8575df01caabf69897fdf5f5038759b1bf50bed | [
"MIT"
] | null | null | null | src/parse.py | macuyler/clock | a8575df01caabf69897fdf5f5038759b1bf50bed | [
"MIT"
] | 4 | 2020-11-24T23:32:49.000Z | 2022-01-20T19:39:37.000Z | src/parse.py | macuyler/clock | a8575df01caabf69897fdf5f5038759b1bf50bed | [
"MIT"
] | null | null | null | """A set of string parsing utilities."""
from collections import deque
from functools import reduce
from typing import Any, Callable, Optional, TypeVar, Union
nop = lambda x: x
Parser = Callable[Optional[str], Optional[TypeVar('T')]]
Pattern = list[Union[str, Parser]]
class ParsedValues:
def __init__(self):
... | 25.152047 | 84 | 0.590095 |
798759d0f0b84466cb1584df67de7d64a8cf464e | 492 | py | Python | redjit/home/forms.py | antoniofdias/redjit | af41effdad981ed69d41a07fd8152518f8d04050 | [
"BSD-3-Clause-Attribution"
] | null | null | null | redjit/home/forms.py | antoniofdias/redjit | af41effdad981ed69d41a07fd8152518f8d04050 | [
"BSD-3-Clause-Attribution"
] | null | null | null | redjit/home/forms.py | antoniofdias/redjit | af41effdad981ed69d41a07fd8152518f8d04050 | [
"BSD-3-Clause-Attribution"
] | null | null | null | from django import forms
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.models import User
from .models import Post, Comment
class CreateUserForm(UserCreationForm):
class Meta:
model = User
fields = ['username', 'email', 'password1', 'password2']
class PostForm(forms.Model... | 23.428571 | 60 | 0.713415 |
798759e781e7410f95b70db71b243d45d00b0352 | 2,027 | py | Python | tests/patterns/test_patterns_GroupEvent.py | butayama/supriya | 0c197324ecee4232381221880d1f40e109bb756c | [
"MIT"
] | null | null | null | tests/patterns/test_patterns_GroupEvent.py | butayama/supriya | 0c197324ecee4232381221880d1f40e109bb756c | [
"MIT"
] | null | null | null | tests/patterns/test_patterns_GroupEvent.py | butayama/supriya | 0c197324ecee4232381221880d1f40e109bb756c | [
"MIT"
] | null | null | null | import types
import uuid
import pytest
import uqbar.strings
import supriya.patterns
import supriya.realtime
def test__perform_realtime_01(server):
node_uuid = uuid.uuid4()
event = supriya.patterns.GroupEvent(uuid=node_uuid)
server = types.SimpleNamespace(node_id_allocator=supriya.realtime.NodeIdAllocato... | 28.152778 | 95 | 0.571288 |
79875a2e22e9af5326eadb045c8ac14993bf1217 | 6,362 | py | Python | source/lib/calltimer.py | sourav-majumder/qtlab | 96b2a127b1df7b45622c90229bd5ef8a4083614e | [
"MIT"
] | null | null | null | source/lib/calltimer.py | sourav-majumder/qtlab | 96b2a127b1df7b45622c90229bd5ef8a4083614e | [
"MIT"
] | null | null | null | source/lib/calltimer.py | sourav-majumder/qtlab | 96b2a127b1df7b45622c90229bd5ef8a4083614e | [
"MIT"
] | null | null | null | # calltimer.py, class to do a callback several times in a separate thread.
# Reinier Heeres, <reinier@heeres.eu>, 2008
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the L... | 26.957627 | 96 | 0.576705 |
79875b9a60721906921a4a105f5a64f51ba3fc30 | 6,002 | py | Python | src/main/flask/worker/pipelines.py | mazancourt/politexts | 5a513d1a93eccac9468f51a4fac60ab520e9b2e4 | [
"Apache-2.0"
] | null | null | null | src/main/flask/worker/pipelines.py | mazancourt/politexts | 5a513d1a93eccac9468f51a4fac60ab520e9b2e4 | [
"Apache-2.0"
] | 1 | 2021-12-28T18:57:25.000Z | 2021-12-28T18:57:25.000Z | src/main/flask/worker/pipelines.py | mazancourt/politexts | 5a513d1a93eccac9468f51a4fac60ab520e9b2e4 | [
"Apache-2.0"
] | null | null | null | """
Different implementations of NLP pipeline depending on input text format (from transcript to formatted text)
Each pipeline returns the updated speech object
"""
import logging
import re
from howler import TextTiler
from nltk import sent_tokenize
from worker.aligner import align_sentences
from worker.categorizer i... | 34.297143 | 108 | 0.691769 |
79875c4efeba1d8749239319a8b0574d80e3cbf2 | 786 | py | Python | armulator/armv6/opcodes/thumb_instruction_set/thumb_instruction_set_encoding_32_bit/thumb_data_processing_register/uxtab_t1.py | matan1008/armulator | 04d24dcec6ab42326018f5e09331e5b4738d6b52 | [
"MIT"
] | 16 | 2018-01-22T14:36:49.000Z | 2021-12-17T15:39:52.000Z | armulator/armv6/opcodes/thumb_instruction_set/thumb_instruction_set_encoding_32_bit/thumb_data_processing_register/uxtab_t1.py | AhmedMounir/armulator | 04d24dcec6ab42326018f5e09331e5b4738d6b52 | [
"MIT"
] | 3 | 2019-02-19T17:51:47.000Z | 2022-03-31T20:45:21.000Z | armulator/armv6/opcodes/thumb_instruction_set/thumb_instruction_set_encoding_32_bit/thumb_data_processing_register/uxtab_t1.py | AhmedMounir/armulator | 04d24dcec6ab42326018f5e09331e5b4738d6b52 | [
"MIT"
] | 4 | 2020-06-18T23:51:03.000Z | 2022-02-09T17:43:13.000Z | from armulator.armv6.opcodes.abstract_opcodes.uxtab import Uxtab
from armulator.armv6.opcodes.opcode import Opcode
class UxtabT1(Uxtab, Opcode):
def __init__(self, instruction, m, d, n, rotation):
Opcode.__init__(self, instruction)
Uxtab.__init__(self, m, d, n, rotation)
def is_pc_changing_op... | 32.75 | 101 | 0.615776 |
79875c58a44c2e2920f42f2db8d1f948ebbc9e89 | 897 | py | Python | app/__init__.py | DXYyang/shenNeng_gasAnalysis | d94e2451d1938c090d1377dfbd487d0c6a649188 | [
"MIT"
] | 1 | 2020-02-16T04:32:15.000Z | 2020-02-16T04:32:15.000Z | app/__init__.py | DXYyang/shenNeng_gasAnalysis | d94e2451d1938c090d1377dfbd487d0c6a649188 | [
"MIT"
] | null | null | null | app/__init__.py | DXYyang/shenNeng_gasAnalysis | d94e2451d1938c090d1377dfbd487d0c6a649188 | [
"MIT"
] | null | null | null | from flask import Flask,render_template
from flask_bootstrap import Bootstrap
from flask_moment import Moment
from flask_sqlalchemy import SQLAlchemy
from config import config
from flask_login import LoginManager
from flask_mail import Mail
login_manager=LoginManager()
login_manager.session_protection='strong'
login_m... | 28.935484 | 62 | 0.792642 |
79875c7eb7944d8316869ef5f0f8dbe2a5972f49 | 2,259 | py | Python | tests/test_resources_analyzer.py | fabiocarballo/android-resources-checker | b4c35ab14789599775423bf4519b7348e0d1ce9b | [
"MIT"
] | 40 | 2021-03-29T18:19:49.000Z | 2022-01-07T18:34:52.000Z | tests/test_resources_analyzer.py | fabiocarballo/android-resources-checker | b4c35ab14789599775423bf4519b7348e0d1ce9b | [
"MIT"
] | 6 | 2021-03-31T13:52:41.000Z | 2021-11-11T19:56:23.000Z | tests/test_resources_analyzer.py | fabiocarballo/android-resources-checker | b4c35ab14789599775423bf4519b7348e0d1ce9b | [
"MIT"
] | 3 | 2021-04-10T05:11:50.000Z | 2021-09-01T23:03:55.000Z | from android_resources_checker.analyzer import ResourcesAnalyzer
from android_resources_checker.models import (
AnalysisBreakdown,
ResourceReference,
ResourceType,
PackagedResource,
PackagingType,
)
def _test_packaged_resource(
index, resource_type, size=10, packaging_type=PackagingType.file
)... | 28.594937 | 85 | 0.620186 |
79875cdcf89adbf2ec619790f66e98797d83acb6 | 11,489 | py | Python | rlkit/data_management/pusher_mil_pytorch_data_loader.py | yifan-you-37/rl_swiss | 8b0ee7caa5c1fa93860916004cf4fd970667764f | [
"MIT"
] | 56 | 2019-10-20T03:09:02.000Z | 2022-03-25T09:21:40.000Z | rlkit/data_management/pusher_mil_pytorch_data_loader.py | yifan-you-37/rl_swiss | 8b0ee7caa5c1fa93860916004cf4fd970667764f | [
"MIT"
] | 3 | 2020-10-01T07:33:51.000Z | 2021-05-12T03:40:57.000Z | rlkit/data_management/pusher_mil_pytorch_data_loader.py | yifan-you-37/rl_swiss | 8b0ee7caa5c1fa93860916004cf4fd970667764f | [
"MIT"
] | 10 | 2019-11-04T16:56:09.000Z | 2022-03-25T09:21:41.000Z | '''
pusher_mil_data_generatory.py from original work is too slow
This is my implementation using pytorch data loaders class
'''
import os
import os.path as osp
import pickle
import numpy as np
import imageio
import torch
from torch.utils.data import Dataset, DataLoader
from natsort import natsorted
import glob
from ... | 31.913889 | 136 | 0.559927 |
79875cf7c12478123c46c06b849ecec323c74bf8 | 397 | py | Python | Chatbot_CN/wsgi.py | guci314/Chatbot_CN | 02044eed4a141aa8c61d6064c166f95dbdae894c | [
"Apache-2.0"
] | 8 | 2019-08-12T12:38:35.000Z | 2022-02-21T03:25:04.000Z | Chatbot_CN/wsgi.py | JianboTang/Chatbot_CN | a0f7194252a189f8bc2b62fd16eb2abe432c0bf9 | [
"Apache-2.0"
] | null | null | null | Chatbot_CN/wsgi.py | JianboTang/Chatbot_CN | a0f7194252a189f8bc2b62fd16eb2abe432c0bf9 | [
"Apache-2.0"
] | 5 | 2020-01-08T15:30:38.000Z | 2022-02-15T02:39:46.000Z | """
WSGI config for Chatbot_CN project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SE... | 23.352941 | 78 | 0.788413 |
79875d968d0b2494b93347c8e9570b5e282bbe8d | 74 | py | Python | incubation-python/appBone/systools/__init__.py | yk0242/incubation | f714ed8172aa290d3f13ff8b7f09f888a5b33640 | [
"MIT"
] | 1 | 2018-01-15T09:21:29.000Z | 2018-01-15T09:21:29.000Z | incubation-python/appBone/systools/__init__.py | FredCoder/incubation | 93e2aba555e3d3a9c71739201f2ea0eb475c31dd | [
"MIT"
] | 19 | 2015-04-14T15:41:58.000Z | 2017-09-23T08:08:31.000Z | incubation-python/appBone/systools/__init__.py | FredCoder/incubation | 93e2aba555e3d3a9c71739201f2ea0eb475c31dd | [
"MIT"
] | 2 | 2016-01-05T09:21:28.000Z | 2019-03-20T11:41:45.000Z | __all__ = ["b_system_top", "lang_change", "shutdown_rel", "sys_password"]
| 37 | 73 | 0.72973 |
79875e8d14a79ed25bf053cb8bcb339c2fcd598a | 5,129 | py | Python | tsts/cfg/defaults.py | TakuyaShintate/tsts | 483db1edc2f765a5449137446a77acaf17684ce9 | [
"MIT"
] | 16 | 2021-08-28T16:15:41.000Z | 2022-02-25T09:47:01.000Z | tsts/cfg/defaults.py | TakuyaShintate/tsts | 483db1edc2f765a5449137446a77acaf17684ce9 | [
"MIT"
] | null | null | null | tsts/cfg/defaults.py | TakuyaShintate/tsts | 483db1edc2f765a5449137446a77acaf17684ce9 | [
"MIT"
] | 1 | 2021-12-05T20:35:38.000Z | 2021-12-05T20:35:38.000Z | from .cfg import CfgNode as CN
__all__ = ["get_cfg_defaults"]
_C = CN()
# Main device
_C.DEVICE = "cpu"
# Random seed
_C.SEED = 42
_C.IO = CN()
# Number of input time steps
_C.IO.LOOKBACK = 96
# Number of output time steps
_C.IO.HORIZON = 48
_C.TRAINING = CN()
# How to split train dataset {"col" or "row"}
_C.TRAINI... | 27.575269 | 94 | 0.750829 |
79875edf8d920ab46edc4a457e7dedeedcc6da51 | 292 | py | Python | filesystem_analyzer/carpe_fs_alloc_info.py | sk-yaho/carpe | 077ef7ba1582b3de9f5c08d63431e744b77a9e09 | [
"Apache-2.0"
] | 2 | 2020-07-09T02:01:50.000Z | 2020-11-21T15:19:32.000Z | filesystem_analyzer/carpe_fs_alloc_info.py | sk-yaho/carpe | 077ef7ba1582b3de9f5c08d63431e744b77a9e09 | [
"Apache-2.0"
] | null | null | null | filesystem_analyzer/carpe_fs_alloc_info.py | sk-yaho/carpe | 077ef7ba1582b3de9f5c08d63431e744b77a9e09 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import sys, re
class CARPE_FS_Alloc_Info(object):
"""docstring for CARPE_FS_Alloc_Info"""
def __init__(self):
super(CARPE_FS_Alloc_Info, self).__init__()
self._p_id = None
self._unallock_blocks = []
| 24.333333 | 45 | 0.736301 |
798761142d2d78c8add8a884e83a3f2c8ae5463a | 9,995 | py | Python | tests/common/cache/facts_cache.py | lolyu/sonic-mgmt | ed888fd1ce26e7f44fd7f70af00c43ace4882668 | [
"Apache-2.0"
] | null | null | null | tests/common/cache/facts_cache.py | lolyu/sonic-mgmt | ed888fd1ce26e7f44fd7f70af00c43ace4882668 | [
"Apache-2.0"
] | 41 | 2020-03-30T03:52:22.000Z | 2021-03-03T09:16:48.000Z | tests/common/cache/facts_cache.py | lolyu/sonic-mgmt | ed888fd1ce26e7f44fd7f70af00c43ace4882668 | [
"Apache-2.0"
] | null | null | null | from __future__ import print_function, division, absolute_import
import inspect
import logging
import os
import pickle
import shutil
import sys
from collections import defaultdict
from threading import Lock
from six import with_metaclass
logger = logging.getLogger(__name__)
CURRENT_PATH = os.path.realpath(__file__... | 41.131687 | 121 | 0.598999 |
7987616ce9e257170f1de1f82c3586fe9f01651f | 525 | py | Python | cats_as_a_service/orders/application/services.py | othercodes/connect-eaas-cat-as-a-service | d8bc5ac58656a5973e59f846c3311b6c409e10af | [
"Apache-2.0"
] | 1 | 2022-02-16T10:13:26.000Z | 2022-02-16T10:13:26.000Z | cats_as_a_service/orders/application/services.py | othercodes/connect-eaas-cat-as-a-service | d8bc5ac58656a5973e59f846c3311b6c409e10af | [
"Apache-2.0"
] | null | null | null | cats_as_a_service/orders/application/services.py | othercodes/connect-eaas-cat-as-a-service | d8bc5ac58656a5973e59f846c3311b6c409e10af | [
"Apache-2.0"
] | null | null | null | from typing import List
from cats_as_a_service.orders.domain.contracts import OrderSource
from cats_as_a_service.orders.domain.models import Amount, Categories, OrderType
from cats_as_a_service.shared.application.services import validator
from cats_as_a_service.shared.domain.models import ID
def order_validator(sourc... | 35 | 80 | 0.76 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.