code stringlengths 10 805k | def_use_chains listlengths 0 667 |
|---|---|
# Copyright (C) 2010 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and th... | [
[
[
1540,
1547
],
[
1663,
1670
]
],
[
[
1594,
1606
],
[
1706,
1718
],
[
1775,
1787
]
],
[
[
1647,
1654
],
[
1814,
1821
],
[
1851,
1858
],
[
... |
# Daniel Mc Callion
# This program prints the summer months
months = ("January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December")
summer = months[4:7]
for month in summer:
print(month)
| [
[
[
61,
67
],
[
204,
210
]
],
[
[
195,
201
],
[
230,
236
]
],
[
[
221,
226
],
[
248,
253
]
]
] |
class FieldC():
def __init__(self, name, column_type, primary_key, default):
self.name = name
self.column_type = column_type
self.primary_key = primary_key
self.default = default
def __str__(self):
return '<%s, %s:%s>' % (self.__class__.__name__, self.column_type... | [
[
[
6,
12
],
[
357,
363
],
[
539,
545
],
[
675,
681
],
[
835,
841
],
[
998,
1004
],
[
1161,
1167
]
],
[
[
344,
356
]
],
[
[
525,
538... |
from django.contrib.auth import get_user_model
from django.test import TestCase
class UsersManagersTests(TestCase):
"""
Test user creation manager
"""
def test_create_user(self):
"""
Creates a new user with email as primary identifier instead of username
"""
User = get... | [
[
[
32,
46
],
[
317,
331
],
[
1241,
1255
]
],
[
[
71,
79
],
[
107,
115
]
],
[
[
88,
106
]
]
] |
import pysam
from optparse import OptionParser
from x_gene_annotation import *
class mRNA_Transfer():
def call_transfer_mut(self, sf_rna, sf_dna_up, sf_dna_bottom, sf_candidate):
m_rna_vars = self.load_variants(sf_rna)
m_DNA_RNA_ovlp_vars = self.get_overlap_variants(sf_dna_bottom, m_rna_vars)
... | [
[
[
7,
12
],
[
515,
520
],
[
908,
913
],
[
1346,
1351
],
[
1935,
1940
],
[
1983,
1988
]
],
[
[
34,
46
],
[
2376,
2388
]
],
[
[
77,
7... |
# -*- coding: utf-8 -*-
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
import pytest
from ....testing import example_data
from ...niftyreg import get_custom_path
from ..asl import FitAsl
from ...niftyreg.tests.test_regutils import no_nifty_tool
@py... | [
[
[
146,
152
],
[
318,
324
],
[
716,
722
]
],
[
[
178,
190
],
[
860,
872
],
[
1456,
1468
],
[
1495,
1507
],
[
1534,
1546
]
],
[
[
215,
... |
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: tflite
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class DimensionMetadata(object):
__slots__ = ['_tab']
@classmethod
def GetRootAsDimensionMetadata(cls, buf, offset):
n = fla... | [
[
[
98,
109
],
[
317,
328
],
[
340,
351
],
[
580,
591
],
[
755,
766
],
[
848,
859
],
[
968,
979
],
[
1102,
1113
],
[
1222,
1233
],
[... |
# -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy
from openslides.utils.personal_info import PersonalInfo
from .models import Item
class AgendaPersonalInfo(PersonalInfo):
"""
Class for personal info block for the agenda app.
"""
headline = ugettext_lazy('I am on the list of... | [
[
[
62,
75
],
[
286,
299
]
],
[
[
120,
132
],
[
186,
198
]
],
[
[
154,
158
],
[
423,
427
]
],
[
[
167,
185
]
]
] |
def test():
from tensorflow.keras import datasets
assert model.get_layer("class_prediction").get_config()["units"]==43, "Check the number of output classes"
assert model.get_layer("class_prediction").get_config()["activation"]=="softmax", "Check your activation function"
assert model.output[0].name== '... | [
[
[
4,
8
]
]
] |
from rest_framework import serializers
from django.contrib.auth import get_user_model
from .models import CustomUser
User = get_user_model()
class TokenSerializer(serializers.Serializer):
"""
This serializer serializes the token data
"""
access = serializers.CharField(max_length=255)
refresh = se... | [
[
[
27,
38
],
[
166,
177
],
[
266,
277
],
[
318,
329
],
[
379,
390
]
],
[
[
71,
85
],
[
125,
139
]
],
[
[
106,
116
]
],
[
[
118,
... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
from setuptools import setup, find_packages
version = None
with open('jaeger_client/__init__.py', 'r') as f:
for line in f:
m = re.match(r'^__version__\s*=\s*(["\'])([^"\']+)\1', line)
if m:
version = m.group(2)
break
... | [
[
[
53,
55
],
[
198,
200
]
],
[
[
80,
85
],
[
424,
429
]
],
[
[
87,
100
],
[
681,
694
]
],
[
[
102,
109
],
[
328,
335
],
[
469,
... |
# Copyright (C) 2012-2013 Red Hat, 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 la... | [
[
[
1062,
1066
],
[
111758,
111762
],
[
111829,
111833
]
],
[
[
1092,
1103
],
[
14829,
14840
]
],
[
[
1121,
1126
],
[
1792,
1797
],
[
1860,
1865
],
... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# king_phisher/server/plugins.py
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, t... | [
[
[
1590,
1592
],
[
4641,
4643
]
],
[
[
1619,
1625
],
[
2416,
2422
],
[
3431,
3437
],
[
3869,
3875
],
[
4015,
4021
],
[
4180,
4186
],
[
4495,
... |
import click
import sys
from web3 import Web3
from plasma.client.client import Client
from plasma.utils import utils
@click.command()
@click.option('--token_address', help="The ethereum address of the pdex token smart contract", required=True)
@click.option('--root_chain_address', help="The ethereum address of the ro... | [
[
[
7,
12
],
[
120,
125
],
[
137,
142
],
[
247,
252
]
],
[
[
20,
23
],
[
737,
740
]
],
[
[
41,
45
],
[
592,
596
],
[
617,
621
],... |
from django.db import models
from django.utils.translation import ugettext_lazy as _
from .feedback import Feedback
class SearchResultFeedback(Feedback):
"""
Database model representing feedback about search results (e.g. empty results).
"""
search_query = models.CharField(max_length=1000, verbose_n... | [
[
[
22,
28
],
[
277,
283
]
],
[
[
66,
84
],
[
324,
325
],
[
1546,
1547
],
[
1652,
1653
],
[
588,
589
]
],
[
[
108,
116
],
[
146,
154... |
#!/usr/bin/env python
# coding: utf-8
import codecs
import sys
import sklearn as sk
import pandas as pd
import numpy as np
import math
from sklearn import preprocessing
from sklearn.decomposition import PCA
from src.pca.algoritmo_QR import eigenvectores_eigenvalores_QR_vf
from src.pca.metodo_potencia_deflation imp... | [
[
[
46,
52
]
],
[
[
60,
63
]
],
[
[
72,
85
]
],
[
[
93,
105
],
[
1392,
1394
]
],
[
[
113,
124
],
[
2724,
2726
],
[
2880,
2882
],
[
... |
from tkinter import*
import random
import time
root = Tk()
root.geometry("1600x700+0+0")
root.title("Restaurant Management System")
Tops = Frame(root,bg="white",width = 1600,height=50,relief=SUNKEN)
Tops.pack(side=TOP)
f1 = Frame(root,width = 900,height=700,relief=SUNKEN)
f1.pack(side=LEFT)
f2 = Frame(root ,width =... | [
[
[
19,
20
],
[
55,
57
],
[
141,
146
],
[
193,
199
],
[
216,
219
],
[
227,
232
],
[
268,
274
],
[
289,
293
],
[
301,
306
],
[
... |
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType
import copy as _copy
class Font(_BaseLayoutHierarchyType):
# class properties
# --------------------
_parent_path_str = "layout.scene.xaxis.title"
_path_str = "layout.scene.xaxis.title.font"
_valid_props = {"colo... | [
[
[
33,
84
],
[
119,
143
]
],
[
[
92,
105
],
[
7396,
7401
]
],
[
[
114,
118
],
[
7039,
7043
]
]
] |
#!/usr/bin/python
# -- Content-Encoding: UTF-8 --
"""
Utility methods, for compatibility between Python version
:author: Thomas Calmant
:copyright: Copyright 2015, isandlaTech
:license: Apache License 2.0
:version: 0.2.6
..
Copyright 2015 isandlaTech
Licensed under the Apache License, Version 2.0 (the "Lice... | [
[
[
841,
857
],
[
909,
925
]
],
[
[
870,
881
]
],
[
[
959,
972
]
],
[
[
1087,
1090
],
[
1177,
1180
]
],
[
[
1256,
1261
],
[
1308,
1313
],
... |
# Copyright 2014, Rackspace, US, 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 or agreed to in w... | [
[
[
590,
594
],
[
802,
806
],
[
1369,
1373
],
[
2071,
2075
],
[
3014,
3018
],
[
3927,
3931
],
[
4491,
4495
],
[
4899,
4903
],
[
5771,
5775
... |
import IoTSensor
import LORAGateway
class GatewayPlacement:
def __init__(self, sensor_list):
self._sensor_list = sensor_list
self._gateway_list = []
def add_gateway(self, gateway):
self._gateway_list.append(gateway)
def remove_gateway(self, gateway):
self._gateway_list.re... | [
[
[
7,
16
]
],
[
[
24,
35
]
],
[
[
44,
60
]
]
] |
#! /usr/bin/python3
#
# Copyright (c) 2017 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#
"""
Create and remove network tunnels to the target via the server
--------------------------------------------------------------
"""
from . import tc
from . import ttb_client
class tunnel(tc.target_extension_c):
... | [
[
[
253,
255
],
[
295,
297
]
],
[
[
270,
280
],
[
4788,
4798
],
[
5135,
5145
],
[
5415,
5425
]
],
[
[
288,
294
]
],
[
[
4748,
4766
],
[
... |
# np_baseball is available
# Import numpy
import numpy as np
# Create np_height_in from np_baseball
np_height_in = np_baseball[:,0]
# Print out the mean of np_height_in
print(np.mean(np_height_in))
# Print out the median of np_height_in
print(np.median(np_height_in))
# np_baseball is available
#... | [
[
[
53,
64
],
[
187,
189
],
[
259,
261
]
],
[
[
108,
120
],
[
195,
207
],
[
269,
281
]
],
[
[
342,
353
],
[
399,
401
],
[
504,
506
... |
"""
Top-level URL lookup for InvenTree application.
Passes URL lookup downstream to each app as required.
"""
from django.conf.urls import url, include
from django.urls import path
from django.contrib import admin
from company.urls import company_urls
from company.urls import manufacturer_part_urls
from company.url... | [
[
[
142,
145
],
[
1758,
1761
],
[
1808,
1811
],
[
1858,
1861
],
[
1902,
1905
],
[
1944,
1947
],
[
1994,
1997
],
[
2040,
2043
],
[
2086,
2089... |
import os
import logging
import pickle
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import al
from al.dataset import mnist
from al.model.model_zoo.simple_cnn import ConvModel
from al.model.mnist import MnistLearner
from al.dataset.mnist import MnistDataset
from al.train... | [
[
[
7,
9
],
[
495,
497
]
],
[
[
17,
24
]
],
[
[
32,
38
]
],
[
[
47,
58
],
[
1405,
1407
],
[
1737,
1739
],
[
1809,
1811
],
[
1850,
... |
from __future__ import annotations
import asyncio
import bisect
import builtins
import concurrent.futures
import errno
import heapq
import logging
import os
import random
import sys
import threading
import warnings
import weakref
from collections import defaultdict, deque, namedtuple
from collections.abc import Hashab... | [
[
[
23,
34
]
],
[
[
43,
50
],
[
35154,
35161
],
[
35428,
35435
],
[
37180,
37187
],
[
44727,
44734
],
[
46346,
46353
],
[
47711,
47718
],
[
92... |
# -*- coding: utf-8 -*-
# Copyright 2022 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... | [
[
[
1052,
1066
],
[
1150,
1164
],
[
1242,
1256
]
],
[
[
1069,
1615
]
]
] |
"""Class to hold the tracks and cameras of a 3D scene.
This can be the output of either data association or of bundle adjustment.
Authors: Ayush Baid, John Lambert, Xiaolong Wu
"""
import itertools
from typing import Any, Dict, List, Optional, Tuple
import numpy as np
from gtsam import PinholeCameraCal3Bundler, Pose3... | [
[
[
189,
198
],
[
6545,
6554
]
],
[
[
218,
221
],
[
8917,
8920
]
],
[
[
223,
227
],
[
1073,
1077
],
[
8907,
8911
]
],
[
[
229,
233
],
[
... |
'''n = 99
p = 'garrafas'
while n > 0:
if n == 1:
p = 'garrafa'
print(f'{n} {p} de cerveja no muro!')
print(f'{n} {p} no muro!')
print('Se uma garrafa cair no chão')
print('Quantas restarão?')
n -= 1
print('Fim da canção!')'''
p = 'garrafas'
for c in range(99, 0, -1):
if c == 1:
... | [
[
[
262,
263
],
[
359,
360
],
[
401,
402
]
],
[
[
282,
283
],
[
312,
313
],
[
355,
356
],
[
397,
398
]
],
[
[
328,
329
],
[
359,
360... |
# -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2018-02-17 21:34
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('wagtailcommerce_carts', '0004_cart_coupon'),
('wagt... | [
[
[
96,
112
]
],
[
[
136,
146
],
[
206,
216
],
[
403,
413
]
],
[
[
148,
154
],
[
499,
505
]
],
[
[
162,
187
],
[
550,
556
]
],
[
[
... |
import os
import numpy as np
from pyhlm.model import WeakLimitHDPHLM, WeakLimitHDPHLMPython
from pyhlm.internals.hlm_states import WeakLimitHDPHLMStates
from pyhlm.word_model import LetterHSMM, LetterHSMMPython
import pyhsmm
import warnings
from tqdm import trange
warnings.filterwarnings('ignore')
import time
#%%
def ... | [
[
[
7,
9
],
[
1856,
1858
],
[
1887,
1889
],
[
1915,
1917
],
[
1949,
1951
],
[
1980,
1982
],
[
2017,
2019
]
],
[
[
17,
28
],
[
2329,
2331... |
#
# MIT License
#
# Copyright 2017 Launchpad project contributors (see COPYRIGHT.md)
#
# 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 ... | [] |
from django.shortcuts import render
from django.views.generic import View
from django.core.exceptions import ObjectDoesNotExist
from django.contrib import messages
from cart.models import Order
class Dashboard(View):
def get(self,*args,**kwargs):
order_qs = Order.objects.filter(user=self.request.user,order... | [
[
[
29,
35
],
[
404,
410
]
],
[
[
69,
73
],
[
211,
215
]
],
[
[
109,
127
]
],
[
[
155,
163
]
],
[
[
188,
193
],
[
271,
276
]
],
[
[
... |
import pytest
from testutils.factories import create_test_person
from django.contrib.auth.models import User, Permission
from openstates.data.models import Person, Organization
from people_admin.models import UnmatchedName, NameStatus, DeltaSet
from people_admin.views import MATCHER_PERM, EDIT_PERM, RETIRE_PERM
import ... | [
[
[
7,
13
],
[
328,
334
],
[
698,
704
],
[
1741,
1747
],
[
2635,
2641
],
[
3552,
3558
],
[
4041,
4047
],
[
5155,
5161
]
],
[
[
46,
64
... |
"""
# Copyright 2021 Huawei Technologies Co., Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | [
[
[
609,
611
],
[
1190,
1192
],
[
1352,
1354
],
[
1390,
1392
],
[
1558,
1560
],
[
3092,
3094
],
[
3149,
3151
],
[
3212,
3214
],
[
4227,
4229... |
"""
Compute the plane wave decomposition for an incident broadband plane wave
on an open circular array using a modal beamformer of finite order.
"""
import numpy as np
import matplotlib.pyplot as plt
import micarray
from micarray.util import db
Nsf = 50 # order of the incident sound field
N = 30 # order of... | [
[
[
166,
177
],
[
373,
375
],
[
422,
424
],
[
439,
441
],
[
510,
512
],
[
1003,
1005
],
[
1013,
1015
],
[
1034,
1036
],
[
1057,
1059
],
... |
# file eulexistdb/manager.py
#
# Copyright 2010,2011 Emory University Libraries
#
# 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
#
... | [
[
[
671,
679
],
[
2633,
2641
],
[
2700,
2708
],
[
2893,
2901
]
],
[
[
706,
713
],
[
2847,
2854
]
],
[
[
743,
751
],
[
2796,
2804
]
],
[
[
... |
class Soma:
def __init__(self):
self.numeroDeCartas = list()
def set_numeroDeCartas(self, numero):
if numero == '':
numero = '1'
numero = numero[:]
self.numeroDeCartas.extend(numero)
def get_numeroDeCartas(self):
... | [
[
[
6,
10
]
]
] |
import torch, math
from torch.optim.optimizer import Optimizer
# RAdam + LARS
class Ralamb(Optimizer):
def __init__(self, params, lr=1e-3, betas=(0.9, 0.999), eps=1e-8, weight_decay=0):
defaults = dict(lr=lr, betas=betas, eps=eps, weight_decay=weight_decay)
self.buffer = [[None, None, None] for in... | [
[
[
7,
12
],
[
1096,
1101
],
[
1168,
1173
]
],
[
[
14,
18
],
[
2427,
2431
]
],
[
[
53,
62
],
[
92,
101
]
],
[
[
85,
91
],
[
350,
... |
# RUN: %PYTHON %s | FileCheck %s
import gc
import io
import itertools
from mlir.ir import *
def run(f):
print("\nTEST:", f.__name__)
f()
gc.collect()
assert Context._get_live_count() == 0
# Verify iterator based traversal of the op/region/block hierarchy.
# CHECK-LABEL: TEST: testTraverseOpRegionBlockIterat... | [
[
[
41,
43
],
[
145,
147
]
],
[
[
51,
53
],
[
13214,
13216
],
[
13432,
13434
]
],
[
[
61,
70
]
],
[
[
91,
92
],
[
167,
174
],
[
374,
... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# pypepa documentation build configuration file, created by
# sphinx-quickstart on Thu Jul 18 15:33:13 2013.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autog... | [
[
[
447,
450
]
],
[
[
452,
454
]
],
[
[
1068,
1078
]
],
[
[
1200,
1214
]
],
[
[
1267,
1280
]
],
[
[
1386,
1396
]
],
[
[
1449,
1456
]
],
[
[
... |
from django.urls import path
from . import views
urlpatterns = [
path('StatsClass', views.index),
path('BasicProbability', views.basic_prob),
]
| [
[
[
24,
28
],
[
70,
74
],
[
107,
111
]
],
[
[
43,
48
],
[
89,
94
],
[
132,
137
]
],
[
[
50,
61
]
]
] |
class DigitalSignatureScheme(object):
def get_public_key(self):
return self.public_key
def sign(self, messsage):
raise NotImplementedError
def verify(self, message, signature):
raise NotImplementedError
| [
[
[
6,
28
]
]
] |
"""
Created by Michele Bianco, 9 July 2021
"""
import numpy as np, pkg_resources
from tqdm import tqdm
import tensorflow as tf
from tensorflow.keras.models import load_model
from tensorflow.keras import backend as K
from tensorflow.python.ops import nn_ops
from tensorflow.python.framework import ops
from tensorflow.... | [
[
[
55,
66
],
[
6418,
6420
],
[
6478,
6480
],
[
6529,
6531
],
[
6726,
6728
],
[
7168,
7170
],
[
7254,
7256
],
[
7282,
7284
],
[
7483,
7485
... |
# coding: utf-8
"""
Sunshine Conversations API
The version of the OpenAPI document: 9.4.5
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from sunshine_conversations_client.configuration import Configuration
from sunshine_conversations_client.undefine... | [
[
[
162,
168
],
[
3886,
3892
]
],
[
[
176,
178
]
],
[
[
201,
204
],
[
3082,
3085
]
],
[
[
263,
276
],
[
1240,
1253
]
],
[
[
329,
338
],
... |
import cv2 as cv
import numpy as np
import os
def preprocess(labels_path, sep_labels_path):
# list all files on labels_path
labels_filenames = os.listdir(labels_path)
count = 0
for label_filename in labels_filenames:
label_path = os.path.join(labels_path, label_filename)
print(f'segme... | [
[
[
7,
16
],
[
576,
578
],
[
1105,
1107
],
[
1256,
1258
]
],
[
[
24,
35
],
[
1138,
1140
],
[
1166,
1168
]
],
[
[
43,
45
],
[
152,
15... |
"""EPR Socket interface."""
from __future__ import annotations
import abc
import logging
from contextlib import contextmanager
from typing import TYPE_CHECKING, Callable, ContextManager, List, Optional, Tuple, Union
from netqasm.logging.glob import get_netqasm_logger
from netqasm.qlink_compat import (
EPRRole,
... | [
[
[
52,
63
]
],
[
[
72,
75
],
[
841,
844
]
],
[
[
83,
90
],
[
4207,
4214
]
],
[
[
114,
128
],
[
38529,
38543
]
],
[
[
148,
161
],
[
... |
# Copyright 2020 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | [
[
[
790,
796
],
[
9866,
9872
],
[
10058,
10064
]
],
[
[
804,
812
],
[
2417,
2425
],
[
7731,
7739
],
[
7328,
7336
]
],
[
[
820,
827
],
[
99... |
# Copyright 2021 DeepMind Technologies Limited. 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 ... | [
[
[
774,
777
],
[
7111,
7114
]
],
[
[
779,
787
],
[
1137,
1145
],
[
5852,
5860
],
[
6225,
6233
]
],
[
[
796,
800
],
[
1027,
1031
]
],
[
[
... |
import pandas
import numpy as np
import matplotlib.pyplot as plt
import scipy.stats as st
from pylab import rcParams
df = pandas.read_csv('rewards_loc3.csv')
ucb,ts,ovr,egr,egr2,agr,agr2,efr,ac,aac,sft = df['ucb'],df['ts'],df['ovr'],\
df['egr'],df['egr2'],df['agr'],df['agr2'],df['efr'],df['ac'],df['aac'],df['sft']
... | [
[
[
7,
13
],
[
124,
130
]
],
[
[
21,
32
]
],
[
[
40,
64
],
[
1905,
1908
],
[
1994,
1997
],
[
2067,
2070
],
[
2143,
2146
],
[
2222,
2... |
from datetime import datetime
from dino.config import UserKeys, RedisKeys, SessionKeys
from dino.db.rdbms.models import Channels
from dino.db.rdbms.models import Rooms
from test.base import BaseTest
from test.db import BaseDatabaseTest
class DatabaseSqliteTest(BaseDatabaseTest):
def setUp(self):
self.set... | [
[
[
21,
29
],
[
882,
890
],
[
1002,
1010
]
],
[
[
55,
63
],
[
2962,
2970
],
[
3065,
3073
],
[
3166,
3174
],
[
3271,
3279
]
],
[
[
65,
... |
import pandas as pd
__author__ = 'slei'
class AddHeuristicTSP:
""" Finds the shortest path using a heuristic method """
def __init__(self, cities_df):
self.df = cities_df
self.edges = list((t.origin, t.destination) for t in df.itertuples())
self.distance = dict([((t.origin, t.destina... | [
[
[
7,
19
],
[
5080,
5082
],
[
3973,
3975
]
],
[
[
21,
31
]
],
[
[
49,
64
],
[
5123,
5138
]
],
[
[
5075,
5077
],
[
5139,
5141
],
[
252... |
import numpy as np
from scipy.spatial.distance import euclidean
from typing import Union
import pandas
class CLOSE(object):
def __init__(self, data: pandas.DataFrame, measure: Union[str, callable] = 'mse', minPts: int = None, output: bool = False,
jaccard: bool = False, weighting: bool = False, ... | [
[
[
7,
18
],
[
8215,
8217
],
[
8243,
8245
],
[
10159,
10161
],
[
10565,
10567
],
[
13273,
13275
],
[
13599,
13601
],
[
16950,
16952
],
[
17798,
... |
import discord
from discord.ext import commands
from Modules import CONSTANT
from Modules.Checks import check_if_role_or_bot_spam
class Roles(commands.Cog):
def __init__(self, bot: commands.Bot):
self.bot = bot
@commands.command()
@check_if_role_or_bot_spam()
async def role(self, ctx: comman... | [
[
[
7,
14
],
[
2800,
2807
],
[
3393,
3400
],
[
4072,
4079
],
[
6351,
6358
],
[
6703,
6710
],
[
7055,
7062
]
],
[
[
39,
47
],
[
145,
153
... |
from django.db import models
from django.forms import ModelForm
from django.forms import TextInput
from .models import agendamento
#import datetime
#class frm_agendamento(forms.ModelForm):
#
# data_agendamento = forms.DateField(label="Data",initial=datetime.date.today)
# horario_inicio = forms.TimeField(label="In... | [
[
[
22,
28
]
],
[
[
54,
63
],
[
586,
595
]
],
[
[
89,
98
],
[
811,
820
],
[
929,
938
],
[
1000,
1009
],
[
1066,
1075
]
],
[
[
119,
... |
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the License);
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, sof... | [
[
[
667,
682
]
],
[
[
706,
714
]
],
[
[
738,
752
]
],
[
[
761,
763
],
[
1022,
1024
],
[
1111,
1113
]
],
[
[
771,
777
],
[
1198,
1204
],
... |
# a = 2
print("check this file")
| [] |
# technical
from .base_output import BaseOutput
# default
from .matplotlib_plot import MatplotlibPlot
from .extrema_printer import ExtremaPrinter
# with external dependencies
# import are respective __init__ methods
# hack-ish, but works (and I am not aware of a more proper way to do so)
from .bokeh_plot import Bo... | [
[
[
38,
48
]
],
[
[
90,
104
]
],
[
[
134,
148
]
],
[
[
318,
327
]
],
[
[
356,
369
]
],
[
[
402,
419
]
],
[
[
455,
474
]
],
[
[
520,
... |
#!/usr/bin/env python3
# Copyright (c) 2016 The Sikacoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test Hierarchical Deterministic wallet function."""
from test_framework.test_framework import SikacoinTest... | [
[
[
308,
329
],
[
440,
461
]
],
[
[
368,
380
],
[
1071,
1083
],
[
1271,
1283
],
[
2059,
2071
],
[
2131,
2143
],
[
2530,
2542
],
[
2644,
... |
import torch.nn as nn
import torch
from torch.autograd import Variable
import math
import torch.utils.model_zoo as model_zoo
from commons.siam_mask.models.features import Features
__all__ = ['ResNet', 'resnet18', 'resnet34', 'resnet50', 'resnet101',
'resnet152']
model_urls = {
'resnet18': 'https://dow... | [
[
[
7,
21
],
[
903,
905
],
[
3194,
3196
],
[
777,
779
],
[
1120,
1122
],
[
1163,
1165
],
[
1249,
1251
],
[
1882,
1884
],
[
1956,
1958
],... |
import tensorflow as tf
from tensorflow.python.client import device_lib
def get_available_gpus():
local_device_protos = device_lib.list_local_devices()
return [x.name for x in local_device_protos if x.device_type == 'GPU']
gpus = get_available_gpus
def split_nest(nest, num_or_size_splits, axis=0):
"""... | [
[
[
7,
23
],
[
554,
556
],
[
597,
599
],
[
670,
672
],
[
1070,
1072
],
[
2208,
2210
],
[
2407,
2409
],
[
2454,
2456
]
],
[
[
62,
72
... |
# import gevent.monkey
# gevent.monkey.patch_socket()
from pyEtherCAT import MasterEtherCAT
import time
import os
#============================================================================#
# C95用の簡易EtherCATパッケージです。
# 本来は細かいパケットに付いて理解を深めた上で仕組みを構築していきますが、
# 説明も実験も追いつかず、ひとまずGPIOで高速にON/OFF出来る部分だけを纏めました。
# 動作は Linux(R... | [
[
[
77,
91
],
[
584,
598
]
],
[
[
99,
103
],
[
3502,
3506
],
[
3607,
3611
],
[
3712,
3716
],
[
3963,
3967
],
[
4068,
4072
],
[
4173,
417... |
"""Porcupine is a simple editor.
You are probably reading this because you want to learn how Porcupine
works or write fun plugins for it. I recommend getting started with the
plugin API documentation:
https://akuli.github.io/porcupine/
"""
import sys
import appdirs
version_info = (0, 99, 2) # this is updated ... | [
[
[
254,
257
],
[
477,
480
]
],
[
[
266,
273
],
[
609,
616
],
[
664,
671
]
],
[
[
275,
287
],
[
371,
383
]
],
[
[
344,
355
]
],
[
[
... |
from .PCA import PCA
from .InvariantsMiner import InvariantsMiner
from .LogClustering import LogClustering
from .LR import LR
from .SVM import SVM
from .DecisionTree import DecisionTree
from .IsolationForest import IsolationForest
from .DeepLog import DeepLog
from .Autoencoder import Autoencoder
from .AutoencoderLSTM i... | [
[
[
17,
20
]
],
[
[
50,
65
]
],
[
[
93,
106
]
],
[
[
123,
125
]
],
[
[
143,
146
]
],
[
[
173,
185
]
],
[
[
215,
230
]
],
[
[
252,
25... |
import abc
class AbstractClassifier:
""" Abstract class with specific methods for classifier models (training, validation and test) """
def __init__(self):
pass
@abc.abstractmethod
def train(self, config, train_data):
"""
Classifier training.
:param config: Model con... | [
[
[
7,
10
],
[
186,
189
],
[
531,
534
],
[
819,
822
]
],
[
[
19,
37
]
]
] |
import frappe
def execute():
# there is no more status called "Submitted", there was an old issue that used
# to set it as Submitted, fixed in this commit
frappe.db.sql("""
update
`tabPurchase Receipt`
set
status = 'To Bill'
where
status = 'Submitted'""") | [
[
[
7,
13
],
[
159,
165
]
],
[
[
19,
26
]
]
] |
import os
import unittest
import tempfile
from unittest import mock
import uuid
import mlflow
import mlflow.db
import mlflow.store.db.base_sql_model
from mlflow.entities.model_registry import (
RegisteredModel,
ModelVersion,
RegisteredModelTag,
ModelVersionTag,
)
from mlflow.exceptions import MlflowEx... | [
[
[
7,
9
],
[
985,
987
],
[
1220,
1222
]
],
[
[
17,
25
],
[
651,
659
]
],
[
[
34,
42
],
[
872,
880
]
],
[
[
64,
68
],
[
4374,
43... |
# Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.
import itertools
import os
import shutil
import tempfile
import mock
from nose.tools import raises, assert_raises
try:
from . import parse_s3
from digits.tools.mock_s3_walker import MockS3Walker
import_failed = False
except ImportError:... | [
[
[
77,
86
],
[
6125,
6134
],
[
6204,
6213
],
[
6229,
6238
],
[
6605,
6614
]
],
[
[
94,
96
],
[
2064,
2066
],
[
2766,
2768
],
[
2796,
27... |
import re
import time
import typing
import logging
from calendar import monthrange
from datetime import datetime
from collections import Iterable
from heapq import heappush, heappop
from . import types # noqa
from . exceptions import BrokerError
from . interfaces import App, Plugin, Logger
from . utils import cached_p... | [
[
[
7,
9
],
[
7338,
7340
],
[
7438,
7440
],
[
7525,
7527
],
[
7623,
7625
],
[
7708,
7710
]
],
[
[
17,
21
],
[
3766,
3770
]
],
[
[
29,
... |
# Copyright (c) Facebook, Inc. and its affiliates.
# 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.
from .api import RendezvousHandler, RendezvousParameters
from .api import rendezvous_handler_registry as handler_... | [
[
[
224,
241
],
[
438,
455
],
[
619,
636
],
[
791,
808
],
[
1116,
1133
],
[
1644,
1661
]
],
[
[
243,
263
],
[
413,
433
],
[
594,
614
... |
#!/usr/bin/env python3
from app import app, db, functions
from app.functions import Color
import subprocess
import os
import shlex
import shutil
from config import Config
from datetime import datetime
from cryptography.fernet import InvalidToken
from app.cipher import CipherTest, Cipher, new_cipher_key, encrypt, decryp... | [
[
[
39,
42
],
[
900,
903
],
[
5758,
5761
],
[
5965,
5968
]
],
[
[
44,
46
],
[
981,
983
],
[
3157,
3159
],
[
3188,
3190
],
[
3444,
3446
... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Software License Agreement (BSD License)
#
# Copyright (c) 2021, Kei Okada
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions... | [
[
[
1653,
1661
],
[
2372,
2380
]
],
[
[
1669,
1672
],
[
6636,
6639
]
],
[
[
1680,
1684
],
[
4554,
4558
],
[
5040,
5044
],
[
6033,
6037
]
],
[
... |
import unittest
from almdrlib.session import Session
import re
MOCK_AUTH = {
"authentication": {
"user": {
"id": "589B64BB-AE91-4FA9-A6D8-37AC6759BB5D",
"account_id": "2",
"created": {
"at": 1443713420,
"by": "693BA145-78C0-4C77-AC1A-53854... | [
[
[
7,
15
],
[
1434,
1442
],
[
2119,
2127
]
],
[
[
45,
52
],
[
1501,
1508
],
[
1658,
1665
]
],
[
[
60,
62
],
[
1351,
1353
]
],
[
[
64,... |
# -*- coding: utf-8 -*-
# Copyright 2014-2016 OpenMarket Ltd
# Copyright 2018-9 New Vector Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2... | [
[
[
717,
721
],
[
1549,
1553
]
],
[
[
729,
731
],
[
1617,
1619
]
],
[
[
739,
742
],
[
812,
815
],
[
894,
897
]
],
[
[
1162,
1170
],
[
... |
import numpy as np
import sys
import gpflow
import VFF
from time import time
from config import *
dim = sys.argv[1]
rep = sys.argv[2]
print('vff: dimension {}, replicate {}'.format(dim, r))
# data
data = np.load('data/data_dim{}_rep{}.npz'.format(dim, 0))
# full_gp
def prodkern(dim):
return gpflow.kernels.Pro... | [
[
[
7,
18
],
[
209,
211
],
[
565,
567
],
[
681,
683
],
[
965,
967
],
[
985,
987
],
[
1111,
1113
],
[
1251,
1253
],
[
1271,
1273
],
[... |
import pandas as pd
from datanator.util import rna_halflife_util
import datetime
import datanator.config.core
import datetime
from pymongo.collation import Collation, CollationStrength
class Halflife(rna_halflife_util.RnaHLUtil):
def __init__(self, cache_dir=None, server=None, src_db=None, protein_col=None,
... | [
[
[
7,
19
]
],
[
[
47,
64
],
[
202,
219
]
],
[
[
72,
80
]
],
[
[
88,
109
],
[
6905,
6914
],
[
6996,
7005
],
[
7085,
7094
]
],
[
[
... |
import os
from pathlib import Path
import numpy as np
import pytest
from jina import Flow, Document
from jina.clients import Client
from jina.logging.profile import TimeContext
from jina.parsers import set_client_cli_parser
from typing import Dict
from jina import DocumentArray, Executor, requests
class DumpExecuto... | [
[
[
7,
9
],
[
551,
553
],
[
1309,
1311
],
[
3286,
3288
]
],
[
[
30,
34
],
[
2350,
2354
]
],
[
[
43,
54
],
[
2159,
2161
]
],
[
[
62,
... |
# (C) Datadog, Inc. 2010-2016
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
from threading import Thread
import functools
_thread_by_func = {}
class TimeoutException(Exception):
"""
Raised when a function runtime exceeds the limit set.
"""
pass
class ThreadMethod(Thre... | [
[
[
129,
135
],
[
316,
322
],
[
585,
591
]
],
[
[
143,
152
],
[
1278,
1287
]
],
[
[
154,
169
],
[
1443,
1458
],
[
1550,
1565
],
[
1663,
... |
# Copyright 2016 Hewlett Packard Enterprise Development Company, L.P.
#
# 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 b... | [
[
[
638,
652
],
[
798,
805
]
],
[
[
676,
686
],
[
2884,
2894
]
],
[
[
709,
716
],
[
2583,
2590
],
[
2735,
2742
]
],
[
[
739,
745
],
[
... |
from .operation import Operation
| [
[
[
24,
33
]
]
] |
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
# ... | [
[
[
669,
676
]
],
[
[
743,
754
],
[
4532,
4543
],
[
5960,
5971
],
[
7362,
7373
],
[
8691,
8702
]
],
[
[
3358,
3367
]
],
[
[
4746,
4759
]
],
... |
# -*- coding: utf-8 -*-
##########################################################################
# NSAp - Copyright (C) CEA, 2019
# Distributed under the terms of the CeCILL-B license, as published by
# the CEA-CNRS-INRIA. Refer to the LICENSE file or to
# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
#... | [
[
[
498,
505
],
[
655,
662
]
],
[
[
513,
520
],
[
4210,
4217
]
],
[
[
528,
539
],
[
3254,
3256
],
[
3293,
3295
],
[
3759,
3761
],
[
4018,
... |
# -*- coding: utf-8 -*-
from PySide2 import QtCore, QtGui, QtWidgets
import json
import core_functions as cf
import numpy as np
from UI_labeled_slider import LabeledSlider
class Ui_AssignGroup(object):
def setupUi(self, AssignGroups):
# Note: this is not how it should be done but currently I don't know
... | [
[
[
44,
50
],
[
4654,
4660
],
[
8339,
8345
],
[
8456,
8462
]
],
[
[
52,
57
]
],
[
[
59,
68
],
[
2308,
2317
],
[
3664,
3673
],
[
3888,
... |
# Dictionary
class Dict_word_jumbler(object):
def __init__(self):
self.dict = self.build_dict()
def build_dict(self):
""""Build a dictionary to hold all of the words/letters"""
dic = {}
f = open("/usr/share/dict/words", "r")
word_list = f.readlines()
for word in ... | [
[
[
19,
36
],
[
1040,
1057
]
],
[
[
980,
985
],
[
1082,
1087
]
],
[
[
1031,
1037
],
[
1064,
1070
]
]
] |
import pickle
dict1 = {'Python ':90,'Java ':95,'C++ ':85}
f = open('bin)file.dat','wb')
pickle.dump(dict1,f)
f.close() | [
[
[
7,
13
],
[
89,
95
]
],
[
[
15,
20
],
[
101,
106
]
],
[
[
59,
60
],
[
107,
108
],
[
110,
111
]
]
] |
"""
Testing ResGraphNet
"""
import datetime
import numpy as np
import pandas as pd
import torch
import os
import os.path as osp
import matplotlib.pyplot as plt
import sys
sys.path.append("..")
import func.cal as cal
device = "cuda:0" if torch.cuda.is_available() else "cpu"
# device = "cpu"
l_x = 60 ... | [
[
[
35,
43
],
[
3114,
3122
],
[
4852,
4860
]
],
[
[
51,
62
],
[
1323,
1325
],
[
1705,
1707
],
[
4432,
4434
],
[
4440,
4442
],
[
5088,
50... |
import numpy as np
def FNS(scores):
domination = np.all(scores[:, None, :] <= scores[None, :, :], axis=2) # domination[i, j] = "i dominuje j"
domination &= np.any(scores[:, None, :] < scores[None, :, :], axis=2)
Nx = domination.sum(0)
Pf = []
ranks = np.zeros(scores.shape[0])
r = 0
Q = n... | [
[
[
7,
18
],
[
55,
57
],
[
167,
169
],
[
275,
277
],
[
319,
321
],
[
510,
512
],
[
602,
604
],
[
644,
646
],
[
692,
694
],
[
8... |
"""
Misc functions.
"""
import ipaddress
import datetime
import hashlib
import json
import netaddr
import netifaces
import os
import re
import requests
import scapy.all as sc
import subprocess
import sys
import threading
import time
import traceback
import uuid
import server_config
IPv4_REGEX = re.compile(r'[0-9]{... | [
[
[
32,
41
]
],
[
[
50,
58
],
[
1814,
1822
],
[
6084,
6092
]
],
[
[
66,
73
],
[
6568,
6575
]
],
[
[
81,
85
],
[
1137,
1141
],
[
1651,
... |
# Project: py-trans
# Author: Itz-fork
import aiohttp
from .language_codes import _get_full_lang_name, _get_lang_code
from .errors import check_internet_connection, UnknownErrorOccurred
class Async_PyTranslator:
"""
Async PyTranslator Class
Note:
Before Trying to Translate Create an instance of ... | [
[
[
46,
53
],
[
1342,
1349
],
[
1480,
1487
]
],
[
[
83,
102
],
[
8440,
8459
]
],
[
[
104,
118
],
[
8602,
8616
]
],
[
[
139,
164
],
[
8... |
# -*- coding: utf-8 -*-
"""API for working with saved queries for assets."""
import warnings
from typing import Generator, List, Optional, Union
from ...constants.api import MAX_PAGE_SIZE
from ...exceptions import NotFoundError, ResponseError, ApiWarning
# from ...features import Features
from ...parsers.tables impor... | [
[
[
84,
92
],
[
10387,
10395
]
],
[
[
113,
122
],
[
5094,
5103
],
[
5494,
5503
]
],
[
[
124,
128
],
[
3441,
3445
],
[
3416,
3420
],
[
4616... |
"""
Miscellaneous package utilities.
.. include:: ../include/links.rst
"""
from itertools import chain, combinations
from IPython import embed
import numpy
def all_subclasses(cls):
"""
Collect all the subclasses of the provided class.
The search follows the inheritance to the highest-level class. I... | [
[
[
99,
104
],
[
3550,
3555
]
],
[
[
106,
118
],
[
3570,
3582
]
],
[
[
140,
145
]
],
[
[
155,
160
],
[
1754,
1759
],
[
5000,
5005
],
[
... |
import math
import tensorflow as tf
import os
import struct
import pdb
import numpy as np
from datasets import dataset_factory
from nets import nets_factory
import nets.resnet_v2 as resnet_v2
from preprocessing import preprocessing_factory
slim = tf.contrib.slim
def merge_predictions(predictions_fn):
'''
Merge... | [
[
[
7,
11
],
[
3408,
3412
]
],
[
[
19,
35
],
[
247,
249
],
[
1837,
1839
],
[
2506,
2508
],
[
3085,
3087
],
[
3165,
3167
],
[
3203,
3205
... |
# -*- coding: utf-8 -*-
from logging import getLogger
from time import time, strftime
from BTrees.IIBTree import IITreeSet
from Products.CMFCore.utils import getToolByName
from Products.Five.browser import BrowserView
from plone.uuid.interfaces import IUUID, IUUIDAware
from zope.interface import implementer
from zope.... | [
[
[
44,
53
],
[
1052,
1061
]
],
[
[
71,
75
],
[
1255,
1259
]
],
[
[
77,
85
],
[
2559,
2567
]
],
[
[
114,
123
],
[
11940,
11949
]
],
[
[
... |
"""
One of the central problems in statistics is to make estimations — and quantify
how good these estimations are — of the distribution of an entire population
given only a small (random) sample. A classic example is to estimate the average
height of all the people in a country when measuring the height of a randomly
... | [
[
[
995,
999
],
[
1433,
1437
]
],
[
[
1007,
1019
],
[
1060,
1062
]
],
[
[
1039,
1044
],
[
1462,
1467
]
],
[
[
1046,
1057
],
[
1240,
1251
],
... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from collections import Iterable
def flatten(input_arr, output_arr = None):
if output_arr is None:
output_arr = []
for t in input_arr:
if isinstance(t, Iterable):
flatten(t, output_arr)
else:
output_arr.append(t)
... | [
[
[
70,
78
],
[
224,
232
],
[
416,
424
]
],
[
[
85,
92
],
[
247,
254
]
],
[
[
344,
356
],
[
450,
462
]
]
] |
# 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... | [
[
[
722,
748
],
[
1077,
1079
],
[
1086,
1088
],
[
1098,
1100
],
[
1110,
1112
],
[
1128,
1130
],
[
1547,
1549
],
[
22262,
22264
],
[
23959,
2... |
"""
ArcBall.py -- Math utilities, vector, matrix types and ArcBall quaternion rotation class
>>> unit_test_ArcBall_module ()
unit testing ArcBall
Quat for first drag
[ 0.08438914 -0.08534209 -0.06240178 0.99080837]
First transform
[[ 0.97764552 -0.1380603 0.15858325 0. ]
[ 0.10925253 0.97796899 0.1778779... | [
[
[
896,
912
],
[
942,
949
],
[
4414,
4421
],
[
4467,
4474
],
[
4518,
4525
],
[
4568,
4575
],
[
4631,
4638
],
[
4757,
4764
],
[
4882,
4889
... |
import os
import boto3
import fsspec
import pytest
from moto import mock_s3
from datasets.filesystems import (
COMPRESSION_FILESYSTEMS,
HfFileSystem,
S3FileSystem,
extract_path_from_uri,
is_remote_filesystem,
)
from .utils import require_lz4, require_zstandard
@pytest.fixture(scope="function")
... | [
[
[
7,
9
],
[
390,
392
],
[
446,
448
],
[
506,
508
],
[
568,
570
],
[
2076,
2078
]
],
[
[
18,
23
],
[
718,
723
]
],
[
[
31,
37
]... |
# Copyright 2014 Facebook, Inc.
# You are hereby granted a non-exclusive, worldwide, royalty-free license to
# use, copy, modify, and distribute this software in source code or binary
# form for use in connection with the web services and APIs provided by
# Facebook.
# As with any software that integrates with the Fa... | [
[
[
1099,
1113
],
[
1892,
1906
]
],
[
[
1173,
1191
],
[
1637,
1655
]
],
[
[
1245,
1257
],
[
2894,
2906
]
],
[
[
1292,
1307
],
[
2585,
2600
]
]... |
from base_app.serializers import CustomUserSerializer
from rest_framework import serializers
from task_app.models import TaskFile
class TaskFileCreateSerializer(serializers.ModelSerializer):
'''Serializer for creating task files'''
author = CustomUserSerializer(read_only=True)
class Meta:
model ... | [
[
[
33,
53
],
[
252,
272
],
[
668,
688
],
[
1093,
1113
]
],
[
[
81,
92
],
[
163,
174
],
[
438,
449
],
[
594,
605
],
[
853,
864
],
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.