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
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
1c353f5245e4b041683e3947627ee7976e474c94
17,653
py
Python
tradingbot/components/broker/ig_interface.py
ajmal017/TradingBot-3
4a75562fb621d135d83b1770a3943fc9898adb66
[ "MIT" ]
null
null
null
tradingbot/components/broker/ig_interface.py
ajmal017/TradingBot-3
4a75562fb621d135d83b1770a3943fc9898adb66
[ "MIT" ]
19
2021-11-03T12:19:06.000Z
2022-03-30T12:28:29.000Z
tradingbot/components/broker/ig_interface.py
zacharyrgonzales/TradingBot
cb29c0cacc7ec655b79ad485492b265465068e84
[ "MIT" ]
1
2020-08-16T02:29:45.000Z
2020-08-16T02:29:45.000Z
import json import logging from enum import Enum from typing import Any, Dict, List, Optional import pandas import requests from ...interfaces import Market, MarketHistory, MarketMACD, Position from .. import Interval, TradeDirection, Utils from . import AccountBalances, AccountInterface, StocksInterface class IG_A...
36.624481
88
0.562511
import json import logging from enum import Enum from typing import Any, Dict, List, Optional import pandas import requests from ...interfaces import Market, MarketHistory, MarketMACD, Position from .. import Interval, TradeDirection, Utils from . import AccountBalances, AccountInterface, StocksInterface class IG_A...
true
true
1c353fccf7a39706f3f78621959aee8a1fa094d1
1,181
py
Python
cern_access/indico_cern_access/models/access_request_regforms.py
ThiefMaster/indico-plugins-cern
0082a66dd21ac093c1a31316d12c338f52ffe2d0
[ "MIT" ]
4
2019-02-12T05:08:56.000Z
2022-03-09T23:43:18.000Z
cern_access/indico_cern_access/models/access_request_regforms.py
ThiefMaster/indico-plugins-cern
0082a66dd21ac093c1a31316d12c338f52ffe2d0
[ "MIT" ]
40
2017-11-08T15:08:50.000Z
2022-03-28T15:09:51.000Z
cern_access/indico_cern_access/models/access_request_regforms.py
ThiefMaster/indico-plugins-cern
0082a66dd21ac093c1a31316d12c338f52ffe2d0
[ "MIT" ]
15
2017-11-08T12:35:59.000Z
2022-01-13T15:16:42.000Z
# This file is part of the CERN Indico plugins. # Copyright (C) 2014 - 2021 CERN # # The CERN Indico plugins are free software; you can redistribute # them and/or modify them under the terms of the MIT License; see # the LICENSE file for more details. from sqlalchemy.ext.hybrid import hybrid_property from indico.core...
28.119048
76
0.703641
from sqlalchemy.ext.hybrid import hybrid_property from indico.core.db.sqlalchemy import PyIntEnum, db from indico_cern_access.models.access_requests import CERNAccessRequestState class CERNAccessRequestRegForm(db.Model): __tablename__ = 'access_request_regforms' __table_args__ = {'schema': 'plugin_cern_acc...
true
true
1c353ffb374352e83aaa13aa425b716aa22909aa
101
py
Python
bike_app/constants.py
Himanshu372/Bike-pool-app
937936e9a09a71224f74bfd25dd52a98df35f267
[ "MIT" ]
3
2021-02-18T17:06:09.000Z
2021-09-17T07:52:58.000Z
bike_app/constants.py
Himanshu372/Bike_pool_app
937936e9a09a71224f74bfd25dd52a98df35f267
[ "MIT" ]
10
2020-07-30T17:37:29.000Z
2021-06-09T18:21:09.000Z
bike_app/constants.py
Himanshu372/Bike-pool-app
937936e9a09a71224f74bfd25dd52a98df35f267
[ "MIT" ]
1
2020-05-03T13:00:01.000Z
2020-05-03T13:00:01.000Z
MAPQUEST_URL = 'http://www.mapquestapi.com/geocoding/v1/address?key=SsRGOwY10OEkejYJYB2ACoaUiNtDDoIv'
101
101
0.851485
MAPQUEST_URL = 'http://www.mapquestapi.com/geocoding/v1/address?key=SsRGOwY10OEkejYJYB2ACoaUiNtDDoIv'
true
true
1c3540843dbf08b1d3859f0070518a82ffe0a3c8
14,738
py
Python
GAT_prediction.py
897741007/EIAA
94a071687eb387f199f9d8a82848a40ef2a6f5d7
[ "Apache-2.0" ]
null
null
null
GAT_prediction.py
897741007/EIAA
94a071687eb387f199f9d8a82848a40ef2a6f5d7
[ "Apache-2.0" ]
null
null
null
GAT_prediction.py
897741007/EIAA
94a071687eb387f199f9d8a82848a40ef2a6f5d7
[ "Apache-2.0" ]
null
null
null
import torch from torch import nn import numpy as np from Smi2Graph import SMI_grapher from time import time import os class GAT_predictor(nn.Module): def __init__(self, hidden_dim, layer_num, head_num, dict_size, dropout=0, bond_influence=0, prediction_class=2, device='cuda'): # param : bond_influence -...
48.640264
141
0.649003
import torch from torch import nn import numpy as np from Smi2Graph import SMI_grapher from time import time import os class GAT_predictor(nn.Module): def __init__(self, hidden_dim, layer_num, head_num, dict_size, dropout=0, bond_influence=0, prediction_class=2, device='cuda'): ...
true
true
1c35411f49c68e3912b5bdc905b7cf0c05c5d8d1
12,490
py
Python
differentiable_robot_model/spatial_vector_algebra.py
Neotriple/differentiable-robot-model
7b3887b5d80ad7d99379962f9f46aabfd4a1c46d
[ "MIT" ]
null
null
null
differentiable_robot_model/spatial_vector_algebra.py
Neotriple/differentiable-robot-model
7b3887b5d80ad7d99379962f9f46aabfd4a1c46d
[ "MIT" ]
null
null
null
differentiable_robot_model/spatial_vector_algebra.py
Neotriple/differentiable-robot-model
7b3887b5d80ad7d99379962f9f46aabfd4a1c46d
[ "MIT" ]
null
null
null
from __future__ import annotations import torch import hydra import math from . import utils from .utils import cross_product def x_rot(angle): if len(angle.shape) == 0: angle = angle.unsqueeze(0) angle = utils.convert_into_at_least_2d_pytorch_tensor(angle).squeeze(1) batch_size = angle.shape[0] ...
35.282486
110
0.569656
from __future__ import annotations import torch import hydra import math from . import utils from .utils import cross_product def x_rot(angle): if len(angle.shape) == 0: angle = angle.unsqueeze(0) angle = utils.convert_into_at_least_2d_pytorch_tensor(angle).squeeze(1) batch_size = angle.shape[0] ...
true
true
1c3543996fec7869a3dff75efacb00046a33f2f5
18,537
py
Python
cryolo_relion_wrapper/cryolo_wrapper_library.py
Luger-Lab/Cryo-EM
3eb62434181d6ce438190230758f6ce0e6b20af8
[ "MIT" ]
1
2020-12-23T20:14:16.000Z
2020-12-23T20:14:16.000Z
cryolo_relion_wrapper/cryolo_wrapper_library.py
Luger-Lab/Cryo-EM
3eb62434181d6ce438190230758f6ce0e6b20af8
[ "MIT" ]
null
null
null
cryolo_relion_wrapper/cryolo_wrapper_library.py
Luger-Lab/Cryo-EM
3eb62434181d6ce438190230758f6ce0e6b20af8
[ "MIT" ]
null
null
null
#!/usr/bin/env python ''' Original version written by Samuel Bowerman (6/22/2021) ''' import os,sys,glob,datetime,itertools,subprocess,shutil import numpy as np def do_denoise(args,logfile): starttime = datetime.datetime.now().strftime("%Y-%m-%d, %H:%M:%S") logfile.write("Beginning 'Denoise' task at "+startti...
50.509537
281
0.68366
import os,sys,glob,datetime,itertools,subprocess,shutil import numpy as np def do_denoise(args,logfile): starttime = datetime.datetime.now().strftime("%Y-%m-%d, %H:%M:%S") logfile.write("Beginning 'Denoise' task at "+starttime+"\n\n") mics_star_path = args.in_mics mics_star_file = open(mics_star_...
true
true
1c354661a0b5ab8bc181ef7729f978760c4b1d9e
192
py
Python
tests/test_docser.py
chrisbrake/docser
3421632f741f075c533db02757b5a778350589f9
[ "BSD-3-Clause" ]
null
null
null
tests/test_docser.py
chrisbrake/docser
3421632f741f075c533db02757b5a778350589f9
[ "BSD-3-Clause" ]
null
null
null
tests/test_docser.py
chrisbrake/docser
3421632f741f075c533db02757b5a778350589f9
[ "BSD-3-Clause" ]
null
null
null
import pytest @pytest.fixture() def docser(): """ Get docser for testing """ import docser return docser def test_import(docser): """ Test importable """ assert docser
13.714286
34
0.640625
import pytest @pytest.fixture() def docser(): import docser return docser def test_import(docser): assert docser
true
true
1c3546cd36759c7190de9c4a0c3e8fc967d1834f
3,864
py
Python
qiskit/extensions/quantum_initializer/ucy.py
tareqdandachi/qiskit-terra
5221fe330adba5529bfa22dc25262ac8e6291aaf
[ "Apache-2.0" ]
3
2019-05-19T17:39:38.000Z
2020-01-28T19:59:18.000Z
qiskit/extensions/quantum_initializer/ucy.py
tareqdandachi/qiskit-terra
5221fe330adba5529bfa22dc25262ac8e6291aaf
[ "Apache-2.0" ]
4
2019-05-13T15:28:46.000Z
2019-12-19T20:47:02.000Z
qiskit/extensions/quantum_initializer/ucy.py
tareqdandachi/qiskit-terra
5221fe330adba5529bfa22dc25262ac8e6291aaf
[ "Apache-2.0" ]
1
2021-07-07T16:55:41.000Z
2021-07-07T16:55:41.000Z
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2019. # # 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 modif...
41.548387
93
0.689182
import math from qiskit import QuantumRegister, QiskitError from qiskit.circuit.quantumcircuit import QuantumCircuit from qiskit.extensions.quantum_initializer.ucrot import UCRot class UCY(UCRot): def __init__(self, angle_list): super().__init__(angle_list, "Y") def ucy(self, angle_list, q_controls,...
true
true
1c3548998c612213f500cd3a9cd72c539e5ad7f3
358
py
Python
smafer/model/base.py
IvanStrazov/smafer
cb7d9d61825aafc77ca05dc19e5fecb7d1632d16
[ "MIT" ]
null
null
null
smafer/model/base.py
IvanStrazov/smafer
cb7d9d61825aafc77ca05dc19e5fecb7d1632d16
[ "MIT" ]
null
null
null
smafer/model/base.py
IvanStrazov/smafer
cb7d9d61825aafc77ca05dc19e5fecb7d1632d16
[ "MIT" ]
null
null
null
# utf-8 # Python 3.9 # 2021-05-03 from abc import abstractmethod, ABC import pandas as pd class __BaseModel(ABC): @abstractmethod def __init__(self, estimator, *args, **kwargs) -> None: pass @abstractmethod def fit(self, *args, **kwargs) -> pd.Series: pass @abstractmethod def predict(self...
17.9
64
0.662011
from abc import abstractmethod, ABC import pandas as pd class __BaseModel(ABC): @abstractmethod def __init__(self, estimator, *args, **kwargs) -> None: pass @abstractmethod def fit(self, *args, **kwargs) -> pd.Series: pass @abstractmethod def predict(self, *args, **kwargs) -> pd.Series: p...
true
true
1c354959b30f4bf8c734c6341435f0425bcbf8a1
1,024
py
Python
app/app/urls.py
osamada/recipe-app-api
9246e955392bd648539f20619b3039ea3d24b6d5
[ "MIT" ]
null
null
null
app/app/urls.py
osamada/recipe-app-api
9246e955392bd648539f20619b3039ea3d24b6d5
[ "MIT" ]
null
null
null
app/app/urls.py
osamada/recipe-app-api
9246e955392bd648539f20619b3039ea3d24b6d5
[ "MIT" ]
null
null
null
"""app URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based vie...
37.925926
77
0.709961
from django.contrib import admin from django.urls import path, include from django.conf.urls.static import static from django.conf import settings urlpatterns = [ path('admin/', admin.site.urls), path('api/user/', include('user.urls')), path('api/recipe/', include('recipe.urls')), path('', include('hom...
true
true
1c354a615dd5e8945e46ebed1cc944d5cf077255
18,002
py
Python
supports/pyload/src/pyload/plugins/base/simple_downloader.py
LuckyNicky/pycrawler
4b3fe2f6e8e51f236d95a64a89a44199e4e97743
[ "Apache-2.0" ]
1
2020-04-02T17:03:39.000Z
2020-04-02T17:03:39.000Z
supports/pyload/src/pyload/plugins/base/simple_downloader.py
LuckyNicky/pycrawler
4b3fe2f6e8e51f236d95a64a89a44199e4e97743
[ "Apache-2.0" ]
null
null
null
supports/pyload/src/pyload/plugins/base/simple_downloader.py
LuckyNicky/pycrawler
4b3fe2f6e8e51f236d95a64a89a44199e4e97743
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import os import re from ...core.network.http.exceptions import BadHeader from ...core.network.request_factory import get_url from ...core.utils import parse from ...core.utils.old import parse_name from ..helpers import replace_patterns from .downloader import BaseDownloader class SimpleDow...
35.160156
140
0.55205
import os import re from ...core.network.http.exceptions import BadHeader from ...core.network.request_factory import get_url from ...core.utils import parse from ...core.utils.old import parse_name from ..helpers import replace_patterns from .downloader import BaseDownloader class SimpleDownloader(BaseDownloader):...
true
true
1c354aa3f18c72b34bc506ed91b7e96cfa3c03a4
41,250
py
Python
tests/conftest.py
deniscapeto/SimpleCorreiosTrackingService
e96bcec580dc6cd2cc89c0e8e038270d40d19164
[ "MIT" ]
null
null
null
tests/conftest.py
deniscapeto/SimpleCorreiosTrackingService
e96bcec580dc6cd2cc89c0e8e038270d40d19164
[ "MIT" ]
12
2020-06-05T23:26:54.000Z
2021-10-02T09:36:41.000Z
tests/conftest.py
deniscapeto/SimpleCorreiosTrackingService
e96bcec580dc6cd2cc89c0e8e038270d40d19164
[ "MIT" ]
1
2019-10-11T00:32:06.000Z
2019-10-11T00:32:06.000Z
import pytest from scts.tracking.domain.models import TrackingEvent @pytest.fixture def fake_html(): return """ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <meta http-equiv="X-UA-Compatible" content="IE=EDGE,chrome=1" /> <html lang="pt-br"> <head> <meta ...
52.347716
1,114
0.613939
import pytest from scts.tracking.domain.models import TrackingEvent @pytest.fixture def fake_html(): return """ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <meta http-equiv="X-UA-Compatible" content="IE=EDGE,chrome=1" /> <html lang="pt-br"> <head> <meta ...
true
true
1c354b08bcf0fd5ba912adfd753b709ddd75dd45
21,566
py
Python
tests/text_quotations_test.py
joelthe1/talon
18de8bc35d8457a5ddfae1e52b9ee995422b4884
[ "Apache-2.0" ]
null
null
null
tests/text_quotations_test.py
joelthe1/talon
18de8bc35d8457a5ddfae1e52b9ee995422b4884
[ "Apache-2.0" ]
null
null
null
tests/text_quotations_test.py
joelthe1/talon
18de8bc35d8457a5ddfae1e52b9ee995422b4884
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import absolute_import from tests.fixtures import STANDARD_REPLIES from talon import quotations from six.moves import range from nose.tools import eq_ from mock import patch import email.iterators import six import os @patch.object(quotations, 'MAX_LINES_COUNT', 1) def test_t...
25.135198
142
0.648011
from __future__ import absolute_import from tests.fixtures import STANDARD_REPLIES from talon import quotations from six.moves import range from nose.tools import eq_ from mock import patch import email.iterators import six import os @patch.object(quotations, 'MAX_LINES_COUNT', 1) def test_too_many_lines(): msg...
true
true
1c354b93e7aa0731074c6f491615d8409cc656ae
3,151
py
Python
axelrod/tests/strategies/test_darwin.py
dashiellfryer/Axelrod
0d684b3273d15e3e0ecf70be8e893fffc5277c84
[ "MIT" ]
null
null
null
axelrod/tests/strategies/test_darwin.py
dashiellfryer/Axelrod
0d684b3273d15e3e0ecf70be8e893fffc5277c84
[ "MIT" ]
null
null
null
axelrod/tests/strategies/test_darwin.py
dashiellfryer/Axelrod
0d684b3273d15e3e0ecf70be8e893fffc5277c84
[ "MIT" ]
null
null
null
"""Tests for the Darwin PD strategy.""" import axelrod from .test_player import TestPlayer C, D = axelrod.Action.C, axelrod.Action.D class TestDarwin(TestPlayer): name = "Darwin" player = axelrod.Darwin expected_classifier = { "memory_depth": float("inf"), "stochastic": False, ...
29.726415
86
0.579499
import axelrod from .test_player import TestPlayer C, D = axelrod.Action.C, axelrod.Action.D class TestDarwin(TestPlayer): name = "Darwin" player = axelrod.Darwin expected_classifier = { "memory_depth": float("inf"), "stochastic": False, "makes_use_of": set(), "long_run...
true
true
1c354d8943d8ae1c961e81b29a5162cdf06ad82e
12,600
py
Python
vega/trainer/callbacks/timm_trainer_callback.py
jie311/vega
1bba6100ead802697e691403b951e6652a99ccae
[ "MIT" ]
null
null
null
vega/trainer/callbacks/timm_trainer_callback.py
jie311/vega
1bba6100ead802697e691403b951e6652a99ccae
[ "MIT" ]
null
null
null
vega/trainer/callbacks/timm_trainer_callback.py
jie311/vega
1bba6100ead802697e691403b951e6652a99ccae
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved. # This program is free software; you can redistribute it and/or modify # it under the terms of the MIT License. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the...
38.650307
104
0.620794
import os import importlib import torch from timm import create_model from timm.optim.optim_factory import create_optimizer, add_weight_decay from timm.scheduler import create_scheduler from timm.data import Dataset, create_transform from timm.utils import ModelEma from timm.data.constants import IMAGENET_DEFAULT_ME...
true
true
1c354deb3b550e52959d47cde1cd5797407f7e48
394
py
Python
.idea/para.py
alinaskukina/sql
2600f29049a8e1613114db99f99f102677806ec8
[ "MIT" ]
null
null
null
.idea/para.py
alinaskukina/sql
2600f29049a8e1613114db99f99f102677806ec8
[ "MIT" ]
null
null
null
.idea/para.py
alinaskukina/sql
2600f29049a8e1613114db99f99f102677806ec8
[ "MIT" ]
null
null
null
cursor.execute('create index salary_index on works (salary)') con.commit() # количество всех записей ursor.execute('SELECT COUNT(*) FROM works') print(cursor.fetchall()[0][0]) # men cursor.execute('SELECT COUNT(*) FROM works where gender = "Мужской"') print(cursor.fetchall()[0][0]) # women cursor.execute('SELECT COU...
28.142857
69
0.720812
cursor.execute('create index salary_index on works (salary)') con.commit() ursor.execute('SELECT COUNT(*) FROM works') print(cursor.fetchall()[0][0]) cursor.execute('SELECT COUNT(*) FROM works where gender = "Мужской"') print(cursor.fetchall()[0][0]) cursor.execute('SELECT COUNT(*) FROM works where gender = "Женский...
true
true
1c354f7b9aa064540b311d77ba59af35f5ca76da
4,678
py
Python
machine-learning-box/sentiment-analysis/predict_chainer.py
akito19/treasure-boxes
a70f69944ba40a2561c76fee3f27d47d9b8c68a7
[ "MIT" ]
null
null
null
machine-learning-box/sentiment-analysis/predict_chainer.py
akito19/treasure-boxes
a70f69944ba40a2561c76fee3f27d47d9b8c68a7
[ "MIT" ]
null
null
null
machine-learning-box/sentiment-analysis/predict_chainer.py
akito19/treasure-boxes
a70f69944ba40a2561c76fee3f27d47d9b8c68a7
[ "MIT" ]
null
null
null
import json import os import sys import tarfile from logging import DEBUG, StreamHandler, getLogger import numpy os.system(f"{sys.executable} -m pip install -U pytd==0.8.0 td-client") import pytd.pandas_td as td os.system(f"{sys.executable} -m pip install -U chainer") import chainer from chainer_utils import nets,...
28.876543
86
0.655622
import json import os import sys import tarfile from logging import DEBUG, StreamHandler, getLogger import numpy os.system(f"{sys.executable} -m pip install -U pytd==0.8.0 td-client") import pytd.pandas_td as td os.system(f"{sys.executable} -m pip install -U chainer") import chainer from chainer_utils import nets,...
true
true
1c354fd7ffeee53ea700310aab7c29b591e64050
6,100
py
Python
docs/source/conf.py
SimulatedANeal/carpedm
22bd5d28cfff50d7462e2a8e1b8dc1675e2a4c89
[ "MIT" ]
2
2020-09-30T04:59:06.000Z
2021-03-30T20:42:44.000Z
docs/source/conf.py
SimulatedANeal/carpedm
22bd5d28cfff50d7462e2a8e1b8dc1675e2a4c89
[ "MIT" ]
null
null
null
docs/source/conf.py
SimulatedANeal/carpedm
22bd5d28cfff50d7462e2a8e1b8dc1675e2a4c89
[ "MIT" ]
1
2018-05-25T07:15:16.000Z
2018-05-25T07:15:16.000Z
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/stable/config # -- Path setup ------------------------------------------------------------...
30.348259
79
0.643607
import os import sys from unittest.mock import MagicMock sys.path.insert(0, os.path.abspath('./../../')) class Mock(MagicMock): @classmethod def __getattr__(cls, name): return MagicMock() MOCK_MODULES = [ 'numpy', 'tensorflow', 'tensorflow.python.platform', 'tensorflow.python.fram...
true
true
1c355016f0f9b2d0c9b718446060b9de55e60d0c
5,385
py
Python
compiler/testdata/expected/python.asyncio/variety/f_Events_publisher.py
chrisgustavsen-wf/frugal
1140f5ff6a37b248e387d09a7779c7b25a4a92ee
[ "Apache-2.0" ]
null
null
null
compiler/testdata/expected/python.asyncio/variety/f_Events_publisher.py
chrisgustavsen-wf/frugal
1140f5ff6a37b248e387d09a7779c7b25a4a92ee
[ "Apache-2.0" ]
null
null
null
compiler/testdata/expected/python.asyncio/variety/f_Events_publisher.py
chrisgustavsen-wf/frugal
1140f5ff6a37b248e387d09a7779c7b25a4a92ee
[ "Apache-2.0" ]
null
null
null
# # Autogenerated by Frugal Compiler (3.14.1) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # import inspect import sys import traceback from thrift.Thrift import TApplicationException from thrift.Thrift import TMessageType from thrift.Thrift import TType from frugal.exceptions import TApplic...
33.240741
83
0.636769
import inspect import sys import traceback from thrift.Thrift import TApplicationException from thrift.Thrift import TMessageType from thrift.Thrift import TType from frugal.exceptions import TApplicationExceptionType from frugal.middleware import Method from frugal.subscription import FSubscription from frugal.tra...
true
true
1c35517f1fb087b0522b5f6ab5e6f6c74382dc96
613
py
Python
optimus/engines/dask/mask.py
niallscc/Optimus
35218401556e5acc4beb2859084128ebcd1ab4e5
[ "Apache-2.0" ]
null
null
null
optimus/engines/dask/mask.py
niallscc/Optimus
35218401556e5acc4beb2859084128ebcd1ab4e5
[ "Apache-2.0" ]
null
null
null
optimus/engines/dask/mask.py
niallscc/Optimus
35218401556e5acc4beb2859084128ebcd1ab4e5
[ "Apache-2.0" ]
null
null
null
from optimus.engines.base.commons.functions import is_string, is_integer, is_float, is_numeric from optimus.engines.base.mask import Mask class DaskMask(Mask): def str(self, col_name="*"): return self.root.cols.apply(col_name, is_string, mode="partitioned") def int(self, col_name="*"): retur...
34.055556
94
0.706362
from optimus.engines.base.commons.functions import is_string, is_integer, is_float, is_numeric from optimus.engines.base.mask import Mask class DaskMask(Mask): def str(self, col_name="*"): return self.root.cols.apply(col_name, is_string, mode="partitioned") def int(self, col_name="*"): retur...
true
true
1c35519920b3991834ea4893aa056ce66a202318
9,077
py
Python
orchestration/ci_helpers.py
danieldiamond/gitlab-analytics
f99e02c95c3a964b01cb14617a43cd5f64ecd88d
[ "MIT" ]
3
2021-07-22T06:44:31.000Z
2022-01-29T05:35:12.000Z
orchestration/ci_helpers.py
danieldiamond/gitlab-analytics
f99e02c95c3a964b01cb14617a43cd5f64ecd88d
[ "MIT" ]
null
null
null
orchestration/ci_helpers.py
danieldiamond/gitlab-analytics
f99e02c95c3a964b01cb14617a43cd5f64ecd88d
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import pandas as pd import sys from atexit import register from fire import Fire from functools import partial from logging import info, error, basicConfig from os import environ as env, remove from subprocess import run, PIPE, Popen, _active, _cleanup from typing import Tuple @register def e...
31.3
123
0.623334
import pandas as pd import sys from atexit import register from fire import Fire from functools import partial from logging import info, error, basicConfig from os import environ as env, remove from subprocess import run, PIPE, Popen, _active, _cleanup from typing import Tuple @register def exit_cleanup(): for...
true
true
1c3551b6915948fa8b32f6f08edf1841ec84fe43
1,511
py
Python
snippet/templatetags/snippet.py
RealGeeks/django-snippet
75f20e69902ba78bda6746b1ac7e8885fbfff698
[ "MIT" ]
null
null
null
snippet/templatetags/snippet.py
RealGeeks/django-snippet
75f20e69902ba78bda6746b1ac7e8885fbfff698
[ "MIT" ]
null
null
null
snippet/templatetags/snippet.py
RealGeeks/django-snippet
75f20e69902ba78bda6746b1ac7e8885fbfff698
[ "MIT" ]
1
2020-11-07T10:22:48.000Z
2020-11-07T10:22:48.000Z
from django import template from ..models import Snippet register = template.Library() default_snippet = { "default": '"New Snippet"', "safe": True, } class snippet_node(template.Node): def __init__(self, name, default): self.name = template.Variable(name) self.default = default def render(self, context)...
23.246154
64
0.712111
from django import template from ..models import Snippet register = template.Library() default_snippet = { "default": '"New Snippet"', "safe": True, } class snippet_node(template.Node): def __init__(self, name, default): self.name = template.Variable(name) self.default = default def render(self, context)...
true
true
1c3551ee0553f10a72ff85a89b3a75edbe3228ac
2,630
py
Python
plugins/modules/snmp_property.py
robertcsapo/dnacenter-ansible
33f776f8c0bc7113da73191c301dd1807e6b4a43
[ "MIT" ]
null
null
null
plugins/modules/snmp_property.py
robertcsapo/dnacenter-ansible
33f776f8c0bc7113da73191c301dd1807e6b4a43
[ "MIT" ]
null
null
null
plugins/modules/snmp_property.py
robertcsapo/dnacenter-ansible
33f776f8c0bc7113da73191c301dd1807e6b4a43
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2021, Cisco Systems # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) DOCUMENTATION = r""" --- module: snmp_property short_description: Manage SnmpProperty objects of Discovery description: - Returns SNMP properties....
27.395833
101
0.702281
DOCUMENTATION = r""" --- module: snmp_property short_description: Manage SnmpProperty objects of Discovery description: - Returns SNMP properties. - Adds SNMP properties. version_added: '1.0.0' author: Rafael Campos (@racampos) options: payload: description: - An object to send in the Request body. - Re...
true
true
1c35527632154c510f110f3ebe027e62bcd3c139
9,322
py
Python
WWW/pycopia/WWW/website.py
kdart/pycopia3
8a7c820f096245411eabbb72345e4f30a35988b6
[ "Apache-2.0" ]
3
2018-11-26T15:00:20.000Z
2022-01-28T23:17:58.000Z
WWW/pycopia/WWW/website.py
kdart/pycopia3
8a7c820f096245411eabbb72345e4f30a35988b6
[ "Apache-2.0" ]
null
null
null
WWW/pycopia/WWW/website.py
kdart/pycopia3
8a7c820f096245411eabbb72345e4f30a35988b6
[ "Apache-2.0" ]
1
2018-11-26T15:00:21.000Z
2018-11-26T15:00:21.000Z
#!/usr/bin/python3.4 # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab # 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 app...
31.6
78
0.63141
import sys import os import socket import traceback from pycopia import basicconfig from pycopia import logging from pycopia import passwd from pycopia import proctools from pycopia.OS import procutils LTCONFIG = "/etc/pycopia/lighttpd/lighttpd.conf" SITE_CONFIG = "/etc/pycopia/website.conf" LIGHTTPD = procuti...
true
true
1c3552d4de8a30c043890bd176251ff14e9a9c7f
10,537
py
Python
keystone-moon/keystone/token/providers/fernet/utils.py
hashnfv/hashnfv-moon
daaba34fa2ed4426bc0fde359e54a5e1b872208c
[ "Apache-2.0" ]
null
null
null
keystone-moon/keystone/token/providers/fernet/utils.py
hashnfv/hashnfv-moon
daaba34fa2ed4426bc0fde359e54a5e1b872208c
[ "Apache-2.0" ]
null
null
null
keystone-moon/keystone/token/providers/fernet/utils.py
hashnfv/hashnfv-moon
daaba34fa2ed4426bc0fde359e54a5e1b872208c
[ "Apache-2.0" ]
1
2021-03-21T11:38:30.000Z
2021-03-21T11:38:30.000Z
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
38.881919
79
0.662617
import os import stat from cryptography import fernet from oslo_config import cfg from oslo_log import log from keystone.i18n import _LE, _LW, _LI LOG = log.getLogger(__name__) CONF = cfg.CONF def validate_key_repository(requires_write=False): # in as None because we don't set allow_no_values to True. ...
true
true
1c35532eedb22971424928ef62d8037c39a834ae
4,061
py
Python
test/circuit/test_european_call_pricing_objective.py
SooluThomas/qiskit-finance
3e25551b55cdfebfeba1b3889a1cb930b83e57e3
[ "Apache-2.0" ]
1
2021-08-04T14:36:22.000Z
2021-08-04T14:36:22.000Z
test/circuit/test_european_call_pricing_objective.py
SooluThomas/qiskit-finance
3e25551b55cdfebfeba1b3889a1cb930b83e57e3
[ "Apache-2.0" ]
null
null
null
test/circuit/test_european_call_pricing_objective.py
SooluThomas/qiskit-finance
3e25551b55cdfebfeba1b3889a1cb930b83e57e3
[ "Apache-2.0" ]
null
null
null
# This code is part of Qiskit. # # (C) Copyright IBM 2020, 2021. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
33.561983
97
0.657474
import unittest from test import QiskitFinanceTestCase import numpy as np from qiskit.utils import algorithm_globals, QuantumInstance from qiskit.algorithms import IterativeAmplitudeEstimation, EstimationProblem from qiskit.circuit.library import LinearAmplitudeFunction, TwoLocal from qiskit.quantum_info import Ope...
true
true
1c3553a19ff3ad671fcce5a890853439829c43a3
184
py
Python
Job-Interviews/Python/Bitwise/Problem1.py
JuanPabloMontoya271/ITC
f5899e7a8fed4e9f90e97bb3af635a276d9cf13a
[ "MIT" ]
1
2020-11-02T15:18:16.000Z
2020-11-02T15:18:16.000Z
Job-Interviews/Python/Bitwise/Problem1.py
JuanPabloMontoya271/ITC
f5899e7a8fed4e9f90e97bb3af635a276d9cf13a
[ "MIT" ]
null
null
null
Job-Interviews/Python/Bitwise/Problem1.py
JuanPabloMontoya271/ITC
f5899e7a8fed4e9f90e97bb3af635a276d9cf13a
[ "MIT" ]
1
2021-10-30T14:18:29.000Z
2021-10-30T14:18:29.000Z
#Count number of 1 bits in a number def count(n): counter = 0 while n: counter+= n&1 n>>=1 return counter count(10) print(bin(10>>2), bin(10))
15.333333
36
0.527174
def count(n): counter = 0 while n: counter+= n&1 n>>=1 return counter count(10) print(bin(10>>2), bin(10))
true
true
1c3554bbe05bcb3a6f3a5c0a1b58842c1085fb45
181
py
Python
config/views.py
joway/python-china
cb3a61ff335c887d2ec65e5948647e056f652eac
[ "MIT" ]
null
null
null
config/views.py
joway/python-china
cb3a61ff335c887d2ec65e5948647e056f652eac
[ "MIT" ]
null
null
null
config/views.py
joway/python-china
cb3a61ff335c887d2ec65e5948647e056f652eac
[ "MIT" ]
null
null
null
from django.shortcuts import render def home(request): return render(request, 'index.html', locals()) def topic(request): return render(request, 'topic.html', locals())
18.1
50
0.707182
from django.shortcuts import render def home(request): return render(request, 'index.html', locals()) def topic(request): return render(request, 'topic.html', locals())
true
true
1c3554f915c34409018ac1e4a215ca1f4cbbbd61
314
py
Python
Scripts/core/native/__init__.py
velocist/TS4CheatsInfo
b59ea7e5f4bd01d3b3bd7603843d525a9c179867
[ "Apache-2.0" ]
null
null
null
Scripts/core/native/__init__.py
velocist/TS4CheatsInfo
b59ea7e5f4bd01d3b3bd7603843d525a9c179867
[ "Apache-2.0" ]
null
null
null
Scripts/core/native/__init__.py
velocist/TS4CheatsInfo
b59ea7e5f4bd01d3b3bd7603843d525a9c179867
[ "Apache-2.0" ]
null
null
null
# uncompyle6 version 3.7.4 # Python bytecode 3.7 (3394) # Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)] # Embedded file name: T:\InGame\Gameplay\Scripts\Core\native\__init__.py # Compiled at: 2014-12-16 01:27:05 # Size of source mod 2**32: 114 bytes pass
44.857143
107
0.719745
pass
true
true
1c3555912590c942e48bfd569e8e2f6c17ba0cf1
23,759
py
Python
dpaygo/storage.py
dpays/dpaygo
d0473799e8e9432a618736a281146d23eb433bf4
[ "MIT" ]
null
null
null
dpaygo/storage.py
dpays/dpaygo
d0473799e8e9432a618736a281146d23eb433bf4
[ "MIT" ]
null
null
null
dpaygo/storage.py
dpays/dpaygo
d0473799e8e9432a618736a281146d23eb433bf4
[ "MIT" ]
null
null
null
# This Python file uses the following encoding: utf-8 from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from builtins import bytes from builtins import object from dpaygographenebase.py23 import py23_bytes, bytes_types im...
35.094535
107
0.593038
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from builtins import bytes from builtins import object from dpaygographenebase.py23 import py23_bytes, bytes_types import shutil import time import os import sqlite3 from ...
true
true
1c3555f8149df493963d51cf18f6e2dc9ec2720b
2,273
py
Python
examples/django_app/example_app/views.py
maclogan/VirtualPenPal
6e95f48d876aea151cd445b3e36ad69be03d5780
[ "BSD-3-Clause" ]
null
null
null
examples/django_app/example_app/views.py
maclogan/VirtualPenPal
6e95f48d876aea151cd445b3e36ad69be03d5780
[ "BSD-3-Clause" ]
null
null
null
examples/django_app/example_app/views.py
maclogan/VirtualPenPal
6e95f48d876aea151cd445b3e36ad69be03d5780
[ "BSD-3-Clause" ]
null
null
null
from django.views.generic.base import TemplateView from django.shortcuts import render, redirect from django.contrib.auth import ( authenticate, login, logout, get_user_model ) from django.views import generic from django.views.generic import View from .forms import UserForm class ChatterBotAppView...
31.136986
71
0.591289
from django.views.generic.base import TemplateView from django.shortcuts import render, redirect from django.contrib.auth import ( authenticate, login, logout, get_user_model ) from django.views import generic from django.views.generic import View from .forms import UserForm class ChatterBotAppView...
true
true
1c3556be885e65be6142efcd0b8f6d82f18ddbe3
6,004
py
Python
twitchio/ext/pubsub/models.py
tesence/TwitchIO
3362a916f5facb2ee9c271c663d229947ae69f0b
[ "MIT" ]
null
null
null
twitchio/ext/pubsub/models.py
tesence/TwitchIO
3362a916f5facb2ee9c271c663d229947ae69f0b
[ "MIT" ]
null
null
null
twitchio/ext/pubsub/models.py
tesence/TwitchIO
3362a916f5facb2ee9c271c663d229947ae69f0b
[ "MIT" ]
null
null
null
""" The MIT License (MIT) Copyright (c) 2017-2021 TwitchIO Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge...
34.113636
118
0.665057
import datetime from typing import List, Optional from twitchio import PartialUser, Client, Channel, CustomReward __all__ = ( "PoolError", "PoolFull", "PubSubMessage", "PubSubBitsMessage", "PubSubBitsBadgeMessage", "PubSubChatMessage", "PubSubBadgeEntitlement", "PubSubChannelPointsMe...
true
true
1c35570e864a58b65e4579108d82304f11faf769
12,093
py
Python
PyStacks/test/templates/test_rds.py
0xack13/PyStacks
13136c43089c241680beb216a233d1846119dd7c
[ "MIT" ]
11
2018-02-15T04:27:05.000Z
2020-10-02T11:20:08.000Z
PyStacks/test/templates/test_rds.py
0xack13/PyStacks
13136c43089c241680beb216a233d1846119dd7c
[ "MIT" ]
3
2018-02-15T05:46:54.000Z
2018-03-05T04:46:51.000Z
PyStacks/test/templates/test_rds.py
0xack13/PyStacks
13136c43089c241680beb216a233d1846119dd7c
[ "MIT" ]
8
2018-03-05T04:40:41.000Z
2021-02-22T08:07:58.000Z
import unittest from PyStacks.PyStacks.template import templateCF class TestTemplate(unittest.TestCase): def test_templateCF_RDSParameterGroup(self): resources = { 'rdsparamsgroup': { 'TestRDSParamGroup': { 'description': 'Some Description...', ...
38.512739
79
0.291987
import unittest from PyStacks.PyStacks.template import templateCF class TestTemplate(unittest.TestCase): def test_templateCF_RDSParameterGroup(self): resources = { 'rdsparamsgroup': { 'TestRDSParamGroup': { 'description': 'Some Description...', ...
true
true
1c35579873b9f27211078b0748c5ed1087adda4a
6,056
py
Python
sb_service/daemons/PostProcessDaemon.py
isabella232/scorebot
71f26a73b04c419ed0ccfbe73575d4b02fa26595
[ "Apache-2.0" ]
63
2019-11-22T23:54:21.000Z
2020-10-15T16:42:34.000Z
sb_service/daemons/PostProcessDaemon.py
isabella232/scorebot
71f26a73b04c419ed0ccfbe73575d4b02fa26595
[ "Apache-2.0" ]
null
null
null
sb_service/daemons/PostProcessDaemon.py
isabella232/scorebot
71f26a73b04c419ed0ccfbe73575d4b02fa26595
[ "Apache-2.0" ]
11
2019-11-23T04:41:15.000Z
2021-06-10T15:14:21.000Z
import time import traceback from django.db import connection from django.db.backends.base.base import BaseDatabaseWrapper from django.db.utils import OperationalError from django.utils import timezone from external_tools.github.GithubConfig import GithubConfig from external_tools.github.GithubPullRequest import Githu...
47.3125
121
0.591645
import time import traceback from django.db import connection from django.db.backends.base.base import BaseDatabaseWrapper from django.db.utils import OperationalError from django.utils import timezone from external_tools.github.GithubConfig import GithubConfig from external_tools.github.GithubPullRequest import Githu...
true
true
1c3558d607658f8dea73cab624fa5807f1ade4f4
4,544
py
Python
plots.py
olihawkins/penguin-models
fabecdf6336390fc50e67cfd8494ade69fc3ef7f
[ "BSD-3-Clause" ]
1
2021-05-05T10:17:01.000Z
2021-05-05T10:17:01.000Z
plots.py
olihawkins/penguin-models
fabecdf6336390fc50e67cfd8494ade69fc3ef7f
[ "BSD-3-Clause" ]
null
null
null
plots.py
olihawkins/penguin-models
fabecdf6336390fc50e67cfd8494ade69fc3ef7f
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """A module for plotting penguins data for modelling with scikit-learn.""" # Imports --------------------------------------------------------------------- import matplotlib as mpl import matplotlib.pyplot as plt import numpy as np import pandas as pd # Constants -----------------------------...
28.759494
79
0.574604
import matplotlib as mpl import matplotlib.pyplot as plt import numpy as np import pandas as pd SPECIES_COLORS = { 'Adelie': '#4daf4a', 'Gentoo': '#ffb000', 'Chinstrap': '#0084f7' } X_AXIS = [30, 60] Y_AXIS = [12, 22] plt.style.use('./style/eda.mplstyle') def get_contour_data(model, pipeline, n...
true
true
1c3558edc6a9d9cc7f4e211516fa662ff2a8b455
6,049
py
Python
stanCode_projects/name_searching_system/babygraphics.py
kenhuang1204/stanCode_projects
f697a34a1c54a864c1140cb0f2f76e2d70b45698
[ "MIT" ]
null
null
null
stanCode_projects/name_searching_system/babygraphics.py
kenhuang1204/stanCode_projects
f697a34a1c54a864c1140cb0f2f76e2d70b45698
[ "MIT" ]
null
null
null
stanCode_projects/name_searching_system/babygraphics.py
kenhuang1204/stanCode_projects
f697a34a1c54a864c1140cb0f2f76e2d70b45698
[ "MIT" ]
null
null
null
""" SC101 Baby Names Project Adapted from Nick Parlante's Baby Names assignment by Jerry Liao. YOUR DESCRIPTION HERE: babygraphics.py draws the lines and name data such as names, years, and ranks on a canvas, which illustrates how the trend of the searched names change. """ import tkinter import babynames import baby...
40.597315
145
0.633824
import tkinter import babynames import babygraphicsgui as gui FILENAMES = [ 'data/full/baby-1900.txt', 'data/full/baby-1910.txt', 'data/full/baby-1920.txt', 'data/full/baby-1930.txt', 'data/full/baby-1940.txt', 'data/full/baby-1950.txt', 'data/full/baby-1960.txt', 'data/full/baby-1970.txt', 'data/...
true
true
1c3559ca49687ba7b8b184f1d128f1a7deafa9c6
597
py
Python
days/d01.py
masenius/aoc-2021
e2fcfe26e17e883ddd1e61dd33ad6b391f4c0490
[ "MIT" ]
null
null
null
days/d01.py
masenius/aoc-2021
e2fcfe26e17e883ddd1e61dd33ad6b391f4c0490
[ "MIT" ]
null
null
null
days/d01.py
masenius/aoc-2021
e2fcfe26e17e883ddd1e61dd33ad6b391f4c0490
[ "MIT" ]
null
null
null
import pytest def p1(data): return sum(data[i] > data[i - 1] for i in range(1, len(data))) def p2(data): return p1([sum(data[i - 2:i + 1]) for i in range(2, len(data))]) @pytest.fixture def test_data(): return [199, 200, 208, 210, 200, 207, 240, 269, 260, 263] def test_p1(test_data): assert p1(t...
17.558824
68
0.58459
import pytest def p1(data): return sum(data[i] > data[i - 1] for i in range(1, len(data))) def p2(data): return p1([sum(data[i - 2:i + 1]) for i in range(2, len(data))]) @pytest.fixture def test_data(): return [199, 200, 208, 210, 200, 207, 240, 269, 260, 263] def test_p1(test_data): assert p1(t...
true
true
1c355a9e57d2a0de1f15a469085d3b3ddf19e0e7
6,130
py
Python
hplip-3.20.3/ui5/nodevicesdialog_base.py
Deril-Pana/wikiBlackcoinNL
9633307f0b485c27feae5da242944adf450e8963
[ "MIT" ]
null
null
null
hplip-3.20.3/ui5/nodevicesdialog_base.py
Deril-Pana/wikiBlackcoinNL
9633307f0b485c27feae5da242944adf450e8963
[ "MIT" ]
1
2021-11-20T16:33:39.000Z
2021-11-20T16:33:39.000Z
hplip-3.20.3/ui5/nodevicesdialog_base.py
Deril-Pana/wikiBlackcoinNL
9633307f0b485c27feae5da242944adf450e8963
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file '/home/gaurav/work_qt5/src_qt5/ui5/nodevicesdialog_base.ui' # # Created by: PyQt5 UI code generator 5.4.2 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_NoDevicesDialog_base(obje...
83.972603
607
0.717455
from PyQt5 import QtCore, QtGui, QtWidgets class Ui_NoDevicesDialog_base(object): def setupUi(self, NoDevicesDialog_base): NoDevicesDialog_base.setObjectName("NoDevicesDialog_base") NoDevicesDialog_base.resize(539, 335) self.gridlayout = QtWidgets.QGridLayout(NoDevicesDialog_base) ...
true
true
1c355b35c10d1e9bedeeb5e047f7d7b8d18570ba
274
py
Python
tea_admin/tea_admin/doctype/salary_structure/test_salary_structure.py
nivedita05/Tea-Admin
4267cfa9d0c97e586bd9b5401e310bcd8ec93268
[ "MIT" ]
null
null
null
tea_admin/tea_admin/doctype/salary_structure/test_salary_structure.py
nivedita05/Tea-Admin
4267cfa9d0c97e586bd9b5401e310bcd8ec93268
[ "MIT" ]
null
null
null
tea_admin/tea_admin/doctype/salary_structure/test_salary_structure.py
nivedita05/Tea-Admin
4267cfa9d0c97e586bd9b5401e310bcd8ec93268
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe and Contributors # See license.txt from __future__ import unicode_literals import frappe import unittest # test_records = frappe.get_test_records('Salary Structure') class TestSalaryStructure(unittest.TestCase): pass
21.076923
60
0.777372
from __future__ import unicode_literals import frappe import unittest class TestSalaryStructure(unittest.TestCase): pass
true
true
1c355c32ed7f483f2ec6556256cbeccaa11ab0bf
1,488
py
Python
python/paddle/fluid/tests/unittests/test_parallel_executor_seresnext_with_fuse_all_reduce_cpu.py
L-Net-1992/Paddle
4d0ca02ba56760b456f3d4b42a538555b9b6c307
[ "Apache-2.0" ]
11
2016-08-29T07:43:26.000Z
2016-08-29T07:51:24.000Z
python/paddle/fluid/tests/unittests/test_parallel_executor_seresnext_with_fuse_all_reduce_cpu.py
L-Net-1992/Paddle
4d0ca02ba56760b456f3d4b42a538555b9b6c307
[ "Apache-2.0" ]
null
null
null
python/paddle/fluid/tests/unittests/test_parallel_executor_seresnext_with_fuse_all_reduce_cpu.py
L-Net-1992/Paddle
4d0ca02ba56760b456f3d4b42a538555b9b6c307
[ "Apache-2.0" ]
1
2021-12-09T08:59:17.000Z
2021-12-09T08:59:17.000Z
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
36.292683
74
0.731855
from __future__ import print_function import paddle.fluid as fluid fluid.core._set_fuse_parameter_group_size(3) fluid.core._set_fuse_parameter_memory_size(131072) import unittest import seresnext_net from seresnext_test_base import TestResnetBase, DeviceType from functools import partial class TestResnetWithFuseAl...
true
true
1c355c88e357d81dc7fa2ee4552113bcf39d70b6
264
py
Python
application/docs/views.py
meshack-mbuvi/ride-my-way-api
2e091f020e774cad4891427a2de91a7a2c29def1
[ "MIT" ]
null
null
null
application/docs/views.py
meshack-mbuvi/ride-my-way-api
2e091f020e774cad4891427a2de91a7a2c29def1
[ "MIT" ]
19
2018-06-23T17:08:37.000Z
2018-07-23T17:37:55.000Z
application/docs/views.py
meshack-mbuvi/ride-my-way-api
2e091f020e774cad4891427a2de91a7a2c29def1
[ "MIT" ]
null
null
null
from flask import Blueprint, render_template docs = Blueprint('docs', __name__, static_folder='static', template_folder='templates') @docs.route('/api/v1/docs') def index(): "Show an index template" return render_template('docs.html')
22
58
0.685606
from flask import Blueprint, render_template docs = Blueprint('docs', __name__, static_folder='static', template_folder='templates') @docs.route('/api/v1/docs') def index(): return render_template('docs.html')
true
true
1c355f1ba7b5ff636b60f1fae401e09fa7f4783c
2,938
py
Python
lambda/s3trigger.py
CurryEleison/lambda-metrics
0954273a1aec0f8c8ea867383e33a9acc9c785cf
[ "MIT" ]
null
null
null
lambda/s3trigger.py
CurryEleison/lambda-metrics
0954273a1aec0f8c8ea867383e33a9acc9c785cf
[ "MIT" ]
null
null
null
lambda/s3trigger.py
CurryEleison/lambda-metrics
0954273a1aec0f8c8ea867383e33a9acc9c785cf
[ "MIT" ]
null
null
null
import boto3 import numpy as np import logging import pandas as pd import datetime from AwsElbLogUtil import LogDataFrame from CloudWatchUtil import CustomMetricSender logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) def send_random(event, context): data = np.random.randn(5) logging.info(d...
51.54386
208
0.465623
import boto3 import numpy as np import logging import pandas as pd import datetime from AwsElbLogUtil import LogDataFrame from CloudWatchUtil import CustomMetricSender logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) def send_random(event, context): data = np.random.randn(5) logging.info(d...
true
true
1c355f6286858803c3e1246758b476717339cf14
270,565
py
Python
cinder/db/sqlalchemy/api.py
elastx/cinder
00519aef92258275b68b78355734cda31c354839
[ "Apache-2.0" ]
3
2015-04-02T21:44:36.000Z
2016-04-29T21:19:04.000Z
cinder/db/sqlalchemy/api.py
elastx/cinder
00519aef92258275b68b78355734cda31c354839
[ "Apache-2.0" ]
3
2016-04-29T21:45:26.000Z
2016-05-04T19:41:23.000Z
cinder/db/sqlalchemy/api.py
elastx/cinder
00519aef92258275b68b78355734cda31c354839
[ "Apache-2.0" ]
4
2016-01-27T00:25:52.000Z
2021-03-25T19:54:08.000Z
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2014 IBM Corp. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you...
37.058622
79
0.626855
import collections from collections import abc import datetime as dt import functools import itertools import re import sys import uuid from oslo_config import cfg from oslo_db import api as oslo_db_api from oslo_db import exception as db_exc from oslo_db import options from oslo_db.sqlalchemy import enginefacade fr...
true
true
1c355fb927a239cc73cf7a4f7868e0075f4fe900
3,445
py
Python
baselines/DT.py
skully-coder/COVID-19_TLSTM
7ae6b3e1d8edbcb593b1c5f70001e075b7d29c0f
[ "MIT" ]
null
null
null
baselines/DT.py
skully-coder/COVID-19_TLSTM
7ae6b3e1d8edbcb593b1c5f70001e075b7d29c0f
[ "MIT" ]
null
null
null
baselines/DT.py
skully-coder/COVID-19_TLSTM
7ae6b3e1d8edbcb593b1c5f70001e075b7d29c0f
[ "MIT" ]
null
null
null
from math import log import operator import pickle import numpy as np def load_pkl(path): with open(path, 'rb') as f: obj = pickle.load(f) return obj def calcShannonEnt(dataSet): numEntries = len(dataSet) labelCounts = {} for featVec in dataSet: currentLabel = featVec[-1] ...
29.956522
88
0.65283
from math import log import operator import pickle import numpy as np def load_pkl(path): with open(path, 'rb') as f: obj = pickle.load(f) return obj def calcShannonEnt(dataSet): numEntries = len(dataSet) labelCounts = {} for featVec in dataSet: currentLabel = featVec[-1] ...
true
true
1c35605295ad86b98f91e271e63a15929fccf02a
146
py
Python
python/1060.py
josevictorp81/Uri-questions-solutions
99e9bacb088ce59f58fb05531bb02f2fcffe26eb
[ "MIT" ]
3
2019-09-24T00:15:47.000Z
2019-09-25T02:52:27.000Z
python/1060.py
josevictorp81/Uri-questions-solutions
99e9bacb088ce59f58fb05531bb02f2fcffe26eb
[ "MIT" ]
1
2021-03-16T00:16:11.000Z
2021-03-16T00:16:11.000Z
python/1060.py
josevictorp81/Uri-questions-solutions
99e9bacb088ce59f58fb05531bb02f2fcffe26eb
[ "MIT" ]
4
2019-10-19T12:56:03.000Z
2019-10-23T23:24:06.000Z
positivos = 0 for i in range(6): num = float(input()) if num > 0: positivos += 1 print('{} valores positivos'.format(positivos))
18.25
47
0.59589
positivos = 0 for i in range(6): num = float(input()) if num > 0: positivos += 1 print('{} valores positivos'.format(positivos))
true
true
1c356055f04e858ea20a24787b214e11e6a0e77c
2,668
py
Python
src/you_get/extractors/toutiao.py
adger-me/you-get
b32741ad8e57b3a02a1006d27e87eb5b879f1c90
[ "MIT" ]
46,956
2015-01-01T08:48:41.000Z
2022-03-31T13:38:03.000Z
src/you_get/extractors/toutiao.py
adger-me/you-get
b32741ad8e57b3a02a1006d27e87eb5b879f1c90
[ "MIT" ]
2,477
2015-01-02T18:12:33.000Z
2022-03-31T10:44:24.000Z
src/you_get/extractors/toutiao.py
adger-me/you-get
b32741ad8e57b3a02a1006d27e87eb5b879f1c90
[ "MIT" ]
10,750
2015-01-03T01:33:16.000Z
2022-03-31T06:36:28.000Z
#!/usr/bin/env python import binascii import random from json import loads from urllib.parse import urlparse from ..common import * try: from base64 import decodebytes except ImportError: from base64 import decodestring decodebytes = decodestring __all__ = ['toutiao_download', ] def random_with_n_digi...
30.666667
118
0.622939
import binascii import random from json import loads from urllib.parse import urlparse from ..common import * try: from base64 import decodebytes except ImportError: from base64 import decodestring decodebytes = decodestring __all__ = ['toutiao_download', ] def random_with_n_digits(n): return rand...
true
true
1c3561068eda230b12b956d0a336505c8afd6252
4,758
py
Python
landlab/ca/little_ca_test.py
awickert/landlab
496de56717a5877db96f354a1b1285bfabe8b56f
[ "MIT" ]
1
2015-08-17T19:29:50.000Z
2015-08-17T19:29:50.000Z
landlab/ca/little_ca_test.py
awickert/landlab
496de56717a5877db96f354a1b1285bfabe8b56f
[ "MIT" ]
1
2018-04-07T08:24:56.000Z
2018-04-07T13:52:03.000Z
landlab/ca/little_ca_test.py
awickert/landlab
496de56717a5877db96f354a1b1285bfabe8b56f
[ "MIT" ]
2
2017-07-03T20:21:13.000Z
2018-09-06T23:58:19.000Z
#!/usr/env/python """Test the creation and execution of a CellLab-CTS model. Tests the creation and execution of a CellLab-CTS model, by creating a simple two-state CA on a small grid. Created by Greg Tucker, May 2015 """ from __future__ import print_function import time from landlab import RasterModelGrid from land...
33.507042
78
0.617276
from __future__ import print_function import time from landlab import RasterModelGrid from landlab.ca.celllab_cts import Transition, CAPlotter from landlab.ca.raster_cts import RasterCTS def setup_transition_list(): xn_list = [] xn_list.append(Transition((0, 0, 0), (0, 1,...
true
true
1c356129c86245e6d6b2a1086167507fd3b53e4d
5,010
py
Python
src/engine/SCons/Tool/suncxx.py
Valkatraz/scons
5e70c65f633dcecc035751c9f0c6f894088df8a0
[ "MIT" ]
1
2020-03-21T05:24:47.000Z
2020-03-21T05:24:47.000Z
src/engine/SCons/Tool/suncxx.py
Valkatraz/scons
5e70c65f633dcecc035751c9f0c6f894088df8a0
[ "MIT" ]
3
2019-01-15T20:40:02.000Z
2021-02-13T03:16:34.000Z
src/engine/SCons/Tool/suncxx.py
Valkatraz/scons
5e70c65f633dcecc035751c9f0c6f894088df8a0
[ "MIT" ]
1
2021-08-04T12:32:39.000Z
2021-08-04T12:32:39.000Z
"""SCons.Tool.sunc++ Tool-specific initialization for C++ on SunOS / Solaris. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person...
31.708861
82
0.622156
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import SCons import os import re import subprocess import SCons.Tool.cxx cplusplus = SCons.Tool.cxx package_info = {} def get_package_info(package_name, pkginfo, pkgchk): try: return package_info[package_name] except KeyError: ...
true
true
1c3561e7b874b6135c54fef21f4e3e4264ca964d
844
py
Python
example/tests/test_generic_validation.py
sha016/django-rest-framework-json-api
c4337f15f59811c4e72f33cf6eb3a4667cb4b197
[ "BSD-2-Clause" ]
1,011
2015-07-23T00:39:13.000Z
2022-03-25T11:05:08.000Z
example/tests/test_generic_validation.py
sha016/django-rest-framework-json-api
c4337f15f59811c4e72f33cf6eb3a4667cb4b197
[ "BSD-2-Clause" ]
819
2015-07-21T13:43:30.000Z
2022-03-20T22:01:51.000Z
example/tests/test_generic_validation.py
sha016/django-rest-framework-json-api
c4337f15f59811c4e72f33cf6eb3a4667cb4b197
[ "BSD-2-Clause" ]
345
2015-07-21T14:29:26.000Z
2022-03-22T03:25:04.000Z
from django.urls import reverse from example.tests import TestBase class GenericValidationTest(TestBase): """ Test that a non serializer specific validation can be thrown and formatted """ def setUp(self): super().setUp() self.url = reverse("user-validation", kwargs={"pk": self.miles...
24.823529
78
0.513033
from django.urls import reverse from example.tests import TestBase class GenericValidationTest(TestBase): def setUp(self): super().setUp() self.url = reverse("user-validation", kwargs={"pk": self.miles.pk}) def test_generic_validation_error(self): response = self.client.get(self.url...
true
true
1c35621a48378e7e3a0b61da50a1d27e81d7655e
701
py
Python
migrations/versions/53ceac12ff90_.py
excalibur1987/team-management
ed6dfaf83280dad947edb31b404680d6083d7e62
[ "MIT" ]
1
2021-06-05T16:18:10.000Z
2021-06-05T16:18:10.000Z
migrations/versions/53ceac12ff90_.py
excalibur1987/flask-api-backend-boilerplate
3f0933599f12b9632a3fc697eb3dde534ec93ce1
[ "MIT" ]
null
null
null
migrations/versions/53ceac12ff90_.py
excalibur1987/flask-api-backend-boilerplate
3f0933599f12b9632a3fc697eb3dde534ec93ce1
[ "MIT" ]
null
null
null
"""empty message Revision ID: 53ceac12ff90 Revises: 516ff6933e39 Create Date: 2021-05-09 13:37:35.869550 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = "53ceac12ff90" down_revision = "ff1d1d2b820d" branch_labels = None depends_on = None def upgrade(): # #...
22.612903
81
0.673324
import sqlalchemy as sa from alembic import op revision = "53ceac12ff90" down_revision = "ff1d1d2b820d" branch_labels = None depends_on = None def upgrade(): op.add_column( "roles", sa.Column("description", sa.String(), server_default="", nullable=False), ) def downgrade(): ...
true
true
1c3562ada2bdfb7e4f0e742bb9c9d2cbc170b385
6,163
py
Python
third_party/catapult/telemetry/telemetry/internal/browser/browser_finder.py
zipated/src
2b8388091c71e442910a21ada3d97ae8bc1845d3
[ "BSD-3-Clause" ]
2,151
2020-04-18T07:31:17.000Z
2022-03-31T08:39:18.000Z
third_party/catapult/telemetry/telemetry/internal/browser/browser_finder.py
cangulcan/src
2b8388091c71e442910a21ada3d97ae8bc1845d3
[ "BSD-3-Clause" ]
395
2020-04-18T08:22:18.000Z
2021-12-08T13:04:49.000Z
third_party/catapult/telemetry/telemetry/internal/browser/browser_finder.py
cangulcan/src
2b8388091c71e442910a21ada3d97ae8bc1845d3
[ "BSD-3-Clause" ]
338
2020-04-18T08:03:10.000Z
2022-03-29T12:33:22.000Z
# Copyright 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Finds browsers that can be controlled by telemetry.""" import logging from telemetry import decorators from telemetry.internal.backends.chrome import an...
34.238889
78
0.730651
import logging from telemetry import decorators from telemetry.internal.backends.chrome import android_browser_finder from telemetry.internal.backends.chrome import cros_browser_finder from telemetry.internal.backends.chrome import desktop_browser_finder from telemetry.internal.browser import browser_finder_exceptio...
true
true
1c35643725c62acf5a6e83ad13f91afbf70ad8f1
141,514
py
Python
black.py
springstan/black
4b449e7471c31ae2d3a890510322c40594cacc8f
[ "MIT" ]
1
2019-12-04T02:19:18.000Z
2019-12-04T02:19:18.000Z
black.py
springstan/black
4b449e7471c31ae2d3a890510322c40594cacc8f
[ "MIT" ]
2
2021-02-02T22:55:26.000Z
2021-06-02T02:26:29.000Z
black.py
springstan/black
4b449e7471c31ae2d3a890510322c40594cacc8f
[ "MIT" ]
null
null
null
import ast import asyncio from concurrent.futures import Executor, ProcessPoolExecutor from contextlib import contextmanager from datetime import datetime from enum import Enum from functools import lru_cache, partial, wraps import io import itertools import logging from multiprocessing import Manager, freeze_support i...
33.952495
122
0.608639
import ast import asyncio from concurrent.futures import Executor, ProcessPoolExecutor from contextlib import contextmanager from datetime import datetime from enum import Enum from functools import lru_cache, partial, wraps import io import itertools import logging from multiprocessing import Manager, freeze_support i...
true
true
1c3566a8da172b2be984d3cd544181a39dcaeebe
4,256
py
Python
azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/express_route_service_providers_operations.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2021-09-07T18:36:04.000Z
2021-09-07T18:36:04.000Z
azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/express_route_service_providers_operations.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
2
2019-10-02T23:37:38.000Z
2020-10-02T01:17:31.000Z
azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/express_route_service_providers_operations.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2018-08-28T14:36:47.000Z
2018-08-28T14:36:47.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 ...
41.320388
148
0.645207
import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError from .. import models class ExpressRouteServiceProvidersOperations(object): models = models def __init__(self, client, config, serializer, deserializer): self._client = client sel...
true
true
1c3567fa76301f500220e63d1bfa3d3d32bc4fe7
797
py
Python
build/common.py
iguoyr/chaos-mesh
13590d3494d7686a43ae5d52c2902fcbb7acb81a
[ "Apache-2.0" ]
null
null
null
build/common.py
iguoyr/chaos-mesh
13590d3494d7686a43ae5d52c2902fcbb7acb81a
[ "Apache-2.0" ]
null
null
null
build/common.py
iguoyr/chaos-mesh
13590d3494d7686a43ae5d52c2902fcbb7acb81a
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Chaos Mesh Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
26.566667
74
0.720201
export_env_variables = [ "HTTP_PROXY", "HTTPS_PROXY", "GOPROXY", "UI", "LDFLAGS", "CRATES_MIRROR", "GO_BUILD_CACHE", "LDFLAGS", ]
true
true
1c356b10ccbb315212dfd39936b221fd2442f8f8
1,306
py
Python
aiotdlib/api/functions/get_chat_notification_settings_exceptions.py
jraylan/aiotdlib
4528fcfca7c5c69b54a878ce6ce60e934a2dcc73
[ "MIT" ]
37
2021-05-04T10:41:41.000Z
2022-03-30T13:48:05.000Z
aiotdlib/api/functions/get_chat_notification_settings_exceptions.py
jraylan/aiotdlib
4528fcfca7c5c69b54a878ce6ce60e934a2dcc73
[ "MIT" ]
13
2021-07-17T19:54:51.000Z
2022-02-26T06:50:00.000Z
aiotdlib/api/functions/get_chat_notification_settings_exceptions.py
jraylan/aiotdlib
4528fcfca7c5c69b54a878ce6ce60e934a2dcc73
[ "MIT" ]
7
2021-09-22T21:27:11.000Z
2022-02-20T02:33:19.000Z
# =============================================================================== # # # # This file has been generated automatically!! Do not change this manually! # # ...
39.575758
117
0.556662
from __future__ import annotations from pydantic import Field from ..base_object import BaseObject from ..types import NotificationSettingsScope class GetChatNotificationSettingsExceptions(BaseObject): ID: str = Field("getChatNotificationSettingsExceptions", alias="@type") scope: NotificationSettingsScope ...
true
true
1c356edfccab0f3d653cbb144107522f8b7422ce
11,954
py
Python
qa/rpc-tests/p2p-acceptblock.py
josephsalimin/dogecoin
0ca38088628e2f9385776fc0ea52234f86a8a5e9
[ "MIT" ]
3
2021-05-15T15:30:40.000Z
2021-05-15T15:30:50.000Z
qa/rpc-tests/p2p-acceptblock.py
josephsalimin/dogecoin
0ca38088628e2f9385776fc0ea52234f86a8a5e9
[ "MIT" ]
1
2021-05-22T13:52:29.000Z
2021-05-22T14:05:23.000Z
qa/rpc-tests/p2p-acceptblock.py
josephsalimin/garudacoin
0ca38088628e2f9385776fc0ea52234f86a8a5e9
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.mininode import * from test_framework.test_framework import BitcoinTestFramework from...
42.692857
107
0.657771
from test_framework.mininode import * from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * import time from test_framework.blocktools import create_block, create_coinbase class TestNode(NodeConnCB): def __init__(self): NodeConnCB.__init__(self) self.con...
true
true
1c356f9f653fa9074e5403e150307fe4402f031b
2,463
py
Python
home/wasa/.config/ranger/colorschemes/black.py
wasamasa/dotfiles
bbbdfdef90ad96258fd91aa046d9c9a406ecd8ee
[ "Unlicense" ]
11
2016-01-01T16:36:54.000Z
2019-10-05T08:38:28.000Z
home/wasa/.config/ranger/colorschemes/black.py
wasamasa/dotfiles
bbbdfdef90ad96258fd91aa046d9c9a406ecd8ee
[ "Unlicense" ]
null
null
null
home/wasa/.config/ranger/colorschemes/black.py
wasamasa/dotfiles
bbbdfdef90ad96258fd91aa046d9c9a406ecd8ee
[ "Unlicense" ]
3
2017-07-27T15:32:00.000Z
2019-03-25T01:38:28.000Z
# Copyright (C) 2009, 2010, 2011 Roman Zimbelmann <romanz@lavabit.com> # This software is distributed under the terms of the GNU GPL version 3. from ranger.gui.colorscheme import ColorScheme from ranger.gui.color import * class Default(ColorScheme): progress_bar_color = black def use(self, context): fg, bg, att...
21.232759
72
0.642306
from ranger.gui.colorscheme import ColorScheme from ranger.gui.color import * class Default(ColorScheme): progress_bar_color = black def use(self, context): fg, bg, attr = default_colors if context.reset: return default_colors elif context.in_browser: if context.selected: attr = reverse else: ...
true
true
1c35710b2cef0d92c7de221b7f909da16e1b497c
2,889
py
Python
server.py
kurodenjiro/bert-extractive-summarizer-vietnamese
f316ca4eaf142dc306086d434d5bba31e1718131
[ "MIT" ]
27
2019-12-06T06:17:12.000Z
2022-02-08T02:57:22.000Z
server.py
nguyenhothanhtam/bert-extractive-summarizer-vietnamese
f316ca4eaf142dc306086d434d5bba31e1718131
[ "MIT" ]
1
2020-01-28T05:16:46.000Z
2020-03-12T09:05:47.000Z
server.py
nguyenhothanhtam/bert-extractive-summarizer-vietnamese
f316ca4eaf142dc306086d434d5bba31e1718131
[ "MIT" ]
11
2019-12-06T06:48:11.000Z
2021-07-12T02:45:40.000Z
from flask import Flask from flask import request, jsonify, abort, make_response from flask_cors import CORS import nltk nltk.download('punkt') from nltk import tokenize from typing import List import argparse from summarizer import Summarizer app = Flask(__name__) CORS(app) class Parser(object): def __init__(...
31.064516
114
0.628245
from flask import Flask from flask import request, jsonify, abort, make_response from flask_cors import CORS import nltk nltk.download('punkt') from nltk import tokenize from typing import List import argparse from summarizer import Summarizer app = Flask(__name__) CORS(app) class Parser(object): def __init__(...
true
true
1c35736839de6098a178f6638a6100d0d931d311
463
py
Python
data/scripts/templates/object/draft_schematic/space/armor/shared_mass_reduction_kit_mk4.py
obi-two/GameServer
7d37024e2291a97d49522610cd8f1dbe5666afc2
[ "MIT" ]
20
2015-02-23T15:11:56.000Z
2022-03-18T20:56:48.000Z
data/scripts/templates/object/draft_schematic/space/armor/shared_mass_reduction_kit_mk4.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
null
null
null
data/scripts/templates/object/draft_schematic/space/armor/shared_mass_reduction_kit_mk4.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
20
2015-04-04T16:35:59.000Z
2022-03-24T14:54:37.000Z
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Intangible() result.template = "object/draft_schematic/space/armor/shared_mass_reduction_kit_mk4.iff" result.attr...
27.235294
89
0.734341
from swgpy.object import * def create(kernel): result = Intangible() result.template = "object/draft_schematic/space/armor/shared_mass_reduction_kit_mk4.iff" result.attribute_template_id = -1 result.stfName("string_id_table","") return result
true
true
1c357403ff98f63e9f914ae91abc215018fb5b99
10,620
py
Python
lib/log/reader.py
kustodian/aerospike-admin
931ee55ccd65ba3e20e6611a0294c92b09e8cfcb
[ "Apache-2.0" ]
null
null
null
lib/log/reader.py
kustodian/aerospike-admin
931ee55ccd65ba3e20e6611a0294c92b09e8cfcb
[ "Apache-2.0" ]
null
null
null
lib/log/reader.py
kustodian/aerospike-admin
931ee55ccd65ba3e20e6611a0294c92b09e8cfcb
[ "Apache-2.0" ]
null
null
null
# Copyright 2013-2018 Aerospike, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
34.480519
221
0.512712
import datetime import re import time import logging from lib.utils.util import shell_command from lib.utils.constants import DT_FMT DT_TO_MINUTE_FMT = "%b %d %Y %H:%M" DT_TIME_FMT = "%H:%M:%S" DATE_SEG = 0 DATE_SEPARATOR = "-" YEAR = 0 MONTH = 1 DATE = 2 TIME_SEG = 1 TIME_SEPARATOR = ":" HH = 0 MM = 1 SS = 2 INDE...
true
true
1c3576cd54023c4cac8155d1c7efed0c38748869
8,443
py
Python
win32/bin/Lib/lib2to3/fixes/fix_metaclass.py
nmercier/linux-cross-gcc
a5b0028fd2b72ec036a4725e93ba29d73cb753a6
[ "BSD-3-Clause" ]
3
2015-10-31T10:39:25.000Z
2019-04-27T20:19:33.000Z
win32/bin/Lib/lib2to3/fixes/fix_metaclass.py
nmercier/linux-cross-gcc
a5b0028fd2b72ec036a4725e93ba29d73cb753a6
[ "BSD-3-Clause" ]
2
2016-12-12T05:54:58.000Z
2016-12-12T05:55:44.000Z
win32/bin/Lib/lib2to3/fixes/fix_metaclass.py
nmercier/linux-cross-gcc
a5b0028fd2b72ec036a4725e93ba29d73cb753a6
[ "BSD-3-Clause" ]
null
null
null
"""Fixer for __metaclass__ = X -> (metaclass=X) methods. The various forms of classef (inherits nothing, inherits once, inherints many) don't parse the same in the CST so we look at ALL classes for a __metaclass__ and if we find one normalize the inherits to all be an arglist. For one-liner clas...
36.868996
81
0.574559
from .. import fixer_base from ..pygram import token from ..fixer_util import Name, syms, Node, Leaf def has_metaclass(parent): for node in parent.children: if node.type == syms.suite: return has_metaclass(node) elif node.type == syms.simple_stmt and node.children: ...
true
true
1c3576f304149d2feb21fca90c610701e782e463
7,309
py
Python
protoflow/utils/data.py
theblackfly/protoflow
02a77e59f6afc8d462a738874d06eca810911166
[ "MIT" ]
3
2020-10-07T05:04:05.000Z
2021-02-10T15:04:55.000Z
protoflow/utils/data.py
theblackfly/protoflow
02a77e59f6afc8d462a738874d06eca810911166
[ "MIT" ]
5
2020-04-09T13:36:15.000Z
2020-12-17T16:30:50.000Z
protoflow/utils/data.py
theblackfly/protoflow
02a77e59f6afc8d462a738874d06eca810911166
[ "MIT" ]
2
2020-10-01T21:48:16.000Z
2021-04-10T18:20:25.000Z
"""ProtoFlow data utilities.""" import hashlib import os import shutil import tarfile import zipfile import requests import six from six.moves.urllib.error import HTTPError, URLError from tensorflow.python.keras.utils.io_utils import path_to_string from tqdm import tqdm def _extract_archive(file_path, path=".", arc...
33.072398
78
0.583801
import hashlib import os import shutil import tarfile import zipfile import requests import six from six.moves.urllib.error import HTTPError, URLError from tensorflow.python.keras.utils.io_utils import path_to_string from tqdm import tqdm def _extract_archive(file_path, path=".", archive_format="auto"): if arch...
true
true
1c35782b600897baf619499fe88cd4250bd51dd4
63
py
Python
test/test_interfaces.py
jiayiliu/gradio
6fa11437c09845322df3b47f732a924338d17862
[ "Apache-2.0" ]
5,481
2019-05-27T06:18:02.000Z
2022-03-31T20:33:43.000Z
test/test_interfaces.py
kanavanand/gradio
5eaa4b1e8b8971d1973b596b3d53aaa99739a07c
[ "Apache-2.0" ]
652
2019-06-18T20:16:03.000Z
2022-03-31T19:36:16.000Z
test/test_interfaces.py
kanavanand/gradio
5eaa4b1e8b8971d1973b596b3d53aaa99739a07c
[ "Apache-2.0" ]
366
2019-07-03T00:32:02.000Z
2022-03-31T11:32:01.000Z
import unittest if __name__ == '__main__': unittest.main()
15.75
26
0.698413
import unittest if __name__ == '__main__': unittest.main()
true
true
1c35792105a982e5498ceea5705f65e05efe0cc9
3,201
py
Python
samples/19.custom-dialogs/app.py
hangdong/botbuilder-python
8ff979a58fadc4356d76b9ce577f94da3245f664
[ "MIT" ]
null
null
null
samples/19.custom-dialogs/app.py
hangdong/botbuilder-python
8ff979a58fadc4356d76b9ce577f94da3245f664
[ "MIT" ]
null
null
null
samples/19.custom-dialogs/app.py
hangdong/botbuilder-python
8ff979a58fadc4356d76b9ce577f94da3245f664
[ "MIT" ]
null
null
null
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import asyncio import sys from datetime import datetime from flask import Flask, request, Response from botbuilder.core import ( BotFrameworkAdapter, BotFrameworkAdapterSettings, ConversationState, MemoryStor...
31.382353
88
0.707591
import asyncio import sys from datetime import datetime from flask import Flask, request, Response from botbuilder.core import ( BotFrameworkAdapter, BotFrameworkAdapterSettings, ConversationState, MemoryStorage, TurnContext, UserState, ) from botbuilder.schema import Activity, ActivityTypes ...
true
true
1c35796495a6efe9aa4ee9bb6b30b875bd60a38d
21
py
Python
examples/__init__.py
krvss/graph-talk
b420bc5b57c7dc25008428bf7c0ebfcbebd61b72
[ "Apache-2.0" ]
null
null
null
examples/__init__.py
krvss/graph-talk
b420bc5b57c7dc25008428bf7c0ebfcbebd61b72
[ "Apache-2.0" ]
null
null
null
examples/__init__.py
krvss/graph-talk
b420bc5b57c7dc25008428bf7c0ebfcbebd61b72
[ "Apache-2.0" ]
1
2018-01-11T09:23:46.000Z
2018-01-11T09:23:46.000Z
__author__ = 'krvss'
10.5
20
0.714286
__author__ = 'krvss'
true
true
1c3579c52b094c65f1192091953fefc03b1d7d27
14,473
py
Python
airflow/providers/elasticsearch/log/es_task_handler.py
markhatch/airflow
1d170f899bcc87110e55192517270ec89d511ca8
[ "Apache-2.0" ]
null
null
null
airflow/providers/elasticsearch/log/es_task_handler.py
markhatch/airflow
1d170f899bcc87110e55192517270ec89d511ca8
[ "Apache-2.0" ]
null
null
null
airflow/providers/elasticsearch/log/es_task_handler.py
markhatch/airflow
1d170f899bcc87110e55192517270ec89d511ca8
[ "Apache-2.0" ]
null
null
null
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
39.116216
128
0.644994
import logging import sys from collections import defaultdict from datetime import datetime from operator import attrgetter from time import time from typing import List, Optional, Tuple, Union from urllib.parse import quote import elasticsearch import pendulum from elasticsearch_dsl import Search from airflow.confi...
true
true
1c357aaabd26ad1c9b7e06b63dbb6707448fb6a2
7,407
py
Python
src/plugins/EU_ZH/fetcher.py
johnharveymath/fetchers-python
c0049c2ea5731c850c5dbcf9602b51d7393a92f6
[ "Apache-2.0" ]
4
2020-04-03T16:20:08.000Z
2020-07-06T10:16:44.000Z
src/plugins/EU_ZH/fetcher.py
johnharveymath/fetchers-python
c0049c2ea5731c850c5dbcf9602b51d7393a92f6
[ "Apache-2.0" ]
15
2020-04-28T19:47:58.000Z
2020-10-20T12:18:59.000Z
src/plugins/EU_ZH/fetcher.py
yuewu57/fetchers-python
1f5fc7b64f43142991ad0d901b0840b3e8ef1382
[ "Apache-2.0" ]
26
2020-03-31T13:14:50.000Z
2021-06-23T21:02:54.000Z
# Copyright (C) 2020 University of Oxford # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
43.828402
158
0.622924
import logging import pandas as pd import os import sys __all__ = ('EU_ZH_Fetcher',) from utils.fetcher.base_epidemiology import BaseEpidemiologyFetcher logger = logging.getLogger(__name__) class EU_ZH_Fetcher(BaseEpidemiologyFetcher): LOAD_PLUGIN = True SOURCE = 'EU_ZH' def fetch(self, url): ...
true
true
1c357c2992598df82ed165439dc034969fe00854
4,343
py
Python
messente_api/models/statistics_report_success.py
messente/messente-api-python
154abca9e6a226a5c97d8052c3f2631765503426
[ "Apache-2.0" ]
null
null
null
messente_api/models/statistics_report_success.py
messente/messente-api-python
154abca9e6a226a5c97d8052c3f2631765503426
[ "Apache-2.0" ]
null
null
null
messente_api/models/statistics_report_success.py
messente/messente-api-python
154abca9e6a226a5c97d8052c3f2631765503426
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Messente API [Messente](https://messente.com) is a global provider of messaging and user verification services. * Send and receive SMS, Viber, WhatsApp and Telegram messages. * Manage contacts and groups. * Fetch detailed info about phone numbers. * Blacklist phone numbers to make sure yo...
32.654135
473
0.606954
import inspect import pprint import re import six from messente_api.configuration import Configuration class StatisticsReportSuccess(object): openapi_types = { 'reports': 'list[StatisticsReport]' } attribute_map = { 'reports': 'reports' } def __init__(self, reports=None, lo...
true
true
1c357c6fa74d5dc80c0005bc82d8ce47b5068ddd
612,712
py
Python
python/paddle/fluid/layers/nn.py
zmxdream/Paddle
04f042a5d507ad98f7f2cfc3cbc44b06d7a7f45c
[ "Apache-2.0" ]
2
2021-11-12T11:31:12.000Z
2021-12-05T10:30:28.000Z
python/paddle/fluid/layers/nn.py
zmxdream/Paddle
04f042a5d507ad98f7f2cfc3cbc44b06d7a7f45c
[ "Apache-2.0" ]
null
null
null
python/paddle/fluid/layers/nn.py
zmxdream/Paddle
04f042a5d507ad98f7f2cfc3cbc44b06d7a7f45c
[ "Apache-2.0" ]
1
2021-10-09T10:57:17.000Z
2021-10-09T10:57:17.000Z
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
39.662869
946
0.577482
from __future__ import print_function import os import inspect import warnings import numpy as np import six import paddle from ..layer_helper import LayerHelper from ..initializer import Normal, Constant, NumpyArrayInitializer from ..framework import Variable, OpProtoHolder, in_dygraph_mode, dygraph_only, _dygraph_...
true
true
1c357d3712292b01ee95a5bca2342315acb4f8ef
623
py
Python
dojo/db_migrations/0147_rename_sslyze_parser.py
dant24/django-DefectDojo
caf5c91b3f8870d5f466dfaaf5a3a096f8812ad9
[ "BSD-3-Clause" ]
249
2016-09-06T21:04:40.000Z
2018-01-19T15:59:44.000Z
dojo/db_migrations/0147_rename_sslyze_parser.py
dant24/django-DefectDojo
caf5c91b3f8870d5f466dfaaf5a3a096f8812ad9
[ "BSD-3-Clause" ]
255
2016-09-06T21:36:37.000Z
2018-01-19T19:57:57.000Z
dojo/db_migrations/0147_rename_sslyze_parser.py
dant24/django-DefectDojo
caf5c91b3f8870d5f466dfaaf5a3a096f8812ad9
[ "BSD-3-Clause" ]
152
2016-09-06T21:04:54.000Z
2018-01-18T08:52:24.000Z
from django.db import migrations def rename_sslyze_parser(apps, schema_editor): Test_Type_model = apps.get_model('dojo', 'Test_Type') try: test_type_sslyze = Test_Type_model.objects.get(name='SSLyze 3 Scan (JSON)') test_type_sslyze.name = 'SSLyze Scan (JSON)' test_type_sslyze.save() ...
25.958333
83
0.678973
from django.db import migrations def rename_sslyze_parser(apps, schema_editor): Test_Type_model = apps.get_model('dojo', 'Test_Type') try: test_type_sslyze = Test_Type_model.objects.get(name='SSLyze 3 Scan (JSON)') test_type_sslyze.name = 'SSLyze Scan (JSON)' test_type_sslyze.save() ...
true
true
1c357d50e73856ed1bfaef590c993ed6007d7fe2
618
py
Python
opencv_detector.py
MingyaoLiu/Jetson-Nano-Projects
45f82ec7e5b99eab9e0bd6cae190cbf453cfe766
[ "MIT" ]
1
2019-04-20T21:55:05.000Z
2019-04-20T21:55:05.000Z
opencv_detector.py
MingyaoLiu/Jetson-Nano-Projects
45f82ec7e5b99eab9e0bd6cae190cbf453cfe766
[ "MIT" ]
3
2020-11-27T16:27:22.000Z
2021-04-06T17:53:28.000Z
opencv_detector.py
MingyaoLiu/Jetson-Nano-Projects
45f82ec7e5b99eab9e0bd6cae190cbf453cfe766
[ "MIT" ]
null
null
null
import numpy as np import cv2 as cv face_cascade = cv.CascadeClassifier('1.xml') eye_cascade = cv.CascadeClassifier('1.xml') img = cv.imread('1.jpeg') gray = cv.cvtColor(img, cv.COLOR_BGR2GRAY) faces = face_cascade.detectMultiScale(gray, 1.3, 5) for (x, y, w, h) in faces: cv.rectangle(img, (x, y), (x+w, y+h), (25...
30.9
73
0.645631
import numpy as np import cv2 as cv face_cascade = cv.CascadeClassifier('1.xml') eye_cascade = cv.CascadeClassifier('1.xml') img = cv.imread('1.jpeg') gray = cv.cvtColor(img, cv.COLOR_BGR2GRAY) faces = face_cascade.detectMultiScale(gray, 1.3, 5) for (x, y, w, h) in faces: cv.rectangle(img, (x, y), (x+w, y+h), (25...
true
true
1c357d575a08ef8dd6defe03e0126b0442f5c31b
3,410
py
Python
pyMSpec/test/test_mass_spectrum.py
SpatialMetabolomics/pyMS
52c4dce2c4c0eba3c6d447565f3296252f882f9e
[ "Apache-2.0" ]
5
2017-12-18T06:03:51.000Z
2019-04-05T21:12:54.000Z
pyMSpec/test/test_mass_spectrum.py
alexandrovteam/pyMS
52c4dce2c4c0eba3c6d447565f3296252f882f9e
[ "Apache-2.0" ]
null
null
null
pyMSpec/test/test_mass_spectrum.py
alexandrovteam/pyMS
52c4dce2c4c0eba3c6d447565f3296252f882f9e
[ "Apache-2.0" ]
3
2018-10-23T13:13:19.000Z
2021-02-22T09:19:26.000Z
""" Created on 27.08.2015 @author: Dominik Fay """ import unittest import numpy from numpy.ma.testutils import assert_array_equal from .. import mass_spectrum class MassSpectrumTest(unittest.TestCase): def test_init(self): """Check that spectrum is empty on initialization.""" ms = mass_spectrum...
36.276596
110
0.66217
import unittest import numpy from numpy.ma.testutils import assert_array_equal from .. import mass_spectrum class MassSpectrumTest(unittest.TestCase): def test_init(self): ms = mass_spectrum.MassSpectrum() mzs, ints = ms.get_spectrum() assert_array_equal([], mzs) assert_array_equ...
true
true
1c357dafad42d78510fe46f36e8b335ca5dd5326
4,748
py
Python
rose-blend/tests/test.py
exjam/rose-tools
bcc642b914696381082248b639f29299d17d8282
[ "MIT" ]
11
2018-02-09T04:25:07.000Z
2021-08-08T03:09:02.000Z
rose-blend/tests/test.py
wjsassi/rose-tools
31b5316e28c6fb0add6daa84d3d05eff516d6a8f
[ "MIT" ]
1
2021-04-21T03:09:43.000Z
2021-04-21T03:09:43.000Z
rose-blend/tests/test.py
wjsassi/rose-tools
31b5316e28c6fb0add6daa84d3d05eff516d6a8f
[ "MIT" ]
7
2018-07-08T20:35:15.000Z
2022-03-01T22:49:39.000Z
import os import sys import unittest DIR = os.path.abspath(os.path.dirname(__file__)) ROOT_DIR = os.path.dirname(DIR) DATA_DIR = os.path.join(DIR, "data") # Manually manipulate path so avoid `bpy` imports in `io_rose` module sys.path.append(os.path.join(ROOT_DIR, "io_rose")) from rose.him import * from rose.til impo...
35.17037
69
0.644693
import os import sys import unittest DIR = os.path.abspath(os.path.dirname(__file__)) ROOT_DIR = os.path.dirname(DIR) DATA_DIR = os.path.join(DIR, "data") sys.path.append(os.path.join(ROOT_DIR, "io_rose")) from rose.him import * from rose.til import * from rose.zmd import * from rose.zms import * from rose.zon impor...
true
true
1c3580ad808a99cdfced82b0c66ab16a489c9b1f
1,548
py
Python
diff_movie.py
benmontet/K2-noise
a4b682cdf33f85d2dffc4cef115dcedacfccb4b4
[ "MIT" ]
1
2019-05-15T09:14:15.000Z
2019-05-15T09:14:15.000Z
diff_movie.py
benmontet/K2-noise
a4b682cdf33f85d2dffc4cef115dcedacfccb4b4
[ "MIT" ]
null
null
null
diff_movie.py
benmontet/K2-noise
a4b682cdf33f85d2dffc4cef115dcedacfccb4b4
[ "MIT" ]
null
null
null
#Create a movie of the frames import numpy as np from utils_simple import TIME, FLUX, QUALITY import matplotlib.pyplot as plt from matplotlib.cm import get_cmap #Limit ourselves 10-40 for more detail FLUX = FLUX[:, 15:35, 15:35] time = TIME - 1860 diffs = np.diff(FLUX, axis=0) base = "frames/{:0>3d}.png" bin = ge...
29.207547
102
0.656977
import numpy as np from utils_simple import TIME, FLUX, QUALITY import matplotlib.pyplot as plt from matplotlib.cm import get_cmap FLUX = FLUX[:, 15:35, 15:35] time = TIME - 1860 diffs = np.diff(FLUX, axis=0) base = "frames/{:0>3d}.png" bin = get_cmap("binary") div = get_cmap("bwr") def update_qual(qual): if...
true
true
1c3580e2d29806b0375466fb2f8a062a91c33992
3,961
py
Python
dax/tests/unit_test_autoprocessor.py
DecisionNeurosciencePsychopathology/dax
4ae68d07128bc61058797f4f09a3a112f351ce21
[ "MIT" ]
28
2015-05-31T22:01:54.000Z
2022-01-14T12:18:48.000Z
dax/tests/unit_test_autoprocessor.py
DecisionNeurosciencePsychopathology/dax
4ae68d07128bc61058797f4f09a3a112f351ce21
[ "MIT" ]
218
2015-01-14T15:09:58.000Z
2022-03-30T17:03:46.000Z
dax/tests/unit_test_autoprocessor.py
DecisionNeurosciencePsychopathology/dax
4ae68d07128bc61058797f4f09a3a112f351ce21
[ "MIT" ]
26
2015-01-08T15:48:15.000Z
2022-01-31T14:58:34.000Z
from unittest import TestCase import io import yaml from dax.processors import AutoProcessor from dax.tests import unit_test_entity_common as common from dax import XnatUtils from dax import yaml_doc class ConnectionStringUnitTest(TestCase): def test_a_xpath(self): print((XnatUtils.InterfaceTemp.A_X...
34.745614
77
0.677102
from unittest import TestCase import io import yaml from dax.processors import AutoProcessor from dax.tests import unit_test_entity_common as common from dax import XnatUtils from dax import yaml_doc class ConnectionStringUnitTest(TestCase): def test_a_xpath(self): print((XnatUtils.InterfaceTemp.A_X...
true
true
1c35830de691ae2c04afec42015310a01c8779c4
1,345
py
Python
remindForApproval.py
Kratosc3/GittigidiyorEntegre
17f011cfec49b3adb2b05f1b3ea559c7a7495c29
[ "MIT" ]
null
null
null
remindForApproval.py
Kratosc3/GittigidiyorEntegre
17f011cfec49b3adb2b05f1b3ea559c7a7495c29
[ "MIT" ]
null
null
null
remindForApproval.py
Kratosc3/GittigidiyorEntegre
17f011cfec49b3adb2b05f1b3ea559c7a7495c29
[ "MIT" ]
null
null
null
from zeep import Client from zeep.transports import Transport from zeep import xsd from zeep import helpers import xmltodict import json class remindForApproval: def __init__(self,apiKey = '',sign = '',time = '',saleCode = 21321,lang = '',session = None): # Zeep Client client = Clie...
36.351351
189
0.596283
from zeep import Client from zeep.transports import Transport from zeep import xsd from zeep import helpers import xmltodict import json class remindForApproval: def __init__(self,apiKey = '',sign = '',time = '',saleCode = 21321,lang = '',session = None): client = Client(wsdl="https:...
true
true
1c358366a8e6e839414c44203ddea07b6333090d
931
py
Python
21.dirac-dice/py/part2.py
rolandbernard/adventofcode-2021
9249815af62d0fcf79b71357330a1456ea3be1ed
[ "BSD-2-Clause" ]
null
null
null
21.dirac-dice/py/part2.py
rolandbernard/adventofcode-2021
9249815af62d0fcf79b71357330a1456ea3be1ed
[ "BSD-2-Clause" ]
null
null
null
21.dirac-dice/py/part2.py
rolandbernard/adventofcode-2021
9249815af62d0fcf79b71357330a1456ea3be1ed
[ "BSD-2-Clause" ]
null
null
null
import sys from collections import defaultdict from functools import cache pos = tuple(int(l[-1]) for l in sys.stdin.read().strip().split('\n')) prob = defaultdict(lambda: 0) for i in range(1, 4): for j in range(1, 4): for k in range(1, 4): prob[i + j + k] += 1 def applyStep(pos, points, pl...
25.861111
69
0.529538
import sys from collections import defaultdict from functools import cache pos = tuple(int(l[-1]) for l in sys.stdin.read().strip().split('\n')) prob = defaultdict(lambda: 0) for i in range(1, 4): for j in range(1, 4): for k in range(1, 4): prob[i + j + k] += 1 def applyStep(pos, points, pl...
true
true
1c35838db2784a1cadbfa55a5a2c5676e49f705e
7,527
py
Python
autolab_core/dual_quaternion.py
shivamvats/autolab_core
cda081d2e07e3fe6cc9f3e8c86eea92330910d20
[ "Apache-2.0" ]
68
2017-07-02T22:14:47.000Z
2022-03-30T19:09:37.000Z
autolab_core/dual_quaternion.py
shivamvats/autolab_core
cda081d2e07e3fe6cc9f3e8c86eea92330910d20
[ "Apache-2.0" ]
14
2017-06-29T18:27:12.000Z
2022-02-02T20:59:02.000Z
autolab_core/dual_quaternion.py
shivamvats/autolab_core
cda081d2e07e3fe6cc9f3e8c86eea92330910d20
[ "Apache-2.0" ]
35
2017-07-17T01:44:59.000Z
2022-03-30T19:09:28.000Z
""" Class to handle dual quaternions and their interpolations Implementation details inspired by Ben Kenwright's "A Beginners Guide to Dual-Quaternions" http://cs.gmu.edu/~jmlien/teaching/cs451/uploads/Main/dual-quaternion.pdf Author: Jacky Liang """ from numbers import Number import numpy as np from .transformations ...
29.402344
86
0.57048
from numbers import Number import numpy as np from .transformations import quaternion_multiply, quaternion_conjugate class DualQuaternion(object): def __init__( self, qr=[1, 0, 0, 0], qd=[0, 0, 0, 0], enforce_unit_norm=True ): self.qr = qr self.qd = qd if enforce_unit_norm: ...
true
true
1c3583babedf94c5ecb7f0ee8b82f2f755e2da54
9,608
py
Python
pyslam/feature_r2d2.py
dysdsyd/VO_benchmark
a7602edab934419c1ec73618ee655e18026f834f
[ "Apache-2.0" ]
2
2021-09-11T09:13:31.000Z
2021-11-03T01:39:56.000Z
pyslam/feature_r2d2.py
dysdsyd/VO_benchmark
a7602edab934419c1ec73618ee655e18026f834f
[ "Apache-2.0" ]
null
null
null
pyslam/feature_r2d2.py
dysdsyd/VO_benchmark
a7602edab934419c1ec73618ee655e18026f834f
[ "Apache-2.0" ]
null
null
null
""" * This file is part of PYSLAM. * Adapted from https://raw.githubusercontent.com/naver/r2d2/master/extract.py, see the licence therein. * * Copyright (C) 2016-present Luigi Freda <luigi dot freda at gmail dot com> * * PYSLAM is free software: you can redistribute it and/or modify * it under the terms of the GNU ...
36.393939
146
0.560262
import config config.cfg.set_lib('r2d2') import os, pdb from PIL import Image import numpy as np import torch import cv2 from threading import RLock from r2d2.tools import common from r2d2.tools.dataloader import norm_RGB from r2d2.nets.patchnet import * import argparse from utils_sys import Printer kVerbose...
true
true
1c3584d9e2de243024676c411867a89907337846
642
py
Python
tmc/ui/prompt.py
jgke/tmc.py
a061d199ecce0274c1fa554fb065e13647d9862b
[ "MIT" ]
null
null
null
tmc/ui/prompt.py
jgke/tmc.py
a061d199ecce0274c1fa554fb065e13647d9862b
[ "MIT" ]
null
null
null
tmc/ui/prompt.py
jgke/tmc.py
a061d199ecce0274c1fa554fb065e13647d9862b
[ "MIT" ]
null
null
null
def yn_prompt(msg, default=True): """ Prompts the user for yes or no. """ ret = custom_prompt(msg, ["y", "n"], "y" if default else "n") if ret == "y": return True return False def custom_prompt(msg, options, default): """ Prompts the user with custom options. """ format...
25.68
72
0.563863
def yn_prompt(msg, default=True): ret = custom_prompt(msg, ["y", "n"], "y" if default else "n") if ret == "y": return True return False def custom_prompt(msg, options, default): formatted_options = [ x.upper() if x == default else x.lower() for x in options ] sure = input("{0} ...
true
true
1c3585df2004cca2bbaff017c9833ed1e71eb017
4,903
py
Python
tensorflow/compiler/tests/extract_image_patches_op_test.py
uve/tensorflow
e08079463bf43e5963acc41da1f57e95603f8080
[ "Apache-2.0" ]
null
null
null
tensorflow/compiler/tests/extract_image_patches_op_test.py
uve/tensorflow
e08079463bf43e5963acc41da1f57e95603f8080
[ "Apache-2.0" ]
null
null
null
tensorflow/compiler/tests/extract_image_patches_op_test.py
uve/tensorflow
e08079463bf43e5963acc41da1f57e95603f8080
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
32.686667
81
0.562309
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np from tensorflow.compiler.tests import xla_test from tensorflow.python.framework import dtypes from tensorflow.python.ops import array_ops from tensorflow.python.platform import te...
true
true
1c35865c5c84b4c27bfc95f86f6862f0433e9a24
6,387
py
Python
ludwig/utils/loss_utils.py
ludwig-ai/ludw
b9d95bbdb474bc22260269de1bc094bc5455f37c
[ "Apache-2.0" ]
970
2020-12-17T15:09:20.000Z
2022-03-31T22:58:03.000Z
ludwig/utils/loss_utils.py
ludwig-ai/ludw
b9d95bbdb474bc22260269de1bc094bc5455f37c
[ "Apache-2.0" ]
503
2020-12-16T21:44:40.000Z
2022-03-31T18:21:52.000Z
ludwig/utils/loss_utils.py
ludwig-ai/ludw
b9d95bbdb474bc22260269de1bc094bc5455f37c
[ "Apache-2.0" ]
145
2020-12-18T07:38:30.000Z
2022-03-29T19:05:08.000Z
import torch def rmspe_loss(targets: torch.Tensor, predictions: torch.Tensor) -> torch.Tensor: """Root mean square percentage error.""" loss = torch.sqrt(torch.mean(((targets - predictions).float() / targets) ** 2)) return loss def mean_confidence_penalty(probabilities: torch.Tensor, num_classes: int) -...
31.776119
106
0.60811
import torch def rmspe_loss(targets: torch.Tensor, predictions: torch.Tensor) -> torch.Tensor: loss = torch.sqrt(torch.mean(((targets - predictions).float() / targets) ** 2)) return loss def mean_confidence_penalty(probabilities: torch.Tensor, num_classes: int) -> torch.Tensor: max_entropy = torch.log(t...
true
true
1c3586bf286862eddfc75f853f4893e56deed7fb
6,750
py
Python
robit/core/cron.py
stratusadv/robit
7e0414d0ed3d98bb2c9a8785bf36961ac08f1d27
[ "MIT" ]
null
null
null
robit/core/cron.py
stratusadv/robit
7e0414d0ed3d98bb2c9a8785bf36961ac08f1d27
[ "MIT" ]
1
2021-11-01T18:51:04.000Z
2021-11-01T18:51:04.000Z
robit/core/cron.py
stratusadv/robit
7e0414d0ed3d98bb2c9a8785bf36961ac08f1d27
[ "MIT" ]
null
null
null
import ast from datetime import datetime, timedelta import calendar from robit.core.clock import CREATED_DATE_FORMAT class Cron: def __init__( self, value: str, utc_offset: int = 0, ): self.value = value self.utc_offset = utc_offset cron_list = self...
30.542986
129
0.531556
import ast from datetime import datetime, timedelta import calendar from robit.core.clock import CREATED_DATE_FORMAT class Cron: def __init__( self, value: str, utc_offset: int = 0, ): self.value = value self.utc_offset = utc_offset cron_list = self...
true
true
1c35884aea0a87075d7d5594df270a3e982a4767
738
py
Python
cancertype_prediction/plot_param_opt.py
DPBayes/dp-representation-transfer
0c8389cc36659a7606bceac2531eaef7663ac49c
[ "MIT" ]
1
2021-12-09T03:45:18.000Z
2021-12-09T03:45:18.000Z
cancertype_prediction/plot_param_opt.py
DPBayes/dp-representation-transfer
0c8389cc36659a7606bceac2531eaef7663ac49c
[ "MIT" ]
1
2019-10-03T19:32:29.000Z
2019-10-04T14:09:28.000Z
cancertype_prediction/plot_param_opt.py
DPBayes/dp-representation-transfer
0c8389cc36659a7606bceac2531eaef7663ac49c
[ "MIT" ]
1
2019-10-15T07:16:42.000Z
2019-10-15T07:16:42.000Z
import numpy as np import matplotlib.pyplot as plt x = np.load("param_opt/opt_params.npy") y = np.load("param_opt/opt_results.npy") domain = [ {'name': 'learning_rate_log10', 'type': 'continuous', 'domain': (-5,-1)}, {'name': 'n_hidden_layers', 'type': 'discrete', 'domain': [1, 2, 3]}, # {'name': 'repr_dim', 'ty...
29.52
95
0.607046
import numpy as np import matplotlib.pyplot as plt x = np.load("param_opt/opt_params.npy") y = np.load("param_opt/opt_results.npy") domain = [ {'name': 'learning_rate_log10', 'type': 'continuous', 'domain': (-5,-1)}, {'name': 'n_hidden_layers', 'type': 'discrete', 'domain': [1, 2, 3]}, {'name': 'repr_dim', 'typ...
true
true
1c3589620f3ae4c5d749e81bd94ab6a5f97a9f58
551
py
Python
aiotf/__init__.py
brunoalano/aiotf
78a6b67694c4c3245f14003bd3d3f0450ac9cad2
[ "MIT" ]
8
2018-11-28T12:13:25.000Z
2021-11-08T11:19:01.000Z
aiotf/__init__.py
brunoalano/aiotf
78a6b67694c4c3245f14003bd3d3f0450ac9cad2
[ "MIT" ]
null
null
null
aiotf/__init__.py
brunoalano/aiotf
78a6b67694c4c3245f14003bd3d3f0450ac9cad2
[ "MIT" ]
null
null
null
from .__version__ import __title__, __description__, __url__, __version__ from .__version__ import __author__, __author_email__, __license__ from .__version__ import __copyright__ # Set default logging handler to avoid "No handler found" warnings. import logging try: # Python 2.7+ from logging import NullHandler ex...
30.611111
73
0.798548
from .__version__ import __title__, __description__, __url__, __version__ from .__version__ import __author__, __author_email__, __license__ from .__version__ import __copyright__ import logging try: from logging import NullHandler except ImportError: class NullHandler(logging.Handler): def emit(self, record)...
true
true
1c358a6e7c8cd62a3bef6015d49d8d740a1f2af8
66
py
Python
caching/__init__.py
remohammadi/django-cache-machine
da5f6edf1600a28cb6ad7f9f7ad8104f1748e674
[ "BSD-3-Clause" ]
1
2019-02-10T19:33:37.000Z
2019-02-10T19:33:37.000Z
caching/__init__.py
remohammadi/django-cache-machine
da5f6edf1600a28cb6ad7f9f7ad8104f1748e674
[ "BSD-3-Clause" ]
null
null
null
caching/__init__.py
remohammadi/django-cache-machine
da5f6edf1600a28cb6ad7f9f7ad8104f1748e674
[ "BSD-3-Clause" ]
null
null
null
VERSION = (0, '8', '1') __version__ = '.'.join(map(str, VERSION))
22
41
0.575758
VERSION = (0, '8', '1') __version__ = '.'.join(map(str, VERSION))
true
true
1c358bac3573d104c1bedc36acc256cb7d1a0465
423
py
Python
setup.py
human-ui/gym-minigrid
66a89abf236030b8a9d84a51f62acbc7605e01cd
[ "BSD-3-Clause" ]
null
null
null
setup.py
human-ui/gym-minigrid
66a89abf236030b8a9d84a51f62acbc7605e01cd
[ "BSD-3-Clause" ]
1
2020-01-06T08:49:05.000Z
2020-01-07T08:31:11.000Z
setup.py
human-ui/gym-minigrid
66a89abf236030b8a9d84a51f62acbc7605e01cd
[ "BSD-3-Clause" ]
null
null
null
from setuptools import setup setup( name='gym_minigrid', version='0.0.5', keywords='memory, environment, agent, rl, openaigym, openai-gym, gym', url='https://github.com/maximecb/gym-minigrid', description='Minimalistic gridworld package for OpenAI Gym', packages=['gym_minigrid'], install_re...
24.882353
74
0.612293
from setuptools import setup setup( name='gym_minigrid', version='0.0.5', keywords='memory, environment, agent, rl, openaigym, openai-gym, gym', url='https://github.com/maximecb/gym-minigrid', description='Minimalistic gridworld package for OpenAI Gym', packages=['gym_minigrid'], install_re...
true
true
1c358c09ae78dec70f326486988c762b5b1893f8
17,071
py
Python
PythonAPI/carissma_project/lib/python3.5/site-packages/matplotlib/tests/test_colorbar.py
AbdulHoffmann/carla_carissma
8d382769ffa02a6c61a22c57160285505f5ff0a4
[ "MIT" ]
366
2019-04-07T20:34:48.000Z
2022-03-29T07:35:38.000Z
venv/lib/python3.7/site-packages/matplotlib/tests/test_colorbar.py
John1001Song/Big-Data-Robo-Adviser
9444dce96954c546333d5aecc92a06c3bfd19aa5
[ "MIT" ]
12
2018-12-06T22:06:49.000Z
2022-02-25T17:40:44.000Z
venv/lib/python3.7/site-packages/matplotlib/tests/test_colorbar.py
John1001Song/Big-Data-Robo-Adviser
9444dce96954c546333d5aecc92a06c3bfd19aa5
[ "MIT" ]
64
2018-04-25T08:51:57.000Z
2022-01-29T14:13:57.000Z
import numpy as np import pytest from matplotlib import rc_context from matplotlib.testing.decorators import image_comparison import matplotlib.pyplot as plt from matplotlib.colors import BoundaryNorm, LogNorm, PowerNorm from matplotlib.cm import get_cmap from matplotlib.colorbar import ColorbarBase from matplotlib.ti...
38.020045
78
0.600785
import numpy as np import pytest from matplotlib import rc_context from matplotlib.testing.decorators import image_comparison import matplotlib.pyplot as plt from matplotlib.colors import BoundaryNorm, LogNorm, PowerNorm from matplotlib.cm import get_cmap from matplotlib.colorbar import ColorbarBase from matplotlib.ti...
true
true
1c358c3ca06193a459088b7dc742ecfcfbfc9389
4,118
py
Python
tests/graph/test_stpg_heuristics.py
GiliardGodoi/steiner-problem-with-evol
6b34f0342b791ae6c65b6d016c37a4d45ab5cdad
[ "MIT" ]
null
null
null
tests/graph/test_stpg_heuristics.py
GiliardGodoi/steiner-problem-with-evol
6b34f0342b791ae6c65b6d016c37a4d45ab5cdad
[ "MIT" ]
5
2021-01-26T17:28:32.000Z
2021-03-14T13:46:48.000Z
tests/graph/test_stpg_heuristics.py
GiliardGodoi/steiner-problem-with-evol
6b34f0342b791ae6c65b6d016c37a4d45ab5cdad
[ "MIT" ]
1
2021-01-25T16:35:59.000Z
2021-01-25T16:35:59.000Z
import random import unittest from collections import deque from os import path from ga4stpg.graph.graph import UndirectedWeightedGraph as Graph from ga4stpg.graph.reader import ReaderORLibrary from ga4stpg.graph.steiner import (prunning_mst, shortest_path, shortest_path_origin_prim,...
29.84058
95
0.610248
import random import unittest from collections import deque from os import path from ga4stpg.graph.graph import UndirectedWeightedGraph as Graph from ga4stpg.graph.reader import ReaderORLibrary from ga4stpg.graph.steiner import (prunning_mst, shortest_path, shortest_path_origin_prim,...
true
true
1c358d00e0e7644e712c729d73ae6ea489028eb9
6,888
py
Python
ros/src/tl_detector/tl_detector.py
kingmbm1118/selfdriving9_Capstone
37e4613290df63e4ea55853bf93822da9e00b695
[ "MIT" ]
1
2020-08-04T01:59:44.000Z
2020-08-04T01:59:44.000Z
ros/src/tl_detector/tl_detector.py
kingmbm1118/selfdriving9_Capstone
37e4613290df63e4ea55853bf93822da9e00b695
[ "MIT" ]
12
2019-12-16T22:19:56.000Z
2022-03-12T00:06:22.000Z
ros/src/tl_detector/tl_detector.py
kingmbm1118/selfdriving9_Capstone
37e4613290df63e4ea55853bf93822da9e00b695
[ "MIT" ]
2
2019-11-27T18:53:10.000Z
2019-11-28T18:17:32.000Z
#!/usr/bin/env python import rospy import os from std_msgs.msg import Int32 from geometry_msgs.msg import PoseStamped, Pose from styx_msgs.msg import TrafficLightArray, TrafficLight from styx_msgs.msg import Lane from sensor_msgs.msg import Image from cv_bridge import CvBridge from light_classification.tl_classifier im...
37.434783
132
0.642857
import rospy import os from std_msgs.msg import Int32 from geometry_msgs.msg import PoseStamped, Pose from styx_msgs.msg import TrafficLightArray, TrafficLight from styx_msgs.msg import Lane from sensor_msgs.msg import Image from cv_bridge import CvBridge from light_classification.tl_classifier import TLClassifier impo...
true
true
1c358d5c277563ebf7ec4e31a4234472b1bb6da1
389
py
Python
week06/week06/wsgi.py
fuengfa/CS459
cf8b8dcdb94ebcb894551174e5223b857425e1f6
[ "BSD-2-Clause" ]
null
null
null
week06/week06/wsgi.py
fuengfa/CS459
cf8b8dcdb94ebcb894551174e5223b857425e1f6
[ "BSD-2-Clause" ]
null
null
null
week06/week06/wsgi.py
fuengfa/CS459
cf8b8dcdb94ebcb894551174e5223b857425e1f6
[ "BSD-2-Clause" ]
null
null
null
""" WSGI config for week06 project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTIN...
22.882353
78
0.784062
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS_MODULE", "week06.settings") application = get_wsgi_application()
true
true
1c358d63343780b4bc592c3310d68823d9e3ed92
6,650
py
Python
Python/utils/trimesh.py
hpbader42/Klampt
89faaef942c0c6fca579a3770314c6610e2ac772
[ "BSD-3-Clause" ]
null
null
null
Python/utils/trimesh.py
hpbader42/Klampt
89faaef942c0c6fca579a3770314c6610e2ac772
[ "BSD-3-Clause" ]
null
null
null
Python/utils/trimesh.py
hpbader42/Klampt
89faaef942c0c6fca579a3770314c6610e2ac772
[ "BSD-3-Clause" ]
1
2019-07-01T08:48:32.000Z
2019-07-01T08:48:32.000Z
from klampt.vectorops import * import math #import numpy def rotationMatrix(x,y,z,rads): c = math.cos(rads) s = math.sin(rads) #cross = numpy.matrix([[0.0,-z,y],[z,0.0,-x],[-y,x,0.0]]) #return numpy.eye(3)+c*cross-s*cross*cross; val = [[c,0.0,0.0],[0.0,c,0.0],[0.0,0.0,c]] rrt = [[x*x,x*y,x*z],[...
31.367925
109
0.521203
from klampt.vectorops import * import math def rotationMatrix(x,y,z,rads): c = math.cos(rads) s = math.sin(rads) val = [[c,0.0,0.0],[0.0,c,0.0],[0.0,0.0,c]] rrt = [[x*x,x*y,x*z],[y*x,y*y,y*z],[z*x,z*y,z*z]] cross = [[0.0,-z,y],[z,0.0,-x],[-y,x,0.0]] for i in range(3): for j in r...
true
true
1c358e0ca080cd6799da1d56d8825177021aec6e
121
py
Python
platform/core/polyaxon/polyflow/apps.py
hackerwins/polyaxon
ff56a098283ca872abfbaae6ba8abba479ffa394
[ "Apache-2.0" ]
null
null
null
platform/core/polyaxon/polyflow/apps.py
hackerwins/polyaxon
ff56a098283ca872abfbaae6ba8abba479ffa394
[ "Apache-2.0" ]
null
null
null
platform/core/polyaxon/polyflow/apps.py
hackerwins/polyaxon
ff56a098283ca872abfbaae6ba8abba479ffa394
[ "Apache-2.0" ]
null
null
null
from django.apps import AppConfig class PolyflowConfig(AppConfig): name = 'polyflow' verbose_name = 'Polyflow'
17.285714
33
0.735537
from django.apps import AppConfig class PolyflowConfig(AppConfig): name = 'polyflow' verbose_name = 'Polyflow'
true
true
1c358e4113ad9f6e9b8502c37297313a1c2eefbf
5,416
py
Python
octopus/tests/BTC/test_explorer.py
SillyTin/octopus
5ad30f4affaa209a6ccc03c406c41c820dab62dc
[ "MIT" ]
212
2018-06-29T10:13:42.000Z
2020-02-16T07:55:47.000Z
octopus/tests/BTC/test_explorer.py
b-mueller/octopus
249f2afa37859bf645bc0251502ac104c4b37ec7
[ "MIT" ]
12
2018-07-05T08:50:12.000Z
2020-01-16T08:41:49.000Z
octopus/tests/BTC/test_explorer.py
b-mueller/octopus
249f2afa37859bf645bc0251502ac104c4b37ec7
[ "MIT" ]
34
2018-06-28T11:49:02.000Z
2020-02-05T07:42:33.000Z
from octopus.platforms.BTC.explorer import BitcoinExplorerRPC from octopus.platforms.BTC.explorer import RPC_USER, RPC_PASSWORD, RPC_HOST import unittest class BitcoinExplorerTestCase(unittest.TestCase): explorer = BitcoinExplorerRPC(host=('%s:%s@%s' % (RPC_USER, RPC_PASSWORD, RPC_HOST))) blockhash = '0000...
51.09434
465
0.723227
from octopus.platforms.BTC.explorer import BitcoinExplorerRPC from octopus.platforms.BTC.explorer import RPC_USER, RPC_PASSWORD, RPC_HOST import unittest class BitcoinExplorerTestCase(unittest.TestCase): explorer = BitcoinExplorerRPC(host=('%s:%s@%s' % (RPC_USER, RPC_PASSWORD, RPC_HOST))) blockhash = '0000...
true
true
1c35909cfc3500db75b7730f3679f74a40141835
2,119
py
Python
Hessian/models/c1.py
Bhaskers-Blu-Org1/model-sanitization
1eff7e9f35e4fd194ffc83a55e4f6688ca9bb5c3
[ "Apache-2.0" ]
15
2020-05-04T15:28:36.000Z
2021-12-31T02:34:12.000Z
Hessian/models/c1.py
Bhaskers-Blu-Org1/model-sanitization
1eff7e9f35e4fd194ffc83a55e4f6688ca9bb5c3
[ "Apache-2.0" ]
1
2020-05-14T04:56:22.000Z
2020-05-27T14:10:12.000Z
Hessian/models/c1.py
IBM/model-sanitization
1eff7e9f35e4fd194ffc83a55e4f6688ca9bb5c3
[ "Apache-2.0" ]
4
2020-06-29T15:18:57.000Z
2022-03-27T17:04:07.000Z
from __future__ import print_function import numpy as np import argparse import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torchvision import datasets, transforms from torch.autograd import Variable class c1_model(nn.Module): def __init__(self, num_classes=1...
32.6
95
0.596508
from __future__ import print_function import numpy as np import argparse import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torchvision import datasets, transforms from torch.autograd import Variable class c1_model(nn.Module): def __init__(self, num_classes=1...
true
true
1c3591614ba26c792bb2d02a3e14a8f342bd3969
1,915
py
Python
test/functional/rpc_signmessage.py
BlockStamp/bstnew
f3775b14874a78c3fd811616752f2c07415b04ee
[ "MIT" ]
37
2018-11-29T13:13:40.000Z
2020-12-10T00:39:21.000Z
test/functional/rpc_signmessage.py
BlockStamp/bstnew
f3775b14874a78c3fd811616752f2c07415b04ee
[ "MIT" ]
6
2018-11-27T19:07:36.000Z
2019-07-13T06:28:39.000Z
test/functional/rpc_signmessage.py
BlockStamp/bstnew
f3775b14874a78c3fd811616752f2c07415b04ee
[ "MIT" ]
6
2018-05-28T07:58:46.000Z
2020-01-15T18:41:24.000Z
#!/usr/bin/env python3 # Copyright (c) 2016-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test RPC commands for signing and verifying messages.""" from test_framework.test_framework import Bit...
44.534884
119
0.733681
from test_framework.test_framework import BitcoinTestFramework from test_framework.util import assert_equal class SignMessagesTest(BitcoinTestFramework): def set_test_params(self): self.setup_clean_chain = True self.num_nodes = 1 self.extra_args = [["-addresstype=legacy"]] def skip_te...
true
true
1c359266bc1d9b1602ff3fa83127beb8c92ced5f
56,633
py
Python
plugin.video.youtube/resources/lib/youtube_plugin/youtube/client/youtube.py
akuala/REPO.KUALA
ea9a157025530d2ce8fa0d88431c46c5352e89d4
[ "Apache-2.0" ]
2
2018-11-02T19:55:30.000Z
2020-08-14T02:22:20.000Z
plugin.video.youtube/resources/lib/youtube_plugin/youtube/client/youtube.py
akuala/REPO.KUALA
ea9a157025530d2ce8fa0d88431c46c5352e89d4
[ "Apache-2.0" ]
null
null
null
plugin.video.youtube/resources/lib/youtube_plugin/youtube/client/youtube.py
akuala/REPO.KUALA
ea9a157025530d2ce8fa0d88431c46c5352e89d4
[ "Apache-2.0" ]
3
2019-12-17T20:47:00.000Z
2021-02-11T19:03:59.000Z
# -*- coding: utf-8 -*- """ Copyright (C) 2014-2016 bromix (plugin.video.youtube) Copyright (C) 2016-2018 plugin.video.youtube SPDX-License-Identifier: GPL-2.0-only See LICENSES/GPL-2.0-only for more information. """ import copy import json import re import threading import traceback import requests...
42.10632
179
0.533505
import copy import json import re import threading import traceback import requests from .login_client import LoginClient from ..helper.video_info import VideoInfo from ..helper.utils import get_shelf_index_by_title from ...kodion import constants from ...kodion import Context from ...kodion.utils import datetime_pa...
true
true
1c359333395c19ed322fc04a147f52e90640146d
574
py
Python
runtests.py
lworkneh/NS
560145f5f1e4f0a5a3690470939a9cd48d9421bf
[ "MIT", "Unlicense" ]
1
2016-02-13T15:41:53.000Z
2016-02-13T15:41:53.000Z
runtests.py
lworkneh/NS
560145f5f1e4f0a5a3690470939a9cd48d9421bf
[ "MIT", "Unlicense" ]
6
2020-06-05T19:26:57.000Z
2022-03-11T23:33:08.000Z
runtests.py
lworkneh/NS
560145f5f1e4f0a5a3690470939a9cd48d9421bf
[ "MIT", "Unlicense" ]
null
null
null
import os import sys os.environ['DJANGO_SETTINGS_MODULE'] = 'test-settings' test_dir = os.path.dirname(__file__) sys.path.insert(0, test_dir) import django from django.test.utils import get_runner from django.conf import settings def runtests(): if django.VERSION >= (1, 7): django.setup() TestRunner ...
23.916667
59
0.700348
import os import sys os.environ['DJANGO_SETTINGS_MODULE'] = 'test-settings' test_dir = os.path.dirname(__file__) sys.path.insert(0, test_dir) import django from django.test.utils import get_runner from django.conf import settings def runtests(): if django.VERSION >= (1, 7): django.setup() TestRunner ...
true
true
1c3594191edf0b0fdc9949767ff6f24f088bd74f
1,124
py
Python
WEB SCRAPING PYTHON/webscraping4.py
nihilboy1455/CURSO-WEB-SCRAPING-PYTHON
c76f196a3ac13ddd36142b047880e3b2339c333f
[ "MIT" ]
null
null
null
WEB SCRAPING PYTHON/webscraping4.py
nihilboy1455/CURSO-WEB-SCRAPING-PYTHON
c76f196a3ac13ddd36142b047880e3b2339c333f
[ "MIT" ]
null
null
null
WEB SCRAPING PYTHON/webscraping4.py
nihilboy1455/CURSO-WEB-SCRAPING-PYTHON
c76f196a3ac13ddd36142b047880e3b2339c333f
[ "MIT" ]
null
null
null
# > EXEMPLO # - Obtendo produtos do Mercado Livre a partir de uma busca realizada pelo usuário import requests from bs4 import BeautifulSoup url_base = 'https://lista.mercadolivre.com.br/' produto_nome = input('Qual produto você deseja? ') response = requests.get(url_base + produto_nome) site = BeautifulSoup(respo...
32.114286
166
0.672598
import requests from bs4 import BeautifulSoup url_base = 'https://lista.mercadolivre.com.br/' produto_nome = input('Qual produto você deseja? ') response = requests.get(url_base + produto_nome) site = BeautifulSoup(response.text, 'html.parser') produtos = site.findAll('div', attrs={'class': 'andes-card andes-card...
true
true
1c35945136e0c8709847e01b2b465d1a75b5ecf0
3,481
py
Python
data/process_data.py
GauravKParmar/Disaster-Response-Pipeline
740aaa9e2062662841add2daa981d5177abda021
[ "MIT" ]
null
null
null
data/process_data.py
GauravKParmar/Disaster-Response-Pipeline
740aaa9e2062662841add2daa981d5177abda021
[ "MIT" ]
null
null
null
data/process_data.py
GauravKParmar/Disaster-Response-Pipeline
740aaa9e2062662841add2daa981d5177abda021
[ "MIT" ]
null
null
null
import sys import pandas as pd from sqlalchemy import create_engine def load_data(messages_filepath, categories_filepath): """ Loads data from given filepaths and merges them. Parameters: messages_filepath (str): messages filepath categories_filepath (str): categories filepath R...
29.752137
81
0.652111
import sys import pandas as pd from sqlalchemy import create_engine def load_data(messages_filepath, categories_filepath): messages = pd.read_csv(messages_filepath) categories = pd.read_csv(categories_filepath) df = pd.merge(messages, categories, on="id") return df def clea...
true
true