content stringlengths 1 1.05M | input_ids listlengths 1 883k | ratio_char_token float64 1 22.9 | token_count int64 1 883k |
|---|---|---|---|
from mozi.utils.theano_utils import shared_zeros, alloc_zeros_matrix, shared_ones
from mozi.layers.template import Template
from mozi.weight_init import OrthogonalWeight, GaussianWeight, Identity
import theano.tensor as T
import theano
| [
198,
6738,
6941,
17027,
13,
26791,
13,
1169,
5733,
62,
26791,
1330,
4888,
62,
9107,
418,
11,
36836,
62,
9107,
418,
62,
6759,
8609,
11,
4888,
62,
1952,
198,
6738,
6941,
17027,
13,
75,
6962,
13,
28243,
1330,
37350,
198,
6738,
6941,
17... | 3.273973 | 73 |
import threading
from typing import Union
from sqlalchemy import Column, Integer, String, Boolean
from emilia.modules.sql import SESSION, BASE
PermanentPin.__table__.create(checkfirst=True)
PERMPIN_LOCK = threading.RLock()
| [
11748,
4704,
278,
198,
6738,
19720,
1330,
4479,
198,
198,
6738,
44161,
282,
26599,
1330,
29201,
11,
34142,
11,
10903,
11,
41146,
198,
198,
6738,
795,
17517,
13,
18170,
13,
25410,
1330,
311,
47621,
11,
49688,
628,
198,
47,
30312,
28348,
... | 3.367647 | 68 |
#!/usr/bin/env python3
# Before you can use Piggies, you need actual wallets.
# To fetch and extract the wallet clients, and create wallet files:
# mkdir wallets && cd wallets
#
# wget https://download.electrum.org/3.1.3/Electrum-3.1.3.tar.gz
# tar xvzf Electrum-3.1.3.tar.gz
# cd Electrum-3.1.3/
# mkdir -p ../../data... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
2,
7413,
345,
460,
779,
350,
6950,
444,
11,
345,
761,
4036,
29608,
13,
198,
2,
1675,
21207,
290,
7925,
262,
13008,
7534,
11,
290,
2251,
13008,
3696,
25,
198,
198,
2,
33480... | 2.387705 | 1,220 |
# -*- coding: utf-8 -*-
import sys
import os
import numpy as np
import fourier as ff
import matplotlib
import warnings
from matplotlib import pyplot as plt
from os.path import isfile
matplotlib.use('Agg')
def get_stratification_labels(data, n_folds):
"""
Create an array of stratification labels from an arr... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
25064,
198,
11748,
28686,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
46287,
5277,
355,
31246,
198,
11748,
2603,
29487,
8019,
198,
11748,
14601,
198,
6738,
2603,
... | 2.427653 | 1,555 |
# -*- coding: utf-8 -*-
"""facetool.annotator
The files provides a Face Annotator in charge of combining the result of the
Face Detector and Face Landmark in a single pandas DataFrame. This Face
Annotator is the API built to be used by the end user.
"""
from facetool.detector import FaceDetector
from facetool.landmar... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
69,
23253,
970,
13,
34574,
1352,
198,
198,
464,
3696,
3769,
257,
15399,
1052,
1662,
1352,
287,
3877,
286,
19771,
262,
1255,
286,
262,
198,
32388,
4614,
9250,
290,... | 3.330769 | 130 |
from __future__ import print_function
import numpy as np
import os
from datetime import datetime
from pygrn.problems import TimeRegression
| [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28686,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
12972,
2164,
77,
13,
1676,
22143,
1330,
3862,
8081,
2234,
628
] | 3.783784 | 37 |
# This code is available under the MIT License.
# (c)2010-2011 Nakatani Shuyo / Cybozu Labs Inc.
# (c)2018-2019 Hiroki Iida / Retrieva Inc.
import nltk
import re
import MeCab
stopwords_list = nltk.corpus.stopwords.words('english')
recover_list = {"wa":"was", "ha":"has"}
wl = nltk.WordNetLemmatizer()
def load_corpu... | [
2,
770,
2438,
318,
1695,
739,
262,
17168,
13789,
13,
198,
2,
357,
66,
8,
10333,
12,
9804,
22255,
265,
3216,
911,
4669,
78,
1220,
5934,
2127,
27624,
23500,
3457,
13,
198,
2,
357,
66,
8,
7908,
12,
23344,
25940,
4106,
314,
3755,
1220... | 2.253659 | 410 |
# -*- coding: utf-8 -*-
from pyramid.httpexceptions import HTTPBadRequest, HTTPNotFound
from pyramid.view import view_defaults, view_config
from kubb_match.data.mappers import map_team, map_game
from kubb_match.data.models import Team
from kubb_match.service.tournament_service import TournamentService
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
27944,
13,
2804,
24900,
11755,
1330,
14626,
22069,
18453,
11,
14626,
3673,
21077,
198,
6738,
27944,
13,
1177,
1330,
1570,
62,
12286,
82,
11,
1570,
62,
11250,
198,
... | 3.336957 | 92 |
import codecs
import numpy as np
from word_beam_search import WordBeamSearch
def apply_word_beam_search(mat, corpus, chars, word_chars):
"""Decode using word beam search. Result is tuple, first entry is label string, second entry is char string."""
T, B, C = mat.shape
# decode using the "Words" mode of ... | [
11748,
40481,
82,
198,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
1573,
62,
40045,
62,
12947,
1330,
9678,
3856,
321,
18243,
628,
198,
4299,
4174,
62,
4775,
62,
40045,
62,
12947,
7,
6759,
11,
35789,
11,
34534,
11,
1573,
62,
354,
... | 2.43211 | 1,090 |
"""add session type and instructor
Revision ID: 54df4fb8dfe9
Revises: a3be4710680d
Create Date: 2021-09-25 03:08:18.501929
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '54df4fb8dfe9'
down_revision = 'a3be4710680d'
branch_labels = None
depends_on = None
| [
37811,
2860,
6246,
2099,
290,
21187,
198,
198,
18009,
1166,
4522,
25,
7175,
7568,
19,
21855,
23,
67,
5036,
24,
198,
18009,
2696,
25,
257,
18,
1350,
2857,
15801,
1795,
67,
198,
16447,
7536,
25,
33448,
12,
2931,
12,
1495,
7643,
25,
29... | 2.556452 | 124 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Nov 27 22:31:17 2018
@author: qzane
"""
import numpy as np
import matplotlib.pyplot as plt
from argparse import ArgumentParser
if __name__ == "__main__":
parser = ArgumentParser()
parser.add_argument('-p', '--points', action='store... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
30030,
5267,
2681,
2534,
25,
3132,
25,
1558,
2864,
198,
198,
31,
9800,
25,
10662,
89,
153... | 2.255738 | 305 |
# -*- coding: utf-8 -*-
"""Top-level package for commonutils."""
__author__ = """lrbsunday"""
__email__ = '272316131@qq.com'
__version__ = '0.1.0'
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
9126,
12,
5715,
5301,
329,
2219,
26791,
526,
15931,
198,
198,
834,
9800,
834,
796,
37227,
14050,
1443,
917,
323,
37811,
198,
834,
12888,
834,
796,
705,
1983,... | 2.292308 | 65 |
# -*- coding: utf-8 -*-
from django.utils.timesince import timesince
# noinspection PyMethodMayBeStatic
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
42625,
14208,
13,
26791,
13,
22355,
924,
1330,
1661,
924,
628,
198,
198,
2,
645,
1040,
14978,
9485,
17410,
6747,
3856,
45442,
628
] | 2.842105 | 38 |
import os
from os.path import join, isfile
from shutil import Error
from sys import exec_prefix
import numpy as np
import fit
import simple_read_data
from tabulate import tabulate
import logging
np.seterr(all='raise')
def check_data_format(data):
'''
check if the input data satisfies the following requiresmen... | [
11748,
28686,
198,
6738,
28686,
13,
6978,
1330,
4654,
11,
318,
7753,
198,
6738,
4423,
346,
1330,
13047,
198,
6738,
25064,
1330,
2452,
62,
40290,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
4197,
198,
11748,
2829,
62,
961,
62,
7890,
... | 2.527822 | 629 |
from django.db import models
from wagtail.admin.edit_handlers import FieldPanel, StreamFieldPanel, MultiFieldPanel
from wagtail.core.blocks import StreamBlock
from wagtail.core.fields import StreamField
from wagtail.images.edit_handlers import ImageChooserPanel
from falmer.content import components
from falmer.content.... | [
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
266,
363,
13199,
13,
28482,
13,
19312,
62,
4993,
8116,
1330,
7663,
26639,
11,
13860,
15878,
26639,
11,
15237,
15878,
26639,
198,
6738,
266,
363,
13199,
13,
7295,
13,
27372,
1330,
1386... | 3.725191 | 131 |
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
import re
import spacy
from time import time
import pickle
from collections import defaultdict
import pmi_tfidf_classifier as ptic
path = "../data/"
pd.set_option("display.max_rows", None, "display.max_columns", None)
np.random.seed(250)
spacy.pre... | [
11748,
19798,
292,
355,
279,
67,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
302,
198,
11748,
599,
1590,
198,
6738,
640,
1330,
640,
198,
11748,
2298,
293,
198,
6738,
17... | 2.562353 | 425 |
"""Tests for the marion application fields"""
from marion.defaults import DocumentIssuerChoices
from ..fields import IssuerLazyChoiceField, LazyChoiceField
def test_fields_lazy_choice_field():
"""
LazyChoiceField class.
Choices instance attribute should not be customizable.
"""
field = LazyChoic... | [
37811,
51,
3558,
329,
262,
1667,
295,
3586,
7032,
37811,
198,
198,
6738,
1667,
295,
13,
12286,
82,
1330,
16854,
27738,
15573,
22164,
1063,
198,
198,
6738,
11485,
25747,
1330,
10585,
15573,
43,
12582,
46770,
15878,
11,
406,
12582,
46770,
... | 2.723647 | 351 |
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 3 12:15:40 2022
@author: udaya
"""
# -*- coding: utf-8 -*-
"""
Created on Sun Feb 27 18:06:29 2022
@author: udaya
"""
import cv2
import numpy as np
from djitellopy import Tello
frameWidth = 640
frameHeight = 480
###############################
... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
37811,
201,
198,
41972,
319,
26223,
1526,
220,
513,
1105,
25,
1314,
25,
1821,
33160,
201,
198,
201,
198,
31,
9800,
25,
334,
820,
64,
201,
198,
37811,
201,
198,
... | 2.126675 | 821 |
# (C) Copyright 2020 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
# In applying this licence, ECMWF does not waive the privileges and immunities
# granted to it by virtue of its status as an intergovernmenta... | [
2,
357,
34,
8,
15069,
12131,
13182,
14326,
37,
13,
198,
2,
198,
2,
770,
3788,
318,
11971,
739,
262,
2846,
286,
262,
24843,
10483,
594,
10628,
362,
13,
15,
198,
2,
543,
460,
307,
6492,
379,
2638,
1378,
2503,
13,
43073,
13,
2398,
... | 2.924399 | 582 |
# This file is part of the Data Cleaning Library (openclean).
#
# Copyright (C) 2018-2021 New York University.
#
# openclean is released under the Revised BSD License. See file LICENSE for
# full license details.
"""Collection of helper functions for various purpoeses."""
from typing import Optional
import uuid
de... | [
2,
770,
2393,
318,
636,
286,
262,
6060,
5985,
278,
10074,
357,
9654,
27773,
737,
198,
2,
198,
2,
15069,
357,
34,
8,
2864,
12,
1238,
2481,
968,
1971,
2059,
13,
198,
2,
198,
2,
1280,
27773,
318,
2716,
739,
262,
31492,
347,
10305,
... | 2.98254 | 630 |
nome= input('Qual seu nome ?: ')
print ('Ol {} Seja bem vindo'.format(nome))
| [
77,
462,
28,
5128,
10786,
46181,
384,
84,
299,
462,
5633,
25,
705,
8,
198,
4798,
19203,
30098,
23884,
1001,
6592,
307,
76,
29178,
78,
4458,
18982,
7,
77,
462,
4008,
198
] | 2.40625 | 32 |
from .openpondk_class_diagram_parser import OpenponkClsDiagramParser | [
6738,
764,
9654,
79,
623,
74,
62,
4871,
62,
10989,
6713,
62,
48610,
1330,
4946,
79,
261,
74,
2601,
82,
18683,
6713,
46677
] | 2.956522 | 23 |
from .conv import Conv
from .conv_maxpool import ConvMaxpool
from .embedding import Embedding
from .linear import Linear
from .lstm import LSTM
__all__ = ["LSTM",
"Embedding",
"Linear",
"Conv",
"ConvMaxpool"]
| [
6738,
764,
42946,
1330,
34872,
198,
6738,
764,
42946,
62,
9806,
7742,
1330,
34872,
11518,
7742,
198,
6738,
764,
20521,
12083,
1330,
13302,
6048,
278,
198,
6738,
764,
29127,
1330,
44800,
198,
6738,
764,
75,
301,
76,
1330,
406,
2257,
44,
... | 2.189655 | 116 |
#following tutorial: https://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_imgproc/py_colorspaces/py_colorspaces.html#converting-colorspaces
import numpy as np
import cv2
#there are more than 150 color-space conversions methods available in OpenCV
#why so many?
#gets all possible color space conver... | [
2,
27780,
278,
11808,
25,
3740,
1378,
9654,
33967,
12,
29412,
12,
83,
315,
305,
874,
13,
961,
83,
704,
420,
82,
13,
952,
14,
268,
14,
42861,
14,
9078,
62,
83,
44917,
82,
14,
9078,
62,
9600,
36942,
14,
9078,
62,
4033,
669,
43076,... | 2.438034 | 468 |
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
#
# Copyright 2021 The NiPreps Developers <nipreps@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may... | [
2,
795,
16436,
25,
532,
9,
12,
4235,
25,
21015,
26,
12972,
12,
521,
298,
12,
28968,
25,
604,
26,
33793,
12,
8658,
82,
12,
14171,
25,
18038,
532,
9,
12,
198,
2,
25357,
25,
900,
10117,
28,
29412,
39747,
28,
19,
40379,
28,
19,
15... | 2.882943 | 598 |
# -*- coding: UTF-8 -*-
import os
import numpy as np
import pandas as pd
from tqdm import tqdm
import json
import cv2
from sklearn.model_selection import train_test_split
import matplotlib
from keras.utils import np_utils
from keras.optimizers import *
from keras.preprocessing.image import ImageDataGenerator
from f... | [
2,
532,
9,
12,
19617,
25,
41002,
12,
23,
532,
9,
12,
198,
198,
11748,
28686,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
6738,
256,
80,
36020,
1330,
256,
80,
36020,
198,
11748,
33918,
198,
11748,
... | 3.639535 | 258 |
"""Auto-generated file, do not edit by hand. QA metadata"""
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_QA = PhoneMetadata(id='QA', country_code=None, international_prefix=None,
general_desc=PhoneNumberDesc(national_number_pattern='[129]\\d{2,4}', possible_length=(3, 4, ... | [
37811,
27722,
12,
27568,
2393,
11,
466,
407,
4370,
416,
1021,
13,
1195,
32,
20150,
37811,
198,
6738,
11485,
746,
261,
19261,
14706,
1330,
7913,
26227,
11,
14484,
15057,
24564,
11,
14484,
9171,
14706,
198,
198,
11909,
11651,
62,
47123,
2... | 2.904564 | 241 |
"""
Organizing test and parametrizing
"""
# Parametrized tests: Run many tests in one
# pylint: disable=W0622
# pylint: disable=R0201
# pylint: disable=R0903
import pytest
from word_counter import count_words
| [
37811,
198,
26121,
2890,
1332,
290,
5772,
316,
380,
9510,
198,
37811,
198,
2,
25139,
316,
380,
8863,
5254,
25,
5660,
867,
5254,
287,
530,
198,
2,
279,
2645,
600,
25,
15560,
28,
54,
3312,
1828,
198,
2,
279,
2645,
600,
25,
15560,
28... | 2.902778 | 72 |
from argparse import ArgumentParser
import os
import pdb
import sys
from dep_appearances.appearances_report import AppearancesReport
if __name__ == "__main__":
main()
| [
6738,
1822,
29572,
1330,
45751,
46677,
198,
11748,
28686,
198,
11748,
279,
9945,
198,
11748,
25064,
198,
198,
6738,
1207,
62,
1324,
35630,
13,
1324,
35630,
62,
13116,
1330,
2034,
35630,
19100,
198,
198,
361,
11593,
3672,
834,
6624,
366,
... | 3.392157 | 51 |
from django_filters import Filter
from django_filters.fields import Lookup
| [
6738,
42625,
14208,
62,
10379,
1010,
1330,
25853,
198,
6738,
42625,
14208,
62,
10379,
1010,
13,
25747,
1330,
6803,
929,
198
] | 3.571429 | 21 |
from polyphony import testbench
test()
| [
6738,
7514,
23021,
1330,
1332,
26968,
198,
9288,
3419,
198
] | 3.9 | 10 |
from pyfirmata import Arduino, util
from time import sleep
import pymysql
PORT = "COM4"
uno = Arduino(PORT)
sleep(5)
it = util.Iterator(uno)
it.start()
a4 = uno.get_pin('a:4:i')
a5 = uno.get_pin('a:5:i')
db = pymysql.connect("120.110.114.14", "hanshin", "Hanshin519", "Student", port = 3306)
cursor = db.cursor()
pr... | [
6738,
12972,
69,
2533,
1045,
1330,
27634,
11,
7736,
198,
6738,
640,
1330,
3993,
198,
11748,
279,
4948,
893,
13976,
198,
198,
15490,
796,
366,
9858,
19,
1,
198,
36909,
796,
27634,
7,
15490,
8,
198,
198,
42832,
7,
20,
8,
198,
198,
2... | 2.221987 | 473 |
import flask
from find_files import find as find_files
views_blueprint = flask.Blueprint('views', __name__, url_prefix='')
| [
11748,
42903,
198,
198,
6738,
1064,
62,
16624,
1330,
1064,
355,
1064,
62,
16624,
198,
198,
33571,
62,
17585,
4798,
796,
42903,
13,
14573,
4798,
10786,
33571,
3256,
11593,
3672,
834,
11,
19016,
62,
40290,
28,
7061,
8,
628
] | 3.230769 | 39 |
#! /usr/bin/env python
import warnings, numpy
with warnings.catch_warnings():
warnings.simplefilter("ignore")
from libpyarr_example import *
if __name__=='__main__':
main()
| [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
14601,
11,
299,
32152,
198,
4480,
14601,
13,
40198,
62,
40539,
654,
33529,
198,
220,
220,
220,
14601,
13,
36439,
24455,
7203,
46430,
4943,
198,
220,
220,
220,
422,
9195,
... | 2.791045 | 67 |
import logging
from watchdog.events import LoggingEventHandler, FileSystemEventHandler
| [
198,
11748,
18931,
198,
6738,
26856,
13,
31534,
1330,
5972,
2667,
9237,
25060,
11,
9220,
11964,
9237,
25060,
198
] | 4.631579 | 19 |
import sys
import numpy as np
from tqdm import tqdm
from contextlib import nullcontext
| [
11748,
25064,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
256,
80,
36020,
1330,
256,
80,
36020,
198,
6738,
4732,
8019,
1330,
9242,
22866,
628,
628
] | 3.461538 | 26 |
from flux_sensors.localizer.localizer import Localizer, Coordinates, LocalizerError, PozyxDeviceError
from flux_sensors.light_sensor.light_sensor import LightSensor
from flux_sensors.config_loader import ConfigLoader
from flux_sensors.flux_server import FluxServer, FluxServerError
from flux_sensors.models import models... | [
6738,
28462,
62,
82,
641,
669,
13,
12001,
7509,
13,
12001,
7509,
1330,
10714,
7509,
11,
22819,
17540,
11,
10714,
7509,
12331,
11,
7695,
7357,
87,
24728,
12331,
198,
6738,
28462,
62,
82,
641,
669,
13,
2971,
62,
82,
22854,
13,
2971,
6... | 3.390244 | 123 |
import math
import torch
# import torch.utils.serialization # it was removed in torch v1.0.0 or higher version.
arguments_strModel = 'sintel-final'
SpyNet_model_dir = './models' # The directory of SpyNet's weights
Backward_tensorGrid = {}
# end
| [
11748,
10688,
198,
11748,
28034,
198,
2,
1330,
28034,
13,
26791,
13,
46911,
1634,
220,
220,
1303,
340,
373,
4615,
287,
28034,
410,
16,
13,
15,
13,
15,
393,
2440,
2196,
13,
198,
198,
853,
2886,
62,
2536,
17633,
796,
705,
82,
48779,
... | 3.035714 | 84 |
#!/usr/bin/python
# -*- coding: UTF-8 -*-
"""
@file : acl_test.py
@Time : 2020/11/9 9:25
@Author: Tao.Xu
@Email : tao.xu2008@outlook.com
"""
import os
import unittest
from storagetest.libs import utils
from storagetest.libs.log import log
from storagetest.libs.exceptions import PlatformError, NoSuchDir, NoSuchBina... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
532,
9,
12,
19617,
25,
41002,
12,
23,
532,
9,
12,
198,
37811,
198,
31,
7753,
220,
1058,
257,
565,
62,
9288,
13,
9078,
198,
31,
7575,
220,
1058,
12131,
14,
1157,
14,
24,
860,
25,
14... | 2.40856 | 257 |
#!/usr/bin/python
import sys, getopt, os, time, array
from pyftdi.spi import SpiController
if __name__ == "__main__":
main (sys.argv[1:])
| [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
11748,
25064,
11,
651,
8738,
11,
28686,
11,
640,
11,
7177,
198,
6738,
12972,
701,
10989,
13,
2777,
72,
1330,
1338,
72,
22130,
628,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
83... | 2.508772 | 57 |
import numpy as np
| [
11748,
299,
32152,
355,
45941,
198
] | 3.166667 | 6 |
import pyhf
from pyhf.parameters import ParamViewer
| [
11748,
12972,
71,
69,
198,
6738,
12972,
71,
69,
13,
17143,
7307,
1330,
25139,
7680,
263,
628,
198
] | 3 | 18 |
from typing import Dict, Optional, Tuple
import numpy as np
import torch
import torch.nn.functional as F
from allennlp.common.checks import ConfigurationError
from allennlp.common.util import START_SYMBOL, END_SYMBOL
from allennlp.data.vocabulary import Vocabulary
from allennlp.models.model import Model
from allennlp.... | [
6738,
19720,
1330,
360,
713,
11,
32233,
11,
309,
29291,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28034,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
198,
6738,
477,
1697,
34431,
13,
11321,
13,
42116,
1330,
28373,
12331... | 3.385159 | 283 |
import numpy as np
from hrv.rri import RRi
from hrv.utils import _create_time_info
| [
11748,
299,
32152,
355,
45941,
198,
198,
6738,
39436,
85,
13,
81,
380,
1330,
26067,
72,
198,
6738,
39436,
85,
13,
26791,
1330,
4808,
17953,
62,
2435,
62,
10951,
628,
628,
198
] | 2.75 | 32 |
paraview_plugin_version = '1.1.39'
# This is module to import. It provides VTKPythonAlgorithmBase, the base class
# for all python-based vtkAlgorithm subclasses in VTK and decorators used to
# 'register' the algorithm with ParaView along with information about UI.
from paraview.util.vtkAlgorithm import *
# Helpers:
fr... | [
1845,
615,
769,
62,
33803,
62,
9641,
796,
705,
16,
13,
16,
13,
2670,
6,
198,
2,
770,
318,
8265,
284,
1330,
13,
632,
3769,
32751,
42,
37906,
2348,
42289,
14881,
11,
262,
2779,
1398,
198,
2,
329,
477,
21015,
12,
3106,
410,
30488,
... | 5.67094 | 234 |
import json
import secrets
import brownie
from dotmap import DotMap
import pytest
import pprint
from brownie import *
from helpers.constants import *
from helpers.registry import registry
from rich.console import Console
FARM_ADDRESS = "0xa0246c9032bC3A600820415aE600c6388619A14D"
XSUSHI_ADDRESS = "0x8798249c2E60744... | [
11748,
33918,
198,
11748,
13141,
198,
198,
11748,
7586,
494,
198,
6738,
16605,
8899,
1330,
22875,
13912,
198,
11748,
12972,
9288,
198,
198,
11748,
279,
4798,
198,
198,
6738,
7586,
494,
1330,
1635,
198,
6738,
49385,
13,
9979,
1187,
1330,
... | 2.57874 | 254 |
# Filename: HCm_UV_v4.11.py
import string
import numpy as np
import sys
#sys.stderr = open('errorlog.txt', 'w')
#Function for interpolation of grids
print (' ---------------------------------------------------------------------')
print (' This is HII-CHI-mistry for UV version 4.11')
print (' See Perez-Montero, & ... | [
2,
7066,
12453,
25,
27327,
76,
62,
31667,
62,
85,
19,
13,
1157,
13,
9078,
198,
198,
11748,
4731,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
25064,
198,
2,
17597,
13,
301,
1082,
81,
796,
1280,
10786,
18224,
6404,
13,
14116,
3256... | 1.760147 | 13,083 |
feFirst = ['Emma', 'Olivia', 'Ava', 'Isabella', 'Sophia', 'Charlotte', 'Mia', 'Amelia', 'Harper', 'Evelyn', 'Abigail', 'Emily', 'Elizabeth', 'Mila', 'Ella', 'Avery', 'Sofia', 'Camila', 'Aria', 'Scarlett', 'Victoria', 'Madison', 'Luna', 'Grace', 'Chloe', 'Penelope', 'Layla', 'Riley', 'Zoey', 'Nora', 'Lily', 'Eleanor', '... | [
5036,
5962,
796,
37250,
10161,
2611,
3256,
705,
46,
16017,
544,
3256,
705,
32,
6862,
3256,
705,
3792,
43653,
3256,
705,
50,
2522,
544,
3256,
705,
24453,
11404,
3256,
705,
44,
544,
3256,
705,
5840,
25418,
3256,
705,
13587,
525,
3256,
7... | 2.358304 | 8,797 |
from nose.tools import eq_
from oldtoronto.toronto_archives import get_citation_hierarchy # noqa
| [
6738,
9686,
13,
31391,
1330,
37430,
62,
198,
198,
6738,
1468,
13165,
5957,
13,
13165,
5957,
62,
48814,
1330,
651,
62,
66,
3780,
62,
71,
959,
9282,
1303,
645,
20402,
628
] | 3.193548 | 31 |
# excel2.py
import xlrd
if __name__ == '__main__':
print_xls('D:\\python_path\\sample_ex.xls')
'''
__name__ __name__ import
__name__ ,
__name__ "__main__"
cmd .py,__name__'__main__';
import .py,__name__'__main__';
if __name__ == '__main__'.py
'''
| [
2,
27336,
17,
13,
9078,
198,
198,
11748,
2124,
75,
4372,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
3601,
62,
87,
7278,
10786,
35,
25,
6852,
29412,
62,
6978,
6852,
39873,
62,
1069,
13,
... | 2.194915 | 118 |
import multiprocessing as mp
import portpicker
from .client import Client, NumpyLoader, TorchCudaLoader
from .sampler import PERSampler
from .server.main_loop import main_loop
from .utils import get_local_ip
| [
11748,
18540,
305,
919,
278,
355,
29034,
198,
198,
11748,
2493,
79,
15799,
198,
198,
6738,
764,
16366,
1330,
20985,
11,
399,
32152,
17401,
11,
34868,
34,
15339,
17401,
198,
6738,
764,
37687,
20053,
1330,
350,
4877,
321,
20053,
198,
6738... | 3.365079 | 63 |
import random
import numpy as np
import torch
import torch.optim as optim
import torch.nn.functional as F
import torchvision.transforms as T
from memory import Transition, ReplayMemory, PrioritizedReplayMemory, NStepMemory
from DQN import DQN, DuelingDQN, NoisyDQN, DistributionalDQN
| [
11748,
4738,
201,
198,
11748,
299,
32152,
355,
45941,
201,
198,
11748,
28034,
201,
198,
11748,
28034,
13,
40085,
355,
6436,
201,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
201,
198,
11748,
28034,
10178,
13,
7645,
23914,
355,
309... | 3.21978 | 91 |
import qsharp
from DeutschJozsa import SayHello, RunDeutschJozsa
SayHello.simulate()
RunDeutschJozsa.simulate(N=10)
| [
11748,
10662,
48554,
198,
198,
6738,
1024,
40768,
41,
8590,
11400,
1330,
13816,
15496,
11,
5660,
5005,
40768,
41,
8590,
11400,
198,
198,
25515,
15496,
13,
14323,
5039,
3419,
198,
198,
10987,
5005,
40768,
41,
8590,
11400,
13,
14323,
5039,
... | 2.608696 | 46 |
"""Apply a stylesheet to an XML file"""
import sys
from lxml import etree
if len(sys.argv) != 3:
print >>sys.stderr, "Usage: %s <stylesheet> <xml doc> ..." % sys.argv[0]
sys.exit(1)
transform = etree.XSLT(etree.XML(open(sys.argv[1], "r").read()))
for xmlfile in sys.argv[2:]:
with open(xmlfile, "r") as fp... | [
37811,
44836,
257,
12186,
25473,
284,
281,
23735,
2393,
37811,
198,
198,
11748,
25064,
198,
6738,
300,
19875,
1330,
2123,
631,
198,
198,
361,
18896,
7,
17597,
13,
853,
85,
8,
14512,
513,
25,
198,
220,
220,
220,
3601,
9609,
17597,
13,
... | 2.232432 | 185 |
# -*- coding: utf-8 -*-
#
# io3d documentation build configuration file, created by
# sphinx-quickstart on Mon Nov 27 12:01:57 2017.
#
# 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
# autogenerated file.
#
# All ... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
198,
2,
33245,
18,
67,
10314,
1382,
8398,
2393,
11,
2727,
416,
198,
2,
599,
20079,
87,
12,
24209,
9688,
319,
2892,
5267,
2681,
1105,
25,
486,
25,
3553,
2177,
13,
... | 2.80836 | 2,536 |
# -*- coding: utf-8 -*-
"""RED_linear_run1.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1-WN1MY9YYluGcnigLgrndqsxcOYldbB6
"""
#@title mount your Google Drive
#@markdown Your work will be stored in a folder called `cs285_f2021` by default to pr... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
22083,
62,
29127,
62,
5143,
16,
13,
541,
2047,
65,
198,
198,
38062,
4142,
7560,
416,
1623,
4820,
2870,
13,
198,
198,
20556,
2393,
318,
5140,
379,
198,
220,
220,... | 2.180897 | 11,056 |
from django.shortcuts import render, get_object_or_404, redirect
from .models import TeacherInfo
from .forms import CreateTeacher
from django.contrib import messages
from django.core.paginator import Paginator
# Create your views here.
| [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
11,
651,
62,
15252,
62,
273,
62,
26429,
11,
18941,
198,
6738,
764,
27530,
1330,
32019,
12360,
198,
6738,
764,
23914,
1330,
13610,
6767,
3493,
198,
6738,
42625,
14208,
13,
3642,
822,
1330... | 3.666667 | 66 |
# from flask import request
from flask_restful import request
# import logging
from .utils import log_request
from .base import BaseResource
from ..services.jobs import get_events, get_event
from ..services.utils import APIResponse
import logging
logger = logging.getLogger(__name__)
| [
2,
422,
42903,
1330,
2581,
198,
6738,
42903,
62,
2118,
913,
1330,
2581,
198,
2,
1330,
18931,
198,
6738,
764,
26791,
1330,
2604,
62,
25927,
198,
6738,
764,
8692,
1330,
7308,
26198,
198,
198,
6738,
11485,
30416,
13,
43863,
1330,
651,
62... | 3.692308 | 78 |
import unittest
# https://docs.python.org/3/library/unittest.html
from calc import Calc
| [
11748,
555,
715,
395,
198,
198,
2,
3740,
1378,
31628,
13,
29412,
13,
2398,
14,
18,
14,
32016,
14,
403,
715,
395,
13,
6494,
198,
198,
6738,
42302,
1330,
2199,
66,
628
] | 2.84375 | 32 |
import unittest
from unittest.mock import patch
from waves_gateway.model import Transaction, TransactionReceiver
from waves_gateway.service import IntegerConverterService
| [
11748,
555,
715,
395,
198,
6738,
555,
715,
395,
13,
76,
735,
1330,
8529,
198,
198,
6738,
9813,
62,
10494,
1014,
13,
19849,
1330,
45389,
11,
45389,
3041,
39729,
198,
198,
6738,
9813,
62,
10494,
1014,
13,
15271,
1330,
34142,
3103,
332,
... | 3.866667 | 45 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
LIVE DEMO
This script loads a pre-trained model (for best results use pre-trained weights for classification block)
and classifies American Sign Language finger spelling frame-by-frame in real-time
"""
import string
import cv2
import time
from processing import square... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
198,
43,
9306,
40101,
46,
198,
1212,
4226,
15989,
257,
662,
12,
35311,
2746,
357,
1640,
1266,
2482,
779,
... | 2.071429 | 3,220 |
"""Fetches gene sequence from gene fasta created by extract_genes.py"""
import prob2020.python.utils as utils
def _fetch_5ss_fasta(fasta, gene_name, exon_num,
chrom, strand, start, end):
"""Retreives the 5' SS sequence flanking the specified exon.
Returns a string in fasta format with t... | [
37811,
37,
316,
2052,
9779,
8379,
422,
9779,
3049,
64,
2727,
416,
7925,
62,
5235,
274,
13,
9078,
37811,
198,
11748,
1861,
42334,
13,
29412,
13,
26791,
355,
3384,
4487,
628,
198,
198,
4299,
4808,
69,
7569,
62,
20,
824,
62,
7217,
64,
... | 1.864556 | 2,621 |
# -*- coding:utf-8 -*-
# ---------------------------------------------
# @file http_request
# @description http_request
# @author WcJun
# @date 2021/07/19
# ---------------------------------------------
from src.main.python.request.options import RequestOptions
| [
2,
532,
9,
12,
19617,
25,
40477,
12,
23,
532,
9,
12,
198,
198,
2,
20368,
32501,
198,
2,
2488,
7753,
2638,
62,
25927,
198,
2,
2488,
11213,
2638,
62,
25927,
198,
2,
2488,
9800,
370,
66,
22396,
198,
2,
2488,
4475,
33448,
14,
2998,
... | 3.955224 | 67 |
from time import sleep
from threading import Thread
from bot import aria2, download_dict_lock, download_dict, STOP_DUPLICATE, TORRENT_DIRECT_LIMIT, ZIP_UNZIP_LIMIT, LOGGER, STORAGE_THRESHOLD
from bot.helper.mirror_utils.upload_utils.gdriveTools import GoogleDriveHelper
from bot.helper.ext_utils.bot_utils import is_mag... | [
6738,
640,
1330,
3993,
198,
6738,
4704,
278,
1330,
14122,
198,
198,
6738,
10214,
1330,
257,
7496,
17,
11,
4321,
62,
11600,
62,
5354,
11,
4321,
62,
11600,
11,
44934,
62,
35,
52,
31484,
6158,
11,
40691,
49,
3525,
62,
17931,
23988,
62,... | 2.448034 | 712 |
import pygame
from pygame.locals import *
from pygamehelper import *
from vec2d import *
from random import randrange
g = GameOfLife()
g.mainLoop(60)
| [
198,
11748,
12972,
6057,
198,
6738,
12972,
6057,
13,
17946,
874,
1330,
1635,
198,
6738,
12972,
6057,
2978,
525,
1330,
1635,
198,
6738,
43030,
17,
67,
1330,
1635,
198,
6738,
4738,
1330,
43720,
9521,
628,
628,
198,
70,
796,
3776,
5189,
... | 2.980769 | 52 |
from gna.graph.walk import GraphWalker
from gna.graph.timeit import *
from gna.graph.walk_functions import *
| [
6738,
308,
2616,
13,
34960,
13,
11152,
1330,
29681,
39950,
198,
6738,
308,
2616,
13,
34960,
13,
2435,
270,
1330,
1635,
198,
6738,
308,
2616,
13,
34960,
13,
11152,
62,
12543,
2733,
1330,
1635,
198
] | 3.114286 | 35 |
# Forward Implementation
# Backward implementation
# - Here backward implementation, would be a bit typical to do,
# - Forward implementation makes more sense, if you think in terms of the input n
if __name__ == "__main__":
print_to_n_reverse(7)
| [
2,
19530,
46333,
628,
198,
2,
5157,
904,
7822,
198,
2,
532,
3423,
19528,
7822,
11,
561,
307,
257,
1643,
7226,
284,
466,
11,
198,
2,
532,
19530,
7822,
1838,
517,
2565,
11,
611,
345,
892,
287,
2846,
286,
262,
5128,
299,
198,
198,
... | 3.666667 | 69 |
"""Azure App Gateway Certbot installer plugin."""
from __future__ import print_function
import os
import sys
import logging
import time
import OpenSSL
import base64
try:
from secrets import token_urlsafe
except ImportError:
from os import urandom
import zope.component
import zope.interface
from certbot impo... | [
37811,
26903,
495,
2034,
29916,
14965,
13645,
29124,
13877,
526,
15931,
198,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
18931,
198,
11748,
640,
198,
11748,
4946,
31127,
198,
... | 2.809633 | 436 |
from pathlib import Path
from glob import glob as glob
from extractor.Ignition import Ignition
import logging
logger = logging.getLogger(__name__)
| [
198,
6738,
3108,
8019,
1330,
10644,
198,
6738,
15095,
1330,
15095,
355,
15095,
198,
6738,
7925,
273,
13,
32916,
653,
1330,
16583,
653,
198,
11748,
18931,
198,
6404,
1362,
796,
18931,
13,
1136,
11187,
1362,
7,
834,
3672,
834,
8,
628
] | 3.634146 | 41 |
"""
This code sample is a part of a simple demo to show beginners how to create a skill (app) for the Amazon Echo using AWS Lambda and the Alexa Skills Kit.
For the full code sample visit https://github.com/pmckinney8/Alexa_Dojo_Skill.git
"""
from __future__ import print_function
import requests
import json
alcohol_... | [
37811,
198,
1212,
2438,
6291,
318,
257,
636,
286,
257,
2829,
13605,
284,
905,
31729,
703,
284,
2251,
257,
5032,
357,
1324,
8,
329,
262,
6186,
21455,
1262,
30865,
21114,
6814,
290,
262,
34630,
20389,
10897,
13,
198,
198,
1890,
262,
133... | 2.879332 | 1,558 |
#!/usr/bin/env python3
import sys
with open(sys.argv[1], "r") as f:
lines = [l for l in f.read().split("\n") if l]
ilist = []
imap = {}
total = 0
result = 0
other = 0
last = -1
while True:
for l in lines:
val = int(l.split()[0])
if last != -1 and val > last:
total += 1
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
11748,
25064,
198,
198,
4480,
1280,
7,
17597,
13,
853,
85,
58,
16,
4357,
366,
81,
4943,
355,
277,
25,
198,
220,
220,
220,
3951,
796,
685,
75,
329,
300,
287,
277,
13,
961... | 2.093596 | 203 |
#-*- coding: utf-8 -*-
import pythingspeak
import unittest
if __name__ == '__main__':
unittest.main() | [
2,
12,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
279,
5272,
654,
36729,
198,
11748,
555,
715,
395,
628,
197,
197,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
555,
715,
395... | 2.22 | 50 |
# coding=utf-8
"""
Creates graphic of perfs
"""
import datetime
import typing
from collections import namedtuple
from tempfile import mktemp
import humanize
from esst.core import CTX
PLT = GRID_SPEC = TICKER = None
# https://stackoverflow.com/questions/4931376/generating-matplotlib-graphs-without-a-running-x-serv... | [
2,
19617,
28,
40477,
12,
23,
198,
37811,
198,
16719,
274,
13028,
286,
583,
9501,
198,
37811,
198,
198,
11748,
4818,
8079,
198,
11748,
19720,
198,
6738,
17268,
1330,
3706,
83,
29291,
198,
6738,
20218,
7753,
1330,
33480,
29510,
198,
198,
... | 2.215139 | 3,263 |
#
# @lc app=leetcode id=20 lang=python3
#
# [20] Valid Parentheses
#
# https://leetcode.com/problems/valid-parentheses/description/
#
# algorithms
# Easy (36.20%)
# Total Accepted: 554.4K
# Total Submissions: 1.5M
# Testcase Example: '"()"'
#
# Given a string containing just the characters '(', ')', '{', '}', '[' a... | [
2,
198,
2,
2488,
44601,
598,
28,
293,
316,
8189,
4686,
28,
1238,
42392,
28,
29412,
18,
198,
2,
198,
2,
685,
1238,
60,
48951,
16774,
39815,
198,
2,
198,
2,
3740,
1378,
293,
316,
8189,
13,
785,
14,
1676,
22143,
14,
12102,
12,
8000... | 2.601852 | 324 |
import redis
from flask import g, session
import device
import message_queue
import os | [
11748,
2266,
271,
198,
6738,
42903,
1330,
308,
11,
6246,
198,
11748,
3335,
198,
11748,
3275,
62,
36560,
198,
198,
11748,
28686
] | 3.954545 | 22 |
import tensorflow as tf
import theano
import pandas as pd
import numpy as np
import matplotlib
# matplotlib.use('pdf')
import matplotlib.pyplot as plt
from keras.layers import Dense, Dropout, LSTM, Embedding, Activation, Lambda, Bidirectional
from sklearn.preprocessing import OneHotEncoder
from keras.engine import Inpu... | [
11748,
11192,
273,
11125,
355,
48700,
198,
11748,
262,
5733,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
198,
2,
2603,
29487,
8019,
13,
1904,
10786,
12315,
11537,
198,
11748,
... | 3.130387 | 905 |
"""-"""
SETTINGS = {
'logging': {
'level': 'DEBUG'
}
}
| [
15931,
26793,
37811,
198,
198,
28480,
51,
20754,
796,
1391,
198,
220,
220,
220,
705,
6404,
2667,
10354,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
705,
5715,
10354,
705,
30531,
6,
198,
220,
220,
220,
1782,
198,
92,
198
] | 1.756098 | 41 |
# Copyright 2020 Amazon.com, Inc. or its affiliates.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file ac... | [
2,
15069,
12131,
6186,
13,
785,
11,
3457,
13,
393,
663,
29116,
13,
198,
2,
1439,
6923,
33876,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
11074,
198,
2,
921,
743,
407,
779,
4... | 3.675159 | 314 |
# -*- coding: utf-8 -*
# @Time : 2020/12/22 15:58
from fastapi import Depends
from motor.motor_asyncio import AsyncIOMotorClient
from app.api.db.mongoDB import get_database
import pandas as pd
import numpy as np
from io import BytesIO
if __name__ == '__main__':
pass | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
198,
2,
2488,
7575,
1058,
12131,
14,
1065,
14,
1828,
1315,
25,
3365,
628,
198,
6738,
3049,
15042,
1330,
2129,
2412,
198,
6738,
5584,
13,
76,
20965,
62,
292,
13361,
952,
1330,
1... | 2.663462 | 104 |
"""Simple socket client for the simple socket client."""
import sys
import socket
import time
SOCKET_ADDRESS = "127.0.0.1"
SOCKET_PORT = 6996
def build_client_tcp(address: str, port: int):
"""Builds the TCP client."""
try:
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect(... | [
37811,
26437,
17802,
5456,
329,
262,
2829,
17802,
5456,
526,
15931,
198,
11748,
25064,
198,
11748,
17802,
198,
11748,
640,
198,
198,
50,
11290,
2767,
62,
2885,
7707,
7597,
796,
366,
16799,
13,
15,
13,
15,
13,
16,
1,
198,
50,
11290,
... | 2.30495 | 505 |
import bs4
import nltk
import json
import re
import requests
with open('./acronym_abbreviation_id.json', 'r') as f:
data = f.read()
list_acronym_abbreviation = json.loads(data)
from_wikipedia = False
if from_wikipedia:
# Take text with Indonesian language from Wikipedia randomly
html = requests.get('h... | [
11748,
275,
82,
19,
198,
11748,
299,
2528,
74,
198,
11748,
33918,
198,
11748,
302,
198,
11748,
7007,
198,
198,
4480,
1280,
7,
4458,
14,
330,
1313,
4948,
62,
397,
4679,
47625,
62,
312,
13,
17752,
3256,
705,
81,
11537,
355,
277,
25,
... | 2.474561 | 1,081 |
'''THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE
DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OT... | [
7061,
6,
10970,
47466,
3180,
36592,
2389,
1961,
366,
1921,
3180,
1600,
42881,
34764,
56,
3963,
15529,
509,
12115,
11,
7788,
32761,
198,
1581,
8959,
49094,
11,
47783,
2751,
21728,
5626,
40880,
5390,
3336,
34764,
11015,
3963,
198,
29296,
33... | 2.284722 | 432 |
from DeepRTS import Engine, Constants
from DeepRTS.python import GUI
from DeepRTS.python import Config
from DeepRTS.python import DeepRTSPlayer
import numpy as np
import random
import os
import argparse
import gym
dir_path = os.path.dirname(os.path.realpath(__file__))
| [
6738,
10766,
49,
4694,
1330,
7117,
11,
4757,
1187,
198,
6738,
10766,
49,
4694,
13,
29412,
1330,
25757,
198,
6738,
10766,
49,
4694,
13,
29412,
1330,
17056,
198,
6738,
10766,
49,
4694,
13,
29412,
1330,
10766,
49,
4694,
14140,
198,
198,
... | 3.211765 | 85 |
from enum import Enum
from os.path import expanduser
from lairgpt.utils.remote import local_dir
| [
6738,
33829,
1330,
2039,
388,
198,
6738,
28686,
13,
6978,
1330,
4292,
7220,
198,
6738,
49451,
70,
457,
13,
26791,
13,
47960,
1330,
1957,
62,
15908,
198
] | 3.555556 | 27 |
import shutil
from .smart_open_lib import *
DEFAULT_CHUNKSIZE = 16*1024*1024 # 16mb
def copy_file(src, dest, close_src=True, close_dest=True, make_path=False):
"""
Copies file from src to dest. Supports s3 and webhdfs (does not include kerberos support)
If src does not exist, a FileNotFoundError is rais... | [
11748,
4423,
346,
198,
198,
6738,
764,
27004,
62,
9654,
62,
8019,
1330,
1635,
198,
198,
7206,
38865,
62,
3398,
4944,
42,
33489,
796,
1467,
9,
35500,
9,
35500,
1303,
1467,
2022,
198,
198,
4299,
4866,
62,
7753,
7,
10677,
11,
2244,
11,... | 2.611486 | 592 |
import rules
from backend.models import Folder
def add_folder_to_tree_dictionary(folder, resulting_set, include_ancestors=False):
"""
Adds folder, folder's ancestors and folder's descendants
Ancestors are needed to build the traverse path in tree view
Descendants are needed because user has permissi... | [
11748,
3173,
198,
198,
6738,
30203,
13,
27530,
1330,
48107,
628,
198,
4299,
751,
62,
43551,
62,
1462,
62,
21048,
62,
67,
14188,
7,
43551,
11,
7186,
62,
2617,
11,
2291,
62,
1192,
395,
669,
28,
25101,
2599,
198,
220,
220,
220,
37227,
... | 2.720231 | 1,730 |
from flask import Flask
from flask_cors import CORS
from src.ext import configuration
| [
6738,
42903,
1330,
46947,
201,
198,
6738,
42903,
62,
66,
669,
1330,
327,
20673,
201,
198,
201,
198,
6738,
12351,
13,
2302,
1330,
8398,
201,
198,
201,
198,
201,
198,
220,
220,
220,
220
] | 2.911765 | 34 |
import datetime as dt
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
import matplotlib.ticker as ticker
from matplotlib.dates import MO, TU, WE, TH, FR, SA, SU
dates = ['2/29/2020', '3/1/2020', '3/2/2020', '3/3/2020', '3/4/2020', '3/5/2020', '3/6/2020', '3/7/2020', '3/8/2020', '3/9/2020', '3/10/2020... | [
11748,
4818,
8079,
355,
288,
83,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
2603,
29487,
8019,
13,
19581,
355,
285,
19581,
198,
11748,
2603,
29487,
8019,
13,
83,
15799,
355,
4378,
263,
198,
6738,
2603,
2... | 1.972111 | 5,737 |
import os
import numpy as np
import matplotlib.pyplot as plt
from PIL import Image
import albumentations as A
from pathlib import Path
import torch
from torch import nn
from src_backup.cdan import get_model
from src.backbone.iresnet import get_arcface_backbone
| [
11748,
28686,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
6738,
350,
4146,
1330,
7412,
198,
11748,
435,
65,
1713,
602,
355,
317,
198,
6738,
3108,
8019,
1330,
10644,
198,
198,
... | 3.202381 | 84 |
import pytest
from datetime import datetime
from freezegun import freeze_time
from pytest_splunk_addon.standard_lib.sample_generation.time_parser import (
time_parse,
)
| [
11748,
12972,
9288,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
1479,
89,
1533,
403,
1330,
16611,
62,
2435,
198,
198,
6738,
12972,
9288,
62,
22018,
2954,
62,
48078,
13,
20307,
62,
8019,
13,
39873,
62,
20158,
13,
2435,
62,
4861... | 3.160714 | 56 |
#!/usr/bin/env python
"""igcollect - Artfiles Hosting Metrics
Copyright (c) 2019 InnoGames GmbH
"""
import base64
from argparse import ArgumentParser
from time import time
try:
# Try importing the Python3 packages
from urllib.request import Request, urlopen
from urllib.parse import urlencode
except Impor... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
37811,
328,
33327,
532,
3683,
16624,
14504,
278,
3395,
10466,
198,
198,
15269,
357,
66,
8,
13130,
554,
3919,
24474,
402,
2022,
39,
198,
37811,
198,
198,
11748,
2779,
2414,
198,
6738,
1... | 3.031447 | 159 |
# -*- coding: utf-8 -*-
"""
file: corpus.py
Description: defines the Corpus object. It is an object representation
of a CoNLL-formatted corpus.
author: Yoann Dupont
MIT License
Copyright (c) 2018 Yoann Dupont
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associa... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
198,
7753,
25,
35789,
13,
9078,
198,
198,
11828,
25,
15738,
262,
44874,
2134,
13,
632,
318,
281,
2134,
10552,
198,
1659,
257,
1766,
45,
3069,
12,
687,
1689... | 3.413646 | 469 |
import time
import torch
from recbole.config import Config
from recbole.utils import get_model, init_seed
import gensim
import gensim.downloader as api
from recbole.data import create_dataset, data_preparation
import numpy as np
URL_FIELD = "item_url"
| [
11748,
640,
198,
198,
11748,
28034,
198,
6738,
664,
45693,
13,
11250,
1330,
17056,
198,
6738,
664,
45693,
13,
26791,
1330,
651,
62,
19849,
11,
2315,
62,
28826,
198,
11748,
308,
641,
320,
198,
11748,
308,
641,
320,
13,
15002,
263,
355,... | 3.25641 | 78 |
# parsetab.py
# This file is automatically generated. Do not edit.
# pylint: disable=W,C,R
_tabversion = '3.10'
_lr_method = 'LALR'
_lr_signature = 'INTEGER L_BRACE L_BRACKET RESERVED R_BRACE R_BRACKET SEMICOLON STRUCT TYPE_BOOL TYPE_CSTDINT TYPE_PRIMITIVE_FLOAT TYPE_PRIMITIVE_INT TYPE_STRING TYPE_UNSIGNED VAR_NAMEM... | [
198,
2,
13544,
316,
397,
13,
9078,
198,
2,
770,
2393,
318,
6338,
7560,
13,
2141,
407,
4370,
13,
198,
2,
279,
2645,
600,
25,
15560,
28,
54,
11,
34,
11,
49,
198,
62,
8658,
9641,
796,
705,
18,
13,
940,
6,
198,
198,
62,
14050,
6... | 1.916386 | 1,483 |
from packet import packet
# Camada Fisica
| [
6738,
19638,
1330,
19638,
198,
198,
2,
7298,
4763,
376,
271,
3970,
198
] | 3.307692 | 13 |
from backend import *
from basement import *
from pausable import *
from kittyaccesscontrol import *
from kittybase import KittyBase
from erc721 import ERC721
from erc721metadata import ERC721Metadata
# @title The facet of the CryptoKitties core contract that manages ownership, ERC-721 (draft) compliant.
# @author Ax... | [
6738,
30203,
1330,
1635,
198,
6738,
17012,
1330,
1635,
198,
6738,
279,
8717,
540,
1330,
1635,
198,
6738,
479,
9760,
15526,
13716,
1330,
1635,
198,
198,
6738,
479,
9760,
8692,
1330,
21168,
14881,
198,
6738,
1931,
66,
22,
2481,
1330,
412,... | 2.921199 | 1,802 |
import os
import const as CONST
from datetime import datetime
# Const
MENU_ROOT = 0
MENU_SPECIFY_DATE = 1
MENU_SPECIFY_PERCENT_TRAINED = 2
currMenu = MENU_ROOT
stockList = ['AAPL', '^DJI', '^HSI', '^GSPC'] | [
11748,
28686,
198,
11748,
1500,
355,
7102,
2257,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
198,
2,
4757,
198,
49275,
52,
62,
13252,
2394,
796,
657,
198,
49275,
52,
62,
48451,
5064,
56,
62,
35,
6158,
796,
352,
198,
49275,
52,
62,... | 2.236559 | 93 |
# Copyright 2022, Lefebvre Dalloz Services
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | [
2,
220,
15069,
33160,
11,
406,
891,
1765,
43933,
360,
439,
8590,
6168,
198,
2,
198,
2,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
220,
345,
743,
407,
779,
428,
2393,
2845,
287... | 2.835275 | 1,202 |
import numpy as np
from tqdm import tqdm
from scipy.sparse import csr_matrix, hstack, vstack
from sklearn.neighbors import NearestNeighbors
| [
198,
11748,
299,
32152,
355,
45941,
198,
6738,
256,
80,
36020,
1330,
256,
80,
36020,
198,
6738,
629,
541,
88,
13,
82,
29572,
1330,
269,
27891,
62,
6759,
8609,
11,
289,
25558,
11,
410,
25558,
198,
6738,
1341,
35720,
13,
710,
394,
322... | 2.86 | 50 |
#Given 2 strings, a and b, return the number of the positions where they contain the same length 2 substring. So "xxcaazz" and "xxbaaz" yields 3, since the "xx", "aa", and "az" substrings appear in the same place in both strings.
#string_match('xxcaazz', 'xxbaaz') 3
#string_match('abc', 'abc') 2
#string_match('abc',... | [
2,
15056,
362,
13042,
11,
257,
290,
275,
11,
1441,
262,
1271,
286,
262,
6116,
810,
484,
3994,
262,
976,
4129,
362,
3293,
1806,
13,
1406,
366,
5324,
6888,
8101,
1,
290,
366,
5324,
7012,
1031,
1,
19299,
513,
11,
1201,
262,
366,
5324... | 3.036697 | 109 |