hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | max_stars_repo_name stringlengths 4 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 251 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 251 | max_forks_repo_name stringlengths 4 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.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
44dea66fc60c0479bc3d1350dae80457f29dfb93 | 1,247 | py | Python | TicTacToe/player.py | Eberhofer/TicTacToe | 6b7c9c49a153499b4c85aa36db1d98ec4a188f2f | [
"MIT"
] | null | null | null | TicTacToe/player.py | Eberhofer/TicTacToe | 6b7c9c49a153499b4c85aa36db1d98ec4a188f2f | [
"MIT"
] | null | null | null | TicTacToe/player.py | Eberhofer/TicTacToe | 6b7c9c49a153499b4c85aa36db1d98ec4a188f2f | [
"MIT"
] | null | null | null | """
player.py - the Player class
------------------------
"""
import TicTacToe.tictactoe as tictactoe
| 24.94 | 82 | 0.567763 |
44dfe55a5cb85832bfcb50cf4224c0cc5225db56 | 4,713 | py | Python | src/pymodaq/daq_utils/parameter/pymodaq_ptypes/slide.py | LMSC-NTappy/PyMoDAQ | fb0916422f0fcb9660d804b8cb18ddf745a41ef1 | [
"MIT"
] | null | null | null | src/pymodaq/daq_utils/parameter/pymodaq_ptypes/slide.py | LMSC-NTappy/PyMoDAQ | fb0916422f0fcb9660d804b8cb18ddf745a41ef1 | [
"MIT"
] | null | null | null | src/pymodaq/daq_utils/parameter/pymodaq_ptypes/slide.py | LMSC-NTappy/PyMoDAQ | fb0916422f0fcb9660d804b8cb18ddf745a41ef1 | [
"MIT"
] | null | null | null | from qtpy import QtWidgets, QtCore
from pyqtgraph.widgets.SpinBox import SpinBox
from pyqtgraph.parametertree.parameterTypes.basetypes import WidgetParameterItem
from pymodaq.daq_utils.daq_utils import scroll_log, scroll_linear
import numpy as np
def initUI(self, *args, **kwargs):
"""
Init the ... | 35.43609 | 108 | 0.607893 |
44e0e614da875d17076dcce581257e2800b24952 | 151 | py | Python | run_es_repo_mgr.py | wjimenez5271/curator | 68c2311327dc276394aa8cc4be30296da13fe23f | [
"Apache-2.0"
] | null | null | null | run_es_repo_mgr.py | wjimenez5271/curator | 68c2311327dc276394aa8cc4be30296da13fe23f | [
"Apache-2.0"
] | null | null | null | run_es_repo_mgr.py | wjimenez5271/curator | 68c2311327dc276394aa8cc4be30296da13fe23f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""Wrapper for running es_repo_mgr from source."""
from curator.es_repo_mgr import main
if __name__ == '__main__':
main()
| 16.777778 | 50 | 0.708609 |
44e2be059e6ef1f88b34bda10a54c62868a77ea0 | 11,740 | py | Python | shapeworld/captioners/comparative_quantifier.py | shgoren/ShapeWorld | a6633bddbf195d0dc4cbdbe07564a98149337bcf | [
"MIT"
] | 1 | 2021-04-08T16:14:25.000Z | 2021-04-08T16:14:25.000Z | shapeworld/captioners/comparative_quantifier.py | shgoren/ShapeWorld | a6633bddbf195d0dc4cbdbe07564a98149337bcf | [
"MIT"
] | null | null | null | shapeworld/captioners/comparative_quantifier.py | shgoren/ShapeWorld | a6633bddbf195d0dc4cbdbe07564a98149337bcf | [
"MIT"
] | 1 | 2021-02-23T17:10:46.000Z | 2021-02-23T17:10:46.000Z | from random import choice
from shapeworld import util
from shapeworld.captions import ComparativeQuantifier
from shapeworld.captioners import WorldCaptioner
| 55.117371 | 289 | 0.739523 |
44e32735f8a27f27f94b6e9b157e83a3efe9a0ed | 1,874 | py | Python | qcloudsdkapigateway/RunApiRequest.py | f3n9/qcloudcli | b965a4f0e6cdd79c1245c1d0cd2ca9c460a56f19 | [
"Apache-2.0"
] | null | null | null | qcloudsdkapigateway/RunApiRequest.py | f3n9/qcloudcli | b965a4f0e6cdd79c1245c1d0cd2ca9c460a56f19 | [
"Apache-2.0"
] | null | null | null | qcloudsdkapigateway/RunApiRequest.py | f3n9/qcloudcli | b965a4f0e6cdd79c1245c1d0cd2ca9c460a56f19 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from qcloudsdkcore.request import Request
| 29.28125 | 79 | 0.6873 |
44e3de96d18021f8c3b9a4c81b76aeddcd2ffcd2 | 670 | py | Python | gitviper/gitconnector.py | BeayemX/GitViper | 1d6bb8f070d47868e687d879aa30e572ec6cb876 | [
"MIT"
] | 41 | 2017-11-30T19:38:18.000Z | 2021-04-06T21:39:00.000Z | gitviper/gitconnector.py | BeayemX/GitViper | 1d6bb8f070d47868e687d879aa30e572ec6cb876 | [
"MIT"
] | 24 | 2017-11-21T22:56:45.000Z | 2020-11-03T20:16:11.000Z | gitviper/gitconnector.py | BeayemX/GitViper | 1d6bb8f070d47868e687d879aa30e572ec6cb876 | [
"MIT"
] | 6 | 2017-12-13T13:38:48.000Z | 2022-01-05T19:27:01.000Z | import os
from git import InvalidGitRepositoryError, Repo
from gitviper.colors import *
connection = Connection() | 29.130435 | 86 | 0.701493 |
44e7d70e593b39a0b1ada7134396318656908dab | 663 | py | Python | solutions/solved008.py | pedraodeveloper66/Najma | f95cf99ac9ef313ba51be35ab5abb6865e7d4efc | [
"MIT"
] | null | null | null | solutions/solved008.py | pedraodeveloper66/Najma | f95cf99ac9ef313ba51be35ab5abb6865e7d4efc | [
"MIT"
] | null | null | null | solutions/solved008.py | pedraodeveloper66/Najma | f95cf99ac9ef313ba51be35ab5abb6865e7d4efc | [
"MIT"
] | null | null | null | """
Write a program that reads a value in meters and displays it converted to centimeters and millimeters
"""
m = float(input('Uma distncia em metros: '))
"""Kilometre --> Divide the length value by 1000"""
km = m / 1000
"""Hectometre --> Divide the length value by 100"""
hm = m / 100
"""Decametre --> Divide the lengt... | 33.15 | 110 | 0.651584 |
44e8a21225598c7a4afeabb2f93252ea8a7017b6 | 6,434 | py | Python | model-optimizer/mo/front/common/partial_infer/slice.py | mypopydev/dldt | 8cd639116b261adbbc8db860c09807c3be2cc2ca | [
"Apache-2.0"
] | 3 | 2019-07-08T09:03:03.000Z | 2020-09-09T10:34:17.000Z | model-optimizer/mo/front/common/partial_infer/slice.py | openvino-pushbot/dldt | e607ee70212797cf9ca51dac5b7ac79f66a1c73f | [
"Apache-2.0"
] | 3 | 2020-11-13T18:59:18.000Z | 2022-02-10T02:14:53.000Z | model-optimizer/mo/front/common/partial_infer/slice.py | openvino-pushbot/dldt | e607ee70212797cf9ca51dac5b7ac79f66a1c73f | [
"Apache-2.0"
] | 1 | 2018-12-14T07:56:02.000Z | 2018-12-14T07:56:02.000Z | """
Copyright (c) 2018 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... | 35.15847 | 128 | 0.647809 |
44e8cbc125193eef58541a928b99a8bded87c088 | 991 | py | Python | HackerServer/core/file_folder_download.py | FrancescoLucarini/BackdoorPy | e2033414c3f1f0424865c38b7b902dfae7101a91 | [
"MIT"
] | 3 | 2020-10-24T20:51:38.000Z | 2020-11-20T11:23:41.000Z | HackerServer/core/file_folder_download.py | FrancescoLucarini/BackdoorPy | e2033414c3f1f0424865c38b7b902dfae7101a91 | [
"MIT"
] | null | null | null | HackerServer/core/file_folder_download.py | FrancescoLucarini/BackdoorPy | e2033414c3f1f0424865c38b7b902dfae7101a91 | [
"MIT"
] | 1 | 2020-11-07T06:02:51.000Z | 2020-11-07T06:02:51.000Z | import json
CHUNK_SIZE = 1024
DELIMETER = "<END_OF_RESULTS>"
| 27.527778 | 54 | 0.578204 |
44e9badb7bdc84dfb95489e197ea6c60b8ed0693 | 747 | py | Python | web_flask/10-hbnb_filters.py | devephy/AirBnB_clone_v2 | b9f0ba65d76f730c0b2ef98b10764424af426570 | [
"Apache-2.0"
] | null | null | null | web_flask/10-hbnb_filters.py | devephy/AirBnB_clone_v2 | b9f0ba65d76f730c0b2ef98b10764424af426570 | [
"Apache-2.0"
] | null | null | null | web_flask/10-hbnb_filters.py | devephy/AirBnB_clone_v2 | b9f0ba65d76f730c0b2ef98b10764424af426570 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
"""Starts a Flask web application.
The application listens on 0.0.0.0, port 5000.
Routes:
/hbnb_filters: HBnB HTML filters page.
"""
from models import storage
from flask import Flask
from flask import render_template
app = Flask(__name__)
if __name__ == "__main__":
app.run(host="0.0.0.0... | 24.096774 | 62 | 0.692102 |
44ec6f3cceb1ace1b2272eb8628b292ba0675bd0 | 746 | py | Python | setup.py | mudox/pytav | 4124628c45ffd3fc35913d781278eb349d9c8559 | [
"MIT"
] | null | null | null | setup.py | mudox/pytav | 4124628c45ffd3fc35913d781278eb349d9c8559 | [
"MIT"
] | null | null | null | setup.py | mudox/pytav | 4124628c45ffd3fc35913d781278eb349d9c8559 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""setup.py: setuptools control."""
import re
from setuptools import find_packages, setup
version = re.search(r"^__version__\s*=\s*'(.*)'",
open('src/tav/cmd.py').read(), re.M).group(1)
setup(
name='tav',
version=version,
description='TBD',
long_descriptio... | 21.941176 | 65 | 0.55496 |
44ed2bdb7c420727d49fa8eed01fb9e65b32418e | 393 | py | Python | satchless/contrib/delivery/simplepost/forms.py | cajun-code/satchless | 068b26046c3af63268f8eecd6e33da2bbb78b8d1 | [
"BSD-4-Clause"
] | 1 | 2015-11-05T05:09:27.000Z | 2015-11-05T05:09:27.000Z | satchless/contrib/delivery/simplepost/forms.py | cajun-code/satchless | 068b26046c3af63268f8eecd6e33da2bbb78b8d1 | [
"BSD-4-Clause"
] | null | null | null | satchless/contrib/delivery/simplepost/forms.py | cajun-code/satchless | 068b26046c3af63268f8eecd6e33da2bbb78b8d1 | [
"BSD-4-Clause"
] | null | null | null | from django import forms
from . import models
| 32.75 | 72 | 0.70229 |
44ee8d046f3e5409524938edce9286a7316641a6 | 7,806 | py | Python | app/Http/python/DNVGLRPF103/DNVGLRPF103.py | asavadorndeja/sttools | 97154c20abfc9181420de82585af9a44b2e7f50a | [
"MIT"
] | null | null | null | app/Http/python/DNVGLRPF103/DNVGLRPF103.py | asavadorndeja/sttools | 97154c20abfc9181420de82585af9a44b2e7f50a | [
"MIT"
] | null | null | null | app/Http/python/DNVGLRPF103/DNVGLRPF103.py | asavadorndeja/sttools | 97154c20abfc9181420de82585af9a44b2e7f50a | [
"MIT"
] | null | null | null | #!/usr/bin/python;
import sys
import ast
import json
import math as m
import numpy as np
# from scipy.interpolate import interp1d
# from scipy.optimize import fsolve
# Version Controller
sTitle = 'DNVGL RP F103 Cathodic protection of submarine pipelines'
sVersion = 'Version 1.0.0'
# Define constants
pi = m.pi
e = m.... | 29.908046 | 144 | 0.592877 |
44eeb6a3678576eec5de5e12470d1e6f8be25d51 | 4,570 | py | Python | src/iOS/toga_iOS/dialogs.py | samschott/toga | 400b6935c4689bedb134324b38eb1286af5b5ec6 | [
"BSD-3-Clause"
] | null | null | null | src/iOS/toga_iOS/dialogs.py | samschott/toga | 400b6935c4689bedb134324b38eb1286af5b5ec6 | [
"BSD-3-Clause"
] | null | null | null | src/iOS/toga_iOS/dialogs.py | samschott/toga | 400b6935c4689bedb134324b38eb1286af5b5ec6 | [
"BSD-3-Clause"
] | null | null | null | import asyncio
from rubicon.objc import Block
from rubicon.objc.runtime import objc_id
from toga_iOS.libs import (
UIAlertAction,
UIAlertActionStyle,
UIAlertController,
UIAlertControllerStyle,
)
| 27.69697 | 87 | 0.647046 |
44f1ee779a726fff67d92e5ac579e362f94992a0 | 986 | py | Python | djangae/models.py | bocribbz/djangae | 8a118d755cd707e6a452593050c25d790edde944 | [
"BSD-3-Clause"
] | 467 | 2015-01-02T22:35:37.000Z | 2022-02-22T23:13:36.000Z | djangae/models.py | bocribbz/djangae | 8a118d755cd707e6a452593050c25d790edde944 | [
"BSD-3-Clause"
] | 743 | 2015-01-02T15:55:34.000Z | 2021-01-29T09:43:19.000Z | djangae/models.py | bocribbz/djangae | 8a118d755cd707e6a452593050c25d790edde944 | [
"BSD-3-Clause"
] | 154 | 2015-01-01T17:05:59.000Z | 2021-12-09T06:40:07.000Z | from django.db import models
from djangae import patches # noqa
| 26.648649 | 73 | 0.679513 |
44f347e38e371ebb53e0758c63f468672437e9d6 | 694 | py | Python | setup.py | WillBux/Darwin | 7226237283bebff058840dc22132164187d6a1b6 | [
"MIT"
] | 1 | 2018-06-02T20:46:34.000Z | 2018-06-02T20:46:34.000Z | setup.py | WillBux/darwin | 7226237283bebff058840dc22132164187d6a1b6 | [
"MIT"
] | null | null | null | setup.py | WillBux/darwin | 7226237283bebff058840dc22132164187d6a1b6 | [
"MIT"
] | null | null | null | from setuptools import setup
from setuptools import find_packages
setup(name='darwin',
version='0.1',
description='Machine Learning with Genetic Algorithms',
author='Will Buxton',
author_email='will.buxton88@gmail.com',
url='https://github.com/WillBux/darwin',
license='MIT',
i... | 36.526316 | 61 | 0.560519 |
44f4455f7b1c431872869b5254723282ae1ed661 | 352 | py | Python | driver.py | sreedom/rabbit-pipeline | 0de713832b5fe89622d8b04509dc52a09ed4fc0c | [
"MIT"
] | 3 | 2017-04-03T07:41:25.000Z | 2022-02-09T18:53:46.000Z | driver.py | sreedom/rabbit-pipeline | 0de713832b5fe89622d8b04509dc52a09ed4fc0c | [
"MIT"
] | null | null | null | driver.py | sreedom/rabbit-pipeline | 0de713832b5fe89622d8b04509dc52a09ed4fc0c | [
"MIT"
] | 1 | 2022-02-09T18:53:39.000Z | 2022-02-09T18:53:39.000Z | ### fake driver
from pipeline import Pipeline
from components import C1, C2, C3
# TODO ^^ or should we use a registry ?
#http://en.wikipedia.org/wiki/Newick_format
# representing pipeline of format C1-C2-C4
# |- C3
pipeline = 'C1(C2(C4),C3)'
leadgen_pipeline = Pipeline.from_newick(p... | 23.466667 | 49 | 0.673295 |
44f5fa06e0bd20009378ab273245e48dc740e428 | 2,796 | py | Python | util/box_ops.py | huaxiangwangman/detr_paddle | d8cae97b7dfb7e579ae2ad83ffdf9ff93064887a | [
"Apache-2.0"
] | null | null | null | util/box_ops.py | huaxiangwangman/detr_paddle | d8cae97b7dfb7e579ae2ad83ffdf9ff93064887a | [
"Apache-2.0"
] | null | null | null | util/box_ops.py | huaxiangwangman/detr_paddle | d8cae97b7dfb7e579ae2ad83ffdf9ff93064887a | [
"Apache-2.0"
] | null | null | null | """
Utilities for bounding box manipulation and GIoU.
"""
from x2paddle import torch2paddle
import paddle
def box_area(boxes):
"""
Computes the area of a set of bounding boxes, which are specified by its
(x1, y1, x2, y2) coordinates.
Arguments:
boxes (Tensor[N, 4]): boxes for which the area w... | 31.772727 | 110 | 0.589413 |
44f7afed3730afc1fbd4053ddfdf2712ac134eff | 854 | py | Python | cogs/nijiru__.py | disneyresidents/Satsuki | 7fbf6fd83dac8507c9e16aa266edce5a55684b9e | [
"MIT"
] | null | null | null | cogs/nijiru__.py | disneyresidents/Satsuki | 7fbf6fd83dac8507c9e16aa266edce5a55684b9e | [
"MIT"
] | null | null | null | cogs/nijiru__.py | disneyresidents/Satsuki | 7fbf6fd83dac8507c9e16aa266edce5a55684b9e | [
"MIT"
] | null | null | null | # !/usr/bin/env python3
# -*- coding: utf-8 -*-
import re
import typing
import discord
from discord.ext import commands
import libs as lib
| 24.4 | 97 | 0.607728 |
44f8ff613581e08c9d61e13813bd3a5ae8696677 | 2,604 | py | Python | game/tichu/logginginit.py | lukaspestalozzi/Master_Semester_Project | 4e71d4034ae3f5e7efa0864b48c6fd4d876fef4e | [
"MIT"
] | null | null | null | game/tichu/logginginit.py | lukaspestalozzi/Master_Semester_Project | 4e71d4034ae3f5e7efa0864b48c6fd4d876fef4e | [
"MIT"
] | null | null | null | game/tichu/logginginit.py | lukaspestalozzi/Master_Semester_Project | 4e71d4034ae3f5e7efa0864b48c6fd4d876fef4e | [
"MIT"
] | null | null | null | import logging
import os
import errno
def initialize_logger(output_dir, console_log_level, info_log="info.log", warn_err_log="warn_error.log", all_log="all.log", verbose=True):
"""
:param output_dir:
:param console_log_level:
:param logsname: The logs go into a folder with this name, if it is ... | 35.189189 | 138 | 0.655914 |
44fb074facae8e280e24de2efae0808bc71df974 | 2,177 | py | Python | src/yarf/restfullogger.py | akraino-edge-stack/ta-yarf | 51e80b41a9ba507b2e877f93ea3037e92ee3f78e | [
"Apache-2.0"
] | null | null | null | src/yarf/restfullogger.py | akraino-edge-stack/ta-yarf | 51e80b41a9ba507b2e877f93ea3037e92ee3f78e | [
"Apache-2.0"
] | null | null | null | src/yarf/restfullogger.py | akraino-edge-stack/ta-yarf | 51e80b41a9ba507b2e877f93ea3037e92ee3f78e | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Nokia
#
# 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, softwa... | 32.014706 | 95 | 0.691318 |
44fbb09ecd4d35c00bd7d053afb1259f54c4cf61 | 8,815 | py | Python | can2mqtt.py | fablab-ka/labnet-can2mqtt | 0093bfb5f2fa6134fd5390ca5b00de11de6f26b4 | [
"MIT"
] | 2 | 2018-02-24T22:26:16.000Z | 2018-05-08T14:28:53.000Z | can2mqtt.py | fablab-ka/labnet-can2mqtt | 0093bfb5f2fa6134fd5390ca5b00de11de6f26b4 | [
"MIT"
] | 1 | 2018-07-11T15:13:13.000Z | 2018-07-12T10:36:58.000Z | can2mqtt.py | fablab-ka/labnet-can2mqtt | 0093bfb5f2fa6134fd5390ca5b00de11de6f26b4 | [
"MIT"
] | null | null | null | import sys
import can
import logging
import struct
import re
import paho.mqtt.client as mqtt
from binascii import unhexlify, hexlify
from flask import Flask, render_template, send_from_directory
from werkzeug.serving import run_simple
from logging.handlers import TimedRotatingFileHandler
from config import Config
htt... | 33.264151 | 120 | 0.633125 |
44fdad929b2fa7eaaff7f8b5b89aff78cd989c49 | 33 | py | Python | odoo-13.0/venv/lib/python3.8/site-packages/PngImagePlugin.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | 3 | 2015-11-20T08:44:42.000Z | 2016-12-14T01:40:03.000Z | odoo-13.0/venv/lib/python3.8/site-packages/PngImagePlugin.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | 1 | 2017-09-04T14:04:32.000Z | 2020-05-26T19:04:00.000Z | odoo-13.0/venv/lib/python3.8/site-packages/PngImagePlugin.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | null | null | null | from PIL.PngImagePlugin import *
| 16.5 | 32 | 0.818182 |
44ff8250e602c081731b500fd7f016a2d72f7ce9 | 68 | py | Python | main.py | AnEnigmaticBug/Connect-3 | 479c5a9cfda182f1959395594ce9c6d2e1f17d24 | [
"MIT"
] | null | null | null | main.py | AnEnigmaticBug/Connect-3 | 479c5a9cfda182f1959395594ce9c6d2e1f17d24 | [
"MIT"
] | null | null | null | main.py | AnEnigmaticBug/Connect-3 | 479c5a9cfda182f1959395594ce9c6d2e1f17d24 | [
"MIT"
] | null | null | null | # NISHANT MAHAJAN
# 2017A7PS0112P
from gui import Gui
Gui().loop() | 11.333333 | 19 | 0.735294 |
44ff99f1966cb25def6a935cc8e8d094b45ac74a | 1,276 | py | Python | tests/common/test_io.py | astrojuanlu/conda | badf048f5e8287250ef1940249a048f9bde08477 | [
"BSD-3-Clause"
] | 1 | 2017-06-11T01:32:33.000Z | 2017-06-11T01:32:33.000Z | tests/common/test_io.py | astrojuanlu/conda | badf048f5e8287250ef1940249a048f9bde08477 | [
"BSD-3-Clause"
] | null | null | null | tests/common/test_io.py | astrojuanlu/conda | badf048f5e8287250ef1940249a048f9bde08477 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
from conda.common.io import attach_stderr_handler, captured
from logging import DEBUG, NOTSET, WARN, getLogger
| 28.355556 | 82 | 0.679467 |
7802053efdae23497157f93ea471e224e23e4acd | 1,805 | py | Python | src/utils/boxes.py | Penchekrak/Distilling-Object-Detectors | c946db9aa933b28cf30c0505ae94b2c2454a108f | [
"MIT"
] | null | null | null | src/utils/boxes.py | Penchekrak/Distilling-Object-Detectors | c946db9aa933b28cf30c0505ae94b2c2454a108f | [
"MIT"
] | null | null | null | src/utils/boxes.py | Penchekrak/Distilling-Object-Detectors | c946db9aa933b28cf30c0505ae94b2c2454a108f | [
"MIT"
] | null | null | null | from typing import Optional, Tuple
import torch
from torch import Tensor
def is_valid_box(
bounding_box: Tensor,
image_shape: Optional[Tuple[int, int]] = None
) -> bool:
"""
:param bounding_box: tensor [N, 4] of bounding box parameters in the form
[x-coordinate of top left corner, y-coord... | 39.23913 | 87 | 0.711911 |
7802f742be27a766b4db20255b494ac4739dd458 | 1,588 | py | Python | components/collector/src/base_collectors/api_source_collector.py | kargaranamir/quality-time | 1c427c61bee9d31c3526f0a01be2218a7e167c23 | [
"Apache-2.0"
] | 33 | 2016-01-20T07:35:48.000Z | 2022-03-14T09:20:51.000Z | components/collector/src/base_collectors/api_source_collector.py | kargaranamir/quality-time | 1c427c61bee9d31c3526f0a01be2218a7e167c23 | [
"Apache-2.0"
] | 2,410 | 2016-01-22T18:13:01.000Z | 2022-03-31T16:57:34.000Z | components/collector/src/base_collectors/api_source_collector.py | kargaranamir/quality-time | 1c427c61bee9d31c3526f0a01be2218a7e167c23 | [
"Apache-2.0"
] | 21 | 2016-01-16T11:49:23.000Z | 2022-01-14T21:53:22.000Z | """API source collector base classes."""
from abc import ABC
from datetime import datetime
from collector_utilities.type import URL, Response
from model import SourceResponses
from .source_collector import SourceCollector, SourceUpToDatenessCollector
| 41.789474 | 111 | 0.714106 |
780313de75fc00d4f5391b1ff32f2f375e9a38d1 | 3,437 | py | Python | examples/hex_grid_imperfect.py | shab-bahmanyar/penkit | 303c259c762c162935043c808eeb23465c303596 | [
"MIT"
] | null | null | null | examples/hex_grid_imperfect.py | shab-bahmanyar/penkit | 303c259c762c162935043c808eeb23465c303596 | [
"MIT"
] | null | null | null | examples/hex_grid_imperfect.py | shab-bahmanyar/penkit | 303c259c762c162935043c808eeb23465c303596 | [
"MIT"
] | null | null | null | import numpy as np
from penkit import shapes
from penkit.write import write_plot
from penkit.textures.util import rotate_texture, fit_texture
texture = hex_grid_imperfect(80)
texture = fit_texture(texture)
texture = (
0.5 * texture[0],
0.5 * texture[1]
)
# rotate the texture
#texture = rotate_texture(texture... | 30.963964 | 89 | 0.588304 |
78058d9a03c25bbf515a5715dceedd4dbeaf3097 | 4,520 | py | Python | classify.py | grzegorzludwa/brexit_notes_classifier | 8e6393cf2e3e94464130e7751e0cbdf1291290d9 | [
"MIT"
] | 1 | 2021-01-17T23:31:47.000Z | 2021-01-17T23:31:47.000Z | classify.py | grzegorzludwa/brexit_notes_classifier | 8e6393cf2e3e94464130e7751e0cbdf1291290d9 | [
"MIT"
] | null | null | null | classify.py | grzegorzludwa/brexit_notes_classifier | 8e6393cf2e3e94464130e7751e0cbdf1291290d9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import argparse
import sys
import csv
import pickle
from common import (
read_comments,
read_comments_csv,
cv_score,
text_preprocess,
print_scores,
)
from nltk.corpus import stopwords
from sklearn.svm import LinearSVC
from sklearn.feature_selection import SelectKBest
from s... | 27.730061 | 133 | 0.675885 |
7805c17dbeeb314c7b1977e48572277cc85c276c | 568 | py | Python | Curso_em_Video_py3/ex115.py | Rodrigo98Matos/Projetos_py | 6428e2c09d28fd8a717743f4434bc788e7d7d3cc | [
"MIT"
] | 1 | 2021-05-11T12:39:43.000Z | 2021-05-11T12:39:43.000Z | Curso_em_Video_py3/ex115.py | Rodrigo98Matos/Projetos_py | 6428e2c09d28fd8a717743f4434bc788e7d7d3cc | [
"MIT"
] | null | null | null | Curso_em_Video_py3/ex115.py | Rodrigo98Matos/Projetos_py | 6428e2c09d28fd8a717743f4434bc788e7d7d3cc | [
"MIT"
] | null | null | null | from utilidadesCeV.txt import *
from utilidadesCeV.dado import leiaint
if not arquivoexiste():
criararquivo()
cabealho("SISTEMA DE ARQUIVAMENTO v1.0",cor='\033[32m')
while True:
p = menu('ENCERRAR CADASTRAR LISTAR'.split())
if p == 0:
break
elif p == 1:
cabealho('NOVO CADASTRO')
... | 25.818182 | 56 | 0.575704 |
780641fe84d0169d12334b7923a0d4f40a7fefb7 | 676 | py | Python | bash/cleanup.py | LaudateCorpus1/Aruba-FlaskwithNetworking | 9af1e626e782ed38d1d58858edaece88e1f76208 | [
"MIT"
] | null | null | null | bash/cleanup.py | LaudateCorpus1/Aruba-FlaskwithNetworking | 9af1e626e782ed38d1d58858edaece88e1f76208 | [
"MIT"
] | null | null | null | bash/cleanup.py | LaudateCorpus1/Aruba-FlaskwithNetworking | 9af1e626e782ed38d1d58858edaece88e1f76208 | [
"MIT"
] | null | null | null | # (C) Copyright 2021 Hewlett Packard Enterprise Development LP.
#!/usr/bin/python3
import schedule
from datetime import date, datetime, time, timedelta
import time
from cleanupclasses import cleanupTrackers as cleanupTrackers
from cleanupclasses import cleanupafcAudit as cleanupafcAudit
from cleanupclasses imp... | 33.8 | 66 | 0.807692 |
780711d65aaf7ad757cd312974c9dcd270340af5 | 6,019 | py | Python | aws-blog-campanile/bin/objectcopy.py | securityscorecard/aws-big-data-blog | 6c726f60c293f26de57469b9332f92a3807423c5 | [
"Apache-2.0"
] | 305 | 2018-03-29T10:45:51.000Z | 2022-03-15T16:01:19.000Z | aws-blog-campanile/bin/objectcopy.py | securityscorecard/aws-big-data-blog | 6c726f60c293f26de57469b9332f92a3807423c5 | [
"Apache-2.0"
] | 14 | 2018-04-26T19:06:35.000Z | 2022-02-26T10:50:19.000Z | aws-blog-campanile/bin/objectcopy.py | securityscorecard/aws-big-data-blog | 6c726f60c293f26de57469b9332f92a3807423c5 | [
"Apache-2.0"
] | 204 | 2018-03-26T23:43:30.000Z | 2022-03-20T17:04:41.000Z | #!/usr/bin/python2.7
import sys
import os
import fileinput
import argparse
import random
import tempfile
import ConfigParser
# -----------------------------------------------------------------------------
# Support for Hadoop Streaming Sandbox Env
# -------------------------------------------------------------------... | 38.583333 | 79 | 0.511879 |
780711f5190fe23f4cc82e4683572144506a8e15 | 2,435 | py | Python | external/AnniesLasso/getting_started.py | dnidever/apogee | 83ad7496a0b4193df9e2c01b06dc36cb879ea6c1 | [
"BSD-3-Clause"
] | 8 | 2016-04-21T01:04:32.000Z | 2022-01-14T19:41:40.000Z | external/AnniesLasso/getting_started.py | dnidever/apogee | 83ad7496a0b4193df9e2c01b06dc36cb879ea6c1 | [
"BSD-3-Clause"
] | 78 | 2015-11-29T16:47:54.000Z | 2021-05-12T12:23:21.000Z | external/AnniesLasso/getting_started.py | dnidever/apogee | 83ad7496a0b4193df9e2c01b06dc36cb879ea6c1 | [
"BSD-3-Clause"
] | 9 | 2016-09-23T16:14:21.000Z | 2021-09-26T07:15:36.000Z |
"""
Getting started with The Cannon and APOGEE
"""
import os
import numpy as np
from astropy.table import Table
import AnniesLasso as tc
# Load in the data.
PATH, CATALOG, FILE_FORMAT = ("/Users/arc/research/apogee/", "apogee-rg.fits",
"apogee-rg-custom-normalization-{}.memmap")
labelled_set = Table.read(os.pa... | 31.217949 | 78 | 0.717043 |
7807b67fc9e1a257804a4e1a3d4c94bb067795b4 | 3,335 | py | Python | b2ac/fit/double.py | hbldh/ellipse-fitting | 77a13ab29ae44b32238e754bff1d2cc6e20883dd | [
"MIT"
] | 16 | 2016-02-16T18:55:18.000Z | 2021-12-15T20:07:45.000Z | b2ac/fit/double.py | hbldh/ellipse-fitting | 77a13ab29ae44b32238e754bff1d2cc6e20883dd | [
"MIT"
] | 6 | 2015-10-18T22:28:20.000Z | 2016-05-17T22:07:38.000Z | b2ac/fit/double.py | hbldh/ellipse-fitting | 77a13ab29ae44b32238e754bff1d2cc6e20883dd | [
"MIT"
] | 7 | 2016-05-15T16:21:19.000Z | 2021-09-09T11:12:39.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
:mod:`fit`
==================
.. module:: fit
:synopsis:
.. moduleauthor:: hbldh <henrik.blidh@swedwise.com>
Created on 2015-09-24, 07:18:22
"""
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from _... | 28.75 | 93 | 0.648276 |
7807baf056670dd578e2ed8eb9ec36d9c71dac2c | 43 | py | Python | Contest/ABC068/a/main.py | mpses/AtCoder | 9c101fcc0a1394754fcf2385af54b05c30a5ae2a | [
"CC0-1.0"
] | null | null | null | Contest/ABC068/a/main.py | mpses/AtCoder | 9c101fcc0a1394754fcf2385af54b05c30a5ae2a | [
"CC0-1.0"
] | null | null | null | Contest/ABC068/a/main.py | mpses/AtCoder | 9c101fcc0a1394754fcf2385af54b05c30a5ae2a | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python3
print("ABC"+input()) | 21.5 | 22 | 0.674419 |
7808ad8397d4674b401ea41b6d56309f1d459483 | 3,887 | py | Python | katacomb/katacomb/obit_context.py | ska-sa/katsdpcontim | bac06940acf766029cdf770d95c8b38ec4680cce | [
"BSD-3-Clause"
] | 3 | 2021-03-31T07:06:37.000Z | 2022-01-05T14:13:10.000Z | katacomb/katacomb/obit_context.py | ska-sa/katsdpcontim | bac06940acf766029cdf770d95c8b38ec4680cce | [
"BSD-3-Clause"
] | 15 | 2019-11-12T09:27:52.000Z | 2021-10-14T16:44:45.000Z | katacomb/katacomb/obit_context.py | ska-sa/katsdpcontim | bac06940acf766029cdf770d95c8b38ec4680cce | [
"BSD-3-Clause"
] | null | null | null | import logging
from contextlib import contextmanager
import AIPS
import AIPSDir
import ObitTalkUtil
import OErr
import OSystem
import katacomb.configuration as kc
log = logging.getLogger('katacomb')
# Single obit context class
__obit_context = None
def handle_obit_err(msg="", err=None):
"""
If the Obi... | 26.442177 | 98 | 0.581168 |
780a68b29119d46c377be1da43a843e4efdc7887 | 1,251 | py | Python | Exercises/Week4/pexpect_tests.py | netkidd/py-ne | d609b4feeb98deed3d6b5216e73cab2883232693 | [
"Apache-2.0"
] | null | null | null | Exercises/Week4/pexpect_tests.py | netkidd/py-ne | d609b4feeb98deed3d6b5216e73cab2883232693 | [
"Apache-2.0"
] | null | null | null | Exercises/Week4/pexpect_tests.py | netkidd/py-ne | d609b4feeb98deed3d6b5216e73cab2883232693 | [
"Apache-2.0"
] | null | null | null |
import pexpect
from getpass import getpass
'''
3. Use Pexpect to retrieve the output of 'show ip int brief' from pynet-rtr2.
4. Use PExpect to change the logging buffer size (logging buffered <size>) on pynet-rtr2. Verify this change by examining the output of 'show run'.
'''
rtr2_ip = '184.105.247.71'
rtr2_usernam... | 24.057692 | 147 | 0.697842 |
780b542f720112fd50e4308fda987d84f19b0059 | 987 | py | Python | smart_open/tests/test_package.py | sivchand/smart_open | 35d80d3bec5324c19427ce49fa8284f5b1c2c112 | [
"MIT"
] | 2,047 | 2016-06-16T15:35:45.000Z | 2022-03-31T04:32:57.000Z | smart_open/tests/test_package.py | MateLabs/smart-open | 7774087eb979db74f3f61ba5d512f0cc96607d5e | [
"MIT"
] | 524 | 2016-06-16T09:48:14.000Z | 2022-03-30T13:21:25.000Z | smart_open/tests/test_package.py | MateLabs/smart-open | 7774087eb979db74f3f61ba5d512f0cc96607d5e | [
"MIT"
] | 308 | 2016-06-16T09:02:51.000Z | 2022-03-24T20:57:52.000Z | # -*- coding: utf-8 -*-
import os
import unittest
import pytest
from smart_open import open
skip_tests = "SMART_OPEN_TEST_MISSING_DEPS" not in os.environ
| 35.25 | 82 | 0.721378 |
780bc343f88dfe61f9775550741cd8fb3ef98439 | 7,381 | py | Python | medtrialextractor/formatting/read_annotations.py | juanmoo/MedTrialExtractor | ea3e386a613a1896dc90853017a1d6377a10b8ab | [
"MIT"
] | 1 | 2022-03-10T07:54:19.000Z | 2022-03-10T07:54:19.000Z | medtrialextractor/formatting/read_annotations.py | juanmoo/MedTrialExtractor | ea3e386a613a1896dc90853017a1d6377a10b8ab | [
"MIT"
] | null | null | null | medtrialextractor/formatting/read_annotations.py | juanmoo/MedTrialExtractor | ea3e386a613a1896dc90853017a1d6377a10b8ab | [
"MIT"
] | null | null | null | '''
Read Annotations file and save in struct
'''
import pandas as pd
import json
import codecs
import multiprocessing
from contextlib import contextmanager
# Utils
# Main
def read_annotations(args):
# Read input files
annotation_file_path = args.annotation_file_path
struct_base_path = args.struct_base... | 34.490654 | 111 | 0.557242 |
780d7fc364d8033edd37f5b2484869fa695fa1e1 | 1,136 | py | Python | prep/api/open_data.py | vbgupta/DS440-Transfer-Learning-Address-Sustainability-Issues | b6ef51fa1e4253e92b8179b1953c43e6b983b944 | [
"MIT"
] | null | null | null | prep/api/open_data.py | vbgupta/DS440-Transfer-Learning-Address-Sustainability-Issues | b6ef51fa1e4253e92b8179b1953c43e6b983b944 | [
"MIT"
] | null | null | null | prep/api/open_data.py | vbgupta/DS440-Transfer-Learning-Address-Sustainability-Issues | b6ef51fa1e4253e92b8179b1953c43e6b983b944 | [
"MIT"
] | 1 | 2022-02-05T19:39:59.000Z | 2022-02-05T19:39:59.000Z | from path import Path
d = Path(__file__).parent.parent.parent
Path(d).chdir()
import pandas as pd
from sodapy import Socrata
def socrata_client(client_url: str, dataset_api_key: str, filename: str):
"""
client_url = found under developer portal -> str
dataset_api_key = found under developer portal -> str
... | 32.457143 | 109 | 0.706866 |
780fad77d312784127e399f00c7f290a144c53ef | 325 | py | Python | test/test_blog.py | Jn-mic/blog | 065e6ce4c71065a2e81c227424da5271300757ea | [
"MIT"
] | null | null | null | test/test_blog.py | Jn-mic/blog | 065e6ce4c71065a2e81c227424da5271300757ea | [
"MIT"
] | null | null | null | test/test_blog.py | Jn-mic/blog | 065e6ce4c71065a2e81c227424da5271300757ea | [
"MIT"
] | null | null | null | from app.models import User,Post, Comment,Clap
from app import db
# def setUp(self):
# self.user_Jack = User(username = 'Jack',password = 'vila', email = 'jackotienokey@gmail.com') | 29.545455 | 99 | 0.646154 |
7811094845040c91a60cb5551c04204b3466d326 | 3,991 | py | Python | data_generator/main.py | GValiente/gba-niccc | 104cd6e1fd60bbff0e46aa9af709b798b55340a4 | [
"Zlib"
] | 9 | 2020-11-09T10:40:39.000Z | 2022-03-31T09:50:41.000Z | data_generator/main.py | GValiente/gba-niccc | 104cd6e1fd60bbff0e46aa9af709b798b55340a4 | [
"Zlib"
] | null | null | null | data_generator/main.py | GValiente/gba-niccc | 104cd6e1fd60bbff0e46aa9af709b798b55340a4 | [
"Zlib"
] | null | null | null | """
Copyright (c) 2020 Gustavo Valiente gustavo.valiente@protonmail.com
zlib License, see LICENSE file.
"""
import json
import pygame
from draw import draw_polygon
from export import generate_shape_groups, write_frames, generate_horizontal_line_sets, generate_shapes, \
generate_horizontal_line_groups, o... | 30.007519 | 106 | 0.656227 |
7813264950fc8ef0fc5db1dda9df7fa60823e1c2 | 2,260 | py | Python | wordvec.py | jackyin68/chinese-relationship-nre | 92df0bf3737bbddd4f5a4e816da216536a60b0ff | [
"MIT"
] | 2 | 2020-05-14T16:25:19.000Z | 2020-06-28T13:53:50.000Z | wordvec.py | jackyin68/chinese-relationship-nre | 92df0bf3737bbddd4f5a4e816da216536a60b0ff | [
"MIT"
] | null | null | null | wordvec.py | jackyin68/chinese-relationship-nre | 92df0bf3737bbddd4f5a4e816da216536a60b0ff | [
"MIT"
] | null | null | null | import logging
import multiprocessing
import os
import pickle as pkl
import numpy as np
import tensorflow as tf
from gensim.models import word2vec
from gensim.models.word2vec import PathLineSentences
logger = logging.getLogger('Word2Vec')
logger.setLevel(logging.INFO)
formatter = logging.Formatter('%(asctime)s - %(nam... | 31.830986 | 111 | 0.708407 |
781362495bb438b5389eabd92fef0d024f207f5a | 29 | py | Python | spin/tests/__init__.py | otaviocv/spin | 04ec49b62a81b973c0553a0f808aa021c5c83294 | [
"MIT"
] | null | null | null | spin/tests/__init__.py | otaviocv/spin | 04ec49b62a81b973c0553a0f808aa021c5c83294 | [
"MIT"
] | 1 | 2019-10-26T12:42:59.000Z | 2019-10-26T12:42:59.000Z | spin/tests/__init__.py | otaviocv/spin | 04ec49b62a81b973c0553a0f808aa021c5c83294 | [
"MIT"
] | null | null | null | """SPIN module test unit."""
| 14.5 | 28 | 0.62069 |
78140cb16b4320c96a2a70e71239959c02e476a0 | 3,826 | py | Python | genetic.py | AHDiniz/AI-2020-02-Assignment-2 | ae09882b70483d71e7ba9e879714bde660f3b3b2 | [
"MIT"
] | null | null | null | genetic.py | AHDiniz/AI-2020-02-Assignment-2 | ae09882b70483d71e7ba9e879714bde660f3b3b2 | [
"MIT"
] | null | null | null | genetic.py | AHDiniz/AI-2020-02-Assignment-2 | ae09882b70483d71e7ba9e879714bde660f3b3b2 | [
"MIT"
] | null | null | null | #!/usr/bin/python3.8
import time
import copy
import random
import numpy as np
import clustering as clt
def genetic(hyper_params : HyperParams, clusters : clt.Clusters, population : Population = None) -> (float, clt.Clusters):
population = Population(clusters.k, hyper_params.population_size, clusters) if populati... | 36.788462 | 122 | 0.645321 |
7816362c9b471c817533daf75e1e42607a2401c3 | 522 | py | Python | src/Python/algorithm/leetcode_283_move_zeros.py | onlyonedaniel/algorithm | cfe7179175e94bd68612dea0d20c6d7f10c9a997 | [
"Apache-2.0"
] | null | null | null | src/Python/algorithm/leetcode_283_move_zeros.py | onlyonedaniel/algorithm | cfe7179175e94bd68612dea0d20c6d7f10c9a997 | [
"Apache-2.0"
] | null | null | null | src/Python/algorithm/leetcode_283_move_zeros.py | onlyonedaniel/algorithm | cfe7179175e94bd68612dea0d20c6d7f10c9a997 | [
"Apache-2.0"
] | null | null | null | from typing import List
| 27.473684 | 63 | 0.528736 |
7817a693208f067b414838d30d8b8daa4391d49d | 1,295 | py | Python | src/pytools/viz/util/_matplot.py | BCG-Gamma/pytools | d7be703e0665917cd75b671564d5c0163f13b77b | [
"Apache-2.0"
] | 17 | 2021-01-12T08:07:11.000Z | 2022-03-03T22:59:04.000Z | src/pytools/viz/util/_matplot.py | BCG-Gamma/pytools | d7be703e0665917cd75b671564d5c0163f13b77b | [
"Apache-2.0"
] | 10 | 2021-01-08T17:04:39.000Z | 2022-01-18T13:21:52.000Z | src/pytools/viz/util/_matplot.py | BCG-Gamma/pytools | d7be703e0665917cd75b671564d5c0163f13b77b | [
"Apache-2.0"
] | 1 | 2021-11-06T00:16:43.000Z | 2021-11-06T00:16:43.000Z | """
Utilities related to matplotlib.
"""
import logging
from matplotlib.ticker import Formatter
from pytools.api import AllTracker
from pytools.meta import SingletonMeta
log = logging.getLogger(__name__)
#
# Exported names
#
__all__ = ["PercentageFormatter"]
#
# Ensure all symbols introduced below are included... | 20.234375 | 85 | 0.620849 |
7817c742e595a059b2b93bf35024d16e8766469d | 2,573 | py | Python | DailyCodingProblem/153_Othes_Find_Distance_between_Two_Words_In_a_String.py | RafayAK/CodingPrep | 718eccb439db0f6e727806964766a40e8234c8a9 | [
"MIT"
] | 5 | 2019-09-07T17:31:17.000Z | 2022-03-05T09:59:46.000Z | DailyCodingProblem/153_Othes_Find_Distance_between_Two_Words_In_a_String.py | RafayAK/CodingPrep | 718eccb439db0f6e727806964766a40e8234c8a9 | [
"MIT"
] | null | null | null | DailyCodingProblem/153_Othes_Find_Distance_between_Two_Words_In_a_String.py | RafayAK/CodingPrep | 718eccb439db0f6e727806964766a40e8234c8a9 | [
"MIT"
] | 2 | 2019-09-07T17:31:24.000Z | 2019-10-28T16:10:52.000Z | """
Find an efficient algorithm to find the smallest distance
(measured in number of words) between any two given words in a string.
For example, given words "hello", and "world" and a text content of
"dog cat hello cat dog dog hello cat world", return 1 because there's only one word "cat" in between the two words.
""... | 47.648148 | 115 | 0.591527 |
7818bb22a2a0106d2b35255ef5c676f48223ad0c | 138 | py | Python | precedent/models/bad_query.py | lewisjared/precedent | 6447634c6961f44b058a0379b782c8d46a21560e | [
"MIT"
] | null | null | null | precedent/models/bad_query.py | lewisjared/precedent | 6447634c6961f44b058a0379b782c8d46a21560e | [
"MIT"
] | null | null | null | precedent/models/bad_query.py | lewisjared/precedent | 6447634c6961f44b058a0379b782c8d46a21560e | [
"MIT"
] | null | null | null | from django.db import models
| 23 | 46 | 0.746377 |
7818c94be574c623ed895326fcd56dfa8b5671ec | 1,994 | py | Python | src/practices/practice/palindromic_paths/script.py | rahul38888/coding_practice | 8445c379310aa189147c4805c43bed80aa9e9fac | [
"Apache-2.0"
] | 1 | 2021-08-06T11:22:12.000Z | 2021-08-06T11:22:12.000Z | src/practices/practice/palindromic_paths/script.py | rahul38888/coding_practice | 8445c379310aa189147c4805c43bed80aa9e9fac | [
"Apache-2.0"
] | null | null | null | src/practices/practice/palindromic_paths/script.py | rahul38888/coding_practice | 8445c379310aa189147c4805c43bed80aa9e9fac | [
"Apache-2.0"
] | null | null | null | # https://practice.geeksforgeeks.org/problems/number-of-palindromic-paths-in-a-matrix0819/1#
# at each node recursively call itself and at bottom,left cornet determine it its a palindrome
if __name__ == '__main__':
T = int(input())
for i in range(T):
n, m = input().split()
n = int(n);
... | 29.323529 | 94 | 0.504514 |
7819a57e7f8c80daa178f6ebdb4724fef6140cf9 | 509 | py | Python | sshub_middleware/settings/__init__.py | muhfajar/sshub-middleware | a0f68dafc1bc963998a86fe992ea88f394d89f61 | [
"MIT"
] | null | null | null | sshub_middleware/settings/__init__.py | muhfajar/sshub-middleware | a0f68dafc1bc963998a86fe992ea88f394d89f61 | [
"MIT"
] | null | null | null | sshub_middleware/settings/__init__.py | muhfajar/sshub-middleware | a0f68dafc1bc963998a86fe992ea88f394d89f61 | [
"MIT"
] | null | null | null | import random
from .base import *
try:
from .private import *
except ImportError:
raise ImportError("""
Please create private.py file
with contain configuration for
====================================
SECRET_KEY = '{}'
DEBUG = False
ALLOWED_HOSTS = []
SSHUB_API = 'api-key'
==... | 26.789474 | 106 | 0.516699 |
781af811a56b408c71d1f19a70f24f52c71bcc21 | 612 | py | Python | dvc/remote/gdrive/utils.py | Baranowski/dvc | f91aa0665f6898991af0d617373ed99623b60c4a | [
"Apache-2.0"
] | null | null | null | dvc/remote/gdrive/utils.py | Baranowski/dvc | f91aa0665f6898991af0d617373ed99623b60c4a | [
"Apache-2.0"
] | null | null | null | dvc/remote/gdrive/utils.py | Baranowski/dvc | f91aa0665f6898991af0d617373ed99623b60c4a | [
"Apache-2.0"
] | null | null | null | import os
from dvc.progress import Tqdm
FOLDER_MIME_TYPE = "application/vnd.google-apps.folder"
| 23.538462 | 66 | 0.661765 |
781c4e91ca71190fae5347e85451c2040e6e049e | 290 | py | Python | SpringSemester2021/01_Jupyter-Python/Ex01_01_Sol.py | KretschiGL/DataScienceLecture | e6bbb3efd531b08aa4757fb6e89d12e959678a44 | [
"MIT"
] | 1 | 2021-05-09T11:02:35.000Z | 2021-05-09T11:02:35.000Z | SpringSemester2021/01_Jupyter-Python/Ex01_01_Sol.py | KretschiGL/DataScienceLecture | e6bbb3efd531b08aa4757fb6e89d12e959678a44 | [
"MIT"
] | null | null | null | SpringSemester2021/01_Jupyter-Python/Ex01_01_Sol.py | KretschiGL/DataScienceLecture | e6bbb3efd531b08aa4757fb6e89d12e959678a44 | [
"MIT"
] | 1 | 2020-05-26T15:35:40.000Z | 2020-05-26T15:35:40.000Z | # Numbers 0 to 10
print(list(range(0,11)))
print()
# Even numbers 0 to 10
print(list(range(0,11,2)))
print()
# Odd numbers 0 to 10
print(list(range(1,11,2)))
print()
# Numbers 20 to 10
print(list(range(20,9,-1)))
print()
# Numbers 45 to 75 divisable by 5
print(list(range(45, 76, 5)))
| 14.5 | 33 | 0.658621 |
781c542afb18a830090b837284c0681806a76353 | 3,450 | py | Python | builder.py | onerbs/sublime-v | 72514868473b9bac1d415fce7adf4e8ad8529dca | [
"MIT"
] | 15 | 2020-12-22T11:39:35.000Z | 2022-03-21T20:23:58.000Z | builder.py | onerbs/sublime-v | 72514868473b9bac1d415fce7adf4e8ad8529dca | [
"MIT"
] | null | null | null | builder.py | onerbs/sublime-v | 72514868473b9bac1d415fce7adf4e8ad8529dca | [
"MIT"
] | 2 | 2021-07-05T18:43:23.000Z | 2022-01-25T09:37:30.000Z | import sublime, sublime_plugin
from os.path import join as join_path, isdir
from os import mkdir
IS_WINDOWS = sublime.platform() == 'windows'
PATH_SEPARATOR = '\\' if IS_WINDOWS else '/'
EXTENSION = '.exe' if IS_WINDOWS else ''
def get_extension(file: str) -> str:
"""
:examples:
get_extension('some... | 31.081081 | 78 | 0.542899 |
781d5253f36020226807d6d2220200a36372d774 | 466 | py | Python | ex032.py | felipesch92/PythonExercicios | 73edcbde6beaabcfc86af3dd6e58473f1eecabd3 | [
"MIT"
] | null | null | null | ex032.py | felipesch92/PythonExercicios | 73edcbde6beaabcfc86af3dd6e58473f1eecabd3 | [
"MIT"
] | null | null | null | ex032.py | felipesch92/PythonExercicios | 73edcbde6beaabcfc86af3dd6e58473f1eecabd3 | [
"MIT"
] | null | null | null | from datetime import date
print('Coloque 0 para analisar o ano atual')
ano = int(input('Digite um ano para saber se bissexto: '))
if ano == 0:
ano = date.today().year
if ano % 4 == 0:
if ano % 100 == 0:
if ano % 400 == 0:
b = True
else:
b = False
else:
b = Tr... | 23.3 | 60 | 0.538627 |
781f67155903a6a5165bde45e17a20b9d3c731e8 | 1,159 | py | Python | 835.Image-Overlap.py | mickey0524/leetcode | 6bedeb6ff29b02a97178cca464c5fd639951801f | [
"MIT"
] | 18 | 2018-07-14T12:45:37.000Z | 2022-03-26T14:51:04.000Z | 835.Image-Overlap.py | mickey0524/leetcode | 6bedeb6ff29b02a97178cca464c5fd639951801f | [
"MIT"
] | null | null | null | 835.Image-Overlap.py | mickey0524/leetcode | 6bedeb6ff29b02a97178cca464c5fd639951801f | [
"MIT"
] | 3 | 2019-05-29T04:09:22.000Z | 2021-06-07T23:37:46.000Z | # https://leetcode.com/problems/monotonic-array/description/
#
# algorithms
# Medium (42.6%)
# Total Accepted: 4.8k
# Total Submissions: 11.2k
# beats 77.52% of python submissions
| 28.268293 | 82 | 0.448663 |
781f99b5ecc40a218b95def9a0066c13dd3412a9 | 717 | py | Python | logs_manager/migrations/0006_auto_20200724_0722.py | adwait-thattey/raygun_api | 9d5571de452fbf70d34b9583ebc42eb662292f61 | [
"MIT"
] | null | null | null | logs_manager/migrations/0006_auto_20200724_0722.py | adwait-thattey/raygun_api | 9d5571de452fbf70d34b9583ebc42eb662292f61 | [
"MIT"
] | 7 | 2020-06-06T01:40:06.000Z | 2022-02-10T09:12:56.000Z | logs_manager/migrations/0006_auto_20200724_0722.py | adwait-thattey/raygun_api | 9d5571de452fbf70d34b9583ebc42eb662292f61 | [
"MIT"
] | 1 | 2021-08-16T13:23:34.000Z | 2021-08-16T13:23:34.000Z | # Generated by Django 2.1.5 on 2020-07-24 07:22
from django.db import migrations
| 23.9 | 58 | 0.562064 |
781f9d048dcb63c76bedb99b8f478fde5ced7867 | 4,223 | py | Python | stupydcache.py | garabik/stupydcache | a2a9fc8daf685da403f68700898e03bedefa69a8 | [
"Unlicense"
] | 1 | 2017-09-28T07:58:46.000Z | 2017-09-28T07:58:46.000Z | stupydcache.py | garabik/stupydcache | a2a9fc8daf685da403f68700898e03bedefa69a8 | [
"Unlicense"
] | null | null | null | stupydcache.py | garabik/stupydcache | a2a9fc8daf685da403f68700898e03bedefa69a8 | [
"Unlicense"
] | null | null | null | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import os, zlib, pickle, base64, string, hashlib, random, functools
# for 2/3 compatibility
try:
unicode
except NameError:
# this happens in python3
unicode = ()
def smart_str(obj):
"smart version of str(), works in both python2/3, regardless of whether obj... | 34.333333 | 115 | 0.608099 |
781fb6916fe464abca0f4c951e6c639b121a70e3 | 182 | py | Python | django_dicom/models/utils/__init__.py | ZviBaratz/django-dicom | fc5d5443ebcab9af9705a2e81c58662789a34c62 | [
"Apache-2.0"
] | 8 | 2018-12-25T11:00:31.000Z | 2022-02-03T12:05:56.000Z | django_dicom/models/utils/__init__.py | ZviBaratz/django-dicom | fc5d5443ebcab9af9705a2e81c58662789a34c62 | [
"Apache-2.0"
] | 49 | 2019-09-04T11:36:00.000Z | 2022-03-20T12:33:04.000Z | django_dicom/models/utils/__init__.py | ZviBaratz/django-dicom | fc5d5443ebcab9af9705a2e81c58662789a34c62 | [
"Apache-2.0"
] | 4 | 2019-06-23T18:09:07.000Z | 2019-08-30T15:43:18.000Z | """
Utilities for the :mod:`~django_dicom.models` module.
"""
from django_dicom.models.utils.utils import (
get_dicom_root,
snake_case_to_camel_case,
)
# flake8: noqa: F401
| 18.2 | 53 | 0.725275 |
7820af507ff5a73b2df7a649db2d2e9e6321c6b3 | 9,446 | py | Python | csvwlib/utils/rdf/CSVW.py | Aleksander-Drozd/pycsvw | 6359de9b32935d457ab0a5a33ae3eb68286590b5 | [
"MIT"
] | 3 | 2019-05-12T13:07:19.000Z | 2021-01-30T10:39:53.000Z | csvwlib/utils/rdf/CSVW.py | Aleksander-Drozd/pycsvw | 6359de9b32935d457ab0a5a33ae3eb68286590b5 | [
"MIT"
] | 3 | 2018-08-18T12:47:26.000Z | 2021-02-03T19:28:12.000Z | csvwlib/utils/rdf/CSVW.py | Aleksander-Drozd/pycsvw | 6359de9b32935d457ab0a5a33ae3eb68286590b5 | [
"MIT"
] | 2 | 2020-04-05T13:13:05.000Z | 2021-02-01T10:50:31.000Z | term_mappings = {
'Cell': 'csvw:Cell',
'Column': 'csvw:Column',
'Datatype': 'csvw:Datatype',
'Dialect': 'csvw:Dialect',
'Direction': 'csvw:Direction',
'ForeignKey': 'csvw:ForeignKey',
'JSON': 'csvw:JSON',
'NCName': 'xsd:NCName',
'NMTOKEN': 'xsd:NMTOKEN',
'Name': 'xsd:Name',
'... | 39.689076 | 116 | 0.603536 |
782137e7424b29f718ac4f6c539255f095868a6d | 53,298 | py | Python | src/visualization/visualize.py | zeou1/maggot_models | 4e1b518c2981ab1ca9607099c3813e8429d94ca4 | [
"BSD-3-Clause"
] | null | null | null | src/visualization/visualize.py | zeou1/maggot_models | 4e1b518c2981ab1ca9607099c3813e8429d94ca4 | [
"BSD-3-Clause"
] | null | null | null | src/visualization/visualize.py | zeou1/maggot_models | 4e1b518c2981ab1ca9607099c3813e8429d94ca4 | [
"BSD-3-Clause"
] | null | null | null | import math
from collections import defaultdict
from operator import itemgetter
import colorcet as cc
import matplotlib
import matplotlib.colors as mplc
import matplotlib.pyplot as plt
import networkx as nx
import numpy as np
import pandas as pd
import seaborn as sns
from matplotlib.cm import ScalarMappable
from matpl... | 31.5 | 131 | 0.59976 |
7821804bf2b23895276ffd252dcee5238acf418a | 559 | py | Python | test/test_json.py | Zhu-Jianwei/LaTeX-helper | 322bf686d1aee32804013d813d46bd27a4a8325f | [
"MIT"
] | 4 | 2022-03-13T12:02:38.000Z | 2022-03-13T15:30:20.000Z | test/test_json.py | Zhu-Jianwei/LaTeX-helper | 322bf686d1aee32804013d813d46bd27a4a8325f | [
"MIT"
] | null | null | null | test/test_json.py | Zhu-Jianwei/LaTeX-helper | 322bf686d1aee32804013d813d46bd27a4a8325f | [
"MIT"
] | 3 | 2022-02-06T08:05:37.000Z | 2022-02-07T08:26:48.000Z | import json
json_data =r'''
{
"Print to console": {
"prefix": "log",
"body": [
"console.log('$1');",
"$2"
],
"description": "Log output to console"
},
"hello": {
"prefix": "hello",
"body": [
"hello world"
],
... | 18.032258 | 52 | 0.415027 |
78228c408e9db4c18cd9a997d51a696b806143be | 878 | py | Python | src/commands/jsdoc/generate_jsdoc.py | PranjalPansuriya/JavaScriptEnhancements | 14af4162e86585153cbd4614ad96dff64a0d3192 | [
"MIT"
] | 690 | 2017-04-11T06:45:01.000Z | 2022-03-21T23:20:29.000Z | src/commands/jsdoc/generate_jsdoc.py | PranjalPansuriya/JavaScriptEnhancements | 14af4162e86585153cbd4614ad96dff64a0d3192 | [
"MIT"
] | 74 | 2017-11-22T18:05:26.000Z | 2021-05-05T16:25:31.000Z | src/commands/jsdoc/generate_jsdoc.py | PranjalPansuriya/JavaScriptEnhancements | 14af4162e86585153cbd4614ad96dff64a0d3192 | [
"MIT"
] | 42 | 2017-04-13T10:22:40.000Z | 2021-05-27T19:19:04.000Z | import sublime, sublime_plugin
import os
from ...libs import util
from ...libs import JavascriptEnhancementsExecuteOnTerminalCommand | 32.518519 | 127 | 0.759681 |
78235e2dae3d9076daa0494a8671b5bdfc30af35 | 2,560 | py | Python | scripts/airflow/dags/crash_geocoding.py | CityofToronto/bdit_move_etl | ca3aa7c4d543ddd304a19a3620a570d123e5817b | [
"MIT"
] | null | null | null | scripts/airflow/dags/crash_geocoding.py | CityofToronto/bdit_move_etl | ca3aa7c4d543ddd304a19a3620a570d123e5817b | [
"MIT"
] | 2 | 2021-10-01T14:37:47.000Z | 2022-03-11T17:11:27.000Z | scripts/airflow/dags/crash_geocoding.py | CityofToronto/bdit_move_etl | ca3aa7c4d543ddd304a19a3620a570d123e5817b | [
"MIT"
] | null | null | null | """
crash_geocoding
Normalizes CRASH data into collision _events_ and collision _involved persons_, then matches
collision events to the centreline conflation target that was created by
`centreline_conflation_target`.
Our legacy schema in Oracle stores both event-related and involved-person-related information
in a s... | 47.407407 | 98 | 0.832031 |
782465ea043e7fe4c06c1d6ef2c94b90da0ea611 | 2,986 | py | Python | ir_axioms/axiom/__init__.py | webis-de/ir_axioms | 9c1b3ed4e47c6c4f3405ebd49fff0ceeb431a753 | [
"MIT"
] | 11 | 2022-02-20T12:10:12.000Z | 2022-03-11T15:45:19.000Z | ir_axioms/axiom/__init__.py | webis-de/ir_axioms | 9c1b3ed4e47c6c4f3405ebd49fff0ceeb431a753 | [
"MIT"
] | 3 | 2022-02-28T15:47:29.000Z | 2022-03-02T09:14:59.000Z | ir_axioms/axiom/__init__.py | webis-de/ir_axioms | 9c1b3ed4e47c6c4f3405ebd49fff0ceeb431a753 | [
"MIT"
] | 1 | 2022-02-20T15:42:42.000Z | 2022-02-20T15:42:42.000Z | from ir_axioms.axiom import (
argumentative, arithmetic, base, cache, conversion, length_norm,
lower_bound, proximity, query_aspects, retrieval_score, term_frequency,
term_similarity, simple, trec, estimator, preconditions
)
# Re-export from child modules.
ArgumentativeUnitsCountAxiom = argumentative.Argum... | 28.990291 | 75 | 0.842264 |
7824860840f034889416c26aa9e425988d6f195a | 372 | py | Python | Problem 10/advent10b.py | mankybansal/advent-of-code-2020 | 62b389c52d488ea88443b564b6b6b89fd7b5290b | [
"Apache-2.0"
] | null | null | null | Problem 10/advent10b.py | mankybansal/advent-of-code-2020 | 62b389c52d488ea88443b564b6b6b89fd7b5290b | [
"Apache-2.0"
] | null | null | null | Problem 10/advent10b.py | mankybansal/advent-of-code-2020 | 62b389c52d488ea88443b564b6b6b89fd7b5290b | [
"Apache-2.0"
] | null | null | null | from collections import Counter
adapters = []
for line in open('input.txt', 'r').readlines():
adapters.append(int(line.strip()))
adapters = sorted(adapters)
device_joltage = adapters[-1] + 3
adapters.append(device_joltage)
dp = Counter()
dp[0] = 1
for adapter in adapters:
dp[adapter] = dp[adapter - 3] + dp[adapte... | 20.666667 | 66 | 0.698925 |
782502409ae59f3057efe2b4d173e579e11e692b | 2,199 | py | Python | src/architectures/transformer_encoder.py | francismontalbo/attention-is-all-you-need-paper | 21ba3e48917da0c6808126d183bece6a9969cfd2 | [
"MIT"
] | 167 | 2021-12-02T16:25:34.000Z | 2022-03-31T02:02:17.000Z | src/architectures/transformer_encoder.py | francismontalbo/attention-is-all-you-need-paper | 21ba3e48917da0c6808126d183bece6a9969cfd2 | [
"MIT"
] | null | null | null | src/architectures/transformer_encoder.py | francismontalbo/attention-is-all-you-need-paper | 21ba3e48917da0c6808126d183bece6a9969cfd2 | [
"MIT"
] | 35 | 2021-12-02T16:45:28.000Z | 2022-03-28T07:54:17.000Z | import torch.nn as nn
from architectures.position_wise_feed_forward_net import PositionWiseFeedForwardNet
from architectures.multi_head_attention import MultiHeadAttention
from architectures.add_and_norm import AddAndNorm
| 43.117647 | 132 | 0.706685 |
7826b1b3e3490d50e760abe914d50f11f7a2f0ae | 4,707 | py | Python | pytools/terrainUtils.py | arwassa/bztools | ac373de1df9cec4b8791f19cb7618e3ba82b1323 | [
"Apache-2.0"
] | 1 | 2018-02-03T13:33:52.000Z | 2018-02-03T13:33:52.000Z | pytools/terrainUtils.py | Aborysa/bztools | ac373de1df9cec4b8791f19cb7618e3ba82b1323 | [
"Apache-2.0"
] | null | null | null | pytools/terrainUtils.py | Aborysa/bztools | ac373de1df9cec4b8791f19cb7618e3ba82b1323 | [
"Apache-2.0"
] | null | null | null | import struct
import numpy
from math import floor
w_cache = {}
| 32.916084 | 84 | 0.508604 |
7826ee3e13a3ebc6892bfde3e43069172e7d7551 | 451 | py | Python | hg/res/loaders/image_loader.py | V0idExp/mercury | 50cfa6f09c69fd0509d5d549679b56b91720bb73 | [
"MIT"
] | null | null | null | hg/res/loaders/image_loader.py | V0idExp/mercury | 50cfa6f09c69fd0509d5d549679b56b91720bb73 | [
"MIT"
] | 2 | 2021-03-31T19:33:16.000Z | 2021-12-13T20:33:49.000Z | hg/res/loaders/image_loader.py | V0idExp/mercury | 50cfa6f09c69fd0509d5d549679b56b91720bb73 | [
"MIT"
] | null | null | null | import os
import sdl2
from hg.gfx.sprite_renderer.sprite import Image
from .loader import Loader
| 23.736842 | 77 | 0.725055 |
78272b3dced1fb8d73d631fa9eb3d3a49ec20700 | 649 | py | Python | Payloads/Zip-Traversal/make.py | 5tr1x/SecLists | 00421e06e63a3700988eeff83a684f8579473abf | [
"MIT"
] | 39,901 | 2015-01-02T06:47:54.000Z | 2022-03-31T22:42:18.000Z | Payloads/Zip-Traversal/make.py | wgph96/SecLists | 9f4d672e98a837fb1f3d59095df36b63af6987d1 | [
"MIT"
] | 560 | 2015-01-12T20:36:29.000Z | 2022-03-20T21:33:31.000Z | Payloads/Zip-Traversal/make.py | wgph96/SecLists | 9f4d672e98a837fb1f3d59095df36b63af6987d1 | [
"MIT"
] | 22,424 | 2015-01-02T20:25:56.000Z | 2022-03-31T22:36:50.000Z | #!/usr/bin/env python3
import zipfile
# The file to USE inside the zip, before compression
filein = "index.php"
print("[i] FileIn: %s\n" % filein)
# How deep are we going?
depth = ""
# Loop 11 times (00-10)
for i in range(11):
# The .zip file to use
zipname = "depth-%02d.zip" % i
print("[i] ZipName: %s" % zip... | 20.935484 | 52 | 0.617874 |
78278ed728314424eae18309e8e0602c13d5ac00 | 8,695 | py | Python | uwsgiconf/options/subscriptions.py | graceshaw/uwsgiconf | 205289bb279dfbcc1d9bfd599dd8ca5d6c527077 | [
"BSD-3-Clause"
] | null | null | null | uwsgiconf/options/subscriptions.py | graceshaw/uwsgiconf | 205289bb279dfbcc1d9bfd599dd8ca5d6c527077 | [
"BSD-3-Clause"
] | null | null | null | uwsgiconf/options/subscriptions.py | graceshaw/uwsgiconf | 205289bb279dfbcc1d9bfd599dd8ca5d6c527077 | [
"BSD-3-Clause"
] | null | null | null | from ..base import OptionsGroup
from ..exceptions import ConfigurationError
from ..utils import KeyValue, filter_locals
from .subscriptions_algos import *
| 40.069124 | 118 | 0.659689 |
7827a2aba2b29a5cee49d89ade1d4b7fbe15953d | 7,098 | py | Python | python/kmeans.py | exTerEX/kmeans | 1a9be9241d1ccad5755c9a92cdd2c9d4726baa3c | [
"MIT"
] | null | null | null | python/kmeans.py | exTerEX/kmeans | 1a9be9241d1ccad5755c9a92cdd2c9d4726baa3c | [
"MIT"
] | 2 | 2022-01-01T07:08:39.000Z | 2022-03-01T07:03:31.000Z | python/kmeans.py | exTerEX/kmeans | 1a9be9241d1ccad5755c9a92cdd2c9d4726baa3c | [
"MIT"
] | null | null | null | from ctypes import *
from typing import *
from pathlib import Path
from numpy import array, cos, ndarray, pi, random, sin, zeros, tan
try:
lib = cdll.LoadLibrary(str(Path(__file__).with_name("libkmeans.so")))
except Exception as E:
print(f"Cannot load DLL")
print(E)
lib.kmeans_2d.restype = POINTER(c... | 29.090164 | 87 | 0.609749 |
7827eed35f79f32d44be50575f42d15c59d7225e | 180 | py | Python | tests/test_004.py | chingc/euler-python | e963752969cfa7a939ef6a8408f5628ce3c96cae | [
"MIT"
] | null | null | null | tests/test_004.py | chingc/euler-python | e963752969cfa7a939ef6a8408f5628ce3c96cae | [
"MIT"
] | null | null | null | tests/test_004.py | chingc/euler-python | e963752969cfa7a939ef6a8408f5628ce3c96cae | [
"MIT"
] | null | null | null | """https://projecteuler.net/problem=4"""
from euler.main import largest_palindrome
def test_004() -> None:
"""Expected: 906609"""
assert largest_palindrome(3) == 906609
| 20 | 42 | 0.694444 |
78281e5ec0c06b758f4584c56dc624c86cf4b11c | 2,480 | py | Python | source/src/trand/plot_events.py | McIntyre-Lab/TranD | e283e7534ee05edbb756dec94d547c7d03125add | [
"RSA-MD"
] | null | null | null | source/src/trand/plot_events.py | McIntyre-Lab/TranD | e283e7534ee05edbb756dec94d547c7d03125add | [
"RSA-MD"
] | null | null | null | source/src/trand/plot_events.py | McIntyre-Lab/TranD | e283e7534ee05edbb756dec94d547c7d03125add | [
"RSA-MD"
] | null | null | null | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright 2021 Oleksandr Moskalenko <om@rc.ufl.edu>
#
# Distributed under terms of the MIT license.
"""
Visualize fragments and events in a terminal
"""
def print_region(data):
"""
Print a scaled region to screen with labels and dashes for ... | 28.837209 | 97 | 0.510484 |
7828f97f55e8ef2cb46292bfb5a90355034d3be4 | 5,223 | py | Python | utils/test/expected_values.py | DanielSola/bitcoin-analysis | 1d86ebdc91984403b1dedb99cb74641cd8367066 | [
"MIT"
] | null | null | null | utils/test/expected_values.py | DanielSola/bitcoin-analysis | 1d86ebdc91984403b1dedb99cb74641cd8367066 | [
"MIT"
] | null | null | null | utils/test/expected_values.py | DanielSola/bitcoin-analysis | 1d86ebdc91984403b1dedb99cb74641cd8367066 | [
"MIT"
] | null | null | null | expected_number_of_transactions = [
2650, 2543, 1395, 2751, 2398, 2827, 2737, 3084, 1998, 2997, 976,
1929, 3268, 1904, 1772, 776, 2553, 2547, 2581, 2226, 2307, 2812,
2618, 177, 1538, 1990, 2323, 2613, 2503, 2140, 2542, 2291, 2782,
1994, 2513, 2773, 1359, 1744, 868, 896, 2228, 2300, 2349, 2440,
2562, 2123,... | 60.034483 | 81 | 0.745166 |
78296765ed252487f641fd529cde2cdca9a692d6 | 8,877 | py | Python | cpnet/utils.py | skojaku/core-periphery-detection | 5d590bdcb445133ae79771994c3d3c9820e59644 | [
"Apache-2.0"
] | 27 | 2018-08-10T09:06:18.000Z | 2022-01-10T19:54:15.000Z | cpnet/utils.py | skojaku/core-periphery-detection | 5d590bdcb445133ae79771994c3d3c9820e59644 | [
"Apache-2.0"
] | 14 | 2019-06-06T06:52:05.000Z | 2022-03-20T23:47:21.000Z | cpnet/utils.py | skojaku/core-periphery-detection | 5d590bdcb445133ae79771994c3d3c9820e59644 | [
"Apache-2.0"
] | 5 | 2018-11-29T01:45:19.000Z | 2021-05-10T15:50:59.000Z | from collections import Counter, defaultdict
import matplotlib as mpl
import networkx as nx
import numba
import numpy as np
import pandas as pd
import plotly.graph_objects as go
import seaborn as sns
from fa2 import ForceAtlas2
from scipy import sparse
def draw(
G,
c,
x,
ax,
draw_edge=True,
... | 30.716263 | 108 | 0.61113 |
782a71ba07dfa1012bcbb82312804ad3ca021f37 | 382 | py | Python | third_party/p7zip/Utils/file_P7ZIP.py | VirtualLib/juice | 3d5912059f3a80ec1fef5c5031a395578904fe9c | [
"MIT"
] | null | null | null | third_party/p7zip/Utils/file_P7ZIP.py | VirtualLib/juice | 3d5912059f3a80ec1fef5c5031a395578904fe9c | [
"MIT"
] | null | null | null | third_party/p7zip/Utils/file_P7ZIP.py | VirtualLib/juice | 3d5912059f3a80ec1fef5c5031a395578904fe9c | [
"MIT"
] | null | null | null |
files_c=[
'C/Threads.c',
]
files_cpp=[
'CPP/7zip/UI/P7ZIP/wxP7ZIP.cpp',
'CPP/Common/IntToString.cpp',
'CPP/Common/MyString.cpp',
'CPP/Common/MyVector.cpp',
'CPP/Common/StringConvert.cpp',
'CPP/Windows/FileDir.cpp',
'CPP/Windows/FileFind.cpp',
'CPP/Windows/FileIO.cpp',
'CPP/Windows/FileName.cpp',
'CPP/Commo... | 19.1 | 40 | 0.712042 |
782aa3905c2566425770fbed6752f08c6c8028be | 305 | py | Python | explorations/webDeploy/gunicornTinyDemo/demo.py | paul-shannon/slexil | cba47d70d7301d1cc74d387e51d93b683b1109de | [
"MIT"
] | null | null | null | explorations/webDeploy/gunicornTinyDemo/demo.py | paul-shannon/slexil | cba47d70d7301d1cc74d387e51d93b683b1109de | [
"MIT"
] | 53 | 2019-02-14T15:12:21.000Z | 2019-12-04T14:26:13.000Z | explorations/webDeploy/gunicornTinyDemo/demo.py | paul-shannon/slexil | cba47d70d7301d1cc74d387e51d93b683b1109de | [
"MIT"
] | 1 | 2020-02-08T23:47:47.000Z | 2020-02-08T23:47:47.000Z | from time import gmtime, strftime
| 27.727273 | 89 | 0.603279 |
782d3736422b017c6c23f0d7d406f9cfc405a042 | 847 | py | Python | Arrays/54. Spiral matrix.py | Rage-ops/Leetcode-Solutions | 48d4ecbb92a0bb7a7bb74a1445b593a67357ac02 | [
"MIT"
] | 1 | 2020-11-23T13:52:11.000Z | 2020-11-23T13:52:11.000Z | Arrays/54. Spiral matrix.py | harsha-sam/Leetcode-Solutions | 48d4ecbb92a0bb7a7bb74a1445b593a67357ac02 | [
"MIT"
] | null | null | null | Arrays/54. Spiral matrix.py | harsha-sam/Leetcode-Solutions | 48d4ecbb92a0bb7a7bb74a1445b593a67357ac02 | [
"MIT"
] | null | null | null | # Medium
# https://leetcode.com/problems/spiral-matrix/
# Time Complexity: O(N)
# Space Complexity: 0(1) | 31.37037 | 66 | 0.491145 |
7830676dd1494b6979ae12f7dc7247d611ebfa6e | 1,135 | py | Python | core/events/connection.py | w7cep/Pemgu-Bot | 1ed5fd4036aafdceaf9a3b1265173cb30fdc24fa | [
"MIT"
] | 1 | 2021-12-08T17:06:58.000Z | 2021-12-08T17:06:58.000Z | core/events/connection.py | w7cep/Pemgu-Bot | 1ed5fd4036aafdceaf9a3b1265173cb30fdc24fa | [
"MIT"
] | null | null | null | core/events/connection.py | w7cep/Pemgu-Bot | 1ed5fd4036aafdceaf9a3b1265173cb30fdc24fa | [
"MIT"
] | null | null | null | import discord
from discord.ext import commands
def setup(bot):
bot.add_cog(OnConnect(bot))
bot.add_cog(OnReady(bot))
bot.add_cog(OnDisconnect(bot)) | 33.382353 | 187 | 0.665198 |
7832c8a18523ffb201793709a64fdbf272669118 | 1,738 | py | Python | addons/Sprytile-6b68d00/rx/linq/observable/transduce.py | trisadmeslek/V-Sekai-Blender-tools | 0d8747387c58584b50c69c61ba50a881319114f8 | [
"MIT"
] | 733 | 2017-08-22T09:47:54.000Z | 2022-03-27T23:56:52.000Z | rx/linq/observable/transduce.py | asheraryam/Sprytile | c63be50d14b07192ff134ceab256f0d69b9c4c92 | [
"MIT"
] | 74 | 2017-08-16T09:13:05.000Z | 2022-03-15T02:31:49.000Z | rx/linq/observable/transduce.py | asheraryam/Sprytile | c63be50d14b07192ff134ceab256f0d69b9c4c92 | [
"MIT"
] | 77 | 2017-09-14T16:56:11.000Z | 2022-03-27T13:55:16.000Z | """Transducers for RxPY.
There are several different implementations of transducers in Python.
This implementation is currently targeted for:
- http://code.sixty-north.com/python-transducers
You should also read the excellent article series "Understanding
Transducers through Python" at:
- http://sixty-north.com/bl... | 25.558824 | 78 | 0.695627 |
7833a0aa700f4e72281df682196f90aaade80458 | 282 | py | Python | flask_api_server/conf.py | SaraHan774/NaverDevfestAndroid | 4d01d9612df76216ae4e753ce620b9be04743892 | [
"MIT"
] | null | null | null | flask_api_server/conf.py | SaraHan774/NaverDevfestAndroid | 4d01d9612df76216ae4e753ce620b9be04743892 | [
"MIT"
] | 1 | 2021-06-02T00:02:26.000Z | 2021-06-02T00:02:26.000Z | flask_api_server/conf.py | SaraHan774/NaverFest | aafbcde663de2614e660e651a6cbe31b887663dc | [
"MIT"
] | null | null | null | import json
with open('config.json', 'r') as f:
config = json.load(f)
n_thread = config["DEFAULT"]["THREAD_NUM"]
base_dir = config["DEFAULT"]["BASE_DIR"]
ip = config["DEFAULT"]["SERVER_IP"]
port = config["DEFAULT"]["SERVER_PORT"]
log_path = config["DEFAULT"]["LOGGING_PATH"]
| 23.5 | 44 | 0.680851 |
7833f40832f2ab477746a194696a73f28e408bad | 1,707 | py | Python | atari/atari.py | neevparikh/lwm | ec8d27f6c011a732aa58ae04cba66a5bac68f8f8 | [
"MIT"
] | 17 | 2020-10-07T08:15:46.000Z | 2022-01-10T02:47:53.000Z | atari/atari.py | neevparikh/lwm | ec8d27f6c011a732aa58ae04cba66a5bac68f8f8 | [
"MIT"
] | null | null | null | atari/atari.py | neevparikh/lwm | ec8d27f6c011a732aa58ae04cba66a5bac68f8f8 | [
"MIT"
] | 2 | 2021-02-19T17:47:17.000Z | 2021-03-07T16:41:54.000Z | import torch
from gym.spaces.box import Box
from baselines import bench
from baselines.common.vec_env.shmem_vec_env import ShmemVecEnv
from baselines.common.atari_wrappers import wrap_deepmind, make_atari
from baselines.common.vec_env import VecEnvWrapper
| 33.470588 | 75 | 0.641476 |
7835bab4723390e294981a238603d58b310e255b | 1,833 | py | Python | 05/scrum/board/views.py | mezklador/lightweight-django | 9ab23cdc76cfd44f7f76c4901bbd77411076d66b | [
"MIT"
] | null | null | null | 05/scrum/board/views.py | mezklador/lightweight-django | 9ab23cdc76cfd44f7f76c4901bbd77411076d66b | [
"MIT"
] | null | null | null | 05/scrum/board/views.py | mezklador/lightweight-django | 9ab23cdc76cfd44f7f76c4901bbd77411076d66b | [
"MIT"
] | null | null | null | from django.contrib.auth import get_user_model
from rest_framework import authentication, permissions, viewsets, filters
from .forms import TaskFilter, SprintFilter
from .models import Sprint, Task
from .serializers import SprintSerializer, TaskSerializer, UserSerializer
#from django.shortcuts import render
User = ge... | 30.55 | 75 | 0.722313 |
783693de85093969592c5e60bd4509c7753a045e | 5,687 | py | Python | server/scripts/tracking_markers_class2.py | stoddabr/chairbot_ui_rework | 01419e004e37c5a33d5cdbf32fffcacfaea3952c | [
"Apache-2.0"
] | null | null | null | server/scripts/tracking_markers_class2.py | stoddabr/chairbot_ui_rework | 01419e004e37c5a33d5cdbf32fffcacfaea3952c | [
"Apache-2.0"
] | null | null | null | server/scripts/tracking_markers_class2.py | stoddabr/chairbot_ui_rework | 01419e004e37c5a33d5cdbf32fffcacfaea3952c | [
"Apache-2.0"
] | null | null | null | '''
tracking_markers_class
version: 2
changed from version 1/0 to allow for an arbitrary
number of chairs. Instead of verbosely declaring every
chair as a variable in the class, now there is an array
of filenames saved in the self.filenames variable
TODO write a full description of the class
TODO understand the gemoe... | 38.167785 | 114 | 0.497802 |
783728555589f370b870d328e9622c595d23d1ec | 49,243 | py | Python | tests/functional/rest/test_client.py | terrorizer1980/copra | 2f1262aba63ab70e80b171624da04d7f19829ddf | [
"MIT"
] | 48 | 2018-07-09T00:58:35.000Z | 2021-11-14T01:31:21.000Z | tests/functional/rest/test_client.py | terrorizer1980/copra | 2f1262aba63ab70e80b171624da04d7f19829ddf | [
"MIT"
] | 9 | 2018-08-19T14:55:36.000Z | 2022-03-28T18:44:11.000Z | tests/functional/rest/test_client.py | terrorizer1980/copra | 2f1262aba63ab70e80b171624da04d7f19829ddf | [
"MIT"
] | 17 | 2018-11-11T23:12:15.000Z | 2022-01-24T18:28:20.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Functional tests for `copra.rest.Client` class.
Without any additional user input, this module will test all of the
unauthenticated methods of the copra.rest.Client.
An API key for the Coinbase Pro sandbox is required to test the authenticated
methods. The key informa... | 43.539346 | 121 | 0.555653 |
783a2f85cb3ddcf8a057c67d489ad895ca8daf6d | 22,071 | py | Python | img_proc/multiThread.py | carbo-T/TF | 56ebfc253615b22fc3a55ba5e952837c47bf85cf | [
"MIT"
] | 1 | 2018-11-01T04:16:58.000Z | 2018-11-01T04:16:58.000Z | img_proc/multiThread.py | carbo-T/TF | 56ebfc253615b22fc3a55ba5e952837c47bf85cf | [
"MIT"
] | null | null | null | img_proc/multiThread.py | carbo-T/TF | 56ebfc253615b22fc3a55ba5e952837c47bf85cf | [
"MIT"
] | null | null | null | import tensorflow as tf
import numpy as np
import threading
import time
import os
import preprocessing
import mnist_inference
import matplotlib.pyplot as plt
# ********** queue operation ***********
# tf.train.Coordinator enable thread synchronization
# request_stop, should_stop, join
# coord = tf.train.Coordinat... | 38.857394 | 124 | 0.620905 |
783abddbbaac7a5863b31798d5073653260d0536 | 589 | py | Python | course_code/section2/1_variables_methods.py | KhrulSergey/AutomatedTesting_233 | f1341cc0370cae5dd40230c4955695937478353d | [
"Apache-2.0"
] | 2 | 2019-10-03T17:26:17.000Z | 2021-05-09T01:00:55.000Z | course_code/section2/1_variables_methods.py | KhrulSergey/AutomatedTesting_233 | f1341cc0370cae5dd40230c4955695937478353d | [
"Apache-2.0"
] | null | null | null | course_code/section2/1_variables_methods.py | KhrulSergey/AutomatedTesting_233 | f1341cc0370cae5dd40230c4955695937478353d | [
"Apache-2.0"
] | null | null | null | a = 5
b = 10
my_variable = 56
any_variable_name = 100
string_variable = "hello"
single_quotes = 'strings can have single quotes'
print(string_variable)
print(my_variable)
# print is a method with one parameterwhat we want to print
my_print_method(string_variable)
result = my_multiplication_method(a, b)
print(resul... | 21.035714 | 72 | 0.78438 |
783b48d84652cbdcc60ffdd3fc32263e25785f6e | 8,558 | py | Python | V1_0_0_0/MCP79410_SetAndReadRegisters.py | MatteoDestro/RaspberryPi_MCP79410_RTCC | a859e0ecb302e2092f2e8cbd887934f89ca13703 | [
"BSD-2-Clause"
] | null | null | null | V1_0_0_0/MCP79410_SetAndReadRegisters.py | MatteoDestro/RaspberryPi_MCP79410_RTCC | a859e0ecb302e2092f2e8cbd887934f89ca13703 | [
"BSD-2-Clause"
] | null | null | null | V1_0_0_0/MCP79410_SetAndReadRegisters.py | MatteoDestro/RaspberryPi_MCP79410_RTCC | a859e0ecb302e2092f2e8cbd887934f89ca13703 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2015 root <root@RaspTest>
#
# 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 License, or
# (at your op... | 35.807531 | 135 | 0.600958 |
783bb11d2391b6226fce14c78a5da061c50123e6 | 1,233 | py | Python | app/urls.py | Pcyuzuzo/Hood | 75efe7a54fdc11187b8a86926c6fe46b01dd9aab | [
"Unlicense",
"MIT"
] | null | null | null | app/urls.py | Pcyuzuzo/Hood | 75efe7a54fdc11187b8a86926c6fe46b01dd9aab | [
"Unlicense",
"MIT"
] | null | null | null | app/urls.py | Pcyuzuzo/Hood | 75efe7a54fdc11187b8a86926c6fe46b01dd9aab | [
"Unlicense",
"MIT"
] | null | null | null | from django.conf import settings
from django.conf.urls.static import static
from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.homepage, name='homepage'),
url(r'^add/hood$', views.add_hood, name='add_hood'),
url(r'^join_hood/(\d+)', views.join_hood, name='join_hood'),
... | 41.1 | 84 | 0.643147 |
783bf8c2114ec6e34d92087a795c3fb75798c401 | 11,590 | py | Python | braviaproapi/bravia/appcontrol.py | BrandonDusseau/braviaproapi | ebe7bebde9b68d685ece16ed88f446507567b0c0 | [
"MIT"
] | 2 | 2019-06-27T19:19:21.000Z | 2020-07-19T11:32:17.000Z | braviaproapi/bravia/appcontrol.py | BrandonDusseau/braviaproapi | ebe7bebde9b68d685ece16ed88f446507567b0c0 | [
"MIT"
] | 1 | 2020-07-18T19:22:42.000Z | 2020-10-07T17:05:36.000Z | braviaproapi/bravia/appcontrol.py | BrandonDusseau/braviaproapi | ebe7bebde9b68d685ece16ed88f446507567b0c0 | [
"MIT"
] | null | null | null | import html
from enum import Enum
from .errors import HttpError, ApiError, InternalError, AppLaunchError, NoFocusedTextFieldError, \
ErrorCode, get_error_message, EncryptionError
from .util import coalesce_none_or_empty
| 37.62987 | 120 | 0.620535 |
783c27c2c195c23e08f2ce49ae45d7ad5aad7947 | 1,513 | py | Python | src/data/subreddits.py | ConorSheehan1/YouTubeTimestampRedditBot | 5f36d96f6dca2d5f42b4c4d121008097c1c4f537 | [
"MIT"
] | 1 | 2021-12-31T15:38:55.000Z | 2021-12-31T15:38:55.000Z | src/data/subreddits.py | ConorSheehan1/YouTubeTimestampRedditBot | 5f36d96f6dca2d5f42b4c4d121008097c1c4f537 | [
"MIT"
] | 1 | 2022-01-17T18:48:12.000Z | 2022-01-17T18:48:12.000Z | src/data/subreddits.py | ConorSheehan1/YouTubeTimestampRedditBot | 5f36d96f6dca2d5f42b4c4d121008097c1c4f537 | [
"MIT"
] | null | null | null | # https://www.reddit.com/wiki/bottiquette omit /r/suicidewatch and /r/depression
# note: lowercase for case insensitive match
blacklist = [
# https://www.reddit.com/r/Bottiquette/wiki/robots_txt_json
"anime",
"asianamerican",
"askhistorians",
"askscience",
"askreddit",
"aww",
"chicagosu... | 19.907895 | 80 | 0.595506 |
783c6e3dcbf1023809e12a0e989e924850829a01 | 281 | py | Python | management_utils/management_utils.py | singparvi/Photo-Transform-Application | 9f93aff236794f0f23b0826b65dcf91c7ddbc0b3 | [
"MIT"
] | null | null | null | management_utils/management_utils.py | singparvi/Photo-Transform-Application | 9f93aff236794f0f23b0826b65dcf91c7ddbc0b3 | [
"MIT"
] | null | null | null | management_utils/management_utils.py | singparvi/Photo-Transform-Application | 9f93aff236794f0f23b0826b65dcf91c7ddbc0b3 | [
"MIT"
] | null | null | null | """
cpu_data_loader.py - Loads all data in the ../../data/transcribed_stories directory
"""
import pathlib
import os.path as path
| 25.545455 | 101 | 0.686833 |
783cdb5d2f37cc23c9aa8d131d750c5ce1dd7b58 | 2,977 | py | Python | accentify.py | Delfad0r/accentify | 83a20a9a0c23328e1f2c1225e39dcd243711ba14 | [
"Apache-2.0"
] | null | null | null | accentify.py | Delfad0r/accentify | 83a20a9a0c23328e1f2c1225e39dcd243711ba14 | [
"Apache-2.0"
] | null | null | null | accentify.py | Delfad0r/accentify | 83a20a9a0c23328e1f2c1225e39dcd243711ba14 | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/env python3
import argparse
from pynput import keyboard
import pyperclip
import sys
ACUTE_ACCENTS = ''
GRAVE_ACCENTS = ''
if __name__ == '__main__':
args = parse_args()
if args.shortcuts:
run(*args.shortcuts)
elif args.test:
run_test()
| 28.902913 | 88 | 0.571045 |
783e184c54f1db06b7ea583543c4cf885d8b04a4 | 1,315 | py | Python | web2py/applications/rip/modules/parseLogic.py | 2spmohanty/vcenter-automation | 1d10b765ef335087902b0194ed12a61e53807987 | [
"Apache-2.0"
] | 1 | 2019-10-02T13:25:03.000Z | 2019-10-02T13:25:03.000Z | web2py/applications/rip/modules/parseLogic.py | 2spmohanty/vcenter-automation | 1d10b765ef335087902b0194ed12a61e53807987 | [
"Apache-2.0"
] | null | null | null | web2py/applications/rip/modules/parseLogic.py | 2spmohanty/vcenter-automation | 1d10b765ef335087902b0194ed12a61e53807987 | [
"Apache-2.0"
] | 1 | 2021-11-05T09:51:02.000Z | 2021-11-05T09:51:02.000Z | import re
analysis_array = {'hvc': '151: 0x10b8 (4,280) ',
'applmgmt': '76: 0x7a0 (1,952) ', 'statsmonitor': '0: 0x0 (0) ', 'analytics': '643: 0x5cb8 (23,736) ',
'rhttpproxy': '0: 0x0 (0) ', 'vapi-endpoint': '912: 0x6d60 (28,000) ', 'vsm': '202: 0x1d90 (7,568) ',
'vmonapi': '71: 0x6a8 (1,7... | 65.75 | 128 | 0.592395 |
783e9065ca1a19b81a176237a669e9dd2e0e3bcc | 7,860 | py | Python | controller.py | SubmergedTree/SmartMirror | c822469f0d4340a31873fe623290cf4bcd745b5f | [
"MIT"
] | null | null | null | controller.py | SubmergedTree/SmartMirror | c822469f0d4340a31873fe623290cf4bcd745b5f | [
"MIT"
] | 1 | 2021-10-12T22:04:20.000Z | 2021-10-12T22:04:20.000Z | controller.py | SubmergedTree/SmartMirror | c822469f0d4340a31873fe623290cf4bcd745b5f | [
"MIT"
] | null | null | null | from api.rest import RestApi
from api.rest_impl import RestBroker, RestImplSignal
from database.dao import UserDao, PictureDao, WidgetDao, WidgetUserDao, DBException
from recognition.camera import Camera, WhichCamera
from recognition.recognition import Scheduler
from recognition.learning_error_exception import Learning... | 43.666667 | 133 | 0.688804 |
78403f0f1a2aa080076eeb2cfab7ac193f175981 | 5,146 | py | Python | natpn/model/lightning_module.py | borchero/natural-posterior-network | c1174b8d6d484179d42724dfe20b513fe5569aee | [
"MIT"
] | 22 | 2022-01-24T15:17:53.000Z | 2022-03-31T23:05:27.000Z | natpn/model/lightning_module.py | borchero/natural-posterior-network | c1174b8d6d484179d42724dfe20b513fe5569aee | [
"MIT"
] | null | null | null | natpn/model/lightning_module.py | borchero/natural-posterior-network | c1174b8d6d484179d42724dfe20b513fe5569aee | [
"MIT"
] | 1 | 2022-01-30T15:44:14.000Z | 2022-01-30T15:44:14.000Z | # pylint: disable=abstract-method
from typing import Any, cast, Dict, List, Tuple, Union
import pytorch_lightning as pl
import torch
from pytorch_lightning.callbacks import EarlyStopping
from torch import optim
from torchmetrics import Accuracy, MeanSquaredError
import natpn.distributions as D
from natpn.datasets impor... | 42.528926 | 96 | 0.647299 |
7841b220284cba0896edfacdffd8303e8fbaac07 | 9,690 | py | Python | tests/test_cdigraphlayout.py | idekerlab/cdigraphlayout | 59684fd009e9e43db2b951e130308f014a46e379 | [
"BSD-3-Clause"
] | null | null | null | tests/test_cdigraphlayout.py | idekerlab/cdigraphlayout | 59684fd009e9e43db2b951e130308f014a46e379 | [
"BSD-3-Clause"
] | null | null | null | tests/test_cdigraphlayout.py | idekerlab/cdigraphlayout | 59684fd009e9e43db2b951e130308f014a46e379 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_cdigraphlayout
----------------------------------
Tests for `cdigraphlayout` module.
"""
import os
import sys
import unittest
import io
import tempfile
import shutil
import json
import ndex2
from cdigraphlayout import cdigraphlayoutcmd
if __name__ == '__main_... | 40.041322 | 83 | 0.554076 |
784211e3b21a54cfdf05a916cd9479da7d887fac | 3,325 | py | Python | uninas/utils/generate/networks/manually/resnet.py | cogsys-tuebingen/uninas | 06729b9cf517ec416fb798ae387c5bd9c3a278ac | [
"MIT"
] | 18 | 2020-11-22T16:03:08.000Z | 2022-03-15T12:11:46.000Z | uninas/utils/generate/networks/manually/resnet.py | cogsys-tuebingen/uninas | 06729b9cf517ec416fb798ae387c5bd9c3a278ac | [
"MIT"
] | 2 | 2022-01-04T08:10:17.000Z | 2022-01-05T08:13:14.000Z | uninas/utils/generate/networks/manually/resnet.py | cogsys-tuebingen/uninas | 06729b9cf517ec416fb798ae387c5bd9c3a278ac | [
"MIT"
] | 6 | 2021-03-08T07:08:52.000Z | 2022-02-24T12:00:43.000Z | """
Deep Residual Learning for Image Recognition
https://arxiv.org/abs/1512.03385
"""
from typing import Type
import torch.nn as nn
from uninas.modules.networks.stackedcells import StackedCellsNetworkBody
from uninas.modules.stems.cnn import ConvStem
from uninas.modules.layers.cnn import PoolingLayer
from uninas.modul... | 44.932432 | 117 | 0.70015 |
7842a92d235730405bb25fd745760bfb2e9c2f54 | 3,452 | py | Python | paymentpoller/balanceupdater.py | tahv0/etherneumpaymentbot | 1485f6b069f698f5d29045414a4ebd4b2a924935 | [
"BSD-2-Clause"
] | 2 | 2018-01-17T06:35:52.000Z | 2019-12-16T16:02:08.000Z | paymentpoller/balanceupdater.py | tahv0/etherneumpaymentbot | 1485f6b069f698f5d29045414a4ebd4b2a924935 | [
"BSD-2-Clause"
] | null | null | null | paymentpoller/balanceupdater.py | tahv0/etherneumpaymentbot | 1485f6b069f698f5d29045414a4ebd4b2a924935 | [
"BSD-2-Clause"
] | 3 | 2019-01-04T17:55:17.000Z | 2021-07-16T22:58:42.000Z | #!/usr/bin/env python
import requests
from datetime import datetime
from config_parser.config_parser import get_config_value
from db.models import AccountBalance, Account, Session
from sqlalchemy.orm import eagerload
| 60.561404 | 127 | 0.557068 |