hexsha stringlengths 40 40 | size int64 2 1.02M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 245 | max_stars_repo_name stringlengths 6 130 | 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 245 | max_issues_repo_name stringlengths 6 130 | 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 245 | max_forks_repo_name stringlengths 6 130 | 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 2 1.02M | avg_line_length float64 1 958k | max_line_length int64 1 987k | alphanum_fraction float64 0 1 | content_no_comment stringlengths 0 1.01M | is_comment_constant_removed bool 2
classes | is_sharp_comment_removed bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f775f720ab9f08dac1aa4bef66b6886f5be8bcbf | 1,354 | py | Python | tests/v2/test_client.py | alexpilotti/python-glanceclient | 3b6754a8cc8932cd9645d54acc8d02826993a546 | [
"Apache-2.0"
] | null | null | null | tests/v2/test_client.py | alexpilotti/python-glanceclient | 3b6754a8cc8932cd9645d54acc8d02826993a546 | [
"Apache-2.0"
] | null | null | null | tests/v2/test_client.py | alexpilotti/python-glanceclient | 3b6754a8cc8932cd9645d54acc8d02826993a546 | [
"Apache-2.0"
] | null | null | null | # Copyright 2013 OpenStack LLC.
# 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 b... | 33.85 | 78 | 0.703102 |
import testtools
from glanceclient.v2 import client
class ClientTest(testtools.TestCase):
def setUp(self):
super(ClientTest, self).setUp()
def tearDown(self):
super(ClientTest, self).tearDown()
def test_endpoint(self):
gc = client.Client("http://example.com")
self.asse... | true | true |
f775f74a2b1e6a12126960961b8f9fce5842c72a | 12,986 | py | Python | pettingzoo/mpe/scenarios/simple_world_comm.py | jackyoung96/PettingZoo | 7ebcd1ddf9124b6857048af930d677974ab201a6 | [
"Apache-2.0"
] | null | null | null | pettingzoo/mpe/scenarios/simple_world_comm.py | jackyoung96/PettingZoo | 7ebcd1ddf9124b6857048af930d677974ab201a6 | [
"Apache-2.0"
] | null | null | null | pettingzoo/mpe/scenarios/simple_world_comm.py | jackyoung96/PettingZoo | 7ebcd1ddf9124b6857048af930d677974ab201a6 | [
"Apache-2.0"
] | null | null | null | import numpy as np
from .._mpe_utils.core import Agent, Landmark, World
from .._mpe_utils.scenario import BaseScenario
class Scenario(BaseScenario):
def make_world(
self,
num_good_agents=2,
num_adversaries=4,
num_landmarks=1,
num_food=2,
num_forests=2,
):
... | 36.37535 | 82 | 0.533113 | import numpy as np
from .._mpe_utils.core import Agent, Landmark, World
from .._mpe_utils.scenario import BaseScenario
class Scenario(BaseScenario):
def make_world(
self,
num_good_agents=2,
num_adversaries=4,
num_landmarks=1,
num_food=2,
num_forests=2,
):
... | true | true |
f775f9e7e13b8fbade9898fddd83ed76feeae9ed | 276 | py | Python | hsstock/vnpy/trader/app/riskManager/__init__.py | hsstock/hsstock | f8841331022e8844537a5c5b08d047e2cc328856 | [
"Apache-2.0"
] | 2 | 2018-10-04T08:04:24.000Z | 2021-01-21T06:58:30.000Z | hsstock/vnpy/trader/app/riskManager/__init__.py | hsstock/hsstock | f8841331022e8844537a5c5b08d047e2cc328856 | [
"Apache-2.0"
] | null | null | null | hsstock/vnpy/trader/app/riskManager/__init__.py | hsstock/hsstock | f8841331022e8844537a5c5b08d047e2cc328856 | [
"Apache-2.0"
] | 1 | 2018-10-20T09:39:50.000Z | 2018-10-20T09:39:50.000Z | # encoding: UTF-8
from hsstock.vnpy.trader.app.riskManager.rmEngine import RmEngine
from hsstock.vnpy.trader.app.riskManager.uiRmWidget import RmEngineManager
appName = 'RiskManager'
appDisplayName = u'风险管理'
appEngine = RmEngine
appWidget = RmEngineManager
appIco = 'rm.ico' | 27.6 | 74 | 0.811594 |
from hsstock.vnpy.trader.app.riskManager.rmEngine import RmEngine
from hsstock.vnpy.trader.app.riskManager.uiRmWidget import RmEngineManager
appName = 'RiskManager'
appDisplayName = u'风险管理'
appEngine = RmEngine
appWidget = RmEngineManager
appIco = 'rm.ico' | true | true |
f775fb70299dacec7e6e30cbfd51f26bd0789fa3 | 5,100 | py | Python | lnbits/extensions/withdraw/views.py | CandleHater/lnbits | c3b792ebeb45c16b4ae4e52efeb6bfb58519bdd9 | [
"MIT"
] | null | null | null | lnbits/extensions/withdraw/views.py | CandleHater/lnbits | c3b792ebeb45c16b4ae4e52efeb6bfb58519bdd9 | [
"MIT"
] | null | null | null | lnbits/extensions/withdraw/views.py | CandleHater/lnbits | c3b792ebeb45c16b4ae4e52efeb6bfb58519bdd9 | [
"MIT"
] | null | null | null | import uuid
from flask import jsonify, render_template, request, redirect, url_for
from lnurl import encode as lnurl_encode
from datetime import datetime
from lnbits.db import open_db, open_ext_db
from lnbits.extensions.withdraw import withdraw_ext
@withdraw_ext.route("/")
def index():
"""Main withdraw link pag... | 31.481481 | 113 | 0.56902 | import uuid
from flask import jsonify, render_template, request, redirect, url_for
from lnurl import encode as lnurl_encode
from datetime import datetime
from lnbits.db import open_db, open_ext_db
from lnbits.extensions.withdraw import withdraw_ext
@withdraw_ext.route("/")
def index():
usr = request.args.get("... | true | true |
f775fbd929c03a3cd8c7351b50e6940284ff247e | 2,369 | py | Python | python/snippets/stt_streaming_recognize_vad_customization.py | dchebakov/voicekit-examples | bb77eddafcb50d409fb8e6a1c80331d92dbc2be9 | [
"Apache-2.0"
] | 24 | 2019-11-01T22:31:32.000Z | 2021-10-08T10:30:36.000Z | python/snippets/stt_streaming_recognize_vad_customization.py | dchebakov/voicekit-examples | bb77eddafcb50d409fb8e6a1c80331d92dbc2be9 | [
"Apache-2.0"
] | 19 | 2019-10-23T21:24:33.000Z | 2021-12-08T21:06:06.000Z | python/snippets/stt_streaming_recognize_vad_customization.py | dchebakov/voicekit-examples | bb77eddafcb50d409fb8e6a1c80331d92dbc2be9 | [
"Apache-2.0"
] | 24 | 2019-12-03T09:48:53.000Z | 2021-12-10T10:50:15.000Z | #!/usr/bin/env python3
import sys
sys.path.append("..")
from tinkoff.cloud.stt.v1 import stt_pb2_grpc, stt_pb2
from auth import authorization_metadata
import grpc
import os
import wave
endpoint = os.environ.get("VOICEKIT_ENDPOINT") or "api.tinkoff.ai:443"
api_key = os.environ["VOICEKIT_API_KEY"]
secret_key = os.envi... | 43.87037 | 99 | 0.73111 |
import sys
sys.path.append("..")
from tinkoff.cloud.stt.v1 import stt_pb2_grpc, stt_pb2
from auth import authorization_metadata
import grpc
import os
import wave
endpoint = os.environ.get("VOICEKIT_ENDPOINT") or "api.tinkoff.ai:443"
api_key = os.environ["VOICEKIT_API_KEY"]
secret_key = os.environ["VOICEKIT_SECRET_KE... | true | true |
f775fcadf1a29278f457a9f24c9ca728427a4ccb | 9,879 | py | Python | app/tests/v2/test_auth.py | d-kahara/store_manager_api | b2a1df2318c3e7ffb7d89bfc03ef0381379e1556 | [
"MIT"
] | 1 | 2019-07-02T12:22:34.000Z | 2019-07-02T12:22:34.000Z | app/tests/v2/test_auth.py | d-kahara/store_manager_api | b2a1df2318c3e7ffb7d89bfc03ef0381379e1556 | [
"MIT"
] | 2 | 2018-10-24T09:14:42.000Z | 2018-11-02T08:08:40.000Z | app/tests/v2/test_auth.py | d-kahara/store_manager_api | b2a1df2318c3e7ffb7d89bfc03ef0381379e1556 | [
"MIT"
] | 2 | 2018-10-21T13:09:46.000Z | 2018-10-27T11:44:14.000Z | import unittest
import json
from app.tests.v2.base_test import BaseTestCase
#Registration endpoint
reg_endpoint = "api/v2/auth/register"
#Login endpoint
login_endpoint = "api/v2/auth/login"
#Logout endpoint
logout_endpoint = "api/v2/auth/logout"
class TestAuthBlueprint(BaseTestCase):
data = {
"email":... | 42.952174 | 109 | 0.549853 | import unittest
import json
from app.tests.v2.base_test import BaseTestCase
reg_endpoint = "api/v2/auth/register"
login_endpoint = "api/v2/auth/login"
logout_endpoint = "api/v2/auth/logout"
class TestAuthBlueprint(BaseTestCase):
data = {
"email": "hash@mail.com",
"password": "password123",
... | true | true |
f775fd0791babaaaed2e73323f106c189bd59b84 | 1,574 | py | Python | venv/Lib/site-packages/pygments/lexers/asc.py | ajayiagbebaku/NFL-Model | afcc67a85ca7138c58c3334d45988ada2da158ed | [
"MIT"
] | 6,989 | 2017-07-18T06:23:18.000Z | 2022-03-31T15:58:36.000Z | venv/Lib/site-packages/pygments/lexers/asc.py | ajayiagbebaku/NFL-Model | afcc67a85ca7138c58c3334d45988ada2da158ed | [
"MIT"
] | 1,978 | 2017-07-18T09:17:58.000Z | 2022-03-31T14:28:43.000Z | venv/Lib/site-packages/pygments/lexers/asc.py | ajayiagbebaku/NFL-Model | afcc67a85ca7138c58c3334d45988ada2da158ed | [
"MIT"
] | 1,228 | 2017-07-18T09:03:13.000Z | 2022-03-29T05:57:40.000Z | """
pygments.lexers.asc
~~~~~~~~~~~~~~~~~~~
Lexer for various ASCII armored files.
:copyright: Copyright 2021 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import RegexLexer, bygroups
from pygments.token import Comment, Generic, Name,... | 30.269231 | 105 | 0.533037 | import re
from pygments.lexer import RegexLexer, bygroups
from pygments.token import Comment, Generic, Name, Operator, String, Whitespace
__all__ = ['AscLexer']
class AscLexer(RegexLexer):
name = 'ASCII armored'
aliases = ['asc', 'pem']
filenames = [
'*.asc', '*.pem', 'id_dsa',... | true | true |
f775fda69bf62f4a332f903cfaf6c2c627b7c920 | 5,683 | py | Python | src/game_simulation/players.py | nicohrubec/blackjack_simulator | b934a61f29ceae1bd37238963dfc83888bcdb5bd | [
"MIT"
] | null | null | null | src/game_simulation/players.py | nicohrubec/blackjack_simulator | b934a61f29ceae1bd37238963dfc83888bcdb5bd | [
"MIT"
] | null | null | null | src/game_simulation/players.py | nicohrubec/blackjack_simulator | b934a61f29ceae1bd37238963dfc83888bcdb5bd | [
"MIT"
] | null | null | null | from src import configs
import pandas as pd
import numpy as np
# creates player instances from predefined options
def player_factory(player_type, capital):
if player_type == 'basic':
return BasicPlayer(init_capital=capital)
elif player_type == 'strategic':
return StrategicPlayer(init_capital=c... | 36.429487 | 118 | 0.638219 | from src import configs
import pandas as pd
import numpy as np
def player_factory(player_type, capital):
if player_type == 'basic':
return BasicPlayer(init_capital=capital)
elif player_type == 'strategic':
return StrategicPlayer(init_capital=capital, file_name='thorp_strategy.xlsx')
elif p... | true | true |
f775fe0baebe47eebfd1f9bcd0eea7c76623abd9 | 6,049 | py | Python | youtube_dl/extractor/filmon.py | hackarada/youtube-dl | 2ba46715a41fe074eab2221170b2ac78fab93fad | [
"Unlicense"
] | 66,635 | 2019-03-10T21:34:18.000Z | 2022-03-31T23:50:31.000Z | youtube_dl/extractor/filmon.py | hackarada/youtube-dl | 2ba46715a41fe074eab2221170b2ac78fab93fad | [
"Unlicense"
] | 10,936 | 2019-03-10T21:35:47.000Z | 2022-03-31T23:46:52.000Z | youtube_dl/extractor/filmon.py | hackarada/youtube-dl | 2ba46715a41fe074eab2221170b2ac78fab93fad | [
"Unlicense"
] | 15,194 | 2019-03-10T21:09:27.000Z | 2022-03-31T22:13:49.000Z | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..compat import (
compat_str,
compat_HTTPError,
)
from ..utils import (
qualities,
strip_or_none,
int_or_none,
ExtractorError,
)
class FilmOnIE(InfoExtractor):
IE_NAME = 'filmon'
_VALID_URL ... | 33.793296 | 110 | 0.524054 | from __future__ import unicode_literals
from .common import InfoExtractor
from ..compat import (
compat_str,
compat_HTTPError,
)
from ..utils import (
qualities,
strip_or_none,
int_or_none,
ExtractorError,
)
class FilmOnIE(InfoExtractor):
IE_NAME = 'filmon'
_VALID_URL = r'(?:https?://... | true | true |
f775fe6498d529ab921c9b995581f77e2de43881 | 267 | py | Python | iati/home/migrations/0006_merge_20190319_1153.py | andylolz/IATI-Standard-Website | b781b9fe6b6430f93826e530e9560183bf8fd310 | [
"MIT"
] | 4 | 2019-03-28T06:42:17.000Z | 2021-06-06T13:10:51.000Z | iati/home/migrations/0006_merge_20190319_1153.py | andylolz/IATI-Standard-Website | b781b9fe6b6430f93826e530e9560183bf8fd310 | [
"MIT"
] | 177 | 2018-09-28T14:21:56.000Z | 2022-03-30T21:45:26.000Z | iati/home/migrations/0006_merge_20190319_1153.py | andylolz/IATI-Standard-Website | b781b9fe6b6430f93826e530e9560183bf8fd310 | [
"MIT"
] | 8 | 2018-10-25T20:43:10.000Z | 2022-03-17T14:19:27.000Z | # Generated by Django 2.0.8 on 2019-03-19 11:53
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('home', '0005_auto_20190311_0832'),
('home', '0005_auto_20190315_0947'),
]
operations = [
]
| 17.8 | 47 | 0.640449 |
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('home', '0005_auto_20190311_0832'),
('home', '0005_auto_20190315_0947'),
]
operations = [
]
| true | true |
f775feb0aa349421119bfa531c5865495c2fba10 | 2,557 | py | Python | handler/logHandler.py | zspishere/proxy_pool | 29c5fafe8fe22c4a694945a3266b1ef139c693b7 | [
"MIT"
] | 1 | 2020-07-09T00:03:38.000Z | 2020-07-09T00:03:38.000Z | handler/logHandler.py | zspishere/proxy_pool | 29c5fafe8fe22c4a694945a3266b1ef139c693b7 | [
"MIT"
] | null | null | null | handler/logHandler.py | zspishere/proxy_pool | 29c5fafe8fe22c4a694945a3266b1ef139c693b7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
-------------------------------------------------
File Name: LogHandler.py
Description : 日志操作模块
Author : JHao
date: 2017/3/6
-------------------------------------------------
Change Activity:
2017/3/6: log handler
2017/... | 27.494624 | 108 | 0.581932 | __author__ = 'JHao'
import os
import logging
from logging.handlers import TimedRotatingFileHandler
CRITICAL = 50
FATAL = CRITICAL
ERROR = 40
WARNING = 30
WARN = WARNING
INFO = 20
DEBUG = 10
NOTSET = 0
CURRENT_PATH = os.path.dirname(os.path.abspath(__file__))
ROOT_PATH = os.path.join(CURRENT_PATH, os.pardir)
LOG_PA... | true | true |
f775ff56bb2a723c047052a88aa0849454c22702 | 26,207 | py | Python | nemo/core/optim/lr_scheduler.py | PatrykNeubauer/NeMo | 3ada744b884dba5f233f22c6991fc6092c6ca8d0 | [
"Apache-2.0"
] | 2 | 2021-09-21T07:36:20.000Z | 2022-02-05T15:29:04.000Z | nemo/core/optim/lr_scheduler.py | PatrykNeubauer/NeMo | 3ada744b884dba5f233f22c6991fc6092c6ca8d0 | [
"Apache-2.0"
] | null | null | null | nemo/core/optim/lr_scheduler.py | PatrykNeubauer/NeMo | 3ada744b884dba5f233f22c6991fc6092c6ca8d0 | [
"Apache-2.0"
] | 12 | 2021-06-20T08:56:10.000Z | 2022-03-16T19:07:10.000Z | # Copyright (c) 2020, NVIDIA CORPORATION. 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... | 38.147016 | 119 | 0.659518 |
import copy
import dataclasses
import math
import warnings
from functools import partial
from typing import Any, Dict, Optional, Union
import hydra
import torch.optim as optim
import torch.optim.lr_scheduler as pt_scheduler
import torch.utils.data.dataloader as dataloader
from omegaconf import DictConfig, OmegaConf
f... | true | true |
f77600276f8f134fd71bd31f8a4b16baf3094828 | 1,823 | py | Python | 1197/slu.py | matrixjoeq/timus_solutions | 8f5f33099bd51f5a40e342a18600b988f4ea31db | [
"MIT"
] | null | null | null | 1197/slu.py | matrixjoeq/timus_solutions | 8f5f33099bd51f5a40e342a18600b988f4ea31db | [
"MIT"
] | null | null | null | 1197/slu.py | matrixjoeq/timus_solutions | 8f5f33099bd51f5a40e342a18600b988f4ea31db | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
'''
1197. Lonesome Knight
Time limit: 1.0 second
Memory limit: 64 MB
[Description]
The statement of this problem is very simple: you are to determine how many
squares of the chessboard can be attacked by a knight standing alone on the
board. Recall that a knight moves two squ... | 31.982456 | 78 | 0.548546 |
'''
1197. Lonesome Knight
Time limit: 1.0 second
Memory limit: 64 MB
[Description]
The statement of this problem is very simple: you are to determine how many
squares of the chessboard can be attacked by a knight standing alone on the
board. Recall that a knight moves two squares forward (horizontally or
vertically i... | false | true |
f77600b11ac1874f45ac4637e17a150310ccd30d | 847 | py | Python | src/main.py | hupiat/rocket-game-ml | 35827076d3158c83ca4c1f066a91f612da0a4edc | [
"MIT"
] | null | null | null | src/main.py | hupiat/rocket-game-ml | 35827076d3158c83ca4c1f066a91f612da0a4edc | [
"MIT"
] | null | null | null | src/main.py | hupiat/rocket-game-ml | 35827076d3158c83ca4c1f066a91f612da0a4edc | [
"MIT"
] | null | null | null | from genetic import Genetic
genetic = Genetic()
genetic.generation_gen()
def normalize(datas, max_height, max_width):
def compute(val, max, min): return (val - min) / max - min
for data in datas:
data.rocket_top = compute(data.rocket_top, max_height, 0)
data.wall_left = compute(data.wall_lef... | 28.233333 | 65 | 0.68477 | from genetic import Genetic
genetic = Genetic()
genetic.generation_gen()
def normalize(datas, max_height, max_width):
def compute(val, max, min): return (val - min) / max - min
for data in datas:
data.rocket_top = compute(data.rocket_top, max_height, 0)
data.wall_left = compute(data.wall_lef... | true | true |
f7760142527e2fa344dd48f2fd1921db706cb377 | 9,448 | py | Python | pf_test_3d.py | MikeFlanigan/DMU_project | 6ae5f658f25f2bd10e20a94f0ccc9a6dd669bac9 | [
"MIT"
] | null | null | null | pf_test_3d.py | MikeFlanigan/DMU_project | 6ae5f658f25f2bd10e20a94f0ccc9a6dd669bac9 | [
"MIT"
] | null | null | null | pf_test_3d.py | MikeFlanigan/DMU_project | 6ae5f658f25f2bd10e20a94f0ccc9a6dd669bac9 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
from matplotlib.patches import Wedge
import mpl_toolkits.mplot3d as a3
import matplotlib.colors as colors
import pylab as pl
import scipy as sp
import math
rigx = 0.5
rigy = 0.5
rigz = 0.0
cent = (rigx, rigy, rigz)
radius = 0.5
cam_info = {"FOV pan": 0, # degrees
... | 31.284768 | 91 | 0.57917 | import numpy as np
import matplotlib.pyplot as plt
from matplotlib.patches import Wedge
import mpl_toolkits.mplot3d as a3
import matplotlib.colors as colors
import pylab as pl
import scipy as sp
import math
rigx = 0.5
rigy = 0.5
rigz = 0.0
cent = (rigx, rigy, rigz)
radius = 0.5
cam_info = {"FOV pan": 0, ... | true | true |
f77601b9da63c200750e8650d206a5402a8a0887 | 4,073 | py | Python | unit-tests/func/test-set-option.py | NobuoTsukamoto/librealsense | bc0910f8ba3c33307ff247a29dd2b9e9ef1b269d | [
"Apache-2.0"
] | 5 | 2021-09-23T13:31:32.000Z | 2021-09-28T05:41:09.000Z | unit-tests/func/test-set-option.py | NobuoTsukamoto/librealsense | bc0910f8ba3c33307ff247a29dd2b9e9ef1b269d | [
"Apache-2.0"
] | null | null | null | unit-tests/func/test-set-option.py | NobuoTsukamoto/librealsense | bc0910f8ba3c33307ff247a29dd2b9e9ef1b269d | [
"Apache-2.0"
] | null | null | null | # License: Apache 2.0. See LICENSE file in root directory.
# Copyright(c) 2020 Intel Corporation. All Rights Reserved.
import platform
import pyrealsense2 as rs
from rspy import test
import time
dev = test.find_first_device_or_exit()
depth_sensor = dev.first_depth_sensor()
color_sensor = dev.first_color_sensor()
pre... | 33.385246 | 93 | 0.664621 |
import platform
import pyrealsense2 as rs
from rspy import test
import time
dev = test.find_first_device_or_exit()
depth_sensor = dev.first_depth_sensor()
color_sensor = dev.first_color_sensor()
previous_depth_frame_number = -1
previous_color_frame_number = -1
after_set_option = 0
def get_allowed_drops():
glo... | true | true |
f77601e466d9e022f3190266fa6c569a61b9264a | 4,269 | py | Python | deploy/build_and_test.py | ZaneYaoZhixin/branch1 | a821265b971e11ce474d7078dc9e86367b31423c | [
"MIT"
] | null | null | null | deploy/build_and_test.py | ZaneYaoZhixin/branch1 | a821265b971e11ce474d7078dc9e86367b31423c | [
"MIT"
] | null | null | null | deploy/build_and_test.py | ZaneYaoZhixin/branch1 | a821265b971e11ce474d7078dc9e86367b31423c | [
"MIT"
] | 1 | 2019-11-13T06:08:45.000Z | 2019-11-13T06:08:45.000Z | #!/usr/bin/env python2
import os
import subprocess
# Custom modules
from helpers import formatted_text
def execute_command(cmd, stdout=None, stderr=None):
# To wait on the standard output or the error output,
# set either 'stdout' or 'stderr' to a value of 'subprocess.PIPE'
print "Executing command: {0}... | 50.223529 | 198 | 0.700398 |
import os
import subprocess
from helpers import formatted_text
def execute_command(cmd, stdout=None, stderr=None):
print "Executing command: {0}".format(cmd)
p = subprocess.Popen(cmd, stdout=stdout, stderr=stderr, shell=True)
stdout, stderr = p.communicate()
if stdout:
print stdout
... | false | true |
f776031557400184c49a18807c275cd5a303352d | 2,915 | py | Python | compress.py | Euro2xx/generative-compression | 489f4fb77620e9b6d8f3bef691d32d50f6bb09be | [
"MIT"
] | null | null | null | compress.py | Euro2xx/generative-compression | 489f4fb77620e9b6d8f3bef691d32d50f6bb09be | [
"MIT"
] | null | null | null | compress.py | Euro2xx/generative-compression | 489f4fb77620e9b6d8f3bef691d32d50f6bb09be | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import tensorflow as tf
import numpy as np
import pandas as pd
import time, os, sys
import argparse
# User-defined
from network import Network
from utils import Utils
from data import Data
from model import Model
from config import config_test, directories
tf.logging.set_verbosity(tf.logging.ERROR)... | 39.391892 | 193 | 0.690223 | import tensorflow as tf
import numpy as np
import pandas as pd
import time, os, sys
import argparse
from network import Network
from utils import Utils
from data import Data
from model import Model
from config import config_test, directories
tf.logging.set_verbosity(tf.logging.ERROR)
def single_compress(config, args... | true | true |
f776037e8e56ab02ba28879a37bfb25508499bfd | 2,925 | py | Python | FADA/datasets/generate_synthia_label_info.py | onuriel/PermutedAdaIN | 819cdb9ef4a42655934e5340c1479700be9cd6f3 | [
"MIT"
] | 27 | 2020-12-06T13:25:16.000Z | 2022-03-10T06:23:21.000Z | FADA/datasets/generate_synthia_label_info.py | onuriel/PermutedAdaIN | 819cdb9ef4a42655934e5340c1479700be9cd6f3 | [
"MIT"
] | 3 | 2021-03-24T10:57:02.000Z | 2021-07-30T12:45:21.000Z | FADA/datasets/generate_synthia_label_info.py | onuriel/PermutedAdaIN | 819cdb9ef4a42655934e5340c1479700be9cd6f3 | [
"MIT"
] | 1 | 2022-01-25T23:55:25.000Z | 2022-01-25T23:55:25.000Z | import argparse
import os
import numpy as np
import pickle
from PIL import Image
from tqdm import tqdm
import imageio
from multiprocessing import Pool
parser = argparse.ArgumentParser(description="Generate label stat info")
parser.add_argument("-d",
"--datadir",
default="",
help="path to load ... | 27.59434 | 96 | 0.577778 | import argparse
import os
import numpy as np
import pickle
from PIL import Image
from tqdm import tqdm
import imageio
from multiprocessing import Pool
parser = argparse.ArgumentParser(description="Generate label stat info")
parser.add_argument("-d",
"--datadir",
default="",
help="path to load ... | true | true |
f776044b07ef5a0927b6e23a399de1854ed86528 | 15,407 | py | Python | src/sample.py | slimgroup/Software.siahkoohi2020EAGEdlb | f5c6f8d49f350484b033ab2533eac4acea8be16a | [
"MIT"
] | 5 | 2020-09-08T11:24:07.000Z | 2021-09-28T13:34:35.000Z | src/sample.py | vkazei/seismic-imaging-with-SGLD | 5d20f6891ca8a17fa1695ed629c3a589ab8416bd | [
"MIT"
] | null | null | null | src/sample.py | vkazei/seismic-imaging-with-SGLD | 5d20f6891ca8a17fa1695ed629c3a589ab8416bd | [
"MIT"
] | 2 | 2020-01-29T13:54:35.000Z | 2020-02-04T04:28:42.000Z | import torch
import numpy as np
import time
import matplotlib.pyplot as plt
import os
import h5py
from load_vel import overthrust_model
from generator import generator
from tqdm import tqdm
from scipy.interpolate import interp1d
import matplotlib.ticker as ticker
sfmt=ticker.ScalarFormatter(useMathText=True)
sfmt.set_... | 52.050676 | 148 | 0.563445 | import torch
import numpy as np
import time
import matplotlib.pyplot as plt
import os
import h5py
from load_vel import overthrust_model
from generator import generator
from tqdm import tqdm
from scipy.interpolate import interp1d
import matplotlib.ticker as ticker
sfmt=ticker.ScalarFormatter(useMathText=True)
sfmt.set_... | true | true |
f77604926d2473fd756b7c05c32e63995ed2dd3c | 255 | py | Python | artist.py | pauldardeau/cloud-jukebox | 3e82e3e9ab9bf5bbdab6bdf65e158638456e05cc | [
"BSD-3-Clause"
] | 1 | 2016-11-01T16:01:43.000Z | 2016-11-01T16:01:43.000Z | artist.py | pauldardeau/cloud-jukebox | 3e82e3e9ab9bf5bbdab6bdf65e158638456e05cc | [
"BSD-3-Clause"
] | 24 | 2015-11-26T03:37:24.000Z | 2022-01-12T12:27:21.000Z | artist.py | pauldardeau/cloud-jukebox | 3e82e3e9ab9bf5bbdab6bdf65e158638456e05cc | [
"BSD-3-Clause"
] | null | null | null | class Artist(object):
def __init__(self, artist_uid: str, artist_name: str, artist_description: str = ""):
self.artist_uid: str = artist_uid
self.artist_name: str = artist_name
self.artist_description: str = artist_description
| 42.5 | 88 | 0.701961 | class Artist(object):
def __init__(self, artist_uid: str, artist_name: str, artist_description: str = ""):
self.artist_uid: str = artist_uid
self.artist_name: str = artist_name
self.artist_description: str = artist_description
| true | true |
f77605064a9acc0b3838ad9ca4e7b6669bef4ae0 | 1,214 | py | Python | package.py | OSS-Pipeline/rez-gcc | 8320d7337f9cb0b46fadbef8a5ac137e946b7715 | [
"MIT"
] | null | null | null | package.py | OSS-Pipeline/rez-gcc | 8320d7337f9cb0b46fadbef8a5ac137e946b7715 | [
"MIT"
] | null | null | null | package.py | OSS-Pipeline/rez-gcc | 8320d7337f9cb0b46fadbef8a5ac137e946b7715 | [
"MIT"
] | null | null | null |
# Based and improved from https://github.com/piratecrew/rez-gcc
name = "gcc"
version = "6.3.1"
authors = [
"GNU"
]
description = \
"""
The GNU Compiler Collection (GCC) is a compiler system produced by the GNU Project
supporting various programming languages.
GCC is a key component of the GNU t... | 22.90566 | 98 | 0.646623 |
name = "gcc"
version = "6.3.1"
authors = [
"GNU"
]
description = \
"""
The GNU Compiler Collection (GCC) is a compiler system produced by the GNU Project
supporting various programming languages.
GCC is a key component of the GNU toolchain and the standard compiler for most projects
related... | true | true |
f776053c0800a3be3124a9922f7f9371b6ae3deb | 6,790 | py | Python | python_modules/dagster-graphql/dagster_graphql_tests/graphql/snapshots/snap_test_execute_pipeline.py | bambielli-flex/dagster | 30b75ba7c62fc536bc827f177c1dc6ba20f5ae20 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster-graphql/dagster_graphql_tests/graphql/snapshots/snap_test_execute_pipeline.py | bambielli-flex/dagster | 30b75ba7c62fc536bc827f177c1dc6ba20f5ae20 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster-graphql/dagster_graphql_tests/graphql/snapshots/snap_test_execute_pipeline.py | bambielli-flex/dagster | 30b75ba7c62fc536bc827f177c1dc6ba20f5ae20 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# snapshottest: v1 - https://goo.gl/zC4yUc
from __future__ import unicode_literals
from snapshottest import Snapshot
snapshots = Snapshot()
snapshots['test_successful_pipeline_reexecution 1'] = {
'startPipelineExecution': {
'__typename': 'StartPipelineExecutionSuccess',
'... | 34.820513 | 66 | 0.288071 | from __future__ import unicode_literals
from snapshottest import Snapshot
snapshots = Snapshot()
snapshots['test_successful_pipeline_reexecution 1'] = {
'startPipelineExecution': {
'__typename': 'StartPipelineExecutionSuccess',
'run': {
'logs': {
'nodes': [
... | true | true |
f776057209f17cf98662fa02cbe1c51ee4097ee3 | 1,725 | py | Python | Wikipedia-Summary-GUI/summary.py | avinashkranjan/PraticalPythonProjects | 12c1f7cedae57a843ceb6aba68cca48df505f341 | [
"MIT"
] | 930 | 2020-09-05T22:07:28.000Z | 2022-03-30T07:56:18.000Z | Wikipedia-Summary-GUI/summary.py | maheshdbabar9340/Amazing-Python-Scripts | e2272048cbe49b4bda5072bbdd8479739bb6c18d | [
"MIT"
] | 893 | 2020-09-04T07:57:24.000Z | 2022-02-08T02:12:26.000Z | Wikipedia-Summary-GUI/summary.py | maheshdbabar9340/Amazing-Python-Scripts | e2272048cbe49b4bda5072bbdd8479739bb6c18d | [
"MIT"
] | 497 | 2020-09-05T08:16:24.000Z | 2022-03-31T00:55:57.000Z | from tkinter import Tk, Frame, Toplevel, Entry, Button, Text, Scrollbar, END, INSERT
from tkinter.messagebox import showerror
from mediawiki import MediaWiki
wikipedia = MediaWiki()
# Function to get summary using wikipedia module and display it
def get_summary():
try:
# clear text area
answer.de... | 30.803571 | 84 | 0.703768 | from tkinter import Tk, Frame, Toplevel, Entry, Button, Text, Scrollbar, END, INSERT
from tkinter.messagebox import showerror
from mediawiki import MediaWiki
wikipedia = MediaWiki()
def get_summary():
try:
answer.delete(1.0, END)
topic = keyword_entry.get()
p = wikipedia.p... | true | true |
f776066e1212e5d121fe299aab7953a512c58271 | 6,805 | py | Python | ROAR/agent_module/legacy_agents/point_cloud_map_recording_agent.py | shizizhou/ROAR | f143605d84f30f071e24e8224014c0358e260c42 | [
"Apache-2.0"
] | null | null | null | ROAR/agent_module/legacy_agents/point_cloud_map_recording_agent.py | shizizhou/ROAR | f143605d84f30f071e24e8224014c0358e260c42 | [
"Apache-2.0"
] | null | null | null | ROAR/agent_module/legacy_agents/point_cloud_map_recording_agent.py | shizizhou/ROAR | f143605d84f30f071e24e8224014c0358e260c42 | [
"Apache-2.0"
] | null | null | null | from ROAR.agent_module.agent import Agent
from ROAR.utilities_module.data_structures_models import SensorsData
from ROAR.utilities_module.vehicle_models import Vehicle, VehicleControl
from ROAR.perception_module.legacy.ground_plane_point_cloud_detector import GroundPlanePointCloudDetector
from ROAR.visualization_mo... | 50.783582 | 128 | 0.638942 | from ROAR.agent_module.agent import Agent
from ROAR.utilities_module.data_structures_models import SensorsData
from ROAR.utilities_module.vehicle_models import Vehicle, VehicleControl
from ROAR.perception_module.legacy.ground_plane_point_cloud_detector import GroundPlanePointCloudDetector
from ROAR.visualization_mo... | true | true |
f776071ce6118eed082abe1e8fa25e5164bd771b | 1,580 | py | Python | examples/legacy_examples/dagster_examples/simple_pyspark/solids.py | bitdotioinc/dagster | 4fe395a37b206b1a48b956fa5dd72bf698104cca | [
"Apache-2.0"
] | 1 | 2021-04-27T19:49:59.000Z | 2021-04-27T19:49:59.000Z | examples/legacy_examples/dagster_examples/simple_pyspark/solids.py | bitdotioinc/dagster | 4fe395a37b206b1a48b956fa5dd72bf698104cca | [
"Apache-2.0"
] | 7 | 2022-03-16T06:55:04.000Z | 2022-03-18T07:03:25.000Z | examples/legacy_examples/dagster_examples/simple_pyspark/solids.py | bitdotioinc/dagster | 4fe395a37b206b1a48b956fa5dd72bf698104cca | [
"Apache-2.0"
] | null | null | null | """Solid definitions for the simple_pyspark example."""
import dagster_pyspark
from pyspark.sql import DataFrame, Window
from pyspark.sql import functions as f
from dagster import make_python_type_usable_as_dagster_type, solid
# Make pyspark.sql.DataFrame map to dagster_pyspark.DataFrame
make_python_type_usable_as_d... | 36.744186 | 90 | 0.744937 |
import dagster_pyspark
from pyspark.sql import DataFrame, Window
from pyspark.sql import functions as f
from dagster import make_python_type_usable_as_dagster_type, solid
make_python_type_usable_as_dagster_type(
python_type=DataFrame, dagster_type=dagster_pyspark.DataFrame
)
@solid(required_resource_keys={"pys... | true | true |
f77607cd303a187b32feb181a7b191ba6b58e53e | 58 | py | Python | basic/package/__init__.py | onezens/python | 73cdc22901a006751338d0145b6e120e55fdf80f | [
"MIT"
] | null | null | null | basic/package/__init__.py | onezens/python | 73cdc22901a006751338d0145b6e120e55fdf80f | [
"MIT"
] | null | null | null | basic/package/__init__.py | onezens/python | 73cdc22901a006751338d0145b6e120e55fdf80f | [
"MIT"
] | null | null | null | #encoding=utf8
#包里面可以调用的模块,默认是调用所有的模块
__all__=["m1","m2"] | 14.5 | 22 | 0.741379 |
__all__=["m1","m2"] | true | true |
f7760812c6c33bfeef215d91b3956aa697a79eaf | 597 | py | Python | inadimplentes/migrations/0006_delete_kitnet_inquilino_tamanho_do_kitnet.py | orafaelvinicius/controle_de_inadimplencia | 0f251c0e433c19c35e8a2a1d9e3a485558018f12 | [
"MIT"
] | null | null | null | inadimplentes/migrations/0006_delete_kitnet_inquilino_tamanho_do_kitnet.py | orafaelvinicius/controle_de_inadimplencia | 0f251c0e433c19c35e8a2a1d9e3a485558018f12 | [
"MIT"
] | null | null | null | inadimplentes/migrations/0006_delete_kitnet_inquilino_tamanho_do_kitnet.py | orafaelvinicius/controle_de_inadimplencia | 0f251c0e433c19c35e8a2a1d9e3a485558018f12 | [
"MIT"
] | null | null | null | # Generated by Django 4.0.3 on 2022-03-20 06:26
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('inadimplentes', '0005_alter_inquilino_ultimo_pagamento'),
]
operations = [
migrations.DeleteModel(
name='Kitnet',
),
... | 25.956522 | 123 | 0.586265 |
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('inadimplentes', '0005_alter_inquilino_ultimo_pagamento'),
]
operations = [
migrations.DeleteModel(
name='Kitnet',
),
migrations.AddField(
model_name... | true | true |
f77609287e8761eab39566681ec8e3a4df9ceba9 | 9,813 | py | Python | scripts/Legacy/deprecated/cnnva.py | rhong3/Neutrophil | 97efb7cc01dc7b1bb06e29a824352d493bb4add5 | [
"MIT"
] | 2 | 2019-01-04T17:04:12.000Z | 2020-02-26T15:18:08.000Z | scripts/Legacy/deprecated/cnnva.py | rhong3/Neutrophil | 97efb7cc01dc7b1bb06e29a824352d493bb4add5 | [
"MIT"
] | null | null | null | scripts/Legacy/deprecated/cnnva.py | rhong3/Neutrophil | 97efb7cc01dc7b1bb06e29a824352d493bb4add5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Aug 7 12:02:45 2017
@authors: lwk, RH
"""
from datetime import datetime
import os
import sys
import numpy as np
import tensorflow as tf
import vgg
slim = tf.contrib.slim
class INCEPTION():
"""
Use the InceptionV3 architecture
"""
... | 36.752809 | 137 | 0.525324 |
from datetime import datetime
import os
import sys
import numpy as np
import tensorflow as tf
import vgg
slim = tf.contrib.slim
class INCEPTION():
DEFAULTS = {
"batch_size": 128,
"dropout": 0.8,
"learning_rate": 1E-3
}
RESTORE_KEY = "cnn_to_restore"
def __init__(self, inp... | true | true |
f7760a2b09dbaeefc22e8ce54fa291d4dd869b2b | 16,019 | py | Python | src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_hcx_enterprise_sites_operations.py | haroonf/azure-cli-extensions | 61c044d34c224372f186934fa7c9313f1cd3a525 | [
"MIT"
] | 207 | 2017-11-29T06:59:41.000Z | 2022-03-31T10:00:53.000Z | src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_hcx_enterprise_sites_operations.py | haroonf/azure-cli-extensions | 61c044d34c224372f186934fa7c9313f1cd3a525 | [
"MIT"
] | 4,061 | 2017-10-27T23:19:56.000Z | 2022-03-31T23:18:30.000Z | src/vmware/azext_vmware/vendored_sdks/avs_client/operations/_hcx_enterprise_sites_operations.py | haroonf/azure-cli-extensions | 61c044d34c224372f186934fa7c9313f1cd3a525 | [
"MIT"
] | 802 | 2017-10-11T17:36:26.000Z | 2022-03-31T22:24:32.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 48.987768 | 225 | 0.671765 | from typing import TYPE_CHECKING
import warnings
from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.paging import ItemPaged
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import HttpR... | true | true |
f7760a59eed5964454a5ae49da71c13007627238 | 3,234 | py | Python | homeassistant/components/sky_hub/device_tracker.py | itewk/home-assistant | 769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4 | [
"Apache-2.0"
] | 23 | 2017-11-15T21:03:53.000Z | 2021-03-29T21:33:48.000Z | homeassistant/components/sky_hub/device_tracker.py | itewk/home-assistant | 769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4 | [
"Apache-2.0"
] | 6 | 2021-02-08T20:59:36.000Z | 2022-03-12T00:52:11.000Z | homeassistant/components/sky_hub/device_tracker.py | itewk/home-assistant | 769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4 | [
"Apache-2.0"
] | 10 | 2018-01-01T00:12:51.000Z | 2021-12-21T23:08:05.000Z | """Support for Sky Hub."""
import logging
import re
import requests
import voluptuous as vol
from homeassistant.components.device_tracker import (
DOMAIN,
PLATFORM_SCHEMA,
DeviceScanner,
)
from homeassistant.const import CONF_HOST
import homeassistant.helpers.config_validation as cv
_LOGGER = logging.get... | 28.121739 | 78 | 0.633271 | import logging
import re
import requests
import voluptuous as vol
from homeassistant.components.device_tracker import (
DOMAIN,
PLATFORM_SCHEMA,
DeviceScanner,
)
from homeassistant.const import CONF_HOST
import homeassistant.helpers.config_validation as cv
_LOGGER = logging.getLogger(__name__)
_MAC_REGEX... | true | true |
f7760acedb5268b5cfe0fc61f410bbc2efd19229 | 4,322 | py | Python | test/python/visualization/test_circuit_visualization_output.py | yeralin/qiskit-terra | 251930a7b5d83af121ea0f3aafb33a54a1860e14 | [
"Apache-2.0"
] | 1 | 2020-10-25T17:56:57.000Z | 2020-10-25T17:56:57.000Z | test/python/visualization/test_circuit_visualization_output.py | yeralin/qiskit-terra | 251930a7b5d83af121ea0f3aafb33a54a1860e14 | [
"Apache-2.0"
] | null | null | null | test/python/visualization/test_circuit_visualization_output.py | yeralin/qiskit-terra | 251930a7b5d83af121ea0f3aafb33a54a1860e14 | [
"Apache-2.0"
] | null | null | null | # This code is part of Qiskit.
#
# (C) Copyright IBM 2017.
#
# 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 derivative wo... | 37.582609 | 99 | 0.662888 |
import os
import unittest
from codecs import encode
from math import pi
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit.tools.visualization import HAS_MATPLOTLIB, circuit_drawer
from .visualization import QiskitVisualizationTestCase, path_to_diagram_reference
class TestCircuitVi... | true | true |
f7760c01ba694a11156824937f4b4cf95ac5f0f9 | 1,118 | py | Python | rest/messages/sms-conversation-tracking/sms-conversation-tracking.6.x.py | shaileshn/api-snippets | 08826972154634335378fed0edd2707d7f62b03b | [
"MIT"
] | 2 | 2017-11-23T11:31:20.000Z | 2018-01-22T04:14:02.000Z | rest/messages/sms-conversation-tracking/sms-conversation-tracking.6.x.py | berkus/twilio-api-snippets | beaa4e211044cb06daf9b73fb05ad6a7a948f879 | [
"MIT"
] | null | null | null | rest/messages/sms-conversation-tracking/sms-conversation-tracking.6.x.py | berkus/twilio-api-snippets | beaa4e211044cb06daf9b73fb05ad6a7a948f879 | [
"MIT"
] | 1 | 2019-10-02T14:36:36.000Z | 2019-10-02T14:36:36.000Z | from flask import Flask, request, session
from twilio.twiml.messaging_response import MessagingResponse
# The session object makes use of a secret key.
SECRET_KEY = 'a secret key'
app = Flask(__name__)
app.config.from_object(__name__)
# Try adding your own number to this list!
callers = {
"+14158675309": "Rey",
... | 24.304348 | 76 | 0.654741 | from flask import Flask, request, session
from twilio.twiml.messaging_response import MessagingResponse
SECRET_KEY = 'a secret key'
app = Flask(__name__)
app.config.from_object(__name__)
callers = {
"+14158675309": "Rey",
"+14158675310": "Finn",
"+14158675311": "Chewy",
}
@app.route("/", methods=['GET',... | true | true |
f7760c29add3e20d491cbd72ced7ae6326e3c540 | 2,182 | py | Python | examples/ad_manager/v201902/exchange_rate_service/get_exchange_rates_for_currency_code.py | nlynch504/googleads-python-lib | 8f7bd7f987498c4651c969a7dc73e1d5fc965be2 | [
"Apache-2.0"
] | null | null | null | examples/ad_manager/v201902/exchange_rate_service/get_exchange_rates_for_currency_code.py | nlynch504/googleads-python-lib | 8f7bd7f987498c4651c969a7dc73e1d5fc965be2 | [
"Apache-2.0"
] | null | null | null | examples/ad_manager/v201902/exchange_rate_service/get_exchange_rates_for_currency_code.py | nlynch504/googleads-python-lib | 8f7bd7f987498c4651c969a7dc73e1d5fc965be2 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | 38.280702 | 77 | 0.719523 | """This example gets the exchange rate for a specific currency code.
"""
from googleads import ad_manager
CURRENCY_CODE = 'INSERT_CURRENCY_CODE_HERE'
def main(client, currency_code):
exchange_rate_service = client.GetService(
'ExchangeRateService', version='v201902')
statement = (ad_manager.StatementB... | false | true |
f7760c560dc01e95c6f4818d449f8cd40ae9dd50 | 1,645 | py | Python | tests/test_box.py | shixm123123/wecube-plugins-itsdangerous | 9718f9de91eb68721f5363cfd40c41a55b1427a6 | [
"Apache-2.0"
] | 1 | 2020-09-11T03:21:24.000Z | 2020-09-11T03:21:24.000Z | tests/test_box.py | shixm123123/wecube-plugins-itsdangerous | 9718f9de91eb68721f5363cfd40c41a55b1427a6 | [
"Apache-2.0"
] | null | null | null | tests/test_box.py | shixm123123/wecube-plugins-itsdangerous | 9718f9de91eb68721f5363cfd40c41a55b1427a6 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
from tests import box_data
from wecube_plugins_itsdangerous.apps.processor import api
def test():
data = {
'serviceName': 'qcloud/vm(resource)/action',
'inputParams': {
'name': 'destroy'
}, # , 'script_type': 'shell'
'scripts': [{'content': box_data.scr... | 27.881356 | 65 | 0.466869 | from tests import box_data
from wecube_plugins_itsdangerous.apps.processor import api
def test():
data = {
'serviceName': 'qcloud/vm(resource)/action',
'inputParams': {
'name': 'destroy'
}, 'scripts': [{'content': box_data.script_shell}],
'entityInstances': [{... | true | true |
f7760d2b79d6fec393135dcf33ac26832fe3d622 | 1,062 | py | Python | examples/uds_scan.py | The-Cracker-Technology/CANToolz | 1773cf8b7ef906da245461f0768007e43e4bc02d | [
"Apache-2.0"
] | 194 | 2017-08-17T06:51:30.000Z | 2022-03-23T09:01:29.000Z | examples/uds_scan.py | The-Cracker-Technology/CANToolz | 1773cf8b7ef906da245461f0768007e43e4bc02d | [
"Apache-2.0"
] | 32 | 2017-08-17T06:23:19.000Z | 2022-03-03T14:44:39.000Z | examples/uds_scan.py | The-Cracker-Technology/CANToolz | 1773cf8b7ef906da245461f0768007e43e4bc02d | [
"Apache-2.0"
] | 42 | 2017-08-19T10:22:41.000Z | 2022-02-23T04:34:16.000Z | # Examples from:
# "CarHackersHandbook" by Craig Smith (UDS scan) (page 55)
# "Adventures in Automotive Networks and Control Units" by Charlie Miller and Chris Valasek
#
# Load needed modules
modules = {
'io/hw_USBtin': {'port': 'auto', 'debug': 1, 'speed': 500}, # IO hardware modu... | 36.62069 | 102 | 0.445386 |
modules = {
'io/hw_USBtin': {'port': 'auto', 'debug': 1, 'speed': 500}, 'ping' : {}, 'analyze': {} }
actions = [
{'hw_USBtin': {'action': 'read'}}, {'analyze': {}}... | true | true |
f7760d4b107872922d0a05898c7ccdf1954a80db | 4,032 | py | Python | rally/plugins/openstack/context/manila/manila_security_services.py | boris-42/rally | 8da58ac92d36de736138240cc825a0423e11ff83 | [
"Apache-2.0"
] | 1 | 2018-01-01T00:43:41.000Z | 2018-01-01T00:43:41.000Z | rally/plugins/openstack/context/manila/manila_security_services.py | boris-42/rally | 8da58ac92d36de736138240cc825a0423e11ff83 | [
"Apache-2.0"
] | null | null | null | rally/plugins/openstack/context/manila/manila_security_services.py | boris-42/rally | 8da58ac92d36de736138240cc825a0423e11ff83 | [
"Apache-2.0"
] | 1 | 2020-06-05T10:06:37.000Z | 2020-06-05T10:06:37.000Z | # Copyright 2015 Mirantis 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... | 40.32 | 79 | 0.567708 |
from oslo_config import cfg
from rally.common.i18n import _
from rally.common import logging
from rally.common import utils
from rally.common import validation
from rally import consts as rally_consts
from rally.plugins.openstack.cleanup import manager as resource_manager
from rally.plugins.openstack.context.manila i... | true | true |
f776124dd321c7c6a2434e3b36e19ef80068dd0d | 888 | py | Python | docs/examples/widgets/select.py | prostmich/aiogram_dialog | bc70f6e85a47723da4a115f069f1f9736a6e76c7 | [
"Apache-2.0"
] | null | null | null | docs/examples/widgets/select.py | prostmich/aiogram_dialog | bc70f6e85a47723da4a115f069f1f9736a6e76c7 | [
"Apache-2.0"
] | null | null | null | docs/examples/widgets/select.py | prostmich/aiogram_dialog | bc70f6e85a47723da4a115f069f1f9736a6e76c7 | [
"Apache-2.0"
] | null | null | null | import operator
from aiogram_dialog import ChatEvent, DialogManager
from aiogram_dialog.widgets.kbd import Select
from aiogram_dialog.widgets.text import Format
# let's assume this is our window data getter
async def get_data(**kwargs):
fruits = [
("Apple", '1'),
("Pear", '2'),
("Orange",... | 26.909091 | 96 | 0.63964 | import operator
from aiogram_dialog import ChatEvent, DialogManager
from aiogram_dialog.widgets.kbd import Select
from aiogram_dialog.widgets.text import Format
async def get_data(**kwargs):
fruits = [
("Apple", '1'),
("Pear", '2'),
("Orange", '3'),
("Banana", '4'),
]
retu... | true | true |
f77612aeab093c6965ba872b02fdc7a8281d4d98 | 8,229 | py | Python | source_convert_IFF_code/321/DWD_oseas_data_extract_ws_pacific.py | glamod/glamod-nuim | eed6f9d7d71b0c456ef39fdea6b58677e13ab50c | [
"BSD-3-Clause"
] | null | null | null | source_convert_IFF_code/321/DWD_oseas_data_extract_ws_pacific.py | glamod/glamod-nuim | eed6f9d7d71b0c456ef39fdea6b58677e13ab50c | [
"BSD-3-Clause"
] | 23 | 2022-01-28T13:57:39.000Z | 2022-03-28T09:34:41.000Z | source_convert_IFF_code/321/DWD_oseas_data_extract_ws_pacific.py | glamod/glamod-nuim | eed6f9d7d71b0c456ef39fdea6b58677e13ab50c | [
"BSD-3-Clause"
] | 1 | 2019-01-24T12:06:06.000Z | 2019-01-24T12:06:06.000Z |
# -*- coding: utf-8 -*-
"""
Created on Tue Mar 19 09:02:55 2019
@author: 67135099
"""
##reads all the files in the current working directory, make sure only input files are in folde
import os
#import numpy as np
os.chdir(r"D:/DWD_overseas_subdy/data_pacific/")
files = [ f for f in os.listdir( os.curd... | 49.572289 | 146 | 0.583911 |
import os
os.chdir(r"D:/DWD_overseas_subdy/data_pacific/")
files = [ f for f in os.listdir( os.curdir ) if os.path.isfile(f) ]
files
firstFile = files[0]
firstFile
count = 0
maxLength = 0
minLength = 100000
with open(firstFile, "r") as theFirstFile:
for line in theFirstFile:
count +=1
... | true | true |
f77612b81b88abe4924288606da954b427d441e7 | 4,134 | py | Python | kubernetes_py/models/v1beta1/StatefulSetSpec.py | Unacademy/kubernetes-py | ad6150c2e27369590dc7a7330fe296bc45755cff | [
"Apache-2.0"
] | null | null | null | kubernetes_py/models/v1beta1/StatefulSetSpec.py | Unacademy/kubernetes-py | ad6150c2e27369590dc7a7330fe296bc45755cff | [
"Apache-2.0"
] | null | null | null | kubernetes_py/models/v1beta1/StatefulSetSpec.py | Unacademy/kubernetes-py | ad6150c2e27369590dc7a7330fe296bc45755cff | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This file is subject to the terms and conditions defined in
# file 'LICENSE.md', which is part of this source code package.
#
from kubernetes_py.models.v1.PersistentVolumeClaim import PersistentVolumeClaim
from kubernetes_py.models.v1.PodTemplateSpec import PodTemplat... | 35.333333 | 112 | 0.57015 |
from kubernetes_py.models.v1.PersistentVolumeClaim import PersistentVolumeClaim
from kubernetes_py.models.v1.PodTemplateSpec import PodTemplateSpec
from kubernetes_py.models.v1beta1.LabelSelector import LabelSelector
from kubernetes_py.utils import is_valid_list, is_valid_string
class StatefulSetSpec(object):
... | true | true |
f7761325c9e03b6b40721e72b35d1454f6d91425 | 89,138 | py | Python | FasterRCNN_SE_Train/src/cntk/ops/functions.py | springkim/FasterRCNN_SpringEdition | 7771dcf310cd80a195c44839c83e65adcd5df37d | [
"MIT"
] | 9 | 2017-10-03T14:02:29.000Z | 2019-05-31T01:07:40.000Z | FasterRCNN_SE_Train/src/cntk/ops/functions.py | springkim/FasterRCNN_SpringEdition | 7771dcf310cd80a195c44839c83e65adcd5df37d | [
"MIT"
] | 2 | 2018-06-21T11:09:36.000Z | 2018-10-25T18:05:30.000Z | FasterRCNN_SE_Train/src/cntk/ops/functions.py | springkim/FasterRCNN_SpringEdition | 7771dcf310cd80a195c44839c83e65adcd5df37d | [
"MIT"
] | 1 | 2019-03-22T02:16:17.000Z | 2019-03-22T02:16:17.000Z | """
CNTK function constructs. This is the core abstraction of all primitive operators in the CNTK computational graph.
"""
from os import path
from enum import Enum, unique
import sys
import warnings
import collections
import cntk
from cntk import cntk_py, Value
from cntk.device import DeviceDescriptor,... | 48.70929 | 199 | 0.616056 |
from os import path
from enum import Enum, unique
import sys
import warnings
import collections
import cntk
from cntk import cntk_py, Value
from cntk.device import DeviceDescriptor, cpu
from cntk.internal import map_if_possible, typemap, sanitize_var_map,\
sanitize_batch, saniti... | true | true |
f776145f83d5c3ac8e8c47157303968c7b66ec27 | 5,168 | py | Python | test/TestMultithreaded.py | DeltixInc/TimeBase-Client-Python | 60c5a47f72749bf21f748debc0d85ade27b14136 | [
"Apache-2.0"
] | 1 | 2021-02-26T14:12:23.000Z | 2021-02-26T14:12:23.000Z | test/TestMultithreaded.py | DeltixInc/TimeBase-Client-Python | 60c5a47f72749bf21f748debc0d85ade27b14136 | [
"Apache-2.0"
] | null | null | null | test/TestMultithreaded.py | DeltixInc/TimeBase-Client-Python | 60c5a47f72749bf21f748debc0d85ade27b14136 | [
"Apache-2.0"
] | null | null | null | import unittest
import servertest
import testutils
import os, sys, threading, time
import dxapi
from sys import version_info
testdir = os.path.dirname(__file__)
if testdir != "":
testdir = testdir + '/'
class TestMultithreaded(servertest.TestWithStreams):
def test_NextIfAvailableWithLoader(self):
re... | 34.918919 | 131 | 0.599845 | import unittest
import servertest
import testutils
import os, sys, threading, time
import dxapi
from sys import version_info
testdir = os.path.dirname(__file__)
if testdir != "":
testdir = testdir + '/'
class TestMultithreaded(servertest.TestWithStreams):
def test_NextIfAvailableWithLoader(self):
re... | true | true |
f77615f6bc6f8deba757f8194b718d9fc4fa65fd | 589 | py | Python | stubs.min/System/Windows/Automation/Peers_parts/FrameworkElementAutomationPeer.py | ricardyn/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | 1 | 2021-02-02T13:39:16.000Z | 2021-02-02T13:39:16.000Z | stubs.min/System/Windows/Automation/Peers_parts/FrameworkElementAutomationPeer.py | hdm-dt-fb/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | null | null | null | stubs.min/System/Windows/Automation/Peers_parts/FrameworkElementAutomationPeer.py | hdm-dt-fb/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | null | null | null | class FrameworkElementAutomationPeer(UIElementAutomationPeer):
"""
Exposes System.Windows.FrameworkElement types to UI Automation.
FrameworkElementAutomationPeer(owner: FrameworkElement)
"""
@staticmethod
def __new__(self,owner):
""" __new__(cls: type,owner: FrameworkElement) """
pass
IsHwndHos... | 34.647059 | 183 | 0.758913 | class FrameworkElementAutomationPeer(UIElementAutomationPeer):
""" __new__(cls: type,owner: FrameworkElement) """
pass
"""Gets a value that indicates whether the element that is associated with this System.Windows.Automation.Peers.AutomationPeer hosts hwnds in Windows Presentation Foundation (WPF).
| true | true |
f77617e82b5ca7ee0f782c4a7cbd624c9c71e2c5 | 5,596 | py | Python | tests/cli/v1_2_10/test_non_fabric_wireless.py | AltusConsulting/dnacentercli | 26ea46fdbd40fc30649ea1d8803158655aa545aa | [
"MIT"
] | null | null | null | tests/cli/v1_2_10/test_non_fabric_wireless.py | AltusConsulting/dnacentercli | 26ea46fdbd40fc30649ea1d8803158655aa545aa | [
"MIT"
] | null | null | null | tests/cli/v1_2_10/test_non_fabric_wireless.py | AltusConsulting/dnacentercli | 26ea46fdbd40fc30649ea1d8803158655aa545aa | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""DNACenterAPI Non-Fabric Wireless API fixtures and tests.
Copyright (c) 2019 Cisco and/or its affiliates.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restric... | 46.633333 | 348 | 0.611508 |
import click
import pytest
from json import loads
from tests.environment import DNA_CENTER_VERSION
pytestmark = pytest.mark.skipif(DNA_CENTER_VERSION != '1.2.10', reason='version does not match')
def is_valid_delete_and_provision_ssid(result):
data = result.output.strip()
return True if data else False
@... | true | true |
f776183c318de89223eb909393e20f67de53e743 | 7,499 | py | Python | src/MIP.py | phyjonas/Fantasy-Football-optimiser | 2a868772dc2798429963eb991dfd9456b7d84058 | [
"MIT"
] | null | null | null | src/MIP.py | phyjonas/Fantasy-Football-optimiser | 2a868772dc2798429963eb991dfd9456b7d84058 | [
"MIT"
] | null | null | null | src/MIP.py | phyjonas/Fantasy-Football-optimiser | 2a868772dc2798429963eb991dfd9456b7d84058 | [
"MIT"
] | null | null | null | # Class to set up the MIP, solve it and write the results into a csv file (a copy of the DraftKings salary file)
import csv
from pulp import *
from src.Data_processing import Data
class Optimiser:
def __init__(self, salary, projection, output):
self.salary = salary
self.projection = projection
... | 44.372781 | 112 | 0.439659 |
import csv
from pulp import *
from src.Data_processing import Data
class Optimiser:
def __init__(self, salary, projection, output):
self.salary = salary
self.projection = projection
self.output = output
self.prob = LpProblem('Fantasy Football', LpMaximize)
self.selection =... | true | true |
f77618c4d24b4ac59bb7c191e56aad0c75c0cd5a | 1,024 | py | Python | microsoft_student_partners/contrib/sites/migrations/0003_set_site_domain_and_name.py | dntandan/Microsoft-Student-Partners | e694678b0d70f6484a8715159dbb61a8030961cc | [
"MIT"
] | 15 | 2020-04-11T17:56:30.000Z | 2021-11-07T20:38:49.000Z | microsoft_student_partners/contrib/sites/migrations/0003_set_site_domain_and_name.py | dntandan/Microsoft-Student-Partners | e694678b0d70f6484a8715159dbb61a8030961cc | [
"MIT"
] | 23 | 2020-04-12T06:20:49.000Z | 2020-08-09T05:34:45.000Z | microsoft_student_partners/contrib/sites/migrations/0003_set_site_domain_and_name.py | dntandan/Microsoft-Student-Partners | e694678b0d70f6484a8715159dbb61a8030961cc | [
"MIT"
] | 28 | 2020-04-11T18:22:33.000Z | 2020-05-08T17:09:52.000Z | """
To understand why this file is here, please read:
http://cookiecutter-django.readthedocs.io/en/latest/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django
"""
from django.conf import settings
from django.db import migrations
def update_site_forward(apps, schema_editor):
"""Set site d... | 29.257143 | 129 | 0.689453 | from django.conf import settings
from django.db import migrations
def update_site_forward(apps, schema_editor):
Site = apps.get_model("sites", "Site")
Site.objects.update_or_create(
id=settings.SITE_ID,
defaults={
"domain": "example.com",
"name": "Microsoft Student Part... | true | true |
f77618f4283f4c36414d10bfae0f75ab58f1adf2 | 980 | py | Python | hm/state.py | debauer/HomematicToInflux | 233a837f0da031f331d771f0e6f7b55f488cd747 | [
"MIT"
] | null | null | null | hm/state.py | debauer/HomematicToInflux | 233a837f0da031f331d771f0e6f7b55f488cd747 | [
"MIT"
] | null | null | null | hm/state.py | debauer/HomematicToInflux | 233a837f0da031f331d771f0e6f7b55f488cd747 | [
"MIT"
] | null | null | null | from .valueType import ValueType, ValueSubType
class State:
def __init__(self, name, ise_id, datapoints):
self.name = name
self.ise_id = ise_id
self.datapoints = datapoints
def __str__(self):
return self.tostring()
def get_name(self):
return self.name
def get... | 27.222222 | 101 | 0.570408 | from .valueType import ValueType, ValueSubType
class State:
def __init__(self, name, ise_id, datapoints):
self.name = name
self.ise_id = ise_id
self.datapoints = datapoints
def __str__(self):
return self.tostring()
def get_name(self):
return self.name
def get... | true | true |
f7761adfac85000d69b3ea4ec0cf5acaf8701f43 | 4,617 | py | Python | dvoc_model/droop.py | TragerJoswig-Jones/dvoc_model | fb5d369096e436b2e4a518c4f16c3493e36aadfc | [
"MIT"
] | null | null | null | dvoc_model/droop.py | TragerJoswig-Jones/dvoc_model | fb5d369096e436b2e4a518c4f16c3493e36aadfc | [
"MIT"
] | null | null | null | dvoc_model/droop.py | TragerJoswig-Jones/dvoc_model | fb5d369096e436b2e4a518c4f16c3493e36aadfc | [
"MIT"
] | null | null | null | from math import pi, sin, cos
import numpy as np
from dvoc_model.reference_frames import SinCos, Abc, Dq0, AlphaBeta
from dvoc_model.constants import *
from dvoc_model.simulate import simulate, shift_controller_angle_half
from dvoc_model.elements import Node, RefFrames
from dvoc_model.calculations import calculate_pow... | 30.375 | 106 | 0.568551 | from math import pi, sin, cos
import numpy as np
from dvoc_model.reference_frames import SinCos, Abc, Dq0, AlphaBeta
from dvoc_model.constants import *
from dvoc_model.simulate import simulate, shift_controller_angle_half
from dvoc_model.elements import Node, RefFrames
from dvoc_model.calculations import calculate_pow... | true | true |
f7761b8445e5b1c55fc228a06d4d40d1bf22cbee | 3,853 | py | Python | instances/optimization/20210421-2109/inst-20210421-2109-c60-pas2e-1.py | LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure | bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11 | [
"BSD-3-Clause"
] | null | null | null | instances/optimization/20210421-2109/inst-20210421-2109-c60-pas2e-1.py | LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure | bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11 | [
"BSD-3-Clause"
] | null | null | null | instances/optimization/20210421-2109/inst-20210421-2109-c60-pas2e-1.py | LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure | bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11 | [
"BSD-3-Clause"
] | null | null | null |
"""
PERIODS
"""
numPeriods = 60
"""
STOPS
"""
numStations = 6
station_names = (
"Hamburg Hbf", # 0
"Landwehr", # 1
"Hasselbrook", # 2
"Wansbeker Chaussee*", # 3
"Friedrichsberg*", # 4
"Barmbek*", # 5
)
numStops = 12
stops_position = (
(0, 0), # Stop 0
(2, 0), # Stop 1
(3, 0), # Stop 2
(4, 0), # ... | 12.550489 | 108 | 0.452115 |
numPeriods = 60
numStations = 6
station_names = (
"Hamburg Hbf", "Landwehr", "Hasselbrook", "Wansbeker Chaussee*", "Friedrichsberg*", "Barmbek*", )
numStops = 12
stops_position = (
(0, 0), (2, 0), (3, 0), (4, 0), (5, 0), (7, 0), (7, 1), (15, 1), (13, 1), (12, 1), (11, 1), (10, 1), )
stops_di... | true | true |
f7761c326b79451f64e1b81d8a05a2fbb13a34dc | 3,090 | py | Python | custom_components/spotcast/const.py | rohankapoorcom/homeassistant-conf | 64e9a8fc4c888cd7de86129349ab10019d8f8f12 | [
"MIT"
] | 1 | 2021-09-28T17:33:41.000Z | 2021-09-28T17:33:41.000Z | custom_components/spotcast/const.py | rohankapoorcom/homeassistant-conf | 64e9a8fc4c888cd7de86129349ab10019d8f8f12 | [
"MIT"
] | null | null | null | custom_components/spotcast/const.py | rohankapoorcom/homeassistant-conf | 64e9a8fc4c888cd7de86129349ab10019d8f8f12 | [
"MIT"
] | null | null | null | import homeassistant.helpers.config_validation as cv
import voluptuous as vol
from homeassistant.components import websocket_api
from homeassistant.const import CONF_ENTITY_ID, CONF_OFFSET, CONF_REPEAT
DOMAIN = "spotcast"
CONF_SPOTIFY_DEVICE_ID = "spotify_device_id"
CONF_DEVICE_NAME = "device_name"
CONF_SPOTIFY_URI =... | 30.9 | 87 | 0.709061 | import homeassistant.helpers.config_validation as cv
import voluptuous as vol
from homeassistant.components import websocket_api
from homeassistant.const import CONF_ENTITY_ID, CONF_OFFSET, CONF_REPEAT
DOMAIN = "spotcast"
CONF_SPOTIFY_DEVICE_ID = "spotify_device_id"
CONF_DEVICE_NAME = "device_name"
CONF_SPOTIFY_URI =... | true | true |
f7761df60f22e5581ef17822135f62143ee08135 | 3,160 | py | Python | edison_note/edison_note/settings.py | edison0320/django-web | caaa33596e84cbc4ce193414c03c7faa4861832d | [
"bzip2-1.0.6"
] | null | null | null | edison_note/edison_note/settings.py | edison0320/django-web | caaa33596e84cbc4ce193414c03c7faa4861832d | [
"bzip2-1.0.6"
] | null | null | null | edison_note/edison_note/settings.py | edison0320/django-web | caaa33596e84cbc4ce193414c03c7faa4861832d | [
"bzip2-1.0.6"
] | null | null | null | """
Django settings for edison_note project.
Generated by 'django-admin startproject' using Django 3.0.2.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.0/ref/settings/
"""
import o... | 25.901639 | 91 | 0.697152 |
import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRET_KEY = '5xq20@1mj@^0&*!p-daw--xrtq!5gp5j^yljrpv9+i7uwh5qc='
DEBUG = True
ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes... | true | true |
f7761e27b5c3314e7146d6cd6e2017801ec313d5 | 5,275 | py | Python | pybind/slxos/v16r_1_00b/brocade_vcs_rpc/get_vcs_details/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | null | null | null | pybind/slxos/v16r_1_00b/brocade_vcs_rpc/get_vcs_details/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | null | null | null | pybind/slxos/v16r_1_00b/brocade_vcs_rpc/get_vcs_details/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | 1 | 2021-11-05T22:15:42.000Z | 2021-11-05T22:15:42.000Z |
from operator import attrgetter
import pyangbind.lib.xpathhelper as xpathhelper
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType
from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType
from pyangbind.lib.base import PybindBase
from d... | 42.540323 | 346 | 0.709384 |
from operator import attrgetter
import pyangbind.lib.xpathhelper as xpathhelper
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType
from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType
from pyangbind.lib.base import PybindBase
from d... | true | true |
f7761e7bee5a31ae983968949058c804bc793a45 | 71,072 | py | Python | keras_ssd/data_generator/object_detection_2d_data_generator.py | KerasKorea/YOLK_ObjectDetector | 78a260746c50508fcdf1d0c56a7d4f5373b1f5bf | [
"MIT"
] | 124 | 2019-09-14T14:52:15.000Z | 2021-11-08T09:31:33.000Z | keras_ssd/data_generator/object_detection_2d_data_generator.py | KerasKorea/YOLK_ObjectDetector | 78a260746c50508fcdf1d0c56a7d4f5373b1f5bf | [
"MIT"
] | 55 | 2019-09-15T06:50:42.000Z | 2020-08-23T17:42:26.000Z | keras_ssd/data_generator/object_detection_2d_data_generator.py | KerasKorea/YOLK_ObjectDetector | 78a260746c50508fcdf1d0c56a7d4f5373b1f5bf | [
"MIT"
] | 49 | 2019-09-15T01:24:36.000Z | 2022-03-22T04:11:06.000Z | '''
A data generator for 2D object detection.
Copyright (C) 2018 Pierluigi Ferrari
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... | 58.208026 | 211 | 0.579286 |
from __future__ import division
import numpy as np
import inspect
from collections import defaultdict
import warnings
import sklearn.utils
from copy import deepcopy
from PIL import Image
import cv2
import csv
import os
import sys
from tqdm import tqdm, trange
try:
import h5py
except ImportError:
warnings.warn(... | true | true |
f7761e90fe71725c5ccfc5e144688fddf5d1e7ac | 2,247 | py | Python | models/qc_time_estimator/qc_time_estimator/predict.py | doaa-altarawy/ml_models_deploy | d39f07887e75aedb0f3530934f0b61afe3fabbac | [
"BSD-3-Clause"
] | 3 | 2020-03-12T14:29:56.000Z | 2022-01-14T05:35:21.000Z | models/qc_time_estimator/qc_time_estimator/predict.py | doaa-altarawy/ml_models_deploy | d39f07887e75aedb0f3530934f0b61afe3fabbac | [
"BSD-3-Clause"
] | 6 | 2020-02-22T02:39:42.000Z | 2021-05-21T16:35:39.000Z | models/qc_time_estimator/qc_time_estimator/predict.py | doaa-altarawy/ml_models_deploy | d39f07887e75aedb0f3530934f0b61afe3fabbac | [
"BSD-3-Clause"
] | 2 | 2020-02-15T00:12:35.000Z | 2021-04-09T23:08:15.000Z | import pandas as pd
import numpy as np
from qc_time_estimator.config import config
from qc_time_estimator.processing.data_management import load_pipeline
from qc_time_estimator.processing.validation import validate_inputs
from qc_time_estimator.metrics import mape, percentile_rel_90
from qc_time_estimator import __vers... | 28.443038 | 76 | 0.676012 | import pandas as pd
import numpy as np
from qc_time_estimator.config import config
from qc_time_estimator.processing.data_management import load_pipeline
from qc_time_estimator.processing.validation import validate_inputs
from qc_time_estimator.metrics import mape, percentile_rel_90
from qc_time_estimator import __vers... | true | true |
f7762094642666c256776a133b20508bfa8be019 | 3,813 | py | Python | synthesis/evaluation/evaluator.py | daanknoors/synthetic_data_generation | 4442223840544227856e2e80aef7ac5b5f21e010 | [
"MIT"
] | 4 | 2021-02-16T00:38:27.000Z | 2022-01-21T21:59:28.000Z | synthesis/evaluation/evaluator.py | Daan0/synthetic_data_generation | 5a0d1818cba2bc8b629869773a2f86a156d25fd9 | [
"MIT"
] | 2 | 2021-08-20T14:32:59.000Z | 2022-03-18T10:15:40.000Z | synthesis/evaluation/evaluator.py | Daan0/synthetic_data_generation | 5a0d1818cba2bc8b629869773a2f86a156d25fd9 | [
"MIT"
] | 5 | 2020-12-08T05:01:39.000Z | 2022-03-24T18:12:45.000Z | """
Utility evaluator. Comparing a reference dataset to 1 or more target datasets.
"""
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from pathlib import Path
import synthesis.evaluation.metrics as metrics
from synthesis.evaluation._base import BaseMetric, COLOR_PALETTE
DEFAULT_METRICS = {
... | 35.305556 | 124 | 0.653029 |
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from pathlib import Path
import synthesis.evaluation.metrics as metrics
from synthesis.evaluation._base import BaseMetric, COLOR_PALETTE
DEFAULT_METRICS = {
'average_js_distance': metrics.MarginalComparison(),
'pairwise_correlation_dist... | true | true |
f77621df9f6e03689c2b24c4b164b76d10c5cd76 | 303 | py | Python | restflaskpyexample/models/sites/test.py | armoredware/restflask | 3e4c8e38c95a1783981774994d4e3d9d84fc70b0 | [
"MIT"
] | null | null | null | restflaskpyexample/models/sites/test.py | armoredware/restflask | 3e4c8e38c95a1783981774994d4e3d9d84fc70b0 | [
"MIT"
] | null | null | null | restflaskpyexample/models/sites/test.py | armoredware/restflask | 3e4c8e38c95a1783981774994d4e3d9d84fc70b0 | [
"MIT"
] | null | null | null | import subprocess
site_url = 'http://www.rolfny.com'
get_osInfo = subprocess.Popen(["python3.5","/var/www/py/armoredware.com/infosec/blackops/wig.py","-u",site_url,"&"],stdout = subprocess.PIPE,stderr = subprocess.PIPE)
osInfo = get_osInfo.communicate()[0]
p_status = get_osInfo.wait()
print( osInfo)
| 33.666667 | 166 | 0.742574 | import subprocess
site_url = 'http://www.rolfny.com'
get_osInfo = subprocess.Popen(["python3.5","/var/www/py/armoredware.com/infosec/blackops/wig.py","-u",site_url,"&"],stdout = subprocess.PIPE,stderr = subprocess.PIPE)
osInfo = get_osInfo.communicate()[0]
p_status = get_osInfo.wait()
print( osInfo)
| true | true |
f7762224d7565cc36f2121ef63d4df21b79b2bdb | 647 | py | Python | econ_layers/callbacks.py | HighDimensionalEconLab/econ_layers | de6b7b34168eba6a5c449498abd9574ec090e76e | [
"MIT"
] | 1 | 2021-10-05T14:13:18.000Z | 2021-10-05T14:13:18.000Z | econ_layers/callbacks.py | HighDimensionalEconLab/econ_layers | de6b7b34168eba6a5c449498abd9574ec090e76e | [
"MIT"
] | 22 | 2021-09-29T23:50:36.000Z | 2022-01-14T17:58:04.000Z | econ_layers/callbacks.py | HighDimensionalEconLab/econ_layers | de6b7b34168eba6a5c449498abd9574ec090e76e | [
"MIT"
] | null | null | null | import pytorch_lightning as pl
import pytorch_lightning.callbacks
class ResetOptimizers(pl.Callback):
def __init__(self, verbose: bool, epoch_reset_field: str = "pretrain_epochs"):
super().__init__()
self.verbose = verbose
self.epoch_reset_field= epoch_reset_field
def on_train_epoch_en... | 40.4375 | 84 | 0.710974 | import pytorch_lightning as pl
import pytorch_lightning.callbacks
class ResetOptimizers(pl.Callback):
def __init__(self, verbose: bool, epoch_reset_field: str = "pretrain_epochs"):
super().__init__()
self.verbose = verbose
self.epoch_reset_field= epoch_reset_field
def on_train_epoch_en... | true | true |
f77623537e19394a7aca74fbc25bffc73cb1952f | 584 | py | Python | Dataset/Leetcode/train/125/245.py | kkcookies99/UAST | fff81885aa07901786141a71e5600a08d7cb4868 | [
"MIT"
] | null | null | null | Dataset/Leetcode/train/125/245.py | kkcookies99/UAST | fff81885aa07901786141a71e5600a08d7cb4868 | [
"MIT"
] | null | null | null | Dataset/Leetcode/train/125/245.py | kkcookies99/UAST | fff81885aa07901786141a71e5600a08d7cb4868 | [
"MIT"
] | null | null | null | class Solution:
def XXX(self, s: str) -> bool:
i=0
j = len(s)-1
#lower()把所有大写字母改成小写,其余不变
s = s.lower()
while i<j:
while not(97 <= ord(s[i]) <= 122 or 48 <= ord(s[i]) <= 57):
if i == j:
return True
i += 1
... | 26.545455 | 71 | 0.332192 | class Solution:
def XXX(self, s: str) -> bool:
i=0
j = len(s)-1
s = s.lower()
while i<j:
while not(97 <= ord(s[i]) <= 122 or 48 <= ord(s[i]) <= 57):
if i == j:
return True
i += 1
while not(97 <= ord(... | false | true |
f776236757739da88eab0762630cb20112a03507 | 3,098 | py | Python | salt/states/zenoss.py | Noah-Huppert/salt | 998c382f5f2c3b4cbf7d96aa6913ada6993909b3 | [
"Apache-2.0"
] | 19 | 2016-01-29T14:37:52.000Z | 2022-03-30T18:08:01.000Z | salt/states/zenoss.py | Noah-Huppert/salt | 998c382f5f2c3b4cbf7d96aa6913ada6993909b3 | [
"Apache-2.0"
] | 223 | 2016-03-02T16:39:41.000Z | 2022-03-03T12:26:35.000Z | salt/states/zenoss.py | Noah-Huppert/salt | 998c382f5f2c3b4cbf7d96aa6913ada6993909b3 | [
"Apache-2.0"
] | 64 | 2016-02-04T19:45:26.000Z | 2021-12-15T02:02:31.000Z | # -*- coding: utf-8 -*-
"""
State to manage monitoring in Zenoss.
.. versionadded:: 2016.3.0
This state module depends on the 'zenoss' Salt execution module.
Allows for setting a state of minions in Zenoss using the Zenoss API. Currently Zenoss 4.x and 5.x are supported.
.. code-block:: yaml
enable_monitoring:... | 30.98 | 113 | 0.580697 |
from __future__ import absolute_import, print_function, unicode_literals
import logging
log = logging.getLogger(__name__)
def __virtual__():
if "zenoss.add_device" in __salt__:
return "zenoss"
else:
return False, "The zenoss execution module is not available"
def monitored(name, device_cl... | true | true |
f77623e9cec73bd2e00d90c6bc3831854fcb72fa | 7,107 | py | Python | web3/providers/ipc.py | kseikyo/web3.py | 8bc987e8ec2089133fbaf870dd0daa71e7447584 | [
"MIT"
] | 3 | 2019-11-12T07:55:51.000Z | 2020-04-01T11:19:18.000Z | web3/providers/ipc.py | kseikyo/web3.py | 8bc987e8ec2089133fbaf870dd0daa71e7447584 | [
"MIT"
] | 5 | 2020-07-18T14:09:54.000Z | 2022-02-18T13:07:42.000Z | web3/providers/ipc.py | kseikyo/web3.py | 8bc987e8ec2089133fbaf870dd0daa71e7447584 | [
"MIT"
] | 2 | 2019-10-20T14:54:47.000Z | 2020-06-11T07:29:37.000Z | import logging
import os
from pathlib import (
Path,
)
import socket
import sys
import threading
from web3._utils.threads import (
Timeout,
)
from .base import (
JSONBaseProvider,
)
try:
from json import JSONDecodeError
except ImportError:
JSONDecodeError = ValueError
def get_ipc_socket(ipc_pat... | 28.428 | 95 | 0.529759 | import logging
import os
from pathlib import (
Path,
)
import socket
import sys
import threading
from web3._utils.threads import (
Timeout,
)
from .base import (
JSONBaseProvider,
)
try:
from json import JSONDecodeError
except ImportError:
JSONDecodeError = ValueError
def get_ipc_socket(ipc_pat... | true | true |
f7762481473c30317d744c7438308177d2f79073 | 25,245 | py | Python | AutoML_autoaug.py | Lee-Gihun/Micronet_GSJ | 72289bb66507b6c3b4d14f2e5916dec718a1b198 | [
"MIT"
] | 12 | 2019-11-12T15:19:45.000Z | 2022-01-22T09:28:36.000Z | AutoML_autoaug.py | Lee-Gihun/MicroNet_OSI-AI | 72289bb66507b6c3b4d14f2e5916dec718a1b198 | [
"MIT"
] | null | null | null | AutoML_autoaug.py | Lee-Gihun/MicroNet_OSI-AI | 72289bb66507b6c3b4d14f2e5916dec718a1b198 | [
"MIT"
] | 6 | 2019-11-13T08:36:45.000Z | 2021-07-29T01:01:05.000Z | # -*- coding: utf-8 -*-
import os
os.environ['OMP_NUM_THREADS'] = '1'
import sys
import math
import random
import shutil
import pickle
import logging
import torch
import torch.nn as nn
import torch.optim as optim
import torch.optim.lr_scheduler as lr_scheduler
import torchvision.models as models
import numpy as np
fro... | 85.867347 | 533 | 0.562725 | import os
os.environ['OMP_NUM_THREADS'] = '1'
import sys
import math
import random
import shutil
import pickle
import logging
import torch
import torch.nn as nn
import torch.optim as optim
import torch.optim.lr_scheduler as lr_scheduler
import torchvision.models as models
import numpy as np
from PIL import Image, Imag... | true | true |
f77625377187a9a41ebc19057b1d5fe0d1feadfe | 1,122 | py | Python | firefly/config_file.py | aliwimo/uav_placement | 85cde62361dd2bbfd907033b6954998b3461b1ee | [
"MIT"
] | 1 | 2020-12-01T20:57:55.000Z | 2020-12-01T20:57:55.000Z | firefly/config_file.py | aliwimo/uav_placement | 85cde62361dd2bbfd907033b6954998b3461b1ee | [
"MIT"
] | null | null | null | firefly/config_file.py | aliwimo/uav_placement | 85cde62361dd2bbfd907033b6954998b3461b1ee | [
"MIT"
] | null | null | null | import numpy as np
POP_SIZE = 50
MAX_GEN = 1
DIM_SIZE = 3
ALPHA = 1.0
BETA0 = 0.5
GAMMA = 1.0
BOUND = 1000
UB = BOUND
LB = -BOUND
BUILDING = [20, 50, 200] #b1
# BUILDING = [20, 50, 250] #b2
# BUIL... | 35.0625 | 78 | 0.551693 | import numpy as np
POP_SIZE = 50
MAX_GEN = 1
DIM_SIZE = 3
ALPHA = 1.0
BETA0 = 0.5
GAMMA = 1.0
BOUND = 1000
UB = BOUND
LB = -BOUND
BUILDING = [20, 50, 200]
Location_Array = [0] * DIM_SIZE
Firefly_List ... | true | true |
f77626062cdd4a9b75f2016bee820dca88bf7d6d | 10,933 | py | Python | conversions/uai2problog.py | HEmile/problog | 576b6fd305f72b12125111c8d4d62cf8a7bbda0f | [
"Apache-2.0"
] | 189 | 2019-05-27T08:20:10.000Z | 2022-03-28T09:29:22.000Z | conversions/uai2problog.py | HEmile/problog | 576b6fd305f72b12125111c8d4d62cf8a7bbda0f | [
"Apache-2.0"
] | 60 | 2019-06-11T15:07:48.000Z | 2022-03-25T02:31:23.000Z | conversions/uai2problog.py | HEmile/problog | 576b6fd305f72b12125111c8d4d62cf8a7bbda0f | [
"Apache-2.0"
] | 33 | 2019-07-03T13:14:24.000Z | 2022-02-20T01:07:15.000Z | #!/usr/bin/env python3
# encoding: utf-8
"""
uai2problog.py
http://graphmod.ics.uci.edu/uai08/FileFormat
Created by Wannes Meert on 31-01-2016.
Copyright (c) 2016 KU Leuven. All rights reserved.
"""
import sys
import os
import argparse
import itertools
import logging
from bn2problog import BNParser
sys.path.append(... | 33.953416 | 116 | 0.547242 | import sys
import os
import argparse
import itertools
import logging
from bn2problog import BNParser
sys.path.append(os.path.join(os.path.dirname(__file__), ".."))
from problog.pgm.cpd import Variable, Factor, PGM
logger = logging.getLogger("be.kuleuven.cs.dtai.problog.bn2problog")
class UAIReader:
def __init... | true | true |
f77629123b75aea593c107f9a1ac3759067e3d58 | 1,896 | py | Python | blog/models.py | bodealamu/django_blog_application | b591835df41d7806e16010d355aaf8ea218fb65a | [
"MIT"
] | null | null | null | blog/models.py | bodealamu/django_blog_application | b591835df41d7806e16010d355aaf8ea218fb65a | [
"MIT"
] | 9 | 2021-03-19T10:32:04.000Z | 2022-01-13T03:08:43.000Z | blog/models.py | bodealamu/django_blog_application | b591835df41d7806e16010d355aaf8ea218fb65a | [
"MIT"
] | null | null | null | from django.db import models
from datetime import datetime
from django.conf import settings
from django.template.defaultfilters import slugify
# Create your models here.
class Category(models.Model):
""" Model representation for blog post categpries."""
id = models.AutoField(primary_key=True)
name = model... | 36.461538 | 96 | 0.719937 | from django.db import models
from datetime import datetime
from django.conf import settings
from django.template.defaultfilters import slugify
class Category(models.Model):
id = models.AutoField(primary_key=True)
name = models.CharField(max_length=60, unique=True,
verbose_name='Cat... | true | true |
f7762a918c07139cf29bfe49f950274d0ad31414 | 9,124 | py | Python | venv/lib/python3.6/site-packages/celery/utils/serialization.py | exdeam/opencrm | dfdcfdf99f0b42eb3959171927cb6574583f5ee0 | [
"MIT"
] | 13 | 2018-03-28T23:07:01.000Z | 2022-03-12T06:01:21.000Z | newenv/lib/python3.8/site-packages/celery/utils/serialization.py | palakshivlani-11/cryptorium | eebb78c061007519e527b3d18b8df6bc13679c46 | [
"Apache-2.0"
] | 13 | 2020-03-24T17:53:51.000Z | 2022-02-10T20:01:14.000Z | newenv/lib/python3.8/site-packages/celery/utils/serialization.py | palakshivlani-11/cryptorium | eebb78c061007519e527b3d18b8df6bc13679c46 | [
"Apache-2.0"
] | 5 | 2018-03-28T23:07:05.000Z | 2021-12-09T19:02:00.000Z | # -*- coding: utf-8 -*-
"""Utilities for safely pickling exceptions."""
from __future__ import absolute_import, unicode_literals
import datetime
import numbers
import sys
from base64 import b64decode as base64decode
from base64 import b64encode as base64encode
from functools import partial
from inspect import getmro
f... | 30.51505 | 79 | 0.630973 | from __future__ import absolute_import, unicode_literals
import datetime
import numbers
import sys
from base64 import b64decode as base64decode
from base64 import b64encode as base64encode
from functools import partial
from inspect import getmro
from itertools import takewhile
from kombu.utils.encoding import bytes_t... | true | true |
f7762b2be7eafbc82b23f42324d354af6017e0f1 | 614 | py | Python | 7day/UL2/01_bs4/03_property/01_property_href2.py | jsjang93/joony | 62f7a325094c887212b894932263bf84500e0f03 | [
"MIT"
] | null | null | null | 7day/UL2/01_bs4/03_property/01_property_href2.py | jsjang93/joony | 62f7a325094c887212b894932263bf84500e0f03 | [
"MIT"
] | null | null | null | 7day/UL2/01_bs4/03_property/01_property_href2.py | jsjang93/joony | 62f7a325094c887212b894932263bf84500e0f03 | [
"MIT"
] | null | null | null | import bs4
html_str = """
<html>
<body>
<ul class="ko">
<li>
<a href="https://www.naver.com/">네이버</a>
</li>
<li>
<a href="https://www.daum.net/">다음</a>
</li>
</ul>
<ul class="sns">
<li>
... | 20.466667 | 60 | 0.394137 | import bs4
html_str = """
<html>
<body>
<ul class="ko">
<li>
<a href="https://www.naver.com/">네이버</a>
</li>
<li>
<a href="https://www.daum.net/">다음</a>
</li>
</ul>
<ul class="sns">
<li>
... | true | true |
f7762ccfd5fc90bad3f1cf0f4f20e5e4c9b080e6 | 996 | py | Python | src/metod_alg/objective_functions/calc_minimizer_sog.py | Megscammell/METOD-Algorithm | 7518145ec100599bddc880f5f52d28f9a3959108 | [
"MIT"
] | null | null | null | src/metod_alg/objective_functions/calc_minimizer_sog.py | Megscammell/METOD-Algorithm | 7518145ec100599bddc880f5f52d28f9a3959108 | [
"MIT"
] | 1 | 2021-11-17T09:03:17.000Z | 2021-11-17T09:03:17.000Z | src/metod_alg/objective_functions/calc_minimizer_sog.py | Megscammell/METOD-Algorithm | 7518145ec100599bddc880f5f52d28f9a3959108 | [
"MIT"
] | null | null | null | import numpy as np
from numpy import linalg as LA
def calc_minimizer_sog(point, p, sigma_sq, store_x0, matrix_test, store_c):
"""
Finds the nearest local minimizer for point using the Sum of Gaussians
function.
Parameters
----------
point : 1-D array with shape (d, )
A point used ... | 29.294118 | 75 | 0.588353 | import numpy as np
from numpy import linalg as LA
def calc_minimizer_sog(point, p, sigma_sq, store_x0, matrix_test, store_c):
dist = np.zeros((p))
for i in range(p):
dist[i] = LA.norm(point - store_x0[i])
assert(np.min(dist) < 0.25)
return np.argmin(dist)
| true | true |
f7762cd1e6c7a658a12c1408fdd5fc84011f804b | 3,598 | py | Python | setup.py | sergeychipiga/selenium | d834b32b04055cfee803932ff68836addecc5301 | [
"Apache-2.0"
] | null | null | null | setup.py | sergeychipiga/selenium | d834b32b04055cfee803932ff68836addecc5301 | [
"Apache-2.0"
] | 1 | 2020-07-07T17:56:06.000Z | 2020-07-07T17:56:06.000Z | setup.py | sergeychipiga/selenium | d834b32b04055cfee803932ff68836addecc5301 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2008-2009 WebDriver committers
# Copyright 2008-2009 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICEN... | 41.837209 | 112 | 0.613674 |
from setuptools import setup
from setuptools.command.install import install
from os.path import dirname, join, isfile, abspath
from shutil import copy
import sys
from distutils.command.install import INSTALL_SCHEMES
for scheme in INSTALL_SCHEMES.values():
scheme['data'] = scheme['purelib']
setup_args = {
'c... | true | true |
f7762dcf06710f594baede47a34d99320e6ead5e | 13,418 | py | Python | examples/applications/plot_out_of_core_classification.py | Giannos-G/scikit-learn_modified | 03df71bbea1bcb3423262b711191552420422cda | [
"BSD-3-Clause"
] | 1 | 2022-03-03T23:54:50.000Z | 2022-03-03T23:54:50.000Z | examples/applications/plot_out_of_core_classification.py | Giannos-G/scikit-learn_modified | 03df71bbea1bcb3423262b711191552420422cda | [
"BSD-3-Clause"
] | null | null | null | examples/applications/plot_out_of_core_classification.py | Giannos-G/scikit-learn_modified | 03df71bbea1bcb3423262b711191552420422cda | [
"BSD-3-Clause"
] | null | null | null | """
======================================================
Out-of-core classification of text documents
======================================================
This is an example showing how scikit-learn can be used for classification
using an out-of-core approach: learning from data that doesn't fit into main
memory. ... | 32.023866 | 79 | 0.657997 |
from glob import glob
import itertools
import os.path
import re
import tarfile
import time
import sys
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import rcParams
from html.parser import HTMLParser
from urllib.request import urlretrieve
from sklearn.datasets import get_data_home
from sklearn.f... | true | true |
f7762ea96a3614348ef66cc0c50de6db02cd4c8c | 1,140 | py | Python | saliency/tf1/visualization.py | lenbrocki/saliency | a43d45fd38c12c9ceadc54c11df80ac2699843a7 | [
"Apache-2.0"
] | 728 | 2017-07-10T23:53:40.000Z | 2022-03-30T19:48:42.000Z | saliency/tf1/visualization.py | lenbrocki/saliency | a43d45fd38c12c9ceadc54c11df80ac2699843a7 | [
"Apache-2.0"
] | 51 | 2017-07-13T17:24:55.000Z | 2022-03-25T08:32:10.000Z | saliency/tf1/visualization.py | lenbrocki/saliency | a43d45fd38c12c9ceadc54c11df80ac2699843a7 | [
"Apache-2.0"
] | 164 | 2017-07-18T07:18:14.000Z | 2022-03-31T06:16:32.000Z | # Copyright 2021 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... | 39.310345 | 78 | 0.766667 |
from ..core import visualization
VisualizeImageGrayscale = visualization.VisualizeImageGrayscale
# This method sums a 3D tensor across the absolute value of axis=2, and then
# clips values at a given percentile.
# """
VisualizeImageDiverging = visualization.VisualizeImageDiverging
# """ | true | true |
f7762eecd364dcfa6f0ef569b8012e4174cb397e | 2,783 | py | Python | {{cookiecutter.project_slug}}/setup.py | portugueslab/cookiecutter-portugueslab | 2200f02d41b814018dcc4a805687fde8a95839d7 | [
"BSD-3-Clause"
] | null | null | null | {{cookiecutter.project_slug}}/setup.py | portugueslab/cookiecutter-portugueslab | 2200f02d41b814018dcc4a805687fde8a95839d7 | [
"BSD-3-Clause"
] | null | null | null | {{cookiecutter.project_slug}}/setup.py | portugueslab/cookiecutter-portugueslab | 2200f02d41b814018dcc4a805687fde8a95839d7 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
"""The setup script."""
from setuptools import setup, find_packages
import os
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = []
with open('requirements.txt') as f:
for line ... | 37.106667 | 109 | 0.644269 |
"""The setup script."""
from setuptools import setup, find_packages
import os
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = []
with open('requirements.txt') as f:
for line in f:
splitted... | false | true |
f7762f284348ff4556f1b736d50070196a5ae693 | 2,195 | py | Python | data/p2DJ/New/program/cirq/startCirq398.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p2DJ/New/program/cirq/startCirq398.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p2DJ/New/program/cirq/startCirq398.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 5/15/20 4:49 PM
# @File : grover.py
# qubit number=2
# total number=20
import cirq
import cirq.google as cg
from typing import Optional
import sys
from math import log2
import numpy as np
#thatsNoCode
from cirq.contrib.svg import SVGCircuit
# Symbols for... | 30.915493 | 77 | 0.687927 |
import cirq
import cirq.google as cg
from typing import Optional
import sys
from math import log2
import numpy as np
from cirq.contrib.svg import SVGCircuit
def make_circuit(n: int, input_qubit):
c = cirq.Circuit()
c.append(cirq.H.on(input_qubit[0])) c.append(cirq.H.on(input_qubit[1])) c.append(c... | true | true |
f7762fb30fe7507345b59ba6803c80641886f196 | 427 | py | Python | web_commands/help.py | SalamiArmy/InfoBoet | 71df751e50b4b458db44444ef7d6dfe6f68e648f | [
"Apache-2.0"
] | 1 | 2021-07-14T21:48:48.000Z | 2021-07-14T21:48:48.000Z | web_commands/help.py | SalamiArmy/InfoBoet | 71df751e50b4b458db44444ef7d6dfe6f68e648f | [
"Apache-2.0"
] | 6 | 2017-11-27T06:04:34.000Z | 2020-02-19T05:15:02.000Z | web_commands/help.py | SalamiArmy/InfoBoet | 71df751e50b4b458db44444ef7d6dfe6f68e648f | [
"Apache-2.0"
] | 2 | 2017-08-16T20:26:02.000Z | 2020-11-10T18:44:11.000Z | from commands import add
def run(keyConfig, message, totalResults=1):
try:
es = add.CommandsValue.query().fetch()
available_commands = []
if len(es) > 0:
for mod in es:
available_commands.append(str(mod.key._Key__pairs[0][1]))
return "I know:\n" + "\n".j... | 30.5 | 73 | 0.592506 | from commands import add
def run(keyConfig, message, totalResults=1):
try:
es = add.CommandsValue.query().fetch()
available_commands = []
if len(es) > 0:
for mod in es:
available_commands.append(str(mod.key._Key__pairs[0][1]))
return "I know:\n" + "\n".j... | true | true |
f7763032e4c5d0fa1eb69117ba9e1b7fea1c78f2 | 403 | py | Python | src/secml/adv/attacks/evasion/__init__.py | Cinofix/secml | 431373e65d8cfe2cb7cf042ce1a6c9519ea5a14a | [
"Apache-2.0"
] | null | null | null | src/secml/adv/attacks/evasion/__init__.py | Cinofix/secml | 431373e65d8cfe2cb7cf042ce1a6c9519ea5a14a | [
"Apache-2.0"
] | null | null | null | src/secml/adv/attacks/evasion/__init__.py | Cinofix/secml | 431373e65d8cfe2cb7cf042ce1a6c9519ea5a14a | [
"Apache-2.0"
] | null | null | null | from .c_attack_evasion import CAttackEvasion
from .c_attack_evasion_pgd_ls import CAttackEvasionPGDLS
from .c_attack_evasion_pgd_exp import CAttackEvasionPGDExp
from .c_attack_evasion_pgd import CAttackEvasionPGD
try:
import cleverhans
except ImportError:
pass # cleverhans is an extra component
else:
from... | 31 | 58 | 0.833747 | from .c_attack_evasion import CAttackEvasion
from .c_attack_evasion_pgd_ls import CAttackEvasionPGDLS
from .c_attack_evasion_pgd_exp import CAttackEvasionPGDExp
from .c_attack_evasion_pgd import CAttackEvasionPGD
try:
import cleverhans
except ImportError:
pass else:
from .cleverhans.c_attack_evasion_cleve... | true | true |
f77630530a41d3e4b6a0c93ce76cf4cc3cf7f400 | 9,651 | py | Python | data/versions/Better Calculator V0.1.py | warmachine028/Better-Calculator | 120b2f8c48c73c9ffb8b343f1b4cd5a5fde83520 | [
"BSD-3-Clause"
] | 9 | 2020-12-19T09:40:05.000Z | 2021-10-09T17:40:34.000Z | data/versions/Better Calculator V0.1.py | warmachine028/newrepo | 120b2f8c48c73c9ffb8b343f1b4cd5a5fde83520 | [
"BSD-3-Clause"
] | 9 | 2020-12-19T07:51:44.000Z | 2021-07-08T06:15:21.000Z | data/versions/Better Calculator V0.1.py | warmachine028/newrepo | 120b2f8c48c73c9ffb8b343f1b4cd5a5fde83520 | [
"BSD-3-Clause"
] | 5 | 2020-12-19T14:22:32.000Z | 2021-03-09T05:27:23.000Z | """
CHANGE LOG: Ver : 0.1
>> 20th December 2020
>> Added hover over widget feature
>> Added comments in the code
>> Added exclusive Zero Division Error output
>> Entry Widget Screen font made significantly smaller for better looks
>> Reduced Lot of unnecessary code
"""
from tkinter import *
from PIL import Image, Ima... | 25.198433 | 86 | 0.653093 |
from tkinter import *
from PIL import Image, ImageTk
b_font = "ariel 30 bold"
b_relief = "groove"
b_border = 0
b_width = 2
b_borderwidth = 0
bg_color, fg_color = "black", "white"
widget_list0 = list()
widget_list1 = list()
radio_list = list()
def change_on_hovering(event):
button = event.widget
button... | true | true |
f7763092a6069b7ad277ec80749b389da99cd305 | 32,433 | py | Python | calfem/vis_mpl.py | bagustris/calfem-python | f5946c7d822ec70d6420a36d197c41ad263d05a0 | [
"MIT"
] | null | null | null | calfem/vis_mpl.py | bagustris/calfem-python | f5946c7d822ec70d6420a36d197c41ad263d05a0 | [
"MIT"
] | null | null | null | calfem/vis_mpl.py | bagustris/calfem-python | f5946c7d822ec70d6420a36d197c41ad263d05a0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.collections
import matplotlib.path as mpp
import matplotlib.patches as patches
import matplotlib as mpl
import matplotlib.tri as tri
try:
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
... | 33.401648 | 203 | 0.580674 |
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.collections
import matplotlib.path as mpp
import matplotlib.patches as patches
import matplotlib as mpl
import matplotlib.tri as tri
try:
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
from matplotlib.backen... | true | true |
f77630d03ab2407f42fab033b60334cf1ec936e9 | 4,869 | py | Python | networkapi/plugins/HP/plugin.py | vinicius-marinho/GloboNetworkAPI | 94651d3b4dd180769bc40ec966814f3427ccfb5b | [
"Apache-2.0"
] | 73 | 2015-04-13T17:56:11.000Z | 2022-03-24T06:13:07.000Z | networkapi/plugins/HP/plugin.py | leopoldomauricio/GloboNetworkAPI | 3b5b2e336d9eb53b2c113977bfe466b23a50aa29 | [
"Apache-2.0"
] | 99 | 2015-04-03T01:04:46.000Z | 2021-10-03T23:24:48.000Z | networkapi/plugins/HP/plugin.py | shildenbrand/GloboNetworkAPI | 515d5e961456cee657c08c275faa1b69b7452719 | [
"Apache-2.0"
] | 64 | 2015-08-05T21:26:29.000Z | 2022-03-22T01:06:28.000Z | # -*- 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 "Lic... | 39.585366 | 116 | 0.649209 |
import re
import logging
import string
from time import sleep
from networkapi.plugins import exceptions
from networkapi.plugins.base import BasePlugin
from networkapi.util.decorators import mock_return
log = logging.getLogger(__name__)
class HPE(BasePlugin):
ERROR_REGEX = 'Wrong parameter found at|File not fo... | false | true |
f77631c5a82c5db243b5f521d2a981b831c4922d | 6,232 | py | Python | timeml_to_timeline.py | tuur/PredRelTimelines | 1511376b1e266c40c2316deacc5ccb35468e1a86 | [
"Apache-2.0"
] | null | null | null | timeml_to_timeline.py | tuur/PredRelTimelines | 1511376b1e266c40c2316deacc5ccb35468e1a86 | [
"Apache-2.0"
] | null | null | null | timeml_to_timeline.py | tuur/PredRelTimelines | 1511376b1e266c40c2316deacc5ccb35468e1a86 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Code from the paper "Temporal Information Extraction by Predicting Relative Time-lines" by Artuur Leeuwenberg & Marie-Francine Moens, In Proceedings of EMNLP, Brussels, Belgium, 2018.
Used to build relative time-lines from TimeML data (TL2RTL).
"""
import argparse, sys, os, shutil, torch, p... | 48.6875 | 379 | 0.732189 | import argparse, sys, os, shutil, torch, pickle
from time import gmtime, strftime
from lib.models import TimelineFinder, evaluate_timelinemodel
from lib.timeml import read_timebank_folder, simplify_relations, get_num_tlinks
from lib.evaluation import get_acc_from_confusion_matrix, save_confusion_matrix_from_metrics
fro... | true | true |
f7763238d1ecc6546131dfb6457709e4a451fdbd | 1,881 | py | Python | examples/plotting/file/slider.py | g-parki/bokeh | 664ead5306bba64609e734d4105c8aa8cfb76d81 | [
"BSD-3-Clause"
] | 15,193 | 2015-01-01T05:11:45.000Z | 2022-03-31T19:30:20.000Z | examples/plotting/file/slider.py | g-parki/bokeh | 664ead5306bba64609e734d4105c8aa8cfb76d81 | [
"BSD-3-Clause"
] | 9,554 | 2015-01-01T03:16:54.000Z | 2022-03-31T22:59:39.000Z | examples/plotting/file/slider.py | g-parki/bokeh | 664ead5306bba64609e734d4105c8aa8cfb76d81 | [
"BSD-3-Clause"
] | 4,829 | 2015-01-02T03:35:32.000Z | 2022-03-30T16:40:26.000Z | ''' An interactive plot of the ``sin`` function. This example demonstrates
adding widgets and ``CustomJS`` callbacks that can update a plot.
.. bokeh-example-metadata::
:apis: bokeh.plotting.Figure.line, bokeh.layouts.column, bokeh.layouts.row, bokeh.models.callbacks.CustomJS, bokeh.models.widgets.sliders.Slider
... | 33.589286 | 148 | 0.699628 | import numpy as np
from bokeh.layouts import column, row
from bokeh.models import CustomJS, Slider
from bokeh.plotting import ColumnDataSource, figure, show
x = np.linspace(0, 10, 500)
y = np.sin(x)
source = ColumnDataSource(data=dict(x=x, y=y))
plot = figure(y_range=(-10, 10), width=400, height=400)
plot.line('x'... | true | true |
f77632911edb0e0735abdef73d9565b23e542616 | 3,332 | py | Python | reconcile/utils/aggregated_list.py | bhushanthakur93/qontract-reconcile | fd8eea9f92d353224113955d08e3592864e37df8 | [
"Apache-2.0"
] | null | null | null | reconcile/utils/aggregated_list.py | bhushanthakur93/qontract-reconcile | fd8eea9f92d353224113955d08e3592864e37df8 | [
"Apache-2.0"
] | null | null | null | reconcile/utils/aggregated_list.py | bhushanthakur93/qontract-reconcile | fd8eea9f92d353224113955d08e3592864e37df8 | [
"Apache-2.0"
] | null | null | null | import json
import logging
class RunnerException(Exception):
pass
class AggregatedList:
def __init__(self):
self._dict = {}
def add(self, params, new_items):
params_hash = self.hash_params(params)
if self._dict.get(params_hash) is None:
self._dict[params_hash] = {"p... | 28.478632 | 88 | 0.542017 | import json
import logging
class RunnerException(Exception):
pass
class AggregatedList:
def __init__(self):
self._dict = {}
def add(self, params, new_items):
params_hash = self.hash_params(params)
if self._dict.get(params_hash) is None:
self._dict[params_hash] = {"p... | true | true |
f7763322663e9092a626679d3c458f733fff20d7 | 2,901 | py | Python | endorser/api/endpoints/routes/connections.py | bcgov/aries-endorser-service | 46b090497bc0996fd6bc90b0e157f690b6499d11 | [
"Apache-2.0"
] | null | null | null | endorser/api/endpoints/routes/connections.py | bcgov/aries-endorser-service | 46b090497bc0996fd6bc90b0e157f690b6499d11 | [
"Apache-2.0"
] | 1 | 2022-02-26T16:55:47.000Z | 2022-02-26T16:55:47.000Z | endorser/api/endpoints/routes/connections.py | bcgov/aries-endorser-service | 46b090497bc0996fd6bc90b0e157f690b6499d11 | [
"Apache-2.0"
] | null | null | null | import logging
from typing import List, Optional
import json
from fastapi import APIRouter, Depends, HTTPException
from starlette import status
from pydantic import BaseModel
from sqlalchemy.ext.asyncio import AsyncSession
from api.endpoints.dependencies.db import get_db
from api.endpoints.models.connections import (... | 26.614679 | 78 | 0.734574 | import logging
from typing import List, Optional
import json
from fastapi import APIRouter, Depends, HTTPException
from starlette import status
from pydantic import BaseModel
from sqlalchemy.ext.asyncio import AsyncSession
from api.endpoints.dependencies.db import get_db
from api.endpoints.models.connections import (... | true | true |
f776333ca0f3be0918fa460d73b9a8ab2582c625 | 2,928 | py | Python | pyteos/shell/interface.py | vt102/eosfactory | fbc1da612f127eeb04b15bf09ef52456f45b1afd | [
"MIT"
] | null | null | null | pyteos/shell/interface.py | vt102/eosfactory | fbc1da612f127eeb04b15bf09ef52456f45b1afd | [
"MIT"
] | null | null | null | pyteos/shell/interface.py | vt102/eosfactory | fbc1da612f127eeb04b15bf09ef52456f45b1afd | [
"MIT"
] | null | null | null | import enum
class Omittable:
def __init__(self):
self.err_msg = None
class Permission(enum.Enum):
OWNER = '@owner'
ACTIVE = '@active'
class Key(Omittable):
'''Having the ``name`` and 'Key' attributes.
'''
def __init__(self, name, key_public, key_private):
self.name = name... | 25.241379 | 62 | 0.579918 | import enum
class Omittable:
def __init__(self):
self.err_msg = None
class Permission(enum.Enum):
OWNER = '@owner'
ACTIVE = '@active'
class Key(Omittable):
def __init__(self, name, key_public, key_private):
self.name = name
self.key_public = key_public
self.key_privat... | true | true |
f77634bb055532e3bddfd0f3cf21529b22513a03 | 9,784 | py | Python | wal_e/blobstore/s3/calling_format.py | paalkr/wal-e | ff6102a1d19cf0f683c7232f618dbe8d14e6e017 | [
"BSD-3-Clause"
] | 2,739 | 2015-01-05T03:57:02.000Z | 2022-03-22T10:51:38.000Z | wal_e/blobstore/s3/calling_format.py | 0xgpapad/wal-e | f5b3e790fe10daa098b8cbf01d836c4885dc13c7 | [
"BSD-3-Clause"
] | 264 | 2015-01-13T01:07:19.000Z | 2022-02-08T00:56:14.000Z | wal_e/blobstore/s3/calling_format.py | 0xgpapad/wal-e | f5b3e790fe10daa098b8cbf01d836c4885dc13c7 | [
"BSD-3-Clause"
] | 245 | 2015-01-11T15:13:42.000Z | 2022-02-10T10:58:09.000Z | import boto
import os
import re
import urllib.parse
from boto.s3 import connection
from wal_e import log_help
from wal_e.exception import UserException
logger = log_help.WalELogger(__name__)
_S3_REGIONS = {
# See http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
'ap-northeast-1': 's3.ap-north... | 34.450704 | 79 | 0.639105 | import boto
import os
import re
import urllib.parse
from boto.s3 import connection
from wal_e import log_help
from wal_e.exception import UserException
logger = log_help.WalELogger(__name__)
_S3_REGIONS = {
'ap-northeast-1': 's3.ap-northeast-1.amazonaws.com',
'ap-northeast-2': 's3.ap-northeast-2.amazonaw... | true | true |
f77635b3edc526dd42b709eeb3bdcb6fec83e782 | 2,752 | py | Python | aiida_flipper/utils/delete_chillstep.py | epfl-theos/aiida_flipper | cf4957b2b6f30ef4bf64a05365e4de95084223da | [
"MIT"
] | 1 | 2021-07-27T08:55:57.000Z | 2021-07-27T08:55:57.000Z | aiida_flipper/utils/delete_chillstep.py | epfl-theos/aiida_flipper | cf4957b2b6f30ef4bf64a05365e4de95084223da | [
"MIT"
] | null | null | null | aiida_flipper/utils/delete_chillstep.py | epfl-theos/aiida_flipper | cf4957b2b6f30ef4bf64a05365e4de95084223da | [
"MIT"
] | null | null | null | #!/usr/bin/env runaiida
# -*- coding: utf-8 -*-
from delete_nodes import delete_nodes_serial
from aiida.common.links import LinkType
from aiida.orm import load_node, Node
from aiida.orm.calculation.chillstep import ChillstepCalculation
from aiida.orm.querybuilder import QueryBuilder
from aiida.orm.calculation import C... | 39.884058 | 120 | 0.699128 |
from delete_nodes import delete_nodes_serial
from aiida.common.links import LinkType
from aiida.orm import load_node, Node
from aiida.orm.calculation.chillstep import ChillstepCalculation
from aiida.orm.querybuilder import QueryBuilder
from aiida.orm.calculation import Calculation
import sys
def delete_calcs_rec(mas... | false | true |
f776361a5b99985345dda844aa8e202c70e92238 | 221 | py | Python | setup.py | Peter-32/wholesale_customers | 167e0c9176e505d2f748bfcd01446c3851c4abd5 | [
"MIT"
] | null | null | null | setup.py | Peter-32/wholesale_customers | 167e0c9176e505d2f748bfcd01446c3851c4abd5 | [
"MIT"
] | null | null | null | setup.py | Peter-32/wholesale_customers | 167e0c9176e505d2f748bfcd01446c3851c4abd5 | [
"MIT"
] | null | null | null | from setuptools import find_packages, setup
setup(
name='src',
packages=find_packages(),
version='0.1.0',
description='Clients of a wholesale distributor.',
author='Peter Myers',
license='MIT',
)
| 20.090909 | 54 | 0.669683 | from setuptools import find_packages, setup
setup(
name='src',
packages=find_packages(),
version='0.1.0',
description='Clients of a wholesale distributor.',
author='Peter Myers',
license='MIT',
)
| true | true |
f7763719f4d87bd55ed6aab539c391f57887b3eb | 29,860 | py | Python | pysnmp/BLADETYPE2-ACL-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/BLADETYPE2-ACL-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/BLADETYPE2-ACL-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module BLADETYPE2-ACL-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/BLADETYPE2-ACL-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 17:22:06 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, ... | 142.870813 | 4,054 | 0.722873 | Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueSizeConstraint, ValueRangeConstraint, SingleValueConstraint, ConstraintsUnion, ConstraintsIntersection = mibBuilder.impo... | true | true |
f77637abc5ba4dbe65e4033bfe47562baa3be15a | 576 | py | Python | filter-out-embedded-spaces.py | thanm/devel-scripts | f8777a7c282b4b15f004e22ebf5c6b6751b82f87 | [
"Apache-2.0"
] | null | null | null | filter-out-embedded-spaces.py | thanm/devel-scripts | f8777a7c282b4b15f004e22ebf5c6b6751b82f87 | [
"Apache-2.0"
] | null | null | null | filter-out-embedded-spaces.py | thanm/devel-scripts | f8777a7c282b4b15f004e22ebf5c6b6751b82f87 | [
"Apache-2.0"
] | 3 | 2019-05-18T23:01:33.000Z | 2021-09-18T14:17:10.000Z | #!/usr/bin/python3
"""Filter out input lines that have embedded spaces or quotes.
Read std input, filter out any line with embedded spaces or quotes. Intended to
screen out things that could cause problems with "ctags".
"""
import re
import sys
import script_utils as u
# Setup
u.setdeflanglocale()
match1 = re.co... | 18.580645 | 79 | 0.678819 |
import re
import sys
import script_utils as u
u.setdeflanglocale()
match1 = re.compile(r"^.*[^\s]+\s+[^\s]+.*$")
match2 = re.compile(r"^.*[\'\"]+.*$")
# Read
lines = sys.stdin.readlines()
for line in lines:
res1 = match1.match(line)
if res1:
continue
res2 = match2.match(line)
if res2:
continue
s... | true | true |
f77637e5190aea6c07024f09ccab2948a6a0cd58 | 140 | py | Python | python3/problem2.py | gideondsouza/projecteuler-multilingual | 83ff2bcc24009f608804df3e7be6377957bb4cfb | [
"MIT"
] | null | null | null | python3/problem2.py | gideondsouza/projecteuler-multilingual | 83ff2bcc24009f608804df3e7be6377957bb4cfb | [
"MIT"
] | null | null | null | python3/problem2.py | gideondsouza/projecteuler-multilingual | 83ff2bcc24009f608804df3e7be6377957bb4cfb | [
"MIT"
] | null | null | null | a = 0
b = 1
c = 0
A = 0
while c <= (4 * 1000*1000):
c = a + b
if c % 2 == 0:
A = A + c
a = b
b = c
print(A)
| 9.333333 | 27 | 0.314286 | a = 0
b = 1
c = 0
A = 0
while c <= (4 * 1000*1000):
c = a + b
if c % 2 == 0:
A = A + c
a = b
b = c
print(A)
| true | true |
f77637f02ccfba5d29c4e76c9ef3efba03351bef | 748 | py | Python | pyscf/lib/test/test_linalg_helper.py | nmardirossian/pyscf | 57c8912dcfcc1157a822feede63df54ed1067115 | [
"BSD-2-Clause"
] | 1 | 2018-05-02T19:55:30.000Z | 2018-05-02T19:55:30.000Z | pyscf/lib/test/test_linalg_helper.py | nmardirossian/pyscf | 57c8912dcfcc1157a822feede63df54ed1067115 | [
"BSD-2-Clause"
] | null | null | null | pyscf/lib/test/test_linalg_helper.py | nmardirossian/pyscf | 57c8912dcfcc1157a822feede63df54ed1067115 | [
"BSD-2-Clause"
] | 1 | 2018-12-06T03:10:50.000Z | 2018-12-06T03:10:50.000Z | #
# Author: Qiming Sun <osirpt.sun@gmail.com>
#
import unittest
import numpy
import scipy.linalg
import tempfile
from pyscf import gto
from pyscf import scf
from pyscf import fci
class KnowValues(unittest.TestCase):
def test_davidson(self):
mol = gto.Mole()
mol.verbose = 0
mol.atom = [['H'... | 24.129032 | 74 | 0.614973 |
import unittest
import numpy
import scipy.linalg
import tempfile
from pyscf import gto
from pyscf import scf
from pyscf import fci
class KnowValues(unittest.TestCase):
def test_davidson(self):
mol = gto.Mole()
mol.verbose = 0
mol.atom = [['H', (0,0,i)] for i in range(8)]
mol.basis ... | true | true |
f7763823cbda6a6c508b3a1d4a4ffb6ca5ed80fd | 21,095 | py | Python | ibis/backends/spark/client.py | jreback/ibis | fdcca59b085416b1311eb268be3886abad1db230 | [
"Apache-2.0"
] | 1 | 2020-08-19T03:36:26.000Z | 2020-08-19T03:36:26.000Z | ibis/backends/spark/client.py | jreback/ibis | fdcca59b085416b1311eb268be3886abad1db230 | [
"Apache-2.0"
] | null | null | null | ibis/backends/spark/client.py | jreback/ibis | fdcca59b085416b1311eb268be3886abad1db230 | [
"Apache-2.0"
] | 2 | 2020-11-27T22:21:50.000Z | 2021-04-03T09:36:25.000Z | import pandas as pd
import pyspark as ps
import regex as re
import toolz
from pkg_resources import parse_version
import ibis.common.exceptions as com
import ibis.expr.datatypes as dt
import ibis.expr.lineage as lin
import ibis.expr.operations as ops
import ibis.expr.schema as sch
import ibis.expr.types as ir
from ibis... | 27.43173 | 79 | 0.581986 | import pandas as pd
import pyspark as ps
import regex as re
import toolz
from pkg_resources import parse_version
import ibis.common.exceptions as com
import ibis.expr.datatypes as dt
import ibis.expr.lineage as lin
import ibis.expr.operations as ops
import ibis.expr.schema as sch
import ibis.expr.types as ir
from ibis... | true | true |
f776386b684a54bd4c7e26fb8772022a7769031c | 1,046 | py | Python | pyformlang/finite_automaton/doubly_linked_node.py | IlyaEp/pyformlang | eef239844beff5e9da3be4a4a240440ece81c10b | [
"MIT"
] | 15 | 2020-06-25T14:38:27.000Z | 2022-03-09T17:55:07.000Z | pyformlang/finite_automaton/doubly_linked_node.py | IlyaEp/pyformlang | eef239844beff5e9da3be4a4a240440ece81c10b | [
"MIT"
] | 11 | 2020-09-23T09:48:35.000Z | 2021-08-24T08:37:47.000Z | pyformlang/finite_automaton/doubly_linked_node.py | IlyaEp/pyformlang | eef239844beff5e9da3be4a4a240440ece81c10b | [
"MIT"
] | 5 | 2020-03-08T19:00:17.000Z | 2021-08-15T12:38:05.000Z | """Linked nodes in both direction"""
class DoublyLinkedNode:
"""Represents doubly linked list of nodes from a doubly linked list"""
def __init__(self,
list_in,
next_node=None,
previous_node=None,
value=None):
self.next_node = next_no... | 24.904762 | 79 | 0.546845 |
class DoublyLinkedNode:
def __init__(self,
list_in,
next_node=None,
previous_node=None,
value=None):
self.next_node = next_node
self.previous_node = previous_node
self.value = value
self.list_in = list_in
def... | true | true |
f7763a12c7ed3bb384fb27153b6eb1f0dcfe0929 | 712 | py | Python | adafruit_lsm6ds/lsm6dsox.py | Ninic0c0/Adafruit_CircuitPython_LSM6DS | f6748a3737e739e1815ef65f6d29b5052cc7f3ab | [
"Unlicense",
"MIT-0",
"MIT"
] | null | null | null | adafruit_lsm6ds/lsm6dsox.py | Ninic0c0/Adafruit_CircuitPython_LSM6DS | f6748a3737e739e1815ef65f6d29b5052cc7f3ab | [
"Unlicense",
"MIT-0",
"MIT"
] | 1 | 2021-08-09T17:12:30.000Z | 2021-08-09T17:12:30.000Z | adafruit_lsm6ds/lsm6dsox.py | Ninic0c0/Adafruit_CircuitPython_LSM6DS | f6748a3737e739e1815ef65f6d29b5052cc7f3ab | [
"Unlicense",
"MIT-0",
"MIT"
] | null | null | null | # SPDX-FileCopyrightText: Copyright (c) 2020 Bryan Siepert for Adafruit Industries
#
# SPDX-License-Identifier: MIT
"""
This module provides the LSM6DSOX subclass of LSM6DS for using LSM6DSOX sensors.
"""
from . import LSM6DS, LSM6DS_DEFAULT_ADDRESS, LSM6DS_CHIP_ID
class LSM6DSOX(LSM6DS): # pylint: disable=too-many-... | 30.956522 | 82 | 0.740169 | from . import LSM6DS, LSM6DS_DEFAULT_ADDRESS, LSM6DS_CHIP_ID
class LSM6DSOX(LSM6DS):
CHIP_ID = LSM6DS_CHIP_ID
def __init__(self, i2c_bus, address=LSM6DS_DEFAULT_ADDRESS):
super().__init__(i2c_bus, address)
self._i3c_disable = True
| true | true |
f7763a5ce8a25713398a7108d7289c3e9315a224 | 51,835 | py | Python | graph/ap (0, 0, 0), 12 sect, mob 4 sect/dynamic/degree variation, 3 slots, 25 stations/with 0/avg_dist.py | KESHAmambo/IEEE_802_11ad_beamforming_simulation | 93328a41d9c044ee7596d02e360fb3b5f2250ec0 | [
"MIT"
] | null | null | null | graph/ap (0, 0, 0), 12 sect, mob 4 sect/dynamic/degree variation, 3 slots, 25 stations/with 0/avg_dist.py | KESHAmambo/IEEE_802_11ad_beamforming_simulation | 93328a41d9c044ee7596d02e360fb3b5f2250ec0 | [
"MIT"
] | null | null | null | graph/ap (0, 0, 0), 12 sect, mob 4 sect/dynamic/degree variation, 3 slots, 25 stations/with 0/avg_dist.py | KESHAmambo/IEEE_802_11ad_beamforming_simulation | 93328a41d9c044ee7596d02e360fb3b5f2250ec0 | [
"MIT"
] | null | null | null | """
Distribution plot options
=========================
"""
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
avgArr0 = [684.0322959592726, 884.7363009861817, 888.8322884189091, 942.080300986182, 970.7522934458182, 991.2322959592727, 991.2323009861818, 1011.712300986182, 1036.288295959273, 104... | 1,234.166667 | 9,854 | 0.843542 | import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
avgArr0 = [684.0322959592726, 884.7363009861817, 888.8322884189091, 942.080300986182, 970.7522934458182, 991.2322959592727, 991.2323009861818, 1011.712300986182, 1036.288295959273, 1044.4803034996364, 1060.8642859054546, 1069.056306013091, 1077.... | true | true |
f7763a98cf81937688e5a72fc0dc24660528fee4 | 648 | py | Python | app/__init__.py | rafagarciac/fmgorders | 8602ae171b11952f4ea1918dd55a80418bc855f5 | [
"MIT"
] | null | null | null | app/__init__.py | rafagarciac/fmgorders | 8602ae171b11952f4ea1918dd55a80418bc855f5 | [
"MIT"
] | null | null | null | app/__init__.py | rafagarciac/fmgorders | 8602ae171b11952f4ea1918dd55a80418bc855f5 | [
"MIT"
] | null | null | null |
# Payment Choices
# ------------------------------
PAYMENT_BIZUM = "BIZUM"
PAYMENT_TRANSFER = "TRANSFER"
PAYMENT_CASH = "CASH"
PAYMENT_CARD = "CARD"
PAYMENT_WEB = "WEB"
PAYMENT_TYPES_CHOICE = [
(PAYMENT_BIZUM, 'Bizum'),
(PAYMENT_TRANSFER, 'Transferencia'),
(PAYMENT_CASH, 'Efectivo'),
(PAYMENT_CARD, 'T... | 20.903226 | 40 | 0.608025 |
PAYMENT_BIZUM = "BIZUM"
PAYMENT_TRANSFER = "TRANSFER"
PAYMENT_CASH = "CASH"
PAYMENT_CARD = "CARD"
PAYMENT_WEB = "WEB"
PAYMENT_TYPES_CHOICE = [
(PAYMENT_BIZUM, 'Bizum'),
(PAYMENT_TRANSFER, 'Transferencia'),
(PAYMENT_CASH, 'Efectivo'),
(PAYMENT_CARD, 'Tarjeta'),
(PAYMENT_WEB, 'Web'),
]
SHOP_FRUIT =... | true | true |
f7763b0d4b9917b350aafb53cdad96d00e5d6e26 | 2,254 | py | Python | maskrcnn_benchmark/modeling/domain_adaption/LabelResizeLayer.py | dliu5812/PDAM | 09a5511e6bd10158ea06771c63be3150982b9fe3 | [
"MIT"
] | 19 | 2021-05-16T13:58:58.000Z | 2022-03-08T18:46:58.000Z | maskrcnn_benchmark/modeling/domain_adaption/LabelResizeLayer.py | dliu5812/PDAM | 09a5511e6bd10158ea06771c63be3150982b9fe3 | [
"MIT"
] | 4 | 2021-04-30T04:03:45.000Z | 2021-07-20T01:46:32.000Z | maskrcnn_benchmark/modeling/domain_adaption/LabelResizeLayer.py | dliu5812/PDAM | 09a5511e6bd10158ea06771c63be3150982b9fe3 | [
"MIT"
] | 5 | 2021-05-16T13:58:59.000Z | 2022-03-21T20:04:54.000Z | #
# from __future__ import absolute_import
# from __future__ import division
# from __future__ import print_function
import random
import torch
import torch.nn.functional as F
import torchvision.models as models
from torch.autograd import Variable
import numpy as np
import torch.nn as nn
from torch.autograd import Func... | 29.272727 | 107 | 0.645963 | import random
import torch
import torch.nn.functional as F
import torchvision.models as models
from torch.autograd import Variable
import numpy as np
import torch.nn as nn
from torch.autograd import Function
import cv2
class ImageLabelResizeLayer(nn.Module):
def __init__(self):
super(ImageLabelResizeLayer... | true | true |
f7763b29fecf417d58dc08e0810729df0f2d2a4a | 444 | py | Python | Page/home_page.py | Sanmejie/my_app_test | 784a7263b30b0c1c676df9a3f5550bafe39ccf11 | [
"Apache-2.0"
] | 2 | 2020-12-04T11:24:20.000Z | 2021-11-29T02:48:33.000Z | Page/home_page.py | Sanmejie/my_app_test | 784a7263b30b0c1c676df9a3f5550bafe39ccf11 | [
"Apache-2.0"
] | null | null | null | Page/home_page.py | Sanmejie/my_app_test | 784a7263b30b0c1c676df9a3f5550bafe39ccf11 | [
"Apache-2.0"
] | null | null | null | from Base.Base import Base
import Page
'''
首页操作
'''
class xx_course_Page(Base):
def __init__(self, driver):
Base.__init__(self, driver)
def for_click_sy_element(self):
"""
循环点击首页元素
:return:
"""
self.click_elements(Page.sy_login_lsit_fun(), 3)
def click_sy... | 17.076923 | 56 | 0.578829 | from Base.Base import Base
import Page
class xx_course_Page(Base):
def __init__(self, driver):
Base.__init__(self, driver)
def for_click_sy_element(self):
self.click_elements(Page.sy_login_lsit_fun(), 3)
def click_sy_login_btn(self):
self.click_element(Page.sy_login_btn_XPATH)
| true | true |
f7763eb3493e49ae53cbaa6fd8e34d7c07ea7902 | 4,062 | py | Python | mne/_digitization/base.py | fmamashli/mne-python | 52f064415e7c9fa8fe243d22108dcdf3d86505b9 | [
"BSD-3-Clause"
] | null | null | null | mne/_digitization/base.py | fmamashli/mne-python | 52f064415e7c9fa8fe243d22108dcdf3d86505b9 | [
"BSD-3-Clause"
] | 23 | 2017-09-12T11:08:26.000Z | 2019-10-04T11:11:29.000Z | mne/_digitization/base.py | fmamashli/mne-python | 52f064415e7c9fa8fe243d22108dcdf3d86505b9 | [
"BSD-3-Clause"
] | 3 | 2019-01-28T13:48:00.000Z | 2019-07-10T16:02:11.000Z | # -*- coding: utf-8 -*-
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Eric Larson <larson.eric.d@gmail.com>
# Joan Massich <mailsik@gmail.com>
#
# License: BSD (3-clause)
import numpy as np
from copy import deepcopy
from collections import Counter
from ..transforms import _coord_frame... | 32.496 | 78 | 0.599705 | import numpy as np
from copy import deepcopy
from collections import Counter
from ..transforms import _coord_frame_name
from ..io.constants import FIFF
_dig_kind_dict = {
'cardinal': FIFF.FIFFV_POINT_CARDINAL,
'hpi': FIFF.FIFFV_POINT_HPI,
'eeg': FIFF.FIFFV_POINT_EEG,
'extra': FIFF.FIFFV_POINT_EXTRA,
}... | true | true |
f7763eb44367362027f747d6cce92d9b3a290aad | 5,035 | py | Python | mrjob/churn-overtime.py | Mozilla-GitHub-Standards/ce91164173c0b5da42b1030f1a619285c0641c5a6e8ee36dbb70c4e396ad1811 | aa25e7deb29b1244b7a0732eb08af7aced1bb9cf | [
"Apache-2.0"
] | 1 | 2015-01-05T16:52:24.000Z | 2015-01-05T16:52:24.000Z | mrjob/churn-overtime.py | Mozilla-GitHub-Standards/ce91164173c0b5da42b1030f1a619285c0641c5a6e8ee36dbb70c4e396ad1811 | aa25e7deb29b1244b7a0732eb08af7aced1bb9cf | [
"Apache-2.0"
] | 3 | 2015-04-22T17:59:41.000Z | 2019-03-30T15:59:34.000Z | mrjob/churn-overtime.py | Mozilla-GitHub-Standards/ce91164173c0b5da42b1030f1a619285c0641c5a6e8ee36dbb70c4e396ad1811 | aa25e7deb29b1244b7a0732eb08af7aced1bb9cf | [
"Apache-2.0"
] | 3 | 2015-04-22T23:36:50.000Z | 2019-03-30T15:59:36.000Z | """
Analyze a range of dates for new and lost Firefox profiles.
"""
import healthreportutils
from datetime import date, datetime, timedelta
import os, shutil, csv
import sys, codecs
import traceback
import mrjob
from mrjob.job import MRJob
import tempfile
try:
import simplejson as json
except ImportError:
im... | 27.81768 | 91 | 0.603575 |
import healthreportutils
from datetime import date, datetime, timedelta
import os, shutil, csv
import sys, codecs
import traceback
import mrjob
from mrjob.job import MRJob
import tempfile
try:
import simplejson as json
except ImportError:
import json
DAYS_PER_WEEK = 7
TOTAL_DAYS = 168
LAG_WEEKS = 4
TOTAL_... | true | true |
f77640480f2b581f78f8d382b7712a515cc408f9 | 1,848 | py | Python | day10_Optimization_and_Regularization_in_DL/notmnist.py | Burntt/MastersMachineLearning | 1037c4520b1018365499661481d62dc5d28580e1 | [
"MIT"
] | 2 | 2021-04-19T23:43:06.000Z | 2022-03-27T19:02:09.000Z | week0_03_logistic/notmnist.py | ivasio/ml-mipt | 9c8896b4dfe46ee02bc5fdbca47acffbeca6828e | [
"MIT"
] | null | null | null | week0_03_logistic/notmnist.py | ivasio/ml-mipt | 9c8896b4dfe46ee02bc5fdbca47acffbeca6828e | [
"MIT"
] | 2 | 2021-04-19T23:44:01.000Z | 2021-05-03T09:58:21.000Z | import os
from glob import glob
import numpy as np
from matplotlib.pyplot import imread
from sklearn.model_selection import train_test_split
def load_notmnist(
path="./notMNIST_small", letters="ABCDEFGHIJ", img_shape=(28, 28), test_size=0.25, one_hot=False
):
# download data if it's missing. If you have any... | 32.421053 | 110 | 0.597403 | import os
from glob import glob
import numpy as np
from matplotlib.pyplot import imread
from sklearn.model_selection import train_test_split
def load_notmnist(
path="./notMNIST_small", letters="ABCDEFGHIJ", img_shape=(28, 28), test_size=0.25, one_hot=False
):
if not os.path.exists(path):
if not ... | true | true |
f77640754336bc108a98075c772a6cf7930985a7 | 1,773 | py | Python | other/merger.py | RichardLeeK/MachineLearning | 5d4194dc54e5c25beeaf0d16c249bb07cf622364 | [
"MIT"
] | 1 | 2017-08-17T11:30:26.000Z | 2017-08-17T11:30:26.000Z | other/merger.py | RichardLeeK/MachineLearning | 5d4194dc54e5c25beeaf0d16c249bb07cf622364 | [
"MIT"
] | null | null | null | other/merger.py | RichardLeeK/MachineLearning | 5d4194dc54e5c25beeaf0d16c249bb07cf622364 | [
"MIT"
] | null | null | null | import os
class FileInfo:
def __init__(self, lines):
self.features = lines[0].strip().split(',')[1:]
self.data = {}
self.file = lines[1].split(',')[0].split('_')[0]
for line in lines[1:]:
sl = line.split(',')
v = {}
for i in range(1, len(sl)):
if 'NULL' in sl[i]:
v... | 29.55 | 63 | 0.551607 | import os
class FileInfo:
def __init__(self, lines):
self.features = lines[0].strip().split(',')[1:]
self.data = {}
self.file = lines[1].split(',')[0].split('_')[0]
for line in lines[1:]:
sl = line.split(',')
v = {}
for i in range(1, len(sl)):
if 'NULL' in sl[i]:
v... | true | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.