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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9c5aa1b6e2e30133c5c77e7e2e17ad7ff9d06114 | 22,699 | py | Python | chia/consensus/block_creation.py | GabrielFraga962/chia-blockchain | 313cf27eeefdf6709d3742b437995b7a9442d5a7 | [
"Apache-2.0"
] | null | null | null | chia/consensus/block_creation.py | GabrielFraga962/chia-blockchain | 313cf27eeefdf6709d3742b437995b7a9442d5a7 | [
"Apache-2.0"
] | null | null | null | chia/consensus/block_creation.py | GabrielFraga962/chia-blockchain | 313cf27eeefdf6709d3742b437995b7a9442d5a7 | [
"Apache-2.0"
] | null | null | null | import logging
import random
from dataclasses import replace
from typing import Callable, Dict, List, Optional, Tuple
import blspy
from blspy import G1Element, G2Element
from chiabip158 import PyBIP158
from chia.consensus.block_record import BlockRecord
from chia.consensus.block_rewards import calculate_base_farmer_r... | 42.19145 | 117 | 0.693731 |
c867681fcb955439d4c07216e2c6f69d4bfd01a5 | 1,422 | py | Python | examples/plugins/tasks/ipython_kernel/example_panes.py | anshsrtv/envisage | e50ab70146ed9927d684e2dd093cf2934b029691 | [
"BSD-3-Clause"
] | 51 | 2015-05-12T01:34:15.000Z | 2022-03-20T19:11:22.000Z | examples/plugins/tasks/ipython_kernel/example_panes.py | anshsrtv/envisage | e50ab70146ed9927d684e2dd093cf2934b029691 | [
"BSD-3-Clause"
] | 347 | 2015-02-27T19:51:09.000Z | 2022-03-21T16:03:01.000Z | examples/plugins/tasks/ipython_kernel/example_panes.py | anshsrtv/envisage | e50ab70146ed9927d684e2dd093cf2934b029691 | [
"BSD-3-Clause"
] | 11 | 2015-02-11T04:32:54.000Z | 2021-09-13T10:50:05.000Z | # Standard library imports.
import os.path
# Enthought library imports.
from pyface.tasks.api import TraitsDockPane
from traits.api import Event, File, List, Str
from traitsui.api import View, Item, FileEditor
class FileBrowserPane(TraitsDockPane):
""" A simple file browser pane.
"""
#### TaskPane inter... | 26.333333 | 79 | 0.563291 |
004a018957da66713fdbaa1bc86260c61a68a7cf | 4,297 | py | Python | openmdao/test_suite/tests/test_general.py | ryanfarr01/blue | a9aac98c09cce0f7cadf26cf592e3d978bf4e3ff | [
"Apache-2.0"
] | null | null | null | openmdao/test_suite/tests/test_general.py | ryanfarr01/blue | a9aac98c09cce0f7cadf26cf592e3d978bf4e3ff | [
"Apache-2.0"
] | null | null | null | openmdao/test_suite/tests/test_general.py | ryanfarr01/blue | a9aac98c09cce0f7cadf26cf592e3d978bf4e3ff | [
"Apache-2.0"
] | null | null | null | """General tests to demonstrate the parametric suite. Possible arguments are given below (defaults).
To test more than one option, pass in an Iterable of requested options.
All Parametric Groups
---------------------
'group_type': Controls which type of ParametricGroups to test. Will test all groups if not specified
'... | 42.97 | 114 | 0.64417 |
15a9c93f94c0d6127511bb554f4dfaa6586f2177 | 1,960 | py | Python | common/log_config.py | superxuu/fastapi_mock | f0c7553e16cf303c512e21a477dee8f595f44cfa | [
"MIT"
] | 7 | 2020-05-08T08:20:21.000Z | 2021-12-11T17:51:58.000Z | src/utils/log_config.py | superxuu/fastapi_pony | eb583a644ad4ebd5e966e892b55fd543f3a90df3 | [
"MIT"
] | null | null | null | src/utils/log_config.py | superxuu/fastapi_pony | eb583a644ad4ebd5e966e892b55fd543f3a90df3 | [
"MIT"
] | null | null | null | import time
from pathlib import Path
LOGGING_CONFIG = {
"version": 1,
"disable_existing_loggers": False,
"formatters": {
"default": {
"()": "uvicorn.logging.DefaultFormatter",
# "fmt": "%(levelprefix)s %(message)s",
"fmt": '%(asctime)s %(filename)s [line:%(lineno... | 35 | 106 | 0.492347 |
5906a3dd6b8bb02ea7e0224a9964aa2481966a5b | 3,847 | py | Python | gizmos/helpers.py | pramodsshinde/gizmos | f090aaaf80fed1caf5626a487a779722d47688b5 | [
"BSD-3-Clause"
] | null | null | null | gizmos/helpers.py | pramodsshinde/gizmos | f090aaaf80fed1caf5626a487a779722d47688b5 | [
"BSD-3-Clause"
] | null | null | null | gizmos/helpers.py | pramodsshinde/gizmos | f090aaaf80fed1caf5626a487a779722d47688b5 | [
"BSD-3-Clause"
] | null | null | null | import logging
import psycopg2
import re
import sqlite3
from configparser import ConfigParser
def add_labels(cur):
"""Create a temporary labels table. If a term does not have a label, the label is the ID."""
# Create a tmp labels table
cur.execute("CREATE TABLE tmp_labels(term TEXT PRIMARY KEY, label TEX... | 33.745614 | 99 | 0.576033 |
c8eefdbf26b985a802ede20e1c50207962d8f5bc | 2,338 | py | Python | lib/db/db.py | JLpython-py/anti-ghostping-bot | 344209488870d1826160c4fcb1c2118b3f2c881f | [
"MIT"
] | 1 | 2021-02-07T05:01:59.000Z | 2021-02-07T05:01:59.000Z | lib/db/db.py | JLpython-py/anti-ghostping-bot | 344209488870d1826160c4fcb1c2118b3f2c881f | [
"MIT"
] | 4 | 2021-01-26T15:13:28.000Z | 2021-01-26T15:24:12.000Z | lib/db/db.py | JLpython-py/anti-ghostping-bot | 344209488870d1826160c4fcb1c2118b3f2c881f | [
"MIT"
] | 1 | 2021-05-31T19:45:34.000Z | 2021-05-31T19:45:34.000Z | #! python3
# db.py
"""
Manages the SQLite database in data/db
===============================================================================
Copyright (c) 2021 Jacob Lee
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), ... | 34.895522 | 79 | 0.621899 |
3974d8435bb0330a65266785ee86e2879443e9f3 | 5,698 | py | Python | bpmn/migrations/0001_initial.py | marcelobbfonseca/SFDjango-BPMN | 50565763414f52d9e84004494cf550c6fe2358fa | [
"MIT"
] | 1 | 2021-09-22T02:04:07.000Z | 2021-09-22T02:04:07.000Z | bpmn/migrations/0001_initial.py | VSSantana/SFDjango-BPMN | e5a3fb8da9282fd88f72a85a4b34d89d38391e36 | [
"MIT"
] | 5 | 2021-09-22T13:54:06.000Z | 2021-09-22T14:05:56.000Z | bpmn/migrations/0001_initial.py | marcelobbfonseca/SFDjango-BPMN | 50565763414f52d9e84004494cf550c6fe2358fa | [
"MIT"
] | 1 | 2021-09-18T01:22:25.000Z | 2021-09-18T01:22:25.000Z | # Generated by Django 3.1.2 on 2021-02-25 18:06
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('auth', '0012_alter_user_first_name_max_length'),
]
operations = [
migrations.CreateMode... | 42.842105 | 176 | 0.552826 |
ac08da6704cd3dc1333dd262dbfac0fa6bfda260 | 57,164 | py | Python | tensorflow/python/training/monitored_session.py | MathMachado/tensorflow | 56afda20b15f234c23e8393f7e337e7dd2659c2d | [
"Apache-2.0"
] | 848 | 2019-12-03T00:16:17.000Z | 2022-03-31T22:53:17.000Z | tensorflow/python/training/monitored_session.py | MathMachado/tensorflow | 56afda20b15f234c23e8393f7e337e7dd2659c2d | [
"Apache-2.0"
] | 656 | 2019-12-03T00:48:46.000Z | 2022-03-31T18:41:54.000Z | tensorflow/python/training/monitored_session.py | MathMachado/tensorflow | 56afda20b15f234c23e8393f7e337e7dd2659c2d | [
"Apache-2.0"
] | 506 | 2019-12-03T00:46:26.000Z | 2022-03-30T10:34:56.000Z | # pylint: disable=g-bad-file-header
# Copyright 2016 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/LICENS... | 38.288011 | 103 | 0.694248 |
c6f1bd17be733a6dba7dfa92acbbfbcd1906f16a | 2,965 | py | Python | tests/test_advanced.py | gitter-badger/aimay | b38cb34ef551fbb08d52197ae5310dae99367bab | [
"MIT"
] | null | null | null | tests/test_advanced.py | gitter-badger/aimay | b38cb34ef551fbb08d52197ae5310dae99367bab | [
"MIT"
] | null | null | null | tests/test_advanced.py | gitter-badger/aimay | b38cb34ef551fbb08d52197ae5310dae99367bab | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from .context import aimay
import unittest
class TestCore(unittest.TestCase):
def test_get_reply(self):
# --- text
reply = aimay.get_reply('text', 'おうむがえし!')
self.assertEqual('text', reply[0])
self.assertEqual('おうむがえし!ニャン', reply[1])
self.assertIsNone(reply[2])
self... | 29.356436 | 54 | 0.654975 |
dbfbb444580a1b540f7ab33ae84462cb73dfb5b8 | 1,816 | py | Python | xdl/test/python/unit_test/test_take_grad.py | Ru-Xiang/x-deeplearning | 04cc0497150920c64b06bb8c314ef89977a3427a | [
"Apache-2.0"
] | 4,071 | 2018-12-13T04:17:38.000Z | 2022-03-30T03:29:35.000Z | xdl/test/python/unit_test/test_take_grad.py | laozhuang727/x-deeplearning | 781545783a4e2bbbda48fc64318fb2c6d8bbb3cc | [
"Apache-2.0"
] | 359 | 2018-12-21T01:14:57.000Z | 2022-02-15T07:18:02.000Z | xdl/test/python/unit_test/test_take_grad.py | laozhuang727/x-deeplearning | 781545783a4e2bbbda48fc64318fb2c6d8bbb3cc | [
"Apache-2.0"
] | 1,054 | 2018-12-20T09:57:42.000Z | 2022-03-29T07:16:53.000Z | # Copyright 2018 Alibaba Group. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 38.638298 | 86 | 0.632709 |
51318fd56a0bf7dc74a4a124e7249fa24fe5e51f | 63 | py | Python | virtual/walt/virtual/vpn/const.py | dia38/walt-python-packages | e6fa1f166f45e73173195d57840d22bef87b88f5 | [
"BSD-3-Clause"
] | 4 | 2020-01-14T09:12:56.000Z | 2022-03-14T14:35:11.000Z | virtual/walt/virtual/vpn/const.py | dia38/walt-python-packages | e6fa1f166f45e73173195d57840d22bef87b88f5 | [
"BSD-3-Clause"
] | 73 | 2016-04-29T13:17:26.000Z | 2022-03-01T15:06:48.000Z | virtual/walt/virtual/vpn/const.py | dia38/walt-python-packages | e6fa1f166f45e73173195d57840d22bef87b88f5 | [
"BSD-3-Clause"
] | 3 | 2019-03-18T14:27:56.000Z | 2021-06-03T12:07:02.000Z | VPN_SOCK_PATH = "/var/run/walt-vpn.sock"
VPN_SOCK_BACKLOG = 20
| 21 | 40 | 0.761905 |
a85eaa2d05e12fc690c11a8fda804b2159745da5 | 25,561 | py | Python | backend/src/baserow/contrib/database/views/handler.py | jacklicn/baserow | 978d9462ededbaa96674a6653028ba19876ea273 | [
"MIT"
] | 1 | 2021-04-13T16:27:58.000Z | 2021-04-13T16:27:58.000Z | backend/src/baserow/contrib/database/views/handler.py | jacklicn/baserow | 978d9462ededbaa96674a6653028ba19876ea273 | [
"MIT"
] | null | null | null | backend/src/baserow/contrib/database/views/handler.py | jacklicn/baserow | 978d9462ededbaa96674a6653028ba19876ea273 | [
"MIT"
] | null | null | null | from django.db.models import F
from baserow.contrib.database.fields.exceptions import FieldNotInTable
from baserow.contrib.database.fields.models import Field
from baserow.contrib.database.fields.registries import field_type_registry
from baserow.core.utils import extract_allowed, set_allowed_attrs
from .exceptions im... | 38.553544 | 87 | 0.625993 |
0079e09be0e3df97cd5291907f50ec0e7d61939c | 8,355 | py | Python | rls/algos/base/base.py | qiushuiai/RLs | a612ecaf3a47bdcbb412250a3bfdfa579578a183 | [
"Apache-2.0"
] | 1 | 2021-07-07T12:57:24.000Z | 2021-07-07T12:57:24.000Z | rls/algos/base/base.py | qiushuiai/RLs | a612ecaf3a47bdcbb412250a3bfdfa579578a183 | [
"Apache-2.0"
] | null | null | null | rls/algos/base/base.py | qiushuiai/RLs | a612ecaf3a47bdcbb412250a3bfdfa579578a183 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# encoding: utf-8
import os
import json
import numpy as np
import tensorflow as tf
from typing import (Dict,
Callable,
Union,
List,
NoReturn,
Optional,
Any)
f... | 36.806167 | 178 | 0.552005 |
e6886ec74b637f845151ae93ca7398b7fc0b74a7 | 196 | py | Python | utils/myutils/cookie2dict.py | greats3an/pycxclient | 68f50d9f262c3b3198ea3b467a263dfd94f342bf | [
"Apache-2.0"
] | 3 | 2020-04-26T09:02:56.000Z | 2022-02-25T16:46:30.000Z | utils/myutils/cookie2dict.py | greats3an/pycxclient | 68f50d9f262c3b3198ea3b467a263dfd94f342bf | [
"Apache-2.0"
] | 1 | 2021-03-26T16:01:50.000Z | 2021-03-26T16:01:50.000Z | utils/myutils/cookie2dict.py | greats3an/pycxclient | 68f50d9f262c3b3198ea3b467a263dfd94f342bf | [
"Apache-2.0"
] | null | null | null | '''
# Cookie2Dict Module
Turns cookie strings into a dictionary
'''
def cookie2dict(src):
args = {b.split('=')[0].strip():b.split('=')[1].strip() for b in src.split(';')}
return args
| 21.777778 | 84 | 0.607143 |
a7ff693a40eb3d99191844bc9d2ad6998beb947b | 6,868 | py | Python | lumbermill/output/File.py | dstore-dbap/LumberMill | b7cbadc209a83386871735b8ad88b61da917a6ab | [
"Apache-2.0"
] | 15 | 2015-12-14T19:07:28.000Z | 2022-02-28T13:32:11.000Z | lumbermill/output/File.py | dstore-dbap/LumberMill | b7cbadc209a83386871735b8ad88b61da917a6ab | [
"Apache-2.0"
] | null | null | null | lumbermill/output/File.py | dstore-dbap/LumberMill | b7cbadc209a83386871735b8ad88b61da917a6ab | [
"Apache-2.0"
] | 4 | 2017-02-08T10:49:55.000Z | 2019-03-19T18:47:46.000Z | # -*- coding: utf-8 -*-
import collections
import os
import sys
import time
from io import BytesIO
from lumbermill.BaseThreadedModule import BaseThreadedModule
from lumbermill.utils.Buffers import Buffer
from lumbermill.utils.Decorators import ModuleDocstringParser, setInterval
from lumbermill.utils.DynamicValues impo... | 42.925 | 142 | 0.612697 |
7ac2b6e1a5f3d1ec290d4912e4f49e8a012c73a4 | 61,839 | py | Python | tools/model_transfer.py | glemaitre/ramp-board-1 | a5e9b423a55d196d38232fd94b2f7d53fb35d9d8 | [
"BSD-3-Clause"
] | null | null | null | tools/model_transfer.py | glemaitre/ramp-board-1 | a5e9b423a55d196d38232fd94b2f7d53fb35d9d8 | [
"BSD-3-Clause"
] | null | null | null | tools/model_transfer.py | glemaitre/ramp-board-1 | a5e9b423a55d196d38232fd94b2f7d53fb35d9d8 | [
"BSD-3-Clause"
] | null | null | null | import os
import zlib
import logging
import datetime
import numpy as np
from importlib import import_module
from sqlalchemy.ext.hybrid import hybrid_property
from databoard import db
import databoard.config as config
logger = logging.getLogger('databoard')
class NumpyType(db.TypeDecorator):
"""Storing zipped nu... | 35.66263 | 91 | 0.667233 |
fe64f1463f37d9ec5804109d5da4ccbc02053bd9 | 345 | py | Python | pirates/instance/DistributedTeleportZone.py | Willy5s/Pirates-Online-Rewritten | 7434cf98d9b7c837d57c181e5dabd02ddf98acb7 | [
"BSD-3-Clause"
] | 81 | 2018-04-08T18:14:24.000Z | 2022-01-11T07:22:15.000Z | pirates/instance/DistributedTeleportZone.py | Willy5s/Pirates-Online-Rewritten | 7434cf98d9b7c837d57c181e5dabd02ddf98acb7 | [
"BSD-3-Clause"
] | 4 | 2018-09-13T20:41:22.000Z | 2022-01-08T06:57:00.000Z | pirates/instance/DistributedTeleportZone.py | Willy5s/Pirates-Online-Rewritten | 7434cf98d9b7c837d57c181e5dabd02ddf98acb7 | [
"BSD-3-Clause"
] | 26 | 2018-05-26T12:49:27.000Z | 2021-09-11T09:11:59.000Z | from pirates.instance import DistributedInstanceBase
from pandac.PandaModules import NodePath
class DistributedTeleportZone(DistributedInstanceBase.DistributedInstanceBase, NodePath):
def __init__(self, cr):
DistributedInstanceBase.DistributedInstanceBase.__init__(self, cr)
def getInstanceNodePath(se... | 31.363636 | 89 | 0.808696 |
2ed0bb0631f7265330965778c12bedac40aebdb3 | 863 | py | Python | src/migrations/0009_transaction.py | AgnosticMe/swiftly | 1fc5fed6e90b8cbdcb6038303537aa0f82ae70d7 | [
"MIT"
] | null | null | null | src/migrations/0009_transaction.py | AgnosticMe/swiftly | 1fc5fed6e90b8cbdcb6038303537aa0f82ae70d7 | [
"MIT"
] | null | null | null | src/migrations/0009_transaction.py | AgnosticMe/swiftly | 1fc5fed6e90b8cbdcb6038303537aa0f82ae70d7 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.5 on 2021-07-20 06:10
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('src', '0008_auto_20210720_1050'),
]
operations = [
migrations.CreateModel(
... | 33.192308 | 117 | 0.623407 |
a52946bba1567b168ff1bbccbefd7bc724241eba | 7,278 | py | Python | python/paddle/fluid/tests/unittests/ipu/test_layernorm_op_ipu.py | Li-fAngyU/Paddle | e548f65f96697830035a28f9070b40829408ccdb | [
"Apache-2.0"
] | 2 | 2022-03-30T09:55:45.000Z | 2022-03-30T09:55:49.000Z | python/paddle/fluid/tests/unittests/ipu/test_layernorm_op_ipu.py | Li-fAngyU/Paddle | e548f65f96697830035a28f9070b40829408ccdb | [
"Apache-2.0"
] | 1 | 2022-01-28T07:23:22.000Z | 2022-01-28T07:23:22.000Z | python/paddle/fluid/tests/unittests/ipu/test_layernorm_op_ipu.py | Li-fAngyU/Paddle | e548f65f96697830035a28f9070b40829408ccdb | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021 PaddlePaddle 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 appli... | 30.579832 | 81 | 0.53806 |
54badacfd3b42dbcd9b05fe58b873e011ca7d13b | 755 | py | Python | run_conversion_kazr.py | ti-vo/peakTree | 37fcd51367d575edf7faeba4c20aaac42f577857 | [
"MIT"
] | 1 | 2021-05-26T05:50:08.000Z | 2021-05-26T05:50:08.000Z | run_conversion_kazr.py | ti-vo/peakTree | 37fcd51367d575edf7faeba4c20aaac42f577857 | [
"MIT"
] | null | null | null | run_conversion_kazr.py | ti-vo/peakTree | 37fcd51367d575edf7faeba4c20aaac42f577857 | [
"MIT"
] | null | null | null | #! /usr/bin/env python3
# coding=utf-8
import datetime
#import matplotlib
#matplotlib.use('Agg')
#import numpy as np
#import matplotlib.pyplot as plt
#import sys, os
import peakTree
import peakTree.helpers as h
import logging
log = logging.getLogger('peakTree')
log.setLevel(logging.INFO)
... | 30.2 | 95 | 0.748344 |
42affce752dc0c11aa4d54914e78e53f7a62d804 | 501 | py | Python | login.py | jyotirmoybhakat/young-desi | de2a91f5011a6d5add6df8a8ead3312a07bc6400 | [
"Apache-2.0"
] | null | null | null | login.py | jyotirmoybhakat/young-desi | de2a91f5011a6d5add6df8a8ead3312a07bc6400 | [
"Apache-2.0"
] | null | null | null | login.py | jyotirmoybhakat/young-desi | de2a91f5011a6d5add6df8a8ead3312a07bc6400 | [
"Apache-2.0"
] | null | null | null | from flask import Flask, redirect, url_for, request
app = Flask(__name__)
@app.route('/success/<name>')
def success(name):
return 'welcome %s' % name
@app.route('/login',methods = ['POST', 'GET'])
def login():
if request.method == 'POST':
user = request.form['nm']
return redirect(url_for(... | 27.833333 | 54 | 0.616766 |
770efe14a1a7a3cd741cd724cac6ca2584120c2d | 6,602 | py | Python | gearbox/port.py | Risto97/gearbox | d5b8eb22900f196a61d2f75a28935d8dcd58d6ec | [
"MIT"
] | null | null | null | gearbox/port.py | Risto97/gearbox | d5b8eb22900f196a61d2f75a28935d8dcd58d6ec | [
"MIT"
] | null | null | null | gearbox/port.py | Risto97/gearbox | d5b8eb22900f196a61d2f75a28935d8dcd58d6ec | [
"MIT"
] | null | null | null | #!/usr/bin/python
from PySide2 import QtGui, QtCore, QtWidgets
from pygears.rtl.port import InPort
from .constants import (IN_PORT, OUT_PORT, PORT_HOVER_COLOR,
PORT_HOVER_BORDER_COLOR, PORT_ACTIVE_COLOR,
PORT_ACTIVE_BORDER_COLOR, Z_VAL_PORT)
class PortItem(QtWidgets.QG... | 30.706977 | 76 | 0.606331 |
7e33d07c937777e464646bb3bab3db8ddbbcb9d9 | 2,209 | py | Python | operators/ssd-detector/server.py | ReigenAraka/phantoscope | bad097dd8e7d682c75e13f811c5fc358e78c942e | [
"Apache-2.0"
] | null | null | null | operators/ssd-detector/server.py | ReigenAraka/phantoscope | bad097dd8e7d682c75e13f811c5fc358e78c942e | [
"Apache-2.0"
] | null | null | null | operators/ssd-detector/server.py | ReigenAraka/phantoscope | bad097dd8e7d682c75e13f811c5fc358e78c942e | [
"Apache-2.0"
] | null | null | null | import os
import logging
import grpc
from concurrent import futures
import rpc.rpc_pb2
import rpc.rpc_pb2_grpc
from ssd import run, SSDDetectObject as Detector
ENDPOINT = os.getenv("OP_ENDPOINT", "127.0.0.1:51002")
class OperatorServicer(rpc.rpc_pb2_grpc.OperatorServicer):
def __init__(self):
self.detect... | 36.213115 | 83 | 0.598008 |
0b7e54596741d7a1ba9f36f537e12762a7e7fb82 | 3,778 | py | Python | src/py/MakeAdderModulesPkg.py | jstr045329/hask-to-vhdl | a9888f9f8e33fef8efe25bd0b30458d556f51a10 | [
"BSD-3-Clause"
] | null | null | null | src/py/MakeAdderModulesPkg.py | jstr045329/hask-to-vhdl | a9888f9f8e33fef8efe25bd0b30458d556f51a10 | [
"BSD-3-Clause"
] | 18 | 2020-07-20T13:03:04.000Z | 2020-07-29T21:39:29.000Z | src/py/MakeAdderModulesPkg.py | jstr045329/hask-to-vhdl | a9888f9f8e33fef8efe25bd0b30458d556f51a10 | [
"BSD-3-Clause"
] | null | null | null | # Takes the template for counting bits and populates reset name & reset level.
from os import linesep as eol
INPUT_FILENAME = "../VhdTemplates/OneAdderTemplate.vhd"
OUTPUT_FILENAME = "../VhdLibs/AdderModulesPkg.vhd"
ENTITY_STUB = "AddTwoNumbers_%04d_%04d"
BITS_IN_START = 2
BITS_IN_STOP = 16
USE_POSITIVE_RESET = True
... | 33.140351 | 120 | 0.562467 |
4c7f3043164e02b37726153913a6158cf5f071fd | 3,814 | py | Python | panini/nats_client/nats_client_interface.py | artas728/panini | c7bfac4c80d105d0e78ea5afbabd9f2729fdf935 | [
"MIT"
] | 1 | 2021-03-29T16:10:27.000Z | 2021-03-29T16:10:27.000Z | panini/nats_client/nats_client_interface.py | artas728/panini | c7bfac4c80d105d0e78ea5afbabd9f2729fdf935 | [
"MIT"
] | null | null | null | panini/nats_client/nats_client_interface.py | artas728/panini | c7bfac4c80d105d0e78ea5afbabd9f2729fdf935 | [
"MIT"
] | null | null | null | from abc import ABC, abstractmethod
from ..utils.logger import get_logger
class Msg:
"""
Alternative implementation of the class with "context" field
"""
__slots__ = ("subject", "reply", "data", "sid", "context")
def __init__(self, subject="", reply="", data=b"", sid=0, context={}):
sel... | 26.123288 | 105 | 0.584688 |
76989a0677cb71c86693d64a4deaccb088b8ff72 | 1,941 | py | Python | parsuite.py | egypt/parsuite | 1a91897f939119804b5e250205dec252066fc1f1 | [
"MIT"
] | null | null | null | parsuite.py | egypt/parsuite | 1a91897f939119804b5e250205dec252066fc1f1 | [
"MIT"
] | null | null | null | parsuite.py | egypt/parsuite | 1a91897f939119804b5e250205dec252066fc1f1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import argparse
import os
from pathlib import Path
from sys import exit, modules as sys_modules
from re import search
from parsuite import modules
from parsuite import helpers
from parsuite.core.suffix_printer import *
from parsuite.core.argument import (Argument,ArgumentGroup,
MutuallyExcl... | 26.22973 | 72 | 0.660484 |
e9aaa58b95dcb45b45bf114c3d2260dad47499cb | 1,509 | py | Python | debug/debug.py | ingve/mach-nix | f75bd25168232db620f2ddbe5c5281d14c17d03b | [
"MIT"
] | 1 | 2021-05-06T06:34:24.000Z | 2021-05-06T06:34:24.000Z | debug/debug.py | ingve/mach-nix | f75bd25168232db620f2ddbe5c5281d14c17d03b | [
"MIT"
] | null | null | null | debug/debug.py | ingve/mach-nix | f75bd25168232db620f2ddbe5c5281d14c17d03b | [
"MIT"
] | null | null | null | import json
import os
import subprocess as sp
import tempfile
from os.path import realpath, dirname
from time import time
import toml
from mach_nix.generate import main
pwd = dirname(realpath(__file__))
os.environ['py_ver_str'] = '3.7.5'
os.environ['system'] = 'x86_64-linux'
os.environ['out_file'] = f'{pwd}/overrid... | 29.019231 | 115 | 0.713055 |
78909b517e5e79a2ef8ec247fc91c75021de140b | 319 | py | Python | apps/iotdb_cloud_core/urls.py | JulianFeinauer/iotdb-cloud | 0ccb2dd14c7d0ae3a8e72b3b32ce83de2df48738 | [
"Apache-2.0"
] | 6 | 2021-08-22T02:25:55.000Z | 2021-08-28T04:53:36.000Z | apps/iotdb_cloud_core/urls.py | JulianFeinauer/iotdb-cloud | 0ccb2dd14c7d0ae3a8e72b3b32ce83de2df48738 | [
"Apache-2.0"
] | null | null | null | apps/iotdb_cloud_core/urls.py | JulianFeinauer/iotdb-cloud | 0ccb2dd14c7d0ae3a8e72b3b32ce83de2df48738 | [
"Apache-2.0"
] | null | null | null | from django.urls import path
from apps.iotdb_cloud_core.views import HomeView, ExecuteView, CreateIoTDBReleaseView
urlpatterns = [
path('', HomeView.as_view(), name="home"),
path('create', CreateIoTDBReleaseView.as_view(), name="release/create"),
path('execute', ExecuteView.as_view(), name="execute"),
]
| 31.9 | 85 | 0.733542 |
edb9ea411aca473686e3e1b3aa402b912dc40269 | 123 | py | Python | 10430.py | FelisCatusKR/Baekjoon_Python3 | d84dc9421fe956001864d138b6d6ec9ebd793edf | [
"MIT"
] | null | null | null | 10430.py | FelisCatusKR/Baekjoon_Python3 | d84dc9421fe956001864d138b6d6ec9ebd793edf | [
"MIT"
] | null | null | null | 10430.py | FelisCatusKR/Baekjoon_Python3 | d84dc9421fe956001864d138b6d6ec9ebd793edf | [
"MIT"
] | null | null | null | # 10430.py
a, b, c = map(int, input().split())
print((a+b)%c)
print(((a%c)+(b%c))%c)
print((a*b)%c)
print(((a%c)*(b%c))%c) | 20.5 | 35 | 0.504065 |
ea1394893a70610f570ae211a57334aa14d3eefe | 6,760 | py | Python | tools/evaluate.py | thangnx183/kaggle-understanding-clouds | 15ad2a9029958262437b899cb00525579da23911 | [
"BSD-2-Clause"
] | 207 | 2019-11-21T19:07:17.000Z | 2022-03-28T10:53:57.000Z | tools/evaluate.py | ChasingStar95/kaggle-understanding-clouds | 898319b564deab02b4267cc658bbebdbb15c49de | [
"BSD-2-Clause"
] | 12 | 2019-12-04T11:32:30.000Z | 2022-03-12T00:06:11.000Z | tools/evaluate.py | ChasingStar95/kaggle-understanding-clouds | 898319b564deab02b4267cc658bbebdbb15c49de | [
"BSD-2-Clause"
] | 60 | 2019-11-21T17:32:56.000Z | 2022-03-28T10:53:58.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import gc
import argparse
import itertools
import tqdm
import pandas as pd
import numpy as np
import cv2
LABEL_MAP = {
'Fish': 0,
'Flower': 1,
'Gravel': 2,
'Sugar': ... | 30.727273 | 118 | 0.612722 |
bc6803274ef2766dfec54281df8e5ef590403ece | 336 | py | Python | pirates/battle/DistributedShipCannonAI.py | Willy5s/Pirates-Online-Rewritten | 7434cf98d9b7c837d57c181e5dabd02ddf98acb7 | [
"BSD-3-Clause"
] | 81 | 2018-04-08T18:14:24.000Z | 2022-01-11T07:22:15.000Z | pirates/battle/DistributedShipCannonAI.py | Willy5s/Pirates-Online-Rewritten | 7434cf98d9b7c837d57c181e5dabd02ddf98acb7 | [
"BSD-3-Clause"
] | 4 | 2018-09-13T20:41:22.000Z | 2022-01-08T06:57:00.000Z | pirates/battle/DistributedShipCannonAI.py | Willy5s/Pirates-Online-Rewritten | 7434cf98d9b7c837d57c181e5dabd02ddf98acb7 | [
"BSD-3-Clause"
] | 26 | 2018-05-26T12:49:27.000Z | 2021-09-11T09:11:59.000Z | from direct.distributed.DistributedObjectAI import DistributedObjectAI
from direct.directnotify import DirectNotifyGlobal
class DistributedShipCannonAI(DistributedObjectAI):
notify = DirectNotifyGlobal.directNotify.newCategory('DistributedShipCannonAI')
def __init__(self, air):
DistributedObjectAI.__i... | 42 | 83 | 0.833333 |
76b7e71dc30f9ad6abcce8ed8d8ca1a454d4338e | 1,155 | py | Python | src/ebonite/runtime/helpers.py | geffy/ebonite | 2d85eeca44ac1799e743bafe333887712e325060 | [
"Apache-2.0"
] | 1 | 2019-11-27T14:33:45.000Z | 2019-11-27T14:33:45.000Z | src/ebonite/runtime/helpers.py | geffy/ebonite | 2d85eeca44ac1799e743bafe333887712e325060 | [
"Apache-2.0"
] | null | null | null | src/ebonite/runtime/helpers.py | geffy/ebonite | 2d85eeca44ac1799e743bafe333887712e325060 | [
"Apache-2.0"
] | null | null | null | from ebonite.core.objects import core
from ebonite.runtime.command_line import start_runtime
from ebonite.runtime.interface import Interface
from ebonite.runtime.interface.ml_model import ModelLoader, model_interface
from ebonite.runtime.server import Server
from ebonite.utils.importing import module_importable
def r... | 37.258065 | 108 | 0.72381 |
a207c65b37cb17f3ea2d127906e30cef4587116d | 4,550 | py | Python | HSCard.py | JEndler/hearthstoneAI | 9a6b23e4ab868e48eaa619be4efc701985bd2160 | [
"MIT"
] | 1 | 2021-07-23T18:32:49.000Z | 2021-07-23T18:32:49.000Z | HSCard.py | JEndler/hearthstoneAI | 9a6b23e4ab868e48eaa619be4efc701985bd2160 | [
"MIT"
] | null | null | null | HSCard.py | JEndler/hearthstoneAI | 9a6b23e4ab868e48eaa619be4efc701985bd2160 | [
"MIT"
] | null | null | null | import numpy as np
import Card as cards
#import HearthSimulation as HearthSim
class HSCard():
FirstName = "" #for cards like shifter zerus
Name = ""
Type = "" # TYPE MINION, SPELL, ENCHANTMENT, HERO POWER, WEAPON or HERO
Health = -1
Attack = -1
Stats = np.array([Health, Attack])
Durability = -1
Cost = -1 # ... | 27.575758 | 115 | 0.681319 |
df290db81696ba6b8e8668b964023295e059f03d | 3,154 | py | Python | acapy_client/api/did_exchange/post_didexchange_conn_id_accept_request.py | Indicio-tech/acapy-client | 0bd47af23308362db749c2671a3e7f8259855897 | [
"Apache-2.0"
] | 4 | 2021-08-05T09:20:34.000Z | 2021-08-08T19:37:29.000Z | acapy_client/api/did_exchange/post_didexchange_conn_id_accept_request.py | Indicio-tech/acapy-client | 0bd47af23308362db749c2671a3e7f8259855897 | [
"Apache-2.0"
] | null | null | null | acapy_client/api/did_exchange/post_didexchange_conn_id_accept_request.py | Indicio-tech/acapy-client | 0bd47af23308362db749c2671a3e7f8259855897 | [
"Apache-2.0"
] | 2 | 2021-08-12T18:18:45.000Z | 2021-08-14T13:22:28.000Z | from typing import Any, Dict, Optional, Union
import httpx
from ...client import Client
from ...models.conn_record import ConnRecord
from ...types import UNSET, Response, Unset
def _get_kwargs(
conn_id: str,
*,
client: Client,
mediation_id: Union[Unset, None, str] = UNSET,
my_endpoint: Union[Uns... | 24.261538 | 92 | 0.629994 |
5831071869c62d20610ae46451667abdf95d1235 | 1,818 | py | Python | nnvm/tests/python/frontend/onnx/test_forward.py | rah9eu/p3 | 530628be7b7a8dd3e6199c3bebebdbf104005e5f | [
"Apache-2.0"
] | 22 | 2019-02-20T12:42:20.000Z | 2021-12-25T06:09:46.000Z | nnvm/tests/python/frontend/onnx/test_forward.py | rah9eu/p3 | 530628be7b7a8dd3e6199c3bebebdbf104005e5f | [
"Apache-2.0"
] | 4 | 2019-04-01T07:36:04.000Z | 2022-03-24T03:11:26.000Z | nnvm/tests/python/frontend/onnx/test_forward.py | rah9eu/p3 | 530628be7b7a8dd3e6199c3bebebdbf104005e5f | [
"Apache-2.0"
] | 7 | 2019-03-20T16:04:37.000Z | 2021-04-28T18:40:11.000Z | import numpy as np
import nnvm
import tvm
from tvm.contrib import graph_runtime
from nnvm.testing.config import ctx_list
import onnx
from model_zoo import super_resolution, squeezenet1_1, lenet
def verify_onnx_forward_impl(graph_file, data_shape, out_shape):
import onnx_caffe2.backend
def get_caffe2_output(mod... | 35.647059 | 92 | 0.685919 |
c6eba5ac03d4ae0e1b5c18c4e287f6d989ba9de0 | 5,466 | py | Python | test/automl/test_warmstart.py | dalian-ai/FLAML | f8cc38bc16fc3a09074b91b82bfda1d4ed9fd9b0 | [
"MIT"
] | null | null | null | test/automl/test_warmstart.py | dalian-ai/FLAML | f8cc38bc16fc3a09074b91b82bfda1d4ed9fd9b0 | [
"MIT"
] | null | null | null | test/automl/test_warmstart.py | dalian-ai/FLAML | f8cc38bc16fc3a09074b91b82bfda1d4ed9fd9b0 | [
"MIT"
] | null | null | null | import unittest
import numpy as np
from sklearn.datasets import load_iris
from flaml import AutoML
from flaml.model import LGBMEstimator
from flaml import tune
class TestWarmStart(unittest.TestCase):
def test_fit_w_freezinghp_starting_point(self, as_frame=True):
automl = AutoML()
automl_settings =... | 42.372093 | 103 | 0.567508 |
4c5fa94d3913c5cb71aa3191db2a3a06d353f8be | 298 | py | Python | scenarios/card_hold_capture/executable.py | trenton42/txbalanced | 9ee1b906d75b4b2fc3d2f5424dc3bbb9886c2b14 | [
"MIT"
] | null | null | null | scenarios/card_hold_capture/executable.py | trenton42/txbalanced | 9ee1b906d75b4b2fc3d2f5424dc3bbb9886c2b14 | [
"MIT"
] | null | null | null | scenarios/card_hold_capture/executable.py | trenton42/txbalanced | 9ee1b906d75b4b2fc3d2f5424dc3bbb9886c2b14 | [
"MIT"
] | null | null | null | import balanced
balanced.configure('ak-test-1o9QKwUCrwstHWO5sGxICtIJdQXFTjnrV')
card_hold = balanced.CardHold.fetch('/card_holds/HL4io3nFmawRhnkkUWnC1Eoo')
debit = card_hold.capture(
appears_on_statement_as='ShowsUpOnStmt',
description='Some descriptive text for the debit in the dashboard'
) | 33.111111 | 75 | 0.825503 |
1ad8dae84d84b814a1f056ebc37e851af837e103 | 5,441 | py | Python | grr/lib/ipv6_utils.py | mikecb/grr | 52fdd977729af2a09a147301c55b8b7f1eccfa67 | [
"Apache-2.0"
] | 5 | 2017-03-17T08:25:09.000Z | 2022-02-22T05:28:14.000Z | grr/lib/ipv6_utils.py | mikecb/grr | 52fdd977729af2a09a147301c55b8b7f1eccfa67 | [
"Apache-2.0"
] | null | null | null | grr/lib/ipv6_utils.py | mikecb/grr | 52fdd977729af2a09a147301c55b8b7f1eccfa67 | [
"Apache-2.0"
] | 3 | 2018-12-07T07:04:37.000Z | 2022-02-22T05:28:16.000Z | #!/usr/bin/env python
"""Functions for manipulating ipv6 addresses.
We've written our own versions of socket.inet_pton and inet_ntop for ipv6
because those functions are not available on windows before python 3.4.
"""
import re
import socket
# ntop does not exist on Windows.
# pylint: disable=g-socket-inet-aton,g-so... | 28.78836 | 80 | 0.66826 |
148362edeca1b1ba98c383f0218ff79284293d1a | 16,271 | py | Python | dataset/dataset_shapenet_aug.py | nsfzyzz/dispersion-score | ac0c633fe3af091e83d2d198809d98545a0a311a | [
"MIT"
] | 10 | 2021-12-01T00:55:32.000Z | 2022-01-02T18:07:04.000Z | dataset/dataset_shapenet_aug.py | nsfzyzz/dispersion-score | ac0c633fe3af091e83d2d198809d98545a0a311a | [
"MIT"
] | null | null | null | dataset/dataset_shapenet_aug.py | nsfzyzz/dispersion-score | ac0c633fe3af091e83d2d198809d98545a0a311a | [
"MIT"
] | 3 | 2021-12-01T00:55:47.000Z | 2021-12-17T15:18:43.000Z | import torch.utils.data as data
import os.path
import torch
import torchvision.transforms as transforms
import numpy as np
import os
from PIL import Image
import sys
sys.path.append("../")
import auxiliary.my_utils as my_utils
from auxiliary.constant import TRAIN_SIZE, TEST_SIZE, MAXVIEW_PER_SHAPE
import pickle
from os... | 43.505348 | 164 | 0.554729 |
eba6bf892d0a6227587dc0ec3d53c009177616a4 | 10,066 | py | Python | pyscf/fci/test/test_rdm.py | nmardirossian/pyscf | 57c8912dcfcc1157a822feede63df54ed1067115 | [
"BSD-2-Clause"
] | 1 | 2018-05-02T19:55:30.000Z | 2018-05-02T19:55:30.000Z | pyscf/fci/test/test_rdm.py | nmardirossian/pyscf | 57c8912dcfcc1157a822feede63df54ed1067115 | [
"BSD-2-Clause"
] | null | null | null | pyscf/fci/test/test_rdm.py | nmardirossian/pyscf | 57c8912dcfcc1157a822feede63df54ed1067115 | [
"BSD-2-Clause"
] | 1 | 2018-12-06T03:10:50.000Z | 2018-12-06T03:10:50.000Z | from functools import reduce
import unittest
import numpy
from pyscf import gto
from pyscf import scf
from pyscf import ao2mo
from pyscf import fci
norb = 6
nelec = 6
na = fci.cistring.num_strings(norb, nelec//2)
numpy.random.seed(1)
ci0 = numpy.random.random((na,na))
ci0 = ci0 + ci0.T
rdm1, rdm2 = fci.direct_spin1.ma... | 41.423868 | 92 | 0.606298 |
db26cc130d967632c2c4bc5dc861b68df1ac89ac | 8,474 | py | Python | btsprice/task_exchanges.py | pch957/btsprice | 8a6913dfc0d74e668e116855ea8bb1caf3af6c04 | [
"MIT"
] | 18 | 2016-09-16T16:07:35.000Z | 2020-08-03T13:14:56.000Z | btsprice/task_exchanges.py | roelandp/btsprice | ad2f4d6d694a4ac71d5b227a22731160f700323b | [
"MIT"
] | 5 | 2017-08-31T00:14:02.000Z | 2019-10-18T12:44:22.000Z | btsprice/task_exchanges.py | roelandp/btsprice | ad2f4d6d694a4ac71d5b227a22731160f700323b | [
"MIT"
] | 20 | 2016-06-27T09:46:18.000Z | 2020-10-26T05:17:47.000Z | # -*- coding: utf-8 -*-
from btsprice.exchanges import Exchanges
from btsprice.yahoo import Yahoo
from btsprice.sina import Sina
import time
import asyncio
class TaskExchanges(object):
def __init__(self, data={}):
self.period = 120
self.exchanges = Exchanges()
self.yahoo = Yahoo()
... | 39.050691 | 70 | 0.523956 |
33467d45cd4e0000769854a2d006581364c6400c | 487 | py | Python | tests/journal.api/cout.py | rtburns-jpl/pyre | ffc4fc1b2936e355f709d084eb4055954960b3a2 | [
"BSD-3-Clause"
] | null | null | null | tests/journal.api/cout.py | rtburns-jpl/pyre | ffc4fc1b2936e355f709d084eb4055954960b3a2 | [
"BSD-3-Clause"
] | 1 | 2021-06-10T23:42:13.000Z | 2021-06-10T23:42:13.000Z | tests/journal.api/cout.py | jlmaurer/pyre | 6af38a83621d7d6228d147b4bb94f97fbb10f6e2 | [
"BSD-3-Clause"
] | 2 | 2020-08-31T18:07:52.000Z | 2021-12-10T08:54:39.000Z | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
#
# michael a.g. aïvázis <michael.aivazis@para-sim.com>
# (c) 1998-2020 all rights reserved
def test():
"""
Verify that the console is accessible
"""
# access
import journal
# instantiate the console
console = journal.cout()
# verify its... | 15.709677 | 53 | 0.605749 |
2163f91f322dec2ee3a35e49c9d5c3f280532657 | 3,606 | py | Python | unit_tests/data/test_process_message_data_valid.py | LandRegistry/maintain-feeder | b574dc56fe8d07d8842d7a9caa5bb479a79daae3 | [
"MIT"
] | null | null | null | unit_tests/data/test_process_message_data_valid.py | LandRegistry/maintain-feeder | b574dc56fe8d07d8842d7a9caa5bb479a79daae3 | [
"MIT"
] | null | null | null | unit_tests/data/test_process_message_data_valid.py | LandRegistry/maintain-feeder | b574dc56fe8d07d8842d7a9caa5bb479a79daae3 | [
"MIT"
] | 1 | 2021-04-11T05:25:00.000Z | 2021-04-11T05:25:00.000Z | process_message_null = {
'entry-timestamp': None,
'action-type': 'NEW',
'item-signature': None,
'entry-number': 19,
'key': None,
'item-hash': None
}
process_message_valid = {
"item-hash": "test",
"item-signature": "test",
"key": "12345678",
"action-type": "NEW",
"entry-numbe... | 35.009709 | 78 | 0.446201 |
797ea541b46108224b378f8d2fddfed7a2de7611 | 1,346 | py | Python | isplogger/logger.py | tjkessler/ISPLogger | 46e2f57ebc456322ef0bf57f08f2313ea9f04d18 | [
"MIT"
] | null | null | null | isplogger/logger.py | tjkessler/ISPLogger | 46e2f57ebc456322ef0bf57f08f2313ea9f04d18 | [
"MIT"
] | null | null | null | isplogger/logger.py | tjkessler/ISPLogger | 46e2f57ebc456322ef0bf57f08f2313ea9f04d18 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# isplogger/logger.py
# v.0.2.1
# Developed in 2019 by Travis Kessler <travis.j.kessler@gmail.com>
#
# Console/text file logging
#
# stdlib imports
import logging
import datetime
import os
_MSG_FORMAT = '%(asctime)s [%(host_port)s] [%(levelname)s] %(message)s'
FILE_FOR... | 28.041667 | 75 | 0.684993 |
58a87b706172a59bd6114c14f2fd15c8a17e4e89 | 17,360 | py | Python | ryu/app/experiments/PureSDNPkt/NormalFattree.py | Helloworld1995/Ryu_SDN_Controller | 2680f967debca361adc6ff14ddadcbbcde0c7082 | [
"Apache-2.0"
] | 1 | 2021-03-11T01:47:35.000Z | 2021-03-11T01:47:35.000Z | ryu/app/experiments/PureSDNPkt/NormalFattree.py | Helloworld1995/Ryu_SDN_Controller | 2680f967debca361adc6ff14ddadcbbcde0c7082 | [
"Apache-2.0"
] | null | null | null | ryu/app/experiments/PureSDNPkt/NormalFattree.py | Helloworld1995/Ryu_SDN_Controller | 2680f967debca361adc6ff14ddadcbbcde0c7082 | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2016 Huang MaChi at Chongqing University
# of Posts and Telecommunications, China.
# Copyright (C) 2016 Li Cheng at Beijing University of Posts
# and Telecommunications. www.muzixing.com
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance ... | 38.75 | 226 | 0.589689 |
17016be12ffacf50274dcef0241f55934c066938 | 352,457 | py | Python | runtime/Python3/test/parser/cparser.py | lwehmeier/antlr4 | f7f1b253125a7dba8ffdc65bf7985b3b591adfc8 | [
"BSD-3-Clause"
] | 3 | 2020-05-19T05:16:31.000Z | 2020-07-10T02:52:20.000Z | runtime/Python3/test/parser/cparser.py | lwehmeier/antlr4 | f7f1b253125a7dba8ffdc65bf7985b3b591adfc8 | [
"BSD-3-Clause"
] | 2 | 2019-02-16T05:28:36.000Z | 2020-06-05T02:27:25.000Z | runtime/Python3/test/parser/cparser.py | lwehmeier/antlr4 | f7f1b253125a7dba8ffdc65bf7985b3b591adfc8 | [
"BSD-3-Clause"
] | 7 | 2016-11-05T23:59:44.000Z | 2019-12-12T18:21:51.000Z | # Generated from C.bnf by ANTLR 4.5.1
# encoding: utf-8
from antlr4 import *
from io import StringIO
def serializedATN():
with StringIO() as buf:
buf.write("\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\3s")
buf.write("\u04e9\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7")
buf.write(... | 42.608438 | 3,242 | 0.578005 |
5da96297736f5e16cbae369ad87735aa0bcd18c9 | 8,060 | py | Python | homeassistant/components/vizio/media_player.py | mgosk/home-assistant | 3bf27b9afc50044ad0a244702e8a628247eeb3e0 | [
"Apache-2.0"
] | 2 | 2019-12-05T19:44:04.000Z | 2021-08-22T12:40:18.000Z | homeassistant/components/vizio/media_player.py | richh1/home-assistant | a14c299a78259386bbcf7787689e3e7dfa5b1dfd | [
"Apache-2.0"
] | null | null | null | homeassistant/components/vizio/media_player.py | richh1/home-assistant | a14c299a78259386bbcf7787689e3e7dfa5b1dfd | [
"Apache-2.0"
] | 1 | 2018-04-29T02:14:32.000Z | 2018-04-29T02:14:32.000Z | """Vizio SmartCast Device support."""
from datetime import timedelta
import logging
import voluptuous as vol
from homeassistant import util
from homeassistant.components.media_player import (
MediaPlayerDevice,
PLATFORM_SCHEMA
)
from homeassistant.components.media_player.const import (
SUPPORT_NEXT_TRACK,
... | 31.607843 | 78 | 0.634367 |
bcd12fb5b1c6aab86c9c02ca05e57f0ccdffa222 | 191,711 | py | Python | airflow/models.py | hellosoda/incubator-airflow | 1f0a717b65e0ea7e0127708b084baff0697f0946 | [
"MIT",
"BSD-3-Clause",
"BSD-2-Clause",
"Apache-2.0"
] | null | null | null | airflow/models.py | hellosoda/incubator-airflow | 1f0a717b65e0ea7e0127708b084baff0697f0946 | [
"MIT",
"BSD-3-Clause",
"BSD-2-Clause",
"Apache-2.0"
] | null | null | null | airflow/models.py | hellosoda/incubator-airflow | 1f0a717b65e0ea7e0127708b084baff0697f0946 | [
"MIT",
"BSD-3-Clause",
"BSD-2-Clause",
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# 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
#... | 36.768508 | 90 | 0.592845 |
062a60aa4ce706cf05420419e558b75e0be34834 | 2,873 | py | Python | docs/conf.py | arrikto/py2deb | 945cadc080f6263b72dc9ef9cb1d4b7d68c2ba5b | [
"MIT"
] | null | null | null | docs/conf.py | arrikto/py2deb | 945cadc080f6263b72dc9ef9cb1d4b7d68c2ba5b | [
"MIT"
] | null | null | null | docs/conf.py | arrikto/py2deb | 945cadc080f6263b72dc9ef9cb1d4b7d68c2ba5b | [
"MIT"
] | 1 | 2021-12-12T15:13:02.000Z | 2021-12-12T15:13:02.000Z | """
Documentation build configuration file for the `py2deb` package.
This Python script contains the Sphinx configuration for building the
documentation of the `py2deb` project. This file is execfile()d with the
current directory set to its containing dir.
"""
import os
import sys
# Add the 'py2deb' source distribut... | 33.022989 | 83 | 0.709363 |
4ae20d9f2578e9047e17c8b21d1f512bf2ecea0e | 29,054 | py | Python | package/cloudshell/cp/vcenter/common/vcenter/vmomi_service.py | DYeag/vCenterShell | e2e24cd938a92a68f4a8e6a860810d3ef72aae6d | [
"Apache-2.0"
] | null | null | null | package/cloudshell/cp/vcenter/common/vcenter/vmomi_service.py | DYeag/vCenterShell | e2e24cd938a92a68f4a8e6a860810d3ef72aae6d | [
"Apache-2.0"
] | null | null | null | package/cloudshell/cp/vcenter/common/vcenter/vmomi_service.py | DYeag/vCenterShell | e2e24cd938a92a68f4a8e6a860810d3ef72aae6d | [
"Apache-2.0"
] | null | null | null | import time
import requests
from pyVmomi import vim
from cloudshell.cp.vcenter.common.utilites.io import get_path_and_name
from cloudshell.cp.vcenter.common.vcenter.vm_location import VMLocation
from cloudshell.cp.vcenter.common.utilites.common_utils import str2bool
from cloudshell.cp.vcenter.common.vcenter.task_wai... | 38.329815 | 148 | 0.60033 |
0c63585ed731440a08d3d7043a34890879e10bf8 | 309 | py | Python | Data Scientist Career Path/5. Data Manipulation with Pandas/2. Hands On with Pandas/2. Modifying/4. column.py | myarist/Codecademy | 2ba0f104bc67ab6ef0f8fb869aa12aa02f5f1efb | [
"MIT"
] | 23 | 2021-06-06T15:35:55.000Z | 2022-03-21T06:53:42.000Z | Data Scientist Career Path/5. Data Manipulation with Pandas/2. Hands On with Pandas/2. Modifying/4. column.py | shivaniverma1/Data-Scientist | f82939a411484311171465591455880c8e354750 | [
"MIT"
] | null | null | null | Data Scientist Career Path/5. Data Manipulation with Pandas/2. Hands On with Pandas/2. Modifying/4. column.py | shivaniverma1/Data-Scientist | f82939a411484311171465591455880c8e354750 | [
"MIT"
] | 9 | 2021-06-08T01:32:04.000Z | 2022-03-18T15:38:09.000Z | import codecademylib
from string import lower
import pandas as pd
df = pd.DataFrame([
['JOHN SMITH', 'john.smith@gmail.com'],
['Jane Doe', 'jdoe@yahoo.com'],
['joe schmo', 'joeschmo@hotmail.com']
],
columns=['Name', 'Email'])
# Add columns here
df['Lowercase Name'] = df['Name'].apply(lower)
print(df) | 22.071429 | 46 | 0.673139 |
f65852654674bacf17c20ac2e29797f4a70c07a2 | 21,586 | py | Python | src/python/tests/core/local/butler/deploy_test.py | robertswiecki/clusterfuzz | 3c28bad3d49c95a3cc36efc86e33656e9a02dbf1 | [
"Apache-2.0"
] | 1 | 2020-05-21T18:47:06.000Z | 2020-05-21T18:47:06.000Z | src/python/tests/core/local/butler/deploy_test.py | robertswiecki/clusterfuzz | 3c28bad3d49c95a3cc36efc86e33656e9a02dbf1 | [
"Apache-2.0"
] | null | null | null | src/python/tests/core/local/butler/deploy_test.py | robertswiecki/clusterfuzz | 3c28bad3d49c95a3cc36efc86e33656e9a02dbf1 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 38.34103 | 80 | 0.585101 |
34a74d7ca6b43b84e6253310c794575c08a3adb1 | 97 | py | Python | tests/__init__.py | biracruz/rasterrgb | 35bbda4ba27b10bf5deebda0f93393af7c9c3ff3 | [
"MIT"
] | 1 | 2018-01-03T20:35:01.000Z | 2018-01-03T20:35:01.000Z | tests/__init__.py | biracruz/rasterrgb | 35bbda4ba27b10bf5deebda0f93393af7c9c3ff3 | [
"MIT"
] | 328 | 2017-02-07T03:00:57.000Z | 2022-03-27T18:45:20.000Z | tests/__init__.py | biracruz/rasterrgb | 35bbda4ba27b10bf5deebda0f93393af7c9c3ff3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from tests import test_rasterrgb
import numpy as np
import gdal, ogr, osr | 24.25 | 32 | 0.721649 |
71203c36639965d4bd044f40c18e2c787add83ce | 8,540 | py | Python | gammapy/maps/tests/test_geom.py | mealworm/gammapy | a838b2ca347dd6321f8da4e4097a33150d7b9be6 | [
"BSD-3-Clause"
] | null | null | null | gammapy/maps/tests/test_geom.py | mealworm/gammapy | a838b2ca347dd6321f8da4e4097a33150d7b9be6 | [
"BSD-3-Clause"
] | null | null | null | gammapy/maps/tests/test_geom.py | mealworm/gammapy | a838b2ca347dd6321f8da4e4097a33150d7b9be6 | [
"BSD-3-Clause"
] | null | null | null | # Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import absolute_import, division, print_function, unicode_literals
import pytest
from collections import OrderedDict
import numpy as np
from numpy.testing import assert_allclose
from astropy.coordinates import SkyCoord, Angle
from regions i... | 36.652361 | 82 | 0.662178 |
5532e3a74862687d88008ed24cb88ab6e544223f | 28,548 | py | Python | Lib/distutils/command/install.py | Hadron/python | 73137f499ed658169f49273eee46845e3b53e800 | [
"PSF-2.0"
] | 2 | 2018-12-11T16:35:20.000Z | 2019-01-23T16:42:17.000Z | Lib/distutils/command/install.py | Hadron/python | 73137f499ed658169f49273eee46845e3b53e800 | [
"PSF-2.0"
] | 1 | 2018-12-28T21:11:50.000Z | 2018-12-28T21:11:50.000Z | Lib/distutils/command/install.py | Hadron/python | 73137f499ed658169f49273eee46845e3b53e800 | [
"PSF-2.0"
] | 3 | 2018-01-21T17:53:17.000Z | 2021-09-08T10:22:05.000Z | """distutils.command.install
Implements the Distutils 'install' command."""
import sys
import os
from distutils import log
from distutils.core import Command
from distutils.debug import DEBUG
from distutils.sysconfig import get_config_vars
from distutils.errors import DistutilsPlatformError
from distutils.file_util ... | 41.076259 | 81 | 0.586626 |
f9c95e8753ec7b04987486a022d5e6c1778d771e | 22,237 | py | Python | archived/bio_007_world_database_on_protected_areas/contents/src/__init__.py | resource-watch/nrt-scripts | 8b6230bdce676032a0d23028d42ebef44709c5f2 | [
"MIT"
] | 6 | 2018-07-11T15:10:46.000Z | 2021-08-30T12:50:22.000Z | archived/bio_007_world_database_on_protected_areas/contents/src/__init__.py | resource-watch/nrt-scripts | 8b6230bdce676032a0d23028d42ebef44709c5f2 | [
"MIT"
] | 36 | 2017-05-08T14:09:59.000Z | 2021-12-01T04:19:49.000Z | archived/bio_007_world_database_on_protected_areas/contents/src/__init__.py | resource-watch/nrt-scripts | 8b6230bdce676032a0d23028d42ebef44709c5f2 | [
"MIT"
] | 5 | 2017-12-21T20:22:13.000Z | 2020-03-09T18:25:48.000Z | import logging
import sys
import os
from collections import OrderedDict
import cartosql
import requests
import datetime
import copy
import time
import numpy as np
import urllib
import zipfile
import pandas as pd
import shutil
# do you want to delete everything currently in the Carto table when you run this script?
CLE... | 47.012685 | 148 | 0.620362 |
fe22fad34894bcce704e2b82b6da6080f6de0303 | 1,916 | py | Python | example/example.py | RomainCendre/misvm | 37bca2aafe884d648ddcb8839dc56e3b06e95364 | [
"BSD-3-Clause"
] | 225 | 2015-01-04T15:37:04.000Z | 2022-03-21T23:01:31.000Z | example/example.py | RomainCendre/misvm | 37bca2aafe884d648ddcb8839dc56e3b06e95364 | [
"BSD-3-Clause"
] | 22 | 2015-11-24T15:23:54.000Z | 2021-07-07T10:28:58.000Z | example/example.py | RomainCendre/misvm | 37bca2aafe884d648ddcb8839dc56e3b06e95364 | [
"BSD-3-Clause"
] | 89 | 2015-01-19T23:07:58.000Z | 2021-09-18T02:54:09.000Z | #!/usr/bin/env python
from __future__ import print_function, division
import numpy as np
from misvmio import parse_c45, bag_set
import misvm
def main():
# Load list of C4.5 Examples
example_set = parse_c45('musk1')
# Get stats to normalize data
raw_data = np.array(example_set.to_float())
data_m... | 31.409836 | 80 | 0.654489 |
5606a42ce474bb55533331643079b3c3e2ca085d | 3,672 | py | Python | render_demo.py | ArjanJawahier/nerf | baae9a419cb82939189cd5a5754d9ad3211b76e4 | [
"MIT"
] | null | null | null | render_demo.py | ArjanJawahier/nerf | baae9a419cb82939189cd5a5754d9ad3211b76e4 | [
"MIT"
] | null | null | null | render_demo.py | ArjanJawahier/nerf | baae9a419cb82939189cd5a5754d9ad3211b76e4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[1]:
import os, sys
# os.environ['TF_FORCE_GPU_ALLOW_GROWTH'] = 'true'
os.environ['CUDA_VISIBLE_DEVICES'] = '1'
import tensorflow as tf
tf.compat.v1.enable_eager_execution()
import numpy as np
import imageio
import json
import random
import time
import pprint
import matplo... | 22.95 | 128 | 0.651416 |
2834696992cf8a73343d4895f98404b69bf93115 | 4,255 | py | Python | kettle/stream_test.py | AradhanaSingh/test-infra | 62a6014039806230c3fd481edf6291cf8bea1be2 | [
"Apache-2.0"
] | 5 | 2019-11-23T21:06:39.000Z | 2021-01-19T21:37:07.000Z | kettle/stream_test.py | AradhanaSingh/test-infra | 62a6014039806230c3fd481edf6291cf8bea1be2 | [
"Apache-2.0"
] | 433 | 2019-09-26T06:52:31.000Z | 2022-03-24T21:18:01.000Z | kettle/stream_test.py | AradhanaSingh/test-infra | 62a6014039806230c3fd481edf6291cf8bea1be2 | [
"Apache-2.0"
] | 49 | 2019-10-03T12:31:35.000Z | 2021-09-22T20:36:38.000Z | #!/usr/bin/env python3
# Copyright 2017 The Kubernetes Authors.
#
# 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 appl... | 29.755245 | 88 | 0.510223 |
6ec39df896d3b8fa7015475540c9870822f95454 | 11,696 | py | Python | test/test_mapper.py | bjintechinsight/kepler-mapper | dee61ed78a7d2d1606d22f8b71df429544749b90 | [
"MIT"
] | 5 | 2018-03-21T21:54:48.000Z | 2021-09-20T11:47:20.000Z | test/test_mapper.py | bjintechinsight/kepler-mapper | dee61ed78a7d2d1606d22f8b71df429544749b90 | [
"MIT"
] | null | null | null | test/test_mapper.py | bjintechinsight/kepler-mapper | dee61ed78a7d2d1606d22f8b71df429544749b90 | [
"MIT"
] | 4 | 2018-02-28T11:06:18.000Z | 2021-10-01T13:37:28.000Z | import pytest
import numpy as np
import warnings
from kmapper import KeplerMapper, Cover, cluster
from sklearn.preprocessing import StandardScaler
from sklearn.decomposition import PCA
from sklearn.linear_model import Lasso
from sklearn.manifold import MDS
from scipy import sparse
from scipy.spatial import distance
f... | 37.367412 | 167 | 0.594049 |
04c46d8bf1d396461e3870e5fcbccc9b907fa852 | 628 | py | Python | scripts/move_turtle_by_param.py | leeeju/R.O.S- | 66910c0ec7265bbfe147aad9f1cc87cd2515eabf | [
"Python-2.0",
"OLDAP-2.7"
] | 2 | 2021-07-25T23:12:45.000Z | 2021-07-25T23:12:46.000Z | scripts/move_turtle_by_param.py | leeeju/R.O.S- | 66910c0ec7265bbfe147aad9f1cc87cd2515eabf | [
"Python-2.0",
"OLDAP-2.7"
] | null | null | null | scripts/move_turtle_by_param.py | leeeju/R.O.S- | 66910c0ec7265bbfe147aad9f1cc87cd2515eabf | [
"Python-2.0",
"OLDAP-2.7"
] | null | null | null | #!/usr/bin/env python
import rospy
from geometry_msgs.msg import Twist
def move_turtle():
pb = rospy.Publisher("/turtle1/cmd_vel", Twist, queue_size=20)
tw = Twist()
tw.linear.x = 1.00
tw.angular.z = 0.50
tw.angular.y = 0.80
pb.publish(tw)
if __name__ == '__main__':
t... | 24.153846 | 66 | 0.555732 |
9c35b8e3fcda54e096588898ecf5fc4aaa25fc2c | 6,381 | py | Python | flaskr/table_init.py | Ln-Yangzl/yukiyu-webpage | f9aaf71dca18067ecbe43faccb74a7f8d4cf56b7 | [
"Apache-2.0"
] | null | null | null | flaskr/table_init.py | Ln-Yangzl/yukiyu-webpage | f9aaf71dca18067ecbe43faccb74a7f8d4cf56b7 | [
"Apache-2.0"
] | null | null | null | flaskr/table_init.py | Ln-Yangzl/yukiyu-webpage | f9aaf71dca18067ecbe43faccb74a7f8d4cf56b7 | [
"Apache-2.0"
] | 2 | 2021-03-23T12:22:04.000Z | 2021-05-24T13:56:26.000Z | # 所有的表的初始化创建语句
# 可调用该模块进行表的初始化
import pymysql
import traceback
from viewAndTrigger_init import create_view_detail_info
from db_bangumi_insert import insert_bangumi
from dbBangumiInfoInsert import insert_bangumi_info
#bangumi_list总表
def create_table_bangumi_list(db):
cursor=db.cursor()
sql = """
create... | 30.099057 | 115 | 0.625764 |
12a708a0d1dea6789fb8125a0dc4160d0546528c | 19,707 | py | Python | digits/model/images/classification/views.py | ZeusNightBolt/DIGITS | 3450cc683143415418af5ecdb1b17b02da3e2c79 | [
"BSD-3-Clause"
] | 2 | 2017-04-24T10:16:15.000Z | 2019-02-26T09:36:27.000Z | digits/model/images/classification/views.py | ZeusNightBolt/DIGITS | 3450cc683143415418af5ecdb1b17b02da3e2c79 | [
"BSD-3-Clause"
] | 1 | 2016-08-30T23:48:17.000Z | 2016-08-30T23:48:17.000Z | digits/model/images/classification/views.py | ZeusNightBolt/DIGITS | 3450cc683143415418af5ecdb1b17b02da3e2c79 | [
"BSD-3-Clause"
] | 3 | 2017-04-24T10:16:15.000Z | 2019-02-26T09:36:49.000Z | # Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved.
import os
import re
import tempfile
import random
import flask
import werkzeug.exceptions
import numpy as np
import digits
from digits.config import config_value
from digits import utils
from digits.utils.routing import request_wants_json, job_from_... | 38.19186 | 205 | 0.603694 |
cf4fcac1013baff313bfa43d715b93455fa2ab6d | 1,325 | py | Python | Main.py | ashikaranth8400/Github-api-Project | ccf0a805c92393646447d15f3e05c7f2f046a965 | [
"MIT"
] | 3 | 2021-01-19T06:23:09.000Z | 2021-09-07T06:50:11.000Z | Main.py | ashikaranth8400/Github-api-Project | ccf0a805c92393646447d15f3e05c7f2f046a965 | [
"MIT"
] | null | null | null | Main.py | ashikaranth8400/Github-api-Project | ccf0a805c92393646447d15f3e05c7f2f046a965 | [
"MIT"
] | 4 | 2020-06-05T07:24:07.000Z | 2021-10-19T09:18:14.000Z | from selenium import webdriver
from time import sleep
from pass import pw,uname
import sys
class github:
def __init__(self, username, pw, pname):
self.driver = webdriver.Chrome()
self.username = username
self.driver.get("https://github.com/login")
sleep(2)
self.driver.find_e... | 32.317073 | 107 | 0.6 |
102eaa02475aacdfd4f2f515320e0430c63d07fd | 729 | py | Python | test/optim_rmsprop_test.py | jdsgomes/ClassyVision-1 | 309d4f12431c6b4d8540010a781dc2aa25fe88e7 | [
"MIT"
] | null | null | null | test/optim_rmsprop_test.py | jdsgomes/ClassyVision-1 | 309d4f12431c6b4d8540010a781dc2aa25fe88e7 | [
"MIT"
] | null | null | null | test/optim_rmsprop_test.py | jdsgomes/ClassyVision-1 | 309d4f12431c6b4d8540010a781dc2aa25fe88e7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import unittest
from classy_vision.optim.rmsprop import RMSProp
from test.generic.optim_test_util import TestOptimiz... | 26.035714 | 65 | 0.620027 |
2135993d8b08845c1803281d9aba241765d23f4d | 2,132 | py | Python | iris_sklearn_shared_folder.py | CortanaIntelligenceGallery/iris-test3 | b7e919f5a1738ad1490e6803ae34123f505d6320 | [
"MIT"
] | null | null | null | iris_sklearn_shared_folder.py | CortanaIntelligenceGallery/iris-test3 | b7e919f5a1738ad1490e6803ae34123f505d6320 | [
"MIT"
] | null | null | null | iris_sklearn_shared_folder.py | CortanaIntelligenceGallery/iris-test3 | b7e919f5a1738ad1490e6803ae34123f505d6320 | [
"MIT"
] | null | null | null | # Please make sure scikit-learn is included the conda_dependencies.yml file.
import pickle
import sys
import os
from sklearn.datasets import load_iris
from sklearn.linear_model import LogisticRegression
from azureml.logging import get_azureml_logger
# initialize the logger
run_logger = get_azureml_logger(... | 30.457143 | 123 | 0.705441 |
d6a452a965ee46c0b54773c508cf899b09aa34e1 | 537 | py | Python | hcphotonics/setup.py | sunjerry019/photonLauncher | 5abbe6f1fcd8ba5e8a0f7790ffd0b724248292cb | [
"Apache-2.0"
] | 6 | 2015-11-26T15:03:38.000Z | 2020-10-05T14:08:54.000Z | hcphotonics/setup.py | sunjerry019/photonLauncher | 5abbe6f1fcd8ba5e8a0f7790ffd0b724248292cb | [
"Apache-2.0"
] | 7 | 2015-12-09T06:44:34.000Z | 2021-12-14T15:51:28.000Z | hcphotonics/setup.py | sunjerry019/photonLauncher | 5abbe6f1fcd8ba5e8a0f7790ffd0b724248292cb | [
"Apache-2.0"
] | 3 | 2016-07-25T10:43:21.000Z | 2021-12-07T14:12:47.000Z | from setuptools import setup
from setuptools import find_packages
setup(name='hcphotonics',
version='0.1',
description='Utilities and tools for HC Photonics Lab',
url='https://github.com/sunjerry019/photonLauncher',
author='HC Photonics',
author_email='hcphotonics@gmail.com',
license... | 25.571429 | 61 | 0.60149 |
fa87336d86e452ded371ba8c44bd0ab02407f061 | 1,715 | py | Python | lib/python/flame/registry/dummy.py | GaoxiangLuo/flame | 16bd1715a545421d45ea0fc32544e448389de49c | [
"Apache-2.0"
] | 6 | 2022-03-30T23:37:05.000Z | 2022-03-31T17:29:14.000Z | lib/python/flame/registry/dummy.py | GaoxiangLuo/flame | 16bd1715a545421d45ea0fc32544e448389de49c | [
"Apache-2.0"
] | 10 | 2022-03-31T00:03:58.000Z | 2022-03-31T07:15:06.000Z | lib/python/flame/registry/dummy.py | GaoxiangLuo/flame | 16bd1715a545421d45ea0fc32544e448389de49c | [
"Apache-2.0"
] | 2 | 2022-03-30T23:25:15.000Z | 2022-03-30T23:55:47.000Z | # Copyright 2022 Cisco Systems, 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 required by applicable l... | 31.759259 | 79 | 0.641983 |
53b531fab15214529e2173da33e6be8a20b7dea9 | 440 | py | Python | interviews/iqiyi/9.12/2.py | xuychen/Leetcode | c8bf33af30569177c5276ffcd72a8d93ba4c402a | [
"MIT"
] | null | null | null | interviews/iqiyi/9.12/2.py | xuychen/Leetcode | c8bf33af30569177c5276ffcd72a8d93ba4c402a | [
"MIT"
] | null | null | null | interviews/iqiyi/9.12/2.py | xuychen/Leetcode | c8bf33af30569177c5276ffcd72a8d93ba4c402a | [
"MIT"
] | null | null | null | n = input()
result = []
max_iter = int((2 * n) ** 0.5)
for i in range(max_iter, 1, -1):
if i & 1:
center = n / i
if center * i == n and center - i / 2 >= 1:
result.append(range(center-i/2, center+i/2+1))
else:
center = n / i + 1
if n % i * 2 == i and center - i / 2 ... | 24.444444 | 58 | 0.486364 |
ed395823992d00253e3e55b659dc28a4f3b0e47f | 299 | py | Python | scrapers/exceptions.py | PatrickSpieker/pricesleuth | e9a9e5a1737c20773a2b317292b4801e41583693 | [
"MIT"
] | null | null | null | scrapers/exceptions.py | PatrickSpieker/pricesleuth | e9a9e5a1737c20773a2b317292b4801e41583693 | [
"MIT"
] | null | null | null | scrapers/exceptions.py | PatrickSpieker/pricesleuth | e9a9e5a1737c20773a2b317292b4801e41583693 | [
"MIT"
] | null | null | null | class MissingAttributeException(Exception):
def __init__(self, *args, **kwargs):
Exception.__init__(self, *args, **kwargs)
class MissingPriceException(MissingAttributeException):
def __init__(self, *args, **kwargs):
MissingAttributeException.__init__(self, *args, **kwargs) | 37.375 | 65 | 0.729097 |
a307d8ff5899ecdce52a55253d033cd1f9b1a206 | 1,822 | py | Python | azuresite/production.py | limdave/djangoapp | 236f2da256ad2150b21e21bbc2adeac9fe6251f9 | [
"MIT"
] | null | null | null | azuresite/production.py | limdave/djangoapp | 236f2da256ad2150b21e21bbc2adeac9fe6251f9 | [
"MIT"
] | null | null | null | azuresite/production.py | limdave/djangoapp | 236f2da256ad2150b21e21bbc2adeac9fe6251f9 | [
"MIT"
] | null | null | null | from .settings import *
# Configure default domain name
ALLOWED_HOSTS = [os.environ['WEBSITE_SITE_NAME'] + '.azurewebsites.net', '127.0.0.1'] if 'WEBSITE_SITE_NAME' in os.environ else []
# WhiteNoise configuration insert comment
MIDDLEWARE = [
'd... | 55.212121 | 130 | 0.469265 |
18abe1de0da7d77526fff877d9b5aef7dc46e289 | 446 | py | Python | env/lib/python3.8/site-packages/plotly/validators/layout/_uirevision.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/layout/_uirevision.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/layout/_uirevision.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 UirevisionValidator(_plotly_utils.basevalidators.AnyValidator):
def __init__(self, plotly_name="uirevision", parent_name="layout", **kwargs):
super(UirevisionValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | 34.307692 | 81 | 0.656951 |
c2c96c3705fce82eebf439a2db3b0a90cf860567 | 1,258 | py | Python | django-server/climate_commander/jobs/migrations/0020_auto_20160916_0053.py | jrising/climate-commander | 123cf5a07b87eb1a3bdb44378ee27712b6563ec3 | [
"MIT"
] | null | null | null | django-server/climate_commander/jobs/migrations/0020_auto_20160916_0053.py | jrising/climate-commander | 123cf5a07b87eb1a3bdb44378ee27712b6563ec3 | [
"MIT"
] | 1 | 2016-08-03T21:49:58.000Z | 2016-08-03T21:49:58.000Z | django-server/climate_commander/jobs/migrations/0020_auto_20160916_0053.py | jrising/climate-commander | 123cf5a07b87eb1a3bdb44378ee27712b6563ec3 | [
"MIT"
] | 1 | 2016-07-13T18:19:56.000Z | 2016-07-13T18:19:56.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('jobs', '0019_auto_20160824_1516'),
]
operations = [
migrations.AddField(
model_name='server',
name='... | 27.955556 | 61 | 0.565978 |
da1a337efcbed13cbd657058e2abc544247b6cbd | 560 | py | Python | polls/urls.py | victoralvess/getting_started_django | 109d480d978d9c1c9b84048aa98b4e475c28cf9a | [
"MIT"
] | null | null | null | polls/urls.py | victoralvess/getting_started_django | 109d480d978d9c1c9b84048aa98b4e475c28cf9a | [
"MIT"
] | null | null | null | polls/urls.py | victoralvess/getting_started_django | 109d480d978d9c1c9b84048aa98b4e475c28cf9a | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
# 'app_name' is used to distinguish different app templates in the project
app_name = 'polls'
# The 'name' value will be used by the {% url %} template tag
urlpatterns = [
path('', views.index, name='index'),
path('hello/<name>', views.say_hello, name='hello'),
path(... | 40 | 74 | 0.698214 |
c30c76facd4d19c7bade5aab4b6160cdaa6af8d3 | 4,651 | py | Python | dialogue/pytorch/seq2seq/model.py | ishine/nlp-dialogue | d47c1438cb5c45c2c2aebfb82fea92bef4c3d65c | [
"Apache-2.0"
] | 59 | 2021-02-15T09:15:12.000Z | 2022-03-29T01:48:24.000Z | dialogue/pytorch/seq2seq/model.py | ishine/nlp-dialogue | d47c1438cb5c45c2c2aebfb82fea92bef4c3d65c | [
"Apache-2.0"
] | null | null | null | dialogue/pytorch/seq2seq/model.py | ishine/nlp-dialogue | d47c1438cb5c45c2c2aebfb82fea92bef4c3d65c | [
"Apache-2.0"
] | 15 | 2021-02-15T09:16:04.000Z | 2022-02-21T07:18:02.000Z | # Copyright 2021 DengBoCong. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 41.900901 | 111 | 0.657063 |
021c39199fba542fa60f71820b31916acab77c1f | 2,803 | py | Python | mne/viz/montage.py | DraganaMana/mne-python | 83d48ec9e93bc176ae7fb8d000521ba3bd6b4c3c | [
"BSD-3-Clause"
] | 1 | 2020-11-05T21:30:15.000Z | 2020-11-05T21:30:15.000Z | mne/viz/montage.py | DraganaMana/mne-python | 83d48ec9e93bc176ae7fb8d000521ba3bd6b4c3c | [
"BSD-3-Clause"
] | 2 | 2016-02-27T13:43:15.000Z | 2018-07-18T19:44:45.000Z | mne/viz/montage.py | DraganaMana/mne-python | 83d48ec9e93bc176ae7fb8d000521ba3bd6b4c3c | [
"BSD-3-Clause"
] | 1 | 2017-03-05T20:44:07.000Z | 2017-03-05T20:44:07.000Z | """Functions to plot EEG sensor montages or digitizer montages."""
from copy import deepcopy
import numpy as np
from ..utils import check_version, logger
from . import plot_sensors
def plot_montage(montage, scale_factor=20, show_names=True, kind='topomap',
show=True):
"""Plot a montage.
Para... | 37.373333 | 79 | 0.613628 |
f5152685f71af5e42aaac532306fec493a571db2 | 1,381 | py | Python | zenmoney/tag.py | nexter83/python-zenmoney | 08d97b9db3805b7c631075d4562e7caaea3b3c9f | [
"MIT"
] | null | null | null | zenmoney/tag.py | nexter83/python-zenmoney | 08d97b9db3805b7c631075d4562e7caaea3b3c9f | [
"MIT"
] | null | null | null | zenmoney/tag.py | nexter83/python-zenmoney | 08d97b9db3805b7c631075d4562e7caaea3b3c9f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from . import ZenObject, UUID, timestamp
class Tag(ZenObject):
'''
Zenmoney transaction tag or category, see
https://github.com/zenmoney/ZenPlugins/wiki/ZenMoney-API#tag
'''
def __init__(self,
*,
id: UUID, # UUID, string in orig... | 32.116279 | 72 | 0.451846 |
88ea8f4d1501d425f5323d0fa078ff3eed728512 | 1,114 | py | Python | Tests/image_tests/renderpasses/graphs/TAA.py | SvenHinze/SpatioTemporalReprojection | 3abc2964ef3adfeb10a64dfc6d06bc2ab87a5081 | [
"BSD-3-Clause"
] | 1 | 2020-04-24T17:55:25.000Z | 2020-04-24T17:55:25.000Z | Tests/image_tests/renderpasses/graphs/TAA.py | SvenHinze/SpatioTemporalReprojection | 3abc2964ef3adfeb10a64dfc6d06bc2ab87a5081 | [
"BSD-3-Clause"
] | 2 | 2021-03-02T10:16:06.000Z | 2021-08-13T10:10:21.000Z | Tests/image_tests/renderpasses/graphs/TAA.py | SvenHinze/SpatioTemporalReprojection | 3abc2964ef3adfeb10a64dfc6d06bc2ab87a5081 | [
"BSD-3-Clause"
] | null | null | null | from falcor import *
def render_graph_TAA():
loadRenderPassLibrary("Antialiasing.dll")
loadRenderPassLibrary("DepthPass.dll")
loadRenderPassLibrary("ForwardLightingPass.dll")
testTAA = RenderGraph("TAA")
DepthPass = RenderPass("DepthPass", {'depthFormat': ResourceFormat.D32Float})
testTAA.addPa... | 41.259259 | 109 | 0.743268 |
669a467c6a3f1e55b33160246a7583aaac3a951c | 29,915 | py | Python | app/library/protocols/base.py | imamsolikhin/Python | f2ed5a848a37925bd9172f1f7484fd40f2e0a8a5 | [
"MIT"
] | null | null | null | app/library/protocols/base.py | imamsolikhin/Python | f2ed5a848a37925bd9172f1f7484fd40f2e0a8a5 | [
"MIT"
] | null | null | null | app/library/protocols/base.py | imamsolikhin/Python | f2ed5a848a37925bd9172f1f7484fd40f2e0a8a5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Internal module of protocols with abstract base classes.
Applications should not directly import this module, expect to make subclasses.
As a reminder: all internal strings, like identifier, should be
represented in UTF-8. Use pynt.xmlns.UTF8 if you need help converting."""
# builtin modul... | 50.44688 | 175 | 0.647434 |
2b837e6f058a500222fb3002be48a9c49688a239 | 4,974 | py | Python | sdk/python/pulumi_azure_nextgen/apimanagement/v20191201/get_named_value.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/apimanagement/v20191201/get_named_value.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/apimanagement/v20191201/get_named_value.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
__a... | 33.836735 | 219 | 0.631283 |
b033da0fcff65dd7f5dac36152d13b478b903f99 | 1,616 | py | Python | app/route/notifications/provider.py | LifeLaboratory/rosbank_backend | b19aed99b7084c14f0827933b7f28d6e51de92bd | [
"MIT"
] | 2 | 2019-12-06T23:22:33.000Z | 2019-12-08T07:18:31.000Z | app/route/notifications/provider.py | LifeLaboratory/rosbank_backend | b19aed99b7084c14f0827933b7f28d6e51de92bd | [
"MIT"
] | 56 | 2019-12-06T17:54:07.000Z | 2019-12-08T04:55:24.000Z | app/route/notifications/provider.py | LifeLaboratory/rosbank_backend | b19aed99b7084c14f0827933b7f28d6e51de92bd | [
"MIT"
] | 1 | 2019-12-08T05:04:46.000Z | 2019-12-08T05:04:46.000Z | from app.api.base.base_sql import Sql
class Provider:
"""
Класс для работы с уведомлеиями в бд
"""
@staticmethod
def insert_notification(args):
"""
Добавить уведомление
:param args:
:return:
"""
query = """
insert into notifications ("name", "url",... | 26.064516 | 93 | 0.592822 |
2fc88b34bebd049753ba5018fc0d387389be541a | 11,184 | py | Python | library/bigip_device_dns.py | Larsende/f5_ansible | 93b0747ba663128e2c8dfc456dad4653cdde4f38 | [
"Apache-2.0"
] | 12 | 2016-12-29T16:09:21.000Z | 2019-06-29T14:12:17.000Z | library/bigip_device_dns.py | Larsende/f5_ansible | 93b0747ba663128e2c8dfc456dad4653cdde4f38 | [
"Apache-2.0"
] | 24 | 2017-05-24T07:56:56.000Z | 2017-11-30T09:31:56.000Z | library/bigip_device_dns.py | Larsende/f5_ansible | 93b0747ba663128e2c8dfc456dad4653cdde4f38 | [
"Apache-2.0"
] | 26 | 2017-05-31T17:15:32.000Z | 2021-03-29T03:45:06.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017 F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | 28.313924 | 91 | 0.587804 |
4edee4c3e80587cd1b32084e655c43d47612a75e | 2,460 | py | Python | main.py | martinetmayank/telegram-chats | ad79f3357d657415f57c83f219fc3ad7d57081eb | [
"Apache-2.0"
] | null | null | null | main.py | martinetmayank/telegram-chats | ad79f3357d657415f57c83f219fc3ad7d57081eb | [
"Apache-2.0"
] | 1 | 2021-04-30T21:26:01.000Z | 2021-04-30T21:26:01.000Z | main.py | martinetmayank/telegram-chats | ad79f3357d657415f57c83f219fc3ad7d57081eb | [
"Apache-2.0"
] | null | null | null | from open_config_files import open_config
from write_message import write_file
from telethon import TelegramClient
from telethon.errors import SessionPasswordNeededError
from telethon.tl.functions.messages import GetHistoryRequest
from telethon.tl.types import PeerChannel
async def main(phone):
awa... | 27.333333 | 79 | 0.610976 |
038a3e7537210deacb193d030f094de7d0b2efbd | 6,264 | py | Python | koufopanos_1991.py | megcrow/kinetic-schemes | d1f5c5cc95481554e2d68a69b3b8663f9501df3d | [
"MIT"
] | 7 | 2018-10-25T15:38:39.000Z | 2022-03-12T02:38:30.000Z | koufopanos_1991.py | megcrow/kinetic-schemes | d1f5c5cc95481554e2d68a69b3b8663f9501df3d | [
"MIT"
] | 1 | 2020-03-02T03:05:04.000Z | 2020-03-02T18:27:31.000Z | koufopanos_1991.py | megcrow/kinetic-schemes | d1f5c5cc95481554e2d68a69b3b8663f9501df3d | [
"MIT"
] | 5 | 2018-12-23T22:10:03.000Z | 2020-08-08T09:01:39.000Z | """
Plot yields from primary and secondary reactions as determined by the
Koufopanos 1991 kinetic scheme for biomass pyrolysis. Note that this scheme
focuses on wood conversion and char yield. Product of volatiles and gas is
lumped together as (V+G) so individual tar and gas component is not provided.
Reference:
Koufo... | 39.396226 | 129 | 0.589879 |
9fa56c2d7c55b5a48c4503f094831a63d4bff1e5 | 2,438 | py | Python | ingestion/examples/airflow/dags/airflow_metadata_to_es.py | mosiac1/OpenMetadata | 21c14d257c6ae7ed2aad2a9ccff2c3a3f1594681 | [
"Apache-2.0"
] | 1 | 2022-03-25T19:17:49.000Z | 2022-03-25T19:17:49.000Z | ingestion/examples/airflow/dags/airflow_metadata_to_es.py | mosiac1/OpenMetadata | 21c14d257c6ae7ed2aad2a9ccff2c3a3f1594681 | [
"Apache-2.0"
] | null | null | null | ingestion/examples/airflow/dags/airflow_metadata_to_es.py | mosiac1/OpenMetadata | 21c14d257c6ae7ed2aad2a9ccff2c3a3f1594681 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Collate
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software... | 26.5 | 78 | 0.673503 |
e3e298ca688a26db589b69abd74fbca8a2f67532 | 419 | py | Python | demo/with_wsgi/ops/tornado.py | marco-souza/falsy | 0dd6f792061ee833f308372f0204dea0ad9bf2d1 | [
"MIT"
] | 127 | 2017-01-05T14:55:50.000Z | 2022-02-01T06:02:49.000Z | demo/with_wsgi/ops/tornado.py | marco-souza/falsy | 0dd6f792061ee833f308372f0204dea0ad9bf2d1 | [
"MIT"
] | 9 | 2017-03-08T21:38:16.000Z | 2022-02-01T06:44:09.000Z | demo/with_wsgi/ops/tornado.py | marco-souza/falsy | 0dd6f792061ee833f308372f0204dea0ad9bf2d1 | [
"MIT"
] | 26 | 2017-01-12T08:56:15.000Z | 2022-02-01T06:02:52.000Z | import tornado.web
import tornado.wsgi
class TornadoHandler(tornado.web.RequestHandler):
def get(self):
self.write("<h1 style='color:blue'>Hello Tornado!</h1>")
PRE_TORNADO = 'tornado'
def pre_tornado(route):
return '/' + PRE_TORNADO + '/' + route.lstrip('/')
application = tornado.web.Application([... | 23.277778 | 64 | 0.704057 |
d68187f30d94c0349e2126f6a43fbdddae9a4195 | 1,069 | py | Python | tests/config_test.py | xbraininc/viraal | 4fe07e231a434eea4dbc1b6c3d60ed631e03dc6b | [
"Apache-2.0"
] | 8 | 2020-06-02T08:46:02.000Z | 2021-10-13T08:00:12.000Z | tests/config_test.py | xbraininc/viraal | 4fe07e231a434eea4dbc1b6c3d60ed631e03dc6b | [
"Apache-2.0"
] | null | null | null | tests/config_test.py | xbraininc/viraal | 4fe07e231a434eea4dbc1b6c3d60ed631e03dc6b | [
"Apache-2.0"
] | 2 | 2020-06-19T01:50:58.000Z | 2021-03-08T18:33:11.000Z | from viraal.config import pass_conf, call_if
from omegaconf import OmegaConf
import logging
logger = logging.getLogger(__name__)
def f(*args, **kwargs):
return args, kwargs
class TestConfigUtils:
def test_pass_conf(self):
conf = OmegaConf.create({'config':{'f':{'c': 2, 'd': 10}}})
args, kwar... | 28.891892 | 92 | 0.507951 |
180bd99884ce9f901d6431310e4271ba3d5d7219 | 303 | py | Python | models/Scalar_U_v3_UFO/CT_couplings.py | jlrainbolt/MG5_v2_6_1 | 241f0c6f309342d6e8b813284467b2edd393c7d6 | [
"NCSA"
] | null | null | null | models/Scalar_U_v3_UFO/CT_couplings.py | jlrainbolt/MG5_v2_6_1 | 241f0c6f309342d6e8b813284467b2edd393c7d6 | [
"NCSA"
] | null | null | null | models/Scalar_U_v3_UFO/CT_couplings.py | jlrainbolt/MG5_v2_6_1 | 241f0c6f309342d6e8b813284467b2edd393c7d6 | [
"NCSA"
] | null | null | null | # This file was automatically created by FeynRules 2.3.29
# Mathematica version: 10.3.0 for Mac OS X x86 (64-bit) (October 9, 2015)
# Date: Fri 16 Feb 2018 10:57:27
from object_library import all_couplings, Coupling
from function_library import complexconjugate, re, im, csc, sec, acsc, asec, cot
| 25.25 | 80 | 0.749175 |
2b973d315f46c9c5e8845b81fcb207cbd34a87b7 | 464 | py | Python | Chapter04/namedtuple_sales.py | PacktPublishing/Secret-Recipes-of-the-Python-Ninja | 805d00c7a54927ba94c9077e9a580508ee3c5e56 | [
"MIT"
] | 13 | 2018-06-21T01:44:49.000Z | 2021-12-01T10:49:53.000Z | Chapter04/namedtuple_sales.py | PacktPublishing/Secret-Recipes-of-the-Python-Ninja | 805d00c7a54927ba94c9077e9a580508ee3c5e56 | [
"MIT"
] | null | null | null | Chapter04/namedtuple_sales.py | PacktPublishing/Secret-Recipes-of-the-Python-Ninja | 805d00c7a54927ba94c9077e9a580508ee3c5e56 | [
"MIT"
] | 6 | 2018-10-05T08:29:24.000Z | 2022-01-11T14:49:50.000Z | In [12]: salesReceipt = collections.namedtuple("salesReceipt", ["storeID", "saleDate", "saleAmount", "totalGuests"])
In [13]: store22 = salesReceipt(22, "12-14-2017", 45.32, 3)
In [14]: store15 = salesReceipt(15, "12-14-2017", 22.50, 1)
In [15]: print("Store ID = ", store22.storeID)
Store ID = 22
In [16]: print("S... | 23.2 | 116 | 0.622845 |
965863c8d420e2073fd710c8b9a3410adc778bcf | 3,195 | py | Python | tests/fire_groups/test_cone_of_fire.py | spascou/ps2-analysis | 00f99b009d15d4c401a3338ddd0408ac7eedcc0b | [
"MIT"
] | 2 | 2020-06-25T17:19:05.000Z | 2020-10-13T06:08:39.000Z | tests/fire_groups/test_cone_of_fire.py | spascou/ps2-analysis | 00f99b009d15d4c401a3338ddd0408ac7eedcc0b | [
"MIT"
] | null | null | null | tests/fire_groups/test_cone_of_fire.py | spascou/ps2-analysis | 00f99b009d15d4c401a3338ddd0408ac7eedcc0b | [
"MIT"
] | null | null | null | from ps2_analysis.fire_groups.cone_of_fire import ConeOfFire
def test_min_cof_angle():
cof: ConeOfFire = ConeOfFire(
max_angle=2.0,
min_angle=1.0,
bloom=0.1,
recovery_rate=10.0,
recovery_delay=100,
multiplier=2.0,
moving_multiplier=2.0,
pellet_spread... | 24.767442 | 60 | 0.598748 |
de2f3fc9a6823533047ccbc8f88278a10065156f | 4,478 | py | Python | configs/fcos/ddb_v3_no_improvement_r50_weighted_loss_bbox_consistency_warmup_caffe_fpn_gn_1x_4gpu_nvidia.py | Lanselott/mmdetection | 03ce0a87f4d52f4adf4f78fd39ad30b2da394376 | [
"Apache-2.0"
] | null | null | null | configs/fcos/ddb_v3_no_improvement_r50_weighted_loss_bbox_consistency_warmup_caffe_fpn_gn_1x_4gpu_nvidia.py | Lanselott/mmdetection | 03ce0a87f4d52f4adf4f78fd39ad30b2da394376 | [
"Apache-2.0"
] | null | null | null | configs/fcos/ddb_v3_no_improvement_r50_weighted_loss_bbox_consistency_warmup_caffe_fpn_gn_1x_4gpu_nvidia.py | Lanselott/mmdetection | 03ce0a87f4d52f4adf4f78fd39ad30b2da394376 | [
"Apache-2.0"
] | null | null | null | # model settings
model = dict(
type='FCOS',
pretrained='open-mmlab://resnet50_caffe',
backbone=dict(
type='ResNet',
depth=50,
num_stages=4,
out_indices=(0, 1, 2, 3),
frozen_stages=1,
norm_cfg=dict(type='BN', requires_grad=False),
style='caffe'),
ne... | 30.256757 | 75 | 0.623493 |
a9fce999914867ceb037d354f9be935bd891430e | 917 | py | Python | monasca_persister/repositories/abstract_repository.py | openstack/monasca-persister | 49e654a3c914122d352c276aea888ce160786e31 | [
"Apache-2.0"
] | 25 | 2015-10-18T02:54:55.000Z | 2020-01-05T00:03:33.000Z | monasca_persister/repositories/abstract_repository.py | openstack/monasca-persister | 49e654a3c914122d352c276aea888ce160786e31 | [
"Apache-2.0"
] | 4 | 2016-06-13T22:05:06.000Z | 2021-06-04T06:06:06.000Z | monasca_persister/repositories/abstract_repository.py | openstack/monasca-persister | 49e654a3c914122d352c276aea888ce160786e31 | [
"Apache-2.0"
] | 24 | 2015-10-20T13:31:19.000Z | 2021-11-19T09:30:26.000Z | # (C) Copyright 2016 Hewlett Packard Enterprise Development Company LP
#
# 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... | 30.566667 | 70 | 0.742639 |
56cf379510c331643250586b8f8564e6f8477813 | 19,375 | py | Python | tensorflow/models/embedding/word2vec.py | deepakmuralidharan/tensorflow | f40e41f9c71ef2865f96f3db3cea2909797fe2a3 | [
"Apache-2.0"
] | 23 | 2016-02-04T21:08:43.000Z | 2022-01-14T13:22:33.000Z | tensorflow/models/embedding/word2vec.py | deepakmuralidharan/tensorflow | f40e41f9c71ef2865f96f3db3cea2909797fe2a3 | [
"Apache-2.0"
] | 2 | 2016-05-31T16:38:55.000Z | 2018-12-30T20:17:05.000Z | tensorflow/models/embedding/word2vec.py | deepakmuralidharan/tensorflow | f40e41f9c71ef2865f96f3db3cea2909797fe2a3 | [
"Apache-2.0"
] | 20 | 2016-02-15T17:31:02.000Z | 2020-01-12T08:18:48.000Z | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 36.625709 | 80 | 0.648103 |
4f3bfc71c8cbbdb514ffc9e35b587f8d9cfca816 | 823 | py | Python | Examples/AdvancedUsage/Verify/VerifyDigital.py | groupdocs-signature-cloud/groupdocs-signature-cloud-python-samples | ff2de5acfc00421b2ccf3ae5ddb199261f2f5449 | [
"MIT"
] | null | null | null | Examples/AdvancedUsage/Verify/VerifyDigital.py | groupdocs-signature-cloud/groupdocs-signature-cloud-python-samples | ff2de5acfc00421b2ccf3ae5ddb199261f2f5449 | [
"MIT"
] | null | null | null | Examples/AdvancedUsage/Verify/VerifyDigital.py | groupdocs-signature-cloud/groupdocs-signature-cloud-python-samples | ff2de5acfc00421b2ccf3ae5ddb199261f2f5449 | [
"MIT"
] | 2 | 2018-12-20T11:12:08.000Z | 2019-07-08T13:01:22.000Z | # Import modules
from groupdocs_signature_cloud import *
import groupdocs_signature_cloud
from Common import Common
class VerifyDigital:
@classmethod
def Run(cls):
# Create instance of the API
api = groupdocs_signature_cloud.SignApi.from_config(Common.GetConfig())
fileInfo... | 28.37931 | 79 | 0.658566 |
20cc3c70e256c45b112ee64c3a9c6b23cf3370f9 | 11,677 | py | Python | ajax_datatable/columns.py | martimarkov/django-ajax-datatable | d132504a199cb2afe2cfd74a2e6d5d5f2969c4a4 | [
"MIT"
] | null | null | null | ajax_datatable/columns.py | martimarkov/django-ajax-datatable | d132504a199cb2afe2cfd74a2e6d5d5f2969c4a4 | [
"MIT"
] | null | null | null | ajax_datatable/columns.py | martimarkov/django-ajax-datatable | d132504a199cb2afe2cfd74a2e6d5d5f2969c4a4 | [
"MIT"
] | null | null | null | import datetime
from django.utils.translation import gettext_lazy as _
from django.db import models
from .exceptions import ColumnOrderError
from .utils import format_datetime
from django.utils.html import strip_tags
from .app_settings import STRIP_HTML_TAGS
class Column(object):
def __init__(self, model_field, ... | 37.187898 | 112 | 0.581999 |
7da4ae9a691ce71e891d58d91d9987103615db8b | 342 | py | Python | instana/__version__.py | darnat/Instana | e085e7bd2dc53fea7d5d4a0e6943322bf7d27b82 | [
"MIT"
] | null | null | null | instana/__version__.py | darnat/Instana | e085e7bd2dc53fea7d5d4a0e6943322bf7d27b82 | [
"MIT"
] | null | null | null | instana/__version__.py | darnat/Instana | e085e7bd2dc53fea7d5d4a0e6943322bf7d27b82 | [
"MIT"
] | 1 | 2020-02-22T23:32:15.000Z | 2020-02-22T23:32:15.000Z | # -*- coding: utf-8 -*-
__title__ = 'instana'
__description__ = 'Instagram Private API'
__url__ = 'https://github.com/darnat/Instana'
__version__ = '0.1.8.26'
__build__ = 0x000001
__author__ = 'Alexis Darnat'
__author_email__ = 'alexis.darnat@gmail.com'
__license__ = 'MIT'
__copyright__ = 'Copyright 2017 Alexis Darnat... | 26.307692 | 46 | 0.719298 |
018381387a1f3bfb5342707fc170b07b1a807d7f | 15,987 | py | Python | wsynphot/base.py | jaladh-singhal/wsynphot | 052c357a5b6c9f350210db439d831bb4f64ef571 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2019-06-25T17:39:08.000Z | 2022-02-11T08:41:06.000Z | wsynphot/base.py | starkit/wsynphot | 052c357a5b6c9f350210db439d831bb4f64ef571 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 23 | 2019-02-26T22:31:56.000Z | 2022-01-04T21:27:28.000Z | wsynphot/base.py | starkit/wsynphot | 052c357a5b6c9f350210db439d831bb4f64ef571 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 9 | 2018-10-18T19:02:40.000Z | 2021-01-28T08:42:58.000Z | # defining the base filter curve classes
import os
from scipy import interpolate
from wsynphot.spectrum1d import SKSpectrum1D as Spectrum1D
import pandas as pd
from wsynphot.io.cache_filters import load_filter_index, load_transmission_data
from astropy import units as u, constants as const
from astropy import uti... | 34.380645 | 108 | 0.620066 |
b0c9ffb7c75d28333c4f244da3999db3be25c74f | 1,461 | py | Python | aliyun-python-sdk-ehpc/aliyunsdkehpc/request/v20180412/ListUsersRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | 1 | 2019-12-23T12:36:43.000Z | 2019-12-23T12:36:43.000Z | aliyun-python-sdk-ehpc/aliyunsdkehpc/request/v20180412/ListUsersRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-ehpc/aliyunsdkehpc/request/v20180412/ListUsersRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | 1 | 2021-02-23T11:27:54.000Z | 2021-02-23T11:27:54.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 34.785714 | 69 | 0.760438 |
cf48885a77f03ad6f4d37585177431421ba5230d | 650 | py | Python | examples/callback.py | mklemm2/grigori | 2a2631e01b078fca734231fe3b7979f2b724a2f4 | [
"MIT"
] | 3 | 2020-04-09T11:09:41.000Z | 2022-01-08T23:19:54.000Z | examples/callback.py | mklemm2/grigori | 2a2631e01b078fca734231fe3b7979f2b724a2f4 | [
"MIT"
] | null | null | null | examples/callback.py | mklemm2/grigori | 2a2631e01b078fca734231fe3b7979f2b724a2f4 | [
"MIT"
] | 1 | 2020-11-25T09:32:33.000Z | 2020-11-25T09:32:33.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from grigori import Change
from grigori import Watcher
def on_added(change: dict) -> None:
print("file '%s' was added" % change["file"])
def on_modified(change: dict) -> None:
print("file '%s' was modified" % change["file"])
def on_deleted(change: ... | 19.69697 | 76 | 0.678462 |
c7f0c8b96159fa402654b56db05575b8f8a08403 | 54,315 | bzl | Python | bazel/repository_locations.bzl | cmboling/envoy | 1b49ba4fc7969ad3d5bc246521124f3a686c2961 | [
"Apache-2.0"
] | null | null | null | bazel/repository_locations.bzl | cmboling/envoy | 1b49ba4fc7969ad3d5bc246521124f3a686c2961 | [
"Apache-2.0"
] | null | null | null | bazel/repository_locations.bzl | cmboling/envoy | 1b49ba4fc7969ad3d5bc246521124f3a686c2961 | [
"Apache-2.0"
] | null | null | null | # This should match the schema defined in external_deps.bzl.
REPOSITORY_LOCATIONS_SPEC = dict(
bazel_compdb = dict(
project_name = "bazel-compilation-database",
project_desc = "Clang JSON compilation database support for Bazel",
project_url = "https://github.com/grailbio/bazel-compilation-da... | 50.952158 | 185 | 0.651975 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.