content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from django.contrib import admin from .models import Token @admin.register(Token)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 6738, 764, 27530, 1330, 29130, 628, 198, 31, 28482, 13, 30238, 7, 30642, 8, 198 ]
3.4
25
#!/usr/bin/env python # -*- coding: utf-8 -*- # $Id$ # Author: David Goodger <goodger@python.org> # Copyright: (C) 1998-2015 by David J. Goodger # License: GPL 2 (see __init__.py) """ Concrete quasi-polytrigs (order 1-3) puzzles. """ from puzzler.puzzles.polytwigs import ( QuasiPolytwigs123, OneSidedQuasiPolytwi...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 720, 7390, 3, 198, 198, 2, 6434, 25, 3271, 4599, 1362, 1279, 11274, 1362, 31, 29412, 13, 2398, 29, 198, 2, 15069...
2.415414
532
""" Script that trains MPNN models on qm8 dataset. """ from __future__ import print_function from __future__ import division from __future__ import unicode_literals import numpy as np np.random.seed(123) import tensorflow as tf tf.set_random_seed(123) import deepchem as dc # Load QM8 dataset tasks, datasets, transfor...
[ 37811, 198, 7391, 326, 13404, 4904, 6144, 4981, 319, 10662, 76, 23, 27039, 13, 198, 37811, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62...
2.626761
426
from Instrucciones.Instruccion import Instruccion from Expresion.Relacional import *
[ 201, 198, 6738, 2262, 622, 535, 295, 274, 13, 6310, 622, 535, 295, 1330, 2262, 622, 535, 295, 201, 198, 201, 198, 6738, 5518, 411, 295, 13, 6892, 330, 1538, 1330, 1635, 201, 198, 201, 198, 201, 198, 201, 198 ]
2.425
40
import numpy as np import pandas as pd import torch import scipy import torch from torch import nn from torch.autograd import Variable import torchvision import torchvision.transforms as transforms from sklearn.metrics import make_scorer, accuracy_score from pysembles.Utils import TransformTensorDataset ''' Some co...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 28034, 198, 11748, 629, 541, 88, 198, 198, 11748, 28034, 198, 6738, 28034, 1330, 299, 77, 198, 6738, 28034, 13, 2306, 519, 6335, 1330, 35748, 198, 11748, ...
2.00879
3,982
"""Provide Exception classes.""" from dataclasses import dataclass from pathlib import Path from typing import Any @dataclass(frozen=True) class SettingNotFoundError(Exception): """Error class for missing config file.""" conf_path: Path sample_conf_path: Path def __str__(self) -> str: """Cre...
[ 37811, 15946, 485, 35528, 6097, 526, 15931, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 4377, 628, 198, 31, 19608, 330, 31172, 7, 69, 42005, 28, 17821, 8, 198, 4871, ...
2.624714
437
""" Migration for the Submitty system. Adds bool to specify if the machine is a worker to Submitty.config """ from pathlib import Path import json import os # no need for down as email_enabled is not used in previous builds
[ 37811, 198, 44, 4254, 329, 262, 3834, 76, 9760, 1080, 13, 198, 46245, 20512, 284, 11986, 611, 262, 4572, 318, 257, 8383, 284, 3834, 76, 9760, 13, 11250, 198, 37811, 198, 6738, 3108, 8019, 1330, 10644, 198, 11748, 33918, 198, 11748, 28...
3.766667
60
# Copyright (c) 2009-2017 The Regents of the University of Michigan # This file is part of the HOOMD-blue project, released under the BSD 3-Clause License. R""" HPMC utilities """ from __future__ import print_function from __future__ import division # If numpy is unavailable, some utilities will not work try: imp...
[ 2, 15069, 357, 66, 8, 3717, 12, 5539, 383, 3310, 658, 286, 262, 2059, 286, 7055, 198, 2, 770, 2393, 318, 636, 286, 262, 40115, 2662, 35, 12, 17585, 1628, 11, 2716, 739, 262, 347, 10305, 513, 12, 2601, 682, 13789, 13, 198, 198, 4...
2.914357
4,437
#!/usr/bin/env python from cos_sim import * from topic_model import * from vectorizer import * from algorithm_wrapper import * if __name__ == '__main__': print "Algorithm module!"
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 6738, 8615, 62, 14323, 1330, 1635, 198, 6738, 7243, 62, 19849, 1330, 1635, 198, 6738, 15879, 7509, 1330, 1635, 198, 6738, 11862, 62, 48553, 1330, 1635, 198, 198, 361, 11593, 3672, 834, ...
3.206897
58
"""Methods for normalizing dpayd post metadata.""" #pylint: disable=line-too-long import math import ujson as json from funcy.seqs import first from hive.utils.normalize import bbd_amount, rep_log10, safe_img_url, parse_time, utc_timestamp def post_basic(post): """Basic post normalization: json-md, tags, and fl...
[ 37811, 46202, 329, 3487, 2890, 288, 15577, 67, 1281, 20150, 526, 15931, 198, 2, 79, 2645, 600, 25, 15560, 28, 1370, 12, 18820, 12, 6511, 198, 198, 11748, 10688, 198, 11748, 334, 17752, 355, 33918, 198, 6738, 1257, 948, 13, 41068, 82, ...
2.304132
2,614
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from snipsTools import * from RelaySwitch import RelaySwitch from SHT31 import SHT31 from SnipsClients import SnipsMPU VERSION = '0.3.0' CONFIG_INI = 'config.ini' I18N_DIR = 'assets/i18n' config = SnipsConfigParser.read_configuration_file(CONFIG_INI).get('global') MQT...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 3013, 2419, 33637, 1330, 1635, 198, 6738, 4718, 323, 38978, 1330, 4718, 323, 38978, 198, 6738, 6006, 51,...
2.224586
423
import os,sys,subprocess,re lines = [] with os.popen("tshark -r "+sys.argv[1]+" -T fields -e tcp.analysis.ack_rtt") as sharky: for line in sharky: lines.append(line) cleanList = [] for dirty in lines: temp = re.sub("[^\d.]","",dirty) if temp!="": cleanList.append(temp)#filtering numbers = ...
[ 11748, 28686, 11, 17597, 11, 7266, 14681, 11, 260, 198, 198, 6615, 796, 17635, 198, 4480, 28686, 13, 79, 9654, 7203, 912, 71, 668, 532, 81, 43825, 17597, 13, 853, 85, 58, 16, 48688, 1, 532, 51, 7032, 532, 68, 48265, 13, 20930, 13,...
2.504505
222
from django.db import models from django.core.validators import MaxValueValidator, MinValueValidator
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 7295, 13, 12102, 2024, 1330, 5436, 11395, 47139, 1352, 11, 1855, 11395, 47139, 1352, 628 ]
3.777778
27
from flask import Flask, render_template, request, jsonify from flask_cors import CORS from Hope import get_response app = Flask(__name__) CORS(app) @app.get("/") @app.post("/predict") if __name__ == "__main__": app.run(debug=True)
[ 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 2581, 11, 33918, 1958, 198, 6738, 42903, 62, 66, 669, 1330, 327, 20673, 198, 6738, 13408, 1330, 651, 62, 26209, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 198, 34, 20673, 7, 1324,...
2.727273
88
# PYQT import sys #from ...TabPanel import TabPanel import sip from q3.ui.engine import qtw,qtc,qtg from ... import consts, prop, direction from ...ui import orientation, colors from ...moduletype import ModuleType from ...nodeiotype import NodeIoType from ...q3vector import Q3Vector from ...EventSignal import E...
[ 198, 2, 350, 56, 48, 51, 198, 198, 11748, 25064, 198, 2, 6738, 2644, 33349, 26639, 1330, 16904, 26639, 198, 198, 11748, 31145, 220, 198, 198, 6738, 10662, 18, 13, 9019, 13, 18392, 1330, 10662, 4246, 11, 80, 23047, 11, 80, 25297, 198...
2.833333
252
import pytest from montydb.errors import OperationFailure from montydb.types import PY3, bson_ as bson from datetime import datetime from ...conftest import skip_if_no_bson @skip_if_no_bson @skip_if_no_bson @skip_if_no_bson @skip_if_no_bson @skip_if_no_bson @skip_if_no_bson @skip_if_no_bs...
[ 198, 11748, 12972, 9288, 198, 6738, 40689, 5173, 65, 13, 48277, 1330, 14680, 50015, 198, 6738, 40689, 5173, 65, 13, 19199, 1330, 350, 56, 18, 11, 275, 1559, 62, 355, 275, 1559, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 6738, ...
2.022814
263
# -*- coding: utf-8 -*- # 项目详情视图 类 from django.db.models import Q from django.urls import reverse_lazy from django.views.generic import CreateView, ListView, DetailView, UpdateView, DeleteView from django.core.paginator import Paginator from project.forms.project_from import ProjectUpdateForm, ProjectCreateForm from ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 16268, 94, 117, 33566, 106, 46237, 99, 46349, 227, 164, 100, 228, 32368, 122, 13328, 109, 119, 198, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 1330, 1195, 1...
2.344994
829
""" Example of running PyTorch implementation of DDPG on HalfCheetah. """ import copy from gym.envs.mujoco import HalfCheetahEnv from rlkit.data_management.env_replay_buffer import EnvReplayBuffer from rlkit.envs.wrappers import NormalizedBoxEnv from rlkit.exploration_strategies.base import ( PolicyWrappedWithExp...
[ 37811, 198, 16281, 286, 2491, 9485, 15884, 354, 7822, 286, 360, 6322, 38, 319, 13139, 7376, 316, 993, 13, 198, 37811, 198, 11748, 4866, 198, 198, 6738, 11550, 13, 268, 14259, 13, 76, 23577, 25634, 1330, 13139, 7376, 316, 993, 4834, 85...
2.154746
769
from datetime import timedelta from typing import Optional from google.protobuf.duration_pb2 import Duration from feast.protos.feast.core.Aggregation_pb2 import Aggregation as AggregationProto class Aggregation: """ NOTE: Feast-handled aggregations are not yet supported. This class provides a way to registe...
[ 6738, 4818, 8079, 1330, 28805, 12514, 198, 6738, 19720, 1330, 32233, 198, 198, 6738, 23645, 13, 11235, 672, 3046, 13, 32257, 62, 40842, 17, 1330, 22920, 198, 198, 6738, 26951, 13, 11235, 418, 13, 5036, 459, 13, 7295, 13, 46384, 43068, ...
3.260664
211
import pyximport pyximport.install(pyimport=True) from random import randint import time import json from utils import create_rand_array if __name__ == '__main__': methods = ['linear', 'binary_search'] # array_sizes = [10**x for x in range(1, 9)] array_sizes = range(100000, 1000001, 50000) run_ti...
[ 11748, 12972, 87, 11748, 198, 9078, 87, 11748, 13, 17350, 7, 9078, 11748, 28, 17821, 8, 198, 6738, 4738, 1330, 43720, 600, 198, 11748, 640, 198, 11748, 33918, 198, 198, 6738, 3384, 4487, 1330, 2251, 62, 25192, 62, 18747, 628, 628, 628...
2.099222
514
"""Support for LG webOS Smart TV.""" from __future__ import annotations import asyncio from collections.abc import Callable from contextlib import suppress import json import logging import os from pickle import loads from typing import Any from aiowebostv import WebOsClient, WebOsTvPairError import sqlalchemy as db ...
[ 37811, 15514, 329, 17370, 3992, 2640, 10880, 3195, 526, 15931, 198, 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 30351, 952, 198, 6738, 17268, 13, 39305, 1330, 4889, 540, 198, 6738, 4732, 8019, 1330, 18175, 198, 11748, 33918, 19...
2.295408
4,377
import os import regex import io from natsort import natsort_keygen, natsorted nkey = natsort_keygen() for subdir, dirs, files in os.walk( r"I:\INOWROCŁAW\DANE_IRON_MOUNTAIN\20190614\DĄBROWA BISKUPIA" ): dirs.sort(key=nkey) if not any(fname.upper().endswith(".XML") for fname in os.listdir(subdir)): ...
[ 11748, 28686, 198, 11748, 40364, 198, 11748, 33245, 198, 6738, 299, 1381, 419, 1330, 299, 1381, 419, 62, 2539, 5235, 11, 299, 1381, 9741, 198, 198, 77, 2539, 796, 299, 1381, 419, 62, 2539, 5235, 3419, 198, 198, 1640, 850, 15908, 11, ...
1.641096
730
Import("env") env.Replace(LINKFLAGS = [fixLinkFlag(i) for i in env['LINKFLAGS']])
[ 20939, 7203, 24330, 4943, 198, 220, 220, 220, 220, 198, 24330, 13, 3041, 5372, 7, 43, 17248, 38948, 50, 796, 685, 13049, 11280, 34227, 7, 72, 8, 329, 1312, 287, 17365, 17816, 43, 17248, 38948, 50, 6, 11907, 8, 198 ]
2.175
40
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # @Time : 2021/10/19 下午2:38 # @Author : Samge import datetime import json class DateEncoder(json.JSONEncoder): """ 处理日期格式转json """
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 7575, 220, 220, 220, 1058, 33448, 14, 940, 14, 1129, 220, 10310, 233, 39355, 230, 17, 25, 2548, 198, 2...
1.902913
103
# Author: Jimmy Huang (1902161621@qq.com) # License: WTFPL import ECY.utils.lsp.language_server_protocol as lsp import ECY.utils.interface as scope_ import logging import os import threading global g_logger g_logger = logging.getLogger('ECY_server')
[ 2, 6434, 25, 12963, 31663, 357, 1129, 2999, 1433, 1433, 2481, 31, 38227, 13, 785, 8, 198, 2, 13789, 25, 41281, 5837, 43, 198, 198, 11748, 13182, 56, 13, 26791, 13, 75, 2777, 13, 16129, 62, 15388, 62, 11235, 4668, 355, 300, 2777, 1...
2.863636
88
""" Q005 Longest Palindromic Substring Medium 08/27/2019 String. Dynamic programming. Methods: Dynamic programming; Manacher's algo; Palidromic tree; Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example 1: Input: "babad" Output: "ba...
[ 37811, 198, 48, 22544, 5882, 395, 3175, 521, 398, 291, 3834, 8841, 198, 31205, 198, 198, 2919, 14, 1983, 14, 23344, 198, 10100, 13, 26977, 8300, 13, 198, 46202, 25, 198, 220, 220, 220, 26977, 8300, 26, 198, 220, 220, 220, 1869, 3493...
2.75
172
# 11 February 2018 Miroslav Gasparek # Python practical on File Input/Output import os # Open File f = open('data/1OLG.pdb','r') # What is f? f f_str = f.read() f_str[:1000] f_list = f.readlines() f_list # To rewind back to the beginning, we do f.seek(0) # Go to the beginning of the file f.seek(0) # Read the conten...
[ 2, 1367, 3945, 2864, 13756, 4951, 18809, 402, 5126, 533, 74, 198, 2, 11361, 8472, 319, 9220, 23412, 14, 26410, 198, 11748, 28686, 198, 198, 2, 4946, 9220, 198, 69, 796, 1280, 10786, 7890, 14, 16, 3535, 38, 13, 79, 9945, 41707, 81, ...
2.63369
748
from rest_framework import serializers from blog.models import Blog class BlogSerializer(serializers.ModelSerializer): """ Serializer class for Blog Model """
[ 6738, 1334, 62, 30604, 1330, 11389, 11341, 201, 198, 6738, 4130, 13, 27530, 1330, 14001, 201, 198, 201, 198, 4871, 14001, 32634, 7509, 7, 46911, 11341, 13, 17633, 32634, 7509, 2599, 201, 198, 220, 220, 220, 37227, 201, 198, 220, 220, ...
3.236364
55
from util.constant import EdgeAttrbutes, EdgeType, NodeAttributes from util.utils import get_api_qualified_name_from_entity_id from .common import api_url_match, camel_case_split, longest_common_subsequence from ..concept_map.common import get_latest_concept_map from elasticsearch import Elasticsearch from util.config ...
[ 6738, 7736, 13, 9979, 415, 1330, 13113, 8086, 26145, 1769, 11, 13113, 6030, 11, 19081, 29021, 198, 6738, 7736, 13, 26791, 1330, 651, 62, 15042, 62, 22557, 62, 3672, 62, 6738, 62, 26858, 62, 312, 198, 6738, 764, 11321, 1330, 40391, 62,...
1.788825
2,595
#! /usr/bin/env python # coding: utf-8 # This is pos controller for like-car robot import math import numpy as np import rospy import tf import tf2_ros import sensor_msgs.point_cloud2 as pc2 import laser_geometry.laser_geometry as lg from tf2_sensor_msgs.tf2_sensor_msgs import do_transform_cloud from geometry_msgs.m...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 770, 318, 1426, 10444, 329, 588, 12, 7718, 9379, 628, 198, 11748, 10688, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 686, 2777, 8...
2.115641
2,845
from django.contrib.auth.decorators import user_passes_test from django.shortcuts import render, redirect, get_object_or_404 from django.urls import reverse from resource_tracker.filters.resource_pool_filter import ResourcePoolFilter from resource_tracker.forms import ResourcePoolForm, ResourcePoolAttributeDefinitionF...
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 12501, 273, 2024, 1330, 2836, 62, 6603, 274, 62, 9288, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 18941, 11, 651, 62, 15252, 62, 273, 62, 26429, 198, 6738, 42625, 14208...
2.996942
327
import sys import serial import pprint import time import enum import queue from queue import Queue from os.path import join, dirname, abspath from qtpy.QtCore import Slot, QTimer, QThread, Signal, QObject, Qt, QMutex ''' for char in self.serialport.read(): self.line.append(chr(char...
[ 11748, 25064, 198, 11748, 11389, 198, 11748, 279, 4798, 198, 11748, 640, 198, 11748, 33829, 198, 11748, 16834, 198, 6738, 16834, 1330, 4670, 518, 198, 6738, 28686, 13, 6978, 1330, 4654, 11, 26672, 3672, 11, 2352, 6978, 198, 6738, 10662, ...
1.816068
1,419
"""The module for handling users.""" import admin from appengine_config import JINJA_ENVIRONMENT from ast import literal_eval import base64 from config import PATHS from datastore import DomainVerification from datastore import ProxyServer from datastore import User from error_handlers import Handle500 from googleapic...
[ 37811, 464, 8265, 329, 9041, 2985, 526, 15931, 198, 198, 11748, 13169, 198, 6738, 598, 18392, 62, 11250, 1330, 449, 1268, 37048, 62, 1677, 53, 4663, 1340, 10979, 198, 6738, 6468, 1330, 18875, 62, 18206, 198, 11748, 2779, 2414, 198, 6738...
2.974155
3,521
from copy import deepcopy from hypothesis import strategies as st from hypothesis import given import ast import astor import renderer import actions import core_logic # TODO: Make a directory with a bunch of kwnow valid .py files # And test with them all # I'm assuming dummy.py isn't messed up tree = ast.parse(open...
[ 6738, 4866, 1330, 2769, 30073, 198, 6738, 14078, 1330, 10064, 355, 336, 198, 6738, 14078, 1330, 1813, 198, 11748, 6468, 198, 11748, 6468, 273, 198, 198, 11748, 9851, 11882, 198, 11748, 4028, 198, 11748, 4755, 62, 6404, 291, 198, 198, 2,...
2.798122
213
# -*- coding: utf-8 -*- import json import os import operator as op from jsonschema import Draft4Validator from .db import engine schema_name = "default_event_schema.json" schema_path = os.path.join(os.path.dirname(__file__), schema_name)
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 10088, 355, 1034, 198, 6738, 44804, 684, 2395, 2611, 1330, 13650, 19, 47139, 1352, 198, 198, 6738, 764, 9945, 1330, 3113,...
2.741573
89
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2016-07-13 11: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, 24, 13, 20, 319, 1584, 12, 2998, 12, 1485, 1367, 25, 1983, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 1...
2.719298
57
""" Module with testing utilities. """ import numpy from scipy import sparse def orthogonal_linear_chain( nsites=100, contact_size=20, coupling=1.0, onsite=0.0): """ Build the hamiltonian of an orthogonal nearest neighbor linear chain with the correct arrangement for the co...
[ 37811, 198, 26796, 351, 4856, 20081, 13, 198, 37811, 198, 11748, 299, 32152, 198, 6738, 629, 541, 88, 1330, 29877, 628, 198, 4299, 29617, 519, 20996, 62, 29127, 62, 7983, 7, 198, 220, 220, 220, 220, 220, 220, 220, 36545, 2737, 28, 3...
2.332624
1,410
# -*- coding: utf-8 -*- """ Created by susy at 2020/1/27 """ from utils import singleton, get_payload_from_token, get_now_ts, decrypt_user_id, log as logger from utils.constant import USER_TYPE from tornado.web import RequestHandler @singleton @singleton
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 416, 2341, 88, 379, 12131, 14, 16, 14, 1983, 198, 37811, 198, 6738, 3384, 4487, 1330, 2060, 1122, 11, 651, 62, 15577, 2220, 62, 6738, 62, 30001, 11,...
2.827957
93
from textwrap import dedent from nose.tools import assert_equal # @UnresolvedImport from tests import check_as_expected, get_repeated_lines, get_actual_result from superhelp.helpers.func_help import count_args excess_args = ', '.join(['arg' + str(i) for i in range(100)]) ROOT = 'superhelp.helpers.func_help.' def...
[ 6738, 2420, 37150, 1330, 4648, 298, 198, 198, 6738, 9686, 13, 31391, 1330, 6818, 62, 40496, 220, 1303, 2488, 3118, 411, 5634, 20939, 198, 198, 6738, 5254, 1330, 2198, 62, 292, 62, 40319, 11, 651, 62, 45956, 515, 62, 6615, 11, 651, 6...
2.26151
543
######################################################################## # test/xslt/test_attribute.py from amara.writers import WriterError, xmlwriter from amara.xslt import XsltError PREFIX_TEMPLATE = xmlwriter.xmlwriter.GENERATED_PREFIX from xslt_support import _run_xml SOURCE_XML = """<?xml version="1.0"?><dummy...
[ 29113, 29113, 7804, 198, 2, 1332, 14, 34223, 2528, 14, 9288, 62, 42348, 13, 9078, 198, 6738, 716, 3301, 13, 34422, 1330, 26606, 12331, 11, 35555, 16002, 198, 6738, 716, 3301, 13, 34223, 2528, 1330, 1395, 82, 2528, 12331, 198, 198, 47,...
2.432865
6,755
import numpy as np # Add small Gaussian noise to particles to reinvigorate them
[ 11748, 299, 32152, 355, 45941, 198, 198, 2, 3060, 1402, 12822, 31562, 7838, 284, 13166, 284, 6865, 85, 328, 16262, 606, 628, 198 ]
3.608696
23
from abc import ABC, abstractmethod
[ 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 628 ]
4.111111
9
# Copyright 2018 PerfKitBenchmarker 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, 2864, 2448, 69, 20827, 44199, 4102, 263, 46665, 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, ...
2.614215
2,434
#!/usr/bin/env python # # __COPYRIGHT__ # # 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, ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 11593, 34, 3185, 38162, 9947, 834, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 198, 2, 257, 4866, 286, 428, 3788, 290, ...
2.812067
1,011
#gui Uses python 2, else uses python 3 import Tkinter as tk import time if __name__ == '__main__': main()
[ 2, 48317, 36965, 21015, 362, 11, 2073, 3544, 21015, 513, 220, 201, 198, 11748, 309, 74, 3849, 355, 256, 74, 201, 198, 11748, 640, 201, 198, 220, 220, 220, 220, 201, 198, 220, 220, 220, 220, 201, 198, 201, 198, 361, 11593, 3672, 83...
2.245614
57
from typing import Any, List # pragma: no cover from amortization.amount import calculate_amortization_amount # pragma: no cover from amortization.schedule import amortization_schedule # pragma: no cover
[ 6738, 19720, 1330, 4377, 11, 7343, 220, 1303, 23864, 2611, 25, 645, 3002, 198, 198, 6738, 716, 419, 1634, 13, 17287, 1330, 15284, 62, 321, 419, 1634, 62, 17287, 220, 1303, 23864, 2611, 25, 645, 3002, 198, 6738, 716, 419, 1634, 13, 1...
3.542373
59
import gzip, json, sys import numpy as np import time import argparse import os import util from sqlitedict import SqliteDict '''usage: (goes in shell script) python3 -u code/create_word_index.py \ -outDir 'betatest/out/' ''' '''global argparse''' parser = argparse.ArgumentParser(description='Processing list of file...
[ 11748, 308, 13344, 11, 33918, 11, 25064, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 640, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 7736, 198, 6738, 44161, 863, 713, 1330, 311, 13976, 578, 35, 713, 198, 198, 7061, 6, ...
2.453423
891
#open the file filename = open("./model8.pdb", "r") #for each model in the file, we would like #to create a list which contains the coordinates of the Carbon alfa atoms import math biglist= [] #crea una lista che contenga tutto! a = -1 #faccio questo per poter partire dal primo elemento* for line in filename: #per ogni...
[ 2, 9654, 262, 2393, 198, 34345, 796, 1280, 7, 1911, 14, 19849, 23, 13, 79, 9945, 1600, 366, 81, 4943, 198, 2, 1640, 1123, 2746, 287, 262, 2393, 11, 356, 561, 588, 198, 2, 1462, 2251, 257, 1351, 543, 4909, 262, 22715, 286, 262, 2...
2.214953
428
#!/usr/bin/env python from ftplib import FTP import argparse, codes3d, configparser, gzip, os, re, requests, subprocess, sys if __name__ == "__main__": parser = argparse.ArgumentParser(description="Download the default data files for CoDeS3D. These will be downloaded into the default directories specified in the su...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 10117, 489, 571, 1330, 45854, 198, 11748, 1822, 29572, 11, 12416, 18, 67, 11, 4566, 48610, 11, 308, 13344, 11, 28686, 11, 302, 11, 7007, 11, 850, 14681, 11, 25064, 628, 19...
2.871822
944
import os import numpy as np if __name__ == "__main__": getdataset()
[ 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 651, 19608, 292, 316, 3419 ]
2.517241
29
# -*- coding: utf-8 -*- from simmate.toolkit.transformations.base import Transformation
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 985, 9830, 13, 25981, 15813, 13, 35636, 602, 13, 8692, 1330, 49127, 628 ]
3.103448
29
import sys import fileinput import numpy as np if __name__ == '__main__': main()
[ 11748, 25064, 198, 11748, 2393, 15414, 198, 11748, 299, 32152, 355, 45941, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419 ]
2.866667
30
from bs4 import BeautifulSoup import requests import json link='https://www.worldometers.info/coronavirus/' source = requests.get(link).text soup = BeautifulSoup(source, 'lxml')
[ 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 11748, 7007, 198, 11748, 33918, 198, 8726, 11639, 5450, 1378, 2503, 13, 6894, 40077, 13, 10951, 14, 10215, 261, 615, 19397, 14, 6, 198, 10459, 796, 7007, 13, 1136, 7, 8726, 737, 5239, ...
3.016667
60
""" SatelliteContentHostsCount - command ``psql -d foreman -c 'select count(*) from hosts'`` ======================================================================================== The SatelliteContentHostsCount parser reads the output of ``psql -d foreman -c 'select count(*) from hosts'``. Sample output of ``psql -...
[ 37811, 198, 50, 26493, 19746, 17932, 82, 12332, 532, 3141, 7559, 862, 13976, 532, 67, 1674, 805, 532, 66, 705, 19738, 954, 7, 28104, 422, 11453, 6, 15506, 198, 23926, 4770, 2559, 198, 198, 464, 33530, 19746, 17932, 82, 12332, 30751, 9...
3.230769
312
import os import random import shortuuid from PIL import Image from config import config from model import Game, Pack
[ 11748, 28686, 198, 11748, 4738, 198, 198, 11748, 1790, 12303, 312, 198, 6738, 350, 4146, 1330, 7412, 198, 198, 6738, 4566, 1330, 4566, 198, 6738, 2746, 1330, 3776, 11, 6400, 628, 628, 198 ]
3.757576
33
# generated by datamodel-codegen: # filename: test.json # timestamp: 2019-07-26T00:00:00+00:00 from __future__ import annotations from pydantic import BaseModel, Field
[ 2, 7560, 416, 4818, 321, 375, 417, 12, 8189, 5235, 25, 198, 2, 220, 220, 29472, 25, 220, 1332, 13, 17752, 198, 2, 220, 220, 41033, 25, 13130, 12, 2998, 12, 2075, 51, 405, 25, 405, 25, 405, 10, 405, 25, 405, 198, 198, 6738, 115...
2.825397
63
from setuptools import setup, find_packages setup( name="redis-orm", description="Redis object relation mapper", author="minamorl", author_email="minamorl@minamorl.com", version="0.4.1", packages=find_packages(), tests_require=['tox'], install_requires=[ "redis", "python...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 2625, 445, 271, 12, 579, 1600, 198, 220, 220, 220, 6764, 2625, 7738, 271, 2134, 8695, 285, 11463, 1600, 198, 220, 220, 220, 1772...
2.328767
146
import codecs from corehq.apps.sms.util import clean_phone_number from corehq.apps.sms.api import incoming from corehq.apps.sms.models import SQLSMSBackend from six.moves.urllib.request import urlopen from six.moves.urllib.parse import urlencode from corehq.messaging.smsbackends.unicel.forms import UnicelBackendForm f...
[ 11748, 40481, 82, 198, 198, 6738, 4755, 71, 80, 13, 18211, 13, 82, 907, 13, 22602, 1330, 3424, 62, 4862, 62, 17618, 198, 6738, 4755, 71, 80, 13, 18211, 13, 82, 907, 13, 15042, 1330, 15619, 198, 6738, 4755, 71, 80, 13, 18211, 13, ...
2.541953
727
import sys import json import numpy as np from typing import Any, Union from flask import Response, Blueprint, request sys.path.append("./robot_work_zone_estimation") from app.extensions import mongo, cache from app.route_utils import load_classes from app.fill_databse import FillDatabase from app.objects_utils impor...
[ 11748, 25064, 198, 11748, 33918, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 19720, 1330, 4377, 11, 4479, 198, 6738, 42903, 1330, 18261, 11, 39932, 11, 2581, 198, 198, 17597, 13, 6978, 13, 33295, 7, 1911, 14, 305, 13645, 62, 1818, ...
2.783858
1,462
from app.helpers.units import SpeedUnits
[ 6738, 598, 13, 16794, 364, 13, 41667, 1330, 8729, 3118, 896, 628 ]
3.5
12
## # See the file COPYRIGHT for copyright information. # # 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...
[ 2235, 198, 2, 4091, 262, 2393, 27975, 38162, 9947, 329, 6634, 1321, 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, ...
3.596091
307
# Tab TAB_SIZE = 1 tab = ' ' * TAB_SIZE # Colors USING_COLOR = 'magenta' FINAL_COLOR = 'cyan' ANS_COLOR = 'cyan' INVALID_COLOR = 'red' VAR_COLOR = 'red' FUNC_ERR_COLOR = 'green'
[ 2, 16904, 201, 198, 5603, 33, 62, 33489, 796, 352, 201, 198, 8658, 796, 705, 705, 1635, 309, 6242, 62, 33489, 201, 198, 201, 198, 2, 29792, 201, 198, 2937, 2751, 62, 46786, 220, 220, 220, 220, 220, 220, 220, 220, 796, 705, 19726, ...
1.678571
140
import numpy as np import math import tensorflow as tf import sys sys.path.append('../') from libs.utils.coordinate_convert import backward_convert if __name__ == "__main__": quad = np.array([[278, 418, 308, 331, 761, 581, 691, 668], [758, 418, 348, 331, 241, 581, 591, 668], ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 10688, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 10786, 40720, 11537, 198, 6738, 9195, 82, 13, 26791, 13, 37652, 4559, 62, 1102, 1851, 1330, ...
2.062937
286
import subprocess from setuptools import setup, find_packages, Extension setup( name='telegram_fdw', version='0.1.0', author='Dickson S. Guedes', license='PostgreSQL', packages=['telegram_fdw'] )
[ 11748, 850, 14681, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 11, 27995, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 660, 30536, 62, 16344, 86, 3256, 198, 220, 220, 220, 2196, 11639, 15, 13, 16, 13, 15, ...
2.614458
83
import gym import matplotlib import matplotlib.pyplot as plt import numpy as np import pandas as pd from gym import spaces from gym.utils import seeding from stable_baselines3.common.vec_env import DummyVecEnv import decimal matplotlib.use("Agg")
[ 11748, 11550, 198, 11748, 2603, 29487, 8019, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 11550, 1330, 9029, 198, 6738, 11550, 13, 267...
3.125
80
intpt import jaa.lls
[ 600, 457, 1330, 474, 7252, 13, 297, 82, 198 ]
2.333333
9
#! /usr/bin/env python # -*- coding: utf-8 -*- import sys import os import shutil import json import subprocess import bincopy import gendef import LPC_gendef sys.path.append(os.path.abspath("..")) from ui import LPC_uicore from ui import LPC_uidef from ui import uidef from ui import uivar from ui import uilang from ru...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 33918, 198, 11748, 850, 14681, 198, 11748, 275, 1...
2.71875
160
tPalavras = ( 'aprender', 'programar', 'linguagem', 'python', 'curso', 'gratis', 'try' ) for i in tPalavras: print(f'\nNa palavra {i.upper()} temos: ', end = '') for letra in i: if letra.lower() in 'aeiou': print(letra, end = ' ')
[ 83, 11531, 615, 8847, 796, 357, 201, 198, 220, 220, 220, 705, 499, 13287, 3256, 201, 198, 220, 220, 220, 705, 23065, 283, 3256, 201, 198, 220, 220, 220, 705, 1359, 84, 363, 368, 3256, 201, 198, 220, 220, 220, 705, 29412, 3256, 201...
1.782353
170
# Copyright (c) 2020 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, 12131, 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
636
import torch __all__ = ['ResidualFeedForwardNet'] class ResidualFeedFowardBlock(torch.nn.Module): '''Block of two feed-forward layer with a reisdual connection: f(W1^T x + b1) f(W2^T h1 + b2 ) h2 + x x ------------------> h1 --------------------> h2 ----------> y ...
[ 11748, 28034, 198, 198, 834, 439, 834, 796, 37250, 4965, 312, 723, 18332, 39746, 7934, 20520, 198, 198, 4871, 1874, 312, 723, 18332, 37, 46138, 12235, 7, 13165, 354, 13, 20471, 13, 26796, 2599, 198, 220, 220, 220, 705, 7061, 12235, 28...
1.913208
265
from numpy import NaN import pandas as pd import unittest import numpy as np ''' The series.count function that we are testing does: Return number of non-NA/null observations in the Series. Parameters ---------- level : int or level name, default None If the axis is a MultiIndex (hierarc...
[ 6738, 299, 32152, 1330, 11013, 45, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 555, 715, 395, 198, 11748, 299, 32152, 355, 45941, 628, 220, 220, 220, 220, 198, 7061, 6, 198, 464, 2168, 13, 9127, 2163, 326, 356, 389, 4856, 857,...
2.671683
1,462
from flask import Flask , render_template, request, jsonify import Uni_To_Zg import Zg_To_Uni import Win_To_Uni import Uni_To_Win app = Flask(__name__) @app.route("/") @app.route("/about") @app.route("/convert", methods=["POST"]) @app.route("/zawgyitouni") @app.route("/convert1", methods=["POST"]) @app.route(...
[ 198, 6738, 42903, 1330, 46947, 837, 8543, 62, 28243, 11, 2581, 11, 33918, 1958, 198, 11748, 43376, 62, 2514, 62, 57, 70, 198, 11748, 1168, 70, 62, 2514, 62, 3118, 72, 198, 11748, 7178, 62, 2514, 62, 3118, 72, 198, 11748, 43376, 62, ...
2.296552
290
import asyncio from pathlib import Path import uvloop from terra_sdk.client.lcd import AsyncLCDClient from terra_sdk.client.lcd.api.tx import CreateTxOptions from terra_sdk.core.wasm import MsgExecuteContract, MsgInstantiateContract, MsgStoreCode from terra_sdk.key.mnemonic import MnemonicKey from terra_sdk.util.cont...
[ 11748, 30351, 952, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 334, 85, 26268, 198, 198, 6738, 1059, 430, 62, 21282, 74, 13, 16366, 13, 75, 10210, 1330, 1081, 13361, 5639, 35, 11792, 198, 6738, 1059, 430, 62, 21282, 74, 13, ...
2.845638
149
import threading import time from threading import Thread import numpy as np import pytest from ding.utils.data.structure import Cache @pytest.mark.unittest
[ 11748, 4704, 278, 198, 11748, 640, 198, 6738, 4704, 278, 1330, 14122, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 9288, 198, 198, 6738, 44852, 13, 26791, 13, 7890, 13, 301, 5620, 1330, 34088, 628, 198, 31, 9078, 9288, ...
3.354167
48
from click.testing import CliRunner import unittest from mock import patch, call, Mock from tests.cli import assert_exit_code from floyd.cli.experiment import delete from tests.cli.mocks import mock_exp, mock_task_inst, mock_access_token class TestExperimentDelete(unittest.TestCase): """ Tests Experiment CLI...
[ 6738, 3904, 13, 33407, 1330, 1012, 72, 49493, 198, 11748, 555, 715, 395, 198, 6738, 15290, 1330, 8529, 11, 869, 11, 44123, 198, 198, 6738, 5254, 13, 44506, 1330, 6818, 62, 37023, 62, 8189, 198, 6738, 781, 12192, 13, 44506, 13, 23100, ...
2.887142
1,081
import argparse from pathlib import Path, PurePath from shutil import copy import sys from grascii.appdirs import user_data_dir from grascii.config import APP_NAME description = "Install a Grascii Dictionary" DICTIONARY_PATH = Path(user_data_dir(APP_NAME), "dictionaries") def main() -> None: """Run the insta...
[ 198, 11748, 1822, 29572, 198, 6738, 3108, 8019, 1330, 10644, 11, 17129, 15235, 198, 6738, 4423, 346, 1330, 4866, 198, 11748, 25064, 198, 198, 6738, 1036, 292, 979, 72, 13, 1324, 15908, 82, 1330, 2836, 62, 7890, 62, 15908, 198, 6738, 1...
2.841837
196
from django import forms from django.contrib.admin import widgets from crispy_forms.helper import FormHelper from crispy_forms.bootstrap import FormActions, TabHolder, Tab from crispy_forms.layout import Layout, Div, Submit, HTML, Button, Row, Field from .models import Container, Channel, Transfer, Balance
[ 6738, 42625, 14208, 1330, 5107, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 28482, 1330, 40803, 198, 6738, 42807, 62, 23914, 13, 2978, 525, 1330, 5178, 47429, 198, 6738, 42807, 62, 23914, 13, 18769, 26418, 1330, 5178, 32, 2733, 11, 1690...
3.875
80
# coding: utf-8 import sys if sys.version_info[0:2] != (2, 6): raise Exception("Must use python 2.6") import os # Inner Reuse from inner_reuse.configurer import Configurer from inner_reuse import tic, toc # App from _code.gtest_runner import run_gtests RUNNER_TASK_FILE = os.sep.join(['_code', 'task_files', 'm...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 11748, 25064, 198, 198, 361, 25064, 13, 9641, 62, 10951, 58, 15, 25, 17, 60, 14512, 357, 17, 11, 718, 2599, 198, 220, 220, 220, 5298, 35528, 7203, 34320, 779, 21015, 362, 13, 21, 4943, 198, 1...
2.449198
187
import logging import sys import os import traceback import json from datetime import datetime import string import random from collections import OrderedDict import time import pickle from functools import partial import ipdb import torch from torch.utils.data import DataLoader import numpy as np import sklearn from...
[ 11748, 18931, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 12854, 1891, 198, 11748, 33918, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 4731, 198, 11748, 4738, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 11748, 640, 19...
2.612669
2,889
import logging import math import os import shutil import time import cv2 import imageio import numpy as np import scipy.sparse import tensorflow as tf import utils from lib import graph, mesh_renderer from lib.mesh_io import write_obj logger = logging.getLogger('x') class BaseModel(): """ Mesh Convolutional...
[ 11748, 18931, 198, 11748, 10688, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 640, 198, 198, 11748, 269, 85, 17, 198, 11748, 2939, 952, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 13, 82, 29572, 198, 11748, ...
2.202368
7,096
"""Functions for copying resources *between* filesystem. """ from __future__ import print_function, unicode_literals import typing from .errors import FSError from .opener import manage_fs from .path import abspath, combine, frombase, normpath from .tools import is_thread_safe from .walk import Walker if False: # ...
[ 37811, 24629, 2733, 329, 23345, 4133, 1635, 23395, 9, 29905, 13, 198, 37811, 198, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 11, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 19720, 198, 198, 6738, 764, 48277, 1330, 376, 5188, ...
2.232611
6,642
import numpy as np import pandas as pd import sys import minimize as mini import math # f(x, y) = 100(y-x²)² + (1-x)² mims = [] methods = ["newton", "BFGS", "gradient"] colors = ["darkblue", "yellow", "purple"] for i in range(len(methods)): mims.append(mini.Minimizer(f, 2, np.array([0, 0]))) mims[i].f_grad = ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 25064, 198, 11748, 17775, 355, 9927, 198, 11748, 10688, 198, 198, 2, 277, 7, 87, 11, 331, 8, 796, 1802, 7, 88, 12, 87, 31185, 8, 31185, 1343, 357, 16...
2.196774
310
#!/bin/python3 import math import os import random import re import sys from collections import defaultdict # Note the name of the file is based on this URL: # https://www.hackerrank.com/challenges/torque-and-development/problem # The problem name is "Roads and Libraries" if __name__ == '__main__': fptr = op...
[ 198, 2, 48443, 8800, 14, 29412, 18, 198, 198, 11748, 10688, 198, 11748, 28686, 198, 11748, 4738, 198, 11748, 302, 198, 11748, 25064, 198, 6738, 17268, 1330, 4277, 11600, 198, 198, 2, 5740, 262, 1438, 286, 262, 2393, 318, 1912, 319, 42...
2.495208
313
import aiohttp from enum import Enum from models.user import User
[ 11748, 257, 952, 4023, 198, 6738, 33829, 1330, 2039, 388, 198, 198, 6738, 4981, 13, 7220, 1330, 11787, 198 ]
3.526316
19
#!/usr/bin/env python # coding: utf-8 import argparse import logging from multiprocessing import Pool import pandas as pd import papermill as pm from pathlib import Path from tqdm import tqdm import warnings warnings.simplefilter(action='ignore', category=FutureWarning) for lib in ['blib2to3', 'papermill']: logger...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 11748, 1822, 29572, 198, 11748, 18931, 198, 6738, 18540, 305, 919, 278, 1330, 19850, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 3348, ...
2.381921
1,770
#!/usr/bin/env python3 """ Library providing convenient classes and methods for writing data to files. """ import logging import json import pickle try: import yaml except ImportError: yaml = None logger = logging.getLogger(__name__) # pylint: disable=invalid-name class Serializer(): """ Parent Seriali...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 198, 23377, 4955, 11282, 6097, 290, 5050, 329, 3597, 1366, 284, 3696, 13, 198, 37811, 198, 11748, 18931, 198, 11748, 33918, 198, 11748, 2298, 293, 198, 198, 28311, 25, 198, ...
2.572816
824
from bisect import bisect from datetime import datetime #Adapted from here https://stackoverflow.com/questions/33415475/how-to-get-current-date-and-time-from-gps-unsegment-time-in-python _LEAP_DATES = ((1981, 6, 30), (1982, 6, 30), (1983, 6, 30), (1985, 6, 30), (1987, 12, 31), (1989, 12, 31), ...
[ 6738, 47457, 478, 1330, 47457, 478, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 2, 48003, 276, 422, 994, 3740, 1378, 25558, 2502, 11125, 13, 785, 14, 6138, 507, 14, 31380, 21526, 2425, 14, 4919, 12, 1462, 12, 1136, 12, 14421, ...
2.133641
434
from typer import Typer from ...impl.utils import STORE, echo app = Typer() ALLOWED_KEYS = {"shell", "index"} @app.command("set") @app.command("reset")
[ 6738, 1259, 525, 1330, 7039, 525, 198, 198, 6738, 2644, 23928, 13, 26791, 1330, 3563, 6965, 11, 9809, 198, 198, 1324, 796, 7039, 525, 3419, 628, 198, 7036, 3913, 1961, 62, 7336, 16309, 796, 19779, 29149, 1600, 366, 9630, 20662, 628, 1...
2.711864
59
from __future__ import print_function import argparse import torch import torch.backends.cudnn as cudnn import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torchvision import datasets, transforms from torch.utils.data import Dataset, DataLoader from torch.utils.data.sampler import Sub...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 1822, 29572, 198, 11748, 28034, 198, 11748, 28034, 13, 1891, 2412, 13, 66, 463, 20471, 355, 269, 463, 20471, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, ...
1.919822
449
#!/usr/bin/env python3 """settings.py: detection module settings file """ __author__ = "Ahmed Hermas" __copyright__ = "Copyright 2022, © UOL " __license__ = "MIT" __version__ = "0.1.0" __email__ = "a7medhermas@gmail.com" MODELS_CONFIG = { 'hog' : {'loader':'_hog_loader', 'detector':'_getface_ho...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 37811, 33692, 13, 9078, 25, 13326, 8265, 6460, 2393, 37227, 198, 198, 834, 9800, 834, 796, 366, 10910, 1150, 2332, 5356, 1, 198, 834, 22163, 4766, 834, 796, 366, 15269, 33160,...
2.029326
341
# -*- coding: utf-8 -*- from ... import arquivos from . import blocos from . import registros from .blocos import Bloco0 from .blocos import Bloco1 from .blocos import Bloco9 from .blocos import BlocoA from .blocos import BlocoC from .blocos import BlocoD from .blocos import BlocoF from .blocos import BlocoI from .blo...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 2644, 1330, 610, 421, 452, 418, 198, 6738, 764, 1330, 24003, 418, 198, 6738, 764, 1330, 4214, 4951, 198, 6738, 764, 2436, 420, 418, 1330, 1086, 25634, 15, 1...
2.825806
155
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'register_dia.ui' # # Created by: PyQt5 UI code generator 5.11.2 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets from background import *
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 201, 198, 2, 5178, 7822, 7560, 422, 3555, 334, 72, 2393, 705, 30238, 62, 67, 544, 13, 9019, 6, 201, 198, 2, 201, 198, 2, 15622, 416, 25, 9485, 48, 83, 20, 1...
2.701923
104
import os,sys,time,json import win32api,win32con import config steam_screenshot_dir = config.get_config('steam_screenshot_dir') if __name__ == '__main__': time.sleep(3) snapscreen() time.sleep(0.5) print(get_raw_location())
[ 11748, 28686, 11, 17597, 11, 2435, 11, 17752, 198, 11748, 1592, 2624, 15042, 11, 5404, 2624, 1102, 198, 11748, 4566, 198, 198, 21465, 62, 1416, 26892, 62, 15908, 796, 4566, 13, 1136, 62, 11250, 10786, 21465, 62, 1416, 26892, 62, 15908, ...
2.520833
96
# individual network settings for each actor + critic pair # see networkforall for details from networkforall import Network from utilities import hard_update, gumbel_softmax, onehot_from_logits from torch.optim import Adam import torch import numpy as np # add OU noise for exploration from OUNoise import OUNoise #...
[ 2, 1981, 3127, 6460, 329, 1123, 8674, 1343, 4014, 5166, 198, 2, 766, 3127, 1640, 439, 329, 3307, 198, 198, 6738, 3127, 1640, 439, 1330, 7311, 198, 6738, 20081, 1330, 1327, 62, 19119, 11, 308, 2178, 417, 62, 4215, 9806, 11, 530, 8940...
3.561404
114
"""This module is intended to safety import Windows-specific features from `ctypes` stdlib module on non-windows platform -- they are replaced by mock objects. Despite the code which uses that features becomes partially unoperable in this case, we can import it and generate documentation for instance """ import warning...
[ 37811, 1212, 8265, 318, 5292, 284, 3747, 1330, 3964, 12, 11423, 3033, 198, 6738, 4600, 310, 9497, 63, 14367, 8019, 8265, 319, 1729, 12, 28457, 3859, 1377, 484, 389, 198, 260, 21820, 416, 15290, 5563, 13, 7945, 262, 2438, 543, 3544, 32...
3.263889
216
from metaflow.decorators import StepDecorator
[ 6738, 1138, 1878, 9319, 13, 12501, 273, 2024, 1330, 5012, 10707, 273, 1352, 628 ]
3.357143
14
import matplotlib.pyplot as plt import json import os from collections import Counter import pandas as pd DATASET_DIR = 'datasets' EXPERIMENT_DIR = 'combfreq' RESULTS = os.path.join(DATASET_DIR, EXPERIMENT_DIR, 'simulation_results_scaled_tf.json') RESULTS_EXTENDED = os.path.join(DATASET_DIR, EXPERIMENT_DIR, 'simulat...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 33918, 198, 11748, 28686, 198, 6738, 17268, 1330, 15034, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 35, 1404, 1921, 2767, 62, 34720, 796, 705, 19608, 292, ...
2.706587
334
# Copyright 2015 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
[ 2, 220, 220, 220, 15069, 1853, 8180, 10501, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, 428, 2393, 2845, 287, 11846...
3.464
250
# stdlib import argparse import logging import logging.config import signal import sys import os # third party lib import requests # Internal lib from client.lib import shared from lib import settings import worker from worker import factory from lib.logging_config import return_client_config # Routes server_host =...
[ 2, 14367, 8019, 198, 11748, 1822, 29572, 198, 11748, 18931, 198, 11748, 18931, 13, 11250, 198, 11748, 6737, 198, 11748, 25064, 198, 11748, 28686, 198, 198, 2, 2368, 2151, 9195, 198, 11748, 7007, 198, 198, 2, 18628, 9195, 198, 6738, 5456...
3.528
125
from .cdn import return_cdn_avatar # Set interaction opcodes DISPATCH = 0 HEARTBEAT = 1 IDENTIFY = 2 RESUME = 6 RECONNECT = 7 INVALID_SESSION = 9 HELLO = 10 HEARTBEAT_ACK = 11 # Set application command types SLASH = 2 USER = 2 MESSAGE = 3 # Set message response types CHANNEL_WITH_SOURCE = 4 DEFERRED_CHANNEL_WITH_SOU...
[ 6738, 764, 32341, 1330, 1441, 62, 32341, 62, 615, 9459, 198, 198, 2, 5345, 10375, 1034, 40148, 198, 26288, 47, 11417, 796, 657, 198, 13909, 7227, 12473, 1404, 796, 352, 198, 25256, 5064, 56, 796, 362, 198, 19535, 38340, 796, 718, 198,...
2.433526
173