content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
import unirest
import time
import socket
import uuid
HOSTNAME = 'localhost'
PORT = 3000
PLOTTA_ENABLED = True
# API endpoint wrappers
| [
11748,
555,
557,
301,
198,
11748,
640,
198,
11748,
17802,
198,
11748,
334,
27112,
198,
198,
39,
10892,
20608,
796,
705,
36750,
6,
198,
15490,
796,
20343,
198,
6489,
2394,
5603,
62,
1677,
6242,
30465,
796,
6407,
198,
198,
2,
7824,
3612... | 3.022222 | 45 |
import cv2
import numpy as np
total = 0
for i in range(29):
original = cv2.imread(str(i) + "GroundTruth.png", 0)
predicted = cv2.imread(str(i) + "Prediction_Threshold.png", 0)
#print(np.shape(original))
original = original.flatten()
predicted = predicted.flatten()
original = (original>127)
... | [
11748,
269,
85,
17,
198,
11748,
299,
32152,
355,
45941,
198,
198,
23350,
796,
657,
198,
198,
1640,
1312,
287,
2837,
7,
1959,
2599,
198,
220,
220,
220,
2656,
796,
269,
85,
17,
13,
320,
961,
7,
2536,
7,
72,
8,
1343,
366,
35539,
38... | 2.162551 | 486 |
import psychopy.core
import psychopy.event
import psychopy.visual
import pandas as pd
import numpy as np
import psychopy.gui
import psychopy.sound
import os
import yaml
import json
from pathlib import Path
import random
from Trial import Trial | [
11748,
3795,
11081,
13,
7295,
198,
11748,
3795,
11081,
13,
15596,
198,
11748,
3795,
11081,
13,
41464,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
3795,
11081,
13,
48317,
198,
11748,
3795,
11081,
... | 3.681818 | 66 |
"""RAK811 CLI interface.
Provides a command line interface for the RAK811 module (Firmware V2.0).
Copyright 2019, 2021 Philippe Vanhaesendonck
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
... | [
37811,
3861,
42,
23,
1157,
43749,
7071,
13,
198,
198,
15946,
1460,
257,
3141,
1627,
7071,
329,
262,
371,
10206,
23,
1157,
8265,
357,
37,
2533,
1574,
569,
17,
13,
15,
737,
198,
198,
15269,
13130,
11,
33448,
39393,
6656,
3099,
274,
43... | 2.142109 | 7,825 |
import os
import numpy as np
import warnings
from . import genericsettings
scenario_rlbased = 'rlbased'
scenario_fixed = 'fixed'
scenario_biobjfixed = 'biobjfixed'
scenario_biobjrlbased = 'biobjrlbased'
scenario_biobjextfixed = 'biobjextfixed'
all_scenarios = [scenario_rlbased, scenario_fixed,
scenar... | [
11748,
28686,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
14601,
198,
198,
6738,
764,
1330,
1152,
873,
12374,
198,
198,
1416,
39055,
62,
45895,
3106,
796,
705,
45895,
3106,
6,
198,
1416,
39055,
62,
34021,
796,
705,
34021,
6,
198,
... | 2.250054 | 4,651 |
#!/usr/bin/env python
# Parallel Python Software: http://www.parallelpython.com
# Copyright (c) 2005-2009, Vitalii Vanovschi
# 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... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
42945,
11361,
10442,
25,
2638,
1378,
2503,
13,
1845,
29363,
29412,
13,
785,
198,
2,
15069,
357,
66,
8,
5075,
12,
10531,
11,
28476,
4178,
6656,
709,
82,
11072,
198,
2,
1439,
2489,
... | 2.279607 | 4,678 |
from .config import *
import torch
import cv2
import numpy as np
| [
6738,
764,
11250,
1330,
1635,
198,
198,
11748,
28034,
198,
11748,
269,
85,
17,
198,
11748,
299,
32152,
355,
45941,
198
] | 3.142857 | 21 |
from django.contrib.auth.mixins import PermissionRequiredMixin
from django.urls import reverse_lazy
from django.views.generic.edit import FormMixin
from church_site.views import AdminListView, BaseCreateView, BaseUpdateView
from .forms import SpeakerCreateForm
from .models import Speaker
| [
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
19816,
1040,
1330,
2448,
3411,
37374,
35608,
259,
198,
6738,
42625,
14208,
13,
6371,
82,
1330,
9575,
62,
75,
12582,
198,
6738,
42625,
14208,
13,
33571,
13,
41357,
13,
19312,
1330,
5178,
... | 3.547619 | 84 |
# Autogenerated file for Relay
# Add missing from ... import const
_JD_SERVICE_CLASS_RELAY = const(0x183fe656)
_JD_RELAY_VARIANT_ELECTROMECHANICAL = const(0x1)
_JD_RELAY_VARIANT_SOLID_STATE = const(0x2)
_JD_RELAY_VARIANT_REED = const(0x3)
_JD_RELAY_REG_CLOSED = const(JD_REG_INTENSITY)
_JD_RELAY_REG_VARIANT = const(JD_R... | [
2,
5231,
519,
877,
515,
2393,
329,
4718,
323,
198,
2,
3060,
4814,
422,
2644,
1330,
1500,
198,
62,
37882,
62,
35009,
27389,
62,
31631,
62,
16448,
4792,
796,
1500,
7,
15,
87,
24839,
5036,
37466,
8,
198,
62,
37882,
62,
16448,
4792,
6... | 2.165899 | 217 |
# Different Logging Levels
# 4: DEBUG
# 3: INFO
# 2: WARNING
# 1: ERROR
# 0: CRITICAL
log_level = 3
# When set true, if the script finds a user that already exists,
# the script will attempt to change the policy of that user,
# and add the emby connect account to that user.
overwrite = False
# The... | [
2,
20615,
5972,
2667,
28248,
198,
2,
220,
220,
220,
220,
604,
25,
16959,
198,
2,
220,
220,
220,
220,
513,
25,
24890,
198,
2,
220,
220,
220,
220,
362,
25,
39410,
198,
2,
220,
220,
220,
220,
352,
25,
33854,
198,
2,
220,
220,
220... | 2.056186 | 1,851 |
"""
Author: Haoyin Xu
"""
import time
import numpy as np
import torchvision.datasets as datasets
from numpy.random import permutation
from sklearn.tree import DecisionTreeClassifier
def write_result(filename, acc_ls):
"""Writes results to specified text file"""
output = open(filename, "w")
for acc in acc_... | [
37811,
198,
13838,
25,
9398,
726,
259,
33591,
198,
37811,
198,
11748,
640,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28034,
10178,
13,
19608,
292,
1039,
355,
40522,
198,
6738,
299,
32152,
13,
25120,
1330,
9943,
7094,
198,
6738,
13... | 2.218858 | 1,156 |
import os
import sys
import h5py
import argparse
import net.proto_file as proto_file
import subprocess
import numpy as np
import scipy.io as sio
import data_analysis.find_caffe as find_caffe
import Config.ExpConfigInfo as Config
caffe_root = find_caffe.caffe_root
if __name__ == '__main__':
parser = argparse... | [
11748,
28686,
198,
11748,
25064,
198,
11748,
289,
20,
9078,
198,
11748,
1822,
29572,
198,
11748,
2010,
13,
1676,
1462,
62,
7753,
355,
44876,
62,
7753,
198,
11748,
850,
14681,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
629,
541,
88,... | 2.293423 | 593 |
# -*- coding: utf-8 -*-
import io
import json
import os
import glob
import requests
import urllib.parse
import sys
import time
from argparse import ArgumentParser
parser = ArgumentParser()
parser.add_argument("-p", "--path",
help="log path", dest="p", default="app/static/line")
parser.add_argument("-i", "-... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
33245,
198,
11748,
33918,
198,
11748,
28686,
198,
11748,
15095,
198,
11748,
7007,
198,
11748,
2956,
297,
571,
13,
29572,
198,
11748,
25064,
198,
11748,
640,
628,
19... | 2.574879 | 414 |
# -*- coding: utf-8 -*-
"""
MIT License
Copyright (c) 2020 supr3me
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, ... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
201,
198,
37811,
201,
198,
36393,
13789,
201,
198,
201,
198,
15269,
357,
66,
8,
12131,
424,
1050,
18,
1326,
201,
198,
201,
198,
5990,
3411,
318,
29376,
7520,
11,
... | 3.461078 | 334 |
#!/usr/bin/env python3
import math
# Binomial coeff 4ever
print(int(find_bin_coeff(40, 20))) | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
11748,
10688,
198,
198,
2,
20828,
49070,
763,
14822,
604,
964,
198,
198,
4798,
7,
600,
7,
19796,
62,
8800,
62,
1073,
14822,
7,
1821,
11,
1160,
22305
] | 2.435897 | 39 |
# Fizz Buzz in Tensorflow!
# Our goal is to produce fizzbuzz for the numbers 1 to 100.
# So it would be unfair to include these in our training data.
# Accordingly, the training data corresponds to the numbers 101 to (2 ** NUM_DIGITS - 1).
# see http://joelgrus.com/2016/05/23/fizz-buzz-in-tensorflow/
from PyBaseGUI.Mpl... | [
2,
376,
6457,
15753,
287,
309,
22854,
11125,
0,
198,
2,
3954,
3061,
318,
284,
4439,
277,
6457,
65,
4715,
329,
262,
3146,
352,
284,
1802,
13,
198,
2,
1406,
340,
561,
307,
11675,
284,
2291,
777,
287,
674,
3047,
1366,
13,
198,
2,
2... | 3.213833 | 1,894 |
# uncompyle6 version 3.2.4
# Python bytecode 2.7 (62211)
# Decompiled from: Python 2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:30:26) [MSC v.1500 64 bit (AMD64)]
# Embedded file name: lib.coginvasion.hood.TownLoader
from panda3d.core import *
from direct.directnotify.DirectNotifyGlobal import directNotify
from direct.f... | [
2,
34318,
2349,
21,
2196,
513,
13,
17,
13,
19,
198,
2,
11361,
18022,
8189,
362,
13,
22,
357,
21,
1828,
1157,
8,
198,
2,
4280,
3361,
3902,
422,
25,
11361,
362,
13,
22,
13,
1314,
357,
85,
17,
13,
22,
13,
1314,
25,
6888,
2998,
... | 2.951923 | 208 |
########
# Copyright (c) 2013 GigaSpaces Technologies Ltd. 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... | [
7804,
198,
2,
15069,
357,
66,
8,
2211,
402,
13827,
4561,
2114,
21852,
12052,
13,
1439,
2489,
10395,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
4... | 3.742739 | 241 |
import warnings
import pytest
@pytest.fixture(autouse=True)
def clear_session_after_test():
"""This wrapper runs for all the tests in the legacy directory (recursively).
"""
with warnings.catch_warnings():
warnings.filterwarnings('ignore', message=r'(.+) Keras 2 ',
... | [
11748,
14601,
198,
11748,
12972,
9288,
628,
198,
31,
9078,
9288,
13,
69,
9602,
7,
2306,
1076,
28,
17821,
8,
198,
4299,
1598,
62,
29891,
62,
8499,
62,
9288,
33529,
198,
220,
220,
220,
37227,
1212,
29908,
4539,
329,
477,
262,
5254,
28... | 2.507042 | 142 |
import pytest
from tik.utils import _RotX, _RotY, _RotZ, Rot, Trans, homogeneous_transform
import numpy as np
ATOL = 1.e-8
@pytest.mark.parametrize(('theta', 'expected'), [
(0, np.eye(4)),
(2*np.pi, np.eye(4)),
])
@pytest.mark.parametrize(('roll','pitch','yaw','expected'), [
(0, 0, 0, np.eye(4)),
(2*n... | [
11748,
12972,
9288,
198,
6738,
256,
1134,
13,
26791,
1330,
4808,
24864,
55,
11,
4808,
24864,
56,
11,
4808,
24864,
57,
11,
18481,
11,
3602,
11,
3488,
32269,
62,
35636,
198,
11748,
299,
32152,
355,
45941,
198,
198,
1404,
3535,
796,
352,... | 1.978648 | 281 |
import logging
log = logging.getLogger(__name__)
import sys
from otp.ai.passlib.utils.decor import deprecated_method
__all__ = [
'PasswordHash']
from abc import ABCMeta, abstractmethod, abstractproperty
@recreate_with_metaclass(ABCMeta)
| [
11748,
18931,
198,
6404,
796,
18931,
13,
1136,
11187,
1362,
7,
834,
3672,
834,
8,
198,
11748,
25064,
198,
6738,
30972,
79,
13,
1872,
13,
6603,
8019,
13,
26791,
13,
12501,
273,
1330,
39224,
62,
24396,
198,
834,
439,
834,
796,
685,
19... | 3.12987 | 77 |
from nodetasks.nodetasks import main
| [
6738,
18666,
316,
6791,
13,
77,
375,
316,
6791,
1330,
1388,
198
] | 3.083333 | 12 |
from distutils.version import LooseVersion
from mongosql import SA_VERSION, SA_12, SA_13
def SA_VERSION_IN(min_version, max_version):
""" Check that SqlAlchemy version lies within a range
This is slow; only use in unit-tests!
"""
return LooseVersion(min_version) <= LooseVersion(SA_VERSION) <= LooseV... | [
6738,
1233,
26791,
13,
9641,
1330,
6706,
577,
14815,
198,
198,
6738,
285,
506,
418,
13976,
1330,
14719,
62,
43717,
11,
14719,
62,
1065,
11,
14719,
62,
1485,
628,
198,
4299,
14719,
62,
43717,
62,
1268,
7,
1084,
62,
9641,
11,
3509,
62... | 2.945274 | 201 |
import numpy as np
import cv2
red_lower = np.array([0,43,46])
red_upper = np.array([10,255,255])
blue_lower = np.array([100,43,46])
blue_upper = np.array([124,255,255])
cap = cv2.VideoCapture(0)
cap.set(3,320)
cap.set(4,240)
while 1:
ret,frame = cap.read()
frame = cv2.GaussianBlur(frame,(5,5),0)
hsv = cv2... | [
11748,
299,
32152,
355,
45941,
198,
11748,
269,
85,
17,
198,
198,
445,
62,
21037,
796,
45941,
13,
18747,
26933,
15,
11,
3559,
11,
3510,
12962,
198,
445,
62,
45828,
796,
45941,
13,
18747,
26933,
940,
11,
13381,
11,
13381,
12962,
198,
... | 2.005376 | 372 |
from __future__ import annotations
import tempfile
from contextlib import contextmanager
from dataclasses import dataclass
from typing import Any, Dict, Iterator, List, Optional
from commonmodel.base import Schema, SchemaLike
from dcp.data_format.handler import get_handler_for_name, infer_schema_for_name
from dcp.dat... | [
6738,
11593,
37443,
834,
1330,
37647,
198,
198,
11748,
20218,
7753,
198,
6738,
4732,
8019,
1330,
4732,
37153,
198,
6738,
4818,
330,
28958,
1330,
4818,
330,
31172,
198,
6738,
19720,
1330,
4377,
11,
360,
713,
11,
40806,
1352,
11,
7343,
11... | 3.507874 | 254 |
import pytest
| [
11748,
12972,
9288,
628
] | 3.75 | 4 |
#
# PySNMP MIB module CISCO-SME-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-SME-MIB
# Produced by pysmi-0.3.4 at Wed May 1 12:12:18 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 201... | [
2,
198,
2,
9485,
15571,
7378,
337,
9865,
8265,
36159,
8220,
12,
50,
11682,
12,
8895,
33,
357,
4023,
1378,
16184,
76,
489,
8937,
13,
785,
14,
79,
893,
11632,
8,
198,
2,
7054,
45,
13,
16,
2723,
2393,
1378,
14,
14490,
14,
67,
615,
... | 2.898766 | 8,752 |
from __future__ import annotations
import typing as tp
from racketinterpreter.classes import data as d
from racketinterpreter.classes import errors as err
from racketinterpreter.predefined._base import BuiltInProc
if tp.TYPE_CHECKING:
from racketinterpreter.classes import ast
from racketinterpreter.processes i... | [
6738,
11593,
37443,
834,
1330,
37647,
198,
11748,
19720,
355,
256,
79,
198,
6738,
37391,
3849,
3866,
353,
13,
37724,
1330,
1366,
355,
288,
198,
6738,
37391,
3849,
3866,
353,
13,
37724,
1330,
8563,
355,
11454,
198,
6738,
37391,
3849,
386... | 3.62766 | 94 |
import os
import json
from django.core.urlresolvers import reverse
from seaserv import seafile_api
from seahub.test_utils import BaseTestCase
| [
11748,
28686,
198,
11748,
33918,
198,
198,
6738,
42625,
14208,
13,
7295,
13,
6371,
411,
349,
690,
1330,
9575,
198,
198,
6738,
21547,
712,
1330,
25127,
576,
62,
15042,
198,
198,
6738,
384,
993,
549,
13,
9288,
62,
26791,
1330,
7308,
144... | 3.295455 | 44 |
import sys
import json
import numpy as np
solve() | [
11748,
25064,
198,
11748,
33918,
198,
11748,
299,
32152,
355,
45941,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
198,
82,
6442,
3419
] | 2.36 | 25 |
# Generated by Django 3.0.5 on 2020-11-28 14:53
from django.db import migrations, models
import django.db.models.deletion
| [
2,
2980,
515,
416,
37770,
513,
13,
15,
13,
20,
319,
12131,
12,
1157,
12,
2078,
1478,
25,
4310,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
14208,
13,
9945,
13,
27530,
13,
2934,
1616,
295,
... | 2.795455 | 44 |
from jsonmodels_qdyk.fields import StringField, ListField, EmbeddedField
from jsonmodels_qdyk.models import Base
| [
6738,
33918,
27530,
62,
80,
9892,
74,
13,
25747,
1330,
10903,
15878,
11,
7343,
15878,
11,
13302,
47238,
15878,
198,
6738,
33918,
27530,
62,
80,
9892,
74,
13,
27530,
1330,
7308,
628,
628,
628,
198
] | 3.4 | 35 |
'''
_*_coding:utf-8 _*_
@Time :2022/1/28 19:00
@Author : qiaofengsheng
@File :dataset.py
@Software :PyCharm
'''
import os
from PIL import Image
from torch.utils.data import *
from model.utils import utils
from torchvision import transforms
| [
7061,
6,
198,
4808,
9,
62,
66,
7656,
25,
40477,
12,
23,
4808,
9,
62,
198,
2488,
7575,
220,
220,
220,
220,
1058,
1238,
1828,
14,
16,
14,
2078,
220,
220,
678,
25,
405,
198,
2488,
13838,
220,
220,
1058,
10662,
544,
1659,
1516,
7091... | 2.524272 | 103 |
import glob
import shapefile
| [
11748,
15095,
198,
11748,
5485,
7753,
628,
628,
198
] | 3.666667 | 9 |
import os
import hydra
import jax
import jax.numpy as jnp
from flax.serialization import to_state_dict
from omegaconf import DictConfig, OmegaConf
from models.jax import get_model
from neural_kernels.nads import mixed_derivative_nad_decomposition
from utils.misc import get_apply_fn
@hydra.main(config_path="config/c... | [
11748,
28686,
198,
198,
11748,
25039,
198,
11748,
474,
897,
198,
11748,
474,
897,
13,
77,
32152,
355,
474,
37659,
198,
6738,
781,
897,
13,
46911,
1634,
1330,
284,
62,
5219,
62,
11600,
198,
6738,
267,
28917,
7807,
69,
1330,
360,
713,
... | 2.911765 | 136 |
import pytest
from acousticsim.representations.intensity import Intensity
from numpy.testing import assert_array_almost_equal
@pytest.mark.xfail
| [
198,
198,
11748,
12972,
9288,
198,
198,
6738,
936,
23968,
873,
320,
13,
15603,
602,
13,
47799,
1330,
2558,
6377,
198,
198,
6738,
299,
32152,
13,
33407,
1330,
6818,
62,
18747,
62,
28177,
62,
40496,
628,
198,
31,
9078,
9288,
13,
4102,
... | 3.304348 | 46 |
import yaml
import csv
import os
from tqdm import tqdm
import requests
import time
with open("config.yml", "r", encoding="utf-8") as f:
config = yaml.safe_load(f)
API_KEY = config["API_KEY"]
CHANNELS_API_URL = "https://www.googleapis.com/youtube/v3/channels"
PLAYLIST_API_URL = "https://www.googleapis.com/youtub... | [
11748,
331,
43695,
198,
11748,
269,
21370,
198,
11748,
28686,
198,
6738,
256,
80,
36020,
1330,
256,
80,
36020,
198,
11748,
7007,
198,
11748,
640,
628,
198,
198,
4480,
1280,
7203,
11250,
13,
88,
4029,
1600,
366,
81,
1600,
21004,
2625,
... | 2.09792 | 1,154 |
import hyperonpy as hp
from hyperonpy import AtomKind, init_logger
| [
11748,
8718,
261,
9078,
355,
27673,
198,
198,
6738,
8718,
261,
9078,
1330,
33102,
35854,
11,
2315,
62,
6404,
1362,
628
] | 3.285714 | 21 |
from neopixel import NeoPixel
import machine
import time
np = NeoPixel(machine.Pin(4),1)
for r in range(255):
for g in range(255):
for b in range(255):
np[0]=((r,g,b))
np.write()
time.sleep_ms(10)
| [
6738,
497,
404,
7168,
1330,
21227,
40809,
198,
11748,
4572,
198,
11748,
640,
198,
198,
37659,
796,
21227,
40809,
7,
30243,
13,
28348,
7,
19,
828,
16,
8,
198,
198,
1640,
374,
287,
2837,
7,
13381,
2599,
198,
220,
329,
308,
287,
2837,
... | 2.158879 | 107 |
# -*- coding: utf-8 -*-
# Written by Olga Moskvyak (olga.moskvyak@hdr.qut.edu.au)
import logging
import torch.nn as nn
from torchvision import models as torchmodels # NOQA
from efficientnet_pytorch import EfficientNet
logger = logging.getLogger(__name__)
NAME_EMBEDDING_SIZE = {
'efficientnet-b0': 1280,
'ef... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
22503,
416,
6544,
4908,
5826,
74,
7670,
461,
357,
349,
4908,
13,
16785,
74,
7670,
461,
31,
71,
7109,
13,
80,
315,
13,
15532,
13,
559,
8,
198,
198,
11748,
18931,
... | 2.216113 | 782 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Refer to "https://hibiki-press.tech/algorithm/sum_2darray/698"
@author: hibikisan
"""
import random
if __name__ == '__main__':
dim = (5, 3) # the dimension of original data array
data = []
for i in range(dim[0]):
data.append([random.randi... | [
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,
46238,
284,
366,
5450,
1378,
3145,
5580,
12,
8439,
13,
13670,
14,
282,
42289,
14,
16345,
62,
17,
67,
... | 2.188406 | 276 |
import matplotlib.pyplot as plt
import os
import numpy as np
| [
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
28686,
198,
11748,
299,
32152,
355,
45941,
628
] | 3.1 | 20 |
# Ω*
# ■ ■■■■■
# ■ ■■ ■■
# ■ ■■ ■
# ■ ■■
# ■■■■■ ■ ■■■
# ■■ ■■ ■ ■■■
# ■■ ■■ ■ ■■■■
# ■■ ■■ ■ ■■■■
# ■■■■■■■■■ ■ ■■■
... | [
2,
7377,
102,
9,
198,
2,
220,
220,
564,
225,
447,
225,
447,
225,
447,
225,
447,
225,
447,
225,
447,
225,
447,
225,
447,
225,
447,
225,
447,
225,
447,
225,
29316,
447,
225,
447,
225,
447,
225,
447,
225,
447,
225,
447,
225,
447,... | 2.22027 | 8,140 |
from NN import NN
import numpy as np
import matplotlib.pylab as plt
layer_sizes = [2,4,1]
activations = ['relu','sigmoid']
N = NN(layer_sizes,activations)
#print(N.biases[4].shape)
input = np.array([[1,2,3],[3,5,4]])
N.forward_prop(input)
N.back_prop(np.array([[1,2,3]]))
N.derivative_check(m=6,verbose=False)
N.updat... | [
6738,
399,
45,
1330,
399,
45,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
79,
2645,
397,
355,
458,
83,
198,
198,
29289,
62,
82,
4340,
796,
685,
17,
11,
19,
11,
16,
60,
198,
15791,
602,
796,
37250,
260,
... | 2.154839 | 155 |
from classes.structures.Atribuicao import Atribuicao
from classes.structures.Cabecalho import Cabecalho
from classes.structures.Escreva import Escreva
from classes.structures.Indice import Indice
from classes.structures.InicializacaoDeVariaveis import InicializacaoDeVariaveis
from classes.structures.Leia import Leia
fr... | [
6738,
6097,
13,
7249,
942,
13,
2953,
822,
84,
3970,
78,
1330,
1629,
822,
84,
3970,
78,
198,
6738,
6097,
13,
7249,
942,
13,
34,
397,
721,
282,
8873,
1330,
15976,
721,
282,
8873,
198,
6738,
6097,
13,
7249,
942,
13,
47051,
260,
6862,... | 3.286765 | 136 |
#!/usr/bin/env python
#
# 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.0OA
#
# Authors:
# - Wen Guan, <wen.guan@cern.ch>, 2020 - 2021
try:
impor... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
921,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2... | 2.992857 | 280 |
"""
Linux on Hyper-V and Azure Test Code, ver. 1.0.0
Copyright (c) Microsoft Corporation
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/LICEN... | [
37811,
198,
19314,
319,
15079,
12,
53,
290,
22134,
6208,
6127,
11,
3326,
13,
352,
13,
15,
13,
15,
198,
15269,
357,
66,
8,
5413,
10501,
198,
198,
3237,
2489,
10395,
198,
26656,
15385,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
... | 2.12165 | 3,806 |
#
# Autogenerated by Thrift Compiler (0.11.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
# options string: py
#
from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException
from thrift.protocol.TProtocol import TProtocolException
from thrift.TRecursive impo... | [
2,
198,
2,
5231,
519,
877,
515,
416,
16283,
2135,
3082,
5329,
357,
15,
13,
1157,
13,
15,
8,
198,
2,
198,
2,
8410,
5626,
48483,
4725,
48481,
7013,
15986,
311,
11335,
14603,
7013,
35876,
25003,
7013,
15986,
8410,
2751,
198,
2,
198,
... | 2.43982 | 889 |
import tensorflow as tf
import os
import pathlib
import numpy as np
if __name__ == '__main__':
import matplotlib.pyplot as plt
batch_size = 8
sample_batch_num = 4
dataset = CalligraphyDataset(data_dir='./data/chinese-calligraphy-dataset/',
character_csv='./data/label_ch... | [
11748,
11192,
273,
11125,
355,
48700,
198,
11748,
28686,
198,
11748,
3108,
8019,
198,
11748,
299,
32152,
355,
45941,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
1330,
2603,
29487,
8019,
1... | 1.935154 | 586 |
__version__ = '1.0.0-rc.1'
__author__ = 'Lorenzo Menghini, Martino Pulici, Alessandro Stockman, Luca Zucchini'
import argparse
import pandas as pd
import torch
from rate_severity_of_toxic_comments.model import create_model
from rate_severity_of_toxic_comments.utilities import parse_config, process_config
DEFAULT_... | [
834,
9641,
834,
796,
705,
16,
13,
15,
13,
15,
12,
6015,
13,
16,
6,
198,
834,
9800,
834,
796,
705,
43,
29578,
10872,
6065,
456,
5362,
11,
3981,
2879,
21624,
44070,
11,
47319,
28092,
10500,
805,
11,
7598,
64,
1168,
1229,
45045,
6,
... | 2.23036 | 751 |
import argparse
import os
import sys
import unittest
from typing import List
import click # type: ignore
import coverage # type: ignore
from flask_migrate import Migrate # type: ignore
from application import create_app, sqla # type: ignore
from application.cmd import cre_main
# Hacky solutions to make this both... | [
11748,
1822,
29572,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
555,
715,
395,
198,
6738,
19720,
1330,
7343,
198,
198,
11748,
3904,
220,
1303,
2099,
25,
8856,
198,
11748,
5197,
220,
1303,
2099,
25,
8856,
198,
6738,
42903,
62,
76,
... | 3.176245 | 261 |
import fpga
import modelsim
import config_manager
import ascii_ui
import os
import time
import pathlib
import keyboard
screenIO = ascii_ui.ScreenIO()
screenIO.renderMessage("Config loading...")
configuration = initialise(screenIO)
run_lib(screenIO, configuration)
run_compile(screenIO, configuration)
run_simulat... | [
11748,
277,
79,
4908,
198,
11748,
4981,
320,
198,
11748,
4566,
62,
37153,
198,
11748,
355,
979,
72,
62,
9019,
198,
11748,
28686,
220,
198,
11748,
640,
198,
11748,
3108,
8019,
198,
11748,
10586,
628,
198,
9612,
9399,
796,
355,
979,
72,... | 3.261682 | 107 |
'''
rrsig_orphan - Record test: RrsigOrphan
.. Copyright (c) 2015 Neustar, Inc. All rights reserved.
.. See COPYRIGHT.txt for full notice. See LICENSE.txt for terms and conditions.
'''
import time
import dns.rdtypes.ANY.RRSIG
import dns.dnssec
import dns_sprockets_lib.validators as validators
class RrsigOrphan(... | [
7061,
6,
198,
81,
3808,
328,
62,
13425,
272,
532,
13266,
1332,
25,
371,
3808,
328,
5574,
19080,
198,
198,
492,
15069,
357,
66,
8,
1853,
3169,
436,
283,
11,
3457,
13,
1439,
2489,
10395,
13,
198,
492,
4091,
27975,
38162,
9947,
13,
1... | 2.473684 | 285 |
import itertools
import os
from seasight_forecasting import global_vars
from threading import Thread
from time import sleep, time
| [
198,
11748,
340,
861,
10141,
198,
11748,
28686,
198,
6738,
21547,
432,
62,
754,
19913,
1330,
3298,
62,
85,
945,
198,
6738,
4704,
278,
1330,
14122,
198,
6738,
640,
1330,
3993,
11,
640,
198
] | 3.852941 | 34 |
# -*- coding: utf-8 -*-
# This file is part of ModulemdTranslationHelpers
# Copyright (C) 2018 Stephen Gallagher
#
# Fedora-License-Identifier: MIT
# SPDX-2.0-License-Identifier: MIT
# SPDX-3.0-License-Identifier: MIT
#
# This program is free software.
# For more information on the license, see COPYING.
# For more info... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
770,
2393,
318,
636,
286,
19937,
9132,
48313,
12621,
19276,
198,
2,
15069,
357,
34,
8,
2864,
7970,
38580,
198,
2,
198,
2,
32245,
12,
34156,
12,
33234,
7483,
25,
1... | 2.506143 | 2,035 |
import datetime
from sqlalchemy import Column, Integer, Text, Table, DateTime
from sqlalchemy.orm import relationship, backref
from sqlalchemy.ext.declarative import declarative_base
base = declarative_base()
certs = Table(
"ssl_certificates",
base.metadata,
Column("cert_id", Integer, primary_key=True, nu... | [
11748,
4818,
8079,
198,
6738,
44161,
282,
26599,
1330,
29201,
11,
34142,
11,
8255,
11,
8655,
11,
7536,
7575,
198,
6738,
44161,
282,
26599,
13,
579,
1330,
2776,
11,
736,
5420,
198,
6738,
44161,
282,
26599,
13,
2302,
13,
32446,
283,
876... | 3 | 148 |
"""Rigging data storing.
This script has functions that allows maya to save the rigging tool process
results inside an empty network node that doesn't have transform info.
It is in charge of creating the node and the attributes to store the data.
It can also query the data or delete the attributes.
We are using this... | [
37811,
49,
328,
2667,
1366,
23069,
13,
198,
198,
1212,
4226,
468,
5499,
326,
3578,
743,
64,
284,
3613,
262,
48784,
2891,
1429,
198,
43420,
2641,
281,
6565,
3127,
10139,
326,
1595,
470,
423,
6121,
7508,
13,
198,
198,
1026,
318,
287,
... | 3.108688 | 2,751 |
"""Test RevokeHandler."""
import pytest
from ......config.settings import Settings
from ......core.event_bus import EventBus, MockEventBus
from ......core.in_memory import InMemoryProfile
from ......core.profile import Profile
from ......messaging.request_context import RequestContext
from ......messaging.responder i... | [
37811,
14402,
5416,
2088,
25060,
526,
15931,
198,
198,
11748,
12972,
9288,
198,
198,
6738,
47082,
11250,
13,
33692,
1330,
16163,
198,
6738,
47082,
7295,
13,
15596,
62,
10885,
1330,
8558,
16286,
11,
44123,
9237,
16286,
198,
6738,
47082,
72... | 3.384615 | 169 |
# Copyright 2017 Rice University
#
# 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 writin... | [
2,
15069,
2177,
13823,
2059,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
921,
743,
7330... | 3.528814 | 295 |
import numpy as np
import numpy.testing as npt
from statsmodels.tools import sequences
| [
11748,
299,
32152,
355,
45941,
198,
11748,
299,
32152,
13,
33407,
355,
299,
457,
198,
6738,
9756,
27530,
13,
31391,
1330,
16311,
628,
628,
198
] | 3.64 | 25 |
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: book_doc_details.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection ... | [
2,
2980,
515,
416,
262,
8435,
11876,
17050,
13,
220,
8410,
5626,
48483,
0,
198,
2,
2723,
25,
1492,
62,
15390,
62,
36604,
13,
1676,
1462,
198,
198,
11748,
25064,
198,
62,
65,
28,
17597,
13,
9641,
62,
10951,
58,
15,
60,
27,
18,
29... | 2.490183 | 1,528 |
import asyncio
import beneath
from datetime import datetime, timedelta
from config import BLACKLIST
asyncio.run(main())
| [
11748,
30351,
952,
198,
11748,
11061,
198,
6738,
4818,
8079,
1330,
4818,
8079,
11,
28805,
12514,
198,
198,
6738,
4566,
1330,
31963,
45849,
628,
198,
198,
292,
13361,
952,
13,
5143,
7,
12417,
28955,
198
] | 3.542857 | 35 |
import asyncio
from time import sleep, time
import pytest
from ansq import open_connection
from ansq.tcp.connection import NSQConnection
from ansq.tcp.exceptions import ConnectionClosedError
@pytest.mark.asyncio
@pytest.mark.asyncio
@pytest.mark.asyncio
@pytest.mark.asyncio
@pytest.mark.asyncio
@pytest.ma... | [
11748,
30351,
952,
198,
6738,
640,
1330,
3993,
11,
640,
198,
198,
11748,
12972,
9288,
198,
198,
6738,
9093,
80,
1330,
1280,
62,
38659,
198,
6738,
9093,
80,
13,
83,
13155,
13,
38659,
1330,
10896,
48,
32048,
198,
6738,
9093,
80,
13,
8... | 2.673759 | 141 |
# 054 - LER ANO DE NASCIMENTO DE 07 PESSOAS E MOSTRAR QUANTAS PESSOAS SÂO MAIORES DE IDADE.
from datetime import date
atual = date.today().year
tmaior = 0
tmenor = 0
for pessoa in range(1, 8):
nasc = int(input(f'Em que ano {pessoa}° a pessoa nasceu? '))
idade = atual - nasc
if idade >= 21:
tmaior +... | [
2,
657,
4051,
532,
406,
1137,
3537,
46,
5550,
7210,
34,
3955,
3525,
46,
5550,
8753,
350,
7597,
46,
1921,
412,
337,
10892,
49,
1503,
19604,
8643,
1921,
350,
7597,
46,
1921,
311,
5523,
46,
8779,
41254,
1546,
5550,
4522,
19266,
13,
198... | 2.106195 | 226 |
from functools import reduce
from rest_framework.permissions import BasePermission, SAFE_METHODS
| [
6738,
1257,
310,
10141,
1330,
4646,
198,
198,
6738,
1334,
62,
30604,
13,
525,
8481,
1330,
7308,
5990,
3411,
11,
37630,
36,
62,
49273,
50,
628,
628
] | 3.740741 | 27 |
import shutil
import click
from .main import main
from ..settings import service_template
@main.group("install")
def install():
"""Install a configuration or service"""
@install.command()
@click.pass_context
@click.option('--path', '-p', help="Path to installed file")
def sera(ctx, path):
"""Locally insta... | [
11748,
4423,
346,
198,
198,
11748,
3904,
198,
198,
6738,
764,
12417,
1330,
1388,
198,
6738,
11485,
33692,
1330,
2139,
62,
28243,
628,
198,
31,
12417,
13,
8094,
7203,
17350,
4943,
198,
4299,
2721,
33529,
198,
220,
220,
220,
37227,
15798,... | 2.725632 | 277 |
import os
from datetime import timedelta
from dotenv import load_dotenv
load_dotenv()
SECRET_KEY = os.urandom(32)
# SQLite Database Config
APP_PATH = os.path.dirname(os.path.abspath(__file__))
SQLALCHEMY_DATABASE_URI = 'sqlite:///' + APP_PATH + '/models/sqlite.db'
SQLALCHEMY_TRACK_MODIFICATIONS = True
# setting up... | [
11748,
28686,
198,
6738,
4818,
8079,
1330,
28805,
12514,
628,
198,
6738,
16605,
24330,
1330,
3440,
62,
26518,
24330,
198,
2220,
62,
26518,
24330,
3419,
198,
198,
23683,
26087,
62,
20373,
796,
28686,
13,
333,
3749,
7,
2624,
8,
198,
198,
... | 2.375 | 320 |
"""
# NOTE (for Sam): Run on "QSTrader" Conda Virtual Enviroment
> "source activate QSTrader"
> Run via "python coincap_ERC-20_ranker.py"
Summary of script
1) Open Top ERC-20 file & create a DataFrame with the info
2) Get ID's for all ERC-20 tokens using Global API
3) Use Ticker(Specific Currency)... | [
37811,
198,
2,
24550,
357,
1640,
3409,
2599,
5660,
319,
366,
48,
2257,
81,
5067,
1,
9724,
64,
15595,
2039,
37040,
296,
298,
220,
198,
220,
220,
220,
1875,
366,
10459,
15155,
1195,
2257,
81,
5067,
1,
198,
220,
220,
220,
1875,
5660,
... | 2.27984 | 3,259 |
# WIP
# DreamBNC Bot 2
# (c) DreamBNC
# Loading essential libraries (needed for connecting to IRC)
import zirc, ssl
print("DreamBNC Service Bot")
print("(c) 2016 DreamBNC dev team.")
print("Initalizing.")
# setting variables
bncprovider = DreamBNC
bncweb = dreambnc.xyz
server1 = Mushroom
print("Initalized; connectin... | [
2,
370,
4061,
198,
2,
7610,
33,
7792,
18579,
362,
198,
2,
357,
66,
8,
7610,
33,
7792,
198,
198,
2,
12320,
6393,
12782,
357,
27938,
329,
14320,
284,
30039,
8,
198,
11748,
1976,
1980,
11,
264,
6649,
628,
198,
4798,
7203,
30571,
33,
... | 2.89272 | 261 |
from sus.engines import telegram, reddit, rss
import vcr
import unittest
| [
6738,
2341,
13,
1516,
1127,
1330,
573,
30536,
11,
18374,
11,
374,
824,
198,
11748,
410,
6098,
198,
11748,
555,
715,
395,
628,
628,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
198
] | 2.405405 | 37 |
import tensorflow as tf
import numpy as np
import Quantizers
import math
import time
import struct
from tensorflow.python.ops import standard_ops
from tensorflow.python.ops import nn
hex_lambda = lambda x : hex(struct.unpack('<I', struct.pack('<f', x))[0])
toHex = np.vectorize(hex_lambda)
input_width = input_height... | [
11748,
11192,
273,
11125,
355,
48700,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
16972,
11341,
198,
11748,
10688,
198,
11748,
640,
198,
11748,
2878,
628,
198,
6738,
11192,
273,
11125,
13,
29412,
13,
2840,
1330,
3210,
62,
2840,
198,
... | 2.485934 | 1,173 |
# -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
198,
2,
49962,
284,
262,
24843,
10442,
5693,
357,
1921,
37,
8,
739,
530,
198,
2,
393,
517,
18920,
5964,
11704,
13,
220,
4091,
262,
28536,
2393,
198,
2,
9387,
351,... | 3.343643 | 582 |
from flask import request, render_template, url_for, g, Flask, redirect, flash, abort, json, jsonify, session
from peewee import DoesNotExist
from playhouse.shortcuts import model_to_dict, dict_to_model
import json
from datetime import datetime
from dateutil import parser
from app import app
from app.models.program im... | [
6738,
42903,
1330,
2581,
11,
8543,
62,
28243,
11,
19016,
62,
1640,
11,
308,
11,
46947,
11,
18941,
11,
7644,
11,
15614,
11,
33918,
11,
33918,
1958,
11,
6246,
198,
6738,
613,
413,
1453,
1330,
8314,
3673,
3109,
396,
198,
6738,
711,
480... | 2.949117 | 963 |
import cv2 as cv
import functions
import os
cam = cv.VideoCapture(0) #Iniciando WebCam
file_name = "haarcascade_frontalface_alt2.xml"
classifier = cv.CascadeClassifier(f"{cv.haarcascades}{os.sep}{file_name}") #Modelo para reconhecer faces
dataframe = functions.load_dataframe() #Cargando dataframe com las imagenes par... | [
11748,
269,
85,
17,
355,
269,
85,
198,
11748,
5499,
198,
11748,
28686,
198,
198,
20991,
796,
269,
85,
13,
10798,
49630,
7,
15,
8,
1303,
818,
44070,
25440,
5313,
21701,
198,
7753,
62,
3672,
796,
366,
3099,
5605,
28966,
62,
8534,
1604... | 2.157593 | 1,047 |
from PIL import Image
import urllib.request as request
import requests
from io import BytesIO, StringIO
from bs4 import BeautifulSoup
import numpy as np
def get_images_links(address):
"""
Scrap website from images links
:param address: website address example: https://www.youtube.com/
:return: images ... | [
6738,
350,
4146,
1330,
7412,
198,
11748,
2956,
297,
571,
13,
25927,
355,
2581,
198,
11748,
7007,
198,
6738,
33245,
1330,
2750,
4879,
9399,
11,
10903,
9399,
198,
6738,
275,
82,
19,
1330,
23762,
50,
10486,
198,
11748,
299,
32152,
355,
4... | 2.635862 | 725 |
import http.client
import threading
import typing
| [
11748,
2638,
13,
16366,
198,
11748,
4704,
278,
198,
11748,
19720,
628
] | 4.25 | 12 |
"""
@Time : 2019-1-9 04:41
@Author : TaylorMei
@Email : mhy845879017@gmail.com
@Project : iccv
@File : dsc.py
@Function:
"""
import torch
import torch.nn.functional as F
from torch import nn
from backbone.resnext.resnext101_regular import ResNeXt101
# Module Function
# Module Class
... | [
37811,
198,
220,
2488,
7575,
220,
220,
220,
1058,
13130,
12,
16,
12,
24,
8702,
25,
3901,
198,
220,
2488,
13838,
220,
1058,
8121,
5308,
72,
198,
220,
2488,
15333,
220,
220,
1058,
285,
12114,
23,
29334,
3720,
29326,
31,
14816,
13,
785... | 2.584615 | 130 |
import torch.nn as nn
import torch.nn.functional as F
| [
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
628
] | 3.235294 | 17 |
from .generating import OutputsGenerator
| [
6738,
764,
8612,
803,
1330,
25235,
82,
8645,
1352,
198
] | 4.1 | 10 |
try:
import cloudscraper
except ModuleNotFoundError:
raise ModuleNotFoundError("Unable to load cloudscraper")
def access(endpoint=""):
"""The function used to access the entirety of nitrotype.
Endpoint
--------
https://www.nitrotype.com/{endpoint}
endpoint : str
The end url t... | [
28311,
25,
198,
220,
220,
220,
1330,
6279,
1416,
38545,
198,
16341,
19937,
3673,
21077,
12331,
25,
198,
220,
220,
220,
5298,
19937,
3673,
21077,
12331,
7203,
3118,
540,
284,
3440,
6279,
1416,
38545,
4943,
628,
198,
4299,
1895,
7,
437,
... | 2.525773 | 291 |
# Generated by Django 3.0.8 on 2021-11-22 09:10
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
15,
13,
23,
319,
33448,
12,
1157,
12,
1828,
7769,
25,
940,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
#!/usr/bin/env python
"""Controls when data collection is suspended, in case the X-ray beam is
down
Friedrich Schotte,
Date created: 2017-02-24
Date last modified: 2018-03-15
"""
__version__ = "1.2.9" # logging
from checklist import checklist
import wx, wx3_compatibility
from EditableControls import TextCtrl,Combo... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
37811,
15988,
82,
618,
1366,
4947,
318,
9951,
11,
287,
1339,
262,
1395,
12,
2433,
15584,
318,
198,
2902,
198,
220,
220,
220,
220,
198,
37,
2228,
7527,
3059,
11404,
11,
198,
10430,
27... | 2.606452 | 310 |
# Bibliotecas
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import numpy as np
from scipy.stats import shapiro
from scipy.stats import chi2
from sklearn.preprocessing import LabelEncoder
from sklearn.preprocessing import StandardScaler
from sklearn.feature_selection import... | [
2,
347,
29142,
313,
721,
292,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
384,
397,
1211,
355,
3013,
82,
198,
11748,
299,
32152,
... | 2.424197 | 7,968 |
__all__ = []
from .nodebuffer import NodeBuffer, NodeDescriptor, BufferSet
from .nodebuffer import Scanner as _Scanner
scan = _Scanner.scan
from .jit import JITCompiler as jit
| [
834,
439,
834,
796,
17635,
198,
198,
6738,
764,
17440,
22252,
1330,
19081,
28632,
11,
19081,
24564,
1968,
273,
11,
47017,
7248,
198,
6738,
764,
17440,
22252,
1330,
20937,
1008,
355,
4808,
33351,
1008,
198,
35836,
796,
4808,
33351,
1008,
... | 3.236364 | 55 |
from __future__ import division
from __future__ import print_function
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--epochs', type=int, default=100, help='Number of epochs to train.')
parser.add_argument('--split',nargs='+', type=float, default=[0.9, 0.1, 0.], help="train, test, validation ... | [
6738,
11593,
37443,
834,
1330,
7297,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
198,
11748,
1822,
29572,
198,
198,
48610,
796,
1822,
29572,
13,
28100,
1713,
46677,
3419,
198,
48610,
13,
2860,
62,
49140,
10786,
438,
538,
53... | 3.164179 | 469 |
import typing # noqa: F401
from kubernetes import client # noqa: F401
from kuber import kube_api as _kube_api # noqa: F401
from kuber import definitions as _kuber_definitions # noqa: F401
from kuber import _types # noqa: F401
from kuber.latest.meta_v1 import ListMeta # noqa: F401
from kuber.latest.meta_v1 impor... | [
11748,
19720,
220,
1303,
645,
20402,
25,
376,
21844,
198,
198,
6738,
479,
18478,
3262,
274,
1330,
5456,
220,
1303,
645,
20402,
25,
376,
21844,
198,
6738,
479,
18478,
1330,
479,
3266,
62,
15042,
355,
4808,
74,
3266,
62,
15042,
220,
130... | 2.336635 | 28,773 |
from django.test import TestCase
from eth_account import Account
from web3 import Web3
from gnosis.eth.tests.ethereum_test_case import EthereumTestCaseMixin
from ..models import EthereumTx, MultisigTransaction, SafeStatus
from ..services.index_service import (
EthereumBlockHashMismatch,
IndexService,
Ind... | [
6738,
42625,
14208,
13,
9288,
1330,
6208,
20448,
198,
198,
6738,
4555,
62,
23317,
1330,
10781,
198,
6738,
3992,
18,
1330,
5313,
18,
198,
198,
6738,
19967,
5958,
13,
2788,
13,
41989,
13,
316,
1456,
388,
62,
9288,
62,
7442,
1330,
20313,... | 3.596899 | 129 |
from __future__ import print_function
from faker import Faker
from flask import Flask, request
from requests.auth import *
from flask_restful import Api
import json
from nose.tools import eq_
from halo_flask.exceptions import ApiError
from halo_flask.flask.utilx import status
from halo_bian.bian.abs_bian_srv import Ab... | [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
198,
6738,
277,
3110,
1330,
376,
3110,
198,
6738,
42903,
1330,
46947,
11,
2581,
198,
6738,
7007,
13,
18439,
1330,
1635,
198,
6738,
42903,
62,
2118,
913,
1330,
5949,
72,
198,
11748,
3... | 3.002469 | 405 |
# Copyright 2019 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 law or agreed ... | [
2,
220,
220,
15069,
13130,
2297,
10983,
11,
3457,
13,
198,
2,
198,
2,
220,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
345,
743,
198,
2,
220,
220,
407,
779,
428,
2393,
2845,
287,
11846... | 2.219035 | 6,693 |
import os
import re
import json
import pandas as pd
from deep_phospho import proteomics_utils as prot_utils
from deep_phospho.proteomics_utils.post_analysis import spectronaut as SN
def generate_spec_lib(
data_name,
output_folder,
pred_ion_path,
pred_rt_path,
min_frag_inten=5... | [
11748,
28686,
198,
11748,
302,
198,
11748,
33918,
198,
198,
11748,
19798,
292,
355,
279,
67,
198,
198,
6738,
2769,
62,
746,
14222,
78,
1330,
5915,
31994,
62,
26791,
355,
1237,
62,
26791,
198,
6738,
2769,
62,
746,
14222,
78,
13,
1676,
... | 2.133052 | 1,661 |
#!/usr/bin/python3
import time
import signal
import sys
import os
import threading
import json
import Adafruit_CharLCD as LCD
import imp
from pythonosc import osc_message_builder
from pythonosc import udp_client
from pythonosc import dispatcher
from pythonosc import osc_server
from config import *
from lcd import *
g... | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
198,
11748,
640,
198,
11748,
6737,
198,
11748,
25064,
198,
11748,
28686,
198,
11748,
4704,
278,
198,
11748,
33918,
198,
11748,
1215,
1878,
4872,
62,
12441,
5639,
35,
355,
23598,
198,
11748,... | 3.213904 | 187 |
# coding=utf-8
# Copyright (c) 2019 Alibaba PAI team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | [
2,
19617,
28,
40477,
12,
23,
198,
2,
15069,
357,
66,
8,
13130,
41992,
8147,
40,
1074,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393... | 3.733051 | 236 |
# Copyright 2020 Tensorforce Team. 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 la... | [
2,
15069,
12131,
309,
22854,
3174,
4816,
13,
1439,
6923,
33876,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
... | 4.121547 | 181 |
#!/usr/bin/env python3
"""
Author : ktruong <ktruong@localhost>
Date : 2021-10-25
Purpose: Rock the Casbah
"""
import argparse
import sys
# --------------------------------------------------
def get_args():
"""Get command-line arguments"""
parser = argparse.ArgumentParser(
description='Rock the Cas... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
37811,
198,
13838,
1058,
479,
83,
622,
506,
1279,
21841,
622,
506,
31,
36750,
29,
198,
10430,
220,
220,
1058,
33448,
12,
940,
12,
1495,
198,
30026,
3455,
25,
4631,
262,
11294,
47... | 2.40812 | 936 |
import string
from invert_index import Invert_Index
import config
import json
import numpy as np
import pandas as pd
import math
from file_reader import File_Reader
from file_writer import File_Writer
| [
11748,
4731,
198,
6738,
287,
1851,
62,
9630,
1330,
554,
1851,
62,
15732,
198,
11748,
4566,
198,
11748,
33918,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
10688,
198,
6738,
2393,
62,
46862,
1330,... | 3.722222 | 54 |
#coding: utf-8
import sys
import socket
import os
PORT = 80 #porta padrão caso usuário não especifique
if len(sys.argv) == 1: # Verifica se o usuario passou pelo menos o parametro obrigatorio
print "Nao foi informado a url no paramentro!\n"
sys.exit()
if len(sys.argv) == 3: # Verifica se o usuario es... | [
171,
119,
123,
2,
66,
7656,
25,
3384,
69,
12,
23,
198,
198,
11748,
25064,
198,
11748,
17802,
198,
11748,
28686,
198,
198,
15490,
796,
4019,
1303,
634,
64,
14841,
81,
28749,
6124,
78,
514,
84,
6557,
27250,
299,
28749,
1658,
43106,
36... | 2.25705 | 922 |
# -*- coding: utf-8 -*-
"""
Created on Mon May 13 11:22:01 2019
@author: DiPu
"""
from functools import reduce
people =[{'name': 'Mary', 'height': 160},
{'name': 'Isla', 'height': 80},
{'name': 'Sam'}]
b=(list(filter(lambda x: True if 'height' in x else False,people)))
g=list(map(lambda x:x['height... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
2892,
1737,
1511,
1367,
25,
1828,
25,
486,
13130,
198,
198,
31,
9800,
25,
6031,
47,
84,
198,
37811,
198,
6738,
1257,
310,
10141,
1330,
4646,
19... | 2.362694 | 193 |
# @author ksdme
# abstracts methods on question model
from random import shuffle
from alan.db.models import ReplyModel
def getQuestion(qno, qmodel):
"""
read a question from the
given qmodel
"""
try:
return qmodel.get(qmodel.id == qno)
except qmodel.DoesNotExist:
return None
def getOffset(using, cycle=2... | [
2,
2488,
9800,
479,
21282,
1326,
198,
2,
12531,
82,
5050,
319,
1808,
2746,
198,
6738,
4738,
1330,
36273,
198,
6738,
435,
272,
13,
9945,
13,
27530,
1330,
14883,
17633,
198,
198,
4299,
651,
24361,
7,
80,
3919,
11,
10662,
19849,
2599,
... | 2.730361 | 1,413 |
from flask import render_template, Blueprint
from coh2stats.weeklystats.utils import get_players_stats
from coh2stats.weeklystats.utils import get_teams_stats
from coh2stats import dao
import os
stats = Blueprint('stats', __name__)
@stats.route('/weeklystats/1v1/latest')
@stats.route('/weeklystats/teams/latest')
| [
6738,
42903,
1330,
8543,
62,
28243,
11,
39932,
198,
6738,
16883,
17,
34242,
13,
45291,
34242,
13,
26791,
1330,
651,
62,
32399,
62,
34242,
198,
6738,
16883,
17,
34242,
13,
45291,
34242,
13,
26791,
1330,
651,
62,
660,
4105,
62,
34242,
1... | 3.255102 | 98 |
import sys
if __name__ == '__main__':
if len(sys.argv) == 2 and sys.argv[1] == 'extra':
extra()
else:
main()
| [
11748,
25064,
628,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
611,
18896,
7,
17597,
13,
853,
85,
8,
6624,
362,
290,
25064,
13,
853,
85,
58,
16,
60,
6624,
705,
26086,
10354,
198,
220,
22... | 2.014706 | 68 |