content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
__author__ = 'schmiac1'
"""
Aurora is using axelrod_aurora_test1 to reproduce Table 2 from the Axelrod paper.
"""
import sys
import dworp
import igraph
import logging
import numpy as np
import axelrod_aurora_test1
import pdb
# --- Constant Parameters ---
xdim = 10
ydim = 10
n_tsteps = 8000 # because we cycle through... | [
834,
9800,
834,
796,
705,
20601,
76,
9607,
16,
6,
198,
198,
37811,
198,
32,
333,
5799,
318,
1262,
7877,
417,
14892,
62,
2899,
5799,
62,
9288,
16,
284,
22919,
8655,
362,
422,
262,
42575,
14892,
3348,
13,
198,
37811,
198,
11748,
25064... | 2.281432 | 1,201 |
from main import set_alarm
| [
6738,
1388,
1330,
900,
62,
282,
1670,
628
] | 3.5 | 8 |
""" Test the gym's code for configuring the DonkeyCar's camera settings.
"""
import os
import argparse
import gym
import gym_donkeycar
import numpy as np
if __name__ == "__main__":
# Initialize the donkey environment
# where env_name one of:
env_list = [
"donkey-warehouse-v0",
"donkey-gen... | [
37811,
6208,
262,
11550,
338,
2438,
329,
4566,
870,
262,
43823,
9914,
338,
4676,
6460,
13,
198,
37811,
198,
198,
11748,
28686,
198,
11748,
1822,
29572,
198,
11748,
11550,
198,
11748,
11550,
62,
9099,
2539,
7718,
198,
11748,
299,
32152,
... | 2.120548 | 1,095 |
# pylint: disable=missing-module-docstring,missing-class-docstring,missing-function-docstring,line-too-long
from unittest import mock
import pytest
from eze.plugins.tools.node_npmaudit import NpmAuditTool
from eze.utils.io import create_tempfile_path
from tests.plugins.tools.tool_helper import ToolMetaTestBase
| [
2,
279,
2645,
600,
25,
15560,
28,
45688,
12,
21412,
12,
15390,
8841,
11,
45688,
12,
4871,
12,
15390,
8841,
11,
45688,
12,
8818,
12,
15390,
8841,
11,
1370,
12,
18820,
12,
6511,
198,
6738,
555,
715,
395,
1330,
15290,
198,
198,
11748,
... | 3.15 | 100 |
#!/usr/bin/env python3
from functools import wraps, partial
import numpy as np
import pandas as pd
import xarray as xr
import dask.delayed
from itertools import product
from scipy import signal
from copy import copy
import metpy
from metpy.plots.mapping import CFProjection
from pyproj import Proj
from scipy.spatial imp... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
6738,
1257,
310,
10141,
1330,
27521,
11,
13027,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
2124,
18747,
355,
2124,
81,
198,
11748,
288,
2... | 2.620308 | 2,984 |
# -*- coding: utf-8 -*-
"""
Scores the readability of a text and output a variety of metrics including: Flesch-Kincaid Grade Level, Gunning Fog, ARI, Dale Chall, SMOG, and more
"""
__title__ = 'py-readabilitiy-metrics'
__version__ = '1.4.4'
__author__ = 'Carmine DiMascio'
__license__ = 'MIT'
__copyright__ = 'Copyright ... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
3351,
2850,
262,
1100,
1799,
286,
257,
2420,
290,
5072,
257,
4996,
286,
20731,
1390,
25,
376,
829,
354,
12,
42,
1939,
1698,
22653,
5684,
11,
6748,
768,
333... | 2.822222 | 135 |
#!/usr/bin/python
import sys
for line in sys.stdin:
print line
| [
2,
48443,
14629,
14,
8800,
14,
29412,
201,
198,
11748,
25064,
201,
198,
201,
198,
1640,
1627,
287,
25064,
13,
19282,
259,
25,
201,
198,
220,
220,
220,
3601,
1627,
201,
198
] | 2.28125 | 32 |
from pathlib import Path
from fastapi.templating import Jinja2Templates
BASE_DIR = Path(__file__).resolve().parent
TEMPLATES_DIR = BASE_DIR / 'templates'
templates = Jinja2Templates(str(TEMPLATES_DIR))
| [
6738,
3108,
8019,
1330,
10644,
198,
198,
6738,
3049,
15042,
13,
11498,
489,
803,
1330,
17297,
6592,
17,
12966,
17041,
628,
198,
33,
11159,
62,
34720,
796,
10644,
7,
834,
7753,
834,
737,
411,
6442,
22446,
8000,
198,
51,
3620,
6489,
294... | 2.797297 | 74 |
from proton.printcolors import printblue, printyellow, printred, printgreen, printpurple, printbold, printunderline
from proton.jobs import Job
from proton.mappers import MapAsync, MapSync, StackAsync, StackerOutput
from proton.timelimiter import TimeLimiter
from multiprocessing import Lock | [
6738,
386,
1122,
13,
4798,
4033,
669,
1330,
3601,
17585,
11,
3601,
36022,
11,
3601,
445,
11,
3601,
14809,
11,
3601,
14225,
1154,
11,
3601,
36575,
11,
3601,
4625,
1370,
198,
6738,
386,
1122,
13,
43863,
1330,
15768,
198,
6738,
386,
1122... | 3.683544 | 79 |
import librosa
import numpy as np
import os
from ourLTFATStft import LTFATStft
import ltfatpy
import imageio
import math
from ADC_Sampling import ADC_Sampling
fft_hop_size = 64
fft_window_length = 256
clipBelow = -10
anStftWrapper = LTFATStft()
sampling_fre = 8000
imagesize = 64
trunk_step = 26
data_root = "./timit_8k_... | [
11748,
9195,
4951,
64,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28686,
198,
6738,
674,
43,
10234,
1404,
1273,
701,
1330,
406,
10234,
1404,
1273,
701,
198,
11748,
300,
83,
17359,
9078,
198,
11748,
2939,
952,
198,
11748,
10688,
198... | 1.828375 | 1,748 |
from tk import tk
import requests
from config import get_lang
BASE_URL = "https://translate.google.cn/translate_a/single"
if __name__ == "__main__":
print(GoogleTranslate("en", "zh-CN", "waste"))
print(GoogleTranslate("zh-CN", "en", "计划"))
print(RecgLang("中文 Maximum number of shown per line"))
prin... | [
6738,
256,
74,
1330,
256,
74,
198,
11748,
7007,
198,
6738,
4566,
1330,
651,
62,
17204,
198,
198,
33,
11159,
62,
21886,
796,
366,
5450,
1378,
7645,
17660,
13,
13297,
13,
31522,
14,
7645,
17660,
62,
64,
14,
29762,
1,
628,
628,
198,
... | 2.185 | 200 |
from easydict import EasyDict as edict
import json
import math as ma
config = edict()
config.TRAIN = edict()
config.VALID = edict()
config.TEST = edict()
config.TRAIN.block_size_mnist = 28
config.TRAIN.tv_weight = 0.0002
config.TRAIN.batch_size = 8
config.TRAIN.lr_init_scgan = 0.001
config.TRAIN.lr_s... | [
6738,
2562,
11600,
1330,
16789,
35,
713,
355,
1225,
713,
201,
198,
11748,
33918,
201,
198,
11748,
10688,
355,
17266,
201,
198,
201,
198,
11250,
796,
1225,
713,
3419,
201,
198,
11250,
13,
51,
3861,
1268,
796,
1225,
713,
3419,
201,
198,... | 2.139053 | 338 |
""" Example: Shows how to detect the sentiment in a piece of text. """
import urllib3
import feersum_nlu
from feersum_nlu.rest import ApiException
from examples import feersumnlu_host, feersum_nlu_auth_token
# Configure API key authorization: APIKeyHeader
configuration = feersum_nlu.Configuration()
# configuration.... | [
37811,
17934,
25,
25156,
703,
284,
4886,
262,
15598,
287,
257,
3704,
286,
2420,
13,
37227,
198,
198,
11748,
2956,
297,
571,
18,
198,
198,
11748,
730,
364,
388,
62,
77,
2290,
198,
6738,
730,
364,
388,
62,
77,
2290,
13,
2118,
1330,
... | 2.901266 | 395 |
import copy
import datetime
from erica.erica_legacy.request_processing.erica_input.v2.grundsteuer_input import GrundsteuerData
from erica.erica_legacy.request_processing.erica_input.v2.grundsteuer_input_gebaeude import Gebaeude
| [
11748,
4866,
198,
11748,
4818,
8079,
198,
198,
6738,
1931,
3970,
13,
263,
3970,
62,
1455,
1590,
13,
25927,
62,
36948,
13,
263,
3970,
62,
15414,
13,
85,
17,
13,
48929,
358,
4169,
15573,
62,
15414,
1330,
25665,
358,
4169,
15573,
6601,
... | 2.755814 | 86 |
# -*- coding: UTF-8 -*-
"""
..
---------------------------------------------------------------------
___ __ __ __ ___
/ | \ | \ | \ / the automatic
\__ |__/ |__/ |___| \__ annotation and
\ | | | | \ ... | [
2,
532,
9,
12,
19617,
25,
41002,
12,
23,
532,
9,
12,
198,
37811,
198,
220,
220,
220,
11485,
198,
220,
220,
220,
220,
220,
220,
220,
16529,
30934,
198,
220,
220,
220,
220,
220,
220,
220,
220,
46444,
220,
220,
11593,
220,
220,
220... | 2.154356 | 33,954 |
"""
Code by Tae-Hwan Hung(@graykode)
https://en.wikipedia.org/wiki/Binomial_distribution
"""
import numpy as np
from matplotlib import pyplot as plt
import operator as op
from functools import reduce
for ls in [(0.5, 20), (0.7, 40), (0.5, 40)]:
p, n_experiment = ls[0], ls[1]
x = np.arange(n_experiment... | [
37811,
198,
220,
220,
220,
6127,
416,
309,
3609,
12,
39,
8149,
12149,
7,
31,
44605,
74,
1098,
8,
198,
220,
220,
220,
3740,
1378,
268,
13,
31266,
13,
2398,
14,
15466,
14,
33,
259,
49070,
62,
17080,
3890,
198,
37811,
198,
11748,
299... | 2.174107 | 224 |
# Copyright 2012 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | [
2,
15069,
2321,
3012,
3457,
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,
262,
13789,
... | 3.069011 | 3,043 |
# 実行モジュール
import MakeCSV
import sys
import os.path
if len(sys.argv) < 3:
print("引数に誤りがあります。")
exit()
input_path = sys.argv[1]
output_path = sys.argv[2]
if os.path.exists(input_path):
if os.path.exists(output_path):
if os.path.isdir(input_path):
if os.path.isdir(output_p... | [
2,
10263,
106,
253,
26193,
234,
40361,
21091,
24440,
43353,
201,
198,
11748,
6889,
7902,
53,
201,
198,
11748,
25064,
201,
198,
11748,
28686,
13,
6978,
201,
198,
201,
198,
361,
18896,
7,
17597,
13,
853,
85,
8,
1279,
513,
25,
201,
198... | 1.50104 | 481 |
import logging
import re
from configparser import ConfigParser
from inspect import cleandoc
import pytest
import tomli_w
from path import Path as _Path
from setuptools.config._apply_pyprojecttoml import _WouldIgnoreField
from setuptools.config.pyprojecttoml import (
read_configuration,
expand_configuration,
... | [
11748,
18931,
198,
11748,
302,
198,
6738,
4566,
48610,
1330,
17056,
46677,
198,
6738,
10104,
1330,
1190,
392,
420,
198,
198,
11748,
12972,
9288,
198,
11748,
284,
4029,
72,
62,
86,
198,
6738,
3108,
1330,
10644,
355,
4808,
15235,
198,
198... | 2.338218 | 1,706 |
import pygame
import sys; sys.path.insert(0, "..")
import tools_for_pygame as pgt
pygame.init()
__test_name__ = "draw.even_circle"
screen = pygame.display.set_mode((800, 600))
pygame.display.set_caption(__test_name__)
clock = pygame.time.Clock()
fps = pgt.gui.Label(pos=0, font="consolas", text_size=20, color=pgt.WHIT... | [
11748,
12972,
6057,
198,
11748,
25064,
26,
25064,
13,
6978,
13,
28463,
7,
15,
11,
366,
492,
4943,
198,
11748,
4899,
62,
1640,
62,
9078,
6057,
355,
279,
13655,
198,
198,
9078,
6057,
13,
15003,
3419,
198,
198,
834,
9288,
62,
3672,
834... | 2.146919 | 422 |
import os
import gzip
import pprint
import csv
import collections
import rpy2
import rpy2.robjects
import rpy2.robjects.numpy2ri
import sklearn
import sklearn.metrics
import sklearn.linear_model
import numpy
import pandas
import pandas.io.parsers
#network_dir = '/home/dhimmels/Documents/serg/ashg13/140310-parsweep'
p... | [
11748,
28686,
198,
11748,
308,
13344,
198,
11748,
279,
4798,
198,
11748,
269,
21370,
198,
11748,
17268,
198,
198,
11748,
374,
9078,
17,
198,
11748,
374,
9078,
17,
13,
22609,
752,
82,
198,
11748,
374,
9078,
17,
13,
22609,
752,
82,
13,
... | 2.495126 | 1,949 |
# Copyright (C) Authors and contributors 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 applic... | [
2,
15069,
357,
34,
8,
220,
46665,
290,
20420,
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.102941 | 204 |
#!/usr/bin/env python3
'''Bananagrams solver.'''
import argparse
import logging
import random
from collections import Counter
from itertools import chain
from string import ascii_lowercase
DOWN, ACROSS = 'down', 'across'
BLANK_CHAR = '.'
class WordGrid:
'''Represents a grid of letters and blanks.'''
@pro... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
7061,
6,
33,
27870,
6713,
82,
1540,
332,
2637,
7061,
198,
198,
11748,
1822,
29572,
198,
11748,
18931,
198,
11748,
4738,
198,
6738,
17268,
1330,
15034,
198,
6738,
340,
861,
101... | 2.162756 | 5,327 |
from collections import deque, OrderedDict
from utils import TransformFunction
import evasions.html
| [
6738,
17268,
1330,
390,
4188,
11,
14230,
1068,
35,
713,
198,
198,
6738,
3384,
4487,
1330,
26981,
22203,
198,
11748,
819,
39327,
13,
6494,
628
] | 4.08 | 25 |
from infotheory.infotools import InfoTools
from infotheory.infotools import __version__
| [
6738,
1167,
20388,
652,
13,
10745,
313,
10141,
1330,
14151,
33637,
198,
6738,
1167,
20388,
652,
13,
10745,
313,
10141,
1330,
11593,
9641,
834,
198
] | 3.52 | 25 |
"""
* Smartphone Brain Scanner 2 License Agreement (MIT License)
*
* Copyright (c) 2012 Arkadiusz Stopczynski, Jakob Eg Larsen, Carsten Stahlhut, Michael Kai Petersen, Lars Kai Hansen.
* Technical University of Denmark, DTU Informatics, Cognitive Systems Section. http://code.google.com/p/smartphonebrainscanner2
*
* Pe... | [
37811,
198,
9,
10880,
4862,
14842,
20937,
1008,
362,
13789,
12729,
357,
36393,
13789,
8,
198,
9,
198,
9,
15069,
357,
66,
8,
2321,
9128,
324,
3754,
89,
13707,
26691,
40008,
11,
25845,
672,
36386,
31239,
268,
11,
1879,
26400,
520,
15668... | 2.644152 | 1,214 |
import cv2 as cv
import numpy as np
from scipy import ndimage
img = cv.imread('D:\@Semester 06\Digital Image Processing\Lab\Manuals\Figures\lab2\Picture5.png', 0)
deg = float(input('Enter degrees: '))
rotated = ndimage.rotate(img, deg)
cv.imshow('Rotated image', rotated)
cv.imwrite('Rotated.png', rotated)
cv.waitKey(5... | [
11748,
269,
85,
17,
355,
269,
85,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
629,
541,
88,
1330,
299,
67,
9060,
198,
198,
9600,
796,
269,
85,
13,
320,
961,
10786,
35,
7479,
31,
13900,
7834,
9130,
59,
27640,
7412,
28403,
59,
17... | 2.642276 | 123 |
import Source.Parsing_Data as pd
import pytest
from datetime import datetime, time | [
11748,
8090,
13,
47,
945,
278,
62,
6601,
355,
279,
67,
198,
11748,
12972,
9288,
198,
6738,
4818,
8079,
1330,
4818,
8079,
11,
640
] | 3.416667 | 24 |
# ©2018 The Arizona Board of Regents for and on behalf of Arizona State University and the Laboratory for Energy And Power Solutions, All Rights Reserved.
#
# Universal Power System Controller
# USAID Middle East Water Security Initiative
#
# Developed by: Nathan Webster
# Primary Investigator: Nathan Johnson
#
# Versi... | [
2,
10673,
7908,
383,
7943,
5926,
286,
3310,
658,
329,
290,
319,
8378,
286,
7943,
1812,
2059,
290,
262,
18643,
329,
6682,
843,
4333,
23555,
11,
1439,
6923,
33876,
13,
198,
2,
198,
2,
14499,
4333,
4482,
22741,
198,
2,
4916,
2389,
6046... | 3.846154 | 130 |
import matplotlib.pyplot as plt
from tools.ai.torch_utils import *
from tools.ai.demo_utils import *
from sklearn.metrics import average_precision_score
from torchvision import utils
imagenet_mean = [0.485, 0.456, 0.406]
imagenet_std = [0.229, 0.224, 0.225]
def accuracy(output, target, topk=(1,)):
"""Computes th... | [
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
6738,
4899,
13,
1872,
13,
13165,
354,
62,
26791,
1330,
1635,
198,
6738,
4899,
13,
1872,
13,
9536,
78,
62,
26791,
1330,
1635,
198,
6738,
1341,
35720,
13,
4164,
10466,
1330,
... | 2.254403 | 511 |
from .scene import *
from .utils.vector3 import *
from .materials.diffuse import *
from .materials.emissive import *
from .materials.refractive import *
from .geometry.cuboid import *
from .geometry.plane import *
from .geometry.sphere import *
| [
6738,
764,
29734,
1330,
1635,
201,
198,
6738,
764,
26791,
13,
31364,
18,
1330,
1635,
201,
198,
6738,
764,
33665,
82,
13,
26069,
1904,
1330,
1635,
201,
198,
6738,
764,
33665,
82,
13,
368,
747,
425,
1330,
1635,
201,
198,
6738,
764,
33... | 3.036145 | 83 |
"""!
@file
@date 07 Jun 2015
@license
Copyright 2015 Brett Tully
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 o... | [
37811,
0,
198,
31,
7753,
198,
31,
4475,
8753,
7653,
1853,
198,
198,
31,
43085,
198,
15269,
1853,
18726,
309,
2132,
198,
198,
26656,
15385,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
5832,
743,
... | 2.537585 | 878 |
from bs4 import BeautifulSoup
import requests as rq
import pandas as pd
| [
6738,
275,
82,
19,
1330,
23762,
50,
10486,
198,
11748,
7007,
355,
374,
80,
220,
198,
11748,
19798,
292,
355,
279,
67,
628
] | 3.217391 | 23 |
from garterline import GarterLine
command = "bash command"
print(haxxor(), command)
print(arrows(), command)
print(garter(), command)
print(mono(), command)
print(GarterLine().color())
| [
6738,
308,
2571,
1370,
1330,
402,
2571,
13949,
198,
198,
21812,
796,
366,
41757,
3141,
1,
198,
4798,
7,
71,
897,
87,
273,
22784,
3141,
8,
198,
4798,
7,
6018,
82,
22784,
3141,
8,
198,
4798,
7,
70,
2571,
22784,
3141,
8,
198,
4798,
... | 3.1 | 60 |
import logging
from typing import List, Tuple
import backoff
import sqlalchemy.exc
from climsoft_api.api.instrumentfaultreport import (
schema as instrumentfaultreport_schema,
)
from climsoft_api.utils.query import get_count
from fastapi.exceptions import HTTPException
from opencdms.models.climsoft import v4_1_1_co... | [
11748,
18931,
198,
6738,
19720,
1330,
7343,
11,
309,
29291,
198,
11748,
736,
2364,
198,
11748,
44161,
282,
26599,
13,
41194,
198,
6738,
5424,
4215,
62,
15042,
13,
15042,
13,
259,
43872,
69,
1721,
13116,
1330,
357,
198,
220,
220,
220,
... | 2.609911 | 787 |
DEBUG = True
# Feature knobs are only intended for incomplete functionality.
FEATURES = {
'PARSE_MARKERS': True,
}
| [
198,
30531,
796,
6407,
198,
198,
2,
27018,
638,
8158,
389,
691,
5292,
329,
17503,
11244,
13,
198,
15112,
47471,
796,
1391,
198,
220,
220,
220,
705,
27082,
5188,
62,
44,
14175,
4877,
10354,
6407,
11,
198,
92,
198
] | 3.102564 | 39 |
from twilio.rest import Client
| [
6738,
665,
346,
952,
13,
2118,
1330,
20985,
628
] | 3.555556 | 9 |
from summertime.model import SUPPORTED_SUMM_MODELS
from summertime.model.base_model import SummModel
from summertime.model.single_doc import LexRankModel
from summertime.dataset.st_dataset import SummDataset
from summertime.dataset import ScisummnetDataset
from typing import List, Tuple
def get_lxr_train_set(datase... | [
6738,
3931,
2435,
13,
19849,
1330,
43333,
1961,
62,
50,
5883,
44,
62,
33365,
37142,
198,
6738,
3931,
2435,
13,
19849,
13,
8692,
62,
19849,
1330,
5060,
76,
17633,
198,
6738,
3931,
2435,
13,
19849,
13,
29762,
62,
15390,
1330,
17210,
275... | 1.937308 | 2,600 |
from data_guys import DataModel
from mapping import Mapping
from ..utils import rotten_peel
| [
6738,
1366,
62,
5162,
893,
1330,
6060,
17633,
198,
6738,
16855,
1330,
337,
5912,
198,
6738,
11485,
26791,
1330,
36371,
62,
431,
417,
628
] | 3.875 | 24 |
import os.path
import unittest
from mpi4py import MPI
from nineml import load, Document
from nineml.user.multicomponent import (
MultiComponent, SubComponent, PortExposure, MultiCompartment,
FromSibling, FromDistal, FromProximal, Mapping, Domain)
from nineml.abstraction import (
Dynamics, Regime, AnalogRece... | [
11748,
28686,
13,
6978,
198,
11748,
555,
715,
395,
198,
6738,
285,
14415,
19,
9078,
1330,
4904,
40,
198,
6738,
299,
7749,
75,
1330,
3440,
11,
16854,
198,
6738,
299,
7749,
75,
13,
7220,
13,
16680,
291,
3361,
3471,
1330,
357,
198,
220... | 2.582173 | 359 |
# Databricks notebook source
from weather import temp
# COMMAND ----------
Temp = temp.Temperature(spark=spark, low_path="/databricks-datasets/weather/low_temps", high_path="/databricks-datasets/weather/high_temps")
# COMMAND ----------
try:
Temp.joint_df
except AttributeError:
print("Run .join() method to crea... | [
2,
16092,
397,
23706,
20922,
2723,
198,
6738,
6193,
1330,
20218,
198,
198,
2,
22240,
6981,
24200,
438,
198,
198,
30782,
796,
20218,
13,
42492,
7,
2777,
668,
28,
2777,
668,
11,
1877,
62,
6978,
35922,
19608,
397,
23706,
12,
19608,
292,
... | 2.87037 | 162 |
#!/usr/bin/python
import rospy
import std_msgs
from ackermann_msgs.msg import AckermannDrive
import serial
import time
# TODO this node could be made better,
# need to call jrk2cmd.. persistent name udev rules not working
import os
cmd_port = os.popen('jrk2cmd --cmd-port').read()
print(cmd_port)
rospy.loginfo("j... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
198,
11748,
686,
2777,
88,
198,
11748,
14367,
62,
907,
14542,
198,
6738,
257,
694,
2224,
77,
62,
907,
14542,
13,
19662,
1330,
36031,
2224,
77,
24825,
198,
198,
11748,
11389,
198,
11748,
640,
... | 2.496 | 375 |
import numpy as np
import torch
import torch.optim as optim
from utils import ReplayBuffer, update_target
from model import CategoricalDQN
| [
11748,
299,
32152,
355,
45941,
198,
11748,
28034,
198,
11748,
28034,
13,
40085,
355,
6436,
198,
198,
6738,
3384,
4487,
1330,
23635,
28632,
11,
4296,
62,
16793,
198,
6738,
2746,
1330,
327,
2397,
12409,
35,
48,
45,
628,
197,
628,
197,
1... | 3.47619 | 42 |
"""The unittest.TestCase for JSON Schema tests."""
from buildscripts.resmokelib.testing.testcases import jsrunnerfile
class JSONSchemaTestCase(jsrunnerfile.JSRunnerFileTestCase):
"""A JSON Schema test to execute."""
REGISTERED_NAME = "json_schema_test"
def __init__(self, logger, json_filename, shell_ex... | [
37811,
464,
555,
715,
395,
13,
14402,
20448,
329,
19449,
10011,
2611,
5254,
526,
15931,
198,
198,
6738,
1382,
46521,
13,
411,
76,
2088,
8019,
13,
33407,
13,
9288,
33964,
1330,
44804,
16737,
7753,
628,
198,
4871,
19449,
27054,
2611,
1440... | 2.673333 | 300 |
import sys
from tokenizer import Token, Tokenizer
| [
11748,
25064,
198,
6738,
11241,
7509,
1330,
29130,
11,
29130,
7509,
198
] | 4.166667 | 12 |
from typing import List, Any, Optional
from pydantic import BaseModel
| [
6738,
19720,
1330,
7343,
11,
4377,
11,
32233,
198,
198,
6738,
279,
5173,
5109,
1330,
7308,
17633,
628
] | 4 | 18 |
# -*- coding: utf-8-*-
import unittest
import os,jieba
os.sys.path.append(os.path.join(os.path.dirname(__file__), '../'))
from src.plugins import Weather,WakeUpBell,Joke
from src.components import logger
from src import mic_text
from src.config.path import APP_RESOURCES_DATA_PATH
from src import mic_voice
import reques... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
12,
9,
12,
198,
11748,
555,
715,
395,
198,
11748,
28686,
11,
73,
494,
7012,
198,
418,
13,
17597,
13,
6978,
13,
33295,
7,
418,
13,
6978,
13,
22179,
7,
418,
13,
6978,
13,
15908,
3672,
... | 2.197324 | 299 |
# Import modules
import requests, smtplib
weather_url = 'https://api.openweathermap.org/data/2.5/onecall'
weather_params= {
'lat':-6.175110,
'lon':106.865036,
'exclude':'current,minutely,daily,alerts',
'appid':'69f04e4613056b159c2761a9d9e664d2' # its not my api id
}
weather_response = requests.get(url... | [
2,
17267,
13103,
198,
11748,
7007,
11,
895,
83,
489,
571,
198,
198,
23563,
62,
6371,
796,
705,
5450,
1378,
15042,
13,
9654,
23563,
8899,
13,
2398,
14,
7890,
14,
17,
13,
20,
14,
505,
13345,
6,
198,
23563,
62,
37266,
28,
1391,
198,
... | 2.932059 | 471 |
import math
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.distributions import Categorical
from agents.optim_utils import init
from common.sc2_utils import masked_softmax
| [
11748,
10688,
198,
11748,
299,
32152,
355,
45941,
198,
198,
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
198,
6738,
28034,
13,
17080,
2455,
507,
1330,
327,
2397,
12409,
198... | 3.492308 | 65 |
#!/usr/bin/python
##############################################################################
# Copyright (c) 2018 OPNFV and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and ... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
29113,
29113,
7804,
4242,
2235,
198,
2,
15069,
357,
66,
8,
2864,
440,
13137,
37,
53,
290,
1854,
13,
198,
2,
198,
2,
1439,
2489,
10395,
13,
770,
1430,
290,
262,
19249,
5696,
198,
2,
389,
... | 2.644407 | 1,198 |
import os
INITIAL_SUBJECT_NUMBER = 7
MAGIC_VALUE = 20201227
if __name__ == "__main__":
dirname = os.path.dirname(__file__)
testFilename = os.path.join(dirname, "testInput.txt")
cardPublicKey, doorPublicKey = getPublicKeysFromInput(testFilename)
assert getEncryptionKey(cardPublicKey, doorPublicKey) == 1489707... | [
11748,
28686,
198,
198,
1268,
2043,
12576,
62,
50,
10526,
23680,
62,
41359,
13246,
796,
767,
198,
45820,
2149,
62,
39488,
796,
1160,
1264,
24403,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
26672,
3672,
... | 2.960674 | 178 |
from setuptools import find_packages, setup
with open('README.md', 'r') as f:
long_description = f.read()
setup(
name='imgpress',
version='0.1.1',
author='Pete Buffon',
author_email='pabuffon@gmail.com',
description='A utility for encoding and compressing images for optimal web use.',
long... | [
6738,
900,
37623,
10141,
1330,
1064,
62,
43789,
11,
9058,
198,
198,
4480,
1280,
10786,
15675,
11682,
13,
9132,
3256,
705,
81,
11537,
355,
277,
25,
198,
220,
220,
220,
890,
62,
11213,
796,
277,
13,
961,
3419,
198,
198,
40406,
7,
198,... | 2.517964 | 334 |
from tempfile import NamedTemporaryFile
from unittest import mock, TestCase
from pyfibre.gui.__main__ import run
from pyfibre.gui.pyfibre_gui import PyFibreGUI
GUI_PATH = 'pyfibre.gui.__main__.PyFibreGUI'
| [
6738,
20218,
7753,
1330,
34441,
12966,
5551,
8979,
198,
6738,
555,
715,
395,
1330,
15290,
11,
6208,
20448,
198,
198,
6738,
12972,
69,
571,
260,
13,
48317,
13,
834,
12417,
834,
1330,
1057,
198,
6738,
12972,
69,
571,
260,
13,
48317,
13,... | 2.625 | 80 |
from src.dataset import Dataset
from typing import Dict
import toml
| [
6738,
12351,
13,
19608,
292,
316,
1330,
16092,
292,
316,
201,
198,
6738,
19720,
1330,
360,
713,
201,
198,
201,
198,
11748,
284,
4029,
201,
198,
201
] | 2.740741 | 27 |
from importlib import import_module
from django.core import signals
from django.core.cache.backends.base import (
InvalidCacheBackendError,
)
from django.utils.connection import BaseConnectionHandler, ConnectionProxy
from requests import Session
from requests_cache import CachedSession
__all__ = [
"external_h... | [
6738,
1330,
8019,
1330,
1330,
62,
21412,
198,
198,
6738,
42625,
14208,
13,
7295,
1330,
10425,
198,
6738,
42625,
14208,
13,
7295,
13,
23870,
13,
1891,
2412,
13,
8692,
1330,
357,
198,
220,
220,
220,
17665,
30562,
7282,
437,
12331,
11,
1... | 3.051587 | 252 |
import importlib
import configuration
import requests
import urllib
from fhirclient import client
from fhirclient.models import bundle
from lib import mongodbConnection
from jsonreducer.ObservationReducer import ObservationReducer
from resources import aggregationResource
from bson.objectid import ObjectId
from datetim... | [
11748,
1330,
8019,
198,
11748,
8398,
198,
11748,
7007,
198,
11748,
2956,
297,
571,
198,
6738,
277,
71,
343,
16366,
1330,
5456,
198,
6738,
277,
71,
343,
16366,
13,
27530,
1330,
18537,
198,
6738,
9195,
1330,
285,
506,
375,
65,
32048,
19... | 2.640986 | 649 |
# Output a simple point cloud represented as balls.
#
import numpy as np
import pyvista
point_cloud = np.random.random((100, 3))
pdata = pyvista.PolyData(point_cloud)
pdata['orig_sphere'] = np.arange(100)
sphere = pyvista.Sphere(radius=0.02)
pc = pdata.glyph(scale=False, geom=sphere)
pl = pyvista.Plotter()
_ = pl.add_m... | [
2,
25235,
257,
2829,
966,
6279,
7997,
355,
11333,
13,
198,
2,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
12972,
85,
12523,
198,
4122,
62,
17721,
796,
45941,
13,
25120,
13,
25120,
19510,
3064,
11,
513,
4008,
198,
79,
7890,
796,
... | 2.428016 | 257 |
# Copyright 2015-2017 Lionheart Software LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | [
2,
15069,
1853,
12,
5539,
15218,
11499,
10442,
11419,
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,... | 3.185602 | 889 |
import csv
from gevent.pool import Pool
from django.core.management.base import BaseCommand
from django.core.management import call_command
from datetime import datetime
DEVICE_ID = __name__ + ".run_all_management_command"
| [
11748,
269,
21370,
198,
6738,
4903,
1151,
13,
7742,
1330,
19850,
198,
198,
6738,
42625,
14208,
13,
7295,
13,
27604,
13,
8692,
1330,
7308,
21575,
198,
6738,
42625,
14208,
13,
7295,
13,
27604,
1330,
869,
62,
21812,
198,
6738,
4818,
8079,
... | 3.454545 | 66 |
"""
Given values of two values n1 and n2 in a Binary Search Tree, find the Lowest Common Ancestor (LCA). You may assume that both the values exist in the tree.
https://www.geeksforgeeks.org/lowest-common-ancestor-in-a-binary-search-tree/
This is my first go at this task - it worked, but looking at the provided
solut... | [
37811,
198,
15056,
3815,
286,
734,
3815,
299,
16,
290,
299,
17,
287,
257,
45755,
11140,
12200,
11,
1064,
262,
7754,
395,
8070,
31200,
273,
357,
5639,
32,
737,
921,
743,
7048,
326,
1111,
262,
3815,
2152,
287,
262,
5509,
13,
220,
198,... | 2.986425 | 221 |
# game of life
import numpy as np
TEST1 = """
.#.#.#
...##.
#....#
..#...
#.#..#
####..
"""
INPUT = open('input18.txt').read()
if __name__ == '__main__':
state = input2state(INPUT)
# state = input2state(TEST1)
# print(state)
n = 100
# n = 5
# part 2, uncomment these
state[0, 0] = Tr... | [
2,
983,
286,
1204,
198,
11748,
299,
32152,
355,
45941,
198,
198,
51,
6465,
16,
796,
37227,
198,
32535,
32535,
32535,
198,
986,
2235,
13,
198,
2,
1106,
2,
198,
492,
2,
986,
198,
2,
32535,
492,
2,
198,
4242,
492,
198,
37811,
198,
... | 1.98494 | 332 |
from fileshare.shared.database.database import db
| [
6738,
3696,
43466,
13,
28710,
13,
48806,
13,
48806,
1330,
20613,
198
] | 4.166667 | 12 |
#!/usr/bin/env python
s = Solution()
print(s.insertIntoBST([40, 20, 60, 10, 30, 50, 70], 25))
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
628,
198,
82,
796,
28186,
3419,
198,
4798,
7,
82,
13,
28463,
5317,
78,
33,
2257,
26933,
1821,
11,
1160,
11,
3126,
11,
838,
11,
1542,
11,
2026,
11,
4317,
4357,
1679,
4008,
198
] | 2.285714 | 42 |
import torch
from torch import nn, optim
import torch.nn.functional as F
from torch import nn, optim
from baseline_config import setup_seed
setup_seed(667)
if __name__ == '__main__':
# import argparse
# from transformers import BertTokenizer
# parser = argparse.ArgumentParser()
# parser.ad... | [
11748,
28034,
201,
198,
6738,
28034,
1330,
299,
77,
11,
6436,
201,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
201,
198,
6738,
28034,
1330,
299,
77,
11,
6436,
201,
198,
6738,
14805,
62,
11250,
1330,
9058,
62,
28826,
201,
198,
... | 2.249293 | 1,769 |
import npyscreen as n
from message_box import MessageBox
# def afterEditing(self):
# self.parentApp.setNextForm(None)
if __name__ == "__main__":
pytter = Pytter()
pytter.run()
| [
11748,
45941,
28349,
1361,
355,
299,
198,
198,
6738,
3275,
62,
3524,
1330,
16000,
14253,
628,
220,
220,
220,
1303,
825,
706,
7407,
1780,
7,
944,
2599,
198,
220,
220,
220,
1303,
220,
220,
220,
220,
2116,
13,
8000,
4677,
13,
2617,
100... | 2.421687 | 83 |
from django.db import models
from django.contrib.auth.models import AbstractUser
| [
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27530,
1330,
27741,
12982,
628
] | 3.727273 | 22 |
import binascii
from .constants import *
from .util import *
from .communication import Communication
from TauLidarCommon.d3 import FrameBuilder
from TauLidarCommon.color import ColorMode, Color
from .info import CameraInfo
from TauLidarCommon.frame import FrameType, Frame
class Camera :
'''
ToF camera class,... | [
11748,
9874,
292,
979,
72,
198,
198,
6738,
764,
9979,
1187,
1330,
1635,
198,
6738,
764,
22602,
1330,
1635,
198,
6738,
764,
32560,
1330,
26117,
198,
6738,
36849,
43,
312,
283,
17227,
13,
67,
18,
1330,
25184,
32875,
198,
6738,
36849,
43... | 2.429055 | 5,314 |
from argparse import ArgumentParser, Namespace
from typing import Callable, Iterable, Union
class EncapsulatingParser(ArgumentParser):
"""
A variant of ArgumentParser which allows for callbacks to be specified.
EncapsulatingParser allows a parser to be assigned callbacks using
the optional after_parse ... | [
6738,
1822,
29572,
1330,
45751,
46677,
11,
28531,
10223,
198,
6738,
19720,
1330,
4889,
540,
11,
40806,
540,
11,
4479,
198,
198,
4871,
14711,
1686,
8306,
46677,
7,
28100,
1713,
46677,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
... | 3.769585 | 217 |
import tensorflow as tf
from tensorflow.python.framework import ops
from . import matching_loss_op
@ops.RegisterShape("Matching")
def _matching_shape(op):
"""Shape function for the Matching op.
"""
output_shape = tf.TensorShape([1])
output_shape_1 = op.inputs[0].get_shape()
return [output_shape, output_sha... | [
11748,
11192,
273,
11125,
355,
48700,
198,
6738,
11192,
273,
11125,
13,
29412,
13,
30604,
1330,
39628,
198,
6738,
764,
1330,
12336,
62,
22462,
62,
404,
198,
198,
31,
2840,
13,
38804,
33383,
7203,
44,
19775,
4943,
198,
4299,
4808,
15699,... | 2.983471 | 121 |
'''
Copyright 2022 Airbus SAS
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 writing, software
dis... | [
7061,
6,
198,
15269,
33160,
39173,
35516,
198,
198,
26656,
15385,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
5832,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
1639,
743... | 3.610108 | 277 |
#####################################################################
# #
# /hardware_interfaces/camera.py #
# #
# Copyright 2013, Monash University ... | [
29113,
29113,
4242,
2,
201,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
... | 1.860163 | 615 |
# Generated by Django 2.2.6 on 2019-10-31 16:38
import django.core.validators
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
362,
13,
17,
13,
21,
319,
13130,
12,
940,
12,
3132,
1467,
25,
2548,
198,
198,
11748,
42625,
14208,
13,
7295,
13,
12102,
2024,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.95122 | 41 |
from django.test import TestCase
from mock import patch, MagicMock
from datetime import datetime, timedelta
from itertools import cycle
from model_mommy import mommy
from model_mommy.recipe import seq
from dbaas.tests.helpers import InstanceHelper
from notification.tasks import send_mail_24hours_before_auto_task
from... | [
6738,
42625,
14208,
13,
9288,
1330,
6208,
20448,
198,
6738,
15290,
1330,
8529,
11,
6139,
44,
735,
198,
6738,
4818,
8079,
1330,
4818,
8079,
11,
28805,
12514,
198,
6738,
340,
861,
10141,
1330,
6772,
198,
198,
6738,
2746,
62,
32542,
1820,
... | 3.144444 | 180 |
import numpy as np
import time
import sys
names = np.array(
[['00', 'Test 00'], ['02', 'Test 02'], ['03', 'Test 03'], ['04', 'Test 04'], ['09', 'Test 09'], ['18', 'Test 18']])
visitorPlayers = np.array([[]])
# TODO input visitor players list
# player0 = main
# player1 = assist1
# player2 = assist2
if __name__ ... | [
11748,
299,
32152,
355,
45941,
198,
11748,
640,
198,
11748,
25064,
198,
198,
14933,
796,
45941,
13,
18747,
7,
198,
220,
220,
220,
16410,
6,
405,
3256,
705,
14402,
3571,
6,
4357,
37250,
2999,
3256,
705,
14402,
7816,
6,
4357,
37250,
307... | 2.601504 | 133 |
# Author: Yan Zhang
# Email: zhangyan.cse (@) gmail.com
import sys
import numpy as np
import matplotlib.pyplot as plt
import pickle
import os
import gzip
import lasagne
from lasagne import layers
from nolearn.lasagne import NeuralNet
from lasagne.updates import sgd
sys.setrecursionlimit(10000)
conv2d1_filters_numb... | [
2,
6434,
25,
10642,
19439,
220,
220,
198,
2,
9570,
25,
1976,
33255,
4121,
13,
66,
325,
4275,
8,
308,
4529,
13,
785,
198,
198,
11748,
25064,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458... | 2.437396 | 1,198 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import sys
import stat
import pathlib as pt
rml=RmLog()
rml.remove_log()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
1185,
198,
11748,
3108,
8019,
355,
42975,
198,
220,
220,
220,
220,
220... | 2.086957 | 69 |
import os
import time
import pytest
from pyroSAR import identify
from pyroSAR.S1 import OSV
from datetime import datetime, timedelta
| [
11748,
28686,
198,
11748,
640,
198,
11748,
12972,
9288,
198,
6738,
12972,
305,
50,
1503,
1330,
5911,
198,
6738,
12972,
305,
50,
1503,
13,
50,
16,
1330,
7294,
53,
198,
6738,
4818,
8079,
1330,
4818,
8079,
11,
28805,
12514,
628,
198
] | 3.292683 | 41 |
import connexion
import six
from mcenter_server_api.models.event import Event # noqa: E501
from mcenter_server_api.models.inline_response2002 import InlineResponse2002 # noqa: E501
from mcenter_server_api import util
def alerts_get(): # noqa: E501
"""Get list of alerts
# noqa: E501
:rtype: InlineR... | [
11748,
369,
12413,
295,
198,
11748,
2237,
198,
198,
6738,
285,
16159,
62,
15388,
62,
15042,
13,
27530,
13,
15596,
1330,
8558,
220,
1303,
645,
20402,
25,
412,
33548,
198,
6738,
285,
16159,
62,
15388,
62,
15042,
13,
27530,
13,
45145,
62... | 2.664921 | 191 |
import hmac, base64, struct, hashlib, time
secret = 'MZXW633PN5XW6MZX'
for i in range(1, 30):
print(i, get_hotp_token(secret, intervals_no=i))
| [
11748,
289,
20285,
11,
2779,
2414,
11,
2878,
11,
12234,
8019,
11,
640,
628,
198,
21078,
796,
705,
44,
40692,
54,
21,
2091,
13137,
20,
55,
54,
21,
44,
40692,
6,
198,
1640,
1312,
287,
2837,
7,
16,
11,
1542,
2599,
198,
220,
220,
22... | 2.292308 | 65 |
import torch.utils.data
from data.dataset import SingleDataset
from options.test_options import TestOptions
| [
11748,
28034,
13,
26791,
13,
7890,
198,
6738,
1366,
13,
19608,
292,
316,
1330,
14206,
27354,
292,
316,
198,
6738,
3689,
13,
9288,
62,
25811,
1330,
6208,
29046,
628,
628
] | 3.7 | 30 |
from sklearn.base import BaseEstimator, TransformerMixin
from typing import Tuple, Union
import numpy as np
| [
6738,
1341,
35720,
13,
8692,
1330,
7308,
22362,
320,
1352,
11,
3602,
16354,
35608,
259,
198,
6738,
19720,
1330,
309,
29291,
11,
4479,
198,
11748,
299,
32152,
355,
45941,
628
] | 3.633333 | 30 |
r = float(input('Qual o valor total em sua carteira? R$'))
d = r / 5.56
print('Você pode comprar com esse valor {:.2f} doláres.'.format(d))
| [
81,
796,
12178,
7,
15414,
10786,
46181,
267,
1188,
273,
2472,
795,
424,
64,
6383,
68,
8704,
30,
371,
3,
6,
4008,
198,
67,
796,
374,
1220,
642,
13,
3980,
198,
4798,
10786,
53,
420,
25792,
279,
1098,
12084,
283,
401,
1658,
325,
1188... | 2.295082 | 61 |
from django.urls import path
from rest_framework import routers
from app.rgb_control.views import (
RGBControlAPIView, SendColorAPIView
)
router = routers.DefaultRouter()
urlpatterns = router.urls
urlpatterns += [
path('rgb_controls/', RGBControlAPIView.as_view(), name='rgb_controls'),
path('send_color/... | [
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
198,
6738,
1334,
62,
30604,
1330,
41144,
198,
198,
6738,
598,
13,
81,
22296,
62,
13716,
13,
33571,
1330,
357,
198,
220,
220,
220,
34359,
2749,
756,
3225,
2969,
3824,
769,
11,
16290,
10258,... | 2.702899 | 138 |
# -*- encoding: utf-8 -*-
'''
@File : wrapper.py
@License : (C)Copyright 2017-2018, Liugroup-NLPR-CASIA
@Modify Time @Author @Version @Desciption
------------ ------- -------- -----------
2021/4/6 22:37 Li Qiwen 1.0 None
'''
import cgi
from datetime import datetime
from... | [
2,
532,
9,
12,
21004,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
7061,
6,
198,
31,
8979,
220,
220,
220,
1058,
220,
220,
29908,
13,
9078,
220,
220,
220,
220,
198,
31,
34156,
1058,
220,
220,
357,
34,
8,
15269,
2177,
12,
7908,
11,
... | 2.339572 | 374 |
# Copyright 2014 Facebook, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the f... | [
2,
15069,
1946,
3203,
11,
3457,
13,
198,
2,
1439,
2489,
10395,
13,
198,
2,
198,
2,
2297,
396,
3890,
290,
779,
287,
2723,
290,
13934,
5107,
11,
351,
393,
1231,
198,
2,
17613,
11,
389,
10431,
2810,
326,
262,
1708,
3403,
389,
1138,
... | 2.809446 | 3,070 |
# -*- coding: utf-8 -*-
# /usr/bin/env/python3
'''
MobileNetV3 testing code.
Author: aiboy.wei@outlook.com .
'''
from MobileNetV3 import MobileNetV3, custom_objects
import tensorflow as tf
import numpy as np
import argparse
import os
@tf.function
if __name__ == '__main__':
os.environ["CUDA_VISIBLE_DEVICES"] = ... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
1220,
14629,
14,
8800,
14,
24330,
14,
29412,
18,
198,
198,
7061,
6,
198,
17066,
7934,
53,
18,
4856,
2438,
13,
198,
13838,
25,
257,
571,
726,
13,
42990,
31,
448,
... | 2.475578 | 778 |
#! /usr/bin/env python3
# Copyright (c) 2017 Linaro Limited.
# Copyright (c) 2017 Open Source Foundries Limited.
#
# SPDX-License-Identifier: Apache-2.0
"""Zephyr flash/debug script
This helper script is the build system's entry point to Zephyr's
"runner" Python package. This package provides ZephyrBinaryRunner,
whi... | [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
2,
15069,
357,
66,
8,
2177,
5164,
12022,
15302,
13,
198,
2,
15069,
357,
66,
8,
2177,
4946,
8090,
4062,
1678,
15302,
13,
198,
2,
198,
2,
30628,
55,
12,
34156,
12,
33234... | 3.31383 | 188 |
import struct
import numpy as np
__floheader__ = b'PIEH\x00\x02\x00\x00\x80\x01\x00\x00'
__floec1__ = float(202021.25)
__floec2__ = int(512)
__floec3__ = int(384)
__floheaderlen__ = len(__floheader__)
__flow__ = 512
__floh__ = 384
__floshape__ = [__floh__, __flow__, 2]
__floec1m__, __floec2m__, __floec3m__ = struct.u... | [
11748,
2878,
198,
11748,
299,
32152,
355,
45941,
198,
198,
834,
48679,
25677,
834,
796,
275,
6,
47,
10008,
39,
59,
87,
405,
59,
87,
2999,
59,
87,
405,
59,
87,
405,
59,
87,
1795,
59,
87,
486,
59,
87,
405,
59,
87,
405,
6,
198,
... | 2.206422 | 218 |
from bulbs.content.views import ContentListView
from bulbs.api.views import api_v1_router
from django.conf.urls import patterns, url, include
urlpatterns = patterns("",
url(r"^api/v1/", include(api_v1_router.urls)), # noqa
url(r"^content_list_one\.html", ContentListView.as_view(template_name="testapp/conten... | [
6738,
34122,
13,
11299,
13,
33571,
1330,
14041,
8053,
7680,
198,
6738,
34122,
13,
15042,
13,
33571,
1330,
40391,
62,
85,
16,
62,
472,
353,
198,
198,
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
7572,
11,
19016,
11,
2291,
628,
... | 2.502564 | 195 |
import RPi.GPIO as GPIO
import time
import random
pan_servo_pin = 13
pan_servo_min_duty = 2.5
pan_servo_max_duty = 11
tilt_servo_pin = 11
tilt_servo_min_duty = 2.5
tilt_servo_max_duty = 10
pan_config = ServoConfig(pin=pan_servo_pin, min_duty=pan_servo_min_duty, max_duty=pan_servo_max_duty)
tilt_config = ServoConfig(... | [
11748,
25812,
72,
13,
16960,
9399,
355,
50143,
198,
11748,
640,
198,
11748,
4738,
198,
198,
6839,
62,
3168,
78,
62,
11635,
796,
1511,
198,
6839,
62,
3168,
78,
62,
1084,
62,
26278,
796,
362,
13,
20,
198,
6839,
62,
3168,
78,
62,
980... | 2.34434 | 212 |
"""flickrsyncr package initialization."""
# Each module defines what it exports via __all__.
from .config import Config, loadConfigStore
from .flickrwrapper import getFlickrAPI
from .general import CHECKSUM_TAG_PREFIX, SyncError, VERSION
from .syncer import sync
from .status import setupStatus, updateStatus
from .__ma... | [
37811,
2704,
18994,
28869,
6098,
5301,
37588,
526,
15931,
198,
198,
2,
5501,
8265,
15738,
644,
340,
15319,
2884,
11593,
439,
834,
13,
198,
6738,
764,
11250,
1330,
17056,
11,
3440,
16934,
22658,
198,
6738,
764,
2704,
18994,
48553,
1330,
... | 3.422764 | 492 |
from os import path, remove
import pandas as pd
from sheepts import testing
from .mockutils import MockTsTestCase
| [
6738,
28686,
1330,
3108,
11,
4781,
198,
11748,
19798,
292,
355,
279,
67,
198,
198,
6738,
673,
19598,
82,
1330,
4856,
198,
6738,
764,
76,
735,
26791,
1330,
44123,
33758,
14402,
20448,
628
] | 3.515152 | 33 |
from django.contrib import admin
from apps.storagepool.models import StoragePool
admin.site.register(StoragePool)
| [
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
6738,
6725,
13,
35350,
7742,
13,
27530,
1330,
20514,
27201,
198,
198,
28482,
13,
15654,
13,
30238,
7,
31425,
27201,
8,
198
] | 3.709677 | 31 |
"""Support for scenes through the SmartThings cloud API."""
from typing import Any
from homeassistant.components.scene import Scene
from .const import DATA_BROKERS, DOMAIN
async def async_setup_entry(hass, config_entry, async_add_entities):
"""Add switches for a config entry."""
broker = hass.data[DOMAIN][D... | [
37811,
15514,
329,
8188,
832,
262,
10880,
22248,
6279,
7824,
526,
15931,
198,
6738,
19720,
1330,
4377,
198,
198,
6738,
1363,
562,
10167,
13,
5589,
3906,
13,
29734,
1330,
28315,
198,
198,
6738,
764,
9979,
1330,
42865,
62,
11473,
11380,
4... | 2.59408 | 473 |
import dash
from webviz_config.common_cache import CACHE
from webviz_config.generic_plugins import _example_plugin
| [
11748,
14470,
198,
198,
6738,
3992,
85,
528,
62,
11250,
13,
11321,
62,
23870,
1330,
327,
2246,
13909,
198,
6738,
3992,
85,
528,
62,
11250,
13,
41357,
62,
37390,
1330,
4808,
20688,
62,
33803,
628
] | 3.342857 | 35 |
from .upload import PharmgkbUploader
from .dump import PharmgkbDumper
| [
6738,
764,
25850,
1330,
19234,
70,
32812,
41592,
263,
198,
6738,
764,
39455,
1330,
19234,
70,
32812,
35,
15829,
198
] | 3.5 | 20 |
print(selectionSort([35, 12, 40, -41, 120, -145]))
| [
628,
198,
4798,
7,
49283,
42758,
26933,
2327,
11,
1105,
11,
2319,
11,
532,
3901,
11,
7982,
11,
532,
18781,
60,
4008,
198
] | 2.347826 | 23 |
# %%
# Imports
import os
import sys
sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.getcwd()))))
sys.path.append('./')
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from functools import partial
from collections import namedtuple
from tqdm import tqdm
from random import choi... | [
2,
43313,
198,
2,
1846,
3742,
198,
11748,
28686,
198,
11748,
25064,
198,
17597,
13,
6978,
13,
33295,
7,
418,
13,
6978,
13,
15908,
3672,
7,
418,
13,
6978,
13,
15908,
3672,
7,
418,
13,
6978,
13,
15908,
3672,
7,
418,
13,
1136,
66,
... | 2.155142 | 5,047 |
from typing import BinaryIO
| [
6738,
19720,
1330,
45755,
9399,
628
] | 4.833333 | 6 |
import streamlit as st
from utils.preprocessing_model import ModellingData
from utils.utils import change_to_province
import pandas as pd
import pickle
df = pd.read_csv("Dataset.csv", sep=",")
del df['Price']
columns = df.columns
st.title("Belgian Houses Price Prediction")
st.markdown("Get the price of your house")... | [
11748,
4269,
18250,
355,
336,
198,
6738,
3384,
4487,
13,
3866,
36948,
62,
19849,
1330,
3401,
9417,
6601,
198,
6738,
3384,
4487,
13,
26791,
1330,
1487,
62,
1462,
62,
15234,
924,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
2298,
2... | 2.840547 | 878 |