code stringlengths 10 805k | def_use_chains listlengths 0 667 |
|---|---|
import logging
from typing import Optional, Any
from opentrons import types
from opentrons.calibration_storage import get
from opentrons.calibration_storage.types import TipLengthCalNotFound
from opentrons.hardware_control.dev_types import PipetteDict
from opentrons.protocol_api.labware import Labware, Well
from opent... | [
[
[
7,
14
],
[
2602,
2609
]
],
[
[
34,
42
],
[
617,
625
]
],
[
[
44,
47
],
[
626,
629
]
],
[
[
71,
76
],
[
3502,
3507
],
[
3737,
... |
from django.contrib import admin
from .models import CookiePageText, TOSPageText, StatutPageText
# Register your models here.
class CookieAdmin(admin.ModelAdmin):
pass
class TOSPageTextAdmin(admin.ModelAdmin):
pass
class StatutPageTextAdmin(admin.ModelAdmin):
pass
admin.site.register(CookiePageText, Cooki... | [
[
[
27,
32
],
[
145,
150
],
[
196,
201
],
[
250,
255
],
[
279,
284
],
[
328,
333
],
[
379,
384
]
],
[
[
53,
67
],
[
299,
313
]
],
... |
"""
We want to simplify the operations for pandas dataframes assuming we are using timeseries as the main objects.
When we have multiple timeseries, we will:
1) calculate joint index using df_index()
2) reindex each timeseries to the joint index
We then need to worry about multiple columns if there a... | [
[
[
500,
505
],
[
4766,
4771
],
[
5015,
5020
],
[
11584,
11589
],
[
12967,
12972
],
[
17036,
17041
],
[
28682,
28687
],
[
40795,
40800
]
],
[
[
... |
"""Reports views"""
# Django
from django.views.generic import TemplateView
# Shortcuts
from django.shortcuts import render
from django.shortcuts import redirect, reverse, get_object_or_404
from django.contrib.auth import authenticate
from django.http import (
HttpResponse,
HttpResponseNotFound,
HttpRespons... | [
[
[
63,
75
],
[
749,
761
]
],
[
[
117,
123
],
[
938,
944
],
[
1105,
1111
]
],
[
[
153,
161
]
],
[
[
163,
170
]
],
[
[
172,
189
]
],
[
... |
import unittest
import random
import subprocess
import signal
import sys
import os
import thread_affinity
# Test results may vary if executed in different systems
# with different amount of CPUUs
def get_random_mask():
"""Return a random, valid affinity mask
Which is a subset of {0, 1, ..., 2 ** num_procs - 1}
""... | [
[
[
7,
15
],
[
492,
500
],
[
1561,
1569
],
[
1633,
1641
]
],
[
[
23,
29
],
[
369,
375
],
[
638,
644
],
[
1235,
1241
]
],
[
[
37,
47
... |
# sqlalchemy/log.py
# Copyright (C) 2006-2022 the SQLAlchemy authors and contributors
# <see AUTHORS file>
# Includes alterations by Vinay Sajip vinay_sajip@yahoo.co.uk
#
# This module is part of SQLAlchemy and is released under
# the MIT License: https://www.opensource.org/licenses/mit-license.php
"""Logging control ... | [
[
[
735,
746
]
],
[
[
755,
762
],
[
1455,
1462
],
[
1510,
1517
],
[
1550,
1557
],
[
2520,
2527
],
[
3530,
3537
],
[
3561,
3568
],
[
3591,
... |
"""
Stream IO interposition
"""
import io
class InterposedStringIO(io.StringIO):
def __init__(self, newline="\n", line_buffering = False, onflush=None):
super().__init__(newline=newline)
self._line_buffering = line_buffering
self._onflush = onflush
def flush(self):
... | [
[
[
44,
46
],
[
75,
77
],
[
361,
363
]
],
[
[
56,
74
]
]
] |
# 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 ... | [
[
[
474,
483
]
],
[
[
503,
506
],
[
1817,
1820
],
[
1824,
1827
],
[
2834,
2837
],
[
4669,
4672
],
[
8215,
8218
],
[
10069,
10072
],
[
13693,
... |
# -*- 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
#... | [
[
[
1439,
1443
],
[
5885,
5889
]
],
[
[
1445,
1454
],
[
2778,
2787
],
[
5900,
5909
]
],
[
[
1463,
1470
],
[
2610,
2617
]
],
[
[
1491,
1494
],
... |
"""
========================================================
06. Remove epochs based on peak-to-peak (PTP) amplitudes
========================================================
Epochs containing peak-to-peak above the thresholds defined
in the 'reject' parameter are removed from the data.
This step will drop epochs con... | [
[
[
474,
483
],
[
4346,
4355
]
],
[
[
491,
498
],
[
724,
731
]
],
[
[
518,
526
],
[
3561,
3569
],
[
3596,
3604
]
],
[
[
535,
538
],
[
... |
import datetime
import hashlib
import json
import numpy as np
import pandas as pd
import tifffile
def timestamp():
return datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
class MicroManagerTIFF:
def __init__(self, src_filepath, verbose=True):
'''
'''
self.verbose = verbose
... | [
[
[
7,
15
],
[
128,
136
]
],
[
[
23,
30
],
[
1223,
1230
]
],
[
[
38,
42
],
[
957,
961
],
[
3866,
3870
]
],
[
[
50,
61
],
[
9156,
... |
import re
import collections
from enum import Enum
from ydk._core._dm_meta_info import _MetaInfoClassMember, _MetaInfoClass, _MetaInfoEnum
from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict
from ydk._core._dm_meta_info import ATTRIBUTE, REFERENCE_CLASS, REFERENCE_LIST, REFERENCE_LEAFLI... | [
[
[
10,
12
]
],
[
[
20,
31
]
],
[
[
50,
54
]
],
[
[
92,
112
],
[
12825,
12845
],
[
13090,
13110
],
[
13466,
13486
],
[
13739,
13759
],
[
... |
from . import models
import datetime
from discord import utils, TextChannel
def generate_id():
return utils.time_snowflake(datetime.datetime.now())
async def add_permanent_role(user_id: int, role_id: int):
await add_dbmember_if_not_exist(user_id)
if not await models.PermanentRole.query.where((models.Per... | [
[
[
14,
20
],
[
276,
282
],
[
310,
316
],
[
367,
373
],
[
444,
450
],
[
596,
602
],
[
630,
636
],
[
687,
693
],
[
963,
969
],
[
... |
import torch
import torch.nn as nn
from .base import BaseDetector
from .test_mixins import RPNTestMixin, BBoxTestMixin, MaskTestMixin
from .. import builder
from ..registry import DETECTORS
from mmdet.core import bbox2roi, bbox2result, build_assigner, build_sampler
@DETECTORS.register_module
class TwoStageDetector(B... | [
[
[
7,
12
],
[
6614,
6619
],
[
6756,
6761
],
[
6831,
6836
],
[
6974,
6979
],
[
7015,
7020
],
[
7370,
7375
]
],
[
[
20,
34
],
[
2270,
227... |
from __future__ import division
import discord, math, operator
from discord.ext import commands
from pyparsing import (Literal,CaselessLiteral,Word,Combine,Group,Optional,
ZeroOrMore,Forward,nums,alphas,oneOf)
__author__='Paul McGuire'
__version__ = '$Revision: 0.0 $'
__date__ = '$Date: 2009-03-20... | [
[
[
23,
31
]
],
[
[
39,
46
],
[
4481,
4488
],
[
4541,
4548
],
[
5442,
5449
],
[
5605,
5612
],
[
5936,
5943
],
[
6610,
6617
],
[
7104,
71... |
import onfido
from onfido.regions import Region
import io
api = onfido.Api("<AN_API_TOKEN>", region=Region.EU)
fake_uuid = "58a9c6d2-8661-4dbd-96dc-b9b9d344a7ce"
def test_upload_photo(requests_mock):
mock_upload = requests_mock.post("https://api.eu.onfido.com/v3.2/live_photos/", json=[])
sample_file = open... | [
[
[
7,
13
],
[
65,
71
]
],
[
[
41,
47
],
[
101,
107
]
],
[
[
55,
57
]
],
[
[
59,
62
],
[
403,
406
],
[
639,
642
],
[
869,
872
... |
#import OpenStack connection class from the SDK
from openstack import connection
# Create a connection object by calling the constructor and pass the security information
conn = connection.Connection(auth_url="http://192.168.0.106/identity",
project_name="demo",
username="admin",
password="manoj",
user_domain_id="defa... | [
[
[
70,
80
],
[
179,
189
]
],
[
[
172,
176
],
[
1036,
1040
]
],
[
[
361,
374
],
[
1022,
1035
]
],
[
[
517,
530
]
],
[
[
644,
659
]
],
[
... |
# -*- coding: utf-8 -*-
"""Top-level package for {{ cookiecutter.project_name }}"""
__version__ = '0.0.1'
| [
[
[
85,
96
]
]
] |
np.tanh(x) | [] |
import asyncio
import aioredis
async def main():
sentinel = await aioredis.create_sentinel(
["redis://localhost:26379", "redis://sentinel2:26379"]
)
redis = sentinel.master_for("mymaster")
ok = await redis.set("key", "value")
assert ok
val = await redis.get("key", encoding="utf-8")
... | [
[
[
7,
14
],
[
346,
353
]
],
[
[
22,
30
],
[
72,
80
]
],
[
[
33,
343
],
[
358,
362
]
]
] |
import logging
from .DatabaseBase import DatabaseBase
logger = logging.getLogger(__name__)
logging.basicConfig(level=logging.DEBUG)
class ImageResource(DatabaseBase):
def __init__(self):
super().__init__()
def get_product_images_by_id(self, id):
search_image_query = """Select * From images w... | [
[
[
7,
14
],
[
64,
71
],
[
92,
99
],
[
118,
125
]
],
[
[
41,
53
],
[
155,
167
]
],
[
[
55,
61
],
[
1476,
1482
]
],
[
[
141,
154
... |
"""weather_api URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/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... | [
[
[
673,
676
],
[
754,
757
],
[
862,
865
]
],
[
[
678,
685
],
[
883,
890
]
],
[
[
719,
731
],
[
765,
777
]
],
[
[
734,
745
]
]
] |
"""Utility for currying functions."""
from functools import wraps
from inspect import signature, isbuiltin, isclass
def curry(func, args=None, kwargs=None, n=None, use_defaults=False):
if use_defaults:
return CurriedDefault(func, args, kwargs, n)
return Curried(func, args, kwargs, n)
class Curried... | [
[
[
61,
66
],
[
502,
507
]
],
[
[
87,
96
],
[
2149,
2158
]
],
[
[
98,
107
],
[
2030,
2039
]
],
[
[
109,
116
],
[
2013,
2020
]
],
[
[
... |
# emacs: -*- mode: python; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*-
# ex: set sts=4 ts=4 sw=4 et:
# ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
# See COPYING file distributed along with the datalad package for the
# copyright and license terms.
#
# ## ### ### ... | [
[
[
449,
457
],
[
458,
466
]
],
[
[
774,
785
]
]
] |
# -*- coding: utf-8 -*-
'''
flask.ext.login
---------------
This module provides user session management for Flask. It lets you log
your users in and out in a database-independent manner.
:copyright: (c) 2011 by Matthew Frazier.
:license: MIT/X11, see LICENSE for more details.
'''
__version_i... | [
[
[
309,
325
],
[
368,
384
]
],
[
[
345,
356
]
],
[
[
386,
396
]
],
[
[
417,
428
]
],
[
[
441,
454
]
],
[
[
487,
494
]
],
[
[
534,
552
... |
# -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.base.exchange import Exchange
import math
class lykke (Exchange):
def describe(self):
return self.deep_extend(supe... | [
[
[
212,
220
],
[
248,
256
]
],
[
[
228,
232
],
[
5525,
5529
],
[
5692,
5696
],
[
5759,
5763
],
[
5879,
5883
],
[
5945,
5949
]
],
[
[
241,... |
from unittest import TestCase, skip
import copy
import numpy as np
from giant import rotations as at
from giant.ray_tracer import kdtree, shapes, rays
class TestKDTree(TestCase):
def setUp(self):
self.max_depth = 4
tri1 = np.array([[-5, -4, -4.5],
[0, 0, 1],
... | [
[
[
21,
29
],
[
172,
180
],
[
16294,
16302
]
],
[
[
31,
35
]
],
[
[
43,
47
],
[
5159,
5163
],
[
6455,
6459
],
[
7200,
7204
],
[
8552,
... |
#!/usr/bin/python3
from subprocess import call;
from sys import argv
from os import path
outPath = argv[1] if(len(argv)>1) else "/etc/dipicar/creds"
duration = 365
rsaLength = 4096
#Generate ssl keys
call([
"openssl",
"req",
"-x509",
"-newkey",
"rsa:"+str(rsaLength),
"-keyout", path.join... | [
[
[
43,
47
],
[
203,
207
]
],
[
[
65,
69
],
[
116,
120
],
[
101,
105
]
],
[
[
85,
89
],
[
311,
315
],
[
354,
358
]
],
[
[
91,
98... |
import requests
import os
ROOT_URL = 'http://datamall2.mytransport.sg/ltaodataservice'
def get_taxi_availability_request():
result = None
try:
url = '{}/Taxi-Availability'.format(ROOT_URL)
headers = {
'AccountKey': os.getenv('ACCOUNT_KEY'),
'Accept': 'application/json... | [
[
[
7,
15
],
[
351,
359
]
],
[
[
23,
25
],
[
255,
257
]
],
[
[
27,
35
],
[
199,
207
]
],
[
[
94,
123
]
]
] |
# The MIT License (MIT)
# Copyright (c) 2018 by EUMETSAT
#
# 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,... | [
[
[
1139,
1147
]
],
[
[
1149,
1163
]
]
] |
import re
from collections import defaultdict
from datetime import datetime
from elasticsearch_dsl import Keyword, Text
from protean import BaseAggregate, BaseValueObject
from protean.core.model import BaseModel
from protean.fields import DateTime, Integer, String
from protean.fields import Text as ProteanText
from ... | [
[
[
7,
9
],
[
1180,
1182
]
],
[
[
35,
46
],
[
1141,
1152
]
],
[
[
68,
76
],
[
556,
564
]
],
[
[
108,
115
],
[
1561,
1568
],
[
1602,
... |
# https://leetcode.com/problems/design-twitter/
#
# algorithms
# Medium (27.98%)
# Total Accepted: 37,655
# Total Submissions: 134,594
from collections import defaultdict
from bisect import insort
class Twitter(object):
def __init__(self):
"""
Initialize your data structure here.
"""... | [
[
[
164,
175
],
[
347,
358
],
[
400,
411
],
[
451,
462
],
[
504,
515
]
],
[
[
195,
201
],
[
853,
859
],
[
918,
924
],
[
2126,
2132
]... |
from const import result
import random
C, D = True, False
def opponent(r):
if r == result.COOP or r == result.DEFECT:
return True
return False
# tit for tat
class Tft:
def __init__(self) -> None:
self.score = 0
self.last_reaction = C
def run(self):
return self.last_... | [
[
[
18,
24
],
[
90,
96
],
[
110,
116
]
],
[
[
32,
38
],
[
1608,
1614
],
[
3477,
3483
]
],
[
[
41,
42
],
[
273,
274
],
[
477,
478
... |
import os
import pytest
import sys
import numpy as np
import shutil
import subprocess
try:
import pymake
except:
msg = "Error. Pymake package is not available.\n"
msg += "Try installing using the following command:\n"
msg += " pip install https://github.com/modflowpy/pymake/zipball/master"
raise Ex... | [
[
[
7,
9
],
[
560,
562
],
[
644,
646
],
[
675,
677
],
[
8277,
8279
],
[
7180,
7182
],
[
7787,
7789
]
],
[
[
17,
23
]
],
[
[
31,
34
... |
import numpy as np
# Read scec input file
fid = open("tpv29_tpv30_geometry_25m_data.txt")
line = fid.readline()
line = fid.readline()
header = [float(a) for a in line.split()]
nx, ny, lx, ly = header
roughness = np.loadtxt(fid)
roughness = roughness[:, 4]
fid.close()
# create x and y vectors
x = np.linspace(-lx / 2, ... | [
[
[
7,
18
],
[
213,
215
],
[
299,
301
],
[
345,
347
],
[
473,
475
],
[
503,
505
],
[
533,
535
]
],
[
[
43,
46
],
[
98,
101
],
[
... |
import pytest
from ebonite.client import Ebonite
from tests.client.conftest import create_client_hooks
@pytest.fixture
def inmemory_ebnt():
ebnt = Ebonite.inmemory()
yield ebnt
pytest_runtest_protocol, pytest_collect_file = create_client_hooks(inmemory_ebnt, 'inmemory')
| [
[
[
7,
13
],
[
107,
113
]
],
[
[
42,
49
],
[
154,
161
]
],
[
[
84,
103
],
[
237,
256
]
],
[
[
126,
139
],
[
257,
270
]
],
[
[
190,... |
"""
example1.py
"A simple example how to use the CubeSat-Power-Estimation tool."
@author: Johan Monster (https://github.com/Hans-Bananendans/)
"""
# Import packages
import numpy as np
import pandas as pd
from mission import Mission
# Defining the config
config = {
"years_passed" : 0, # How many [years] the sat... | [
[
[
175,
186
],
[
2814,
2816
],
[
2843,
2845
]
],
[
[
194,
206
],
[
2689,
2691
]
],
[
[
228,
235
],
[
2902,
2909
]
],
[
[
259,
265
],
[
... |
from __future__ import annotations
from coredis.response.callbacks import (
DictCallback,
ResponseCallback,
SimpleStringCallback,
)
from coredis.response.utils import flat_pairs_to_dict
from coredis.typing import Any, AnyStr, Mapping, Tuple, Union
class ACLLogCallback(ResponseCallback):
def transform... | [
[
[
23,
34
]
],
[
[
81,
93
],
[
566,
578
]
],
[
[
99,
115
],
[
284,
300
]
],
[
[
121,
141
],
[
477,
497
]
],
[
[
180,
198
],
[
598... |
from tensornetwork.network_components import Node, CopyNode, Edge
_COMPONENTS = {
"Node": Node,
"CopyNode": CopyNode,
"Edge": Edge,
}
def get_component(name):
if name not in _COMPONENTS:
raise ValueError("Component {} does not exist".format(name))
return _COMPONENTS[name]
| [
[
[
45,
49
],
[
96,
100
]
],
[
[
51,
59
],
[
118,
126
]
],
[
[
61,
65
],
[
140,
144
]
],
[
[
68,
79
],
[
192,
203
],
[
279,
290
... |
from .util import BitFormat
from . import packet
__all__ = ('ImageF0', 'ImageF1', 'ImageF2')
class ImageMessage:
def __repr__(self):
return '<Image Segment>'
class ImageF0(packet.Packet):
"""Image data
.. py:attribute:: segment_length
.. py:attribute:: iph
.. py:attribute:: sum
... | [
[
[
19,
28
],
[
609,
618
],
[
1859,
1868
],
[
2982,
2991
],
[
1024,
1033
],
[
2410,
2419
],
[
3533,
3542
]
],
[
[
43,
49
],
[
192,
198
... |
from SDWLE.cards.base import HeroCard
from SDWLE.constants import CHARACTER_CLASS, MINION_TYPE
from SDWLE.powers import MagePower, DruidPower, HunterPower, PaladinPower, PriestPower, RoguePower,\
ShamanPower, WarlockPower, WarriorPower, JaraxxusPower, DieInsect
class Malfurion(HeroCard):
def __init__(self):
... | [
[
[
29,
37
],
[
284,
292
],
[
421,
429
],
[
546,
554
],
[
677,
685
],
[
821,
829
],
[
954,
962
],
[
1089,
1097
],
[
1215,
1223
],
[
... |
# Cooccurrence matrix construction tools
# for fitting the GloVe model.
import numpy as np
try:
# Python 2 compat
import cPickle as pickle
except ImportError:
import pickle
from .corpus_cython import construct_cooccurrence_matrix
class Corpus(object):
"""
Class for constructing a cooccurrence mat... | [
[
[
79,
90
],
[
834,
836
],
[
1043,
1045
]
],
[
[
129,
146
],
[
2312,
2318
],
[
2423,
2429
],
[
2620,
2626
]
],
[
[
178,
184
],
[
2312,
... |
r"""Compute action detection performance for the AVA dataset.
Please send any questions about this code to the Google Group ava-dataset-users:
https://groups.google.com/forum/#!forum/ava-dataset-users
Example usage:
python -O get_ava_performance.py \
-l ava/ava_action_list_v2.1_for_activitynet_2018.pbtxt.txt \
-g... | [
[
[
434,
449
]
],
[
[
473,
481
]
],
[
[
505,
519
]
],
[
[
528,
536
],
[
7223,
7231
],
[
7361,
7369
],
[
7627,
7635
],
[
7852,
7860
],
[
... |
from __future__ import absolute_import
# This will make sure the app is always imported when
# Django starts so that shared_task will use this app.
from .celery import app as celery_app
| [
[
[
23,
38
]
],
[
[
173,
190
]
]
] |
import logging
import asyncio
from asyncio import CancelledError
from aiohttp import ClientSession, WSMsgType, ClientTimeout, WSServerHandshakeError
import json
import datetime
import traceback
import typing
from .const import (
LOGIN_URL,
DEX_URL,
Guid
)
from .space import NoonSpace
from .line import NoonL... | [
[
[
7,
14
],
[
522,
529
]
],
[
[
22,
29
],
[
4227,
4234
]
],
[
[
50,
64
],
[
6451,
6465
]
],
[
[
85,
98
],
[
1001,
1014
]
],
[
[
1... |
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
# Modified by BaseDetection, Inc. and its affiliates. All Rights Reserved
"""
Detection Training Script.
This scripts reads a given config file and runs the training or evaluation.
It is an entry point that is made to train standard models in cvpod... | [
[
[
797,
804
],
[
2357,
2364
]
],
[
[
812,
814
],
[
2669,
2671
],
[
3758,
3760
],
[
4476,
4478
],
[
4547,
4549
]
],
[
[
822,
835
],
[
5331... |
# Generated by Django 3.2.3 on 2021-05-17 16:22
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('core', '0072_alter_product_region'),
]
operations = [
migrations.RenameField(
model_name='product',
old_name='name_lt',
... | [
[
[
71,
81
],
[
100,
110
],
[
226,
236
]
],
[
[
90,
99
]
]
] |
__author__ = 'Alexandre Calil Martins Fonseca, github: xandao6'
# region TUTORIAL
'''
Go to region 'FOR SCRIPTING' and use the methods in your script!
EXAMPLE OF USAGE:
from wplay.pyppeteerUtils import pyppeteerConfig as pypConfig
from wplay.pyppeteerUtils import pyppeteerSearch as pypSearch
async def my_script(tar... | [
[
[
0,
10
]
],
[
[
795,
818
],
[
4515,
4538
],
[
4680,
4703
],
[
5034,
5057
],
[
5576,
5599
],
[
6336,
6359
],
[
7137,
7160
],
[
7270,
7... |
def beg(arr):
a = []
b = []
c = []
for i in arr:
if i == 0:
a.append(i)
if i == 1:
b.append(i)
if i == 2:
c.append(i)
return a+b+c
a = []
b = [0,0,0]
c = [1,2,1,1,2,1,2]
d = [0,2,1,0,1,0,2,2,2,1,0,2,1,0,1,2,0]
print(beg(a))
print(beg(b)... | [
[
[
4,
7
],
[
300,
303
],
[
314,
317
],
[
328,
331
],
[
342,
345
]
],
[
[
214,
215
],
[
304,
305
]
],
[
[
221,
222
],
[
318,
319
... |
from django.apps import AppConfig
class MasterAppConfig(AppConfig):
name = 'msa.contrib.master'
verbose_name = 'Master Service'
| [
[
[
24,
33
],
[
58,
67
]
],
[
[
42,
57
]
]
] |
import importlib
import json
import os
import shutil
import subprocess
from pathlib import Path
from shutil import which
from typing import List, Optional, Tuple
from setuptools import find_packages
from typer import Argument, Option, Typer
from .paths import (
GLOBAL_APP_DIR,
GLOBAL_EXTENSIONS_DIR,
GLOBA... | [
[
[
7,
16
],
[
7699,
7708
],
[
8073,
8082
]
],
[
[
24,
28
],
[
5074,
5078
],
[
6692,
6696
]
],
[
[
36,
38
],
[
1835,
1837
],
[
2588,
... |
from socorepo.locators import github_tags, nexus3, pypi
LOCATOR_PARSERS = {
"github_tags": github_tags.parse_locator,
"nexus3": nexus3.parse_locator,
"pypi": pypi.parse_locator
}
| [
[
[
30,
41
],
[
96,
107
]
],
[
[
43,
49
],
[
137,
143
]
],
[
[
51,
55
],
[
171,
175
]
],
[
[
57,
72
]
]
] |
from flask import Flask, render_template, request
import json
import requests
app = Flask(__name__)
@app.route('/')
def stop_words():
URL_prefix = 'https://api.github.com/search/code?q='
URL_suffix = '+repo:spotify/mkdocs-monorepo-plugin/docs'
reportfile = open('./templates/stopWordsSearch.html', 'w')
... | [
[
[
18,
23
],
[
85,
90
]
],
[
[
25,
40
],
[
3774,
3789
]
],
[
[
42,
49
]
],
[
[
57,
61
],
[
1919,
1923
],
[
1930,
1934
]
],
[
[
69... |
from django.apps import apps
from django.db import DEFAULT_DB_ALIAS, router
from django.db.models import signals
from django.utils.encoding import smart_text
from django.utils import six
from django.utils.six.moves import input
def update_contenttypes(app_config, verbosity=2, interactive=True, using=DEFAULT_DB_ALIAS,... | [
[
[
24,
28
],
[
562,
566
],
[
2731,
2735
]
],
[
[
51,
67
],
[
303,
319
]
],
[
[
69,
75
],
[
659,
665
]
],
[
[
105,
112
],
[
2807,
... |
#!/usr/bin/env python3
# Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
fro... | [
[
[
348,
360
],
[
700,
712
]
],
[
[
405,
417
],
[
2685,
2697
]
],
[
[
443,
459
],
[
3970,
3986
]
],
[
[
461,
480
],
[
3337,
3356
]
],
[
... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Logistic Regression Gradient Descent
"""
import numpy as np
class LogisticRegressionGD(object):
"""Logistic Regression Classifier using gradient descent.
Parameters
------------
eta : float
Learning rate (between 0.0 and 1.0)
n_iter :... | [
[
[
100,
111
],
[
1261,
1263
],
[
1857,
1859
],
[
1912,
1914
],
[
2076,
2078
],
[
2226,
2228
],
[
2234,
2236
],
[
2357,
2359
]
],
[
[
119,
... |
# -*- 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
#... | [
[
[
902,
910
],
[
1011,
1019
]
],
[
[
992,
1001
]
]
] |
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Tiling(_BaseTraceHierarchyType):
# flip
# ----
@property
def flip(self):
"""
Determines if the positions obtained from solver are flipped on
each axis.
Th... | [
[
[
33,
82
],
[
119,
142
]
],
[
[
90,
103
]
],
[
[
112,
118
],
[
5737,
5743
]
],
[
[
7558,
7607
],
[
7646,
7669
]
],
[
[
7615,
7628
]
],
... |
from django.conf.urls import url,include
from django.contrib import admin
from django.contrib.auth import views
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'',include('instagram.urls')),
url(r'^accounts/', include('registration.backends.simple.urls')),
url(r'^logout/$', views.logout, {"next... | [
[
[
29,
32
],
[
134,
137
],
[
172,
175
],
[
212,
215
],
[
282,
285
]
],
[
[
33,
40
],
[
180,
187
],
[
231,
238
]
],
[
[
68,
73
]... |
import chainer
from chainer import training
from chainer.training import extensions
from chainer.datasets import TupleDataset
from chainer import Chain
from chainer import links as L
from chainer import functions as F
from chainer import reporter
from chainer import cuda
import numpy as np
def dot(a, b):
""" Sim... | [
[
[
7,
14
],
[
9049,
9056
],
[
9132,
9139
],
[
9230,
9237
],
[
9298,
9305
],
[
10461,
10468
]
],
[
[
35,
43
],
[
9442,
9450
],
[
9519,
9... |
import json
from pathlib import Path
from typing import Optional
import typer
from . import utils
from .utils import example
from .utils.iohelper import AltTemporaryDirectory
@example()
def check(
project_dir: Path = Path("."), checkout: Optional[str] = None, strict: bool = True
) -> bool:
"""Checks to see ... | [
[
[
7,
11
],
[
493,
497
]
],
[
[
32,
36
],
[
225,
229
],
[
218,
222
],
[
695,
699
]
],
[
[
56,
64
],
[
246,
254
]
],
[
[
73,
78
... |
"""Test zha switch."""
from unittest.mock import call, patch
import pytest
import zigpy.zcl.clusters.general as general
import zigpy.zcl.foundation as zcl_f
from homeassistant.components.switch import DOMAIN
from homeassistant.const import STATE_OFF, STATE_ON, STATE_UNAVAILABLE
from .common import (
async_enable... | [
[
[
49,
53
],
[
2315,
2319
],
[
2785,
2789
]
],
[
[
55,
60
],
[
1960,
1965
],
[
2428,
2433
]
],
[
[
69,
75
],
[
448,
454
]
],
[
[
83,
... |
"""
This file contains all routes for the /search API
"""
from sanic import Blueprint
from sanic.response import HTTPResponse
from dp4py_sanic.api.response.json_response import json
from dp_conceptual_search.config import CONFIG
from dp_conceptual_search.api.request import ONSRequest
from dp_conceptual_search.ons.sea... | [
[
[
76,
85
],
[
686,
695
]
],
[
[
113,
125
],
[
864,
876
],
[
1398,
1410
],
[
1991,
2003
],
[
2631,
2643
],
[
3281,
3293
]
],
[
[
178,
... |
# -*- coding: UTF-8 -*-
from common_utils.new_log import NewLog
class LogDecorator:
log = NewLog(__name__)
logger = log.get_log()
def __call__(self, func):
def wrapper(*args, **kw):
self.logger.debug("call method %s ===============" % func.__name__)
self.logger.debug("me... | [
[
[
58,
64
],
[
98,
104
]
],
[
[
73,
85
]
]
] |
# -*- coding: utf-8 -*-
'''
Covenant Add-on
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 the License, or
(at your option) any later version.
... | [
[
[
733,
735
],
[
1976,
1978
],
[
2787,
2789
],
[
2906,
2908
],
[
3194,
3196
],
[
3331,
3333
],
[
4506,
4508
],
[
4719,
4721
]
],
[
[
736,
... |
"""Helper functions for the distribution."""
import importlib
import json
import pathlib
import subprocess
import sys
import types
import os
from typing import Optional, List
import requests
import repobee_plug as plug
import _repobee.ext
from _repobee import distinfo
from _repobee import plugin
class DependencyRe... | [
[
[
52,
61
],
[
3512,
3521
]
],
[
[
69,
73
],
[
1162,
1166
],
[
1795,
1799
]
],
[
[
81,
88
],
[
457,
464
],
[
690,
697
],
[
1046,
10... |
from pyspark import SparkConf, SparkContext
import collections
conf = SparkConf().setMaster("local").setAppName("RatingsHistogram")
sc = SparkContext(conf = conf)
lines = sc.textFile("D:/celebal/resources/ml-100k/u.data")
ratings = lines.map(lambda x: x.split()[2])
result = ratings.countByValue()
sortedResults = col... | [
[
[
20,
29
],
[
71,
80
]
],
[
[
31,
43
],
[
138,
150
]
],
[
[
51,
62
],
[
317,
328
]
],
[
[
64,
68
],
[
158,
162
]
],
[
[
133,
... |
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
# vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8:
# Author: Binux<i@binux.me>
# http://binux.me
# Created on 2014-02-08 22:37:13
import os
import time
import shutil
import unittest2 as unittest
import logging
import logging.config
logging.config.fileConfig("pyspid... | [
[
[
192,
194
],
[
3643,
3645
]
],
[
[
202,
206
],
[
706,
710
],
[
762,
766
],
[
1500,
1504
],
[
1764,
1768
],
[
2680,
2684
],
[
2818,
28... |
from django.db import models
from django.contrib.auth.models import AbstractBaseUser
from django.contrib.auth.models import PermissionsMixin
from django.contrib.auth.models import BaseUserManager
from django.conf import settings
class UserProfileManager(BaseUserManager):
"""Manager for user profiles"""
def c... | [
[
[
22,
28
],
[
1089,
1095
],
[
1147,
1153
],
[
1196,
1202
],
[
1245,
1251
],
[
1699,
1705
],
[
1765,
1771
],
[
1836,
1842
],
[
1875,
1881
... |
"""
factor.py
"""
from functools import wraps
from operator import attrgetter
from numbers import Number
from numpy import inf, where
from toolz import curry
from zipline.errors import UnknownRankMethod
from zipline.lib.normalize import naive_grouped_rowwise_apply
from zipline.lib.rank import masked_rankdata_2d
from ... | [
[
[
40,
45
],
[
1891,
1896
]
],
[
[
67,
77
],
[
4387,
4397
]
],
[
[
98,
104
],
[
1958,
1964
],
[
6096,
6102
],
[
7601,
7607
]
],
[
[
1... |
#!/usr/bin/env python
# Copyright 2019 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 or ... | [
[
[
654,
662
],
[
1505,
1513
],
[
1583,
1591
]
],
[
[
716,
738
],
[
1880,
1902
]
],
[
[
1496,
1502
],
[
1625,
1631
],
[
1693,
1699
],
[
17... |
"""Polygons and their linear ring components
"""
from ctypes import c_double, c_void_p, cast, POINTER
from ctypes import ArgumentError
import weakref
from shapely.algorithms.cga import signed_area
from shapely.coords import required
from shapely.geos import lgeos
from shapely.geometry.base import BaseGeometry
from sh... | [
[
[
69,
77
],
[
9462,
9470
]
],
[
[
79,
87
],
[
13138,
13146
],
[
13335,
13343
],
[
13392,
13400
],
[
13505,
13513
]
],
[
[
89,
93
],
[
94... |
x=2
print(x == 2)
print(x == 3)
print(x<3)
#Boolean operators
name = "John"
age = 23
if name == "John" and age == 23:
print("Your name is John, and you are also 23 years old.")
if name == "John" or name == "Rick":
print("Your name is either John or Rick.")
# in operator
#The "in" operator co... | [
[
[
0,
1
],
[
11,
12
],
[
26,
27
],
[
41,
42
]
],
[
[
71,
75
],
[
99,
103
],
[
199,
203
],
[
217,
221
],
[
453,
457
]
],
[
[... |
from . import Base
from sqlalchemy import Column, Integer, Text, DateTime, ForeignKey
from datetime import datetime
class Chapter(Base):
__tablename__ = "chapters"
id = Column(Integer, primary_key=True, autoincrement=True)
manga_id = Column(Integer, ForeignKey("manga.id"))
chapter_no = Column(Integer)... | [
[
[
14,
18
],
[
131,
135
]
],
[
[
42,
48
],
[
179,
185
],
[
248,
254
],
[
305,
311
],
[
343,
349
],
[
370,
376
],
[
403,
409
],
... |
from systems.plugins.index import BaseProvider
import re
import shlex
class Provider(BaseProvider('task', 'command')):
def execute(self, results, params):
env = self._env_vars(params)
stdin = params.pop('input', self.field_input)
cwd = params.pop('cwd', self.field_cwd)
display = ... | [
[
[
34,
46
],
[
88,
100
]
],
[
[
55,
57
]
],
[
[
65,
70
],
[
654,
659
]
],
[
[
79,
87
]
]
] |
"""
Tests for `kolibri.utils.cli` module.
"""
from __future__ import absolute_import
from __future__ import print_function
import logging
import os
import tempfile
import pytest
from django.db.utils import OperationalError
from mock import patch
import kolibri
from kolibri.plugins.utils import autoremove_unavailable... | [
[
[
69,
84
]
],
[
[
108,
122
]
],
[
[
131,
138
],
[
403,
410
],
[
988,
995
],
[
1013,
1020
],
[
1073,
1080
]
],
[
[
146,
148
],
[
5459... |
class Person:
name='zhangsan'
age=20
p = Person()
print(p) # <__main__.Person object at 0x10073e668>
print('⭐️ ' * 20)
class Stu:
name='zhangsan'
age=20
def __str__(self):
return "name: %s; age: %d"%(self.name, self.age)
s = Stu()
print(s) # name: zhangsan; age: 20 | [
[
[
6,
12
],
[
46,
52
]
],
[
[
42,
43
],
[
61,
62
]
],
[
[
132,
135
],
[
244,
247
]
],
[
[
240,
241
],
[
256,
257
]
]
] |
""" Define the sublayers in encoder/decoder layer """
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
class ScaledDotProductAttention(nn.Module):
""" Scaled Dot-Product Attention """
def __init__(self, temperature, attn_dropout=0.1):
super().__init__()
se... | [
[
[
61,
72
]
],
[
[
80,
85
],
[
451,
456
],
[
647,
652
]
],
[
[
93,
107
],
[
174,
176
],
[
725,
727
],
[
2546,
2548
],
[
966,
968
... |
'''Standard challenge module.'''
import os
import shutil
import fcntl
from cffi import FFI
from tornado import gen, concurrent, process
from tornado.stack_context import StackContext
from tornado.ioloop import IOLoop
import PyExt
import Privilege
import Config
from Utils import FileUtils
STATUS_NONE = 0
STATUS_AC = ... | [
[
[
41,
43
],
[
1656,
1658
],
[
1850,
1852
],
[
2417,
2419
],
[
2438,
2440
],
[
2450,
2452
],
[
5864,
5866
],
[
5952,
5954
],
[
5968,
5970
... |
n, m = map(int, input().split())
l = list(map(int, input().split()))
l.sort()
mini = l[m-1] - l[0]
for i in range(m-n+1):
mini = min(mini, l[i+n-1]-l[i])
print(mini)
| [
[
[
0,
1
],
[
116,
117
],
[
147,
148
]
],
[
[
3,
4
],
[
87,
88
],
[
114,
115
]
],
[
[
33,
34
],
[
69,
70
],
[
85,
86
],
[
... |
# global
from typing import Union, Optional, Tuple, Literal
from collections import namedtuple
# local
import ivy
from ivy.framework_handler import current_framework as _cur_framework
inf = float('inf')
# Array API Standard #
# -------------------#
def matrix_transpose(x: Union[ivy.Array, ivy.NativeArray])\
... | [
[
[
28,
33
],
[
277,
282
],
[
851,
856
],
[
917,
922
],
[
1010,
1015
],
[
4593,
4598
],
[
4531,
4536
],
[
9399,
9404
],
[
9450,
9455
],
... |
from django.contrib.postgres.fields import JSONField
from django.db import models
from surfsara.models.permission import Permission
class Task(models.Model):
RUNNING = "running"
SUCCESS = "success"
ERROR = "error"
OUTPUT_RELEASED = "output_released"
RELEASE_REJECTED = "release_rejected"
TASK_... | [
[
[
43,
52
],
[
649,
658
]
],
[
[
75,
81
],
[
145,
151
],
[
527,
533
],
[
574,
580
],
[
689,
695
],
[
730,
736
],
[
766,
772
],
... |
# Author: Tom Dupre la Tour
# Joan Massich <mailsik@gmail.com>
#
# License: BSD 3 clause
import numpy as np
import pytest
import scipy.sparse as sp
from numpy.testing import assert_array_equal
from sklearn.utils._seq_dataset import (
ArrayDataset32, ArrayDataset64, CSRDataset32, CSRDataset64)
from sklearn... | [
[
[
105,
116
],
[
441,
443
],
[
478,
480
],
[
537,
539
],
[
563,
565
],
[
599,
601
],
[
636,
638
],
[
695,
697
],
[
721,
723
],
[
... |
#!/usr/bin/env python
# -*- coding:utf-8 -*-
# bug-report: feilengcui008@gmail.com
""" api for docker registry """
import urllib2
import urllib
import json
import base64
class RegistryException(Exception):
""" registry api related exception """
pass
class RegistryApi(object):
""" interact with docker ... | [
[
[
124,
131
],
[
1102,
1109
],
[
1152,
1159
],
[
1639,
1646
],
[
1770,
1777
],
[
2271,
2278
],
[
2398,
2405
],
[
2856,
2863
],
[
2983,
2990... |
#!/usr/bin/env python3
#
# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | [
[
[
801,
809
],
[
1275,
1283
]
],
[
[
817,
827
],
[
1050,
1060
]
],
[
[
862,
877
],
[
1914,
1929
]
],
[
[
908,
928
],
[
1930,
1950
],
[
... |
#
# Copyright (c) 2016-2021 Deephaven Data Labs and Patent Pending
#
""" This module provides access to the Deephaven server configuration. """
import jpy
from deephaven import DHError
from deephaven.time import TimeZone
_JDHConfig = jpy.get_type("io.deephaven.configuration.Configuration")
_JDateTimeZone = jpy.get_... | [
[
[
153,
156
],
[
238,
241
],
[
312,
315
]
],
[
[
180,
187
],
[
533,
540
],
[
1016,
1023
]
],
[
[
215,
223
],
[
627,
635
],
[
802,
8... |
import torch
from torch import nn, optim, multiprocessing
from torch.utils.data import DataLoader
from torch.utils.tensorboard.writer import SummaryWriter
from tqdm import tqdm
from time import time
from collections import defaultdict
from utils.run_utils import get_logger
from utils.train_utils import CheckpointMan... | [
[
[
7,
12
],
[
6403,
6408
],
[
7489,
7494
],
[
8577,
8582
],
[
16427,
16432
],
[
16471,
16476
],
[
16855,
16860
],
[
16920,
16925
],
[
17000,
... |
from nodes import *
from tokens import Token, TokenType
class Interpreter:
def __init__(self, ast):
self.ast = ast
def eval(self):
return self.evalHelper(self.ast)
def evalHelper(self, ast):
if isinstance(ast, NumberNode):
return ast.node
elif isinstance(ast, ... | [
[
[
18,
19
],
[
250,
260
],
[
320,
327
],
[
436,
448
],
[
557,
569
],
[
678,
688
],
[
918,
928
],
[
1158,
1167
],
[
1277,
1289
],
[
... |
import hashlib
import json
import os
import boto3
from .retry import retry_on_aws_too_many_requests
batch = boto3.client('batch')
class JobDefinition:
@classmethod
def clear_all(cls):
deleted_count = 0
for jobdef in batch.describe_job_definitions(status='ACTIVE')['jobDefinitions']:
... | [
[
[
7,
14
],
[
3499,
3506
]
],
[
[
22,
26
],
[
2687,
2691
]
],
[
[
34,
36
],
[
557,
559
]
],
[
[
45,
50
],
[
111,
116
]
],
[
[
71,... |
n = int(input())
total_sum = 0
for i in range(1,n+1):
letter = input()
total_sum += ord(letter)
print(f"The sum equals: {total_sum}") | [
[
[
0,
1
],
[
50,
51
]
],
[
[
18,
27
],
[
81,
90
],
[
131,
140
]
],
[
[
37,
38
]
],
[
[
60,
66
],
[
98,
104
]
]
] |
# -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.base.exchange import Exchange
import hashlib
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import PermissionDe... | [
[
[
212,
220
],
[
640,
648
]
],
[
[
228,
235
],
[
24071,
24078
]
],
[
[
265,
278
],
[
20474,
20487
],
[
20602,
20615
],
[
24902,
24915
]
],
[
... |
# -*- coding: utf-8 -*-
"""
Created on Wed Oct 23 14:16:27 2013
@author: Lucio
Program for assessing the memory footprint of the simulation. Needs the
memory_profiler module (installed on the milano cluster).
"""
import os
import time
import sys
import simpactpurple
from memory_profiler import profile
@profile
de... | [
[
[
225,
227
]
],
[
[
235,
239
]
],
[
[
247,
250
],
[
1281,
1284
]
],
[
[
258,
271
],
[
347,
360
]
],
[
[
300,
307
],
[
310,
317
]
],
[
... |
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | [
[
[
656,
670
]
],
[
[
678,
689
],
[
56275,
56277
],
[
56284,
56286
],
[
56313,
56315
],
[
56322,
56324
],
[
56394,
56396
],
[
56403,
56405
],
[
... |
# -*- coding: utf-8 -*-
from airtest.utils.logger import get_logger
from airtest.utils.safesocket import SafeSocket
from airtest.utils.nbsp import NonBlockingStreamReader
from airtest.utils.snippet import on_method_ready, reg_cleanup
from airtest.core.android.yosemite import Yosemite
import struct
LOGGING = get_logger(... | [
[
[
57,
67
],
[
309,
319
]
],
[
[
105,
115
],
[
2136,
2146
]
],
[
[
147,
170
],
[
1436,
1459
]
],
[
[
205,
220
],
[
726,
741
]
],
[
[
... |
#
# @lc app=leetcode id=447 lang=python
#
# [447] Number of Boomerangs
#
# https://leetcode.com/problems/number-of-boomerangs/description/
#
# algorithms
# Easy (49.20%)
# Likes: 296
# Dislikes: 447
# Total Accepted: 54.7K
# Total Submissions: 109.6K
# Testcase Example: '[[0,0],[1,0],[2,0]]'
#
# Given n points i... | [
[
[
849,
853
]
],
[
[
862,
870
]
]
] |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from conans import ConanFile, CMake, tools
import os
import shutil
class LibtiffConan(ConanFile):
name = "libtiff"
description = "Library for Tag Image File Format (TIFF)"
url = "https://github.com/conan-io/conan-center-index"
author = "Bincrafters <bincr... | [
[
[
66,
75
],
[
135,
144
]
],
[
[
77,
82
],
[
1449,
1454
]
],
[
[
84,
89
],
[
1021,
1026
],
[
1959,
1964
],
[
2435,
2440
],
[
2807,
... |
#! /usr/bin/env python3
#Copyright 2018 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
#Unless required by applicable law or agreed... | [
[
[
595,
601
],
[
1652,
1658
]
],
[
[
607,
618
]
]
] |
import re
from typing import Any, List, Match, Optional
from markdown import Markdown
from markdown.extensions import Extension
from markdown.preprocessors import Preprocessor
from zerver.lib.markdown.preprocessor_priorities import PREPROCESSOR_PRIORITES
# There is a lot of duplicated code between this file and
# he... | [
[
[
7,
9
],
[
422,
424
]
],
[
[
29,
32
],
[
3913,
3916
],
[
3928,
3931
]
],
[
[
34,
38
],
[
2850,
2854
],
[
2836,
2840
]
],
[
[
40,
... |
import math
class Robo:
def __init__(self,nome):
self.__nome = nome
self.__posicao = [0.0,0.0]
self.__em_op = False
@property
def nome(self):
return self.__nome
@nome.setter
def nome(self, alterar_nome):
self.__nome = alterar_nome
@property
def... | [
[
[
7,
11
],
[
548,
552
]
],
[
[
19,
23
],
[
868,
872
]
],
[
[
719,
736
],
[
1191,
1208
]
],
[
[
1185,
1188
],
[
1238,
1241
],
[
1263,... |
# from JumpScale.baselib.codeexecutor.CodeExecutor import CodeExecutor
import inspect
from JumpScale import j
from ClassBase import ClassBase, JSModelBase, JSRootModelBase
from TemplateEngineWrapper import TemplateEngineWrapper
from JumpScale.data.regex.RegexTools import RegexTools
from TextFileEditor import TextFile... | [
[
[
79,
86
],
[
3227,
3234
],
[
3312,
3319
]
],
[
[
109,
110
],
[
3578,
3579
],
[
4633,
4634
],
[
5601,
5602
],
[
9350,
9351
],
[
9837,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.