code stringlengths 10 805k | def_use_chains listlengths 0 667 |
|---|---|
from __future__ import unicode_literals
import Queue
import datetime
import errno
import gettext
import itertools
import json
import locale
import os
import subprocess
import sys
import threading
import wx
import openslides
from openslides.utils.main import (
detect_openslides_type,
filesystem2unicode,
... | [
[
[
23,
39
]
],
[
[
48,
53
],
[
1318,
1323
],
[
3856,
3861
]
],
[
[
61,
69
],
[
17678,
17686
],
[
18949,
18957
],
[
18996,
19004
],
[
1991... |
#-*- coding: utf-8 -*-
from __future__ import unicode_literals
import aldryn_apphooks_config.fields
import app_data.fields
import djangocms_text_ckeditor.fields
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('cms', '__first__'),
('djangocms_blo... | [
[
[
47,
63
]
],
[
[
72,
101
],
[
2108,
2130
],
[
2798,
2820
],
[
3194,
3216
],
[
3583,
3605
],
[
3971,
3993
]
],
[
[
109,
124
],
[
822,
... |
import copy
import re
from collections import defaultdict
from typing import List, Dict
from .substitution_augmenter import SubstitutionAugmenter
from ..actions import Chemical
from ..utils import extract_chemicals
from paragraph2actions.misc import TextWithActions
class CompoundNameAugmenter(SubstitutionAugmenter):... | [
[
[
7,
11
],
[
782,
786
]
],
[
[
19,
21
],
[
2192,
2194
],
[
2209,
2211
]
],
[
[
46,
57
],
[
1038,
1049
]
],
[
[
77,
81
],
[
442,
... |
# Generated by Django 3.1.13 on 2021-09-02 17:31
import django.contrib.postgres.fields
from django.db import migrations
from django.db import models
class Migration(migrations.Migration):
dependencies = [
('stac_api', '0015_data_collection_summaries'),
]
operations = [
migrations.AddFie... | [
[
[
57,
87
],
[
423,
429
]
],
[
[
110,
120
],
[
168,
178
],
[
303,
313
],
[
675,
685
]
],
[
[
143,
149
],
[
493,
499
],
[
779,
785
... |
SOURCE_DOC_PATH = '' | [
[
[
0,
15
]
]
] |
import numpy as np
from i3Deep import utils
from tqdm import tqdm
import os
# name = "KGU-53317EB91645"
# load_mask = "D:/Datasets/medical_data/ExportKGU/3D Slicer 2/" + name + "/mask.nii.gz"
# load_label_table = "D:/Datasets/medical_data/ExportKGU/3D Slicer 2/" + name + "/label_table.txt"
# save_mask = "D:/... | [
[
[
7,
18
],
[
1069,
1071
],
[
2066,
2068
],
[
2411,
2413
],
[
2625,
2627
]
],
[
[
39,
44
],
[
499,
504
],
[
1934,
1939
],
[
2461,
2466
... |
import base64
import json
import requests
import urllib3
from contextlib import contextmanager
from packaging.version import Version
from requests.adapters import HTTPAdapter
from urllib3.util import Retry
from requests.exceptions import HTTPError
from mlflow import __version__
from mlflow.protos import databricks_pb2... | [
[
[
7,
13
],
[
4632,
4638
]
],
[
[
21,
25
],
[
5792,
5796
],
[
6456,
6460
],
[
8900,
8904
],
[
9282,
9286
]
],
[
[
33,
41
],
[
2717,
... |
"""
sampling.py
We sample Metropolis-Hastings:
* Random walk proposals
* Langevin proposals
* Langevin proposals with preconditioning
* Hamiltonian MC
* Hamiltonian MC with preconditioning
NOTE:
The functionality of this module is restricted to log-densities,
i.e. densities of the form p(s... | [
[
[
488,
499
],
[
2399,
2410
]
],
[
[
516,
519
],
[
2495,
2498
]
],
[
[
521,
535
],
[
5295,
5309
]
],
[
[
543,
554
],
[
3139,
3141
],
[
... |
# Copyright 2019 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | [
[
[
721,
732
],
[
4195,
4197
],
[
4273,
4275
],
[
14329,
14331
]
],
[
[
740,
743
],
[
2512,
2515
],
[
4302,
4305
]
],
[
[
752,
794
],
[
34... |
import pytest
import torch
from torch.testing import assert_allclose
from kornia.augmentation.random_generator import (
random_prob_generator,
random_color_jitter_generator,
random_perspective_generator,
random_affine_generator,
random_rotation_generator,
random_crop_generator,
random_crop_... | [
[
[
7,
13
],
[
1043,
1049
],
[
1092,
1098
],
[
1146,
1152
],
[
1385,
1391
],
[
1699,
1705
],
[
2116,
2122
],
[
2557,
2563
],
[
2634,
2640
... |
# coding: utf-8
#
# Copyright 2019 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "lice... | [
[
[
586,
592
],
[
5310,
5316
]
],
[
[
600,
602
]
],
[
[
624,
627
],
[
4235,
4238
]
],
[
[
635,
641
],
[
745,
751
]
],
[
[
659,
663
],
[
... |
#!/usr/bin/env python3
# Copyright (c) 2016-2018 The Test Coin Super Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test various net timeouts.
- Create three testcoinsuperd nodes:
no_verack_node - we never... | [
[
[
833,
838
],
[
1646,
1651
],
[
1891,
1896
],
[
2194,
2199
]
],
[
[
876,
884
],
[
1821,
1829
],
[
1870,
1878
],
[
2124,
2132
],
[
2173,
... |
MRPYTHON_VERSION_MAJOR = 3
MRPYTHON_VERSION_MINOR = 0
MRPYTHON_VERSION_PATCH = 9
MRPYTHON_VERSION_TAG = "beta"
def version_string():
return "{}.{}.{}{}".format(MRPYTHON_VERSION_MAJOR,
MRPYTHON_VERSION_MINOR,
MRPYTHON_VERSION_PATCH,
... | [
[
[
1,
23
],
[
167,
189
]
],
[
[
28,
50
],
[
222,
244
]
],
[
[
55,
77
],
[
277,
299
]
],
[
[
82,
102
],
[
338,
358
],
[
377,
397... |
import torch
import torch.optim as optim
def set_optimizer(model, cfg):
r"""Sets the optimizer
"""
if cfg.optimizer == 'SGD':
optimizer = optim.SGD(model.parameters(), lr=cfg.lr,
momentum=cfg.momentum, weight_decay=cfg.weight_decay,
neste... | [
[
[
7,
12
]
],
[
[
20,
40
],
[
160,
165
],
[
392,
397
]
],
[
[
47,
60
]
]
] |
#!/usr/bin/env python
#
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
from datetime import datetime
from typing import Any, Dict, Generic, List, Optional, Tuple, TypeVar, Union
from uuid import UUID, uuid4
from pydantic import BaseModel, Field, root_validator, validator
from pydantic.datacl... | [
[
[
119,
127
],
[
11615,
11623
],
[
11582,
11590
],
[
13630,
13638
],
[
13836,
13844
],
[
14223,
14231
],
[
14482,
14490
],
[
16287,
16295
],
[
17... |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'test.ui'
#
# Created by: PyQt5 UI code generator 5.15.0
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, ... | [
[
[
305,
311
],
[
1053,
1059
],
[
1115,
1121
],
[
1433,
1439
],
[
1506,
1512
],
[
1571,
1577
],
[
1774,
1780
],
[
2641,
2647
],
[
3425,
3431... |
from .hn import NewsClient | [
[
[
16,
26
]
]
] |
from functools import reduce
from itertools import chain
from operator import add
from typing import Iterable, Optional, TypeVar
from lhotse.audio import Recording, RecordingSet
from lhotse.cut import Cut, CutSet, MixedCut
from lhotse.features import FeatureSet, Features
from lhotse.supervision import SupervisionSegme... | [
[
[
22,
28
],
[
685,
691
]
],
[
[
51,
56
],
[
1107,
1112
]
],
[
[
78,
81
],
[
692,
695
]
],
[
[
101,
109
],
[
733,
741
]
],
[
[
11... |
# Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | [
[
[
697,
704
],
[
7543,
7550
]
],
[
[
764,
780
],
[
7617,
7633
],
[
7408,
7424
]
],
[
[
788,
807
],
[
843,
845
],
[
1871,
1873
],
[
2098,
... |
from csrv.model import actions
from csrv.model.actions import play_run_event
from csrv.model import cost
from csrv.model import events
from csrv.model import timing_phases
from csrv.model.cards import card_info
from csrv.model.cards import event
class TrashForFree(actions.TrashOnAccess):
COST_CLASS = cost.NullCost
... | [
[
[
23,
30
],
[
267,
274
],
[
355,
362
]
],
[
[
62,
76
],
[
449,
463
],
[
565,
579
]
],
[
[
100,
104
],
[
306,
310
]
],
[
[
128,
... |
from __future__ import print_function
import copy
import time
from pprint import pformat
import uuid
import ast
import urllib
import urllib3
import requests.exceptions
from demisto_client.demisto_api.rest import ApiException
import demisto_client
import json
from Tests.test_utils import print_error, print_warning, pri... | [
[
[
23,
37
]
],
[
[
45,
49
],
[
18963,
18967
]
],
[
[
57,
61
],
[
1616,
1620
],
[
12724,
12728
],
[
12974,
12978
],
[
13294,
13298
],
[
22... |
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | [
[
[
703,
710
]
],
[
[
735,
744
]
],
[
[
772,
778
]
],
[
[
850,
857
]
],
[
[
1103,
1113
]
],
[
[
1235,
1255
]
],
[
[
1337,
1351
]
],
[
[
15... |
from charms.reactive import Endpoint, when, set_flag, clear_flag
import charmhelpers.core.hookenv as hookenv
from charmhelpers.core.hookenv import log
class GearmanRequires(Endpoint):
@when('endpoint.{endpoint_name}.joined')
def joined(self):
# if any(unit.received['port'] for unit in self.all_joined_... | [
[
[
28,
36
],
[
174,
182
]
],
[
[
38,
42
],
[
191,
195
],
[
382,
386
]
],
[
[
44,
52
],
[
336,
344
],
[
529,
537
]
],
[
[
54,
64... |
import csv
import sys
from flee import flee
from flee import SimulationSettings
class InputGeography:
"""
Class which reads in Geographic information.
"""
def __init__(self):
self.locations = []
self.links = []
def ReadLocationsFromCSV(self, csv_name, columns=["name", "region", "... | [
[
[
7,
10
],
[
796,
799
],
[
1472,
1475
],
[
2030,
2033
]
],
[
[
18,
21
],
[
4058,
4061
]
],
[
[
39,
43
]
],
[
[
61,
79
]
],
[
[
8... |
import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.neighbors import KNeighborsClassifier
# NOTE: Make sure that the outcome column is labeled 'target' in the data file
tpot_data = pd.read_csv('PATH/TO/DATA/FILE', sep='COLUMN_SEPARATOR', dtype=np.float64)
features =... | [
[
[
7,
18
],
[
298,
300
]
],
[
[
26,
38
],
[
235,
237
]
],
[
[
75,
91
],
[
439,
455
]
],
[
[
122,
142
],
[
588,
608
]
],
[
[
223,
... |
# -*- coding: utf-8 -*-
'''
:codeauthor: :email:`Nicole Thomas <nicole@satlstack.com>`
'''
# Import Salt Testing Libs
from salttesting import TestCase
from salttesting.mock import MagicMock, patch
from salttesting.helpers import ensure_in_syspath
ensure_in_syspath('../../')
# Import Salt Libs
from salt.modules i... | [
[
[
147,
155
],
[
581,
589
]
],
[
[
185,
194
],
[
1043,
1052
],
[
1293,
1302
],
[
1643,
1652
],
[
3547,
3556
],
[
4021,
4030
],
[
4529,
... |
# coding: utf-8
# (C) Copyright IBM Corp. 2019, 2020.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | [
[
[
744,
748
],
[
45212,
45216
],
[
49973,
49977
],
[
53008,
53012
],
[
61265,
61269
],
[
63751,
63755
],
[
75257,
75261
],
[
77861,
77865
],
[
81... |
import torch
from torch.nn import functional as F
from dassl.optim import build_optimizer, build_lr_scheduler
from dassl.utils import count_num_param
from dassl.engine import TRAINER_REGISTRY, TrainerX
from dassl.engine.trainer import SimpleNet
@TRAINER_REGISTRY.register()
class CrossGrad(TrainerX):
"""Cross-gra... | [
[
[
7,
12
],
[
1713,
1718
],
[
1980,
1985
]
],
[
[
34,
49
],
[
1631,
1632
],
[
1899,
1900
],
[
2157,
2158
],
[
2213,
2214
],
[
2423,
242... |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | [
[
[
826,
836
],
[
932,
942
],
[
969,
979
]
],
[
[
871,
884
],
[
1127,
1140
],
[
1238,
1251
]
],
[
[
892,
931
]
]
] |
import time
import numpy as np
import pandas as pd
import torch
import torch.nn as nn
import itertools
import collections
import matplotlib.pyplot as plt
# Read in data
df = pd.read_csv("Chinese_Names_Corpus_Gender(120W).txt", header=2)
df = df[df.sex != "未知"]
names = df["dict"].values
# Compute charact... | [
[
[
7,
11
],
[
2641,
2645
],
[
3577,
3581
]
],
[
[
20,
31
],
[
609,
611
],
[
709,
711
],
[
734,
736
],
[
1016,
1018
],
[
2398,
2400
... |
import sys
import numpy as np
import pennylane as qml
import pytest
import qiskit
from pennylane_qiskit import AerDevice, BasicAerDevice
from conftest import state_backends
pldevices = [("qiskit.aer", qiskit.Aer), ("qiskit.basicaer", qiskit.BasicAer)]
class TestDeviceIntegration:
"""Test the devices work corr... | [
[
[
7,
10
],
[
7323,
7326
]
],
[
[
19,
30
],
[
2505,
2507
],
[
2535,
2537
],
[
2547,
2549
],
[
3013,
3015
],
[
3279,
3281
],
[
4074,
407... |
# coding=utf-8
# Copyright 2019 The TensorFlow Datasets Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | [
[
[
721,
722
]
],
[
[
775,
776
]
],
[
[
829,
830
]
],
[
[
885,
886
]
],
[
[
938,
948
]
],
[
[
1000,
1007
]
]
] |
# -*- coding: utf-8 -*-
""" rwlock.py
A class to implement read-write locks on top of the standard threading
library.
This is implemented with two mutexes (threading.Lock instances) as per this
wikipedia pseudocode:
https://en.wikipedia.org/wiki/Readers%E2%80%93writer_lock#Using_two_mutexes
... | [
[
[
598,
612
],
[
2374,
2388
],
[
3653,
3667
]
],
[
[
635,
639
],
[
1364,
1368
],
[
1397,
1401
],
[
1810,
1814
]
],
[
[
732,
738
]
]
] |
# -*- coding: utf-8 -*-
"""
Created on Wed May 20 11:36:58 2020
@author: nastavirs
"""
import numpy as np
import tensorflow as tf
def net_u(self, x, t):
u = self.neural_net(tf.concat([x,t],1), self.weights, self.biases)
return u | [
[
[
101,
112
]
],
[
[
121,
137
],
[
193,
195
]
],
[
[
143,
148
]
]
] |
# flake8: noqa
# DEV: Skip linting, we lint with Python 2, we'll get SyntaxErrors from `yield from`
# stdlib
import time
import asyncio
# 3p
import aiopg
from psycopg2 import extras
# project
from ddtrace.constants import ANALYTICS_SAMPLE_RATE_KEY
from ddtrace.contrib.aiopg.patch import patch, unpatch
from ddtrace im... | [
[
[
116,
120
],
[
1585,
1589
],
[
1732,
1736
]
],
[
[
128,
135
],
[
933,
940
],
[
1163,
1170
],
[
6385,
6392
]
],
[
[
149,
154
],
[
1026,
... |
# coding=utf-8
# Copyright 2022 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | [
[
[
677,
688
],
[
722,
733
]
],
[
[
697,
721
],
[
1139,
1163
]
]
] |
# import riaps
from riaps.run.comp import Component
import logging
class Hello(Component):
def __init__(self):
super(Hello, self).__init__()
def on_clock(self):
now = self.clock.recv_pyobj() # Receive time.time() as float
self.logger.info('on_clock(): %s' % str(now))
| [
[
[
42,
51
],
[
80,
89
]
],
[
[
59,
66
]
],
[
[
74,
79
],
[
130,
135
]
]
] |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | [
[
[
176,
184
],
[
1669,
1677
],
[
1827,
1835
]
],
[
[
192,
198
]
],
[
[
206,
220
],
[
389,
395
],
[
4434,
4440
],
[
4619,
4625
],
[
4791,
... |
from keras.models import Sequential
from keras.layers.convolutional import Conv2D
from keras.layers.convolutional import MaxPooling2D
from keras.layers.core import Activation
from keras.layers.core import Flatten
from keras.layers.core import Dense
from keras import backend as K
class LeNet:
@staticmethod
def... | [
[
[
25,
35
],
[
375,
385
]
],
[
[
75,
81
],
[
588,
594
],
[
804,
810
]
],
[
[
121,
133
],
[
704,
716
],
[
896,
908
]
],
[
[
165,
... |
# Copyright 2021 Torsten Mehnert
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | [
[
[
609,
615
],
[
635,
641
],
[
743,
749
]
],
[
[
624,
634
]
]
] |
from CyberSource import *
import os
import json
from importlib.machinery import SourceFileLoader
config_file = os.path.join(os.getcwd(), "data", "Configuration.py")
configuration = SourceFileLoader("module.name", config_file).load_module()
# To delete None values in Input Request Json body
def del_none(d):
for ke... | [
[
[
24,
25
],
[
645,
686
],
[
1191,
1239
],
[
2067,
2115
],
[
2624,
2675
],
[
2948,
2999
],
[
3259,
3301
],
[
3532,
3574
],
[
3666,
3694
... |
#Crie um programa que vai ler vários números e colocar em uma lista.
#Depois disso, crie duas listas extras que vão conter apenas valores pares
#e os valores impares digitados, respectivamente.
#Ao final, mostre o conteúdo das três listas geradas
principal = []
par = []
impar = []
while True:
n = int(input('Digite... | [
[
[
248,
257
],
[
339,
348
],
[
763,
772
]
],
[
[
263,
266
],
[
386,
389
],
[
810,
813
]
],
[
[
272,
277
],
[
418,
423
],
[
853,
858... |
# -*- coding: utf-8 -*-
import sys
import os
import re
sys.path.append('../') # noqa
from jinja2 import Template
from cli_bdd.core.steps import (
command,
environment,
file as file_steps,
)
BASE_PATH = os.path.dirname(os.path.normpath(__file__))
TEMPLATES_PATH = os.path.join(BASE_PATH, 'templates')
S... | [
[
[
31,
34
],
[
55,
58
]
],
[
[
42,
44
],
[
219,
221
],
[
235,
237
],
[
280,
282
],
[
905,
907
],
[
972,
974
],
[
1552,
1554
],
... |
#!/usr/bin/env python3
# Copyright (c) 2016-2017 The Michaellaoliu Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test Hierarchical Deterministic wallet function."""
from test_framework.test_framework import Mi... | [
[
[
318,
344
],
[
465,
491
]
],
[
[
383,
395
],
[
1079,
1091
],
[
1279,
1291
],
[
2066,
2078
],
[
2136,
2148
],
[
2535,
2547
],
[
2649,
... |
"""Utilities for working with data.
These are intended to be used predominantly by the filing cabinet
in order to read and write datasets appropriately.
"""
from typing import Any
def _get_handlers(location:str=""):
"""Returns available file handlers.
This checks for a handlers folder at this location and w... | [
[
[
178,
181
]
],
[
[
187,
200
]
]
] |
from __future__ import print_function
import yaml
import subprocess
import re
import argparse
from keras.models import model_from_yaml
from betago.model import KerasBot
from betago.processor import SevenPlaneProcessor
from betago.gtp.board import gtp_position_to_coords, coords_to_gtp_position
argparser = argparse.Arg... | [
[
[
23,
37
]
],
[
[
45,
49
],
[
701,
705
],
[
742,
746
]
],
[
[
57,
67
],
[
1037,
1047
],
[
1071,
1081
],
[
1095,
1105
]
],
[
[
75,
... |
import os
import sys
from time import sleep
import threading
import window
import comunication
import DisplayActions
debugMode = True
def main():
print("starting...",end='')
state = True
print("[" + ("OK" if state else "ERROR" ) + "]")
winThread.start()
comunication.start()
winThread = thre... | [
[
[
7,
9
]
],
[
[
17,
20
]
],
[
[
38,
43
]
],
[
[
52,
61
],
[
316,
325
]
],
[
[
69,
75
],
[
340,
346
]
],
[
[
83,
95
],
[
281,... |
# Write a script that generates daily edit AND view counts for Panama Papers over its first 30 days of existence, and prints them to a CSV or TSV file in reverse-chronological order. You file should have three colums with the headers "date", "edits" and "views".
import csv
import json
import requests
import operator
f... | [
[
[
271,
274
],
[
2653,
2656
]
],
[
[
282,
286
]
],
[
[
294,
302
],
[
801,
809
],
[
2085,
2093
]
],
[
[
310,
318
],
[
2533,
2541
]
],
[
... |
from unittest.mock import MagicMock
from twisted.web.resource import NoResource
from txweb.resources import RoutingResource
from txweb import App
from txweb.http_codes import Unrenderable
from txweb.resources import ViewClassResource
from unittest.mock import sentinel
import typing as T
from .helper import RequestR... | [
[
[
26,
35
],
[
2188,
2197
]
],
[
[
70,
80
],
[
1909,
1919
],
[
2065,
2075
]
],
[
[
110,
125
],
[
460,
475
]
],
[
[
144,
147
],
[
569,... |
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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.
# A copy of the License is located at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# or in the "license... | [
[
[
757,
765
],
[
2229,
2237
]
],
[
[
767,
771
],
[
2061,
2065
]
],
[
[
773,
778
],
[
11493,
11498
],
[
12642,
12647
]
],
[
[
809,
820
],
[
... |
# This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild
from pkg_resources import parse_version
import kaitaistruct
from kaitaistruct import KaitaiStruct, KaitaiStream, BytesIO
import collections
if parse_version(kaitaistruct.__version__) < parse_version('0.9'):
raise E... | [
[
[
126,
139
],
[
245,
258
],
[
287,
300
]
],
[
[
147,
159
],
[
259,
271
],
[
415,
427
],
[
10628,
10640
],
[
15417,
15429
],
[
16723,
1... |
import json
from typing import Optional
import zipcodes
from great_expectations.core.expectation_configuration import ExpectationConfiguration
from great_expectations.exceptions import InvalidExpectationConfigurationError
from great_expectations.execution_engine import (
PandasExecutionEngine,
SparkD... | [
[
[
7,
11
]
],
[
[
32,
40
],
[
3960,
3968
]
],
[
[
51,
59
],
[
652,
660
]
],
[
[
125,
149
],
[
3969,
3993
]
],
[
[
193,
229
]
],
[
[... |
#!/usr/bin/python
from setuptools import setup, find_packages
import sys
install_requires = []
pyversion = sys.version_info[:2]
if pyversion < (2, 7) or (3, 0) <= pyversion <= (3, 1):
install_requires.append('argparse')
setup(
name='radosgw-agent',
version='1.0',
packages=find_packages(),
author... | [
[
[
41,
46
],
[
227,
232
]
],
[
[
48,
61
],
[
292,
305
]
],
[
[
69,
72
],
[
109,
112
]
],
[
[
75,
91
],
[
190,
206
],
[
664,
680... |
from flask import Blueprint, request
from app.spiders.core import *
from app.utils import build_result
from app.constants import code
core = Blueprint('core', __name__)
@core.route('/login', methods=['POST'])
def login():
data = request.form
username = data.get('username')
password = data.get('password'... | [
[
[
18,
27
],
[
143,
152
]
],
[
[
29,
36
],
[
237,
244
],
[
452,
459
],
[
593,
600
],
[
732,
739
]
],
[
[
67,
68
],
[
333,
343
]... |
#!C:\Users\Aditya\PycharmProjects\python-docs-azure-app\venv\Scripts\python.exe
# -*- coding: utf-8 -*-
# This file is part of pygal
#
# A python svg graph plotting library
# Copyright © 2012-2016 Kozea
#
# This library is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser Gener... | [
[
[
859,
867
],
[
892,
900
]
],
[
[
876,
881
],
[
1115,
1120
],
[
1569,
1574
],
[
1600,
1605
],
[
2059,
2064
],
[
2235,
2240
]
],
[
[
883,... |
"""
Python wrapper for libui.
"""
import ctypes
from . import clibui
class uiCombobox(ctypes.Structure):
"""Wrapper for the uiCombobox C struct."""
pass
def uiComboboxPointer(obj):
"""
Casts an object to uiCombobox pointer type.
:param obj: a generic object
:return: uiCombobox
"""
... | [
[
[
44,
50
],
[
91,
97
],
[
331,
337
],
[
348,
354
],
[
1518,
1524
],
[
1544,
1550
],
[
1558,
1564
],
[
1586,
1592
],
[
1849,
1855
]
]... |
import click
import pandas as pd
# Due textacy problems
try:
from textacy.preprocess import preprocess_text
except Exception:
from textacy.preprocess import preprocess_text
def preprocess_f(text, fix_unicode=True, lowercase=True,
no_urls=True, no_emails=True,
no_phone_numbers... | [
[
[
7,
12
],
[
984,
989
],
[
1001,
1006
],
[
1035,
1040
],
[
1077,
1082
],
[
1112,
1117
],
[
1154,
1159
],
[
1182,
1187
]
],
[
[
20,
32
... |
#coding=utf-8
import sys
import getopt
from core.interface.action import server_action
from core.helper.usage import usage_helper
from prettytable import PrettyTable
from core.helper.parser import config_parser
import re
class action_list(server_action):
# 参数列表示例,可以在这边增加参数描述,最终代码将根据argname生成对对应的参数
_parameters ... | [
[
[
21,
24
],
[
643,
646
],
[
1622,
1625
]
],
[
[
32,
38
],
[
1608,
1614
]
],
[
[
73,
86
],
[
240,
253
]
],
[
[
117,
129
],
[
630,
... |
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | [
[
[
580,
589
],
[
6191,
6200
]
],
[
[
615,
618
],
[
1554,
1557
]
],
[
[
640,
654
],
[
1493,
1500
]
],
[
[
678,
686
],
[
25978,
25986
],
[
... |
#make print in python 2, 3 compatible
from __future__ import print_function
import numpy as np
import pyedda as edda
#Univariate Gaussian
print("//////////Univariate Gaussian///////")
dummy_data = np.random.rand(100)
gaussian = edda.Gaussian(100, 20)
print("gaussian.getMean():", gaussian.getMean())
print("gaussian.g... | [
[
[
61,
75
]
],
[
[
84,
95
],
[
200,
202
]
],
[
[
103,
117
],
[
231,
235
]
],
[
[
187,
197
]
],
[
[
220,
228
],
[
283,
291
],
[
33... |
import graphene
from graphene import Node
from graphene_django.filter import DjangoFilterConnectionField
from graphene_django.rest_framework.mutation import SerializerMutation
from graphene_django.types import DjangoObjectType
from rest_framework.generics import get_object_or_404
from contact.models import Contact
fro... | [
[
[
7,
15
],
[
812,
820
],
[
953,
961
],
[
984,
992
],
[
1015,
1023
],
[
1242,
1250
],
[
1344,
1352
],
[
1445,
1453
],
[
1473,
1481
],
... |
# µPing (MicroPing) for MicroPython
# copyright (c) 2018 Shawwwn <shawwwn1@gmail.com>
# License: MIT
# Internet Checksum Algorithm
# Author: Olav Morken
# https://github.com/olavmrk/python-ping/blob/master/ping.py
# @data: bytes
# ping statistics, loop mode and KeyboardInterrupt handler, + esp8266 compatible
# copyri... | [
[
[
363,
371
],
[
2819,
2827
],
[
5178,
5186
]
],
[
[
684,
690
],
[
7567,
7573
],
[
8160,
8166
]
],
[
[
848,
852
]
]
] |
from __future__ import absolute_import
import operator
from celery.concurrency import solo
from celery.utils.functional import noop
from celery.tests.case import AppCase
class test_solo_TaskPool(AppCase):
def test_on_start(self):
x = solo.TaskPool()
x.on_start()
def test_on_apply(self):
... | [
[
[
23,
38
]
],
[
[
47,
55
],
[
386,
394
]
],
[
[
88,
92
],
[
251,
255
],
[
330,
334
],
[
462,
466
]
],
[
[
129,
133
],
[
412,
4... |
#-*- coding: utf-8 -*-
import sys
import os
import random
import re
import time
import torch
from torch.autograd import Variable
from torch import optim
import torch.nn as nn
#sys.path.append('../')
from hybrid_bid_t1_model import Seq2Seq
from hybrid_data_utils import *
sub = '-'*20
def init_command_l... | [
[
[
32,
35
],
[
1443,
1446
]
],
[
[
44,
46
],
[
1495,
1497
],
[
1555,
1557
],
[
4544,
4546
],
[
5114,
5116
],
[
5909,
5911
],
[
5941,
59... |
import json
import logging
import os
import re
import sys
import time
def setup_logger():
console = logging.StreamHandler(sys.stdout)
handlers = [console]
logging.basicConfig(handlers=handlers)
root = logging.getLogger()
root.setLevel(logging.INFO)
setup_logger()
log = logging.getLogger(__name_... | [
[
[
7,
11
],
[
2323,
2327
],
[
3219,
3223
]
],
[
[
19,
26
],
[
295,
302
],
[
106,
113
],
[
169,
176
],
[
219,
226
],
[
257,
264
]
... |
# -*- coding: utf-8 -*-
"""
Goes through the clean dataset and determines when audio is occuring by
measuring across a simple threshold
We use these labels for the 15, 10 5, 0dB SNR samples
Created on Sun Dec 4 15:37:11 2016
@author: brady
"""
import os
import wavio
from fe_utils import *
from config import TRAI... | [
[
[
257,
259
],
[
329,
331
],
[
364,
366
],
[
1100,
1102
]
],
[
[
267,
272
],
[
445,
450
]
],
[
[
295,
296
],
[
482,
494
],
[
528,
5... |
# Copyright (c) 2014-2015 Matthias Geier
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish,... | [
[
[
1173,
1184
]
],
[
[
1220,
1249
],
[
1465,
1478
],
[
1521,
1534
],
[
1567,
1580
]
],
[
[
1257,
1272
],
[
13188,
13194
],
[
45694,
45700
]
],
... |
import re
import os
import glob
import json
import string
import logging
import subprocess as sp
import yaxil.commons as commons
logger = logging.getLogger(__name__)
# bids legal characters for sub, ses, and task
legal = re.compile('[^a-zA-Z0-9]')
def bids_from_config(yaxil_session, scans_metadata, config, out_base)... | [
[
[
7,
9
],
[
223,
225
],
[
6438,
6440
],
[
15087,
15089
]
],
[
[
17,
19
],
[
841,
843
],
[
1016,
1018
],
[
1753,
1755
],
[
1787,
1789
... |
import requests
import pandas as pd
import ftplib
import io
import re
import json
import datetime
try:
from requests_html import HTMLSession
except Exception:
print("""Warning - Certain functionality
requires requests_html, which is not installed.
Install ... | [
[
[
7,
15
],
[
2459,
2467
],
[
6833,
6841
],
[
8453,
8461
],
[
9473,
9481
],
[
10199,
10207
],
[
10511,
10519
],
[
15314,
15322
],
[
16046,
... |
from .mc import *
| [
[
[
16,
17
]
]
] |
import os
def find_base(p, bases):
for base_name, base_path in bases.items():
r = os.path.relpath(p, base_path)
if r and (r == '.' or r[0] != '.'):
return base_name, r
return None
| [
[
[
7,
9
],
[
95,
97
]
],
[
[
15,
24
]
]
] |
###############################################################################
# Lambda kinder class
###############################################################################
# lambda is actionable dot ru
###############################################################################
# TODO:
####################... | [
[
[
412,
416
],
[
606,
610
],
[
926,
930
],
[
1323,
1327
],
[
1427,
1431
]
],
[
[
425,
431
]
]
] |
T = float(input("Entre com a temperatura que está agora: "))
if T >= 26.0 and T <= 36.0:
print("A temperatura está boa")
elif T > 36.0:
print("A temperatura está quente\n Tome bastante líquido")
elif T >= 15.0 and T < 26.0:
print("A temperatura está agradável")
else:
print("A temperatura esta fria")
| [
[
[
0,
1
],
[
65,
66
],
[
79,
80
],
[
128,
129
],
[
204,
205
],
[
218,
219
]
]
] |
import numpy as np
import scipy.sparse
import theano
from theano import gof, tensor
from theano.gof.op import Op
from theano.sparse.basic import (
Remove0,
SparseType,
_is_sparse,
as_sparse_variable,
remove0,
)
# Also for compatibility
from theano.tensor import discrete_dtypes, float_dtypes
# Pr... | [
[
[
7,
18
],
[
1597,
1599
],
[
1608,
1610
],
[
3402,
3404
],
[
6002,
6004
],
[
6402,
6404
]
],
[
[
26,
38
],
[
3468,
3473
]
],
[
[
47,
... |
"""
WSGI config for getDoc project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTIN... | [
[
[
229,
231
],
[
284,
286
]
],
[
[
262,
282
],
[
377,
397
]
],
[
[
363,
374
]
]
] |
#!/usr/bin/python
import deck
while(True):
p = deck.Deck()
p.shuffle()
pai = p.deal(5)
# assert len(pai) == 5, "??????"
del p
pai.sort(key=lambda x:x.figure)
x = True
for i in range(1, len(pai)):
if(pai[i].suit == pai[i-1].suit and (pai[i].figure == pai[i-1].figure + 1 or pai[i... | [
[
[
26,
30
],
[
53,
57
]
],
[
[
49,
50
],
[
69,
70
],
[
91,
92
],
[
146,
147
]
],
[
[
85,
88
],
[
152,
155
],
[
223,
226
],
... |
"""Support for Eliot tracing with Dask computations."""
from pyrsistent import PClass, field
from dask import compute, optimize
from dask.core import toposort, get_dependencies
from . import start_action, current_action, Action, Message
class _RunWithEliotContext(PClass):
"""
Run a callable within an Eliot ... | [
[
[
80,
86
],
[
268,
274
]
],
[
[
88,
93
],
[
564,
569
],
[
591,
596
],
[
621,
626
],
[
656,
661
]
],
[
[
112,
119
],
[
2512,
2519
... |
#!/usr/bin/python
# -*- coding:utf-8 -*-
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Copyright 2016 Everley #
# #
# Licensed under the Apache License,... | [
[
[
1250,
1254
],
[
3076,
3080
],
[
3970,
3974
]
],
[
[
1263,
1268
],
[
2273,
2278
]
],
[
[
1996,
2010
],
[
2993,
3007
],
[
2837,
2851
]
],
[
... |
import torch.utils.data as data
class CombineDBs(data.Dataset):
def __init__(self, dataloaders, excluded=None):
self.dataloaders = dataloaders
self.excluded = excluded
self.im_ids = []
# Combine object lists
for dl in dataloaders:
for elem in dl.im_ids:
... | [
[
[
7,
31
],
[
51,
55
]
],
[
[
40,
50
],
[
3432,
3442
]
],
[
[
2284,
2308
],
[
4030,
4033
],
[
4055,
4058
],
[
4088,
4091
],
[
4164,
... |
try:
import vim
except ImportError:
raise ImportError(
'"vim" is not available. This module require to be loaded from Vim.'
)
#
# NOTE
# Vim use a global namespace for python/python3 so define a unique name
# function and write a code inside of the function to prevent conflicts.
#
def _vim_vit... | [
[
[
16,
19
],
[
6719,
6722
],
[
6758,
6761
],
[
3552,
3555
],
[
3635,
3638
],
[
6034,
6037
]
],
[
[
312,
342
],
[
7221,
7251
]
],
[
[
7184... |
#!/bin/python3
import sys
import socket
from datetime import datetime
#Defining our target
if len (sys.argv) == 2:
target=socket.gethostbyname(sys.argv[1]) #translate hostname to IPv4
else:
print("invalid amount of arguments.")
print("Syntax: python3 scanner.py <ip>")
#add a pretty banner
print("-" * 50)
print("... | [
[
[
23,
26
],
[
101,
104
],
[
146,
149
],
[
723,
726
],
[
807,
810
],
[
888,
891
]
],
[
[
34,
40
],
[
125,
131
],
[
446,
452
],
... |
"""
OS abstraction
"""
import os, shutil, os.path, re, traceback
import wx
from . import SystemInfo
from .StringOps import mbcsEnc, urlQuote, pathnameFromUrl, pathEnc
# import WindowsHacks
try:
import WindowsHacks
except:
if SystemInfo.isWindows():
traceback.print_exc()
Window... | [
[
[
35,
37
]
],
[
[
39,
45
],
[
1965,
1971
],
[
2435,
2441
]
],
[
[
47,
54
],
[
3427,
3429
],
[
764,
766
],
[
1199,
1201
],
[
1210,
... |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import... | [
[
[
192,
200
]
],
[
[
208,
214
]
],
[
[
222,
236
],
[
370,
376
],
[
1347,
1353
],
[
1797,
1803
],
[
2167,
2173
],
[
2524,
2530
],
[
3578,
... |
"""
Django settings for backend project.
Generated by 'django-admin startproject' using Django 2.2.13.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
import os
... | [
[
[
316,
318
],
[
403,
405
],
[
419,
421
],
[
435,
437
],
[
2332,
2334
]
],
[
[
392,
400
],
[
2345,
2353
]
],
[
[
668,
678
]
],
[
[
80... |
#!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | [
[
[
878,
884
],
[
5633,
5639
]
],
[
[
892,
894
]
],
[
[
917,
920
],
[
4770,
4773
]
],
[
[
961,
974
],
[
2074,
2087
]
],
[
[
983,
1008
],
... |
from unittest import TestCase
import numpy as np
from pyecsca.sca import Trace, trim, reverse, pad
class EditTests(TestCase):
def setUp(self):
self._trace = Trace(np.array([10, 20, 30, 40, 50], dtype=np.dtype("i1")))
def test_trim(self):
result = trim(self._trace, 2)
self.assertIsN... | [
[
[
21,
29
],
[
119,
127
]
],
[
[
38,
49
],
[
180,
182
],
[
217,
219
],
[
343,
345
],
[
383,
385
],
[
412,
414
],
[
517,
519
],
... |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'pyqt_example.ui'
#
# Created: Sun May 18 03:45:55 2014
# by: PyQt4 UI code generator 4.10.4
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except A... | [
[
[
252,
258
],
[
288,
294
],
[
1548,
1554
]
],
[
[
260,
265
],
[
396,
401
],
[
487,
492
],
[
635,
640
],
[
877,
882
],
[
998,
1003
... |
#! /usr/bin/env python3
### stdlib imports
import pathlib
### local imports
import utils
@utils.part1
def part1(puzzleInput: str):
# Parse the coordinate pairs from the puzzle input
coordList = [
[
tuple(int(coord) for coord in pair.split(","))
for pair in line.split(" -> ")
... | [
[
[
50,
57
],
[
2073,
2080
]
],
[
[
84,
89
],
[
93,
98
],
[
2402,
2407
],
[
2583,
2588
],
[
1532,
1537
],
[
2200,
2205
],
[
2555,
2560
... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from flask import request, abort, jsonify
from . import app, mysql
from utils import requires_auth
@requires_auth
@app.route("/tickets/add", methods=['POST'])
def submit_ticket():
team_id = request.form.get("team_id")
subject = request.form.get("sub... | [
[
[
54,
58
],
[
760,
764
],
[
816,
820
],
[
2210,
2214
]
],
[
[
78,
85
],
[
257,
264
],
[
299,
306
],
[
337,
344
],
[
374,
381
],
... |
# Copyright 2013 Openstack Foundation
# 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 requ... | [
[
[
643,
650
],
[
1043,
1050
],
[
2639,
2646
],
[
3011,
3018
]
],
[
[
678,
688
],
[
1853,
1863
],
[
2150,
2160
]
],
[
[
709,
714
],
[
2813... |
"""Tests for legendre module.
"""
import numpy as np
import numpy.polynomial.legendre as leg
import numpy.polynomial.polynomial as poly
from numpy.testing import *
P0 = np.array([ 1])
P1 = np.array([ 0, 1])
P2 = np.array([-1, 0, 3])/2
P3 = np.array([ 0, -3, 0, 5])/2
P4 = np.array([ 3, 0, -30, 0, 35... | [
[
[
44,
55
],
[
173,
175
],
[
193,
195
],
[
217,
219
],
[
249,
251
],
[
287,
289
],
[
330,
332
],
[
379,
381
],
[
436,
438
],
[
... |
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | [
[
[
621,
624
],
[
2803,
2806
]
],
[
[
626,
634
],
[
1655,
1663
]
],
[
[
636,
644
],
[
2906,
2914
],
[
3289,
3297
]
],
[
[
646,
654
],
[
... |
# Copyright The PyTorch Lightning team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | [
[
[
632,
635
]
],
[
[
637,
650
]
],
[
[
714,
720
]
],
[
[
784,
790
]
],
[
[
851,
854
]
]
] |
"""Pyramid Scene Parsing Network"""
import os
import torch
from torch import nn
import torch.nn.functional as F
from model.seg_models.segbase import SegBaseModel
from model.module.basic import _FCNHead
__all__ = ['PSPNet', 'get_psp',
'get_psp_resnet101_voc',
'get_psp_resnet101_citys']
# head
d... | [
[
[
43,
45
],
[
3331,
3333
]
],
[
[
53,
58
],
[
1486,
1491
],
[
3864,
3869
]
],
[
[
77,
79
],
[
555,
557
],
[
1553,
1555
],
[
374,
3... |
from __future__ import print_function
from six.moves import urllib
from .browser import Browser
from .utils import LinkNotFoundError
from .form import Form
import sys
import re
import bs4
class _BrowserState:
def __init__(self, page=None, url=None, form=None, request=None):
self.page = page
self.... | [
[
[
23,
37
]
],
[
[
61,
67
],
[
4178,
4184
]
],
[
[
89,
96
],
[
410,
417
],
[
6285,
6292
]
],
[
[
116,
133
],
[
7602,
7619
],
[
8088,
... |
from pymongo import MongoClient
from bson.objectid import ObjectId
import pprint
client = MongoClient()
db = client.auth_demo
collection = db.users
#myquery = {"local": {"testRuns": {"$elemMatch": {"_id": ObjectId("5c6c119e5724c9272ca7266d")}}}}
#myquery = {"local": {"testRuns": {"date": "20190219"}}}
#myquery = {"l... | [
[
[
20,
31
],
[
91,
102
]
],
[
[
58,
66
],
[
541,
549
]
],
[
[
74,
80
]
],
[
[
82,
88
],
[
110,
116
]
],
[
[
105,
107
],
[
140,
... |
#!/usr/bin/env python3
from Lect7 import *
def test_abs():
""" Unit test for abs() """
failure = False
if not failure:
print('SUCESS')
print('Testing abs()...')
test_abs()
| [
[
[
41,
42
]
],
[
[
47,
55
],
[
173,
181
]
]
] |
import ctypes, os, threading, strgen, base64
tokenid = "4030200023"
class Discord:
def __init__(self):
self.regularExpression = ".([a-zA-Z0-9]{6})\.([a-zA-Z0-9]{27})" # This is the regular expression for discord.
self.generated = 0
def generate(self):
discordToken = strgen.S... | [
[
[
7,
13
],
[
964,
970
]
],
[
[
15,
17
],
[
708,
710
]
],
[
[
19,
28
],
[
1360,
1369
]
],
[
[
30,
36
],
[
312,
318
]
],
[
[
38,
... |
from django import forms
from .models import Post
class PostForm(forms.ModelForm):
class Meta:
model = Post
exclude = ('timestamp' ,'owner')
| [
[
[
19,
24
],
[
67,
72
]
],
[
[
45,
49
],
[
117,
121
]
],
[
[
58,
66
]
]
] |
import parsel, requests, asyncio, re
from typing import List
class InComment:
def __init__(self, optional_words: List[str]=[], remove_words: List[str]=[]) -> None:
self.might_sensitive_words = [
'user',
'password',
'import',
'login',
'.php',
... | [
[
[
7,
13
],
[
1651,
1657
]
],
[
[
15,
23
],
[
832,
840
]
],
[
[
25,
32
],
[
1883,
1890
]
],
[
[
34,
36
],
[
1982,
1984
]
],
[
[
5... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.