code stringlengths 10 805k | def_use_chains listlengths 0 667 |
|---|---|
'''HDF5 operating system operations.
license: HDF5Application/license.txt
Main authors:
Philipp Bucher
Michael Andre
'''
import KratosMultiphysics
import KratosMultiphysics.kratos_utilities as _utils
import os
class DeleteOldH5Files(object):
'''Delete h5-files from previous simulations.'''
def __ca... | [
[
[
138,
156
],
[
528,
546
]
],
[
[
164,
209
],
[
876,
882
]
],
[
[
217,
219
],
[
386,
388
],
[
665,
667
],
[
929,
931
]
],
[
[
228,
... |
from flask_wtf import FlaskForm
from wtforms import StringField,TextAreaField,SubmitField, SelectField
from wtforms.validators import Required
class CommentsForm(FlaskForm):
comment = TextAreaField('Comment', validators=[Required()])
submit = SubmitField('SUBMIT')
class UpdateProfile(FlaskForm):
bio = Tex... | [
[
[
22,
31
],
[
164,
173
],
[
295,
304
],
[
431,
440
]
],
[
[
52,
63
],
[
455,
466
],
[
522,
533
]
],
[
[
64,
77
],
[
190,
203
]... |
"""
NLP Sandbox Date Annotator API
# Overview The OpenAPI specification implemented by NLP Sandbox Annotators. # noqa: E501
The version of the OpenAPI document: 1.1.1
Contact: thomas.schaffter@sagebionetworks.org
Generated by: https://openapi-generator.tech
"""
import sys
import unittest
impo... | [
[
[
295,
298
]
],
[
[
306,
314
],
[
639,
647
],
[
1097,
1105
]
],
[
[
323,
333
]
],
[
[
393,
419
],
[
462,
488
]
],
[
[
557,
591
]
],
[
... |
import json
from datetime import datetime
from typing import Dict
import requests
import demistomock as demisto
from CommonServerPython import *
""" IMPORTS """
# Disable insecure warnings from urllib3
# - this does not disable SSL checking, just the warnings logged from urllib3
requests.packages.urllib3.disable_w... | [
[
[
7,
11
],
[
11938,
11942
]
],
[
[
33,
41
],
[
10495,
10503
],
[
11583,
11591
]
],
[
[
61,
65
],
[
4106,
4110
],
[
4938,
4942
],
[
5544,... |
# coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 9
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from isi_sdk_8_2_2.models.drives_... | [
[
[
243,
249
],
[
6253,
6259
]
],
[
[
257,
259
]
],
[
[
282,
285
],
[
5449,
5452
]
],
[
[
361,
396
]
],
[
[
424,
453
],
[
6493,
6522
]
]
] |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
from django.conf.urls import url, include
from branches import region, branch, resource
urlpatterns = [
url(r'^$', region.region_list, name='branches'),
url(r'^region/add/$', region.region_add, name='region_add'),
url(r'^region/list/$', region.region_list, nam... | [
[
[
76,
79
],
[
156,
159
],
[
209,
212
],
[
274,
277
],
[
342,
345
],
[
442,
445
],
[
529,
532
],
[
597,
600
],
[
662,
665
],
[
... |
"""awards URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-bas... | [
[
[
669,
672
],
[
835,
838
],
[
873,
876
],
[
911,
914
],
[
981,
984
],
[
1039,
1042
]
],
[
[
674,
681
],
[
881,
888
],
[
930,
937
]... |
import requests
import sqlalchemy
import xmltodict
from sqlalchemy import create_engine, MetaData
from collections import defaultdict
import datetime
from utils import *
class Capture(object):
def __init__(self,
schema,
database='projetocurio'
):
... | [
[
[
7,
15
],
[
845,
853
]
],
[
[
23,
33
]
],
[
[
41,
50
],
[
1029,
1038
]
],
[
[
74,
87
],
[
568,
581
]
],
[
[
89,
97
],
[
707,
... |
# -*- coding: utf-8 -*-
# Copyright 2013-2017 Ent. Services Development Corporation LP
#
# Redistribution and use of this software 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 copyrigh... | [
[
[
1440,
1458
],
[
5114,
5118
],
[
7625,
7629
]
],
[
[
1487,
1502
],
[
6194,
6209
]
],
[
[
1538,
1547
],
[
7895,
7904
],
[
9181,
9190
],
[
... |
# -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... | [
[
[
821,
825
],
[
1561,
1565
],
[
2052,
2056
],
[
2358,
2362
],
[
2818,
2822
],
[
3083,
3087
],
[
3147,
3151
],
[
3624,
3628
],
[
3688,
3692... |
from .idw import inverse_distance_weighting
| [
[
[
17,
43
]
]
] |
#
# PySNMP MIB module IPX-INTERFACE-MANAGEMENT-PRIVATE-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/IPX-INTERFACE-MANAGEMENT-PRIVATE-MIB
# Produced by pysmi-0.3.4 at Wed May 1 13:56:57 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# U... | [
[
[
382,
393
]
],
[
[
395,
411
]
],
[
[
413,
420
]
],
[
[
502,
513
],
[
4611,
4622
],
[
6597,
6608
],
[
7406,
7417
],
[
8242,
8253
]
],
[
... |
"""Support for setting the Transmission BitTorrent client Turtle Mode."""
import logging
from homeassistant.const import CONF_NAME, STATE_OFF, STATE_ON
from homeassistant.core import callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity import ToggleEntity
fr... | [
[
[
81,
88
],
[
370,
377
]
],
[
[
122,
131
],
[
598,
607
]
],
[
[
133,
142
],
[
1164,
1173
],
[
3771,
3780
]
],
[
[
144,
152
],
[
1723... |
import csv
import time
import os
import pandas as pd
DATA_ROOT = "C:\\RS\\Amazon\\All\\"
MINIMUM_X_CATEGORIES_FILENAME = 'minimum_2_Categories.csv'
timestamp = time.strftime('%y%m%d%H%M%S')
out_filename = os.path.join(DATA_ROOT, timestamp + 'categories_permutations.csv')
with open(out_filename, 'w', newline='', enc... | [
[
[
8,
11
],
[
357,
360
]
],
[
[
19,
23
],
[
164,
168
]
],
[
[
31,
33
],
[
209,
211
],
[
441,
443
]
],
[
[
42,
54
],
[
429,
431
... |
from persistent.interfaces import IPersistent
import lxml.objectify
import mock
import unittest
import zeit.cms.workingcopy.interfaces
import zeit.edit.container
import zeit.edit.testing
import zeit.edit.tests.fixture
import zope.interface
import zope.security.proxy
class TestContainer(unittest.TestCase):
def ge... | [
[
[
34,
45
],
[
446,
457
],
[
2107,
2118
]
],
[
[
53,
67
],
[
1500,
1504
],
[
2206,
2210
],
[
3431,
3435
],
[
3872,
3876
]
],
[
[
75,
... |
from django.contrib import admin
from .models import Artists, Albums, Tracks
# Register your models here.
admin.site.register([Artists, Albums, Tracks]) | [
[
[
27,
32
],
[
107,
112
]
],
[
[
53,
60
],
[
128,
135
]
],
[
[
62,
68
],
[
137,
143
]
],
[
[
70,
76
],
[
145,
151
]
]
] |
import numpy as np
import astropy.units as u
from astropy.convolution.kernels import Gaussian2DKernel
from scipy import signal
from ..clean import clean, ms_clean, component, radial_prolate_sphereoidal,\
vec_radial_prolate_sphereoidal
from ..transform import dft_map, idft_map
def test_clean_ideal():
n = m =... | [
[
[
7,
18
],
[
381,
383
],
[
491,
493
],
[
692,
694
],
[
989,
991
],
[
1110,
1112
],
[
1203,
1205
],
[
1284,
1286
],
[
1365,
1367
],
... |
# -*-coding:Utf-8 -*
from mplotlab import App
from matplotlib.backend_bases import NavigationToolbar2
import wx
class Cursors:
# this class is only used as a simple namespace
HAND, POINTER, SELECT_REGION, MOVE = list(range(4))
cursors = Cursors()
cursord = {
cursors.MOVE : wx.CURSOR_HAND,
... | [
[
[
45,
48
],
[
807,
810
]
],
[
[
87,
105
],
[
468,
486
],
[
530,
548
]
],
[
[
116,
118
],
[
303,
305
],
[
339,
341
],
[
378,
380
... |
"""
UnitTests of the python interface to the neuron class.
Items declared in neuron/__init__.py
$Id$
"""
import unittest
import neuron
from neuron import h
class NeuronTestCase(unittest.TestCase):
"""Tests of neuron"""
def testHClass(self):
"""Test subclass of hoc class."""
from ._subclass... | [
[
[
114,
122
],
[
181,
189
],
[
8171,
8179
],
[
8046,
8054
]
],
[
[
130,
136
],
[
924,
930
]
],
[
[
156,
157
],
[
533,
534
],
[
702,
... |
#!/usr/bin/env python3
# Copyright (c) 2015-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test BIP66 (DER SIG).
Test that the DERSIG soft-fork activates at (regtest) height 1251.
"""
from tes... | [
[
[
354,
374
],
[
1643,
1663
]
],
[
[
407,
408
]
],
[
[
445,
446
],
[
1531,
1543
],
[
1573,
1589
],
[
1906,
1918
],
[
1931,
1951
],
[
2946... |
import collections
EstimatorSetting = collections.namedtuple(
'EstimatorSetting', ['title', 'estimator', 'parameter_space'])
| [
[
[
7,
18
],
[
39,
50
]
],
[
[
20,
36
]
]
] |
# coding=utf-8
from OTLMOW.PostenMapping.StandaardPost import StandaardPost
from OTLMOW.PostenMapping.StandaardPostMapping import StandaardPostMapping
# Generated with PostenCreator. To modify: extend, do not edit
class Post060339901(StandaardPost):
def __init__(self):
super().__init__(
nummer... | [
[
[
62,
75
],
[
236,
249
]
],
[
[
130,
150
],
[
468,
488
]
],
[
[
222,
235
]
]
] |
import sys, inspect, re
from os.path import basename, split
__all__ = ['this_tests']
class RegisterTestsPerAPI:
apiTestsMap = dict()
@staticmethod
def this_tests(testedapi):
prev_frame = inspect.currentframe().f_back.f_back
pathfilename, line_number, test_function_name, lines, index = ins... | [
[
[
7,
10
]
],
[
[
12,
19
],
[
210,
217
],
[
317,
324
]
],
[
[
21,
23
],
[
1245,
1247
]
],
[
[
44,
52
],
[
475,
483
]
],
[
[
54,
... |
# Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved.
import math
import numpy as np
import dace
import polybench
N = dace.symbol('N')
#datatypes = [dace.float64, dace.int32, dace.float32]
datatype = dace.float64
# Dataset sizes
sizes = [{N: 40}, {N: 120}, {N: 400}, {N: 2000}, {N: 4000}]
args ... | [
[
[
83,
87
]
],
[
[
95,
106
],
[
670,
672
],
[
680,
682
]
],
[
[
114,
118
],
[
141,
145
],
[
224,
228
],
[
700,
704
],
[
816,
820
... |
import pandas as pd
import numpy as np
COLORS_QTY: int = 5
# =============================================================================
# Argument parsing.
# =============================================================================
import argparse
from scipy import integrate
argument_parser: argparse.ArgumentP... | [
[
[
7,
19
],
[
2680,
2682
],
[
1487,
1489
],
[
1470,
1472
],
[
2318,
2320
],
[
2301,
2303
]
],
[
[
27,
38
],
[
3261,
3263
],
[
3918,
392... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import csv
import math
import numpy as np
FIELD_SCORE_NUM_OFFSET=6
class Waypoints:
def __init__(self, path, side):
self.points = []
self.number = 0
self.Waypoints_Lap = 0
self.next_target_idx = -1
self.all_field_score = np.on... | [
[
[
54,
57
],
[
557,
560
]
],
[
[
65,
69
],
[
738,
742
]
],
[
[
77,
88
],
[
315,
317
]
],
[
[
90,
112
],
[
1771,
1793
],
[
2705,
... |
# coding=utf-8
# Copyright 2020 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... | [
[
[
863,
878
]
],
[
[
902,
910
]
],
[
[
935,
949
]
],
[
[
958,
984
],
[
4443,
4445
],
[
4507,
4509
],
[
4593,
4595
],
[
5415,
5417
],
[
... |
class Page(object):
start: int
end: int
domain: str
all_urls: Any
m3u8_dict: dict
__slots__ = ("start", "end", "domain", "all_urls", "m3u8_dict")
def __init__(self, start, end, domain, all_urls = [], **m3u8_dict):
# super().__init__()
self.start = start
self.end = e... | [
[
[
7,
11
]
]
] |
import config
import models
import tensorflow as tf
import numpy as np
import os
from sys import argv
os.environ['CUDA_VISIBLE_DEVICES']='0'
#Input training files from benchmarks/FB15K/ folder.
con = config.Config()
#True: Input test files from the same folder.
con.set_in_path("./benchmarks/FB15K237/")
con.set_test_li... | [
[
[
7,
13
],
[
201,
207
]
],
[
[
21,
27
],
[
915,
921
]
],
[
[
35,
51
]
],
[
[
59,
70
]
],
[
[
78,
80
],
[
103,
105
]
],
[
[
9... |
from database.database_util import connect_to_skip_database
from skip_dataset.generate_histogram import generate_histogram
from skip_dataset.generate_track_data import generate_track_data
from skip_dataset.plot_track_sum import plot_track_sum
# File used to execute different functions related to Spotify Sequential Ski... | [
[
[
35,
59
],
[
590,
614
]
],
[
[
104,
122
],
[
675,
693
]
],
[
[
168,
187
]
],
[
[
228,
242
]
]
] |
# Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | [
[
[
616,
622
],
[
9629,
9635
],
[
13318,
13324
]
],
[
[
630,
634
]
],
[
[
642,
667
],
[
12887,
12902
]
],
[
[
675,
677
],
[
12827,
12829
]
],
... |
dnas = [
['wVW*?', 48, 52, 15.52, 40, 10, -0.23, {'ott_len': 35, 'ott_percent': 209, 'ott_bw': 120, 'tps_qty_index': 3, 'max_risk': 30}],
['ftUQf', 46, 66, 10.18, 58, 12, 3.51, {'ott_len': 33, 'ott_percent': 246, 'ott_bw': 117, 'tps_qty_index': 65, 'max_risk': 54}],
['ui*5<', 44, 84, 12.12, 42, 14, 6.81, {'ott_len': 35... | [
[
[
0,
4
]
]
] |
#!/bin/python3
import math
import os
import random
import re
import sys
# Complete the isValid function below.
def isValid(s):
ss = list(set(s))
fs = []
for c in ss:
fs.append(s.count(c))
if (len(list(set(fs))))==1:
return 'YES'
elif len(list(set(fs)))==2:
mx= max(fs)... | [
[
[
23,
27
]
],
[
[
35,
37
],
[
578,
580
]
],
[
[
45,
51
]
],
[
[
59,
61
]
],
[
[
69,
72
]
],
[
[
117,
124
],
[
641,
648
]
],
[
... |
"""Test Axis user management.
pytest --cov-report term-missing --cov=axis.pwdgrp_cgi tests/test_pwdgrp_cgi.py
"""
import pytest
from unittest.mock import Mock
from axis.pwdgrp_cgi import SGRP_ADMIN, User, Users
def test_users():
"""Verify that you can list users."""
mock_request = Mock()
users = Users(... | [
[
[
123,
129
]
],
[
[
156,
160
],
[
295,
299
],
[
1044,
1048
],
[
1845,
1849
],
[
3013,
3017
]
],
[
[
190,
200
],
[
1134,
1144
],
[
1442,
... |
#!/usr/bin/env python
# -*- coding:utf-8 -*-
"""
Date: 2021/12/20 14:52
Desc: 南华期货-商品指数历史走势-价格指数-数值
http://www.nanhua.net/nhzc/varietytrend.html
1000 点开始, 用收益率累计
http://www.nanhua.net/ianalysis/varietyindex/price/A.json?t=1574932974280
"""
import time
import requests
import pandas as pd
def futures_nh_index_symbol_t... | [
[
[
247,
251
],
[
1189,
1193
]
],
[
[
260,
268
],
[
584,
592
],
[
1320,
1328
]
],
[
[
276,
288
],
[
330,
332
],
[
641,
643
],
[
691,
... |
"""Custom COVID19 Compartmental model
"""
from ..model import CompartmentalModel
class COVID19(CompartmentalModel):
def __init__(self,
N,
beta,
incubation_rate = 1/3.7,
recovery_rate_asymptomatic = 1/4.7,
recovery_rate_mild = 1/4.7,
... | [
[
[
63,
81
],
[
98,
116
]
],
[
[
90,
97
]
]
] |
from lib.utils import top_k
from TraditionalRecommenderSystems.MatrixFactorization.Models import BaseMF
import numpy as np
import pandas as pd
import torch
from torch import nn
import torch.utils.data as data
from tqdm import tqdm
class MatrixFactorization(object):
def __init__(self, user_item_pairs, user_list, i... | [
[
[
22,
27
],
[
9186,
9191
]
],
[
[
97,
103
],
[
2881,
2887
]
],
[
[
111,
122
],
[
1539,
1541
],
[
1587,
1589
],
[
5804,
5806
],
[
6748,
... |
import numpy as np
import copy
def softmax(x):
probs = np.exp(x - np.max(x))
probs /= np.sum(probs)
return probs
class TreeNode(object):
"""A node in the MCTS tree. Each node keeps track of its own value Q, prior probability P, and
its visit-count-adjusted prior score u.
"""
def __init_... | [
[
[
7,
18
],
[
62,
64
],
[
73,
75
],
[
97,
99
],
[
2325,
2327
],
[
5531,
5533
],
[
5538,
5540
],
[
6525,
6527
],
[
6917,
6919
],
[
... |
#!/usr/bin/env python
from vtk import *
source = vtkRandomGraphSource()
source.SetNumberOfVertices(15)
source.SetStartWithTree(True)
source.SetIncludeEdgeWeights(True)
bfs = vtkBoostBreadthFirstSearch()
bfs.AddInputConnection(source.GetOutputPort())
bfs.SetOriginVertex(0)
view = vtkGraphLayoutView()
vie... | [
[
[
39,
40
],
[
53,
73
],
[
184,
210
],
[
295,
313
],
[
669,
681
]
],
[
[
44,
50
],
[
77,
83
],
[
109,
115
],
[
140,
146
],
[
... |
# 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... | [
[
[
593,
603
],
[
20925,
20935
]
],
[
[
611,
615
],
[
16027,
16031
]
],
[
[
623,
630
],
[
4387,
4394
]
],
[
[
638,
640
],
[
15529,
15531
],
... |
# coding=utf8
import os
import re
import json
import argparse
from sql.evaluator import compare_sqls
def evaluate(path, timeout=120):
with open(path, 'r') as f:
predictions = json.load(f)
total = len(predictions)
correct = 0
for pidx, p in enumerate(predictions):
truth = p['truth... | [
[
[
22,
24
]
],
[
[
32,
34
]
],
[
[
42,
46
],
[
190,
194
]
],
[
[
54,
62
],
[
589,
597
]
],
[
[
89,
101
],
[
390,
402
]
],
[
[
... |
import torch
import torch.nn as nn
import torch.nn.functional as F
from proj.archs.cluster.vgg import VGGNet
from proj.archs.segmentation.net10a import SegmentationNet10aTrunk, \
SegmentationNet10a
from proj.utils.segmentation.baselines.general import get_patches
__all__ = ["SegmentationNet10aDoersch"]
class Do... | [
[
[
7,
12
],
[
1736,
1741
]
],
[
[
20,
34
],
[
330,
332
],
[
501,
503
],
[
528,
530
],
[
683,
685
],
[
717,
719
],
[
771,
773
],
... |
#-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | [
[
[
527,
538
]
],
[
[
560,
566
],
[
569,
575
],
[
4426,
4432
],
[
4547,
4553
],
[
5320,
5326
],
[
9248,
9254
],
[
9310,
9316
]
],
[
[
772,... |
# Copyright (c) 2009-2010 Mitch Garnaat http://garnaat.org/
#
# 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, modi... | [
[
[
1110,
1114
],
[
4757,
4761
]
],
[
[
1136,
1144
],
[
4447,
4455
]
],
[
[
1172,
1181
],
[
6812,
6821
],
[
6941,
6950
]
],
[
[
1252,
1267
],
... |
__version__ = "0.0.18"
__banner__ = \
"""
# minidump %s
# Author: Tamas Jos @skelsec (skelsecprojects@gmail.com)
""" % __version__ | [
[
[
1,
12
],
[
121,
132
]
],
[
[
24,
34
]
]
] |
#
# SPDX-FileCopyrightText: Copyright (c) 1993-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# 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... | [
[
[
733,
741
],
[
5152,
5160
]
],
[
[
782,
788
]
],
[
[
824,
828
],
[
1668,
1672
],
[
1718,
1722
],
[
1781,
1785
],
[
1839,
1843
],
[
1894... |
from toposort import toposort
import contextlib
import numpy as np
import tensorflow as tf
import tensorflow.contrib.graph_editor as ge
import time
import sys
sys.setrecursionlimit(10000)
# refers back to current module if we decide to split helpers out
util = sys.modules[__name__]
# getting rid of "WARNING:tensorflow... | [
[
[
21,
29
],
[
15110,
15118
]
],
[
[
37,
47
],
[
15597,
15607
]
],
[
[
55,
66
],
[
4630,
4632
],
[
6761,
6763
],
[
7360,
7362
],
[
7368,
... |
"""
Script taken from: https://github.com/orlp/pygrafix
Appropriate Licence applies!
"""
import argparse
import os
import pathlib
import re
def generate_pxd(glew_header_loc, dest="."):
with open(glew_header_loc) as fin:
data = fin.read()
# cython doesn't support const
data = re.sub(r"\bconst\b",... | [
[
[
97,
105
],
[
7787,
7795
]
],
[
[
113,
115
]
],
[
[
123,
130
],
[
5666,
5673
]
],
[
[
138,
140
],
[
300,
302
],
[
582,
584
],
[
984... |
import logging
from urllib.parse import urljoin
import requests
from eth_typing import ChecksumAddress
from safe_transaction_service.tokens.clients.exceptions import CannotGetPrice
logger = logging.getLogger(__name__)
class CoingeckoClient:
base_url = 'https://api.coingecko.com/'
def __init__(self):
... | [
[
[
7,
14
],
[
193,
200
]
],
[
[
40,
47
],
[
1213,
1220
],
[
1603,
1610
]
],
[
[
56,
64
],
[
343,
351
]
],
[
[
88,
103
],
[
1400,
... |
# -*- coding: utf-8 -*-
from selenium_tests.UserDriverTest import UserDriverTest
from selenium.webdriver.common.by import By
class TestHideApplication(UserDriverTest):
def test_hide_application(self):
self.wait_until_application_list_loaded()
self.type_text_in_element_located(By.ID, "search-input... | [
[
[
66,
80
],
[
153,
167
]
],
[
[
122,
124
],
[
300,
302
],
[
390,
392
]
],
[
[
133,
152
]
]
] |
import anachronos
from e2e_test.runner import http
class ExceptionResourceTest(anachronos.TestCase):
def setUp(self):
self.http = http.with_path("/api/error")
def test_got500OnInternalServerError(self):
response = self.http.get("")
self.assertEqual(500, response.status_code)
d... | [
[
[
7,
17
],
[
82,
92
],
[
809,
819
]
],
[
[
47,
51
],
[
146,
150
]
],
[
[
60,
81
]
]
] |
from st_library import Library
st_lib = Library()
st_lib.set_token('token')
st_lib.set_config_id('52db99d3-edfb-44c5-b97a-f09df4402081')
print(st_lib.unstruct_data.download_file("19a29b9b-bea2-40fb-89c4-555bba829539","image.jpg"))
| [
[
[
23,
30
],
[
41,
48
]
],
[
[
32,
38
],
[
51,
57
],
[
77,
83
],
[
144,
150
]
]
] |
# Copyright 2012 Cloudbase Solutions Srl
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | [
[
[
623,
633
],
[
43658,
43668
],
[
43972,
43982
],
[
48664,
48674
]
],
[
[
641,
647
],
[
1633,
1639
],
[
1667,
1673
],
[
1701,
1707
],
[
1734... |
from .core import *
from .usual_models import *
| [
[
[
18,
19
]
],
[
[
47,
48
]
]
] |
import pandas as pd
import re
data = pd.read_csv("BIPMetadata_current.csv")
def format_date(date_column):
# formatting the date data to display as yyyy-mm-dd
new_dates = []
for date in date_column:
month = date[0:date.find('/')]
date = date[date.find('/')+1:]
day = date[0:date.find... | [
[
[
7,
19
],
[
38,
40
]
],
[
[
27,
29
],
[
1097,
1099
],
[
1179,
1181
]
],
[
[
31,
35
],
[
1432,
1436
],
[
1493,
1497
],
[
1536,
154... |
import os
from wellcomeml.ml.clustering import TextClustering
from wellcomeml.viz.visualize_clusters import visualize_clusters
def test_output_html(tmp_path):
"""Tests that the output html is generated correclty by the clustering function"""
# This will be the file to
temporary_file = os.path.join(tmp_p... | [
[
[
7,
9
],
[
302,
304
],
[
1058,
1060
]
],
[
[
48,
62
],
[
427,
441
]
],
[
[
109,
127
],
[
850,
868
]
],
[
[
134,
150
]
]
] |
#!/usr/bin/env python
import numpy as np
from collections import defaultdict
import itertools
from sklearn.metrics import confusion_matrix
def print_data_stats(sens_attr, class_labels):
"""Print a few numbers about the data: Total number of points, number of
protected examples and unprotected examples, and num... | [
[
[
29,
40
],
[
3663,
3665
],
[
3678,
3680
]
],
[
[
65,
76
]
],
[
[
84,
93
]
],
[
[
122,
138
],
[
1869,
1885
],
[
2398,
2414
]
],
[
[
... |
# (C) 2022 GoodData Corporation
from __future__ import annotations
from pathlib import Path
from typing import List, Optional, Type
import attr
from gooddata_metadata_client.model.declarative_user import DeclarativeUser
from gooddata_metadata_client.model.declarative_users import DeclarativeUsers
from gooddata_sdk.c... | [
[
[
55,
66
]
],
[
[
88,
92
],
[
864,
868
],
[
1296,
1300
]
],
[
[
112,
116
],
[
660,
664
],
[
1743,
1747
]
],
[
[
118,
126
],
[
1705,
... |
import logging
from collections import namedtuple
from typing import (Any, Callable, Dict, # pylint: disable=unused-import
Generator, Iterable, List, Optional, Text, Union, cast)
import schema_salad.validate as validate
from schema_salad.sourceline import SourceLine, bullets, strip_dup_lineno
impo... | [
[
[
7,
14
]
],
[
[
39,
49
],
[
9236,
9246
]
],
[
[
70,
73
]
],
[
[
75,
83
]
],
[
[
85,
89
]
],
[
[
144,
153
]
],
[
[
155,
163
]
],... |
from isserviceup.services.models.statuspage import StatusPagePlugin
class Loggly(StatusPagePlugin):
name = 'Loggly'
status_url = 'http://status.loggly.com//'
icon_url = '/images/icons/loggly.jpg'
| [
[
[
51,
67
],
[
83,
99
]
],
[
[
76,
82
]
]
] |
import tensorflow as tf
from contextlib import contextmanager
from PIL import Image
from keras import backend as K
from keras.utils.data_utils import OrderedEnqueuer
def heteroscedastic_loss(attention=False,
block_attention_gradient=False,
mode='l2'):
''' Heteroscedastic loss.'''
def h... | [
[
[
7,
23
],
[
1546,
1548
],
[
1685,
1687
],
[
605,
607
]
],
[
[
48,
62
],
[
940,
954
]
],
[
[
79,
84
],
[
1742,
1747
]
],
[
[
104,
... |
from __future__ import absolute_import
from __future__ import print_function
import requests, sys, threading, time, os, random
from random import randint
from six.moves import input
CheckVersion = str (sys.version)
import re
from datetime import datetime
print ('''
.... ... | [
[
[
23,
38
]
],
[
[
62,
76
]
],
[
[
84,
92
],
[
2852,
2860
]
],
[
[
94,
97
],
[
203,
206
],
[
1878,
1881
]
],
[
[
99,
108
],
[
211... |
#!/usr/bin/env python
#from gevent import monkey
#monkey.patch_all(aggressive=True)
#from psycogreen.gevent import patch_psycopg
#patch_psycopg()
#import eventlet
#eventlet.monkey_patch()
#from psycogreen.eventlet import patch_psycopg
#patch_psycopg()
import os
import sys
if __name__ == "__main__":
os.environ.s... | [
[
[
262,
264
],
[
308,
310
]
],
[
[
272,
275
],
[
1031,
1034
]
],
[
[
431,
456
],
[
1005,
1030
]
],
[
[
694,
700
]
]
] |
class AutoVivification(dict):
"""Implementation of perl's autovivification."""
def __missing__(self, key):
value = self[key] = type(self)()
return value
weather = AutoVivification()
weather['china']['guangdong']['shenzhen'] = 'sunny'
weather['china']['hubei']['wuhan'] = 'sunny'
weather['USA'][... | [
[
[
6,
22
],
[
189,
205
]
],
[
[
179,
186
],
[
208,
215
],
[
260,
267
],
[
305,
312
],
[
365,
372
]
]
] |
#!/usr/bin/env python3
# Copyright (c) 2014-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Helpful routines for regression testing."""
from base64 import b64encode
from binascii import hexlify,... | [
[
[
281,
290
],
[
7944,
7953
]
],
[
[
312,
319
],
[
7610,
7617
]
],
[
[
321,
330
],
[
7870,
7879
]
],
[
[
351,
358
],
[
7298,
7305
],
[
... |
import unittest
from steem.utils import (
constructIdentifier,
sanitizePermlink,
derivePermlink,
resolveIdentifier,
yaml_parse_file,
formatTime,
)
class Testcases(unittest.TestCase) :
def test_constructIdentifier(self):
self.assertEqual(constructIdentifier("A", "B"), "@A/B")
... | [
[
[
7,
15
],
[
189,
197
],
[
990,
998
]
],
[
[
46,
65
],
[
276,
295
]
],
[
[
71,
87
],
[
378,
394
],
[
445,
461
]
],
[
[
93,
107... |
"""File utility functions for Sphinx."""
import os
import posixpath
from typing import TYPE_CHECKING, Callable, Dict
from docutils.utils import relative_path
from sphinx.util.osutil import copyfile, ensuredir
from sphinx.util.typing import PathMatcher
if TYPE_CHECKING:
from sphinx.util.template import BaseRende... | [
[
[
49,
51
],
[
933,
935
],
[
980,
982
],
[
1094,
1096
],
[
1120,
1122
],
[
2525,
2527
],
[
2717,
2719
],
[
2850,
2852
]
],
[
[
59,
68
... |
# -*- coding: utf-8 -*-
# Copyright (c) 2018, Marc Anthony Reyes and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
class TestGame(unittest.TestCase):
pass
| [
[
[
123,
139
]
],
[
[
148,
154
]
],
[
[
162,
170
],
[
187,
195
]
],
[
[
178,
186
]
]
] |
#!/bin/env python3
def puzzle2():
entries = set()
allowed1 = {"byr", "iyr", "eyr", "hgt", "hcl", "ecl", "pid"}
valid = 0
# Read in all the rules
with open('input.txt', 'r') as input:
l = 0
for line in input:
l += 1
if line == "\n":
# print(entr... | [
[
[
23,
30
],
[
3389,
3396
]
]
] |
# -*- coding: utf-8 -*-
# Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the MIT License.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without ev... | [
[
[
508,
515
],
[
757,
764
],
[
1218,
1225
],
[
1599,
1606
]
],
[
[
524,
536
],
[
1097,
1099
]
],
[
[
562,
574
],
[
791,
803
]
],
[
[
... |
from setuptools import setup, find_packages
with open("README.md", "r", encoding="utf-8") as f:
long_description = f.read()
setup_requirements = [
"wheel>=0.35.1",
]
requirements = ["Pillow>=7.2.0"]
test_requirements = [
"flake8>=3.8.3",
"pytest>=5.4.3",
]
dev_requirements = [
*setup_requiremen... | [
[
[
23,
28
],
[
489,
494
]
],
[
[
30,
43
],
[
1211,
1224
]
],
[
[
94,
95
],
[
120,
121
]
],
[
[
101,
117
],
[
819,
835
]
],
[
[
13... |
from collections import OrderedDict
import pytest
from company.constants import RegistrationNumberChoices
from company.models import Country
from company.serialisers import CompanySerialiser
from .factories import CompanyFactory, IndustryCodeFactory, PrimaryIndustryCodeFactory, RegistrationNumberFactory
@pytest.mar... | [
[
[
24,
35
],
[
3029,
3040
],
[
4462,
4473
],
[
4654,
4665
],
[
5046,
5057
]
],
[
[
44,
50
],
[
310,
316
]
],
[
[
82,
107
],
[
1940,
... |
"""
Django settings for drf_sample project.
Generated by 'django-admin startproject' using Django 1.10.1.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
"""
import ... | [
[
[
320,
323
],
[
335,
338
]
],
[
[
331,
333
],
[
444,
446
],
[
460,
462
],
[
476,
478
],
[
2323,
2325
]
],
[
[
433,
441
],
[
2336,
... |
import os
from flask import render_template, url_for, redirect
from werkzeug.utils import secure_filename
from app import app
from app.forms import ScriptForm
from Script_reader import table_creator
@app.route('/', methods=['POST', 'GET'])
@app.route('/index', methods=['POST', 'GET'])
def index():
form = ScriptF... | [
[
[
7,
9
],
[
456,
458
],
[
524,
526
],
[
645,
647
]
],
[
[
28,
43
],
[
698,
713
]
],
[
[
45,
52
]
],
[
[
54,
62
]
],
[
[
90,
... |
import pandas as pd
import numpy as np
from collections import defaultdict
import RemovingDataSolns as s
# Question 1
def prop_sals_test(prop_sals):
'''
INPUT prop_sals - a float as the percent of missing values in the salary column
Prints statement related to the correctness of the solution of ... | [
[
[
7,
19
]
],
[
[
28,
39
],
[
352,
354
]
],
[
[
65,
76
]
],
[
[
85,
107
],
[
375,
376
],
[
902,
903
],
[
1414,
1415
],
[
2039,
... |
# import sharpy.utils.settings as settings
# import sharpy.utils.exceptions as exceptions
# import sharpy.utils.cout_utils as cout
import numpy as np
import importlib
import unittest
import os
import sharpy.utils.cout_utils as cout
class TestCoupledPrescribed(unittest.TestCase):
"""
"""
@classmethod
... | [
[
[
138,
149
]
],
[
[
157,
166
]
],
[
[
174,
182
],
[
262,
270
]
],
[
[
190,
192
]
],
[
[
200,
231
],
[
1604,
1608
]
],
[
[
240,
261
]
... |
# coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 9
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from isi_sdk_8_2_2.models.cloud_p... | [
[
[
243,
249
],
[
7308,
7314
]
],
[
[
257,
259
]
],
[
[
282,
285
],
[
6504,
6507
]
],
[
[
332,
342
]
],
[
[
370,
392
],
[
7548,
7570
]
]
] |
from django.urls import include, path
from rest_framework import routers
from . import views
from .views import *
router = routers.DefaultRouter()
router.register(r"tracks", views.TrackViewSet)
urlpatterns = [
path("", include(router.urls)),
path('playlist/add', PlaylistAPIView.as_view()),
path('allplayl... | [
[
[
24,
31
],
[
226,
233
]
],
[
[
33,
37
],
[
217,
221
],
[
253,
257
],
[
306,
310
],
[
374,
378
],
[
429,
433
],
[
490,
494
],
... |
# Данный пример выводит изображения myImage_1 и myImage_2.
# Создаём изображение "смайлик".
myImage_1 = [ 0b00111100, #
0b01000010, #
0b10100101, # ... | [
[
[
132,
141
],
[
1790,
1799
]
],
[
[
751,
760
],
[
1942,
1951
]
],
[
[
1329,
1330
],
[
1470,
1489
]
],
[
[
1409,
1414
],
[
1865,
1870
],
[
... |
from django.http import HttpResponse
from django.views.decorators.http import require_http_methods
from django.shortcuts import render
import re
# Create your views here.
@require_http_methods(['GET', 'POST'])
def echo_0(request):
if request.method == 'GET' and something == None:
return render(request,'tem... | [
[
[
24,
36
]
],
[
[
78,
98
],
[
173,
193
]
],
[
[
128,
134
],
[
301,
307
],
[
2404,
2410
],
[
2485,
2491
],
[
2679,
2685
]
],
[
[
142,... |
from kivy.app import App
from kivy.factory import Factory
from kivy.properties import ObjectProperty
from kivy.lang import Builder
from kivy.clock import Clock
from kivy.uix.label import Label
from electrum_commercium_gui.kivy.i18n import _
from datetime import datetime
from electrum_commercium.util import InvalidPass... | [
[
[
21,
24
]
],
[
[
50,
57
],
[
3149,
3156
],
[
3207,
3214
]
],
[
[
86,
100
]
],
[
[
123,
130
],
[
326,
333
]
],
[
[
154,
159
],
[
... |
import math
from typing import List
import numpy
from allennlp.common.util import JsonDict, sanitize
from allennlp.interpret.saliency_interpreters.saliency_interpreter import SaliencyInterpreter
from allennlp.nn import util
@SaliencyInterpreter.register("simple-gradient")
class SimpleGradient(SaliencyInterpreter):
... | [
[
[
7,
11
],
[
2029,
2033
]
],
[
[
32,
36
],
[
880,
884
],
[
2284,
2288
]
],
[
[
44,
49
],
[
885,
890
],
[
1880,
1885
],
[
1959,
196... |
# coding: utf-8
"""
FlashArray REST API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: 2.5
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re
import six
import typing
from .... | [
[
[
270,
276
],
[
3806,
3812
]
],
[
[
284,
286
]
],
[
[
295,
298
],
[
2788,
2791
]
],
[
[
306,
312
],
[
353,
359
]
],
[
[
341,
349
],
[
... |
# Copyright 2019 The Pigweed 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | [
[
[
629,
638
],
[
1359,
1368
]
],
[
[
712,
730
],
[
1375,
1393
]
],
[
[
830,
851
],
[
1400,
1421
]
],
[
[
1094,
1105
],
[
2338,
2349
]
],
[
... |
# -*- coding: utf-8 -*-
from framework.routing import Rule, json_renderer
from website.addons.github import views
settings_routes = {
'rules': [
# Configuration
Rule(
[
'/project/<pid>/github/settings/',
'/project/<pid>/node/<nid>/github/settings/',
... | [
[
[
55,
59
],
[
185,
189
],
[
444,
448
],
[
702,
706
],
[
1082,
1086
],
[
1334,
1338
],
[
1663,
1667
],
[
1993,
1997
],
[
2269,
2273
],
... |
import matplotlib.pyplot as plt
from math import pi
import numpy as np | [
[
[
7,
31
]
],
[
[
49,
51
]
],
[
[
59,
70
]
]
] |
# coding=utf-8
# Copyright 2017 The Tensor2Tensor Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | [
[
[
679,
694
]
],
[
[
718,
726
]
],
[
[
750,
764
]
],
[
[
772,
783
],
[
14238,
14249
]
],
[
[
791,
793
],
[
7942,
7944
],
[
21089,
21091
],
... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2019, 2020 Matt Post <post@cs.jhu.edu>
#
# 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/LICE... | [
[
[
1191,
1199
],
[
18392,
18400
]
],
[
[
1207,
1213
],
[
17250,
17256
]
],
[
[
1221,
1223
],
[
18740,
18742
],
[
18753,
18755
],
[
18987,
18989
],
... |
import tensorflow as tf
import numpy as np
import os,glob,cv2
import sys,argparse
# First, pass the path of the image
dir_path = os.path.dirname(os.path.realpath(__file__))
image_path=sys.argv[1]
filename = dir_path +'/' +image_path
image_size=128
num_channels=3
images = []
# Reading the image using OpenCV
image = c... | [
[
[
7,
23
],
[
862,
864
],
[
957,
959
],
[
1096,
1098
],
[
1192,
1194
]
],
[
[
31,
42
],
[
548,
550
],
[
571,
573
],
[
624,
626
],
... |
"""
ARIA -- Ambiguous Restraints for Iterative Assignment
A software for automated NOE assignment
Version 2.3
Copyright (C) Benjamin Bardiaux, Michael Habeck, Therese Malliavin,
Wolfgang Rieping, and Michael Nilges
All rights reserved.
NO W... | [
[
[
807,
808
]
],
[
[
846,
847
],
[
899,
912
],
[
1192,
1205
],
[
2057,
2067
],
[
2094,
2104
],
[
2918,
2923
],
[
4494,
4504
],
[
4531,
... |
import numpy as np
import torch
import torch.nn.functional as F
import torch.nn as nn
from sklearn.utils import class_weight
from utils.lovasz_losses import lovasz_softmax
import pdb
def make_one_hot(labels, classes):
one_hot = torch.FloatTensor(labels.size()[0], classes, labels.size()[2], labels.size()[3]).zero_... | [
[
[
7,
18
],
[
503,
505
],
[
551,
553
],
[
667,
669
]
],
[
[
26,
31
],
[
234,
239
],
[
718,
723
],
[
2398,
2403
]
],
[
[
39,
63
... |
from collections import deque
from dataclasses import dataclass
from types import TracebackType
from typing import Deque, Optional, Tuple, Type
from warnings import warn
from ..lowlevel import cancel_shielded_checkpoint, checkpoint, checkpoint_if_cancelled
from ._compat import DeprecatedAwaitable
from ._eventloop impo... | [
[
[
24,
29
],
[
2960,
2965
],
[
5276,
5281
],
[
8331,
8336
]
],
[
[
54,
63
],
[
475,
484
],
[
641,
650
],
[
1220,
1229
],
[
1626,
1635
... |
# Copyright 2011 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... | [
[
[
655,
658
],
[
1355,
1358
],
[
1503,
1506
],
[
2277,
2280
],
[
3049,
3052
],
[
3535,
3538
],
[
4003,
4006
],
[
4745,
4748
],
[
5213,
5216... |
"""
Data structures for sparse float data. Life is made simpler by dealing only
with float64 data
"""
from __future__ import division
# pylint: disable=E1101,E1103,W0231,E0202
import warnings
from pandas.compat import lmap
from pandas import compat
import numpy as np
from pandas.core.dtypes.missing import isna, notna... | [
[
[
125,
133
]
],
[
[
184,
192
],
[
16610,
16618
],
[
17895,
17903
]
],
[
[
219,
223
],
[
33798,
33802
]
],
[
[
243,
249
],
[
5628,
5634
],
... |
import time
import telebot
from Responses import TELE_HI_GREET, TELE_CLASS_CODE
import BacaPdf as pdf
import csvHandler as csvH
with open('API_KEY.txt') as API_KEY:
bot = telebot.TeleBot(API_KEY.read()[:-1])
#Message type check
#ClassCode, TimeInterval, Status, Feedback
messageBool = [False, False,... | [
[
[
7,
11
]
],
[
[
22,
29
],
[
187,
194
]
],
[
[
55,
68
],
[
516,
529
]
],
[
[
70,
85
],
[
631,
646
]
],
[
[
94,
108
],
[
2333,
... |
#!/usr/bin/python3
# encoding: utf-8
### python script to interact with Complice
### giovanni, Saturday, April 10, 2021, 2:11 PM
### March 2022 updated to Python 3
import sys
from config import POMOLENGTH, TIMERLENGTH, TOKEN
import complice_post
myInput = sys.argv[1]
if myInput == "startTimer":
complic... | [
[
[
174,
177
],
[
268,
271
]
],
[
[
197,
207
]
],
[
[
209,
220
]
],
[
[
222,
227
]
],
[
[
235,
248
],
[
313,
326
],
[
378,
391
],
[
... |
import unittest
from troposphere import Tags, Template
from troposphere.s3 import Filter, Rules, S3Key
from troposphere.serverless import (
Api, DeadLetterQueue, DeploymentPreference, Function, FunctionForPackaging,
LayerVersion, S3Event, S3Location, SimpleTable,
)
class TestServerless(unittest.TestCase):
... | [
[
[
7,
15
],
[
297,
305
],
[
7809,
7817
]
],
[
[
40,
44
],
[
1349,
1353
]
],
[
[
46,
54
],
[
644,
652
],
[
1058,
1066
],
[
1466,
147... |
from django.shortcuts import render
from django.http import JsonResponse
from django.http import HttpResponse, HttpResponseNotFound
from django.contrib.auth.decorators import login_required
from floweditor.models import B1if
from easywebdavbiffy import *
import xmltodict
import StringIO
from zipfile import ZipFile
from... | [
[
[
29,
35
],
[
629,
635
]
],
[
[
60,
72
],
[
1438,
1450
],
[
2259,
2271
],
[
2858,
2870
],
[
3414,
3426
],
[
4753,
4765
],
[
7009,
7021... |
# -*- coding: utf-8 -*-
# Copyright 2011 Google Inc. All Rights Reserved.
# Copyright 2011, Nexenta Systems 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/... | [
[
[
758,
773
]
],
[
[
782,
784
],
[
4038,
4040
]
],
[
[
815,
824
],
[
4659,
4668
]
],
[
[
851,
858
],
[
2753,
2760
],
[
2888,
2895
],
[
... |
from math import sqrt
from math import pi
import json
import tf
from geometry_msgs.msg import Quaternion
def dynamic_euclid_dist(a, b):
o = 0
for i in range(len(a)):
o += (a[i]-b[i])**2
return sqrt(o)
def quaternion_from_euler(roll, pitch, yaw):
'''
From HSR's utils.py
'''
q = tf.t... | [
[
[
17,
21
],
[
214,
218
]
],
[
[
39,
41
],
[
372,
374
],
[
441,
443
],
[
508,
510
],
[
698,
700
],
[
713,
715
],
[
728,
730
]
],
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.