content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
import matplotlib
from libs import GeneratorCNN
matplotlib.interactive(False)
from importlib import reload
import gc
from libs import model_zoo
reload(model_zoo)
import BaseLineModel as approach
import numpy as np
from importlib import reload
from libs import utils
from libs.utils import Bunch
from libs import Multi_C... | [
198,
11748,
2603,
29487,
8019,
198,
6738,
9195,
82,
1330,
35986,
18474,
198,
6759,
29487,
8019,
13,
3849,
5275,
7,
25101,
8,
198,
6738,
1330,
8019,
1330,
18126,
198,
11748,
308,
66,
198,
6738,
9195,
82,
1330,
2746,
62,
89,
2238,
198,
... | 1.999272 | 2,749 |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
from wolframclient.about import __author__, __name__, __version__
__all__ = ("__version__", "__name__", "__author__")
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
11,
3601,
62,
8818,
11,
28000,
1098,
62,
17201,
874,
201,
198,
201,
198,
6738,
17481,
859,
16366,
13,
10755,
1330,
... | 2.7875 | 80 |
from django.shortcuts import render
import datetime
from time import ctime
from fixture import models
from fixture.models import schedule
#time = ctime()[11:16] == "01:00"
if(True):
rows = schedule.objects.all()
for row in rows:
row.delete()
from fixture import fixtureScraping
| [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
198,
11748,
4818,
8079,
198,
6738,
640,
1330,
269,
2435,
198,
6738,
29220,
1330,
4981,
198,
6738,
29220,
13,
27530,
1330,
7269,
198,
198,
2,
2435,
796,
269,
2435,
3419,
58,
1157,
25,
1... | 3.2 | 90 |
########################################################################
#
# (C) 2015, Chris Houseknecht <chouse@ansible.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Fo... | [
29113,
29113,
7804,
198,
2,
198,
2,
357,
34,
8,
1853,
11,
5180,
2097,
74,
710,
21474,
1279,
354,
1076,
31,
504,
856,
13,
785,
29,
198,
2,
198,
2,
770,
2393,
318,
636,
286,
28038,
856,
198,
2,
198,
2,
28038,
856,
318,
1479,
378... | 3.844884 | 303 |
# -*- coding: utf-8 -*-
# Copyright (c) 2018, Manqala Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
from frappe.utils import get_url
import requests
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
15069,
357,
66,
8,
2864,
11,
1869,
80,
6081,
12052,
13,
290,
20420,
198,
2,
1114,
5964,
1321,
11,
3387,
766,
5964,
13,
14116,
198,
198,
6738,
11593,
37443,
834,
1... | 3.373494 | 83 |
"""chppL.
C/C++ package management system.
created by @nocotan
"""
class ChpplData:
"""main data"""
def __init__(self):
"""initialize
@param: __url
@param: __name
@param: __description
@param: __creator
@param: __package
@param: __confilm
"""
... | [
37811,
354,
381,
43,
13,
198,
34,
14,
34,
4880,
5301,
4542,
1080,
13,
198,
25598,
416,
2488,
77,
420,
313,
272,
198,
37811,
628,
198,
4871,
609,
381,
75,
6601,
25,
198,
220,
220,
220,
37227,
12417,
1366,
37811,
198,
220,
220,
220,... | 2.142012 | 845 |
#!/usr/bin/python
"""
(C) Copyright 2019-2021 Intel Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent
"""
from command_utils_base import FormattedParameter
from command_utils import ExecutableCommand
class DaosPerfCommand(ExecutableCommand):
"""Defines a object representing the daos_perf command.
... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
37811,
198,
220,
357,
34,
8,
15069,
13130,
12,
1238,
2481,
8180,
10501,
13,
628,
220,
30628,
55,
12,
34156,
12,
33234,
7483,
25,
347,
10305,
12,
17,
12,
2601,
682,
12,
12130,
298,
198,
37... | 2.277548 | 2,414 |
from negotiator_base import BaseNegotiator
from random import random, shuffle
# def receive_utility(self, utility):
# self.utility_history[self.current_iter] = (utility, self.utility())
#
# def compare_offers(self, opponent_offer):
# pass
#
# def counter_offer(self, opponent_of... | [
6738,
49194,
62,
8692,
1330,
7308,
32863,
5092,
1352,
198,
6738,
4738,
1330,
4738,
11,
36273,
628,
198,
220,
220,
220,
1303,
825,
3328,
62,
315,
879,
7,
944,
11,
10361,
2599,
198,
220,
220,
220,
1303,
220,
220,
220,
220,
220,
220,
... | 2.59542 | 131 |
import sys
import pygame as pg
import logging
import Project_GameState
from settings import *
# What each module does
# sys - This will set the recursion limit so that algorithms won't run on forever.
# settings - This will import the settings file in the current directory.
# Importing the GameState which will be use... | [
11748,
25064,
198,
11748,
12972,
6057,
355,
23241,
198,
11748,
18931,
198,
11748,
4935,
62,
8777,
9012,
198,
6738,
6460,
1330,
1635,
198,
198,
2,
1867,
1123,
8265,
857,
198,
2,
25064,
532,
770,
481,
900,
262,
664,
24197,
4179,
523,
32... | 3.503367 | 594 |
import random
import jasmin
from .test_jcli import jCliWithAuthTestCases
from hashlib import md5
from twisted.internet import defer
| [
11748,
4738,
198,
11748,
474,
292,
1084,
198,
6738,
764,
9288,
62,
73,
44506,
1330,
474,
2601,
72,
3152,
30515,
14402,
34,
1386,
198,
6738,
12234,
8019,
1330,
45243,
20,
198,
6738,
19074,
13,
37675,
1330,
29135,
628
] | 3.5 | 38 |
# Francis Adepoju, 2018-02-16
#Project Euler problem #1
summ = 0
i = 1
while i < 1000:
# For all integers either divisible by 3 or by 5, sum them up into variable called summ
if i % 3 == 0 or i % 5 == 0:
summ += i
i += 1
print("Sum of divisible of 3 or 5 les than 1000 equals: ", summ)
| [
2,
12155,
1215,
538,
13210,
84,
11,
2864,
12,
2999,
12,
1433,
198,
2,
16775,
412,
18173,
1917,
1303,
16,
198,
198,
82,
13929,
796,
657,
198,
72,
796,
352,
628,
198,
4514,
1312,
1279,
8576,
25,
198,
220,
220,
220,
1303,
1114,
477,
... | 2.649573 | 117 |
# Copyright 2016 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,
1584,
3012,
3457,
13,
1439,
2489,
10395,
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.742105 | 190 |
import logging
import pytest
import six
if six.PY2:
pytestmark = pytest.mark.skip("Python 2 non compatible code") # py2 styling
else:
from dbnd_examples.tutorial_syntax import T23_task_with_mutliple_outputs_py3 as T23
logger = logging.getLogger(__name__)
| [
11748,
18931,
198,
198,
11748,
12972,
9288,
198,
11748,
2237,
628,
198,
361,
2237,
13,
47,
56,
17,
25,
198,
220,
220,
220,
12972,
9288,
4102,
796,
12972,
9288,
13,
4102,
13,
48267,
7203,
37906,
362,
1729,
11670,
2438,
4943,
220,
1303,... | 2.69 | 100 |
import docx
import subprocess
if __name__ == "__main__":
filee = 'test_restore/Informare Sisteme noi - sindicat ศi angajaศi_v1 (1).docx'
tmp_file = "test_restore/tmp.txt"
tmp_res = 'test_restore/tmp_res.txt'
#print(get_docx_text(filee))
doc = docx.Document(filee)
#output = open("output_"+cur_da... | [
11748,
2205,
87,
198,
11748,
850,
14681,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
2393,
68,
796,
705,
9288,
62,
2118,
382,
14,
818,
687,
533,
311,
396,
34755,
645,
72,
532,
264,
521,
2... | 1.99768 | 431 |
import os
import pytest
from conda_build import api
from .utils import thisdir
@pytest.fixture()
@pytest.mark.sanity
@pytest.mark.serial
| [
11748,
28686,
198,
11748,
12972,
9288,
198,
198,
6738,
1779,
64,
62,
11249,
1330,
40391,
198,
198,
6738,
764,
26791,
1330,
428,
15908,
628,
198,
31,
9078,
9288,
13,
69,
9602,
3419,
628,
198,
31,
9078,
9288,
13,
4102,
13,
12807,
414,
... | 2.803922 | 51 |
from configparser import ConfigParser
config = ConfigParser()
config.read('data/channels.ini')
| [
6738,
4566,
48610,
1330,
17056,
46677,
198,
198,
11250,
796,
17056,
46677,
3419,
198,
11250,
13,
961,
10786,
7890,
14,
354,
8961,
13,
5362,
11537,
198
] | 3.692308 | 26 |
from absl import logging
import json
import tornado.web
from icubam.www.handlers import base
| [
6738,
2352,
75,
1330,
18931,
198,
11748,
33918,
198,
11748,
33718,
13,
12384,
198,
198,
6738,
14158,
549,
321,
13,
2503,
13,
4993,
8116,
1330,
2779,
628
] | 3.518519 | 27 |
import time
from copy import deepcopy
import torch
import torch.cuda.amp as amp
from .default_trainer import DefaultTrainer
# TODO over-ride from_checkpoint, load_checkpoint to load the model
| [
11748,
640,
198,
6738,
4866,
1330,
2769,
30073,
198,
198,
11748,
28034,
198,
11748,
28034,
13,
66,
15339,
13,
696,
355,
20766,
198,
6738,
764,
12286,
62,
2213,
10613,
1330,
15161,
2898,
10613,
628,
198,
2,
16926,
46,
625,
12,
13154,
4... | 3.545455 | 55 |
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-03-01 10:27
from __future__ import unicode_literals
from django.db import migrations, models
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2980,
515,
416,
37770,
352,
13,
940,
13,
20,
319,
2177,
12,
3070,
12,
486,
838,
25,
1983,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
19... | 2.736842 | 57 |
# # -*- coding:utf-8 -*-
# Author๏ผwancong
# Date: 2018-04-30
from pyhanlp import *
def demo_occurrence():
""" ๆผ็คบ่ฏๅ
ฑ็ฐ็ป่ฎก
>>> demo_occurrence()
ไฟกๆฏ=1
ๅ
่ฟ=1
ๅพๅฝขๅพๅ=1
ๅค็=2
ๆๆฏ=1
ๆน้ข=1
ๆฏ่พ=1
็ฎๅ=1
็ฎๆณ=2
่ง้ข=1
่ฎก็ฎๆบ=1
้ณ่ง้ข=1
<BLANKLINE>
ไฟกๆฏโ็ฎๆณ= tf=1 mi=8.856243954648566 le=0... | [
2,
1303,
532,
9,
12,
19617,
25,
40477,
12,
23,
532,
9,
12,
198,
2,
6434,
171,
120,
248,
86,
1192,
506,
198,
2,
7536,
25,
2864,
12,
3023,
12,
1270,
198,
6738,
12972,
7637,
34431,
1330,
1635,
628,
198,
4299,
13605,
62,
13966,
3392... | 1.43794 | 1,845 |
"""
Commandline interface
"""
import argparse
import enum
import functools
import sys
from typing import Dict, Iterator, List, Sequence, Set, TextIO, Tuple, Union
from . import __version__
from ._depinfo import DependencyInfo
from ._dotbuilder import export_to_dot
from ._htmlbuilder import export_to_html
from ._module... | [
37811,
198,
21575,
1370,
7071,
198,
37811,
198,
11748,
1822,
29572,
198,
11748,
33829,
198,
11748,
1257,
310,
10141,
198,
11748,
25064,
198,
6738,
19720,
1330,
360,
713,
11,
40806,
1352,
11,
7343,
11,
45835,
11,
5345,
11,
8255,
9399,
11... | 2.433138 | 3,410 |
import sys
sys.stdin = open("card_count_sample_input.txt", "r")
T = int(input())
# ์ฌ๋ฌ๊ฐ์ ํ
์คํธ ์ผ์ด์ค๊ฐ ์ฃผ์ด์ง๋ฏ๋ก, ๊ฐ๊ฐ์ ์ฒ๋ฆฌํฉ๋๋ค.
for test_case in range(1, T + 1):
cnt = []
card_li = []
num = int(input())
card_num = input()
idx = 0
for i in card_num:
card_li.append(i)
cnt = [0 for _ in range... | [
11748,
25064,
198,
17597,
13,
19282,
259,
796,
1280,
7203,
9517,
62,
9127,
62,
39873,
62,
15414,
13,
14116,
1600,
366,
81,
4943,
198,
198,
51,
796,
493,
7,
15414,
28955,
198,
198,
2,
23821,
245,
105,
167,
253,
105,
166,
108,
250,
... | 1.581602 | 337 |
# Generated by Django 2.1.4 on 2018-12-09 17:22
import django.core.validators
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
362,
13,
16,
13,
19,
319,
2864,
12,
1065,
12,
2931,
1596,
25,
1828,
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 |
import numpy as np
import pandas as pd
from collections import defaultdict
from difflib import SequenceMatcher
from .settings import FILE_claims_count, FILE_qualifiers_count, FILE_total_count
| [
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
6738,
17268,
1330,
4277,
11600,
198,
6738,
814,
8019,
1330,
45835,
19044,
2044,
198,
6738,
764,
33692,
1330,
45811,
62,
6604,
82,
62,
9127,
11,
45811,
62,
13255,
... | 3.784314 | 51 |
import time
from colored_logs.logger import Logger, LogType#, LogEnvironmeent
log = Logger(
ID='Test-id-1'
# environment=LogEnvironmeent.HTML, # Override to print html logs
# console_line_char_len=90 # Optionally provide how many chars does fir in one consolee line
)
log.info('This is an info ... | [
11748,
640,
198,
198,
6738,
16396,
62,
6404,
82,
13,
6404,
1362,
1330,
5972,
1362,
11,
5972,
6030,
2,
11,
5972,
4834,
2268,
1326,
298,
198,
198,
6404,
796,
5972,
1362,
7,
198,
220,
220,
220,
4522,
11639,
14402,
12,
312,
12,
16,
6,... | 2.621134 | 388 |
import FWCore.ParameterSet.Config as cms
l1tBmtfAlgoSelector = cms.EDProducer(
'L1TBMTFAlgoSelector',
# verbose = cms.untracked.bool(False),
bmtfKalman = cms.InputTag("simKBmtfDigis:BMTF"),
bmtfLegacy = cms.InputTag("simBmtfDigis:BMTF"),
feds = cms.InputTag("rawDataCollector")
)
| [
11748,
48849,
14055,
13,
36301,
7248,
13,
16934,
355,
269,
907,
198,
198,
75,
16,
83,
33,
16762,
69,
2348,
2188,
17563,
273,
796,
269,
907,
13,
1961,
11547,
2189,
7,
198,
220,
220,
220,
705,
43,
16,
51,
12261,
10234,
2348,
2188,
1... | 2.185714 | 140 |
# -*- coding: UTF-8 -*-
import MySQLdb
| [
2,
532,
9,
12,
19617,
25,
41002,
12,
23,
532,
9,
12,
198,
198,
11748,
33476,
9945,
198
] | 2.222222 | 18 |
import sys
import pydart
import math
import controller
print('Example: bipedJump')
pydart.init()
print('pydart initialization OK')
data_dir = pydart.misc.example_data_dir(__file__)
print('data_dir = ' + data_dir)
world = pydart.create_world(1.0 / 2000.0, data_dir + '/skel/fullbody1.skel')
print('pydart create_world... | [
11748,
25064,
198,
11748,
279,
5173,
433,
198,
11748,
10688,
198,
11748,
10444,
198,
4798,
10786,
16281,
25,
14141,
276,
36046,
11537,
628,
198,
79,
5173,
433,
13,
15003,
3419,
198,
4798,
10786,
79,
5173,
433,
37588,
7477,
11537,
198,
1... | 2.248705 | 579 |
from orm import *
from orm import base
| [
6738,
393,
76,
1330,
1635,
198,
6738,
393,
76,
1330,
2779,
628
] | 3.333333 | 12 |
from chromosome import Chromosome as BaseChromosome
import population
from nodes import Deport, Customer, CustomerDistanceTable
from csv_reader import csv_read
import ga_params
population.Chromosome = Chromosome
run_file_name = input("Enter run file name [default: C101_200]: ")
if not run_file_name:
run_file_na... | [
6738,
34348,
1330,
18255,
418,
462,
355,
7308,
1925,
398,
418,
462,
198,
11748,
3265,
198,
6738,
13760,
1330,
2129,
419,
11,
22092,
11,
22092,
45767,
10962,
198,
6738,
269,
21370,
62,
46862,
1330,
269,
21370,
62,
961,
198,
11748,
31986,... | 2.930303 | 330 |
import glfw
import compushady.config
import compushady.formats
import compushady
from compushady.shaders import hlsl
import struct
import platform
compushady.config.set_debug(True)
print('Using device', compushady.get_current_device().name)
buffer = compushady.Buffer(512 * 512 * 4, compushady.HEAP_UPLOAD)
buffer.upl... | [
11748,
1278,
44482,
198,
11748,
552,
1530,
4597,
13,
11250,
198,
11748,
552,
1530,
4597,
13,
687,
1381,
198,
11748,
552,
1530,
4597,
198,
6738,
552,
1530,
4597,
13,
1477,
9972,
1330,
289,
75,
6649,
198,
11748,
2878,
198,
11748,
3859,
... | 2.195437 | 1,315 |
#
# Tutt library III location codes
#
FULL_CODE_MAP = {
'dacc': 'Digital Archives of Colorado College',
'ewww':'Online',
'ewwwd':'Online Government Documents',
'ewwwp':'Online Periodcals',
'ewwwn':'Online',
'tarf':'Tutt Reference',
'tarfa':'Tutt 1st Floor South',
'tarfc':'Tutt Reference... | [
2,
198,
2,
309,
15318,
5888,
6711,
4067,
12416,
198,
2,
220,
198,
37,
9994,
62,
34,
16820,
62,
33767,
796,
1391,
198,
220,
220,
220,
705,
67,
4134,
10354,
705,
27640,
22275,
286,
7492,
5535,
3256,
198,
220,
220,
220,
705,
413,
138... | 2.335166 | 6,367 |
from ...app import cache
from ... import requests as r
from . import main
from flask import render_template
from datetime import datetime
import dart.common
import dart.common.html
@main.route("/")
@main.route("/hosts")
@main.route("/host/<string:fqdn>")
@main.route("/processes")
@main.route("/process/<string... | [
6738,
2644,
1324,
1330,
12940,
198,
6738,
2644,
1330,
7007,
355,
374,
198,
6738,
764,
1330,
1388,
198,
6738,
42903,
1330,
8543,
62,
28243,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
11748,
35970,
13,
11321,
198,
11748,
35970,
13,
113... | 2.991597 | 119 |
from django.core.management import BaseCommand
from declarations.models import Declaration
| [
6738,
42625,
14208,
13,
7295,
13,
27604,
1330,
7308,
21575,
198,
6738,
31713,
13,
27530,
1330,
24720,
628
] | 5.111111 | 18 |
import sys
import yaml
import pkgutil
import requests
import logging
import re
import os
from datetime import date
def percent_list(part_list, whole_list):
"""return percent of the part"""
w = len(whole_list)
if not w:
return (w,0)
p = 100 * float(len(part_list))/float(w)
return (w,round(1... | [
198,
11748,
25064,
198,
11748,
331,
43695,
198,
11748,
279,
10025,
22602,
198,
11748,
7007,
198,
11748,
18931,
198,
11748,
302,
198,
11748,
28686,
198,
6738,
4818,
8079,
1330,
3128,
198,
198,
4299,
1411,
62,
4868,
7,
3911,
62,
4868,
11,... | 2.31537 | 1,633 |
import pytz
import logging
from dateutil.parser import parse
from datetime import datetime, timedelta
from django.db.models import Q
from osf.models import OSFUser
from website.app import init_app
from framework.database import paginated
from scripts.analytics.base import EventAnalytics
logger = logging.getLogger(__... | [
11748,
12972,
22877,
198,
11748,
18931,
198,
6738,
3128,
22602,
13,
48610,
1330,
21136,
198,
6738,
4818,
8079,
1330,
4818,
8079,
11,
28805,
12514,
198,
198,
6738,
42625,
14208,
13,
9945,
13,
27530,
1330,
1195,
198,
198,
6738,
267,
28202,
... | 3.1 | 210 |
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.views.generic import TemplateView
from django.contrib import admin
from front.views import (
teacherprofile,
studentprofile,
recieve_comment,
searchoffer,
searchneed,... | [
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
2291,
11,
19016,
198,
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
13,
12708,
1330,
9037,
198,
6738,
42625,
14208,
13,
33571,
13,
41357,
... | 2.633058 | 605 |
import setuptools
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name="olsq",
version="0.0.4",
license = "BSD",
author="Daniel Bochen Tan",
author_email="bctan@cs.ucla.edu",
description="Optimal Layout Synthesis for Quantum Computing (OL... | [
11748,
900,
37623,
10141,
198,
198,
4480,
1280,
7203,
15675,
11682,
13,
9132,
1600,
366,
81,
1600,
21004,
2625,
40477,
12,
23,
4943,
355,
277,
71,
25,
198,
220,
220,
220,
890,
62,
11213,
796,
277,
71,
13,
961,
3419,
198,
198,
2617,
... | 2.431762 | 403 |
import argparse
import bpy
import sys
if __name__ == "__main__":
if "--" not in sys.argv:
argv = [] # as if no args are passed
else:
argv = sys.argv[sys.argv.index("--") + 1:] # get all args after "--"
main(argv)
| [
11748,
1822,
29572,
198,
11748,
275,
9078,
198,
11748,
25064,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
611,
366,
438,
1,
407,
287,
25064,
13,
853,
85,
25,
198,
220,
220,
220,
220,
... | 2.216216 | 111 |
print('\033[7;30mOlรก Mundo!\033[m')
| [
4798,
10786,
59,
44427,
58,
22,
26,
1270,
76,
30098,
6557,
33324,
78,
0,
59,
44427,
58,
76,
11537,
198
] | 1.8 | 20 |
'''An example to show how to set up an pommerman game programmatically'''
import pommerman
from pommerman import agents
import sys
sys.path.append("../pommerman")
import fight
def main():
'''Simple function to bootstrap a game.
Use this as an example to set up your training env.
'''
# Print ... | [
7061,
6,
2025,
1672,
284,
905,
703,
284,
900,
510,
281,
279,
296,
647,
805,
983,
1430,
49454,
7061,
6,
198,
11748,
279,
296,
647,
805,
198,
6738,
279,
296,
647,
805,
1330,
6554,
198,
11748,
25064,
198,
17597,
13,
6978,
13,
33295,
... | 2.43832 | 762 |
from reclaimer.h2.constants import HALO2_MAP_TYPES
| [
6738,
302,
17111,
13,
71,
17,
13,
9979,
1187,
1330,
42968,
46,
17,
62,
33767,
62,
9936,
47,
1546,
201,
198,
201,
198
] | 2.347826 | 23 |
# Generated by Django 2.2.6 on 2019-10-28 20:09
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
362,
13,
17,
13,
21,
319,
13130,
12,
940,
12,
2078,
1160,
25,
2931,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
from __future__ import annotations
from typing import Any
from .abc import ABCEncoder
class Message:
"""Message returned from queue. Should not be created manually."""
__slots__ = frozenset(("_priority", "_data"))
@classmethod
@classmethod
@property
def priority(self) -> int:
"""... | [
6738,
11593,
37443,
834,
1330,
37647,
198,
198,
6738,
19720,
1330,
4377,
198,
198,
6738,
764,
39305,
1330,
9738,
27195,
12342,
628,
198,
4871,
16000,
25,
198,
220,
220,
220,
37227,
12837,
4504,
422,
16834,
13,
10358,
407,
307,
2727,
145... | 2.859756 | 164 |
import math
import concurrent.futures
from functools import partial
MAX_VALUE = 2_000_000
THREADS = 50
size = MAX_VALUE // THREADS
childrens = []
if __name__ == "__main__":
main() | [
11748,
10688,
198,
11748,
24580,
13,
69,
315,
942,
198,
6738,
1257,
310,
10141,
1330,
13027,
628,
628,
198,
22921,
62,
39488,
796,
362,
62,
830,
62,
830,
198,
4221,
15675,
50,
796,
2026,
198,
198,
7857,
796,
25882,
62,
39488,
3373,
... | 2.768116 | 69 |
import matplotlib
matplotlib.use("TkAgg")
import tkinter as tk
from tkinter import ttk
import cv2
from tkinter.filedialog import *
import tkinter.font as tkFont
from tkinter.ttk import Treeview
import time
from PIL import Image, ImageTk
import threading
from test import *
LARGE_FONT = ("Verdana", 12)
import random
cla... | [
11748,
2603,
29487,
8019,
198,
6759,
29487,
8019,
13,
1904,
7203,
51,
74,
46384,
4943,
198,
11748,
256,
74,
3849,
355,
256,
74,
198,
6738,
256,
74,
3849,
1330,
256,
30488,
198,
11748,
269,
85,
17,
198,
6738,
256,
74,
3849,
13,
69,
... | 2.488688 | 221 |
from enum import Enum
from keras.preprocessing.image import ImageDataGenerator
from PIL import Image
import io
| [
6738,
33829,
1330,
2039,
388,
198,
6738,
41927,
292,
13,
3866,
36948,
13,
9060,
1330,
7412,
6601,
8645,
1352,
198,
6738,
350,
4146,
1330,
7412,
198,
11748,
33245,
628
] | 3.862069 | 29 |
#This program gets the input from the DSB server and processes, then saves it so they can be used by Bot.js
print("STARTING SERVICE....")
from PIL import Image
import urllib.request
import requests
import base64
import filecmp
import time
import json
import os
print("LOADING COMPLETE")
print("GETTING DATA")
#PATH OF F... | [
2,
1212,
1430,
3011,
262,
5128,
422,
262,
360,
16811,
4382,
290,
7767,
11,
788,
16031,
340,
523,
484,
460,
307,
973,
416,
18579,
13,
8457,
198,
4798,
7203,
2257,
7227,
2751,
47453,
1106,
4943,
198,
6738,
350,
4146,
1330,
7412,
198,
... | 3.352243 | 758 |
from rest_framework import serializers
from sales.models import Sale, SaleProduct
from seller_products.models import SellerProductArchive
from sellers.models import Seller
from users.models import User
| [
6738,
1334,
62,
30604,
1330,
11389,
11341,
198,
198,
6738,
4200,
13,
27530,
1330,
16467,
11,
16467,
15667,
198,
6738,
18583,
62,
29498,
13,
27530,
1330,
46555,
15667,
19895,
425,
198,
6738,
23531,
13,
27530,
1330,
46555,
198,
6738,
2985,
... | 4.354167 | 48 |
"""
Repository of various documents
"""
# Third party imports
from flask import Blueprint
from flask import Response
from flask import redirect
from flask import current_app
from flask_cas import login_required
# Local application imports
from app.users import User
from app.utils.jinja_filters import file_name, file_... | [
37811,
198,
6207,
13264,
286,
2972,
4963,
198,
37811,
198,
198,
2,
10467,
2151,
17944,
198,
6738,
42903,
1330,
39932,
198,
6738,
42903,
1330,
18261,
198,
6738,
42903,
1330,
18941,
198,
6738,
42903,
1330,
1459,
62,
1324,
198,
6738,
42903,
... | 2.61898 | 706 |
# https://raw.githubusercontent.com/raghakot/keras-resnet/master/resnet.py
import os
from keras.optimizers import SGD
from keras.models import Model, model_from_json
from keras.layers import (
Input,
Activation,
merge,
Dense,
Flatten
)
from keras.layers.convolutional import (
Convolution2D,
... | [
2,
3740,
1378,
1831,
13,
12567,
43667,
13,
785,
14,
81,
10471,
461,
313,
14,
6122,
292,
12,
411,
3262,
14,
9866,
14,
411,
3262,
13,
9078,
198,
198,
11748,
28686,
198,
6738,
41927,
292,
13,
40085,
11341,
1330,
26147,
35,
198,
6738,
... | 2.172742 | 2,414 |
import requests
from pwn import *
url = "https://ac141f861ea930df80a3036f00f10064.web-security-academy.net/filter?category=Accessories"
if __name__ == '__main__':
col_no = get_cols_no(url, 1, 10) | [
11748,
7007,
201,
198,
6738,
279,
675,
1330,
1635,
201,
198,
6371,
796,
366,
5450,
1378,
330,
23756,
69,
4521,
16,
18213,
45418,
7568,
1795,
64,
1270,
2623,
69,
405,
69,
3064,
2414,
13,
12384,
12,
12961,
12,
330,
324,
3065,
13,
3262... | 2.356322 | 87 |
import numpy as np
from torch.utils.data import Dataset
| [
11748,
299,
32152,
355,
45941,
198,
198,
6738,
28034,
13,
26791,
13,
7890,
1330,
16092,
292,
316,
628
] | 3.222222 | 18 |
'''
K.I.S.T.I.E (Keep, It, Simple, Take, It, Easy)
Created on 1 Jan 2013
@author: Leonardo Bruni, leo.b2003@gmail.com
Kistie Maya Module Library
This Kistie implementation i's part of project 'Kistie_Autorig' by Leonardo Bruni, leo.b2003@gmail.com
'''
#ToDo: implement a debug mode for print or not
import pymel as pm ... | [
7061,
6,
198,
42,
13,
40,
13,
50,
13,
51,
13,
40,
13,
36,
357,
15597,
11,
632,
11,
17427,
11,
7214,
11,
632,
11,
16789,
8,
198,
41972,
319,
352,
2365,
2211,
198,
31,
9800,
25,
38083,
15700,
72,
11,
443,
78,
13,
65,
16088,
31... | 2.183036 | 224 |
#!/usr/bin/env python
from __future__ import print_function
import numpy as np
import scipy as scipy
import scipy.integrate as integrate
import argparse
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
if __name__ == "__main__":
main()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
629,
541,
88,
355,
629,
541,
88,
198,
11748,
629,
541,
88,
13,
18908,
4873,
3... | 2.891304 | 92 |
# ================================================================
# MIT License
# Copyright (c) 2021 edwardyehuang (https://github.com/edwardyehuang)
# ================================================================
import tensorflow as tf
| [
2,
46111,
4770,
25609,
18604,
198,
2,
17168,
13789,
198,
2,
15069,
357,
66,
8,
33448,
1225,
904,
5948,
13415,
648,
357,
5450,
1378,
12567,
13,
785,
14,
276,
904,
5948,
13415,
648,
8,
198,
2,
46111,
4770,
25609,
18604,
198,
198,
1174... | 4.979592 | 49 |
#! /usr/bin/python
#===============================================================================
# File Name : app.py
# Date : 12-02-2015
# Input Files : Nil
# Author : Satheesh <sathishsms@gmail.com>
# Description :
# How to run :twit_test.py -l info
# :twit_test.py -... | [
2,
0,
1220,
14629,
14,
8800,
14,
29412,
198,
2,
23926,
25609,
18604,
198,
2,
9220,
6530,
220,
220,
220,
220,
220,
1058,
598,
13,
9078,
198,
2,
7536,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
1105,
12,
2999,
12,
462... | 2.811828 | 1,302 |
import json
import logging
import logging.handlers
import pytest
from ethereum import slogging
@pytest.mark.parametrize('level_name', ['critical', 'error', 'warning', 'info', 'debug', 'trace'])
def test_lazy_log():
"""
test lacy evaluation of json log data
e.g.
class LogState
class LogMem... | [
11748,
33918,
198,
11748,
18931,
198,
11748,
18931,
13,
4993,
8116,
198,
11748,
12972,
9288,
198,
6738,
304,
17733,
1330,
25801,
2667,
628,
198,
31,
9078,
9288,
13,
4102,
13,
17143,
316,
380,
2736,
10786,
5715,
62,
3672,
3256,
37250,
34... | 2.248705 | 965 |
"""Test fetch queries."""
from backend.lib.database.postgres import connect
from backend.lib.fetch import census, providers, representative_points
import mock
engine = connect.create_db_engine()
class TestFetchRepresentativePoints():
"""Test fetch representative_points."""
@staticmethod
def test_fetch_... | [
37811,
14402,
21207,
20743,
526,
15931,
198,
6738,
30203,
13,
8019,
13,
48806,
13,
7353,
34239,
1330,
2018,
198,
6738,
30203,
13,
8019,
13,
69,
7569,
1330,
21649,
11,
9549,
11,
8852,
62,
13033,
198,
198,
11748,
15290,
198,
198,
18392,
... | 2.173255 | 2,909 |
# encoding: utf-8
# module PySide.QtNetwork
# from C:\Python27\lib\site-packages\PySide\QtNetwork.pyd
# by generator 1.147
# no doc
# imports
import PySide.QtCore as __PySide_QtCore
import Shiboken as __Shiboken
from QAbstractNetworkCache import QAbstractNetworkCache
| [
2,
21004,
25,
3384,
69,
12,
23,
198,
2,
8265,
9485,
24819,
13,
48,
83,
26245,
198,
2,
422,
327,
7479,
37906,
1983,
59,
8019,
59,
15654,
12,
43789,
59,
20519,
24819,
59,
48,
83,
26245,
13,
79,
5173,
198,
2,
416,
17301,
352,
13,
... | 2.935484 | 93 |
# PyImageCompare
# Copyright ยฉ 2020 by Paul Wilhelm <anfrage@paulwilhelm.de>
# https://github.com/shredEngineer/PyImageCompare
# Compares all JPEG images in a folder and renames (enumerates) duplicates. Differences in resolution and quality don't matter!
# This program loads all images in a folder, generates grayscal... | [
2,
9485,
5159,
41488,
198,
2,
15069,
10673,
12131,
416,
3362,
50031,
1279,
272,
8310,
496,
31,
79,
2518,
86,
346,
33485,
13,
2934,
29,
198,
2,
3740,
1378,
12567,
13,
785,
14,
1477,
445,
13798,
263,
14,
20519,
5159,
41488,
198,
198,
... | 3.390093 | 323 |
#
# Copyright (c) 2021 Citrix Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | [
2,
198,
2,
15069,
357,
66,
8,
33448,
15792,
8609,
11998,
11,
3457,
13,
198,
2,
198,
2,
220,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
4943,
198,
2,
220,
220,
345,
743,
407,
779,
428,
2393... | 2.760546 | 3,295 |
import tarfile
from multiprocessing import Pool
import numpy as np
import subprocess
import os
from pathlib import Path
import math
import time
from datetime import datetime
from functools import partial
import argparse
from collections import defaultdict, Counter
import json
import pickle
import csv
import shutil
fro... | [
11748,
13422,
7753,
198,
6738,
18540,
305,
919,
278,
1330,
19850,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
850,
14681,
198,
11748,
28686,
198,
6738,
3108,
8019,
1330,
10644,
198,
11748,
10688,
198,
11748,
640,
198,
6738,
4818,
8079... | 2.155733 | 1,631 |
import torch.nn as nn
import torch
import math
| [
11748,
220,
28034,
13,
20471,
355,
299,
77,
198,
11748,
28034,
198,
11748,
10688,
628
] | 3.266667 | 15 |
import tsensor
import numpy as np
| [
11748,
40379,
22854,
198,
11748,
299,
32152,
355,
45941,
628
] | 3.5 | 10 |
# -*- coding: utf-8 -*-
"""
Created on Sun Jun 10 21:43:38 2018
@author: Gireesh Sundaram
"""
#Importing the packages
import pandas as pd
import matplotlib.pyplot as plt
from wordcloud import WordCloud
from nltk.corpus import stopwords
from textblob import TextBlob
import numpy as np
from nltk.sentiment... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
37811,
201,
198,
41972,
319,
3825,
7653,
838,
2310,
25,
3559,
25,
2548,
2864,
201,
198,
201,
198,
31,
9800,
25,
402,
557,
5069,
3309,
41158,
201,
198,
37811,
201,... | 2.42652 | 2,368 |
from __future__ import print_function
import pathlib
from builtins import object
from builtins import str
from typing import Dict
from empire.server.common import helpers
from empire.server.common.module_models import PydanticModule
from empire.server.database.models import Credential
from empire.server.utils import ... | [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
198,
11748,
3108,
8019,
198,
6738,
3170,
1040,
1330,
2134,
198,
6738,
3170,
1040,
1330,
965,
198,
6738,
19720,
1330,
360,
713,
198,
198,
6738,
13735,
13,
15388,
13,
11321,
1330,
49385,... | 4 | 99 |
# Copyright 2020 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,
12131,
3012,
3457,
13,
1439,
2489,
10395,
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,
... | 2.435767 | 2,561 |
# Copyright 2017 F5 Networks Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | [
2,
15069,
2177,
376,
20,
27862,
3457,
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,
13,
198,
2,
... | 3.541379 | 290 |
"""Test pipeline.py
..note: These tests depend on global state and are therefore not reentrant.
"""
import os
import sys
import types
import shutil
import tempfile
from mindbender import pipeline
from nose.tools import (
with_setup,
assert_equals,
assert_raises
)
self = sys.modules[__name__]
@wit... | [
37811,
14402,
11523,
13,
9078,
198,
198,
492,
11295,
25,
2312,
5254,
4745,
319,
3298,
1181,
290,
389,
4361,
407,
302,
298,
5250,
13,
198,
198,
37811,
198,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
3858,
198,
11748,
4423,
346,
... | 2.577215 | 395 |
from abc import ABCMeta, abstractmethod
class PacketObserver:
"""
An abstract implementation of the packet observer
"""
__metaclass__ = ABCMeta
@abstractmethod
def update(self, handler):
"""
:param PacketHandler handler:
:return:
"""
pass
| [
6738,
450,
66,
1330,
9738,
48526,
11,
12531,
24396,
628,
198,
4871,
6400,
316,
31310,
18497,
25,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1052,
12531,
7822,
286,
262,
19638,
22890,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
... | 2.487805 | 123 |
import pytorch_lightning as pl
import torch
from torch.utils.data import Dataset, DataLoader, TensorDataset
import torchvision.utils as vutils
import numpy as np
import glob
from lib.utils import *
def label_wavepr(arr, T1=0.30, T2=0.15):
"""Label the wave profit retract to discrete labels.
Args:
ar... | [
11748,
12972,
13165,
354,
62,
2971,
768,
355,
458,
198,
11748,
28034,
198,
6738,
28034,
13,
26791,
13,
7890,
1330,
16092,
292,
316,
11,
6060,
17401,
11,
309,
22854,
27354,
292,
316,
198,
11748,
28034,
10178,
13,
26791,
355,
410,
26791,
... | 2.372405 | 819 |
# Classes to model a HDL design hierarchy
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Copyright (c) 2014-2019, Lars Asplund lars.anders.asplund@gmail.com... | [
2,
38884,
284,
2746,
257,
48867,
1486,
18911,
201,
198,
2,
201,
198,
2,
770,
8090,
6127,
5178,
318,
2426,
284,
262,
2846,
286,
262,
29258,
5094,
201,
198,
2,
13789,
11,
410,
13,
362,
13,
15,
13,
1002,
257,
4866,
286,
262,
4904,
... | 2.128529 | 16,152 |
#!/usr/bin/env python3
import os
import shutil
import sys
import yaml
from my_analytics.stats import plot
config = yaml.safe_load(open("config.yml"))
def run():
"""
Runs analytics on the places data from firefox
"""
if os.path.exists(config["config"]["places_directory"]):
# create a copy o... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
11748,
28686,
198,
11748,
4423,
346,
198,
11748,
25064,
198,
198,
11748,
331,
43695,
198,
198,
6738,
616,
62,
38200,
14094,
13,
34242,
1330,
7110,
198,
198,
11250,
796,
331,
4... | 2.505263 | 285 |
import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="dcsdata",
version="0.0.9",
author="Charles E. Jewers",
author_email="charlesejewers@gmail.com",
description="A text data tool for the University of Sheffield.",
long_description=long_d... | [
11748,
900,
37623,
10141,
198,
198,
4480,
1280,
7203,
15675,
11682,
13,
9132,
1600,
366,
81,
4943,
355,
277,
71,
25,
198,
220,
220,
220,
890,
62,
11213,
796,
277,
71,
13,
961,
3419,
198,
198,
2617,
37623,
10141,
13,
40406,
7,
198,
... | 2.231959 | 388 |
# -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-06-05 21:05
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2980,
515,
416,
37770,
352,
13,
24,
13,
22,
319,
1584,
12,
3312,
12,
2713,
2310,
25,
2713,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
1... | 2.724638 | 69 |
"""Support for MQTT switches."""
import logging
import voluptuous as vol
from homeassistant.components import mqtt, switch
from homeassistant.components.switch import SwitchEntity
from homeassistant.const import (
CONF_DEVICE,
CONF_ICON,
CONF_NAME,
CONF_OPTIMISTIC,
CONF_PAYLOAD_OFF,
CONF_PAYLO... | [
37811,
15514,
329,
337,
48,
15751,
18225,
526,
15931,
198,
11748,
18931,
198,
198,
11748,
2322,
37623,
5623,
355,
2322,
198,
198,
6738,
1363,
562,
10167,
13,
5589,
3906,
1330,
285,
80,
926,
11,
5078,
198,
6738,
1363,
562,
10167,
13,
5... | 2.18027 | 3,994 |
from voximplant.apiclient import VoximplantAPI, VoximplantException
if __name__ == "__main__":
voxapi = VoximplantAPI("credentials.json")
# Bind the skills 1, 5 to the users 5, 6, 10.
SKILL_ID = [1, 3]
USER_ID = [5, 6, 10]
try:
res = voxapi.bind_skill(skill_id=SKILL_ID,
... | [
6738,
410,
1140,
320,
15060,
13,
499,
291,
75,
1153,
1330,
28035,
320,
15060,
17614,
11,
28035,
320,
15060,
16922,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
410,
1140,
15042,
796,
28035,
32... | 2.084112 | 214 |
#!/usr/bin/env python3
n,r,m = [int(i) for i in input().split()]
data = [input().split() for i in range(m)]
data = [(int(t), float(p), int(d)) for t,p,d in data]
inf = n*50000
lower,upper = 0, inf
while True:
mid = (lower+upper)/2
if mid == lower or mid == upper:
break
DP = [0]*(r-n) # i-th iterati... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
77,
11,
81,
11,
76,
796,
685,
600,
7,
72,
8,
329,
1312,
287,
5128,
22446,
35312,
3419,
60,
198,
7890,
796,
685,
15414,
22446,
35312,
3419,
329,
1312,
287,
2837,
7,
76,
15437,
... | 2.344371 | 302 |
"""
This module performs probabilistic model on some network of streets given by
the modified adjacency matrix (with dictionary of length, width, alpha, beta,
orientation).
"""
import numpy as np
import scipy.integrate as integrate
from collections import defaultdict
from source.junction import Junction
class Model(o... | [
37811,
198,
1212,
8265,
17706,
1861,
14991,
2569,
2746,
319,
617,
3127,
286,
6483,
1813,
416,
198,
1169,
9518,
9224,
330,
1387,
17593,
357,
4480,
22155,
286,
4129,
11,
9647,
11,
17130,
11,
12159,
11,
198,
13989,
341,
737,
198,
37811,
... | 2.305043 | 5,255 |
from __future__ import print_function
import argparse
import yaml
from logger import Logger
from test_model.test import selfsupervised
if __name__ == "__main__":
# Load the config file
parser = argparse.ArgumentParser(description="Sensor fusion model")
parser.add_argument("--config", help="YAML config fi... | [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
11748,
1822,
29572,
198,
11748,
331,
43695,
198,
198,
6738,
49706,
1330,
5972,
1362,
198,
6738,
1332,
62,
19849,
13,
9288,
1330,
2116,
16668,
16149,
198,
198,
361,
11593,
3672,
834,
66... | 2.758713 | 373 |
from flask import Blueprint, request
from routers.geolocation.use_case_geolocation import get_address_from_geolocation
geolocation_router = Blueprint('geolocation_router', __name__)
# ------------------------------------------------------------------
# Routers
# -----------------------------------------------------... | [
6738,
42903,
1330,
39932,
11,
2581,
198,
198,
6738,
41144,
13,
469,
349,
5040,
13,
1904,
62,
7442,
62,
469,
349,
5040,
1330,
651,
62,
21975,
62,
6738,
62,
469,
349,
5040,
198,
198,
469,
349,
5040,
62,
472,
353,
796,
39932,
10786,
... | 4.344444 | 90 |
# -*- coding: utf-8 -*-
__author__ = 'Weiran Huang'
__email__ = 'huangweiran1998@gmail.com'
__version__ = '1.0.0' | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
834,
9800,
834,
796,
705,
1135,
343,
272,
31663,
6,
198,
834,
12888,
834,
796,
705,
13415,
648,
732,
343,
272,
21113,
31,
14816,
13,
785,
6,
198,
834,
9641,
834... | 2.111111 | 54 |
import math
f()
| [
11748,
10688,
198,
69,
3419,
198
] | 2.666667 | 6 |
n = int(input())
score = dict([])
max_dict = dict([])
for i in range(1, n + 1):
score[i] = int(input())
# max(n) = max(max(n-2), max(n-3) + score(n-1)) + score(n)
# Key IDEA : ๋งจ ๋ ๊ณ๋จ์ ๋ฐ์์ผ ํ๋ค๋ ์กฐ๊ฑด์ ์ฃผ๋ชฉ. ๊ทธ๋ฌ๊ธฐ ์ํด์๋ ๋ ๊ฐ์ง ์ ํ์ง ๋ฐ์ ์์
# Dynamic Programming๊ณผ Recursion์ ํ์ฉํด์ ํด๊ฒฐ. => n๋ณด๋ค ์์ ์์์๋ ์๋ํ๋ ํจ์๊ฐ ์๋ค๊ณ ๊ฐ์ . (SICP)
if... | [
77,
796,
493,
7,
15414,
28955,
198,
198,
26675,
796,
8633,
26933,
12962,
198,
9806,
62,
11600,
796,
8633,
26933,
12962,
198,
198,
1640,
1312,
287,
2837,
7,
16,
11,
299,
1343,
352,
2599,
198,
220,
220,
220,
4776,
58,
72,
60,
796,
4... | 1.313924 | 395 |
from django.shortcuts import get_object_or_404
from apps.canvas_auth.models import User
from apps.suggest.models import get_suggested_tags
from apps.tags.models import Tag
from canvas import bgwork, models
from canvas.api_decorators import api_decorator
from canvas.exceptions import ServiceError
from canvas.metrics im... | [
6738,
42625,
14208,
13,
19509,
23779,
1330,
651,
62,
15252,
62,
273,
62,
26429,
198,
198,
6738,
6725,
13,
5171,
11017,
62,
18439,
13,
27530,
1330,
11787,
198,
6738,
6725,
13,
47811,
13,
27530,
1330,
651,
62,
47811,
276,
62,
31499,
198... | 3.302198 | 182 |
# Progress indicator for Python 3.5.1
# Version 0.1.1
# Johannes Asplund-Samuelsson
class Progress():
"""Progress indication thingamabob"""
# Design variables
__allowed_designs = set(['p','s','b','t','c'])
# Spinner variables
__spin_stages = ['/','-','\\','|']
__spin_stage = 0
__last_spin... | [
2,
18387,
16916,
329,
11361,
513,
13,
20,
13,
16,
198,
2,
10628,
657,
13,
16,
13,
16,
198,
2,
38579,
1081,
489,
917,
12,
16305,
2731,
16528,
198,
198,
4871,
18387,
33529,
198,
220,
220,
220,
37227,
32577,
12955,
1517,
321,
397,
67... | 2.138667 | 3,512 |
"""Simple tests for the simple stack language."""
import simpleStack
def test_hello_world():
"""Tests hello world."""
logs = []
def log_print(val, end=""):
"""Logging print statement."""
logs.append(val + end)
with open("examples/hello.ss") as hello:
simpleStack.run_simple_s... | [
37811,
26437,
5254,
329,
262,
2829,
8931,
3303,
526,
15931,
198,
198,
11748,
2829,
25896,
628,
198,
4299,
1332,
62,
31373,
62,
6894,
33529,
198,
220,
220,
220,
37227,
51,
3558,
23748,
995,
526,
15931,
198,
220,
220,
220,
17259,
796,
1... | 2.260246 | 488 |
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions
from selenium.webdriver.support.wait import WebDriverWait
from config import BASE_URL
| [
6738,
384,
11925,
1505,
13,
12384,
26230,
13,
11321,
13,
1525,
1330,
2750,
198,
6738,
384,
11925,
1505,
13,
12384,
26230,
13,
11284,
1330,
2938,
62,
17561,
1756,
198,
6738,
384,
11925,
1505,
13,
12384,
26230,
13,
11284,
13,
17077,
1330,... | 3.603774 | 53 |
import os
from collections import defaultdict
import click
import spacy
from allennlp.common.logging import logger
from spacy.symbols import ORTH
from bs4 import BeautifulSoup, Comment
from tqdm import tqdm
from conllu import TokenList
import wiktionarifier.scrape.db as db
from wiktionarifier.format.const import VALI... | [
11748,
28686,
198,
6738,
17268,
1330,
4277,
11600,
198,
198,
11748,
3904,
198,
11748,
599,
1590,
198,
6738,
477,
1697,
34431,
13,
11321,
13,
6404,
2667,
1330,
49706,
198,
6738,
599,
1590,
13,
1837,
2022,
10220,
1330,
6375,
4221,
198,
67... | 2.413741 | 2,649 |
#!/usr/bin/python3
'''
Check the given file for WOPI extended attributes
Author: Giuseppe.LoPresti@cern.ch
CERN IT/ST
'''
import sys, os, getopt, configparser, logging, jwt
storage = None
# usage function
def usage(exitcode):
'''Prints usage'''
print('Usage : ' + sys.argv[0] + ' [-h|--help] <filename>')
sys.e... | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
7061,
6,
198,
9787,
262,
1813,
2393,
329,
370,
3185,
40,
7083,
12608,
198,
198,
13838,
25,
8118,
1904,
27768,
13,
27654,
47,
2118,
72,
31,
30903,
13,
354,
198,
34,
28778,
7283,
14,
22... | 2.684373 | 1,299 |
import os
# Flask settings
FLASK_SERVER_NAME = os.environ.get('SERVER_NAME', 'localhost:8888')
FLASK_DEBUG = True # Do not use debug mode in production
# SQLAlchemy settings
SQLALCHEMY_DATABASE_URI = 'postgresql://readonly:readonly@data-next.obudget.org:5432/budgetkey'
SQLALCHEMY_TRACK_MODIFICATIONS = False
SQLALCHE... | [
11748,
28686,
198,
198,
2,
46947,
6460,
198,
3697,
1921,
42,
62,
35009,
5959,
62,
20608,
796,
28686,
13,
268,
2268,
13,
1136,
10786,
35009,
5959,
62,
20608,
3256,
705,
36750,
25,
3459,
3459,
11537,
198,
3697,
1921,
42,
62,
30531,
796,... | 2.77037 | 135 |
import argparse
import sys
from os import path
from time import time
import cv2 as cv
from cvtlib.drawing import Drawer
from cvtlib.files import list_files
from cvtlib.image import resize
IMAGE_EXT = ('.jpeg', '.jpg', '.png')
if __name__ == '__main__':
curr_dir = path.dirname(path.abspath(__file__))
paren... | [
11748,
1822,
29572,
198,
11748,
25064,
198,
6738,
28686,
1330,
3108,
198,
6738,
640,
1330,
640,
198,
198,
11748,
269,
85,
17,
355,
269,
85,
198,
6738,
269,
36540,
8019,
13,
19334,
278,
1330,
15315,
263,
198,
6738,
269,
36540,
8019,
13... | 2.354839 | 775 |
import csv
with open('C:\\gta5_console\\keys_data\\keys_data.csv', 'a', newline='') as csvfile:
fieldnames = ['position', 'data']
writer = csv.DictWriter(csvfile, fieldnames=fieldnames)
writer.writerow({'name': 'Baked', 'data': 'Beans'})
| [
11748,
269,
21370,
198,
198,
4480,
1280,
10786,
34,
25,
6852,
70,
8326,
20,
62,
41947,
6852,
13083,
62,
7890,
6852,
13083,
62,
7890,
13,
40664,
3256,
705,
64,
3256,
649,
1370,
28,
7061,
8,
355,
269,
21370,
7753,
25,
198,
220,
220,
... | 2.52 | 100 |
import discord
from discord.ext import commands
import asyncio
import os
import time
from utils.dataIO import dataIO, fileIO
class General:
"""General cogs for the bot."""
@commands.command(pass_context=True)
async def reminder(self, ctx, quantity: int, time_unit: str, *, text: str):
"""Gives you... | [
11748,
36446,
198,
6738,
36446,
13,
2302,
1330,
9729,
198,
11748,
30351,
952,
198,
11748,
28686,
198,
11748,
640,
198,
6738,
3384,
4487,
13,
7890,
9399,
1330,
1366,
9399,
11,
2393,
9399,
628,
198,
4871,
3611,
25,
198,
220,
220,
220,
3... | 2.327839 | 546 |
# -*- coding: utf-8 -*-
"""
CRF DU task core. Supports classical CRF and Typed CRF
Copyright Xerox(C) 2016, 2017 JL. Meunier
Developed for the EU project READ. The READ project has received funding
from the European Union๏ฟฝs Horizon 2020 research and innovation programme
under gr... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
198,
220,
220,
220,
8740,
37,
35480,
4876,
4755,
13,
45267,
15993,
8740,
37,
290,
17134,
276,
8740,
37,
198,
220,
220,
220,
220,
198,
220,
220,
220,
15069,... | 2.476675 | 1,179 |
import unittest
import warnings
import pygsti
from pygsti.modelpacks.legacy import std1Q_XYI as stdxyi
from pygsti.modelpacks.legacy import std1Q_XY as stdxy
from pygsti.objects import modelfunction as gsf
from pygsti.objects.mapforwardsim import MapForwardSimulator
from pygsti.objects import Label as L
import numpy a... | [
11748,
555,
715,
395,
198,
11748,
14601,
198,
11748,
12972,
70,
301,
72,
198,
6738,
12972,
70,
301,
72,
13,
19849,
32377,
13,
1455,
1590,
1330,
14367,
16,
48,
62,
34278,
40,
355,
14367,
5431,
72,
198,
6738,
12972,
70,
301,
72,
13,
... | 2.915663 | 166 |
# Generated by Django 3.1 on 2020-09-20 15:14
from django.db import migrations, models
import django.db.models.deletion
| [
2,
2980,
515,
416,
37770,
513,
13,
16,
319,
12131,
12,
2931,
12,
1238,
1315,
25,
1415,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
14208,
13,
9945,
13,
27530,
13,
2934,
1616,
295,
628
] | 2.904762 | 42 |
# -*- coding: utf-8 -*-
'''
@author: jeffzhengye
@contact: yezheng@scuec.edu.cn
@file: tensorboard_profile.py.py
@time: 2021/1/23 17:18
@desc:
'''
from datetime import datetime
from packaging import version
import os
import tensorflow as tf
print("TensorFlow version: ", tf.__version__)
d... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
7061,
6,
201,
198,
220,
2488,
9800,
25,
11223,
487,
89,
31753,
5948,
201,
198,
220,
2488,
32057,
25,
331,
8471,
31753,
31,
1416,
518,
66,
13,
15532,
13,
31522,
... | 2.115995 | 819 |
class StorageException(Exception):
"""Base class for all storage exceptions"""
class PathExistsException(StorageException):
"""The given path already exists"""
class StorageNotSupported(StorageException):
"""Storage type not supported"""
class InvalidStoragePath(StorageException):
"""Invalid storage... | [
198,
4871,
20514,
16922,
7,
16922,
2599,
198,
220,
220,
220,
37227,
14881,
1398,
329,
477,
6143,
13269,
37811,
198,
198,
4871,
10644,
3109,
1023,
16922,
7,
31425,
16922,
2599,
198,
220,
220,
220,
37227,
464,
1813,
3108,
1541,
7160,
3781... | 4.085366 | 82 |