content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
from Pages import * app = App() app.mainloop()
[ 6738, 28221, 1330, 1635, 198, 198, 1324, 796, 2034, 3419, 198, 1324, 13, 12417, 26268, 3419, 198 ]
2.823529
17
import flask from cauldron.cli.server import run as server_runner from cauldron.ui import arguments from cauldron.ui import statuses
[ 11748, 42903, 198, 198, 6738, 269, 45637, 13, 44506, 13, 15388, 1330, 1057, 355, 4382, 62, 16737, 198, 6738, 269, 45637, 13, 9019, 1330, 7159, 198, 6738, 269, 45637, 13, 9019, 1330, 1185, 2664, 628 ]
3.857143
35
import requests from bs4 import BeautifulSoup import re rq = requests.get("https://play.google.com/store/apps/category/GAME_MUSIC?hl=ko") rqctnt = rq.content soup = BeautifulSoup(rqctnt,"html.parser") soup = soup.find_all(attrs={'class':'title'}) blacklsit = ["","/TV","","","","",""] for link in soup: if link.te...
[ 11748, 7007, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 11748, 302, 198, 198, 81, 80, 796, 7007, 13, 1136, 7203, 5450, 1378, 1759, 13, 13297, 13, 785, 14, 8095, 14, 18211, 14, 22872, 14, 47109, 62, 44, 2937, 2149, 30, 18...
2.430303
165
from unittest import TestCase from pyramid import testing
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 6738, 27944, 1330, 4856, 628, 198 ]
4.066667
15
#Negative Indexes spam = ['cat', 'bat', 'rat', 'elephant'] spam[-1] # elepant spam[-3] # bat # Getting a List from another List with Slices spam = ['cat', 'bat', 'rat', 'elephant'] spam[0:4] # ['cat', 'bat', 'rat', 'elephant'] spam[1:3] # ['bat', 'rat'] spam[0:-1] # ['cat', 'bat', 'rat'] spam[:2] # ['cat', 'bat'] spa...
[ 2, 32863, 876, 12901, 274, 198, 2777, 321, 796, 37250, 9246, 3256, 705, 8664, 3256, 705, 10366, 3256, 705, 11129, 33959, 20520, 198, 2777, 321, 58, 12, 16, 60, 1303, 9766, 79, 415, 198, 2777, 321, 58, 12, 18, 60, 1303, 7365, 628, ...
2.495833
1,200
import pandas as pd path = "Resources/cities.csv" data = pd.read_csv(path) data_html = data.to_html("data.html", bold_rows = True)
[ 11748, 19798, 292, 355, 279, 67, 198, 6978, 796, 366, 33236, 14, 66, 871, 13, 40664, 1, 198, 7890, 796, 279, 67, 13, 961, 62, 40664, 7, 6978, 8, 198, 7890, 62, 6494, 796, 1366, 13, 1462, 62, 6494, 7203, 7890, 13, 6494, 1600, 107...
2.6
50
# Copyright (C) 2020 Red Hat Inc. # # Authors: # Eduardo Habkost <ehabkost@redhat.com> # # This work is licensed under the terms of the GNU GPL, version 2. See # the COPYING file in the top-level directory. from tempfile import NamedTemporaryFile from .patching import FileInfo, FileMatch, Patch, FileList from .regexp...
[ 2, 15069, 357, 34, 8, 12131, 2297, 10983, 3457, 13, 198, 2, 198, 2, 46665, 25, 198, 2, 220, 40766, 13109, 19654, 74, 455, 1279, 68, 5976, 74, 455, 31, 445, 5183, 13, 785, 29, 198, 2, 198, 2, 770, 670, 318, 11971, 739, 262, 284...
2.151581
917
# # Simple Tuple # fruits = ('Apple', 'Orange', 'Mango') # # Using Constructor # fruits = tuple(('Apple', 'Orange', 'Mango')) # # Getting a Single Value # print(fruits[1]) # Trying to change based on position # fruits[1] = 'Grape' # Tuples with one value should have trailing comma # fruits = ('Apple') # fruits = ('...
[ 2, 1303, 17427, 309, 29291, 198, 2, 15921, 796, 19203, 16108, 3256, 705, 40141, 3256, 705, 44, 14208, 11537, 198, 198, 2, 1303, 8554, 28407, 273, 198, 2, 15921, 796, 46545, 7, 10786, 16108, 3256, 705, 40141, 3256, 705, 44, 14208, 6, ...
2.817778
225
from dataclasses import dataclass from dataclasses import asdict from typing import List, Tuple, Callable import numpy as np from sklearn.metrics import accuracy_score as accuracy_sklearn from sklearn.metrics import precision_score as precision_sklearn from sklearn.metrics import recall_score as recall_sklearn from sk...
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 4818, 330, 28958, 1330, 355, 11600, 198, 6738, 19720, 1330, 7343, 11, 309, 29291, 11, 4889, 540, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 35720, 13, 4164, 10466...
3.545024
211
import sys if __name__ == "__main__": data, all_features, labelCount= readInput() results = rankByChiSquared(data, all_features, labelCount)
[ 11748, 25064, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1366, 11, 477, 62, 40890, 11, 6167, 12332, 28, 1100, 20560, 3419, 198, 220, 220, 220, 2482, 796, 4279, 3886, 1925, 72, 22266, 1144, 7, 7...
2.901961
51
# Importamos la librera para leer archivos json import json # Abrimos el archivo master en modo lectura ('r') con todos los id de los archivos descargados with open('master.json', 'r') as f: # Guardamos en la variable lista el contenido de master lista = json.load(f) # En este ejemplo se representa cmo se asi...
[ 2, 17267, 321, 418, 8591, 9195, 24420, 31215, 443, 263, 3934, 452, 418, 33918, 198, 11748, 33918, 198, 198, 2, 317, 1671, 320, 418, 1288, 3934, 23593, 4958, 551, 953, 78, 11042, 5330, 19203, 81, 11537, 369, 284, 37427, 22346, 4686, 39...
2.262826
1,111
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This file contains the generators and their inverses for common archimedean copulas. """ import numpy as np
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 220, 220, 220, 770, 2393, 4909, 262, 27298, 290, 511, 287, 690, 274, 329, 2219, 3934, 320, 276, 1102...
2.844828
58
""" """ from admin import routes def init_app(app): """ :param app: :return: """ routes.init_app(app)
[ 37811, 198, 198, 37811, 198, 6738, 13169, 1330, 11926, 628, 198, 4299, 2315, 62, 1324, 7, 1324, 2599, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 1058, 17143, 598, 25, 198, 220, 220, 220, 1058, 7783, 25, 198, 220, 220, 220, 37227...
2.25
56
from output.models.nist_data.list_pkg.decimal.schema_instance.nistschema_sv_iv_list_decimal_pattern_2_xsd.nistschema_sv_iv_list_decimal_pattern_2 import NistschemaSvIvListDecimalPattern2 __all__ = [ "NistschemaSvIvListDecimalPattern2", ]
[ 6738, 5072, 13, 27530, 13, 77, 396, 62, 7890, 13, 4868, 62, 35339, 13, 12501, 4402, 13, 15952, 2611, 62, 39098, 13, 77, 1023, 2395, 2611, 62, 21370, 62, 452, 62, 4868, 62, 12501, 4402, 62, 33279, 62, 17, 62, 87, 21282, 13, 77, 1...
2.405941
101
import numpy as np import pyamg from scipy import sparse from scipy.spatial import Delaunay from linsolver import sparse_solver from triangulation.delaunay import delaunay
[ 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 321, 70, 198, 6738, 629, 541, 88, 1330, 29877, 198, 6738, 629, 541, 88, 13, 2777, 34961, 1330, 4216, 1942, 323, 198, 198, 6738, 300, 1040, 14375, 1330, 29877, 62, 82, 14375, 198, 6738,...
3.181818
55
"""Support for Atlantic Electrical Heater IO controller.""" import logging from typing import List from homeassistant.components.climate import ClimateEntity from homeassistant.components.climate.const import ( HVAC_MODE_HEAT, HVAC_MODE_OFF, SUPPORT_TARGET_TEMPERATURE, ) from homeassistant.const import ATT...
[ 37811, 15514, 329, 10596, 40224, 679, 729, 24418, 10444, 526, 15931, 198, 11748, 18931, 198, 6738, 19720, 1330, 7343, 198, 198, 6738, 1363, 562, 10167, 13, 5589, 3906, 13, 42570, 1330, 13963, 32398, 198, 6738, 1363, 562, 10167, 13, 5589, ...
2.939698
199
# -*- coding:utf-8 -*- # Author: hankcs # Date: 2021-03-02 13:32 from typing import Optional, Union, Dict, Any import torch from torch import nn from transformers import PreTrainedTokenizer from elit.components.mtl.attn.attn import TaskAttention from elit.components.mtl.attn.transformer import JointEncoder from elit....
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 2, 6434, 25, 289, 962, 6359, 198, 2, 7536, 25, 33448, 12, 3070, 12, 2999, 1511, 25, 2624, 198, 6738, 19720, 1330, 32233, 11, 4479, 11, 360, 713, 11, 4377, 198, 198, 117...
3.048913
184
from sensors.sensors import sense_characteristics, sense_pedestrians
[ 6738, 15736, 13, 82, 641, 669, 1330, 2565, 62, 22769, 3969, 11, 2565, 62, 9124, 395, 19151 ]
4
17
"""Implementations of algorithms for continuous control.""" import functools from typing import Optional, Sequence, Tuple import jax import jax.numpy as jnp import numpy as np import optax from jaxrl.agents.sac import temperature from jaxrl.agents.sac.actor import update as update_actor from jaxrl.agents.sac.critic ...
[ 37811, 3546, 26908, 602, 286, 16113, 329, 12948, 1630, 526, 15931, 198, 198, 11748, 1257, 310, 10141, 198, 6738, 19720, 1330, 32233, 11, 45835, 11, 309, 29291, 198, 198, 11748, 474, 897, 198, 11748, 474, 897, 13, 77, 32152, 355, 474, ...
3.220238
168
"""Collections of library function names. """ def drop_suffix(f): s = f.rsplit('.', 1)[-1] if s in ['p0i8', 'f64', 'f32', 'i1', 'i8', 'i16', 'i32', 'i64', 'i128']: f = f[:-len(s)-1] return drop_suffix(f) return f def get_llvm_name(f, prefix='llvm.'): """Return normalized name of...
[ 37811, 5216, 26448, 286, 5888, 2163, 3891, 13, 198, 37811, 628, 628, 628, 198, 198, 4299, 4268, 62, 37333, 844, 7, 69, 2599, 198, 220, 220, 220, 264, 796, 277, 13, 3808, 489, 270, 10786, 2637, 11, 352, 38381, 12, 16, 60, 198, 220,...
2.110048
209
import pandas as pd print(pd.__version__) city_names = pd.Series(['San Francisco', 'San Jose', 'Sacramento']) population = pd.Series([852469, 1015785, 485199]) #city_population_table = pd.DataFrame(({'City name': city_names, 'Population': population})) california_houseing_dataframe = pd.read_csv("https://storage.google...
[ 11748, 19798, 292, 355, 279, 67, 198, 4798, 7, 30094, 13, 834, 9641, 834, 8, 198, 19205, 62, 14933, 796, 279, 67, 13, 27996, 7, 17816, 15017, 6033, 3256, 705, 15017, 5264, 3256, 705, 38318, 15141, 78, 6, 12962, 198, 39748, 796, 279,...
2.741007
417
from helloworld.app import main if True or __name__ == '__main__': main().main_loop()
[ 6738, 5968, 322, 1764, 13, 1324, 1330, 1388, 198, 198, 361, 6407, 393, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 22446, 12417, 62, 26268, 3419, 198 ]
2.757576
33
from fastapi import FastAPI from dotenv import load_dotenv from fastapi.middleware.cors import CORSMiddleware from app.api.api_v1.api import api_router from app.core.config import settings app = FastAPI() load_dotenv() app.include_router(api_router, prefix=settings.API_V1_STR) # Set all CORS enabled origins if sett...
[ 6738, 3049, 15042, 1330, 12549, 17614, 198, 6738, 16605, 24330, 1330, 3440, 62, 26518, 24330, 198, 6738, 3049, 15042, 13, 27171, 1574, 13, 66, 669, 1330, 23929, 12310, 2509, 1574, 198, 6738, 598, 13, 15042, 13, 15042, 62, 85, 16, 13, ...
2.437309
327
"""Example revision Revision ID: fdf0cf6487a3 Revises: Create Date: 2021-08-09 17:55:19.491713 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = "fdf0cf6487a3" down_revision = None branch_labels = None depends_on = None
[ 37811, 16281, 18440, 198, 198, 18009, 1166, 4522, 25, 277, 7568, 15, 12993, 2414, 5774, 64, 18, 198, 18009, 2696, 25, 198, 16447, 7536, 25, 33448, 12, 2919, 12, 2931, 1596, 25, 2816, 25, 1129, 13, 2920, 1558, 1485, 198, 198, 37811, ...
2.632075
106
from __future__ import annotations from typing import Optional # Definition for a binary tree node.
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 6738, 19720, 1330, 32233, 198, 198, 2, 30396, 329, 257, 13934, 5509, 10139, 13, 198 ]
4.590909
22
# @lc app=leetcode id=506 lang=python3 # # [506] Relative Ranks # # https://leetcode.com/problems/relative-ranks/description/ # # algorithms # Easy (53.46%) # Likes: 188 # Dislikes: 9 # Total Accepted: 71.1K # Total Submissions: 132.4K # Testcase Example: '[5,4,3,2,1]' # # You are given an integer array score of...
[ 2, 2488, 44601, 598, 28, 293, 316, 8189, 4686, 28, 35638, 42392, 28, 29412, 18, 198, 2, 198, 2, 685, 35638, 60, 45344, 371, 2283, 198, 2, 198, 2, 3740, 1378, 293, 316, 8189, 13, 785, 14, 1676, 22143, 14, 43762, 12, 81, 2283, 14,...
2.593296
895
# -*- Python -*- import os # Setup config name. config.name = 'MemorySanitizer' + getattr(config, 'name_suffix', 'default') # Setup source root. config.test_source_root = os.path.dirname(__file__) # Setup default compiler flags used with -fsanitize=memory option. clang_msan_cflags = (["-fsanitize=memory", ...
[ 2, 532, 9, 12, 11361, 532, 9, 12, 198, 198, 11748, 28686, 198, 198, 2, 31122, 4566, 1438, 13, 198, 11250, 13, 3672, 796, 705, 30871, 15017, 3029, 263, 6, 1343, 651, 35226, 7, 11250, 11, 705, 3672, 62, 37333, 844, 3256, 705, 12286,...
2.408673
761
# Generated by Django 2.0.6 on 2018-06-17 04:47 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 15, 13, 21, 319, 2864, 12, 3312, 12, 1558, 8702, 25, 2857, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
# # nuna_sql_tools: Copyright 2022 Nuna 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...
[ 2, 198, 2, 299, 9613, 62, 25410, 62, 31391, 25, 15069, 33160, 399, 9613, 3457, 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, ...
2.718481
1,396
"""HERE are the base Points for all valid Tonnetze Systems. A period of all 12 notes divided by mod 3, mod 4 (always stable) """ # x = 4, y = 3 NotePointsT345 = { 0: (0, 0), 1: (1, 3), 2: (2, 2), 3: (0, 1), 4: (1, 0), 5: (2, 3), 6: (0, 2), 7: (1, 1), 8: (2, 0), 9: (0, 3), 1...
[ 37811, 39, 9338, 389, 262, 2779, 11045, 329, 477, 4938, 16859, 3262, 2736, 11998, 13, 198, 198, 32, 2278, 286, 477, 1105, 4710, 9086, 416, 953, 513, 11, 953, 604, 357, 33770, 8245, 8, 198, 37811, 198, 198, 2, 2124, 796, 604, 11, 3...
1.591942
968
# Copyright (c) 2012-2021, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from .aws import Action as BaseAction from .aws import BaseARN service_name = "AWS Proton" prefix = "proton" CreateEnvironment = Action("CreateEnvironment") CreateEnvironmentTemplate = Action("Create...
[ 2, 15069, 357, 66, 8, 2321, 12, 1238, 2481, 11, 2940, 2631, 988, 1279, 4102, 31, 431, 988, 13, 2398, 29, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 4091, 38559, 24290, 2393, 329, 1336, 5964, 13, 198, 198, 6738, 764, 8356, 13...
4.772277
707
# Copyright 2020 DeepMind Technologies Limited. 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 ...
[ 2, 15069, 12131, 10766, 28478, 21852, 15302, 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, 35...
3.779851
268
#!/usr/bin/python # Classification (U) """Program: slaverep_isslverror.py Description: Unit testing of SlaveRep.is_slv_error in mysql_class.py. Usage: test/unit/mysql_class/slaverep_isslverror.py Arguments: """ # Libraries and Global Variables # Standard import sys import os if sys.version...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 40984, 357, 52, 8, 198, 198, 37811, 15167, 25, 220, 11778, 7856, 62, 747, 75, 332, 1472, 13, 9078, 628, 220, 220, 220, 12489, 25, 220, 11801, 4856, 286, 38795, 6207, 13, 271, 62, 6649,...
2.653333
225
""" 108. """ from TreeNode import TreeNode t = [-10,-3,0,5,9] obj = Solution() node = obj.sortedArrayToBST(t) node.preorderTraversal()
[ 37811, 198, 15711, 13, 220, 198, 37811, 198, 198, 6738, 12200, 19667, 1330, 12200, 19667, 628, 628, 198, 83, 796, 25915, 940, 12095, 18, 11, 15, 11, 20, 11, 24, 60, 198, 26801, 796, 28186, 3419, 198, 17440, 796, 26181, 13, 82, 9741,...
2.366667
60
## -*- encoding: utf-8 -*- """ This file (./domaines_doctest.sage) was *autogenerated* from ./domaines.tex, with sagetex.sty version 2011/05/27 v2.3.1. It contains the contents of all the sageexample environments from this file. You should be able to doctest this file with: sage -t ./domaines_doctest.sage It is always ...
[ 2235, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 1212, 2393, 357, 19571, 27830, 274, 62, 4598, 310, 395, 13, 82, 496, 8, 373, 1635, 2306, 519, 877, 515, 9, 422, 24457, 27830, 274, 13, 16886, 11, 198, ...
2.237533
4,572
from .Deserializer import Deserializer from .RateLimiter import RateLimiter from .Handlers import ( DeprecationHandler, DeserializerAdapter, DictionaryDeserializer, RateLimiterAdapter, ThrowOnErrorHandler, TypeCorrectorHandler, ) from .Handlers.RateLimit import BasicRateLimiter from ._apis imp...
[ 6738, 764, 5960, 48499, 7509, 1330, 2935, 48499, 7509, 198, 6738, 764, 32184, 19352, 2676, 1330, 14806, 19352, 2676, 198, 198, 6738, 764, 12885, 8116, 1330, 357, 198, 220, 220, 220, 2129, 8344, 341, 25060, 11, 198, 220, 220, 220, 2935, ...
3.118644
118
# Copyright 1996-2021 Cyberbotics Ltd. # # 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...
[ 2, 15069, 8235, 12, 1238, 2481, 15101, 13645, 873, 12052, 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, ...
3.630081
246
setlist = [['a','m','n','s','t','g','q','o','x'],['b','e','c'],['h','k','u','v'], ['d','r','p'],['f'],['l'],['i'],['w'],['y']]
[ 2617, 4868, 796, 16410, 6, 64, 41707, 76, 41707, 77, 41707, 82, 41707, 83, 41707, 70, 41707, 80, 41707, 78, 41707, 87, 6, 4357, 17816, 65, 41707, 68, 41707, 66, 6, 4357, 17816, 71, 41707, 74, 41707, 84, 41707, 85, 6, 4357, 198, 17...
1.763889
72
from .player import Player
[ 6738, 764, 7829, 1330, 7853, 198 ]
4.5
6
#!/usr/bin/env python # Nathan Rhoades 10/13/2017 import serial import serialport import bgapi import gui import digicueblue import traceback import time import threading import sys if sys.version_info[0] < 3: import Tkinter as Tk else: import tkinter as Tk if __name__ == '__main__': main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 18106, 10323, 1170, 274, 838, 14, 1485, 14, 5539, 198, 198, 11748, 11389, 198, 11748, 11389, 634, 198, 11748, 275, 70, 15042, 198, 11748, 11774, 198, 11748, 3100, 291, 518, 175...
2.704348
115
import requests #newspi key c2d941c74c144421945618d97a458144
[ 11748, 7007, 198, 198, 2, 3605, 2777, 72, 1994, 269, 17, 67, 24, 3901, 66, 4524, 66, 1415, 2598, 28896, 29228, 1507, 67, 5607, 64, 29334, 18444, 628 ]
2.25
28
import logging import os import json from multiprocessing import Process, Queue, Lock import numpy as np from PyMaSC.core.mappability import MappableLengthCalculator from PyMaSC.utils.progress import ProgressHook, MultiLineProgressManager from PyMaSC.utils.compatible import tostr, xrange from PyMaSC.utils.output impo...
[ 11748, 18931, 198, 11748, 28686, 198, 11748, 33918, 198, 6738, 18540, 305, 919, 278, 1330, 10854, 11, 4670, 518, 11, 13656, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 9485, 21467, 6173, 13, 7295, 13, 76, 1324, 1799, 1330, ...
3.3
130
from django.shortcuts import render from django.views import View # Create your views here. # Call this with a parameter number # Using inheritance (extend)
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 42625, 14208, 13, 33571, 1330, 3582, 198, 198, 2, 13610, 534, 5009, 994, 13, 198, 220, 220, 220, 220, 198, 2, 4889, 428, 351, 257, 11507, 1271, 198, 198, 2, 8554, 24155, 3...
3.510638
47
from flask import escape '''with open('ex') as full: for line in full: print(line,end='**') ''' ''' a=[] with open('ex') as full: for line in full: a.append(line.split('|')) print(a) ''' ''' with open('ex') as full: for line in full.readline(): print(line) ''' contents=[] with o...
[ 6738, 42903, 1330, 6654, 198, 198, 7061, 6, 4480, 1280, 10786, 1069, 11537, 355, 1336, 25, 198, 220, 220, 220, 329, 1627, 287, 1336, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 1370, 11, 437, 11639, 1174, 11537, 198, 7061, ...
2.168182
220
import requests import jsonpickle from requests_oauthlib import OAuth1 from urllib.parse import parse_qs, urlencode import cherrypy from collections import defaultdict import json import os import re from collections import defaultdict # For readable serializations jsonpickle.set_encoder_options('json', sort_keys=Tr...
[ 11748, 7007, 198, 11748, 33918, 27729, 293, 198, 6738, 7007, 62, 12162, 1071, 8019, 1330, 440, 30515, 16, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 21136, 62, 48382, 11, 2956, 11925, 8189, 198, 11748, 23612, 9078, 220, 198, 6738, 1726...
2.704238
1,109
import json from enum import Enum from decimal import Decimal def convert_serializable_special_cases(o): """ Convert an object to a type that is fairly generally serializable (e.g. json serializable). This only handles the cases that need converting. The json module handles all the rest. For JSON, ...
[ 11748, 33918, 198, 198, 6738, 33829, 1330, 2039, 388, 198, 6738, 32465, 1330, 4280, 4402, 628, 198, 4299, 10385, 62, 46911, 13821, 62, 20887, 62, 33964, 7, 78, 2599, 628, 220, 220, 220, 37227, 198, 220, 220, 220, 38240, 281, 2134, 284...
2.870732
410
import sys import os import argparse import numpy as np import paddle.v2 as paddle import reader import utils import network import config from utils import logger def show_parameter_init_info(parameters): """ Print the information of initialization mean and standard deviation of parameters :param...
[ 11748, 25064, 198, 11748, 28686, 198, 11748, 1822, 29572, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 39517, 13, 85, 17, 355, 39517, 198, 198, 11748, 9173, 198, 11748, 3384, 4487, 198, 11748, 3127, 198, 11748, 4566, 198, 6738, ...
2.289231
650
import subprocess import uuid as uuid_gen import logging from datetime import datetime import os import psutil import warnings import weakref from yggdrasil import backwards, tools, platform, serialize from yggdrasil.languages import get_language_dir from yggdrasil.config import ygg_cfg from yggdrasil.drivers.Interpret...
[ 11748, 850, 14681, 198, 11748, 334, 27112, 355, 334, 27112, 62, 5235, 198, 11748, 18931, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 28686, 198, 11748, 26692, 22602, 198, 11748, 14601, 198, 11748, 4939, 5420, 198, 6738, 331, 1130...
2.210165
9,621
# Generated by Django 3.1.3 on 2021-04-09 04:03 import django.db.models.deletion from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 18, 319, 33448, 12, 3023, 12, 2931, 8702, 25, 3070, 198, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, ...
2.818182
44
import pathlib from typing import Iterator import pandas as pd from ted_sws.resources.prefixes import PREFIXES_DEFINITIONS import re CONCEPTUAL_MAPPINGS_RULES_SHEET_NAME = "Rules" RULES_SF_FIELD_ID = 'Standard Form Field ID (M)' RULES_SF_FIELD_NAME = 'Standard Form Field Name (M)' RULES_E_FORM_BT_ID = 'eForm BT-ID (O)...
[ 11748, 3108, 8019, 198, 6738, 19720, 1330, 40806, 1352, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 28501, 62, 2032, 82, 13, 37540, 13, 40290, 274, 1330, 22814, 47084, 1546, 62, 7206, 20032, 2043, 11053, 198, 11748, 302, 198, 198, ...
2.261853
928
import sys from os.path import dirname, abspath, join cur_folder = dirname(abspath(__file__)) sys.path.insert(0, join(dirname(cur_folder), 'src')) sys.path.insert(0, dirname(cur_folder)) print(cur_folder)
[ 11748, 25064, 198, 6738, 28686, 13, 6978, 1330, 26672, 3672, 11, 2352, 6978, 11, 4654, 198, 198, 22019, 62, 43551, 796, 26672, 3672, 7, 397, 2777, 776, 7, 834, 7753, 834, 4008, 198, 17597, 13, 6978, 13, 28463, 7, 15, 11, 4654, 7, ...
2.662338
77
# https://stackoverflow.com/questions/3300464/how-can-i-get-dict-from-sqlite-query # from flask import Flask from flask_restful import Resource, reqparse from src.model.serie import SerieModel from src.server.instance import server from db import db # books_db = [{"id": 0, "title": "War and Peace"}, {"id": 1, "title"...
[ 2, 3740, 1378, 25558, 2502, 11125, 13, 785, 14, 6138, 507, 14, 2091, 22914, 2414, 14, 4919, 12, 5171, 12, 72, 12, 1136, 12, 11600, 12, 6738, 12, 25410, 578, 12, 22766, 198, 198, 2, 422, 42903, 1330, 46947, 198, 6738, 42903, 62, 21...
3.033898
118
import copy import pickle import tcod
[ 11748, 4866, 198, 11748, 2298, 293, 198, 198, 11748, 256, 19815, 628, 628 ]
3.230769
13
############################################################################## # # Copyright (c) 2006 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOF...
[ 29113, 29113, 7804, 4242, 2235, 198, 2, 198, 2, 15069, 357, 66, 8, 4793, 1168, 3008, 5693, 290, 25767, 669, 13, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 770, 3788, 318, 2426, 284, 262, 8617, 286, 262, 1168, 3008, 5094, 13789...
2.849727
732
#Let d(n) be defined as the sum of proper divisors of n (numbers less than n which divide evenly into n). #If d(a) = b and d(b) = a, where a b, then a and b are an amicable pair and each of a and b are called amicable numbers. #For example, the proper divisors of 220 are 1, 2, 4, 5, 10, 11, 20, 22, 44, 55 and 110; th...
[ 2, 5756, 288, 7, 77, 8, 307, 5447, 355, 262, 2160, 286, 1774, 2659, 271, 669, 286, 299, 357, 77, 17024, 1342, 621, 299, 543, 14083, 21894, 656, 299, 737, 198, 2, 1532, 288, 7, 64, 8, 796, 275, 290, 288, 7, 65, 8, 796, 257, 1...
2.401099
364
#!/usr/bin/env python3 """Unpack a MIME message into a directory of files.""" import os import email import mimetypes from email.policy import default from argparse import ArgumentParser if __name__ == '__main__': main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 37811, 3118, 8002, 257, 337, 12789, 3275, 656, 257, 8619, 286, 3696, 526, 15931, 198, 198, 11748, 28686, 198, 11748, 3053, 198, 11748, 17007, 2963, 12272, 198, 198, 6738, 3053, ...
3.178082
73
import sys, os import logging import datetime module_name = 'Streetview_Module' debug_mode = True
[ 11748, 25064, 11, 28686, 198, 11748, 18931, 198, 11748, 4818, 8079, 198, 198, 21412, 62, 3672, 796, 705, 34356, 1177, 62, 26796, 6, 198, 24442, 62, 14171, 796, 6407, 198 ]
3.3
30
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'ipetrash' from tkinter import * root = Tk() root.title('Chess board') canvas = Canvas(root, width=700, height=700, bg='#fff') canvas.pack() fill = '#fff' outline = '#000' size = 88 for i in range(8): for j in range(8): x1, y1, x2, y2 = i * ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 834, 9800, 834, 796, 705, 541, 21879, 1077, 6, 628, 198, 6738, 256, 74, 3849, 1330, 1635, 198, 198, 15763, ...
2.261603
237
# asandbox.py # # Authors: # - Coumes Quentin <coumes.quentin@gmail.com> """An asynchronous implementation of the Sandbox API.""" import io import json import os from contextlib import AbstractAsyncContextManager from typing import BinaryIO, Optional, Union import aiohttp from .exceptions import status_exception...
[ 2, 355, 392, 3524, 13, 9078, 198, 2, 198, 2, 46665, 25, 198, 2, 220, 220, 532, 15062, 6880, 42447, 1279, 66, 280, 6880, 13, 421, 31371, 31, 14816, 13, 785, 29, 628, 198, 37811, 2025, 39354, 7822, 286, 262, 3837, 3524, 7824, 526, ...
3.45098
102
import datetime from uuid import UUID from api.actions import storage from fastapi import HTTPException from api.models.usuario import Usuario from starlette.requests import Request from api.dependencies import validar_email, validar_formato_fecha,validar_edad FORMATO_FECHA = "%Y-%m-%d" EDAD_MINIMA = 18 EDAD_MAXIMA = ...
[ 11748, 4818, 8079, 198, 6738, 334, 27112, 1330, 471, 27586, 198, 6738, 40391, 13, 4658, 1330, 6143, 198, 6738, 3049, 15042, 1330, 14626, 16922, 198, 6738, 40391, 13, 27530, 13, 385, 84, 4982, 1330, 471, 2385, 4982, 198, 6738, 3491, 2134...
2.936364
110
import os import logging import dateutil import pickle from six.moves.urllib.parse import urlparse from libtaxii import get_message_from_http_response, VID_TAXII_XML_11 from libtaxii.messages_11 import PollRequest, PollFulfillmentRequest from libtaxii.messages_11 import PollResponse, generate_message_id from libtaxii...
[ 11748, 28686, 198, 11748, 18931, 198, 11748, 3128, 22602, 198, 11748, 2298, 293, 198, 198, 6738, 2237, 13, 76, 5241, 13, 333, 297, 571, 13, 29572, 1330, 19016, 29572, 198, 198, 6738, 9195, 19290, 4178, 1330, 651, 62, 20500, 62, 6738, ...
2.027053
2,107
import os import zipfile import requests DATA_PATH = './data' RESULT_PATH = './result' if not os.path.exists(DATA_PATH): os.makedirs(DATA_PATH) print('Downloading and extracting data...') url = 'https://weisslab.cs.ucl.ac.uk/WEISSTeaching/datasets/-/archive/hn2dct/datasets-hn2dct.zip' r = requests.get(url,all...
[ 198, 11748, 28686, 198, 11748, 19974, 7753, 198, 11748, 7007, 628, 198, 26947, 62, 34219, 796, 705, 19571, 7890, 6, 198, 19535, 16724, 62, 34219, 796, 705, 19571, 20274, 6, 198, 198, 361, 407, 28686, 13, 6978, 13, 1069, 1023, 7, 26947...
2.43038
316
import doctest from insights.parsers import freeipa_healthcheck_log from insights.parsers.freeipa_healthcheck_log import FreeIPAHealthCheckLog from insights.tests import context_wrap LONG_FREEIPA_HEALTHCHECK_LOG_OK = """ [{"source": "ipahealthcheck.ipa.roles", "check": "IPACRLManagerCheck", "result": "SUCCESS", "uuid"...
[ 11748, 10412, 395, 198, 6738, 17218, 13, 79, 945, 364, 1330, 1479, 541, 64, 62, 13948, 9122, 62, 6404, 198, 6738, 17218, 13, 79, 945, 364, 13, 5787, 541, 64, 62, 13948, 9122, 62, 6404, 1330, 3232, 4061, 32, 18081, 9787, 11187, 198, ...
2.027361
1,133
# Copyright 2021 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from recipe_engine import post_process from PB.recipes.infra.windows_image_builder import windows_image_builder as wib from PB.recipes.infra.windows_image_b...
[ 2, 15069, 33448, 383, 18255, 1505, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 5964, 326, 460, 307, 198, 2, 1043, 287, 262, 38559, 24290, 2393, 13, 198, 198, 6738...
3.004823
622
from lollangCompiler.compiler import Compiler import argparse if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("--file", required=True, help=" .") parser.add_argument("--out", default="out.py", help=" ") args = parser.parse_args() cmp = Compiler() cmp.compile...
[ 6738, 300, 692, 648, 7293, 5329, 13, 5589, 5329, 1330, 3082, 5329, 198, 11748, 1822, 29572, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 30751, 796, 1822, 29572, 13, 28100, 1713, 46677, 3419, ...
2.674419
129
import logging import subprocess import xml.etree.ElementTree as ET from tqdm import tqdm logger = logging.getLogger('root') POST_TYPE_QUESTION = '1' POST_TYPE_ANSWER = '2'
[ 11748, 18931, 198, 11748, 850, 14681, 198, 11748, 35555, 13, 316, 631, 13, 20180, 27660, 355, 12152, 198, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 628, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 10786, 15763, 11537, 198...
2.78125
64
# -*- coding: utf-8 -*- # Copyright 2020 Green Valley Belgium NV # # 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, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 12131, 3469, 6916, 15664, 23973, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, ...
3.22113
407
""" This script adds tables needed for Galaxy cloud functionality. """ from __future__ import print_function import datetime import logging from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Integer, MetaData, Table, TEXT now = datetime.datetime.utcnow log = logging.getLogger( __name__ ) metadata = MetaDa...
[ 37811, 198, 1212, 4226, 6673, 8893, 2622, 329, 9252, 6279, 11244, 13, 198, 37811, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 4818, 8079, 198, 11748, 18931, 198, 198, 6738, 44161, 282, 26599, 1330, 41146, 11, 29...
1.846645
4,069
# -*- encoding: utf-8 -*- """ Copyright (c) 2021 ronyman.com """ from django.contrib import admin from django.contrib.auth import views as auth_views from django.urls import path, include from django.conf import settings from django.conf.urls.static import static from apps.user import views as user_views from.views im...
[ 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 15269, 357, 66, 8, 33448, 374, 1647, 805, 13, 785, 198, 37811, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 3642, ...
2.913958
523
# Generated by Django 2.0.3 on 2018-09-14 12:42 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 15, 13, 18, 319, 2864, 12, 2931, 12, 1415, 1105, 25, 3682, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
#! /usr/bin/env python import cv2 import matplotlib.pyplot as plt import skimage import skimage.io from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas from matplotlib.figure import Figure from matplotlib.pyplot import cm from mpl_toolkits.axes_grid1 import make_axes_locatable from numpy import ...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 269, 85, 17, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 1341, 9060, 198, 11748, 1341, 9060, 13, 952, 198, 6738, 2603, 29487, 8019, 13, 18...
2.224531
4,908
import pygame.font import copy
[ 11748, 12972, 6057, 13, 10331, 198, 11748, 4866, 628 ]
3.555556
9
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
[ 2, 49962, 284, 262, 10442, 10204, 7162, 3883, 357, 50, 4851, 8, 739, 530, 198, 2, 393, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 2, 9387, 351, 428, 670, 329, 3224, 1321, 198, 2, 5115, 6634, 9238, 13, 220, 383,...
2.885816
1,121
# coding: utf-8 # # a Geometry class contains the list of patches and additional information about # the topology i.e. connectivity, boundaries # For the moment, it is used as a container, that can be loaded from a file # (hdf5) from itertools import product from collections import abc import numpy as np import string ...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 198, 2, 257, 2269, 15748, 1398, 4909, 262, 1351, 286, 16082, 290, 3224, 1321, 546, 198, 2, 262, 1353, 1435, 1312, 13, 68, 13, 19843, 11, 13215, 198, 2, 1114, 262, 2589, 11, 340, 318, 973, ...
2.261936
6,032
__author__ = 'Jiri Fajtl' __email__ = 'ok1zjf@gmail.com' __version__= '2.2' __status__ = "Research" __date__ = "28/1/2018" __license__= "MIT License" import os import numpy as np import glob import subprocess import platform import sys import pkg_resources import torch import PIL as Image try: import cv2 except:...
[ 834, 9800, 834, 796, 705, 41, 14783, 376, 1228, 28781, 6, 198, 834, 12888, 834, 796, 705, 482, 16, 89, 73, 69, 31, 14816, 13, 785, 6, 198, 834, 9641, 834, 28, 705, 17, 13, 17, 6, 198, 834, 13376, 834, 796, 366, 25104, 1, 198, ...
2.721854
302
# automatically generated by the FlatBuffers compiler, do not modify # namespace: aghast_generated import flatbuffers
[ 2, 6338, 7560, 416, 262, 21939, 36474, 364, 17050, 11, 466, 407, 13096, 198, 198, 2, 25745, 25, 257, 456, 459, 62, 27568, 198, 198, 11748, 6228, 36873, 364, 628, 198 ]
3.935484
31
import axelrod as axl from .test_player import TestPlayer C, D = axl.Action.C, axl.Action.D
[ 11748, 7877, 417, 14892, 355, 7877, 75, 198, 198, 6738, 764, 9288, 62, 7829, 1330, 6208, 14140, 198, 198, 34, 11, 360, 796, 7877, 75, 13, 12502, 13, 34, 11, 7877, 75, 13, 12502, 13, 35, 198 ]
2.540541
37
#FILE NAME: BannerTool.py #created by: Ciro Veneruso #purpose: banner localization #last edited by: Ciro Veneruso #INSTALL: BeautifulSoup #TODO: this code is a blob, must be refactorized!!!! import re import mechanize import socket import urllib from tools import BaseTool from bs4 import BeautifulSoup from pprint i...
[ 2, 25664, 36751, 25, 27414, 25391, 13, 9078, 198, 2, 25598, 416, 25, 327, 7058, 569, 877, 385, 78, 198, 2, 29983, 25, 17625, 42842, 198, 2, 12957, 13012, 416, 25, 327, 7058, 569, 877, 385, 78, 198, 198, 2, 38604, 7036, 25, 23762, ...
3.223602
161
from .ise import ISE from .vivado import Vivado
[ 198, 6738, 764, 786, 1330, 3180, 36, 198, 6738, 764, 85, 452, 4533, 1330, 25313, 4533, 198 ]
2.882353
17
# Copyright 2020 EraO Prosopagnosia Helper Dev Team, Liren Pan, Yixiao Hong, Hongzheng Xu, Stephen Huang, Tiancong Wang # # Supervised by Prof. Steve Mann (http://www.eecg.toronto.edu/~mann/) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with th...
[ 2, 220, 15069, 12131, 25466, 46, 27631, 404, 4660, 418, 544, 5053, 525, 6245, 4816, 11, 406, 24080, 5961, 11, 575, 844, 13481, 9764, 11, 9764, 89, 31753, 33591, 11, 7970, 31663, 11, 20834, 36801, 15233, 198, 2, 198, 2, 220, 3115, 16...
3.582003
689
import math from point2d import Point2D
[ 11748, 10688, 198, 198, 6738, 966, 17, 67, 1330, 6252, 17, 35, 628, 198 ]
3.071429
14
import concurrent import os import re import shutil import xml.etree.ElementTree as ET # TODO do we have this as requirement? from concurrent.futures import as_completed from concurrent.futures._base import as_completed from pathlib import Path import ffmpeg import pandas as pd import webrtcvad from audio_korpora_pi...
[ 11748, 24580, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 4423, 346, 198, 11748, 35555, 13, 316, 631, 13, 20180, 27660, 355, 12152, 220, 1303, 16926, 46, 466, 356, 423, 428, 355, 9079, 30, 198, 6738, 24580, 13, 69, 315, 942, 1330,...
3.361809
199
import matplotlib.pyplot as plt import math import shutil import torch from accelerate import Accelerator from tensorboardX import SummaryWriter from cli import parse_args from dataset import SvbrdfDataset from losses import MixedLoss, MixedLoss2, MixedLoss3 from models import MultiViewModel, SingleViewModel from pathl...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 10688, 198, 11748, 4423, 346, 198, 11748, 28034, 198, 6738, 22636, 1330, 29805, 1352, 198, 6738, 11192, 273, 3526, 55, 1330, 21293, 34379, 198, 6738, 537, 72, 1330, 21...
2.258713
6,169
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 from .engines import do_train, do_inference from .lstr.lstr_trainer import * from .lstr.lstr_inference import *
[ 2, 15069, 6186, 13, 785, 11, 3457, 13, 393, 663, 29116, 13, 1439, 6923, 33876, 13, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 198, 6738, 764, 1516, 1127, 1330, 466, 62, 27432, 11, 466, 62, 259...
3.013699
73
# Copyright 2017 NOKIA # All Rights Reserved. from netaddr import IPNetwork import testtools from tempest.common import waiters from tempest.lib import exceptions from tempest.scenario import manager from tempest.test import decorators from nuage_tempest_plugin.lib.test.nuage_test import NuageAdminNetworksTest from ...
[ 2, 15069, 2177, 8005, 42, 3539, 198, 2, 1439, 6923, 33876, 13, 198, 198, 6738, 2010, 29851, 1330, 6101, 26245, 198, 11748, 1332, 31391, 198, 198, 6738, 20218, 395, 13, 11321, 1330, 4043, 364, 198, 6738, 20218, 395, 13, 8019, 1330, 132...
3.294737
190
''' Advent of code 2019 Day 11 - Space police ''' from typing import NamedTuple from enum import Enum INPUT_FILE=__file__.replace('.py', '.dat') def run_robot(code: dict, start_on_white: bool = False) -> int: DIRECTIONS_COUNT = 4 direction = Direction.UP panels = {} seen...
[ 7061, 6, 33732, 286, 2438, 13130, 3596, 1367, 532, 4687, 1644, 220, 705, 7061, 201, 198, 201, 198, 6738, 19720, 1330, 34441, 51, 29291, 201, 198, 6738, 33829, 1330, 2039, 388, 201, 198, 201, 198, 1268, 30076, 62, 25664, 28, 834, 7753,...
2.073214
1,120
description = 'Mezei spin flipper using TTI power supply' group = 'optional' tango_base = 'tango://miractrl.mira.frm2:10000/mira/' devices = dict( dct1 = device('nicos.devices.entangle.PowerSupply', description = 'current in first channel of supply (flipper current)', tangodevice = tango_base + 't...
[ 11213, 796, 705, 5308, 2736, 72, 7906, 781, 14710, 1262, 309, 25621, 1176, 5127, 6, 198, 8094, 796, 705, 25968, 6, 198, 198, 83, 14208, 62, 8692, 796, 705, 83, 14208, 1378, 10793, 529, 45895, 13, 76, 8704, 13, 8310, 76, 17, 25, 49...
2.380117
342
# Copyright 1999-2021 Alibaba Group Holding Ltd. # # 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 a...
[ 2, 15069, 7358, 12, 1238, 2481, 41992, 4912, 31703, 12052, 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, ...
3.128289
912
import re from wikipedia_parser.infobox import clean_text as clean_help from wikipedia_parser.infobox import wikitext_helpers as wtext_help from wikipedia_parser.third_party_adapters import parserfromhell_adapter as adapter __author__ = 'oswaldjones'
[ 11748, 302, 198, 198, 6738, 47145, 11151, 62, 48610, 13, 10745, 672, 1140, 1330, 3424, 62, 5239, 355, 3424, 62, 16794, 198, 6738, 47145, 11151, 62, 48610, 13, 10745, 672, 1140, 1330, 47145, 578, 742, 62, 16794, 364, 355, 266, 5239, 62...
3.225
80
from .GraphQLClient import GraphQLClient from Jumpscale import j JSConfigs = j.baseclasses.object_config_collection
[ 6738, 764, 37065, 9711, 11792, 1330, 29681, 9711, 11792, 198, 6738, 449, 8142, 38765, 1330, 474, 628, 198, 20120, 16934, 82, 796, 474, 13, 8692, 37724, 13, 15252, 62, 11250, 62, 43681, 628 ]
3.606061
33
from os import getenv as e from kombu import Queue CELERY_APP_NAME = 'video_transcoding' VIDEO_TRANSCODING_CELERY_CONF = { 'broker_url': e('VIDEO_TRANSCODING_CELERY_BROKER_URL', 'amqp://guest:guest@rabbitmq:5672/'), 'result_backend': e('VIDEO_TRANSCODING_CELERY_RESULT_BACKEND', None), ...
[ 6738, 28686, 1330, 651, 24330, 355, 304, 198, 198, 6738, 479, 2381, 84, 1330, 4670, 518, 628, 198, 34, 3698, 19664, 62, 24805, 62, 20608, 796, 705, 15588, 62, 7645, 66, 7656, 6, 628, 198, 42937, 62, 5446, 1565, 6173, 3727, 2751, 62,...
2.395349
559
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
import decimal from unittest import mock from django.conf import settings from django.test import modify_settings from rest_framework import test from rest_framework.reverse import reverse import stripe from restshop import serializers from restshop.models import Order from paymentmethods.stripejs.models import Strip...
[ 11748, 32465, 198, 6738, 555, 715, 395, 1330, 15290, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9288, 1330, 13096, 62, 33692, 198, 6738, 1334, 62, 30604, 1330, 1332, 198, 6738, 1334, 62, 30604, 13,...
4.038835
103
from tnnt.settings import UNIQUE_DEATH_REJECTIONS, UNIQUE_DEATH_NORMALIZATIONS import re # post 2021 TODO: showing unique deaths of a player or clan: # 1. list(Game.objects.values_list('death', 'player__name', 'endtime')) # 2. iterate through list, filtering any death for which reject is True, and # normalizing all...
[ 6738, 256, 77, 429, 13, 33692, 1330, 4725, 33866, 8924, 62, 7206, 12599, 62, 2200, 23680, 11053, 11, 4725, 33866, 8924, 62, 7206, 12599, 62, 35510, 42126, 14887, 18421, 198, 11748, 302, 198, 198, 2, 1281, 33448, 16926, 46, 25, 4478, 3...
3.258503
147
# This file is part of QuTiP: Quantum Toolbox in Python. # # Copyright (c) 2011 and later, Paul D. Nation and Robert J. Johansson. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: ...
[ 2, 770, 2393, 318, 636, 286, 2264, 40533, 47, 25, 29082, 16984, 3524, 287, 11361, 13, 198, 2, 198, 2, 220, 220, 220, 15069, 357, 66, 8, 2813, 290, 1568, 11, 3362, 360, 13, 8741, 290, 5199, 449, 13, 16053, 44038, 13, 198, 2, 220,...
2.806415
3,523
# comments------------------ if True: a(10)
[ 2, 3651, 1783, 438, 628, 220, 220, 220, 220, 198, 361, 6407, 25, 198, 220, 220, 220, 257, 7, 940, 8 ]
2.52381
21
""" Hull objects of localization data. Submodules: ----------- .. autosummary:: :toctree: ./ hull alpha_shape """ from locan.data.hulls.alpha_shape import * from locan.data.hulls.hull import * __all__ = [] __all__.extend(hull.__all__) __all__.extend(alpha_shape.__all__)
[ 37811, 198, 39, 724, 5563, 286, 42842, 1366, 13, 198, 198, 7004, 18170, 25, 198, 32284, 198, 198, 492, 44619, 388, 6874, 3712, 198, 220, 220, 1058, 1462, 310, 631, 25, 24457, 628, 220, 220, 23644, 198, 220, 220, 17130, 62, 43358, 19...
2.465517
116
import pytest from daisy.workflow import build_combinations
[ 11748, 12972, 9288, 198, 6738, 12379, 13560, 13, 1818, 11125, 1330, 1382, 62, 24011, 7352, 628, 628, 628, 628, 628, 628, 628 ]
3.318182
22
# class Encoder: # pass # class Decoder: # pass # class VariationAutoEncoder: # pass import os os.environ['CUDA_VISIBLE_DEVICES'] = "0" import pickle import logging from glob import glob import numpy as np from time import time from datetime import datetime from PIL import Image import matplotlib.pyplot ...
[ 2, 1398, 14711, 12342, 25, 198, 2, 220, 220, 220, 220, 1208, 198, 198, 2, 1398, 34580, 25, 198, 2, 220, 220, 220, 220, 1208, 198, 198, 2, 1398, 15965, 341, 27722, 27195, 12342, 25, 198, 2, 220, 220, 220, 220, 1208, 198, 198, 117...
2.460499
2,443
import time from config import get_password, get_username from playwright.sync_api import Page
[ 11748, 640, 198, 6738, 4566, 1330, 651, 62, 28712, 11, 651, 62, 29460, 198, 6738, 711, 29995, 13, 27261, 62, 15042, 1330, 7873, 628, 198 ]
3.88
25