content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from os.path import join from re import sub from typing import Dict, List, Optional, Tuple, Union from urllib import parse from monzo.authentication import Authentication from monzo.exceptions import MonzoAuthenticationError SCRIPT_MAP = { '/': 'index', '/auth_step_one.html': 'auth_step_one', '/auth_step_...
[ 6738, 28686, 13, 6978, 1330, 4654, 198, 6738, 302, 1330, 850, 198, 6738, 19720, 1330, 360, 713, 11, 7343, 11, 32233, 11, 309, 29291, 11, 4479, 198, 6738, 2956, 297, 571, 1330, 21136, 198, 198, 6738, 937, 10872, 13, 41299, 3299, 1330, ...
2.206677
3,295
######## # This file is to keep track of the saved *.pkl model files. Each entry should have the following: # 1. A parameter dictionary # 2. The name of the file to load params_to_info = dict( s64d64_v1_params = dict( op3_args = dict( refinement_model_type = "size_dependent_conv", ...
[ 198, 7804, 198, 2, 770, 2393, 318, 284, 1394, 2610, 286, 262, 7448, 46866, 79, 41582, 2746, 3696, 13, 5501, 5726, 815, 423, 262, 1708, 25, 198, 2, 352, 13, 317, 11507, 22155, 198, 2, 362, 13, 383, 1438, 286, 262, 2393, 284, 3440, ...
2.025397
315
import sqlite3 class Datastore(): """This class represents data-storage object. The Datastore will store all the account information for food and miscellaneous accounts. Attributes: _conn (sqlite3.Connection): A sqlite3.Connection object that represents the database _cursor (sqlite3....
[ 11748, 44161, 578, 18, 628, 198, 4871, 16092, 459, 382, 33529, 198, 220, 220, 220, 37227, 1212, 1398, 6870, 1366, 12, 35350, 2134, 13, 628, 220, 220, 220, 383, 16092, 459, 382, 481, 3650, 477, 262, 1848, 1321, 329, 198, 220, 220, 22...
2.293785
3,009
#!/usr/bin/env python # -*- coding: utf-8 -*- import os from pynvim import Nvim def confirm(vim: Nvim, msg: str) -> bool: """Confirm action.""" option: int = vim.call("confirm", msg, "&Yes\n&No") return option == 1 def echomsg(vim: Nvim, msg: str, label: str = "") -> None: """Vim echomsg.""" la...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 28686, 198, 6738, 279, 2047, 31124, 1330, 399, 31124, 628, 198, 4299, 6216, 7, 31124, 25, 399, 31124, 11, ...
2.35023
434
from django.shortcuts import render from django.contrib.auth.decorators import login_required @login_required def terminal(request): """Render a simple page with a terminal.""" return render(request, 'terminal/terminal.html')
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 12501, 273, 2024, 1330, 17594, 62, 35827, 628, 198, 31, 38235, 62, 35827, 198, 4299, 12094, 7, 25927, 2599, 198, 220, 220, 220, 3...
3.385714
70
import sys input = sys.stdin.readline t = int(input()) for ti in range(t): n = int(input()) count = [0] * 51 arr = list(map(int, input().split())) for i in arr: count[i] += 1 ans = 0 for i in range(2, n + 1): cur = 0 for j in range(1, (i + 1) // 2 + 1): if i - j != j: ...
[ 11748, 25064, 198, 15414, 796, 25064, 13, 19282, 259, 13, 961, 1370, 198, 198, 83, 796, 493, 7, 15414, 28955, 198, 1640, 46668, 287, 2837, 7, 83, 2599, 198, 220, 220, 220, 299, 796, 493, 7, 15414, 28955, 198, 220, 220, 220, 954, 7...
1.882813
256
# claude low level library import numpy as np cimport numpy as np ctypedef np.float64_t DTYPE_f sigma = 5.67E-8 # define various useful differential functions: # gradient of scalar field a in the local x direction at point i,j elif i == nlat-1: return 2*(a[i,j]-a[i-1,j])/dy else: return (a[i+1,j]-a[i-1,j])/dy ...
[ 2, 26435, 2507, 1877, 1241, 5888, 198, 198, 11748, 299, 32152, 355, 45941, 198, 66, 11748, 299, 32152, 355, 45941, 198, 198, 310, 4464, 276, 891, 45941, 13, 22468, 2414, 62, 83, 360, 25216, 62, 69, 198, 82, 13495, 796, 642, 13, 3134...
1.884211
475
# This file is part of Charlton # Copyright (C) 2011 Nathaniel Smith <njs@pobox.com> # See file COPYING for license information. # This file has the code that figures out how each factor in some given Term # should be coded. This is complicated by dealing with models with categorical # factors like: # 1 + a + a:b # ...
[ 2, 770, 2393, 318, 636, 286, 6258, 1122, 198, 2, 15069, 357, 34, 8, 2813, 49536, 4176, 1279, 77, 8457, 31, 79, 672, 1140, 13, 785, 29, 198, 2, 4091, 2393, 27975, 45761, 329, 5964, 1321, 13, 198, 198, 2, 770, 2393, 468, 262, 2438...
3.746032
441
# -*- coding: utf-8 -*- """ Created on Sat Dec 26 18:56:35 2015 Spam Detection on Email Dataset Provided in:- [1] Almeida, T.A., Gómez Hidalgo, J.M., Yamakami, A. Contributions to the study of SMS Spam Filtering: New Collection and Results. Proceedings of the 2011 ACM Symposium on Document Engineering (ACM DOCENG'11)...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 7031, 4280, 2608, 1248, 25, 3980, 25, 2327, 1853, 198, 198, 4561, 321, 46254, 319, 9570, 16092, 292, 316, 29750, 287, 21912, 198, 58, 16, 60, 9...
2.668351
1,583
from datetime import timedelta from flask import Flask, jsonify, make_response from flask_restful import Resource, Api from flask_cors import CORS, cross_origin # from flask_jwt import JWT, JWTError from flask_jwt_extended import JWTManager # from security import authenticate, identity from config.config import DevConf...
[ 6738, 4818, 8079, 1330, 28805, 12514, 198, 6738, 42903, 1330, 46947, 11, 33918, 1958, 11, 787, 62, 26209, 198, 6738, 42903, 62, 2118, 913, 1330, 20857, 11, 5949, 72, 198, 6738, 42903, 62, 66, 669, 1330, 327, 20673, 11, 3272, 62, 47103...
2.863905
1,014
# Plugin Hisense AС (AEH-W4A1) # # Author: X-Th-Unicorn # """ <plugin key="aehw4a1" name="Hisense AС (AEH-W4A1)" author="x-th-unicorn" version="1.0.0"> <description> <h2>Hisense AС (AEH-W4A1)</h2><br/> <h3>Features</h3> <ul style="list-style-type:square"> <li>On/Off</li> ...
[ 2, 42636, 2399, 1072, 317, 140, 94, 357, 14242, 39, 12, 54, 19, 32, 16, 8, 198, 2, 198, 2, 6434, 25, 1395, 12, 817, 12, 3118, 291, 1211, 198, 2, 198, 37811, 198, 27, 33803, 1994, 2625, 3609, 36599, 19, 64, 16, 1, 1438, 2625, ...
1.930741
1,646
# Generated by Django 3.0.5 on 2020-08-03 15:19 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, 513, 13, 15, 13, 20, 319, 12131, 12, 2919, 12, 3070, 1315, 25, 1129, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14...
3.04918
61
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-12-20 20:51 from __future__ import unicode_literals import django.contrib.postgres.fields 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, 1157, 13, 19, 319, 2177, 12, 1065, 12, 1238, 1160, 25, 4349, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.811594
69
import os import numpy as np import json from PIL import Image def detect_red_light_simple(I): ''' This function takes a numpy array <I> and returns a list <bounding_boxes>. The list <bounding_boxes> should have one element for each red light in the image. Each element of <bounding_boxes> should itsel...
[ 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 33918, 198, 6738, 350, 4146, 1330, 7412, 198, 198, 4299, 4886, 62, 445, 62, 2971, 62, 36439, 7, 40, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 770, 2163, 27...
2.299814
3,232
from typing import List import torch from torch import nn, Tensor from MIMBlock import MIMBlock from SpatiotemporalLSTM import SpatiotemporalLSTM __all__ = ["MIM"] # if __name__ == '__main__': # mim = MIM(in_channels=1, hidden_channels_list=[4, 4, 4, 4], kernel_size_list=[3, 3, 3, 3]).to("cuda") # inputs ...
[ 6738, 19720, 1330, 7343, 198, 198, 11748, 28034, 198, 6738, 28034, 1330, 299, 77, 11, 309, 22854, 198, 198, 6738, 337, 3955, 12235, 1330, 337, 3955, 12235, 198, 6738, 1338, 265, 5151, 368, 35738, 43, 2257, 44, 1330, 1338, 265, 5151, 3...
2.338384
198
# -*- coding: utf-8 -*- """ Created on Fri Nov 09 18:14:31 2018 @author: techietrader """ import torch # Define the model
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 19480, 5267, 7769, 1248, 25, 1415, 25, 3132, 2864, 198, 198, 31, 9800, 25, 7261, 1155, 81, 5067, 198, 37811, 628, 198, 11748, 28034, 628, 198, ...
2.56
50
from dateutil.relativedelta import relativedelta from kardboard.models import Kard, ReportGroup, FlowReport, DailyRecord from kardboard.util import make_start_date, make_end_date, average, standard_deviation if __name__ == "__main__": import sys try: data = weekly_moving_data(sys.argv[2], sys....
[ 6738, 3128, 22602, 13, 2411, 265, 1572, 12514, 1330, 48993, 1572, 12514, 198, 6738, 479, 446, 3526, 13, 27530, 1330, 37875, 11, 6358, 13247, 11, 27782, 19100, 11, 6714, 23739, 198, 6738, 479, 446, 3526, 13, 22602, 1330, 787, 62, 9688, ...
2.656627
166
#coding: utf8 #the code is really slow #pypy is recommended import sys,math,random reload(sys) sys.setdefaultencoding('utf-8') import json t=open('op2.txt','r').read() t=t.replace('提高','提高组') t=t.replace('普及','普及组') o=json.loads(t) o.sort(key=lambda g:-g[6]) for g in range(0,len(o)): o[g].append('BL') f=open('data....
[ 2, 66, 7656, 25, 3384, 69, 23, 198, 2, 1169, 2438, 318, 1107, 3105, 198, 2, 79, 4464, 88, 318, 7151, 198, 11748, 25064, 11, 11018, 11, 25120, 198, 260, 2220, 7, 17597, 8, 198, 17597, 13, 2617, 12286, 12685, 7656, 10786, 40477, 12,...
2
239
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import import logging import os from collections import defaultdict import importlib import pkg_resources import typing from builtins import object import inspect from typing i...
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 11748, 18931, 198, ...
2.870997
1,093
import dramatiq from dramatiq.brokers.redis import RedisBroker from pastetape.core.config import settings redis_broker = RedisBroker(host=settings.REDIS_HOST, port=settings.REDIS_PORT, db=settings.REDIS_DB) dramatiq.set_broker(redis_broker)
[ 11748, 4850, 7246, 80, 198, 6738, 4850, 7246, 80, 13, 7957, 15949, 13, 445, 271, 1330, 2297, 271, 15783, 6122, 198, 198, 6738, 1613, 316, 1758, 13, 7295, 13, 11250, 1330, 6460, 198, 198, 445, 271, 62, 7957, 6122, 796, 2297, 271, 157...
2.67033
91
import os from lxml import etree from apisummariser.helper import filefunctions from summarise import Summariser
[ 11748, 28686, 198, 6738, 300, 19875, 1330, 2123, 631, 198, 198, 6738, 2471, 271, 388, 3876, 5847, 13, 2978, 525, 1330, 2393, 12543, 2733, 198, 6738, 15676, 786, 1330, 5060, 3876, 5847, 628 ]
3.484848
33
from bitmovin.utils import Serializable
[ 6738, 1643, 76, 709, 259, 13, 26791, 1330, 23283, 13821, 628 ]
3.727273
11
from unittest import TestCase import numpy as np from scvi.dataset import ( SyntheticDataset, SyntheticRandomDataset, SyntheticDatasetCorr, ZISyntheticDatasetCorr, ) from .utils import unsupervised_training_one_epoch
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 629, 8903, 13, 19608, 292, 316, 1330, 357, 198, 220, 220, 220, 26375, 6587, 27354, 292, 316, 11, 198, 220, 220, 220, 26375, 6587, 29531, ...
2.622222
90
from testUtils.Tester import Tester from sys import argv if __name__ == '__main__': main()
[ 6738, 1332, 18274, 4487, 13, 51, 7834, 1330, 309, 7834, 198, 6738, 25064, 1330, 1822, 85, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419 ]
2.794118
34
''' This class handles all the data retrieval and standardizes the data for all technical analyses ''' import websocket import requests import json # For web connectivity from abc import ABC, abstractmethod # Abstract class module for python. import alpaca_trade_api as tradeapi from dataclasses import dataclass # P...
[ 7061, 6, 198, 1212, 1398, 17105, 477, 262, 1366, 45069, 290, 3210, 4340, 262, 1366, 329, 477, 6276, 13523, 198, 7061, 6, 198, 198, 11748, 2639, 5459, 198, 11748, 7007, 198, 11748, 33918, 220, 1303, 1114, 3992, 19843, 198, 6738, 450, 6...
2.508097
494
#!/usr/bin/env python # Run this with the python from the CodaLab virtual environment # import sys import os.path import os import random import datetime from django.utils import timezone # This is a really, really long way around saying that if the script is in # codalab\scripts\users.py, we need to add, ../../../cod...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 5660, 428, 351, 262, 21015, 422, 262, 327, 11329, 17822, 7166, 2858, 198, 2, 198, 198, 11748, 25064, 198, 11748, 28686, 13, 6978, 198, 11748, 28686, 198, 11748, 4738, 198, 11748, 48...
2.55564
6,587
import time from datetime import datetime from dateutil import tz from tzlocal import get_localzone from watchdog.observers import Observer from watchdog.events import FileSystemEventHandler import os.path import detectionAPI from pathlib import Path class watchDOG: """ [Is responsible for monitoring the events i...
[ 11748, 640, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 3128, 22602, 1330, 256, 89, 198, 6738, 256, 89, 12001, 1330, 651, 62, 12001, 11340, 198, 6738, 26856, 13, 672, 2655, 690, 1330, 27058, 198, 6738, 26856, 13, 31534, 1330, ...
2.867525
1,087
# # This file is part of the PyMeasure package. # # Copyright (c) 2013-2022 PyMeasure Developers # # 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 limit...
[ 2, 198, 2, 770, 2393, 318, 636, 286, 262, 9485, 47384, 5301, 13, 198, 2, 198, 2, 15069, 357, 66, 8, 2211, 12, 1238, 1828, 9485, 47384, 34152, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048,...
3.028668
2,372
# In the previous problem Chandu bought some unsorted arrays and sorted them (in non-increasing order). Now, he has many sorted arrays to give to his girlfriend. But, the number of sorted arrays are very large so Chandu decided to merge two sorted arrays into one sorted array. But he is too lazy to do that. So, he aske...
[ 2, 554, 262, 2180, 1917, 20631, 84, 5839, 617, 5576, 9741, 26515, 290, 23243, 606, 357, 259, 1729, 12, 42647, 1502, 737, 2735, 11, 339, 468, 867, 23243, 26515, 284, 1577, 284, 465, 11077, 13, 887, 11, 262, 1271, 286, 23243, 26515, 3...
4.065574
244
#------------------------------------------------------------------------------- #Import function and class use in start variables #------------------------------------------------------------------------------- from util import clear,input_validation_list from checker import Checker from position import Position #----...
[ 2, 10097, 24305, 198, 2, 20939, 2163, 290, 1398, 779, 287, 923, 9633, 198, 2, 10097, 24305, 198, 6738, 7736, 1330, 1598, 11, 15414, 62, 12102, 341, 62, 4868, 198, 6738, 2198, 263, 1330, 6822, 263, 198, 6738, 2292, 1330, 23158, 198, ...
9.672131
61
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import *
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 33918, 198, 198, 6738, 435, 541, 323, 13, 64, 404, 13, 15042, 13, 9979, 415, 13, 22973, 34184, 1187, 1330, 163...
2.446809
47
import unittest from pandas import DataFrame from my_lambdata.states_oop import DataFrameProcessor if __name__ == "__main__": unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 19798, 292, 1330, 6060, 19778, 198, 6738, 616, 62, 2543, 65, 7890, 13, 27219, 62, 11224, 1330, 6060, 19778, 18709, 273, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220,...
2.921569
51
from __future__ import print_function import timeit import numpy import pickle import os import copy from keras.models import Sequential, Model, load_model from keras.layers import * from keras.layers.merge import * from keras.layers.embeddings import Embedding from keras.layers.recurrent import GRU from keras.layers.w...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 640, 270, 198, 11748, 299, 32152, 198, 11748, 2298, 293, 198, 11748, 28686, 198, 11748, 4866, 198, 6738, 41927, 292, 13, 27530, 1330, 24604, 1843, 11, 9104, 11, 3440, 62, 19849,...
2.796813
502
# Pessoa: Use um dicionario para armazenar informacoes sobre uma pessoa que voce conheca. Armazene seu primeiro nome, o sobrenome, a idade e a cidade em que ela vive. Voce devera ter chaves como first_name, last_name, age e city. print("=="*20) print(" PESSOA QUE CONHECO") print("=="*20) people = {} people["fir...
[ 2, 350, 408, 12162, 25, 5765, 23781, 288, 47430, 4982, 31215, 3211, 1031, 268, 283, 4175, 330, 3028, 523, 4679, 334, 2611, 279, 408, 12162, 8358, 7608, 344, 369, 258, 6888, 13, 7057, 1031, 1734, 384, 84, 6994, 7058, 299, 462, 11, 26...
2.510549
237
#while #x= #x+= #x=not x=-
[ 2, 4514, 198, 2, 87, 28, 198, 2, 87, 47932, 198, 2, 87, 28, 1662, 198, 87, 10779 ]
1.444444
18
""" Python module to interface with MiPow PlayBulbs lamps it requires "BluePy" to be installed. See https://github.com/IanHarvey/bluepy - install it from source and depending on your python version and system you might need to make a symlink such as for example: sudo ln -s /usr/local/lib/python3.5/dist-packages/bl...
[ 37811, 198, 37906, 8265, 284, 7071, 351, 13756, 47, 322, 3811, 33481, 1443, 32209, 198, 198, 270, 4433, 366, 14573, 20519, 1, 284, 307, 6589, 13, 4091, 3740, 1378, 12567, 13, 785, 14, 37776, 13587, 3304, 14, 17585, 9078, 220, 532, 272...
2.807018
684
import random from collections import deque import torch import numpy as np
[ 198, 11748, 4738, 198, 6738, 17268, 1330, 390, 4188, 198, 11748, 28034, 198, 11748, 299, 32152, 355, 45941, 198, 220, 220, 220, 220, 198 ]
3.416667
24
from airflow import DAG from airflow.operators.bash_operator import BashOperator from datetime import datetime as dt from datetime import timedelta default_args = { 'owner': 'bereket', 'depends_on_past': False, 'email': ['bekakibru2@gmail.com'], 'email_on_failure': True, 'email_on_retry': True, ...
[ 6738, 45771, 1330, 360, 4760, 198, 6738, 45771, 13, 3575, 2024, 13, 41757, 62, 46616, 1330, 15743, 18843, 1352, 198, 6738, 4818, 8079, 1330, 4818, 8079, 355, 288, 83, 198, 6738, 4818, 8079, 1330, 28805, 12514, 198, 198, 12286, 62, 22046...
2.312775
454
"""YOLOv5-specific modules Usage: $ python path/to/models/yolo.py --cfg yolov5s.yaml """ import argparse import logging import sys from copy import deepcopy from pathlib import Path FILE = Path(__file__).resolve() ROOT = FILE.parents[2] # YOLOv5 root directory if str(ROOT) not in sys.path: sys.path.append(s...
[ 37811, 56, 3535, 46, 85, 20, 12, 11423, 13103, 198, 198, 28350, 25, 198, 220, 220, 220, 720, 21015, 3108, 14, 1462, 14, 27530, 14, 88, 14057, 13, 9078, 1377, 37581, 331, 349, 709, 20, 82, 13, 88, 43695, 198, 37811, 198, 198, 11748...
1.715209
2,012
import os import sys import subprocess from Bio import SeqIO import traceback try: sys.path.append(snakemake.config['args']['mcc_path']) import scripts.mccutils as mccutils import scripts.fix_fasta as fix_fasta except Exception as e: track = traceback.format_exc() print(track, file=sys.stderr) p...
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 850, 14681, 198, 6738, 16024, 1330, 1001, 80, 9399, 198, 11748, 12854, 1891, 198, 28311, 25, 198, 220, 220, 220, 25064, 13, 6978, 13, 33295, 7, 16184, 539, 15883, 13, 11250, 17816, 22046, 6, ...
2.528846
208
import numpy as np np.set_printoptions(linewidth=np.inf, threshold=32, edgeitems=10)
[ 198, 11748, 299, 32152, 355, 45941, 198, 37659, 13, 2617, 62, 4798, 25811, 7, 2815, 413, 5649, 28, 37659, 13, 10745, 11, 11387, 28, 2624, 11, 5743, 23814, 28, 940, 8 ]
2.741935
31
# This file is part of the MapProxy project. # Copyright (C) 2010 Omniscale <http://omniscale.de> # # 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, 770, 2393, 318, 636, 286, 262, 9347, 44148, 1628, 13, 198, 2, 15069, 357, 34, 8, 3050, 31816, 2304, 1000, 1279, 4023, 1378, 296, 77, 2304, 1000, 13, 2934, 29, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, ...
3.291262
412
# This is not needed if the trackintel library is installed. ================== import sys sys.path.append("..") sys.path.append("../trackintel") # ============================================================================= import logging import matplotlib.pyplot as plt import trackintel as ti logging.basicConfi...
[ 2, 770, 318, 407, 2622, 611, 262, 2610, 48779, 5888, 318, 6589, 13, 36658, 28, 198, 11748, 25064, 198, 198, 17597, 13, 6978, 13, 33295, 7203, 492, 4943, 198, 17597, 13, 6978, 13, 33295, 7203, 40720, 11659, 48779, 4943, 198, 2, 38093, ...
2.655838
985
from __future__ import annotations from abc import ABC, abstractmethod from typing import Union, Mapping, Iterable, Optional from boltons.iterutils import flatten from libcst import MetadataWrapper from snakepack.analyzers import Analyzer from snakepack.analyzers._base import SubjectAnalyzer from snakepack.assets i...
[ 6738, 11593, 37443, 834, 220, 1330, 37647, 198, 198, 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 198, 6738, 19720, 1330, 4479, 11, 337, 5912, 11, 40806, 540, 11, 32233, 198, 198, 6738, 18100, 684, 13, 2676, 26791, 1330, 27172, 268, 1...
4.020408
98
#!/usr/bin/python # -*- coding: UTF-8 -*- import numpy as np import csv from sys import argv import os import operator from functools import reduce if __name__=='__main__': working_path=os.path.abspath(os.curdir) merge(working_path+'/'+argv[1],working_path+'/'+argv[1]+'/'+argv[2])
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 269, 21370, 198, 6738, 25064, 1330, 1822, 85, 198, 11748, 28686, 198, 11748, 10088, 198,...
2.394958
119
from NIENV import * # API METHODS # self.main_widget <- access to main widget # Ports # self.input(index) <- access to input data # self.set_output_val(self, index, val) <- set output data port value # self.exec_output(index) <- executes an execution output # self.create_ne...
[ 6738, 24947, 1677, 53, 1330, 1635, 628, 198, 2, 7824, 337, 36252, 50, 198, 198, 2, 2116, 13, 12417, 62, 42655, 220, 220, 220, 220, 220, 220, 220, 24293, 1895, 284, 1388, 26295, 628, 198, 2, 30824, 198, 2, 2116, 13, 15414, 7, 9630,...
2.853583
321
#!/usr/bin/env python # -*- coding: utf-8 -*- from joblib import Parallel, delayed import itertools if __name__ == '__main__': main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 1693, 8019, 1330, 42945, 11, 11038, 198, 11748, 340, 861, 10141, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834,...
2.574074
54
import math from collections import namedtuple import numpy as np from ws.RLAgents.E_SelfPlay.search.cache2_mgt import cache2_mgt
[ 198, 11748, 10688, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 266, 82, 13, 7836, 10262, 658, 13, 36, 62, 24704, 11002, 13, 12947, 13, 23870, 17, 62, 11296, 83, 1330, 12940, 17, ...
2.913043
46
#!/usr/bin/env python3 # The MIT License (MIT) # ===================== # # Copyright © 2020 Azavea # # 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 ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 383, 17168, 13789, 357, 36393, 8, 198, 2, 36658, 1421, 198, 2, 198, 2, 15069, 10673, 12131, 7578, 1015, 64, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286,...
2.130272
2,940
import binance_data_load as BDL import torch import torch.nn as nn import matplotlib.pyplot as plt from sklearn import preprocessing from sklearn.metrics import mean_absolute_error from datetime import datetime import time import numpy as np api_key = "" secret = "" t_frame = '1d' # 1m, 15m, 30m, 1h, 12h...
[ 11748, 9874, 590, 62, 7890, 62, 2220, 355, 347, 19260, 201, 198, 11748, 28034, 201, 198, 11748, 28034, 13, 20471, 355, 299, 77, 201, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 201, 198, 6738, 1341, 35720, 1330, 662,...
2.201428
1,961
import pytest import numpy as np from gamtools import main
[ 11748, 12972, 9288, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 9106, 31391, 1330, 1388, 628, 628, 628 ]
3.555556
18
from config import Config from project import create_app from waitress import serve config = Config() app = create_app(config) if __name__ == '__main__': # Prod env serve(app, host=app.config['HOST'], port=app.config['PORT']) # Development env #app.run(debug=app.config['DEBUG'], host=app.config['HOST...
[ 6738, 4566, 1330, 17056, 198, 6738, 1628, 1330, 2251, 62, 1324, 198, 6738, 44511, 1330, 4691, 198, 198, 11250, 796, 17056, 3419, 198, 1324, 796, 2251, 62, 1324, 7, 11250, 8, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834,...
2.837398
123
import torch import torch.nn as nn import torch.nn.functional as F from mmcv.runner import load_checkpoint from mmedit.models.common import make_layer, pixel_unshuffle from mmedit.models.registry import BACKBONES from mmedit.utils import get_root_logger def get_padding_functions(x, padding=7): """Generate paddin...
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 6738, 8085, 33967, 13, 16737, 1330, 3440, 62, 9122, 4122, 198, 198, 6738, 285, 1150, 270, 13, 27530, 13, 11321, 1330, 78...
2.421134
3,227
#!/usr/bin/env python3 import unittest import numpy as np if __name__ == '__main__': unittest.main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 555, 715, 395, 198, 11748, 299, 32152, 355, 45941, 628, 198, 220, 220, 220, 220, 220, 220, 220, 220, 628, 220, 220, 220, 220, 220, 220, 220, 220, 198, 198, 361, 115...
1.970149
67
from __future__ import absolute_import, unicode_literals from collections import OrderedDict, namedtuple from virtualenv.create.describe import Describe from virtualenv.create.via_global_ref.builtin.builtin_way import VirtualenvBuiltin from .base import ComponentBuilder CreatorInfo = namedtuple("CreatorInfo", ["key...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 11, 3706, 83, 29291, 198, 198, 6738, 7166, 24330, 13, 17953, 13, 20147, 4892, 1330, 39373, 4892, 198, ...
3.327434
113
import re t="""int foo() { }""" print(t); #print( re.sub(r')\n {',')\n {\n xxxx',t,re.M) );
[ 11748, 302, 198, 198, 83, 2625, 15931, 600, 22944, 3419, 198, 220, 220, 220, 1391, 198, 92, 37811, 198, 198, 4798, 7, 83, 1776, 198, 198, 2, 4798, 7, 302, 13, 7266, 7, 81, 11537, 59, 77, 220, 220, 220, 1391, 3256, 11537, 59, 77,...
1.6875
64
"""Stripped-down version of view_wow.py that only calculates print time. No dependencies. Does not eat all your RAM / graphics RAM, either.""" import datetime import re import struct import sys def match_code(code:str, raw_line:bytes)->bool: """returns True if code is met at the beginning of the line.""" line ...
[ 37811, 1273, 380, 1496, 12, 2902, 2196, 286, 1570, 62, 42773, 13, 9078, 326, 691, 43707, 3601, 640, 13, 1400, 20086, 13, 8314, 407, 4483, 477, 534, 13931, 1220, 9382, 13931, 11, 2035, 526, 15931, 198, 11748, 4818, 8079, 198, 11748, 30...
1.983756
1,970
import datetime import os import pytest from dotenv import load_dotenv from pathlib import Path import json import osutools load_dotenv() token = os.environ["OSU_V1_TOKEN"] @pytest.fixture(scope="module", autouse=True)
[ 11748, 4818, 8079, 198, 11748, 28686, 198, 11748, 12972, 9288, 198, 6738, 16605, 24330, 1330, 3440, 62, 26518, 24330, 198, 6738, 3108, 8019, 1330, 10644, 198, 11748, 33918, 198, 198, 11748, 28686, 315, 10141, 198, 198, 2220, 62, 26518, 24...
2.839506
81
from typing import Callable, Tuple import jax.numpy as jnp import flax.linen as nn from ..layers import PatchEmbedBlock, AddAbsPosEmbed, AttentionBlock, SelfAttentionBlock from ..layers import LayerScaleBlock, StochasticDepthBlock, FFBlock
[ 6738, 19720, 1330, 4889, 540, 11, 309, 29291, 198, 198, 11748, 474, 897, 13, 77, 32152, 355, 474, 37659, 198, 11748, 781, 897, 13, 2815, 268, 355, 299, 77, 198, 198, 6738, 11485, 75, 6962, 1330, 17106, 31567, 276, 12235, 11, 3060, 2...
3.293333
75
#!/usr/bin/env python3.4 -i ##MIT License ## ##Copyright (c) 2018 Douglas E. Moore ## ##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 ri...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 13, 19, 532, 72, 198, 198, 2235, 36393, 13789, 198, 2235, 198, 2235, 15269, 357, 66, 8, 2864, 15796, 412, 13, 8877, 198, 2235, 198, 2235, 5990, 3411, 318, 29376, 7520, 11, 1479, 286, ...
2.383194
1,678
""" Predicting potential dopants """ import warnings import numpy as np from pymatgen.analysis.structure_prediction.substitution_probability import \ SubstitutionPredictor from pymatgen.core.periodic_table import Specie, Element def get_dopants_from_substitution_probabilities(structure, num_dopants=5, ...
[ 37811, 198, 47, 17407, 278, 2785, 22340, 1187, 198, 37811, 198, 198, 11748, 14601, 198, 11748, 299, 32152, 355, 45941, 628, 198, 6738, 279, 4948, 265, 5235, 13, 20930, 13, 301, 5620, 62, 28764, 2867, 13, 7266, 301, 2738, 62, 1676, 65,...
2.319385
3,250
import pygame import random import math #initialize the pygame pygame.init() #creating a screen screen = pygame.display.set_mode((800,600)) #background background = pygame.image.load('space.jpg') #title and icon pygame.display.set_caption("supergame") icon = pygame.image.load('dud.png') pygame.display...
[ 11748, 12972, 6057, 201, 198, 11748, 4738, 201, 198, 11748, 10688, 201, 198, 201, 198, 2, 36733, 1096, 262, 12972, 6057, 201, 198, 9078, 6057, 13, 15003, 3419, 201, 198, 2, 20123, 278, 257, 3159, 201, 198, 9612, 796, 12972, 6057, 13, ...
1.974227
1,552
import codecs import matplotlib.pyplot as plt import numpy as np import pandas as pd from gensim.models import KeyedVectors from sklearn.decomposition import PCA from sklearn.externals import joblib from sklearn.linear_model import LogisticRegression from sklearn.metrics import roc_curve, auc, accuracy_score, classifi...
[ 11748, 40481, 82, 198, 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, 308, 641, 320, 13, 27530, 1330, 7383, 276, 53, 478, 669, 198, ...
2.212584
1,637
from . import CatalogItem from toontown.toonbase import ToontownGlobals from toontown.toonbase import TTLocalizer from otp.otpbase import OTPLocalizer from direct.interval.IntervalGlobal import *
[ 6738, 764, 1330, 44515, 7449, 198, 6738, 284, 756, 593, 13, 1462, 261, 8692, 1330, 1675, 756, 593, 9861, 672, 874, 198, 6738, 284, 756, 593, 13, 1462, 261, 8692, 1330, 26653, 14565, 7509, 198, 6738, 30972, 79, 13, 313, 79, 8692, 133...
3.266667
60
# -*- coding: utf-8 -*- """ Created on Mon Sep 2 10:43:23 2019 @author: mlin For HFSS and HFSS 3D Layout """ import re, clr clr.AddReference('System.Windows.Forms') from System.Windows.Forms import Clipboard import ScriptEnv ScriptEnv.Initialize("Ansoft.ElectronicsDesktop") oDesktop.RestoreWindow() o...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 2892, 8621, 220, 362, 838, 25, 3559, 25, 1954, 13130, 201, 198, 201, 198, 31, 9800, 25, 285, 2815, 201, 198, 1890, 42253, 5432, 290, ...
2.526502
283
from datapackage_pipelines.wrapper import ingest, spew from datapackage_pipelines.utilities.resources import PROP_STREAMING from nli_z3950.load_marc_data import get_marc_records_schema, parse_record from pymarc.marcxml import parse_xml_to_array import datetime, json if __name__ == '__main__': main()
[ 6738, 4818, 499, 441, 496, 62, 79, 541, 20655, 13, 48553, 1330, 26151, 11, 38645, 198, 6738, 4818, 499, 441, 496, 62, 79, 541, 20655, 13, 315, 2410, 13, 37540, 1330, 4810, 3185, 62, 2257, 32235, 2751, 198, 6738, 299, 4528, 62, 89, ...
2.818182
110
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for the file entry implementation using pyluksde.""" import unittest from dfvfs.lib import definitions from dfvfs.path import factory as path_spec_factory from dfvfs.resolver import context from dfvfs.resolver import resolver from dfvfs.vfs import luksde_file_ent...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 51, 3558, 329, 262, 2393, 5726, 7822, 1262, 12972, 2290, 591, 2934, 526, 15931, 198, 198, 11748, 555, 715, 395, ...
2.597217
2,587
# from constants import QUEUES @singleton
[ 198, 198, 2, 422, 38491, 1330, 1195, 8924, 35409, 628, 198, 31, 12215, 10565, 628, 628 ]
3.0625
16
import pytest from dice import Dice def test_valid_roll(): """ Test that a dice roll is valid. """ # Intialise a standard, six-sided dice. dice = Dice() # Roll the dice. roll = dice.roll() # Check that the value is valid. assert roll > 0 and roll < 7 def test_always_valid_roll(): ...
[ 11748, 12972, 9288, 198, 6738, 17963, 1330, 34381, 628, 198, 4299, 1332, 62, 12102, 62, 2487, 33529, 198, 220, 220, 220, 37227, 6208, 326, 257, 17963, 4836, 318, 4938, 13, 37227, 628, 220, 220, 220, 1303, 2558, 498, 786, 257, 3210, 11...
2.600726
1,102
from panda3d.core import *
[ 6738, 279, 5282, 18, 67, 13, 7295, 1330, 1635, 198 ]
2.7
10
from functools import reduce import numpy as np import scipy import pyscf from pyscf import fci from pyscf import gto, scf, ao2mo, lo, tdscf, cc def tda_denisty_matrix(td, state_id): ''' Taking the TDA amplitudes as the CIS coefficients, calculate the density matrix (in AO basis) of the excited states...
[ 6738, 1257, 310, 10141, 1330, 4646, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 198, 198, 11748, 279, 893, 12993, 198, 6738, 279, 893, 12993, 1330, 277, 979, 198, 6738, 279, 893, 12993, 1330, 308, 1462, 11, 629, 69, ...
1.859012
1,376
from keras.models import Sequential, Model from keras.layers import Flatten, Dense, Dropout, Reshape, Permute, Activation, \ Input, merge from keras.layers.convolutional import Convolution2D#, MaxPooling2D, ZeroPadding2D from keras.layers import MaxPooling2D, ZeroPadding2D, Concatenate from keras.optimizers import ...
[ 6738, 41927, 292, 13, 27530, 1330, 24604, 1843, 11, 9104, 198, 6738, 41927, 292, 13, 75, 6962, 1330, 1610, 41769, 11, 360, 1072, 11, 14258, 448, 11, 1874, 71, 1758, 11, 2448, 76, 1133, 11, 13144, 341, 11, 3467, 198, 220, 220, 220, ...
2.457178
1,623
from django.contrib import admin from django.urls import path, include from . import views urlpatterns = [ path('', include('common.urls')), path('question/<int:pk>', views.QuestionDetailView.as_view(), name="q_detail"), path("find-path/", views.find_location, name="find_path"), path('questions-list/',...
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 11, 2291, 198, 6738, 764, 1330, 5009, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 10786, 3256, 2291, 10786, 11321, 1...
2.880795
151
# GENERATED BY KOMAND SDK - DO NOT EDIT from .run_asynchronously.action import RunAsynchronously from .run_synchronously.action import RunSynchronously
[ 2, 24700, 1137, 11617, 11050, 509, 2662, 6981, 26144, 532, 8410, 5626, 48483, 198, 6738, 764, 5143, 62, 292, 24871, 3481, 13, 2673, 1330, 5660, 1722, 24871, 3481, 198, 6738, 764, 5143, 62, 28869, 11413, 3481, 13, 2673, 1330, 5660, 50, ...
3.454545
44
import logging import json import os import requests from requests_toolbelt.multipart.encoder import MultipartEncoder from config import Config LOG = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO)
[ 11748, 18931, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 7007, 198, 6738, 7007, 62, 25981, 37976, 13, 16680, 541, 433, 13, 12685, 12342, 1330, 7854, 541, 433, 27195, 12342, 198, 6738, 4566, 1330, 17056, 198, 198, 25294, 796, 18931,...
3.4375
64
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-08-20 19:21 from __future__ import unicode_literals from django.db import migrations
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 319, 2177, 12, 2919, 12, 1238, 678, 25, 2481, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738,...
2.754717
53
import gym import gym_extensions from gym_extensions.continuous.gym_navigation_2d.envs.env_generator import Environment, EnvironmentCollection, Obstacle import numpy as np import time import cv2 env = gym.make('Image-Based-Navigation-2d-Map0-Goal0-v0') observation = env.reset() for t in range(100): env.render() ...
[ 11748, 11550, 198, 11748, 11550, 62, 2302, 5736, 198, 198, 6738, 11550, 62, 2302, 5736, 13, 18487, 5623, 13, 1360, 76, 62, 28341, 7065, 62, 17, 67, 13, 268, 14259, 13, 24330, 62, 8612, 1352, 1330, 9344, 11, 9344, 36307, 11, 46378, 6...
2.501976
253
from polyphony import testbench @testbench test()
[ 6738, 7514, 23021, 1330, 1332, 26968, 628, 198, 198, 31, 9288, 26968, 628, 198, 9288, 3419, 198 ]
3.235294
17
# ZeroWidth file containing the content that will be converted to plaintext. # This file should be placed within the same folder as the script. with open('ToZeroWidth.txt', 'r', encoding='utf-8') as InputFile: InputZeroWidth = InputFile.read() # Replace the zero-width characters with binary ones. # 8203 (0x200B) =...
[ 2, 12169, 30916, 2393, 7268, 262, 2695, 326, 481, 307, 11513, 284, 8631, 5239, 13, 198, 2, 770, 2393, 815, 307, 4624, 1626, 262, 976, 9483, 355, 262, 4226, 13, 198, 4480, 1280, 10786, 2514, 28667, 30916, 13, 14116, 3256, 705, 81, 32...
3.091988
337
import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns from mlxtend.plotting import plot_decision_regions plt.style.use('ggplot') #%config InlineBackend.figure_format = 'svg' #%matplotlib inline np.set_printoptions(suppress=True) """ df_train = pd.read_csv('Drugs_Dataset_train.csv...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 384, 397, 1211, 355, 3013, 82, 198, 6738, 25962, 742, 437, 13, 29487, 889, 1330, 7110, 62, ...
2.659127
1,901
from src.utils.dir_helper import remove_lightning_logs_folder
[ 6738, 12351, 13, 26791, 13, 15908, 62, 2978, 525, 1330, 4781, 62, 2971, 768, 62, 6404, 82, 62, 43551, 628 ]
3.15
20
import urllib.parse from huobi.constant.system import WebSocketDefine from huobi.impl.websocketrequestimpl import WebsocketRequestImpl from huobi.impl.websocketconnection import WebsocketConnection from huobi.impl.websocketwatchdog import WebSocketWatchDog from huobi.impl.restapirequestimpl import RestApiRequestImpl f...
[ 11748, 2956, 297, 571, 13, 29572, 198, 198, 6738, 289, 84, 13411, 13, 9979, 415, 13, 10057, 1330, 5313, 39105, 7469, 500, 198, 6738, 289, 84, 13411, 13, 23928, 13, 732, 1443, 5459, 25927, 23928, 1330, 47736, 5459, 18453, 29710, 198, 6...
3.31405
121
#!/usr/bin/env python # -*- coding: utf-8 -*- # 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 t...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, ...
3.191489
282
import os import pickle import time import numpy as np import torch import torch.nn as nn import torch.optim as optim from tqdm import tqdm import config from data_utils import get_loader, eta, user_friendly_time, progress_bar, time_since from model import SeqTree2seq
[ 11748, 28686, 198, 11748, 2298, 293, 198, 11748, 640, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 40085, 355, 6436, 198, 6738, 256, 80, 36020, 1330, 256,...
3.277108
83
# Copyright (c) 2017, The MITRE Corporation. All rights reserved. # See LICENSE.txt for complete terms. from mixbox import fields import cybox.bindings.sms_message_object as sms_binding from cybox.common import ObjectProperties, HexBinary, String, DateTime, Integer, PositiveInteger
[ 2, 15069, 357, 66, 8, 2177, 11, 383, 17168, 2200, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 4091, 38559, 24290, 13, 14116, 329, 1844, 2846, 13, 198, 198, 6738, 5022, 3524, 1330, 7032, 198, 198, 11748, 3075, 3524, 13, 21653, 654, 13,...
3.620253
79
from ed25519 import * assert b >= 10 assert 8 * len(H("hash input")) == 2 * b assert expmod(2,q-1,q) == 1 assert q % 4 == 1 assert expmod(2,l-1,l) == 1 assert l >= 2**(b-4) assert l <= 2**(b-3) assert expmod(d,(q-1)/2,q) == q-1 assert expmod(I,2,q) == q-1 assert isoncurve(B) assert scalarmult(B,l) == [0,1]
[ 6738, 1225, 13381, 1129, 1330, 1635, 198, 198, 30493, 275, 18189, 838, 198, 30493, 807, 1635, 18896, 7, 39, 7203, 17831, 5128, 48774, 6624, 362, 1635, 275, 198, 30493, 1033, 4666, 7, 17, 11, 80, 12, 16, 11, 80, 8, 6624, 352, 198, ...
2.102041
147
from typing import Tuple from .. import Provider as AddressProvider
[ 6738, 19720, 1330, 309, 29291, 198, 198, 6738, 11485, 1330, 32549, 355, 17917, 29495, 628 ]
4.666667
15
import sys, os import binascii import hashlib if sys.version_info.major == 3: string_types = (str) string_or_bytes_types = (str, bytes) int_types = (int, float) # Base switching code_strings = { 2: '01', 10: '0123456789', 16: '0123456789abcdef', 32: 'abcdefghijklmno...
[ 11748, 25064, 11, 28686, 198, 11748, 9874, 292, 979, 72, 198, 11748, 12234, 8019, 628, 198, 361, 25064, 13, 9641, 62, 10951, 13, 22478, 6624, 513, 25, 198, 220, 220, 220, 4731, 62, 19199, 796, 357, 2536, 8, 198, 220, 220, 220, 4731,...
1.978992
238
import cc_dat_utils import json from cc_classes import * # Part 3 # Load your custom JSON file # Convert JSON data to CCLevelPack # Save converted data to DAT file # Fuctions like a switch-case # Global input_file = "data/level_data.json" with open(input_file,"r") as reader: levelData_json = json.load(reader) ...
[ 11748, 36624, 62, 19608, 62, 26791, 198, 11748, 33918, 198, 6738, 36624, 62, 37724, 1330, 1635, 198, 198, 2, 2142, 513, 198, 2, 8778, 534, 2183, 19449, 2393, 198, 2, 38240, 19449, 1366, 284, 12624, 4971, 11869, 198, 2, 12793, 11513, 1...
2.875
168
import unittest from utils.file_utility import ftp_upload, ftp_download import random import time if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 3384, 4487, 13, 7753, 62, 315, 879, 1330, 10117, 79, 62, 25850, 11, 10117, 79, 62, 15002, 198, 11748, 4738, 198, 11748, 640, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 2...
2.826923
52
# Generated by Django 2.2.10 on 2020-05-01 13:35 import django.contrib.postgres.fields from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 940, 319, 12131, 12, 2713, 12, 486, 1511, 25, 2327, 198, 198, 11748, 42625, 14208, 13, 3642, 822, 13, 7353, 34239, 13, 25747, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, ...
2.954545
44
import unittest import os import logging import datetime from cryptoxlib.CryptoXLib import CryptoXLib from cryptoxlib.clients.binance import enums from cryptoxlib.clients.binance.exceptions import BinanceRestException from cryptoxlib.clients.binance.BinanceWebsocket import CandlestickSubscription, DepthSubscription fr...
[ 11748, 555, 715, 395, 198, 11748, 28686, 198, 11748, 18931, 198, 11748, 4818, 8079, 198, 198, 6738, 8194, 1140, 8019, 13, 23919, 78, 55, 25835, 1330, 36579, 55, 25835, 198, 6738, 8194, 1140, 8019, 13, 565, 2334, 13, 8800, 590, 1330, 5...
3.109827
173
import numpy as np from faps.genotypeArray import genotypeArray from faps.calculate_geno_probs import calculate_geno_probs def make_parents(size, allele_freqs, mu=1e-12, family_name = 'base'): """ Draw a base population of reproductive individuals from population allele frequencies. Parameters -------...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 277, 1686, 13, 5235, 8690, 19182, 1330, 2429, 8690, 19182, 198, 6738, 277, 1686, 13, 9948, 3129, 378, 62, 5235, 78, 62, 1676, 1443, 1330, 15284, 62, 5235, 78, 62, 1676, 1443, 198, 198, 4299, ...
2.480996
763
from django.db import models from django.contrib.auth.models import User # Create your models here. LIKE_CHOICES = ( ('Like','Like'), ('Unlike','Unlike') )
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 198, 2, 13610, 534, 4981, 994, 13, 198, 198, 31271, 7336, 62, 44899, 34444, 796, 357, 198, 220, 220, 220, 220, ...
2.540541
74
import locale from collections import defaultdict from distutils.version import LooseVersion import logging from time import gmtime, strftime from django.http import HttpResponse, HttpResponseForbidden from django.template import RequestContext, loader from django.shortcuts import redirect, render from django.views.de...
[ 11748, 36693, 198, 6738, 17268, 1330, 4277, 11600, 198, 6738, 1233, 26791, 13, 9641, 1330, 6706, 577, 14815, 198, 11748, 18931, 198, 6738, 640, 1330, 308, 76, 2435, 11, 965, 31387, 198, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 2928...
3.12156
436
"""Transform component.""" from imperial_calendar.GregorianDateTime import GregorianDateTime from imperial_calendar.ImperialDateTime import ImperialDateTime from imperial_calendar.ImperialSolNumber import ImperialSolNumber from imperial_calendar.JulianDay import JulianDay from imperial_calendar.MarsSolDate import MarsS...
[ 37811, 41762, 7515, 526, 15931, 198, 6738, 14312, 62, 9948, 9239, 13, 25025, 22618, 10430, 7575, 1330, 8547, 22618, 10430, 7575, 198, 6738, 14312, 62, 9948, 9239, 13, 3546, 7629, 10430, 7575, 1330, 11773, 10430, 7575, 198, 6738, 14312, 62...
1.729381
13,628
import network import time from umqtt.simple import MQTTClient from machine import Pin import machine import ubinascii from config import CONFIG # setup pin4 as output pin = machine.Pin(4, machine.Pin.OUT) pin.off() # process received messages sta_if = network.WLAN(network.STA_IF) # connect to Wifi if not ...
[ 11748, 3127, 198, 11748, 640, 198, 198, 6738, 23781, 80, 926, 13, 36439, 1330, 337, 48, 15751, 11792, 198, 6738, 4572, 1330, 13727, 198, 11748, 4572, 198, 11748, 334, 8800, 292, 979, 72, 198, 198, 6738, 4566, 1330, 25626, 628, 198, 2,...
2.622776
281
from rest_framework import exceptions, serializers from lego.apps.users import constants from lego.apps.users.models import User from lego.apps.users.validators import username_validator from lego.utils.functions import verify_captcha
[ 6738, 1334, 62, 30604, 1330, 13269, 11, 11389, 11341, 198, 198, 6738, 1232, 78, 13, 18211, 13, 18417, 1330, 38491, 198, 6738, 1232, 78, 13, 18211, 13, 18417, 13, 27530, 1330, 11787, 198, 6738, 1232, 78, 13, 18211, 13, 18417, 13, 12102...
3.761905
63
import datetime import enum import twint from typing import List import pandas as pd from ..util import PlacementPreference, clean_text from .storyprovider import StoryProvider from ..story import Story
[ 11748, 4818, 8079, 198, 11748, 33829, 198, 11748, 665, 600, 198, 6738, 19720, 1330, 7343, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 11485, 22602, 1330, 1345, 5592, 6719, 4288, 11, 3424, 62, 5239, 198, 6738, 764, 13571, ...
3.851852
54
from model import GCN from test import test from train import train from utils.get_device import get_device from torch_geometric.data import DataLoader from torch_geometric.datasets import MNISTSuperpixels from config import BATCH_SIZE, TRAINING_DIR, TEST_DIR import torch_geometric.transforms as T transform = T.Cartes...
[ 6738, 2746, 1330, 20145, 45, 198, 6738, 1332, 1330, 1332, 198, 6738, 4512, 1330, 4512, 198, 6738, 3384, 4487, 13, 1136, 62, 25202, 1330, 651, 62, 25202, 198, 6738, 28034, 62, 469, 16996, 13, 7890, 1330, 6060, 17401, 198, 6738, 28034, ...
2.814721
394