code
stringlengths
10
805k
def_use_chains
listlengths
0
667
#!/usr/bin/env python from __future__ import print_function from optparse import OptionParser import os import sys class ReadsSplitter: def __init__(self): self.options = None self.files_to_split = [] self.getOptions() def go(self): for fn in self.files_to_split: ...
[ [ [ 45, 59 ] ], [ [ 81, 93 ], [ 383, 395 ] ], [ [ 101, 103 ], [ 856, 858 ], [ 1079, 1081 ], [ 1320, 1322 ], [ 1403, 1405 ], [ 2951, ...
# -*- coding: utf-8 -*- ''' Copyright (c) 2019 Colin Curtain 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, mer...
[ [ [ 1212, 1221 ], [ 1897, 1906 ], [ 6315, 6324 ], [ 1803, 1812 ], [ 2594, 2603 ] ], [ [ 1223, 1229 ], [ 2749, 2755 ] ], [ [ 1237, 1239 ], [ ...
# coding: utf-8 """ LUSID API FINBOURNE Technology # noqa: E501 The version of the OpenAPI document: 0.11.2342 Contact: info@finbourne.com Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six class ResourceListOfPortfolio(object): """NOTE: Thi...
[ [ [ 221, 227 ], [ 4315, 4321 ] ], [ [ 235, 237 ] ], [ [ 260, 263 ], [ 3511, 3514 ] ], [ [ 271, 294 ], [ 4555, 4578 ] ] ]
# (C) British Crown Copyright 2018, Met Office # # This file is part of cartopy. # # cartopy is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 3 of the License, or # (at your option) any la...
[ [ [ 795, 810 ] ], [ [ 812, 820 ] ], [ [ 822, 836 ] ], [ [ 846, 857 ], [ 1517, 1519 ], [ 1609, 1611 ], [ 1990, 1992 ], [ 2082, 2084 ], [ ...
import numpy as np import pyqtgraph as pg from datetime import datetime, timedelta from vnpy.trader.constant import Interval, Direction, Offset from vnpy.trader.engine import MainEngine from vnpy.trader.ui import QtCore, QtWidgets, QtGui from vnpy.trader.ui.widget import BaseMonitor, BaseCell, DirectionCell, EnumCell ...
[ [ [ 7, 18 ], [ 23757, 23759 ] ], [ [ 26, 41 ], [ 20685, 20687 ], [ 23883, 23885 ], [ 20903, 20905 ], [ 21680, 21682 ], [ 21954, 21956 ], [ 220...
# # @lc app=leetcode id=677 lang=python3 # # [677] Map Sum Pairs # https://leetcode.com/problems/map-sum-pairs/ # This problem is about the trie data structure. Each node keeps track of the sum of its children. # A new key overrides the original values. # import unittest from typing import Dict # @lc code=s...
[ [ [ 271, 279 ], [ 1526, 1534 ], [ 1975, 1983 ] ], [ [ 300, 304 ], [ 427, 431 ], [ 625, 629 ] ], [ [ 332, 336 ], [ 437, 441 ], [ 598, ...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __a...
[ [ [ 176, 184 ] ], [ [ 192, 198 ] ], [ [ 206, 220 ], [ 434, 440 ], [ 1934, 1940 ], [ 2194, 2200 ], [ 2443, 2449 ], [ 2613, 2619 ], [ 2754, ...
__author__ = 'Niklas Rosenstein <rosensteinniklas@gmail.com>' __version__ = '1.7.6' import copy import glob import os import pkgutil import sys import traceback import typing as t import zipfile if t.TYPE_CHECKING: from sys import _MetaPathFinder def is_local(filename: str, pathlist: t.List[str]) -> bool: ''' ...
[ [ [ 1, 11 ] ], [ [ 63, 74 ] ], [ [ 93, 97 ], [ 5455, 5459 ], [ 7245, 7249 ] ], [ [ 105, 109 ], [ 4761, 4765 ], [ 5142, 5146 ] ], [ [ ...
import numpy as np import h5py import pandas as pd from svhn_io import load_svhn from keras_uncertainty.utils import classifier_calibration_curve, classifier_calibration_error EPSILON = 1e-10 def load_hdf5_data(filename): inp = h5py.File(filename, "r") preds = inp["preds"][...] inp.close() return p...
[ [ [ 7, 18 ], [ 873, 875 ], [ 914, 916 ] ], [ [ 26, 30 ], [ 235, 239 ] ], [ [ 38, 50 ], [ 1255, 1257 ] ], [ [ 72, 81 ], [ 741, 75...
from unittest import TestCase from rockaway.models import Track class TestTrackBasics(TestCase): def test_track_create_no_args(self): track = Track() self.assertFalse(track.hasDbEntry()) self.assertFalse(track.hasFile()) def test_track_create(self): args = {"Title": "Rockaw...
[ [ [ 21, 29 ], [ 88, 96 ] ], [ [ 59, 64 ], [ 158, 163 ], [ 583, 588 ] ], [ [ 72, 87 ] ] ]
""" Implementation of functions in the Numpy package. """ import math import sys import itertools from collections import namedtuple from llvmlite.llvmpy import core as lc import numpy as np import operator from . import builtins, callconv, ufunc_db, arrayobj from .imputils import Registry, impl_ret_new_ref, force...
[ [ [ 67, 71 ] ], [ [ 79, 82 ] ], [ [ 90, 99 ] ], [ [ 124, 134 ], [ 2711, 2721 ], [ 3899, 3909 ] ], [ [ 164, 174 ], [ 2220, 2222 ], [ ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup, find_packages import os import re def get_version(package): """ Return package version as listed in `__version__` in `init.py`. """ init_py = open(os.path.join(package, '__init__.py')).read() return re.match("__version__ ...
[ [ [ 70, 75 ], [ 401, 406 ] ], [ [ 77, 90 ], [ 1143, 1156 ] ], [ [ 98, 100 ], [ 242, 244 ] ], [ [ 108, 110 ], [ 298, 300 ] ], [ [ 1...
from django.contrib import admin from events.models import Place, Event, Attendance # Register your models here. class EventAdmin(admin.ModelAdmin): filter_horizontal = ('expected_members', ) class AttendanceAdmin(admin.ModelAdmin): list_display = ('event__name', 'member', 'attendance', 'proxy_to', 'accepted'...
[ [ [ 27, 32 ], [ 131, 136 ], [ 220, 225 ], [ 422, 427 ], [ 449, 454 ], [ 498, 503 ] ], [ [ 59, 64 ], [ 442, 447 ] ], [ [ 66, 71 ]...
# -*- coding: utf-8 -*- # Created at 03/09/2020 __author__ = 'raniys' import math import pytest from factorial_example import factorial_function @pytest.mark.sample def test_factorial_functionality(): print("Inside test_factorial_functionality") assert factorial_function(0) == 1 assert factorial_func...
[ [ [ 49, 59 ] ], [ [ 79, 83 ], [ 617, 621 ] ], [ [ 92, 98 ], [ 152, 158 ], [ 337, 343 ], [ 663, 669 ], [ 906, 912 ] ], [ [ 130, 1...
import requests import json # Get Current Patch def getCurrentVersion(): versionResponse = requests.get("https://ddragon.leagueoflegends.com/api/versions.json") version_patch_RawData = versionResponse.json() currentVersion = version_patch_RawData[0] print(currentVersion) return currentVersion #cham...
[ [ [ 7, 15 ], [ 95, 103 ], [ 459, 467 ], [ 889, 897 ] ], [ [ 23, 27 ], [ 576, 580 ], [ 999, 1003 ], [ 1291, 1295 ] ], [ [ 52, 69 ...
import numpy as np import nibabel as nib import os import sys sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/../../') from my_functions.matrix_stuff import * def manual_rigid_body(fname = 'example_brain.nii.gz', outmat = 'transformation.mat', outimg = 'example_...
[ [ [ 7, 18 ], [ 376, 378 ] ], [ [ 26, 40 ], [ 1933, 1936 ] ], [ [ 48, 50 ], [ 78, 80 ], [ 94, 96 ], [ 2796, 2798 ] ], [ [ 58, 61 ...
from sys import maxsize class Contact: def __init__(self, first_name=None, middle_name=None, last_name=None, nickname=None, photo_path=None, photo_delete=False, title=None, company=None, address=None, telephones_all=None, telephone_home=None, telephone_mobile=No...
[ [ [ 16, 23 ], [ 2479, 2486 ] ], [ [ 32, 39 ] ] ]
import os from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from .base import Base class MapperBase(): user = os.getenv("MYSQL_USER") key = os.getenv("MYSQL_KEY") host = os.getenv("MYSQL_HOST") port = os.getenv("MYSQL_PORT") def __init__(self, database): self....
[ [ [ 7, 9 ], [ 145, 147 ], [ 179, 181 ], [ 213, 215 ], [ 248, 250 ] ], [ [ 34, 47 ], [ 705, 718 ] ], [ [ 75, 87 ], [ 819, 831 ] ...
import numpy as np import matplotlib.pyplot as plt import argparse def extract_name(word: str): return word.split('=')[-1] def extract_info(filename: str): filename_splitted = filename.split('_') assert len(filename_splitted) == 7 p = float(extract_name(filename_splitted[1])) iterations = int(ex...
[ [ [ 7, 18 ], [ 751, 753 ] ], [ [ 26, 50 ], [ 797, 800 ], [ 829, 832 ], [ 864, 867 ], [ 895, 898 ], [ 925, 928 ], [ 989, 992 ], [...
from decimal import Decimal from urllib.parse import urlparse from django import forms from django.conf import settings from django.core.exceptions import ValidationError from django.db.models import Q from django.utils.safestring import mark_safe from django.utils.translation import gettext_lazy as _, pgettext_lazy f...
[ [ [ 20, 27 ], [ 10564, 10571 ] ], [ [ 53, 61 ], [ 3088, 3096 ] ], [ [ 82, 87 ], [ 1445, 1450 ], [ 1564, 1569 ], [ 4583, 4588 ], [ 4774, ...
from setuptools import setup from setuptools import find_packages with open('README.rst') as f: LONG_DESCRIPTION = f.read() MAJOR_VERSION = '0' MINOR_VERSION = '11' MICRO_VERSION = '214' VERSION = "{}.{}.{}".format(MAJOR_VERSION, MINOR_VERSION, MICRO_VERSION) setup(name='yagmail', version=VERSION, des...
[ [ [ 23, 28 ], [ 266, 271 ] ], [ [ 52, 65 ], [ 2047, 2060 ] ], [ [ 94, 95 ], [ 120, 121 ] ], [ [ 101, 117 ], [ 380, 396 ] ], [ [ 12...
from jinja2 import Template from starlette.applications import Starlette from starlette.middleware import Middleware from starlette.middleware.sessions import SessionMiddleware from starlette.responses import PlainTextResponse, HTMLResponse from starlette_wtf import StarletteForm, CSRFProtectMiddleware, csrf_protect fr...
[ [ [ 19, 27 ], [ 498, 506 ] ], [ [ 63, 72 ], [ 850, 859 ] ], [ [ 106, 116 ], [ 877, 887 ], [ 943, 953 ] ], [ [ 159, 176 ], [ 888, ...
#подключение библиотек from PyQt5.QtCore import Qt from PyQt5.QtWidgets import QApplication, QWidget, QPushButton, QLabel,QVBoxLayout,QHBoxLayout, QMessageBox, QRadioButton #создание приложения и главного окна app=QApplication([]) main_win =QWidget() main_win.setWindowTitle('Конкурс от Crazy People') question =QLabel(...
[ [ [ 48, 50 ], [ 623, 625 ], [ 675, 677 ], [ 727, 729 ], [ 779, 781 ], [ 831, 833 ] ], [ [ 79, 91 ], [ 215, 227 ] ], [ [ 93, 100 ...
from action_class import Action place = 'place' upgrade = 'upgrade' target = 'target' top = 'upgrade 1' middle = 'upgrade 2' bottom = 'upgrade 3' ouch_script = [ Action(place, name='sub1', action='sub', position=(708, 540)), # Sub Action(place, name='sub2', action='sub', position=(984, 545)), # Sub2 Acti...
[ [ [ 25, 31 ], [ 169, 175 ], [ 242, 248 ], [ 316, 322 ], [ 362, 368 ], [ 439, 445 ], [ 512, 518 ], [ 577, 583 ], [ 632, 638 ], [ ...
def run(): my_list = [1, "Hello", True, 4.5] my_dict = {"firstname":"Facundo", "lastname":"Garcia"} superList = [ {"firstname":"Facundo", "lastname":"Garcia"}, {"firstname":"Miguel", "lastname":"Torres"}, {"firstname":"José", "lastname":"Rodelo"}, {"firstname":"Susana", "las...
[ [ [ 4, 7 ], [ 732, 735 ] ] ]
import numpy as np import matplotlib.pyplot as plt import matplotlib.colors as colors from mpl_toolkits.axes_grid1 import make_axes_locatable #Key: # 1=sandstone 2=c_siltstone 3=f_siltstone # 4=marine_silt_shale 5=mudstone 6=wackestone 7=dolomite # 8=packstone 9=bafflestone facies_labels = ['SS', 'CSiS', 'FSiS',...
[ [ [ 7, 18 ], [ 1071, 1073 ], [ 1081, 1083 ], [ 3263, 3265 ], [ 3273, 3275 ], [ 3337, 3339 ], [ 3347, 3349 ] ], [ [ 26, 50 ], [ 1147, 115...
import wx import numpy as np from imagepy.core.engine import Tool, Filter import scipy.ndimage as nimg class ScaleTool(Tool): def __init__(self, plg): self.plg = plg self.para = plg.para self.moving = False def snap(self, x, y, lim): plg = self.plg if abs(x-plg....
[ [ [ 7, 9 ], [ 1428, 1430 ], [ 1528, 1530 ], [ 2905, 2907 ], [ 2938, 2940 ] ], [ [ 17, 28 ], [ 4974, 4976 ], [ 5042, 5044 ], [ 5251, 5253...
class std_logic(): """ class to represent a digital bit allowing for the same 9 values of a bit supported by IEEE 1164. ====== =============== Value Interpreatation ------ --------------- U Unitialized X Unknown 0 Strong 0 1 ...
[ [ [ 8, 17 ], [ 1059, 1068 ], [ 1278, 1287 ], [ 2240, 2249 ], [ 2284, 2293 ], [ 2311, 2320 ], [ 2362, 2371 ], [ 2432, 2441 ], [ 2472, 2481 ...
#!/usr/bin/env python """ Predefined bluesky scan plans """ import numpy as np import bluesky.plans as bp import bluesky.preprocessors as bpp import bluesky.plan_stubs as bps from .utility import load_config #@bpp.run_decorator() def collect_white_field(experiment, cfg_tomo, at...
[ [ [ 69, 96 ], [ 2691, 2693 ], [ 4569, 4571 ], [ 5613, 5615 ], [ 5688, 5690 ], [ 5700, 5702 ], [ 5716, 5718 ], [ 5756, 5758 ], [ 5772, 5774 ...
from pymongo import * from flask import * from flask_restful import * import datetime mongodb_url = "mongodb://Ranuga:ranuga2008@cluster0-shard-00-00.6n3dg.mongodb.net:27017,cluster0-shard-00-01.6n3dg.mongodb.net:27017,cluster0-shard-00-02.6n3dg.mongodb.net:27017/myFirstDatabase?ssl=true&replicaSet=atlas-uo9rgq-shard...
[ [ [ 20, 21 ] ], [ [ 40, 41 ] ], [ [ 68, 69 ], [ 375, 380 ], [ 449, 460 ] ], [ [ 77, 85 ] ], [ [ 88, 99 ], [ 461, 472 ] ], [ [ ...
""" Classes for GP models with Stan that perform transfer optimization. """ from argparse import Namespace import numpy as np import copy from .gp_stan import StanGp from .regression.transfer_regression import TransferRegression from ..util.misc_util import dict_to_namespace class StanTransferGp(StanGp): """ ...
[ [ [ 98, 107 ], [ 2517, 2526 ] ], [ [ 115, 126 ], [ 1630, 1632 ], [ 4259, 4261 ], [ 6257, 6259 ], [ 2235, 2237 ] ], [ [ 134, 138 ] ], [ [ ...
# 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 ], [ 500, 508 ] ], [ [ 192, 198 ] ], [ [ 206, 220 ], [ 698, 704 ], [ 1881, 1887 ], [ 2039, 2045 ], [ 2450, 2456 ], [ 2605, ...
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from mvn.utils.img import to_numpy, to_torch from mvn.utils import multiview def integrate_tensor_2d(heatmaps, softmax=True): """Applies softmax to heatmaps and integrates them to get their's "center of masses" Args: ...
[ [ [ 7, 18 ], [ 7390, 7392 ] ], [ [ 27, 32 ], [ 956, 961 ], [ 977, 982 ], [ 1042, 1047 ], [ 1063, 1068 ], [ 1335, 1340 ], [ 2000, 2005 ...
from calendar import timegm from datetime import date, datetime, time import sqlite3 from typing import Callable import julian # type: ignore def store_time(time_type: str, time_format: str = "") -> None: if time_type == "seconds": sqlite3.register_adapter(time, time_to_seconds) elif time_type == "t...
[ [ [ 21, 27 ], [ 2030, 2036 ] ], [ [ 49, 53 ], [ 595, 599 ], [ 681, 685 ], [ 765, 769 ], [ 1635, 1639 ], [ 1736, 1740 ], [ 1861, 1865 ...
import click import logging from .constants import WELCOME_TEXT from .api import run_server from .logger import OrigamiLogger logger = OrigamiLogger( file_log_level=logging.DEBUG, console_log_level=logging.DEBUG) @click.group(invoke_without_command=True) @click.pass_context def main(ctx): """ Origami da...
[ [ [ 7, 12 ], [ 222, 227 ], [ 264, 269 ], [ 450, 455 ] ], [ [ 20, 27 ], [ 171, 178 ], [ 204, 211 ] ], [ [ 52, 64 ], [ 461, 473 ] ...
from __future__ import annotations import itertools import math from dataclasses import dataclass from typing import Any @dataclass class TreeZipper: inner: Any path: list[int] def up(self): if self.path: return TreeZipper(self.inner, self.path[:-1]), self.path[-1] return Non...
[ [ [ 23, 34 ] ], [ [ 42, 51 ], [ 11330, 11339 ] ], [ [ 59, 63 ], [ 3329, 3333 ], [ 3367, 3371 ] ], [ [ 89, 98 ], [ 125, 134 ] ], [ [ ...
import json from unittest import TestCase from unittest.mock import Mock from utils import protocols from api.ontology import OntologyAPI from utils.protocols import ONTOLOGY_3PRIME_PARENT, ONTOLOGY_5PRIME_PARENT, ONTOLOGY_CITESEQ class TestProtocols(TestCase): def setUp(self) -> None: self.ontology_api =...
[ [ [ 7, 11 ] ], [ [ 33, 41 ], [ 253, 261 ] ], [ [ 68, 72 ], [ 321, 325 ], [ 1878, 1882 ], [ 2780, 2784 ], [ 2865, 2869 ], [ 3443, 344...
from sumy.parsers.plaintext import PlaintextParser #We're choosing a plaintext parser here, other parsers available for HTML etc. from sumy.nlp.tokenizers import Tokenizer from sumy.summarizers.lex_rank import LexRankSummarizer #We're choosing Lexrank, other algorithms are also built in def get_summary(text): # ...
[ [ [ 35, 50 ], [ 454, 469 ] ], [ [ 162, 171 ], [ 487, 496 ] ], [ [ 210, 227 ], [ 526, 543 ] ], [ [ 294, 305 ] ] ]
import pandas as pd import cv2 import numpy as np dataset_path = 'fer2013/fer2013/fer2013.csv' image_size=(48,48) def load_fer2013(): data = pd.read_csv(dataset_path) pixels = data['pixels'].tolist() width, height = 48, 48 faces = [] for pixel_sequence in pixels: f...
[ [ [ 7, 19 ], [ 152, 154 ], [ 644, 646 ] ], [ [ 27, 30 ], [ 456, 459 ] ], [ [ 38, 49 ], [ 397, 399 ], [ 565, 567 ], [ 599, 601 ] ...
import json from time import sleep import gspread import requests from gspread_formatting import * from oauth2client.service_account import ServiceAccountCredentials class Spreadsheet: # comment out all but one of these depending on which spreadsheet being used # URL = 'https://docs.google.com/spreadsheets/...
[ [ [ 7, 11 ], [ 2449, 2453 ] ], [ [ 29, 34 ], [ 4965, 4970 ], [ 5080, 5085 ], [ 6977, 6982 ], [ 7159, 7164 ], [ 7274, 7279 ], [ 8101, 810...
import logging import os import numpy as np import torch from torch.utils.data import Dataset, DataLoader import torchvision.transforms as transforms from torch.utils.data.distributed import DistributedSampler from .dataset import CheXpert def _get_mean_and_std(dataset: Dataset): """Compute the mean and std of ...
[ [ [ 7, 14 ], [ 8291, 8298 ], [ 8397, 8404 ] ], [ [ 23, 25 ], [ 9355, 9357 ] ], [ [ 33, 44 ], [ 870, 872 ], [ 886, 888 ], [ 910, 912 ...
import json from collections import Iterable from pathlib import Path import cadquery as cq import matplotlib.pyplot as plt import plotly.graph_objects as go from cadquery import exporters import paramak from paramak.neutronics_utils import (add_stl_to_moab_core, define_moab_cor...
[ [ [ 8, 12 ], [ 9626, 9630 ] ], [ [ 37, 45 ], [ 4046, 4054 ] ], [ [ 66, 70 ], [ 9371, 9375 ], [ 11362, 11366 ], [ 11384, 11388 ], [ 11466, ...
#!/usr/bin/python2 """ 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"); yo...
[ [ [ 817, 818 ], [ 1577, 1584 ], [ 2089, 2096 ], [ 2307, 2314 ] ], [ [ 825, 837 ] ] ]
""" Logging module for printing status during an exploit, and internally within ``pwntools``. Exploit Developers ------------------ By using the standard ``from pwn import *``, an object named ``log`` will be inserted into the global namespace. You can use this to print out status messages during exploitation. For e...
[ [ [ 3663, 3678 ] ], [ [ 3702, 3710 ] ], [ [ 3719, 3726 ], [ 16940, 16947 ], [ 20278, 20285 ], [ 22353, 22360 ], [ 22858, 22865 ], [ 9829, 9836 ], ...
import rows import os from timeit import default_timer import json output_path = '../package/data/' class Brasilio(object): def __init__(self, output_path='../package/data/', verbose=False): self.verbose = verbose self.output_path = output_path self.timer = default_timer def _...
[ [ [ 7, 11 ], [ 1223, 1227 ] ], [ [ 19, 21 ], [ 394, 396 ], [ 440, 442 ], [ 1127, 1129 ] ], [ [ 41, 54 ], [ 288, 301 ] ], [ [ 62, ...
#!/usr/bin/env python3 import os import pathlib import sys import subprocess def has_cargo_fmt(): """Runs a quick check to see if cargo fmt is installed.""" try: c = subprocess.run(["cargo", "fmt", "--", "--help"], capture_output=True) except OSError: return False else: return ...
[ [ [ 30, 32 ], [ 555, 557 ] ], [ [ 40, 47 ], [ 542, 549 ] ], [ [ 55, 58 ], [ 901, 904 ], [ 1053, 1056 ], [ 1212, 1215 ] ], [ [ 66, ...
import os import distutils.spawn import mpi4py from mpi4py import MPI def check_mpi(): mpiexec_path, _ = os.path.split(distutils.spawn.find_executable("mpiexec")) for executable, path in mpi4py.get_config().items(): if executable not in ['mpicc', 'mpicxx', 'mpif77', 'mpif90', 'mpifort']: co...
[ [ [ 7, 9 ], [ 110, 112 ] ], [ [ 17, 32 ], [ 124, 133 ] ], [ [ 40, 46 ], [ 196, 202 ], [ 620, 626 ] ], [ [ 66, 69 ], [ 667, 670 ...
import queue import time import numpy as np class CameraInformation: def __init__(self, cam_id: str): self._frame_queue: queue.Queue = queue.Queue(maxsize=1) self._frame_shape = None self._last_frame_time = None self.is_online = True self.node_id = cam_id def write_fra...
[ [ [ 7, 12 ], [ 149, 154 ], [ 135, 140 ], [ 408, 413 ], [ 773, 778 ] ], [ [ 20, 24 ], [ 510, 514 ] ], [ [ 32, 43 ], [ 875, 877 ] ...
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from __future__ import unicode_literals from ..utils import Generate5tt def test_Generate5tt_inputs(): input_map = dict( algorithm=dict( argstr='%s', mandatory=True, position=-3, ), args=dict(argstr='...
[ [ [ 77, 93 ] ], [ [ 114, 125 ], [ 1232, 1243 ], [ 1533, 1544 ] ], [ [ 132, 155 ] ], [ [ 1433, 1457 ] ] ]
#!/usr/bin/env python from setuptools import setup def readme(): with open('README.md') as f: return f.read() setup( name='impasse', # Version chosen for parity with Assimp since we need ABI compatibility version='5.0.6', license='BSD', description='Alternate Python bindings for the...
[ [ [ 46, 51 ], [ 127, 132 ] ], [ [ 58, 64 ], [ 379, 385 ] ] ]
from __future__ import absolute_import from __future__ import print_function import sys import os # the next line can be removed after installation sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname( os.path.dirname(os.path.dirname(os.path.abspath(__file__))))))) from veriloggen import * import ve...
[ [ [ 23, 38 ] ], [ [ 62, 76 ] ], [ [ 84, 87 ], [ 149, 152 ] ], [ [ 95, 97 ], [ 168, 170 ], [ 184, 186 ], [ 200, 202 ], [ 221, 223...
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt """Tests for coverage.numbits""" import json import sqlite3 from hypothesis import example, given, settings from hypothesis.strategies import sets, integers from...
[ [ [ 197, 201 ], [ 5526, 5530 ] ], [ [ 209, 216 ], [ 3297, 3304 ] ], [ [ 241, 248 ], [ 2864, 2871 ] ], [ [ 250, 255 ], [ 1355, 1360 ], [ ...
#!/usr/bin/env python3 import os import math from cereal import car, log from common.numpy_fast import clip, interp from common.realtime import sec_since_boot, config_realtime_process, Priority, Ratekeeper, DT_CTRL from common.profiler import Profiler from common.params import Params, put_nonblocking import cereal.mess...
[ [ [ 30, 32 ], [ 1708, 1710 ], [ 1744, 1746 ], [ 3359, 3361 ] ], [ [ 40, 44 ], [ 24500, 24504 ], [ 24670, 24674 ] ], [ [ 64, 67 ], [ 2208, ...
import cozmo name = input("What is your name? ") def cozmo_program(robot: cozmo.robot.Robot): robot.say_text( f"Hi! My name is Cozmo. How are you, {name}?").wait_for_completed() cozmo.run_program(cozmo_program)
[ [ [ 7, 12 ], [ 195, 200 ], [ 77, 82 ] ], [ [ 14, 18 ], [ 163, 167 ] ], [ [ 56, 69 ], [ 213, 226 ] ] ]
# Copyright (c) 2016 Uber Technologies, Inc. # # 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, publ...
[ [ [ 1126, 1141 ] ], [ [ 1143, 1159 ] ], [ [ 1161, 1175 ] ], [ [ 1184, 1190 ], [ 1565, 1571 ], [ 1938, 1944 ] ], [ [ 1221, 1231 ], [ 1508, 1518 ...
from binascii import crc32 from contextlib import contextmanager from datetime import datetime, timedelta, timezone from pathlib import Path from osgeo import gdal import pytest import rasterio from click.testing import CliRunner from rasterio import DatasetReader from rasterio.enums import Compression from rio_cogeo ...
[ [ [ 21, 26 ], [ 19840, 19845 ] ], [ [ 50, 64 ], [ 25218, 25232 ] ], [ [ 86, 94 ], [ 9643, 9651 ], [ 9770, 9778 ], [ 9850, 9858 ], [ 11748,...
import scrapy, re from alleco.objects.official import Official class ross_t(scrapy.Spider): name = "ross_t" muniName = "ROSS" muniType = "TOWNSHIP" complete = True def start_requests(self): urls = ['https://www.ross.pa.us/245/Board-of-Commissioners', 'https://www.ross.pa.us/225/Other-Elected-Offic...
[ [ [ 7, 13 ], [ 80, 86 ], [ 357, 363 ] ], [ [ 15, 17 ] ], [ [ 55, 63 ], [ 870, 878 ], [ 1228, 1236 ] ], [ [ 73, 79 ] ] ]
""" 状态模式 """ from __future__ import annotations from abc import ABC, abstractmethod class Context: # 状态(状态模式的判断) _state: State = None def __init__(self, state: State) -> None: self.transition_to(state) def transition_to(self, state: State) -> None: # 根据不同状态,切换上下文 self._state ...
[ [ [ 36, 47 ] ], [ [ 64, 67 ], [ 502, 505 ] ], [ [ 69, 83 ], [ 693, 707 ], [ 758, 772 ] ], [ [ 92, 99 ], [ 1250, 1257 ], [ 547, 5...
# -*- coding: utf-8 -*- # Copyright 2020 Green Valley Belgium NV # # 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...
[ [ [ 647, 651 ], [ 3253, 3257 ], [ 5020, 5024 ] ], [ [ 674, 683 ], [ 1307, 1316 ], [ 4316, 4325 ] ], [ [ 685, 692 ], [ 4273, 4280 ] ], [ [ ...
import os import time import pickle import math import numpy as np import linecache import matplotlib.pyplot as plt # from matplotlib.pyplot import MultipleLocator import grid data_path = 'E:/dataset/didi/processed' save_path = 'E:/dataset/didi/processed/order_20161101_sampled_value_map_fig' data_file_name = 'process...
[ [ [ 7, 9 ], [ 687, 689 ], [ 718, 720 ], [ 749, 751 ], [ 845, 847 ], [ 2605, 2607 ] ], [ [ 17, 21 ] ], [ [ 29, 35 ], [ 820, 826 ]...
w = int(input()) h = int(input()) for i in range(h): output = str() for j in range(w): if (i + j) % 2 == 0: output += '0' else: output += '1' print(output)
[ [ [ 0, 1 ], [ 88, 89 ] ], [ [ 17, 18 ], [ 50, 51 ] ], [ [ 39, 40 ], [ 100, 101 ] ], [ [ 56, 62 ], [ 123, 129 ], [ 153, 159 ]...
from bridges.symbol import * class Text(Symbol): def __init__(self, label = None): super(Text, self).__init__() if label is not None: self._text = label else: self._text = "" self.stroke_width = 1.0 self._font_size = None self._anchor_ali...
[ [ [ 27, 28 ], [ 42, 48 ] ], [ [ 37, 41 ], [ 105, 109 ], [ 1129, 1133 ] ] ]
import torch import torch.nn as nn import rdkit.Chem as Chem import torch.nn.functional as F from hgraph.nnutils import * from hgraph.encoder import IncHierMPNEncoder from hgraph.mol_graph import MolGraph from hgraph.inc_graph import IncTree, IncGraph class HTuple(): def __init__(self, node=None, mess=None, vmask=...
[ [ [ 7, 12 ], [ 871, 876 ], [ 1124, 1129 ], [ 4818, 4823 ], [ 5239, 5244 ], [ 5774, 5779 ], [ 6128, 6133 ], [ 13215, 13220 ], [ 16290, 16295 ...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. import unittest import numpy as np import numpy.testing as npt import six from caffe2.python import core, workspace from ml.rl.caffe_utils import C2 from ml.rl.preprocessing import identify_types, normalization from ml.rl.p...
[ [ [ 103, 111 ], [ 812, 820 ] ], [ [ 120, 131 ], [ 2229, 2231 ], [ 2275, 2277 ], [ 2495, 2497 ], [ 2514, 2516 ], [ 3407, 3409 ], [ 3441, ...
import speech_recognition as sr r=sr.Recognizer() with sr.Microphone() as source: print("Say Something") sudio=r.listen(source) print("Time over") try: print("Text: "+r.recognize_google(audio)) except: pass
[ [ [ 7, 31 ], [ 34, 36 ], [ 55, 57 ] ], [ [ 32, 33 ], [ 113, 114 ], [ 173, 174 ] ], [ [ 74, 80 ], [ 122, 128 ] ], [ [ 107, 112 ...
import tkinter from tkinter import * win = Tk() sb = Spinbox(win, from_=0, to=10) sb.pack() win.mainloop()
[ [ [ 7, 14 ] ], [ [ 35, 36 ], [ 44, 46 ], [ 55, 62 ] ], [ [ 38, 41 ], [ 63, 66 ], [ 95, 98 ] ], [ [ 50, 52 ], [ 84, 86 ] ] ...
import citysim3d.envs from visual_dynamics.envs import Env class ServoingEnv(citysim3d.envs.SimpleQuadPanda3dServoingEnv, Env): def _get_config(self): config = super(ServoingEnv, self)._get_config() config.update({'env': self.env, 'max_time_steps': self.max_time_steps, ...
[ [ [ 7, 21 ], [ 80, 89 ] ], [ [ 56, 59 ], [ 125, 128 ] ], [ [ 68, 79 ], [ 181, 192 ] ] ]
from .dynamic_iterbased_runner import DynamicIterBasedRunner __all__ = ['DynamicIterBasedRunner']
[ [ [ 38, 60 ] ], [ [ 62, 69 ] ] ]
#Django Imports from django.conf import settings #Python Imports import requests, os #Local Imports from .at_utils import AfricasTalkingException #Import Afica's Talking Settings AFRICAS_TALKING_SETTINGS = getattr(settings,'AFRICAS_TALKING',{}) API_KEY = AFRICAS_TALKING_SETTINGS.get('API_KEY',None) USERNAME = AFRI...
[ [ [ 40, 48 ], [ 217, 225 ] ], [ [ 73, 81 ], [ 1220, 1228 ], [ 2494, 2502 ], [ 3089, 3097 ] ], [ [ 83, 85 ], [ 1158, 1160 ], [ 2437, ...
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! https://waf.io/book/index.html#_obtaining_the_waf_file import os,sys,traceback,base64,signal try: import cPickle except ImportError: import pickle as cPickle try: import subprocess32 as subprocess except ImportError: import subprocess try: TimeoutEx...
[ [ [ 128, 130 ], [ 829, 831 ], [ 847, 849 ] ], [ [ 131, 134 ], [ 432, 435 ], [ 476, 479 ], [ 1107, 1110 ], [ 1322, 1325 ], [ 1354, 1357 ...
# -*- coding: utf-8 -*- """ Class and program to colorize python source code for ANSI terminals. Based on an HTML code highlighter by Jurgen Hermann found at: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52298 Modifications by Fernando Perez (fperez@colorado.edu). Information on the original HTML highligh...
[ [ [ 915, 929 ] ], [ [ 954, 970 ] ], [ [ 972, 979 ] ], [ [ 1011, 1026 ], [ 3319, 3334 ], [ 8496, 8511 ] ], [ [ 1056, 1064 ], [ 4269, 4277 ], ...
# Last Updated: 2.2 from datetime import datetime from util.diagMessage import DiagMessage # Logger class # Buffers and writes messages to a file class Logger: BUFFER_MAX = 10 DEFAULT_FN = "../log.txt" # Constructor for logger class # Params: fn - file name to use or leave default # log -...
[ [ [ 41, 49 ], [ 892, 900 ], [ 1465, 1473 ] ], [ [ 79, 90 ], [ 569, 580 ] ], [ [ 153, 159 ] ] ]
# Standard Library from copy import deepcopy # 3rd Party # Internal # ########################################################################### # class MetaData (dict): """ A class for holding information about an object """ def __init__ (self,*args,**kwargs): super(MetaData,self).__...
[ [ [ 37, 45 ], [ 3518, 3526 ], [ 4315, 4323 ] ], [ [ 159, 167 ], [ 303, 311 ], [ 837, 845 ] ] ]
Inc('dfaccto/util.py', abs=True) class _Event(ModuleContext): def __init__(self): ModuleContext.__init__(self) self._setup_packages() def _setup_packages(self): self.pkg = Pkg('dfaccto_event', x_templates={self.File('generic/package.vhd.tpl'): self.File('pkg/dfaccto_event.vhd')}) with se...
[ [ [ 41, 47 ], [ 1364, 1370 ] ], [ [ 1356, 1361 ] ] ]
# -*- coding: utf-8 -*- # Max-Planck-Gesellschaft zur Förderung der Wissenschaften e.V. (MPG) is # holder of all proprietary rights on this computer program. # You can only use this computer program if you have closed # a license agreement with MPG or you get the right to use the computer # program from someone who is...
[ [ [ 706, 721 ] ], [ [ 745, 759 ] ], [ [ 783, 791 ] ], [ [ 800, 811 ], [ 3265, 3267 ] ], [ [ 820, 825 ], [ 1091, 1096 ], [ 5400, 5405 ], ...
""" foxBMS Software License Copyright 2010-2016, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V. All rights reserved. BSD 3-Clause License Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions ...
[ [ [ 2229, 2243 ], [ 2527, 2541 ], [ 2720, 2734 ] ], [ [ 2251, 2259 ], [ 5623, 5631 ], [ 5708, 5716 ] ], [ [ 2267, 2270 ], [ 6008, 6011 ] ], [ ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import country_converter as coco import pandas as pd from covsirphy.util.term import Term from covsirphy.loading.db_base import _RemoteDatabase class _OWID(_RemoteDatabase): """ Access "Our World In Data". https://github.com/owid/covid-19-data/tree/master/pub...
[ [ [ 54, 79 ], [ 3695, 3699 ] ], [ [ 87, 99 ], [ 2319, 2321 ], [ 2386, 2388 ], [ 2648, 2650 ] ], [ [ 132, 136 ], [ 1227, 1231 ], [ 1174, ...
# ----------------------------------------------------------------------------- # # Copyright (C) 2021 CERN & Newcastle University for the benefit of the # BioDynaMo collaboration. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance w...
[ [ [ 600, 605 ], [ 895, 900 ], [ 908, 913 ], [ 937, 942 ], [ 1005, 1010 ], [ 1032, 1037 ], [ 1102, 1107 ], [ 1132, 1137 ], [ 1210, 1215 ]...
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin from io import StringIO import pytest from jinja2 import Template from flexget.entry import Entry from flexget.logger import capture_output from flexget.manager import ge...
[ [ [ 23, 39 ] ], [ [ 41, 49 ] ], [ [ 51, 66 ] ], [ [ 88, 89 ] ], [ [ 163, 171 ], [ 73701, 73709 ] ], [ [ 180, 186 ], [ 626, 632 ], [ ...
#!/usr/bin/env python """ Copyright 2017 ARM Limited 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...
[ [ [ 622, 626 ], [ 1082, 1086 ] ], [ [ 633, 639 ] ] ]
# 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 use ...
[ [ [ 788, 796 ], [ 6096, 6104 ], [ 6230, 6238 ] ], [ [ 804, 808 ], [ 2580, 2584 ], [ 3037, 3041 ], [ 4427, 4431 ] ], [ [ 816, 823 ], [ 1223...
from decimal import * # Purpose: read in SSDEEP output and print findings. # Author: Tanner G. def main(): file = open("ssdeep_comparison", "r") # read past first line of output file.readline() filea_data = file.readline() fileb_data = file.readline() file.close() totalCount = 0 similarities = 0 index = 0 ...
[ [ [ 20, 21 ], [ 799, 806 ], [ 821, 828 ] ], [ [ 101, 105 ], [ 1072, 1076 ] ] ]
#!/usr/bin/env python import cPickle from functools import wraps def redis_lru(capacity=5000, slice=slice(None)): def decorator(func): cache_keys = "lru:keys:%s" % (func.__name__,) cache_vals = "lru:vals:%s" % (func.__name__,) cache_hits = "lru:hits:%s" % (func.__name__,) cache_miss = "lru:miss:%s" % (func.__...
[ [ [ 29, 36 ], [ 480, 487 ], [ 718, 725 ], [ 1153, 1160 ] ], [ [ 59, 64 ], [ 1019, 1024 ] ], [ [ 70, 79 ] ] ]
swizzle_table = [ [ b"\x00", b"\x01", b"\x40", b"\x03", b"\x10", b"\x21", b"\x50", b"\x23", b"\x04", b"\x09", b"\x44", b"\x0b", b"\x14", b"\x29", b"\x54", b"\x2b", ], [ b"\...
[ [ [ 0, 13 ], [ 6930, 6943 ], [ 7438, 7451 ], [ 8005, 8018 ], [ 8471, 8484 ], [ 9080, 9093 ], [ 9773, 9786 ], [ 10333, 10346 ], [ 10865, 1087...
from core.models import User from django.http import HttpResponse, JsonResponse from django.shortcuts import get_object_or_404 from drf_yasg import openapi from drf_yasg.utils import swagger_auto_schema from rest_framework import permissions, status from rest_framework.decorators import api_view, permission_classes fro...
[ [ [ 24, 28 ], [ 13414, 13418 ] ], [ [ 53, 65 ], [ 11924, 11936 ], [ 12368, 12380 ], [ 13502, 13514 ], [ 13889, 13901 ], [ 14031, 14043 ] ], [ [ ...
"""Provides the Objector class.""" from json import loads from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union from .exceptions import ClientException, RedditAPIException from .models.reddit.base import RedditBase from .util import snake_case_keys if TYPE_CHECKING: # pragma: no cover from ... impo...
[ [ [ 53, 58 ], [ 7213, 7218 ] ], [ [ 78, 91 ], [ 268, 281 ] ], [ [ 93, 96 ], [ 475, 478 ], [ 1361, 1364 ], [ 1625, 1628 ], [ 5759, 57...
from .core import * SCHEMA_VERSION = 'v2.6.5' SCHEMA_URL = 'https://vega.github.io/schema/vega/v2.6.5.json'
[ [ [ 18, 19 ] ], [ [ 21, 35 ] ], [ [ 47, 57 ] ] ]
"""Various input/output utility functions""" from typing import Any, Optional import os import re from io import BytesIO import cloudpickle import pandas as pd from zstandard import ZstdCompressor, ZstdDecompressor COMPRESSION_MAX_OUTPUT_SIZE = 10 ** 9 # 1GB def pickle_dumps(variable: object) -> bytes: pickl...
[ [ [ 65, 68 ], [ 421, 424 ] ], [ [ 70, 78 ], [ 1002, 1010 ], [ 1551, 1559 ] ], [ [ 87, 89 ] ], [ [ 97, 99 ], [ 563, 565 ] ], [ [ 11...
# coding: utf-8 from __future__ import unicode_literals from io import StringIO, BytesIO from pathlib import Path import pytest from .util import load_test_model from ..tokens import Doc from ..strings import StringStore from .. import util # These languages are used for generic tokenizer tests – only add a languag...
[ [ [ 39, 55 ] ], [ [ 72, 80 ], [ 4136, 4144 ] ], [ [ 82, 89 ], [ 4195, 4202 ] ], [ [ 110, 114 ] ], [ [ 122, 128 ], [ 945, 951 ], [ ...
from loss.BCELoss import cal_bce_loss from loss.HEL import cal_hel_loss from loss.IOULoss import cal_iou_loss, cal_weighted_iou_loss from loss.L12Loss import cal_mae_loss, cal_mse_loss from loss.SSIM import cal_ssim_loss supported_loss = dict( bce=cal_bce_loss, hel=cal_hel_loss, iou=cal_iou_loss, weigh...
[ [ [ 25, 37 ], [ 253, 265 ] ], [ [ 59, 71 ], [ 275, 287 ] ], [ [ 97, 109 ], [ 297, 309 ] ], [ [ 111, 132 ], [ 328, 349 ] ], [ [ 158...
#!/usr/bin/env python3 #https://codeforces.com/group/H9K9zY8tcT/contest/297258/problem/B #heap? from queue import PriorityQueue n = int(input()) g = {} c = {str(i):0 for i in range(1,n+1)} #children count for i in range(1,n+1): k = str(i) g[k] = input().split() # l[0]=weight; l[1]=no use; l[2:] parents;...
[ [ [ 115, 128 ], [ 366, 379 ] ], [ [ 130, 131 ], [ 185, 186 ], [ 227, 228 ], [ 440, 441 ] ], [ [ 147, 148 ], [ 255, 256 ], [ 334, 335...
from django.forms import ModelForm from .models import MRIScan class MRIScanForm(ModelForm): class Meta: model = MRIScan fields = ['case_id', 't1', 't1ce', 't2', 'flair']
[ [ [ 25, 34 ], [ 82, 91 ] ], [ [ 55, 62 ], [ 126, 133 ] ], [ [ 70, 81 ] ] ]
# 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...
[ [ [ 695, 708 ], [ 1142, 1155 ] ], [ [ 731, 739 ], [ 1167, 1175 ], [ 1051, 1059 ], [ 1274, 1282 ] ], [ [ 767, 784 ], [ 954, 971 ] ], [ [ ...
# get hsv values using trackbar import cv2 import numpy as np import time # A required callback method that goes into the trackbar function. def nothing(x): pass # Initializing the webcam feed. cap = cv2.VideoCapture(0) cap.set(3,1280) cap.set(4,720) # Create a window named trackbars. cv2.namedWindow("Trackbars"...
[ [ [ 39, 42 ], [ 206, 209 ], [ 293, 296 ], [ 558, 561 ], [ 616, 619 ], [ 674, 677 ], [ 732, 735 ], [ 792, 795 ], [ 852, 855 ], [ ...
# -*- coding: utf-8 -*- """ Microsoft-Windows-Direct3D10_1 GUID : 9b7e4c8f-342c-4106-a19f-4f2704f689f0 """ from construct import Int8sl, Int8ul, Int16ul, Int16sl, Int32sl, Int32ul, Int64sl, Int64ul, Bytes, Double, Float32l, Struct from etl.utils import WString, CString, SystemTime, Guid from etl.dtyp import Sid from et...
[ [ [ 129, 135 ] ], [ [ 137, 143 ] ], [ [ 145, 152 ] ], [ [ 154, 161 ] ], [ [ 163, 170 ] ], [ [ 172, 179 ], [ 582, 589 ], [ 704, 711 ], ...
# Generated by Django 2.0.4 on 2018-04-24 01:54 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('blog', '0001_initial'), ] operations = [ migrations.RenameField( model_name='post', old_name='sub_Title', ...
[ [ [ 71, 81 ], [ 108, 118 ], [ 221, 231 ], [ 363, 373 ], [ 465, 475 ] ], [ [ 83, 89 ], [ 563, 569 ] ], [ [ 98, 107 ] ] ]
# -*- coding: utf-8 -*- from __future__ import absolute_import import mock from exam import fixture from sentry.interfaces.template import Template from sentry.models import Event from sentry.testutils import TestCase class TemplateTest(TestCase): @fixture def interface(self): return Template.to_p...
[ [ [ 48, 63 ] ], [ [ 72, 76 ], [ 823, 827 ], [ 881, 885 ], [ 1086, 1090 ] ], [ [ 95, 102 ], [ 259, 266 ] ], [ [ 143, 151 ], [ 307, ...
from django.shortcuts import render def contrib_file(request): return render(request, "dpaste/contribute.html")
[ [ [ 29, 35 ], [ 76, 82 ] ], [ [ 42, 54 ] ] ]
from tkinter import messagebox from ClientInsert import * class ClientEdit(ClientInsert): def __init__(self, db, id_cliente, master): super().__init__(db, master) self.title('Editar Cliente') self.__id_cliente = id_cliente self.__list = master table_cliente = db.s...
[ [ [ 20, 30 ], [ 6917, 6927 ] ], [ [ 57, 58 ], [ 77, 89 ] ], [ [ 66, 76 ] ] ]
template = """<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Title of the document</title> <script type="text/javascript" src="https://s3.tradingview.com/tv.js"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/milligram/1.3.0/milligram.min.css"> <style> .tradingvi...
[ [ [ 0, 8 ] ] ]