hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | 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 248 | max_issues_repo_name stringlengths 5 125 | 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 248 | max_forks_repo_name stringlengths 5 125 | 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 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
994230f6b4ebf07a0d7cc91b97f4dc1767bdae63 | 714 | py | Python | setup.py | teriyakichild/python-zcli | 43538a8e02a18d3e415d98b2cb1114d074e44a4f | [
"Apache-2.0"
] | null | null | null | setup.py | teriyakichild/python-zcli | 43538a8e02a18d3e415d98b2cb1114d074e44a4f | [
"Apache-2.0"
] | null | null | null | setup.py | teriyakichild/python-zcli | 43538a8e02a18d3e415d98b2cb1114d074e44a4f | [
"Apache-2.0"
] | null | null | null | from setuptools import setup
from sys import path
path.insert(0, '.')
NAME = "zcli"
if __name__ == "__main__":
setup(
name = NAME,
version = "0.1.0",
author = "Tony Rogers",
author_email = "tony.rogers@rackspace.com",
url = "https://github.com/teriyakichild/python-zcli",
... | 23.8 | 61 | 0.491597 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 217 | 0.303922 |
994265d708b917d735f3e601041c2ca08012e144 | 7,022 | py | Python | src/python/gem5/components/memory/dram_interfaces/hbm.py | hyu-iot/gem5 | aeccc8bd8e9a86f96fc7a6f40d978f8494337fc5 | [
"BSD-3-Clause"
] | 765 | 2015-01-14T16:17:04.000Z | 2022-03-28T07:46:28.000Z | src/python/gem5/components/memory/dram_interfaces/hbm.py | hyu-iot/gem5 | aeccc8bd8e9a86f96fc7a6f40d978f8494337fc5 | [
"BSD-3-Clause"
] | 148 | 2018-07-20T00:58:36.000Z | 2021-11-16T01:52:33.000Z | src/python/gem5/components/memory/dram_interfaces/hbm.py | hyu-iot/gem5 | aeccc8bd8e9a86f96fc7a6f40d978f8494337fc5 | [
"BSD-3-Clause"
] | 807 | 2015-01-06T09:55:38.000Z | 2022-03-30T10:23:36.000Z | # Copyright (c) 2012-2021 Arm Limited
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implementation of the functiona... | 35.64467 | 79 | 0.721874 | 4,459 | 0.635004 | 0 | 0 | 0 | 0 | 0 | 0 | 5,990 | 0.853033 |
9943a954b6c98669a7f2d794d8606fb4a934d9b6 | 1,826 | py | Python | Code/branches/Pre-Prospectus/python/SourceFiles/Geometry.py | jlconlin/PhDThesis | 8e704613721a800ce1c59576e94f40fa6f7cd986 | [
"MIT"
] | null | null | null | Code/branches/Pre-Prospectus/python/SourceFiles/Geometry.py | jlconlin/PhDThesis | 8e704613721a800ce1c59576e94f40fa6f7cd986 | [
"MIT"
] | null | null | null | Code/branches/Pre-Prospectus/python/SourceFiles/Geometry.py | jlconlin/PhDThesis | 8e704613721a800ce1c59576e94f40fa6f7cd986 | [
"MIT"
] | null | null | null | __id__ = "$Id: Geometry.py 51 2007-04-25 20:43:07Z jlconlin $"
__author__ = "$Author: jlconlin $"
__version__ = " $Revision: 51 $"
__date__ = "$Date: 2007-04-25 14:43:07 -0600 (Wed, 25 Apr 2007) $"
import scipy
import Errors
class Geometry(object):
"""
Geometry is a class to hold information ab... | 29.934426 | 87 | 0.552026 | 1,583 | 0.866922 | 0 | 0 | 0 | 0 | 0 | 0 | 593 | 0.324754 |
99440dc4872605e49ce2bfbd37e480db9c6f90a0 | 12,244 | py | Python | django_backblaze_b2/storage.py | ehossack/django-backblaze-b2 | 556777a74a23780bffde68296c3173fb5a7d5ccd | [
"BSD-2-Clause"
] | 12 | 2020-09-14T15:43:34.000Z | 2021-12-11T17:45:22.000Z | django_backblaze_b2/storage.py | ehossack/django-backblaze-b2 | 556777a74a23780bffde68296c3173fb5a7d5ccd | [
"BSD-2-Clause"
] | 10 | 2020-11-28T19:55:20.000Z | 2022-03-28T02:18:15.000Z | django_backblaze_b2/storage.py | ehossack/django-backblaze-b2 | 556777a74a23780bffde68296c3173fb5a7d5ccd | [
"BSD-2-Clause"
] | 2 | 2021-01-29T21:58:26.000Z | 2021-06-22T19:34:11.000Z | from datetime import datetime
from hashlib import sha3_224 as hash
from logging import getLogger
from typing import IO, Any, Callable, Dict, List, Optional, Tuple, cast
from b2sdk.account_info import InMemoryAccountInfo
from b2sdk.account_info.abstract import AbstractAccountInfo
from b2sdk.account_info.sqlite_account_... | 41.505085 | 119 | 0.655586 | 10,416 | 0.850702 | 0 | 0 | 10,169 | 0.830529 | 0 | 0 | 3,112 | 0.254165 |
9946935225cfd5d8c3166e682fc9c3c573466b46 | 8,180 | py | Python | docs/nnabla/p10_Python_API_Tutorials/s02_python_api.py | daizutabi/scratch | 4c56fad47da0938eda89f3c2b6cb2f1919bee180 | [
"MIT"
] | null | null | null | docs/nnabla/p10_Python_API_Tutorials/s02_python_api.py | daizutabi/scratch | 4c56fad47da0938eda89f3c2b6cb2f1919bee180 | [
"MIT"
] | null | null | null | docs/nnabla/p10_Python_API_Tutorials/s02_python_api.py | daizutabi/scratch | 4c56fad47da0938eda89f3c2b6cb2f1919bee180 | [
"MIT"
] | null | null | null | # # NNabla Python API Demonstration Tutorial
# # (https://nnabla.readthedocs.io/en/latest/python/tutorial/python_api.html)
import matplotlib.pyplot as plt
import nnabla as nn
import nnabla.functions as F
import nnabla.parametric_functions as PF
import nnabla.solvers as S
import numpy as np
from ivory.utils.path impor... | 23.848397 | 88 | 0.66687 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,434 | 0.297555 |
9946d28c6f11eadb2f0d488d601209e95eec15cf | 18,232 | py | Python | tests/unit/test_read_ahead_cursor.py | simonz-bq/amazon-qldb-driver-python | 06c8146be0819e49d4b2ef22706ccd57e9990e03 | [
"Apache-2.0"
] | 39 | 2019-10-30T09:01:54.000Z | 2022-02-06T18:30:27.000Z | tests/unit/test_read_ahead_cursor.py | simonz-bq/amazon-qldb-driver-python | 06c8146be0819e49d4b2ef22706ccd57e9990e03 | [
"Apache-2.0"
] | 30 | 2020-03-05T23:52:57.000Z | 2022-03-24T16:04:06.000Z | tests/unit/test_read_ahead_cursor.py | byronlin13/amazon-qldb-driver-python | 2f6fb7864cd49fdf0c34cec9764d399e9b9c72c4 | [
"Apache-2.0"
] | 28 | 2019-12-09T17:21:59.000Z | 2022-01-25T11:57:51.000Z | # Copyright 2019 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# or in the "license" file... | 53.781711 | 120 | 0.721369 | 16,171 | 0.886957 | 0 | 0 | 15,787 | 0.865895 | 0 | 0 | 3,398 | 0.186376 |
99481855b36edd94fabfd379b091a1551b3a37b4 | 2,838 | py | Python | test_q2.py | karolineos/Desafio-de-Programa-o-Capgemini- | cb0aeceeb2d6ba393fc208c3c557c2980469e179 | [
"MIT"
] | null | null | null | test_q2.py | karolineos/Desafio-de-Programa-o-Capgemini- | cb0aeceeb2d6ba393fc208c3c557c2980469e179 | [
"MIT"
] | null | null | null | test_q2.py | karolineos/Desafio-de-Programa-o-Capgemini- | cb0aeceeb2d6ba393fc208c3c557c2980469e179 | [
"MIT"
] | null | null | null | from unittest import TestCase
from q2 import *
class TestQuestao2Busca(TestCase):
"""
Nomeclatura: test_quando_..._deve_retornar_...
def test_quando_..._deve_retornar_...(self):
Metodos herdados de TestCase:
|nome: | Ação:
| setUp | ... | 37.342105 | 132 | 0.597604 | 2,779 | 0.977833 | 0 | 0 | 0 | 0 | 0 | 0 | 1,645 | 0.578818 |
9949907614d70988d09cf14ed19ffbba33bd91dd | 1,994 | py | Python | main.py | kriszhengs/kouzhao | f0de3e99b98b696ffbb8cec193d01c7695e45ae3 | [
"MIT"
] | null | null | null | main.py | kriszhengs/kouzhao | f0de3e99b98b696ffbb8cec193d01c7695e45ae3 | [
"MIT"
] | null | null | null | main.py | kriszhengs/kouzhao | f0de3e99b98b696ffbb8cec193d01c7695e45ae3 | [
"MIT"
] | null | null | null | from datetime import datetime
import logging
import requests
from hashlib import md5
from time import sleep
from apscheduler.schedulers.background import BlockingScheduler,BackgroundScheduler
import kzconfig
import json
logging.basicConfig(
handlers=[logging.FileHandler('log.log', 'a', 'utf-8')],
level=logg... | 29.323529 | 166 | 0.627382 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 629 | 0.296698 |
99499bf828e2f984b7709bf04b28aafa77fa10fd | 5,649 | py | Python | Utils/repeated_timer.py | schmouk/PythonOpenSourceProject | 3ca3af15672942888560fa4edf7aef3d44e90b57 | [
"MIT"
] | null | null | null | Utils/repeated_timer.py | schmouk/PythonOpenSourceProject | 3ca3af15672942888560fa4edf7aef3d44e90b57 | [
"MIT"
] | 35 | 2020-08-07T09:11:23.000Z | 2021-09-12T11:10:04.000Z | Utils/repeated_timer.py | schmouk/PythonOpenSourceProject | 3ca3af15672942888560fa4edf7aef3d44e90b57 | [
"MIT"
] | null | null | null | """
Copyright (c) 2020 Philippe Schmouker
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish... | 40.06383 | 96 | 0.552133 | 4,221 | 0.747212 | 0 | 0 | 347 | 0.061427 | 0 | 0 | 4,695 | 0.831121 |
994c72ee587b0016dc85da74d0c7617e61b815aa | 329 | py | Python | examples.py | loynoir/defer.py | 46f37a046028b1854586301a45870c2b3a628f65 | [
"MIT"
] | null | null | null | examples.py | loynoir/defer.py | 46f37a046028b1854586301a45870c2b3a628f65 | [
"MIT"
] | null | null | null | examples.py | loynoir/defer.py | 46f37a046028b1854586301a45870c2b3a628f65 | [
"MIT"
] | null | null | null | from Defer import Defer
with Defer() as defer:
print("enter the room")
defer(lambda: print("leave the room"))
print("prepare printer")
defer(lambda: print("close printer"))
print("start printing")
defer(lambda: print("end printing"))
print(3)
print(4)
print(5)
print("LONG LONG... | 20.5625 | 42 | 0.635258 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 111 | 0.337386 |
994d23acaf6906fc4bf97467e6053a890c952369 | 15,807 | py | Python | corehq/apps/locations/views.py | SEL-Columbia/commcare-hq | 992ee34a679c37f063f86200e6df5a197d5e3ff6 | [
"BSD-3-Clause"
] | 1 | 2015-02-10T23:26:39.000Z | 2015-02-10T23:26:39.000Z | corehq/apps/locations/views.py | SEL-Columbia/commcare-hq | 992ee34a679c37f063f86200e6df5a197d5e3ff6 | [
"BSD-3-Clause"
] | null | null | null | corehq/apps/locations/views.py | SEL-Columbia/commcare-hq | 992ee34a679c37f063f86200e6df5a197d5e3ff6 | [
"BSD-3-Clause"
] | null | null | null | import copy
from django.http import HttpResponse, HttpResponseRedirect, Http404
from django.utils.safestring import mark_safe
from django.views.decorators.http import require_POST
from corehq.apps.commtrack.views import BaseCommTrackManageView
from corehq.apps.domain.decorators import domain_admin_required, login_and_... | 34.437908 | 115 | 0.636617 | 9,902 | 0.626431 | 0 | 0 | 8,606 | 0.544442 | 0 | 0 | 2,670 | 0.168913 |
994dd444ad53259ecaaf7c341ddbb86dfd9de54c | 363 | py | Python | setup.py | wew84/cnn_bridge | 7cd98e204922174ea9293d8c52c30d00733a7ed2 | [
"BSD-3-Clause"
] | 4 | 2019-05-16T01:30:24.000Z | 2021-04-13T13:55:44.000Z | setup.py | wew84/cnn_bridge | 7cd98e204922174ea9293d8c52c30d00733a7ed2 | [
"BSD-3-Clause"
] | 2 | 2020-01-23T23:39:45.000Z | 2021-12-17T02:32:11.000Z | setup.py | wew84/cnn_bridge | 7cd98e204922174ea9293d8c52c30d00733a7ed2 | [
"BSD-3-Clause"
] | null | null | null | ## ! DO NOT MANUALLY INVOKE THIS setup.py, USE CATKIN INSTEAD
from distutils.core import setup
from catkin_pkg.python_setup import generate_distutils_setup
# fetch values from package.xml
setup_args = generate_distutils_setup(
requires=['tensorflow', 'numpy', 'opencv'],
packages=['cnn_bridge_main'],
packa... | 25.928571 | 61 | 0.743802 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 143 | 0.393939 |
995050aaf43abe070dfab1f85dd869f0e7f9f405 | 1,642 | py | Python | warmup_2/string_splosion.py | nhutnamhcmus/coding-bat-solutions | 5f780a4027a6c3523a72961db1bad547c997fdc6 | [
"MIT"
] | 1 | 2020-09-19T18:02:13.000Z | 2020-09-19T18:02:13.000Z | warmup_2/string_splosion.py | nhutnamhcmus/coding-bat-solutions | 5f780a4027a6c3523a72961db1bad547c997fdc6 | [
"MIT"
] | null | null | null | warmup_2/string_splosion.py | nhutnamhcmus/coding-bat-solutions | 5f780a4027a6c3523a72961db1bad547c997fdc6 | [
"MIT"
] | null | null | null | # =======================================================================================================================================
# VNU-HCM, University of Science
# Department Computer Science, Faculty of Information Technology
# Authors: Nhut-Nam Le (Tich Phan Suy Rong)
# © 2020
import unittest
"""
Given a ... | 25.261538 | 137 | 0.612058 | 956 | 0.579745 | 0 | 0 | 0 | 0 | 0 | 0 | 651 | 0.394785 |
995106f61a1486869dcff6b8ab27a4c99952dfef | 334 | py | Python | ea_sim/params_conf.py | lis-epfl/Tensoft-G21 | 7a83c5dabc12906c0a6bd1da0a28a131e9d5e144 | [
"Apache-2.0"
] | 1 | 2021-08-03T10:52:20.000Z | 2021-08-03T10:52:20.000Z | ea_sim/params_conf.py | lis-epfl/Tensoft-G21 | 7a83c5dabc12906c0a6bd1da0a28a131e9d5e144 | [
"Apache-2.0"
] | null | null | null | ea_sim/params_conf.py | lis-epfl/Tensoft-G21 | 7a83c5dabc12906c0a6bd1da0a28a131e9d5e144 | [
"Apache-2.0"
] | 1 | 2021-09-18T07:23:35.000Z | 2021-09-18T07:23:35.000Z | # centralized file where robot parameters can be customized
MIN_NUM_MODULES = 2
MAX_NUM_MODULES = 10
N_MODULES = list(range(MIN_NUM_MODULES, MAX_NUM_MODULES+1))
STIFF_TABLE = [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1]
#STIFF_TABLE = [0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9... | 41.75 | 108 | 0.637725 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 167 | 0.5 |
99511d438332d3bcdc261ac0609cfadb3d8b5557 | 2,751 | gyp | Python | binding.gyp | Cinegy/CinecoderNodeJs | 9f9e932072b5b19ef786eb5bb2ee22381c6fed34 | [
"Apache-2.0"
] | 3 | 2019-02-07T15:42:49.000Z | 2019-12-07T22:17:50.000Z | binding.gyp | Cinegy/CinecoderNodeJs | 9f9e932072b5b19ef786eb5bb2ee22381c6fed34 | [
"Apache-2.0"
] | 3 | 2017-01-13T19:58:04.000Z | 2021-08-31T21:28:10.000Z | binding.gyp | Cinegy/CinecoderNodeJs | 9f9e932072b5b19ef786eb5bb2ee22381c6fed34 | [
"Apache-2.0"
] | 5 | 2017-01-13T17:09:56.000Z | 2019-12-07T22:17:53.000Z | # Copyright 2016 Streampunk Media Ltd.
#
# 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 w... | 31.62069 | 83 | 0.479826 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,693 | 0.615413 |
99518065e86a0471bd9b44cb187c5e08ca0206fa | 291 | py | Python | src/rdml_graph/information_gathering/__init__.py | ianran/rdml_graph | 83f3896a2a0f5ceb7e092f4e719fb35254c5a5f8 | [
"MIT"
] | 4 | 2020-09-01T17:52:18.000Z | 2022-01-18T22:36:48.000Z | src/rdml_graph/information_gathering/__init__.py | ianran/rdml_graph | 83f3896a2a0f5ceb7e092f4e719fb35254c5a5f8 | [
"MIT"
] | null | null | null | src/rdml_graph/information_gathering/__init__.py | ianran/rdml_graph | 83f3896a2a0f5ceb7e092f4e719fb35254c5a5f8 | [
"MIT"
] | null | null | null | # init for information_gathering
from .Evaluator import PathEvaluator, PathEvaluatorWithRadius, PathEvaluatorAlongPath, applyBudget
from .MaskedEvaluator import MaskedEvaluator
from .StochasticOptimizer import StochasticOptimizer
from .InfoField import random_field2d, random_multi_field2d
| 41.571429 | 98 | 0.883162 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 32 | 0.109966 |
99533e6ec88630f0bf822397008bdc4f64d07cdc | 21,117 | py | Python | web/project/training_api/libs/utilities.py | allspeak/api.allspeak.eu | 0403c4ed870c32ff9846f943e28aeb897f4baf3c | [
"MIT"
] | 1 | 2018-09-03T14:48:27.000Z | 2018-09-03T14:48:27.000Z | web/project/training_api/libs/utilities.py | allspeak/api.allspeak.eu | 0403c4ed870c32ff9846f943e28aeb897f4baf3c | [
"MIT"
] | null | null | null | web/project/training_api/libs/utilities.py | allspeak/api.allspeak.eu | 0403c4ed870c32ff9846f943e28aeb897f4baf3c | [
"MIT"
] | null | null | null | # createSubjectTrainingMatrix(subj, in_orig_subj_path, output_net_path, arr_commands, arr_rip)
# createSubjectTestMatrix(subj, in_orig_subj_path, output_net_path, arr_commands, arr_rip, sentences_filename, sentence_counter)
# createFullMatrix(input_matrix_folder, data_name, label_name, output_matrix_path="")
import os... | 41.163743 | 162 | 0.580764 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6,928 | 0.328077 |
9953d0571911118b84e22efc8fdf8aadef38a916 | 1,373 | py | Python | server/models.py | kenny-skaggs/lists | c9a46c184b8ce664c4c58c10b08a1dc7b60d1a5d | [
"Unlicense"
] | null | null | null | server/models.py | kenny-skaggs/lists | c9a46c184b8ce664c4c58c10b08a1dc7b60d1a5d | [
"Unlicense"
] | null | null | null | server/models.py | kenny-skaggs/lists | c9a46c184b8ce664c4c58c10b08a1dc7b60d1a5d | [
"Unlicense"
] | null | null | null | from datetime import datetime
import sqlalchemy as sa
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import relationship
BaseModel = declarative_base()
class Item(BaseModel):
__tablename__ = 'items'
id = sa.Column(sa.Integer, primary_key=True)
name = sa.Column(sa.String(300)... | 32.690476 | 101 | 0.739257 | 1,177 | 0.857247 | 0 | 0 | 0 | 0 | 0 | 0 | 124 | 0.090313 |
99548a01e83a179a6bb2c82d30f37deca9cc74b6 | 5,206 | py | Python | Note11_Learn Python_Staticmethods&Exceptions.py | stanreport/Python-Tutorials | 7aff8ff7c21d4face1afb218ab9679f3d1160e27 | [
"Apache-2.0"
] | null | null | null | Note11_Learn Python_Staticmethods&Exceptions.py | stanreport/Python-Tutorials | 7aff8ff7c21d4face1afb218ab9679f3d1160e27 | [
"Apache-2.0"
] | 1 | 2018-04-14T19:35:14.000Z | 2018-04-14T19:35:14.000Z | Note11_Learn Python_Staticmethods&Exceptions.py | stanreport/Python-Tutorials | 7aff8ff7c21d4face1afb218ab9679f3d1160e27 | [
"Apache-2.0"
] | null | null | null | # ---------- STATIC METHODS ----------
# Static methods allow access without the need to initialize
# a class. They should be used as utility methods, or when
# a method is needed, but it doesn't make sense for the real
# world object to be able to perform a task
class Sum:
# You use the static method decorator ... | 24.909091 | 68 | 0.671725 | 700 | 0.133435 | 0 | 0 | 224 | 0.042699 | 0 | 0 | 3,702 | 0.705681 |
995771bb5ce39f771d0087436d5379344c7c7a93 | 17,632 | py | Python | (3)TopTitanic1.py | statpng/KaggleTranscript | b110482a2adcf0390fac0d54c890c95894f98dea | [
"Apache-2.0"
] | null | null | null | (3)TopTitanic1.py | statpng/KaggleTranscript | b110482a2adcf0390fac0d54c890c95894f98dea | [
"Apache-2.0"
] | null | null | null | (3)TopTitanic1.py | statpng/KaggleTranscript | b110482a2adcf0390fac0d54c890c95894f98dea | [
"Apache-2.0"
] | null | null | null | # https://www.kaggle.com/yassineghouzam/titanic-top-4-with-ensemble-modeling
# Feature analysis
# Feature engineering
# Modeling
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
# %matplotlib inline
from collections import Counter
from sklearn.ensemble import RandomForestC... | 35.193613 | 165 | 0.650522 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,150 | 0.235368 |
9958f6192f0c624286a05b17462ac8310129e2ae | 2,742 | py | Python | simpleeval__examples__calc/basic/compound_types.py | DazEB2/SimplePyScripts | 1dde0a42ba93fe89609855d6db8af1c63b1ab7cc | [
"CC-BY-4.0"
] | 117 | 2015-12-18T07:18:27.000Z | 2022-03-28T00:25:54.000Z | simpleeval__examples__calc/basic/compound_types.py | DazEB2/SimplePyScripts | 1dde0a42ba93fe89609855d6db8af1c63b1ab7cc | [
"CC-BY-4.0"
] | 8 | 2018-10-03T09:38:46.000Z | 2021-12-13T19:51:09.000Z | simpleeval__examples__calc/basic/compound_types.py | DazEB2/SimplePyScripts | 1dde0a42ba93fe89609855d6db8af1c63b1ab7cc | [
"CC-BY-4.0"
] | 28 | 2016-08-02T17:43:47.000Z | 2022-03-21T08:31:12.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'ipetrash'
# SOURCE: https://github.com/danthedeckie/simpleeval/blob/master/README.rst#compound-types
# """
# Compound types (dict, tuple, list, set) in general just work if you pass them in as named objects.
# If you want to allow creation of these, the Ev... | 40.323529 | 104 | 0.598104 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,361 | 0.496353 |
9958fb1fe550f9459cfe99043f36afca01044db6 | 1,049 | py | Python | demo/person/tests/project/domain/person/repository/test_physical_person_model.py | giovannifarlley/ms--fastapi-template | 5bbd6903305db07cc18330ec86fb04ca518e9dab | [
"MIT"
] | 24 | 2021-03-07T13:00:35.000Z | 2022-02-11T03:41:51.000Z | demo/person/tests/project/domain/person/repository/test_physical_person_model.py | giovannifarlley/ms--fastapi-template | 5bbd6903305db07cc18330ec86fb04ca518e9dab | [
"MIT"
] | 2 | 2021-05-15T01:05:17.000Z | 2021-08-13T13:53:57.000Z | demo/person/tests/project/domain/person/repository/test_physical_person_model.py | giovannifarlley/ms--fastapi-template | 5bbd6903305db07cc18330ec86fb04ca518e9dab | [
"MIT"
] | 4 | 2021-04-27T12:18:33.000Z | 2021-10-03T23:43:23.000Z | from datetime import datetime
from bson.objectid import ObjectId
import pytest
from project.domain.person.repository.physical_person import PhysicalPerson
def test_instance_physical_person():
input_data = {
"_id": ObjectId(),
"status": "active",
"name": "teste",
"last_name": "test... | 26.897436 | 75 | 0.551954 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 268 | 0.255481 |
995a18380107d2a42827b6340d3c5bca73c8436d | 2,202 | py | Python | tests/api/v2/test_queries.py | droessmj/python-sdk | 42ea2366d08ef5e4d1fa45029480b800352ab765 | [
"MIT"
] | 2 | 2020-09-08T20:42:05.000Z | 2020-09-09T14:27:55.000Z | tests/api/v2/test_queries.py | droessmj/python-sdk | 42ea2366d08ef5e4d1fa45029480b800352ab765 | [
"MIT"
] | null | null | null | tests/api/v2/test_queries.py | droessmj/python-sdk | 42ea2366d08ef5e4d1fa45029480b800352ab765 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Test suite for the community-developed Python SDK for interacting with Lacework APIs.
"""
import random
import pytest
from laceworksdk.api.v2.queries import QueriesAPI
from tests.api.test_crud_endpoint import CrudEndpoint
# Tests
@pytest.fixture(scope="module")
def api_object(api):
... | 28.597403 | 128 | 0.656676 | 823 | 0.373751 | 0 | 0 | 1,102 | 0.500454 | 0 | 0 | 821 | 0.372843 |
995ce8cb055163c1151d7b483d731dd014f5c38e | 9,058 | py | Python | dataloader.py | AriaPs/TransparentDepth | c053b273be856cc9433fd5598a56b96d44ae910e | [
"MIT"
] | 1 | 2021-05-16T19:40:58.000Z | 2021-05-16T19:40:58.000Z | dataloader.py | AriaPs/TransparentDepth | c053b273be856cc9433fd5598a56b96d44ae910e | [
"MIT"
] | null | null | null | dataloader.py | AriaPs/TransparentDepth | c053b273be856cc9433fd5598a56b96d44ae910e | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os
import glob
import sys
from PIL import Image
import Imath
import numpy as np
import torch
import torch.nn as nn
from torch.utils.data import Dataset
from torchvision import transforms
from imgaug import augmenters as iaa
import imgaug as ia
import imageio
import cv2
... | 40.4375 | 142 | 0.598256 | 6,071 | 0.670236 | 0 | 0 | 0 | 0 | 0 | 0 | 2,957 | 0.326452 |
995fa5032672d255714e214da117b6d2228beb50 | 596 | py | Python | django/settings/wsgi.py | radifar/django-vue-graphql-demo | bae75dacf79b5da47a49b02a275a5795cdc5b1de | [
"MIT"
] | null | null | null | django/settings/wsgi.py | radifar/django-vue-graphql-demo | bae75dacf79b5da47a49b02a275a5795cdc5b1de | [
"MIT"
] | 4 | 2021-03-19T10:42:08.000Z | 2021-06-10T20:11:15.000Z | django/settings/wsgi.py | radifar/django-vue-graphql-demo | bae75dacf79b5da47a49b02a275a5795cdc5b1de | [
"MIT"
] | null | null | null | """
WSGI config for django_vue 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.2/howto/deployment/wsgi/
"""
import os
from dotenv import load_dotenv
PROJECT_DIR = os.path.dirname(os.path.dirname(os.path... | 28.380952 | 78 | 0.791946 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 273 | 0.458054 |
996276e35632e5351e97d09b376c527fbb524a3d | 1,409 | py | Python | alpa/torch/optim/adam.py | TarzanZhao/alpa | c477805bfb182788ed07e8b3a8e2924333433507 | [
"Apache-2.0"
] | null | null | null | alpa/torch/optim/adam.py | TarzanZhao/alpa | c477805bfb182788ed07e8b3a8e2924333433507 | [
"Apache-2.0"
] | null | null | null | alpa/torch/optim/adam.py | TarzanZhao/alpa | c477805bfb182788ed07e8b3a8e2924333433507 | [
"Apache-2.0"
] | null | null | null | """Adam optimizer"""
import copy
import torch
def adam(lr=1e-4):
"""torchoptim.adam(**adam_config)(params)
Factory that generates functional version of Adam optimizer.
Implementation has no in-place op and no data-dependent control flow.
Returns:
- `optim_func`: a function th... | 32.022727 | 77 | 0.596167 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 748 | 0.530873 |
9962f81178525ce273dd05b72036d4af806539c0 | 2,122 | py | Python | graph_plots/fwidgets/f_icon_label.py | DanShai/kivy-graph | 6537901d521247a13e186aaa8ecbaffdffdaf7ea | [
"MIT"
] | 3 | 2018-11-28T13:35:35.000Z | 2021-09-12T15:54:28.000Z | graph_plots/fwidgets/f_icon_label.py | DanShai/kivy-graph | 6537901d521247a13e186aaa8ecbaffdffdaf7ea | [
"MIT"
] | null | null | null | graph_plots/fwidgets/f_icon_label.py | DanShai/kivy-graph | 6537901d521247a13e186aaa8ecbaffdffdaf7ea | [
"MIT"
] | 1 | 2021-05-03T18:48:01.000Z | 2021-05-03T18:48:01.000Z | '''
@author: dan
'''
from f_widget import FWidget
from kivy.uix.label import Label
from kivy.properties import ListProperty, NumericProperty, StringProperty, BooleanProperty, ObjectProperty
from kivy.uix.button import Button
from kivy.lang import Builder
from f_button import FButton
from utils import get_icon_char,... | 27.921053 | 106 | 0.65787 | 1,369 | 0.645146 | 0 | 0 | 0 | 0 | 0 | 0 | 429 | 0.202168 |
99641347f295a7ff5a40d732751c3697679eb9d0 | 1,498 | py | Python | openquake/qa_tests_data/classical/case_20/__init__.py | gfzriesgos/shakyground-lfs | 2caf67cc32e6800286eded2df1efb05973ccf41b | [
"BSD-3-Clause"
] | 1 | 2019-08-01T00:28:24.000Z | 2019-08-01T00:28:24.000Z | openquake/qa_tests_data/classical/case_20/__init__.py | gfzriesgos/shakyground-lfs | 2caf67cc32e6800286eded2df1efb05973ccf41b | [
"BSD-3-Clause"
] | 4 | 2018-08-31T14:14:35.000Z | 2021-10-11T12:53:13.000Z | openquake/qa_tests_data/classical/case_20/__init__.py | gfzriesgos/shakyground-lfs | 2caf67cc32e6800286eded2df1efb05973ccf41b | [
"BSD-3-Clause"
] | 3 | 2018-08-31T14:11:00.000Z | 2019-07-17T10:06:02.000Z | # -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (C) 2015-2018 GEM Foundation
#
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the Licen... | 35.666667 | 77 | 0.777704 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,479 | 0.987316 |
996441264a0388e222c0662b66693e392b112c8f | 5,368 | py | Python | yardstick/network_services/vnf_generic/vnf/iniparser.py | mythwm/yardstick-wm | 319ced11df92456b42c80cfd6e53c66dbd22a746 | [
"Apache-2.0"
] | 1 | 2019-12-08T21:57:31.000Z | 2019-12-08T21:57:31.000Z | yardstick/network_services/vnf_generic/vnf/iniparser.py | mythwm/yardstick-wm | 319ced11df92456b42c80cfd6e53c66dbd22a746 | [
"Apache-2.0"
] | null | null | null | yardstick/network_services/vnf_generic/vnf/iniparser.py | mythwm/yardstick-wm | 319ced11df92456b42c80cfd6e53c66dbd22a746 | [
"Apache-2.0"
] | null | null | null | # Copyright 2012 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 ... | 30.157303 | 79 | 0.600037 | 4,747 | 0.884314 | 0 | 0 | 0 | 0 | 0 | 0 | 1,267 | 0.236028 |
9964cf19b644bec6e8da1584aa1fc11f4f7d82fe | 245 | py | Python | 6_json_to_csv.py | pLINaROF/income_of_russian_deputies | 6c27fe968825aa2131b613da7265364a03e47397 | [
"MIT"
] | null | null | null | 6_json_to_csv.py | pLINaROF/income_of_russian_deputies | 6c27fe968825aa2131b613da7265364a03e47397 | [
"MIT"
] | null | null | null | 6_json_to_csv.py | pLINaROF/income_of_russian_deputies | 6c27fe968825aa2131b613da7265364a03e47397 | [
"MIT"
] | null | null | null | import pandas
df = pandas.read_json('data_with_income_rub.json')
df.to_csv('data_with_income_rub.csv', index=False)
df = pandas.read_json('data_with_income_rub_from_csv.json')
df.to_csv('data_with_income_rub_from_csv.csv', index=False)
| 30.625 | 60 | 0.791837 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 124 | 0.506122 |
99659d8149cb29fabf4d67b97757ba247c6d49a2 | 1,767 | py | Python | tests/tests/test_settings.py | washwash/django-rest-tfa | b1b77a2220824297a471b0cfa4529e1d6fba7dfe | [
"MIT"
] | 1 | 2019-10-11T15:25:52.000Z | 2019-10-11T15:25:52.000Z | tests/tests/test_settings.py | washwash/django-rest-tfa | b1b77a2220824297a471b0cfa4529e1d6fba7dfe | [
"MIT"
] | null | null | null | tests/tests/test_settings.py | washwash/django-rest-tfa | b1b77a2220824297a471b0cfa4529e1d6fba7dfe | [
"MIT"
] | null | null | null | import mock
from datetime import datetime, timedelta
from django.test import override_settings
from freezegun import freeze_time
from django.urls import reverse
from rest_framework import status
from tests.tests.test_api import get_token_from_email
@mock.patch('django.core.mail.outbox', new_callable=list)
@override_s... | 34.647059 | 84 | 0.697793 | 0 | 0 | 0 | 0 | 1,512 | 0.855688 | 0 | 0 | 304 | 0.172043 |
9965fa5ba34897ab740dab94e3003731240a9286 | 3,131 | py | Python | zorin/report.py | warnerpr/zorin | 7f41029a229fd0589460a76514afd42122e92aed | [
"MIT"
] | 1 | 2015-07-14T11:57:27.000Z | 2015-07-14T11:57:27.000Z | zorin/report.py | warnerpr/zorin | 7f41029a229fd0589460a76514afd42122e92aed | [
"MIT"
] | null | null | null | zorin/report.py | warnerpr/zorin | 7f41029a229fd0589460a76514afd42122e92aed | [
"MIT"
] | null | null | null | import sys
import json
from sqlalchemy.orm import sessionmaker
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.exc import IntegrityError
from sqlalchemy import Column, Integer, String, Table, PrimaryKeyConstraint, create_engine
# engine = create_engine('sqlite:////tmp/zorin.db')
engine = crea... | 30.105769 | 111 | 0.595018 | 1,658 | 0.529543 | 0 | 0 | 0 | 0 | 0 | 0 | 347 | 0.110827 |
9967cec318291035a6b99a56b195699b1cec987a | 4,766 | py | Python | holybible.py | DPS0340/holybible.py | ee6b4d6da7b21f44a6d3e7fc8973cf186f7c1109 | [
"MIT"
] | null | null | null | holybible.py | DPS0340/holybible.py | ee6b4d6da7b21f44a6d3e7fc8973cf186f7c1109 | [
"MIT"
] | null | null | null | holybible.py | DPS0340/holybible.py | ee6b4d6da7b21f44a6d3e7fc8973cf186f7c1109 | [
"MIT"
] | null | null | null |
# 이지호 작성 #
# 공동번역 성서의 저작권은 모두 저작권자에게 있습니다. #
import sys
import re
import random
end = "끝났습니다."
error = "오류입니다."
def run():
short = ['Gen', 'Exo', 'Lev', 'Num', 'Deu', 'Jos', 'Jdg', 'Rth', '1Sa', '2Sa', '1Ki', '2Ki', '1Ch', '2Ch', 'Ezr',
'Neh', 'Est', 'Job', 'Psa', 'Pro', 'Ecc', 'Sol'... | 36.381679 | 118 | 0.402854 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,457 | 0.421585 |
9969702168eaa2a803a9b22907df963ef3cbab6f | 143 | py | Python | mail_alias_manager/api/v1_api/__init__.py | stuvusIT/mail_alias_manager | 260b6d1da4db03079afee159c23c3f83f4e75937 | [
"MIT"
] | null | null | null | mail_alias_manager/api/v1_api/__init__.py | stuvusIT/mail_alias_manager | 260b6d1da4db03079afee159c23c3f83f4e75937 | [
"MIT"
] | null | null | null | mail_alias_manager/api/v1_api/__init__.py | stuvusIT/mail_alias_manager | 260b6d1da4db03079afee159c23c3f83f4e75937 | [
"MIT"
] | null | null | null | """Module containing the v1 API."""
from .root import API_V1 # noqa
from . import recipient_alias # noqa
from . import sender_alias # noqa
| 23.833333 | 37 | 0.72028 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 53 | 0.370629 |
996b4a5c2c888f7934622bcd04f25b88299bc8b1 | 1,784 | py | Python | server/cosmic_pairing_api/mocks/signs.py | lingtran/cosmic_pairing | df25b3873cc4fb871526eb5187070596b8b11ea2 | [
"MIT"
] | null | null | null | server/cosmic_pairing_api/mocks/signs.py | lingtran/cosmic_pairing | df25b3873cc4fb871526eb5187070596b8b11ea2 | [
"MIT"
] | 19 | 2020-07-31T03:06:14.000Z | 2022-03-10T05:03:04.000Z | server/cosmic_pairing_api/mocks/signs.py | lingtran/cosmic_pairing | df25b3873cc4fb871526eb5187070596b8b11ea2 | [
"MIT"
] | null | null | null | from cosmic_pairing_api.utils.enums.element import Element
from cosmic_pairing_api.utils.enums.modality import Modality
SIGNS = [
{
"id": 1,
"name": "aries",
"modality": Modality.CARDINAL.name,
"element": Element.FIRE.name,
},
{
"id": 2,
"name": "taurus",
... | 22.871795 | 60 | 0.483184 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 449 | 0.251682 |
996b9f6d14e4feb9f7a3b2d58454376d40004276 | 513 | py | Python | progs/mean.py | Breccia/s-py | 4fc5fcd0efbfcaa6574a81ee922c1083ed0ef57d | [
"MIT"
] | null | null | null | progs/mean.py | Breccia/s-py | 4fc5fcd0efbfcaa6574a81ee922c1083ed0ef57d | [
"MIT"
] | null | null | null | progs/mean.py | Breccia/s-py | 4fc5fcd0efbfcaa6574a81ee922c1083ed0ef57d | [
"MIT"
] | null | null | null | #!/usr/local/anaconda3/bin/python
import sys
sys.path.insert(0, "../libs/")
from spy_mean import compute_mean
if __name__ == "__main__":
print("Program to compute mean")
count = input("Enter total number of samples: ")
idx = 0
data = []
for idx in range(0, int(count)):
val = input("Enter ... | 24.428571 | 66 | 0.623782 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 199 | 0.387914 |
996c038f0063123980ac86217bb77ad88b247eae | 896 | py | Python | wxalarmlib/utils/time_util.py | sanderiana/wxAlarm | 6abc4a8851ce83fa7d3ee30d89a773d9952f87ed | [
"MIT"
] | null | null | null | wxalarmlib/utils/time_util.py | sanderiana/wxAlarm | 6abc4a8851ce83fa7d3ee30d89a773d9952f87ed | [
"MIT"
] | null | null | null | wxalarmlib/utils/time_util.py | sanderiana/wxAlarm | 6abc4a8851ce83fa7d3ee30d89a773d9952f87ed | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# ---------------------------------------------------------------
# wxalarm.py
#
# Copyright (c) 2019 sanderiana https://github.com/sanderiana
#
# This software is released under the MIT License.
# http://opensource.org/licenses/mit-license.php
# ------------------------------------------------... | 28 | 65 | 0.506696 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 449 | 0.501116 |
996e5d48a68547f594689c85765b9e52520f471a | 652 | py | Python | getmode.py | NeraOS/Simulation-Python | a75cd01d9dcf61caa5f1f4471194d44d841095df | [
"MIT"
] | 1 | 2020-12-02T10:20:40.000Z | 2020-12-02T10:20:40.000Z | getmode.py | NeraOS/Simulation-Python | a75cd01d9dcf61caa5f1f4471194d44d841095df | [
"MIT"
] | null | null | null | getmode.py | NeraOS/Simulation-Python | a75cd01d9dcf61caa5f1f4471194d44d841095df | [
"MIT"
] | null | null | null | """Выбор режима"""
print ("""
Выберите режим загрузки:
1 - Стандартная загрузка с поддержкой сетевых драйверов
2 - Безопасный режим с записью действий в log
9 - Остановить загрузку
Введите ТОЛЬКО цифру
""")
def wr(mode):
f = open('config.ini','w') # открытие в режиме записи
f.write(str(mode)) # за... | 25.076923 | 65 | 0.642638 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 731 | 0.761458 |
996e8e0ab897144a54ed75e7fe50985334a44f7b | 150 | py | Python | competitive/AtCoder/ABC144/B.py | pn11/benkyokai | 9ebdc46b529e76b7196add26dbc1e62ad48e72b0 | [
"MIT"
] | null | null | null | competitive/AtCoder/ABC144/B.py | pn11/benkyokai | 9ebdc46b529e76b7196add26dbc1e62ad48e72b0 | [
"MIT"
] | 22 | 2020-03-24T16:24:47.000Z | 2022-02-26T15:51:18.000Z | competitive/AtCoder/ABC144/B.py | pn11/benkyokai | 9ebdc46b529e76b7196add26dbc1e62ad48e72b0 | [
"MIT"
] | null | null | null | N = int(input())
ans = 'No'
for i in range(1, 10):
if N % i == 0:
res = N // i
if res < 10:
ans = 'Yes'
print(ans)
| 12.5 | 23 | 0.393333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 0.06 |
996ea645ce42f819744d7c8848ee5604d942ae67 | 3,380 | py | Python | ship.py | kcwikizh/kancolle-shinkai-db | 73808a91b5f59d158374f016e2d514225f1ca6bd | [
"MIT"
] | 1 | 2019-02-11T08:57:07.000Z | 2019-02-11T08:57:07.000Z | ship.py | kcwikizh/kancolle-shinkai-db | 73808a91b5f59d158374f016e2d514225f1ca6bd | [
"MIT"
] | null | null | null | ship.py | kcwikizh/kancolle-shinkai-db | 73808a91b5f59d158374f016e2d514225f1ca6bd | [
"MIT"
] | null | null | null | """Convert shinkai ship Json to KcWiki Lua """
__all__ = ['main']
import json
from collections import OrderedDict
from utils import python_data_to_lua_table
SHIPS_HR_JSON = 'json/ships_human_readable.json'
SHIPS_LUA = 'lua/ships.lua'
def shinkai_parse_ship(ships):
"""Get shinkai ships stored by python OrderedDi... | 33.465347 | 76 | 0.57071 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,054 | 0.299943 |
997013f433286a434be0bc62644d89db7ecaf942 | 346 | py | Python | PYTHON/Py3_Mundo1_Fundamental/desafios/des001.py | Marciobroficial/CURSO-EM-VIDEO | 37b10c26336a9744236603282af77661fdf8c61a | [
"MIT"
] | 1 | 2021-10-09T18:11:20.000Z | 2021-10-09T18:11:20.000Z | PYTHON/Py3_Mundo1_Fundamental/desafios/des001.py | Coppini21/CURSO-EM-VIDEO | 37b10c26336a9744236603282af77661fdf8c61a | [
"MIT"
] | 1 | 2021-09-15T04:18:34.000Z | 2022-03-02T23:16:26.000Z | PYTHON/Py3_Mundo1_Fundamental/desafios/des001.py | Coppini21/CURSO-EM-VIDEO | 37b10c26336a9744236603282af77661fdf8c61a | [
"MIT"
] | 3 | 2021-12-15T17:19:51.000Z | 2022-03-29T02:19:00.000Z | # Desafio 01
# Faça um programa Leia um nome de uma pessoa e que mostre uma mensagem de boas-vidas de acordo com o valor digitado.
print()
print('=-='*15)
nome = input ('Qual é sue nome ? ')
print ('Ola',nome,'Prazer em te conhecer!')
nome = input('Digite seu nome: ')
print('É um prazer te conhecer, {}!'.format(nome)... | 26.615385 | 117 | 0.67052 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 240 | 0.687679 |
9971ddcf2919c00539af25050648ccbd84f39ca4 | 6,547 | py | Python | models/FCOSInference.py | meet-minimalist/FCOS-Pytorch-Implementation | e8ac1c6230174902732dbe8bcff3a87034f99517 | [
"MIT"
] | null | null | null | models/FCOSInference.py | meet-minimalist/FCOS-Pytorch-Implementation | e8ac1c6230174902732dbe8bcff3a87034f99517 | [
"MIT"
] | null | null | null | models/FCOSInference.py | meet-minimalist/FCOS-Pytorch-Implementation | e8ac1c6230174902732dbe8bcff3a87034f99517 | [
"MIT"
] | null | null | null |
import os
import sys
from typing_extensions import final
sys.path.append("../")
# TODO : Remove this append line
import numpy as np
import torch
import torch.nn as nn
from models.FCOS import FCOS
from models.PostProcessor import PostProcessor
import imgaug.augmenters as iaa
from imgaug.augmentables.bbs import Bounding... | 45.465278 | 131 | 0.64625 | 2,722 | 0.415763 | 0 | 0 | 0 | 0 | 0 | 0 | 1,045 | 0.159615 |
997314c831c988ddbd5db113b34ed31937c6e5ec | 435 | py | Python | parsing/question-extraction.py | hagarwa3/stackoverflow-search | 990b339a1b87530894d1068eb99d0b03e6476268 | [
"MIT"
] | 4 | 2018-04-20T06:53:01.000Z | 2020-02-09T12:08:52.000Z | parsing/question-extraction.py | hagarwa3/stackoverflow-bot | 990b339a1b87530894d1068eb99d0b03e6476268 | [
"MIT"
] | null | null | null | parsing/question-extraction.py | hagarwa3/stackoverflow-bot | 990b339a1b87530894d1068eb99d0b03e6476268 | [
"MIT"
] | 5 | 2019-04-10T16:45:21.000Z | 2021-12-05T16:32:03.000Z | f = open("C:\Users\Harshit Agarwal\Desktop\stackoverflow.com-Posts\Postsnew.xml", "w")
f.write('<?xml version="1.0" encoding="utf-8"?>\n<posts>')
i = 0
with open("C:\Users\Harshit Agarwal\Desktop\stackoverflow.com-Posts\Posts.xml") as fileobject:
for line in fileobject:
i +=1
if 'PostTypeId="1"' in ... | 36.25 | 94 | 0.602299 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 217 | 0.498851 |
9976fff4f6af74e77c73639f170ea7b55694e3d1 | 6,611 | py | Python | src/pybel/struct/filters/edge_predicates.py | tehw0lf/pybel | 6f67f8cce15052cc3c42ef87374e3b9ee45e6519 | [
"Apache-2.0"
] | null | null | null | src/pybel/struct/filters/edge_predicates.py | tehw0lf/pybel | 6f67f8cce15052cc3c42ef87374e3b9ee45e6519 | [
"Apache-2.0"
] | null | null | null | src/pybel/struct/filters/edge_predicates.py | tehw0lf/pybel | 6f67f8cce15052cc3c42ef87374e3b9ee45e6519 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""Predicates for edge data from BEL graphs."""
from functools import wraps
from .utils import part_has_modifier
from ..graph import BELGraph
from ...constants import (
ACTIVITY, ANNOTATIONS, ASSOCIATION, CAUSAL_RELATIONS, CITATION, CITATION_AUTHORS, CITATION_TYPE,
CITATION_TYPE_PUBME... | 29.382222 | 117 | 0.697776 | 0 | 0 | 0 | 0 | 3,166 | 0.478899 | 0 | 0 | 4,192 | 0.634095 |
9977007f75c563a21f518b2163f15a2318a36887 | 1,001 | py | Python | tests/ComponentTests/neck_build.py | FabricExile/Kraken | d8c1f5189cb191945e2c18a1369c458d05305afc | [
"BSD-3-Clause"
] | 7 | 2017-12-04T16:57:42.000Z | 2021-09-07T07:02:38.000Z | tests/ComponentTests/neck_build.py | xtvjxk123456/Kraken | d8c1f5189cb191945e2c18a1369c458d05305afc | [
"BSD-3-Clause"
] | null | null | null | tests/ComponentTests/neck_build.py | xtvjxk123456/Kraken | d8c1f5189cb191945e2c18a1369c458d05305afc | [
"BSD-3-Clause"
] | 6 | 2017-11-14T06:50:48.000Z | 2021-08-21T22:47:29.000Z | from kraken import plugins
from kraken.core.maths import Vec3
from kraken_examples.neck_component import NeckComponentGuide, NeckComponentRig
from kraken.core.profiler import Profiler
from kraken.helpers.utility_methods import logHierarchy
Profiler.getInstance().push("neck_build")
neckGuide = NeckComponentGuide("n... | 25.025 | 79 | 0.67033 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 142 | 0.141858 |
9978c4d313a84a9361e210c9564192dbd9f01882 | 1,354 | py | Python | tests/test_xsw.py | cnelson/pysaml2 | a30e51c271e27e4411a0243b65adbf5d7a3abb07 | [
"Apache-2.0"
] | null | null | null | tests/test_xsw.py | cnelson/pysaml2 | a30e51c271e27e4411a0243b65adbf5d7a3abb07 | [
"Apache-2.0"
] | 2 | 2020-01-17T20:13:26.000Z | 2020-11-17T23:00:50.000Z | tests/test_xsw.py | cnelson/pysaml2 | a30e51c271e27e4411a0243b65adbf5d7a3abb07 | [
"Apache-2.0"
] | 2 | 2020-02-24T15:18:18.000Z | 2020-07-15T10:49:12.000Z | from datetime import datetime
from unittest.mock import Mock
from unittest.mock import patch
from saml2.config import config_factory
from saml2.response import authn_response
from saml2.sigver import SignatureError
from dateutil import parser
from pytest import raises
from pathutils import dotname
from pathutils im... | 30.088889 | 79 | 0.711226 | 959 | 0.708272 | 0 | 0 | 757 | 0.559084 | 0 | 0 | 216 | 0.159527 |
997b54bcf5f7b4cc139e3fa13dc04de3e3c8896b | 102 | py | Python | python/6Kyu/Split Strings.py | athasv/Codewars-data | 5e106466e709fd776f23585ad9f652d0d65b48d3 | [
"MIT"
] | null | null | null | python/6Kyu/Split Strings.py | athasv/Codewars-data | 5e106466e709fd776f23585ad9f652d0d65b48d3 | [
"MIT"
] | null | null | null | python/6Kyu/Split Strings.py | athasv/Codewars-data | 5e106466e709fd776f23585ad9f652d0d65b48d3 | [
"MIT"
] | null | null | null | def solution(s):
return [s[x:x+2] if x < len(s) - 1 else s[-1] + "_" for x in range(0, len(s), 2)] | 51 | 85 | 0.529412 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 0.029412 |
997bef368503e63a63bd868a1dd0b1d4182d8089 | 752 | py | Python | Tool/converter/convert.py | TencentOpen/icaf | d29a43c6ca89562872e044b2104c1bd5a595f1b6 | [
"MIT"
] | 38 | 2015-06-12T03:31:06.000Z | 2018-08-29T06:49:14.000Z | Tool/converter/convert.py | TencentOpen/icaf | d29a43c6ca89562872e044b2104c1bd5a595f1b6 | [
"MIT"
] | 1 | 2016-01-25T01:57:40.000Z | 2016-01-25T01:57:40.000Z | Tool/converter/convert.py | TencentOpen/icaf | d29a43c6ca89562872e044b2104c1bd5a595f1b6 | [
"MIT"
] | 35 | 2015-06-11T15:11:23.000Z | 2020-04-05T01:26:11.000Z | import os
import re
def writeLine(fs, line):
print "write: %s"%line
fs.write(line)
def fixFile(filePath):
fs = open(filePath, "r")
lines = fs.readlines()
fs.close()
fs = open(filePath, "w")
for line in lines:
result = re.search(r"(?<=\[NSThread\ssleepForTimeInterval:).*(?=\])", line)
if not result:
wri... | 20.324324 | 77 | 0.62766 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 112 | 0.148936 |
997f4b97d545477757e8bda91a697ce9e6990088 | 11,259 | py | Python | kcclient/slidingmetrics.py | sanjeevm0/kcluster-client | 5dda3f2a4ebc5811ec176aab70f48d9be5f6a731 | [
"MIT"
] | null | null | null | kcclient/slidingmetrics.py | sanjeevm0/kcluster-client | 5dda3f2a4ebc5811ec176aab70f48d9be5f6a731 | [
"MIT"
] | null | null | null | kcclient/slidingmetrics.py | sanjeevm0/kcluster-client | 5dda3f2a4ebc5811ec176aab70f48d9be5f6a731 | [
"MIT"
] | 1 | 2020-09-22T23:40:37.000Z | 2020-09-22T23:40:37.000Z | import math
import sys
import os
import copy
thisPath = os.path.dirname(os.path.realpath(__file__))
sys.path.append(thisPath)
from enum import Enum
from mlock import MLock
import utils
# Input.Cumulative means cumulative value is being input (e.g. total bytes)
# Input.Average means time average is being input (e.g. by... | 31.362117 | 112 | 0.518963 | 7,474 | 0.663824 | 0 | 0 | 268 | 0.023803 | 0 | 0 | 1,311 | 0.11644 |
997fb873a286d232b8c4f66af54539b644cf21c9 | 9,025 | py | Python | oscar/lib/python2.7/site-packages/whoosh/analysis/ngrams.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/whoosh/analysis/ngrams.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/whoosh/analysis/ngrams.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2007 Matt Chaput. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions a... | 37.920168 | 80 | 0.525651 | 6,637 | 0.735402 | 4,281 | 0.474349 | 0 | 0 | 0 | 0 | 3,338 | 0.369861 |
9982e59aaaa75c68bd3e08786c5defa1efb2e162 | 244 | py | Python | demo/config.py | SDchao/nonebot | 145d1787143584895375231210e30fdd3003d5bf | [
"MIT"
] | 1 | 2021-01-19T03:57:23.000Z | 2021-01-19T03:57:23.000Z | demo/config.py | coffiasd/nonebot | c02b9a4ccf61126aa81e3f86b06b44685461af09 | [
"MIT"
] | null | null | null | demo/config.py | coffiasd/nonebot | c02b9a4ccf61126aa81e3f86b06b44685461af09 | [
"MIT"
] | null | null | null | import re
from nonebot.default_config import *
HOST = '0.0.0.0'
SECRET = 'abc'
SUPERUSERS = {1002647525}
NICKNAME = {'奶茶', '小奶茶'}
COMMAND_START = {'', '/', '!', '/', '!', re.compile(r'^>+\s*')}
COMMAND_SEP = {'/', '.', re.compile(r'#|::?')}
| 20.333333 | 63 | 0.54918 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 74 | 0.286822 |
9984268e196c7b6f74d5fc4959e1fab66773f0d3 | 1,471 | py | Python | chempy/properties/tests/test_water_viscosity_korson_1969.py | bertiewooster/chempy | 115adc1d570aa1631baff4374f3128ce23fa7776 | [
"BSD-2-Clause"
] | 340 | 2015-10-30T03:41:05.000Z | 2022-03-31T05:01:17.000Z | chempy/properties/tests/test_water_viscosity_korson_1969.py | bertiewooster/chempy | 115adc1d570aa1631baff4374f3128ce23fa7776 | [
"BSD-2-Clause"
] | 80 | 2015-11-03T13:31:23.000Z | 2022-03-31T16:46:19.000Z | chempy/properties/tests/test_water_viscosity_korson_1969.py | bertiewooster/chempy | 115adc1d570aa1631baff4374f3128ce23fa7776 | [
"BSD-2-Clause"
] | 75 | 2016-06-06T19:55:48.000Z | 2022-03-19T23:39:13.000Z | import warnings
from ..water_viscosity_korson_1969 import water_viscosity
def test_water_viscosity():
warnings.filterwarnings("error") # Table II (p. 38):
assert abs(water_viscosity(273.15 + 0) - 1.7916) < 5e-4
assert abs(water_viscosity(273.15 + 5) - 1.5192) < 5e-4
assert abs(water_viscosity(273.15 ... | 50.724138 | 61 | 0.656016 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 26 | 0.017675 |
99843f08508767bdb980b0e376ab8912b933a55a | 1,235 | py | Python | sa_analysis.py | CarryChang/-Customer_satisfaction_Analysis | 1d0edc9035302f826909fd462eab92e2a15dcfd9 | [
"Apache-2.0"
] | 341 | 2018-12-21T08:00:52.000Z | 2022-03-31T00:31:31.000Z | sa_analysis.py | CarryChang/-Customer_satisfaction_Analysis | 1d0edc9035302f826909fd462eab92e2a15dcfd9 | [
"Apache-2.0"
] | 5 | 2019-03-20T05:36:54.000Z | 2020-08-27T03:00:47.000Z | sa_analysis.py | CarryChang/-Customer_satisfaction_Analysis | 1d0edc9035302f826909fd462eab92e2a15dcfd9 | [
"Apache-2.0"
] | 111 | 2019-01-22T13:50:42.000Z | 2022-03-12T12:34:53.000Z | # -*- coding: utf-8 -*-
from litNlp.predict import SA_Model_Predict
import matplotlib.pyplot as plt
from setting import *
import numpy as np
import os
plt.rcParams['font.sans-serif'] = ['SimHei']
plt.rcParams['axes.unicode_minus'] = False
def topic_sa_analysis():
sa_model = SA_Model_Predict(tokenize_path, sa_model... | 34.305556 | 95 | 0.697166 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 362 | 0.267554 |
9985ca862cfcc11f8348e0629d58913ccb5353c8 | 22,570 | py | Python | codalab_competition_bundle/AutoDL_starting_kit/AutoDL_simple_baseline_models/3dcnn_pytorch/model.py | NehzUx/autodl | c80fdc4b297ed1ec2b9e6911d313f1fe31d83cb9 | [
"Apache-2.0"
] | 25 | 2018-09-26T14:07:11.000Z | 2021-12-02T15:19:08.000Z | codalab_competition_bundle/AutoDL_starting_kit/AutoDL_simple_baseline_models/3dcnn_pytorch/model.py | NehzUx/autodl | c80fdc4b297ed1ec2b9e6911d313f1fe31d83cb9 | [
"Apache-2.0"
] | 8 | 2018-11-23T15:35:28.000Z | 2020-02-27T14:55:11.000Z | codalab_competition_bundle/AutoDL_starting_kit/AutoDL_simple_baseline_models/3dcnn_pytorch/model.py | NehzUx/autodl | c80fdc4b297ed1ec2b9e6911d313f1fe31d83cb9 | [
"Apache-2.0"
] | 5 | 2019-03-05T11:05:59.000Z | 2020-01-08T13:05:35.000Z | # Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | 39.946903 | 112 | 0.667036 | 18,329 | 0.812096 | 0 | 0 | 0 | 0 | 0 | 0 | 10,049 | 0.445237 |
99870a0387d9be5139c471e0259b81bcbfb1dce0 | 1,169 | py | Python | scriptwakeup.py | mekhala1808-cmis/mekhala1808-cmis-cs2 | 9ec83d8a1f38dbfaebc03cea76ce39483b71c828 | [
"CC0-1.0"
] | null | null | null | scriptwakeup.py | mekhala1808-cmis/mekhala1808-cmis-cs2 | 9ec83d8a1f38dbfaebc03cea76ce39483b71c828 | [
"CC0-1.0"
] | null | null | null | scriptwakeup.py | mekhala1808-cmis/mekhala1808-cmis-cs2 | 9ec83d8a1f38dbfaebc03cea76ce39483b71c828 | [
"CC0-1.0"
] | null | null | null | def wakeup():
print "This program will ask you for 5 integer or float values." + "\n" + "It will calculate the average of all values from 0 inclusive to 10 exclusive." + "\n" + "It will print out whether the resulting average is even or odd."
def numbers():
n1 = float(raw_input("n0: "))
n2 = float(raw_i... | 27.186047 | 232 | 0.588537 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 417 | 0.356715 |
99879b528d7993063b417f1a859d11a6963e5268 | 1,726 | py | Python | 2.linked-list/single-linked-list/remove-nth-from-end/test.py | tienduy-nguyen/coderust | d0884d7b3ced0d01e24b210284b9370432964274 | [
"MIT"
] | null | null | null | 2.linked-list/single-linked-list/remove-nth-from-end/test.py | tienduy-nguyen/coderust | d0884d7b3ced0d01e24b210284b9370432964274 | [
"MIT"
] | null | null | null | 2.linked-list/single-linked-list/remove-nth-from-end/test.py | tienduy-nguyen/coderust | d0884d7b3ced0d01e24b210284b9370432964274 | [
"MIT"
] | null | null | null | class ListNode:
def __init__(self, val, next = None):
self.val = val
self.next = next
class LinkedList:
def __init__(self):
self.head = None
def removeNthFromEnd(self, head, n):
fast = slow = head
for _ in range(n):
if not fast:
self.printNode(head)
return hea... | 22.710526 | 73 | 0.586906 | 1,401 | 0.811703 | 0 | 0 | 0 | 0 | 0 | 0 | 154 | 0.089224 |
9988fe53a17ec55168391346f0d02850a22177c1 | 8,800 | py | Python | meiduo_mall/meiduo_mall/apps/users/views.py | Zasling/meiduo_mall33 | ec55597758d5052b311d65aee44533b001f6ddd8 | [
"MIT"
] | 1 | 2019-04-12T08:56:29.000Z | 2019-04-12T08:56:29.000Z | meiduo_mall/meiduo_mall/apps/users/views.py | Zasling/meiduo_mall33 | ec55597758d5052b311d65aee44533b001f6ddd8 | [
"MIT"
] | null | null | null | meiduo_mall/meiduo_mall/apps/users/views.py | Zasling/meiduo_mall33 | ec55597758d5052b311d65aee44533b001f6ddd8 | [
"MIT"
] | 1 | 2020-03-30T14:35:22.000Z | 2020-03-30T14:35:22.000Z | import re
from django.conf import settings
from rest_framework.views import APIView
from rest_framework.generics import CreateAPIView, RetrieveAPIView, UpdateAPIView
from random import randint
from django_redis import get_redis_connection
from rest_framework.response import Response
from rest_framework_jwt.views impor... | 30.985915 | 118 | 0.622727 | 8,694 | 0.860451 | 0 | 0 | 0 | 0 | 0 | 0 | 3,124 | 0.309184 |
998910807a84d2343e16f6a84638953322f68a97 | 425 | py | Python | socialregistration/contrib/googleapps/urls.py | zapier/django-socialregistration-with-google-apps | 65cb2d446d30f8270c6abb866480bad105518e2b | [
"MIT"
] | 1 | 2019-08-14T21:14:03.000Z | 2019-08-14T21:14:03.000Z | socialregistration/contrib/googleapps/urls.py | mpdaugherty/django-socialregistration-with-google-apps | 988c627995d48a0f861b1156401fe3e5e4c91826 | [
"MIT"
] | null | null | null | socialregistration/contrib/googleapps/urls.py | mpdaugherty/django-socialregistration-with-google-apps | 988c627995d48a0f861b1156401fe3e5e4c91826 | [
"MIT"
] | 3 | 2017-06-22T22:32:03.000Z | 2021-09-08T10:01:50.000Z | from django.conf import settings
from django.conf.urls.defaults import *
from socialregistration.contrib.googleapps.views import GoogleAppsRedirect, \
GoogleAppsSetup, GoogleAppsCallback
urlpatterns = patterns('',
url('^redirect/$', GoogleAppsRedirect.as_view(), name='redirect'),
url('^callback/$', GoogleA... | 38.636364 | 77 | 0.741176 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 65 | 0.152941 |
9989614393dfb36145666c0ee972313c9461ff34 | 73 | py | Python | firstpython.py | Renatoirp/CloudCourse | 1edd614a7179bf444b122acfebb50f6ffea5c1c2 | [
"Apache-2.0"
] | null | null | null | firstpython.py | Renatoirp/CloudCourse | 1edd614a7179bf444b122acfebb50f6ffea5c1c2 | [
"Apache-2.0"
] | null | null | null | firstpython.py | Renatoirp/CloudCourse | 1edd614a7179bf444b122acfebb50f6ffea5c1c2 | [
"Apache-2.0"
] | null | null | null | # Display output
print("New python file!")
print("Add a new print line.") | 24.333333 | 30 | 0.712329 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 57 | 0.780822 |
998cbf13c8435563780f89976a96d9d655cabb2a | 14,049 | py | Python | examples/notebooks/generating_yaml.py | wtgee/huntsman-pocs | c47976b1e52c5676a8237f6ee889555ede26d0e0 | [
"MIT"
] | null | null | null | examples/notebooks/generating_yaml.py | wtgee/huntsman-pocs | c47976b1e52c5676a8237f6ee889555ede26d0e0 | [
"MIT"
] | null | null | null | examples/notebooks/generating_yaml.py | wtgee/huntsman-pocs | c47976b1e52c5676a8237f6ee889555ede26d0e0 | [
"MIT"
] | null | null | null | import yaml
import os
import datetime
import ipywidgets as widgets
from ipywidgets import interact, interactive, fixed, interact_manual
from IPython.display import display
import sys
class POCS_devices_database(object):
"""
This class manages serial numbers and other information of multiple devices being used... | 42.702128 | 113 | 0.678838 | 10,166 | 0.72361 | 0 | 0 | 0 | 0 | 0 | 0 | 7,342 | 0.522599 |
999192f10fb8b2831dc1f5ac84ee5ab0849ed0de | 4,231 | py | Python | synapse/resources/directories-plugin/directories.py | comodit/synapse-agent | ee3c6c2ec07ba34e821529f3e097123326b8b9c5 | [
"MIT"
] | 5 | 2015-11-05T05:44:08.000Z | 2021-02-09T06:00:21.000Z | synapse/resources/directories-plugin/directories.py | comodit/synapse-agent | ee3c6c2ec07ba34e821529f3e097123326b8b9c5 | [
"MIT"
] | 2 | 2017-08-13T09:36:41.000Z | 2017-08-13T09:36:58.000Z | synapse/resources/directories-plugin/directories.py | comodit/synapse-agent | ee3c6c2ec07ba34e821529f3e097123326b8b9c5 | [
"MIT"
] | 3 | 2015-09-30T20:08:19.000Z | 2020-08-19T19:24:04.000Z | import getpass
from datetime import datetime
from synapse.resources.resources import ResourcesController
from synapse.logger import logger
from synapse.synapse_exceptions import ResourceException
@logger
class DirectoriesController(ResourcesController):
__resource__ = "directories"
def read(self, res_id=No... | 31.81203 | 74 | 0.610967 | 4,023 | 0.950839 | 0 | 0 | 4,031 | 0.95273 | 0 | 0 | 864 | 0.204207 |
9992b282a524485f8001963cb892f9c2c4eb3263 | 3,532 | py | Python | biothings/web/handlers/_flask.py | newgene/biothings.api | e3278695ac15a55fe420aa49c464946f81ec019d | [
"Apache-2.0"
] | 30 | 2017-07-23T14:50:29.000Z | 2022-02-08T08:08:16.000Z | biothings/web/handlers/_flask.py | kevinxin90/biothings.api | 8ff3bbaecd72d04db4933ff944898ee7b7c0e04a | [
"Apache-2.0"
] | 163 | 2017-10-24T18:45:40.000Z | 2022-03-28T03:46:26.000Z | biothings/web/handlers/_flask.py | newgene/biothings.api | e3278695ac15a55fe420aa49c464946f81ec019d | [
"Apache-2.0"
] | 22 | 2017-06-12T18:30:15.000Z | 2022-03-01T18:10:47.000Z | from functools import wraps
from types import CoroutineType
import flask
from biothings.web import templates
from biothings.web.options import OptionError
from biothings.web.query.pipeline import (QueryPipelineException,
QueryPipelineInterrupt)
from tornado.template import Loa... | 32.40367 | 73 | 0.615515 | 0 | 0 | 0 | 0 | 2,144 | 0.607022 | 2,326 | 0.65855 | 430 | 0.121744 |
9993702e8c8bf3d5ffb78c094fcfca64bb634489 | 633 | py | Python | app/migrations/0001_initial.py | bedwards/lyric-tycoon | da90f029c6a7dc5b375603561b8fcba5142ee35d | [
"Apache-2.0"
] | null | null | null | app/migrations/0001_initial.py | bedwards/lyric-tycoon | da90f029c6a7dc5b375603561b8fcba5142ee35d | [
"Apache-2.0"
] | null | null | null | app/migrations/0001_initial.py | bedwards/lyric-tycoon | da90f029c6a7dc5b375603561b8fcba5142ee35d | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.2.4 on 2021-06-26 20:27
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Sentence',
fields=[
('id', models.BigAutoFi... | 26.375 | 117 | 0.579779 | 540 | 0.853081 | 0 | 0 | 0 | 0 | 0 | 0 | 89 | 0.1406 |
999378e5bd86ceff2b4bb0417170acd2a54a5a27 | 1,571 | py | Python | kinko/compat_ast.py | vmagamedov/kinko | b65f8ae97bbf5d056781e90e22d2a369f440ed4c | [
"BSD-3-Clause"
] | 5 | 2015-11-18T20:31:14.000Z | 2016-05-05T07:43:21.000Z | kinko/compat_ast.py | vmagamedov/kinko | b65f8ae97bbf5d056781e90e22d2a369f440ed4c | [
"BSD-3-Clause"
] | 5 | 2016-03-17T14:42:30.000Z | 2016-06-27T13:31:26.000Z | kinko/compat_ast.py | vmagamedov/kinko | b65f8ae97bbf5d056781e90e22d2a369f440ed4c | [
"BSD-3-Clause"
] | null | null | null | import ast as _ast
from .compat import PY3, PY35
If = _ast.If
Str = _ast.Str
Num = _ast.Num
For = _ast.For
Expr = _ast.Expr
Name = _ast.Name
Load = _ast.Load
List = _ast.List
Index = _ast.Index
Store = _ast.Store
IfExp = _ast.IfExp
IsNot = _ast.IsNot
Tuple = _ast.Tuple
Module = _ast.Module
Assign = _ast.Assign
Compa... | 23.102941 | 71 | 0.665818 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
99949b7499fb18d01405577641cf1fb6c9a87917 | 258 | py | Python | tests/abs/test_product.py | powerpenguincat/practice-atcoder | 6c656d0ebe3fc12d7df50112af2ef5c946bbaf46 | [
"MIT"
] | null | null | null | tests/abs/test_product.py | powerpenguincat/practice-atcoder | 6c656d0ebe3fc12d7df50112af2ef5c946bbaf46 | [
"MIT"
] | null | null | null | tests/abs/test_product.py | powerpenguincat/practice-atcoder | 6c656d0ebe3fc12d7df50112af2ef5c946bbaf46 | [
"MIT"
] | null | null | null | import pytest
from practice_atcoder.abs.product import question
class Test(object):
@pytest.mark.parametrize("ab,expect", [
("3 4", "Even"),
("1 21", "Odd"),
])
def test(self, ab, expect):
assert question(ab) == expect
| 19.846154 | 49 | 0.593023 | 190 | 0.736434 | 0 | 0 | 166 | 0.643411 | 0 | 0 | 33 | 0.127907 |
99960f95359e6723c193ed2ed1eaac33b01b2ae2 | 1,440 | py | Python | bp_eval/bpredict/utils.py | alexf91/gem5-advanced-computer-architecture | 01fb031c0cc42410e148a26d0c3d891fb1372381 | [
"BSD-3-Clause"
] | 1 | 2020-03-25T09:35:45.000Z | 2020-03-25T09:35:45.000Z | bp_eval/bpredict/utils.py | alexf91/gem5-advanced-computer-architecture | 01fb031c0cc42410e148a26d0c3d891fb1372381 | [
"BSD-3-Clause"
] | null | null | null | bp_eval/bpredict/utils.py | alexf91/gem5-advanced-computer-architecture | 01fb031c0cc42410e148a26d0c3d891fb1372381 | [
"BSD-3-Clause"
] | null | null | null | #
# Copyright 2018 Alexander Fasching
#
# 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 3 of the License, or
# (at your option) any later version.
#
# This program is distributed ... | 31.304348 | 78 | 0.688889 | 715 | 0.496528 | 0 | 0 | 0 | 0 | 0 | 0 | 687 | 0.477083 |
9999a9338fc19b89e13fa629e1fae030c4729213 | 824 | py | Python | tasks/train-model.py | wmeints/explainable-ai | ebdec372ff3f994c157dc5c47b4a8403e5c7d006 | [
"MIT"
] | 1 | 2021-06-15T08:27:06.000Z | 2021-06-15T08:27:06.000Z | tasks/train-model.py | wmeints/explainable-ai | ebdec372ff3f994c157dc5c47b4a8403e5c7d006 | [
"MIT"
] | null | null | null | tasks/train-model.py | wmeints/explainable-ai | ebdec372ff3f994c157dc5c47b4a8403e5c7d006 | [
"MIT"
] | null | null | null | import os
from pathlib import Path
import joblib
import pandas as pd
import numpy as np
from sklearn.ensemble import RandomForestClassifier
from sklearn.model_selection import cross_validate
root_folder = Path(os.path.dirname(os.path.dirname(__file__)))
training_data = root_folder / 'data' / 'processed' / 'train.csv'... | 30.518519 | 81 | 0.769417 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 163 | 0.197816 |
999a70b638ef43d6635227758b0cf57cc97a50c7 | 152 | py | Python | src/nostradamus/utils/__init__.py | Orlogskapten/tsNostradamus | 707cbc23fac3e0f92875d89550046e5c3b7b17d2 | [
"MIT"
] | 3 | 2020-07-06T10:58:40.000Z | 2020-07-23T21:39:51.000Z | src/nostradamus/utils/__init__.py | wenceslas-sanchez/tsNostradamus | 707cbc23fac3e0f92875d89550046e5c3b7b17d2 | [
"MIT"
] | null | null | null | src/nostradamus/utils/__init__.py | wenceslas-sanchez/tsNostradamus | 707cbc23fac3e0f92875d89550046e5c3b7b17d2 | [
"MIT"
] | null | null | null | from .error import exception_type, check_method_lauched, check_is_int, \
check_is_in, check_key_is_in
from .normal_hist import compare_hist_to_norm | 38 | 72 | 0.842105 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
999a7897f8cea7a46091c8b50a7b40974c139967 | 32,457 | py | Python | networks/meta/past_grads_v2.py | annachen/dl_playground | f263dc16b4f0d91f6d33d94e678a9bbe2ace8913 | [
"MIT"
] | null | null | null | networks/meta/past_grads_v2.py | annachen/dl_playground | f263dc16b4f0d91f6d33d94e678a9bbe2ace8913 | [
"MIT"
] | null | null | null | networks/meta/past_grads_v2.py | annachen/dl_playground | f263dc16b4f0d91f6d33d94e678a9bbe2ace8913 | [
"MIT"
] | null | null | null | """Meta network using past gradients."""
import tensorflow as tf
class DualRNN(tf.keras.layers.Layer):
"""
Pretty similar to LayerCompetition, except:
1) Optionally aggregate features across batch before feeding into
the RNN. Doing this because if the RNN states were to
represent training s... | 32.23138 | 74 | 0.500909 | 32,253 | 0.993715 | 0 | 0 | 0 | 0 | 0 | 0 | 8,463 | 0.260745 |
999ac636b504000a178a19bf4c2635260e522f9b | 1,920 | py | Python | tempset/package_data.py | IMMM-SFA/tempset | 86da8415cda47a2158cc1a481b0fa8ceaf5f2e1e | [
"BSD-2-Clause"
] | null | null | null | tempset/package_data.py | IMMM-SFA/tempset | 86da8415cda47a2158cc1a481b0fa8ceaf5f2e1e | [
"BSD-2-Clause"
] | null | null | null | tempset/package_data.py | IMMM-SFA/tempset | 86da8415cda47a2158cc1a481b0fa8ceaf5f2e1e | [
"BSD-2-Clause"
] | null | null | null | import pkg_resources
def get_example_eplus_file():
"""Convenience wrapper to retrieve file path from package data."""
return pkg_resources.resource_filename('tempset', 'data/json/eplus_params.json')
def get_example_batch_file():
"""Convenience wrapper to retrieve file path from package data."""
re... | 30.967742 | 98 | 0.758854 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,024 | 0.533333 |
999b30e3b541222c64dd017084efe4cadab334f9 | 5,193 | py | Python | imessage_extractor/src/helpers/utils.py | tsouchlarakis/imessage-extractor | e77bee947e19ac3f30ffd60faf7d444ded336b3b | [
"MIT"
] | 1 | 2021-12-17T05:41:49.000Z | 2021-12-17T05:41:49.000Z | imessage_extractor/src/helpers/utils.py | tsouchlarakis/imessage-extractor | e77bee947e19ac3f30ffd60faf7d444ded336b3b | [
"MIT"
] | 2 | 2021-08-22T02:15:40.000Z | 2022-01-16T23:15:01.000Z | imessage_extractor/src/helpers/utils.py | tsouchlarakis/imessage-extractor | e77bee947e19ac3f30ffd60faf7d444ded336b3b | [
"MIT"
] | null | null | null | import os
import pathlib
import re
import typing
def fmt_seconds(time_in_sec: int, units: str='auto', round_digits: int=4) -> dict:
"""
Format time in seconds to a custom string. `units` parameter can be
one of 'auto', 'seconds', 'minutes', 'hours' or 'days'.
"""
if units == 'auto':
if tim... | 32.254658 | 98 | 0.586366 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,773 | 0.341421 |
999b7e222c07ec4e4045ccf0fbb8d6e8afb0520b | 575 | py | Python | pandapipes/component_models/abstract_models/__init__.py | ggrrll/pandapipes | 636c45bfeb05feb9f4700864070086adfd74b8cf | [
"BSD-3-Clause"
] | 48 | 2020-02-14T13:16:31.000Z | 2022-03-30T07:15:55.000Z | pandapipes/component_models/abstract_models/__init__.py | ggrrll/pandapipes | 636c45bfeb05feb9f4700864070086adfd74b8cf | [
"BSD-3-Clause"
] | 279 | 2020-02-20T13:06:56.000Z | 2022-03-14T12:29:59.000Z | pandapipes/component_models/abstract_models/__init__.py | ggrrll/pandapipes | 636c45bfeb05feb9f4700864070086adfd74b8cf | [
"BSD-3-Clause"
] | 30 | 2020-02-14T15:38:24.000Z | 2022-02-21T13:37:12.000Z | # Copyright (c) 2020-2021 by Fraunhofer Institute for Energy Economics
# and Energy System Technology (IEE), Kassel, and University of Kassel. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
from .base_component import *
from .branch_models impor... | 41.071429 | 99 | 0.803478 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 261 | 0.453913 |
999ba25c335559c3e34efe18682e396868769eb8 | 1,651 | py | Python | src/modlunky2/sprites/monsters/big.py | mriswithe/modlunky2 | 20de5c7d226df7134cf87a9b9351fc9c28a89d6a | [
"Apache-2.0"
] | null | null | null | src/modlunky2/sprites/monsters/big.py | mriswithe/modlunky2 | 20de5c7d226df7134cf87a9b9351fc9c28a89d6a | [
"Apache-2.0"
] | null | null | null | src/modlunky2/sprites/monsters/big.py | mriswithe/modlunky2 | 20de5c7d226df7134cf87a9b9351fc9c28a89d6a | [
"Apache-2.0"
] | null | null | null | from pathlib import Path
from ..base_classes.base_sprite_loader import BaseSpriteLoader
class Big1(BaseSpriteLoader):
_sprite_sheet_path = Path("Data/Textures/monstersbig01.png")
_chunk_size = 128
_chunk_map = {
"cavemanboss": (0, 0, 2, 2),
"giantspider": (0, 10, 2, 12),
"queenbee... | 25.015152 | 64 | 0.562689 | 1,544 | 0.935191 | 0 | 0 | 0 | 0 | 0 | 0 | 394 | 0.238643 |
999c1286569e2835ef7654c27f554b9341e671ee | 590 | py | Python | tools/formats parser/match_parser.py | TheUberCatman/pastebin_rust_api | 11441311ca26c9f81539ec7302ddda49528e62a0 | [
"Apache-2.0"
] | 1 | 2017-05-30T07:33:56.000Z | 2017-05-30T07:33:56.000Z | tools/formats parser/match_parser.py | Catman155/pastebin_rust_api | 11441311ca26c9f81539ec7302ddda49528e62a0 | [
"Apache-2.0"
] | 1 | 2018-03-09T19:11:38.000Z | 2018-03-09T19:11:38.000Z | tools/formats parser/match_parser.py | Catman155/pastebin_rust_api | 11441311ca26c9f81539ec7302ddda49528e62a0 | [
"Apache-2.0"
] | null | null | null | # Source of values.txt: 'https://pastebin.com/api/'
values = []
with open('values.txt', 'r') as myfile:
data = myfile.read()
data = data.split("\n")
for d in data:
result = d.split(" = ")
values.append(result[0].replace(" ", ""))
# rust_formats.txt is the list of the Enum present in src/pa... | 29.5 | 74 | 0.538983 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 213 | 0.361017 |
999c8e70e080ff7ed7117aa1db45dd0b42791638 | 2,545 | py | Python | Decrypt.py | momma-regen/P-C_Gif_Ripper | f6d4b8d84144113953abc3969544b5117adb2a12 | [
"Unlicense"
] | null | null | null | Decrypt.py | momma-regen/P-C_Gif_Ripper | f6d4b8d84144113953abc3969544b5117adb2a12 | [
"Unlicense"
] | null | null | null | Decrypt.py | momma-regen/P-C_Gif_Ripper | f6d4b8d84144113953abc3969544b5117adb2a12 | [
"Unlicense"
] | null | null | null | import regex as re
from math import ceil
from typing import List
from ByteReader import Reader, SeekOrigin as so
from DataTypes import int_32
class rpg_file:
offset: int_32 = int_32(0)
size: int_32 = int_32(0)
key: int_32 = int_32(0)
name: str
def decrypt_name(data: bytes, key: int|int_32)... | 31.036585 | 107 | 0.559528 | 121 | 0.047544 | 0 | 0 | 0 | 0 | 0 | 0 | 127 | 0.049902 |
999d5936d86373d84e9ba7d3368a0e7424c747d6 | 14,919 | py | Python | gdmtl/datasets/mtl_dataset.py | binshengliu/gdmtl | fb8bfe0e87bbd6d8535cc8449012fb4119430d4c | [
"MIT"
] | null | null | null | gdmtl/datasets/mtl_dataset.py | binshengliu/gdmtl | fb8bfe0e87bbd6d8535cc8449012fb4119430d4c | [
"MIT"
] | null | null | null | gdmtl/datasets/mtl_dataset.py | binshengliu/gdmtl | fb8bfe0e87bbd6d8535cc8449012fb4119430d4c | [
"MIT"
] | 1 | 2022-02-26T00:49:03.000Z | 2022-02-26T00:49:03.000Z | from __future__ import annotations
import logging
from typing import Any, Dict, Mapping, Optional, Union
import numpy as np
import torch
from transformers import PreTrainedTokenizer
from .assembler import Assembler
from .qa_dataset import QADataset
from .rank_dataset import RankGroupDataset
from .tsv_dataset import ... | 36.65602 | 86 | 0.597359 | 14,418 | 0.966419 | 0 | 0 | 0 | 0 | 0 | 0 | 1,522 | 0.102018 |
999e7ada6755057b2bc606106ac56df66fb8b441 | 1,446 | py | Python | MachineInterface/mproxy/server/job_status.py | KTH-HPC/vestec-system | 8168b90385468ca5e1ed701b5a0090e4423186c7 | [
"BSD-3-Clause"
] | 1 | 2021-10-31T08:41:58.000Z | 2021-10-31T08:41:58.000Z | MachineInterface/mproxy/server/job_status.py | KTH-HPC/vestec-system | 8168b90385468ca5e1ed701b5a0090e4423186c7 | [
"BSD-3-Clause"
] | null | null | null | MachineInterface/mproxy/server/job_status.py | KTH-HPC/vestec-system | 8168b90385468ca5e1ed701b5a0090e4423186c7 | [
"BSD-3-Clause"
] | 1 | 2022-02-08T16:57:05.000Z | 2022-02-08T16:57:05.000Z | import time
import datetime
from dateutil.parser import parse
class JobStatus:
def __init__(self, queue_id, status, walltime, number_nodes, submit_time, start_time, end_time):
self.queue_id=queue_id
self.status=status
self.walltime=walltime
self.number_nodes=number_nodes
sel... | 32.863636 | 132 | 0.644537 | 1,373 | 0.949516 | 0 | 0 | 0 | 0 | 0 | 0 | 69 | 0.047718 |
99a126cb801c61ecd90be2fe3d5f2ec97ac26d6d | 1,308 | py | Python | Process_Threads/mul_threading.py | CrazyBBer/Python-Learn-Sample | 3bd0694327db6c662c6cc3bdf91c6261daa4b6cf | [
"MIT"
] | 2 | 2020-05-02T11:24:37.000Z | 2020-05-02T13:49:18.000Z | Process_Threads/mul_threading.py | crazybber/pythontrip | 062ba71dfe6729ecc606eff7260b1c39497b6456 | [
"MIT"
] | null | null | null | Process_Threads/mul_threading.py | crazybber/pythontrip | 062ba71dfe6729ecc606eff7260b1c39497b6456 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding utf-8 -*-
__Author__='eamon'
'threading multithreading '
import time,threading
def loop():
print('thread %s is running ...' % threading.current_thread().name)
n=0
while n <5:
n+=1
print('thread %s >> %s ' %(threading.current_thread().name,n))
time.sleep(1)
print('threa... | 17.917808 | 68 | 0.682722 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 244 | 0.186544 |
99a1309fdf682660b44c9cdb76eca07c595e6924 | 3,024 | py | Python | tools/lcm_logger.py | GTLIDAR/drake-schunk-driver | 65230aac6a5f5f4906c5ce2aa33f5469a0800342 | [
"BSD-3-Clause"
] | 2 | 2020-02-16T02:18:38.000Z | 2020-02-16T02:18:46.000Z | tools/lcm_logger.py | GTLIDAR/drake-schunk-driver | 65230aac6a5f5f4906c5ce2aa33f5469a0800342 | [
"BSD-3-Clause"
] | 3 | 2018-04-02T20:54:23.000Z | 2019-02-08T18:34:16.000Z | tools/lcm_logger.py | GTLIDAR/drake-schunk-driver | 65230aac6a5f5f4906c5ce2aa33f5469a0800342 | [
"BSD-3-Clause"
] | 3 | 2018-04-02T20:47:17.000Z | 2021-03-19T16:08:11.000Z | #!/usr/bin/env python
import argparse
import sys
import lcm_adapter as lcm
if len(sys.argv) < 2:
print """The first argument to this command must be the directory
of the generated python files for LCM messages."""
sys.exit(1)
MESSAGE_CLASSES = lcm.get_all_lcm_message_classes(sys.argv[1])
def ... | 35.576471 | 79 | 0.627976 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 901 | 0.29795 |
99a1822f416a16569175d3648ee1cf50474498cd | 941 | py | Python | challenges/merge_sort/merge_sort.py | nastinsk/python-data-structures-and-algorithms | 505b26a70fb846f6e9d0681bbe4f77e3797acf2d | [
"MIT"
] | null | null | null | challenges/merge_sort/merge_sort.py | nastinsk/python-data-structures-and-algorithms | 505b26a70fb846f6e9d0681bbe4f77e3797acf2d | [
"MIT"
] | null | null | null | challenges/merge_sort/merge_sort.py | nastinsk/python-data-structures-and-algorithms | 505b26a70fb846f6e9d0681bbe4f77e3797acf2d | [
"MIT"
] | 3 | 2020-05-31T03:25:49.000Z | 2020-12-05T21:03:13.000Z |
def merge_sort(lst):
"""function to prvide a merge sort on the given list, calles recursively """
n = len(lst)
if n > 1:
mid = n//2
left = lst[: mid]
right = lst[mid:]
# sort the left side
merge_sort(left)
# sort the right side
merge_sort(right)
... | 18.82 | 86 | 0.4644 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 247 | 0.262487 |
99a1c1776fe99e2a906834405a696a3f2033b0ed | 572 | py | Python | e_learning/api/models.py | Aaditya1978/Accessible-E-Learning-Platform | bf846b6f7e3aaca3d7f7ecd0a83a5c4dfc595f6d | [
"MIT"
] | 3 | 2021-07-15T06:09:08.000Z | 2022-02-01T13:47:03.000Z | e_learning/api/models.py | Aaditya1978/Accessible-E-Learning-Platform | bf846b6f7e3aaca3d7f7ecd0a83a5c4dfc595f6d | [
"MIT"
] | null | null | null | e_learning/api/models.py | Aaditya1978/Accessible-E-Learning-Platform | bf846b6f7e3aaca3d7f7ecd0a83a5c4dfc595f6d | [
"MIT"
] | null | null | null | from django.db import models
# Create your models here.
class Teacher(models.Model):
first_name = models.CharField(max_length=255)
last_name = models.CharField(max_length=255)
email = models.EmailField()
org_name = models.CharField(max_length=255)
password = models.CharField(max_length=255)
class ... | 33.647059 | 49 | 0.748252 | 512 | 0.895105 | 0 | 0 | 0 | 0 | 0 | 0 | 26 | 0.045455 |
99a4c98326e7361f9a182bd46371aea1ad73b400 | 4,401 | py | Python | array_str_problems/zero_matrix.py | UPstartDeveloper/Problem_Solving_Practice | bd61333b3b056e82a94297e02bc05a17552e3496 | [
"MIT"
] | null | null | null | array_str_problems/zero_matrix.py | UPstartDeveloper/Problem_Solving_Practice | bd61333b3b056e82a94297e02bc05a17552e3496 | [
"MIT"
] | null | null | null | array_str_problems/zero_matrix.py | UPstartDeveloper/Problem_Solving_Practice | bd61333b3b056e82a94297e02bc05a17552e3496 | [
"MIT"
] | null | null | null | """
Zero Matrix:
Write an algorithm such that
if an element in an MxN matrix is 0,
its entire row and column are set to O.
Clarifying Questions and Assumptions:
- so we have a rectangular matrix? yes
- just integers? yes
- and what are the inputs to the function?
- are we given the indicies of a single elemen... | 25.736842 | 80 | 0.498523 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,423 | 0.777778 |
99a63044e63f7d7aad2a8fc043b98abc40e94cd5 | 2,316 | py | Python | arc/utility_functions/batch_generator.py | stalhabukhari/ARC | a5efc44c3af0714e07a60204cc7c3a8ca19ef20e | [
"MIT"
] | null | null | null | arc/utility_functions/batch_generator.py | stalhabukhari/ARC | a5efc44c3af0714e07a60204cc7c3a8ca19ef20e | [
"MIT"
] | null | null | null | arc/utility_functions/batch_generator.py | stalhabukhari/ARC | a5efc44c3af0714e07a60204cc7c3a8ca19ef20e | [
"MIT"
] | 1 | 2022-03-18T10:55:57.000Z | 2022-03-18T10:55:57.000Z | """
batch_generator.py
"""
import os, random
import numpy as np
from PIL import Image
import tensorflow as tf
from tensorflow.keras.preprocessing.image import img_to_array, load_img
from tensorflow.keras.utils import to_categorical as tocat_fn
Image.LOAD_TRUNCATED_IMAGES = True
class BatchGenerator(tf.keras.utils.S... | 33.085714 | 109 | 0.664076 | 2,032 | 0.877375 | 0 | 0 | 370 | 0.159758 | 0 | 0 | 117 | 0.050518 |
99a671af86b1c2e857176e3f38a594911c18081a | 337 | py | Python | setup.py | Alexander-Sovetsky/python-image | a8ea11423b453938a8804537b836d919eb8e5b93 | [
"MIT"
] | null | null | null | setup.py | Alexander-Sovetsky/python-image | a8ea11423b453938a8804537b836d919eb8e5b93 | [
"MIT"
] | null | null | null | setup.py | Alexander-Sovetsky/python-image | a8ea11423b453938a8804537b836d919eb8e5b93 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
with open('README.rst') as f:
readme = f.read()
with open('LICENSE') as f:
license = f.read()
setup(
name='python-image',
version='0.1.0',
description='project for OCT',
long_description=readme,
author='Alexander Sovetsky',
license=license,
packages=find_packages(exclude=('te... | 22.466667 | 49 | 0.738872 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 92 | 0.272997 |
99a7afbbb47204c705de2e7ed32e0ae9dbea9c39 | 62 | py | Python | hello_world.py | deepti-anand/hello-world | 494fc16c416dc8fe25600d5830052343b70f2070 | [
"Apache-2.0"
] | null | null | null | hello_world.py | deepti-anand/hello-world | 494fc16c416dc8fe25600d5830052343b70f2070 | [
"Apache-2.0"
] | null | null | null | hello_world.py | deepti-anand/hello-world | 494fc16c416dc8fe25600d5830052343b70f2070 | [
"Apache-2.0"
] | null | null | null | print("hi")
print("Hello World") #print #diff
print("hellooo") | 20.666667 | 33 | 0.693548 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 38 | 0.612903 |
99a891aedae6992a71d2251dfc4ff9348ce3d420 | 1,481 | py | Python | Examen_02_sim01/p4/p4.py | GuidoZalles/Computacion_para_Ingenieria | 2afc06784760ca07786396374397a32ac2c19a27 | [
"Apache-2.0"
] | null | null | null | Examen_02_sim01/p4/p4.py | GuidoZalles/Computacion_para_Ingenieria | 2afc06784760ca07786396374397a32ac2c19a27 | [
"Apache-2.0"
] | null | null | null | Examen_02_sim01/p4/p4.py | GuidoZalles/Computacion_para_Ingenieria | 2afc06784760ca07786396374397a32ac2c19a27 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue Feb 15 19:25:58 2022
@author: User
"""
class person:
def __init__(self, name, phone_number, email_addres, addres):
self.name = name
self.phone_number = phone_number
self.email_addres = email_addres
self.addres = addres
de... | 23.140625 | 94 | 0.602296 | 1,186 | 0.80081 | 0 | 0 | 0 | 0 | 0 | 0 | 172 | 0.116138 |
99a8aebcdbc0b31659e37d72e454787e67305614 | 663 | py | Python | names.py | EggSquishIt/mcserver | f9e98f100f7d1e4b9d4fc306ca33255619d5504f | [
"MIT"
] | 3 | 2020-08-29T13:33:30.000Z | 2020-10-03T15:40:30.000Z | names.py | EggSquishIt/mcserver | f9e98f100f7d1e4b9d4fc306ca33255619d5504f | [
"MIT"
] | 3 | 2020-10-10T17:06:19.000Z | 2020-11-14T15:21:26.000Z | names.py | EggSquishIt/mcserver | f9e98f100f7d1e4b9d4fc306ca33255619d5504f | [
"MIT"
] | 1 | 2020-10-10T13:09:27.000Z | 2020-10-10T13:09:27.000Z | import random
vowels = [
"a",
"au",
"o",
"e",
"i",
"u",
]
prefixes = [
"b",
"c",
"d",
"f",
"g",
"gh",
"h",
"k",
"l",
"m",
"n",
"p",
"qu",
"r",
"s",
"t",
"v",
"w",
"x",
"y",
"z"
]
suffixes = [
"b",
"c",
"cc",
"ck",
"d",
"dd",
"f",
"g",
"gh",
"h",
"i",
"k",
"l",
"ll",
"m",
"n... | 8.84 | 93 | 0.435897 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 174 | 0.262443 |
99a8f1f1c93af08f3ec765e04d13a2b8d33dbbbd | 84 | py | Python | hello.py | bingle2400/cs3240-labdemo | 5dca6fd8f4c510aa5b06d7dd17e5204e0cc13ffc | [
"MIT"
] | null | null | null | hello.py | bingle2400/cs3240-labdemo | 5dca6fd8f4c510aa5b06d7dd17e5204e0cc13ffc | [
"MIT"
] | null | null | null | hello.py | bingle2400/cs3240-labdemo | 5dca6fd8f4c510aa5b06d7dd17e5204e0cc13ffc | [
"MIT"
] | null | null | null |
from helper import reeting
if __name__ == "__main__":
reeting("hello")
| 9.333333 | 26 | 0.630952 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 17 | 0.202381 |
99a903a06e260b2c7198a42a0a29f263e277358e | 245 | py | Python | attempt.py | hoshen20-meet/meet2018y1lab6 | 68e70de443eba980b1de8b865eea8337aa82e6d3 | [
"MIT"
] | null | null | null | attempt.py | hoshen20-meet/meet2018y1lab6 | 68e70de443eba980b1de8b865eea8337aa82e6d3 | [
"MIT"
] | null | null | null | attempt.py | hoshen20-meet/meet2018y1lab6 | 68e70de443eba980b1de8b865eea8337aa82e6d3 | [
"MIT"
] | null | null | null | import turtle
colors = ['green','blue','orange', 'red']
turtle.speed(900)
for i in range(99999999):
turtle.pencolor(colors[i%4])
turtle.bgcolor('black')
turtle.forward(i)
turtle.degrees()
turtle.right(70)
| 13.611111 | 41 | 0.608163 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 33 | 0.134694 |
99a9c7e2da4c504b1d30c8fa7fb339aa5d8ceae5 | 4,444 | py | Python | nr_common/image_utils/image_utils_caffe.py | nitred/nr-common | f251e76fe10cb46f609583922d485013f5cba92b | [
"MIT"
] | null | null | null | nr_common/image_utils/image_utils_caffe.py | nitred/nr-common | f251e76fe10cb46f609583922d485013f5cba92b | [
"MIT"
] | 1 | 2018-01-07T19:03:35.000Z | 2018-01-07T19:03:35.000Z | nr_common/image_utils/image_utils_caffe.py | nitred/nr-common | f251e76fe10cb46f609583922d485013f5cba92b | [
"MIT"
] | 1 | 2018-09-20T02:31:18.000Z | 2018-09-20T02:31:18.000Z | """Utility functions."""
import numpy as np
def caffe_load_image(image_filename):
"""Load image using caffe.io.load_image.
This is to maintain shape expectation across the caffe library.
Args:
image_filename (str): String filename.
Returns:
numpy.ndarray: an image with the following... | 37.982906 | 103 | 0.685419 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,971 | 0.668542 |
99aa9d14b3d5ad7bbef547b6bdc0baea743dd41e | 1,183 | py | Python | ENV/lib/python3.5/site-packages/pyrogram/session/internals/msg_id.py | block1o1/CryptoPredicted | 7f660cdc456fb8252b3125028f31fd6f5a3ceea5 | [
"MIT"
] | 4 | 2021-10-14T21:22:25.000Z | 2022-03-12T19:58:48.000Z | ENV/lib/python3.5/site-packages/pyrogram/session/internals/msg_id.py | inevolin/CryptoPredicted | 7f660cdc456fb8252b3125028f31fd6f5a3ceea5 | [
"MIT"
] | null | null | null | ENV/lib/python3.5/site-packages/pyrogram/session/internals/msg_id.py | inevolin/CryptoPredicted | 7f660cdc456fb8252b3125028f31fd6f5a3ceea5 | [
"MIT"
] | 1 | 2022-03-15T22:52:53.000Z | 2022-03-15T22:52:53.000Z | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2018 Dan Tès <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free S... | 32.861111 | 74 | 0.690617 | 324 | 0.273649 | 0 | 0 | 0 | 0 | 0 | 0 | 790 | 0.66723 |
99ab42eab96ab3c16d101146330c97b44958c97a | 66 | py | Python | configs/garbage/test_lr0.1_1x.py | zhanggefan/mmdet-yolov4 | fe544b1a94c24e8abdb13bc2e4ca664854aa86a7 | [
"Apache-2.0"
] | 16 | 2021-01-21T06:52:28.000Z | 2022-03-30T09:17:16.000Z | configs/garbage/test_lr0.1_1x.py | zhanggefan/mmdet-yolov4 | fe544b1a94c24e8abdb13bc2e4ca664854aa86a7 | [
"Apache-2.0"
] | 2 | 2021-06-18T14:32:34.000Z | 2021-09-13T15:52:16.000Z | configs/garbage/test_lr0.1_1x.py | zhanggefan/mmdet-yolov4 | fe544b1a94c24e8abdb13bc2e4ca664854aa86a7 | [
"Apache-2.0"
] | 8 | 2020-12-22T21:54:10.000Z | 2022-03-30T09:17:15.000Z | _base_ = './config_base/garbage_ddp.py'
optimizer = dict(lr=0.1)
| 16.5 | 39 | 0.712121 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 30 | 0.454545 |
41d445f8f3d6e55aedb38945121914b577aa660c | 1,967 | py | Python | CNN using tensorflow.py | Highcourtdurai/Deep-learning | b9aed4f0973709ce407006311cef28a7a183787f | [
"Apache-2.0"
] | null | null | null | CNN using tensorflow.py | Highcourtdurai/Deep-learning | b9aed4f0973709ce407006311cef28a7a183787f | [
"Apache-2.0"
] | null | null | null | CNN using tensorflow.py | Highcourtdurai/Deep-learning | b9aed4f0973709ce407006311cef28a7a183787f | [
"Apache-2.0"
] | null | null | null | import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt
#Fasion mnist=data of accesories like boats,dresses,bags etc
fashion_mnist=tf.keras.datasets.fashion_mnist
(train_images,train_labels),(test_images,test_labels)=fashion_mnist.load_data()
print(train_images.shape)
print(train_lab... | 27.704225 | 142 | 0.734621 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 282 | 0.143366 |
41d44b79dc2869fa41ba2410af3f958c1f765b2a | 1,489 | py | Python | Assignment-2/visualization.py | LuciFR1809/DAA-Assignments | 0f2faaf2f545cb81da8c86bdd370646694c2c756 | [
"BSD-3-Clause"
] | null | null | null | Assignment-2/visualization.py | LuciFR1809/DAA-Assignments | 0f2faaf2f545cb81da8c86bdd370646694c2c756 | [
"BSD-3-Clause"
] | null | null | null | Assignment-2/visualization.py | LuciFR1809/DAA-Assignments | 0f2faaf2f545cb81da8c86bdd370646694c2c756 | [
"BSD-3-Clause"
] | null | null | null | ##
# @file visualization.py
# @brief Python file for visualization of the testcase.
# Contains the driver code for reading the file and plotting it.
#
# @authors Kumar Pranjal 2018A7PS0163H
# @authors Ashna Swaika 2018A7PS0027H
# @authors Abhishek Bapna 2018A7PS0184H
# @authors Ashish Verma 2018A7PS0009H
# Im... | 30.387755 | 100 | 0.584285 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 573 | 0.384822 |
41d4b3a8528e092d2bed2da155c8fbd1a073ab7d | 869 | py | Python | test/test_signal.py | dabercro/dynamo-consistency | f37dfebe781a833e9ae30869d8f57be79b4f583c | [
"MIT"
] | null | null | null | test/test_signal.py | dabercro/dynamo-consistency | f37dfebe781a833e9ae30869d8f57be79b4f583c | [
"MIT"
] | 1 | 2018-02-20T21:21:14.000Z | 2018-02-20T21:21:14.000Z | test/test_signal.py | dabercro/dynamo-consistency | f37dfebe781a833e9ae30869d8f57be79b4f583c | [
"MIT"
] | 2 | 2018-06-25T11:27:45.000Z | 2021-05-13T20:32:36.000Z | #! /usr/bin/env python
# This is to allow operators to disable a site and separately
# kill the process without un-disabling the site
import unittest
from dynamo_consistency import signaling
from dynamo_consistency import summary
from dynamo_consistency import main
from dynamo_consistency import picker
import base
... | 25.558824 | 68 | 0.728423 | 485 | 0.558113 | 0 | 0 | 0 | 0 | 0 | 0 | 155 | 0.178366 |
41d4ddc8906709d7184306ba4ee3569b358c67bc | 2,359 | py | Python | scripts/oscar_exclusive_data_format.py | codemechanic/oscar-sysex-grammar | 88b841ee7d54a859df6de9bfa5c7a4f87bae3afd | [
"MIT"
] | null | null | null | scripts/oscar_exclusive_data_format.py | codemechanic/oscar-sysex-grammar | 88b841ee7d54a859df6de9bfa5c7a4f87bae3afd | [
"MIT"
] | null | null | null | scripts/oscar_exclusive_data_format.py | codemechanic/oscar-sysex-grammar | 88b841ee7d54a859df6de9bfa5c7a4f87bae3afd | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# This script is intended to be run from within the OSCar MIDI Sysex Grammar file
# OSCar Exclusive Data Format
#
# 2 MIDI bytes contain one byte of data
# first byte contains low 4 bit nibble
# second byte contains high 4 bit nibble
#
# 0 8 16
# +-+-+-+-+-+-+-+-+ +-... | 29.123457 | 81 | 0.660449 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,053 | 0.446376 |
41d5649317c085f8985b97148521c85447459436 | 38 | py | Python | yeelight/version.py | kmohrf/python-yeelight | 483019c074556b4c3d2f665398f0fc308afd6274 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | yeelight/version.py | kmohrf/python-yeelight | 483019c074556b4c3d2f665398f0fc308afd6274 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | yeelight/version.py | kmohrf/python-yeelight | 483019c074556b4c3d2f665398f0fc308afd6274 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | # flake8: noqa
__version__ = "0.5.0"
| 9.5 | 21 | 0.631579 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 21 | 0.552632 |
41d697a0f4888c1996ea9e1ef9843309eaf50ff0 | 2,744 | py | Python | tremana/analysis/transformations.py | s-weigand/tremana | 98a8a546c79ce4f248b3955da21374edfdd61dee | [
"Apache-2.0"
] | 1 | 2022-03-07T02:52:25.000Z | 2022-03-07T02:52:25.000Z | tremana/analysis/transformations.py | s-weigand/tremana | 98a8a546c79ce4f248b3955da21374edfdd61dee | [
"Apache-2.0"
] | 9 | 2021-04-26T07:08:27.000Z | 2022-03-28T07:23:31.000Z | tremana/analysis/transformations.py | s-weigand/tremana | 98a8a546c79ce4f248b3955da21374edfdd61dee | [
"Apache-2.0"
] | null | null | null | """Transformations to be used on tremor accelerometry data (e.g.: FFT)."""
from __future__ import annotations
from typing import Iterable
import numpy as np
import pandas as pd
from scipy.signal import periodogram
def fft_spectra(
input_dataframe: pd.DataFrame,
columns: Iterable[str] | None = None,
samp... | 31.181818 | 86 | 0.662901 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,346 | 0.490525 |
41d69abf160b8ce1e4074dd51d9496b0510b87af | 12,633 | py | Python | Prod_CV_NLP_API/flask/app.py | micintron/computer_vission_OCR | 1fdd521b334f6e5958958ccf816341531b783a21 | [
"CNRI-Python"
] | 1 | 2021-02-25T09:52:46.000Z | 2021-02-25T09:52:46.000Z | Prod_CV_NLP_API/flask/app.py | micintron/computer_vission_OCR | 1fdd521b334f6e5958958ccf816341531b783a21 | [
"CNRI-Python"
] | null | null | null | Prod_CV_NLP_API/flask/app.py | micintron/computer_vission_OCR | 1fdd521b334f6e5958958ccf816341531b783a21 | [
"CNRI-Python"
] | null | null | null | """ API to grab text content from images ID's and pdf's.
Endpoints
---------
* GET /: root: shows api info to new users on run
* POST /: convert_pdf_to_image: converts a pdf doc to an image for processing
* POST /: passport: extracts target text based information from pasport
* POST /:... | 27.887417 | 181 | 0.576269 | 0 | 0 | 0 | 0 | 10,857 | 0.859416 | 0 | 0 | 5,422 | 0.429193 |
41d72f12694e72053874661915e1331274883431 | 5,540 | py | Python | py/umpire/server/service/multicast_unittest.py | arccode/factory | a1b0fccd68987d8cd9c89710adc3c04b868347ec | [
"BSD-3-Clause"
] | 3 | 2022-01-06T16:52:52.000Z | 2022-03-07T11:30:47.000Z | py/umpire/server/service/multicast_unittest.py | arccode/factory | a1b0fccd68987d8cd9c89710adc3c04b868347ec | [
"BSD-3-Clause"
] | null | null | null | py/umpire/server/service/multicast_unittest.py | arccode/factory | a1b0fccd68987d8cd9c89710adc3c04b868347ec | [
"BSD-3-Clause"
] | 1 | 2021-10-24T01:47:22.000Z | 2021-10-24T01:47:22.000Z | #!/usr/bin/env python3
#
# Copyright 2021 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import unittest
from unittest import mock
from cros.factory.umpire.server.service import multicast
from cros.factory.u... | 34.197531 | 80 | 0.687545 | 4,983 | 0.899458 | 0 | 0 | 950 | 0.17148 | 0 | 0 | 1,330 | 0.240072 |