content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
for _ in range(int(input())):
n=int(input())
l=list(map(int,input().split()))
if len(set(l))<n:
print("YES")
else:
print("NO") | [
1640,
4808,
287,
2837,
7,
600,
7,
15414,
28955,
2599,
198,
220,
220,
220,
299,
28,
600,
7,
15414,
28955,
198,
220,
220,
220,
300,
28,
4868,
7,
8899,
7,
600,
11,
15414,
22446,
35312,
3419,
4008,
198,
220,
220,
220,
611,
18896,
7,
... | 1.950617 | 81 |
import cv2
import numpy as np
import os
import argparse
import configparser
from webcam_video_stream import WebcamVideoStream
from auto_pose.ae.utils import get_dataset_path
from aae_retina_pose_estimator import AePoseEstimator
if __name__ == '__main__':
main()
| [
11748,
269,
85,
17,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28686,
198,
11748,
1822,
29572,
198,
11748,
4566,
48610,
198,
198,
6738,
49823,
62,
15588,
62,
5532,
1330,
5313,
20991,
10798,
12124,
198,
6738,
8295,
62,
3455,
13,
360... | 2.977778 | 90 |
import unittest
import networkx as nx
from cdlib import algorithms
from cdlib import NodeClustering
from cdlib import evaluation
| [
11748,
555,
715,
395,
198,
11748,
3127,
87,
355,
299,
87,
198,
6738,
22927,
8019,
1330,
16113,
198,
6738,
22927,
8019,
1330,
19081,
2601,
436,
1586,
198,
6738,
22927,
8019,
1330,
12660,
628
] | 3.939394 | 33 |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""Compute results with Sherpa"""
from __future__ import print_function, division
# __doctest_skip__
__doctest_skip__ = ['*']
import numpy as np
import sherpa.astro.ui as sau
sau.load_data('counts.fits.gz')
sau.set_source('normgauss2d.source + const2d.bac... | [
2,
49962,
739,
257,
513,
12,
565,
682,
347,
10305,
3918,
5964,
532,
766,
38559,
24290,
13,
81,
301,
198,
37811,
7293,
1133,
2482,
351,
6528,
8957,
37811,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
11,
7297,
198,
2,
11593,
4... | 2.372493 | 698 |
import os
import re
import sys
import time
import errno
import signal
import select
from botnet import Command
# Helpers
# Instance
# Commands
| [
11748,
28686,
198,
11748,
302,
198,
11748,
25064,
198,
11748,
640,
198,
11748,
11454,
3919,
198,
11748,
6737,
198,
11748,
2922,
198,
198,
6738,
10214,
3262,
1330,
9455,
628,
198,
2,
10478,
364,
628,
628,
198,
198,
2,
2262,
590,
628,
1... | 3.285714 | 49 |
from sqlalchemy import *
from migrate import *
from migrate.changeset import schema
pre_meta = MetaData()
post_meta = MetaData()
exifstats = Table('exifstats', pre_meta,
Column('id', INTEGER, primary_key=True, nullable=False),
Column('post_id', INTEGER),
Column('date_time', TIMESTAMP),
Column('exposur... | [
6738,
44161,
282,
26599,
1330,
1635,
198,
6738,
32492,
1330,
1635,
628,
198,
6738,
32492,
13,
36653,
316,
1330,
32815,
198,
3866,
62,
28961,
796,
30277,
6601,
3419,
198,
7353,
62,
28961,
796,
30277,
6601,
3419,
198,
1069,
361,
34242,
79... | 2.784566 | 622 |
# this list will store the test scores we will read from the file
scores = []
# Ask the user for a file name
file_name = input('Please enter the file name: ')
# open the file for reading
with open(file_name, 'r') as score_file:
for line in score_file:
# Convert the test score in the current line to a num... | [
2,
428,
1351,
481,
3650,
262,
1332,
8198,
356,
481,
1100,
422,
262,
2393,
198,
1416,
2850,
796,
17635,
198,
198,
2,
16981,
262,
2836,
329,
257,
2393,
1438,
220,
198,
7753,
62,
3672,
796,
5128,
10786,
5492,
3802,
262,
2393,
1438,
25,... | 2.892086 | 417 |
# "Hello World!" matnini yangi o'zgaruvchiga yuklang va print() yordamida konsolga chiqaring
a = "Hello World!"
print(a)
# xabar deb nomlangan o'zgaruvchiga biror matn yuklang va konsolga chiqaring,
# keyin esa o'zgaruvchiga yangi qiymat berib uni ham konsolga chiqaring.
xabar = "Shuningdek o'zgaruvchilarga Pythonda ... | [
2,
366,
15496,
2159,
2474,
2603,
77,
5362,
331,
648,
72,
267,
6,
89,
4563,
14795,
354,
13827,
331,
2724,
17204,
46935,
3601,
3419,
331,
585,
321,
3755,
479,
684,
349,
4908,
442,
25011,
1723,
198,
64,
796,
366,
15496,
2159,
2474,
198... | 2.407407 | 432 |
# -*- coding: utf-8 -*-
if __name__ == '__main__':
main()
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
201,
198,
201,
198,
201,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
201,
198,
220,
220,
220,
1388,
3419,
201,
198
] | 1.775 | 40 |
# -*- coding: utf-8 -*-
"""
classes that implement the blocks for MDF version 4
Edit history
Author : yda
Date : 2020-11-12
Package name changed - asammdf to mdfstudio
Functions
---------
* Channel.metadata - Get rid of b" text when decoding byte type data
* Channel.__init__ - Set ... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
37724,
326,
3494,
262,
7021,
329,
337,
8068,
2196,
604,
198,
220,
220,
220,
5312,
2106,
198,
220,
220,
220,
6434,
1058,
331,
6814,
198,
220,
220,
220,
7536... | 2.649713 | 12,544 |
#!/usr/bin/env python3
import asyncore, socket
import sys
import threading
import logging
logger = logging.getLogger('lsp-daemon')
hdlr = logging.FileHandler('/Users/ppinheiro/git_tree/pinelang/lsp/server/lsp-daemon.log')
formatter = logging.Formatter('%(asctime)s %(levelname)s %(message)s')
hdlr.setFormatter(formatte... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
11748,
355,
2047,
7295,
11,
17802,
198,
11748,
25064,
198,
11748,
4704,
278,
198,
11748,
18931,
198,
198,
6404,
1362,
796,
18931,
13,
1136,
11187,
1362,
10786,
75,
2777,
12,
6814,
... | 2.56682 | 434 |
# Generated by Django 3.0.8 on 2020-07-02 10:30
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
| [
2,
2980,
515,
416,
37770,
513,
13,
15,
13,
23,
319,
12131,
12,
2998,
12,
2999,
838,
25,
1270,
198,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
142... | 3.019231 | 52 |
# internationalization (I18N) 国际化 and localization (L10N) 本土化
# gettext 是GNU国际化与本地化(i18n)函数库
"""
gettext 是一套 GNU下的国际化工具。主要有工具:
xgettext: 从源码中抽取字符串,生成po文件(portable object)
msgfmt: 将po文件编译成mo文件(machine object)
gettext: 进行翻译
https://blog.csdn.net/handsomekang/article/details/78747504
"""
# https://www.gnu.org/software/g... | [
2,
3230,
1634,
357,
40,
1507,
45,
8,
10263,
249,
121,
165,
247,
227,
44293,
244,
290,
42842,
357,
43,
940,
45,
8,
42164,
105,
28839,
253,
44293,
244,
198,
2,
651,
5239,
10545,
246,
107,
16630,
52,
32368,
121,
165,
247,
227,
44293,... | 1.579125 | 297 |
import numpy as np
# Declare 'global' variables, matrices used for function P and also S_boxes
lambd = np.loadtxt(open("matrix.txt", "rb"), delimiter=" ", skiprows=0)
lambd_inv = np.loadtxt(open("matrix_inv.txt", "rb"), delimiter=" ", skiprows=0)
S_box = {'00':'67', '01':'64', '02':'14', '03':'35', '04':'60',... | [
11748,
299,
32152,
355,
45941,
198,
198,
2,
16691,
533,
705,
20541,
6,
9633,
11,
2603,
45977,
973,
329,
2163,
350,
290,
635,
311,
62,
29305,
198,
2543,
17457,
796,
45941,
13,
2220,
14116,
7,
9654,
7203,
6759,
8609,
13,
14116,
1600,
... | 2.397245 | 871 |
from Node import Node
| [
6738,
19081,
1330,
19081,
628
] | 4.6 | 5 |
from enum import Enum
from typing import Any, Optional, List
from momento_wire_types import cacheclient_pb2 as cache_client_types
from . import _cache_service_errors_converter as error_converter
from . import _momento_logger
| [
6738,
33829,
1330,
2039,
388,
198,
6738,
19720,
1330,
4377,
11,
32233,
11,
7343,
198,
198,
6738,
2589,
78,
62,
21809,
62,
19199,
1330,
12940,
16366,
62,
40842,
17,
355,
12940,
62,
16366,
62,
19199,
198,
6738,
764,
1330,
4808,
23870,
6... | 3.376812 | 69 |
import math
| [
11748,
10688,
628
] | 4.333333 | 3 |
"""Script for starting up emulation up with module emulators."""
import logging
import asyncio
from argparse import ArgumentParser
from typing import List
from opentrons.hardware_control.emulation.app import Application
from opentrons.hardware_control.emulation.scripts.run_module_emulator import (
emulator_builder... | [
37811,
7391,
329,
3599,
510,
47065,
510,
351,
8265,
795,
24325,
526,
15931,
198,
11748,
18931,
198,
11748,
30351,
952,
198,
6738,
1822,
29572,
1330,
45751,
46677,
198,
6738,
19720,
1330,
7343,
198,
198,
6738,
1034,
298,
12212,
13,
10424,
... | 2.698502 | 534 |
# The original repo: https://github.com/ydhongHIT/DDRNet
import torch
import torch.nn as nn
import torch.nn.functional as F
from mmcv.runner import load_checkpoint
from mmcv.utils.parrots_wrapper import _BatchNorm
from mmseg.utils import get_root_logger
from ..builder import BACKBONES
BatchNorm2d = nn.S... | [
2,
383,
2656,
29924,
25,
3740,
1378,
12567,
13,
785,
14,
5173,
71,
506,
39,
2043,
14,
35,
7707,
7934,
201,
198,
201,
198,
11748,
28034,
201,
198,
11748,
28034,
13,
20471,
355,
299,
77,
201,
198,
11748,
28034,
13,
20471,
13,
45124,
... | 2.081458 | 933 |
from django.http import HttpResponse
from kawalc1 import settings
| [
6738,
42625,
14208,
13,
4023,
1330,
367,
29281,
31077,
198,
198,
6738,
479,
707,
282,
66,
16,
1330,
6460,
628,
198
] | 3.285714 | 21 |
a, b = map(int, input().split())
print(a + b if a + b < 10 else "error") | [
64,
11,
275,
796,
3975,
7,
600,
11,
5128,
22446,
35312,
28955,
198,
4798,
7,
64,
1343,
275,
611,
257,
1343,
275,
1279,
838,
2073,
366,
18224,
4943
] | 2.571429 | 28 |
import enum
import uuid
import string
import re
import requests
from pydantic import BaseModel, validator, root_validator
from dataclasses import dataclass
from datetime import datetime
from bin.contentctl_project.contentctl_core.domain.entities.security_content_object import SecurityContentObject
from bin.contentctl... | [
11748,
33829,
198,
11748,
334,
27112,
198,
11748,
4731,
198,
11748,
302,
198,
11748,
7007,
198,
198,
6738,
279,
5173,
5109,
1330,
7308,
17633,
11,
4938,
1352,
11,
6808,
62,
12102,
1352,
198,
6738,
4818,
330,
28958,
1330,
4818,
330,
3117... | 3.572368 | 304 |
"""
Helper script for checking status of transceivers
This script contains re-usable functions for checking status of transceivers.
"""
import logging
import re
def parse_transceiver_info(output_lines):
"""
@summary: Parse the list of transceiver from DB table TRANSCEIVER_INFO content
@param output_lines... | [
37811,
198,
47429,
4226,
329,
10627,
3722,
286,
1007,
344,
1191,
198,
198,
1212,
4226,
4909,
302,
12,
31979,
5499,
329,
10627,
3722,
286,
1007,
344,
1191,
13,
198,
37811,
198,
11748,
18931,
198,
11748,
302,
628,
198,
4299,
21136,
62,
... | 2.549769 | 2,592 |
from msdi_io import *
if __name__ == '__main__':
print('Labels:', get_label_list())
bl = batchLoader(100,path_msdi=msdi_path)
for i in range(10):
X,y=bl.load(i)
print(X.shape,len(y))
#print(X[1])
""" print('Labels:', get_label_list())
bl = batchLoader(100,path_msdi=msdi_path)
for i in range(10):
f... | [
6738,
13845,
10989,
62,
952,
1330,
1635,
198,
201,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
201,
198,
197,
4798,
10786,
17822,
1424,
25,
3256,
651,
62,
18242,
62,
4868,
28955,
201,
198,
197,
2436,
796,
15458... | 2.06599 | 197 |
import numbers
from copy import deepcopy
from .number import Number
from .string import String
from .set import Set
from .base_datatype import DynamoDataType
from .expression import ListAppendExpression
from .translator import (
DictTranslator,
ListTranslator)
class DefaultMapGuesser(object):
"""A class to... | [
11748,
3146,
198,
6738,
4866,
1330,
2769,
30073,
198,
6738,
764,
17618,
1330,
7913,
198,
6738,
764,
8841,
1330,
10903,
198,
6738,
764,
2617,
1330,
5345,
198,
6738,
764,
8692,
62,
19608,
265,
2981,
1330,
41542,
6601,
6030,
198,
6738,
764... | 2.557839 | 3,406 |
from scapy.all import arpcachepoison, conf
import ipaddress
conf.verb = 0
if __name__ == '__main__':
pass
| [
6738,
629,
12826,
13,
439,
1330,
610,
14751,
4891,
7501,
1653,
11,
1013,
198,
11748,
20966,
21975,
198,
198,
10414,
13,
19011,
796,
657,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
1208,
198... | 2.690476 | 42 |
from typing import Optional
from fastapi import FastAPI
import api.sql_handler as sql_handler
app = FastAPI()
@app.get("/items/")
@app.get("/all")
@app.get("/notifications")
@app.get("/budget_commitment")
@app.get("/commitment_treasury")
@app.get("/deals")
@app.get("/limits")
@app.get("/payment_schedule")
... | [
6738,
19720,
1330,
32233,
198,
198,
6738,
3049,
15042,
1330,
12549,
17614,
198,
198,
11748,
40391,
13,
25410,
62,
30281,
355,
44161,
62,
30281,
198,
198,
1324,
796,
12549,
17614,
3419,
628,
198,
31,
1324,
13,
1136,
7203,
14,
23814,
14,
... | 2.412371 | 194 |
import os
import sys
import shutil
import dotbot
import subprocess
import platform
class CrossPlatformLink(dotbot.plugins.Link, dotbot.Plugin, CrossPlatformTask):
"""
Symbolically links dotfiles.
"""
_directive = "crossplatform-link"
def _link(
self,
source,
link_name,
... | [
11748,
28686,
198,
11748,
25064,
198,
11748,
4423,
346,
198,
11748,
16605,
13645,
198,
11748,
850,
14681,
198,
11748,
3859,
628,
198,
198,
4871,
6372,
37148,
11280,
7,
26518,
13645,
13,
37390,
13,
11280,
11,
16605,
13645,
13,
37233,
11,
... | 2.05641 | 1,755 |
from six import u, iteritems, iterkeys # pylint: disable=unused-import
try:
from collections.abc import Mapping # pylint: disable=unused-import
except ImportError:
# Legacy Python
from collections import Mapping # pylint: disable=unused-import
| [
6738,
2237,
1330,
334,
11,
11629,
23814,
11,
11629,
13083,
1303,
279,
2645,
600,
25,
15560,
28,
403,
1484,
12,
11748,
198,
28311,
25,
198,
220,
220,
220,
422,
17268,
13,
39305,
1330,
337,
5912,
220,
1303,
279,
2645,
600,
25,
15560,
... | 3.185185 | 81 |
# -------------------------------------------------------------
# Merge dictionaries :: Sources :: Hunspell
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# Description: Find Hunspell personal dictionaries
# License: BSD-2-Clause
# -------------------... | [
2,
220,
220,
20368,
1783,
32501,
198,
2,
220,
220,
39407,
48589,
3166,
7904,
26406,
7904,
5900,
46143,
198,
2,
220,
220,
532,
532,
532,
532,
532,
532,
532,
532,
532,
532,
532,
532,
532,
532,
532,
532,
532,
532,
532,
532,
532,
532,... | 3.220339 | 118 |
from hardware import camera, robot, turntable
from calibration import calibration_axyb, calibration_camera, calibration_functions
from threading import Thread
import configparser
| [
6738,
6890,
1330,
4676,
11,
9379,
11,
7858,
429,
540,
198,
6738,
36537,
1330,
36537,
62,
6969,
65,
11,
36537,
62,
25695,
11,
36537,
62,
12543,
2733,
198,
6738,
4704,
278,
1330,
14122,
198,
11748,
4566,
48610,
198
] | 4.710526 | 38 |
# Copyright (c) 2013 NEC 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/LICENSE-2.0
#
# Unless requi... | [
2,
15069,
357,
66,
8,
2211,
41804,
10501,
198,
2,
1439,
6923,
33876,
13,
198,
2,
198,
2,
220,
220,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
345,
743,
198,
2,
220,
220,
220,
407,
7... | 2.882831 | 862 |
import sys
import json | [
11748,
25064,
198,
11748,
33918
] | 4.4 | 5 |
from rest_framework import generics
from rest_framework.response import Response
from rest_framework.reverse import reverse
from drones import views
| [
6738,
1334,
62,
30604,
1330,
1152,
873,
198,
6738,
1334,
62,
30604,
13,
26209,
1330,
18261,
198,
6738,
1334,
62,
30604,
13,
50188,
1330,
9575,
198,
6738,
15382,
1330,
5009,
628
] | 4.83871 | 31 |
from django.shortcuts import render
from django.http import HttpResponse
from names.models import Country
from random import shuffle
| [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
198,
6738,
42625,
14208,
13,
4023,
1330,
367,
29281,
31077,
198,
6738,
3891,
13,
27530,
1330,
12946,
198,
6738,
4738,
1330,
36273,
198
] | 4.290323 | 31 |
"""NYC 311 Calendar API."""
from __future__ import annotations
from dataclasses import dataclass
from datetime import date
from datetime import datetime
from datetime import timedelta
from enum import Enum
import logging
import aiohttp
from nyc311calendar.services import Parking
from nyc311calendar.services import Sa... | [
37811,
12805,
34,
35592,
26506,
7824,
526,
15931,
198,
6738,
11593,
37443,
834,
1330,
37647,
198,
198,
6738,
4818,
330,
28958,
1330,
4818,
330,
31172,
198,
6738,
4818,
8079,
1330,
3128,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
... | 2.028197 | 6,029 |
# Generated by Django 3.1.1 on 2020-09-15 01:15
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
16,
13,
16,
319,
12131,
12,
2931,
12,
1314,
5534,
25,
1314,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
# https://leetcode.com/problems/contains-duplicate/
| [
2,
3740,
1378,
293,
316,
8189,
13,
785,
14,
1676,
22143,
14,
3642,
1299,
12,
646,
489,
5344,
14,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220
] | 2 | 32 |
from .ascii2d import Ascii2D
from .Async import *
from .baidu import BaiDu
from .google import Google
from .iqdb import Iqdb
from .saucenao import SauceNAO
from .tracemoe import (
TraceMoe,
TraceMoeAnilist,
TraceMoeMe,
TraceMoeNorm,
TraceMoeResponse,
)
__author__ = "kitUIN"
__license__ = "MIT Licen... | [
6738,
764,
292,
979,
72,
17,
67,
1330,
1081,
979,
72,
17,
35,
198,
6738,
764,
42367,
1330,
1635,
198,
6738,
764,
65,
1698,
84,
1330,
40750,
35660,
198,
6738,
764,
13297,
1330,
3012,
198,
6738,
764,
25011,
9945,
1330,
314,
80,
9945,
... | 2.421965 | 173 |
import time
start = time.perf_counter()
receips = '37'
von = 509671
bis = von + 10
elf1, elf2 = 0,1
for i in range(bis):
score = int(receips[elf1]) + int(receips[elf2])
receips += str(score)
lr = len(receips)
elf1 = (elf1 + int(receips[elf1])+ 1) % lr
elf2 = (elf2 + int(receips[elf2])+ 1) % lr
print(r... | [
11748,
640,
198,
9688,
796,
640,
13,
525,
69,
62,
24588,
3419,
198,
198,
260,
344,
2419,
796,
705,
2718,
6,
198,
26982,
796,
2026,
24,
46250,
198,
41907,
796,
18042,
1343,
838,
198,
198,
7046,
16,
11,
23878,
17,
796,
657,
11,
16,
... | 2.113636 | 176 |
import typing
import sys
import numpy as np
import numba as nb
@nb.njit((nb.i8, nb.i8, nb.i8[:], nb.i8[:]), cache=True)
main() | [
11748,
19720,
198,
11748,
25064,
220,
198,
11748,
299,
32152,
355,
45941,
220,
198,
11748,
997,
7012,
355,
299,
65,
220,
628,
198,
31,
46803,
13,
77,
45051,
19510,
46803,
13,
72,
23,
11,
299,
65,
13,
72,
23,
11,
299,
65,
13,
72,
... | 2.061538 | 65 |
import argparse
import os
from credentials import get, set
from upload import upload
def main():
"""
get command line options and upload the file(s) accordingly
:return: None
"""
parser = argparse.ArgumentParser()
options = parser.add_mutually_exclusive_group()
options.add_arg... | [
11748,
1822,
29572,
201,
198,
11748,
28686,
201,
198,
6738,
18031,
1330,
651,
11,
900,
201,
198,
6738,
9516,
1330,
9516,
201,
198,
201,
198,
201,
198,
4299,
1388,
33529,
201,
198,
220,
220,
220,
37227,
201,
198,
220,
220,
220,
651,
... | 2.572082 | 437 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from proxypool.schedule import Schedule
if __name__ == '__main__':
main()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
14793,
4464,
970,
13,
15952,
5950,
1330,
19281,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
... | 2.363636 | 55 |
from lib import file_util
from lib import render_path
from lib import template_renderer
from lib import source_converter
from lib import console_outputter
from datetime import date
| [
6738,
9195,
1330,
2393,
62,
22602,
198,
6738,
9195,
1330,
8543,
62,
6978,
198,
6738,
9195,
1330,
11055,
62,
10920,
11882,
198,
6738,
9195,
1330,
2723,
62,
1102,
332,
353,
198,
6738,
9195,
1330,
8624,
62,
22915,
353,
198,
6738,
4818,
8... | 4.044444 | 45 |
"""
tests.py
A file dedicated to testing our game and ensuring it can run.
Integrate this into your IDE's workflow to ensure the game runs from top to bottom.
The tests used here should test all of our game's features as best they can.
"""
import pytest
from typing import Pattern, List
class TestGame:
"""
T... | [
37811,
198,
41989,
13,
9078,
198,
32,
2393,
7256,
284,
4856,
674,
983,
290,
13359,
340,
460,
1057,
13,
198,
34500,
4873,
428,
656,
534,
33497,
338,
30798,
284,
4155,
262,
983,
4539,
422,
1353,
284,
4220,
13,
198,
464,
5254,
973,
994... | 2.247397 | 1,633 |
import json
import logging
import pathlib
from phe import paillier, EncryptedNumber, PaillierPublicKey
import server.dbhandler as dbhandler
class Server():
"""
Implements functionality related to cloud biometric storage and processing.
Return values to the client:
store_template():
... | [
11748,
33918,
198,
11748,
18931,
198,
11748,
3108,
8019,
198,
198,
6738,
279,
258,
1330,
14187,
359,
959,
11,
14711,
15109,
15057,
11,
11243,
359,
959,
15202,
9218,
198,
198,
11748,
4382,
13,
9945,
30281,
355,
20613,
30281,
628,
198,
48... | 2.395948 | 2,369 |
# Faça um programa em Python que abra e reproduza o áudio de um arquivo MP3.
from pygame import mixer # pip3 install pygame
mixer.init()
mixer.music.load('ex021.ogg')
mixer.music.play()
input()
| [
2,
18350,
50041,
23781,
1430,
64,
795,
11361,
8358,
450,
430,
304,
8186,
4496,
267,
6184,
94,
463,
952,
390,
23781,
610,
421,
23593,
4904,
18,
13,
198,
198,
6738,
12972,
6057,
1330,
33938,
1303,
7347,
18,
2721,
12972,
6057,
198,
198,
... | 2.722222 | 72 |
import pkg_resources
import json | [
11748,
279,
10025,
62,
37540,
198,
11748,
33918
] | 4 | 8 |
from rl_coach.agents.clipped_ppo_agent import ClippedPPOAgentParameters
from rl_coach.environments.gym_environment import GymVectorEnvironment
from rl_coach.graph_managers.basic_rl_graph_manager import BasicRLGraphManager
from rl_coach.graph_managers.graph_manager import ScheduleParameters
from rl_coach.base_parameters... | [
6738,
374,
75,
62,
1073,
620,
13,
49638,
13,
565,
3949,
62,
16634,
62,
25781,
1330,
1012,
3949,
10246,
23621,
6783,
48944,
198,
6738,
374,
75,
62,
1073,
620,
13,
268,
12103,
13,
1360,
76,
62,
38986,
1330,
31187,
38469,
31441,
198,
6... | 3.114094 | 298 |
from .core import Reactor
| [
6738,
764,
7295,
1330,
797,
11218,
198
] | 3.714286 | 7 |
import datetime
from flask.ext.bcrypt import generate_password_hash
from flask.ext.login import UserMixin
from peewee import *
DATABASE = SqliteDatabase('journal.db')
| [
11748,
4818,
8079,
198,
198,
6738,
42903,
13,
2302,
13,
15630,
6012,
1330,
7716,
62,
28712,
62,
17831,
198,
6738,
42903,
13,
2302,
13,
38235,
1330,
11787,
35608,
259,
198,
6738,
613,
413,
1453,
1330,
1635,
198,
198,
35,
1404,
6242,
11... | 3.017241 | 58 |
from juno.resources import handler_request
from juno.resources.routes import additional_data_routes
| [
6738,
10891,
78,
13,
37540,
1330,
21360,
62,
25927,
198,
6738,
10891,
78,
13,
37540,
13,
81,
448,
274,
1330,
3224,
62,
7890,
62,
81,
448,
274,
198
] | 3.571429 | 28 |
# pylint: disable=no-self-use
import json
import pytest
import re
from geoalchemy2.shape import from_shape
from shapely.geometry import box, Polygon, shape
from . import AbstractViewsTests
@pytest.fixture(scope='function')
@pytest.mark.usefixtures('dbsession', 'transact')
@pytest.mark.usefixtures('restriction_ar... | [
2,
279,
2645,
600,
25,
15560,
28,
3919,
12,
944,
12,
1904,
628,
198,
11748,
33918,
198,
11748,
12972,
9288,
198,
11748,
302,
198,
6738,
40087,
282,
26599,
17,
13,
43358,
1330,
422,
62,
43358,
198,
6738,
5485,
306,
13,
469,
15748,
13... | 2.940678 | 118 |
#!/usr/bin/python3
import requests
import boto3
from os import listdir
from os.path import isfile, join
import re
def install_paper(mc_version, paper_build):
"""This will download the paper jar"""
url = "https://papermc.io/api/v2/projects/paper"
mc_version = requests.get(url).json()['versions'][-1] if mc_... | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
198,
11748,
7007,
198,
11748,
275,
2069,
18,
198,
6738,
28686,
1330,
1351,
15908,
198,
6738,
28686,
13,
6978,
1330,
318,
7753,
11,
4654,
198,
11748,
302,
198,
198,
4299,
2721,
62,
20189,
... | 2.824185 | 1,166 |
from __future__ import annotations
| [
6738,
11593,
37443,
834,
1330,
37647,
628
] | 5.142857 | 7 |
from .hem import HEM
from .drem import DREM
from .aem import AEM
from .zam import ZAM
| [
6738,
764,
4411,
1330,
367,
3620,
198,
6738,
764,
67,
2787,
1330,
360,
40726,
198,
6738,
764,
64,
368,
1330,
317,
3620,
198,
6738,
764,
89,
321,
1330,
1168,
2390,
198
] | 2.774194 | 31 |
import time
from pathlib import Path
import numpy as np
import os
from py_diff_pd.env.env_base import EnvBase
from py_diff_pd.common.common import create_folder, ndarray, print_info
from py_diff_pd.common.tet_mesh import tetrahedralize, read_tetgen_file, generate_tet_mesh, tet2obj
from py_diff_pd.common.tri_mesh impo... | [
11748,
640,
198,
6738,
3108,
8019,
1330,
10644,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28686,
198,
198,
6738,
12972,
62,
26069,
62,
30094,
13,
24330,
13,
24330,
62,
8692,
1330,
2039,
85,
14881,
198,
6738,
12972,
62,
26069,... | 2.826613 | 248 |
import functools
import operator
from statistics import mean
import math
from anytree import LevelOrderIter, RenderTree, DoubleStyle
from anytree.exporter import DotExporter
from sympy.ntheory import factorint
from core_functionality.solver_node import SolverNode
if __name__ == '__main__':
trees_8 = ... | [
11748,
1257,
310,
10141,
198,
11748,
10088,
198,
6738,
7869,
1330,
1612,
198,
198,
11748,
10688,
198,
6738,
597,
21048,
1330,
5684,
18743,
29993,
11,
46722,
27660,
11,
11198,
21466,
198,
6738,
597,
21048,
13,
1069,
26634,
1330,
22875,
310... | 2.514286 | 245 |
import docker
from django.conf import settings
from grandchallenge.components.backends.docker import Service
| [
11748,
36253,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
198,
6738,
4490,
36747,
3540,
13,
5589,
3906,
13,
1891,
2412,
13,
45986,
1330,
4809,
628
] | 4.111111 | 27 |
# -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2018-09-07 14:04
from __future__ import unicode_literals
import django.contrib.postgres.fields.hstore
from django.db import migrations
from django.db.utils import ProgrammingError
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2980,
515,
416,
37770,
352,
13,
1157,
13,
18,
319,
2864,
12,
2931,
12,
2998,
1478,
25,
3023,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
... | 2.914634 | 82 |
import tensorflow as tf
def clip_uint8(im_in):
'''
clips a float value between 0 and 255 and casts to uint8
'''
with tf.variable_scope(None,default_name='clip_uint8'):
im = tf.clip_by_value(im_in, 0, 255)
return tf.cast(im, tf.uint8)
| [
11748,
11192,
273,
11125,
355,
48700,
198,
198,
4299,
10651,
62,
28611,
23,
7,
320,
62,
259,
2599,
198,
197,
7061,
6,
198,
197,
31945,
257,
12178,
1988,
1022,
657,
290,
14280,
290,
26217,
284,
20398,
23,
198,
197,
7061,
6,
198,
197,... | 2.454545 | 99 |
# coding: utf-8
"""
:copyright: 2017-2018 H2O.ai, Inc.
:license: Apache License Version 2.0 (see LICENSE for details)
"""
# # Experiment 05: Credit card Fraud (GPU version)
#
# This experiment uses the data from the Kaggle dataset [Credit Card Fraud Detection](https://www.kaggle.com/dalpozz/creditcardfraud). The dat... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
37811,
198,
25,
22163,
4766,
25,
2177,
12,
7908,
367,
17,
46,
13,
1872,
11,
3457,
13,
198,
25,
43085,
25,
220,
220,
24843,
13789,
10628,
362,
13,
15,
357,
3826,
38559,
24290,
329,
3307,
8,
19... | 2.19982 | 2,227 |
#!/usr/bin/env python
from os import path
from setuptools import setup
with open(path.join(path.dirname(__file__), "README.rst")) as f:
readme = f.read()
setup(
name="cqstat",
version="1.0.0",
description="A colorful command line tool substitutes for Grid Engine qstat command",
long_description=r... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
6738,
28686,
1330,
3108,
198,
6738,
900,
37623,
10141,
1330,
9058,
628,
198,
4480,
1280,
7,
6978,
13,
22179,
7,
6978,
13,
15908,
3672,
7,
834,
7753,
834,
828,
366,
15675,
11682,
13,
... | 2.492537 | 402 |
from pathlib import Path
from context_dict import ContextDict
from pprint import pprint
'''
common lists of fields
getFields is all fields in table
'''
if __name__ == "__main__":
main() | [
6738,
3108,
8019,
1330,
10644,
198,
6738,
4732,
62,
11600,
1330,
30532,
35,
713,
198,
6738,
279,
4798,
1330,
279,
4798,
198,
198,
7061,
6,
198,
11321,
8341,
286,
7032,
198,
1136,
15878,
82,
318,
477,
7032,
287,
3084,
198,
198,
7061,
... | 3.163934 | 61 |
from datetime import datetime, time
import logging
import json
import os
import requests
import traceback
from dotenv import load_dotenv
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from src import models
from src import data
from src import finance_stats
load_dotenv()
send_slack_... | [
6738,
4818,
8079,
1330,
4818,
8079,
11,
640,
198,
11748,
18931,
198,
11748,
33918,
198,
11748,
28686,
198,
11748,
7007,
198,
11748,
12854,
1891,
198,
198,
6738,
16605,
24330,
1330,
3440,
62,
26518,
24330,
198,
6738,
3049,
15042,
1330,
125... | 2.560175 | 457 |
# Main Program
import validate
print("""
---------------------------------------------------
| MENU |
---------------------------------------------------
| 1. Generate a 4 digit OTP |
| 2. Generate a Captcha of... | [
198,
198,
2,
8774,
6118,
198,
198,
11748,
26571,
198,
198,
4798,
7203,
15931,
198,
220,
220,
220,
220,
220,
220,
220,
20368,
1783,
6329,
198,
220,
220,
220,
220,
220,
220,
930,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220... | 2.231102 | 463 |
import glob
import os
import torch
import tqdm
import numpy as np
from torch.nn.utils import clip_grad_norm_
def compact_batch(tensor_list):
'''
Write some code to pad the teacher predicts....
'''
bs, ch, fix = tensor_list[0].shape
max_ch = ch
pad_tensor_list = []
for tensor in tensor_... | [
11748,
15095,
198,
11748,
28686,
198,
198,
11748,
28034,
198,
11748,
256,
80,
36020,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
28034,
13,
20471,
13,
26791,
1330,
10651,
62,
9744,
62,
27237,
62,
198,
198,
4299,
16001,
62,
43501,
7,
... | 2.220447 | 313 |
from .oauth import BaseOAuth2
| [
6738,
764,
12162,
1071,
1330,
7308,
23621,
1071,
17,
628
] | 3.1 | 10 |
import discord
import itertools
import re
from datetime import datetime
from .utils import *
class DiscordBets:
"""
Class that creates bets within the Discord Community
Attributes
__________
fire (Fire obj): The fire instance where information is fetched/updated
Functions
__________
... | [
11748,
36446,
198,
11748,
340,
861,
10141,
198,
11748,
302,
198,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
764,
26791,
1330,
1635,
198,
198,
4871,
39462,
33,
1039,
25,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
5016,
326... | 3.061947 | 565 |
# NB: do NOT import utils as this disables eager execution that seems
# to be required for proper operations of `tf.summary`.
import os
import tensorflow as tf
import numpy as np
from sklearn.model_selection import train_test_split
# ---
default_datadir = os.getenv ('DC_DATADIR') or \
os.getenv ('TM... | [
2,
41354,
25,
466,
5626,
1330,
3384,
4487,
355,
428,
595,
2977,
11069,
9706,
326,
2331,
198,
2,
284,
307,
2672,
329,
1774,
4560,
286,
4600,
27110,
13,
49736,
44646,
198,
11748,
28686,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
11... | 2.663073 | 371 |
"""Prints full name of all occurrences of given filename in your PATH.
Usage: findinpath.py filename"""
import os
import sys
if __name__ == '__main__':
sys.exit(main())
| [
37811,
18557,
82,
1336,
1438,
286,
477,
40279,
286,
1813,
29472,
287,
534,
46490,
13,
198,
198,
28350,
25,
1064,
259,
6978,
13,
9078,
29472,
37811,
198,
198,
11748,
28686,
198,
11748,
25064,
198,
198,
361,
11593,
3672,
834,
6624,
705,
... | 3.142857 | 56 |
import sys
from ethwizard import __version__
from prompt_toolkit.formatted_text import HTML
from prompt_toolkit.shortcuts import button_dialog
from ethwizard.platforms import (
get_install_steps,
supported_platform,
has_su_perm,
init_logging,
quit_app,
get_save_state,
get_load_state,
... | [
11748,
25064,
198,
198,
6738,
4555,
86,
8669,
1330,
11593,
9641,
834,
198,
198,
6738,
6152,
62,
25981,
15813,
13,
687,
16898,
62,
5239,
1330,
11532,
198,
6738,
6152,
62,
25981,
15813,
13,
19509,
23779,
1330,
4936,
62,
38969,
519,
198,
... | 2.783784 | 148 |
import io
from types import FunctionType
from PySide2.QtGui import *
from PySide2.QtCore import *
from PySide2.QtWidgets import *
app: QApplication = None
buffer: io.StringIO = None
old_stdout: io.StringIO = None
trayIcon: QSystemTrayIcon = None
sw: QScrollArea = None
tempDir: str = None
| [
11748,
33245,
198,
6738,
3858,
1330,
15553,
6030,
628,
198,
6738,
9485,
24819,
17,
13,
48,
83,
8205,
72,
1330,
1635,
198,
6738,
9485,
24819,
17,
13,
48,
83,
14055,
1330,
1635,
198,
6738,
9485,
24819,
17,
13,
48,
83,
54,
312,
11407,
... | 2.794393 | 107 |
import argparse
import pickle
import json
import time
import threading
import pprint
import deep_architect.utils as ut
from google.cloud import pubsub_v1
from deep_architect.contrib.misc.datasets.loaders import (load_cifar10,
load_mnist)
from deep_architect.con... | [
11748,
1822,
29572,
198,
11748,
2298,
293,
198,
11748,
33918,
198,
11748,
640,
198,
11748,
4704,
278,
198,
11748,
279,
4798,
198,
11748,
2769,
62,
998,
5712,
13,
26791,
355,
3384,
198,
6738,
23645,
13,
17721,
1330,
2240,
7266,
62,
85,
... | 2.819095 | 398 |
import angr
import claripy
project = angr.Project("./mask")
argv1 = claripy.BVS("argv1",100*8)
initial_state = project.factory.entry_state(args=["./mask",argv1])
sm = project.factory.simulation_manager(initial_state)
sm.explore(find=0x4012d6)
found = sm.found[0]
solution = found.solver.eval(argv1, cast_to=bytes)
print... | [
11748,
281,
2164,
198,
11748,
10212,
541,
88,
198,
198,
16302,
796,
281,
2164,
13,
16775,
7,
1911,
14,
27932,
4943,
198,
853,
85,
16,
796,
10212,
541,
88,
13,
33,
20304,
7203,
853,
85,
16,
1600,
3064,
9,
23,
8,
198,
36733,
62,
5... | 2.459854 | 137 |
from asposebarcode import Settings
from com.aspose.barcode import BarCodeBuilder
from com.aspose.barcode import Symbology
from com.aspose.barcode import CodeLocation
from com.aspose.barcode import BarCodeImageFormat
from java.awt import Color
if __name__ == '__main__':
CodeText() | [
6738,
355,
3455,
65,
5605,
1098,
1330,
16163,
198,
6738,
401,
13,
292,
3455,
13,
65,
5605,
1098,
1330,
2409,
10669,
32875,
198,
6738,
401,
13,
292,
3455,
13,
65,
5605,
1098,
1330,
41327,
1435,
198,
6738,
401,
13,
292,
3455,
13,
65,
... | 2.912621 | 103 |
import operator
from functools import reduce
from typing import Tuple, Dict, Union, List
def get_dict_val(root:Dict, keys:Union[str, List[str]]):
"""
Access a nested object in root by item sequence.
Args:
root: Dict
target object for accessing the value
keys: Union[str, Tuple[... | [
11748,
10088,
198,
6738,
1257,
310,
10141,
1330,
4646,
198,
6738,
19720,
1330,
309,
29291,
11,
360,
713,
11,
4479,
11,
7343,
628,
198,
4299,
651,
62,
11600,
62,
2100,
7,
15763,
25,
35,
713,
11,
8251,
25,
38176,
58,
2536,
11,
7343,
... | 2.152225 | 427 |
#!/usr/bin/env python3
from collections import Counter
def are_anagrams(*args):
'return True if args are anagrams'
if len(args) < 2:
raise TypeError("expected 2 or more arguments")
c = Counter(args[0])
return all(c == Counter(a) for a in args[1:])
arg1 = "appel apple aplep leapp".split()
#pri... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
6738,
17268,
1330,
15034,
198,
198,
4299,
389,
62,
272,
6713,
82,
46491,
22046,
2599,
198,
220,
220,
220,
705,
7783,
6407,
611,
26498,
389,
281,
6713,
82,
6,
198,
220,
220,
... | 2.60241 | 166 |
from src.wrapper.sh1106 import Screen
from src.modules.clock_module import Module as ClockModule
from src.modules.temperature_module import Module as TemperatureModule
from PIL import Image, ImageDraw, ImageFont
import os
font_path = os.path.join('assets', 'Font.ttf') | [
6738,
12351,
13,
48553,
13,
1477,
11442,
21,
1330,
15216,
198,
6738,
12351,
13,
18170,
13,
15750,
62,
21412,
1330,
19937,
355,
21328,
26796,
198,
6738,
12351,
13,
18170,
13,
11498,
21069,
62,
21412,
1330,
19937,
355,
34467,
26796,
198,
... | 3.635135 | 74 |
from copy import deepcopy
# dict_merge from
# http://blog.impressiver.com/post/31434674390/deep-merge-multiple-python-dicts | [
6738,
4866,
1330,
2769,
30073,
198,
198,
2,
8633,
62,
647,
469,
422,
198,
2,
2638,
1378,
14036,
13,
320,
8439,
1428,
13,
785,
14,
7353,
14,
33638,
2682,
45385,
25964,
14,
22089,
12,
647,
469,
12,
48101,
12,
29412,
12,
11600,
82
] | 2.883721 | 43 |
frase = 'curso em video python'
print('{}'.format(frase[9:21])) | [
8310,
589,
796,
705,
22019,
568,
795,
2008,
21015,
6,
198,
4798,
10786,
90,
92,
4458,
18982,
7,
8310,
589,
58,
24,
25,
2481,
60,
4008
] | 2.423077 | 26 |
from pip._vendor.distlib.compat import raw_input
import subprocess
import pyfiglet
pf = pyfiglet.figlet_format("S-PF", font="5lineoblique")
print(pf)
print("ip example 192.168.1.1")
ipadd = raw_input("Ip-Address" r"""-------->>>> """)
print("Port range example 20-40")
pr = raw_input("Port-range" r"""-----... | [
6738,
7347,
13557,
85,
18738,
13,
17080,
8019,
13,
5589,
265,
1330,
8246,
62,
15414,
201,
198,
11748,
850,
14681,
201,
198,
11748,
12972,
5647,
1616,
201,
198,
201,
198,
79,
69,
796,
12972,
5647,
1616,
13,
5647,
1616,
62,
18982,
7203,... | 2.348624 | 218 |
#!/usr/bin/env python
import argparse
import logging
import os
import webbrowser
from example_usage import load_embeddings
from vec2graph import visualize
logging.basicConfig(
format="%(asctime)s : %(levelname)s : %(message)s", level=logging.INFO
)
parser = argparse.ArgumentParser()
parser.add_argument(
"-m... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
1822,
29572,
198,
11748,
18931,
198,
11748,
28686,
198,
11748,
3992,
40259,
198,
6738,
1672,
62,
26060,
1330,
3440,
62,
20521,
67,
654,
198,
6738,
43030,
17,
34960,
1330,
383... | 2.509246 | 703 |
# Way 1
from pyspark.sql import functions as F
def stratified_split_train_test(df, frac, label, join_on, seed=42):
""" stratfied split of a dataframe in train and test set.
inspiration gotten from:
https://stackoverflow.com/a/47672336/1771155
https://stackoverflow.com/a/39889263/1771155"""
fractio... | [
2,
6378,
352,
198,
6738,
279,
893,
20928,
13,
25410,
1330,
5499,
355,
376,
220,
198,
198,
4299,
25369,
1431,
62,
35312,
62,
27432,
62,
9288,
7,
7568,
11,
1216,
330,
11,
6167,
11,
4654,
62,
261,
11,
9403,
28,
3682,
2599,
198,
220,
... | 2.665753 | 365 |
#REV: read it, separate it, use freq to make timings ;)
#REV: convert from old 7-el to 49-el, pain in the butt.
#REV: assume I have 0, 2, 4, 6, 8, 10, 12, makes 7 electrodes, at 150 spacing ugh.
#REV: I *think* 0 is x=50, 2 is x=200, 4 is x=350, 6 is x=500
#REV: Just do single correlations, if right now electrodes go... | [
2,
2200,
53,
25,
1100,
340,
11,
4553,
340,
11,
779,
2030,
80,
284,
787,
4628,
654,
35540,
628,
198,
2,
2200,
53,
25,
10385,
422,
1468,
767,
12,
417,
284,
5125,
12,
417,
11,
2356,
287,
262,
8530,
13,
198,
2,
2200,
53,
25,
7048,... | 1.988722 | 798 |
import requests
from flask import Flask, request
import os
import info
import isolate
app = Flask(__name__)
@app.route('/')
@app.route('/compile', methods=["POST"])
@app.route('/run', methods=["POST"])
@app.before_first_request
| [
11748,
7007,
198,
6738,
42903,
1330,
46947,
11,
2581,
198,
11748,
28686,
198,
198,
11748,
7508,
198,
11748,
28091,
198,
198,
1324,
796,
46947,
7,
834,
3672,
834,
8,
198,
198,
31,
1324,
13,
38629,
10786,
14,
11537,
198,
198,
31,
1324,
... | 2.865854 | 82 |
import re
import disnake
from disnake.ext import commands
from ids import AHK_GUILD_ID
from cogs.mixins import AceMixin
from utils.context import is_mod
from utils.converters import LengthConverter
DELETE_EMOJI = '\N{Put Litter in Its Place Symbol}'
DEFAULT_LANG = 'py'
lang_converter = LangConverter(1, 32)
clas... | [
11748,
302,
198,
198,
11748,
595,
77,
539,
198,
6738,
595,
77,
539,
13,
2302,
1330,
9729,
198,
198,
6738,
220,
2340,
1330,
28159,
42,
62,
38022,
26761,
62,
2389,
198,
6738,
269,
18463,
13,
19816,
1040,
1330,
17102,
35608,
259,
198,
... | 2.55063 | 1,985 |
from mmdet.apis import init_detector, inference_detector, show_result_pyplot, show_result_ins
import mmcv
import os, glob, time
config_file = 'cfg/aug_solov2_tuned.py'
# download the checkpoint from model zoo and put it in `checkpoints/`
checkpoint_file = 'work_dirs/solov2_tianchi_tuned.pth'
# build the model from a ... | [
6738,
8085,
15255,
13,
499,
271,
1330,
2315,
62,
15255,
9250,
11,
32278,
62,
15255,
9250,
11,
905,
62,
20274,
62,
9078,
29487,
11,
905,
62,
20274,
62,
1040,
198,
11748,
8085,
33967,
198,
11748,
28686,
11,
15095,
11,
640,
198,
198,
1... | 2.362319 | 552 |
# !/usr/bin/env python
import rospy
from flexbe_core import EventState, Logger
'''
Created on 21.09.2017
@author: Philippe La Madeleine
'''
class SetKey(EventState):
'''
Set a Key to a predefined Value
-- Value object The desired value.
<# Key object The key to set.
<... | [
2,
5145,
14,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
686,
2777,
88,
198,
6738,
7059,
1350,
62,
7295,
1330,
8558,
9012,
11,
5972,
1362,
198,
198,
7061,
6,
198,
41972,
319,
2310,
13,
2931,
13,
5539,
198,
31,
9800,
25,
39... | 2.110092 | 327 |
from chapter2_基础.soundBase import *
from chapter4_特征提取.end_detection import *
data, fs = soundBase('C4_1_y.wav').audioread()
data -= np.mean(data)
data /= np.max(data)
IS = 0.25
wlen = 200
inc = 80
N = len(data)
time = [i / fs for i in range(N)]
wnd = np.hamming(wlen)
NIS = int((IS * fs - wlen) // inc + 1)... | [
6738,
6843,
17,
62,
161,
253,
118,
163,
94,
222,
13,
23661,
14881,
1330,
1635,
201,
198,
6738,
6843,
19,
62,
31965,
117,
36181,
223,
162,
237,
238,
20998,
244,
13,
437,
62,
15255,
3213,
1330,
1635,
201,
198,
201,
198,
7890,
11,
43... | 1.925 | 520 |
import os
import mlflow
import argparse
from pprint import pprint
import src.data.load_data
from mlflow.tracking import MlflowClient
from tensorflow.python.saved_model import signature_constants
key = signature_constants.DEFAULT_SERVING_SIGNATURE_DEF_KEY
if __name__ == '__main__':
args = argparse... | [
11748,
28686,
201,
198,
11748,
285,
1652,
9319,
201,
198,
11748,
1822,
29572,
201,
198,
6738,
279,
4798,
1330,
279,
4798,
201,
198,
11748,
12351,
13,
7890,
13,
2220,
62,
7890,
201,
198,
6738,
285,
1652,
9319,
13,
36280,
1330,
337,
165... | 2.708108 | 185 |
from django.contrib.auth.backends import ModelBackend
from app.core.models import Customer
| [
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
1891,
2412,
1330,
9104,
7282,
437,
198,
6738,
598,
13,
7295,
13,
27530,
1330,
22092,
628,
628
] | 3.615385 | 26 |
# coding:utf-8
# File Name: Personal
# Author : yifengyou
# Date : 2021/07/18
p = Person()
print(p.name, p.age)
p.name = '李刚'
p.say("python语言很简单")
print(p.name,p.age) | [
2,
19617,
25,
40477,
12,
23,
198,
2,
9220,
6530,
171,
120,
248,
220,
220,
220,
220,
15644,
198,
2,
6434,
1058,
220,
220,
220,
220,
220,
220,
220,
331,
361,
268,
1360,
280,
198,
2,
7536,
1058,
220,
220,
220,
220,
220,
220,
220,
... | 1.722222 | 108 |
from django.urls import path,include
from rest_framework.routers import DefaultRouter
from . import views
router = DefaultRouter()
router.register('hello-viewset',views.HelloViewSet, basename='hello_viewset')
router.register('profiles',views.ProfileViewSet,basename='Profiles')
router.register('feed',views.UserProfileF... | [
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
11,
17256,
198,
6738,
1334,
62,
30604,
13,
472,
1010,
1330,
15161,
49,
39605,
198,
6738,
764,
1330,
5009,
198,
198,
472,
353,
796,
15161,
49,
39605,
3419,
198,
472,
353,
13,
30238,
10786,
... | 2.953757 | 173 |
from .layer_normalization import LayerNormalization
| [
6738,
764,
29289,
62,
11265,
1634,
1330,
34398,
26447,
1634,
198
] | 4.727273 | 11 |
from ._Assistant import Assistant
from ._napari_plugin import napari_plugin | [
6738,
47540,
48902,
1330,
15286,
198,
6738,
47540,
77,
499,
2743,
62,
33803,
1330,
25422,
2743,
62,
33803
] | 4.166667 | 18 |
from django.db import models
from django.utils.translation import ugettext_lazy as _
from .validators import Alpha2CodeValidator, Alpha3CodeValidator, NumericCodeValidator
class GeoBaseModel(models.Model):
"""
Abstract base model for the UN M.49 geoscheme.
Refs: http://unstats.un.org/unsd/methods/m49/m49.... | [
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
42625,
14208,
13,
26791,
13,
41519,
1330,
334,
1136,
5239,
62,
75,
12582,
355,
4808,
198,
6738,
764,
12102,
2024,
1330,
12995,
17,
10669,
47139,
1352,
11,
12995,
18,
10669,
47139,
135... | 2.622785 | 790 |
from django.urls import path
from jarbas.public_admin.sites import public_admin
urlpatterns = [
path('', public_admin.urls)
]
| [
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
198,
198,
6738,
17379,
12093,
13,
11377,
62,
28482,
13,
49315,
1330,
1171,
62,
28482,
628,
198,
6371,
33279,
82,
796,
685,
198,
220,
220,
220,
3108,
10786,
3256,
1171,
62,
28482,
13,
6371,... | 2.829787 | 47 |
import numpy as np
import cPickle
import re
import os
n_classes=10
image_width=32
image_height=32
image_depth=3
# regular expression that matches a datafile
r_data_file = re.compile('^data_batch_\d+')
# training and validate datasets as numpy n-d arrays,
# apropriate portions of which are ready to be fed to the plac... | [
11748,
299,
32152,
355,
45941,
198,
11748,
269,
31686,
293,
198,
11748,
302,
198,
11748,
28686,
198,
198,
77,
62,
37724,
28,
940,
198,
9060,
62,
10394,
28,
2624,
198,
9060,
62,
17015,
28,
2624,
198,
9060,
62,
18053,
28,
18,
198,
198... | 2.80198 | 303 |
import numpy as np
import tensorflow as tf
DIV2K_RGB_MEAN = np.array([0.4488, 0.4371, 0.4040]) * 255 | [
11748,
299,
32152,
355,
45941,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
198,
33569,
17,
42,
62,
36982,
62,
11682,
1565,
796,
45941,
13,
18747,
26933,
15,
13,
2598,
3459,
11,
657,
13,
19,
38056,
11,
657,
13,
1821,
1821,
12962,
... | 2.295455 | 44 |