content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import sys, os pykin_path = os.path.abspath(os.path.dirname(__file__)+"/../../" ) sys.path.append(pykin_path)
[ 11748, 25064, 11, 28686, 198, 9078, 5116, 62, 6978, 796, 28686, 13, 6978, 13, 397, 2777, 776, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 47762, 1, 14, 40720, 492, 30487, 1267, 198, 17597, 13, 6978, 13, 33295, 7, 9078, 5...
2.291667
48
var x = x < 0 ? -x: x var arr: [Int] = Array<Int>() var result = 0 while true { // 最后一位 let temp = x % 10 arr.append(temp) x = x / 10 if x == 0 { break } } for (index, value) in arr.e...
[ 220, 220, 220, 220, 220, 220, 220, 1401, 2124, 796, 2124, 1279, 657, 5633, 532, 87, 25, 2124, 198, 220, 220, 220, 220, 220, 220, 220, 1401, 5240, 25, 685, 5317, 60, 796, 15690, 27, 5317, 29, 3419, 198, 220, 220, 220, 220, 220, 2...
1.723464
358
# Copyright 2020 Google LLC and Stanford University # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # #     https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
[ 2, 220, 15069, 12131, 3012, 11419, 290, 13863, 2059, 198, 2, 198, 2, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, ...
3.523466
277
# -*- encode: utf-8 -*- from typing import List, Tuple, Callable import numpy as np from models import Aircraft, Airport, City, Time from settings import time_limit, time_limit, distance_to_weights # Phantom class if __name__ == '__main__': from data import cities airline = Airline(cities, time_limit, ...
[ 2, 532, 9, 12, 37773, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 19720, 1330, 7343, 11, 309, 29291, 11, 4889, 540, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 4981, 1330, 30767, 11, 12690, 11, 2254, 11, 3862, 198, 6738, ...
3.12844
109
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name='django_sourcerer', version='2.1', author='Cem Arslan, Kadir Kocak, Ugur Dogus Hamarat, Cagatay Em, Farid Murmadov, Burak Karaca', author_email="cmarslan06@gmail.com", description="Django ap...
[ 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, 2617, 37623, 10141, 13, 40406, 7, 198, 220, ...
2.334842
442
from __future__ import division import os import sys import time import threading import re import signal from ..runtime import min_version, runtime_info from ..profiler_scheduler import ProfilerScheduler from ..metric import Metric from ..metric import Breakdown from ..frame import Frame
[ 6738, 11593, 37443, 834, 1330, 7297, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 640, 198, 11748, 4704, 278, 198, 11748, 302, 198, 11748, 6737, 198, 198, 6738, 11485, 43282, 1330, 949, 62, 9641, 11, 19124, 62, 10951, 198, 673...
3.769231
78
#!/usr/bin/env python """ Generalised class: Displays data sources for a class """ import os import sys import lib_util import lib_common try: import lib_wbem wbemOk = True except ImportError: wbemOk = False import lib_wmi from lib_properties import pc # Now, adds the base classes of this one, at least one one le...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 198, 12218, 1417, 1398, 25, 3167, 26024, 1366, 4237, 329, 257, 1398, 198, 37811, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 9195, 62, 22602, 198, 11748, 9195, 62,...
3.309179
207
import websocket import threading import time import requests from bs4 import BeautifulSoup import pygame import pyperclip import settings new_id = -1 poe_trade_url = None if __name__ == "__main__": poe_trade_url_ini = input("Please enter your poe.trade URL: ") poe_trade_url_split = poe_trade_url_ini.split("...
[ 11748, 2639, 5459, 198, 11748, 4704, 278, 198, 11748, 640, 198, 11748, 7007, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 11748, 12972, 6057, 198, 11748, 12972, 525, 15036, 198, 198, 11748, 6460, 198, 198, 3605, 62, 312, 796, ...
2.126582
316
# -*- coding: utf-8 -*- # # Copyright 2021 Google LLC. 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 requir...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 1303, 198, 2, 15069, 33448, 3012, 11419, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198...
3.265728
1,065
""" Copyright 2020 InfAI (CC SES) 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...
[ 37811, 198, 220, 220, 15069, 12131, 4806, 20185, 357, 4093, 311, 1546, 8, 628, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 220, 220, 345, 743, 407, 779, 428, 2393, 2845, 287, 1...
2.883768
499
from boa3.builtin.interop.contract import GAS from boa3.builtin.type import UInt160
[ 6738, 1489, 64, 18, 13, 18780, 259, 13, 3849, 404, 13, 28484, 1330, 402, 1921, 198, 6738, 1489, 64, 18, 13, 18780, 259, 13, 4906, 1330, 471, 5317, 14198, 628 ]
2.833333
30
# -*- coding: utf-8 -*- """ Created on Fri Nov 14 18:53:38 2014 % TESTS : % Y = [ 0 1 0 2 1 0 ; 0 0 1 0 0.01 2 ]; ind_Y = [1 2 3 4 5 6]; % fY = [2 5 1 3 2 6]; % [QZ,RZ,xbase,scale] = bcdfo_build_QR_of_Y( Y, 0, 0, 1, 1, 1e15 ); % Z = QZ*RZ; % [ QZ, RZ, Y, xbase, scale ] = sqpdfo_swap_in_Y( 1, 3, QZ, RZ, Y, ind_Y,...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 198, 41972, 319, 19480, 5267, 1478, 1248, 25, 4310, 25, 2548, 1946, 198, 4, 309, 1546, 4694, 1058, 198, 198, 4, 220, 575, 796, 685, 657, 352, 657, 362, 3...
1.751302
1,536
# Generated by Django 2.0.6 on 2018-06-30 15:59 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 362, 13, 15, 13, 21, 319, 2864, 12, 3312, 12, 1270, 1315, 25, 3270, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
''' Filename: word_embeding.py Project: models File Created: Sunday, 2nd December 2018 2:38:45 pm Author: xiaofeng (sxf1052566766@163.com) -------------------------- Last Modified: Sunday, 2nd December 2018 2:39:14 pm Modified By: xiaofeng (sxf1052566766@163.com) --------------------------- : 2018.06 - 2018 . ''' imp...
[ 7061, 6, 198, 35063, 25, 1573, 62, 20521, 278, 13, 9078, 198, 16775, 25, 4981, 198, 8979, 15622, 25, 3502, 11, 362, 358, 3426, 2864, 362, 25, 2548, 25, 2231, 9114, 198, 13838, 25, 2124, 544, 1659, 1516, 357, 82, 26152, 13348, 1495, ...
2.854962
393
################################################################################ # # Originally based on http://djangosnippets.org/snippets/1016/ # with small modifications # ################################################################################ import re from django.contrib import admin from django.con...
[ 29113, 29113, 14468, 198, 2, 198, 2, 220, 220, 19486, 1912, 319, 2638, 1378, 28241, 648, 418, 77, 3974, 1039, 13, 2398, 14, 16184, 3974, 1039, 14, 27956, 14, 198, 2, 220, 220, 351, 1402, 19008, 198, 2, 198, 29113, 29113, 14468, 628,...
3.932886
149
# -*- coding: utf-8 -*- from django.conf import settings from cms.tests.base import CMSTestCase from cms.utils.plugins import get_placeholders from cms.exceptions import DuplicatePlaceholderWarning import sys import warnings
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 269, 907, 13, 41989, 13, 8692, 1330, 16477, 2257, 395, 20448, 198, 6738, 269, 907, 13, 26791, 13, 37390, 1330, 651,...
3.338235
68
#!/usr/bin/env python3 # -*- Coding: utf-8 -*- import subprocess from subprocess import PIPE
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 327, 7656, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 850, 14681, 198, 6738, 850, 14681, 1330, 350, 4061, 36, 198 ]
2.473684
38
#!/usr/bin/env python # -*- coding: utf-8 -*- from config import database from pymongo import MongoClient from mongoengine import *
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 4566, 1330, 6831, 198, 198, 6738, 279, 4948, 25162, 1330, 42591, 11792, 198, 6738, 285, 25162, 18392, 1330, ...
3
45
import glob folder = '/data03/shared/lehhou/lym_project/svs_tiles/TCGA-38-4629-01Z-00-DX1.d00cc280-5370-4b9f-9655-6c35deb94647.svs/'; outfile = folder + 'list.txt'; filevar = open(outfile, 'w'); filelist = []; for filename in glob.glob(folder + '/*.png'): name = filename[len(folder):-4]; filevar.write("%s\n...
[ 11748, 15095, 628, 198, 43551, 796, 31051, 7890, 3070, 14, 28710, 14, 293, 12337, 280, 14, 306, 76, 62, 16302, 14, 82, 14259, 62, 83, 2915, 14, 4825, 9273, 12, 2548, 12, 3510, 1959, 12, 486, 57, 12, 405, 12, 36227, 16, 13, 67, 4...
2.22293
157
import pytube from bs4 import BeautifulSoup import urllib.request import threading from collections.abc import Sequence from spotdl.metadata import StreamsBase from spotdl.metadata import ProviderBase from spotdl.metadata.exceptions import YouTubeMetadataNotFoundError import spotdl.util import spotdl.patch spotdl.p...
[ 11748, 12972, 29302, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 198, 11748, 2956, 297, 571, 13, 25927, 198, 11748, 4704, 278, 198, 6738, 17268, 13, 39305, 1330, 45835, 198, 198, 6738, 4136, 25404, 13, 38993, 1330, 13860, 82, ...
3.089286
168
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2018, WSO2 Inc. (http://wso2.org) All Rights Reserved. # # WSO2 Inc. licenses this file to you 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 ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 357, 66, 8, 2864, 11, 370, 15821, 17, 3457, 13, 357, 4023, 1378, 86, 568, 17, 13, 2398, 8, 1439, 6923, ...
3.488889
360
# -*- coding: utf-8 -*- from openerp import tools from openerp import models,fields,api from openerp.tools.translate import _ import datetime import pytz
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 201, 198, 6738, 21996, 79, 1330, 4899, 201, 198, 6738, 21996, 79, 1330, 4981, 11, 25747, 11, 15042, 201, 198, 6738, 21996, 79, 13, 31391, 13, 7645, 17660, 1330, 4...
2.615385
65
BASIC_AUTH = "basic" DIGEST_AUTH = "digest" OAUTH1 = "oauth1" BEARER_AUTH = "bearer" PASSWORD_PLACEHOLDER = '*' * 16 CONNECT_TIMEOUT = 60 # If any remote service does not respond within 5 minutes, time out. # (Some OpenMRS reports can take a long time. Cut them a little slack, # but not too much.) READ_TIMEOUT = 5 * ...
[ 33, 1921, 2149, 62, 32, 24318, 796, 366, 35487, 1, 198, 35, 3528, 6465, 62, 32, 24318, 796, 366, 12894, 395, 1, 198, 23621, 24318, 16, 796, 366, 12162, 1071, 16, 1, 198, 12473, 1503, 1137, 62, 32, 24318, 796, 366, 1350, 11258, 1, ...
2.254826
518
from random import randint numeros = (randint(1, 10), randint(1, 10), randint(1, 10), randint(1, 10), randint(1, 10)) print('os numeros sorteados são: ', end='') for n in numeros: print(f'{n}', end=' ') print(f'\no maior numero foi {max(numeros)}') print(f'O menor numero foi {min(numeros)}')
[ 6738, 4738, 1330, 43720, 600, 198, 77, 6975, 418, 796, 357, 25192, 600, 7, 16, 11, 838, 828, 43720, 600, 7, 16, 11, 838, 828, 43720, 600, 7, 16, 11, 838, 828, 43720, 600, 7, 16, 11, 838, 828, 43720, 600, 7, 16, 11, 838, 4008, ...
2.325581
129
import numpy as np import pandas as pd import scrape_data import csv team_data = pd.read_csv('data/cbb19.csv') team_data = team_data.drop(columns=['POSTSEASON', 'SEED']) t = list(team_data['TEAM']) all_games = scrape_data.all_games winners = scrape_data.winners name_mappings = {'UNC': 'North Carolina', 'Cita...
[ 11748, 299, 32152, 355, 45941, 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 11748, 42778, 62, 7890, 201, 198, 11748, 269, 21370, 201, 198, 201, 198, 15097, 62, 7890, 796, 279, 67, 13, 961, 62, 40664, 10786, 7890, 14, 66, 118...
2.003873
2,324
import datetime, pytz def getEventStartEnd(event): '''returns start time & end time as datetime objects from an event struct''' start_string = event['start'].get('dateTime',event['start'].get('date')) start_time = str2time(start_string) end_string = event['end'].get('dateTime',0) ...
[ 11748, 4818, 8079, 11, 12972, 22877, 198, 220, 220, 220, 220, 198, 198, 4299, 651, 9237, 10434, 12915, 7, 15596, 2599, 198, 220, 220, 220, 705, 7061, 7783, 82, 923, 640, 1222, 886, 640, 355, 4818, 8079, 5563, 422, 281, 1785, 2878, 7...
2.428369
2,827
# Generated by Django 4.0.2 on 2022-02-19 16:35 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 604, 13, 15, 13, 17, 319, 33160, 12, 2999, 12, 1129, 1467, 25, 2327, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
# coding: mixt from mixt import Element, NotProvided, Required, html from mixt.contrib.css import css_vars from ... import datatypes from ..doc import DocPart, DocHeader from ..generic import Details from . import Code, DocString, NamedValue, UnnamedValue </Details> </if> </Do...
[ 2, 19617, 25, 285, 6346, 198, 198, 6738, 285, 6346, 1330, 11703, 11, 1892, 15946, 1384, 11, 20906, 11, 27711, 198, 6738, 285, 6346, 13, 3642, 822, 13, 25471, 1330, 269, 824, 62, 85, 945, 198, 198, 6738, 2644, 1330, 4818, 265, 9497, ...
2.637097
124
from math import sqrt, ceil if __name__ == "__main__": from aocd import get_data data = get_data(year=2021, day=17) print(part1(data)) print(part2(data))
[ 6738, 10688, 1330, 19862, 17034, 11, 2906, 346, 628, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 422, 257, 420, 67, 1330, 651, 62, 7890, 628, 220, 220, 220, 1366, 796, 651, 62, ...
2.324675
77
# Generated by Django 2.2.6 on 2020-11-14 23:01 from django.conf import settings from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 21, 319, 12131, 12, 1157, 12, 1415, 2242, 25, 486, 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
from __future__ import unicode_literals import sys import logging from datetime import datetime from framework.mongo import database from website.app import init_app from scripts import utils as script_utils from framework.transactions.context import TokuTransaction logger = logging.getLogger(__name__) # 2015 Sept 1...
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 11748, 25064, 198, 11748, 18931, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 9355, 13, 76, 25162, 1330, 6831, 198, 6738, 3052, 13, 1324, 1330, 2315, 62, 1324, 198,...
2.648045
358
import json import trustlab.lab.config as config import time from trustlab.consumers.chunk_consumer import ChunkAsyncJsonWebsocketConsumer from trustlab.models import * from trustlab.serializers.scenario_serializer import ScenarioSerializer from trustlab.lab.director import Director class LabConsumer(ChunkAsyncJsonWe...
[ 11748, 33918, 198, 11748, 3774, 23912, 13, 23912, 13, 11250, 355, 4566, 198, 11748, 640, 198, 6738, 3774, 23912, 13, 5936, 31260, 13, 354, 2954, 62, 49827, 1330, 609, 2954, 42367, 41, 1559, 1135, 1443, 5459, 49106, 198, 6738, 3774, 2391...
3.737589
141
from telegapi.reqs import reqs as reqs from telegapi.telapi import telapi
[ 6738, 573, 1455, 15042, 13, 42180, 82, 1330, 43089, 82, 355, 43089, 82, 198, 6738, 573, 1455, 15042, 13, 37524, 15042, 1330, 13632, 15042, 198 ]
2.96
25
import bilby import numpy as np from bilby.core.likelihood import ( AnalyticalMultidimensionalBimodalCovariantGaussian, AnalyticalMultidimensionalCovariantGaussian, ) logger = bilby.core.utils.logger cov = [ [ 0.045991865933182365, -0.005489748382557155, -0.01025067223674548, ...
[ 11748, 47027, 1525, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 47027, 1525, 13, 7295, 13, 2339, 11935, 1330, 357, 198, 220, 220, 220, 16213, 22869, 15205, 312, 16198, 33, 320, 375, 282, 34, 709, 2743, 415, 35389, 31562, 11, 198, 2...
1.786332
6,014
import re
[ 11748, 302, 628, 198 ]
3
4
from datetime import timedelta import logging from homeassistant.core import callback from homeassistant.components.sensor import SensorEntity from homeassistant.helpers.entity import DeviceInfo from homeassistant.helpers.update_coordinator import ( DataUpdateCoordinator, ) from homeassistant.const import ( CO...
[ 6738, 4818, 8079, 1330, 28805, 12514, 198, 11748, 18931, 198, 198, 6738, 1363, 562, 10167, 13, 7295, 1330, 23838, 198, 6738, 1363, 562, 10167, 13, 5589, 3906, 13, 82, 22854, 1330, 35367, 32398, 198, 6738, 1363, 562, 10167, 13, 16794, 36...
2.732057
209
# coding: utf-8 from __future__ import unicode_literals import pytest @pytest.mark.parametrize('text', ["ca.", "m.a.o.", "Jan.", "Dec."])
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 12972, 9288, 198, 198, 31, 9078, 9288, 13, 4102, 13, 17143, 316, 380, 2736, 10786, 5239, 3256, 14631, 6888, 33283, 366, ...
2.5
56
'''This is my first class in python''' p1 = Product() p1.display() # print(p1.name) # print(p1.description) # print(p1.price) p2 = Product() p2.display() # print(p2.name) # print(p2.description) # print(p2.price)
[ 7061, 6, 1212, 318, 616, 717, 1398, 287, 21015, 7061, 6, 198, 198, 79, 16, 796, 8721, 3419, 198, 79, 16, 13, 13812, 3419, 198, 198, 2, 3601, 7, 79, 16, 13, 3672, 8, 198, 2, 3601, 7, 79, 16, 13, 11213, 8, 198, 2, 3601, 7, 7...
2.347826
92
# Dungeon Crawler import asciiart import level1 import level2 import time # timer import hero #def test(): # print(asciiart.baby_dragon()) # print(asciiart.big_skull()) # print(asciiart.dragon()) # print(asciiart.samurai()) # print(asciiart.skull_cross()) # print(asciiart.warrior()) # print(as...
[ 2, 11995, 20177, 1754, 198, 198, 11748, 355, 979, 72, 433, 198, 11748, 1241, 16, 198, 11748, 1241, 17, 198, 11748, 640, 220, 220, 1303, 19781, 198, 11748, 4293, 628, 198, 2, 4299, 1332, 33529, 198, 2, 220, 220, 220, 3601, 7, 292, ...
2.343023
172
from distutils.core import setup setup( name='mepfinder', version='0.1', packages=['mepfinder'], url='', license='MIT', author='Theodros Zelleke', author_email='', description='' )
[ 6738, 1233, 26791, 13, 7295, 1330, 9058, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 76, 538, 22805, 3256, 198, 220, 220, 220, 2196, 11639, 15, 13, 16, 3256, 198, 220, 220, 220, 10392, 28, 17816, 76, 538, 22805, 6, 4357, ...
2.377778
90
# Importing the libraries import numpy as np import matplotlib.pyplot as plt import pandas as pd # Importing the dataset dataset = pd.read_csv('pokemonchg.csv') X = dataset.iloc[:, [19,20,21,22,23,25,28,35]].values y = dataset.iloc[:, 40].values # Splitting the dataset into the Training set and Test set ...
[ 201, 198, 2, 17267, 278, 262, 12782, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 201, 198, 2, 17267, 278, 262, 2703...
2.811547
1,836
######################################################################## ################# Importing packages ####################### ######################################################################## from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_login import LoginManager ...
[ 29113, 29113, 7804, 198, 14468, 2, 220, 220, 220, 220, 220, 220, 220, 17267, 278, 10392, 220, 220, 220, 220, 220, 1303, 14468, 4242, 2235, 198, 29113, 29113, 7804, 198, 6738, 42903, 1330, 46947, 198, 6738, 42903, 62, 25410, 282, 26599, ...
5.184211
76
# Copyright (c) 2021 PaddlePaddle Authors. 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 appli...
[ 2, 15069, 357, 66, 8, 33448, 350, 37382, 47, 37382, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845...
3.290698
258
################################################## # Copyright (c) INRIA (France) 2011, 2012, 2013 # # This file is part of inria-mvs. You can redistribute it and/or # modify it under the terms of the GNU General Public License. # # This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE # WARRANTY OF...
[ 29113, 14468, 2235, 198, 2, 15069, 357, 66, 8, 3268, 49, 3539, 357, 28572, 8, 2813, 11, 2321, 11, 2211, 198, 2, 220, 198, 2, 770, 2393, 318, 636, 286, 287, 7496, 12, 76, 14259, 13, 921, 460, 17678, 4163, 340, 290, 14, 273, 198, ...
1.830541
9,371
# Managed by bumpversion __version__ = "1.33.0"
[ 2, 1869, 1886, 416, 13852, 9641, 198, 834, 9641, 834, 796, 366, 16, 13, 2091, 13, 15, 1, 198 ]
2.526316
19
import numpy as np inputs = [[1.0, 2.0, 3.0, 2.5], [2.0, 5.0, -1.0, 2.0], [-1.5, 2.7, 3.3, -0.8]] weights = [[0.2, 0.8, -0.5, 1.0], [0.5, -0.91, 0.26, -0.5], [-0.26, -0.27, 0.17, 0.87]] biases = [2.0, 3.0, 0.5] outputs = np.dot(inputs, np.array(weights).T) + biases print(out...
[ 11748, 299, 32152, 355, 45941, 198, 198, 15414, 82, 796, 16410, 16, 13, 15, 11, 362, 13, 15, 11, 513, 13, 15, 11, 362, 13, 20, 4357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 685, 17, 13, 15, 11, 642, 13, 15, 11, 532...
1.604082
245
from datetime import datetime, timedelta import os import tempfile import torch import logging log = logging.getLogger(__name__) __all__ = ["FlexibleModelCheckpoint"] """ Copied from https://github.com/pytorch/ignite/blob/v0.2.1/ignite/handlers/checkpoint.py due to the change in ignite v0.3.0 """ class ModelChec...
[ 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 11748, 28686, 198, 11748, 20218, 7753, 198, 198, 11748, 28034, 198, 198, 11748, 18931, 198, 198, 6404, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 198, 198, 834, ...
2.690306
1,537
lista = [1, 2, 3] try: numero = int(input(f'Digite um número entre 0 e {len(lista)-1}: ')) print(lista[numero]) except ValueError: print('Não foi digitado um número') except IndexError: print('O número digitado está fora da faixa aceita') #https://pt.stackoverflow.com/q/451936/101
[ 4868, 64, 796, 685, 16, 11, 362, 11, 513, 60, 198, 28311, 25, 198, 220, 220, 220, 997, 3529, 796, 493, 7, 15414, 7, 69, 6, 19511, 578, 23781, 299, 21356, 647, 78, 920, 260, 657, 304, 1391, 11925, 7, 4868, 64, 13219, 16, 38362, ...
2.238806
134
from urllib import response from django.http import HttpResponse,HttpResponseForbidden, HttpResponseRedirect from teproj.models import TestModel from django.urls import reverse from django.conf import settings from django.core.cache import cache from django.contrib.auth.models import Group
[ 6738, 2956, 297, 571, 1330, 2882, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 11, 43481, 31077, 1890, 37978, 11, 367, 29281, 31077, 7738, 1060, 198, 6738, 256, 538, 305, 73, 13, 27530, 1330, 6208, 17633, 198, 6738, 42625...
3.301075
93
#!/usr/bin/env python3 # # Licensed under BSD 2-Clause License. # # This is a really crude script. This spits out shell-escaped wget # commands to download the images of the chapters. # # Each image is downloaded into "VOLUME_CHAPTER/XXX.png" where VOLUME # and CHAPTER are the volume and chapter names respectively. I...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 198, 2, 49962, 739, 347, 10305, 362, 12, 2601, 682, 13789, 13, 198, 2, 198, 2, 770, 318, 257, 1107, 14897, 4226, 13, 220, 770, 599, 896, 503, 7582, 12, 3798, 5813, 266, 11...
2.309022
2,372
from dataclasses import dataclass from bindings.gmd.abstract_crstype import AbstractCoordinateOperationType __NAMESPACE__ = "http://www.opengis.net/gml" @dataclass
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 34111, 13, 70, 9132, 13, 397, 8709, 62, 6098, 301, 2981, 1330, 27741, 7222, 45480, 32180, 6030, 198, 198, 834, 45, 29559, 47, 11598, 834, 796, 366, 4023, 1378, 2503, 13, 404, ...
2.929825
57
from .Bassin import Bassin
[ 6738, 764, 33, 44961, 1330, 19829, 259 ]
3.714286
7
# -*- coding: utf-8 -*- # Global variables _HEADER = {"Content-Type": "application/json"} _PAYLOAD = {"stmt": None}
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 8060, 9633, 198, 62, 37682, 1137, 796, 19779, 19746, 12, 6030, 1298, 366, 31438, 14, 17752, 20662, 198, 62, 4537, 56, 35613, 796, 19779, 301, 16762, 1298, 6045, ...
2.543478
46
from django.contrib.auth.models import User from django.shortcuts import render, redirect from zero_ilumi_agenda_core.models import Evento_Agendado from django.contrib.auth.decorators import login_required from django.contrib.auth import authenticate, login, logout from django.contrib import messages from datetime impo...
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 18941, 198, 6738, 6632, 62, 346, 12994, 62, 363, 7438, 62, 7295, 13, 27530, 1330, 8558, 78, 62, 10262, 43...
3.086364
220
""" Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. SPDX-License-Identifier: Apache-2.0 OR MIT """ """ C13767841 - All Gradient Modifier nodes can be added to a graph C18055051 - All Gradient Modifier nodes can...
[ 37811, 198, 15269, 357, 66, 8, 25767, 669, 284, 262, 4946, 513, 35, 7117, 4935, 13, 1114, 1844, 6634, 290, 5964, 2846, 3387, 766, 262, 38559, 24290, 379, 262, 6808, 286, 428, 6082, 13, 198, 198, 4303, 36227, 12, 34156, 12, 33234, 74...
3.145907
281
from setuptools import setup from torch.utils.cpp_extension import CUDAExtension, BuildExtension from pathlib import Path # Usage: # python setup.py install (or python setup.py bdist_wheel) # NB: Windows: run from VS2017 x64 Native Tool Command Prompt rootdir = (Path(__file__).parent / '..' / 'op').resolve() setup( ...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 6738, 28034, 13, 26791, 13, 20322, 62, 2302, 3004, 1330, 29369, 5631, 11627, 3004, 11, 10934, 11627, 3004, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 2, 29566, 25, 198, 2, 21015, 9058, 13, ...
2.227778
360
import requests from bs4 import BeautifulSoup import sys import datetime mainPageUrl = 'https://pcgames-download.com/' mainFilePath = './loading/mainPage.html' pagePath = './loading/' def loadGameData(): "Loads computer games data" print ('Loading number of pages') response = requests.get(mainPageUrl) with open(m...
[ 11748, 7007, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 11748, 25064, 198, 11748, 4818, 8079, 198, 198, 12417, 9876, 28165, 796, 705, 5450, 1378, 14751, 19966, 12, 15002, 13, 785, 14, 6, 198, 12417, 8979, 15235, 796, 705, 19...
2.918689
824
import sys import os from scipy import stats import tenseal as ts import numpy as np from scipy.stats import t sys.path.append(os.path.abspath('../../tensealstat')) from tensealstat.tools_context import ToolsContext as tc from tensealstat.algebra.algebra_numpy import AlgebraNumpy from tensealstat.algebra.algebra_tens...
[ 11748, 25064, 198, 11748, 28686, 198, 6738, 629, 541, 88, 1330, 9756, 198, 11748, 20170, 282, 355, 40379, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 34242, 1330, 256, 198, 198, 17597, 13, 6978, 13, 33295, 7, 418,...
2.727763
742
import os from django.db import models from django.contrib.auth.models import User from easy_thumbnails.fields import ThumbnailerImageField import uuid
[ 11748, 28686, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 2562, 62, 18670, 13, 25747, 1330, 536, 20566, 263, 5159, 15878, 198, 198, 11748, 334, 271...
3.413043
46
""" @author: magician @file: confirm_subclass.py @date: 2020/1/14 """ class Meta(type): """ Meta """ class MyClass(object, metaclass=Meta): """ MyClass """ stuff = 3 class ValidatePolygon(type): """ ValidatePolygon """ def __new__(meta, name, bases, class_dict): ...
[ 37811, 198, 31, 9800, 25, 42055, 198, 31, 7753, 25, 220, 220, 6216, 62, 7266, 4871, 13, 9078, 198, 31, 4475, 25, 220, 220, 12131, 14, 16, 14, 1415, 198, 37811, 628, 198, 4871, 30277, 7, 4906, 2599, 198, 220, 220, 220, 37227, 198, ...
2.131627
547
import FWCore.ParameterSet.Config as cms XMLIdealGeometryESSource = cms.ESSource("XMLIdealGeometryESSource", geomXMLFiles = cms.vstring( 'Geometry/CMSCommonData/data/materials/2021/v3/materials.xml', 'Geometry/CMSCommonData/data/rotations.xml', 'Geometry/CMSCommonData/data/extend/v3/cmsexte...
[ 11748, 48849, 14055, 13, 36301, 7248, 13, 16934, 355, 269, 907, 198, 198, 55, 5805, 7390, 2287, 10082, 15748, 1546, 7416, 796, 269, 907, 13, 1546, 7416, 7203, 55, 5805, 7390, 2287, 10082, 15748, 1546, 7416, 1600, 198, 220, 220, 220, 4...
2.137963
1,080
""" MIT License Copyright (c) 2021 TheHamkerCat Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, ...
[ 37811, 198, 36393, 13789, 198, 198, 15269, 357, 66, 8, 33448, 383, 21281, 6122, 21979, 198, 198, 5990, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 1659, 428, 3788, 290, 3917, 10314, 3696, 35...
3.398747
479
# -*- coding: utf-8 -*- """ @author: nicolas.posocco """ from sklearn.calibration import calibration_curve import numpy as np
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 31, 9800, 25, 9200, 12456, 13, 1930, 420, 1073, 198, 37811, 198, 198, 6738, 1341, 35720, 13, 9948, 571, 1358, 1330, 36537, 62, 22019, 303, 198, 11748, 299, ...
2.666667
48
# coding: utf-8 # # File name "sac" means "SHCNE_ASSOCCHANGED" used at 4xc5k9H. # from __future__ import absolute_import import sys #/ if __name__ == '__main__': sys.exit(main())
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 198, 2, 9220, 1438, 366, 30584, 1, 1724, 366, 9693, 34, 12161, 62, 10705, 4503, 3398, 15567, 1961, 1, 973, 379, 604, 25306, 20, 74, 24, 39, 13, 198, 2, 198, 6738, 11593, 37443, 834, 1330, ...
2.367089
79
import Grabber gauge_grabber = Grabber.grabb_serial_values() gauge_grabber.init() gauge_grabber.grabb(10) gauge_grabber.convert_grabbed_to_numpy() gauge_grabber.plot_grabbed_data() gauge_grabber.clean_numpy_dict() gauge_grabber.save_cleaned_dict_numpy('test_saving') gauge_grabber.save_cleaned_dict_numpy_csv('test_sav...
[ 11748, 25339, 527, 198, 198, 70, 559, 469, 62, 32393, 527, 796, 25339, 527, 13, 2164, 6485, 62, 46911, 62, 27160, 3419, 198, 198, 70, 559, 469, 62, 32393, 527, 13, 15003, 3419, 198, 70, 559, 469, 62, 32393, 527, 13, 2164, 6485, 7,...
2.295775
142
# Copyright (c) 2014, Tomohiro Kusumi # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this # list of conditions and...
[ 2, 15069, 357, 66, 8, 1946, 11, 4186, 1219, 7058, 49320, 12994, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 393, 1231, 198, 2, 17613, 11, 389, 10431, 2810, 326, ...
2.562766
940
import sublime, sublime_plugin import sys import re import os
[ 11748, 41674, 11, 41674, 62, 33803, 198, 198, 11748, 25064, 198, 11748, 302, 198, 11748, 28686 ]
3.875
16
#!/usr/bin/env python3 import argparse from glob import glob from skimage import exposure from PIL import Image import colour import numpy as np import pandas as pd import os from colour_demosaicing import ( demosaicing_CFA_Bayer_bilinear, demosaicing_CFA_Bayer_Malvar2004, demosaicing_CFA_Bayer_Menon2007,...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 1822, 29572, 198, 6738, 15095, 1330, 15095, 198, 6738, 1341, 9060, 1330, 7111, 198, 6738, 350, 4146, 1330, 7412, 198, 11748, 9568, 198, 11748, 299, 32152, 355, 45941, 198...
2.135086
1,636
# Generated by Django 2.1.7 on 2020-10-22 12:55 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone
[ 2, 2980, 515, 416, 37770, 362, 13, 16, 13, 22, 319, 12131, 12, 940, 12, 1828, 1105, 25, 2816, 628, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 142...
3.065574
61
# coding=utf-8 # Copyright 2015 Brave Labs sp. z o.o. # All rights reserved. # # This source code and all resulting intermediate files are CONFIDENTIAL and # PROPRIETY TRADE SECRETS of Brave Labs sp. z o.o. # Use is subject to license terms. See NOTICE file of this project for details. import json import logging from s...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 1853, 22813, 23500, 599, 13, 1976, 267, 13, 78, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 770, 2723, 2438, 290, 477, 7186, 19898, 3696, 389, 7102, 37, 25256, 12576, 290, 198, ...
2.641791
1,005
import random import matplotlib.pyplot as plt from setting import * from field import Field from qvalue import Hunter if __name__ == "__main__": h0 = Hunter(0) h1 = Hunter(1) epi_itern_l = [] for i in range(EPISODE_N): f = Field() itern = 0 while True: fin = qle...
[ 11748, 4738, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 628, 198, 6738, 4634, 1330, 1635, 198, 6738, 2214, 1330, 7663, 198, 6738, 10662, 8367, 1330, 9055, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, ...
1.974522
314
import multiprocessing as mp import time import torch.distributed from rlpyt.runners.minibatch_rl import MinibatchRl from rlpyt.runners.minibatch_rl_eval import MinibatchRlEval from rlpyt.utils.seed import make_seed from rlpyt.utils.collections import AttrDict from rlpyt.utils.quick_args import save__init__args ###...
[ 198, 11748, 18540, 305, 919, 278, 355, 29034, 198, 11748, 640, 198, 11748, 28034, 13, 17080, 6169, 198, 198, 6738, 374, 75, 9078, 83, 13, 36740, 13, 1084, 571, 963, 62, 45895, 1330, 1855, 571, 963, 49, 75, 198, 6738, 374, 75, 9078, ...
4.447368
152
# Copyright 2018 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import os from dataclasses import dataclass from textwrap import dedent from typing import Optional, Tuple from pants.backend.python.rules.pex import Pex from pants.backend.python.rules.p...
[ 2, 15069, 2864, 41689, 1628, 20420, 357, 3826, 27342, 9865, 3843, 20673, 13, 9132, 737, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 3826, 38559, 24290, 737, 198, 198, 11748, 28686, 198, 6738, 4818, 330, 28958, ...
3.3343
1,035
from sciencebeam_utils.utils.string import ( parse_list )
[ 6738, 3783, 40045, 62, 26791, 13, 26791, 13, 8841, 1330, 357, 198, 220, 220, 220, 21136, 62, 4868, 198, 8, 628 ]
3
21
# coding: utf-8 -*- # TITLE / SUBTITLE / AUTHOR # The title, subtitle, and author of the blog TITLE = "Misa Montes" SUBTITLE = "blog" AUTHOR = "Misa" METADATA_TAGS = ['title', 'author'] # POSTS_PER_PAGE # The number of posts that will appear on each page of index.html POSTS_PER_PAGE = 3 # SUMMARY_DELIMITOR # Used to ...
[ 2, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 37977, 2538, 1220, 28932, 49560, 2538, 1220, 44746, 198, 2, 383, 3670, 11, 37960, 11, 290, 1772, 286, 262, 4130, 198, 49560, 2538, 796, 366, 44, 9160, 5575, 274, 1, 198, 50, 10...
2.928315
279
''' Description: Problem 2 (rearrange the code) Version: 1.0.2.20210118 Author: Arvin Zhao Date: 2021-01-14 22:35:43 Last Editors: Arvin Zhao LastEditTime: 2021-01-18 18:11:03 ''' line = input('Enter a string: ') i = 0 is_palindrome = True while i < len(line) / 2 and is_palindrome: if line[i] != line[len(line) - ...
[ 7061, 6, 198, 11828, 25, 20647, 362, 357, 260, 3258, 858, 262, 2438, 8, 198, 14815, 25, 352, 13, 15, 13, 17, 13, 1238, 2481, 486, 1507, 198, 13838, 25, 943, 7114, 29436, 198, 10430, 25, 33448, 12, 486, 12, 1415, 2534, 25, 2327, ...
2.292793
222
""" name - jméno pozition - pozice (x, y) can_train - čísla pro trening jednotky (integer) - pokud je má jednotka alespoň jedno z těchto čísel může budova trénovat tuto jednotku (čím víc společných čísel tím kratší doba tréningu...
[ 37811, 198, 220, 220, 220, 1438, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 532, 474, 76, 2634, 3919, 198, 220, 220, 220, 745, 89, 653, 220, 220, 220, 220, 220, 220, 220, 532, 745, 89, 501, 220, 220, 220, 220, 220, ...
1.571429
518
## ## Demonstrate some of the operations of the Deck and Card classes ## import cards # Seed the random number generator to a specific value so every execution # of the program uses the same sequence of random numbers (for testing). import random random.seed( 100 ) # Create a deck of cards my_deck = cards.Deck() ...
[ 2235, 198, 2235, 7814, 23104, 617, 286, 262, 4560, 286, 262, 20961, 290, 5172, 6097, 198, 2235, 198, 198, 11748, 4116, 198, 198, 2, 23262, 262, 4738, 1271, 17301, 284, 257, 2176, 1988, 523, 790, 9706, 198, 2, 286, 262, 1430, 3544, 2...
3.122699
326
from __future__ import absolute_import import os import socket from ur_online_control.ur_direct.mixins.airpick_mixins import AirpickMixins __all__ = [ 'URCommandScript' ] class URCommandScript(AirpickMixins): """Class containing commands for the UR Robot system""" def start(self): """To build the...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 11748, 28686, 198, 11748, 17802, 198, 6738, 2956, 62, 25119, 62, 13716, 13, 333, 62, 12942, 13, 19816, 1040, 13, 958, 27729, 62, 19816, 1040, 1330, 3701, 27729, 35608, 1040, 198, 198,...
2.15856
1,583
import os import contextlib filepath = os.path.dirname(os.path.abspath(__file__)) def remove_installed_data_files(): """ Removes some of the files that are downloaded during install. Args: None Returns: None """ # remove the GO file with contextlib.suppress(FileNotFound...
[ 11748, 28686, 198, 11748, 4732, 8019, 198, 198, 7753, 6978, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 397, 2777, 776, 7, 834, 7753, 834, 4008, 628, 198, 4299, 4781, 62, 37050, 62, 7890, 62, 16624, 33529, 198, 220,...
2.567033
455
# if aaa: # ... elif bbb: # ... #
[ 2, 198, 361, 257, 7252, 25, 198, 220, 220, 220, 1303, 2644, 198, 417, 361, 275, 11848, 25, 198, 220, 220, 220, 1303, 2644, 198, 2, 198 ]
1.555556
27
""" Copyright (c) Microsoft Corporation. Licensed under the MIT license. HERO for Video Question Answering Tasks, shared by: 1. TVQA 2. How2QA 3. VLEP 4. VIOLIN copied/modified from HERO (https://github.com/linjieli222/HERO) """ from collections import defaultdict import copy import torch from torch import nn from t...
[ 37811, 198, 15269, 357, 66, 8, 5413, 10501, 13, 198, 26656, 15385, 739, 262, 17168, 5964, 13, 198, 198, 16879, 46, 329, 7623, 18233, 1052, 2032, 1586, 309, 6791, 11, 4888, 416, 25, 198, 16, 13, 3195, 48, 32, 198, 17, 13, 1374, 17,...
3.176056
142
import logging from channels.test import ChannelTestCase, WSClient from .game_logic import add_player_to_game from .models import Player, Game, CardGamePlayer, Card LOGGER = logging.getLogger("cardgame_channels_app")
[ 11748, 18931, 198, 198, 6738, 9619, 13, 9288, 1330, 11102, 14402, 20448, 11, 25290, 11792, 198, 198, 6738, 764, 6057, 62, 6404, 291, 1330, 751, 62, 7829, 62, 1462, 62, 6057, 198, 6738, 764, 27530, 1330, 7853, 11, 3776, 11, 5172, 8777,...
3.363636
66
# pyt_utilities.py (python3) # utilities for CNN training with pytorch; data preparation, training, evaluation # added saving checkpoint # FEB 2020 / 21 # sources: # https://pytorch.org/tutorials/beginner/transfer_learning_tutorial.html#load-data # https://pytorch.org/tutorials/beginner/finetuning_torchvision_models_t...
[ 2, 12972, 83, 62, 315, 2410, 13, 9078, 357, 29412, 18, 8, 198, 2, 20081, 329, 8100, 3047, 351, 12972, 13165, 354, 26, 220, 1366, 11824, 11, 3047, 11, 12660, 198, 2, 2087, 8914, 26954, 198, 2, 18630, 33, 12131, 1220, 2310, 198, 2, ...
2.838411
1,510
import mysql.connector import yaml from os import path, listdir import shutil import datetime db_connection = mysql.connector.connect( host="localhost", port=3308, user="root", passwd="", database="ipldata" ) # Global Variable player_data = {} # Query Team details by name # Add new player to DB. # Get Pl...
[ 11748, 48761, 13, 8443, 273, 198, 11748, 331, 43695, 198, 6738, 28686, 1330, 3108, 11, 1351, 15908, 198, 11748, 4423, 346, 198, 11748, 4818, 8079, 198, 198, 9945, 62, 38659, 796, 48761, 13, 8443, 273, 13, 8443, 7, 198, 220, 2583, 2625...
2.908197
305
# # # # # # #$Id: groParser.py,v 1.11 2006/12/15 19:53:29 annao Exp $ # """ Module Gromacs Parser. """ import os,types from MolKit.moleculeParser import MoleculeParser from MolKit.protein import Protein, Chain, ChainSet, Residue, ResidueSet, ProteinSet from MolKit.molecule import Atom, AtomSet, Bond, BondSet, H...
[ 2, 198, 2, 198, 2, 198, 2, 198, 2, 198, 2, 198, 29953, 7390, 25, 7128, 46677, 13, 9078, 11, 85, 352, 13, 1157, 4793, 14, 1065, 14, 1314, 678, 25, 4310, 25, 1959, 1529, 5488, 5518, 720, 198, 2, 220, 198, 198, 37811, 198, 26796,...
2.591549
213
# Copyright 2012-2013 Eric Ptak - trouch.com # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
[ 2, 220, 220, 15069, 2321, 12, 6390, 7651, 34352, 461, 532, 4057, 354, 13, 785, 198, 2, 198, 2, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 220, 345, 743, 407, 779, ...
2.735294
408
import datetime from clover.common import get_system_info from clover.common import friendly_datetime from clover.report.service import ReportService
[ 198, 11748, 4818, 8079, 198, 198, 6738, 537, 2502, 13, 11321, 1330, 651, 62, 10057, 62, 10951, 198, 6738, 537, 2502, 13, 11321, 1330, 8030, 62, 19608, 8079, 198, 6738, 537, 2502, 13, 13116, 13, 15271, 1330, 6358, 16177, 628 ]
3.825
40
class asyncGwEvent(object): """Basic async event.""" class asyncClEvent(object): """Basic async event."""
[ 198, 4871, 30351, 38, 86, 9237, 7, 15252, 2599, 198, 220, 220, 220, 37227, 26416, 30351, 1785, 526, 15931, 628, 198, 4871, 30351, 2601, 9237, 7, 15252, 2599, 198, 220, 220, 220, 37227, 26416, 30351, 1785, 526, 15931 ]
3.052632
38
wt1_2_7 = {'192.168.122.112': [6.0527, 8.4551, 7.8479, 7.6681, 7.4932, 6.4745, 6.4198, 8.2644, 10.7811, 10.3783, 9.9412, 9.5791, 9.2604, 9.4337, 9.2044, 8.9888, 8.8576, 8.6938, 8.5687, 8.4276, 8.3159, 8.203, 8.3446, 8.2226, 8.127, 8.0167, 7.9279, 7.8576, 7.9614, 7.9092, 7.8796, 7.8118, 7.747, 7.8486, 7.7813, 7.8853, 7...
[ 198, 46569, 16, 62, 17, 62, 22, 796, 1391, 6, 17477, 13, 14656, 13, 18376, 13, 14686, 10354, 685, 21, 13, 2713, 1983, 11, 807, 13, 2231, 4349, 11, 767, 13, 23, 31714, 11, 767, 13, 2791, 6659, 11, 767, 13, 2920, 2624, 11, 718, ...
1.616278
214,009
import numpy as np import random import json import hdbscan import numba import sys from sklearn.neighbors import KDTree from pyclustering.cluster.xmeans import xmeans from helpers import distance_matrix as dm from helpers import hparam_functions as hp from helpers import visualization as vis from concurrent.futures i...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 4738, 198, 11748, 33918, 198, 11748, 289, 9945, 35836, 198, 11748, 997, 7012, 198, 11748, 25064, 198, 198, 6738, 1341, 35720, 13, 710, 394, 32289, 1330, 509, 24544, 631, 198, 6738, 12972, 565, ...
2.902985
134
""" Copyright 2012 Ali Ok (aliokATapacheDOTorg) 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 wr...
[ 37811, 198, 15269, 220, 2321, 220, 12104, 6762, 357, 7344, 482, 1404, 43073, 35, 2394, 2398, 8, 198, 198, 26656, 15385, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 5832, 743, 407, 779, 428, 2393,...
3.706468
201
import numpy as np
[ 11748, 299, 32152, 355, 45941, 198 ]
3.166667
6
# encoding:utf-8 class Position(object): """ Basic position class. Attributes ---------- symbol : str List of securities. side : str ("Long", "Short"). Positions of different sides will not be merged. cost_price : float Average cost price of current net position. ...
[ 2, 21004, 25, 40477, 12, 23, 628, 198, 4871, 23158, 7, 15252, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 14392, 2292, 1398, 13, 628, 220, 220, 220, 49213, 198, 220, 220, 220, 24200, 438, 198, 220, 220, 220, 6194, 1058, 9...
2.424723
631
# # ------------------------------------------------------------------------- # Copyright (c) 2015-2017 AT&T Intellectual Property # Copyright (C) 2020 Wipro Limited. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You ma...
[ 2, 198, 2, 16529, 45537, 198, 2, 220, 220, 15069, 357, 66, 8, 1853, 12, 5539, 5161, 5, 51, 42443, 14161, 198, 2, 220, 220, 15069, 357, 34, 8, 12131, 370, 541, 305, 15302, 13, 198, 2, 198, 2, 220, 220, 49962, 739, 262, 24843, 1...
2.311106
4,304
#!/bin/python3 enum = {} previousValue = None with open("rosecommon/include/epackettype.h", "r") as f: for i in range(46): f.readline() for line in f: if "};" in line: break name, value = parse(line) if value: enum[name] = value while True: value = i...
[ 2, 48443, 8800, 14, 29412, 18, 198, 44709, 796, 23884, 198, 198, 3866, 1442, 11395, 796, 6045, 198, 198, 4480, 1280, 7203, 13698, 11321, 14, 17256, 14, 538, 8317, 4906, 13, 71, 1600, 366, 81, 4943, 355, 277, 25, 198, 220, 220, 220, ...
2.024648
284
''' Copyright (C) 2021 CG Cookie http://cgcookie.com hello@cgcookie.com Created by Jonathan Denning, Jonathan Williamson This program 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 Foundation, either version 3 ...
[ 7061, 6, 198, 15269, 357, 34, 8, 33448, 29925, 39606, 198, 4023, 1378, 66, 36484, 18055, 13, 785, 198, 31373, 31, 66, 36484, 18055, 13, 785, 198, 198, 41972, 416, 11232, 5601, 768, 11, 11232, 34974, 628, 220, 220, 220, 770, 1430, 31...
3.389646
734
import torch import torch.nn as nn import torch.nn.functional as f
[ 11748, 28034, 201, 198, 11748, 28034, 13, 20471, 355, 299, 77, 201, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 277, 201, 198, 201, 198, 201, 198 ]
2.740741
27
import json from django import template from django.utils.html import mark_safe register = template.Library() @register.simple_tag
[ 11748, 33918, 198, 198, 6738, 42625, 14208, 1330, 11055, 198, 6738, 42625, 14208, 13, 26791, 13, 6494, 1330, 1317, 62, 21230, 198, 198, 30238, 796, 11055, 13, 23377, 3419, 628, 198, 31, 30238, 13, 36439, 62, 12985, 198 ]
3.552632
38
import factory from django.contrib.auth import get_user_model from organisations.models import Organisation, OrganisationProposal, Person
[ 11748, 8860, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 198, 6738, 16435, 13, 27530, 1330, 30801, 11, 30801, 24331, 40725, 11, 7755, 628, 628, 628 ]
4.333333
33