hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2c6ec873ec7c8839bf0848f5f90a0e473865c349 | 730 | py | Python | tests/conftest.py | binaryart/py-webapp-sandbox | 829e2473512fc9078f9d9675d0f3507684c61b71 | [
"MIT"
] | 2 | 2021-04-29T20:26:20.000Z | 2021-05-26T16:34:21.000Z | tests/conftest.py | binaryart/py-webapp-sandbox | 829e2473512fc9078f9d9675d0f3507684c61b71 | [
"MIT"
] | 18 | 2021-04-03T02:07:29.000Z | 2021-04-30T02:15:44.000Z | tests/conftest.py | binaryart/py-webapp-sandbox | 829e2473512fc9078f9d9675d0f3507684c61b71 | [
"MIT"
] | null | null | null | import os
import shutil
import pytest
from dotenv import load_dotenv
from tests import PROJECT_ROOT
# Load test specific environment variables
load_dotenv(os.path.join(PROJECT_ROOT, ".env.test"))
@pytest.fixture
def client():
db_path = __create_test_database()
os.environ["DATABASE_URL"] = f"sqlite:///{db_pa... | 22.8125 | 81 | 0.735616 |
788f15b2a00fa06736d78115be70743c906e3369 | 18,155 | py | Python | kikit/plugin/panelize.py | sslupsky/KiKit | f7774ff36b0425d0d1d47bceb02f3bbc89971ffa | [
"MIT"
] | null | null | null | kikit/plugin/panelize.py | sslupsky/KiKit | f7774ff36b0425d0d1d47bceb02f3bbc89971ffa | [
"MIT"
] | null | null | null | kikit/plugin/panelize.py | sslupsky/KiKit | f7774ff36b0425d0d1d47bceb02f3bbc89971ffa | [
"MIT"
] | null | null | null | from sys import stderr
from numpy.core.fromnumeric import std
from numpy.lib.utils import source
from pcbnewTransition import pcbnew, isV6
from kikit.panelize_ui_impl import loadPresetChain, obtainPreset, mergePresets
from kikit import panelize_ui
from kikit.panelize import appendItem
from kikit.common import PKG_BASE
... | 35.879447 | 103 | 0.604792 |
fae459ca28259b94975d572437d349a2fc637778 | 35 | py | Python | scaffoldgraph/vis/notebook/__init__.py | UCLCheminformatics/ScaffoldGraph | 0443ce118110290a99601d65b2d000ac8bc7a1e9 | [
"MIT"
] | 121 | 2019-12-12T15:30:16.000Z | 2022-02-28T02:00:54.000Z | scaffoldgraph/vis/notebook/__init__.py | UCLCheminformatics/ScaffoldGraph | 0443ce118110290a99601d65b2d000ac8bc7a1e9 | [
"MIT"
] | 8 | 2020-04-04T15:37:26.000Z | 2021-11-17T07:30:31.000Z | scaffoldgraph/vis/notebook/__init__.py | UCLCheminformatics/ScaffoldGraph | 0443ce118110290a99601d65b2d000ac8bc7a1e9 | [
"MIT"
] | 28 | 2019-12-16T11:58:53.000Z | 2021-11-19T09:57:46.000Z | """
scaffoldgraph.vis.notebook
"""
| 8.75 | 26 | 0.685714 |
baf8ca0859509ec8c672c665b3fb5da9805b83ab | 3,758 | py | Python | pyalgotrade/feed/__init__.py | heber/pyalgotrade | 42e1c98c96c41e51bce84a72a7f8b6dafe98cc52 | [
"Apache-2.0"
] | 1 | 2016-04-20T22:22:45.000Z | 2016-04-20T22:22:45.000Z | pyalgotrade/feed/__init__.py | heber/pyalgotrade | 42e1c98c96c41e51bce84a72a7f8b6dafe98cc52 | [
"Apache-2.0"
] | null | null | null | pyalgotrade/feed/__init__.py | heber/pyalgotrade | 42e1c98c96c41e51bce84a72a7f8b6dafe98cc52 | [
"Apache-2.0"
] | null | null | null | # PyAlgoTrade
#
# Copyright 2011-2014 Gabriel Martin Becedillas Ruiz
#
# 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 ap... | 32.396552 | 133 | 0.656466 |
ac875409fdfa56acdebef1b1b6cf53d33abb2ef7 | 210 | py | Python | mietrechtspraxis/mietrechtspraxis/doctype/rm_log/test_rm_log.py | libracore/mietrechtspraxis | 7b2320a70b98b086be136a86b1ab4fadfce215ff | [
"MIT"
] | 1 | 2021-07-15T13:25:23.000Z | 2021-07-15T13:25:23.000Z | mietrechtspraxis/mietrechtspraxis/doctype/rm_log/test_rm_log.py | libracore/mietrechtspraxis | 7b2320a70b98b086be136a86b1ab4fadfce215ff | [
"MIT"
] | 1 | 2022-01-27T13:30:56.000Z | 2022-01-27T13:30:56.000Z | mietrechtspraxis/mietrechtspraxis/doctype/rm_log/test_rm_log.py | libracore/mietrechtspraxis | 7b2320a70b98b086be136a86b1ab4fadfce215ff | [
"MIT"
] | 2 | 2021-08-14T22:23:08.000Z | 2021-09-08T09:31:51.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2021, libracore AG and Contributors
# See license.txt
from __future__ import unicode_literals
# import frappe
import unittest
class TestRMLog(unittest.TestCase):
pass
| 19.090909 | 51 | 0.757143 |
55c2917e83e6a105bf91c9be25554113fd7e262f | 2,554 | py | Python | tests/admin_filters/models.py | peteralexandercharles/django | 61c7350f41f2534daf3888709f3c987b7d779a29 | [
"BSD-3-Clause",
"0BSD"
] | null | null | null | tests/admin_filters/models.py | peteralexandercharles/django | 61c7350f41f2534daf3888709f3c987b7d779a29 | [
"BSD-3-Clause",
"0BSD"
] | null | null | null | tests/admin_filters/models.py | peteralexandercharles/django | 61c7350f41f2534daf3888709f3c987b7d779a29 | [
"BSD-3-Clause",
"0BSD"
] | null | null | null | from django.contrib.auth.models import User
from django.contrib.contenttypes.fields import (
GenericForeignKey,
GenericRelation,
)
from django.contrib.contenttypes.models import ContentType
from django.db import models
class Book(models.Model):
title = models.CharField(max_length=50)
year = models.Pos... | 26.061224 | 79 | 0.649961 |
9ff7ae0cdfd0594a0156e6523736fbaef384fbac | 8,293 | py | Python | scripts/benchmark-runner.py | meyering/velox | 74a9c72fabc02fa124c000764eba4982e9dcc3c1 | [
"Apache-2.0"
] | null | null | null | scripts/benchmark-runner.py | meyering/velox | 74a9c72fabc02fa124c000764eba4982e9dcc3c1 | [
"Apache-2.0"
] | null | null | null | scripts/benchmark-runner.py | meyering/velox | 74a9c72fabc02fa124c000764eba4982e9dcc3c1 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
#
# 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 require... | 31.532319 | 88 | 0.62812 |
ec7c1d2d30d026066dd99d5e3b74a90bf692141b | 4,017 | py | Python | tests/reporter/test_adapter.py | octoenergy/oliver-twist | 7496208d9de4c21cd9e0d553f24bf07612ddc720 | [
"Apache-2.0"
] | 37 | 2020-12-17T13:32:12.000Z | 2022-03-16T07:19:56.000Z | tests/reporter/test_adapter.py | Norina-Sun/oliver-twist | 5bb9b2cddc097d89d4a3eff78c63036682dd19f8 | [
"Apache-2.0"
] | 28 | 2020-12-17T16:20:14.000Z | 2022-01-21T09:00:15.000Z | tests/reporter/test_adapter.py | octoenergy/oliver-twist | 7496208d9de4c21cd9e0d553f24bf07612ddc720 | [
"Apache-2.0"
] | 2 | 2021-08-09T17:07:23.000Z | 2021-11-05T14:37:18.000Z | from typing import List
from olivertwist.manifest import Node
from olivertwist.metricengine.result import MetricResult
from olivertwist.reporter.adapter import to_html_report
from olivertwist.reporter.model import (
ReportSummary,
ReportModel,
ReportMetrics,
ReportRule,
ReportStatus,
Report,
... | 47.821429 | 1,530 | 0.59995 |
9a07f2ba132b6253dd5abe842fb274845b5d886e | 21,635 | py | Python | acq4/drivers/MultiClamp/multiclamp.py | campagnola/acq4 | 09699c07d8949950f6df149cf17892aaa3a37402 | [
"MIT"
] | 47 | 2015-01-05T16:18:10.000Z | 2022-03-16T13:09:30.000Z | acq4/drivers/MultiClamp/multiclamp.py | acq4/acq4 | c77636a76d68ffa1bc7dbd41edc522e523b909b8 | [
"MIT"
] | 48 | 2015-04-19T16:51:41.000Z | 2022-03-31T14:48:16.000Z | acq4/drivers/MultiClamp/multiclamp.py | acq4/acq4 | c77636a76d68ffa1bc7dbd41edc522e523b909b8 | [
"MIT"
] | 32 | 2015-01-15T14:11:49.000Z | 2021-07-15T13:44:52.000Z | # -*- coding: utf-8 -*-
from __future__ import print_function
import atexit
import ctypes
import inspect
import os
import sys
import threading
from acq4.drivers.MultiClamp.MultiClampTelegraph import wmlib, MultiClampTelegraph
from acq4.util.clibrary import winDefs, CParser, find_lib, CLibrary
from acq4.util.debug imp... | 36.48398 | 160 | 0.558955 |
32a566ec09a08c343d6d401c755e73fa6255e5b2 | 269 | py | Python | hands/system_management/doctype/process_identification/process_identification.py | gchartas/hands | 480032a6399ee4730585f85469a048b2c3fa6163 | [
"MIT"
] | null | null | null | hands/system_management/doctype/process_identification/process_identification.py | gchartas/hands | 480032a6399ee4730585f85469a048b2c3fa6163 | [
"MIT"
] | null | null | null | hands/system_management/doctype/process_identification/process_identification.py | gchartas/hands | 480032a6399ee4730585f85469a048b2c3fa6163 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2020, EngLandGR and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
# import frappe
from frappe.model.document import Document
class ProcessIdentification(Document):
pass
| 24.454545 | 49 | 0.784387 |
c9ee5532f1d6bf045498e35410dd7db38caae3a3 | 170 | py | Python | blog/home/urls.py | jason229295479/blog | ab44b13d3003e8660b1b7be64cc3248f12846330 | [
"MIT"
] | null | null | null | blog/home/urls.py | jason229295479/blog | ab44b13d3003e8660b1b7be64cc3248f12846330 | [
"MIT"
] | null | null | null | blog/home/urls.py | jason229295479/blog | ab44b13d3003e8660b1b7be64cc3248f12846330 | [
"MIT"
] | null | null | null | # users子应用的视图路由
from django.urls import path
from home.views import IndexView
urlpatterns = [
# 参数1 路由 参数2 视图函数名
path('', IndexView.as_view(), name='index'),
]
| 17 | 48 | 0.694118 |
247a62f0eb89254ae3b72eb491f3412ee4dc67d8 | 3,216 | py | Python | src/collective/solr/extender.py | IMIO/collective.solr | 844219eb3968b34d2b83a7bd5f59340d676d149e | [
"ZPL-1.1"
] | 15 | 2015-04-13T14:54:47.000Z | 2022-01-17T09:18:00.000Z | src/collective/solr/extender.py | IMIO/collective.solr | 844219eb3968b34d2b83a7bd5f59340d676d149e | [
"ZPL-1.1"
] | 198 | 2015-01-30T15:29:32.000Z | 2022-03-22T10:39:31.000Z | src/collective/solr/extender.py | adrianschulz/collective.solr | 2d76fe01a02174d383fdc335d38ee52afa8bfa27 | [
"ZPL-1.1"
] | 34 | 2015-02-24T09:23:31.000Z | 2022-03-01T02:31:39.000Z | # -*- coding: utf-8 -*-
from Acquisition import aq_base
from archetypes.schemaextender.field import ExtensionField
from archetypes.schemaextender.interfaces import ISchemaExtender
from archetypes.schemaextender.interfaces import IBrowserLayerAwareExtender
from collective.solr.browser.interfaces import IThemeSpecific
fr... | 32.484848 | 79 | 0.65796 |
46bc81233c01353b65930456e286f075b32bcb27 | 350 | py | Python | output/models/nist_data/list_pkg/short/schema_instance/nistschema_sv_iv_list_short_enumeration_3_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 1 | 2021-08-14T17:59:21.000Z | 2021-08-14T17:59:21.000Z | output/models/nist_data/list_pkg/short/schema_instance/nistschema_sv_iv_list_short_enumeration_3_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 4 | 2020-02-12T21:30:44.000Z | 2020-04-15T20:06:46.000Z | output/models/nist_data/list_pkg/short/schema_instance/nistschema_sv_iv_list_short_enumeration_3_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | null | null | null | from output.models.nist_data.list_pkg.short.schema_instance.nistschema_sv_iv_list_short_enumeration_3_xsd.nistschema_sv_iv_list_short_enumeration_3 import (
NistschemaSvIvListShortEnumeration3,
NistschemaSvIvListShortEnumeration3Type,
)
__all__ = [
"NistschemaSvIvListShortEnumeration3",
"NistschemaSvIv... | 35 | 156 | 0.857143 |
fce0e6559321edab4f622f41ac71625fd7894abd | 10,866 | py | Python | chainerrl/replay_buffer.py | xinyuewang1/chainerrl | 49425d09cb0749968f4e364e281670e752a46791 | [
"MIT"
] | null | null | null | chainerrl/replay_buffer.py | xinyuewang1/chainerrl | 49425d09cb0749968f4e364e281670e752a46791 | [
"MIT"
] | null | null | null | chainerrl/replay_buffer.py | xinyuewang1/chainerrl | 49425d09cb0749968f4e364e281670e752a46791 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from builtins import * # NOQA
from future import standard_library
from future.utils import with_metaclass
standard_library.install_aliases() # NOQA
from abc import ABCM... | 37.468966 | 79 | 0.635008 |
6b60210c62526a0f42eb0b0b6aa294e1f7f45724 | 16,056 | py | Python | traj_movie.py | gnurser/ARIANEcode | 45a22c67334f525ccd01112fc9f923020b59498b | [
"MIT"
] | null | null | null | traj_movie.py | gnurser/ARIANEcode | 45a22c67334f525ccd01112fc9f923020b59498b | [
"MIT"
] | null | null | null | traj_movie.py | gnurser/ARIANEcode | 45a22c67334f525ccd01112fc9f923020b59498b | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from __future__ import print_function
from __future__ import division
import os, sys
from os.path import join as pjoin
from argparse import ArgumentParser, ArgumentTypeError
import datetime
import numpy as np
import numpy.ma as ma
import netCDF4
from netCDF4 import Dataset
import matplotlib as... | 34.529032 | 152 | 0.581589 |
6d265e4e27e5c913ea941c4f92cfcadee7628d4e | 878 | py | Python | src/tokenizer/dynamodb-client/python/bin/rst2xetex.py | StevenDavid/lambda-layer-tokenization | 2ea9178e0be2a8bff1c8c8069a26f56a44f7e105 | [
"Apache-2.0"
] | null | null | null | src/tokenizer/dynamodb-client/python/bin/rst2xetex.py | StevenDavid/lambda-layer-tokenization | 2ea9178e0be2a8bff1c8c8069a26f56a44f7e105 | [
"Apache-2.0"
] | null | null | null | src/tokenizer/dynamodb-client/python/bin/rst2xetex.py | StevenDavid/lambda-layer-tokenization | 2ea9178e0be2a8bff1c8c8069a26f56a44f7e105 | [
"Apache-2.0"
] | null | null | null | #!/var/lang/bin/python3.7
# $Id: rst2xetex.py 7847 2015-03-17 17:30:47Z milde $
# Author: Guenter Milde
# Copyright: This module has been placed in the public domain.
"""
A minimal front end to the Docutils Publisher, producing Lua/XeLaTeX code.
"""
try:
import locale
locale.setlocale(locale.LC_ALL, '')
exce... | 31.357143 | 77 | 0.669704 |
900211176797acf0e6433be42664168a867b7a7e | 1,644 | py | Python | imgEditor.py | biogui/simple-image-editor-with-opencv | 81a5d71c98c9e1f360ea4d8e281e29db6f386075 | [
"MIT"
] | 2 | 2020-08-11T07:02:49.000Z | 2020-08-12T00:31:57.000Z | imgEditor.py | biogui/simple-image-editor-with-opencv | 81a5d71c98c9e1f360ea4d8e281e29db6f386075 | [
"MIT"
] | 1 | 2020-08-10T20:27:22.000Z | 2020-08-10T20:27:22.000Z | imgEditor.py | biogui/simple-image-editor-with-opencv | 81a5d71c98c9e1f360ea4d8e281e29db6f386075 | [
"MIT"
] | null | null | null | import os
from re import compile
from sys import argv
from cv2 import imread, imwrite
from resize import resize
from blur import blur
from sharpen import sharpen
def menu(fileName, dirPath, i):
print("Now, what to do whith {}?".format(fileName))
cmd = input(">> ")
originalImg = imread(fileName)
i... | 26.95082 | 88 | 0.648418 |
d5664903d2606238bb85181aab0446fac01c6d49 | 7,561 | py | Python | tensorflow/python/ops/numpy_ops/__init__.py | TOT0RoKR/tensorflow | 12c2babf7dccc00c13d6e297c0f792f89f7408aa | [
"Apache-2.0"
] | 3 | 2021-07-24T07:19:49.000Z | 2021-07-25T04:04:36.000Z | tensorflow/python/ops/numpy_ops/__init__.py | CaptainGizzy21/tensorflow | 3457a2b122e50b4d44ceaaed5a663d635e5c22df | [
"Apache-2.0"
] | 6 | 2021-11-10T20:16:36.000Z | 2022-02-10T05:52:17.000Z | tensorflow/python/ops/numpy_ops/__init__.py | CaptainGizzy21/tensorflow | 3457a2b122e50b4d44ceaaed5a663d635e5c22df | [
"Apache-2.0"
] | 3 | 2021-09-26T22:20:25.000Z | 2021-09-26T23:07:13.000Z | # Copyright 2020 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 37.430693 | 113 | 0.757043 |
5e484b00fe885c90ecdd071043369f4c7e0672f5 | 3,544 | py | Python | Source/mysite/settings.py | Friend-File-Inc/Friend-File-Source | 5af9e66a1cd94dabd90b185d9e5c1ba39866e46f | [
"MIT"
] | 1 | 2021-12-19T03:45:10.000Z | 2021-12-19T03:45:10.000Z | Source/mysite/settings.py | Friend-File-Inc/Friend-File-Source | 5af9e66a1cd94dabd90b185d9e5c1ba39866e46f | [
"MIT"
] | null | null | null | Source/mysite/settings.py | Friend-File-Inc/Friend-File-Source | 5af9e66a1cd94dabd90b185d9e5c1ba39866e46f | [
"MIT"
] | null | null | null | """
Django settings for kavinblog project.
Generated by 'django-admin startproject' using Django 3.1.5.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
from pathl... | 25.314286 | 91 | 0.698928 |
9add0b396706d07c0565770cb77a2bea57c768c4 | 235 | py | Python | re_match_slicing.py | bmintz/python-snippets | 982861c173bf4bcd5d908514a9e8b1914a580a5d | [
"CC0-1.0"
] | 2 | 2018-11-12T10:33:13.000Z | 2019-02-24T05:01:40.000Z | re_match_slicing.py | iomintz/python-snippets | 982861c173bf4bcd5d908514a9e8b1914a580a5d | [
"CC0-1.0"
] | null | null | null | re_match_slicing.py | iomintz/python-snippets | 982861c173bf4bcd5d908514a9e8b1914a580a5d | [
"CC0-1.0"
] | 2 | 2018-11-24T08:16:59.000Z | 2019-02-24T04:41:30.000Z | #!/usr/bin/env python3
"""
as of 3.6, match objects support indexing. How about slicing?
"""
import re
match = re.search('(.)(.)(.)', 'abc')
assert match[0]
assert match[1]
assert match[2]
print(match[:-1]) # fails with IndexError
| 16.785714 | 61 | 0.655319 |
07be436f1651aff1418e7982fb9688c4e4b25af4 | 4,186 | py | Python | roll_secret.py | petersonns/altus-azure-tools | 84525b5363dd13e0526f41422cf40432b62e63fa | [
"Apache-2.0"
] | 1 | 2018-05-09T14:50:31.000Z | 2018-05-09T14:50:31.000Z | roll_secret.py | petersonns/altus-azure-tools | 84525b5363dd13e0526f41422cf40432b62e63fa | [
"Apache-2.0"
] | null | null | null | roll_secret.py | petersonns/altus-azure-tools | 84525b5363dd13e0526f41422cf40432b62e63fa | [
"Apache-2.0"
] | 4 | 2018-10-09T03:20:04.000Z | 2020-12-12T10:10:47.000Z | # Copyright (c) 2018 Cloudera, Inc. All rights reserved.
# We have to have a procedure in place to roll the AzureClient secrets in running Clusters.
# The best way to do it is via updating the director's environment information.
# Make sure to install the director package. cloudera-director.
# Usage information:
# ~/r... | 38.759259 | 91 | 0.693263 |
09b2cf3028ccee1e7d4894b9a65b5fad19f7c26c | 9,617 | py | Python | script/prepare.py | SecureBrain/idaflirt-detector | 035fe9abbf5c0106a23f1b3c41a570cc63ee234b | [
"MIT"
] | null | null | null | script/prepare.py | SecureBrain/idaflirt-detector | 035fe9abbf5c0106a23f1b3c41a570cc63ee234b | [
"MIT"
] | null | null | null | script/prepare.py | SecureBrain/idaflirt-detector | 035fe9abbf5c0106a23f1b3c41a570cc63ee234b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
#
# idaflirt-detector
# https://github.com/SecureBrain/idaflirt-detector
# Copyright (c) 2022 SecureBrain
import collections
import glob
import json
import math
import os
import re
import struct
import subprocess
import sys
try:
import idaapi
import idautils
im... | 30.337539 | 79 | 0.496309 |
3f98dc405a6a46ee2e57fdc793a718e14048c105 | 7,146 | py | Python | nuplan/planning/nuboard/tabs/test/test_histogram_tab.py | MCZhi/nuplan-devkit | 3c4f5b8dcd517b27cfd258915ca5fe5c54e3cb0c | [
"Apache-2.0"
] | null | null | null | nuplan/planning/nuboard/tabs/test/test_histogram_tab.py | MCZhi/nuplan-devkit | 3c4f5b8dcd517b27cfd258915ca5fe5c54e3cb0c | [
"Apache-2.0"
] | null | null | null | nuplan/planning/nuboard/tabs/test/test_histogram_tab.py | MCZhi/nuplan-devkit | 3c4f5b8dcd517b27cfd258915ca5fe5c54e3cb0c | [
"Apache-2.0"
] | null | null | null | import json
import os
import tempfile
import unittest
from pathlib import Path
from bokeh.document.document import Document
from bokeh.layouts import LayoutDOM
from bokeh.models import Panel
from nuplan.planning.metrics.metric_engine import MetricsEngine
from nuplan.planning.metrics.metric_file import MetricFile, Metr... | 44.111111 | 120 | 0.596977 |
2f46c0b1aa69495a639839838ebc3957239662e5 | 64,324 | py | Python | tests/regressiontests/cache/tests.py | vzuuum/django | b282fb06ca5d483f0166e690cbce8073940323d5 | [
"BSD-3-Clause"
] | 1 | 2015-11-08T16:09:40.000Z | 2015-11-08T16:09:40.000Z | tests/regressiontests/cache/tests.py | vzuuum/django | b282fb06ca5d483f0166e690cbce8073940323d5 | [
"BSD-3-Clause"
] | null | null | null | tests/regressiontests/cache/tests.py | vzuuum/django | b282fb06ca5d483f0166e690cbce8073940323d5 | [
"BSD-3-Clause"
] | 1 | 2021-11-01T18:47:37.000Z | 2021-11-01T18:47:37.000Z | # -*- coding: utf-8 -*-
# Unit tests for cache framework
# Uses whatever cache backend is set in the test settings file.
import hashlib
import os
import tempfile
import time
import warnings
from django.conf import settings
from django.core import management
from django.core.cache import get_cache, DEFAULT_CACHE_ALIA... | 44.7627 | 190 | 0.66277 |
d254642cd279a6b0ede648439c56fa9f97787e97 | 2,265 | py | Python | {{ cookiecutter.repo_name }}/docs/add_graphs_to_docs.py | Gainanist/cookiecutter-data-science | 4841fe57eedb4f10f1575a9c6d4494d1265a1e2a | [
"MIT"
] | null | null | null | {{ cookiecutter.repo_name }}/docs/add_graphs_to_docs.py | Gainanist/cookiecutter-data-science | 4841fe57eedb4f10f1575a9c6d4494d1265a1e2a | [
"MIT"
] | null | null | null | {{ cookiecutter.repo_name }}/docs/add_graphs_to_docs.py | Gainanist/cookiecutter-data-science | 4841fe57eedb4f10f1575a9c6d4494d1265a1e2a | [
"MIT"
] | null | null | null | import os
import shutil
import click
@click.command()
@click.option('-s', '--source', type=click.Path(exists=True, file_okay=False))
@click.option('-d', '--docs', type=click.Path(exists=True, file_okay=False))
def main(source: str, docs: str):
graphs_dir_name = 'graphs'
graphs_dir_path = os.path.join(docs, gr... | 33.308824 | 153 | 0.460486 |
763ed9d7d97ceb1f2d19c2607354a754b3f34f71 | 832 | py | Python | geo_pyspark/utils/rdd_pickling.py | Imbruced/geo_pyspark | 26da16d48168789c5f2bb75b5fdec1f515bf9cb1 | [
"Apache-2.0"
] | 7 | 2019-10-10T05:47:37.000Z | 2020-09-08T06:37:03.000Z | geo_pyspark/utils/rdd_pickling.py | Imbruced/geo_pyspark | 26da16d48168789c5f2bb75b5fdec1f515bf9cb1 | [
"Apache-2.0"
] | 3 | 2019-12-16T16:49:57.000Z | 2021-08-23T20:43:32.000Z | geo_pyspark/utils/rdd_pickling.py | Imbruced/geo_pyspark | 26da16d48168789c5f2bb75b5fdec1f515bf9cb1 | [
"Apache-2.0"
] | 3 | 2019-10-17T16:10:41.000Z | 2022-01-24T12:56:21.000Z | from pyspark import PickleSerializer
from geo_pyspark.utils.binary_parser import BinaryParser
from geo_pyspark.utils.spatial_rdd_parser import SpatialRDDParserData, SpatialPairRDDParserData
PARSERS = {
0: SpatialRDDParserData(),
1: SpatialRDDParserData(),
2: SpatialPairRDDParserData(),
}
class GeoSpar... | 25.212121 | 95 | 0.727163 |
27913892cda230e4d6bf45b4c6c982026a9be380 | 702 | py | Python | migrator/migrator/urls.py | vittoriozamboni/django-groups-manager-migrator | 005a3d59bc92a763dde98867096602d59c132f47 | [
"MIT"
] | null | null | null | migrator/migrator/urls.py | vittoriozamboni/django-groups-manager-migrator | 005a3d59bc92a763dde98867096602d59c132f47 | [
"MIT"
] | null | null | null | migrator/migrator/urls.py | vittoriozamboni/django-groups-manager-migrator | 005a3d59bc92a763dde98867096602d59c132f47 | [
"MIT"
] | null | null | null | """migrator URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.8/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-ba... | 33.428571 | 77 | 0.702279 |
2f2ce379b9d8fa050c9d4d311d14bcd178acfdf3 | 1,037 | py | Python | src/users/migrations/0001_initial.py | aliharby12/Simple-vezeeta-project | feb6df8b354ac284edc645059bea17021169dcfa | [
"MIT"
] | null | null | null | src/users/migrations/0001_initial.py | aliharby12/Simple-vezeeta-project | feb6df8b354ac284edc645059bea17021169dcfa | [
"MIT"
] | 5 | 2021-03-19T12:06:16.000Z | 2022-02-10T11:44:27.000Z | src/users/migrations/0001_initial.py | aliharby12/Simple-vezeeta-project | feb6df8b354ac284edc645059bea17021169dcfa | [
"MIT"
] | null | null | null | # Generated by Django 2.2 on 2020-07-31 06:40
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
opera... | 33.451613 | 150 | 0.621986 |
0c82578b059f60874569d0472b45df2a2a217e75 | 531 | py | Python | test/python/tools/jupyter/__init__.py | Roshan-Thomas/qiskit-terra | 77219b5c7b7146b1545c5e5190739b36f4064b2f | [
"Apache-2.0"
] | 1,599 | 2018-07-10T10:59:12.000Z | 2022-03-31T23:56:25.000Z | test/python/tools/jupyter/__init__.py | Roshan-Thomas/qiskit-terra | 77219b5c7b7146b1545c5e5190739b36f4064b2f | [
"Apache-2.0"
] | 5,244 | 2018-07-10T06:20:13.000Z | 2022-03-31T22:18:48.000Z | test/python/tools/jupyter/__init__.py | Roshan-Thomas/qiskit-terra | 77219b5c7b7146b1545c5e5190739b36f4064b2f | [
"Apache-2.0"
] | 1,409 | 2018-07-10T02:16:12.000Z | 2022-03-31T09:01:32.000Z | # This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2018.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivat... | 37.928571 | 77 | 0.755179 |
dbe3625d3c5f775bbdc1e9f27633748a06209f2d | 373 | py | Python | backend/snifferapp/packetTracer/Action.py | DTrafford/IDPS | 1eaccfc218adcb7231e64271731c765f8362b891 | [
"MIT"
] | null | null | null | backend/snifferapp/packetTracer/Action.py | DTrafford/IDPS | 1eaccfc218adcb7231e64271731c765f8362b891 | [
"MIT"
] | null | null | null | backend/snifferapp/packetTracer/Action.py | DTrafford/IDPS | 1eaccfc218adcb7231e64271731c765f8362b891 | [
"MIT"
] | null | null | null | from enum import Enum
class Action(Enum):
"""An action to be done by the NIDS in case of detected packet."""
ALERT = 1
def action(istr):
"""Return Action corresponding to the string."""
str = istr.lower().strip()
if (str == "alert"):
return Action.ALERT
else:
raise ValueError(... | 24.866667 | 77 | 0.61126 |
49d7fb16ba6045190e355d3fe73b934670904dc6 | 1,508 | py | Python | tests/unittests/test_text_classification.py | tlienart/autogluon | d02e37f41cd947dd1281bb1296cd12a8187ec441 | [
"Apache-2.0"
] | 6 | 2020-06-16T19:17:36.000Z | 2021-07-07T14:50:31.000Z | tests/unittests/test_text_classification.py | tlienart/autogluon | d02e37f41cd947dd1281bb1296cd12a8187ec441 | [
"Apache-2.0"
] | null | null | null | tests/unittests/test_text_classification.py | tlienart/autogluon | d02e37f41cd947dd1281bb1296cd12a8187ec441 | [
"Apache-2.0"
] | 2 | 2020-12-13T16:40:04.000Z | 2021-03-08T09:14:16.000Z | import os
import autogluon as ag
from autogluon import TextClassification as task
def test_fit():
dataset = task.Dataset(name='ToySST')
predictor = task.fit(dataset,
net=ag.Categorical('bert_12_768_12'),
pretrained_dataset=ag.Categorical('book_corpus_wiki_en_un... | 39.684211 | 90 | 0.52321 |
03a813fd584f023e11a31dd8708694fc846c3389 | 9,102 | py | Python | datasets/csds/csds.py | ExpressAI/DataLab | c3eddd4068f131d031c2486c60b650092bb0ae84 | [
"Apache-2.0"
] | 54 | 2022-01-26T06:58:58.000Z | 2022-03-31T05:11:35.000Z | datasets/csds/csds.py | ExpressAI/DataLab | c3eddd4068f131d031c2486c60b650092bb0ae84 | [
"Apache-2.0"
] | 81 | 2022-01-26T06:46:41.000Z | 2022-03-24T05:05:31.000Z | datasets/csds/csds.py | ExpressAI/DataLab | c3eddd4068f131d031c2486c60b650092bb0ae84 | [
"Apache-2.0"
] | 7 | 2022-02-06T09:28:31.000Z | 2022-03-16T01:06:37.000Z | """CSDS: Chinese Dataset for Customer Service Dialogue Summarization."""
import os
import json
import datalabs
from datalabs import get_task, TaskType
_CITATION = """\
@inproceedings{lin-etal-2021-csds,
title = "{CSDS}: A Fine-Grained {C}hinese Dataset for Customer Service Dialogue Summarization",
author = "... | 45.059406 | 1,352 | 0.621182 |
eaec428962f6072584a34c1f19b0d78dd49d22e2 | 1,938 | py | Python | allennlp_semparse/state_machines/__init__.py | nitishgupta/allennlp-semparse | 0315b59df482c27ad36808cf7a992f01e07e36b1 | [
"Apache-2.0"
] | 105 | 2019-08-28T14:16:31.000Z | 2022-03-26T20:51:22.000Z | allennlp_semparse/state_machines/__init__.py | nitishgupta/allennlp-semparse | 0315b59df482c27ad36808cf7a992f01e07e36b1 | [
"Apache-2.0"
] | 44 | 2019-09-09T20:52:40.000Z | 2022-03-28T03:04:38.000Z | allennlp_semparse/state_machines/__init__.py | nitishgupta/allennlp-semparse | 0315b59df482c27ad36808cf7a992f01e07e36b1 | [
"Apache-2.0"
] | 19 | 2019-09-09T17:34:27.000Z | 2021-09-08T08:22:08.000Z | """
This module contains code for using state machines in a model to do transition-based decoding.
"Transition-based decoding" is where you start in some state, iteratively transition between
states, and have some kind of supervision signal that tells you which end states, or which
transition sequences, are "good".
Ty... | 62.516129 | 99 | 0.79515 |
8dde6baedad6c7c3dc1abd0e440421a7c841abac | 873 | py | Python | Codes/gracekoo/19_remove-nth-node-from-end-of-list.py | liuxiaohui1221/algorithm | d80e64185ceb4798ac5389bfbd226dc1d406f6b5 | [
"Apache-2.0"
] | null | null | null | Codes/gracekoo/19_remove-nth-node-from-end-of-list.py | liuxiaohui1221/algorithm | d80e64185ceb4798ac5389bfbd226dc1d406f6b5 | [
"Apache-2.0"
] | null | null | null | Codes/gracekoo/19_remove-nth-node-from-end-of-list.py | liuxiaohui1221/algorithm | d80e64185ceb4798ac5389bfbd226dc1d406f6b5 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# @Time: 2019/12/31 12:11 下午
# @Author: GraceKoo
# @File: 19_remove-nth-node-from-end-of-list.py
# @Desc: 通过同时向前移动两个间隔为n的指针,直到第一个指针到达最后一个节点。此时第二个指针将指向从最后一个节点数起的第n个节点
# Definition for singly-linked list.
class ListNode:
def __init__(self, x):
self.val = x
self.next = None
c... | 27.28125 | 68 | 0.600229 |
0723a52f944e6f3ecfd1f592003266a72b9d38e1 | 3,775 | py | Python | src/sentry/web/frontend/accept_organization_invite.py | E-LLP/sentry | 83d97a0ca45cdaac1d5f3026058131a3aeae0068 | [
"BSD-3-Clause"
] | 4 | 2016-03-16T07:21:36.000Z | 2017-09-04T07:29:56.000Z | src/sentry/web/frontend/accept_organization_invite.py | mitsuhiko/sentry | cddc3b643a13b52ac6d07ff22e4bd5d69ecbad90 | [
"BSD-3-Clause"
] | null | null | null | src/sentry/web/frontend/accept_organization_invite.py | mitsuhiko/sentry | cddc3b643a13b52ac6d07ff22e4bd5d69ecbad90 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
from django import forms
from django.contrib import messages
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext_lazy as _
from sentry.models import (
AuditLogEntryEvent, OrganizationMember, Project
)
from sentry.signals import member_j... | 31.458333 | 104 | 0.57404 |
5fe70b86c9b582043059a91d220977ee4c89c83a | 8,685 | py | Python | intersight/model/vmedia_policy_list_all_of.py | CiscoDevNet/intersight-python | 04b721f37c3044646a91c185c7259edfb991557a | [
"Apache-2.0"
] | 5 | 2021-12-16T15:13:32.000Z | 2022-03-29T16:09:54.000Z | intersight/model/vmedia_policy_list_all_of.py | CiscoDevNet/intersight-python | 04b721f37c3044646a91c185c7259edfb991557a | [
"Apache-2.0"
] | 4 | 2022-01-25T19:05:51.000Z | 2022-03-29T20:18:37.000Z | intersight/model/vmedia_policy_list_all_of.py | CiscoDevNet/intersight-python | 04b721f37c3044646a91c185c7259edfb991557a | [
"Apache-2.0"
] | 2 | 2020-07-07T15:01:08.000Z | 2022-01-31T04:27:35.000Z | """
Cisco Intersight
Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environments in more advan... | 49.346591 | 1,678 | 0.637766 |
51f529ed95dc981a51f43a2e85b356cca7c5be41 | 9,408 | py | Python | mypy/test/testfinegrained.py | apage43/mypy | 71564bb5f265aab4a488c0a77da696ad17021c3c | [
"PSF-2.0"
] | null | null | null | mypy/test/testfinegrained.py | apage43/mypy | 71564bb5f265aab4a488c0a77da696ad17021c3c | [
"PSF-2.0"
] | null | null | null | mypy/test/testfinegrained.py | apage43/mypy | 71564bb5f265aab4a488c0a77da696ad17021c3c | [
"PSF-2.0"
] | null | null | null | """Test cases for fine-grained incremental checking.
Each test cases runs a batch build followed by one or more fine-grained
incremental steps. We verify that each step produces the expected output.
See the comment at the top of test-data/unit/fine-grained.test for more
information.
"""
import os
import re
from typ... | 37.935484 | 95 | 0.607674 |
ce4c27e53f1d2c11f4165e903e74c647c5f8ae7d | 955 | py | Python | mi/dataset/driver/wavss_a/dcl/test/test_wavss_a_dcl_telemetered_driver.py | petercable/mi-dataset | d3c1607ea31af85fbba5719a31d4a60bf39f8dd3 | [
"BSD-2-Clause"
] | 1 | 2015-05-10T01:08:44.000Z | 2015-05-10T01:08:44.000Z | mi/dataset/driver/wavss_a/dcl/test/test_wavss_a_dcl_telemetered_driver.py | petercable/mi-dataset | d3c1607ea31af85fbba5719a31d4a60bf39f8dd3 | [
"BSD-2-Clause"
] | null | null | null | mi/dataset/driver/wavss_a/dcl/test/test_wavss_a_dcl_telemetered_driver.py | petercable/mi-dataset | d3c1607ea31af85fbba5719a31d4a60bf39f8dd3 | [
"BSD-2-Clause"
] | 9 | 2015-04-15T21:09:08.000Z | 2019-11-15T03:18:53.000Z | #!/usr/bin/env python
import os
import unittest
from nose.plugins.attrib import attr
from mi.core.log import get_logger
from mi.dataset.dataset_driver import ParticleDataHandler
from mi.dataset.driver.wavss_a.dcl.wavss_a_dcl_telemetered_driver import parse
from mi.dataset.driver.wavss_a.dcl.resource import RESOURCE_P... | 27.285714 | 84 | 0.753927 |
e95cc5a8b8246fbee728d3ad7b0b8cc78510e9e3 | 5,538 | py | Python | sdk/python/pulumi_azure_nextgen/web/list_app_service_plan_hybrid_connection_keys.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 31 | 2020-09-21T09:41:01.000Z | 2021-02-26T13:21:59.000Z | sdk/python/pulumi_azure_nextgen/web/list_app_service_plan_hybrid_connection_keys.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 231 | 2020-09-21T09:38:45.000Z | 2021-03-01T11:16:03.000Z | sdk/python/pulumi_azure_nextgen/web/list_app_service_plan_hybrid_connection_keys.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 4 | 2020-09-29T14:14:59.000Z | 2021-02-10T20:38:16.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from .. import _utilities, _tables
from ... | 36.434211 | 172 | 0.641026 |
e0ea9cf4c3518427f17e7afaabddcdcb2a97bb2b | 3,696 | py | Python | webpage/views.py | acdh-oeaw/hapa | 0e1776cdf5ab02892b96d073003856a4f8c097bd | [
"MIT"
] | null | null | null | webpage/views.py | acdh-oeaw/hapa | 0e1776cdf5ab02892b96d073003856a4f8c097bd | [
"MIT"
] | 36 | 2021-02-09T09:29:40.000Z | 2022-01-26T08:49:38.000Z | webpage/views.py | acdh-oeaw/hapa | 0e1776cdf5ab02892b96d073003856a4f8c097bd | [
"MIT"
] | null | null | null | from copy import deepcopy
import requests
from django.conf import settings
from django.shortcuts import render
from django.http import HttpResponse, HttpResponseRedirect, JsonResponse
from django.template import loader
from django.views.generic import TemplateView
from django.contrib.auth import authenticate, login, ... | 32.13913 | 99 | 0.63961 |
2f38e9d5402d8045cb983cfecdbca2ed599c341a | 580 | py | Python | 145-binary-tree-postorder-traversal/145-binary-tree-postorder-traversal.py | tlylt/LeetCodeAnki | 9f69504c3762f7895d95c2a592f18ad395199ff4 | [
"MIT"
] | 1 | 2022-02-14T08:03:32.000Z | 2022-02-14T08:03:32.000Z | 145-binary-tree-postorder-traversal/145-binary-tree-postorder-traversal.py | tlylt/LeetCodeAnki | 9f69504c3762f7895d95c2a592f18ad395199ff4 | [
"MIT"
] | null | null | null | 145-binary-tree-postorder-traversal/145-binary-tree-postorder-traversal.py | tlylt/LeetCodeAnki | 9f69504c3762f7895d95c2a592f18ad395199ff4 | [
"MIT"
] | null | null | null | # Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def postorderTraversal(self, root: Optional[TreeNode]) -> List[int]:
ans = []
if not root:
... | 27.619048 | 72 | 0.481034 |
cc7e1def350445dc8d1d8fea70b91d23f6f41d83 | 3,584 | py | Python | Mining.py | phelipegustavo/depressive-disorders-data-mining | f98a983f5472c2f2a54f4c913daa222c0a996364 | [
"MIT"
] | 1 | 2021-09-24T09:15:37.000Z | 2021-09-24T09:15:37.000Z | Mining.py | phelipegustavo/depressive-disorders-data-mining | f98a983f5472c2f2a54f4c913daa222c0a996364 | [
"MIT"
] | null | null | null | Mining.py | phelipegustavo/depressive-disorders-data-mining | f98a983f5472c2f2a54f4c913daa222c0a996364 | [
"MIT"
] | null | null | null | import json
import subprocess
import requests
import urllib.request
import math
import time
import os
from Utils.Config import *
from Utils import File
from Parser import Parser
class Mining:
def __init__(self, term, db='pmc'):
self.db = db
self.term = term
self.path = ''
self.isOffline = False
self.pagi... | 24.547945 | 92 | 0.612165 |
80d4fda090558bdfe83ad30f7129d93376e449c2 | 53,158 | py | Python | official/nlp/data/classifier_data_lib.py | cattypkung/TFObjectDetectionAPIExtractor | d2515572cc0c4f507b6efd04f6d07c87c00173e8 | [
"MIT"
] | 2 | 2021-03-03T07:54:33.000Z | 2021-03-09T16:13:01.000Z | official/nlp/data/classifier_data_lib.py | cattypkung/TFObjectDetectionAPIExtractor | d2515572cc0c4f507b6efd04f6d07c87c00173e8 | [
"MIT"
] | null | null | null | official/nlp/data/classifier_data_lib.py | cattypkung/TFObjectDetectionAPIExtractor | d2515572cc0c4f507b6efd04f6d07c87c00173e8 | [
"MIT"
] | null | null | null | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 35.134171 | 80 | 0.645453 |
e13c322b1d21f635cdf37efc745fedfaca1a2232 | 7,217 | py | Python | openbb_terminal/featflags_controller.py | ShabbirHasan1/GamestonkTerminal | 80b3c01988cda399ec7b7a1bec9cf5c8cd43a8b0 | [
"MIT"
] | null | null | null | openbb_terminal/featflags_controller.py | ShabbirHasan1/GamestonkTerminal | 80b3c01988cda399ec7b7a1bec9cf5c8cd43a8b0 | [
"MIT"
] | null | null | null | openbb_terminal/featflags_controller.py | ShabbirHasan1/GamestonkTerminal | 80b3c01988cda399ec7b7a1bec9cf5c8cd43a8b0 | [
"MIT"
] | null | null | null | """Feature Flags Controller Module"""
__docformat__ = "numpy"
# IMPORTATION STANDARD
import logging
from typing import List
# IMPORTATION THIRDPARTY
from dotenv import set_key
from prompt_toolkit.completion import NestedCompleter
# IMPORTATION INTERNAL
from openbb_terminal import feature_flags as obbff
from openbb_t... | 32.656109 | 85 | 0.642234 |
530b60146f3bb1878a7c6dde956c0aa246aba083 | 3,722 | py | Python | tests/test_cubicspline.py | radiocosmology/cora | 7d34e502c8536adc2d68b6a5d703ce8bbc6afcca | [
"MIT"
] | 14 | 2015-11-11T03:11:33.000Z | 2021-04-12T21:37:11.000Z | tests/test_cubicspline.py | radiocosmology/cora | 7d34e502c8536adc2d68b6a5d703ce8bbc6afcca | [
"MIT"
] | 21 | 2017-02-18T02:57:25.000Z | 2022-03-16T15:31:10.000Z | tests/test_cubicspline.py | radiocosmology/cora | 7d34e502c8536adc2d68b6a5d703ce8bbc6afcca | [
"MIT"
] | 15 | 2015-04-24T17:14:33.000Z | 2021-04-09T06:24:15.000Z | import numpy as np
import pytest
from cora.util import cubicspline
def test_usage():
"""Test wrong usage."""
# too little points
x = np.arange(3)
y = np.asarray([0, 10, 20], dtype=np.float64)
with pytest.raises(cubicspline.InterpolationException):
cubicspline.Interpolater(x, y)
# x ... | 30.508197 | 112 | 0.618216 |
ccfbb7ba886cce6347911bbc9d695262ff425716 | 414 | py | Python | maps/migrations/0016_remove_obstacles_centroid.py | geoffreynyaga/ANGA-UTM | 8371a51ad27c85d2479bb34d8c4e02ea28465941 | [
"Apache-2.0"
] | 7 | 2020-01-18T16:53:41.000Z | 2021-12-21T07:02:43.000Z | maps/migrations/0016_remove_obstacles_centroid.py | geoffreynyaga/ANGA-UTM | 8371a51ad27c85d2479bb34d8c4e02ea28465941 | [
"Apache-2.0"
] | 28 | 2020-01-06T18:36:54.000Z | 2022-02-10T10:03:55.000Z | maps/migrations/0016_remove_obstacles_centroid.py | geoffreynyaga/ANGA-UTM | 8371a51ad27c85d2479bb34d8c4e02ea28465941 | [
"Apache-2.0"
] | 3 | 2020-01-18T16:53:54.000Z | 2020-10-26T11:21:41.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2018-02-06 13:00
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('maps', '0015_obstacles_centroid'),
]
operations = [
migrations.Remove... | 20.7 | 49 | 0.586957 |
56021a2d0d65ff2ac1d7ee7167bc6c5eccad861a | 11,051 | py | Python | pysh/libs/text_process.py | mulinfro/pysh | 1ca48179d9b79948fc908149be30b6074efa03bc | [
"MIT"
] | 6 | 2018-11-02T01:10:46.000Z | 2021-01-13T07:50:30.000Z | pysh/libs/text_process.py | mulinfro/pysh | 1ca48179d9b79948fc908149be30b6074efa03bc | [
"MIT"
] | null | null | null | pysh/libs/text_process.py | mulinfro/pysh | 1ca48179d9b79948fc908149be30b6074efa03bc | [
"MIT"
] | null | null | null | import re, random
from types import GeneratorType
from libs.os_cmd import isDir, replace_if_star_dir
from collections.abc import Iterable
import json, collections
_pipe_func = ['grep', 'egrep', 'colSel', 'colRm', 'listFormat', 'format',
'extract', 'replace', 'tojson', 'dumps', 'strip',
'split... | 26.822816 | 90 | 0.500317 |
0f2c545d85f3fe3af9ee45d229115a671f1739f3 | 2,849 | py | Python | structures/migrations/0025_add_poco_details.py | buahaha/aa-structures | 3d8d1e126cea8584cd9cd11aed6ae0c0dbef4d5f | [
"MIT"
] | null | null | null | structures/migrations/0025_add_poco_details.py | buahaha/aa-structures | 3d8d1e126cea8584cd9cd11aed6ae0c0dbef4d5f | [
"MIT"
] | null | null | null | structures/migrations/0025_add_poco_details.py | buahaha/aa-structures | 3d8d1e126cea8584cd9cd11aed6ae0c0dbef4d5f | [
"MIT"
] | null | null | null | # Generated by Django 3.1.10 on 2021-05-22 13:46
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("structures", "0024_fix_name_fields_too_small"),
]
operations = [
migrations.AddField(
model_na... | 36.063291 | 87 | 0.433134 |
ab732b20380a334f98b10b308de6a1c741dfb93a | 169 | py | Python | my_web_scraper_app/urls.py | MisterLenivec/leniva_list | fc416f1afe9886b60bf46c9152fa5eb095def5df | [
"MIT"
] | null | null | null | my_web_scraper_app/urls.py | MisterLenivec/leniva_list | fc416f1afe9886b60bf46c9152fa5eb095def5df | [
"MIT"
] | 2 | 2020-06-07T01:38:32.000Z | 2021-06-04T22:27:50.000Z | my_web_scraper_app/urls.py | MisterLenivec/leniva_list | fc416f1afe9886b60bf46c9152fa5eb095def5df | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
urlpatterns = [
path('', views.home, name='home'),
path('new_search', views.new_search, name='new_search'),
]
| 18.777778 | 60 | 0.674556 |
13de1e3722b73648ef1218c4d900b47de105bbea | 5,481 | py | Python | ingestion/src/metadata/ingestion/stage/table_usage.py | mosiac1/OpenMetadata | 21c14d257c6ae7ed2aad2a9ccff2c3a3f1594681 | [
"Apache-2.0"
] | 1 | 2022-01-06T11:12:01.000Z | 2022-01-06T11:12:01.000Z | ingestion/src/metadata/ingestion/stage/table_usage.py | mosiac1/OpenMetadata | 21c14d257c6ae7ed2aad2a9ccff2c3a3f1594681 | [
"Apache-2.0"
] | 6 | 2022-01-05T10:24:56.000Z | 2022-01-06T09:57:07.000Z | ingestion/src/metadata/ingestion/stage/table_usage.py | mosiac1/OpenMetadata | 21c14d257c6ae7ed2aad2a9ccff2c3a3f1594681 | [
"Apache-2.0"
] | 5 | 2022-01-05T11:48:39.000Z | 2022-01-06T06:45:25.000Z | # Copyright 2021 Collate
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software... | 36.785235 | 99 | 0.560482 |
2309df1cd287585431d37b05e5b52d0ed587ee15 | 1,237 | py | Python | venv/lib/python3.9/site-packages/django_postgres_extensions/backends/postgresql/base.py | boshanxiang/bernoulli_backend | d446a33014d7bd9b5232a921edfd377d05fe0121 | [
"MIT"
] | null | null | null | venv/lib/python3.9/site-packages/django_postgres_extensions/backends/postgresql/base.py | boshanxiang/bernoulli_backend | d446a33014d7bd9b5232a921edfd377d05fe0121 | [
"MIT"
] | null | null | null | venv/lib/python3.9/site-packages/django_postgres_extensions/backends/postgresql/base.py | boshanxiang/bernoulli_backend | d446a33014d7bd9b5232a921edfd377d05fe0121 | [
"MIT"
] | null | null | null | from django.db.backends.postgresql.base import DatabaseWrapper as BaseDatabaseWrapper
from .schema import DatabaseSchemaEditor
from .creation import DatabaseCreation
from .operations import DatabaseOperations
class DatabaseWrapper(BaseDatabaseWrapper):
SchemaEditorClass = DatabaseSchemaEditor
def __... | 31.717949 | 86 | 0.478577 |
c1b66604c6a7a633fb9ca4cc4c874ecfdc61c461 | 4,894 | py | Python | tests/webgl/test_local_topi_pooling.py | jheo4/incubator-tvm | c4c61cb766608fb2f0fd8c9facc480a43afed3f5 | [
"Apache-2.0"
] | 3 | 2020-03-12T10:25:51.000Z | 2020-08-05T05:36:23.000Z | tests/webgl/test_local_topi_pooling.py | jheo4/incubator-tvm | c4c61cb766608fb2f0fd8c9facc480a43afed3f5 | [
"Apache-2.0"
] | null | null | null | tests/webgl/test_local_topi_pooling.py | jheo4/incubator-tvm | c4c61cb766608fb2f0fd8c9facc480a43afed3f5 | [
"Apache-2.0"
] | 1 | 2018-10-19T18:11:41.000Z | 2018-10-19T18:11:41.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 37.075758 | 93 | 0.611157 |
e868f29a17a8ab1527f04abe4785c12b127d0774 | 3,232 | py | Python | osh/bool_parse_test.py | msingle/oil | 5623c58d4558d37cd43e6274574d94a0e547f192 | [
"Apache-2.0"
] | null | null | null | osh/bool_parse_test.py | msingle/oil | 5623c58d4558d37cd43e6274574d94a0e547f192 | [
"Apache-2.0"
] | null | null | null | osh/bool_parse_test.py | msingle/oil | 5623c58d4558d37cd43e6274574d94a0e547f192 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python2
# Copyright 2016 Andy Chu. All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
"""
bool_parse_test.py: T... | 26.276423 | 67 | 0.676671 |
1fee6e58bc192d903b7e336fbc5a4c40c91b4d26 | 12,933 | py | Python | selfdrive/car/hyundai/interface.py | briantran33/openpilot | 994b261737f9671cc993fb64f9d526bc2e0f994e | [
"MIT"
] | 43 | 2021-05-24T00:42:42.000Z | 2022-03-31T12:41:46.000Z | selfdrive/car/hyundai/interface.py | briantran33/openpilot | 994b261737f9671cc993fb64f9d526bc2e0f994e | [
"MIT"
] | 10 | 2020-07-17T14:50:38.000Z | 2022-03-08T15:40:52.000Z | selfdrive/car/hyundai/interface.py | briantran33/openpilot | 994b261737f9671cc993fb64f9d526bc2e0f994e | [
"MIT"
] | 46 | 2021-09-06T14:51:58.000Z | 2022-03-22T14:21:14.000Z | #!/usr/bin/env python3
from cereal import car
from selfdrive.config import Conversions as CV
from selfdrive.car.hyundai.values import CAR, EV_CAR, HYBRID_CAR
from selfdrive.car import STD_CARGO_KG, scale_rot_inertia, scale_tire_stiffness, gen_empty_fingerprint
from selfdrive.car.interfaces import CarInterfaceBase
clas... | 47.029091 | 135 | 0.668213 |
2e3c46de957277a405d986f5b0cf61fefe4fc88b | 28,694 | py | Python | scanpy/tests/test_plotting.py | galicae/scanpy | 76e6b2819a8d592718514af1d20df59d59d6723f | [
"BSD-3-Clause"
] | null | null | null | scanpy/tests/test_plotting.py | galicae/scanpy | 76e6b2819a8d592718514af1d20df59d59d6723f | [
"BSD-3-Clause"
] | null | null | null | scanpy/tests/test_plotting.py | galicae/scanpy | 76e6b2819a8d592718514af1d20df59d59d6723f | [
"BSD-3-Clause"
] | null | null | null | from functools import partial
from pathlib import Path
from itertools import repeat, chain, combinations
import pytest
from matplotlib.testing import setup
from packaging import version
from scanpy._utils import pkg_version
setup()
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from matplotl... | 29.673216 | 88 | 0.564543 |
c407abd30e3fca51b838e347a8e05b9b8deadb78 | 1,003 | py | Python | heartFEM/lcleeHeart/rotateUGrid_w_axis.py | WeiXuanChan/heartFEM | 7f26c71434919c3141fac600f08685e5383e7137 | [
"MIT"
] | 3 | 2021-04-13T07:05:20.000Z | 2021-10-02T13:41:09.000Z | heartFEM/lcleeHeart/rotateUGrid_w_axis.py | WeiXuanChan/heartFEM | 7f26c71434919c3141fac600f08685e5383e7137 | [
"MIT"
] | null | null | null | heartFEM/lcleeHeart/rotateUGrid_w_axis.py | WeiXuanChan/heartFEM | 7f26c71434919c3141fac600f08685e5383e7137 | [
"MIT"
] | 2 | 2021-09-06T13:13:41.000Z | 2022-03-11T18:59:02.000Z | ########################################################################
import numpy
import vtk
from pyquaternion import Quaternion
########################################################################
def rotateUGrid_w_axis(old_ugrid, angle, axis, verbose=True):
if (verbose): print('*** rotatePDa... | 26.394737 | 73 | 0.576271 |
0540e6c2a473f5bf867c5d1c9a2c806f8f131f36 | 373 | py | Python | example/src/logging_integration.py | maartenbreddels/viztracer | 5635d430da6dac2441b3fb58f0ec669f2a36ef30 | [
"Apache-2.0"
] | 1 | 2020-11-04T03:17:40.000Z | 2020-11-04T03:17:40.000Z | example/src/logging_integration.py | maartenbreddels/viztracer | 5635d430da6dac2441b3fb58f0ec669f2a36ef30 | [
"Apache-2.0"
] | null | null | null | example/src/logging_integration.py | maartenbreddels/viztracer | 5635d430da6dac2441b3fb58f0ec669f2a36ef30 | [
"Apache-2.0"
] | null | null | null | import logging
from viztracer import get_tracer, VizLoggingHandler
def fib(n):
if n < 2:
logging.warn("Base case, return 1")
return 1
logging.info("Recursive, working on {}".format(n))
return fib(n-1) + fib(n-2)
handler = VizLoggingHandler()
handler.setTracer(get_tracer())
logging.basicC... | 21.941176 | 59 | 0.691689 |
26ac24d018d53b276300ca1ee45d8722ec74488b | 978 | py | Python | app/core/migrations/0003_ingredient.py | shenyiting2018/recipe-app-api | edd9bb28343e0d0ae2c13f8240e355ed13651b7d | [
"MIT"
] | null | null | null | app/core/migrations/0003_ingredient.py | shenyiting2018/recipe-app-api | edd9bb28343e0d0ae2c13f8240e355ed13651b7d | [
"MIT"
] | null | null | null | app/core/migrations/0003_ingredient.py | shenyiting2018/recipe-app-api | edd9bb28343e0d0ae2c13f8240e355ed13651b7d | [
"MIT"
] | null | null | null | # Generated by Django 2.1.12 on 2019-09-10 04:30
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [("core", "0002_tag")]
operations = [
migrations.CreateModel(
name="Ingredien... | 27.166667 | 68 | 0.433538 |
273dd489a7b52dfe099eb003bebb5147167d8849 | 2,930 | py | Python | aiida_supercell/utils/__init__.py | pzarabadip/aiida-supercell | 5a497ee20d286bedd229af41f299c8c5f4124e01 | [
"MIT"
] | null | null | null | aiida_supercell/utils/__init__.py | pzarabadip/aiida-supercell | 5a497ee20d286bedd229af41f299c8c5f4124e01 | [
"MIT"
] | 10 | 2021-09-02T15:40:30.000Z | 2021-09-15T07:19:59.000Z | aiida_supercell/utils/__init__.py | pzarabadip/aiida-supercell | 5a497ee20d286bedd229af41f299c8c5f4124e01 | [
"MIT"
] | null | null | null | """Parser function for Supercell outputs"""
from collections import defaultdict
def parse_supercell_output(output_string: str) -> dict: #pylint: disable=too-many-branches
"""Parses output of supercell `output.log` file
Args:
output_string (str): Content of OUTPUT.log as string
Returns:
... | 40.694444 | 120 | 0.567577 |
53575e020daf3a82a1b2202245f81827ee974961 | 23,902 | py | Python | optuna/samplers/_cmaes.py | hal-314/optuna | 92b8842c42c1d028ce4a15f50e4dfe45e900bd81 | [
"MIT"
] | null | null | null | optuna/samplers/_cmaes.py | hal-314/optuna | 92b8842c42c1d028ce4a15f50e4dfe45e900bd81 | [
"MIT"
] | null | null | null | optuna/samplers/_cmaes.py | hal-314/optuna | 92b8842c42c1d028ce4a15f50e4dfe45e900bd81 | [
"MIT"
] | null | null | null | import copy
import math
import pickle
from typing import Any
from typing import Dict
from typing import List
from typing import Optional
from typing import Tuple
import warnings
from cmaes import CMA
import numpy as np
import optuna
from optuna import logging
from optuna._study_direction import StudyDirection
from op... | 40.64966 | 99 | 0.624885 |
bea2b7b19425b7432b19eb5b121133af7b0c0a37 | 4,531 | py | Python | get_players_from_ep.py | leaffan/del_stats_backend | e002c72a5f5c6c1c6c1d956b102d8634369dc46b | [
"MIT"
] | null | null | null | get_players_from_ep.py | leaffan/del_stats_backend | e002c72a5f5c6c1c6c1d956b102d8634369dc46b | [
"MIT"
] | 3 | 2021-09-30T08:20:43.000Z | 2021-09-30T09:10:00.000Z | get_players_from_ep.py | leaffan/del_stats_backend | e002c72a5f5c6c1c6c1d956b102d8634369dc46b | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import yaml
import json
import requests
from copy import deepcopy
from lxml import html
from dateutil.parser import ParserError, parse
# loading external configuration
CONFIG = yaml.safe_load(open(os.path.join(os.path.dirname(os.path.realpath(__file__)), 'conf... | 34.067669 | 106 | 0.641139 |
f7e012df9c95e53c5c4290169f0a02f5f0559198 | 218 | py | Python | evan/__init__.py | eillarra/evan | befe0f8daedd1b1f629097110d92e68534e43da1 | [
"MIT"
] | null | null | null | evan/__init__.py | eillarra/evan | befe0f8daedd1b1f629097110d92e68534e43da1 | [
"MIT"
] | 20 | 2021-03-31T20:10:46.000Z | 2022-02-15T09:58:13.000Z | evan/__init__.py | eillarra/evan | befe0f8daedd1b1f629097110d92e68534e43da1 | [
"MIT"
] | null | null | null | # This will make sure the app is always imported when
# Django starts so that shared_task will use this app.
from .celery import app as celery_app
default_app_config = "evan.apps.AppConfig"
__all__ = ["celery_app"]
| 24.222222 | 54 | 0.770642 |
a99447aaa97142564e6fd131138975d8389e3110 | 2,987 | py | Python | section8/wfdb/wfdb/__init__.py | PacktPublishing/Mastering-Flask-v | 7b3222018038713409b2240323c7e541f4bf5361 | [
"MIT"
] | 2 | 2020-06-14T20:21:02.000Z | 2020-06-18T15:01:35.000Z | section8/wfdb/wfdb/__init__.py | PacktPublishing/Mastering-Flask-v | 7b3222018038713409b2240323c7e541f4bf5361 | [
"MIT"
] | 1 | 2021-03-20T04:17:57.000Z | 2021-03-20T04:17:57.000Z | section8/wfdb/wfdb/__init__.py | PacktPublishing/Mastering-Flask-v | 7b3222018038713409b2240323c7e541f4bf5361 | [
"MIT"
] | 4 | 2019-10-20T22:22:44.000Z | 2022-03-09T06:46:37.000Z | import os
from flask import Flask
from flask.ext.login import current_user
from flask.ext.principal import identity_loaded, UserNeed, RoleNeed
from wfdb.models import (
db,
User,
Post,
Actor,
Role,
MovieRole,
Movie,
Tag,
Comment
)
from wfdb.extensions import login_manager, princip... | 22.628788 | 99 | 0.624707 |
9cd9fca9efe5d03dc782b5de4ca34947c3c417a0 | 3,173 | py | Python | alipay/aop/api/request/AlipayMobilePublicMenuGetRequest.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/request/AlipayMobilePublicMenuGetRequest.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/request/AlipayMobilePublicMenuGetRequest.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
class AlipayMobilePublicMenuGetRequest(object):
def __init__(self, biz_model=None):
self._biz_model = biz_model
self._version = "1.0"
... | 24.789063 | 142 | 0.634731 |
d32d676673fcbc3e9a6a883c064d0c5c29dfea5b | 1,529 | py | Python | core/download_links.py | saintethan/SciHuber | 7a35c0fc9e4fc853b1f9eaac761fdf69cac31f11 | [
"Apache-2.0"
] | 3 | 2019-11-28T01:05:00.000Z | 2019-11-30T05:38:11.000Z | core/download_links.py | saintethan/SciHuber | 7a35c0fc9e4fc853b1f9eaac761fdf69cac31f11 | [
"Apache-2.0"
] | null | null | null | core/download_links.py | saintethan/SciHuber | 7a35c0fc9e4fc853b1f9eaac761fdf69cac31f11 | [
"Apache-2.0"
] | null | null | null | import os
import re
import sys
import urllib3
from bs4 import BeautifulSoup
class LinksDownloader:
def __init__(self, p_root, p_local_file):
self._root = p_root
self._links = []
self._content = ""
self._links_local_file = p_local_file
def _get_content(self):
http = ur... | 27.8 | 73 | 0.57554 |
372bb60c778abe550158778e80652fc2dde7cce6 | 28,767 | py | Python | python/GafferArnold/ArnoldTextureBake.py | fbhradec/gaffer | eda6eaf44a5506af781488e914e9c6f6318c081c | [
"BSD-3-Clause"
] | null | null | null | python/GafferArnold/ArnoldTextureBake.py | fbhradec/gaffer | eda6eaf44a5506af781488e914e9c6f6318c081c | [
"BSD-3-Clause"
] | null | null | null | python/GafferArnold/ArnoldTextureBake.py | fbhradec/gaffer | eda6eaf44a5506af781488e914e9c6f6318c081c | [
"BSD-3-Clause"
] | null | null | null | ##########################################################################
#
# Copyright (c) 2018, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistrib... | 47.081833 | 175 | 0.693468 |
26dca327437974a8c4457847085f5a74a3729041 | 401 | py | Python | dockerManager/pluginManager.py | uzairAK/serverom-panel | 3dcde05ad618e6bef280db7d3180f926fe2ab1db | [
"MIT"
] | null | null | null | dockerManager/pluginManager.py | uzairAK/serverom-panel | 3dcde05ad618e6bef280db7d3180f926fe2ab1db | [
"MIT"
] | null | null | null | dockerManager/pluginManager.py | uzairAK/serverom-panel | 3dcde05ad618e6bef280db7d3180f926fe2ab1db | [
"MIT"
] | null | null | null | from .signals import *
from plogical.pluginManagerGlobal import pluginManagerGlobal
class pluginManager:
@staticmethod
def preDockerInstallation(request):
return pluginManagerGlobal.globalPlug(request, preDockerInstallation)
@staticmethod
def postDockerInstallation(request, response):
... | 33.416667 | 88 | 0.800499 |
6ed970a4690ef37f2a481c25fb401ec325e9d3a0 | 7,624 | py | Python | neuronpp/cells/hay2011_cell.py | asiaszmek/neuronpp | 07231751ed3565edd3f657e19eea31d06f1ac1dd | [
"MIT"
] | 5 | 2020-03-05T08:03:59.000Z | 2021-01-11T11:20:33.000Z | neuronpp/cells/hay2011_cell.py | asiaszmek/neuronpp | 07231751ed3565edd3f657e19eea31d06f1ac1dd | [
"MIT"
] | 11 | 2020-04-10T11:23:57.000Z | 2020-07-22T12:07:46.000Z | neuronpp/cells/hay2011_cell.py | asiaszmek/neuronpp | 07231751ed3565edd3f657e19eea31d06f1ac1dd | [
"MIT"
] | 3 | 2020-02-12T21:32:56.000Z | 2020-04-14T18:59:39.000Z | import os
import numpy as np
from neuron import h
from neuronpp.cells.cell import Cell
path = os.path.dirname(os.path.abspath(__file__))
model_path = os.path.join(path, "..", "commons/mods/hay2011")
class Hay2011Cell(Cell):
def __init__(self, name, compile_paths=model_path):
"""
Experimental cel... | 35.793427 | 149 | 0.538431 |
a0a09f0cd5ada03aad225fd0072b4dac61d10687 | 9,023 | py | Python | data_apis/corpus.py | wyshi/Unsupervised-Structure-Learning | 19b49320b46e5f7d990ab9e5b3054b331b86e59d | [
"Apache-2.0"
] | 34 | 2019-06-25T06:21:03.000Z | 2022-01-24T06:57:40.000Z | data_apis/corpus.py | wyshi/Unsupervised-Structure-Learning | 19b49320b46e5f7d990ab9e5b3054b331b86e59d | [
"Apache-2.0"
] | 3 | 2019-07-19T02:33:03.000Z | 2021-11-03T09:06:25.000Z | data_apis/corpus.py | wyshi/Unsupervised-Structure-Learning | 19b49320b46e5f7d990ab9e5b3054b331b86e59d | [
"Apache-2.0"
] | 4 | 2019-06-25T06:46:12.000Z | 2021-01-13T06:57:06.000Z | # Copyright (C) 2017 Tiancheng Zhao, Carnegie Mellon University
from __future__ import print_function
from __future__ import division
import pickle as pkl
from collections import Counter
import numpy as np
import nltk
import gensim
from sklearn.preprocessing import OneHotEncoder
class SWDADialogCorpus(object):
... | 40.102222 | 114 | 0.573091 |
2947cf8d236b0b1735aa3f66b65a36be396db557 | 97 | py | Python | awesome_django_timezones/__init__.py | onurmatik/awesome-django-timezones | b0d257c33ec681c3303692d0e13fc11e8b034d8e | [
"MIT"
] | 7 | 2019-02-05T19:18:44.000Z | 2020-09-30T12:50:31.000Z | awesome_django_timezones/__init__.py | onurmatik/awesome-django-timezones | b0d257c33ec681c3303692d0e13fc11e8b034d8e | [
"MIT"
] | 2 | 2019-12-03T16:35:55.000Z | 2020-08-31T10:01:05.000Z | awesome_django_timezones/__init__.py | onurmatik/awesome-django-timezones | b0d257c33ec681c3303692d0e13fc11e8b034d8e | [
"MIT"
] | 5 | 2019-04-10T09:48:09.000Z | 2022-02-05T05:08:13.000Z | __version__ = '0.3.0'
default_app_config = 'awesome_django_timezones.apps.DjangoTimezonesConfig'
| 32.333333 | 74 | 0.835052 |
20f2d68722d1b24fbadbacd6a1f9b5b622c7dc3d | 117 | py | Python | tests/test_helpers.py | CrazyVideoGamez/auto-backup | ce1f064e071db021f1b4b6be1acaa66ff35870e1 | [
"MIT"
] | null | null | null | tests/test_helpers.py | CrazyVideoGamez/auto-backup | ce1f064e071db021f1b4b6be1acaa66ff35870e1 | [
"MIT"
] | null | null | null | tests/test_helpers.py | CrazyVideoGamez/auto-backup | ce1f064e071db021f1b4b6be1acaa66ff35870e1 | [
"MIT"
] | null | null | null | """Test backup/helpers.py file"""
import sys, os
print(os.getcwd());
sys.path.insert(1, './backup')
import helpers
| 14.625 | 33 | 0.683761 |
83cdb9a90af7b749ed306b0c59a7f9e64a299599 | 426 | py | Python | tanuki/login/migrations/0004_auto_20201104_1102.py | addisonmaupin/capstone2020 | cf8c8e7336aa9866859349838e4f42bc6831679c | [
"MIT"
] | null | null | null | tanuki/login/migrations/0004_auto_20201104_1102.py | addisonmaupin/capstone2020 | cf8c8e7336aa9866859349838e4f42bc6831679c | [
"MIT"
] | 9 | 2021-03-19T14:50:48.000Z | 2022-03-12T00:47:25.000Z | tanuki/login/migrations/0004_auto_20201104_1102.py | pabsromo/capstone2020 | cf8c8e7336aa9866859349838e4f42bc6831679c | [
"MIT"
] | null | null | null | # Generated by Django 3.1.2 on 2020-11-04 17:02
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('login', '0003_auto_20201012_1023'),
]
operations = [
migrations.AlterField(
model_name='user',
name='first_name',
... | 22.421053 | 90 | 0.615023 |
e4e33de520041884195809745a30bad803c9975a | 395 | py | Python | bookworm/settings_mobile.py | srilatha44/threepress | 263b8aee8353806bd860bc22daf019e2155b8d0f | [
"BSD-3-Clause"
] | 2 | 2020-05-03T16:54:33.000Z | 2021-11-24T21:05:05.000Z | bookworm/settings_mobile.py | srilatha44/threepress | 263b8aee8353806bd860bc22daf019e2155b8d0f | [
"BSD-3-Clause"
] | 1 | 2022-02-12T09:20:29.000Z | 2022-02-12T09:20:29.000Z | bookworm/settings_mobile.py | srilatha44/threepress | 263b8aee8353806bd860bc22daf019e2155b8d0f | [
"BSD-3-Clause"
] | 1 | 2022-02-12T09:02:02.000Z | 2022-02-12T09:02:02.000Z | from settings import *
import settings
import os.path
TEMPLATE_DIRS_BASE = TEMPLATE_DIRS
TEMPLATE_DIRS = (
os.path.join(ROOT_PATH, 'mobile', 'templates', 'auth'),
os.path.join(ROOT_PATH, 'mobile', 'templates')
)
TEMPLATE_DIRS += TEMPLATE_DIRS_BASE
MOBILE = True
CACHE_BACKEND = 'file:///tmp/bookworm/django_c... | 21.944444 | 59 | 0.749367 |
d23c131837c462d23e8fc93ae9b6b73c81ada1f2 | 467 | py | Python | brahma-cli.py | eclissi91/brahma | 5ef9f8e9d9d3871c21aa9832962ee9ee3800c9a9 | [
"MIT"
] | null | null | null | brahma-cli.py | eclissi91/brahma | 5ef9f8e9d9d3871c21aa9832962ee9ee3800c9a9 | [
"MIT"
] | null | null | null | brahma-cli.py | eclissi91/brahma | 5ef9f8e9d9d3871c21aa9832962ee9ee3800c9a9 | [
"MIT"
] | null | null | null | #
# Copyright (c) Ionplus AG and contributors. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for details.
#
import click
import commands.migrate
@click.group()
def cli():
pass
cli.add_command(commands.init)
cli.add_command(commands.legacy)
cli.add_com... | 20.304348 | 84 | 0.72591 |
24512e50b242ec0b3eb8be2e4d76fe0b7f04433b | 7,984 | py | Python | sdk/python/pulumi_azure_nextgen/network/v20190801/network_interface_tap_configuration.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_nextgen/network/v20190801/network_interface_tap_configuration.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_nextgen/network/v20190801/network_interface_tap_configuration.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 54.312925 | 1,546 | 0.696518 |
2b2d5291e91974f5405d24d2eb494690826ec0e8 | 701 | py | Python | test/ffmpeg-vaapi/decode/h263.py | ChipsnMedia/vaapi-fits | c7671a2c4d331c1031b89b799d196fbca85fe2d0 | [
"BSD-3-Clause"
] | null | null | null | test/ffmpeg-vaapi/decode/h263.py | ChipsnMedia/vaapi-fits | c7671a2c4d331c1031b89b799d196fbca85fe2d0 | [
"BSD-3-Clause"
] | null | null | null | test/ffmpeg-vaapi/decode/h263.py | ChipsnMedia/vaapi-fits | c7671a2c4d331c1031b89b799d196fbca85fe2d0 | [
"BSD-3-Clause"
] | 1 | 2021-07-15T02:07:26.000Z | 2021-07-15T02:07:26.000Z | ###
### Copyright (C) 2018-2019 Intel Corporation
###
### SPDX-License-Identifier: BSD-3-Clause
###
from ....lib import *
from ....lib.ffmpeg.vaapi.util import *
from ....lib.ffmpeg.vaapi.decoder import DecoderTest
spec = load_test_spec("h263", "decode")
@slash.requires(*platform.have_caps("decode", "h263"))
class d... | 26.961538 | 73 | 0.653352 |
903ab77fb26e8dba68135c0a663a6fc6770ef9e2 | 2,990 | py | Python | src/fetch_source_data/fetch_salesforce_review.py | ankush2805/fawkes | 12e3341863bf01cf6c0d0aa506c64a37c1a6ffbc | [
"MIT"
] | 1 | 2022-02-16T12:00:06.000Z | 2022-02-16T12:00:06.000Z | src/fetch_source_data/fetch_salesforce_review.py | ankush2805/fawkes | 12e3341863bf01cf6c0d0aa506c64a37c1a6ffbc | [
"MIT"
] | null | null | null | src/fetch_source_data/fetch_salesforce_review.py | ankush2805/fawkes | 12e3341863bf01cf6c0d0aa506c64a37c1a6ffbc | [
"MIT"
] | 1 | 2022-01-25T07:01:22.000Z | 2022-01-25T07:01:22.000Z | import os
import sys
import requests
import json
from pprint import pprint
# This is so that below import works
sys.path.append(os.path.realpath("."))
from src.utils import *
from src.config import *
def get_oauth_token(base_url, params):
url = base_url + "/services/oauth2/token"
response = requests.post... | 31.145833 | 78 | 0.647157 |
11a7e2eed828ac0a4dd6a27cf617dbd9a8f09148 | 40,018 | py | Python | GA/ga_bak_statistics.py | yueludanfeng/Test | 8ea2bd2a8602ed51379c7a89ea1fdf370b8f1ca7 | [
"Apache-2.0"
] | 10 | 2019-01-20T06:52:30.000Z | 2022-03-22T03:35:47.000Z | GA/ga_bak_statistics.py | yueludanfeng/Test | 8ea2bd2a8602ed51379c7a89ea1fdf370b8f1ca7 | [
"Apache-2.0"
] | null | null | null | GA/ga_bak_statistics.py | yueludanfeng/Test | 8ea2bd2a8602ed51379c7a89ea1fdf370b8f1ca7 | [
"Apache-2.0"
] | 11 | 2017-10-17T07:50:21.000Z | 2021-12-13T12:04:58.000Z | # coding=utf-8
# Author: Li xinming
# coding=utf-8
from math import log10
from math import pow
from operator import attrgetter
from random import choice
from random import random
from random import sample
from time import clock
from sys import stdout
# save_out = stdout
# 输出重定向至指定的文件中,便于查看
# file_obj = open('out.txt... | 39.739821 | 137 | 0.582913 |
80c92439e93c9af691b15f63069124f3be777b80 | 11,008 | py | Python | mmseg/models/losses/dice_loss.py | dkswxd/Swin-Transformer-Semantic-Segmentation | 6af19736e5492a01d8952d4ee86a6d59b21c2ae1 | [
"Apache-2.0"
] | null | null | null | mmseg/models/losses/dice_loss.py | dkswxd/Swin-Transformer-Semantic-Segmentation | 6af19736e5492a01d8952d4ee86a6d59b21c2ae1 | [
"Apache-2.0"
] | null | null | null | mmseg/models/losses/dice_loss.py | dkswxd/Swin-Transformer-Semantic-Segmentation | 6af19736e5492a01d8952d4ee86a6d59b21c2ae1 | [
"Apache-2.0"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
from ..builder import LOSSES
from .utils import weight_reduce_loss
softmax_helper = lambda x: F.softmax(x, 1)
class GDL(nn.Module):
def __init__(self, apply_nonlin=None, batch_dice=False, do_bg=True, smooth=1.,
square=False, squar... | 32.093294 | 121 | 0.568223 |
ab4bda7c9ceb2bd530dd0f06eabc1d8a4a227e34 | 869 | py | Python | regrippy/plugins/runmru.py | simsor/regrippy | 5a4babedb31fc1ac4699a435265da18cc60dca30 | [
"Apache-2.0"
] | 151 | 2019-04-12T14:35:42.000Z | 2022-03-04T02:45:40.000Z | regrippy/plugins/runmru.py | simsor/regrippy | 5a4babedb31fc1ac4699a435265da18cc60dca30 | [
"Apache-2.0"
] | 11 | 2019-04-18T12:32:39.000Z | 2022-03-09T08:45:22.000Z | regrippy/plugins/runmru.py | simsor/regrippy | 5a4babedb31fc1ac4699a435265da18cc60dca30 | [
"Apache-2.0"
] | 19 | 2019-04-16T20:04:41.000Z | 2022-03-02T10:34:28.000Z | from regrippy import BasePlugin, PluginResult, mactime
class Plugin(BasePlugin):
"""Reads RunMRU key (Most Recently Used programs)"""
__REGHIVE__ = "NTUSER.DAT"
def run(self):
key = self.open_key(
r"Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU"
)
if not k... | 27.15625 | 88 | 0.583429 |
602baa56d1ce29302f6af4973a40097e59aa46e6 | 3,006 | py | Python | tests/git_dates_test.py | rakuco/depot_tools | 88d7869db09169044c1a0b2d1fbb57f11ffaee2a | [
"BSD-3-Clause"
] | null | null | null | tests/git_dates_test.py | rakuco/depot_tools | 88d7869db09169044c1a0b2d1fbb57f11ffaee2a | [
"BSD-3-Clause"
] | null | null | null | tests/git_dates_test.py | rakuco/depot_tools | 88d7869db09169044c1a0b2d1fbb57f11ffaee2a | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env vpython3
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Tests for git_dates."""
import datetime
import os
import sys
import unittest
DEPOT_TOOLS_ROOT = os.path.dirname(os.path.dirname(o... | 38.050633 | 80 | 0.716234 |
074e24451b35fe5ca49f4041683edbe8591109de | 61,214 | py | Python | dask/dataframe/tests/test_groupby.py | btw08/dask | 6e8c1b76feb12337574f40032dbd3818626b8e28 | [
"BSD-3-Clause"
] | 2 | 2021-06-18T17:00:45.000Z | 2022-03-08T00:59:40.000Z | dask/dataframe/tests/test_groupby.py | btw08/dask | 6e8c1b76feb12337574f40032dbd3818626b8e28 | [
"BSD-3-Clause"
] | null | null | null | dask/dataframe/tests/test_groupby.py | btw08/dask | 6e8c1b76feb12337574f40032dbd3818626b8e28 | [
"BSD-3-Clause"
] | 1 | 2019-01-09T15:06:22.000Z | 2019-01-09T15:06:22.000Z | import collections
import warnings
import numpy as np
import pandas as pd
import pandas.util.testing as tm
import pytest
import dask
import dask.dataframe as dd
from dask.dataframe.utils import (
assert_eq, assert_dask_graph, assert_max_deps, PANDAS_VERSION,
)
AGG_FUNCS = ['sum', 'mean', 'min', 'max', 'count', ... | 37.92689 | 108 | 0.562159 |
e5121f5fbbd6cc8dabf2c8bdd2c44a6441308ce1 | 513 | py | Python | src/the_tale/the_tale/portal/helpers.py | Alacrate/the-tale | 43b211f3a99e93964e95abc20a8ed649a205ffcf | [
"BSD-3-Clause"
] | 85 | 2017-11-21T12:22:02.000Z | 2022-03-27T23:07:17.000Z | src/the_tale/the_tale/portal/helpers.py | Alacrate/the-tale | 43b211f3a99e93964e95abc20a8ed649a205ffcf | [
"BSD-3-Clause"
] | 545 | 2017-11-04T14:15:04.000Z | 2022-03-27T14:19:27.000Z | src/the_tale/the_tale/portal/helpers.py | Alacrate/the-tale | 43b211f3a99e93964e95abc20a8ed649a205ffcf | [
"BSD-3-Clause"
] | 45 | 2017-11-11T12:36:30.000Z | 2022-02-25T06:10:44.000Z |
import smart_imports
smart_imports.all()
class Mixin:
@contextlib.contextmanager
def check_discord_synced(self, accounts_ids):
with mock.patch('the_tale.portal.logic.sync_with_discord') as sync_with_discord:
yield
if not isinstance(accounts_ids, set):
accounts_ids =... | 25.65 | 100 | 0.7154 |
cbbf6e7608eebae68c4f3b9f996e8f8f74064ecb | 479 | py | Python | env/lib/python3.8/site-packages/plotly/validators/mesh3d/_meta.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 76 | 2020-07-06T14:44:05.000Z | 2022-02-14T15:30:21.000Z | env/lib/python3.8/site-packages/plotly/validators/mesh3d/_meta.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 11 | 2020-08-09T02:30:14.000Z | 2022-03-12T00:50:14.000Z | env/lib/python3.8/site-packages/plotly/validators/mesh3d/_meta.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 11 | 2020-07-12T16:18:07.000Z | 2022-02-05T16:48:35.000Z | import _plotly_utils.basevalidators
class MetaValidator(_plotly_utils.basevalidators.AnyValidator):
def __init__(self, plotly_name="meta", parent_name="mesh3d", **kwargs):
super(MetaValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
array_ok=kw... | 34.214286 | 75 | 0.634656 |
cfaa772a9e3576cf5e904218b0f61ba14854bd3b | 5,269 | py | Python | openapi_client/models/trust_policy.py | hi-artem/twistlock-py | 9888e905f5b9d3cc00f9b84244588c0992f8e4f4 | [
"RSA-MD"
] | null | null | null | openapi_client/models/trust_policy.py | hi-artem/twistlock-py | 9888e905f5b9d3cc00f9b84244588c0992f8e4f4 | [
"RSA-MD"
] | null | null | null | openapi_client/models/trust_policy.py | hi-artem/twistlock-py | 9888e905f5b9d3cc00f9b84244588c0992f8e4f4 | [
"RSA-MD"
] | null | null | null | # coding: utf-8
"""
Prisma Cloud Compute API
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: 21.04.439
Generated by: https://openapi-generator.tech
"""
try:
from inspect import getfulla... | 27.731579 | 124 | 0.568799 |
e44260d59fb8adc8f883ae263b9cd8d557bdbc26 | 1,059 | bzl | Python | tools/bazel/workspace.bzl | efc-robot/cyberRT | c0e63539cf97030c64545d87c203d4e457d481ca | [
"Apache-2.0"
] | 41 | 2020-12-07T07:32:02.000Z | 2022-01-18T09:14:59.000Z | tools/bazel/workspace.bzl | efc-robot/cyberRT | c0e63539cf97030c64545d87c203d4e457d481ca | [
"Apache-2.0"
] | 4 | 2021-01-05T02:53:46.000Z | 2021-11-05T08:35:46.000Z | tools/bazel/workspace.bzl | efc-robot/cyberRT | c0e63539cf97030c64545d87c203d4e457d481ca | [
"Apache-2.0"
] | 28 | 2020-12-06T08:01:38.000Z | 2022-03-10T08:14:01.000Z | # CyberRT external dependencies that can be loaded in WORKSPACE files.
load("//third_party/absl:workspace.bzl", absl = "repo")
load("//third_party/cpplint:workspace.bzl", cpplint = "repo")
load("//third_party/fastrtps:workspace.bzl", fastrtps = "repo")
load("//third_party/gflags:workspace.bzl", gflags = "repo")
load("... | 32.090909 | 72 | 0.706327 |
2d23e1421ecdaea3868da3c304d02b2bde5d1e54 | 386 | py | Python | software/linux/gateway/config.py | tuannv0898/uwb-ips | 656725bfbb45eae48127733b7c4a96736bfacf84 | [
"MIT"
] | null | null | null | software/linux/gateway/config.py | tuannv0898/uwb-ips | 656725bfbb45eae48127733b7c4a96736bfacf84 | [
"MIT"
] | 1 | 2021-01-13T16:22:55.000Z | 2021-01-13T16:22:55.000Z | software/linux/gateway/config.py | tuannv0898/uwb-ips | 656725bfbb45eae48127733b7c4a96736bfacf84 | [
"MIT"
] | 1 | 2021-01-14T02:31:16.000Z | 2021-01-14T02:31:16.000Z | CMD_TOPIC = "topic_cmd"
EVT_TOPIC = "topic_evt"
# SERIAL_PORT = "/dev/pts/3"
# SERIAL_BAUD = 115200
SERIAL_PORT = "/dev/ttyGateway"
SERIAL_BAUD = 115200
SERIAL_TAG_PORT = "/dev/ttyTag"
SERIAL_TAG_BAUD = 115200
# SERIAL_TAG_PORT = "/dev/pts/5"
# SERIAL_TAG_BAUD = 115200
# SERIAL_PORT = "/dev/ttyRelay"
# SERIAL_BAUD... | 19.3 | 32 | 0.73057 |
5d1b5ae9283847fdf42b479a3b67e0a5e07171ed | 28,851 | py | Python | lib/galaxy/managers/users.py | julozi/galaxy | 90d9da03975f254ac128747cd04532c3595d6155 | [
"CC-BY-3.0"
] | 1 | 2019-11-15T01:50:38.000Z | 2019-11-15T01:50:38.000Z | lib/galaxy/managers/users.py | userssss/galaxy | 9662164ad68b39adf5a5606a7aa8e388f6a79f1e | [
"CC-BY-3.0"
] | 2 | 2019-04-03T15:37:17.000Z | 2019-04-03T19:37:09.000Z | lib/galaxy/managers/users.py | userssss/galaxy | 9662164ad68b39adf5a5606a7aa8e388f6a79f1e | [
"CC-BY-3.0"
] | 1 | 2016-06-14T13:21:13.000Z | 2016-06-14T13:21:13.000Z | """
Manager and Serializer for Users.
"""
import logging
import random
import socket
import time
from datetime import datetime
from markupsafe import escape
from sqlalchemy import and_, desc, exc, func, true
from galaxy import (
exceptions,
model,
util
)
from galaxy.managers import (
api_keys,
bas... | 44.047328 | 402 | 0.62497 |
70fef4659ce09587c22aac109a644740124cc5e5 | 5,950 | py | Python | gui/form_activity.py | dungvtdev/upsbayescpm | f6ee877c689046d3c57a2ac06742cfe4a0b6550e | [
"MIT"
] | null | null | null | gui/form_activity.py | dungvtdev/upsbayescpm | f6ee877c689046d3c57a2ac06742cfe4a0b6550e | [
"MIT"
] | null | null | null | gui/form_activity.py | dungvtdev/upsbayescpm | f6ee877c689046d3c57a2ac06742cfe4a0b6550e | [
"MIT"
] | null | null | null | #! /usr/bin/env python
#
# GUI module generated by PAGE version 4.8.6
# In conjunction with Tcl version 8.6
# Nov 25, 2016 06:56:27 PM
import sys
try:
from Tkinter import *
except ImportError:
from tkinter import *
try:
import ttk
py3 = 0
except ImportError:
import tkinter.ttk as ttk
py3 = ... | 36.956522 | 84 | 0.663529 |
444974181a198bcb058cd1354b4eb792617719f8 | 2,304 | py | Python | python/cc_utils.py | carlganz/public-api-tools | cf7f67e72b950d1495af82cc009eb9f6710137bd | [
"MIT"
] | 7 | 2020-03-31T17:27:45.000Z | 2021-04-05T20:56:45.000Z | python/cc_utils.py | ChainlinkResources/public-api-tools | cf7f67e72b950d1495af82cc009eb9f6710137bd | [
"MIT"
] | null | null | null | python/cc_utils.py | ChainlinkResources/public-api-tools | cf7f67e72b950d1495af82cc009eb9f6710137bd | [
"MIT"
] | 3 | 2019-02-08T17:53:18.000Z | 2021-02-04T19:59:54.000Z | import json
import logging
import time
import requests
from signing import generate_signature
from cc_config import get_cc_backend_url
from cc_exceptions import InvalidAuthError
from cc_exceptions import InvalidRequestError
def get_version_route(route, version=0):
return '/v{}/{}'.format(
str(version),
... | 25.6 | 71 | 0.641493 |
8111305685089502935eb22db479b0d91a000172 | 13,040 | py | Python | myia/pipeline/steps.py | strint/myia | 3d00d3fb3df80ab7a264a724226c5f56c6ff1a8a | [
"MIT"
] | 222 | 2019-02-13T07:56:28.000Z | 2022-03-28T07:07:54.000Z | myia/pipeline/steps.py | strint/myia | 3d00d3fb3df80ab7a264a724226c5f56c6ff1a8a | [
"MIT"
] | 107 | 2019-02-12T21:56:39.000Z | 2022-03-12T01:08:03.000Z | myia/pipeline/steps.py | strint/myia | 3d00d3fb3df80ab7a264a724226c5f56c6ff1a8a | [
"MIT"
] | 27 | 2017-11-14T17:58:15.000Z | 2019-01-14T01:36:09.000Z | """Pipeline steps.
The steps are listed in roughly the same order they should be called.
"""
from ..abstract import AbstractTuple, find_aliases, nobottom, type_to_abstract
from ..compile import BackendValue
from ..ir import Graph, clone
from ..opt import (
CSE,
LambdaLiftRewriter,
LocalPassOptimizer,
... | 26.776181 | 79 | 0.634893 |
739d1a168cf978d1ee515e9845da09c4677a6f53 | 897 | py | Python | pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_UMBL_Mohtat2020/graphite_ocp_PeymanMPM.py | DrMichaelCornish/PyBaMM | a31e2095600bb92e913598ac4d02b2b6b77b31c1 | [
"BSD-3-Clause"
] | 1 | 2021-07-13T12:53:57.000Z | 2021-07-13T12:53:57.000Z | pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_UMBL_Mohtat2020/graphite_ocp_PeymanMPM.py | masoodtamaddon/PyBaMM | a31e2095600bb92e913598ac4d02b2b6b77b31c1 | [
"BSD-3-Clause"
] | null | null | null | pybamm/input/parameters/lithium_ion/negative_electrodes/graphite_UMBL_Mohtat2020/graphite_ocp_PeymanMPM.py | masoodtamaddon/PyBaMM | a31e2095600bb92e913598ac4d02b2b6b77b31c1 | [
"BSD-3-Clause"
] | null | null | null | import pybamm
def graphite_ocp_PeymanMPM(sto):
"""
Graphite Open Circuit Potential (OCP) as a function of the
stochiometry. The fit is taken from Peyman MPM [1].
References
----------
.. [1] Peyman Mohtat et al, MPM (to be submitted)
"""
u_eq = (
0.063
+ 0.8 * pybamm.... | 28.03125 | 62 | 0.537347 |
447c421d7afb5c650a4d29966b76ed7f6f98e0d5 | 6,714 | py | Python | goodman_pipeline/images/tests/test_night_organizer.py | SunilSimha/goodman_pipeline | f99ebec0879a0e54aef6e8346bd1ba3cf46fe551 | [
"BSD-3-Clause"
] | 6 | 2017-05-30T02:48:35.000Z | 2018-04-10T02:11:52.000Z | goodman_pipeline/images/tests/test_night_organizer.py | SunilSimha/goodman_pipeline | f99ebec0879a0e54aef6e8346bd1ba3cf46fe551 | [
"BSD-3-Clause"
] | 167 | 2017-04-24T21:12:53.000Z | 2018-10-01T14:14:11.000Z | goodman_pipeline/images/tests/test_night_organizer.py | SunilSimha/goodman_pipeline | f99ebec0879a0e54aef6e8346bd1ba3cf46fe551 | [
"BSD-3-Clause"
] | 6 | 2019-06-22T13:15:51.000Z | 2022-03-25T18:10:07.000Z | from __future__ import absolute_import
import numpy as np
import os
import shutil
from astropy.io import fits
from ccdproc import CCDData
from unittest import TestCase, skip
from ..night_organizer import NightOrganizer
def create_fake_data(technique, instrument, path):
if os.path.isdir(path):
card_val... | 45.986301 | 80 | 0.509979 |
283ca01ecbb0752202b0b1013b96257113393d20 | 467 | py | Python | fixture/navigate.py | pavelwearevolt/Cross_Edit_TestsAutomatization | 953691244d86c5832fe2a2705841711939a353a5 | [
"Apache-2.0"
] | null | null | null | fixture/navigate.py | pavelwearevolt/Cross_Edit_TestsAutomatization | 953691244d86c5832fe2a2705841711939a353a5 | [
"Apache-2.0"
] | null | null | null | fixture/navigate.py | pavelwearevolt/Cross_Edit_TestsAutomatization | 953691244d86c5832fe2a2705841711939a353a5 | [
"Apache-2.0"
] | null | null | null | __author__ = 'pavelkosicin'
class NavigateHelper:
def __init__(self, app):
self.app = app
def open_home_page(self):
wd = self.app.wd
wd.get("https://cross-edit-staging-frontend.herokuapp.com/")
def menu_global_search(self):
wd = self.app.wd
wd.find_element_by_nam... | 23.35 | 68 | 0.64454 |
9a6ea1c0096f653ae1d129836e8ef068c92bb7c3 | 34,237 | py | Python | sdk/python/pulumi_aws/ec2/default_network_acl.py | rapzo/pulumi-aws | 390a098221315d98a54ba97d1559e750dc3053b7 | [
"ECL-2.0",
"Apache-2.0"
] | 260 | 2018-06-18T14:57:00.000Z | 2022-03-29T11:41:03.000Z | sdk/python/pulumi_aws/ec2/default_network_acl.py | rapzo/pulumi-aws | 390a098221315d98a54ba97d1559e750dc3053b7 | [
"ECL-2.0",
"Apache-2.0"
] | 1,154 | 2018-06-19T20:38:20.000Z | 2022-03-31T19:48:16.000Z | sdk/python/pulumi_aws/ec2/default_network_acl.py | rapzo/pulumi-aws | 390a098221315d98a54ba97d1559e750dc3053b7 | [
"ECL-2.0",
"Apache-2.0"
] | 115 | 2018-06-28T03:20:27.000Z | 2022-03-29T11:41:06.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import... | 52.916538 | 668 | 0.674533 |
cb9cd8972b0ba74acf82f82a50aabda792d2d7c4 | 4,974 | py | Python | notepad.py | Data-Coders/GUI-with-Tkinter | 51a80c8cd13dab5198b81890a88f13b076955acc | [
"MIT"
] | null | null | null | notepad.py | Data-Coders/GUI-with-Tkinter | 51a80c8cd13dab5198b81890a88f13b076955acc | [
"MIT"
] | null | null | null | notepad.py | Data-Coders/GUI-with-Tkinter | 51a80c8cd13dab5198b81890a88f13b076955acc | [
"MIT"
] | null | null | null | # importing nessesary modules in our GUI program
from tkinter import *
import tkinter.messagebox as msg
from tkinter.filedialog import askopenfilename, asksaveasfilename
import os
# creating root as Tk class and updating default window size with title and icon of our GUI application
root = Tk()
root.geometry("655x333"... | 30.515337 | 128 | 0.704865 |
0580f28c6b09610993708ace678a0a8d98f4a8f3 | 1,311 | py | Python | data.py | huongdo108/graph-neural-networks-solve-sudoku | 764914b9dc77ccf2e3f37d50a37e6f27d92e1030 | [
"MIT"
] | null | null | null | data.py | huongdo108/graph-neural-networks-solve-sudoku | 764914b9dc77ccf2e3f37d50a37e6f27d92e1030 | [
"MIT"
] | null | null | null | data.py | huongdo108/graph-neural-networks-solve-sudoku | 764914b9dc77ccf2e3f37d50a37e6f27d92e1030 | [
"MIT"
] | null | null | null | import os
import torch
from torch.utils.data import TensorDataset
from torchvision.datasets.utils import download_and_extract_archive
class Sudoku(TensorDataset):
download_url_prefix = 'https://users.aalto.fi/~alexilin/dle'
zip_filename = 'sudoku.zip'
def __init__(self, root, train=True):
self.ro... | 30.488372 | 101 | 0.604119 |
5fe2eb60833742ccad217fb42bd1ee3d154a71e6 | 401 | py | Python | amberproject/wsgi.py | BArdelean/djangostuff | b4b7b6bac5e1d8dbc73e2f5cb5a7e784a82c9519 | [
"bzip2-1.0.6"
] | null | null | null | amberproject/wsgi.py | BArdelean/djangostuff | b4b7b6bac5e1d8dbc73e2f5cb5a7e784a82c9519 | [
"bzip2-1.0.6"
] | null | null | null | amberproject/wsgi.py | BArdelean/djangostuff | b4b7b6bac5e1d8dbc73e2f5cb5a7e784a82c9519 | [
"bzip2-1.0.6"
] | null | null | null | """
WSGI config for amberproject project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_... | 23.588235 | 78 | 0.790524 |
610cd282f361d4381c09875ac0e25a75025fca2a | 7,212 | py | Python | sdk/python/pulumi_azure_nextgen/web/v20150801/get_site_vnet_connection.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_nextgen/web/v20150801/get_site_vnet_connection.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_nextgen/web/v20150801/get_site_vnet_connection.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 36.06 | 200 | 0.640738 |
70ce8f18662b41a2bbf8d30ed0e2f61a241eb43f | 2,747 | py | Python | edge/upload_aivdm_sql_static_http_ships.py | dannil10/dogger | 7e4570f1aa7d5393a9ae182498573d03fe1b61e9 | [
"MIT"
] | null | null | null | edge/upload_aivdm_sql_static_http_ships.py | dannil10/dogger | 7e4570f1aa7d5393a9ae182498573d03fe1b61e9 | [
"MIT"
] | null | null | null | edge/upload_aivdm_sql_static_http_ships.py | dannil10/dogger | 7e4570f1aa7d5393a9ae182498573d03fe1b61e9 | [
"MIT"
] | null | null | null | import gateway.link
udp_upload_ais = gateway.link.SqlHttpUpdateStatic(
channels = {172},
start_delay = 0,
transmit_rate = 0.2,
max_age = 10,
max_connect_attempts = 50,
message_formats = [ {"message": {"type":5},
"imo": { "type":"int", "novalue":0 },
... | 62.431818 | 137 | 0.415362 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.