content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
__author__ = 'ali-pc' from django.shortcuts import render, redirect from django.contrib import auth from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from .forms import LoginForm, RegisterForm, ProfileForm @login_required()
[ 171, 119, 123, 834, 9800, 834, 796, 705, 7344, 12, 14751, 6, 201, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 18941, 201, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 6284, 201, 198, 6738, 42625, 14208, 13, 3642, 822, ...
2.930693
101
from ethereum import utils print(checksum_encode(bytes.fromhex('2f6bc758319982417b01b6ff09a9860a79c14cbb')))
[ 6738, 304, 17733, 1330, 3384, 4487, 198, 198, 4798, 7, 42116, 388, 62, 268, 8189, 7, 33661, 13, 6738, 33095, 10786, 17, 69, 21, 15630, 2425, 5999, 21113, 1731, 1558, 65, 486, 65, 21, 487, 2931, 64, 4089, 1899, 64, 3720, 66, 1415, ...
2.319149
47
from torch import load, save from os.path import dirname, isfile from os import listdir, remove from ast import literal_eval from cnn.statistics import Statistics from cnn.trainRegime.regime import TrainRegime bopsKey = 'bops' baselineKey = 'Baseline' folderName = 'FF-4' plotPath = '/home/vista/Desktop/F-BANN...
[ 6738, 28034, 1330, 3440, 11, 3613, 198, 6738, 28686, 13, 6978, 1330, 26672, 3672, 11, 318, 7753, 198, 6738, 28686, 1330, 1351, 15908, 11, 4781, 198, 6738, 6468, 1330, 18875, 62, 18206, 198, 198, 6738, 269, 20471, 13, 14269, 3969, 1330, ...
2.510929
732
""" tests.test_overlay ~~~~~~~~~~~~~~~~~~ Test OverlayFS and OverlayFSManager """ import fudge from nose.tools import raises from testkit import ContextUser from overlayUtils.overlay import * from .utils import verify, reset class TestOverlayMoreGeneral(GenericOverlaySetup): """This test class assumes less wit...
[ 37811, 198, 41989, 13, 9288, 62, 2502, 10724, 198, 27156, 4907, 198, 198, 14402, 3827, 10724, 10652, 290, 3827, 10724, 10652, 13511, 198, 37811, 198, 11748, 277, 12587, 198, 6738, 9686, 13, 31391, 1330, 12073, 198, 6738, 1332, 15813, 1330...
2.604096
586
from django.urls import path from apps.carts.views import CartsView, CartsSelectAllView urlpatterns = [ path('carts/', CartsView.as_view()), path('carts/selection/', CartsSelectAllView.as_view()), ]
[ 628, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 198, 6738, 6725, 13, 66, 5889, 13, 33571, 1330, 327, 5889, 7680, 11, 327, 5889, 17563, 3237, 7680, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 10786, 66...
2.6375
80
import os, sys, time, json, csv, hashlib from pprint import pprint #Imports configurations and add these modules to python enviroment from config import config, system_config, output_files from cogs.cognitor import cogs # Sets-up the class and creates a directory for all the temp files. cogs = cogs(output_files['c...
[ 11748, 28686, 11, 25064, 11, 640, 11, 33918, 11, 269, 21370, 11, 12234, 8019, 198, 6738, 279, 4798, 1330, 279, 4798, 198, 198, 2, 3546, 3742, 25412, 290, 751, 777, 13103, 284, 21015, 17365, 343, 296, 298, 220, 198, 6738, 4566, 1330, ...
3.080508
236
import os, importlib import sys as sss global x h = os.path.join(".") x = os.environ.get("lkwem") x = "Hello" y = x[0] glob = 1
[ 11748, 28686, 11, 1330, 8019, 198, 11748, 25064, 355, 264, 824, 198, 198, 20541, 2124, 198, 198, 71, 796, 28686, 13, 6978, 13, 22179, 7203, 19570, 198, 87, 796, 28686, 13, 268, 2268, 13, 1136, 7203, 75, 46265, 368, 4943, 198, 198, 8...
2.177419
62
dict_ = {"a": {"b": 1}} return_data_form = dict_.get([k for k, v in dict_.items()][0]) print(return_data_form)
[ 11600, 62, 796, 19779, 64, 1298, 19779, 65, 1298, 352, 11709, 198, 7783, 62, 7890, 62, 687, 796, 8633, 44807, 1136, 26933, 74, 329, 479, 11, 410, 287, 8633, 44807, 23814, 3419, 7131, 15, 12962, 198, 4798, 7, 7783, 62, 7890, 62, 687,...
2.5
44
import pandas as pd from _datetime import datetime from curami.commons import file_utils, mongo_connector if __name__ == '__main__': generate_file()
[ 11748, 19798, 292, 355, 279, 67, 198, 6738, 4808, 19608, 8079, 1330, 4818, 8079, 198, 198, 6738, 1090, 6277, 13, 9503, 684, 1330, 2393, 62, 26791, 11, 285, 25162, 62, 8443, 273, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, ...
2.925926
54
from typing import List, Tuple from utils import ConceptNet, removeprefix def render_path_verbose(path: List[int], graph: ConceptNet): """this function gives a verbose textual representation for the given path, including all edges between the given nodes, node and label indices and label weights. Example ...
[ 6738, 19720, 1330, 7343, 11, 309, 29291, 198, 6738, 3384, 4487, 1330, 26097, 7934, 11, 4781, 40290, 628, 198, 4299, 8543, 62, 6978, 62, 19011, 577, 7, 6978, 25, 7343, 58, 600, 4357, 4823, 25, 26097, 7934, 2599, 198, 220, 220, 220, 3...
2.295527
3,465
import numpy as np import pandas as pd from tabulate import tabulate from .util import * def key_adder(w2v_model, wordpairs): """Account for as many cases of british vs. american spelling as possible in W2V vocabulary Args: w2v_model : standard Word2Vec 'KeyedVectors' data structure wordps ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 7400, 5039, 1330, 7400, 5039, 198, 198, 6738, 764, 22602, 1330, 1635, 628, 198, 4299, 1994, 62, 26676, 7, 86, 17, 85, 62, 19849, 11, 1573, 79, 3468, 259...
2.197561
6,479
""" The Koch curve is a fractal that looks something like Figure 5.2. To draw a Koch curve with length x, all you have to do is: 1. Draw a Koch curve with length x/3. 2. Turn left 60 degrees. 3. Draw a Koch curve with length x/3. 4. Turn right 120 degrees. 5. Draw a Koch curve with length x/3. 6. Turn left 60 deg...
[ 37811, 198, 464, 17009, 12133, 318, 257, 12999, 282, 326, 3073, 1223, 588, 11291, 642, 13, 17, 13, 1675, 3197, 257, 17009, 198, 22019, 303, 351, 4129, 2124, 11, 477, 345, 423, 284, 466, 318, 25, 198, 16, 13, 220, 15315, 257, 17009, ...
2.749129
574
"""Get relevant data from TMX/XML and save as tab-separated file. Meant to be run on TMX files and extracting linguistic features for both French (src) and Dutch (tgt). It was used to extract linguistic features from a pre-parsed XML/TMX corpus. """ from os import PathLike from pathlib import Path from typing import G...
[ 37811, 3855, 5981, 1366, 422, 21232, 55, 14, 55, 5805, 290, 3613, 355, 7400, 12, 25512, 515, 2393, 13, 2185, 415, 284, 307, 1057, 319, 21232, 55, 3696, 290, 37895, 198, 1359, 84, 2569, 3033, 329, 1111, 4141, 357, 10677, 8, 290, 1091...
2.422024
1,680
# -*- coding: utf-8 -*- from setuptools import setup # version info NAME = "pypalette" VERSION = "0.1.6" DESC = "Extract prominent colors from images! Python wrapper for `https://github.com/dayvonjersen/vibrant`." # requirements install_requires = [] with open('requirements.txt', "r") as fp: for line in fp: ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 2, 2196, 7508, 198, 20608, 796, 366, 79, 4464, 282, 5857, 1, 198, 43717, 796, 366, 15, 13, 16, 13, 21, 1, 198, 30910, ...
2.518519
594
# Copyright (c) 2013 Barnstormer Softworks, Ltd. # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import json import geni.rspec.pgmanifest as PGM m = PGM.Manifest("v...
[ 2, 15069, 357, 66, 8, 2211, 220, 11842, 12135, 263, 8297, 5225, 11, 12052, 13, 198, 198, 2, 770, 8090, 6127, 5178, 318, 2426, 284, 262, 2846, 286, 262, 29258, 5094, 198, 2, 13789, 11, 410, 13, 362, 13, 15, 13, 1002, 257, 4866, 2...
2.504425
226
# Generated by Django 3.0.7 on 2021-01-18 13:40 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 22, 319, 33448, 12, 486, 12, 1507, 1511, 25, 1821, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, ...
2.818182
44
# -*- coding: utf-8 -*- """ Created on Tue Nov 15 12:55:31 2016 @author: medialab """ import cv
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 30030, 5267, 1315, 1105, 25, 2816, 25, 3132, 1584, 198, 198, 31, 9800, 25, 48174, 397, 198, 37811, 198, 11748, 269, 85 ]
2.4
40
import mido #from mido.ports import open_input from mido import Message, MidiFile, MidiTrack import numpy as np import time from src.LRUDict import LRUDict # import sys # sys.path.append('..')
[ 11748, 3095, 78, 198, 2, 6738, 3095, 78, 13, 3742, 1330, 1280, 62, 15414, 198, 6738, 3095, 78, 1330, 16000, 11, 7215, 72, 8979, 11, 7215, 72, 24802, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 640, 198, 6738, 12351, 13, 35972, 8...
3.063492
63
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © 2021 arijit <arijit@linux-inspiron-5567> # # Distributed under terms of the MIT license. from selenium import webdriver import time import subprocess repo_name = input("[+] Provide the github repository name :") descript = input("[+] Prov...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 43907, 25, 69, 12685, 28, 40477, 12, 23, 198, 2, 198, 2, 15069, 10673, 33448, 257, 380, 45051, 1279, 39010, 27...
3.058971
797
from pynput.keyboard import Listener keyboardListener()
[ 6738, 279, 2047, 1996, 13, 2539, 3526, 1330, 7343, 877, 628, 198, 2539, 3526, 33252, 3419, 198 ]
3.411765
17
#!/usr/bin/env python # coding=utf-8 import os import tempfile HTML_BODY = """\ <html> <head> <title>Qutescript: {prefix}</title> </head> <body> <pre>{script_path}</pre> {content} </body> """ HTML_MESSAGE_TEMPLATE = """\ <pre> {} </pre> """ log_file_path = './qutescript.log' def log_to_browser(*messages, prefix:...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 28, 40477, 12, 23, 198, 11748, 28686, 198, 11748, 20218, 7753, 198, 198, 28656, 62, 33, 33076, 796, 37227, 59, 198, 27, 6494, 29, 198, 27, 2256, 29, 198, 27, 7839, 29, 48...
2.41349
341
#!/usr/bin/env python3 import re import sys import apache_beam as beam from apache_beam.options.pipeline_options import PipelineOptions if len(sys.argv) < 2: usage() input_file = sys.argv[1] with beam.Pipeline(options=PipelineOptions()) as p: (p | beam.io.ReadFromText(input_file) | "Tokenize" >> beam.FlatMa...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 302, 198, 11748, 25064, 198, 11748, 2471, 4891, 62, 40045, 355, 15584, 198, 6738, 2471, 4891, 62, 40045, 13, 25811, 13, 79, 541, 4470, 62, 25811, 1330, 37709, 29046, 19...
2.526316
190
import pandas as pd from tkinter import * import tkinter as tk import numpy as np from tkinter import messagebox from tkinter import ttk import datetime from datetime import timedelta, date import matplotlib.pyplot as plt from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg import re import ast def clear_da...
[ 11748, 19798, 292, 355, 279, 67, 198, 6738, 256, 74, 3849, 1330, 1635, 198, 11748, 256, 74, 3849, 355, 256, 74, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 256, 74, 3849, 1330, 3275, 3524, 198, 6738, 256, 74, 3849, 1330, 256, 304...
2.471461
3,101
from __future__ import with_statement import os from setuptools import setup, find_packages from django_type_of_works import __version__ as version#fix install_requires = ["django >= 1.7, < 1.9",] try: setup( name="django-type-of-works", version=version, author="Victor De la Luz", ...
[ 6738, 11593, 37443, 834, 1330, 351, 62, 26090, 198, 11748, 28686, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 6738, 42625, 14208, 62, 4906, 62, 1659, 62, 5225, 1330, 11593, 9641, 834, 355, 2196, 2, 13...
2.245399
652
""" RiscEmu (c) 2021 Anton Lydike SPDX-License-Identifier: MIT """ import re from enum import IntEnum from typing import List from .Exceptions import ParseException PSEUDO_OPS = [ '.asciiz', '.double', '.extern', '.global', '.align', '.float', '.kdata', '.ktext', '.space', '....
[ 37811, 198, 49, 2304, 10161, 84, 357, 66, 8, 33448, 9261, 406, 5173, 522, 198, 198, 4303, 36227, 12, 34156, 12, 33234, 7483, 25, 17168, 198, 37811, 198, 198, 11748, 302, 198, 6738, 33829, 1330, 2558, 4834, 388, 198, 6738, 19720, 1330,...
1.929521
752
import re from jenkins_tools.common import Jenkins import logging from lxml import etree import xml.etree.ElementTree as ElementTree logger = logging.getLogger() # User pytest - https://docs.pytest.org/en/latest/
[ 11748, 302, 198, 198, 6738, 474, 268, 5331, 62, 31391, 13, 11321, 1330, 21835, 198, 11748, 18931, 198, 6738, 300, 19875, 1330, 2123, 631, 198, 11748, 35555, 13, 316, 631, 13, 20180, 27660, 355, 11703, 27660, 198, 198, 6404, 1362, 796, ...
3.208955
67
import pytest import torch from pytorch_lightning.utilities.exceptions import MisconfigurationException from energizer.inference.utils import ( AlphaDropout, Dropout, Dropout2d, Dropout3d, FeatureAlphaDropout, local_seed, patch_dropout_layers, ) from tests.utils import NUM_FEATURES def te...
[ 11748, 12972, 9288, 198, 11748, 28034, 198, 6738, 12972, 13165, 354, 62, 2971, 768, 13, 315, 2410, 13, 1069, 11755, 1330, 14136, 11250, 3924, 16922, 198, 198, 6738, 19647, 7509, 13, 259, 4288, 13, 26791, 1330, 357, 198, 220, 220, 220, ...
2.385141
1,171
optimizer = dict(type='Adam', lr=1e-4, weight_decay=0, eps=1e-8, training_encoder_lr_multiply=1) optimizer_config = dict(grad_clip=dict( clip_norm_mode='all', max_grad_l2_norm=0.25, use_scale=True, )) lr_config = dict( use_warmup=True, lr_steps=[14000, 19000], lr_ratio=0.1, warmup_factor=0....
[ 40085, 7509, 796, 8633, 7, 4906, 11639, 23159, 3256, 300, 81, 28, 16, 68, 12, 19, 11, 3463, 62, 12501, 323, 28, 15, 11, 304, 862, 28, 16, 68, 12, 23, 11, 3047, 62, 12685, 12342, 62, 14050, 62, 16680, 541, 306, 28, 16, 8, 198, ...
2.040816
196
# Tests assert get_hbal_tree([1, 2, 3, 4, 5]).val == 3 assert get_hbal_tree([1, 2, 3, 4, 5, 6]).val == 4
[ 628, 198, 2, 30307, 198, 30493, 651, 62, 71, 6893, 62, 21048, 26933, 16, 11, 362, 11, 513, 11, 604, 11, 642, 35944, 2100, 6624, 513, 198, 30493, 651, 62, 71, 6893, 62, 21048, 26933, 16, 11, 362, 11, 513, 11, 604, 11, 642, 11, ...
2.117647
51
""" Brainstem Acroname Hub See documentation for brainstem here: https://acroname.com/reference/python/index.html """ from rspy import log if __name__ == '__main__': import os, sys, getopt try: opts,args = getopt.getopt( sys.argv[1:], '', longopts = [ 'help', 'recycle' ]) except geto...
[ 37811, 198, 44687, 927, 4013, 1313, 480, 14699, 198, 198, 6214, 10314, 329, 3632, 927, 994, 25, 198, 5450, 1378, 330, 1313, 480, 13, 785, 14, 35790, 14, 29412, 14, 9630, 13, 6494, 198, 37811, 198, 198, 6738, 374, 2777, 88, 1330, 260...
2.271808
2,671
# Generated by Django 3.1.4 on 2021-09-03 13:33 import django.contrib.auth.models import django.contrib.auth.validators from django.db import migrations, models import django.db.models.deletion import django.utils.timezone import users.models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 19, 319, 33448, 12, 2931, 12, 3070, 1511, 25, 2091, 198, 198, 11748, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 198, 11748, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 12102, 2024, ...
3.024691
81
from django.contrib import admin from .models import SummaryTask admin.site.register(SummaryTask) # Register your models here.
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 201, 198, 6738, 764, 27530, 1330, 21293, 25714, 201, 198, 201, 198, 28482, 13, 15654, 13, 30238, 7, 22093, 25714, 8, 201, 198, 201, 198, 2, 17296, 534, 4981, 994, 13, 201, 198 ]
3.292683
41
from functools import wraps import inspect def counter(fn): """Bu fonksiyon bir 'decorator' olup çıkışa "inner" adında bir 'closure' iletir. İçerdeki inner fonksiyonu, kullanılacak asıl fonksiyonları modifiye eder. Burada modifiye olayı kullanılan fonksiyonun kaçıncı defa çağırıldığını ekrana basma'dır. "...
[ 6738, 1257, 310, 10141, 1330, 27521, 198, 11748, 10104, 628, 198, 4299, 3753, 7, 22184, 2599, 198, 220, 220, 220, 37227, 38374, 277, 261, 591, 7745, 261, 35122, 705, 12501, 273, 1352, 6, 25776, 929, 6184, 100, 30102, 74, 30102, 46481, ...
2.163265
294
""" env util """ import errno import functools import os import signal from functools import wraps from types import LambdaType from typing import Any, Callable, Dict, Optional, Sequence, Type, Union import gym import numpy as np import rospy from stable_baselines3.common.monitor import Monitor from stable_baselines3....
[ 37811, 17365, 7736, 37227, 198, 11748, 11454, 3919, 198, 11748, 1257, 310, 10141, 198, 11748, 28686, 198, 11748, 6737, 198, 6738, 1257, 310, 10141, 1330, 27521, 198, 6738, 3858, 1330, 21114, 6814, 6030, 198, 6738, 19720, 1330, 4377, 11, 4...
2.698588
2,266
# -*- coding: utf-8 -*- # Copyright (C) 2020. Huawei Technologies Co., Ltd. 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/LICENS...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 15069, 357, 34, 8, 12131, 13, 43208, 21852, 1766, 1539, 12052, 13, 1439, 2489, 10395, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, ...
2.815308
601
import unittest from app.bot.downloader import *
[ 11748, 555, 715, 395, 198, 6738, 598, 13, 13645, 13, 15002, 263, 1330, 1635, 198 ]
3.266667
15
from setuptools import setup, find_packages from os import path from io import open here = path.abspath(path.dirname(__file__)) with open(path.join(here, "README.md"), encoding="utf-8") as f: long_description = f.read() setup( name="webhelpers2_grid", version="0.9", description=""" HTML Grid renderer ...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 6738, 28686, 1330, 3108, 198, 6738, 33245, 1330, 1280, 198, 198, 1456, 796, 3108, 13, 397, 2777, 776, 7, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 4008, 198, 4480, 1280, ...
2.543478
598
import torch import pandas as pd import torch.nn as nn import torch.optim as optim from torch.utils.data import DataLoader from walker import load_a_HIN_from_pandas_neighbors, getNeighbors from merge1.model_merge_1 import NSTrainSet, HIN2vec, train # set method parameters window = 5 walk = 10 walk_length ...
[ 11748, 28034, 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 11748, 28034, 13, 20471, 355, 299, 77, 201, 198, 11748, 28034, 13, 40085, 355, 6436, 201, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 6060, 17401, 201, 198, 201, 198,...
2.100218
1,377
import re import time import os.path import bencode from django.db import models from django.utils import timezone from django.utils.functional import cached_property from pyquery.pyquery import PyQuery from bibliotik.settings import BIBLIOTIK_GET_TORRENT_URL from home.models import TransTorrentBase from what_transco...
[ 11748, 302, 198, 11748, 640, 198, 11748, 28686, 13, 6978, 198, 198, 11748, 1888, 8189, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 198, 6738, 42625, 14208, 13, 26791, 13, 45124, 1...
2.775665
263
import pytest from pytest_cases import parametrize_with_cases @pytest.mark.parametrize('dummy_amount', [1, 0, -1]) @parametrize_with_cases('dummy_amount', cases=".", prefix="case_amount")
[ 11748, 12972, 9288, 198, 198, 6738, 12972, 9288, 62, 33964, 1330, 5772, 316, 380, 2736, 62, 4480, 62, 33964, 628, 198, 31, 9078, 9288, 13, 4102, 13, 17143, 316, 380, 2736, 10786, 67, 13513, 62, 17287, 3256, 685, 16, 11, 657, 11, 532...
2.694444
72
# -*- coding: utf-8 -*- import subprocess from workflow import Workflow, PasswordNotFound __author__ = 'zhouqi' if __name__ == '__main__': wf = Workflow() wf.cache_data('scripts', get_all_scripts()) # wf.cache_data('brew_all_formulas', get_all_packages()) # wf.cache_data('brew_installed_formulas', ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 850, 14681, 198, 6738, 30798, 1330, 5521, 11125, 11, 30275, 3673, 21077, 198, 198, 834, 9800, 834, 796, 705, 38536, 40603, 6, 628, 628, 198, 361, 11593, 3672, 834...
2.606667
150
# # # from __future__ import absolute_import, division, print_function, \ unicode_literals from unittest import TestCase from mock import patch, call from ovh import APIError, ResourceNotFoundError, InvalidCredential from octodns.provider.ovh import OvhProvider from octodns.record import Record from octodns.zon...
[ 2, 198, 2, 198, 2, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 11, 3467, 198, 220, 220, 220, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 6738...
3.316832
101
# capture a sequence of images with constant exposure # import necessary packages import os import datetime import time import picamera # calibrate camera camera = picamera.PiCamera() camera.resolution = (3280, 2464) camera.meter_mode = 'spot' camera.image_denoise = False # sets constant exposure for the camera base...
[ 2, 8006, 257, 8379, 286, 4263, 351, 6937, 7111, 198, 198, 2, 1330, 3306, 10392, 198, 11748, 28686, 198, 11748, 4818, 8079, 198, 11748, 640, 198, 11748, 8301, 18144, 198, 198, 2, 33801, 378, 4676, 198, 25695, 796, 8301, 18144, 13, 3872...
2.889171
1,182
""" Longest common subsequence implementation starter """ from binary_search_tree.binary_search_tree import BinarySearchTree, Node if __name__ == '__main__': tree = BinarySearchTree() nodes_to_add = [Node(8), Node(4), Node(2), Node(3), Node(10), Node(16), Node(13), Node(12),Node(11)] fo...
[ 37811, 198, 14617, 395, 2219, 6399, 594, 7822, 14217, 198, 37811, 198, 6738, 13934, 62, 12947, 62, 21048, 13, 39491, 62, 12947, 62, 21048, 1330, 45755, 18243, 27660, 11, 19081, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834...
2.450413
242
print("Hello world") import math print(math.sqrt(81)) # List example days_of_the_week = ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"] for i in days_of_the_week: print(i)
[ 4798, 7203, 15496, 995, 4943, 201, 198, 11748, 10688, 201, 198, 4798, 7, 11018, 13, 31166, 17034, 7, 6659, 4008, 201, 198, 2, 7343, 1672, 201, 198, 12545, 62, 1659, 62, 1169, 62, 10464, 796, 14631, 21934, 2430, 23810, 2430, 26133, 243...
2.810811
74
from __future__ import print_function import os import sys import numpy as np import torch import networkx as nx import random from torch.autograd import Variable from torch.nn.parameter import Parameter import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from tqdm import tqdm import cPic...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 11748, 3127, 87, 355, 299, 87, 198, 11748, 4738, 198, 6738, 28034, 13, 2306, 519, 6335...
2.212179
1,560
""" Exceptions raised by django-chunk-upload. """ class ChunkUploadError(Exception): """ Exception raised if errors in the request/process. """
[ 37811, 198, 3109, 11755, 4376, 416, 42625, 14208, 12, 354, 2954, 12, 25850, 13, 198, 37811, 628, 198, 4871, 609, 2954, 41592, 12331, 7, 16922, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 35528, 4376, 611, 8563, 287, 262, 2581...
3.098039
51
import transitfeed schedule = transitfeed.Schedule() schedule.AddAgency("Europe Agency", "http://iflyagency.com", "Europe/Madrid", "Europe_Agency") service_period = schedule.GetDefaultServicePeriod() service_period.SetStartDate("20070101") service_period.SetEndDate("20190101") service_period.SetWeekdayService(True) ...
[ 11748, 11168, 12363, 628, 198, 15952, 5950, 796, 11168, 12363, 13, 27054, 5950, 3419, 198, 15952, 5950, 13, 4550, 32, 4949, 7203, 16112, 7732, 1600, 366, 4023, 1378, 361, 306, 40955, 13, 785, 1600, 366, 16112, 14, 18454, 6058, 1600, 366...
2.599398
5,312
import network if __name__ == '__main__': from machine import SPI from Maix import GPIO import socket, time from fpioa_manager import fm ################ config ################ local_ip = "192.168.0.117" local_netmask = "255.255.255.0" local_gateway = "255.255.255.0" local_dns_server = "8.8.8.8" ...
[ 11748, 3127, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 628, 220, 422, 4572, 1330, 49091, 198, 220, 422, 6669, 844, 1330, 50143, 198, 220, 1330, 17802, 11, 640, 198, 220, 422, 277, 79, 952, 64, 62, 37153, 13...
2.615708
713
from .base import Base import subprocess
[ 6738, 764, 8692, 1330, 7308, 198, 11748, 850, 14681, 628 ]
4.2
10
# Copyright 2020 Tensorforce Team. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
[ 2, 15069, 12131, 309, 22854, 3174, 4816, 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, 287, 11846, 351, ...
4.063492
189
import os import glob import pandas as pd import xml.etree.ElementTree as ET file_name='' new_name='' main()
[ 11748, 28686, 201, 198, 11748, 15095, 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 11748, 35555, 13, 316, 631, 13, 20180, 27660, 355, 12152, 201, 198, 7753, 62, 3672, 28, 7061, 201, 198, 3605, 62, 3672, 28, 7061, 201, 198, 2...
2.346154
52
#!/usr/bin/env python # encoding: utf-8 import os import re from setuptools import setup, find_packages setup( name='status', version=version_read(), description='HTTP status code reporting for GET and POST requests', long_description=(docs_read('README.rst')), url='https://github.com/chrissimpk...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 21004, 25, 3384, 69, 12, 23, 198, 198, 11748, 28686, 198, 11748, 302, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 628, 198, 198, 40406, 7, 198, 220, 220, 220, ...
2.665663
664
from unittest import skipUnless, TestCase import os from app_common.apptools.testing_utils import temp_bringup_ui_for try: from pybleau.app.api import FilterExpression, FilterExpressionManager except ImportError: pass if os.environ.get("ETS_TOOLKIT", "qt4") == "null": ui_available = False else: ui_ava...
[ 6738, 555, 715, 395, 1330, 14267, 28042, 11, 6208, 20448, 198, 11748, 28686, 198, 198, 6738, 598, 62, 11321, 13, 1324, 31391, 13, 33407, 62, 26791, 1330, 20218, 62, 48580, 929, 62, 9019, 62, 1640, 198, 28311, 25, 198, 220, 220, 220, ...
2.818841
138
########### # Translations between more friendly describtions of OGR-drivers and short codes. # adresses: TRUI issue #2 https://bitbucket.org/KMS/trui/issue/2/ogr-driver-naming # more or less taken directly from http://www.gdal.org/ogr/ogr_formats.html # simlk, march 2013 ############## # FORMAT: Long name: (shor...
[ 7804, 21017, 201, 198, 2, 3602, 49905, 1022, 517, 8030, 2225, 45240, 286, 440, 10761, 12, 36702, 290, 1790, 12416, 13, 201, 198, 2, 512, 16746, 25, 7579, 10080, 2071, 1303, 17, 3740, 1378, 2545, 27041, 316, 13, 2398, 14, 42, 5653, 1...
2.105622
1,761
#! /usr/bin/env python3 import ctypes as ct import os from bcc import BPF from bcc.table import BPF_MAP_TYPE_HASH_OF_MAPS from bcc.libbcc import lib lib.bpf_create_map_in_map.argtypes = [ct.c_int, ct.c_char_p, ct.c_int, ct.c_int, ct.c_int, ct.c_int] # pin the inner map setup = BPF(text=""" BPF_HASH(inner_map, u64, ...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 269, 19199, 355, 269, 83, 198, 11748, 28686, 198, 198, 6738, 275, 535, 1330, 20997, 37, 198, 6738, 275, 535, 13, 11487, 1330, 20997, 37, 62, 33767, 62, 25216, 62, ...
1.94843
446
# Python code to illustrate # regression using data set import matplotlib.pyplot as plt import numpy as np from sklearn import datasets, linear_model import pandas as pd # Load CSV and columns from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense df = pd.read_csv("https://raw.github...
[ 2, 11361, 2438, 284, 19418, 198, 2, 20683, 1262, 1366, 900, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 35720, 1330, 40522, 11, 14174, 62, 19849, 198, 11748, 19798, ...
2.758559
555
import torch import torch.nn as nn import torch.nn.functional as F from distributions import Categorical, Categorical2D from utils import init, init_normc_ import math import numpy as np from densenet_pytorch.densenet import DenseNet # from coord_conv_pytorch.coord_conv import nn.Conv2d, nn.Conv2dTranspose #from nn....
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 198, 6738, 24570, 1330, 327, 2397, 12409, 11, 327, 2397, 12409, 17, 35, 198, 6738, 3384, 4487, 1330, 2315, 11, 2315, 62,...
2.515528
161
import pytest from lispyc import nodes from lispyc.exceptions import SpecialFormSyntaxError from lispyc.nodes import Branch, ComposedForm, Cond, Constant, Program, Variable from lispyc.parser import parse from .data import FORM_PROGRAMS, FORMS VALID_1_BRANCH_PROGRAMS = [ "($name$ $value$ ((x 7 y) (a b)) $default...
[ 11748, 12972, 9288, 198, 198, 6738, 300, 8802, 88, 66, 1330, 13760, 198, 6738, 300, 8802, 88, 66, 13, 1069, 11755, 1330, 6093, 8479, 13940, 41641, 12331, 198, 6738, 300, 8802, 88, 66, 13, 77, 4147, 1330, 20551, 11, 3082, 1335, 8479, ...
2.36899
832
import json from modules.const import Const from modules.lib.agent_utils import run_on_bash
[ 11748, 33918, 198, 6738, 13103, 13, 9979, 1330, 4757, 198, 6738, 13103, 13, 8019, 13, 25781, 62, 26791, 1330, 1057, 62, 261, 62, 41757, 628 ]
3.72
25
import redis from django.conf import settings from .models import Product # Connect to redis conn = redis.Redis(host=settings.REDIS_HOST, port=settings.REDIS_PORT, db=settings.REDIS_DB)
[ 11748, 2266, 271, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 764, 27530, 1330, 8721, 198, 198, 2, 8113, 284, 2266, 271, 198, 37043, 796, 2266, 271, 13, 7738, 271, 7, 4774, 28, 33692, 13, 22083, 1797, 62, 39, 10892, 1...
2.237624
101
import pandas as pd import numpy as np import ast import pickle
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 6468, 198, 11748, 2298, 293, 628, 628 ]
3.190476
21
# Defining a class called heapnode that has stores the symbol,frequency of the symbol, pointer to each of its children # and a flag variable called "bits" which denotes if its the left child or the right child # Function that creates our huffman tree by taking our priority queue as input and outputs the root node # ...
[ 2, 2896, 3191, 257, 1398, 1444, 24575, 17440, 326, 468, 7000, 262, 6194, 11, 35324, 286, 262, 6194, 11, 17562, 284, 1123, 286, 663, 1751, 198, 2, 290, 257, 6056, 7885, 1444, 366, 9895, 1, 543, 43397, 611, 663, 262, 1364, 1200, 393, ...
4.387283
173
# Copyright (c) Microsoft. All rights reserved. # Licensed under the MIT license. See LICENSE file in the project root for # full license information. import pytest import asyncio import sample_content from horton_logging import logger # Amount of time to wait after updating desired properties. wait_time_for_desired_...
[ 2, 15069, 357, 66, 8, 5413, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 5964, 13, 4091, 38559, 24290, 2393, 287, 262, 1628, 6808, 329, 198, 2, 1336, 5964, 1321, 13, 198, 198, 11748, 12972, 9288, 198, 11748, 30351, 952...
2.787037
540
""" Entrada de dados """ num_1 = int(input('Digite um número: ')) num_2 = int(input('Digite outro: ')) print(num_1 ** num_2)
[ 37811, 198, 14539, 81, 4763, 390, 9955, 418, 198, 37811, 198, 198, 22510, 62, 16, 796, 493, 7, 15414, 10786, 19511, 578, 23781, 299, 21356, 647, 78, 25, 705, 4008, 198, 22510, 62, 17, 796, 493, 7, 15414, 10786, 19511, 578, 503, 305,...
2.172414
58
# Generated by Django 3.1.4 on 2020-12-05 11:59 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 19, 319, 12131, 12, 1065, 12, 2713, 1367, 25, 3270, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
from .aarch64_disasm_processor import AArch64DisassemblyProcessor from .amd64_disasm_processor import AMD64DisassemblyProcessor from typing import List import angr
[ 6738, 764, 64, 998, 2414, 62, 6381, 8597, 62, 41341, 1330, 317, 19895, 2414, 7279, 41873, 18709, 273, 198, 6738, 764, 28745, 2414, 62, 6381, 8597, 62, 41341, 1330, 10324, 2414, 7279, 41873, 18709, 273, 198, 198, 6738, 19720, 1330, 7343,...
3.553191
47
from zeit.cms.content.util import objectify_soup_fromstring import lxml.etree import lxml.objectify import zope.interface import zope.location.location import zope.proxy import zope.schema import zope.schema.interfaces import zope.security._proxy import zope.security.checker import zope.security.proxy DEFAULT_MARKER ...
[ 6738, 41271, 270, 13, 46406, 13, 11299, 13, 22602, 1330, 2134, 1958, 62, 82, 10486, 62, 6738, 8841, 198, 11748, 300, 19875, 13, 316, 631, 198, 11748, 300, 19875, 13, 15252, 1958, 198, 11748, 1976, 3008, 13, 39994, 198, 11748, 1976, 30...
2.527489
673
from collections import defaultdict, Counter from typing import List from scorer.product_of_experts import Expert from scorer.scorer import get_relations
[ 6738, 17268, 1330, 4277, 11600, 11, 15034, 198, 6738, 19720, 1330, 7343, 198, 198, 6738, 30664, 13, 11167, 62, 1659, 62, 23100, 912, 1330, 25516, 198, 6738, 30664, 13, 1416, 11934, 1330, 651, 62, 39468, 628 ]
4.333333
36
# web_app/routes/home_routes.py from flask import Blueprint, render_template home_routes = Blueprint("home_routes", __name__) @home_routes.route("/") @home_routes.route("/hello") @home_routes.route("/about")
[ 2, 3992, 62, 1324, 14, 81, 448, 274, 14, 11195, 62, 81, 448, 274, 13, 9078, 201, 198, 201, 198, 6738, 42903, 1330, 39932, 11, 8543, 62, 28243, 201, 198, 201, 198, 11195, 62, 81, 448, 274, 796, 39932, 7203, 11195, 62, 81, 448, 27...
2.27551
98
import numpy as np from runner.action.set.variable import Variable class Continuous(Variable): """Continuous variable low <= variable < high Args: low (float): low boundary high (float): high boundary route (str): route to value (see Action) """
[ 11748, 299, 32152, 355, 45941, 198, 198, 6738, 17490, 13, 2673, 13, 2617, 13, 45286, 1330, 35748, 628, 198, 4871, 45012, 7, 43015, 2599, 198, 220, 220, 220, 37227, 17875, 5623, 7885, 628, 220, 220, 220, 220, 220, 220, 220, 1877, 19841...
2.570248
121
"""empty message Revision ID: 64169b01290d Revises: 53b58719e03b Create Date: 2019-04-17 17:29:09.098849 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '64169b01290d' down_revision = '53b58719e03b' branch_labels = None depends_on = None
[ 37811, 28920, 3275, 198, 198, 18009, 1166, 4522, 25, 5598, 22172, 65, 486, 24369, 67, 198, 18009, 2696, 25, 7192, 65, 44617, 1129, 68, 3070, 65, 198, 16447, 7536, 25, 13130, 12, 3023, 12, 1558, 1596, 25, 1959, 25, 2931, 13, 2931, 34...
2.555556
117
# -*- coding:utf-8 -*- from app.libs.redprint import Redprint api = Redprint('user') @api.route('/login', methods=['POST'])
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 6738, 598, 13, 8019, 82, 13, 445, 4798, 1330, 2297, 4798, 198, 198, 15042, 796, 2297, 4798, 10786, 7220, 11537, 628, 198, 31, 15042, 13, 38629, 10786, 14, 38235, 3256, 5050...
2.54
50
#!/usr/bin/env python __author__ = 'cmantas' import sqlite3 import matplotlib.pyplot as plt import argparse from mpl_toolkits.mplot3d import Axes3D from matplotlib import cm from matplotlib.ticker import LinearLocator, FormatStrFormatter import matplotlib.pyplot as plt from matplotlib.pyplot import figure, show impor...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 834, 9800, 834, 796, 705, 11215, 415, 292, 6, 628, 198, 11748, 44161, 578, 18, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 1822, 29572, 198, 6738, 285, ...
2.89375
160
import torch def matrix_symmetry(matrix): """Checks the symmetry of the input matrix. Parameters ---------- matrix: torch.FloatTensor The matrix to check. """ if torch.eq(matrix, matrix.t()).all().item() == 0: raise ValueError("The input matrix is not symmetrical.") def pu_l...
[ 11748, 28034, 628, 198, 4299, 17593, 62, 1837, 3020, 11973, 7, 6759, 8609, 2599, 198, 220, 220, 220, 37227, 7376, 4657, 262, 40686, 286, 262, 5128, 17593, 13, 628, 220, 220, 220, 40117, 198, 220, 220, 220, 24200, 438, 198, 220, 220, ...
2.772382
659
import datetime import dateutil.parser if __name__ == "__main__": tests = ( "January 3, 2003", # a string (5, "Oct", 55), # a tuple "Thursday, November 18", # longer string without year "7/24/04", ...
[ 11748, 4818, 8079, 198, 11748, 3128, 22602, 13, 48610, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 5254, 796, 357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 21339, 513, 11...
1.67803
528
from model.simulator import RunSingleTactic from model.config_classes import SingleConfig from plotting.paper_figs import CombinedModelPlot # config_sing = SingleConfig(10, 10**(-3), 10**(-6), 1, 1, 0.5, 0.5) config_sing = SingleConfig(10, None, None, 1, 1, 0.5, 0.5) config_sing.load_saved = False RR, RS, SR = (10**...
[ 6738, 2746, 13, 14323, 8927, 1330, 5660, 28008, 51, 12009, 198, 6738, 2746, 13, 11250, 62, 37724, 1330, 14206, 16934, 198, 6738, 29353, 13, 20189, 62, 5647, 82, 1330, 32028, 17633, 43328, 628, 198, 2, 4566, 62, 12215, 796, 14206, 16934,...
2.47561
246
#!/usr/bin/env python # coding: utf-8 # # Self-Driving Car Engineer Nanodegree # # # ## Project: **Finding Lane Lines on the Road** # *** # In this project, you will use the tools you learned about in the lesson to identify lane lines on the road. You can develop your pipeline on a series of individual images, and...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 1303, 12189, 12, 20564, 1075, 1879, 23164, 18008, 1098, 70, 631, 198, 2, 220, 198, 2, 220, 198, 2, 22492, 4935, 25, 12429, 36276, 15016...
3.387691
3,477
#!/usr/bin/env python """ Convert from interval file to summary tree file. Default input file format is BED (0-based, half-open intervals). usage: %prog <options> in_file out_file -c, --chr-col: chromosome column, default=1 -s, --start-col: start column, default=2 -e, --end-col: end column, default=3 ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 198, 3103, 1851, 422, 16654, 2393, 284, 10638, 5509, 2393, 13, 15161, 5128, 2393, 5794, 318, 347, 1961, 357, 15, 12, 3106, 11, 2063, 12, 9654, 20016, 737, 198, 198, 26060, ...
2.973282
262
import requests import json import pandas as pd from configparser import ConfigParser from .log import logger from .exceptions import QualitubeException config = ConfigParser() config.read("config.ini") API_KEY = config['credentials']['api_key'] class Videos: """ Wrapper Class to the YouTube Data API v3's `...
[ 11748, 7007, 198, 11748, 33918, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 4566, 48610, 1330, 17056, 46677, 198, 6738, 764, 6404, 1330, 49706, 198, 6738, 764, 1069, 11755, 1330, 9537, 270, 3266, 16922, 628, 198, 11250, 796, 17056, ...
3.336283
113
import os import pandas as pd, numpy as np from astrobase.lcmath import find_lc_timegroups from numpy import array as nparr from astropy import units as u from timmy.paths import DATADIR, RESULTSDIR datestr = '20200624' postpath = os.path.join(RESULTSDIR, 'radvel_fitting', f'{datestr}_simple_p...
[ 11748, 28686, 198, 11748, 19798, 292, 355, 279, 67, 11, 299, 32152, 355, 45941, 198, 6738, 6468, 305, 8692, 13, 44601, 11018, 1330, 1064, 62, 44601, 62, 2435, 24432, 198, 6738, 299, 32152, 1330, 7177, 355, 299, 1845, 81, 198, 6738, 64...
2.059908
434
#!/usr/bin/env python from __future__ import division, unicode_literals import os import argparse import math import codecs import torch from itertools import count import onmt.io import onmt.translate import onmt import onmt.ModelConstructor import onmt.modules import opts parser = argparse.ArgumentParser( des...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 11593, 37443, 834, 1330, 7297, 11, 28000, 1098, 62, 17201, 874, 198, 11748, 28686, 198, 11748, 1822, 29572, 198, 11748, 10688, 198, 11748, 40481, 82, 198, 11748, 28034, 198, 1...
2.955801
181
import numpy as np from utils.util import sign from utils.metrics.np_v import metric
[ 11748, 299, 32152, 355, 45941, 198, 6738, 3384, 4487, 13, 22602, 1330, 1051, 198, 6738, 3384, 4487, 13, 4164, 10466, 13, 37659, 62, 85, 1330, 18663, 628, 198 ]
3.107143
28
import sys, logging, os, random, math, open_color, arcade #check to make sure we are running the right version of Python version = (3,7) assert sys.version_info >= version, "This script requires at least Python {0}.{1}".format(version[0],version[1]) #turn on logging, in case we have to leave ourselves debugging messa...
[ 11748, 25064, 11, 18931, 11, 28686, 11, 4738, 11, 10688, 11, 1280, 62, 8043, 11, 27210, 198, 198, 2, 9122, 284, 787, 1654, 356, 389, 2491, 262, 826, 2196, 286, 11361, 198, 9641, 796, 357, 18, 11, 22, 8, 198, 30493, 25064, 13, 9641...
2.655303
264
from ..linalg import lu, svd, qr, eig from numpy import random as _random, sqrt from numpy.linalg import norm from ..utils import _float, _svdCond, traceXTX, eig_flip, svd_flip from ..random import uniform # __all__ = ['randomizedSVD', 'randomizedEig'] def randomized_projection(X, k, solver = 'lu', max_iter = 4): ...
[ 198, 6738, 11485, 75, 1292, 70, 1330, 300, 84, 11, 264, 20306, 11, 10662, 81, 11, 304, 328, 198, 6738, 299, 32152, 1330, 4738, 355, 4808, 25120, 11, 19862, 17034, 198, 6738, 299, 32152, 13, 75, 1292, 70, 1330, 2593, 198, 6738, 11485...
2.733125
1,600
#This code attempts to do a proof of principle calucation that our idea works in high dimensions #To gain some intition as to what is going on, we will do things in two dimensions first so that we can plot everything #Import standard python packages: import numpy as np import matplotlib.pyplot as plt from scipy.integ...
[ 2, 1212, 2438, 6370, 284, 466, 257, 6617, 286, 7989, 2386, 1229, 341, 326, 674, 2126, 2499, 287, 1029, 15225, 198, 2, 2514, 4461, 617, 493, 653, 355, 284, 644, 318, 1016, 319, 11, 356, 481, 466, 1243, 287, 734, 15225, 717, 523, 32...
2.367681
6,473
from typing import List from tortoise.contrib.pydantic import pydantic_model_creator from api.database.schemas import Pokemon # Base Pokemon Pydantic Model created from the Tortoise-ORM Model. PokemonBase = pydantic_model_creator(Pokemon, name="PokemonIn", exclude_readonly=True) # Outgoing Pokemon Pydantic Model cr...
[ 6738, 19720, 1330, 7343, 198, 198, 6738, 7619, 25678, 13, 3642, 822, 13, 79, 5173, 5109, 1330, 279, 5173, 5109, 62, 19849, 62, 45382, 198, 198, 6738, 40391, 13, 48806, 13, 1416, 4411, 292, 1330, 14878, 628, 198, 2, 7308, 14878, 350, ...
3.02459
244
from Util import Analyzer, Plot, APlot from QueueBase import Queue from multiprocesser import Process import random import numpy if __name__ == '__main__': p = Process(8) fin = p.Exec(main, [0.01 * i + 0.3 for i in range(170)]) # print(fin) plt = APlot(fin) plt.show() # main(0.625)
[ 6738, 7273, 346, 1330, 16213, 9107, 11, 28114, 11, 3486, 26487, 198, 6738, 4670, 518, 14881, 1330, 4670, 518, 198, 6738, 18540, 305, 919, 263, 1330, 10854, 198, 11748, 4738, 198, 11748, 299, 32152, 628, 628, 198, 198, 361, 11593, 3672, ...
2.4
130
# Copyright 2021 Seb Seager # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, softw...
[ 2, 15069, 33448, 20639, 1001, 3536, 198, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, ...
3.622407
241
from rest_framework import routers from .views import SourceModelViewset app_name = "geosource" router = routers.SimpleRouter() router.register(r"", SourceModelViewset, basename="geosource") urlpatterns = router.urls
[ 6738, 1334, 62, 30604, 1330, 41144, 198, 198, 6738, 764, 33571, 1330, 8090, 17633, 7680, 2617, 198, 198, 1324, 62, 3672, 796, 366, 469, 418, 1668, 1, 198, 198, 472, 353, 796, 41144, 13, 26437, 49, 39605, 3419, 198, 198, 472, 353, 13...
3.126761
71
from typing import Callable import concurrent.futures as futures import enum import threading import pyservices.generated.eventstore.service_pb2 as es import pyservices.generated.eventstore.event_pb2 as esdata import pyservices.generated.eventstore.service_pb2_grpc as esgrpc import pyservices.generated.consumerstore.se...
[ 6738, 19720, 1330, 4889, 540, 198, 11748, 24580, 13, 69, 315, 942, 355, 25650, 198, 11748, 33829, 198, 11748, 4704, 278, 198, 11748, 279, 893, 712, 1063, 13, 27568, 13, 15596, 8095, 13, 15271, 62, 40842, 17, 355, 1658, 198, 11748, 279...
3.335616
146
from django.contrib.messages.views import SuccessMessageMixin from django.views.generic.edit import CreateView from django.urls import reverse from django.shortcuts import render from django.utils.encoding import force_text from django.utils.http import urlsafe_base64_decode from .signupForm import SignupForm from ......
[ 6738, 42625, 14208, 13, 3642, 822, 13, 37348, 1095, 13, 33571, 1330, 16282, 12837, 35608, 259, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 13, 19312, 1330, 13610, 7680, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 6738, 42...
3.576577
111
import matplotlib as mpl font = {'family' : 'serif', 'size' : 16} mpl.rc('font', **font) import numpy as np radii = np.fromfile('radii.dat', dtype=float, count=-1, sep='') forces = np.fromfile('forces.dat', dtype=float, count=-1, sep='') import matplotlib.pyplot as plt plt.figure() r = np.arange(min(radii)...
[ 11748, 2603, 29487, 8019, 355, 285, 489, 198, 10331, 796, 1391, 6, 17989, 6, 1058, 705, 2655, 361, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 705, 7857, 6, 220, 220, 1058, 1467, 92, 198, 76, 489, 13, 6015, 10786, 10331, 3256, 1...
2.128655
342
import random import torch from torchsegmentor.operator.base_operator import BaseOperator from torchsegmentor.model.pspnet import make_pspnet
[ 11748, 4738, 198, 11748, 28034, 198, 6738, 28034, 325, 5154, 273, 13, 46616, 13, 8692, 62, 46616, 1330, 7308, 18843, 1352, 198, 198, 6738, 28034, 325, 5154, 273, 13, 19849, 13, 862, 79, 3262, 1330, 787, 62, 862, 79, 3262, 628 ]
3.512195
41
from abc import ABC
[ 6738, 450, 66, 1330, 9738, 628 ]
3.5
6
from .exceptions import NotSignedInError from .endpoint import Sites, Views, Users, Groups, Workbooks, Datasources, Projects, Auth, Schedules, ServerInfo import requests
[ 6738, 764, 1069, 11755, 1330, 1892, 50, 3916, 818, 12331, 198, 6738, 764, 437, 4122, 1330, 37034, 11, 29978, 11, 18987, 11, 27441, 11, 5521, 12106, 11, 16092, 292, 2203, 11, 29898, 11, 26828, 11, 27774, 5028, 11, 9652, 12360, 198, 198...
3.822222
45
# coding: utf-8 import numpy as np import pandas as pd import scipy.misc as spm import os, sys import posterior_predictive_inferences as ppi import encode_decode as edcode if __name__=='__main__': ngram_path = sys.argv[1] n = int(ngram_path.split('gram')[0][-1]) result_dir = os.path.split(ngram_path)[0] hdf5...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 629, 541, 88, 13, 44374, 355, 599, 76, 198, 11748, 28686, 11, 25064, 198, 11748, 34319, 62, 79, 17407, 425, ...
2.430976
891
from import1b import * print(var)
[ 6738, 1330, 16, 65, 1330, 1635, 198, 4798, 7, 7785, 8, 198 ]
2.833333
12
from django.urls import path from .views.registroUserView import registroUserView from .views.detalleUserView import detalleUserView from .views.ListaInmueblesView import ListaInmueblesView from .views.CrearInmuebleView import CrearInmuebleView from .views.EliminarInmuebleView import EliminarInmuebleView from .views.Li...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 764, 33571, 13, 2301, 396, 305, 12982, 7680, 1330, 4214, 305, 12982, 7680, 198, 6738, 764, 33571, 13, 15255, 6765, 12982, 7680, 1330, 1062, 6765, 12982, 7680, 198, 6738, 764, 3357...
2.475524
429
""" This code was generated by Codezu. Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. """ from mozurestsdk.mozuclient import default as default_client from mozurestsdk.mozuurl import MozuUrl; from mozurestsdk.urllocation import UrlLocation from mozure...
[ 198, 37811, 198, 220, 220, 220, 770, 2438, 373, 7560, 416, 6127, 27624, 13, 220, 220, 220, 220, 220, 628, 220, 220, 220, 19179, 284, 428, 2393, 743, 2728, 11491, 4069, 290, 481, 307, 2626, 611, 198, 220, 220, 220, 262, 2438, 318, ...
2.951613
124