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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
69a520f1866db12311093e17ff6200b4515c5bbf | 33,413 | py | Python | zss_debug_pb2.py | StopPointTeam/APF-RRT | 2c68432d888b0886138c169e9fdcdfe0e41ca974 | [
"MIT"
] | null | null | null | zss_debug_pb2.py | StopPointTeam/APF-RRT | 2c68432d888b0886138c169e9fdcdfe0e41ca974 | [
"MIT"
] | null | null | null | zss_debug_pb2.py | StopPointTeam/APF-RRT | 2c68432d888b0886138c169e9fdcdfe0e41ca974 | [
"MIT"
] | null | null | null | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: zss_debug.proto
from google.protobuf import descriptor_pb2
from google.protobuf import symbol_database as _symbol_database
from google.protobuf import reflection as _reflection
from google.protobuf import message as _message
from google.protobuf impo... | 38.186286 | 3,019 | 0.671864 |
69a62a85476caabb3a971fbe3016b560f4044dd1 | 1,055 | py | Python | python2.7libs/hammer_tools/material_library/image.py | anvdev/Hammer-Tools | 0211ec837da6754e537c98624ecd07c23abab28e | [
"Apache-2.0"
] | 19 | 2019-10-09T13:48:11.000Z | 2021-06-14T01:25:23.000Z | python2.7libs/hammer_tools/material_library/image.py | anvdev/Hammer-Tools | 0211ec837da6754e537c98624ecd07c23abab28e | [
"Apache-2.0"
] | 219 | 2019-10-08T14:44:48.000Z | 2021-06-19T06:27:46.000Z | python2.7libs/hammer_tools/material_library/image.py | anvdev/Hammer-Tools | 0211ec837da6754e537c98624ecd07c23abab28e | [
"Apache-2.0"
] | 3 | 2020-02-14T06:18:06.000Z | 2020-11-25T20:47:06.000Z | import os
import subprocess
import tempfile
try:
from PyQt5.QtCore import QBuffer, QIODevice, Qt
from PyQt5.QtGui import QImage
except ImportError:
from PySide2.QtCore import QBuffer, QIODevice, Qt
from PySide2.QtGui import QImage
from .texture_format import TextureFormat
| 26.375 | 95 | 0.650237 |
69a7b9c751b9a5826861e0006bc21e2f11a6d258 | 4,324 | py | Python | pypipe/apps/utils/fill_treectrl.py | AGrigis/pypipe | a77fc2c81cb469535b650c79718f811c5c056238 | [
"CECILL-B"
] | null | null | null | pypipe/apps/utils/fill_treectrl.py | AGrigis/pypipe | a77fc2c81cb469535b650c79718f811c5c056238 | [
"CECILL-B"
] | null | null | null | pypipe/apps/utils/fill_treectrl.py | AGrigis/pypipe | a77fc2c81cb469535b650c79718f811c5c056238 | [
"CECILL-B"
] | null | null | null | ##########################################################################
# PyPipe - Copyright (C) AGrigis, 2017
# Distributed under the terms of the CeCILL-B license, as published by
# the CEA-CNRS-INRIA. Refer to the LICENSE file or to
# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
# for details.
####... | 34.592 | 79 | 0.623034 |
69a8de3030cd088d725760a1b68e9101a4f8a5ca | 7,945 | py | Python | lib/crossmatching.py | leejjoon/pystilts | 33980bf9e47d17bb981cce6b2861c6c750f245ba | [
"MIT"
] | 4 | 2020-01-05T22:30:54.000Z | 2022-02-12T11:47:07.000Z | lib/crossmatching.py | leejjoon/pystilts | 33980bf9e47d17bb981cce6b2861c6c750f245ba | [
"MIT"
] | 1 | 2019-07-03T21:41:03.000Z | 2019-07-05T18:08:01.000Z | lib/crossmatching.py | leejjoon/pystilts | 33980bf9e47d17bb981cce6b2861c6c750f245ba | [
"MIT"
] | 4 | 2019-07-12T10:08:13.000Z | 2021-05-27T15:57:48.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on 02/06/17 at 2:24 PM
@author: neil
Program description here
Version 0.0.0
"""
from . import constants
from . import utils
from astropy import units as u
# =============================================================================
# Define variables
#... | 40.126263 | 81 | 0.524984 |
69a8f7469bd91e8fef4f395d57b80e477d69a8db | 71 | py | Python | gather/glasgowpicarro/__init__.py | openghg/gather | 0096cfe66b0093cdd294fa2a67c060d7fc28d2fa | [
"Apache-2.0"
] | null | null | null | gather/glasgowpicarro/__init__.py | openghg/gather | 0096cfe66b0093cdd294fa2a67c060d7fc28d2fa | [
"Apache-2.0"
] | null | null | null | gather/glasgowpicarro/__init__.py | openghg/gather | 0096cfe66b0093cdd294fa2a67c060d7fc28d2fa | [
"Apache-2.0"
] | null | null | null | from ._process import process_pipeline
__all__ = ["process_pipeline"]
| 17.75 | 38 | 0.802817 |
69a9022124889eb67322e46007049fa8b6adf0de | 7,626 | py | Python | underworld/conditions/_conditions.py | longgangfan/underworld2 | 5c8acc17fa4d97e86a62b13b8bfb2af6e81a8ee4 | [
"CC-BY-4.0"
] | 116 | 2015-09-28T10:30:55.000Z | 2022-03-22T04:12:38.000Z | underworld/conditions/_conditions.py | longgangfan/underworld2 | 5c8acc17fa4d97e86a62b13b8bfb2af6e81a8ee4 | [
"CC-BY-4.0"
] | 561 | 2015-09-29T06:05:50.000Z | 2022-03-22T23:37:29.000Z | underworld/conditions/_conditions.py | longgangfan/underworld2 | 5c8acc17fa4d97e86a62b13b8bfb2af6e81a8ee4 | [
"CC-BY-4.0"
] | 68 | 2015-12-14T21:57:46.000Z | 2021-08-25T04:54:26.000Z | ##~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~##
## ##
## This file forms part of the Underworld geophysics modelling application. ##
## ... | 46.5 | 133 | 0.642014 |
69a9b216e3287800556dfe1beff0b79e23f28b95 | 589 | py | Python | tests/integration/cli/test_test.py | Ninjagod1251/ape | 9b40ef15f25362ddb83cb6d571d60cab041fce4a | [
"Apache-2.0"
] | null | null | null | tests/integration/cli/test_test.py | Ninjagod1251/ape | 9b40ef15f25362ddb83cb6d571d60cab041fce4a | [
"Apache-2.0"
] | null | null | null | tests/integration/cli/test_test.py | Ninjagod1251/ape | 9b40ef15f25362ddb83cb6d571d60cab041fce4a | [
"Apache-2.0"
] | null | null | null | from .utils import skip_projects_except
| 34.647059 | 84 | 0.73854 |
69aa25aac3f98986c9dae15f4594f5b7600a1d64 | 302 | py | Python | binary-list-generator.py | rj011/Hacktoberfest2021-4 | 0aa981d4ba5e71c86cc162d34fe57814050064c2 | [
"MIT"
] | 41 | 2021-10-03T16:03:52.000Z | 2021-11-14T18:15:33.000Z | binary-list-generator.py | rj011/Hacktoberfest2021-4 | 0aa981d4ba5e71c86cc162d34fe57814050064c2 | [
"MIT"
] | 175 | 2021-10-03T10:47:31.000Z | 2021-10-20T11:55:32.000Z | binary-list-generator.py | rj011/Hacktoberfest2021-4 | 0aa981d4ba5e71c86cc162d34fe57814050064c2 | [
"MIT"
] | 208 | 2021-10-03T11:24:04.000Z | 2021-10-31T17:27:59.000Z | # Necro()
# sidmishra94540@gmail.com
if __name__ == '__main__':
print(binaryGenerator(int(input()))) | 23.230769 | 40 | 0.566225 |
69aa3b2782a1e4f6d886bd6026cd8fd3d7967980 | 403 | py | Python | inferlo/testing/experiment_runner_test.py | InferLO/inferlo | a65efce721d7f99d2f274dd94a1aaf7ca159e944 | [
"Apache-2.0"
] | 1 | 2022-01-27T18:44:07.000Z | 2022-01-27T18:44:07.000Z | inferlo/testing/experiment_runner_test.py | InferLO/inferlo | a65efce721d7f99d2f274dd94a1aaf7ca159e944 | [
"Apache-2.0"
] | 3 | 2022-01-23T18:02:30.000Z | 2022-01-27T23:10:51.000Z | inferlo/testing/experiment_runner_test.py | InferLO/inferlo | a65efce721d7f99d2f274dd94a1aaf7ca159e944 | [
"Apache-2.0"
] | 1 | 2021-09-03T06:12:57.000Z | 2021-09-03T06:12:57.000Z | # Copyright (c) The InferLO authors. All rights reserved.
# Licensed under the Apache License, Version 2.0 - see LICENSE.
from inferlo.testing import ExperimentRunner
| 28.785714 | 63 | 0.682382 |
69aa3ee89e74fa93b0d496cda02d89ca7460fa6f | 36,688 | py | Python | py2sqlite/py2sql.py | ehorTL/py2sqlite | ff22f7475ff12182a0b976cfc321263d9eade1e5 | [
"MIT"
] | null | null | null | py2sqlite/py2sql.py | ehorTL/py2sqlite | ff22f7475ff12182a0b976cfc321263d9eade1e5 | [
"MIT"
] | null | null | null | py2sqlite/py2sql.py | ehorTL/py2sqlite | ff22f7475ff12182a0b976cfc321263d9eade1e5 | [
"MIT"
] | null | null | null | """
Module implements simple ORM for SQLite.
Module excludes using many-to-many and one-to-many relationships.
Trying to save the same object (update) with another aggregated object
will rewrite old object!
"""
import os
import sqlite3
from array import array
from inspect import *
import builtins
import sys
import lo... | 37.474974 | 118 | 0.605811 |
69aa6a9832bfa5efcd1c75e435948454112b6d04 | 4,480 | py | Python | azure-iot-device/azure/iot/device/provisioning/security/sk_security_client.py | olivakar/azure-iot-sdk-python | d8f2403030cf94510d381d8d5ac37af6e8d306f8 | [
"MIT"
] | 35 | 2018-12-01T05:42:30.000Z | 2021-03-10T12:23:41.000Z | azure-iot-device/azure/iot/device/provisioning/security/sk_security_client.py | olivakar/azure-iot-sdk-python | d8f2403030cf94510d381d8d5ac37af6e8d306f8 | [
"MIT"
] | 81 | 2018-11-20T20:01:43.000Z | 2019-09-06T23:57:17.000Z | azure-iot-device/azure/iot/device/provisioning/security/sk_security_client.py | olivakar/azure-iot-sdk-python | d8f2403030cf94510d381d8d5ac37af6e8d306f8 | [
"MIT"
] | 18 | 2019-03-19T18:53:43.000Z | 2021-01-10T09:47:24.000Z | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
"""This mo... | 50.909091 | 125 | 0.697321 |
69aae4b96943444731c2e46c740aea18d36b17e4 | 3,833 | py | Python | scripts/geodata/phrases/extraction.py | Fillr/libpostal | bce153188aff9fbe65aef12c3c639d8069e707fc | [
"MIT"
] | 3,489 | 2015-03-03T00:21:38.000Z | 2022-03-29T09:03:05.000Z | scripts/geodata/phrases/extraction.py | StephenHildebrand/libpostal | d8c9847c5686a1b66056e65128e1774f060ff36f | [
"MIT"
] | 488 | 2015-05-29T23:04:28.000Z | 2022-03-29T11:20:24.000Z | scripts/geodata/phrases/extraction.py | StephenHildebrand/libpostal | d8c9847c5686a1b66056e65128e1774f060ff36f | [
"MIT"
] | 419 | 2015-11-24T16:53:07.000Z | 2022-03-27T06:51:28.000Z | import csv
import six
from collections import defaultdict, Counter
from itertools import izip, islice
from geodata.text.tokenize import tokenize, token_types
from geodata.encoding import safe_encode
| 30.664 | 87 | 0.541612 |
69ab300f18ef0da610d86dd3cc10be0de5d8ac1c | 10,093 | py | Python | mestopy/mestopy.py | pyfar-seminar/mestopy | 5eed12b12bb58965fa70be591d774f149fcbf6e8 | [
"MIT"
] | null | null | null | mestopy/mestopy.py | pyfar-seminar/mestopy | 5eed12b12bb58965fa70be591d774f149fcbf6e8 | [
"MIT"
] | null | null | null | mestopy/mestopy.py | pyfar-seminar/mestopy | 5eed12b12bb58965fa70be591d774f149fcbf6e8 | [
"MIT"
] | null | null | null | from scipy.signal import oaconvolve
from pyfar import Signal
# Class to generate ref-Objects, that can bei part of the MeasurementChain
# Class for MeasurementChain as frame for Devices
| 34.803448 | 83 | 0.574458 |
69ab8661fbcc312d7db1662206a4daeec8008df9 | 482 | py | Python | setup.py | Chichilele/algorithms | acc7470631b3ced2a8e126011af1e6ff1ff62394 | [
"MIT"
] | null | null | null | setup.py | Chichilele/algorithms | acc7470631b3ced2a8e126011af1e6ff1ff62394 | [
"MIT"
] | null | null | null | setup.py | Chichilele/algorithms | acc7470631b3ced2a8e126011af1e6ff1ff62394 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name="algorithms",
version="0.1",
description="Implements a few optimisation algorithms",
long_description=long_description,
long_description_content_type="text/markdown",
ur... | 28.352941 | 83 | 0.728216 |
69abcd377de6101c4d2a16cd4c46eea6090dd3cc | 3,980 | py | Python | bifurcation.py | lisah298/PathReducer | 15f692c3a6712f26d64865d566ce4df5574c4a09 | [
"MIT"
] | null | null | null | bifurcation.py | lisah298/PathReducer | 15f692c3a6712f26d64865d566ce4df5574c4a09 | [
"MIT"
] | 1 | 2021-11-01T09:24:13.000Z | 2021-11-01T09:24:13.000Z | bifurcation.py | lisah298/PathReducer | 15f692c3a6712f26d64865d566ce4df5574c4a09 | [
"MIT"
] | null | null | null | import pandas as pd
import dimensionality_reduction_functions as dim_red
from plotting_functions import colored_line_plot, colored_line_and_scatter_plot, colored_line_plot_projected_data
# Number of PCA components
ndim = 3
####################################### EXAMPLE 4: CYCLOPROPYLIDENE BIFURCATION ###############... | 71.071429 | 173 | 0.687437 |
69ac02c93958a2c5e75638d8d378d755f3ed4ffb | 2,381 | py | Python | test/hummingbot/connector/exchange/bitfinex/test_bitfinex_api_order_book_data_source.py | BGTCapital/hummingbot | 2c50f50d67cedccf0ef4d8e3f4c8cdce3dc87242 | [
"Apache-2.0"
] | 3,027 | 2019-04-04T18:52:17.000Z | 2022-03-30T09:38:34.000Z | test/hummingbot/connector/exchange/bitfinex/test_bitfinex_api_order_book_data_source.py | BGTCapital/hummingbot | 2c50f50d67cedccf0ef4d8e3f4c8cdce3dc87242 | [
"Apache-2.0"
] | 4,080 | 2019-04-04T19:51:11.000Z | 2022-03-31T23:45:21.000Z | test/hummingbot/connector/exchange/bitfinex/test_bitfinex_api_order_book_data_source.py | BGTCapital/hummingbot | 2c50f50d67cedccf0ef4d8e3f4c8cdce3dc87242 | [
"Apache-2.0"
] | 1,342 | 2019-04-04T20:50:53.000Z | 2022-03-31T15:22:36.000Z | import asyncio
import json
from unittest import TestCase
from aioresponses import aioresponses
import hummingbot.connector.exchange.bitfinex.bitfinex_utils as utils
from hummingbot.connector.exchange.bitfinex import BITFINEX_REST_URL
from hummingbot.connector.exchange.bitfinex.bitfinex_api_order_book_data_source impo... | 38.403226 | 117 | 0.684586 |
69ac26e95480ef9ba55d71661068918c6ae8a979 | 2,445 | py | Python | pandas_loc_iloc.py | tseth92/pandas_experiments | ab26e0c6004546bea1ebdbe8807a6d4014189e64 | [
"MIT"
] | null | null | null | pandas_loc_iloc.py | tseth92/pandas_experiments | ab26e0c6004546bea1ebdbe8807a6d4014189e64 | [
"MIT"
] | null | null | null | pandas_loc_iloc.py | tseth92/pandas_experiments | ab26e0c6004546bea1ebdbe8807a6d4014189e64 | [
"MIT"
] | null | null | null | '''
This code compares the loc and iloc in pandas dataframe
'''
__author__ = "Tushar SEth"
__email__ = "tusharseth93@gmail.com"
import pandas as pd
import timeit
df_test = pd.DataFrame()
tlist = []
tlist2 = []
################ this code creates a dataframe df_test ##################
###############with two column... | 33.958333 | 73 | 0.521472 |
69ac2cf3f9092bced76304a2eff481f5a2f1681a | 900 | py | Python | lesson_6/task_2.py | ok-git/py_training | 76ac3a48c41ed0f7fe308a64aae6b8e447041f70 | [
"Apache-2.0"
] | null | null | null | lesson_6/task_2.py | ok-git/py_training | 76ac3a48c41ed0f7fe308a64aae6b8e447041f70 | [
"Apache-2.0"
] | null | null | null | lesson_6/task_2.py | ok-git/py_training | 76ac3a48c41ed0f7fe308a64aae6b8e447041f70 | [
"Apache-2.0"
] | null | null | null | """
Road (), : length (), width ().
. .
, . : **
, 1 * . .
: 20*5000*25*5 = 12500
"""
a = Road(5000, 20)
print(f' {a.calc()} .')
| 37.5 | 116 | 0.761111 |
69ac8493ca58590ab03c7e2d5c8b17f4c7d44722 | 2,897 | py | Python | cmsc_210/examples/lecture_07/war.py | mazelife/cmsc-210 | dbaa1604ef49bcfe5a70e09c17fbd243a8b80220 | [
"MIT"
] | null | null | null | cmsc_210/examples/lecture_07/war.py | mazelife/cmsc-210 | dbaa1604ef49bcfe5a70e09c17fbd243a8b80220 | [
"MIT"
] | 5 | 2022-01-16T23:30:12.000Z | 2022-01-30T23:03:21.000Z | cmsc_210/examples/lecture_07/war.py | mazelife/cmsc-210 | dbaa1604ef49bcfe5a70e09c17fbd243a8b80220 | [
"MIT"
] | null | null | null | from functools import total_ordering
from random import shuffle
FACE = ("Jack", "Queen", "King", "Ace")
SUIT = ("Club", "Spade", "Diamond", "Heart")
| 26.099099 | 82 | 0.548498 |
69acb4ac84d0426898b7a3cffed434b1a66dce6c | 1,191 | py | Python | paper/curve_context_acc.py | INK-USC/procedural-extraction | 6b53d8a03bdd24560e96960fd0eddeee9ff8bc6f | [
"Apache-2.0"
] | 5 | 2019-09-11T20:29:35.000Z | 2022-03-27T13:16:51.000Z | paper/curve_context_acc.py | INK-USC/procedural-extraction | 6b53d8a03bdd24560e96960fd0eddeee9ff8bc6f | [
"Apache-2.0"
] | null | null | null | paper/curve_context_acc.py | INK-USC/procedural-extraction | 6b53d8a03bdd24560e96960fd0eddeee9ff8bc6f | [
"Apache-2.0"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
from matplotlib.ticker import MaxNLocator
cz2 = (0.7, 0.7, 0.7)
cz = (0.3, 0.3, 0.3)
cy = (0.7, 0.4, 0.12)
ci = (0.1, 0.3, 0.5)
ct = (0.7, 0.2, 0.1)
ax = plt.figure(figsize=(5,4)).gca()
ax.xaxis.set_major_locator(MaxNLocator(integer=True))
ax.yaxis.grid(True)
ax.set_... | 24.306122 | 67 | 0.583543 |
69ad4f7f5bd628e678130664a2787d7ddc169bf0 | 3,079 | py | Python | Cartwheel/lib/Python26/Lib/site-packages/OpenGL/raw/GL/ATI/pn_triangles.py | MontyThibault/centre-of-mass-awareness | 58778f148e65749e1dfc443043e9fc054ca3ff4d | [
"MIT"
] | null | null | null | Cartwheel/lib/Python26/Lib/site-packages/OpenGL/raw/GL/ATI/pn_triangles.py | MontyThibault/centre-of-mass-awareness | 58778f148e65749e1dfc443043e9fc054ca3ff4d | [
"MIT"
] | null | null | null | Cartwheel/lib/Python26/Lib/site-packages/OpenGL/raw/GL/ATI/pn_triangles.py | MontyThibault/centre-of-mass-awareness | 58778f148e65749e1dfc443043e9fc054ca3ff4d | [
"MIT"
] | null | null | null | '''OpenGL extension ATI.pn_triangles
Overview (from the spec)
ATI_pn_triangles provides a path for enabling the GL to internally
tessellate input geometry into curved patches. The extension allows the
user to tune the amount of tessellation to be performed on each triangle as
a global state value. The inten... | 48.873016 | 116 | 0.815525 |
69ad7163f8d258608d0f58bb9ccc2e396ca4ee6f | 2,325 | py | Python | setup.py | Wi11iamDing/toad | 3b22cc9a5d83255d394da483ec47b0de5f862c07 | [
"MIT"
] | 1 | 2021-04-29T08:59:26.000Z | 2021-04-29T08:59:26.000Z | setup.py | lijihong111/toad | 3b22cc9a5d83255d394da483ec47b0de5f862c07 | [
"MIT"
] | null | null | null | setup.py | lijihong111/toad | 3b22cc9a5d83255d394da483ec47b0de5f862c07 | [
"MIT"
] | null | null | null | import os
import numpy as np
from setuptools import setup, find_packages, Extension
NAME = 'toad'
CURRENT_PATH = os.path.abspath(os.path.dirname(__file__))
VERSION_FILE = os.path.join(CURRENT_PATH, NAME, 'version.py')
setup(
name = NAME,
version = get_version(),
description = 'Toad is dedicated to f... | 28.012048 | 109 | 0.610753 |
69adc16bfc161b3aeeeb29f573076a958b052631 | 9,071 | py | Python | tvm_benchmark/test_resnet_inference.py | adwwsd/HAWQ | a8e40be0edd336b2554d88691b18ed51e7d32bf0 | [
"MIT"
] | null | null | null | tvm_benchmark/test_resnet_inference.py | adwwsd/HAWQ | a8e40be0edd336b2554d88691b18ed51e7d32bf0 | [
"MIT"
] | null | null | null | tvm_benchmark/test_resnet_inference.py | adwwsd/HAWQ | a8e40be0edd336b2554d88691b18ed51e7d32bf0 | [
"MIT"
] | null | null | null | import torch
import tvm
from tvm import autotvm
from tvm import relay
from tvm.contrib import download
from tvm.contrib.debugger import debug_runtime
from PIL import Image
import matplotlib.pyplot as plt
import numpy as np
import argparse
import os
from os.path import join, isfile
import sys
import json, requests
fro... | 40.86036 | 157 | 0.601698 |
69ae65d2b4f7488006dab65f0a909611be5333f5 | 2,061 | py | Python | felapps/apps/dataworkshop/dataworkshop.py | archman/felapps | 89532a592070d2a0cf07f0f2b4c723cbf1c1bd33 | [
"MIT"
] | 2 | 2018-04-01T14:37:39.000Z | 2021-03-12T04:16:12.000Z | felapps/apps/dataworkshop/dataworkshop.py | Archman/felapps | 89532a592070d2a0cf07f0f2b4c723cbf1c1bd33 | [
"MIT"
] | null | null | null | felapps/apps/dataworkshop/dataworkshop.py | Archman/felapps | 89532a592070d2a0cf07f0f2b4c723cbf1c1bd33 | [
"MIT"
] | 2 | 2016-07-10T11:14:33.000Z | 2019-07-06T05:42:10.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
DataWorkshop: application to handle data, e.g. generated from imageviewer
Author: Tong Zhang
Created: Sep. 23rd, 2015
"""
from ...utils import datautils
from ...utils import miscutils
from ...utils import funutils
from ...utils import resutils
import wx
import wx.lib... | 34.35 | 212 | 0.675885 |
69aeb1d75e0847f7d192e1d5f127d4458a56ea39 | 2,953 | py | Python | bayesian/auth.py | ameenfarooqi/fabric8-analytics-server | 6e34d8199d33223a25e33511c194679865a712ca | [
"Apache-2.0"
] | null | null | null | bayesian/auth.py | ameenfarooqi/fabric8-analytics-server | 6e34d8199d33223a25e33511c194679865a712ca | [
"Apache-2.0"
] | 14 | 2020-10-11T12:56:38.000Z | 2020-10-28T06:36:45.000Z | bayesian/auth.py | ameenfarooqi/fabric8-analytics-server | 6e34d8199d33223a25e33511c194679865a712ca | [
"Apache-2.0"
] | 19 | 2020-10-12T05:14:23.000Z | 2020-10-19T13:25:29.000Z | """Authorization token handling."""
import logging
from functools import wraps
from flask import g, request
from requests import get
from pydantic.error_wrappers import ValidationError
from bayesian.utility.user_utils import get_user, UserException, UserNotFoundException
from bayesian.utility.v2.sa_models import Header... | 40.452055 | 94 | 0.585168 |
69af023e0e9453a8bc99e8621f0b707e6285701a | 96 | py | Python | FLOW007.py | ankitpipalia/codechef-solutions | d10e7f15b74a11655b0e53953a8e2bc7efbf7377 | [
"MIT"
] | 1 | 2022-01-23T08:13:17.000Z | 2022-01-23T08:13:17.000Z | FLOW007.py | ankitpipalia/codechef-solutions | d10e7f15b74a11655b0e53953a8e2bc7efbf7377 | [
"MIT"
] | null | null | null | FLOW007.py | ankitpipalia/codechef-solutions | d10e7f15b74a11655b0e53953a8e2bc7efbf7377 | [
"MIT"
] | null | null | null | tcase = int(input())
while(tcase):
str= input() [::-1]
print(int(str))
tcase -= 1 | 12 | 23 | 0.510417 |
69b2168377003bbbd37472a46ea76cd577d96277 | 1,082 | py | Python | setup.py | ysatapathy23/TomoEncoders | 6f3f8c6dd088e4df968337e33a034a42d1f6c799 | [
"BSD-3-Clause"
] | null | null | null | setup.py | ysatapathy23/TomoEncoders | 6f3f8c6dd088e4df968337e33a034a42d1f6c799 | [
"BSD-3-Clause"
] | null | null | null | setup.py | ysatapathy23/TomoEncoders | 6f3f8c6dd088e4df968337e33a034a42d1f6c799 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@author: atekawade
"""
from setuptools import setup, find_packages
setup(
# Needed to silence warnings (and to be a worthwhile package)
name='tomo_encoders',
url='https://github.com/aniketkt/TomoEncoders',
author='Aniket Tekawade',
author_email='a... | 38.642857 | 250 | 0.682994 |
69b25733b76fd553592c2532c0ede532a6527a95 | 17,328 | py | Python | reports/executive_fullfilment_requests/entrypoint.py | ireneperezddc/connect-reports | 9a7d56255f3ea4989d28e45a759e04315eef5504 | [
"Apache-2.0"
] | 7 | 2021-03-31T13:45:10.000Z | 2022-02-08T05:48:21.000Z | reports/executive_fullfilment_requests/entrypoint.py | ireneperezddc/connect-reports | 9a7d56255f3ea4989d28e45a759e04315eef5504 | [
"Apache-2.0"
] | null | null | null | reports/executive_fullfilment_requests/entrypoint.py | ireneperezddc/connect-reports | 9a7d56255f3ea4989d28e45a759e04315eef5504 | [
"Apache-2.0"
] | 8 | 2021-01-14T13:57:52.000Z | 2022-02-18T09:12:52.000Z | # -*- coding: utf-8 -*-
#
# Copyright (c) 2021, CloudBlue
# All rights reserved.
#
import pathlib
from datetime import date
from tempfile import NamedTemporaryFile
from collections import namedtuple
import math
import copy
from connect.client import R
from plotly import graph_objects as go
from ..utils import (
c... | 32.029575 | 100 | 0.590028 |
69b4c48501471d49ec2d4fd4b79c4ecc8adb3282 | 204 | py | Python | util/data/gen/BloonsTD6.exe.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | util/data/gen/BloonsTD6.exe.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | util/data/gen/BloonsTD6.exe.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | symbols = []
exports = [{'type': 'function', 'name': 'AmdPowerXpressRequestHighPerformance', 'address': '0x7ff66dd14004'}, {'type': 'function', 'name': 'NvOptimusEnablement', 'address': '0x7ff66dd14000'}] | 102 | 191 | 0.70098 |
69b54d1f2fc387e83bb92bd862115b2d1c6f2876 | 7,728 | py | Python | ROS/src/spiderplan_proxy/src/spiderplan_proxy.py | uwe-koeckemann/SpiderPlan | ae8666967ee9e4d3563c43934823f65e72f1d9ce | [
"MIT"
] | null | null | null | ROS/src/spiderplan_proxy/src/spiderplan_proxy.py | uwe-koeckemann/SpiderPlan | ae8666967ee9e4d3563c43934823f65e72f1d9ce | [
"MIT"
] | null | null | null | ROS/src/spiderplan_proxy/src/spiderplan_proxy.py | uwe-koeckemann/SpiderPlan | ae8666967ee9e4d3563c43934823f65e72f1d9ce | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#Copyright (c) 2015 Uwe Kckemann <uwe.kockemann@oru.se>
#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 li... | 29.38403 | 118 | 0.749482 |
69b6e34070f0bb19eb726399767000b584136a44 | 6,979 | py | Python | components/gpio_control/GPIODevices/simple_button.py | steffakasid/RPi-Jukebox-RFID | 33520f81837710d88fa849c033676f274ebf4b59 | [
"MIT"
] | 1,010 | 2017-03-09T10:36:41.000Z | 2022-03-31T01:23:47.000Z | components/gpio_control/GPIODevices/simple_button.py | steffakasid/RPi-Jukebox-RFID | 33520f81837710d88fa849c033676f274ebf4b59 | [
"MIT"
] | 1,205 | 2017-06-08T11:12:47.000Z | 2022-03-27T19:02:06.000Z | components/gpio_control/GPIODevices/simple_button.py | steffakasid/RPi-Jukebox-RFID | 33520f81837710d88fa849c033676f274ebf4b59 | [
"MIT"
] | 421 | 2017-05-13T19:39:57.000Z | 2022-03-27T21:18:03.000Z | import time
from signal import pause
import logging
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
logger = logging.getLogger(__name__)
map_edge_parse = {'falling':GPIO.FALLING, 'rising':GPIO.RISING, 'both':GPIO.BOTH}
map_pull_parse = {'pull_up':GPIO.PUD_UP, 'pull_down':GPIO.PUD_DOWN, 'pull_off':GPIO.PUD_OFF}
map_edg... | 38.136612 | 165 | 0.649233 |
69b843ce0465649e724dde4ea3055810a4e4c8f5 | 10,308 | py | Python | pyatdllib/ui/immaculater.py | lisagorewitdecker/immaculater | fe46d282ae1d6325d67ebcf8f2b3d3b95580d5e7 | [
"Apache-2.0"
] | null | null | null | pyatdllib/ui/immaculater.py | lisagorewitdecker/immaculater | fe46d282ae1d6325d67ebcf8f2b3d3b95580d5e7 | [
"Apache-2.0"
] | null | null | null | pyatdllib/ui/immaculater.py | lisagorewitdecker/immaculater | fe46d282ae1d6325d67ebcf8f2b3d3b95580d5e7 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
"""A command-line interface to pyatdl, yet another to-do list.
The most important command is 'help'.
The key notions are Action, Context, Folder, and Project. The commands use the
filesystem idiom. Actions and Contexts are like regular files. Projects and
Folders are like directories.
This was the... | 31.048193 | 110 | 0.695479 |
69b88545c388c1a97049f68a3c5994f40ec7a709 | 426 | py | Python | setup.py | raghavsub/gtkpass | 1361e1d3204cfc8d51e6027a4f76d038a1ee5d43 | [
"MIT"
] | 1 | 2017-10-30T21:37:06.000Z | 2017-10-30T21:37:06.000Z | setup.py | raghavsub/gtkpass | 1361e1d3204cfc8d51e6027a4f76d038a1ee5d43 | [
"MIT"
] | 10 | 2017-08-07T17:51:54.000Z | 2017-11-07T17:17:39.000Z | setup.py | raghavsub/gtkpass | 1361e1d3204cfc8d51e6027a4f76d038a1ee5d43 | [
"MIT"
] | null | null | null | from setuptools import setup
setup(name='gtkpass',
version='0.2.7',
description='A GTK+ 3 program for the standard unix password manager',
url='http://github.com/raghavsub/gtkpass',
author='Raghav Subramaniam',
author_email='raghavs511@gmail.com',
license='MIT',
packages=['gtk... | 32.769231 | 76 | 0.661972 |
69b8d80a3ae8551bbbe6e3727e00151e698e746d | 2,556 | py | Python | restApi/resources/rides.py | Kitingu/restplus | f9f5d36f376b08bed4305020259f2be7d689705a | [
"MIT"
] | null | null | null | restApi/resources/rides.py | Kitingu/restplus | f9f5d36f376b08bed4305020259f2be7d689705a | [
"MIT"
] | 5 | 2019-10-21T17:05:46.000Z | 2021-06-01T22:35:47.000Z | restApi/resources/rides.py | Kitingu/restplus | f9f5d36f376b08bed4305020259f2be7d689705a | [
"MIT"
] | 1 | 2018-09-04T14:17:43.000Z | 2018-09-04T14:17:43.000Z | from flask_restplus import Resource, fields, Namespace
from restApi.models.rides import Rides
from restApi.helpers.ride_helpers import RideParser
from .auth import token_required
Ride_object = Rides()
ride_api = Namespace("rides", description="this are routes that allow users to create get or delete a ride")
ride_of... | 36 | 117 | 0.586072 |
69b8ea15180398bc6ee7cd290eed58c81d9257b6 | 27,827 | py | Python | services/ui_backend_service/tests/integration_tests/tasks_test.py | runsascoded/metaflow-service | ac7770dfeae17fd060129d408fa3bb472fc00b86 | [
"Apache-2.0"
] | 103 | 2019-12-04T04:41:08.000Z | 2022-03-29T16:20:45.000Z | services/ui_backend_service/tests/integration_tests/tasks_test.py | runsascoded/metaflow-service | ac7770dfeae17fd060129d408fa3bb472fc00b86 | [
"Apache-2.0"
] | 42 | 2019-12-16T23:15:44.000Z | 2022-02-18T17:33:32.000Z | services/ui_backend_service/tests/integration_tests/tasks_test.py | valayDave/metaflow-service | 65e19aef268e9e707522ee0695fd4ebaee42aa69 | [
"Apache-2.0"
] | 36 | 2019-12-12T17:46:46.000Z | 2022-01-21T04:53:24.000Z | import pytest
import time
from .utils import (
init_app, init_db, clean_db,
add_flow, add_run, add_step, add_task, add_artifact,
_test_list_resources, _test_single_resource, add_metadata, get_heartbeat_ts
)
pytestmark = [pytest.mark.integration_tests]
# Fixtures begin
# Fixtures end
# Te... | 47.084602 | 212 | 0.71215 |
69bc563b00c3a0dca8969daf6eb573ab788fb25a | 2,033 | py | Python | apps/my_app/handlers.py | opaniagu/fastapi_mongodb | 2a58c89a16efca8f656cc64d923e1eecb4120a80 | [
"MIT"
] | null | null | null | apps/my_app/handlers.py | opaniagu/fastapi_mongodb | 2a58c89a16efca8f656cc64d923e1eecb4120a80 | [
"MIT"
] | null | null | null | apps/my_app/handlers.py | opaniagu/fastapi_mongodb | 2a58c89a16efca8f656cc64d923e1eecb4120a80 | [
"MIT"
] | null | null | null | import datetime
import fastapi
import pymongo
import pymongo.errors
import pymongo.results
from apps.common.enums import CodeAudiences
from apps.common.handlers import PasswordsHandler, TokensHandler
from fastapi_mongodb.exceptions import HandlerException, RepositoryException
from fastapi_mongodb.handlers... | 35.051724 | 119 | 0.745696 |
69bda50be48c89c9d6e09da95c86cfb87230b936 | 25,971 | py | Python | trainer.py | icrdr/3D-UNet-Renal-Anatomy-Extraction | 50b16151730ec7868b3d3482e4db31e4c1e25412 | [
"MIT"
] | null | null | null | trainer.py | icrdr/3D-UNet-Renal-Anatomy-Extraction | 50b16151730ec7868b3d3482e4db31e4c1e25412 | [
"MIT"
] | null | null | null | trainer.py | icrdr/3D-UNet-Renal-Anatomy-Extraction | 50b16151730ec7868b3d3482e4db31e4c1e25412 | [
"MIT"
] | null | null | null | import torch
from torch.optim import lr_scheduler
from tqdm import tqdm
from torchsummary import summary
from torch.utils.tensorboard import SummaryWriter
from apex import amp
from loss import dice
from pathlib import Path
from data import CaseDataset, load_case, save_pred, \
orient_crop_case, regions_crop_case, re... | 36.020804 | 91 | 0.534558 |
69bf0e6bb6725641c106635237f21305eb007c18 | 8,285 | py | Python | workers/standard_methods.py | mahmoudthabit/augur | 0370dc983279ad80bff3f731a1a65ca6c8d27245 | [
"MIT"
] | null | null | null | workers/standard_methods.py | mahmoudthabit/augur | 0370dc983279ad80bff3f731a1a65ca6c8d27245 | [
"MIT"
] | null | null | null | workers/standard_methods.py | mahmoudthabit/augur | 0370dc983279ad80bff3f731a1a65ca6c8d27245 | [
"MIT"
] | null | null | null | """ Helper methods constant across all workers """
import requests, datetime, time
import sqlalchemy as s
import pandas as pd
| 44.783784 | 159 | 0.646952 |
69c0d64af0daa3c05b8a8e97e012bb20be7a3134 | 147 | py | Python | study/python-brasil/exercises/sequential-structure/sequential-structure - 006.py | gustavomarquezinho/python | e36779aa5c4bfaf88c587f05db5bd447fd41e4a2 | [
"MIT"
] | null | null | null | study/python-brasil/exercises/sequential-structure/sequential-structure - 006.py | gustavomarquezinho/python | e36779aa5c4bfaf88c587f05db5bd447fd41e4a2 | [
"MIT"
] | null | null | null | study/python-brasil/exercises/sequential-structure/sequential-structure - 006.py | gustavomarquezinho/python | e36779aa5c4bfaf88c587f05db5bd447fd41e4a2 | [
"MIT"
] | null | null | null | # 006 - Faa um programa que pea o raio de um crculo, calcule e mostre sua rea.
print(f'rea: {3.14 * pow(float(input("Raio crculo: ")), 2)}') | 49 | 82 | 0.673469 |
69c0ea03d21d79afcf9d113b44197d452321d747 | 16,034 | py | Python | Createmodele_V13_1.1.py | pad-awan/domotiquesante | c91d97065bfcf9816367263266c608cfdc0c8009 | [
"CNRI-Python"
] | null | null | null | Createmodele_V13_1.1.py | pad-awan/domotiquesante | c91d97065bfcf9816367263266c608cfdc0c8009 | [
"CNRI-Python"
] | null | null | null | Createmodele_V13_1.1.py | pad-awan/domotiquesante | c91d97065bfcf9816367263266c608cfdc0c8009 | [
"CNRI-Python"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Jan 09 22:25:07 2019
@author: arnaudhub
"""
#import pandas as pd
from sqlalchemy import create_engine
from sqlalchemy.sql import text
import configparser,os
from urllib import parse
#import sql.connector
config = configparser.ConfigParser()
config.re... | 43.102151 | 137 | 0.674192 |
69c5657dfbcc05e24b0f6da32143538ee6f1886c | 10,002 | py | Python | multiml/agent/pytorch/pytorch_asngnas.py | UTokyo-ICEPP/multiml | 3dce96492c90bb2bc9c2d4ccfd66eb13d652a520 | [
"Apache-2.0"
] | 7 | 2021-04-16T03:05:25.000Z | 2021-12-17T06:04:13.000Z | multiml/agent/pytorch/pytorch_asngnas.py | UTokyo-ICEPP/multiml | 3dce96492c90bb2bc9c2d4ccfd66eb13d652a520 | [
"Apache-2.0"
] | 6 | 2021-04-21T10:17:14.000Z | 2021-06-30T06:18:41.000Z | multiml/agent/pytorch/pytorch_asngnas.py | UTokyo-ICEPP/multiml | 3dce96492c90bb2bc9c2d4ccfd66eb13d652a520 | [
"Apache-2.0"
] | 5 | 2021-04-15T06:38:04.000Z | 2021-09-05T14:30:05.000Z | from multiml import logger
from multiml.task.pytorch import PytorchASNGNASTask
from multiml.task.pytorch import PytorchASNGNASBlockTask
from . import PytorchConnectionRandomSearchAgent
from multiml.task.pytorch.datasets import StoreGateDataset, NumpyDataset
import numpy as np
| 40.008 | 100 | 0.623075 |
69c56874d74c15c70229584ec7332f3dc283f7c2 | 393 | py | Python | tests/integration/controller/fixtures.py | jlamoso/petisco | bd71d28a5c0ba6ea789fa7c1529e7a2d108da53f | [
"MIT"
] | null | null | null | tests/integration/controller/fixtures.py | jlamoso/petisco | bd71d28a5c0ba6ea789fa7c1529e7a2d108da53f | [
"MIT"
] | null | null | null | tests/integration/controller/fixtures.py | jlamoso/petisco | bd71d28a5c0ba6ea789fa7c1529e7a2d108da53f | [
"MIT"
] | null | null | null | import os
import pytest
from petisco import FlaskApplication
SWAGGER_DIR = os.path.dirname(os.path.abspath(__file__)) + "/application/"
app = FlaskApplication(application_name="petisco", swagger_dir=SWAGGER_DIR).get_app()
| 17.863636 | 85 | 0.732824 |
69c5c7a7d8c414585a90c6896cbf35b9061ae450 | 6,136 | py | Python | authors/apps/authentication/tests/test_register.py | andela/ah-code-titans | 4f1fc77c2ecdf8ca15c24327d39fe661eac85785 | [
"BSD-3-Clause"
] | null | null | null | authors/apps/authentication/tests/test_register.py | andela/ah-code-titans | 4f1fc77c2ecdf8ca15c24327d39fe661eac85785 | [
"BSD-3-Clause"
] | 20 | 2018-11-26T16:22:46.000Z | 2018-12-21T10:08:25.000Z | authors/apps/authentication/tests/test_register.py | andela/ah-code-titans | 4f1fc77c2ecdf8ca15c24327d39fe661eac85785 | [
"BSD-3-Clause"
] | 3 | 2019-01-24T15:39:42.000Z | 2019-09-25T17:57:08.000Z | from rest_framework import status
from django.urls import reverse
from django.utils.encoding import force_bytes
from django.utils.http import urlsafe_base64_encode
from ..models import User
from ..token import account_activation_token
# local import
from authors.base_test_config import TestConfiguration
| 31.306122 | 107 | 0.602347 |
69c74da7d507a228c1bd9d4078bd51d786cb3f7d | 2,192 | py | Python | web_app/routes/stats_routes.py | jae-finger/twitoff | 73a42c343dc5fbbe08c4cc470b7705e9ff8bb34c | [
"MIT"
] | null | null | null | web_app/routes/stats_routes.py | jae-finger/twitoff | 73a42c343dc5fbbe08c4cc470b7705e9ff8bb34c | [
"MIT"
] | 3 | 2021-06-08T21:32:20.000Z | 2022-03-12T00:32:35.000Z | web_app/routes/stats_routes.py | jae-finger/twitoff | 73a42c343dc5fbbe08c4cc470b7705e9ff8bb34c | [
"MIT"
] | null | null | null | from sklearn.datasets import load_iris
from sklearn.linear_model import LogisticRegression
from flask import Blueprint, jsonify, request, flash, redirect, render_template
from web_app.models import User
from web_app.statsmodels import load_model
from web_app.services.basilica_service import connection as basilica_con... | 37.793103 | 137 | 0.728102 |
69c769830c272d7a9f4d246a127dbb4b3989b330 | 1,399 | py | Python | tests/unit/test_parameters/test_geometric_parameters.py | manjunathnilugal/PyBaMM | 65d5cba534b4f163670e753714964aaa75d6a2d2 | [
"BSD-3-Clause"
] | 330 | 2019-04-17T11:36:57.000Z | 2022-03-28T16:49:55.000Z | tests/unit/test_parameters/test_geometric_parameters.py | masoodtamaddon/PyBaMM | a31e2095600bb92e913598ac4d02b2b6b77b31c1 | [
"BSD-3-Clause"
] | 1,530 | 2019-03-26T18:13:03.000Z | 2022-03-31T16:12:53.000Z | tests/unit/test_parameters/test_geometric_parameters.py | masoodtamaddon/PyBaMM | a31e2095600bb92e913598ac4d02b2b6b77b31c1 | [
"BSD-3-Clause"
] | 178 | 2019-03-27T13:48:04.000Z | 2022-03-31T09:30:11.000Z | #
# Tests for the standard parameters
#
import pybamm
import unittest
if __name__ == "__main__":
print("Add -v for more debug output")
import sys
if "-v" in sys.argv:
debug = True
pybamm.settings.debug_mode = True
unittest.main()
| 28.55102 | 78 | 0.620443 |
69c79c1acedc30f9a5022e2647ed20f40fd5e207 | 1,860 | py | Python | src/preprocessing1/convert_ctrees_to_dtrees_rstdt.py | norikinishida/discourse-parsing | 7377a78cc32ad6430d256694e31ed9426e7c6340 | [
"Apache-2.0"
] | 2 | 2022-02-16T20:41:22.000Z | 2022-03-11T18:28:24.000Z | src/preprocessing1/convert_ctrees_to_dtrees_rstdt.py | norikinishida/discourse-parsing | 7377a78cc32ad6430d256694e31ed9426e7c6340 | [
"Apache-2.0"
] | null | null | null | src/preprocessing1/convert_ctrees_to_dtrees_rstdt.py | norikinishida/discourse-parsing | 7377a78cc32ad6430d256694e31ed9426e7c6340 | [
"Apache-2.0"
] | null | null | null | import argparse
import os
import pyprind
import utils
import treetk
import treetk.rstdt
def main(args):
"""
We use n-ary ctrees (ie., *.labeled.nary.ctree) to generate dtrees.
Morey et al. (2018) demonstrate that scores evaluated on these dtrees are superficially lower than those on right-heavy binarize... | 30 | 167 | 0.597849 |
69c88ceb18f630f200621f0a183a63c5b4bebc25 | 4,507 | py | Python | vinyl.py | jsonmorberg/Vinyl-Bot | 84bae5eb8a9184cf7dbc5e652dd7f428d9a8295e | [
"MIT"
] | 1 | 2021-11-10T04:29:35.000Z | 2021-11-10T04:29:35.000Z | vinyl.py | jsonmorberg/Vinyl-Bot | 84bae5eb8a9184cf7dbc5e652dd7f428d9a8295e | [
"MIT"
] | null | null | null | vinyl.py | jsonmorberg/Vinyl-Bot | 84bae5eb8a9184cf7dbc5e652dd7f428d9a8295e | [
"MIT"
] | null | null | null | # vinyl.py
import os
import discord
from discord import voice_client
from audio_source import AudioSource
from audio_controller import AudioController
import yt_dlp
from dotenv import load_dotenv
from discord.ext import commands
load_dotenv()
TOKEN = os.getenv('DISCORD_TOKEN')
# Suppress unnecessary bug reports
yt_dl... | 36.056 | 94 | 0.633903 |
69c8df43a27c1af9bf7464c6393251ec9ff02443 | 1,106 | py | Python | tests/test_components/test_lenses/test_AchromLens.py | spacesys-finch/payload-designer | f21dc70f7301f166558a8f61bcbbccce83770343 | [
"Unlicense"
] | 2 | 2022-01-01T23:52:08.000Z | 2022-01-18T06:39:58.000Z | tests/test_components/test_lenses/test_AchromLens.py | spacesys-finch/payload-designer | f21dc70f7301f166558a8f61bcbbccce83770343 | [
"Unlicense"
] | 55 | 2021-12-30T18:15:38.000Z | 2022-03-06T16:02:57.000Z | tests/test_components/test_lenses/test_AchromLens.py | spacesys-finch/payload-designer | f21dc70f7301f166558a8f61bcbbccce83770343 | [
"Unlicense"
] | 2 | 2022-01-20T01:43:59.000Z | 2022-01-20T01:45:50.000Z | """Tests for AchromLens component."""
# stdlib
import logging
# external
import pytest
# project
from payload_designer.components import lenses
LOG = logging.getLogger(__name__)
def test_focal_length_1():
"""Test AchromLens.focal_length_1()"""
f_eq = 50
V_1 = 0.016
V_2 = 0.028
doublet = lense... | 19.403509 | 60 | 0.658228 |
69c94e463ba20a6268b57098d9cdaac3fe21a484 | 486 | py | Python | python/demos/mcEstimatePi.py | qyxiao/pmt | 87513794fc43f8aa1f4f3d7588fa45ffc75d1a44 | [
"MIT"
] | null | null | null | python/demos/mcEstimatePi.py | qyxiao/pmt | 87513794fc43f8aa1f4f3d7588fa45ffc75d1a44 | [
"MIT"
] | null | null | null | python/demos/mcEstimatePi.py | qyxiao/pmt | 87513794fc43f8aa1f4f3d7588fa45ffc75d1a44 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import matplotlib.pyplot as pl
import numpy as np
p = np.random.rand(5000, 2) * 4 - 2
inner = np.sum(p ** 2, axis=1) <= 4
pl.figure(figsize=(10, 10))
pl.plot(p[inner, 0], p[inner, 1], 'bo')
pl.plot(p[~inner, 0], p[~inner, 1], 'rD')
pi_estimate = np.sum(inner) / 5000 * 4
print('the estimated pi ... | 25.578947 | 44 | 0.62963 |
69c954f1be24efef0a745d933498ace36a82ac1a | 1,949 | py | Python | src/utils/hdf5_helper/h5_util.py | SteffenMauceri/OWLS-Autonomy | e676282a87e17030887b0174f3b8b38aab170d15 | [
"RSA-MD"
] | null | null | null | src/utils/hdf5_helper/h5_util.py | SteffenMauceri/OWLS-Autonomy | e676282a87e17030887b0174f3b8b38aab170d15 | [
"RSA-MD"
] | null | null | null | src/utils/hdf5_helper/h5_util.py | SteffenMauceri/OWLS-Autonomy | e676282a87e17030887b0174f3b8b38aab170d15 | [
"RSA-MD"
] | null | null | null | from contextlib import closing
import h5py
import numpy as np
def save_h5(outfile, dictionary):
""" Saves passed dictionary to an h5 file
Parameters
----------
outfile : string
Name of output h5 file
dictionary : dictionary
Dictionary that will be saved
"""
with closing(h5... | 26.69863 | 68 | 0.542329 |
69ca8a62d7144693f84bd439c77728f7b5f93e62 | 526 | py | Python | solutions/problem-007/python.py | kmchmk/projecteuler-solutions | 0900f4ef031e360fb80414420fb61522be1dd66a | [
"MIT"
] | 2 | 2021-09-05T11:50:30.000Z | 2021-09-10T15:46:05.000Z | solutions/problem-007/python.py | kmchmk/projecteuler-solutions | 0900f4ef031e360fb80414420fb61522be1dd66a | [
"MIT"
] | 2 | 2021-09-06T14:42:54.000Z | 2021-09-10T14:52:59.000Z | solutions/problem-007/python.py | kmchmk/projecteuler-solutions | 0900f4ef031e360fb80414420fb61522be1dd66a | [
"MIT"
] | 1 | 2021-09-05T14:40:14.000Z | 2021-09-05T14:40:14.000Z | from math import sqrt
print(get_nth_prime(10001)) | 21.916667 | 58 | 0.579848 |
69cab18673618de1d90978d44eee2864143ab833 | 11,582 | py | Python | model/methods.py | MokkeMeguru/seq2bseq | 4e66f2d4738751cf4552a5b61728ad3b4967feb6 | [
"MIT"
] | null | null | null | model/methods.py | MokkeMeguru/seq2bseq | 4e66f2d4738751cf4552a5b61728ad3b4967feb6 | [
"MIT"
] | null | null | null | model/methods.py | MokkeMeguru/seq2bseq | 4e66f2d4738751cf4552a5b61728ad3b4967feb6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
""" Helper functions for VariationalModel class """
from __future__ import print_function
from __future__ import division
import math
import random
import tensorflow as tf
from tensorflow.contrib.legacy_seq2seq.python.ops import seq2seq as s2s
def linearOutcomePrediction(zs, pa... | 39.128378 | 104 | 0.625108 |
69ce8902e8aaaf0b89cf2ee81714c5532b36a81f | 417 | py | Python | src/Factory/Abstract/SongFactory.py | jundoll/discordbot-BSPlaylistManager | 38e80a7fc2ab779b4ab9fec33a40c0a7b14ad622 | [
"MIT"
] | null | null | null | src/Factory/Abstract/SongFactory.py | jundoll/discordbot-BSPlaylistManager | 38e80a7fc2ab779b4ab9fec33a40c0a7b14ad622 | [
"MIT"
] | 8 | 2020-10-25T06:07:41.000Z | 2020-12-30T10:03:54.000Z | src/Factory/Abstract/SongFactory.py | jundoll/discordbot-BSPlaylistManager | 38e80a7fc2ab779b4ab9fec33a40c0a7b14ad622 | [
"MIT"
] | null | null | null |
# load modules
from abc import ABCMeta, abstractmethod
from typing import List
from src.Domain.Song import Song, SongHash, Url
# definition
| 20.85 | 53 | 0.717026 |
69cf73dbd38061a833e0ed5dd8261d357ce7829e | 1,164 | py | Python | migrations/versions/b9ab1a9a2113_.py | a-sanders/currency-exchange-calc | f8ce357b2cb958b32782d2e812e51d22b5f04d3a | [
"MIT"
] | null | null | null | migrations/versions/b9ab1a9a2113_.py | a-sanders/currency-exchange-calc | f8ce357b2cb958b32782d2e812e51d22b5f04d3a | [
"MIT"
] | null | null | null | migrations/versions/b9ab1a9a2113_.py | a-sanders/currency-exchange-calc | f8ce357b2cb958b32782d2e812e51d22b5f04d3a | [
"MIT"
] | null | null | null | """empty message
Revision ID: b9ab1a9a2113
Revises:
Create Date: 2021-11-28 22:41:01.160642
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'b9ab1a9a2113'
down_revision = None
branch_labels = None
depends_on = None
| 27.069767 | 65 | 0.664948 |
69d1cd005aaaf49ee063eaef4256019e28e73ab2 | 4,880 | py | Python | ml_editor/explanation_generation.py | johanjun/Building_ML_Powered_Applications | bcdcc769f4407ec9fbc729794ba84e8214d29027 | [
"MIT"
] | 18 | 2021-09-11T05:04:09.000Z | 2022-03-20T23:41:42.000Z | ml_editor/explanation_generation.py | johanjun/Building_ML_Powered_Applications | bcdcc769f4407ec9fbc729794ba84e8214d29027 | [
"MIT"
] | null | null | null | ml_editor/explanation_generation.py | johanjun/Building_ML_Powered_Applications | bcdcc769f4407ec9fbc729794ba84e8214d29027 | [
"MIT"
] | 7 | 2021-09-30T11:22:12.000Z | 2022-03-20T23:49:43.000Z | import os
from pathlib import Path
import pandas as pd
from lime.lime_tabular import LimeTabularExplainer
from ml_editor.data_processing import get_split_by_author
FEATURE_DISPLAY_NAMES = {
"num_questions": " ",
"num_periods": " ",
"num_commas": " ",
"num_exclam": " ",
"num_quotes": " ",
"num_... | 26.096257 | 80 | 0.582172 |
69d1dab7f54ca1ad815eec0feddd2d80d74004a4 | 912 | py | Python | straitlets/tests/test_test_utils.py | quantopian/serializable-traitlets | f7de75507978e08446a15894a8417997940ea7a6 | [
"Apache-2.0"
] | 13 | 2016-01-27T01:55:18.000Z | 2022-02-10T12:09:46.000Z | straitlets/tests/test_test_utils.py | quantopian/serializable-traitlets | f7de75507978e08446a15894a8417997940ea7a6 | [
"Apache-2.0"
] | 5 | 2016-02-17T13:52:50.000Z | 2018-12-13T21:30:26.000Z | straitlets/tests/test_test_utils.py | quantopian/serializable-traitlets | f7de75507978e08446a15894a8417997940ea7a6 | [
"Apache-2.0"
] | 10 | 2017-07-21T14:27:17.000Z | 2022-03-16T11:19:47.000Z | """
Tests for the test utils.
"""
import pytest
from straitlets import Serializable, Integer
from straitlets.test_utils import assert_serializables_equal
| 25.333333 | 64 | 0.625 |
69d291496a5d3377d9958e730dccf8026bc852c8 | 6,458 | py | Python | projects/microphysics/docs/wandb_report_figures/non_limited_num_nonzero.py | ai2cm/fv3net | e62038aee0a97d6207e66baabd8938467838cf51 | [
"MIT"
] | 1 | 2021-12-14T23:43:35.000Z | 2021-12-14T23:43:35.000Z | projects/microphysics/docs/wandb_report_figures/non_limited_num_nonzero.py | ai2cm/fv3net | e62038aee0a97d6207e66baabd8938467838cf51 | [
"MIT"
] | 195 | 2021-09-16T05:47:18.000Z | 2022-03-31T22:03:15.000Z | projects/microphysics/docs/wandb_report_figures/non_limited_num_nonzero.py | ai2cm/fv3net | e62038aee0a97d6207e66baabd8938467838cf51 | [
"MIT"
] | null | null | null | """
In the last report, "bias_categories.py" I showed that offline bias of the
limited RNN cannot be improved by thresholding large relative decreases of cloud
to 0. Doing so increased the bias.
What about the non-limited RNNS? It turns out that these RNNs have approximately
10x smaller bias. However, they produce ne... | 34.351064 | 143 | 0.702694 |
69d2955809d68e17f8be812fa27e25216fd7813e | 4,026 | py | Python | fdm/analysis/tools.py | szajek/FDM | 6270b0eb2bf3ef80f2ed87d0f39cf39ab82ae02b | [
"MIT"
] | 1 | 2017-11-12T09:57:52.000Z | 2017-11-12T09:57:52.000Z | fdm/analysis/tools.py | szajek/FDM | 6270b0eb2bf3ef80f2ed87d0f39cf39ab82ae02b | [
"MIT"
] | null | null | null | fdm/analysis/tools.py | szajek/FDM | 6270b0eb2bf3ef80f2ed87d0f39cf39ab82ae02b | [
"MIT"
] | null | null | null | import numpy
from fdm.geometry import create_close_point_finder
| 30.5 | 119 | 0.709389 |
69d2cf747c7a7036f97b7f91f7789d9373964e1b | 1,300 | py | Python | src/tests/sounds_test.py | dvsantoalla/atmospheres | f31bb636170dd8711e398b321a6416025bbd4de8 | [
"Apache-2.0"
] | null | null | null | src/tests/sounds_test.py | dvsantoalla/atmospheres | f31bb636170dd8711e398b321a6416025bbd4de8 | [
"Apache-2.0"
] | null | null | null | src/tests/sounds_test.py | dvsantoalla/atmospheres | f31bb636170dd8711e398b321a6416025bbd4de8 | [
"Apache-2.0"
] | null | null | null | import unittest
from csound import output, orchestra
from csound.orchestra import gen08
from data import constants as c
from data import get
| 34.210526 | 96 | 0.590769 |
69d3674b80e0407aa5556ee4e06d257e26cbc733 | 1,058 | py | Python | dht22.py | trihatmaja/dht22-raspi | 7bce4b1c35d9eed9e4913caa6f3b9b3aed5c3219 | [
"MIT"
] | null | null | null | dht22.py | trihatmaja/dht22-raspi | 7bce4b1c35d9eed9e4913caa6f3b9b3aed5c3219 | [
"MIT"
] | null | null | null | dht22.py | trihatmaja/dht22-raspi | 7bce4b1c35d9eed9e4913caa6f3b9b3aed5c3219 | [
"MIT"
] | null | null | null | import Adafruit_DHT as dht
import time
from influxdb import InfluxDBClient
if __name__ == '__main__':
main()
| 23.511111 | 66 | 0.535917 |
69d3ae6f2c3de09735086e056c7ecbd05c224a46 | 9,319 | py | Python | quapy/data/base.py | pglez82/QuaPy | 986e61620c7882e97245bd82d323e7615699d7b1 | [
"BSD-3-Clause"
] | 34 | 2021-01-06T14:01:06.000Z | 2022-03-08T06:59:04.000Z | quapy/data/base.py | pglez82/QuaPy | 986e61620c7882e97245bd82d323e7615699d7b1 | [
"BSD-3-Clause"
] | 4 | 2021-06-07T07:45:57.000Z | 2021-06-21T11:16:10.000Z | quapy/data/base.py | pglez82/QuaPy | 986e61620c7882e97245bd82d323e7615699d7b1 | [
"BSD-3-Clause"
] | 6 | 2021-06-07T10:08:17.000Z | 2022-03-07T13:42:15.000Z | import numpy as np
from scipy.sparse import issparse
from scipy.sparse import vstack
from sklearn.model_selection import train_test_split, RepeatedStratifiedKFold
from quapy.functional import artificial_prevalence_sampling, strprev
def __add__(self, other):
if other is None:
return self
... | 40.517391 | 137 | 0.653504 |
69dcbd043965a22c5729ce122aacb8d9478b59fe | 55,763 | py | Python | feature_extractors.py | Askinkaty/text-readability | 4d9d7c6cd3a07c7443ca24c67db981b4b4c9fff4 | [
"MIT"
] | null | null | null | feature_extractors.py | Askinkaty/text-readability | 4d9d7c6cd3a07c7443ca24c67db981b4b4c9fff4 | [
"MIT"
] | null | null | null | feature_extractors.py | Askinkaty/text-readability | 4d9d7c6cd3a07c7443ca24c67db981b4b4c9fff4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from process_gram import process_grammar
import codecs
first_pp = ['', '', '', '']
second_pp = ['', '', '', '']
third_pp = ['', '', '', '', '', 'ee', '', '', '', '']
indef_pron = ['', '', '', '', '', '', '', '', '', '', '',
'', '', '', '', '', '', '', '', '', '',
'',... | 42.053544 | 124 | 0.469451 |
69e1d274afce02fe0eb56c0874758437df337b90 | 134 | py | Python | graphs/__init__.py | kateshostak/expander-lib | c1c7c0bec977fdc6492e4e08a1d1757783462c76 | [
"MIT"
] | null | null | null | graphs/__init__.py | kateshostak/expander-lib | c1c7c0bec977fdc6492e4e08a1d1757783462c76 | [
"MIT"
] | null | null | null | graphs/__init__.py | kateshostak/expander-lib | c1c7c0bec977fdc6492e4e08a1d1757783462c76 | [
"MIT"
] | null | null | null | from .abstract_graph import AbstractGraph
from .matrix_graph import MatrixGraph
__all__ = [
"AbstractGraph",
"MatrixGraph",
] | 19.142857 | 41 | 0.753731 |
69e260f9ca6210cf18c090c8a49bc65255c0f206 | 856 | py | Python | 03-datatypes/examples/07-tuples.py | luxwarp/python-course | d6ec4961ef43bd9d99954cffaea837220638e83f | [
"0BSD"
] | null | null | null | 03-datatypes/examples/07-tuples.py | luxwarp/python-course | d6ec4961ef43bd9d99954cffaea837220638e83f | [
"0BSD"
] | null | null | null | 03-datatypes/examples/07-tuples.py | luxwarp/python-course | d6ec4961ef43bd9d99954cffaea837220638e83f | [
"0BSD"
] | null | null | null | #!/usr/bin/env python3
# tuples is a type of list.
# tuples is immutable.
# the structure of a tuple: (1, "nice work", 2.3, [1,2,"hey"])
my_tuple = ("hey", 1, 2, "hey ho!", "hey", "hey")
print("My tuple:", my_tuple)
# to get a tuple value use it's index
print("Second item in my_tuple:", my_tuple[1])
# to count how ... | 35.666667 | 97 | 0.693925 |
69e2f9e47e947283eba6f71f70baad174d0962cb | 7,048 | py | Python | retraction_synda.py | meteorologist15/synda_retraction | 4a9174d2bc5d3573b5cdd39636380607120d586c | [
"CC0-1.0"
] | null | null | null | retraction_synda.py | meteorologist15/synda_retraction | 4a9174d2bc5d3573b5cdd39636380607120d586c | [
"CC0-1.0"
] | null | null | null | retraction_synda.py | meteorologist15/synda_retraction | 4a9174d2bc5d3573b5cdd39636380607120d586c | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python3
import subprocess
import requests
import json
import os
import re
import argparse
import logging
import csv
import shutil
retracted_exps = "retracted_exps.csv" #Generic info list from file here.
logging.basicConfig(level=logging.INFO, format='%(levelname)s: %(message)s')
handle_api = "https://... | 36.518135 | 214 | 0.614784 |
69e335c70218134a69c091bf1b6b675a74eec632 | 9,485 | py | Python | tests/integration/cqlengine/management/test_management.py | fatelei/python-driver | 3bddef6185f2691e1713dfe51d1fa26d1555724c | [
"Apache-2.0"
] | null | null | null | tests/integration/cqlengine/management/test_management.py | fatelei/python-driver | 3bddef6185f2691e1713dfe51d1fa26d1555724c | [
"Apache-2.0"
] | null | null | null | tests/integration/cqlengine/management/test_management.py | fatelei/python-driver | 3bddef6185f2691e1713dfe51d1fa26d1555724c | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 DataStax, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 34.616788 | 122 | 0.714391 |
69e3ad1eebd1e1fccdf1e001090572086c5c45ba | 366 | py | Python | theboss/network_simulation_strategy/network_simulation_strategy.py | Tomev/BoSS | 45db090345650741c85b39b47cbc7b391d6daa33 | [
"Apache-2.0"
] | null | null | null | theboss/network_simulation_strategy/network_simulation_strategy.py | Tomev/BoSS | 45db090345650741c85b39b47cbc7b391d6daa33 | [
"Apache-2.0"
] | 4 | 2020-07-10T00:28:43.000Z | 2020-10-12T11:51:38.000Z | theboss/network_simulation_strategy/network_simulation_strategy.py | Tomev/BoSS | 45db090345650741c85b39b47cbc7b391d6daa33 | [
"Apache-2.0"
] | 1 | 2020-09-12T15:35:09.000Z | 2020-09-12T15:35:09.000Z | __author__ = "Tomasz Rybotycki"
import abc
from numpy import ndarray
| 22.875 | 76 | 0.737705 |
69e3ea4c1c7c901fc078c30d615b40492cfe71fd | 769 | py | Python | ecommerce/core/migrations/0020_auto_20200923_1948.py | berrondo/ecommerce | daa0fa3c336d7e1e9816cc187f858bab7122fb1b | [
"MIT"
] | 1 | 2020-09-04T02:23:02.000Z | 2020-09-04T02:23:02.000Z | ecommerce/core/migrations/0020_auto_20200923_1948.py | berrondo/ecommerce | daa0fa3c336d7e1e9816cc187f858bab7122fb1b | [
"MIT"
] | null | null | null | ecommerce/core/migrations/0020_auto_20200923_1948.py | berrondo/ecommerce | daa0fa3c336d7e1e9816cc187f858bab7122fb1b | [
"MIT"
] | null | null | null | # Generated by Django 3.1.1 on 2020-09-23 19:48
from django.db import migrations, models
import django.db.models.deletion
| 30.76 | 151 | 0.642393 |
69e536b2f665710fad652d1507cbb967f6b032a2 | 1,989 | py | Python | framework.py | w1rtp/USMAnywhereAPI | d239fde894e085cfe5350800225ebe88297f922f | [
"MIT"
] | 3 | 2019-02-04T18:15:00.000Z | 2021-06-22T21:03:22.000Z | framework.py | w1rtp/USMAnywhereAPI | d239fde894e085cfe5350800225ebe88297f922f | [
"MIT"
] | 1 | 2018-10-04T21:51:50.000Z | 2018-10-06T18:17:00.000Z | framework.py | w1rtp/USMAnywhereAPI | d239fde894e085cfe5350800225ebe88297f922f | [
"MIT"
] | 2 | 2019-12-23T16:03:01.000Z | 2022-03-17T01:13:17.000Z | #!/usr/bin/env python
"""
Nicholas' Example API code for interacting with Alienvault API.
This is just Example code written by NMA.IO.
There isn't really much you can do with the API just yet, so
this will be a work in progress.
Grab your API key here:
https://www.alienvault.com/documentation/usm-anywhere/api/ali... | 31.078125 | 124 | 0.667672 |
69e53fa5b831cecebc7667ff2b84745654c3a1c0 | 2,768 | py | Python | Facility/Loader/loader_base.py | EVOLVED-5G/ELCM | 07d07a114b667e8c6915ee3ef125dd4864dd2247 | [
"Apache-2.0"
] | null | null | null | Facility/Loader/loader_base.py | EVOLVED-5G/ELCM | 07d07a114b667e8c6915ee3ef125dd4864dd2247 | [
"Apache-2.0"
] | null | null | null | Facility/Loader/loader_base.py | EVOLVED-5G/ELCM | 07d07a114b667e8c6915ee3ef125dd4864dd2247 | [
"Apache-2.0"
] | null | null | null | import yaml
from Helper import Level
from typing import List, Dict
from os.path import join
from ..action_information import ActionInformation
| 35.487179 | 112 | 0.556358 |
69e67f189f337a3cb0820bec91f37c72cf451cb4 | 2,140 | py | Python | timebox/tests/test_timebox_pandas.py | BrianKopp/timebox | 302c7f65fa0a2e35aab2412173b9081a1a3c324c | [
"MIT"
] | 1 | 2018-07-09T18:42:57.000Z | 2018-07-09T18:42:57.000Z | timebox/tests/test_timebox_pandas.py | BrianKopp/timebox | 302c7f65fa0a2e35aab2412173b9081a1a3c324c | [
"MIT"
] | null | null | null | timebox/tests/test_timebox_pandas.py | BrianKopp/timebox | 302c7f65fa0a2e35aab2412173b9081a1a3c324c | [
"MIT"
] | null | null | null | from timebox.timebox import TimeBox
from timebox.utils.exceptions import InvalidPandasIndexError
import pandas as pd
import numpy as np
import unittest
import os
import logging
if __name__ == '__main__':
unittest.main()
| 31.940299 | 93 | 0.621963 |
69e74affdb03ba88f022aa14d7c8af457ff4e082 | 2,143 | py | Python | flaskapp/utils/logs.py | argrecsys/decide-madrid-chatbot | 8d44932f15e49902215e17982e5c1f4ffaa7a38b | [
"Apache-2.0"
] | 4 | 2022-01-11T21:57:48.000Z | 2022-01-13T21:52:28.000Z | flaskapp/utils/logs.py | argrecsys/decide-madrid-chatbot | 8d44932f15e49902215e17982e5c1f4ffaa7a38b | [
"Apache-2.0"
] | null | null | null | flaskapp/utils/logs.py | argrecsys/decide-madrid-chatbot | 8d44932f15e49902215e17982e5c1f4ffaa7a38b | [
"Apache-2.0"
] | null | null | null | from typing import Any
from flaskapp.models import Activities, Logs, LogsToActivities, db
from sqlalchemy.sql.expression import desc, func
"""
Este modulo contiene funciones para escribir y leer los logs desde el chatbot
"""
MAX_LOGS_PER_QUERY = 5
MAX_STR_SIZE_LOGS = 128
| 24.352273 | 77 | 0.514232 |
69e7b4ccf59b1c05b1102c31382c3994419c2af7 | 1,233 | py | Python | WEEKS/CD_Sata-Structures/_RESOURCES/DS-n-Algos/hashes/luhn.py | webdevhub42/Lambda | b04b84fb5b82fe7c8b12680149e25ae0d27a0960 | [
"MIT"
] | 13 | 2021-03-11T00:25:22.000Z | 2022-03-19T00:19:23.000Z | hashes/luhn.py | randomprassanna/Python | bc09ba9abfa220c893b23969a4b8de05f5ced1e1 | [
"MIT"
] | 279 | 2020-02-12T20:51:09.000Z | 2021-07-20T11:25:19.000Z | hashes/luhn.py | randomprassanna/Python | bc09ba9abfa220c893b23969a4b8de05f5ced1e1 | [
"MIT"
] | 12 | 2021-04-26T19:43:01.000Z | 2022-01-31T08:36:29.000Z | """ Luhn Algorithm """
from typing import List
def is_luhn(string: str) -> bool:
"""
Perform Luhn validation on input string
Algorithm:
* Double every other digit starting from 2nd last digit.
* Subtract 9 if number is greater than 9.
* Sum the numbers
*
>>> test_cases = [79927398710, ... | 26.234043 | 76 | 0.596918 |
69e81c899520bdfc0aa12c011c27b56eb5e31e55 | 2,477 | py | Python | gen_files.py | qbosen/leetcode_file_generator | 594d7bb1e5ac5cb3100ddbaecc3f8359c17dbbb8 | [
"MIT"
] | null | null | null | gen_files.py | qbosen/leetcode_file_generator | 594d7bb1e5ac5cb3100ddbaecc3f8359c17dbbb8 | [
"MIT"
] | null | null | null | gen_files.py | qbosen/leetcode_file_generator | 594d7bb1e5ac5cb3100ddbaecc3f8359c17dbbb8 | [
"MIT"
] | null | null | null | # coding=utf-8
# /usr/bin/python gen_files.py 100
import os
import sys
import time
from settings import *
from settings_advanced import *
try:
import cPickle as pickle
except ImportError:
import pickle
from content_parser import DescriptionParser
from content_parser_advance import AdvancedDescriptionParser
... | 31.75641 | 99 | 0.686314 |
69e933da38595f381a40d626b00d56311127794d | 1,287 | py | Python | interface/exemplos1/05.py | ell3a/estudos-python | 09808a462aa3e73ad433501acb11f62217548af8 | [
"MIT"
] | null | null | null | interface/exemplos1/05.py | ell3a/estudos-python | 09808a462aa3e73ad433501acb11f62217548af8 | [
"MIT"
] | null | null | null | interface/exemplos1/05.py | ell3a/estudos-python | 09808a462aa3e73ad433501acb11f62217548af8 | [
"MIT"
] | null | null | null | from tkinter import *
import tkFileDialog
root = Tk()
menubar = Menu(root)
root.config(menu=menubar)
root.title('Tk Menu')
root.geometry('150x150')
filemenu = Menu(menubar)
filemenu2 = Menu(menubar)
filemenu3 = Menu(menubar)
menubar.add_cascade(label='Arquivo', menu=filemenu)
menubar.add_cascade(label='Cores', menu=... | 33 | 61 | 0.724165 |
69e9b7f3b724fc8a84cb33e494ceb8bad87452a5 | 349 | py | Python | public/models.py | level09/yooo | deb8fbdd2d2114a9189e35ee5ab6014876f99438 | [
"MIT"
] | 6 | 2015-02-20T17:24:46.000Z | 2020-05-21T18:23:25.000Z | public/models.py | level09/yooo | deb8fbdd2d2114a9189e35ee5ab6014876f99438 | [
"MIT"
] | null | null | null | public/models.py | level09/yooo | deb8fbdd2d2114a9189e35ee5ab6014876f99438 | [
"MIT"
] | null | null | null | from extensions import db
import datetime
import json | 26.846154 | 68 | 0.710602 |
69ea5b5cea2f3bde949a1ce25fc96a75ca9f7638 | 6,132 | py | Python | script/python/lib/exhaust_generation/exhaustive_tpls.py | timblechmann/nt2 | 6c71f7063ca4e5975c9c019877e6b2fe07c9e4ce | [
"BSL-1.0"
] | 2 | 2016-09-14T00:23:53.000Z | 2018-01-14T12:51:18.000Z | script/python/lib/exhaust_generation/exhaustive_tpls.py | timblechmann/nt2 | 6c71f7063ca4e5975c9c019877e6b2fe07c9e4ce | [
"BSL-1.0"
] | null | null | null | script/python/lib/exhaust_generation/exhaustive_tpls.py | timblechmann/nt2 | 6c71f7063ca4e5975c9c019877e6b2fe07c9e4ce | [
"BSL-1.0"
] | null | null | null | #! /usr/bin/env python
# -*- coding: iso-8859-15 -*-
##############################################################################
# Copyright 2003 & onward LASMEA UMR 6602 CNRS/Univ. Clermont II
# Copyright 2009 & onward LRI UMR 8623 CNRS/Univ Paris Sud XI
#
# Distributed under the Boost ... | 46.105263 | 95 | 0.379485 |
69ea7259b3d374e9cf30752c6716f0ff14c30c20 | 1,159 | py | Python | automator.py | Mfdsix/GoHugo-Blog-Example | 0bdb5396732b2cfcd5e8885a6e2dd65cab416a01 | [
"Apache-2.0"
] | 1 | 2021-08-24T13:45:45.000Z | 2021-08-24T13:45:45.000Z | automator.py | Mfdsix/GoHugo-Blog-Example | 0bdb5396732b2cfcd5e8885a6e2dd65cab416a01 | [
"Apache-2.0"
] | null | null | null | automator.py | Mfdsix/GoHugo-Blog-Example | 0bdb5396732b2cfcd5e8885a6e2dd65cab416a01 | [
"Apache-2.0"
] | null | null | null | import requests
import os, shutil
import re
folder = 'content/post'
for filename in os.listdir(folder):
file_path = os.path.join(folder, filename)
try:
if os.path.isfile(file_path) or os.path.islink(file_path):
os.unlink(file_path)
elif os.path.isdir(file_path):
shutil.r... | 34.088235 | 236 | 0.592752 |
69eaf97d49b7fab955a57a6eb5efeed97327c325 | 21,388 | py | Python | geonode/geonode/maps/qgis_server_views.py | ttungbmt/BecaGIS_GeoPortal | 6c05f9fc020ec4ccf600ba2503a06c2231443920 | [
"MIT"
] | null | null | null | geonode/geonode/maps/qgis_server_views.py | ttungbmt/BecaGIS_GeoPortal | 6c05f9fc020ec4ccf600ba2503a06c2231443920 | [
"MIT"
] | null | null | null | geonode/geonode/maps/qgis_server_views.py | ttungbmt/BecaGIS_GeoPortal | 6c05f9fc020ec4ccf600ba2503a06c2231443920 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#########################################################################
#
# Copyright (C) 2016 OSGeo
#
# 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 ... | 35.119869 | 104 | 0.534412 |
69eb8001ee863674c031e16f1d53ea9d8468e34b | 14,203 | py | Python | reframe/core/config.py | mboisson/reframe | ebf0141596f19c7df60b59d8ad6211067f55b5e5 | [
"BSD-3-Clause"
] | null | null | null | reframe/core/config.py | mboisson/reframe | ebf0141596f19c7df60b59d8ad6211067f55b5e5 | [
"BSD-3-Clause"
] | null | null | null | reframe/core/config.py | mboisson/reframe | ebf0141596f19c7df60b59d8ad6211067f55b5e5 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2016-2020 Swiss National Supercomputing Centre (CSCS/ETH Zurich)
# ReFrame Project Developers. See the top-level LICENSE file for details.
#
# SPDX-License-Identifier: BSD-3-Clause
import collections.abc
import json
import jsonschema
import os
import re
import tempfile
import reframe
import reframe.core.d... | 37.874667 | 79 | 0.553897 |
69ede5a7a5d5e261a9c1ba0ddb8dc8c9e3cbfadd | 1,224 | py | Python | account/forms.py | hhdMrLion/crm_api | 66df068821be36a17c3b0e0e9660b7f8408fa1bd | [
"Apache-2.0"
] | 1 | 2021-06-18T03:03:38.000Z | 2021-06-18T03:03:38.000Z | account/forms.py | hhdMrLion/crm_api | 66df068821be36a17c3b0e0e9660b7f8408fa1bd | [
"Apache-2.0"
] | null | null | null | account/forms.py | hhdMrLion/crm_api | 66df068821be36a17c3b0e0e9660b7f8408fa1bd | [
"Apache-2.0"
] | null | null | null | from django import forms
from django.contrib.auth import authenticate, login
from django.utils.timezone import now
| 30.6 | 101 | 0.591503 |
69eded2c37603527f5c2e4966e85000fb0b6519e | 3,263 | py | Python | fileshare/fileup/utils.py | nijatrajab/fileshare | f364788f318ffe8b731ccb68e9c275bfa73c0292 | [
"MIT"
] | 1 | 2021-07-08T06:51:28.000Z | 2021-07-08T06:51:28.000Z | fileshare/fileup/utils.py | nijatrajab/fileshareproject | f364788f318ffe8b731ccb68e9c275bfa73c0292 | [
"MIT"
] | null | null | null | fileshare/fileup/utils.py | nijatrajab/fileshareproject | f364788f318ffe8b731ccb68e9c275bfa73c0292 | [
"MIT"
] | null | null | null | from django.contrib.auth import get_user_model
from django.contrib.auth.models import Permission
from django.db.models import Q
from guardian.ctypes import get_content_type
from guardian.shortcuts import get_perms, get_user_perms
from guardian.utils import get_user_obj_perms_model, get_group_obj_perms_model
| 44.69863 | 120 | 0.575544 |
69ef030a305db0390a90f17929cad93e52de6059 | 2,090 | py | Python | welly/__init__.py | agilescientific/welly | 1ced65d6e7d48642112e72ec8b412687e5a910db | [
"Apache-2.0"
] | 3 | 2022-03-17T08:42:25.000Z | 2022-03-23T08:26:13.000Z | welly/__init__.py | agilescientific/welly | 1ced65d6e7d48642112e72ec8b412687e5a910db | [
"Apache-2.0"
] | 3 | 2022-03-08T13:01:14.000Z | 2022-03-21T09:42:09.000Z | welly/__init__.py | agilescientific/welly | 1ced65d6e7d48642112e72ec8b412687e5a910db | [
"Apache-2.0"
] | 1 | 2022-03-16T03:51:39.000Z | 2022-03-16T03:51:39.000Z | """
==================
welly
==================
"""
from .project import Project
from .well import Well
from .header import Header
from .curve import Curve
from .synthetic import Synthetic
from .location import Location
from .crs import CRS
from . import tools
from . import quality
def read_las(path, **kwargs):
"... | 25.180723 | 79 | 0.596651 |
69f057ed5c729374804cbd4b48a0e971199df0ac | 784 | py | Python | numpy/random/examples/cython/setup.py | IntelLabs/numpy | 1b4a877449313761d3de75c1ad725fdf396b170e | [
"BSD-3-Clause"
] | 7 | 2019-02-27T20:26:01.000Z | 2020-09-27T04:37:44.000Z | numpy/random/examples/cython/setup.py | IntelLabs/numpy | 1b4a877449313761d3de75c1ad725fdf396b170e | [
"BSD-3-Clause"
] | 3 | 2019-12-23T09:26:27.000Z | 2021-10-31T13:34:17.000Z | numpy/random/examples/cython/setup.py | IntelLabs/numpy | 1b4a877449313761d3de75c1ad725fdf396b170e | [
"BSD-3-Clause"
] | 3 | 2019-07-20T02:16:07.000Z | 2020-08-17T20:02:30.000Z | #!/usr/bin/env python3
"""
Build the demos
Usage: python setup.py build_ext -i
"""
import numpy as np
from distutils.core import setup
from Cython.Build import cythonize
from setuptools.extension import Extension
from os.path import join
extending = Extension("extending",
sources=['extending.py... | 28 | 77 | 0.590561 |
69f1e9cbbe7a9063f003afdafb274eaf79f6665a | 2,204 | py | Python | code/mts_agent_python/config/mts_import.py | mtsquant/MTS | ab7ecab0f88c844289b5c81e5627326fe36e682f | [
"Apache-2.0"
] | 8 | 2019-03-28T04:15:59.000Z | 2021-03-23T14:29:43.000Z | code/mts_agent_python/config/mts_import.py | mtsquant/MTS | ab7ecab0f88c844289b5c81e5627326fe36e682f | [
"Apache-2.0"
] | null | null | null | code/mts_agent_python/config/mts_import.py | mtsquant/MTS | ab7ecab0f88c844289b5c81e5627326fe36e682f | [
"Apache-2.0"
] | 5 | 2019-11-06T12:39:21.000Z | 2021-01-28T19:14:14.000Z | #!/usr/bin/env python
# encoding: utf-8
import signal
import sys
#import pandas as pd
#import numpy as np | 29.386667 | 136 | 0.596642 |
69f26355443efdf41ec0c1d1bd32986ecad1e099 | 8,949 | py | Python | plumcot_prodigy/entity.py | julietteBergoend/plumcot-prodigy | aaac14df24309e5b2064b213031d288d284a6747 | [
"MIT"
] | 1 | 2021-06-22T12:43:42.000Z | 2021-06-22T12:43:42.000Z | plumcot_prodigy/entity.py | julietteBergoend/plumcot-prodigy | aaac14df24309e5b2064b213031d288d284a6747 | [
"MIT"
] | null | null | null | plumcot_prodigy/entity.py | julietteBergoend/plumcot-prodigy | aaac14df24309e5b2064b213031d288d284a6747 | [
"MIT"
] | null | null | null | import prodigy
from prodigy.components.preprocess import add_tokens, split_sentences
from plumcot_prodigy.custom_loaders import *
import requests
from plumcot_prodigy.video import mkv_to_base64
from typing import Dict, List, Text, Union
from typing_extensions import Literal
import spacy
from pathlib import Path
""" An... | 39.422907 | 335 | 0.519835 |
69f2d82b9190c2480e72ca0c8018cad49bc3a03e | 3,326 | py | Python | sandbox_code/viz_dashboard.py | liuvictoria/sleepingbeauty | e165bea614d58ddd2c5c2a860df622241065cf47 | [
"MIT"
] | null | null | null | sandbox_code/viz_dashboard.py | liuvictoria/sleepingbeauty | e165bea614d58ddd2c5c2a860df622241065cf47 | [
"MIT"
] | null | null | null | sandbox_code/viz_dashboard.py | liuvictoria/sleepingbeauty | e165bea614d58ddd2c5c2a860df622241065cf47 | [
"MIT"
] | null | null | null | # ---
# jupyter:
# jupytext:
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.3'
# jupytext_version: 0.8.6
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---
# +
import warnings
import pandas as pd
import numpy a... | 22.02649 | 106 | 0.643115 |
69f44d6bb0d219787fb8b38bd11e93ce8f62ca75 | 1,694 | py | Python | SCA11H/commands/bcg/RunCommand.py | ihutano/SCA11H | ee8a38ec9e47bc015851c20fa121651d2601cde0 | [
"MIT"
] | null | null | null | SCA11H/commands/bcg/RunCommand.py | ihutano/SCA11H | ee8a38ec9e47bc015851c20fa121651d2601cde0 | [
"MIT"
] | null | null | null | SCA11H/commands/bcg/RunCommand.py | ihutano/SCA11H | ee8a38ec9e47bc015851c20fa121651d2601cde0 | [
"MIT"
] | null | null | null | from enum import Enum
import json
from SCA11H.commands.base.PostCommand import PostCommand
| 33.88 | 111 | 0.652302 |
69f45cc29efc997451ff86c0a0f571e78b3958e7 | 125 | py | Python | tridu_py3.py | YuriSerrano/URI-1933 | 58fdc5e90293ef55afacb164b955551a72a81d78 | [
"MIT"
] | null | null | null | tridu_py3.py | YuriSerrano/URI-1933 | 58fdc5e90293ef55afacb164b955551a72a81d78 | [
"MIT"
] | null | null | null | tridu_py3.py | YuriSerrano/URI-1933 | 58fdc5e90293ef55afacb164b955551a72a81d78 | [
"MIT"
] | null | null | null | import sys
'''
Criado por Yuri Serrano
'''
a,b = input().split()
a = int(a)
b = int(b)
if b > a:
print(b)
else:
print(a) | 8.928571 | 23 | 0.568 |
69f7bdeeb4b750efdf8582dd89ae606aafbd7ff2 | 14,595 | py | Python | qt4c/keyboard.py | zhangyiming07/QT4C | 2d8d60efe0a4ad78a2618c5beeb0c456a63da067 | [
"BSD-3-Clause"
] | 53 | 2020-02-20T06:56:03.000Z | 2022-03-03T03:09:25.000Z | qt4c/keyboard.py | zhangyiming07/QT4C | 2d8d60efe0a4ad78a2618c5beeb0c456a63da067 | [
"BSD-3-Clause"
] | 6 | 2020-03-03T03:15:53.000Z | 2021-01-29T02:24:06.000Z | qt4c/keyboard.py | zhangyiming07/QT4C | 2d8d60efe0a4ad78a2618c5beeb0c456a63da067 | [
"BSD-3-Clause"
] | 17 | 2020-02-26T03:51:41.000Z | 2022-03-24T02:23:51.000Z | # -*- coding: utf-8 -*-
#
# Tencent is pleased to support the open source community by making QT4C available.
# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved.
# QT4C is licensed under the BSD 3-Clause License, except for the third-party components listed below.
# A copy of the BSD ... | 32.945824 | 144 | 0.505653 |
69f9c87dea73354181eadb4afd02ba8d68d76483 | 1,168 | py | Python | piptui/custom/apNPSApplicationEvents.py | UltraStudioLTD/PipTUI | 62f5707faa004ba6d330288656ba192f37516921 | [
"MIT"
] | 33 | 2019-07-11T13:19:29.000Z | 2022-02-23T12:42:22.000Z | piptui/custom/apNPSApplicationEvents.py | UltraStudioLTD/PipTUI | 62f5707faa004ba6d330288656ba192f37516921 | [
"MIT"
] | 6 | 2019-07-20T21:21:51.000Z | 2021-09-24T16:24:34.000Z | piptui/custom/apNPSApplicationEvents.py | UltraStudioLTD/PipTUI | 62f5707faa004ba6d330288656ba192f37516921 | [
"MIT"
] | 8 | 2019-07-21T07:38:08.000Z | 2021-11-11T13:30:45.000Z | import collections
from npyscreen import StandardApp, apNPSApplicationEvents
| 28.487805 | 69 | 0.576199 |
69fa2fbc965cdaf80ea59da7e32e4769409474b2 | 146 | py | Python | web/apps.py | jakubhyza/kelvin | b06c0ed0594a3fb48df1e50ff30cee010ddeea5a | [
"MIT"
] | 8 | 2020-01-11T15:25:25.000Z | 2022-02-20T17:32:58.000Z | web/apps.py | jakubhyza/kelvin | b06c0ed0594a3fb48df1e50ff30cee010ddeea5a | [
"MIT"
] | 72 | 2020-01-13T21:07:26.000Z | 2022-03-28T10:17:50.000Z | web/apps.py | jakubhyza/kelvin | b06c0ed0594a3fb48df1e50ff30cee010ddeea5a | [
"MIT"
] | 6 | 2020-01-11T16:50:04.000Z | 2022-02-19T10:12:19.000Z | import logging
from django.apps import AppConfig
| 13.272727 | 33 | 0.684932 |
69fb23cad56b8f09159f3a77a81d10b8408a289b | 72 | py | Python | audiotrans_transform_stft/__init__.py | keik/audiotrans-transform-stft | 76db56dd78589170ea58bd59f8243dee76373ced | [
"MIT"
] | null | null | null | audiotrans_transform_stft/__init__.py | keik/audiotrans-transform-stft | 76db56dd78589170ea58bd59f8243dee76373ced | [
"MIT"
] | null | null | null | audiotrans_transform_stft/__init__.py | keik/audiotrans-transform-stft | 76db56dd78589170ea58bd59f8243dee76373ced | [
"MIT"
] | null | null | null | from .__main__ import STFTTransform
__all__ = [
'STFTTransform'
]
| 10.285714 | 35 | 0.708333 |
69fbff5bd4e44ca32652d5e034cc628db3597195 | 544 | py | Python | reformat/reformat-gexpnn-preds-STEP1B.py | jordan2lee/gdan-tmp-webdash | 96f8a557bcbca597a816a98824fbc37a174ae838 | [
"MIT"
] | null | null | null | reformat/reformat-gexpnn-preds-STEP1B.py | jordan2lee/gdan-tmp-webdash | 96f8a557bcbca597a816a98824fbc37a174ae838 | [
"MIT"
] | null | null | null | reformat/reformat-gexpnn-preds-STEP1B.py | jordan2lee/gdan-tmp-webdash | 96f8a557bcbca597a816a98824fbc37a174ae838 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import pandas as pd
ft_input='TEMP_DIR/tmp-predictions_reformatted_gexpnn20200320allCOHORTS.tsv'
df = pd.read_csv(ft_input,sep='\t')
# Get all tumors present in df (ACC, BRCA, ...)
temp = df['Label'].unique()
u_tumor = {} #k=tumor, v=1
for t in temp:
t= t.split(":")[0]
if t not in u_t... | 24.727273 | 76 | 0.658088 |
69fc9eb460e76e55a0c0964c725759eeda16183f | 4,291 | py | Python | src/genie/libs/parser/iosxr/tests/ShowIsisSpfLogDetail/cli/equal/golden_output_1_expected.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | 204 | 2018-06-27T00:55:27.000Z | 2022-03-06T21:12:18.000Z | src/genie/libs/parser/iosxr/tests/ShowIsisSpfLogDetail/cli/equal/golden_output_1_expected.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | 468 | 2018-06-19T00:33:18.000Z | 2022-03-31T23:23:35.000Z | src/genie/libs/parser/iosxr/tests/ShowIsisSpfLogDetail/cli/equal/golden_output_1_expected.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | 309 | 2019-01-16T20:21:07.000Z | 2022-03-30T12:56:41.000Z |
expected_output = {
'instance': {
'isp': {
'address_family': {
'IPv4 Unicast': {
'spf_log': {
1: {
'type': 'FSPF',
'time_ms': 1,
'level': 1,
... | 44.697917 | 78 | 0.158471 |
69fdb392e5a9d445b9e1b7aaaada984049564da4 | 2,706 | py | Python | monai/networks/utils.py | loftwah/MONAI | 37fb3e779121e6dc74127993df102fc91d9065f8 | [
"Apache-2.0"
] | 1 | 2020-04-23T13:05:29.000Z | 2020-04-23T13:05:29.000Z | monai/networks/utils.py | tranduyquockhanh/MONAI | 37fb3e779121e6dc74127993df102fc91d9065f8 | [
"Apache-2.0"
] | null | null | null | monai/networks/utils.py | tranduyquockhanh/MONAI | 37fb3e779121e6dc74127993df102fc91d9065f8 | [
"Apache-2.0"
] | 1 | 2021-09-20T12:10:01.000Z | 2021-09-20T12:10:01.000Z | # Copyright 2020 MONAI Consortium
# 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, s... | 39.794118 | 115 | 0.698817 |
69ff596252a8b8e113d28bd580c7b37e667bbc98 | 5,670 | py | Python | Python/Newton_Raphson/newraph.py | manas0522/sci-cpy | 0fad37f577e6a744717b0185c5bcfffcc72bc5ee | [
"MIT"
] | 8 | 2021-09-26T17:41:04.000Z | 2021-10-17T14:07:22.000Z | Python/Newton_Raphson/newraph.py | manas0522/sci-cpy | 0fad37f577e6a744717b0185c5bcfffcc72bc5ee | [
"MIT"
] | 16 | 2021-09-29T15:15:33.000Z | 2021-11-27T04:35:37.000Z | Python/Newton_Raphson/newraph.py | manas0522/sci-cpy | 0fad37f577e6a744717b0185c5bcfffcc72bc5ee | [
"MIT"
] | 11 | 2021-09-27T09:46:38.000Z | 2022-02-22T13:42:55.000Z | # This file is also a independently runnable file in addition to being a module.
# You can run this file to test NewRaphAlgorithm function.
'''
This program demonstrates Newton Raphson Algorithm(NPA).
It is advised to follow all rules of the algorithm while entering the input.
(Either read rules provided in README.md ... | 45.36 | 135 | 0.687302 |
0e0038faf589bc3f8391d7469e67376d79fd62bf | 1,656 | py | Python | scripts/conteo_go.py | Carlosriosch/BrucellaMelitensis | 4f16755fbb3e3ba33010d1e0d9fa68803b377075 | [
"MIT"
] | null | null | null | scripts/conteo_go.py | Carlosriosch/BrucellaMelitensis | 4f16755fbb3e3ba33010d1e0d9fa68803b377075 | [
"MIT"
] | null | null | null | scripts/conteo_go.py | Carlosriosch/BrucellaMelitensis | 4f16755fbb3e3ba33010d1e0d9fa68803b377075 | [
"MIT"
] | null | null | null | from __future__ import division
from collections import Counter
import numpy as np
import glob
path_input = "../GO_analysis_PPI_Brucella/2.GO_crudos_y_ancestors/"
path_output = "../GO_analysis_PPI_Brucella/3.GO_proporciones/"
files = glob.glob(path_input + "*CON_GEN_ID_ancestors*.txt")
for f in files:
# est... | 31.245283 | 159 | 0.667271 |
0e00c3eb801451c1ce0627716ddfcc5cdd941f89 | 988 | py | Python | gmgc.analysis/strict-species.py | luispedro/Coelho2021_GMGCv1_analysis | 5f1a62844631121cc11f8ac5a776d25baca56ff7 | [
"MIT"
] | 6 | 2021-12-16T09:20:28.000Z | 2022-03-29T03:21:48.000Z | gmgc.analysis/strict-species.py | luispedro/Coelho2021_GMGCv1_analysis | 5f1a62844631121cc11f8ac5a776d25baca56ff7 | [
"MIT"
] | 1 | 2022-02-18T01:56:56.000Z | 2022-02-22T14:39:48.000Z | gmgc.analysis/strict-species.py | luispedro/Coelho2021_GMGCv1_analysis | 5f1a62844631121cc11f8ac5a776d25baca56ff7 | [
"MIT"
] | 8 | 2021-12-17T02:14:50.000Z | 2022-03-21T06:40:59.000Z | from itertools import groupby
from taxonomic import lca
from taxonomic import ncbi
n = ncbi.NCBI()
fr12name = {}
for line in open('cold/freeze12.rename.table'):
i,g,_ = line.strip().split('\t',2)
fr12name[i] = g
rename = {}
for line in open('cold/GMGC10.rename.table.txt'):
new,old = line.rstrip().... | 31.870968 | 84 | 0.593117 |
0e01f695cd84ecfecf18aacb3df164a4f595c65f | 1,001 | py | Python | spreadsheet2csv.py | kamimura/py-spreadsheet2csv | 135b703906e41d92b34b2444ba392974abf97674 | [
"MIT"
] | null | null | null | spreadsheet2csv.py | kamimura/py-spreadsheet2csv | 135b703906e41d92b34b2444ba392974abf97674 | [
"MIT"
] | null | null | null | spreadsheet2csv.py | kamimura/py-spreadsheet2csv | 135b703906e41d92b34b2444ba392974abf97674 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import sys
import openpyxl
import csv
path = os.curdir
if len(sys.argv) > 1:
path = sys.argv[1]
for excel_file in os.listdir(path):
if (not os.path.isfile(excel_file)) or not excel_file.endswith('.xlsx'):
continue
print('{0}: Writing to csv... | 32.290323 | 76 | 0.591409 |