content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
"""Edge Recombination Operation. Edge recombination (ERO) is a fairly complicated crossover operation for permutation encoded GAs. It is useful when the order of values is more important than their absolute position. For example, when alleles are vertices in a graph and the fitness function considers edges between the...
[ 37811, 37021, 3311, 2381, 1883, 14680, 13, 198, 198, 37021, 44759, 1883, 357, 34812, 8, 318, 257, 6547, 8253, 27668, 4905, 329, 198, 16321, 7094, 30240, 402, 1722, 13, 632, 318, 4465, 618, 262, 1502, 286, 3815, 318, 517, 198, 18049, 6...
2.455668
891
import logging import azure.functions as func
[ 11748, 18931, 198, 198, 11748, 35560, 495, 13, 12543, 2733, 355, 25439, 628 ]
3.692308
13
import jk_console #
[ 628, 198, 11748, 474, 74, 62, 41947, 628, 628, 628, 198, 2, 628, 628, 628 ]
2.266667
15
# -*- coding: utf-8 -*- """ Created on Fri Nov 12 15:15:10 2021 @author: hbckleikamp """ #%% change directory to script directory (should work on windows and mac) import os from pathlib import Path from inspect import getsourcefile os.chdir(str(Path(os.path.abspath(getsourcefile(lambda:0))).parents[0])) scr...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 19480, 5267, 1105, 1315, 25, 1314, 25, 940, 33448, 201, 198, 201, 198, 31, 9800, 25, 289, 65, 694, 293, 1134, 696, 201, 198, 37811, ...
2.19273
1,183
#!/usr/bin/env python3 print('hello space')
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 4798, 10786, 31373, 2272, 11537, 198 ]
2.75
16
import pygame, sys from pygame.locals import * pygame.init() FPS = 30 curSurface = pygame.display.set_mode((400, 340), 0, 32) pygame.display.set_caption("font") #设置颜色 BLACK = (0, 0, 0) WHITE = (255, 255, 255) RED = (255, 0, 0) GREEN = (0, 255, 0) BLUE = (0, 0, 255) fontObj = pygame.font.Font("SourceCodePro-It.t...
[ 11748, 12972, 6057, 11, 25064, 198, 6738, 12972, 6057, 13, 17946, 874, 1330, 1635, 198, 198, 9078, 6057, 13, 15003, 3419, 198, 198, 37, 3705, 796, 1542, 198, 198, 22019, 14214, 2550, 796, 12972, 6057, 13, 13812, 13, 2617, 62, 14171, 1...
2.214286
336
""" Copyright 2020 Ross Wightman 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, software ...
[ 37811, 198, 15269, 12131, 9847, 370, 432, 805, 198, 198, 26656, 15385, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 5832, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 1639...
3.198218
449
from eth_utils import ( force_bytes, )
[ 6738, 4555, 62, 26791, 1330, 357, 198, 220, 220, 220, 2700, 62, 33661, 11, 198, 8, 628, 628, 198 ]
2.473684
19
from __future__ import division from vsr.common.helpers import logger from vsr.common.helpers import results as results_helper from vsr.common.helpers import plot as plot_helper from vsr.common.helpers.extras import merge_params from vsr.modules.metrics.measures import f_score, mean_ap, precision, recall # from vsr.me...
[ 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 3691, 81, 13, 11321, 13, 16794, 364, 1330, 49706, 198, 6738, 3691, 81, 13, 11321, 13, 16794, 364, 1330, 2482, 355, 2482, 62, 2978, 525, 198, 6738, 3691, 81, 13, 11321, 13, 16794, ...
3.304636
151
# # gaussInterp routine -- Gaussian weighted smoothing in lat, lon, and time # # Based on Ed Armstrong's routines. # # Calls into optimized routines in Fortran or cython. # See gaussInterp_f.f or gaussInterp.pyx # import numpy as N, time from gaussInterp_f import gaussinterp_f def gaussInterp(var, ...
[ 2, 198, 2, 31986, 1046, 9492, 79, 8027, 1377, 12822, 31562, 26356, 32746, 722, 287, 3042, 11, 300, 261, 11, 290, 640, 198, 2, 198, 2, 13403, 319, 1717, 21166, 338, 31878, 13, 198, 2, 198, 2, 27592, 656, 23392, 31878, 287, 6401, 25...
2.250929
1,076
message = "Hello World" print(len(message[0:5])) import sys import math for i in range(len(message)): if (message[i] == " "): print(f"{i}: ---") else: print(f"{i}:{message[i]}", end="\t") xword = "fuckhaton {0}".format("hi") if ("fuck" in xword): xword = xword.replac...
[ 20500, 796, 366, 15496, 2159, 1, 201, 198, 201, 198, 4798, 7, 11925, 7, 20500, 58, 15, 25, 20, 60, 4008, 201, 198, 201, 198, 11748, 25064, 201, 198, 201, 198, 11748, 10688, 201, 198, 201, 198, 1640, 1312, 287, 2837, 7, 11925, 7, ...
2.097326
935
#!/usr/local/bin/python3 MYSQL = { 'host': '127.0.0.1', 'user': 'root', 'password': 'root', 'db': 'comment', 'port': '3306', 'charset': 'utf8', } LOG = { 'MySql': 'mysql/error.log', 'Driver': 'driver/error.log', 'Request': 'request/error.log', 'Soup': 'soup/error.log' } url_lis...
[ 2, 48443, 14629, 14, 12001, 14, 8800, 14, 29412, 18, 198, 44, 16309, 9711, 796, 1391, 198, 220, 220, 220, 705, 4774, 10354, 705, 16799, 13, 15, 13, 15, 13, 16, 3256, 198, 220, 220, 220, 705, 7220, 10354, 705, 15763, 3256, 198, 220...
1.613828
1,779
import inspect from typing import Iterable, Sequence, Tuple, TypeVar from pydantic import BaseModel from pydantic.fields import ( MAPPING_LIKE_SHAPES, SHAPE_LIST, SHAPE_TUPLE, SHAPE_TUPLE_ELLIPSIS, ModelField, ) T = TypeVar("T") def grouped(items: Sequence[T], n: int = 2) -> Iterable[Tuple[T, .....
[ 11748, 10104, 198, 6738, 19720, 1330, 40806, 540, 11, 45835, 11, 309, 29291, 11, 5994, 19852, 198, 198, 6738, 279, 5173, 5109, 1330, 7308, 17633, 198, 6738, 279, 5173, 5109, 13, 25747, 1330, 357, 198, 220, 220, 220, 337, 24805, 2751, ...
2.247312
279
# Copyright 2021 nakamura_yuki # # This program comes from Qiita article # URL: https://qiita.com/vpcf/items/b680f504cfe8b6a64222 # # 他のカラーマップに関してはMatplotlibやgeocat-vizで対応可能 # # To Do # - get_colormapで存在しないカラーマップを指定した際に、 #  (自作の?)エラーを表示させるようにする # from matplotlib.colors import LinearSegmentedColormap, ListedColormap ...
[ 2, 15069, 33448, 299, 461, 37324, 62, 88, 11308, 198, 2, 220, 198, 2, 770, 1430, 2058, 422, 21924, 5350, 2708, 198, 2, 10289, 25, 3740, 1378, 40603, 5350, 13, 785, 14, 36133, 12993, 14, 23814, 14, 65, 37397, 69, 33580, 66, 5036, 2...
1.524943
21,549
import inquirer from enum import Enum from controllers.tournament_controller import get_all_tournaments_as_list, get_tournament_from_id, deserialize_tournament from constants.common_constants import ANSWER_KEY from views.tournament.single_tournament_view import single_tournament_prompt class Answer(Enum): """Poss...
[ 11748, 38212, 81, 198, 6738, 33829, 1330, 2039, 388, 198, 6738, 20624, 13, 83, 5138, 62, 36500, 1330, 651, 62, 439, 62, 83, 16950, 62, 292, 62, 4868, 11, 651, 62, 83, 5138, 62, 6738, 62, 312, 11, 748, 48499, 1096, 62, 83, 5138, ...
2.461988
684
# necessary imports - do not change, and include on every slide import dash_html_components as html from app import app import dash_core_components as dcc from dash.dependencies import Output, Input, State ### content = html.H1('End',style=dict(textAlign='center'))
[ 2, 3306, 17944, 532, 466, 407, 1487, 11, 290, 2291, 319, 790, 10649, 198, 11748, 14470, 62, 6494, 62, 5589, 3906, 355, 27711, 198, 6738, 598, 1330, 598, 198, 11748, 14470, 62, 7295, 62, 5589, 3906, 355, 288, 535, 198, 6738, 14470, 1...
3.546667
75
from discord.ext import commands from os import environ from protobot.roles.commands import friend bot = commands.Bot(command_prefix='pt!') bot.add_command(friend) if __name__ == '__main__': start()
[ 6738, 36446, 13, 2302, 1330, 9729, 198, 6738, 28686, 1330, 551, 2268, 198, 6738, 1237, 672, 313, 13, 305, 829, 13, 9503, 1746, 1330, 1545, 198, 198, 13645, 796, 9729, 13, 20630, 7, 21812, 62, 40290, 11639, 457, 0, 11537, 198, 198, 1...
3.014706
68
from pyspark.ml.feature import OneHotEncoder, StringIndexer from pyspark.sql import SQLContext as spark import pyspark.sql.functions as funct from pyspark.ml import Pipeline, Transformer from pyspark.ml.feature import Imputer from pyspark.sql.functions import year, month, dayofmonth from pyspark.sql.types import Double...
[ 6738, 279, 893, 20928, 13, 4029, 13, 30053, 1330, 1881, 21352, 27195, 12342, 11, 10903, 15732, 263, 198, 6738, 279, 893, 20928, 13, 25410, 1330, 16363, 21947, 355, 9009, 198, 11748, 279, 893, 20928, 13, 25410, 13, 12543, 2733, 355, 1257...
3.425101
247
"""template script for creating a csv file from a dictionary""" import csv # sample of a list of dictionaries # normally this would be in a separate file, or # constructed from data in a separate file presidents_list = [ {"Presidency":1,"President":"George Washington","Wikipedia_entry":"http://en.wikipedia.org/wiki/Ge...
[ 37811, 28243, 4226, 329, 4441, 257, 269, 21370, 2393, 422, 257, 22155, 37811, 198, 11748, 269, 21370, 198, 198, 2, 6291, 286, 257, 1351, 286, 48589, 3166, 198, 2, 7685, 428, 561, 307, 287, 257, 4553, 2393, 11, 393, 198, 2, 12006, 42...
3.250547
914
""" Tests of bcforms command line interface (bcforms.__main__) :Author: Jonathan Karr <karr@mssm.edu> :Date: 2019-06-25 :Copyright: 2019, Karr Lab :License: MIT """ from bcforms import __main__ import bcforms import capturer import mock import unittest
[ 37811, 30307, 286, 47125, 23914, 3141, 1627, 7071, 357, 15630, 23914, 13, 834, 12417, 834, 8, 198, 198, 25, 13838, 25, 11232, 509, 3258, 1279, 74, 3258, 31, 76, 824, 76, 13, 15532, 29, 198, 25, 10430, 25, 13130, 12, 3312, 12, 1495, ...
3.011765
85
# -*- coding: utf-8 -*- # @Time : 2020/9/12 下午11:57 # @Author : 司云中 # @File : bonus_api.py # @Software: Pycharm from rest_framework.generics import GenericAPIView from rest_framework.mixins import * from rest_framework.permissions import IsAuthenticated from voucher_app.models.voucher_models import VoucherConsumer ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 7575, 220, 1058, 12131, 14, 24, 14, 1065, 220, 10310, 233, 39355, 230, 1157, 25, 3553, 198, 2, 2488, 13838, 1058, 10263, 237, 116, 12859, 239, 40792, 198, 2, ...
2.30602
598
from django.contrib import auth from django.core.cache import cache from django.db import models from django.dispatch import receiver from reserva.core.hash_id import hash_id from reserva.core.managers import NameApplicationManager, NationalityManager @receiver(models.signals.pre_save, sender=NameApplication) ...
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 6284, 198, 6738, 42625, 14208, 13, 7295, 13, 23870, 1330, 12940, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 6381, 17147, 1330, 9733, 198, 198, 6738, 5463, 64, 13,...
3.445455
110
from maya.app.renderSetup.model.selector import SimpleSelector from maya.app.renderSetup.model.selector import BasicSelector from maya.app.renderSetup.model.applyOverride import getAllApplyOverrideClasses from maya.app.renderSetup.model.overrideUtils import getAllOverrideClasses from maya.app.renderSetup.model.collecti...
[ 6738, 743, 64, 13, 1324, 13, 13287, 40786, 13, 19849, 13, 19738, 273, 1330, 17427, 17563, 273, 198, 6738, 743, 64, 13, 1324, 13, 13287, 40786, 13, 19849, 13, 19738, 273, 1330, 14392, 17563, 273, 198, 6738, 743, 64, 13, 1324, 13, 132...
3.406061
165
import ast from typing import List, Tuple, Union, Set from .node_visitor import MyNodeVisitor, NodeNotSupportedError from .util import assign, load, clone_node, parse_ast_expr, parse_ast_stmt # Typing shorthands. ActionsT = List[ast.stmt] VisitExprReturnT = Tuple[ast.expr, ActionsT] # (result expr node, actions) Vi...
[ 11748, 6468, 198, 198, 6738, 19720, 1330, 7343, 11, 309, 29291, 11, 4479, 11, 5345, 198, 198, 6738, 764, 17440, 62, 4703, 2072, 1330, 2011, 19667, 15854, 2072, 11, 19081, 3673, 48181, 12331, 198, 6738, 764, 22602, 1330, 8333, 11, 3440, ...
2.323994
1,963
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import abc import copy import warnings from collections import OrderedDict import numpy as np from astropy.extern import six from astropy.io impor...
[ 2, 49962, 739, 257, 513, 12, 565, 682, 347, 10305, 3918, 5964, 532, 766, 38559, 24290, 13, 81, 301, 198, 6738, 11593, 37443, 834, 1330, 357, 48546, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 11, 198, 220, 220, 220, 220, 220, 220, 22...
2.380374
9,141
import torch.nn as nn from ..util import option_setter from .vconv2d import VConv2d options = { 'ngf': 32, 'conv_size': 3, 'conv_pad': 2, 'pool_size': 3, 'pool_pad': 1, 'pool_stride': 2, 'norm_layer': nn.BatchNorm2d, 'n_downsample': 4, 'use_bias': False, 'shrinking_filter': Fa...
[ 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 11485, 22602, 1330, 3038, 62, 2617, 353, 198, 6738, 764, 85, 42946, 17, 67, 1330, 569, 3103, 85, 17, 67, 628, 198, 25811, 796, 1391, 220, 198, 220, 220, 220, 705, 782, 69, 10354, 3...
2.094241
191
from .tts import play
[ 6738, 764, 83, 912, 1330, 711, 198 ]
3.142857
7
from setuptools import setup from os import path # Get the long description from the DESCRIPTION file with open('DESCRIPTION.rst') as f: long_description = f.read() package_name = 'SubtitleSynchronizer' setup( name=package_name, version='0.0.3', description='Automatically synchronize subtitles with v...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 6738, 28686, 1330, 3108, 198, 198, 2, 3497, 262, 890, 6764, 422, 262, 22196, 40165, 2393, 198, 4480, 1280, 10786, 30910, 40165, 13, 81, 301, 11537, 355, 277, 25, 198, 220, 220, 220, 890, 62, ...
2.623165
613
from lager.httpx import HttpxSink from lager import LAGER_PORT from lager import LOG as log import httpx httpx.post('http://localhost:52437/', data={ 'herm': 234 }) httpsink = HttpxSink(url=f'http://localhost:{LAGER_PORT}/') log.add( httpsink.handle, # level="DEBUG", serialize=True ) import ...
[ 6738, 300, 3536, 13, 4023, 87, 1330, 367, 926, 8416, 50, 676, 198, 6738, 300, 3536, 1330, 406, 4760, 1137, 62, 15490, 198, 6738, 300, 3536, 1330, 41605, 355, 2604, 198, 11748, 2638, 87, 628, 198, 4023, 87, 13, 7353, 10786, 4023, 137...
2.417808
146
import glob import os from abc import ABC, abstractmethod
[ 11748, 15095, 198, 11748, 28686, 198, 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 198 ]
3.866667
15
from images.loader import SingleFolderDataSet from torch.utils.data.dataloader import DataLoader from torchvision import transforms import struct import os def features_saver(dimension, feature_extractor, image_dir, feature_file, input_size): """ write features into feature_file + '.fvecs' write features...
[ 6738, 4263, 13, 29356, 1330, 14206, 41092, 6601, 7248, 198, 6738, 28034, 13, 26791, 13, 7890, 13, 67, 10254, 1170, 263, 1330, 6060, 17401, 198, 6738, 28034, 10178, 1330, 31408, 198, 198, 11748, 2878, 198, 11748, 28686, 628, 198, 4299, 3...
2.615385
702
from cmstk.filetypes import TextFile import copy from typing import Dict, List, Optional class OutcarFile(TextFile): """File wrapper for a VASP OUTCAR file. Args: filepath: Filepath to an OUTCAR file. Attributes: filepath: Filepath to an OUTCAR file. free_energy: Components of th...
[ 6738, 12067, 301, 74, 13, 7753, 19199, 1330, 8255, 8979, 198, 11748, 4866, 198, 6738, 19720, 1330, 360, 713, 11, 7343, 11, 32233, 628, 198, 4871, 3806, 7718, 8979, 7, 8206, 8979, 2599, 198, 220, 220, 220, 37227, 8979, 29908, 329, 257,...
2.741497
147
# myTeam.py # --------- # Licensing Information: You are free to use or extend these projects for # educational purposes provided that (1) you do not distribute or publish # solutions, (2) you retain this notice, and (3) you provide clear # attribution to UC Berkeley, including a link to http://ai.berkeley.edu. # # At...
[ 2, 616, 15592, 13, 9078, 198, 2, 45337, 198, 2, 10483, 26426, 6188, 25, 220, 921, 389, 1479, 284, 779, 393, 9117, 777, 4493, 329, 198, 2, 9856, 4959, 2810, 326, 357, 16, 8, 345, 466, 407, 14983, 393, 7715, 198, 2, 8136, 11, 357,...
2.602723
10,577
import os, pprint import numpy as np import joblib from utils.BaseModel import BaseModel from utils.AwesomeTimeIt import timeit from utils.RegressionReport import evaluate_regression from utils.FeatureImportanceReport import report_feature_importance from sklearn.model_selection import RandomizedSearchCV from sklearn...
[ 11748, 28686, 11, 279, 4798, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 1693, 8019, 198, 198, 6738, 3384, 4487, 13, 14881, 17633, 1330, 7308, 17633, 198, 6738, 3384, 4487, 13, 49061, 7575, 1026, 1330, 640, 270, 198, 6738, 3384, 448...
3.006452
155
#!/usr/bin/env python # shell14 0.0.1 # Generated by dx-app-wizard. # # Basic execution pattern: Your app will run on a single machine from # beginning to end. # # See https://wiki.dnanexus.com/Developer-Portal for documentation and # tutorials on how to modify this file. # # DNAnexus Python Bindings (dxpy) documentati...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 7582, 1415, 657, 13, 15, 13, 16, 198, 2, 2980, 515, 416, 44332, 12, 1324, 12, 86, 8669, 13, 198, 2, 198, 2, 14392, 9706, 3912, 25, 3406, 598, 481, 1057, 319, 257, 2060, 4572, ...
2.881773
203
from flask import Flask, render_template, request import requests import json import os app = Flask(__name__) picfolder = os.path.join('static','pics') app.config['UPLOAD_FOLDER'] = picfolder @app.route('/temperature', methods=['POST']) @app.route('/') if __name__ == '__main__': app.r...
[ 6738, 42903, 1330, 46947, 11, 220, 201, 198, 220, 220, 220, 220, 8543, 62, 28243, 11, 2581, 201, 198, 11748, 7007, 201, 198, 11748, 33918, 201, 198, 11748, 28686, 201, 198, 201, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 201, 198,...
2.417266
139
import os from pathlib import Path from django.urls import reverse_lazy # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/3.2/howto/deployment/checkl...
[ 11748, 28686, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 62, 75, 12582, 198, 198, 2, 10934, 13532, 2641, 262, 1628, 588, 428, 25, 49688, 62, 34720, 1220, 705, 7266, 15908, 4458, 198, 33, 111...
2.38165
2,049
import uuid from conftest import get_test_docker_api from sretoolbox.container.image import Image from managedtenants.bundles.bundle import Bundle from tests.testutils.addon_helpers import reference_addon_bundle_annotations from tests.testutils.paths import REFERENCE_ADDON
[ 11748, 334, 27112, 198, 198, 6738, 369, 701, 395, 1330, 651, 62, 9288, 62, 45986, 62, 15042, 198, 6738, 264, 1186, 970, 3524, 13, 34924, 13, 9060, 1330, 7412, 198, 198, 6738, 5257, 1452, 1187, 13, 65, 917, 829, 13, 65, 31249, 1330, ...
3.378049
82
import matplotlib.pyplot as plt import pickle import numpy as np with open('features.pkl','rb') as f: features=pickle.load(f) with open("labels.pkl",'rb') as f: labels=pickle.load(f) indexs=[] benign_indexs=[] for index,i in enumerate(labels): if i ==1 : indexs.append(index) else: ...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 2298, 293, 198, 11748, 299, 32152, 355, 45941, 198, 4480, 1280, 10786, 40890, 13, 79, 41582, 41707, 26145, 11537, 355, 277, 25, 198, 220, 220, 220, 220, 220, 220, 22...
2.085799
338
import os from multiprocessing.managers import BaseProxy, MakeProxyType, DictProxy import multiprocessing as mp import numpy as np from shared_ndarray.shared_ndarray import SharedNDArray import shared_memory BaseSharedSequenceProxy = MakeProxyType( 'BaseSharedSequenceProxy', ('__contains__', '__getitem__', '...
[ 11748, 28686, 198, 6738, 18540, 305, 919, 278, 13, 805, 10321, 1330, 7308, 44148, 11, 6889, 44148, 6030, 11, 360, 713, 44148, 198, 11748, 18540, 305, 919, 278, 355, 29034, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 4888, 62, 358, ...
3.008368
239
from flask import Flask, render_template, request, url_for, redirect import os import requests from random import random from pymongo import MongoClient from bson.objectid import ObjectId # FRAMEWORK SETUP app = Flask(__name__) host = os.environ.get('MONGODB_URI', 'mongodb://localhost:27017/Eventuu') client = MongoCli...
[ 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 2581, 11, 19016, 62, 1640, 11, 18941, 198, 11748, 28686, 198, 11748, 7007, 198, 6738, 4738, 1330, 4738, 198, 6738, 279, 4948, 25162, 1330, 42591, 11792, 198, 6738, 275, 1559, 13, 15252,...
2.71746
1,260
from typing import Optional, Type, List from sqlalchemy import Column, String, Integer, ForeignKey, Table, Float, \ select from sqlalchemy import inspect from sqlalchemy.engine import Engine from sqlalchemy.orm import relationship from timelink.kleio.groups import KGroup, KElement from timelink.mhk.models.base_cl...
[ 6738, 19720, 1330, 32233, 11, 5994, 11, 7343, 198, 198, 6738, 44161, 282, 26599, 1330, 29201, 11, 10903, 11, 34142, 11, 8708, 9218, 11, 8655, 11, 48436, 11, 3467, 198, 220, 220, 220, 2922, 198, 6738, 44161, 282, 26599, 1330, 10104, 19...
2.404828
6,835
#============================================================================== # These are some scripts for testing the functionality of LSDMappingTools #============================================================================== # -*- coding: utf-8 -*- """ Created on Tue May 05 14:08:16 2015 @author: smudd """ i...
[ 2, 23926, 25609, 855, 198, 2, 2312, 389, 617, 14750, 329, 4856, 262, 11244, 286, 27483, 44, 5912, 33637, 198, 2, 23926, 25609, 855, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 30030, ...
3.293413
167
# -*- coding: utf-8 -*- """ @date: 2020/5/9 下午8:54 @file: __init__.py.py @author: zj @description: """ from .voc import VOCDataset from .coco import COCODataset from .build import build_dataset from .evaluation import evaluate
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 31, 4475, 25, 12131, 14, 20, 14, 24, 220, 10310, 233, 39355, 230, 23, 25, 4051, 198, 31, 7753, 25, 11593, 15003, 834, 13, 9078, 13, 9078, 198, 31, ...
2.333333
99
individuals = {'Pluto': 'active', 'Goofy': 'inactive', 'Sofie': 'active'} for individual, status in individuals.copy().items(): if status == 'inactive': del individuals[individual] active_individuals = {} for individual, status in individuals.items(): if status == 'active': active_ind...
[ 43129, 82, 796, 1391, 6, 3646, 9390, 10354, 705, 5275, 3256, 705, 5247, 1659, 88, 10354, 705, 259, 5275, 3256, 705, 50, 1659, 494, 10354, 705, 5275, 6, 92, 198, 198, 1640, 1981, 11, 3722, 287, 3925, 13, 30073, 22446, 23814, 33529, 1...
2.79375
320
n1 = float(input('Digite a primeira nota: ')) n2 = float(input('Digite a segunda nota: ')) media = (n1+n2)/2 if media >=7: print('A sua media foi {:.2f}. Parabens! Você Passou!'.format(media)) else: print('A sua media foi {:.2f}. Você reprovou! Mais sorte na próxima vez.'.format(media)) '''nome = str(input('Q...
[ 77, 16, 796, 12178, 7, 15414, 10786, 19511, 578, 257, 6994, 8704, 407, 64, 25, 705, 4008, 198, 77, 17, 796, 12178, 7, 15414, 10786, 19511, 578, 257, 384, 70, 46535, 407, 64, 25, 705, 4008, 198, 11431, 796, 357, 77, 16, 10, 77, 1...
2.259434
212
import os from os.path import join import shutil from .core import Builder, convert_md_source HTACCESS = """ # Serving .md files as UTF-8. AddType 'text/plain; charset=UTF-8' md """.strip() DEFAULT_PAGE = {}
[ 11748, 28686, 198, 6738, 28686, 13, 6978, 1330, 4654, 198, 11748, 4423, 346, 198, 198, 6738, 764, 7295, 1330, 35869, 11, 10385, 62, 9132, 62, 10459, 628, 198, 6535, 26861, 7597, 796, 37227, 198, 2, 49208, 764, 9132, 3696, 355, 41002, ...
2.864865
74
# -*- coding: utf-8 -*- """ This module provides code for encoding and serialising Python data structures into their corresponding ROS binary representations. """ import functools import struct from typing import Any, BinaryIO, Callable, Dict, Optional, Sequence, TypeVar from .base import Duration, Time from .decode i...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 1212, 8265, 3769, 2438, 329, 21004, 290, 11389, 1710, 11361, 1366, 8573, 198, 20424, 511, 11188, 48263, 13934, 24612, 13, 198, 37811, 198, 11748, 1257, 310, 10...
2.934263
1,004
# coding: utf8 """ All wordforms are extracted from Norsk Ordbank in Norwegian Bokmål 2005 (CLARINO NB - Språkbanken), Nasjonalbiblioteket, Norway: https://www.nb.no/sprakbanken/show?serial=oai%3Anb.no%3Asbr-5&lang=en License: Creative_Commons-BY (CC-BY) (https://creativecommons.org/licenses/by/4.0/) """ from __future...
[ 2, 19617, 25, 3384, 69, 23, 198, 37811, 198, 3237, 1573, 23914, 389, 21242, 422, 399, 669, 74, 1471, 9945, 962, 287, 22158, 47390, 76, 29090, 75, 5075, 198, 7, 5097, 1503, 46016, 41354, 532, 5522, 29090, 74, 17796, 268, 828, 22767, ...
2.16651
9,603
root = buildTree() print(root.val) l = [0,1,2,3,4,5] print(l[1:3]) tl = [[1,2,3],[4,5,6],[7,8],[9]] if tl.__contains__(5): print("5 is in the 2d-list") else: print("can't figure out the inner level of the multi-dimensional vector") res = replaceSpace("fuck you lettcode") print(res) dtest = {0: 1, 1: 2, 2:...
[ 198, 15763, 796, 1382, 27660, 3419, 198, 4798, 7, 15763, 13, 2100, 8, 198, 198, 75, 796, 685, 15, 11, 16, 11, 17, 11, 18, 11, 19, 11, 20, 60, 198, 4798, 7, 75, 58, 16, 25, 18, 12962, 198, 198, 28781, 796, 16410, 16, 11, 17, ...
2.111111
207
import array as arr numarr = arr.array('i',[10,20,30,40,50,60,70,80]) print("Array items:") print(numarr) #changing index 3 value numarr[3] = 44 print('\n Array items (after modifing):') print(numarr) #changing 1st to 5th index values numarr[1:5] = arr.array('i',[-8,-5,-6,-7]) print("\n Array items (after mod...
[ 11748, 7177, 355, 5240, 201, 198, 22510, 3258, 796, 5240, 13, 18747, 10786, 72, 3256, 58, 940, 11, 1238, 11, 1270, 11, 1821, 11, 1120, 11, 1899, 11, 2154, 11, 1795, 12962, 201, 198, 4798, 7203, 19182, 3709, 25, 4943, 201, 198, 4798,...
2.424658
146
#!/usr/bin/env python3 import argparse import csv import logging import subprocess from pathlib import Path from shutil import copy2 as copyfile from tempfile import mkstemp from time import time_ns ROOT_PATH = Path(__file__).parent.parent.absolute() logging.basicConfig(format='%(asctime)s (%(levelname)8s) %(mess...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 1822, 29572, 198, 11748, 269, 21370, 198, 11748, 18931, 198, 11748, 850, 14681, 198, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 4423, 346, 1330, 4866, 17, 355, 4866, ...
1.878514
2,881
# gap.py # (c) 2013 Mikael Vejdemo-Johansson # BSD License # # SciPy function to compute the gap statistic for evaluating k-means clustering. # Gap statistic defined in # Tibshirani, Walther, Hastie: # Estimating the number of clusters in a data set via the gap statistic # J. R. Statist. Soc. B (2001) 63, Part 2, pp ...
[ 2, 7625, 13, 9078, 198, 2, 357, 66, 8, 2211, 17722, 3010, 8016, 73, 9536, 78, 12, 41, 1219, 44038, 198, 2, 347, 10305, 13789, 198, 2, 198, 2, 10286, 20519, 2163, 284, 24061, 262, 7625, 24696, 329, 22232, 479, 12, 1326, 504, 32966,...
2.274336
791
# Lint as: python3 # Copyright 2020 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
[ 2, 406, 600, 355, 25, 21015, 18, 198, 2, 15069, 12131, 383, 309, 22854, 37535, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743...
3.918519
270
#!/usr/bin/python3 # https://practice.geeksforgeeks.org/problems/number-of-paths/0
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 2, 3740, 1378, 39541, 13, 469, 2573, 30293, 2573, 13, 2398, 14, 1676, 22143, 14, 17618, 12, 1659, 12, 6978, 82, 14, 15, 198 ]
2.515152
33
# Generated by Django 2.2.13 on 2021-03-13 15:43 from django.db import migrations, models import uuid
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 1485, 319, 33448, 12, 3070, 12, 1485, 1315, 25, 3559, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 334, 27112, 628 ]
2.888889
36
import pytest from typing import List from unittest.mock import patch, mock_open from pathlib import Path @pytest.fixture() @pytest.fixture() @pytest.fixture() @pytest.fixture() @pytest.fixture()
[ 11748, 12972, 9288, 198, 6738, 19720, 1330, 7343, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 11, 15290, 62, 9654, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 31, 9078, 9288, 13, 69, 9602, 3419, 198, 198, 31, 9078, 9288, 13...
2.716216
74
from pymongo import MongoClient import os URL = os.environ.get('MONGO_URL') client = MongoClient(URL)
[ 6738, 279, 4948, 25162, 1330, 42591, 11792, 198, 11748, 28686, 198, 198, 21886, 796, 28686, 13, 268, 2268, 13, 1136, 10786, 27857, 11230, 62, 21886, 11537, 198, 16366, 796, 42591, 11792, 7, 21886, 8, 628, 628 ]
2.944444
36
from itertools import product from utils.check_sql import check_sql from utils.parse_compute import parse_judge from utils.results2df import results2df from utils.results2df import df2results import pandas as pd def get_variables_from_sql_mode(results, format_pool_sql): """ "variables": {"v_table": ...
[ 6738, 340, 861, 10141, 1330, 1720, 198, 198, 6738, 3384, 4487, 13, 9122, 62, 25410, 1330, 2198, 62, 25410, 198, 6738, 3384, 4487, 13, 29572, 62, 5589, 1133, 1330, 21136, 62, 10456, 469, 198, 6738, 3384, 4487, 13, 43420, 17, 7568, 1330...
1.847652
4,365
#!/usr/bin/python # -*- coding: utf-8 -*- # --------------------------------------------------------------------- # Copyright (c) 2012 Michael Hull. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are m...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 16529, 30934, 198, 2, 15069, 357, 66, 8, 2321, 3899, 28238, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2...
2.965608
756
#!/usr/bin/env python3 # Example: nums = [2,3,4,5,6,7], target = 6, output: [0,2] # as nums[0] + nums[2] = target def two_sum(nums, target): """Returns a list of index of two numbers if the sum of them is equal to target number, None otherwise""" seen = {} for index, num in enumerate(nums): an...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 17934, 25, 997, 82, 796, 685, 17, 11, 18, 11, 19, 11, 20, 11, 21, 11, 22, 4357, 2496, 796, 718, 11, 5072, 25, 685, 15, 11, 17, 60, 198, 2, 355, 997, 82, 58, 15,...
2.271552
232
from sys import stdin if __name__ == "__main__": main()
[ 6738, 25064, 1330, 14367, 259, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419, 198 ]
2.52
25
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
import io from nose.tools import istest, assert_equal import funk from mammoth import documents, results from mammoth.docx.xmlparser import element as xml_element, text as xml_text from mammoth.docx.document_xml import read_document_xml_element from mammoth.docx.numbering_xml import Numbering from mammoth.docx.relati...
[ 11748, 33245, 198, 198, 6738, 9686, 13, 31391, 1330, 318, 9288, 11, 6818, 62, 40496, 198, 11748, 46212, 198, 198, 6738, 44268, 1330, 4963, 11, 2482, 198, 6738, 44268, 13, 15390, 87, 13, 19875, 48610, 1330, 5002, 355, 35555, 62, 30854, ...
3.566176
136
import re import sys from datetime import datetime from datetime import timedelta # Get hours, minutes and seconds from input. match = re.search(r'([0-9]*)h([0-9]*)m([0-9]*)s', '\n'.join(sys.stdin)) # If it can't parse. if match is None: exit(1) # Get capture groups from the input. groups = match.groups() # If the...
[ 11748, 302, 198, 11748, 25064, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 4818, 8079, 1330, 28805, 12514, 198, 198, 2, 3497, 2250, 11, 2431, 290, 4201, 422, 5128, 13, 198, 15699, 796, 302, 13, 12947, 7, 81, 6, 26933, 15, 12...
2.629032
310
""" define math operations here TODO : """ import tensorflow as tf from tensorflow.python.framework import ops
[ 37811, 198, 13086, 10688, 4560, 994, 198, 220, 16926, 46, 1058, 198, 198, 37811, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 11192, 273, 11125, 13, 29412, 13, 30604, 1330, 39628, 628 ]
3.484848
33
from enum import Enum
[ 6738, 33829, 1330, 2039, 388, 628, 198 ]
3.428571
7
from fastapi import FastAPI from starlette.middleware.cors import CORSMiddleware from application.api.v1 import api_router from application.settings import AppSettings, get_settings
[ 6738, 3049, 15042, 1330, 12549, 17614, 198, 6738, 3491, 21348, 13, 27171, 1574, 13, 66, 669, 1330, 23929, 12310, 2509, 1574, 198, 198, 6738, 3586, 13, 15042, 13, 85, 16, 1330, 40391, 62, 472, 353, 198, 6738, 3586, 13, 33692, 1330, 203...
3.833333
48
from __future__ import print_function import os, sys import yaml import re import collections import requests import json from tqdm import tqdm this_path, _ = os.path.split(__file__) config_path = os.path.join(this_path, "config.yaml") if __name__=="__main__": main()
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 28686, 11, 25064, 198, 11748, 331, 43695, 198, 11748, 302, 198, 11748, 17268, 198, 11748, 7007, 198, 11748, 33918, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 198, 566...
2.873684
95
# # Copyright (c) 2018 Nippon Telegraph and Telephone Corporation # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. import sys import os import clang.cindex from clang.cindex import Index from clang.cindex import ...
[ 2, 198, 2, 15069, 357, 66, 8, 2864, 399, 3974, 261, 21821, 290, 44735, 10501, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 347, 10305, 12, 7635, 5964, 1043, 287, 262, 198, 2, 38559, 24290, ...
3.496296
135
################################################################ # Challenge 02 # Game "Rock, Paper, Scissors" # Uses: Basic Python - e.g. If, elif,input, print ################################################################ import os clearScreen = lambda: os.system('cls') clearScreen() print("-------------------...
[ 29113, 29113, 198, 2, 13879, 7816, 220, 198, 2, 3776, 366, 19665, 11, 14962, 11, 1446, 32555, 1, 198, 2, 36965, 25, 14392, 11361, 532, 304, 13, 70, 13, 1002, 11, 1288, 361, 11, 15414, 11, 3601, 220, 198, 29113, 29113, 198, 11748, ...
4.401274
157
import cv2 import numpy as np kamera = cv2.VideoCapture(0) dusuk = np.array([95,50,50]) yuksek = np.array([103,255,255]) while True: ret,goruntu = kamera.read() hsv = cv2.cvtColor(goruntu, cv2.COLOR_BGR2HSV) mask = cv2.inRange(hsv,dusuk,yuksek) son = cv2.bitwise_and(goruntu,...
[ 11748, 269, 85, 17, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 201, 198, 74, 18144, 796, 269, 85, 17, 13, 10798, 49630, 7, 15, 8, 201, 198, 201, 198, 67, 385, 2724, 796, 45941, 13, 18747, 26933, 3865, 11, 1120, 11, 1120, ...
1.880645
310
# RF Coil Evaluation Tool Functions __author__ = "William Mathieu" __copyright__ = "Copyright 2019, William Mathieu" __license__ = "MIT" __date__ = "26Feb2019" from math import * from decimal import * import sys import numpy as np import nibabel as nib import matplotlib.pyplot as plt from matplotlib.widg...
[ 2, 20445, 46639, 34959, 16984, 40480, 201, 198, 834, 9800, 834, 796, 366, 17121, 16320, 22304, 1, 201, 198, 834, 22163, 4766, 834, 796, 366, 15269, 13130, 11, 3977, 16320, 22304, 1, 201, 198, 834, 43085, 834, 796, 366, 36393, 1, 201, ...
3.113208
159
import tweepy import pandas as pd from datetime import datetime, timedelta from environs import Env env = Env() # Reading the .env file env.read_env() API_KEY = env('API_KEY') API_KEY_SECRET = env('API_KEY_SECRET') ACCESS_TOKEN = env('ACCESS_TOKEN') ACCESS_TOKEN_SECRET = env('ACCESS_TOKEN_SECRET') ...
[ 201, 198, 11748, 4184, 538, 88, 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 201, 198, 6738, 17365, 343, 684, 1330, 2039, 85, 201, 198, 201, 198, 24330, 796, 2039, 85, 34...
2.472995
611
#PolygonSides.py ''' David Lu This is a block comment ''' import turtle shape = turtle.Turtle() num_sides = int(turtle.numinput("Number of sides", "How many sides do you want on your shape?", 4)) #num_sides = 6 # We don't need this line anymore! side_length = 200/ (num_sides * .5) # What does th...
[ 2, 34220, 14520, 50, 1460, 13, 9078, 201, 198, 7061, 6, 201, 198, 11006, 6026, 201, 198, 1212, 318, 257, 2512, 2912, 201, 198, 7061, 6, 201, 198, 11748, 28699, 220, 201, 198, 201, 198, 43358, 796, 28699, 13, 51, 17964, 3419, 201, ...
2.351695
236
#! /usr/bin/env python # encoding: utf-8 class ResultSet(object): """ResultSet.""" def __init__(self): """Initialize ResultSet.""" super(ResultSet, self).__init__() self.results = [] def add(self, result): """Add result.""" self.results.append(result) def __i...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 21004, 25, 3384, 69, 12, 23, 628, 198, 4871, 25414, 7248, 7, 15252, 2599, 198, 220, 220, 220, 37227, 23004, 7248, 526, 15931, 628, 220, 220, 220, 825, 11593, 15003, 834, 7, 94...
2.25876
371
import os from dotenv import load_dotenv # noinspection PyUnresolvedReferences import shared from definitions import ROOT_PATH from utils.smtp_sender import SMTPSender load_dotenv() if __name__ == '__main__': lessons = [] if not lessons: lessons = os.listdir(os.path.join(ROOT_PATH, 'release')) ...
[ 11748, 28686, 198, 198, 6738, 16605, 24330, 1330, 3440, 62, 26518, 24330, 198, 198, 2, 645, 1040, 14978, 9485, 3118, 411, 5634, 19927, 198, 11748, 4888, 198, 6738, 17336, 1330, 15107, 2394, 62, 34219, 198, 6738, 3384, 4487, 13, 5796, 34...
2.08134
418
from collections import defaultdict from nltk.tokenize import sent_tokenize from nltk.corpus import wordnet as wn from nltk.corpus import semcor as sc from nltk.corpus import stopwords import mywordtokenizer """=================================================================== Place all function calls below the foll...
[ 6738, 17268, 1330, 4277, 11600, 198, 6738, 299, 2528, 74, 13, 30001, 1096, 1330, 1908, 62, 30001, 1096, 198, 6738, 299, 2528, 74, 13, 10215, 79, 385, 1330, 1573, 3262, 355, 266, 77, 198, 6738, 299, 2528, 74, 13, 10215, 79, 385, 1330...
3.79085
153
from django.forms import ModelForm from .models import Done
[ 6738, 42625, 14208, 13, 23914, 1330, 9104, 8479, 198, 6738, 764, 27530, 1330, 24429 ]
4.214286
14
''' Cumulative Distribution Function from an image histogram A histogram of a continuous random variable is sometimes called a Probability Distribution Function (or PDF). The area under a PDF (a definite integral) is called a Cumulative Distribution Function (or CDF). The CDF quantifies the probability of observing ce...
[ 7061, 6, 198, 34, 388, 13628, 27484, 15553, 422, 281, 2939, 1554, 21857, 198, 198, 32, 1554, 21857, 286, 257, 12948, 4738, 7885, 318, 3360, 1444, 257, 30873, 1799, 27484, 15553, 357, 273, 12960, 737, 383, 1989, 739, 257, 12960, 357, 6...
3.146221
807
import quandl, math import numpy as np import pandas as pd import pickle from sklearn import preprocessing, svm, model_selection from sklearn.linear_model import LinearRegression # For plotting import datetime import matplotlib.pyplot as plt from matplotlib import style df = quandl.get("WIKI/GOOGL") df = df[['Adj. ...
[ 11748, 627, 392, 75, 11, 10688, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 2298, 293, 198, 6738, 1341, 35720, 1330, 662, 36948, 11, 264, 14761, 11, 2746, 62, 49283, 198, 6738, 1341, 35720, 13...
2.38
550
import socket import os from imp import reload from threading import Thread import parser as parser from pip._vendor.distlib.compat import raw_input # run in thread master_server = Proxy('0.0.0.0', '144.217.10.229', 25565) master_server.start() while True: try: cmd = raw_input('$ ') if cmd...
[ 11748, 17802, 198, 11748, 28686, 198, 6738, 848, 1330, 18126, 198, 6738, 4704, 278, 1330, 14122, 198, 11748, 30751, 355, 30751, 198, 198, 6738, 7347, 13557, 85, 18738, 13, 17080, 8019, 13, 5589, 265, 1330, 8246, 62, 15414, 628, 198, 220...
2.404762
168
from wsgiref.simple_server import make_server from main import application httpd = make_server('', 8888, application) print("Serving HTTP on port 8888...") httpd.serve_forever()
[ 6738, 266, 45213, 557, 69, 13, 36439, 62, 15388, 1330, 787, 62, 15388, 198, 6738, 1388, 1330, 3586, 198, 4023, 67, 796, 787, 62, 15388, 10786, 3256, 807, 28011, 11, 3586, 8, 198, 4798, 7203, 11838, 278, 14626, 319, 2493, 807, 28011, ...
3.236364
55
from django.contrib import admin from testapp.models import Option admin.site.register(Option, OptionAdmin)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 1332, 1324, 13, 27530, 1330, 16018, 198, 198, 28482, 13, 15654, 13, 30238, 7, 19722, 11, 16018, 46787, 8, 198 ]
3.633333
30
import argparse import os import time import math import unicodedata import string import functools import numbers import errno from typing import List, MutableMapping, Optional import numpy as np import xnmt from xnmt import logger from xnmt.settings import settings _valid_filename_chars = "-_.() %s%s" % (string....
[ 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 640, 198, 11748, 10688, 198, 11748, 28000, 9043, 1045, 198, 11748, 4731, 198, 11748, 1257, 310, 10141, 198, 11748, 3146, 198, 11748, 11454, 3919, 198, 6738, 19720, 1330, 7343, 11, 13859, ...
3.583979
387
from __future__ import absolute_import, division import pandas as pd from datashader.core import bypixel from datashader.compiler import compile_components from datashader.glyphs.points import _PointLike, _GeometryLike from datashader.glyphs.area import _AreaToLineLike from datashader.utils import Dispatcher from col...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 4818, 1077, 5067, 13, 7295, 1330, 416, 32515, 198, 6738, 4818, 1077, 5067, 13, 5589, 5329, 1330, 17632, 62, 5589, 390...
3.134831
178
"""Conversion of QNET expressions to qutip objects. """ import re from functools import reduce from sympy import symbols from sympy.utilities.lambdify import lambdify from scipy.sparse import csr_matrix from numpy import ( diag as np_diag, arange, cos as np_cos, sin as np_sin) from ..algebra.core.scalar_algebra imp...
[ 37811, 3103, 9641, 286, 1195, 12884, 14700, 284, 10662, 315, 541, 5563, 13, 198, 37811, 198, 11748, 302, 198, 6738, 1257, 310, 10141, 1330, 4646, 198, 6738, 10558, 88, 1330, 14354, 198, 6738, 10558, 88, 13, 315, 2410, 13, 2543, 17457, ...
2.133455
5,500
#!/usr/bin/env python3 # whiteout_re.py # Author: Lorenzo Van Muñoz # Last Updated Jan 1, 2021 ''' A script to remove patterns in a file. Specifically PDF files. It reads in a document as a byte string and then tries identifying the text in various encodings. Unlike whiteout.py, this uses re's more parsimoniously a...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 2330, 448, 62, 260, 13, 9078, 198, 2, 6434, 25, 41721, 6656, 8252, 12654, 8590, 198, 2, 4586, 19433, 2365, 352, 11, 33448, 198, 7061, 6, 198, 32, 4226, 284, 4781, 7572,...
2.288547
7,160
#!python3 #encoding:utf-8 from web.service.github.api.v3.authentication.Authentication import Authentication from web.service.github.api.v3.authentication.NonAuthentication import NonAuthentication from web.service.github.api.v3.authentication.BasicAuthentication import BasicAuthentication from web.service.github.api.v...
[ 2, 0, 29412, 18, 198, 2, 12685, 7656, 25, 40477, 12, 23, 198, 6738, 3992, 13, 15271, 13, 12567, 13, 15042, 13, 85, 18, 13, 41299, 3299, 13, 47649, 3299, 1330, 48191, 198, 6738, 3992, 13, 15271, 13, 12567, 13, 15042, 13, 85, 18, ...
3.834171
199
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License" # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
[ 2, 220, 220, 15069, 357, 66, 8, 13130, 220, 350, 37382, 47, 37382, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 1, 198, 2, 345, 743, 407, 779, 42...
3.581818
220
import sys import math from random import randint from fractions import gcd if __name__ == '__main__': main()
[ 11748, 25064, 198, 11748, 10688, 198, 6738, 4738, 1330, 43720, 600, 198, 6738, 49876, 1330, 308, 10210, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 197, 12417, 3419, 198 ]
3.294118
34
# Copyright 2010 New Relic, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
[ 2, 15069, 3050, 968, 43437, 11, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, ...
3.740909
220
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. 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 cop...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 2864, 383, 3012, 9552, 15417, 4816, 46665, 290, 383, 12905, 2667, 32388, 3457, 13, 1074, 13, 198, 2, 15069, 357, 66, 8, 2864, 11, 15127, 23929, 44680, 6234, 13, 220, 1439, 2489, 10395, 13,...
2.944766
1,557
from .bbc_sounds import BBCSounds from .spotify import Spotify __version__ = "0.1.0"
[ 6738, 764, 11848, 66, 62, 82, 3733, 1330, 7823, 40825, 198, 6738, 764, 20485, 1958, 1330, 26778, 198, 198, 834, 9641, 834, 796, 366, 15, 13, 16, 13, 15, 1 ]
2.833333
30
""" Script to control the deployment of LNT to Google Cloud Instance. """ import os from os.path import expanduser import re from fabric.api import env, cd, task, run, put from fabric.api import sudo from fabric.context_managers import hide from fabric.operations import get, local here = os.path.dirname(os.path.re...
[ 37811, 12327, 284, 1630, 262, 14833, 286, 406, 11251, 284, 3012, 10130, 2262, 590, 13, 628, 198, 37811, 198, 198, 11748, 28686, 198, 6738, 28686, 13, 6978, 1330, 4292, 7220, 198, 198, 11748, 302, 198, 6738, 9664, 13, 15042, 1330, 17365,...
2.378715
1,043
import numpy as np import time import scipy.io as sio from ismore import brainamp_channel_lists from riglib.brainamp.rda import * fs = 1000 channels = brainamp_channel_lists.emg_eog2_eeg total_time = 120 # how many secs of data to receive and save n_samples = 2 * fs * total_time # allocate twice a...
[ 11748, 299, 32152, 355, 45941, 201, 198, 11748, 640, 201, 198, 11748, 629, 541, 88, 13, 952, 355, 264, 952, 201, 198, 201, 198, 6738, 318, 3549, 1330, 3632, 696, 62, 17620, 62, 20713, 201, 198, 6738, 7805, 8019, 13, 27825, 696, 13, ...
2.267857
392
#!/usr/bin/env python3 # # Copytright 2021 Graviti. Licensed under MIT License. # # pylint: disable=invalid-name # pylint: disable=missing-module-docstring import os from glob import glob from typing import Iterable, List from ...dataset import Data, Dataset from ...label import Classification DATASET_NAME = "RP2K" ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 198, 2, 17393, 2213, 432, 33448, 32599, 8846, 13, 49962, 739, 17168, 13789, 13, 198, 2, 198, 2, 279, 2645, 600, 25, 15560, 28, 259, 12102, 12, 3672, 198, 2, 279, 2645, 600, ...
2
931
import sys, math from decimal import Decimal from sprake import newick, style SCALE_FACTOR = 0.35 FONT_SIZE = 12 MIN_CIRCUMFERENCE = 300 EMPTY_CENTER_FACTOR = 0.25 TEXT_SPACING_FACTOR = 0.1 # draw_png.PNGDrawer # draw_svg.SVGDrawer # no deps # draw_pdf.PDFDrawer # ===== STRAIGHT RENDERING MODE #...
[ 198, 11748, 25064, 11, 10688, 198, 6738, 32465, 1330, 4280, 4402, 198, 6738, 599, 33788, 1330, 649, 624, 11, 3918, 198, 198, 6173, 21358, 62, 37, 10659, 1581, 220, 220, 220, 220, 220, 220, 220, 796, 657, 13, 2327, 198, 37, 35830, 62...
2.256579
152
# SPDX-License-Identifier: MIT # Copyright (c) 2021 ETH Zurich, Luc Grosheintz-Laval import numpy as np class Burgers(object): """Burgers equation is a simple non-linear PDE.""" class VariableBurgers(object): """Burgers equation is a simple non-linear PDE with a coefficient."""
[ 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 17168, 198, 2, 15069, 357, 66, 8, 33448, 35920, 43412, 11, 7598, 402, 4951, 258, 600, 89, 12, 43, 9226, 198, 198, 11748, 299, 32152, 355, 45941, 628, 198, 4871, 21435, 364, 7, 15252, 2...
3.041667
96
from rlbot.agents.base_agent import BaseAgent, SimpleControllerState from rlbot.messages.flat.QuickChatSelection import QuickChatSelection from rlbot.utils.structures.game_data_struct import GameTickPacket from util.ball_prediction_analysis import find_slice_at_time from util.boost_pad_tracker import BoostPadTracker f...
[ 6738, 374, 75, 13645, 13, 49638, 13, 8692, 62, 25781, 1330, 7308, 36772, 11, 17427, 22130, 9012, 198, 6738, 374, 75, 13645, 13, 37348, 1095, 13, 38568, 13, 21063, 30820, 4653, 1564, 1330, 12029, 30820, 4653, 1564, 198, 6738, 374, 75, ...
3.555556
126