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
f71f0bf286ca8ce49bc5c297a075cd493190c592
2,108
py
Python
lib/galaxy_test/api/test_display_applications.py
rhpvorderman/galaxy
178015f8eff0b0c7a59c0d6756658f6428222837
[ "CC-BY-3.0" ]
1,085
2015-02-18T16:14:38.000Z
2022-03-30T23:52:07.000Z
lib/galaxy_test/api/test_display_applications.py
rhpvorderman/galaxy
178015f8eff0b0c7a59c0d6756658f6428222837
[ "CC-BY-3.0" ]
11,253
2015-02-18T17:47:32.000Z
2022-03-31T21:47:03.000Z
lib/galaxy_test/api/test_display_applications.py
rhpvorderman/galaxy
178015f8eff0b0c7a59c0d6756658f6428222837
[ "CC-BY-3.0" ]
1,000
2015-02-18T16:18:10.000Z
2022-03-29T08:22:56.000Z
import random from typing import List from ._framework import ApiTestCase class DisplayApplicationsApiTestCase(ApiTestCase): def test_index(self): response = self._get("display_applications") self._assert_status_code_is(response, 200) as_list = response.json() assert isinstance(a...
39.037037
93
0.680266
import random from typing import List from ._framework import ApiTestCase class DisplayApplicationsApiTestCase(ApiTestCase): def test_index(self): response = self._get("display_applications") self._assert_status_code_is(response, 200) as_list = response.json() assert isinstance(a...
true
true
f71f0c081079515df5975201c3eb0b6fb8e937f3
20,739
py
Python
dask/tests/test_distributed.py
mmccarty/dask
5602876f3389d039aba0d1a860922777843dbcb9
[ "BSD-3-Clause" ]
null
null
null
dask/tests/test_distributed.py
mmccarty/dask
5602876f3389d039aba0d1a860922777843dbcb9
[ "BSD-3-Clause" ]
null
null
null
dask/tests/test_distributed.py
mmccarty/dask
5602876f3389d039aba0d1a860922777843dbcb9
[ "BSD-3-Clause" ]
null
null
null
import pytest distributed = pytest.importorskip("distributed") import asyncio import os from functools import partial from operator import add from distributed.utils_test import client as c # noqa F401 from distributed.utils_test import cluster_fixture # noqa F401 from distributed.utils_test import loop # noqa F4...
30.320175
87
0.629105
import pytest distributed = pytest.importorskip("distributed") import asyncio import os from functools import partial from operator import add from distributed.utils_test import client as c from distributed.utils_test import cluster_fixture from distributed.utils_test import loop from distributed.utils_test im...
true
true
f71f0ceae06e8af2d70646a2a3ec49f14128a9f0
1,508
py
Python
mongodb/assets/loader.py
Code360In/katacoda-scenarios-34
b9eee8213a7fcdc5897601b745d851801a7c08b6
[ "MIT" ]
1
2020-09-10T11:55:51.000Z
2020-09-10T11:55:51.000Z
mongodb/assets/loader.py
Code360In/katacoda-scenarios-34
b9eee8213a7fcdc5897601b745d851801a7c08b6
[ "MIT" ]
1
2021-06-02T01:25:23.000Z
2021-06-02T01:25:23.000Z
mongodb/assets/loader.py
Code360In/katacoda-scenarios-34
b9eee8213a7fcdc5897601b745d851801a7c08b6
[ "MIT" ]
4
2020-10-02T06:38:39.000Z
2022-03-05T12:20:36.000Z
""" --------- loader.py --------- A minimal code to store data in MongoDB """ import csv import json from datetime import datetime from pymongo import MongoClient def load_orders(): """Load orders sample data""" client = MongoClient('localhost', 27017) orders = client["orders"] # insert customers da...
22.507463
72
0.600133
import csv import json from datetime import datetime from pymongo import MongoClient def load_orders(): client = MongoClient('localhost', 27017) orders = client["orders"] customers = orders["customers"] with open('customers.csv') as csvfile: customers_data = list(csv.DictReader(csvfile)...
true
true
f71f0dfec04143cf2e7de7cae4d58180583be0c7
7,187
py
Python
directory/test/test_directory.py
michael-go/integrations-core
b094befc63a479e6496ad0d0c7bb340be63699fc
[ "BSD-3-Clause" ]
null
null
null
directory/test/test_directory.py
michael-go/integrations-core
b094befc63a479e6496ad0d0c7bb340be63699fc
[ "BSD-3-Clause" ]
null
null
null
directory/test/test_directory.py
michael-go/integrations-core
b094befc63a479e6496ad0d0c7bb340be63699fc
[ "BSD-3-Clause" ]
null
null
null
# (C) Datadog, Inc. 2010-2017 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) # stdlib from itertools import product import os import shutil import tempfile # 3p from nose.plugins.attrib import attr # project from tests.checks.common import AgentCheckTest @attr(requires="directory") clas...
34.719807
129
0.542507
from itertools import product import os import shutil import tempfile from nose.plugins.attrib import attr from tests.checks.common import AgentCheckTest @attr(requires="directory") class DirectoryTestCase(AgentCheckTest): CHECK_NAME = 'directory' FILE_METRICS = [ "system.disk.directory.file....
true
true
f71f109340281960f4a1eab70708c99eb03b0e54
2,227
py
Python
app.py
kush95300/Cluster-Maker
886b424df2f73890ead47091d38a6008fedc0391
[ "MIT" ]
null
null
null
app.py
kush95300/Cluster-Maker
886b424df2f73890ead47091d38a6008fedc0391
[ "MIT" ]
null
null
null
app.py
kush95300/Cluster-Maker
886b424df2f73890ead47091d38a6008fedc0391
[ "MIT" ]
null
null
null
from flask import Flask, render_template from flask import request from random import randint app = Flask("Cluster Maker") @app.route("/") def home(): print("cluster ") #return "Cluster Maker" return render_template("index.html") @app.route("/setdefault") def setdefaults(): return render_template("...
21.621359
145
0.662775
from flask import Flask, render_template from flask import request from random import randint app = Flask("Cluster Maker") @app.route("/") def home(): print("cluster ") return render_template("index.html") @app.route("/setdefault") def setdefaults(): return render_template("default.html") @app.r...
true
true
f71f11c73d6da48e9a1284e15653009b6016156b
2,334
py
Python
gcloud/apigw/views/get_task_node_data.py
wkma/bk-sops
8fb5609c0c4495c28d588fbafa9d9f5f2976929b
[ "Apache-2.0" ]
881
2019-03-25T02:45:42.000Z
2022-03-30T09:10:49.000Z
gcloud/apigw/views/get_task_node_data.py
wkma/bk-sops
8fb5609c0c4495c28d588fbafa9d9f5f2976929b
[ "Apache-2.0" ]
3,303
2019-03-25T04:18:03.000Z
2022-03-31T11:52:03.000Z
gcloud/apigw/views/get_task_node_data.py
wkma/bk-sops
8fb5609c0c4495c28d588fbafa9d9f5f2976929b
[ "Apache-2.0" ]
395
2019-03-25T02:53:36.000Z
2022-03-31T08:37:28.000Z
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available. Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in co...
38.262295
115
0.758783
import ujson as json from django.views.decorators.csrf import csrf_exempt from django.views.decorators.http import require_GET from blueapps.account.decorators import login_exempt from gcloud import err_code from gcloud.apigw.decorators import mark_request_whether_is_trust from gcloud.apigw.decorators import projec...
true
true
f71f11e951868b67b7b2bbf023a64e9a2659dfc5
10,076
py
Python
qiskit/circuit/gate.py
ntgiwsvp/qiskit-terra
206b8bcc930817d88f8244f7b984880aecde959d
[ "Apache-2.0" ]
null
null
null
qiskit/circuit/gate.py
ntgiwsvp/qiskit-terra
206b8bcc930817d88f8244f7b984880aecde959d
[ "Apache-2.0" ]
null
null
null
qiskit/circuit/gate.py
ntgiwsvp/qiskit-terra
206b8bcc930817d88f8244f7b984880aecde959d
[ "Apache-2.0" ]
null
null
null
# This code is part of Qiskit. # # (C) Copyright IBM 2017. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
38.903475
98
0.568678
from warnings import warn from typing import List, Optional, Union, Tuple import numpy as np from scipy.linalg import schur from qiskit.circuit.parameter import ParameterExpression from qiskit.circuit.exceptions import CircuitError from .instruction import Instruction class Gate(Instruction): def _...
true
true
f71f1355b6da4b3a6ca66001c03db66ddef1e71c
95,602
py
Python
nodes.py
elrnv/RenderManForBlender
ca6b2ce1fb8b9e4acb893dfe640067c1beaa3c36
[ "MIT" ]
null
null
null
nodes.py
elrnv/RenderManForBlender
ca6b2ce1fb8b9e4acb893dfe640067c1beaa3c36
[ "MIT" ]
null
null
null
nodes.py
elrnv/RenderManForBlender
ca6b2ce1fb8b9e4acb893dfe640067c1beaa3c36
[ "MIT" ]
null
null
null
# ##### BEGIN MIT LICENSE BLOCK ##### # # Copyright (c) 2015 - 2017 Pixar # # 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 u...
40.768443
296
0.583178
_add_inputs from .shader_parameters import node_add_outputs from .shader_parameters import socket_map from .shader_parameters import txmake_options, update_conditional_visops from .util import args_files_in_path from .util import get_path_list from .util import rib from .util import debug from .util import user_path fr...
true
true
f71f139049f87b9c55751a72e126f4f93a152ebd
18,118
py
Python
nemo/collections/asr/models/label_models.py
dynasty-com/NeMo
1ac828df423fbcec1b34c650b3a20266bb133dde
[ "Apache-2.0" ]
null
null
null
nemo/collections/asr/models/label_models.py
dynasty-com/NeMo
1ac828df423fbcec1b34c650b3a20266bb133dde
[ "Apache-2.0" ]
null
null
null
nemo/collections/asr/models/label_models.py
dynasty-com/NeMo
1ac828df423fbcec1b34c650b3a20266bb133dde
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
43.552885
319
0.669941
import copy import json import os import pickle as pkl from typing import Dict, List, Optional, Union import onnx import torch from omegaconf import DictConfig from omegaconf.omegaconf import open_dict from pytorch_lightning import Trainer from nemo.collections.asr.data.audio_to_label import AudioToSpee...
true
true
f71f140f350264a0dce7591a5dbac3e9ba360b5f
477
py
Python
output/models/ms_data/regex/re_f7_xsd/re_f7.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
1
2021-08-14T17:59:21.000Z
2021-08-14T17:59:21.000Z
output/models/ms_data/regex/re_f7_xsd/re_f7.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
4
2020-02-12T21:30:44.000Z
2020-04-15T20:06:46.000Z
output/models/ms_data/regex/re_f7_xsd/re_f7.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
null
null
null
from dataclasses import dataclass, field from typing import List, Optional @dataclass class Regex: att: Optional[str] = field( default=None, metadata={ "type": "Attribute", "pattern": r"[^\s]{3}", } ) @dataclass class Doc: class Meta: name = "doc" ...
17.035714
40
0.505241
from dataclasses import dataclass, field from typing import List, Optional @dataclass class Regex: att: Optional[str] = field( default=None, metadata={ "type": "Attribute", "pattern": r"[^\s]{3}", } ) @dataclass class Doc: class Meta: name = "doc" ...
true
true
f71f145a83c52f0a8a2143d25a2e21652b51782c
5,116
py
Python
caflow/models/modules/mri_to_pet/UnconditionalFlow.py
GBATZOLIS/CAFLOW
ea33f84c424bd8e46999be59cd5d52bd8f0a3a77
[ "MIT" ]
6
2021-06-01T15:29:20.000Z
2022-03-01T03:58:43.000Z
caflow/models/modules/mri_to_pet/UnconditionalFlow.py
GBATZOLIS/CAFLOW
ea33f84c424bd8e46999be59cd5d52bd8f0a3a77
[ "MIT" ]
null
null
null
caflow/models/modules/mri_to_pet/UnconditionalFlow.py
GBATZOLIS/CAFLOW
ea33f84c424bd8e46999be59cd5d52bd8f0a3a77
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Jan 19 22:02:53 2021 @author: gbatz97 """ import torch.nn as nn import torch from caflow.models.modules.blocks.FlowBlock import FlowBlock from caflow.models.modules.blocks.Dequantisation import Dequantisation, VariationalDequantizat...
38.179104
125
0.60516
import torch.nn as nn import torch from caflow.models.modules.blocks.FlowBlock import FlowBlock from caflow.models.modules.blocks.Dequantisation import Dequantisation, VariationalDequantization class UnconditionalFlow(nn.Module): def __init__(self, channels, dim, resolution, scales, scale_de...
true
true
f71f1590d805d8b9c18634bc1e020d1aa22e3c29
2,037
py
Python
python/coroutines/cofollow.py
ASMlover/study
5878f862573061f94c5776a351e30270dfd9966a
[ "BSD-2-Clause" ]
22
2015-05-18T07:04:36.000Z
2021-08-02T03:01:43.000Z
python/coroutines/cofollow.py
ASMlover/study
5878f862573061f94c5776a351e30270dfd9966a
[ "BSD-2-Clause" ]
1
2017-08-31T22:13:57.000Z
2017-09-05T15:00:25.000Z
python/coroutines/cofollow.py
ASMlover/study
5878f862573061f94c5776a351e30270dfd9966a
[ "BSD-2-Clause" ]
6
2015-06-06T07:16:12.000Z
2021-07-06T13:45:56.000Z
#!/usr/bin/env python # -*- coding: UTF-8 -*- # # Copyright (c) 2020 ASMlover. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright...
35.12069
79
0.719686
import sys import time import typing import coroutine from typing import Any, Generator, TextIO def follow(fp:TextIO, target:Generator[None, str, None], from_end:bool=False) \ -> None: from_end and fp.seek(0, 2) while True: line = fp.readline() if not line...
true
true
f71f1602d9340fa6aa90aeee7b17c3e2f020ff60
3,630
py
Python
LaserTagger/Models/TransformerCRF_V2.py
tech-srl/c3po
ce1e002bf9d026c10fbd2c178d454ebb76cb7a94
[ "MIT" ]
18
2020-11-13T02:43:58.000Z
2022-01-04T08:11:05.000Z
LaserTagger/Models/TransformerCRF_V2.py
shaileshj2803/c3po
a673a0514ee8c800efa12574ef8da3fcb8ef73b7
[ "MIT" ]
2
2021-03-11T01:19:55.000Z
2021-05-21T15:01:42.000Z
LaserTagger/Models/TransformerCRF_V2.py
shaileshj2803/c3po
a673a0514ee8c800efa12574ef8da3fcb8ef73b7
[ "MIT" ]
6
2021-02-25T06:07:06.000Z
2021-05-21T23:44:45.000Z
from torch import nn from Models.CRF import CRF from Models.Transformer import Transformer from Models.TransformerCtx import TransformerCtx from Models.SequenceEncoder import SequenceEncoder from Models.Attention import Attention import torch from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence cl...
42.705882
144
0.674656
from torch import nn from Models.CRF import CRF from Models.Transformer import Transformer from Models.TransformerCtx import TransformerCtx from Models.SequenceEncoder import SequenceEncoder from Models.Attention import Attention import torch from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence cl...
true
true
f71f16308749cbb3a9e24291b63fd1302e0d5211
39
py
Python
run.py
jovanzac/Captain
3e410aa22eec4f72274b9bf4f0f2b3c91936356d
[ "MIT" ]
null
null
null
run.py
jovanzac/Captain
3e410aa22eec4f72274b9bf4f0f2b3c91936356d
[ "MIT" ]
null
null
null
run.py
jovanzac/Captain
3e410aa22eec4f72274b9bf4f0f2b3c91936356d
[ "MIT" ]
1
2020-12-25T08:21:37.000Z
2020-12-25T08:21:37.000Z
"""The entry point.""" import Scripts
9.75
22
0.666667
import Scripts
true
true
f71f183d4028a3c36013d6614421819a0cd6f672
11,436
py
Python
facebook_business/adobjects/adaccounttargetingunified.py
s-nez/facebook-python-business-sdk
4766644c7585d2e262463862f8aae26d5bea2615
[ "CNRI-Python" ]
null
null
null
facebook_business/adobjects/adaccounttargetingunified.py
s-nez/facebook-python-business-sdk
4766644c7585d2e262463862f8aae26d5bea2615
[ "CNRI-Python" ]
null
null
null
facebook_business/adobjects/adaccounttargetingunified.py
s-nez/facebook-python-business-sdk
4766644c7585d2e262463862f8aae26d5bea2615
[ "CNRI-Python" ]
null
null
null
# Copyright 2014 Facebook, Inc. # You are hereby granted a non-exclusive, worldwide, royalty-free license to # use, copy, modify, and distribute this software in source code or binary # form for use in connection with the web services and APIs provided by # Facebook. # As with any software that integrates with the Fa...
41.585455
112
0.690976
from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject from facebook_business.adobjects.objectparser import ObjectParser from facebook_business.api import FacebookRequest from facebook_business.typechecker i...
true
true
f71f1873191d210df18e5af80874ac079e4f1b83
11,453
py
Python
lib/rucio/tests/test_scope.py
TeAmP0is0N/rucio
45c1b83f8e1514953a41fd076b4e651dd564c39f
[ "Apache-2.0" ]
null
null
null
lib/rucio/tests/test_scope.py
TeAmP0is0N/rucio
45c1b83f8e1514953a41fd076b4e651dd564c39f
[ "Apache-2.0" ]
null
null
null
lib/rucio/tests/test_scope.py
TeAmP0is0N/rucio
45c1b83f8e1514953a41fd076b4e651dd564c39f
[ "Apache-2.0" ]
null
null
null
# Copyright European Organization for Nuclear Research (CERN) # # 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 # # Authors: # - Thomas Beermann, <t...
43.547529
145
0.659391
from json import dumps, loads from paste.fixture import TestApp from nose.tools import assert_equal, assert_true, assert_in, raises, assert_raises from rucio.client.accountclient import AccountClient from rucio.client.scopeclient import ScopeClient from rucio.common.config import config_get, config_ge...
true
true
f71f18791975016707e6e7b272eed9733353c44e
14,409
py
Python
examples/pytorch/eager/image_recognition/cifar100/main.py
kevinintel/neural-compressor
b57645566aeff8d3c18dc49d2739a583c072f940
[ "Apache-2.0" ]
172
2021-09-14T18:34:17.000Z
2022-03-30T06:49:53.000Z
examples/pytorch/eager/image_recognition/cifar100/main.py
kevinintel/neural-compressor
b57645566aeff8d3c18dc49d2739a583c072f940
[ "Apache-2.0" ]
40
2021-09-14T02:26:12.000Z
2022-03-29T08:34:04.000Z
examples/pytorch/eager/image_recognition/cifar100/main.py
kevinintel/neural-compressor
b57645566aeff8d3c18dc49d2739a583c072f940
[ "Apache-2.0" ]
33
2021-09-15T07:27:25.000Z
2022-03-25T08:30:57.000Z
import os import time import shutil import argparse import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import torchvision.models.vgg as vgg import torchvision.datasets as datasets import torchvision.transforms as transforms from plain_cnn_cifar import ConvNetMaker, plane_cifar100_boo...
41.051282
116
0.613575
import os import time import shutil import argparse import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import torchvision.models.vgg as vgg import torchvision.datasets as datasets import torchvision.transforms as transforms from plain_cnn_cifar import ConvNetMaker, plane_cifar100_boo...
true
true
f71f18898c8292f215084d67a0492fc48f5a9d6c
8,974
py
Python
main.py
PabloEmidio/Know-Weather-GTK
797f25cbd0c8e1a2f124a5328d9decf2f3829252
[ "MIT" ]
4
2021-05-06T02:07:02.000Z
2021-05-06T17:48:08.000Z
main.py
PabloEmidio/Know-Weather-GTK
797f25cbd0c8e1a2f124a5328d9decf2f3829252
[ "MIT" ]
null
null
null
main.py
PabloEmidio/Know-Weather-GTK
797f25cbd0c8e1a2f124a5328d9decf2f3829252
[ "MIT" ]
null
null
null
import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk from datetime import datetime from api_request import Weather builder = Gtk.Builder() builder.add_from_file('./glade/main.glade') class Handler: def __init__(self, *args, **kwargs): super(Handler, self).__init__(*args, **kwargs...
53.736527
131
0.622131
import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk from datetime import datetime from api_request import Weather builder = Gtk.Builder() builder.add_from_file('./glade/main.glade') class Handler: def __init__(self, *args, **kwargs): super(Handler, self).__init__(*args, **kwargs...
true
true
f71f18bc90c86155e0835c84ecc4093b469ef8c1
338
py
Python
ufba/modulos_e_excecoes/programaprincipal.py
rafaelsqueiroz/learning_phase
6a04da40ba50e24a9ab79f940c8e4820ad34c07d
[ "MIT" ]
null
null
null
ufba/modulos_e_excecoes/programaprincipal.py
rafaelsqueiroz/learning_phase
6a04da40ba50e24a9ab79f940c8e4820ad34c07d
[ "MIT" ]
1
2019-10-31T19:51:27.000Z
2019-10-31T19:51:27.000Z
ufba/modulos_e_excecoes/programaprincipal.py
rafaelsqueiroz/learning_phase
6a04da40ba50e24a9ab79f940c8e4820ad34c07d
[ "MIT" ]
1
2019-10-23T18:00:16.000Z
2019-10-23T18:00:16.000Z
# -*- coding: utf-8 -*- """ Created on Wed May 12 16:33:11 2021 @author: Rafael Queiroz """ import ordenaarquivo c1 = ordenaarquivo.OrdenaColunaStd('dados.txt', 2) # variável criada com base no OrdenaColunaStd c2 = ordenaarquivo.OrdenaColunaMySort('dados.txt', 2) # variável criada com base no OrdenaColunaMySort pr...
21.125
102
0.736686
import ordenaarquivo c1 = ordenaarquivo.OrdenaColunaStd('dados.txt', 2) c2 = ordenaarquivo.OrdenaColunaMySort('dados.txt', 2) print(c1) print(c2)
true
true
f71f18c04b849a12ab67707e2dc21b53b542b7e7
1,209
py
Python
Library/usbscsi.py
P3nguin-M/edl
967220426ad820e3d0ed471bbe7013ca0eb4a33c
[ "MIT" ]
2
2020-08-26T09:23:40.000Z
2020-10-08T20:32:05.000Z
Library/usbscsi.py
P3nguin-M/edl
967220426ad820e3d0ed471bbe7013ca0eb4a33c
[ "MIT" ]
null
null
null
Library/usbscsi.py
P3nguin-M/edl
967220426ad820e3d0ed471bbe7013ca0eb4a33c
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import argparse from Library.usblib import * def main(): info='MassStorageBackdoor (c) B.Kerler 2019.' parser = argparse.ArgumentParser(description=info) print("\n"+info+"\n\n") parser.add_argument('-vid',metavar="<vid>",help='[Option] Specify vid, default=0x2e04)', default="0x2e...
33.583333
111
0.624483
import argparse from Library.usblib import * def main(): info='MassStorageBackdoor (c) B.Kerler 2019.' parser = argparse.ArgumentParser(description=info) print("\n"+info+"\n\n") parser.add_argument('-vid',metavar="<vid>",help='[Option] Specify vid, default=0x2e04)', default="0x2e04") parser.add_ar...
true
true
f71f191d2d5dd4ef2234008a0e40b14db9e6a422
228
py
Python
tests/samples/issue-274-support-one-package-without-package-dir/setup.py
mlasch/scikit-build
664dd9c41cc54047d6d648b0466d525573da5a94
[ "MIT" ]
299
2015-10-19T22:45:08.000Z
2022-03-30T21:15:55.000Z
tests/samples/issue-274-support-one-package-without-package-dir/setup.py
mlasch/scikit-build
664dd9c41cc54047d6d648b0466d525573da5a94
[ "MIT" ]
588
2015-09-17T04:26:59.000Z
2022-03-29T14:51:54.000Z
tests/samples/issue-274-support-one-package-without-package-dir/setup.py
mlasch/scikit-build
664dd9c41cc54047d6d648b0466d525573da5a94
[ "MIT" ]
102
2015-10-19T22:45:13.000Z
2022-03-20T21:09:08.000Z
from skbuild import setup setup( name="hello", version="1.2.3", description="a minimal example package", author='The scikit-build team', license="MIT", packages=['hello'], test_suite='hello_tests' )
19
44
0.644737
from skbuild import setup setup( name="hello", version="1.2.3", description="a minimal example package", author='The scikit-build team', license="MIT", packages=['hello'], test_suite='hello_tests' )
true
true
f71f1a05e28fe8ec2782d3b027061351db27751e
10,516
py
Python
tartiflette/execution/collect.py
remorses/tartiflette-whl
92bed13de130a7a88278d7019314135e01281259
[ "MIT" ]
null
null
null
tartiflette/execution/collect.py
remorses/tartiflette-whl
92bed13de130a7a88278d7019314135e01281259
[ "MIT" ]
null
null
null
tartiflette/execution/collect.py
remorses/tartiflette-whl
92bed13de130a7a88278d7019314135e01281259
[ "MIT" ]
null
null
null
from functools import lru_cache from typing import Dict, List, Optional, Set, Tuple, Union from tartiflette.execution.nodes.variable_definition import ( variable_definition_node_to_executable, ) from tartiflette.language.ast import ( FieldNode, FragmentSpreadNode, InlineFragmentNode, ) from tartiflette...
35.527027
79
0.687143
from functools import lru_cache from typing import Dict, List, Optional, Set, Tuple, Union from tartiflette.execution.nodes.variable_definition import ( variable_definition_node_to_executable, ) from tartiflette.language.ast import ( FieldNode, FragmentSpreadNode, InlineFragmentNode, ) from tartiflette...
true
true
f71f1a8bc82d2d2ee616d7db40d3b03f67a2b9bb
197
py
Python
ietf/utils/models.py
wpjesus/codematch
eee7405259cce9239ea0545a2a1300ee1accfe94
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2015-09-02T19:53:12.000Z
2015-09-02T19:53:12.000Z
ietf/utils/models.py
wpjesus/codematch
eee7405259cce9239ea0545a2a1300ee1accfe94
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
ietf/utils/models.py
wpjesus/codematch
eee7405259cce9239ea0545a2a1300ee1accfe94
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
# Copyright The IETF Trust 2015, All Rights Reserved from django.db import models class DumpInfo(models.Model): date = models.DateTimeField() host = models.CharField(max_length=128)
21.888889
52
0.736041
from django.db import models class DumpInfo(models.Model): date = models.DateTimeField() host = models.CharField(max_length=128)
true
true
f71f1ba39c37b17eb6607ab6ec5ad71e37435d39
32,775
py
Python
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/aio/operations/_gallery_image_versions_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/aio/operations/_gallery_image_versions_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/aio/operations/_gallery_image_versions_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
1,916
2015-01-19T05:05:41.000Z
2022-03-31T19:36:44.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
53.119935
247
0.681983
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure....
true
true
f71f1d3378d6065dda7b43ab34672dde211e3e2f
6,011
py
Python
tests/scripts/thread-cert/Cert_9_2_18_RollBackActiveTimestamp.py
ctan-g/openthread
376f35a49e5c0a5b8170c117d7a930e3a8b3b210
[ "BSD-3-Clause" ]
1
2020-08-12T06:15:53.000Z
2020-08-12T06:15:53.000Z
tests/scripts/thread-cert/Cert_9_2_18_RollBackActiveTimestamp.py
ctan-g/openthread
376f35a49e5c0a5b8170c117d7a930e3a8b3b210
[ "BSD-3-Clause" ]
null
null
null
tests/scripts/thread-cert/Cert_9_2_18_RollBackActiveTimestamp.py
ctan-g/openthread
376f35a49e5c0a5b8170c117d7a930e3a8b3b210
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # # Copyright (c) 2016, The OpenThread Authors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright # ...
34.153409
97
0.613875
import unittest import config import thread_cert KEY1 = '00112233445566778899aabbccddeeff' KEY2 = 'ffeeddccbbaa99887766554433221100' CHANNEL_INIT = 19 PANID_INIT = 0xface COMMISSIONER = 1 LEADER = 2 ROUTER1 = 3 ROUTER2 = 4 ED1 = 5 SED1 = 6 MTDS = [ED1, SED1] class Cert_9_2_18_RollBac...
true
true
f71f1d706938ce52c44b987b1c1a221da711ca97
5,984
py
Python
evalml/tests/integration_tests/test_data_checks_and_actions_integration.py
ColinRTaylor/evalml
ef4374494b50e22757f44edb753e54efbf71f430
[ "BSD-3-Clause" ]
null
null
null
evalml/tests/integration_tests/test_data_checks_and_actions_integration.py
ColinRTaylor/evalml
ef4374494b50e22757f44edb753e54efbf71f430
[ "BSD-3-Clause" ]
1
2022-02-19T12:59:09.000Z
2022-02-19T12:59:09.000Z
evalml/tests/integration_tests/test_data_checks_and_actions_integration.py
isabella232/evalml
5b372d0dfac05ff9b7e41eb494a9df1bf2da4a9d
[ "BSD-3-Clause" ]
null
null
null
import numpy as np import pandas as pd import pytest import woodwork as ww from pandas.testing import assert_frame_equal, assert_series_equal from evalml.automl import get_default_primary_search_objective from evalml.data_checks import DefaultDataChecks, OutliersDataCheck from evalml.data_checks.invalid_target_data_ch...
35.832335
88
0.653242
import numpy as np import pandas as pd import pytest import woodwork as ww from pandas.testing import assert_frame_equal, assert_series_equal from evalml.automl import get_default_primary_search_objective from evalml.data_checks import DefaultDataChecks, OutliersDataCheck from evalml.data_checks.invalid_target_data_ch...
true
true
f71f1df4f03692a302604099633708d526d10823
241
py
Python
tests/test_legacy.py
kamo-naoyuki/pyopenjtalk
5d111301298ac630d2eae8c0a9e4c1af06b02fa4
[ "MIT" ]
null
null
null
tests/test_legacy.py
kamo-naoyuki/pyopenjtalk
5d111301298ac630d2eae8c0a9e4c1af06b02fa4
[ "MIT" ]
null
null
null
tests/test_legacy.py
kamo-naoyuki/pyopenjtalk
5d111301298ac630d2eae8c0a9e4c1af06b02fa4
[ "MIT" ]
null
null
null
from pyopenjtalk.legacy import openjtalk from nose.plugins.attrib import attr @attr("local_only") def test_legacy(): prons, labels, params = openjtalk("こんにちは") for l in labels: print(l) assert "".join(prons) == "コンニチワ"
21.909091
46
0.680498
from pyopenjtalk.legacy import openjtalk from nose.plugins.attrib import attr @attr("local_only") def test_legacy(): prons, labels, params = openjtalk("こんにちは") for l in labels: print(l) assert "".join(prons) == "コンニチワ"
true
true
f71f1e1feee03baa2748e6681aea5387b62bc527
2,458
py
Python
sacrerouge/common/testing/util.py
danieldeutsch/decomposed-rouge
0d723be8e3359f0bdcc9c7940336800895e46dbb
[ "Apache-2.0" ]
1
2022-03-30T13:39:10.000Z
2022-03-30T13:39:10.000Z
sacrerouge/common/testing/util.py
danieldeutsch/decomposed-rouge
0d723be8e3359f0bdcc9c7940336800895e46dbb
[ "Apache-2.0" ]
null
null
null
sacrerouge/common/testing/util.py
danieldeutsch/decomposed-rouge
0d723be8e3359f0bdcc9c7940336800895e46dbb
[ "Apache-2.0" ]
1
2021-12-05T14:55:10.000Z
2021-12-05T14:55:10.000Z
import argparse from collections import defaultdict from typing import Dict, List from sacrerouge import build_argument_parser from sacrerouge.data import Metrics, MetricsDict from sacrerouge.data.types import ReferenceType, SummaryType from sacrerouge.io import JsonlReader def load_summaries(file_path: str) -> List...
36.686567
90
0.673718
import argparse from collections import defaultdict from typing import Dict, List from sacrerouge import build_argument_parser from sacrerouge.data import Metrics, MetricsDict from sacrerouge.data.types import ReferenceType, SummaryType from sacrerouge.io import JsonlReader def load_summaries(file_path: str) -> List...
true
true
f71f1e32af4b984c299468f63a15c54e52c1d245
2,017
py
Python
tombomation/blog/models.py
tcuthbert/tombomation.net
64932b533f88744b189937a2a71f74600c0b3e18
[ "MIT" ]
null
null
null
tombomation/blog/models.py
tcuthbert/tombomation.net
64932b533f88744b189937a2a71f74600c0b3e18
[ "MIT" ]
null
null
null
tombomation/blog/models.py
tcuthbert/tombomation.net
64932b533f88744b189937a2a71f74600c0b3e18
[ "MIT" ]
null
null
null
from django.db import models from markdown import markdown # Create your models here. # Reference: http://www.yaconiello.com/blog/part-1-creating-blog-system-using-django-markdown/ class Category(models.Model): """Category Model""" title = models.CharField( verbose_name = (u'Title'), help_text...
26.194805
94
0.565692
from django.db import models from markdown import markdown class Category(models.Model): title = models.CharField( verbose_name = (u'Title'), help_text = (u' '), max_length = 255 ) slug = models.SlugField( verbose_name = (u'Slug'), help_text = (u'Uri identifier.')...
true
true
f71f1e7f381f891029ed59f8389550fccb044dd7
19,628
py
Python
env/lib/python3.7/site-packages/numba/tests/test_unicode.py
GU-DataLab/fairness-and-missing-values
36a900aa235d1d53bd57e11c89e3f73f9a585aca
[ "MIT" ]
null
null
null
env/lib/python3.7/site-packages/numba/tests/test_unicode.py
GU-DataLab/fairness-and-missing-values
36a900aa235d1d53bd57e11c89e3f73f9a585aca
[ "MIT" ]
null
null
null
env/lib/python3.7/site-packages/numba/tests/test_unicode.py
GU-DataLab/fairness-and-missing-values
36a900aa235d1d53bd57e11c89e3f73f9a585aca
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # This file tests Python 3.4 style unicode strings # Tests should be skipped on Python < 3.4 from __future__ import print_function import sys from itertools import permutations from numba import njit import numba.unittest_support as unittest from .support import (TestCase, no_pyobj_flags, Me...
29.339312
103
0.481659
from __future__ import print_function import sys from itertools import permutations from numba import njit import numba.unittest_support as unittest from .support import (TestCase, no_pyobj_flags, MemoryLeakMixin) from numba.errors import TypingError _py34_or_later = sys.version_info[:2] >= (3, 4) def literal...
true
true
f71f1f105e2e4d5cd2867235033eebefdf2a3279
861
py
Python
leetcode/py/17-letter-combinations-of-a-phone-number.py
tanchao/algo
76de42b7b415f8251a50553027efad998d0b4137
[ "MIT" ]
2
2016-12-08T08:42:03.000Z
2020-05-15T21:08:22.000Z
leetcode/py/17-letter-combinations-of-a-phone-number.py
tanchao/algo
76de42b7b415f8251a50553027efad998d0b4137
[ "MIT" ]
null
null
null
leetcode/py/17-letter-combinations-of-a-phone-number.py
tanchao/algo
76de42b7b415f8251a50553027efad998d0b4137
[ "MIT" ]
null
null
null
NUMBER_TO_LETTER = { '2': ['a', 'b', 'c'], '3': ['d', 'e', 'f'], '4': ['g', 'h', 'i'], '5': ['j', 'k', 'l'], '6': ['m', 'n', 'o'], '7': ['p', 'q', 'r', 's'], '8': ['t', 'u', 'v'], '9': ['w', 'x', 'y', 'z'], } class Solution: def letterCombinations(self, digits: str): if len...
28.7
66
0.487805
NUMBER_TO_LETTER = { '2': ['a', 'b', 'c'], '3': ['d', 'e', 'f'], '4': ['g', 'h', 'i'], '5': ['j', 'k', 'l'], '6': ['m', 'n', 'o'], '7': ['p', 'q', 'r', 's'], '8': ['t', 'u', 'v'], '9': ['w', 'x', 'y', 'z'], } class Solution: def letterCombinations(self, digits: str): if len...
true
true
f71f1f1e8feb9c87e7d3db3d77a033d89c3682cb
1,213
py
Python
setup.py
imanmousaei/coinexpy
be542652b493c588dbf4d630ec50ab92cf5e5371
[ "MIT" ]
12
2021-09-02T18:54:04.000Z
2022-03-17T11:40:39.000Z
setup.py
imanmousaei/coinexpy
be542652b493c588dbf4d630ec50ab92cf5e5371
[ "MIT" ]
4
2021-09-13T11:14:03.000Z
2021-12-11T09:45:33.000Z
setup.py
imanmousaei/coinexpy
be542652b493c588dbf4d630ec50ab92cf5e5371
[ "MIT" ]
5
2021-09-02T19:03:17.000Z
2022-01-13T13:10:32.000Z
from setuptools import setup version = '0.5.1' setup( name='coinexpy', packages=['coinexpy'], version=version, license='MIT', description='Python wrapper for Coinex APIs', long_description_content_type='text/markdown', long_description=open('README.md', 'rt').read(), author='Iman Mousa...
32.783784
96
0.612531
from setuptools import setup version = '0.5.1' setup( name='coinexpy', packages=['coinexpy'], version=version, license='MIT', description='Python wrapper for Coinex APIs', long_description_content_type='text/markdown', long_description=open('README.md', 'rt').read(), author='Iman Mousa...
true
true
f71f1f30802fc7155f517414445cf1dadb679435
3,282
py
Python
yt_dlp/extractor/beatport.py
olipfei/yt-dlp
7879e79d11a2e5855167820518df49caf623fe48
[ "Unlicense" ]
11
2022-01-06T22:09:50.000Z
2022-03-12T22:26:22.000Z
yt_dlp/extractor/beatport.py
olipfei/yt-dlp
7879e79d11a2e5855167820518df49caf623fe48
[ "Unlicense" ]
4
2022-02-25T08:20:18.000Z
2022-03-17T16:16:20.000Z
yt_dlp/extractor/beatport.py
olipfei/yt-dlp
7879e79d11a2e5855167820518df49caf623fe48
[ "Unlicense" ]
3
2022-02-19T08:59:13.000Z
2022-03-06T16:11:21.000Z
import re from .common import InfoExtractor from ..compat import compat_str from ..utils import int_or_none class BeatportIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.|pro\.)?beatport\.com/track/(?P<display_id>[^/]+)/(?P<id>[0-9]+)' _TESTS = [{ 'url': 'https://beatport.com/track/synesthesia-ori...
33.151515
101
0.481718
import re from .common import InfoExtractor from ..compat import compat_str from ..utils import int_or_none class BeatportIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.|pro\.)?beatport\.com/track/(?P<display_id>[^/]+)/(?P<id>[0-9]+)' _TESTS = [{ 'url': 'https://beatport.com/track/synesthesia-ori...
true
true
f71f1f5ea6c652ba83e9c4487fc915c47f98899c
8,304
py
Python
core/controllers/collection_editor.py
jlau323/oppia
37438a2c9bf7e66892fb9a6a93a1fe4ca7a82691
[ "Apache-2.0" ]
2
2021-04-08T01:06:08.000Z
2021-06-02T08:20:13.000Z
core/controllers/collection_editor.py
gitter-badger/oppia
7d8e659264582d7ce74bc6c139e597b82bca0e04
[ "Apache-2.0" ]
1
2020-05-27T06:08:17.000Z
2020-05-27T06:08:17.000Z
core/controllers/collection_editor.py
gitter-badger/oppia
7d8e659264582d7ce74bc6c139e597b82bca0e04
[ "Apache-2.0" ]
1
2020-11-05T12:26:10.000Z
2020-11-05T12:26:10.000Z
# coding: utf-8 # Copyright 2015 The Oppia 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 requir...
35.793103
78
0.698579
from __future__ import absolute_import from __future__ import unicode_literals import base64 from core.controllers import acl_decorators from core.controllers import base from core.domain import collection_services from core.domain import rights_manager from core.domain import search_services fro...
true
true
f71f1f82deeb1ff237e916ec83b6ae59d364cc6e
2,310
py
Python
demoapp/views.py
Innersystemm/mmad
dde4d72fb6d2471f9637ddb3116535a32b6909cd
[ "MIT" ]
null
null
null
demoapp/views.py
Innersystemm/mmad
dde4d72fb6d2471f9637ddb3116535a32b6909cd
[ "MIT" ]
null
null
null
demoapp/views.py
Innersystemm/mmad
dde4d72fb6d2471f9637ddb3116535a32b6909cd
[ "MIT" ]
null
null
null
from datetime import datetime from demoapp.sign_classifier import Sign from demoapp.sign_db import SignDB from demoapp.sign_validator import SignValidator from django.http import HttpRequest from django.shortcuts import render from .forms import * def index(request): assert isinstance(request, HttpRequest) ...
32.083333
105
0.666667
from datetime import datetime from demoapp.sign_classifier import Sign from demoapp.sign_db import SignDB from demoapp.sign_validator import SignValidator from django.http import HttpRequest from django.shortcuts import render from .forms import * def index(request): assert isinstance(request, HttpRequest) ...
true
true
f71f200d67c6267ab2d95f6a61fffdcb40c31d6a
6,201
py
Python
tutorials_templates/build.py
dataloop-ai/dtlpy-documentation
fe607a084fa660328ae5ab29ba8e05a4627aad51
[ "MIT" ]
3
2022-01-07T20:33:49.000Z
2022-03-22T12:41:30.000Z
tutorials_templates/build.py
dataloop-ai/dtlpy-documentation
fe607a084fa660328ae5ab29ba8e05a4627aad51
[ "MIT" ]
null
null
null
tutorials_templates/build.py
dataloop-ai/dtlpy-documentation
fe607a084fa660328ae5ab29ba8e05a4627aad51
[ "MIT" ]
3
2021-12-29T13:11:30.000Z
2022-03-22T12:25:50.000Z
import json import importlib.util import inspect import os LINE_HEADER = '<func:' TEMPLATES_PATH = 'tutorials_templates' TUTORIALS_PATH = 'tutorials' NOTEBOOK_TEMPLATE = {"cells": [], "metadata": { "kernelspec": { "display_name": "Python 3", ...
37.810976
98
0.584583
import json import importlib.util import inspect import os LINE_HEADER = '<func:' TEMPLATES_PATH = 'tutorials_templates' TUTORIALS_PATH = 'tutorials' NOTEBOOK_TEMPLATE = {"cells": [], "metadata": { "kernelspec": { "display_name": "Python 3", ...
true
true
f71f205dda870b1a5da937518b795fa9c5dde373
2,306
py
Python
tests/functional/tests/security/conftest.py
mahsaama/MRUPolicyInOpenCAS
bb97122f31dd64f2fb7d2be47057cf0721d109ab
[ "BSD-3-Clause-Clear" ]
3
2021-07-29T08:39:03.000Z
2022-02-25T10:00:36.000Z
tests/functional/tests/security/conftest.py
josehu07/ocf-mf
3e54f9a1de24ec7f44869e7f2c5a6883321d32bd
[ "BSD-3-Clause-Clear" ]
null
null
null
tests/functional/tests/security/conftest.py
josehu07/ocf-mf
3e54f9a1de24ec7f44869e7f2c5a6883321d32bd
[ "BSD-3-Clause-Clear" ]
null
null
null
# # Copyright(c) 2019-2020 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause-Clear # import os import sys from ctypes import ( c_uint64, c_uint32, c_uint16, c_int ) from tests.utils.random import RandomStringGenerator, RandomGenerator, DefaultRanges, Range from pyocf.types.cache import CacheMo...
23.292929
91
0.79098
import os import sys from ctypes import ( c_uint64, c_uint32, c_uint16, c_int ) from tests.utils.random import RandomStringGenerator, RandomGenerator, DefaultRanges, Range from pyocf.types.cache import CacheMode, EvictionPolicy, MetadataLayout, PromotionPolicy from pyocf.types.shared import CacheL...
true
true
f71f21c0e694d95be7a898ee0e483f58d5892616
4,759
py
Python
docs/conf.py
compas-dev/compas_occ
9ff1bf3bdab6c750930e9864edcfdc8afee255ab
[ "MIT" ]
6
2021-03-23T09:31:02.000Z
2022-02-14T13:13:43.000Z
docs/conf.py
compas-dev/compas_occ
9ff1bf3bdab6c750930e9864edcfdc8afee255ab
[ "MIT" ]
6
2021-03-23T15:03:14.000Z
2022-01-18T07:43:36.000Z
docs/conf.py
compas-dev/compas_occ
9ff1bf3bdab6c750930e9864edcfdc8afee255ab
[ "MIT" ]
4
2021-03-23T14:51:31.000Z
2022-03-29T07:48:42.000Z
# flake8: noqa # -*- coding: utf-8 -*- # If your documentation needs a minimal Sphinx version, state it here. # # needs_sphinx = "1.0" import sys import os import inspect import importlib import sphinx_compas_theme from sphinx.ext.napoleon.docstring import NumpyDocstring sys.path.insert(0, os.path.join(os.path.dirn...
24.786458
92
0.677663
import sys import os import inspect import importlib import sphinx_compas_theme from sphinx.ext.napoleon.docstring import NumpyDocstring sys.path.insert(0, os.path.join(os.path.dirname(__file__), '../src')) project = "COMPAS OCC" copyright = "Block Research Group - ETH Zurich" author = "tom van mele" releas...
true
true
f71f24ad28b326dc68ea84401a829a4afe299d99
8,582
py
Python
applications/FluidDynamicsApplication/python_scripts/navier_stokes_compressible_explicit_solver.py
philbucher/Kratos
1ceb900dbacfab344e27e32285250eafc52093ec
[ "BSD-4-Clause" ]
1
2021-08-29T11:20:11.000Z
2021-08-29T11:20:11.000Z
applications/FluidDynamicsApplication/python_scripts/navier_stokes_compressible_explicit_solver.py
philbucher/Kratos
1ceb900dbacfab344e27e32285250eafc52093ec
[ "BSD-4-Clause" ]
1
2021-11-19T12:14:50.000Z
2021-11-19T12:14:50.000Z
applications/FluidDynamicsApplication/python_scripts/navier_stokes_compressible_explicit_solver.py
philbucher/Kratos
1ceb900dbacfab344e27e32285250eafc52093ec
[ "BSD-4-Clause" ]
null
null
null
from __future__ import print_function, absolute_import, division # makes KratosMultiphysics backward compatible with python 2.6 and 2.7 # Importing the Kratos Library import KratosMultiphysics import KratosMultiphysics.FluidDynamicsApplication as KratosFluid ## Import base class file from KratosMultiphysics.FluidDyna...
53.304348
159
0.720228
from __future__ import print_function, absolute_import, division import KratosMultiphysics import KratosMultiphysics.FluidDynamicsApplication as KratosFluid .FluidDynamicsApplication.fluid_solver import FluidSolver from KratosMultiphysics import python_linear_solver_factory as linear_solver_factory from KratosMult...
true
true
f71f25cea0ab34d883dca3594f5c11497fd8475d
435
py
Python
accounts/migrations/0025_auto_20170817_1935.py
enrobyn/lookit-api
621fbb8b25100a21fd94721d39003b5d4f651dc5
[ "MIT" ]
null
null
null
accounts/migrations/0025_auto_20170817_1935.py
enrobyn/lookit-api
621fbb8b25100a21fd94721d39003b5d4f651dc5
[ "MIT" ]
null
null
null
accounts/migrations/0025_auto_20170817_1935.py
enrobyn/lookit-api
621fbb8b25100a21fd94721d39003b5d4f651dc5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2017-08-17 19:35 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('accounts', '0024_auto_20170814_1542'), ] operations = [ migrations.RenameField( ...
20.714286
48
0.611494
from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('accounts', '0024_auto_20170814_1542'), ] operations = [ migrations.RenameField( model_name='user', old_name='contact_name', ...
true
true
f71f26b1e606b6bc72ed061535852408aecdbd21
5,655
py
Python
oauth2_backend/admin.py
upeu-001-pro/upeuauth-serve
17b204b6df4c0f09340befd471de56369b4b90c7
[ "MIT" ]
null
null
null
oauth2_backend/admin.py
upeu-001-pro/upeuauth-serve
17b204b6df4c0f09340befd471de56369b4b90c7
[ "MIT" ]
null
null
null
oauth2_backend/admin.py
upeu-001-pro/upeuauth-serve
17b204b6df4c0f09340befd471de56369b4b90c7
[ "MIT" ]
1
2021-01-03T22:25:03.000Z
2021-01-03T22:25:03.000Z
from django.contrib import admin from django.contrib.auth.models import Group from django.contrib.auth.models import Permission from django.contrib.contenttypes.models import ContentType # Register your models here. from .models.person import Person from .models.user import User from .models.hierarchy_type import Hie...
32.877907
89
0.618921
from django.contrib import admin from django.contrib.auth.models import Group from django.contrib.auth.models import Permission from django.contrib.contenttypes.models import ContentType from .models.person import Person from .models.user import User from .models.hierarchy_type import HierarchyType from .models.hier...
true
true
f71f26b91d28f2fac45042a51478207f81d2160f
2,660
py
Python
python/day14.py
karlwnw/adventofcode2019
7a01a0dd9c3f93ae3f9aa123a91641a37289eb7a
[ "MIT" ]
2
2020-01-02T12:59:44.000Z
2020-01-04T19:21:31.000Z
python/day14.py
karlwnw/adventofcode2019
7a01a0dd9c3f93ae3f9aa123a91641a37289eb7a
[ "MIT" ]
null
null
null
python/day14.py
karlwnw/adventofcode2019
7a01a0dd9c3f93ae3f9aa123a91641a37289eb7a
[ "MIT" ]
null
null
null
import re import math from collections import defaultdict def parse(content): return list(map(parse_line, content.strip().split("\n"))) def parse_line(row): matches = re.findall(r"\s?(\d+) ([A-Z]+),? ", row.strip()) inputs = [(int(item[0]), item[1]) for item in matches] output = re.match(r".+ => (\...
27.142857
86
0.616917
import re import math from collections import defaultdict def parse(content): return list(map(parse_line, content.strip().split("\n"))) def parse_line(row): matches = re.findall(r"\s?(\d+) ([A-Z]+),? ", row.strip()) inputs = [(int(item[0]), item[1]) for item in matches] output = re.match(r".+ => (\...
true
true
f71f2764a5a988302536ffa630ea868e4660c75c
3,958
py
Python
ramile/project.py
Jeff-Tian/ramile
367beefea0b764527026dfdeb6ca951c41d89a7b
[ "MIT" ]
1
2019-05-17T08:56:15.000Z
2019-05-17T08:56:15.000Z
ramile/project.py
Jeff-Tian/ramile
367beefea0b764527026dfdeb6ca951c41d89a7b
[ "MIT" ]
null
null
null
ramile/project.py
Jeff-Tian/ramile
367beefea0b764527026dfdeb6ca951c41d89a7b
[ "MIT" ]
1
2020-11-16T03:18:52.000Z
2020-11-16T03:18:52.000Z
from docx import Document from ramile.project_info import ProjectInfo from ramile.project_processor import ProjectProcessor from ramile.processors import FileProcessor import os class Project(object): info = None output = True files = [] lines = [] def __init__(self, project_root, lines_to_extrac...
36.311927
108
0.588934
from docx import Document from ramile.project_info import ProjectInfo from ramile.project_processor import ProjectProcessor from ramile.processors import FileProcessor import os class Project(object): info = None output = True files = [] lines = [] def __init__(self, project_root, lines_to_extrac...
true
true
f71f27beb598ddbd1a04990c4e08324eafb725e5
3,297
py
Python
Python/filter_dvl.py
markvilar/Cardinal
a3d87d34ed253a7a4400ed056c5d59c20f15973b
[ "Apache-2.0" ]
null
null
null
Python/filter_dvl.py
markvilar/Cardinal
a3d87d34ed253a7a4400ed056c5d59c20f15973b
[ "Apache-2.0" ]
null
null
null
Python/filter_dvl.py
markvilar/Cardinal
a3d87d34ed253a7a4400ed056c5d59c20f15973b
[ "Apache-2.0" ]
null
null
null
import argparse import datetime import numpy as np import pandas as pd import matplotlib matplotlib.use("TkAgg") import matplotlib.pyplot as plt plt.style.use("./Styles/Scientific.mplstyle") from typing import Dict, List import data import filters import utilities import utm def filter_dvl(data_config: data.DataConf...
33.30303
77
0.693358
import argparse import datetime import numpy as np import pandas as pd import matplotlib matplotlib.use("TkAgg") import matplotlib.pyplot as plt plt.style.use("./Styles/Scientific.mplstyle") from typing import Dict, List import data import filters import utilities import utm def filter_dvl(data_config: data.DataConf...
true
true
f71f280244849be69121280ca690b37322b4626d
3,220
py
Python
setup.py
philastrophist/replicable
1a5eead7e5a1e149d7818bedf4a985d837436157
[ "MIT" ]
null
null
null
setup.py
philastrophist/replicable
1a5eead7e5a1e149d7818bedf4a985d837436157
[ "MIT" ]
null
null
null
setup.py
philastrophist/replicable
1a5eead7e5a1e149d7818bedf4a985d837436157
[ "MIT" ]
null
null
null
import io import os import sys from shutil import rmtree from setuptools import find_packages, setup, Command # Package meta-data. NAME = 'replicable' DESCRIPTION = 'Reproducible storage of gridded and stochastically generated simulated datasets' URL = 'https://github.com/philastrophist/replicable' EMAIL = 'shaun.c.r...
30.377358
95
0.64472
import io import os import sys from shutil import rmtree from setuptools import find_packages, setup, Command NAME = 'replicable' DESCRIPTION = 'Reproducible storage of gridded and stochastically generated simulated datasets' URL = 'https://github.com/philastrophist/replicable' EMAIL = 'shaun.c.read@gmail.com' AUTHO...
true
true
f71f2c2568110ede12234a40ddb12f9d98cafa22
4,441
py
Python
test/test_rfc1155.py
jpwarren/libsnmp
c676ce243bcf6ede2bb2534dceb9486971b6ff69
[ "MIT" ]
1
2019-12-02T04:07:23.000Z
2019-12-02T04:07:23.000Z
test/test_rfc1155.py
jpwarren/libsnmp
c676ce243bcf6ede2bb2534dceb9486971b6ff69
[ "MIT" ]
null
null
null
test/test_rfc1155.py
jpwarren/libsnmp
c676ce243bcf6ede2bb2534dceb9486971b6ff69
[ "MIT" ]
2
2019-12-02T04:07:30.000Z
2019-12-02T04:18:57.000Z
#!/usr/bin/env python # $Id$ # $Revision$ # # libsnmp - a Python SNMP library # Copyright (C) 2003 Unicity Pty Ltd <libsnmp@unicity.com.au> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Sof...
32.416058
83
0.563837
import unittest import logging import string import sys sys.path.append('../lib') from libsnmp import util from libsnmp import debug from libsnmp import rfc1155 class EncoderTest(unittest.TestCase): def setUp(self): self.log = logging.getLogger('EncoderTest') self.log....
true
true
f71f2c91abcfe2546945aacdf89dff8367f6537d
261
py
Python
python_exercises/01Lista_alunos/mostrar_alunos.py
Matheus-IT/lang-python-related
dd2e5d9b9f16d3838ba1670fdfcba1fa3fe305e9
[ "MIT" ]
null
null
null
python_exercises/01Lista_alunos/mostrar_alunos.py
Matheus-IT/lang-python-related
dd2e5d9b9f16d3838ba1670fdfcba1fa3fe305e9
[ "MIT" ]
null
null
null
python_exercises/01Lista_alunos/mostrar_alunos.py
Matheus-IT/lang-python-related
dd2e5d9b9f16d3838ba1670fdfcba1fa3fe305e9
[ "MIT" ]
null
null
null
def mostrar(alunos): print('='*25) for cont in range(3): print(f' {cont+1} aluno {alunos["nomes"][cont]}') print(f' notas {alunos["1nota"][cont]:4.2f}, {alunos["2nota"][cont]:4.2f}, {alunos["3nota"][cont]:4.2f}') print('='*25)
37.285714
114
0.54023
def mostrar(alunos): print('='*25) for cont in range(3): print(f' {cont+1} aluno {alunos["nomes"][cont]}') print(f' notas {alunos["1nota"][cont]:4.2f}, {alunos["2nota"][cont]:4.2f}, {alunos["3nota"][cont]:4.2f}') print('='*25)
true
true
f71f2caaa174ac105310b83de417f8e865ce00e6
991
py
Python
322CoinCange/CoinChange2.py
Easonyesheng/CodePractice
91c8b09c278f5abb67e90f0096fc83bef975647b
[ "MIT" ]
null
null
null
322CoinCange/CoinChange2.py
Easonyesheng/CodePractice
91c8b09c278f5abb67e90f0096fc83bef975647b
[ "MIT" ]
null
null
null
322CoinCange/CoinChange2.py
Easonyesheng/CodePractice
91c8b09c278f5abb67e90f0096fc83bef975647b
[ "MIT" ]
null
null
null
""" 给定不同面额的硬币 coins 和一个总金额 amount。编写一个函数来计算可以凑成总金额所需的最少的硬币个数。如果没有任何一种硬币组合能组成总金额,返回 -1。 来源:力扣(LeetCode) 链接:https://leetcode-cn.com/problems/coin-change 著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。 """ # 用备忘录解决了重叠子问题 # 是一种剪枝 class Solution: def coinChange(self,coins, amount: int): # 备忘录 memo = dict() ...
23.595238
82
0.526741
class Solution: def coinChange(self,coins, amount: int): memo = dict() def dp(n): if n in memo: return memo[n] if n == 0: return 0 if n < 0: return -1 res = float('INF') for coin in set(coins): sub...
true
true
f71f2df9d428bc57d6384865ba76147ba636e02e
178
py
Python
prvsnlib/tasks/hostname.py
acoomans/prvsn
af6b313c2e779ae4e3a9cdba0b1c3a1f4b4c085e
[ "BSD-2-Clause" ]
null
null
null
prvsnlib/tasks/hostname.py
acoomans/prvsn
af6b313c2e779ae4e3a9cdba0b1c3a1f4b4c085e
[ "BSD-2-Clause" ]
null
null
null
prvsnlib/tasks/hostname.py
acoomans/prvsn
af6b313c2e779ae4e3a9cdba0b1c3a1f4b4c085e
[ "BSD-2-Clause" ]
null
null
null
import logging from prvsnlib.utils.run import Run def hostname(name, secure=False): logging.header('Hostname ' + name) Run(['hostnamectl', 'set-hostname', name]).run()
22.25
52
0.702247
import logging from prvsnlib.utils.run import Run def hostname(name, secure=False): logging.header('Hostname ' + name) Run(['hostnamectl', 'set-hostname', name]).run()
true
true
f71f2e88ba4935400a5e83c4221be1e001cabc5e
2,826
py
Python
reviewboard/reviews/tests/test_status_update.py
amalik2/reviewboard
676aa2dce38ce619a74f2d4cb3cfae9bce21416e
[ "MIT" ]
2
2020-06-19T14:57:49.000Z
2020-06-19T15:17:40.000Z
reviewboard/reviews/tests/test_status_update.py
amalik2/reviewboard
676aa2dce38ce619a74f2d4cb3cfae9bce21416e
[ "MIT" ]
1
2019-08-03T01:48:33.000Z
2019-08-03T01:48:33.000Z
reviewboard/reviews/tests/test_status_update.py
amalik2/reviewboard
676aa2dce38ce619a74f2d4cb3cfae9bce21416e
[ "MIT" ]
null
null
null
"""Unit tests for reviewboard.reviews.models.base_comment.StatusUpdate.""" from __future__ import unicode_literals from django.contrib.auth.models import AnonymousUser, Permission, User from djblets.testing.decorators import add_fixtures from reviewboard.accounts.models import LocalSiteProfile from reviewboard.testi...
39.25
78
0.7431
from __future__ import unicode_literals from django.contrib.auth.models import AnonymousUser, Permission, User from djblets.testing.decorators import add_fixtures from reviewboard.accounts.models import LocalSiteProfile from reviewboard.testing import TestCase class StatusUpdateTests(TestCase): fixtures = ['t...
true
true
f71f2eef58a8a1cbd7ca50a24cc800b485725414
458
py
Python
docs/scripts/ex_sinews.py
natalia-rubio/py_grama
968c1c0238d7165de3b1b96534791feacc4aa960
[ "MIT" ]
13
2020-02-24T16:51:51.000Z
2022-03-30T18:56:55.000Z
docs/scripts/ex_sinews.py
natalia-rubio/py_grama
968c1c0238d7165de3b1b96534791feacc4aa960
[ "MIT" ]
78
2019-12-30T19:13:21.000Z
2022-02-23T18:17:54.000Z
docs/scripts/ex_sinews.py
natalia-rubio/py_grama
968c1c0238d7165de3b1b96534791feacc4aa960
[ "MIT" ]
7
2020-10-19T17:49:25.000Z
2021-08-15T20:46:52.000Z
import grama as gr import pandas as pd import matplotlib.pyplot as plt from grama.models import make_cantilever_beam md_beam = make_cantilever_beam() md_beam >> \ gr.ev_sinews(n_density=50, n_sweeps=10, df_det="nom", skip=True) >> \ gr.pt_auto() plt.savefig("../images/ex_beam_sinews_doe.png") md_beam >> \ ...
26.941176
74
0.722707
import grama as gr import pandas as pd import matplotlib.pyplot as plt from grama.models import make_cantilever_beam md_beam = make_cantilever_beam() md_beam >> \ gr.ev_sinews(n_density=50, n_sweeps=10, df_det="nom", skip=True) >> \ gr.pt_auto() plt.savefig("../images/ex_beam_sinews_doe.png") md_beam >> \ ...
true
true
f71f325b5474aeccd5e07a92e013e1262655e374
1,320
py
Python
tests/maps_tests/test_setitem.py
lycantropos/dendroid
4315673ef52129909617225df6357416c56a84b3
[ "MIT" ]
null
null
null
tests/maps_tests/test_setitem.py
lycantropos/dendroid
4315673ef52129909617225df6357416c56a84b3
[ "MIT" ]
16
2019-11-02T10:44:20.000Z
2020-09-21T15:22:29.000Z
tests/maps_tests/test_setitem.py
lycantropos/dendroid
4315673ef52129909617225df6357416c56a84b3
[ "MIT" ]
1
2020-03-13T08:41:39.000Z
2020-03-13T08:41:39.000Z
from copy import copy from typing import Tuple from hypothesis import given from dendroid.hints import Item from tests.utils import (Map, is_left_subtree_less_than_right_subtree, to_height, to_max_binary_tree_height, t...
26.4
65
0.665909
from copy import copy from typing import Tuple from hypothesis import given from dendroid.hints import Item from tests.utils import (Map, is_left_subtree_less_than_right_subtree, to_height, to_max_binary_tree_height, t...
true
true
f71f354e1d8b8af7917824080fcc689db368b6da
3,775
py
Python
forecaster/func.py
ahmed-f-alrefaie/forecaster
25b73a533f6195f3e5c703730e63cb3e242c649a
[ "MIT" ]
null
null
null
forecaster/func.py
ahmed-f-alrefaie/forecaster
25b73a533f6195f3e5c703730e63cb3e242c649a
[ "MIT" ]
null
null
null
forecaster/func.py
ahmed-f-alrefaie/forecaster
25b73a533f6195f3e5c703730e63cb3e242c649a
[ "MIT" ]
null
null
null
import numpy as np from scipy.stats import norm, truncnorm from numpy.random import default_rng ### fix the number of different populations n_pop = 4 def pick_random_hyper(all_hyper, sample_size=None): rng = default_rng() size = sample_size or all_hyper.shape[0] return rng.choice(all_hyper, size=sample_size, repl...
24.198718
103
0.633907
import numpy as np from scipy.stats import norm, truncnorm from numpy.random import default_rng ) size = sample_size or all_hyper.shape[0] return rng.choice(all_hyper, size=sample_size, replace=False) def indicate(M, trans, i): ts = np.insert(np.insert(trans, n_pop-1, np.inf), 0, -np.inf) return (M>=ts[i]) &...
true
true
f71f35d6375c793ab6bf23096e821ed9afadb12a
873
py
Python
environments/robot_arm/maddux/objects/ball.py
callaunchpad/MOR
becd8a181312882dae3d3495a730e268183f803f
[ "MIT" ]
1
2018-02-11T03:09:49.000Z
2018-02-11T03:09:49.000Z
environments/robot_arm/maddux/objects/ball.py
callaunchpad/MOR
becd8a181312882dae3d3495a730e268183f803f
[ "MIT" ]
2
2018-02-08T19:45:20.000Z
2018-10-02T09:55:39.000Z
environments/robot_arm/maddux/objects/ball.py
callaunchpad/MOR
becd8a181312882dae3d3495a730e268183f803f
[ "MIT" ]
2
2018-02-10T22:51:57.000Z
2020-04-14T02:46:22.000Z
""" A ball object to throw. """ import numpy as np from throwable import ThrowableObject from ..plot import plot_sphere class Ball(ThrowableObject): def __init__(self, position, radius, target=False): """Ball object that can move, have a velocity, and hit objects :param position: The position (x...
24.942857
71
0.631157
import numpy as np from throwable import ThrowableObject from ..plot import plot_sphere class Ball(ThrowableObject): def __init__(self, position, radius, target=False): self.radius = radius ThrowableObject.__init__(self, position, target) def plot(self, ax): return plot_sphere(self.p...
true
true
f71f3605b18a86569f186808f947423814025998
1,000
py
Python
setup.py
dimakarp1996/CulinaryApp
4662da542fb22597fa185af53c39da61dcc4a560
[ "MIT" ]
null
null
null
setup.py
dimakarp1996/CulinaryApp
4662da542fb22597fa185af53c39da61dcc4a560
[ "MIT" ]
2
2017-12-11T07:39:09.000Z
2017-12-18T10:53:46.000Z
setup.py
dimakarp1996/CulinaryApp
4662da542fb22597fa185af53c39da61dcc4a560
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """Setup script.""" from setuptools import setup setup( name="CulinaryApp", version="0.0.0", author="Dmitry Karpov, Andrej Lapushkin, Vyacheslav Trifonov", author_email="dimakarp1996@yandex.ru", url="https://github.com/dimakarp1996/CulinaryApp", license="MIT", packa...
22.222222
72
0.56
from setuptools import setup setup( name="CulinaryApp", version="0.0.0", author="Dmitry Karpov, Andrej Lapushkin, Vyacheslav Trifonov", author_email="dimakarp1996@yandex.ru", url="https://github.com/dimakarp1996/CulinaryApp", license="MIT", packages=[ "CulinaryApp" ], ins...
true
true
f71f363a2c9fff25aef36f7f45fa90b7cdbd5bda
3,472
py
Python
bindings/python/ensmallen/datasets/string/thermosiphosp1063.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
5
2021-02-17T00:44:45.000Z
2021-08-09T16:41:47.000Z
bindings/python/ensmallen/datasets/string/thermosiphosp1063.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
18
2021-01-07T16:47:39.000Z
2021-08-12T21:51:32.000Z
bindings/python/ensmallen/datasets/string/thermosiphosp1063.py
AnacletoLAB/ensmallen
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
3
2021-01-14T02:20:59.000Z
2021-08-04T19:09:52.000Z
""" This file offers the methods to automatically retrieve the graph Thermosipho sp. 1063. The graph is automatically retrieved from the STRING repository. References --------------------- Please cite the following if you use the data: ```bib @article{szklarczyk2019string, title={STRING v11: protein--protein a...
33.066667
223
0.675979
from typing import Dict from ..automatic_graph_retrieval import AutomaticallyRetrievedGraph from ...ensmallen import Graph def ThermosiphoSp1063( directed: bool = False, preprocess: bool = True, load_nodes: bool = True, verbose: int = 2, cache: bool = True, cache_path: str = "graphs/string"...
true
true
f71f38c1c62e7b6318d6a1664ac6ee8c0936729a
8,714
py
Python
utils/transformsgpu.py
drkostas/SemiSeg-Contrastive
af6b133400368911ef77f401b7673894fe6aa05c
[ "Apache-2.0" ]
43
2021-07-26T13:13:12.000Z
2022-03-27T13:06:44.000Z
utils/transformsgpu.py
drkostas/SemiSeg-Contrastive
af6b133400368911ef77f401b7673894fe6aa05c
[ "Apache-2.0" ]
5
2021-08-08T03:06:44.000Z
2022-02-15T06:34:57.000Z
utils/transformsgpu.py
drkostas/SemiSeg-Contrastive
af6b133400368911ef77f401b7673894fe6aa05c
[ "Apache-2.0" ]
7
2021-11-07T10:16:32.000Z
2022-03-28T08:51:06.000Z
''' Code taken from https://github.com/WilhelmT/ClassMix Slightly modified ''' import kornia import torch import random import torch.nn as nn def normalize_rgb(data, dataset): """ Args: data: data to normalize BxCxWxH dataset: name of the dataset to normalize Returns: normalized...
34.442688
192
0.61843
import kornia import torch import random import torch.nn as nn def normalize_rgb(data, dataset): if dataset == 'pascal_voc': mean = (122.6789143, 116.66876762, 104.00698793) elif dataset == 'cityscapes': mean = (73.15835921, 82.90891754, 72.39239876) else: mean = (127.5, 127.5, ...
true
true
f71f38cfccdfb77ee615a237128b62e47663849d
1,069
py
Python
tests/test_miranda.py
dokimastis/miranda
2fff074d828659b5fb6fa2de0de6d872d78f0f96
[ "MIT" ]
null
null
null
tests/test_miranda.py
dokimastis/miranda
2fff074d828659b5fb6fa2de0de6d872d78f0f96
[ "MIT" ]
null
null
null
tests/test_miranda.py
dokimastis/miranda
2fff074d828659b5fb6fa2de0de6d872d78f0f96
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_miranda ---------------------------------- Tests for `miranda` module. """ import pytest from contextlib import contextmanager from click.testing import CliRunner from miranda import miranda from miranda import cli @pytest.fixture def response(): """Samp...
25.452381
78
0.687558
import pytest from contextlib import contextmanager from click.testing import CliRunner from miranda import miranda from miranda import cli @pytest.fixture def response(): def test_content(response): def test_command_line_interface(): runner = CliRunner() result = runner.invoke(cli...
true
true
f71f38f6115e04f53d84447035a3e9a73bd6c376
6,437
py
Python
vbox/src/VBox/ValidationKit/testmanager/config.py
Nurzamal/rest_api_docker
a9cc01dfc235467d490d9663755b33ef6990bdd8
[ "MIT" ]
null
null
null
vbox/src/VBox/ValidationKit/testmanager/config.py
Nurzamal/rest_api_docker
a9cc01dfc235467d490d9663755b33ef6990bdd8
[ "MIT" ]
null
null
null
vbox/src/VBox/ValidationKit/testmanager/config.py
Nurzamal/rest_api_docker
a9cc01dfc235467d490d9663755b33ef6990bdd8
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # $Id: config.py 69111 2017-10-17 14:26:02Z vboxsync $ """ Test Manager Configuration. """ __copyright__ = \ """ Copyright (C) 2012-2017 Oracle Corporation This file is part of VirtualBox Open Source Edition (OSE), as available from http://www.virtualbox.org. This file is free software; you c...
34.239362
97
0.722697
__copyright__ = \ """ Copyright (C) 2012-2017 Oracle Corporation This file is part of VirtualBox Open Source Edition (OSE), as available from http://www.virtualbox.org. This file is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License (GPL) as published by the F...
true
true
f71f391105b1c350cf8efd3610d161a083bb9149
4,283
py
Python
Public/assets/Python/data_fetch.py
VictoriaGuXY/MCO-Menu-Checker-Online
706e2e1bf7395cc344f382ea2ac53d964d459f86
[ "MIT" ]
null
null
null
Public/assets/Python/data_fetch.py
VictoriaGuXY/MCO-Menu-Checker-Online
706e2e1bf7395cc344f382ea2ac53d964d459f86
[ "MIT" ]
null
null
null
Public/assets/Python/data_fetch.py
VictoriaGuXY/MCO-Menu-Checker-Online
706e2e1bf7395cc344f382ea2ac53d964d459f86
[ "MIT" ]
null
null
null
import sys import json import os from lxml import html from datetime import datetime import requests from to_json import to_dict class Crawler: ''' The crawler class used for retrieving information from sodexo's menu page Note: Blitman Commons is not yet included in sodexo's page. The class sho...
38.936364
391
0.596544
import sys import json import os from lxml import html from datetime import datetime import requests from to_json import to_dict class Crawler: def __init__(self, target): if target.lower() == 'cms': self.url = 'https://menus.sodexomyway.com/BiteMenu/Menu?menuId=15465&locationId=76929001&w...
true
true
f71f395bbff397746135521fd61c58fd06d81c7d
3,484
py
Python
sdk/python/pulumi_azure_nextgen/eventgrid/v20190201preview/get_domain_topic.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
31
2020-09-21T09:41:01.000Z
2021-02-26T13:21:59.000Z
sdk/python/pulumi_azure_nextgen/eventgrid/v20190201preview/get_domain_topic.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
231
2020-09-21T09:38:45.000Z
2021-03-01T11:16:03.000Z
sdk/python/pulumi_azure_nextgen/eventgrid/v20190201preview/get_domain_topic.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
4
2020-09-29T14:14:59.000Z
2021-02-10T20:38:16.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __a...
32.259259
147
0.64667
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __all__ = [ 'GetDomainTopicResult', 'AwaitableGetDomainTopicResult', 'get_domain_topic', ] @pulumi.output_type class GetDomainTopicResult: def __init__...
true
true
f71f396c55224e1478137d13c7dd9bd416d11e5a
1,722
py
Python
utils/file.py
xia-deng/lawerWeb
6d2fe3642b2b7fbdda568e3af240bbcf6fda6c48
[ "Apache-2.0" ]
null
null
null
utils/file.py
xia-deng/lawerWeb
6d2fe3642b2b7fbdda568e3af240bbcf6fda6c48
[ "Apache-2.0" ]
null
null
null
utils/file.py
xia-deng/lawerWeb
6d2fe3642b2b7fbdda568e3af240bbcf6fda6c48
[ "Apache-2.0" ]
null
null
null
''' 文件目录帮助类 ''' import os import shutil from utils.commonUtil import CommonUtil class FileUtil: ''' 处理文件路径 ''' @staticmethod def cleanPath(path): path=path.strip('\\'); return path ''' 判断路径是否存在 ''' @staticmethod def isExists(path): return os.path.ex...
17.571429
50
0.472706
import os import shutil from utils.commonUtil import CommonUtil class FileUtil: @staticmethod def cleanPath(path): path=path.strip('\\'); return path @staticmethod def isExists(path): return os.path.exists(path) @staticmethod def mkdir(dir,isMany): dir=''....
true
true
f71f3b9ec48575a943a9e175d9ac2120c33e738d
23,715
py
Python
c7n/schema.py
kentnsw/cloud-custodian
fb177d6c4775c8d39459e709cd4084b867d67e5f
[ "Apache-2.0" ]
1
2022-02-16T07:00:33.000Z
2022-02-16T07:00:33.000Z
c7n/schema.py
kentnsw/cloud-custodian
fb177d6c4775c8d39459e709cd4084b867d67e5f
[ "Apache-2.0" ]
null
null
null
c7n/schema.py
kentnsw/cloud-custodian
fb177d6c4775c8d39459e709cd4084b867d67e5f
[ "Apache-2.0" ]
2
2022-02-16T07:00:36.000Z
2022-03-02T00:37:26.000Z
# Copyright The Cloud Custodian Authors. # SPDX-License-Identifier: Apache-2.0 """ Jsonschema validation of cloud custodian config. We start with a walkthrough of the various class registries of resource types and assemble and generate the schema. We do some specialization to reduce overall schema size via reference ...
36.824534
123
0.518954
from collections import Counter import json import inspect import logging from jsonschema import Draft7Validator as JsonSchemaValidator from jsonschema.exceptions import best_match from c7n.policy import execution from c7n.provider import clouds from c7n.query import sources from c7n.resources import load_available...
true
true
f71f3bbc71d7c2bbbd154160ce6aa8cd9c6c6522
389
py
Python
networkapi/usuario/urls_authenticate.py
vinicius-marinho/GloboNetworkAPI
94651d3b4dd180769bc40ec966814f3427ccfb5b
[ "Apache-2.0" ]
73
2015-04-13T17:56:11.000Z
2022-03-24T06:13:07.000Z
networkapi/usuario/urls_authenticate.py
leopoldomauricio/GloboNetworkAPI
3b5b2e336d9eb53b2c113977bfe466b23a50aa29
[ "Apache-2.0" ]
99
2015-04-03T01:04:46.000Z
2021-10-03T23:24:48.000Z
networkapi/usuario/urls_authenticate.py
shildenbrand/GloboNetworkAPI
515d5e961456cee657c08c275faa1b69b7452719
[ "Apache-2.0" ]
64
2015-08-05T21:26:29.000Z
2022-03-22T01:06:28.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import from django.conf.urls import patterns from django.conf.urls import url from networkapi.usuario.resource.AuthenticateResource import AuthenticateResource authenticate_resource = AuthenticateResource() urlpatterns = patterns( '', url(r'^$', authen...
24.3125
81
0.766067
from __future__ import absolute_import from django.conf.urls import patterns from django.conf.urls import url from networkapi.usuario.resource.AuthenticateResource import AuthenticateResource authenticate_resource = AuthenticateResource() urlpatterns = patterns( '', url(r'^$', authenticate_resource.handle_...
true
true
f71f3cd355dbf084d2bb6bf0aa7899cc78fefb66
371
py
Python
smallbusiness/users/urls.py
dhirensr/smallbusiness
a5628f9591f705782dc92710338c0e6d74751957
[ "MIT" ]
1
2021-03-30T20:10:00.000Z
2021-03-30T20:10:00.000Z
smallbusiness/users/urls.py
dhirensr/smallbusiness
a5628f9591f705782dc92710338c0e6d74751957
[ "MIT" ]
5
2021-04-06T07:54:16.000Z
2022-03-01T22:26:07.000Z
smallbusiness/users/urls.py
dhirensr/smallbusiness
a5628f9591f705782dc92710338c0e6d74751957
[ "MIT" ]
null
null
null
from django.urls import path from smallbusiness.users.views import ( user_detail_view, user_redirect_view, user_update_view, ) app_name = "users" urlpatterns = [ path("~redirect/", view=user_redirect_view, name="redirect"), path("~update/", view=user_update_view, name="update"), path("<str:use...
24.733333
66
0.706199
from django.urls import path from smallbusiness.users.views import ( user_detail_view, user_redirect_view, user_update_view, ) app_name = "users" urlpatterns = [ path("~redirect/", view=user_redirect_view, name="redirect"), path("~update/", view=user_update_view, name="update"), path("<str:use...
true
true
f71f3cf0eefc642a527fe9dd1e0224c4e95c3350
1,841
py
Python
NDBSCANjDE/CF3.py
krowck/ISDA-NCjDE-HJ
44c33ba12542a88eaa39fe2b72398ffd7b439372
[ "MIT" ]
null
null
null
NDBSCANjDE/CF3.py
krowck/ISDA-NCjDE-HJ
44c33ba12542a88eaa39fe2b72398ffd7b439372
[ "MIT" ]
null
null
null
NDBSCANjDE/CF3.py
krowck/ISDA-NCjDE-HJ
44c33ba12542a88eaa39fe2b72398ffd7b439372
[ "MIT" ]
null
null
null
############################################################################### # Version: 1.1 # Last modified on: 3 April, 2016 # Developers: Michael G. Epitropakis # email: m_(DOT)_epitropakis_(AT)_lancaster_(DOT)_ac_(DOT)_uk ############################################################################### from ...
39.170213
157
0.649647
true
true
f71f3cf164bfca3bb61e5d75622365d64cdd91fe
10,363
py
Python
crabageprediction/venv/Lib/site-packages/pandas/tests/extension/base/dim2.py
13rianlucero/CrabAgePrediction
92bc7fbe1040f49e820473e33cc3902a5a7177c7
[ "MIT" ]
3
2021-11-23T05:35:28.000Z
2022-02-10T08:05:53.000Z
crabageprediction/venv/Lib/site-packages/pandas/tests/extension/base/dim2.py
13rianlucero/CrabAgePrediction
92bc7fbe1040f49e820473e33cc3902a5a7177c7
[ "MIT" ]
5
2022-02-13T14:38:04.000Z
2022-02-15T00:13:07.000Z
crabageprediction/venv/Lib/site-packages/pandas/tests/extension/base/dim2.py
13rianlucero/CrabAgePrediction
92bc7fbe1040f49e820473e33cc3902a5a7177c7
[ "MIT" ]
5
2018-04-24T13:31:56.000Z
2021-10-21T05:06:23.000Z
""" Tests for 2D compatibility. """ import numpy as np import pytest from pandas._libs.missing import is_matching_na import pandas as pd from pandas.core.arrays.integer import INT_STR_TO_DTYPE from pandas.tests.extension.base.base import BaseExtensionTests class Dim2CompatTests(BaseExtensionTests): def test_tra...
34.31457
87
0.593361
import numpy as np import pytest from pandas._libs.missing import is_matching_na import pandas as pd from pandas.core.arrays.integer import INT_STR_TO_DTYPE from pandas.tests.extension.base.base import BaseExtensionTests class Dim2CompatTests(BaseExtensionTests): def test_transpose(self, data): arr2d = ...
true
true
f71f3fc2a1fe0183157711e98d38c579771e94c8
40,744
py
Python
homeassistant/components/media_player/__init__.py
laundrify/core
60387a417fb82b47700899a6b7e80b30dcc9766f
[ "Apache-2.0" ]
2
2020-01-03T17:06:33.000Z
2020-01-13T18:57:32.000Z
homeassistant/components/media_player/__init__.py
laundrify/core
60387a417fb82b47700899a6b7e80b30dcc9766f
[ "Apache-2.0" ]
20
2021-11-03T06:22:03.000Z
2022-03-31T06:21:17.000Z
homeassistant/components/media_player/__init__.py
laundrify/core
60387a417fb82b47700899a6b7e80b30dcc9766f
[ "Apache-2.0" ]
null
null
null
"""Component to interface with various media players.""" from __future__ import annotations import asyncio import base64 import collections from collections.abc import Callable from contextlib import suppress from dataclasses import dataclass import datetime as dt import functools as ft import hashlib from http import...
32.132492
105
0.669964
from __future__ import annotations import asyncio import base64 import collections from collections.abc import Callable from contextlib import suppress from dataclasses import dataclass import datetime as dt import functools as ft import hashlib from http import HTTPStatus import logging import secrets from typing imp...
true
true
f71f41dc2939024b8e868c9cd42129d682fd9c29
7,083
py
Python
homeassistant/components/aquostv/media_player.py
itewk/home-assistant
769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4
[ "Apache-2.0" ]
23
2017-11-15T21:03:53.000Z
2021-03-29T21:33:48.000Z
homeassistant/components/aquostv/media_player.py
itewk/home-assistant
769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4
[ "Apache-2.0" ]
9
2022-01-27T06:32:10.000Z
2022-03-31T07:07:51.000Z
homeassistant/components/aquostv/media_player.py
itewk/home-assistant
769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4
[ "Apache-2.0" ]
10
2018-01-01T00:12:51.000Z
2021-12-21T23:08:05.000Z
"""Support for interface with an Aquos TV.""" import logging import sharp_aquos_rc import voluptuous as vol from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerDevice from homeassistant.components.media_player.const import ( SUPPORT_NEXT_TRACK, SUPPORT_PAUSE, SUPPORT_PLAY, SU...
26.829545
84
0.624876
import logging import sharp_aquos_rc import voluptuous as vol from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerDevice from homeassistant.components.media_player.const import ( SUPPORT_NEXT_TRACK, SUPPORT_PAUSE, SUPPORT_PLAY, SUPPORT_PREVIOUS_TRACK, SUPPORT_SELECT_SOURC...
true
true
f71f420d01f47ee2aae3767b5e08211606d22d13
10,364
py
Python
lib/python3.8/site-packages/ansible_collections/fortinet/fortios/plugins/modules/fortios_webfilter_ftgd_local_cat.py
cjsteel/python3-venv-ansible-2.10.5
c95395c4cae844dc66fddde9b4343966f4b2ecd5
[ "Apache-1.1" ]
null
null
null
lib/python3.8/site-packages/ansible_collections/fortinet/fortios/plugins/modules/fortios_webfilter_ftgd_local_cat.py
cjsteel/python3-venv-ansible-2.10.5
c95395c4cae844dc66fddde9b4343966f4b2ecd5
[ "Apache-1.1" ]
null
null
null
lib/python3.8/site-packages/ansible_collections/fortinet/fortios/plugins/modules/fortios_webfilter_ftgd_local_cat.py
cjsteel/python3-venv-ansible-2.10.5
c95395c4cae844dc66fddde9b4343966f4b2ecd5
[ "Apache-1.1" ]
null
null
null
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019-2020 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of th...
32.3875
137
0.631513
from __future__ import (absolute_import, division, print_function) __metaclass__ = type ANSIBLE_METADATA = {'status': ['preview'], 'supported_by': 'community', 'metadata_version': '1.1'} DOCUMENTATION = ''' --- module: fortios_webfilter_ftgd_local_cat short_desc...
true
true
f71f426681d3d3e22fb9c11f435ae1635177faa0
135
py
Python
helloworld_core/__init__.py
datadistillr/jupyter_integration_base
76202e63208593d411c735d6e54790157bdd400a
[ "Apache-2.0" ]
5
2020-06-18T14:16:57.000Z
2020-11-17T18:49:57.000Z
helloworld_core/__init__.py
JohnOmernik/jupyter_integration_base
b998db6036b739fc8cdf2a0c761485950858194c
[ "Apache-2.0" ]
1
2021-10-23T01:57:08.000Z
2021-10-23T01:57:08.000Z
helloworld_core/__init__.py
datadistillr/jupyter_integration_base
76202e63208593d411c735d6e54790157bdd400a
[ "Apache-2.0" ]
2
2021-04-12T19:50:52.000Z
2021-04-22T09:25:05.000Z
from addon_core import Addon from helloworld_core.helloworld_base import Helloworld from helloworld_core._version import __version__
22.5
54
0.881481
from addon_core import Addon from helloworld_core.helloworld_base import Helloworld from helloworld_core._version import __version__
true
true
f71f436e490f03025f48fefe039e4f6dab564d10
3,560
py
Python
triangular_lattice/diecutting/result_n2.py
ssh0/growing-string
2e43916e91157dfb4253775149b35ec9d81ef14d
[ "MIT" ]
null
null
null
triangular_lattice/diecutting/result_n2.py
ssh0/growing-string
2e43916e91157dfb4253775149b35ec9d81ef14d
[ "MIT" ]
1
2016-04-14T08:15:28.000Z
2016-04-27T02:57:13.000Z
triangular_lattice/diecutting/result_n2.py
ssh0/growing-string
2e43916e91157dfb4253775149b35ec9d81ef14d
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding:utf-8 -*- # # written by Shotaro Fujimoto # 2016-12-07 import matplotlib.pyplot as plt # from mpl_toolkits.mplot3d.axes3d import Axes3D import matplotlib.cm as cm import numpy as np from scipy.optimize import curve_fit from scipy.stats import gamma import set_data_path def load_dat...
26.969697
85
0.560393
import matplotlib.pyplot as plt import matplotlib.cm as cm import numpy as np from scipy.optimize import curve_fit from scipy.stats import gamma import set_data_path def load_data(_path): data = np.load(_path) beta = data['beta'] try: size_dist_ave = data['size_dist_ave'] return loa...
true
true
f71f444c99957dbabf46b27acb422416484d481f
2,721
py
Python
tests/core/type_controller_test.py
fedebruni84/controllerx
922361b9a590d7483405ec26ed1d553798b7ed7f
[ "MIT" ]
null
null
null
tests/core/type_controller_test.py
fedebruni84/controllerx
922361b9a590d7483405ec26ed1d553798b7ed7f
[ "MIT" ]
null
null
null
tests/core/type_controller_test.py
fedebruni84/controllerx
922361b9a590d7483405ec26ed1d553798b7ed7f
[ "MIT" ]
null
null
null
import pytest from cx_core.controller import TypeController class FakeTypeController(TypeController): def get_domain(self): return "domain" @pytest.fixture def sut(hass_mock): c = FakeTypeController() c.args = {} return c # All entities from '{entity}' must be from {domain} domain (e.g. {...
32.392857
121
0.660051
import pytest from cx_core.controller import TypeController class FakeTypeController(TypeController): def get_domain(self): return "domain" @pytest.fixture def sut(hass_mock): c = FakeTypeController() c.args = {} return c @pytest.mark.parametrize( "entity, domain, entities, error_...
true
true
f71f46e9b66f50d5da46a8294920b9f874abe804
7,438
py
Python
oauth2_provider/oauth2_backends.py
Transparent-CDN/django-oauth-toolkit
0fb3d5a959ef2108c606e71064986b239540cab5
[ "BSD-2-Clause-FreeBSD" ]
1
2020-02-28T11:09:33.000Z
2020-02-28T11:09:33.000Z
oauth2_provider/oauth2_backends.py
Transparent-CDN/django-oauth-toolkit
0fb3d5a959ef2108c606e71064986b239540cab5
[ "BSD-2-Clause-FreeBSD" ]
4
2019-03-22T17:06:36.000Z
2019-06-20T02:41:33.000Z
oauth2_provider/oauth2_backends.py
drchrono/django-oauth-toolkit
846ab0ba8acaa3e4870b424700544aa6329511e4
[ "BSD-2-Clause-FreeBSD" ]
1
2019-10-19T01:03:44.000Z
2019-10-19T01:03:44.000Z
import json from urllib.parse import urlparse, urlunparse from oauthlib import oauth2 from oauthlib.common import quote, urlencode, urlencoded from .exceptions import FatalClientError, OAuthToolkitError from .settings import oauth2_settings class OAuthLibCore(object): """ TODO: add docs """ def __in...
37.565657
109
0.655956
import json from urllib.parse import urlparse, urlunparse from oauthlib import oauth2 from oauthlib.common import quote, urlencode, urlencoded from .exceptions import FatalClientError, OAuthToolkitError from .settings import oauth2_settings class OAuthLibCore(object): def __init__(self, server=None): se...
true
true
f71f48f8e33574e8e90e99e4f9578c5f409fad74
946
py
Python
setup.py
kellyjonbrazil/jtbl
9bfc755bc964fbed59a4884bc4be605a5065f3d8
[ "MIT" ]
108
2020-03-10T13:22:03.000Z
2022-03-30T03:09:38.000Z
setup.py
kellyjonbrazil/jtbl
9bfc755bc964fbed59a4884bc4be605a5065f3d8
[ "MIT" ]
9
2020-03-08T00:44:38.000Z
2022-02-15T19:36:04.000Z
setup.py
kellyjonbrazil/jtbl
9bfc755bc964fbed59a4884bc4be605a5065f3d8
[ "MIT" ]
5
2020-03-10T11:34:18.000Z
2021-08-02T10:57:43.000Z
import setuptools with open('README.md', 'r') as f: long_description = f.read() setuptools.setup( name='jtbl', version='1.1.7', author='Kelly Brazil', author_email='kellyjonbrazil@gmail.com', description='A simple cli tool to print JSON and JSON Lines data as a table in the terminal.', ins...
28.666667
98
0.616279
import setuptools with open('README.md', 'r') as f: long_description = f.read() setuptools.setup( name='jtbl', version='1.1.7', author='Kelly Brazil', author_email='kellyjonbrazil@gmail.com', description='A simple cli tool to print JSON and JSON Lines data as a table in the terminal.', ins...
true
true
f71f497fb7582513c2d45b7633de0c7c9d7f7303
3,186
py
Python
talk_lib/tests/testtalk.py
allankellynet/mimas
10025d43bba9e84f502a266760786842e7158a05
[ "MIT" ]
null
null
null
talk_lib/tests/testtalk.py
allankellynet/mimas
10025d43bba9e84f502a266760786842e7158a05
[ "MIT" ]
1
2020-02-05T13:00:29.000Z
2020-02-05T13:00:29.000Z
talk_lib/tests/testtalk.py
allankellynet/mimas
10025d43bba9e84f502a266760786842e7158a05
[ "MIT" ]
null
null
null
#----------------------------------------------------- # Mimas: conference submission and review system # (c) Allan Kelly 2016-2020 http://www.allankelly.net # Licensed under MIT License, see LICENSE file # ----------------------------------------------------- import unittest from google.appengine.ext import testbed ...
29.775701
73
0.605775
import unittest from google.appengine.ext import testbed from speaker_lib import speaker from talk_lib import talk class TestTalk(unittest.TestCase): def setUp(self): self.testbed = testbed.Testbed() self.testbed.activate() self.testbed.init_datastore_v3_stub() self.testbed...
true
true
f71f4d609651d9bc64373e010c165faa55a5f9cf
3,278
py
Python
beyond_tutorial/settings.py
shlior7/beyond-tutorial
502618b125e9a81d334683b845b248fd750abc77
[ "MIT" ]
null
null
null
beyond_tutorial/settings.py
shlior7/beyond-tutorial
502618b125e9a81d334683b845b248fd750abc77
[ "MIT" ]
null
null
null
beyond_tutorial/settings.py
shlior7/beyond-tutorial
502618b125e9a81d334683b845b248fd750abc77
[ "MIT" ]
null
null
null
""" Django settings for beyond_tutorial project. Generated by 'django-admin startproject' using Django 4.0.2. For more information on this file, see https://docs.djangoproject.com/en/4.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/4.0/ref/settings/ """ from...
27.546218
91
0.705613
from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = 'django-insecure-s$+txx&pz8eeh$_+wbakb!i+1o%9ijf*=n0e6=k4d^ix_kfv7d' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib...
true
true
f71f4d8ff46ec6e4a8d5c7681ef34b9994b20203
13,826
py
Python
xltable/expression.py
fkarb/xltable
7a592642d27ad5ee90d2aa8c26338abaa9d84bea
[ "MIT" ]
4
2017-03-09T20:04:35.000Z
2020-01-18T16:24:33.000Z
xltable/expression.py
fkarb/xltable
7a592642d27ad5ee90d2aa8c26338abaa9d84bea
[ "MIT" ]
6
2017-12-05T13:22:10.000Z
2018-01-29T13:50:27.000Z
xltable/expression.py
fkarb/xltable
7a592642d27ad5ee90d2aa8c26338abaa9d84bea
[ "MIT" ]
6
2017-10-26T16:44:27.000Z
2021-08-16T19:39:21.000Z
""" Expressions for building excel formulas without having to use concrete positions. """ import operator import re class Expression(object): """ Base class for all worksheet expressions. Expressions are used to build formulas referencing ranges in the worksheet by labels which are resolved to cell r...
36.67374
106
0.607913
import operator import re class Expression(object): def __init__(self, value=None): if value is not None: self.value = value def __add__(self, other): return BinOp(self, _make_expr(other), "+") def __sub__(self, other): return BinOp(self, _make_expr(other), "-") ...
true
true
f71f4dd1d3b032910ffb279d50397befdfd25e03
4,066
py
Python
benchmark/startQiskit_noisy2042.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startQiskit_noisy2042.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startQiskit_noisy2042.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=4 # total number=36 import cirq import qiskit from qiskit.providers.aer import QasmSimulator from qiskit.test.mock import FakeVigo from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import ...
34.457627
140
0.65396
import cirq import qiskit from qiskit.providers.aer import QasmSimulator from qiskit.test.mock import FakeVigo from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import FakeVigo from math import log2 im...
true
true
f71f513fecec1a24f3bc3562ef0e4939b4598d59
604
py
Python
discord_styler/__init__.py
miaowware/discord-styled-text
9e02375b0ba947628bf7a7c853efc433f74d9373
[ "BSD-3-Clause" ]
1
2022-01-23T23:26:53.000Z
2022-01-23T23:26:53.000Z
discord_styler/__init__.py
miaowware/discord-styled-text
9e02375b0ba947628bf7a7c853efc433f74d9373
[ "BSD-3-Clause" ]
3
2021-08-28T01:46:36.000Z
2021-09-07T02:59:03.000Z
discord_styler/__init__.py
miaowware/discord-styled-text
9e02375b0ba947628bf7a7c853efc433f74d9373
[ "BSD-3-Clause" ]
null
null
null
""" discord-styled-text --- A small library to style text for Discord without having to remember any syntax Copyright 2021 classabbyamp, 0x5c Released under the terms of the BSD 3-Clause license. """ from .__info__ import __version__ from .styler import StyledText, Italic, Bold, Underline, Strikethrough, InlineCode,...
33.555556
103
0.816225
from .__info__ import __version__ from .styler import StyledText, Italic, Bold, Underline, Strikethrough, InlineCode, Spoiler, BlockQuote from .styler import CodeBlock from .styler import TitledURL, NonEmbeddingURL from .styler import MentionABC, UserMention, RoleMention, ChannelMention from .styler import TimeStyle,...
true
true
f71f51b989d608434d95424eaab6a007063a211a
27,424
py
Python
Multiagent/pacman.py
zengziyunthomas/Artifical-Intelligence
4862a65bc8743e89b3c92d94eeca973f8b1851f3
[ "MIT" ]
1
2022-01-07T08:03:55.000Z
2022-01-07T08:03:55.000Z
Multiagent/pacman.py
zengziyunthomas/Artifical-Intelligence
4862a65bc8743e89b3c92d94eeca973f8b1851f3
[ "MIT" ]
null
null
null
Multiagent/pacman.py
zengziyunthomas/Artifical-Intelligence
4862a65bc8743e89b3c92d94eeca973f8b1851f3
[ "MIT" ]
null
null
null
# pacman.py # --------- # Licensing Information: You are free to use or extend these projects for # educational purposes provided that (1) you do not distribute or publish # solutions, (2) you retain this notice, and (3) you provide clear # attribution to UC Berkeley, including a link to http://ai.berkeley.edu. ...
37.109608
120
0.592656
from game import GameStateData from game import Game from game import Directions from game import Actions from util import nearestPoint from util import manhattanDistance import util import layout import sys import types import time import random import os imer = staticmethod(decrementTim...
true
true
f71f51cf95ba54a5f6398ad0ae300442232506f4
3,554
py
Python
examples/Yellow_Sea/make_YELLOW_grd_v1.py
bilgetutak/pyroms
3b0550f26f4ac181b7812e14a7167cd1ca0797f0
[ "BSD-3-Clause" ]
75
2016-04-05T07:15:57.000Z
2022-03-04T22:49:54.000Z
examples/Yellow_Sea/make_YELLOW_grd_v1.py
hadfieldnz/pyroms-mgh
cd0fe39075825f97a7caf64e2c4c5a19f23302fd
[ "BSD-3-Clause" ]
27
2017-02-26T04:27:49.000Z
2021-12-01T17:26:56.000Z
examples/Yellow_Sea/make_YELLOW_grd_v1.py
hadfieldnz/pyroms-mgh
cd0fe39075825f97a7caf64e2c4c5a19f23302fd
[ "BSD-3-Clause" ]
56
2016-05-11T06:19:14.000Z
2022-03-22T19:04:17.000Z
import os from pyroms import _iso import numpy as np from mpl_toolkits.basemap import Basemap, shiftgrid from scipy.interpolate import griddata import matplotlib.colors as colors from scipy.signal import medfilt2d import netCDF4 import pyroms from bathy_smoother import * # Grid dimension Lm = 140 Mm = 120 lon0=117.5...
29.865546
98
0.728475
import os from pyroms import _iso import numpy as np from mpl_toolkits.basemap import Basemap, shiftgrid from scipy.interpolate import griddata import matplotlib.colors as colors from scipy.signal import medfilt2d import netCDF4 import pyroms from bathy_smoother import * Lm = 140 Mm = 120 lon0=117.5 ; lat0 = 41. lo...
true
true
f71f51f2b02de08ee56c301cd81086d983759417
4,082
py
Python
tests/config/test_config_provider.py
sturmianseq/thundra-agent-python
4cee02d790eb7b8e4dea4e2e9dcd1f67533b1c56
[ "Apache-2.0" ]
22
2018-03-05T20:02:46.000Z
2021-04-09T12:00:18.000Z
tests/config/test_config_provider.py
sturmianseq/thundra-agent-python
4cee02d790eb7b8e4dea4e2e9dcd1f67533b1c56
[ "Apache-2.0" ]
13
2018-03-26T07:57:57.000Z
2021-06-29T14:22:52.000Z
tests/config/test_config_provider.py
thundra-io/thundra-agent-python
448e18c17d8730c381b2e2a773782cf80c5a7cfb
[ "Apache-2.0" ]
3
2021-08-07T14:19:23.000Z
2021-12-08T15:35:40.000Z
import os import pytest from thundra.config.config_provider import ConfigProvider @pytest.fixture() def config_options(): return { 'config': { 'my': { 'key': 'my-value' }, 'lambda': { 'my': { 'key2': 'my-value2' ...
34.888889
114
0.629838
import os import pytest from thundra.config.config_provider import ConfigProvider @pytest.fixture() def config_options(): return { 'config': { 'my': { 'key': 'my-value' }, 'lambda': { 'my': { 'key2': 'my-value2' ...
true
true
f71f521b683a7942f71c9124e2203f4da258ee2b
4,799
py
Python
tests/test_optimalK.py
alinaselega/gap_statistic
2b94c46b676eef839f7709441a89bdc5796b2d31
[ "MIT", "Unlicense" ]
132
2016-11-01T07:08:21.000Z
2022-03-30T13:41:31.000Z
tests/test_optimalK.py
alinaselega/gap_statistic
2b94c46b676eef839f7709441a89bdc5796b2d31
[ "MIT", "Unlicense" ]
37
2016-10-18T12:18:35.000Z
2022-02-23T04:22:19.000Z
tests/test_optimalK.py
alinaselega/gap_statistic
2b94c46b676eef839f7709441a89bdc5796b2d31
[ "MIT", "Unlicense" ]
43
2017-01-08T18:35:45.000Z
2022-02-17T14:07:20.000Z
# -*- coding: utf-8 -*- import os import pytest import numpy as np from sklearn.datasets import make_blobs from sklearn.cluster import KMeans, MeanShift from gap_statistic import OptimalK def test_bad_init_config(): """ Cannot define own clustering function and try to use Rust backend """ with pytes...
29.441718
87
0.681184
import os import pytest import numpy as np from sklearn.datasets import make_blobs from sklearn.cluster import KMeans, MeanShift from gap_statistic import OptimalK def test_bad_init_config(): with pytest.raises(ValueError): OptimalK(parallel_backend="rust", clusterer=lambda x, k: print("just testing"))...
true
true
f71f533ceeca3968a0d37a1a87b62202c911fd86
11,743
py
Python
samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/api/usage_api.py
JigarJoshi/openapi-generator
785535b8d6881b358463994823abbda2b26ff42e
[ "Apache-2.0" ]
1
2022-01-24T08:22:21.000Z
2022-01-24T08:22:21.000Z
samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/api/usage_api.py
JigarJoshi/openapi-generator
785535b8d6881b358463994823abbda2b26ff42e
[ "Apache-2.0" ]
4
2021-09-29T08:46:32.000Z
2021-12-08T09:07:04.000Z
samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/api/usage_api.py
JigarJoshi/openapi-generator
785535b8d6881b358463994823abbda2b26ff42e
[ "Apache-2.0" ]
1
2022-02-24T15:54:44.000Z
2022-02-24T15:54:44.000Z
""" OpenAPI Extension with dynamic servers This specification shows how to use dynamic servers. # noqa: E501 The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech """ import re # noqa: F401 import sys # noqa: F401 from dynamic_servers.api_client import ApiClient...
37.044164
106
0.471941
import re import sys from dynamic_servers.api_client import ApiClient, Endpoint as _Endpoint from dynamic_servers.model_utils import ( check_allowed_values, check_validations, date, datetime, file_type, none_type, validate_and_convert_types ) class UsageApi(object): def __ini...
true
true
f71f559efb8f3cc65c106ea9756849f94c18c509
1,170
py
Python
test/test_main.py
LucaMarconato/phyper
065f41dbdce93b95cd2f8a16ad72a1cf57826c66
[ "MIT" ]
1
2020-08-14T07:40:18.000Z
2020-08-14T07:40:18.000Z
test/test_main.py
LucaMarconato/phyper
065f41dbdce93b95cd2f8a16ad72a1cf57826c66
[ "MIT" ]
null
null
null
test/test_main.py
LucaMarconato/phyper
065f41dbdce93b95cd2f8a16ad72a1cf57826c66
[ "MIT" ]
null
null
null
import phyper from typing import List from pprint import pprint import pandas as pd class NonKeys: n_epochs = 11 batch_size = 10 resume_training = False another_non_key = True class MyParser(phyper.Parser, NonKeys): my_testa: str = 1 ehi = None bbbbb = 32 c = 'ehi' hashed_resources...
27.857143
93
0.766667
import phyper from typing import List from pprint import pprint import pandas as pd class NonKeys: n_epochs = 11 batch_size = 10 resume_training = False another_non_key = True class MyParser(phyper.Parser, NonKeys): my_testa: str = 1 ehi = None bbbbb = 32 c = 'ehi' hashed_resources...
true
true
f71f55c54252740d7984c8598467133969e771fe
1,091
py
Python
motion_primitives_py/motion_primitives_py/examples/dispersion_algorithm_animation.py
ljarin/dispersion_motion_planning
1c16c95b70915e58e407c1a45aa4065877fbb3de
[ "BSD-3-Clause" ]
1
2022-03-04T12:03:26.000Z
2022-03-04T12:03:26.000Z
motion_primitives_py/motion_primitives_py/examples/dispersion_algorithm_animation.py
ljarin/dispersion_motion_planning
1c16c95b70915e58e407c1a45aa4065877fbb3de
[ "BSD-3-Clause" ]
null
null
null
motion_primitives_py/motion_primitives_py/examples/dispersion_algorithm_animation.py
ljarin/dispersion_motion_planning
1c16c95b70915e58e407c1a45aa4065877fbb3de
[ "BSD-3-Clause" ]
null
null
null
# %% from motion_primitives_py import * import numpy as np import time from pycallgraph import PyCallGraph, Config from pycallgraph.output import GraphvizOutput """ Animate the evolution of the min. dispersion algorithm """ tiling = True plot = False animate = True check_backwards_dispersion = False mp_subclass_specif...
27.974359
131
0.781852
from motion_primitives_py import * import numpy as np import time from pycallgraph import PyCallGraph, Config from pycallgraph.output import GraphvizOutput tiling = True plot = False animate = True check_backwards_dispersion = False mp_subclass_specific_data = {} control_space_q = 2 num_dims = 2 max_state = [3.5, ...
true
true
f71f573d416e2f35d92d643b1b9835d4b1c1c202
13,297
py
Python
KiBuzzard/buzzard/modules/svgstring2path.py
HDR/KiBuzzard
b9e2cff0783b7cda9b8d68f2d2b5077b48d3a838
[ "MIT" ]
240
2021-01-11T14:49:24.000Z
2022-03-29T22:33:49.000Z
KiBuzzard/buzzard/modules/svgstring2path.py
HDR/KiBuzzard
b9e2cff0783b7cda9b8d68f2d2b5077b48d3a838
[ "MIT" ]
77
2021-01-12T20:23:30.000Z
2022-03-28T12:14:34.000Z
KiBuzzard/buzzard/modules/svgstring2path.py
HDR/KiBuzzard
b9e2cff0783b7cda9b8d68f2d2b5077b48d3a838
[ "MIT" ]
28
2021-01-17T05:44:11.000Z
2022-01-11T19:58:46.000Z
# This is a conglomeration of modules removed from https://github.com/mathandy/svgpathtools # in order to support a modified 'svg2paths' method called 'string2paths' which takes an # svg string as an argument instead of a filename. from svgpathtools import Line, QuadraticBezier, CubicBezier, Path, Arc from xml.dom.mi...
36.53022
113
0.582011
from svgpathtools import Line, QuadraticBezier, CubicBezier, Path, Arc from xml.dom.minidom import parseString import warnings import re try: str = basestring except NameError: pass COMMANDS = set('MmZzLlHhVvCcSsQqTtAa') UPPERCASE = set('MZLHVCSQTA') COMMAND_RE = re.compile("([MmZzLlHhVvCcSsQqTtAa])") FLO...
true
true
f71f58007a0c5588589b9d561d48fa13ca605a79
4,663
py
Python
parser/fase2/team22/Instrucciones/Sql_alter/AlterTableAddColumn.py
LopDlMa/tytus
0b43ee1c7300cb11ddbe593e08239321b71dc443
[ "MIT" ]
null
null
null
parser/fase2/team22/Instrucciones/Sql_alter/AlterTableAddColumn.py
LopDlMa/tytus
0b43ee1c7300cb11ddbe593e08239321b71dc443
[ "MIT" ]
null
null
null
parser/fase2/team22/Instrucciones/Sql_alter/AlterTableAddColumn.py
LopDlMa/tytus
0b43ee1c7300cb11ddbe593e08239321b71dc443
[ "MIT" ]
null
null
null
from Instrucciones.TablaSimbolos.Instruccion import Instruccion from Instrucciones.Excepcion import Excepcion import collections from storageManager.jsonMode import * from Optimizador.C3D import * from Instrucciones.TablaSimbolos import Instruccion3D as c3d class AlterTableAddColumn(Instruccion): def __init__(self...
51.811111
162
0.5638
from Instrucciones.TablaSimbolos.Instruccion import Instruccion from Instrucciones.Excepcion import Excepcion import collections from storageManager.jsonMode import * from Optimizador.C3D import * from Instrucciones.TablaSimbolos import Instruccion3D as c3d class AlterTableAddColumn(Instruccion): def __init__(self...
true
true
f71f5818bd5e30abb2dd28facc28beb49f2ea0f1
1,726
py
Python
my_methods/my_cap_curve.py
noushadkhan01/my_methods
fc467d5c34b9b5dd105e32cc5aad218d3f6408a8
[ "MIT" ]
null
null
null
my_methods/my_cap_curve.py
noushadkhan01/my_methods
fc467d5c34b9b5dd105e32cc5aad218d3f6408a8
[ "MIT" ]
null
null
null
my_methods/my_cap_curve.py
noushadkhan01/my_methods
fc467d5c34b9b5dd105e32cc5aad218d3f6408a8
[ "MIT" ]
null
null
null
def my_cap_curve(model, X, y, figsize = (10, 5),legend_font_size = 10,loc = 'best', linewidth = 2,label_font_size = 10, poly_features = False, extra_name = None): import matplotlib.pyplot as plt import numpy as np import my_global_variables from sklearn.metrics import roc_curve, auc class_nam...
45.421053
132
0.695829
def my_cap_curve(model, X, y, figsize = (10, 5),legend_font_size = 10,loc = 'best', linewidth = 2,label_font_size = 10, poly_features = False, extra_name = None): import matplotlib.pyplot as plt import numpy as np import my_global_variables from sklearn.metrics import roc_curve, auc class_nam...
true
true
f71f5879feebeaca94821aab1a4522d364bde04b
2,130
py
Python
tests/test_setutils.py
acatton/fork--mahmoud--boltons
8916c66121cdbbe2bfc365152d5c202096a0ad16
[ "BSD-3-Clause" ]
1
2017-05-08T17:42:01.000Z
2017-05-08T17:42:01.000Z
tests/test_setutils.py
acatton/fork--mahmoud--boltons
8916c66121cdbbe2bfc365152d5c202096a0ad16
[ "BSD-3-Clause" ]
16
2018-10-15T10:07:36.000Z
2019-01-07T04:34:34.000Z
tests/test_setutils.py
r0flc0pt4/boltons
96bd42b5cca2a8783079430b94f9930b764573e9
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from boltons.setutils import IndexedSet, _MISSING def test_indexed_set_basic(): zero2nine = IndexedSet(range(10)) five2nine = zero2nine & IndexedSet(range(5, 15)) x = IndexedSet(five2nine) x |= set([10]) assert list(zero2nine) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] assert ...
30.869565
68
0.585915
from boltons.setutils import IndexedSet, _MISSING def test_indexed_set_basic(): zero2nine = IndexedSet(range(10)) five2nine = zero2nine & IndexedSet(range(5, 15)) x = IndexedSet(five2nine) x |= set([10]) assert list(zero2nine) == [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] assert set(zero2nine) == set([...
true
true
f71f588ae8e89518a40ae039426b0803c80db5e6
27,740
py
Python
dask/array/top.py
migueltorrescosta/dask
60f488cf7358d14c523f84de9afbb10022818367
[ "BSD-3-Clause" ]
1
2019-05-24T00:46:48.000Z
2019-05-24T00:46:48.000Z
dask/array/top.py
migueltorrescosta/dask
60f488cf7358d14c523f84de9afbb10022818367
[ "BSD-3-Clause" ]
null
null
null
dask/array/top.py
migueltorrescosta/dask
60f488cf7358d14c523f84de9afbb10022818367
[ "BSD-3-Clause" ]
null
null
null
import itertools import numbers import numpy as np import toolz from .. import base, core, sharedict, utils from ..compatibility import apply, Mapping from ..delayed import to_task_dask from ..optimization import SubgraphCallable def subs(task, substitution): """ Create a new task with the values substituted ...
36.308901
107
0.548594
import itertools import numbers import numpy as np import toolz from .. import base, core, sharedict, utils from ..compatibility import apply, Mapping from ..delayed import to_task_dask from ..optimization import SubgraphCallable def subs(task, substitution): if isinstance(task, dict): return {k: subs(v...
true
true
f71f58c1649fd2690611e738744d6c22a955fdf0
4,419
py
Python
sherpa_client/models/http_service_metadata.py
kairntech/sherpa-client
cd259c87b7291eeec3f3ea025e368f2f069a06cd
[ "Apache-2.0" ]
null
null
null
sherpa_client/models/http_service_metadata.py
kairntech/sherpa-client
cd259c87b7291eeec3f3ea025e368f2f069a06cd
[ "Apache-2.0" ]
null
null
null
sherpa_client/models/http_service_metadata.py
kairntech/sherpa-client
cd259c87b7291eeec3f3ea025e368f2f069a06cd
[ "Apache-2.0" ]
null
null
null
from typing import Any, Dict, Type, TypeVar, Union import attr from ..models.http_service_metadata_operations import HttpServiceMetadataOperations from ..types import UNSET, Unset T = TypeVar("T", bound="HttpServiceMetadata") @attr.s(auto_attribs=True) class HttpServiceMetadata: """ """ api: str compa...
30.902098
83
0.604435
from typing import Any, Dict, Type, TypeVar, Union import attr from ..models.http_service_metadata_operations import HttpServiceMetadataOperations from ..types import UNSET, Unset T = TypeVar("T", bound="HttpServiceMetadata") @attr.s(auto_attribs=True) class HttpServiceMetadata: api: str compatibility: st...
true
true
f71f5c880c576a98b3a2c7865445d8aef1babbe3
5,734
py
Python
ivy/func_wrapper.py
sert121/ivy
286f86e487b0c83d46a3ef8d30aa96316337db32
[ "Apache-2.0" ]
1
2022-02-15T02:07:07.000Z
2022-02-15T02:07:07.000Z
ivy/func_wrapper.py
sert121/ivy
286f86e487b0c83d46a3ef8d30aa96316337db32
[ "Apache-2.0" ]
null
null
null
ivy/func_wrapper.py
sert121/ivy
286f86e487b0c83d46a3ef8d30aa96316337db32
[ "Apache-2.0" ]
null
null
null
import ivy import inspect import importlib import numpy as np from types import ModuleType wrapped_modules_n_classes = [] NON_WRAPPED_METHODS = ['current_framework', 'current_framework_str', 'set_framework', 'get_framework', 'unset_framework', 'set_debug_mode', 'set_breakpoint_debug_mode', 'set...
40.380282
117
0.592431
import ivy import inspect import importlib import numpy as np from types import ModuleType wrapped_modules_n_classes = [] NON_WRAPPED_METHODS = ['current_framework', 'current_framework_str', 'set_framework', 'get_framework', 'unset_framework', 'set_debug_mode', 'set_breakpoint_debug_mode', 'set...
true
true
f71f5cbb0f82e3b460895dc04351f46514cc35da
1,549
py
Python
idb/client/pid_saver.py
fakeNetflix/facebook-repo-idb
eb4ed5a7dc4a14b224a22e833294d7366fe4725e
[ "MIT" ]
1
2021-03-09T07:29:18.000Z
2021-03-09T07:29:18.000Z
idb/client/pid_saver.py
fakeNetflix/facebook-repo-idb
eb4ed5a7dc4a14b224a22e833294d7366fe4725e
[ "MIT" ]
6
2021-05-10T08:32:56.000Z
2022-02-26T01:41:09.000Z
idb/client/pid_saver.py
fakeNetflix/facebook-repo-idb
eb4ed5a7dc4a14b224a22e833294d7366fe4725e
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. import json import logging import os import signal from typing import List from idb.common.constants import IDB_PID_PATH def save_pid(pid: int) -> None: pids = _get_pids() pids.append(pid) _write_pids(pids=pid...
23.469697
71
0.632666
import json import logging import os import signal from typing import List from idb.common.constants import IDB_PID_PATH def save_pid(pid: int) -> None: pids = _get_pids() pids.append(pid) _write_pids(pids=pids) logging.debug(f"saved daemon pid {pid}") def remove_pid(pid: int) -> None: pids ...
true
true
f71f5d1fb7366ad5808529f520d04d12bd1805b1
12,476
py
Python
bot/bot.py
mudkipdev/pydis-bot
234fba49e039fc4c5c8421162e803b1be3d0d33c
[ "MIT", "BSD-3-Clause" ]
null
null
null
bot/bot.py
mudkipdev/pydis-bot
234fba49e039fc4c5c8421162e803b1be3d0d33c
[ "MIT", "BSD-3-Clause" ]
null
null
null
bot/bot.py
mudkipdev/pydis-bot
234fba49e039fc4c5c8421162e803b1be3d0d33c
[ "MIT", "BSD-3-Clause" ]
null
null
null
import asyncio import logging import socket import warnings from collections import defaultdict from typing import Dict, Optional import aiohttp import discord from async_rediscache import RedisSession from discord.ext import commands from sentry_sdk import push_scope from bot import api, constants from bot.async_sta...
38.152905
107
0.64083
import asyncio import logging import socket import warnings from collections import defaultdict from typing import Dict, Optional import aiohttp import discord from async_rediscache import RedisSession from discord.ext import commands from sentry_sdk import push_scope from bot import api, constants from bot.async_sta...
true
true
f71f5dc2484d87171414c6d905bc5a1656c3625b
4,043
py
Python
encoders/audio/Wav2VecSpeechEncoder/__init__.py
akurniawan/jina-hub
d89bc5e8f527f1212c3228a15775e222983c0087
[ "Apache-2.0" ]
null
null
null
encoders/audio/Wav2VecSpeechEncoder/__init__.py
akurniawan/jina-hub
d89bc5e8f527f1212c3228a15775e222983c0087
[ "Apache-2.0" ]
null
null
null
encoders/audio/Wav2VecSpeechEncoder/__init__.py
akurniawan/jina-hub
d89bc5e8f527f1212c3228a15775e222983c0087
[ "Apache-2.0" ]
null
null
null
__copyright__ = "Copyright (c) 2020 Jina AI Limited. All rights reserved." __license__ = "Apache-2.0" import os from typing import Optional import numpy as np from jina.executors.decorators import batching, as_ndarray from jina.executors.encoders import BaseAudioEncoder from jina.executors.encoders.frameworks import...
40.838384
95
0.666337
__copyright__ = "Copyright (c) 2020 Jina AI Limited. All rights reserved." __license__ = "Apache-2.0" import os from typing import Optional import numpy as np from jina.executors.decorators import batching, as_ndarray from jina.executors.encoders import BaseAudioEncoder from jina.executors.encoders.frameworks import...
true
true
f71f5e67663079678fe379004ccba2d635f29cd6
3,572
py
Python
cp_spider/cp_spider/settings.py
zachariah-chow/mas-cp-scrapy
7c3cd8bcb9d6fc248a325621337da40398452cdb
[ "MIT" ]
null
null
null
cp_spider/cp_spider/settings.py
zachariah-chow/mas-cp-scrapy
7c3cd8bcb9d6fc248a325621337da40398452cdb
[ "MIT" ]
null
null
null
cp_spider/cp_spider/settings.py
zachariah-chow/mas-cp-scrapy
7c3cd8bcb9d6fc248a325621337da40398452cdb
[ "MIT" ]
null
null
null
# Scrapy settings for cp_spider project # # For simplicity, this file contains only settings considered important or # commonly used. You can find more settings consulting the documentation: # # https://docs.scrapy.org/en/latest/topics/settings.html # https://docs.scrapy.org/en/latest/topics/downloader-middlewa...
33.698113
103
0.779395
BOT_NAME = 'cp_spider' SPIDER_MODULES = ['cp_spider.spiders'] NEWSPIDER_MODULE = 'cp_spider.spiders' ROBOTSTXT_OBEY = False ocalhost:8050' DOWNLOADER_MIDDLEWARES = { 'scrapy_splash.SplashCookiesMiddleware': 723, 'scrapy_splash.SplashMiddleware': 72...
true
true
f71f5e75839cd04c172644fd22b384312e83d690
6,499
py
Python
grid_world.py
vigneshyaadav27/Grid-world
a5c4cab46cdafc6458526593ae31ac19a152001d
[ "MIT" ]
null
null
null
grid_world.py
vigneshyaadav27/Grid-world
a5c4cab46cdafc6458526593ae31ac19a152001d
[ "MIT" ]
null
null
null
grid_world.py
vigneshyaadav27/Grid-world
a5c4cab46cdafc6458526593ae31ac19a152001d
[ "MIT" ]
null
null
null
####################################################################### # Copyright (C) # # 2016-2018 Shangtong Zhang(zhangshangtong.cpp@gmail.com) # # 2016 Kenta Shimada(hyperkentakun@gmail.com) # # Permission given to modify...
33.158163
109
0.507617
4: draw_image(np.round(new_value, decimals=2)) plt.savefig('../images/figure_3_5.png') plt.close() draw_policy(new_value) plt.savefig('../images/figure_3_5_policy.png') plt.close() break value = new_value if __name_...
true
true
f71f5f797ad336b6fedd52f0f7c38c754c946db7
245
py
Python
mundo 2/aula 12/exer38.py
jonatan098/cursopython
6e4cbaef6229e230fdbc66d80ec1b5a089887b0d
[ "MIT" ]
null
null
null
mundo 2/aula 12/exer38.py
jonatan098/cursopython
6e4cbaef6229e230fdbc66d80ec1b5a089887b0d
[ "MIT" ]
null
null
null
mundo 2/aula 12/exer38.py
jonatan098/cursopython
6e4cbaef6229e230fdbc66d80ec1b5a089887b0d
[ "MIT" ]
1
2020-02-22T17:21:05.000Z
2020-02-22T17:21:05.000Z
num1 = int(input('digite o primeiro valor: ')) num2 = int(input('digite o segundo valor: ')) if num1 > num2: print('o primeiro numero e maior') elif num2 > num1: print('o segundo numero e maior') else: print('os numeros são iguais')
27.222222
46
0.665306
num1 = int(input('digite o primeiro valor: ')) num2 = int(input('digite o segundo valor: ')) if num1 > num2: print('o primeiro numero e maior') elif num2 > num1: print('o segundo numero e maior') else: print('os numeros são iguais')
true
true