content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
#!/usr/bin/env python3 import argparse from TB2J.rotate_atoms import rotate_atom_xyz, rotate_xyz, check_ftype if __name__ == "__main__": main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 1822, 29572, 198, 6738, 23799, 17, 41, 13, 10599, 378, 62, 265, 3150, 1330, 23064, 62, 37696, 62, 5431, 89, 11, 23064, 62, 5431, 89, 11, 2198, 62, 701, 2981, 628, 198, 1...
2.47541
61
import unittest from unittest import mock import numpy import numpy as np from qupulse.utils.types import TimeType from qupulse.pulses.interpolation import HoldInterpolationStrategy, LinearInterpolationStrategy,\ JumpInterpolationStrategy from qupulse._program.waveforms import MultiChannelWaveform, RepetitionWave...
[ 11748, 555, 715, 395, 198, 6738, 555, 715, 395, 1330, 15290, 198, 198, 11748, 299, 32152, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 627, 79, 9615, 13, 26791, 13, 19199, 1330, 3862, 6030, 198, 6738, 627, 79, 9615, 13, 79, 5...
3.566845
187
#!/usr/bin/python3 # This is a simple port-forward / proxy, written using only the default python # library. If you want to make a suggestion or fix something you can contact-me # at voorloop_at_gmail.com # Distributed over IDC(I Don't Care) license # Pulled shamelessly from # http://voorloopnul.com/blog/a-pytho...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 201, 198, 2, 770, 318, 257, 2829, 2493, 12, 11813, 1220, 15741, 11, 3194, 1262, 691, 262, 4277, 21015, 201, 198, 2, 5888, 13, 1002, 345, 765, 284, 787, 257, 13052, 393, 4259, 1223, 345, 46...
2.820051
389
""" Provides/defines stable APIs for behave users: * step writer(s): features/steps/*.py * environment writers: features/environment.py * ... """
[ 37811, 198, 15946, 1460, 14, 4299, 1127, 8245, 23113, 329, 17438, 2985, 25, 198, 198, 9, 2239, 6260, 7, 82, 2599, 3033, 14, 20214, 15211, 13, 9078, 198, 9, 2858, 8786, 25, 3033, 14, 38986, 13, 9078, 198, 9, 2644, 198, 37811, 198 ]
3.418605
43
import uuid from django.conf import settings from django.db import models from django.db.models import Count from mdeditor.fields import MDTextField from django.utils.translation import ugettext_lazy as _ from slugify import slugify from taggit.managers import TaggableManager # Create your models here. from taggit.mo...
[ 11748, 334, 27112, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 1330, 2764, 198, 6738, 285, 9395, 2072, 13, 25747, 1330, 10670, 8206, 1...
2.039897
777
# -*- coding: utf-8 -*- """ Created on Fri Jan 3 22:31:41 2020 @author: ZhengChao """ from pyecharts.charts import Bar, Grid, Line, Page, Pie from pyecharts import options as opts # 内置主题类型可查看 pyecharts.globals.ThemeType from pyecharts.globals import ThemeType import re import datetime import webbrowser pattern_batt...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 19480, 2365, 220, 513, 2534, 25, 3132, 25, 3901, 12131, 198, 198, 31, 9800, 25, 44583, 1925, 5488, 198, 37811, 198, 198, 6738, 12972, 3055, 5889,...
1.740936
4,551
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'scpt_gui_about.ui' # # Created by: PyQt5 UI code generator 5.15.2 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import QtCor...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 5178, 7822, 7560, 422, 3555, 334, 72, 2393, 705, 1416, 457, 62, 48317, 62, 10755, 13, 9019, 6, 198, 2, 198, 2, 15622, 416, 25, 9485, 48, 83, 20, 12454, 243...
2.635556
225
# Copyright 2019 Ondrej Skopek. # # 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...
[ 2, 15069, 13130, 440, 358, 260, 73, 3661, 404, 988, 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,...
3.952991
234
from __future__ import print_function import os import sys import re import shutil import glob import logging import configparser import muteria.common.mix as common_mix import muteria.common.fs as common_fs from muteria.repositoryandcode.codes_convert_support import CodeFormats from muteria.repositoryandcode.callb...
[ 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 302, 198, 11748, 4423, 346, 198, 11748, 15095, 198, 11748, 18931, 198, 11748, 4566, 48610, 198, 198, 11748, 4517, 5142, 13, 11321, ...
3.484043
188
# FUNCIONES FILTER # PROGRAMACION FUNCIONAL (PARADIGMA) numeros=[17,24,7,39,8,51,92] print(list(filter(numero_par, numeros))) #usando lambda print("Usando Lamda") numeros1=[17,24,7,39,8,51,92] print(list(filter(lambda numero_par: numero_par%2==0, numeros1)))
[ 2, 29397, 34, 2849, 1546, 34020, 5781, 198, 2, 46805, 2246, 2849, 29397, 34, 2849, 1847, 357, 27082, 2885, 3528, 5673, 8, 198, 198, 77, 6975, 418, 41888, 1558, 11, 1731, 11, 22, 11, 2670, 11, 23, 11, 4349, 11, 5892, 60, 220, 220, ...
2.075188
133
# ClearML - Example of manual graphs and statistics reporting # from __future__ import print_function import logging import sys import six from clearml import Logger, Task def report_logs(logger): # type: (Logger) -> () """ reporting text to logs section :param logger: The task.logger to use for s...
[ 2, 11459, 5805, 532, 17934, 286, 10107, 28770, 290, 220, 7869, 6447, 198, 2, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 18931, 198, 11748, 25064, 198, 198, 11748, 2237, 198, 198, 6738, 1598, 4029, 1330, 5972, ...
2.685596
722
# coding: utf-8 """ Aurelio_Amerio_Higgs_v4.py In this analysis, I have used several MLP models, applied to the Kaggle Higgs dataset, in order to distinguish signal from noise. ---------------------------------------------------------------------- author: Aurelio Amerio (aurelio.amerio@edu.unito.i...
[ 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 37811, 198, 220, 43737, 48590, 62, 32, 647, 952, 62, 39, 20340, 62, 85, 19, 13, 9078, 628, 220, 554, 428, 3781, 11, 314, 423, 973, 1811, 10373, 47, 4981, 11, 5625, 284, 262, 509, 9460, ...
2.296885
10,691
import sys, os import json import datetime import praw #Function to enable running API call from cmd. if __name__ == '__main__': args = sys.argv[1:] search(args[0])
[ 11748, 25064, 11, 28686, 198, 198, 11748, 33918, 198, 11748, 4818, 8079, 198, 198, 11748, 279, 1831, 628, 198, 2, 22203, 284, 7139, 2491, 7824, 869, 422, 23991, 13, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 628, 1...
2.9
60
from cnab.types import ( Action, Credential, ImagePlatform, Ref, Image, InvocationImage, Maintainer, Destination, Metadata, Parameter, Bundle, ) from cnab.cnab import CNAB from cnab.invocation_image import CNABDirectory
[ 6738, 269, 77, 397, 13, 19199, 1330, 357, 198, 220, 220, 220, 7561, 11, 198, 220, 220, 220, 327, 445, 1843, 11, 198, 220, 220, 220, 7412, 37148, 11, 198, 220, 220, 220, 6524, 11, 198, 220, 220, 220, 7412, 11, 198, 220, 220, 220,...
2.336283
113
from typing import Any, List, Literal, TypedDict from .FHIR_code import FHIR_code from .FHIR_Element import FHIR_Element from .FHIR_Identifier import FHIR_Identifier from .FHIR_Reference import FHIR_Reference from .FHIR_string import FHIR_string # A set of healthcare-related information that is assembled together int...
[ 6738, 19720, 1330, 4377, 11, 7343, 11, 25659, 1691, 11, 17134, 276, 35, 713, 198, 198, 6738, 764, 44602, 4663, 62, 8189, 1330, 376, 39, 4663, 62, 8189, 198, 6738, 764, 44602, 4663, 62, 20180, 1330, 376, 39, 4663, 62, 20180, 198, 673...
3.966897
725
import pandas as pd print(pd.__version__) df = pd.DataFrame( {"col": range(10)}, index=pd.date_range("2012-01-01", periods=10, freq="20min") ) res = df.resample("H").apply(lambda group: len(group["col"].unique())) print(res) index = pd.DatetimeIndex( [ "2012-01-01 00:00:00", "2012-01-01 01:0...
[ 11748, 19798, 292, 355, 279, 67, 198, 198, 4798, 7, 30094, 13, 834, 9641, 834, 8, 198, 198, 7568, 796, 279, 67, 13, 6601, 19778, 7, 198, 220, 220, 220, 19779, 4033, 1298, 2837, 7, 940, 8, 5512, 6376, 28, 30094, 13, 4475, 62, 952...
2.16242
314
# Copyright (c) 2020 Graphcore Ltd. All rights reserved. import numpy as np import pytest import popart import onnx import json from op_tester import op_tester # `import test_util` requires adding to sys.path import sys from pathlib import Path sys.path.append(str(Path(__file__).resolve().parent.parent)) import test_u...
[ 2, 15069, 357, 66, 8, 12131, 29681, 7295, 12052, 13, 1439, 2489, 10395, 13, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 9288, 198, 11748, 1461, 433, 198, 11748, 319, 77, 87, 198, 11748, 33918, 198, 6738, 1034, 62, 4879, 353...
3.104956
343
from pathlib import Path import json from pdb import set_trace as TT from collections import defaultdict from itertools import chain import shutil import os import re import csv from timeit import default_timer as timer import gym from matplotlib import pyplot as plt import matplotlib from ray.rllib.agents import Tra...
[ 6738, 3108, 8019, 1330, 10644, 198, 11748, 33918, 198, 6738, 279, 9945, 1330, 900, 62, 40546, 355, 26653, 198, 198, 6738, 17268, 1330, 4277, 11600, 198, 6738, 340, 861, 10141, 1330, 6333, 198, 11748, 4423, 346, 198, 11748, 28686, 198, 1...
2.196967
9,560
import discord, logging, os, os.path from discord.ext import commands from discord.utils import get cwd = os.getcwd()
[ 11748, 36446, 11, 18931, 11, 28686, 11, 28686, 13, 6978, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 6738, 36446, 13, 26791, 1330, 651, 198, 66, 16993, 796, 28686, 13, 1136, 66, 16993, 3419, 198 ]
3.371429
35
from datetime import date, timedelta from django.utils import timezone from math import floor from typing import Optional, Dict from decimal import Decimal from django.contrib.auth.models import User from django.core.exceptions import ObjectDoesNotExist, ValidationError from django.db.utils import OperationalError, Pro...
[ 6738, 4818, 8079, 1330, 3128, 11, 28805, 12514, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 198, 6738, 10688, 1330, 4314, 198, 6738, 19720, 1330, 32233, 11, 360, 713, 198, 6738, 32465, 1330, 4280, 4402, 198, 6738, 42625, 14208, ...
2.647183
16,578
''' AAA lllllll lllllll iiii A:::A l:::::l l:::::l i::::i A:::::A l:::::l l:::::l iiii A:::::::A l:::::l l:::::l A:::::::::A l::::l l::::l iiiiiii eeeeeeeeeeee A:::::A:::::A ...
[ 7061, 6, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 25734, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 32660, 297, 297, 75, 32660, 297, 297, 75, 220, 220, 1312, 15479, 19...
1.860169
1,180
from .oneshot.darts.optimizer import DARTSOptimizer from .oneshot.oneshot_train.optimizer import OneShotNASOptimizer from .oneshot.rs_ws.optimizer import RandomNASOptimizer from .oneshot.gdas.optimizer import GDASOptimizer from .oneshot.drnas.optimizer import DrNASOptimizer from .discrete.rs.optimizer import RandomSear...
[ 6738, 764, 1952, 8940, 13, 67, 5889, 13, 40085, 7509, 1330, 41649, 4694, 27871, 320, 7509, 198, 6738, 764, 1952, 8940, 13, 1952, 8940, 62, 27432, 13, 40085, 7509, 1330, 1881, 28512, 18293, 27871, 320, 7509, 198, 6738, 764, 1952, 8940, ...
3.251429
175
import operator def make_wrappers(cls, coercedMethods=[], nonCoercedMethods=[]): """Make wrapper methods for the given class, rewiring self.method -> self.value.method coercedMethods : return value of same type as self nonCoercedMethods : return something else This reduces the likeliness of er...
[ 11748, 10088, 198, 198, 4299, 787, 62, 29988, 11799, 7, 565, 82, 11, 48474, 46202, 41888, 4357, 1729, 7222, 263, 771, 46202, 28, 21737, 2599, 198, 220, 220, 220, 37227, 12050, 29908, 5050, 329, 262, 1813, 1398, 11, 302, 86, 3428, 2116...
2.760989
364
import pandas as pd from nlp_profiler.constants import CHARACTERS_COUNT_COL, SENTENCES_COUNT_COL from nlp_profiler.constants import \ DATES_COUNT_COL, STOP_WORDS_COUNT_COL, PUNCTUATIONS_COUNT_COL, \ REPEATED_PUNCTUATIONS_COUNT_COL, NON_ALPHA_NUMERIC_COUNT_COL from nlp_profiler.constants import \ DEFAULT_PA...
[ 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 299, 34431, 62, 5577, 5329, 13, 9979, 1187, 1330, 28521, 10659, 4877, 62, 34, 28270, 62, 25154, 11, 311, 3525, 24181, 1546, 62, 34, 28270, 62, 25154, 198, 6738, 299, 34431, 62, 5577, ...
2.680672
833
import convokit print(convokit) import numpy as np # create corpus object corpus = convokit.Corpus(filename=convokit.download("reddit-corpus-small")) # we typically would not need to expose make_hypergraph publicly, but we do this here # to demonstrate Hypergraph methods G = convokit.HyperConvo()._make_hypergraph(co...
[ 11748, 3063, 482, 270, 198, 4798, 7, 42946, 482, 270, 8, 198, 11748, 299, 32152, 355, 45941, 198, 198, 2, 2251, 35789, 2134, 198, 10215, 79, 385, 796, 3063, 482, 270, 13, 45680, 385, 7, 34345, 28, 42946, 482, 270, 13, 15002, 7203, ...
2.820144
556
from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.common.exceptions import TimeoutException, WebDriverExce...
[ 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 46659, 13, 25811, 1330, 18634, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 11321, 13, 1525, 1330, 2750, 198, 6738, 384, 11925, 1505, 13...
3.733333
105
''' Description: Given a collection of integers that might contain duplicates, nums, return all possible subsets (the power set). Note: The solution set must not contain duplicate subsets. Example: Input: [1,2,2] Output: [ [2], [1], [1,2,2], [2,2], [1,2], [] ] ''' from typing import List # n : the...
[ 7061, 6, 198, 198, 11828, 25, 198, 198, 15056, 257, 4947, 286, 37014, 326, 1244, 3994, 14184, 16856, 11, 997, 82, 11, 1441, 477, 1744, 6352, 1039, 357, 1169, 1176, 900, 737, 198, 198, 6425, 25, 383, 4610, 900, 1276, 407, 3994, 23418...
2.67094
234
from dataclasses import dataclass from typing import List @dataclass
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 19720, 1330, 7343, 628, 198, 31, 19608, 330, 31172, 198 ]
3.55
20
from django.conf import settings from django.utils import translation import commonware.log import amo from addons.models import AddonUser from amo.helpers import absolutify from amo.utils import find_language, no_translation from constants.applications import DEVICE_TYPES from market.models import Price from users.m...
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 26791, 1330, 11059, 198, 198, 11748, 2219, 1574, 13, 6404, 198, 198, 11748, 716, 78, 198, 6738, 751, 684, 13, 27530, 1330, 3060, 261, 12982, 198, 6738, 716, 78, 1...
2.290956
4,224
import ctypes from pylabnet.hardware.interface.wavemeter import WavemeterInterface, WavemeterError from pylabnet.utils.logging.logger import LogHandler class Driver(WavemeterInterface): """ Hardware class to control High Finesse Wavemeter.""" def __init__(self, logger=None): """ Instantiate wavemete...
[ 11748, 269, 19199, 198, 198, 6738, 279, 2645, 397, 3262, 13, 10424, 1574, 13, 39994, 13, 19204, 27231, 1330, 17084, 27231, 39317, 11, 17084, 27231, 12331, 198, 6738, 279, 2645, 397, 3262, 13, 26791, 13, 6404, 2667, 13, 6404, 1362, 1330,...
2.374757
1,030
from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible.errors import AnsibleError, AnsibleFilterError # Returns list of keys that differ between two dicts - that are present in # either of them but not in both or have different value # Same as dict_diff but retur...
[ 6738, 11593, 37443, 834, 1330, 357, 48546, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 8, 198, 198, 834, 4164, 330, 31172, 834, 796, 2099, 628, 198, 6738, 9093, 856, 13, 48277, 1330, 28038, 856, 12331, 11, 28038, 856, 22417, 12331, 628, ...
3.878505
107
import torch import random import numpy as np if __name__ == "__main__": test_tensor = torch.rand((21, 2)) print(test_tensor[:4]) test_tensor = normalize_center(test_tensor) print(test_tensor[:4]) test_tensor = denormalize_center(test_tensor) print(test_tensor[:4])
[ 11748, 28034, 198, 11748, 4738, 198, 198, 11748, 299, 32152, 355, 45941, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1332, 62, 83, 22854, 796, 28034, 13, 25192, 19510, 2481, 11, 362, 4008, 62...
2.406504
123
# coding: utf-8 from dohq_teamcity.custom.base_model import TeamCityObject # from dohq_teamcity.models.href import Href # noqa: F401,E501 class Server(TeamCityObject): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ """ Attribu...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 6738, 466, 71, 80, 62, 15097, 19205, 13, 23144, 13, 8692, 62, 19849, 1330, 4816, 14941, 10267, 628, 198, 2, 422, 466, 71, 80, 62, 15097, 19205, 13, 27530, 13, 33257, 1330, 367, 5420, 220, ...
2.203113
6,361
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
import pandas as pd from pangeo_forge_recipes.patterns import pattern_from_file_sequence from pangeo_forge_recipes.recipes import XarrayZarrRecipe def _return_jpl_dates(): """Returns lists of dates for the JPL file pattern. """ daily_dates = pd.date_range("2015-05-04", "2021-05-06", freq="D") daily_d...
[ 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 279, 858, 78, 62, 30293, 62, 8344, 18636, 13, 33279, 82, 1330, 3912, 62, 6738, 62, 7753, 62, 43167, 198, 6738, 279, 858, 78, 62, 30293, 62, 8344, 18636, 13, 8344, 18636, 1330, 1395, ...
2.200328
3,050
test = {"id": 14, "items": [{"id": 924, "number": "1", "description": "", "score": "0", "group": "NI", "groups": ["NI"]}, {"id": 925, "number": "2", "description": "", "score": "3", "group": "AN", "groups": ["AN"]}, {"id": 926, "number": "3", "description": "", "score": "3", "group": "AH", "groups": ["AH"]}, {"id": 927...
[ 9288, 796, 19779, 312, 1298, 1478, 11, 366, 23814, 1298, 685, 4895, 312, 1298, 860, 1731, 11, 366, 17618, 1298, 366, 16, 1600, 366, 11213, 1298, 366, 1600, 366, 26675, 1298, 366, 15, 1600, 366, 8094, 1298, 366, 22125, 1600, 366, 24432...
2.623664
4,116
## # Copyright (c) 2007-2016 Apple Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
[ 2235, 198, 2, 15069, 357, 66, 8, 4343, 12, 5304, 4196, 3457, 13, 1439, 2489, 10395, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, ...
3.766892
296
from LoupGarou.decorator import is_alive import discord @is_alive("sorcière")
[ 6738, 4768, 79, 27676, 280, 13, 12501, 273, 1352, 1330, 318, 62, 282, 425, 198, 11748, 36446, 198, 198, 31, 271, 62, 282, 425, 7203, 82, 273, 979, 35979, 4943 ]
2.6
30
from ServerHandler import ServerHandler from LightSharkBridge import LightSharkBridge from OSCHandler import OSCHandler from MidiHandler import MidiHandler initial_conf = { "fader": [ {"fader_id": 1, "cc": 1, "name": "Fader1"}, {"fader_id": 2, "cc": 2, "name": "Fader2"}, {"fader_id": 3, "c...
[ 6738, 9652, 25060, 1330, 9652, 25060, 198, 6738, 4401, 2484, 668, 37385, 1330, 4401, 2484, 668, 37385, 198, 6738, 7294, 3398, 392, 1754, 1330, 7294, 3398, 392, 1754, 198, 6738, 7215, 72, 25060, 1330, 7215, 72, 25060, 628, 198, 36733, 62...
2.201979
1,213
import dill import numpy as np import scipy.stats as stats import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec from matplotlib import cm from matplotlib import rcParams rcParams['text.usetex'] = True rcParams['text.latex.preamble'] = r'\usepackage{amsfonts}' plt.figure(figsize=(6,3)) with open('di...
[ 11748, 288, 359, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 13, 34242, 355, 9756, 198, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 2603, 29487, 8019, 13, 2164, 2340, 43106, 355, 50000, ...
1.980652
1,809
from __future__ import print_function from pprint import pprint from insights import dr, datasource, rule from insights.core.context import ExecutionContext from insights.formats import Formatter class HumanReadableFormat(Formatter): """ Displays results in a human readable format. """ @staticmethod
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 279, 4798, 1330, 279, 4798, 198, 6738, 17218, 1330, 1553, 11, 19395, 1668, 11, 3896, 198, 6738, 17218, 13, 7295, 13, 22866, 1330, 37497, 21947, 198, 6738, 17218, 13, 687, 1381, ...
3.962025
79
# Init a List array = [10, 12, 14, 16, 18] # Get len leng = len(array) # Loop for i in range(leng): # Print print(f"Place {i} is : {array[i]}")
[ 2, 44707, 257, 7343, 198, 18747, 796, 685, 940, 11, 1105, 11, 1478, 11, 1467, 11, 1248, 60, 198, 198, 2, 3497, 18896, 198, 75, 1516, 796, 18896, 7, 18747, 8, 198, 198, 2, 26304, 198, 1640, 1312, 287, 2837, 7, 75, 1516, 2599, 198...
2.208955
67
import graphene from django.db import models def get_django_graphql_field_mapping(): """ This method hold the field type mapping for query type with graphql. :return: a mapping dictionary """ return { models.AutoField.__name__: graphene.Int(), models.BigAutoField.__name__: graphene...
[ 11748, 42463, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 628, 198, 4299, 651, 62, 28241, 14208, 62, 34960, 13976, 62, 3245, 62, 76, 5912, 33529, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 770, 2446, 1745, 262, 2214, 2099, 1685...
2.557252
917
_SCRIPT_VERSION = "Script version: Nuthouse01 - 6/3/2021 - v5.08" import sys try: sys.path.append("../") from python import nuthouse01_core as core from python import nuthouse01_pmx_parser as pmxlib except ImportError as eee: print(eee) print("ERROR: failed to import some of the necessary files, all my scripts m...
[ 62, 6173, 46023, 62, 43717, 796, 366, 7391, 2196, 25, 220, 399, 1071, 1076, 486, 532, 718, 14, 18, 14, 1238, 2481, 532, 410, 20, 13, 2919, 1, 198, 198, 11748, 25064, 198, 28311, 25, 198, 197, 17597, 13, 6978, 13, 33295, 7203, 4072...
3.155993
609
import tensorflow as tf
[ 11748, 11192, 273, 11125, 355, 48700, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198 ]
1.85
20
class QData: """Reflectometry data. A class to hold the qdata information consisting of four floats associated with the q-vector, the intensity of the reflectometry, the uncertainty in the intensity and the uncertainty in the q-vector/resolution of the q-vector. """ class ScatLens: """Scattering ...
[ 4871, 1195, 6601, 25, 198, 220, 220, 220, 37227, 8134, 801, 15748, 1366, 13, 628, 220, 220, 220, 317, 1398, 284, 1745, 262, 10662, 7890, 1321, 17747, 286, 1440, 36016, 3917, 351, 262, 10662, 12, 31364, 11, 262, 12245, 286, 262, 198, ...
3.739812
319
# -*- coding: utf-8 -*- from configparser import ConfigParser class SpiderConfig(object): """ 配置文件 """ def load_conf(self, conf_name='spider.conf'): """ 读取配置文件 """ config = ConfigParser() config.read(conf_name, encoding='utf-8') self....
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 201, 198, 6738, 4566, 48610, 1330, 17056, 46677, 201, 198, 201, 198, 201, 198, 4871, 12648, 16934, 7, 15252, 2599, 201, 198, 220, 220, 220, 37227, 201, 198, 220, ...
2.039326
712
@footer @header produto("Cadeira Gamer") produto("Teclado Mecanico") # funcionamento do decorator @pao lanche()
[ 628, 198, 31, 5898, 263, 198, 31, 25677, 628, 198, 1676, 67, 9390, 7203, 34, 671, 8704, 19576, 4943, 198, 1676, 67, 9390, 7203, 6767, 565, 4533, 337, 721, 272, 3713, 4943, 198, 198, 2, 25439, 295, 3263, 78, 466, 11705, 1352, 628, ...
2.277778
54
""" Created on Aug 15, 2011 @author: guillaume """ # Python Modules from scipy import pi, dot from scipy.linalg import expm from numpy.linalg import matrix_power # Local Modules from chemex.caching import lru_cache from .liouvillian import compute_cz_eq, compute_liouvillians, get_cz @lru_cache() def make_calc_obse...
[ 37811, 198, 41972, 319, 2447, 1315, 11, 2813, 198, 198, 31, 9800, 25, 915, 5049, 2454, 198, 37811, 198, 198, 2, 11361, 3401, 5028, 198, 6738, 629, 541, 88, 1330, 31028, 11, 16605, 198, 6738, 629, 541, 88, 13, 75, 1292, 70, 1330, 1...
2.074822
1,684
__author__ = 'kagami' from openpyxl.reader.excel import load_workbook if __name__ == '__main__': s = Csvcheck('/Users/kagami/git/python-practice-for-game-tester/res/快速生成奖励配置/配置模板.xlsx') s.check_id() s.check_lua(3)
[ 834, 9800, 834, 796, 705, 74, 363, 6277, 6, 628, 198, 6738, 1280, 9078, 87, 75, 13, 46862, 13, 1069, 5276, 1330, 3440, 62, 1818, 2070, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 197, 82, 796, 327, 213...
1.826446
121
# DO NOT EDIT THIS FILE. This file will be overwritten when re-running go-raml. """ Auto-generated class for fileblock """ from six import string_types from . import client_support class fileblock(object): """ auto-generated. don't touch. """ @staticmethod def create(**kwargs): """ ...
[ 2, 8410, 5626, 48483, 12680, 45811, 13, 770, 2393, 481, 307, 6993, 9108, 618, 302, 12, 20270, 467, 12, 859, 75, 13, 198, 198, 37811, 198, 27722, 12, 27568, 1398, 329, 2393, 9967, 198, 37811, 198, 6738, 2237, 1330, 4731, 62, 19199, 1...
2.548718
195
# # Copyright (c) 2010 Xavier Garcia xavi.garcia@gmail.com # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, thi...
[ 2, 220, 198, 2, 15069, 357, 66, 8, 3050, 30825, 18555, 220, 2124, 15820, 13, 4563, 33743, 31, 14816, 13, 785, 198, 2, 1439, 2489, 10395, 13, 198, 2, 220, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 3...
3.544018
443
import argparse import random import os import json import string from tqdm import tqdm import re import numpy as np if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('-i', '--input_path', required=True) parser.add_argument('-a', '--articles_path', required=True) parser.add_arg...
[ 198, 11748, 1822, 29572, 198, 11748, 4738, 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 4731, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 11748, 302, 198, 198, 11748, 299, 32152, 355, 45941, 628, 628, 198, 361, 11593, 367...
2.401907
734
import cek from linebot import LineBotApi from linebot.models import TextSendMessage, FlexSendMessage, BubbleContainer from linebot.exceptions import LineBotApiError import requests
[ 11748, 269, 988, 198, 6738, 1627, 13645, 1330, 6910, 20630, 32, 14415, 198, 6738, 1627, 13645, 13, 27530, 1330, 8255, 25206, 12837, 11, 26719, 25206, 12837, 11, 33691, 29869, 198, 6738, 1627, 13645, 13, 1069, 11755, 1330, 6910, 20630, 32,...
3.956522
46
from __future__ import absolute_import from dimagi.ext.couchdbkit import Document
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 5391, 18013, 13, 2302, 13, 66, 7673, 9945, 15813, 1330, 16854, 628 ]
3.772727
22
from analyzer import Analyzer class RangeCharAnalyzer(Analyzer): """Parses one input character (first of the sequence), if it is in-between a fixed range""" class CharAnalyzer(Analyzer): """Analyzer 11: characters in single quotes""" # creation of subanalyzers char_range_analyzer = RangeCharAnalyze...
[ 6738, 4284, 9107, 1330, 16213, 9107, 628, 198, 4871, 13667, 12441, 37702, 9107, 7, 37702, 9107, 2599, 198, 220, 220, 220, 37227, 47, 945, 274, 530, 5128, 2095, 357, 11085, 286, 262, 8379, 828, 611, 340, 318, 287, 12, 23395, 257, 5969,...
3.254902
153
from django.db import models from django.contrib.auth import get_user_model from django.core.validators import MaxValueValidator
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 198, 6738, 42625, 14208, 13, 7295, 13, 12102, 2024, 1330, 5436, 11395, 47139, 1352, 628, 628, 628, 628, 628 ]
3.365854
41
import os import json import subprocess from selfdrive.swaglog import cloudlog from selfdrive.version import version from common.api import api_get from common.params import Params if __name__ == "__main__": print api_get("").text print register()
[ 11748, 28686, 198, 11748, 33918, 198, 11748, 850, 14681, 198, 198, 6738, 2116, 19472, 13, 2032, 363, 6404, 1330, 6279, 6404, 198, 6738, 2116, 19472, 13, 9641, 1330, 2196, 198, 6738, 2219, 13, 15042, 1330, 40391, 62, 1136, 198, 6738, 221...
3.479452
73
import unittest from cobe.commands import TrainIrcLogCommand
[ 11748, 555, 715, 395, 198, 198, 6738, 269, 5910, 13, 9503, 1746, 1330, 16835, 40, 6015, 11187, 21575, 628 ]
3.315789
19
# general asyncore tools. import asyncore # a mixin for asyncore connections, allowing data to be queued, similar to # asyncore.dispatcher_with_send, but much smaller. # asyncore calls this to find out if we want to write data. # asyncore calls this when it senses that our fileno is writable. # select....
[ 2, 2276, 355, 2047, 7295, 4899, 13, 198, 198, 11748, 355, 2047, 7295, 198, 198, 2, 257, 5022, 259, 329, 355, 2047, 7295, 8787, 11, 5086, 1366, 284, 307, 8358, 1739, 11, 2092, 284, 198, 2, 355, 2047, 7295, 13, 6381, 8071, 2044, 62,...
3.380623
289
from core.ctx import * import core.log #__call__ = on #} class Event #} class Listener #} class Timeline Ctx().on() Ctx.register(globals(),{ '_g_now' : 0 , '_g_timeline' : Timeline() , '_g_event_listeners' : {} , }) if __name__ == '__main__' : main()
[ 6738, 4755, 13, 49464, 1330, 1635, 198, 11748, 4755, 13, 6404, 628, 628, 628, 628, 198, 220, 220, 220, 1303, 834, 13345, 834, 796, 319, 198, 198, 2, 92, 1398, 8558, 628, 198, 2, 92, 1398, 7343, 877, 628, 198, 198, 2, 92, 1398, 4...
2.058442
154
_base_ = [ '../_base_/models/erfnet_fcn.py', '../_base_/datasets/cityscapes.py', '../_base_/default_runtime.py', '../_base_/schedules/schedule_160k.py' ] data = dict( samples_per_gpu=4, workers_per_gpu=4, )
[ 62, 8692, 62, 796, 685, 198, 220, 220, 220, 705, 40720, 62, 8692, 62, 14, 27530, 14, 263, 69, 3262, 62, 16072, 77, 13, 9078, 3256, 705, 40720, 62, 8692, 62, 14, 19608, 292, 1039, 14, 19205, 1416, 7916, 13, 9078, 3256, 198, 220, ...
2.027273
110
from models.redundant import RedTwoLayerFC, RedFourLayerFC, RedLeNet5 from models.wide import WideTwoLayerFC, WideFourLayerFC, WideLeNet5 from models.baseline import TwoLayerFC, FourLayerFC, LeNet5 __all__ = [ 'RedTwoLayerFC', 'RedFourLayerFC', 'RedLeNet5', 'WideTwoLayerFC', 'WideFourLayerFC', ...
[ 6738, 4981, 13, 445, 917, 415, 1330, 2297, 7571, 49925, 4851, 11, 2297, 15137, 49925, 4851, 11, 2297, 3123, 7934, 20, 198, 6738, 4981, 13, 4421, 1330, 23399, 7571, 49925, 4851, 11, 23399, 15137, 49925, 4851, 11, 23399, 3123, 7934, 20, ...
2.418182
165
#!/usr/bin/env python # =============================================================================== # Copyright (c) 2014 Geoscience Australia # 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, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 38093, 25609, 855, 198, 2, 15069, 357, 66, 8, 220, 1946, 2269, 418, 4234, 4505, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, ...
2.196107
47,260
import populus from populus.utils.wait import wait_for_transaction_receipt from populus.utils.cli import request_account_unlock from populus.utils.accounts import is_account_locked from web3 import Web3 import utils if __name__ == "__main__": deployDemoContracts()
[ 11748, 16595, 385, 198, 6738, 16595, 385, 13, 26791, 13, 17077, 1330, 4043, 62, 1640, 62, 7645, 2673, 62, 260, 344, 10257, 198, 6738, 16595, 385, 13, 26791, 13, 44506, 1330, 2581, 62, 23317, 62, 403, 5354, 198, 6738, 16595, 385, 13, ...
3.113636
88
"""Error handling for the tilesets CLI""" class TilesetsError(Exception): """Base Tilesets error Deriving errors from this base isolates module development problems from Python usage problems. """ exit_code = 1 def __init__(self, message): """Error constructor Parameters ...
[ 37811, 12331, 9041, 329, 262, 19867, 1039, 43749, 37811, 628, 198, 4871, 309, 2915, 1039, 12331, 7, 16922, 2599, 198, 220, 220, 220, 37227, 14881, 309, 2915, 1039, 4049, 198, 220, 220, 220, 9626, 1412, 8563, 422, 428, 2779, 7010, 689, ...
2.733696
184
"""Functions for extracting docstrings from a file.""" import ast from darglint.function_description import ( get_function_descriptions, ) def extract(contents: str): """Extract all docstrings from the given file. Args: contents: The contents of the python file. Yields: The docstri...
[ 37811, 24629, 2733, 329, 37895, 2205, 37336, 422, 257, 2393, 526, 15931, 198, 198, 11748, 6468, 198, 198, 6738, 288, 853, 75, 600, 13, 8818, 62, 11213, 1330, 357, 198, 220, 220, 220, 651, 62, 8818, 62, 20147, 1968, 507, 11, 198, 8, ...
2.994083
169
#!/usr/bin/env python # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ''' process.py Processes the simple profiler's files to output the clean code Ver 0.1 - (c) 2017, Davide Del Papa, Public Domain ''' # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ import argparse import sys __version__ = '0.1' profiler_keywords = [ 'si...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 220, 27156, 27156, 15116, 93, 198, 7061, 6, 198, 14681, 13, 9078, 198, 18709, 274, 262, 2829, 1534, 5329, 338, 3696, 284, 5072, 262, 3424, 2438, 198, 13414, 657, 13, 16, 532, 357,...
2.686144
599
"""Custom Bazel rules.""" local_repository_env = repository_rule( implementation = _local_repository_env_impl, local = True, attrs = { "variable": attr.string(mandatory = True), "build_file": attr.label(mandatory = True), }, )
[ 37811, 15022, 347, 41319, 3173, 526, 15931, 198, 198, 12001, 62, 260, 1930, 37765, 62, 24330, 796, 16099, 62, 25135, 7, 198, 220, 220, 220, 7822, 796, 4808, 12001, 62, 260, 1930, 37765, 62, 24330, 62, 23928, 11, 198, 220, 220, 220, ...
2.45283
106
b = 5 f2(3)
[ 198, 198, 65, 796, 642, 198, 69, 17, 7, 18, 8 ]
1.181818
11
# stdlib imports from itertools import count # django imports from django.db import models # concrete models class Command(models.Model): """ This represents the commands that users submit through the webform command_text represents the raw text that users submit as their command submit_time represen...
[ 2, 14367, 8019, 17944, 198, 6738, 340, 861, 10141, 1330, 954, 198, 2, 42625, 14208, 17944, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 628, 198, 2, 10017, 4981, 198, 198, 4871, 9455, 7, 27530, 13, 17633, 2599, 198, 220, 220, 220, ...
3.175601
541
from flask_restful import Api, Resource from app import app from .stocks import ReadCsvByName, RearrangeByOrder, HighestClosingPrice, MostVolatile api = Api(app) version = 'v1.0' api.add_resource(ReadCsvByName,f"/api/{version}/readCsvByName") api.add_resource(RearrangeByOrder,f"/api/{version}/rearrangeByOrder") api.a...
[ 6738, 42903, 62, 2118, 913, 1330, 5949, 72, 11, 20857, 198, 6738, 598, 1330, 598, 198, 6738, 764, 29522, 1330, 4149, 34, 21370, 3886, 5376, 11, 30144, 9521, 3886, 18743, 11, 41864, 2601, 2752, 18124, 11, 4042, 16598, 12610, 198, 198, ...
2.73494
166
from typing import Optional from pydantic import BaseModel from .. import info __all__ = ("ServiceStatus",)
[ 6738, 19720, 1330, 32233, 198, 198, 6738, 279, 5173, 5109, 1330, 7308, 17633, 198, 198, 6738, 11485, 1330, 7508, 198, 198, 834, 439, 834, 796, 5855, 16177, 19580, 1600, 8, 628 ]
3.612903
31
from django.urls import path from . import views from django.conf import settings from django.conf.urls.static import static from CustomerHome import views as cust_views from Vehicles import views as veh_views urlpatterns = [ path('', views.index, name="Owner"), path('signin/',cust_views.signin, name="SignIn")...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 764, 1330, 5009, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 13, 12708, 1330, 9037, 198, 6738, 22092, 16060, 1330, 5009, 355,...
3.105072
552
# Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> import re from sqlalchemy.exc import IntegrityError def field_lookup(field_string): """Attempts to find relevant error field for uniqueness constraint error, given SQL error message; broken off from tra...
[ 2, 15069, 357, 34, 8, 1584, 3012, 3457, 13, 198, 2, 49962, 739, 2638, 1378, 2503, 13, 43073, 13, 2398, 14, 677, 4541, 14, 43, 2149, 24290, 12, 17, 13, 15, 1279, 3826, 38559, 24290, 2393, 29, 198, 198, 11748, 302, 198, 6738, 44161,...
2.794297
491
# Generated by Django 3.0.2 on 2020-01-25 23:08 from django.conf import settings from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 17, 319, 12131, 12, 486, 12, 1495, 2242, 25, 2919, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 142...
3.019231
52
from conans import ConanFile, AutoToolsBuildEnvironment, tools import os from conans.tools import download, unzip
[ 6738, 369, 504, 1330, 31634, 8979, 11, 11160, 33637, 15580, 31441, 11, 4899, 198, 11748, 28686, 198, 6738, 369, 504, 13, 31391, 1330, 4321, 11, 555, 13344, 198 ]
4.071429
28
from onegov.org.forms import EventForm as OrgEventForm
[ 6738, 530, 9567, 13, 2398, 13, 23914, 1330, 8558, 8479, 355, 1471, 70, 9237, 8479, 628 ]
3.5
16
""" A-6 Production of electricity """ # Length of time periods. LEN = [6, 3, 3, 2, 4, 4, 2] # Forecasted demand of time periods. DEM = [12000, 32000, 25000, 36000, 25000, 30000, 18000] # Get number of time periods. NT = len(LEN) # Enumerate time periods {0, ..., TIME = list(range(NT)) TYPES = list(range(4)) # Gen...
[ 37811, 198, 32, 12, 21, 19174, 286, 8744, 198, 37811, 198, 198, 2, 22313, 286, 640, 9574, 13, 198, 43, 1677, 796, 685, 21, 11, 513, 11, 513, 11, 362, 11, 604, 11, 604, 11, 362, 60, 198, 198, 2, 4558, 2701, 276, 3512, 286, 640,...
2.706364
1,100
from setuptools import setup descr = """scipy.ndimage implemented in pure numpy""" if __name__ == '__main__': setup(name='npimage', version='0.01', url='https://github.com/Image-Py/npimage', description='ndimage in numpy', long_description=descr, author='YXDragon', ...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 20147, 81, 796, 37227, 1416, 541, 88, 13, 358, 9060, 9177, 287, 5899, 299, 32152, 37811, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 9058, 7, ...
2.152542
236
"""Make a video file with or without graphic window (needs ffmpeg or opencv)""" from vedo import dataurl, Plotter, Mesh, Video # settings.screeshotScale = 2 # to get higher resolution # declare the class instance plt = Plotter(bg='beige', bg2='lb', axes=10, offscreen=False, interactive=1) plt += Mesh(data...
[ 37811, 12050, 257, 2008, 2393, 198, 351, 393, 1231, 13028, 4324, 198, 7, 50032, 31246, 43913, 393, 1280, 33967, 8, 37811, 198, 6738, 410, 24757, 1330, 1366, 6371, 11, 28114, 353, 11, 47529, 11, 7623, 198, 198, 2, 6460, 13, 1416, 260, ...
2.295019
783
from delira import get_backends as _get_backends if "TF" in _get_backends(): from delira.models.backends.tf_eager.abstract_network import \ AbstractTfEagerNetwork from delira.models.backends.tf_eager.data_parallel import \ DataParallelTfEagerNetwork
[ 6738, 1619, 8704, 1330, 651, 62, 1891, 2412, 355, 4808, 1136, 62, 1891, 2412, 198, 198, 361, 366, 10234, 1, 287, 4808, 1136, 62, 1891, 2412, 33529, 198, 220, 220, 220, 422, 1619, 8704, 13, 27530, 13, 1891, 2412, 13, 27110, 62, 68, ...
2.59434
106
# -*- coding: utf-8 -*- import re from unittest import TestCase from elizabeth import Address import elizabeth.core.interdata as common from tests.test_data import DummyCase from ._patterns import POSTAL_CODE_REGEX, STR_REGEX
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 302, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 6738, 1288, 9924, 1330, 17917, 198, 11748, 1288, 9924, 13, 7295, 13, 3849, 7890, 355, 2219, 198, ...
3.039474
76
import pandas as pd import tqdm min_df = pd.read_pickle("data/augmented_datasets/pickle/min_attention.pkl") med_df = pd.read_pickle("data/augmented_datasets/pickle/median_attention.pkl") min_df["knowledge2"] = med_df.knowledge pd.to_pickle(min_df, "data/augmented_datasets/pickle/min_med.pkl")
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 256, 80, 36020, 198, 198, 1084, 62, 7568, 796, 279, 67, 13, 961, 62, 27729, 293, 7203, 7890, 14, 559, 5154, 276, 62, 19608, 292, 1039, 14, 27729, 293, 14, 1084, 62, 1078, 1463, 13, 79, ...
2.267176
131
from django.conf.urls import url import django.contrib.auth.views as auth_views from refugeedata import views urlpatterns = [ url(r'check_login/$', views.check_login, name="check_login"), url(r'^login/$', views.login, name="login"), url(r'^logout/$', views.logout, name="logout"), ]
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 11748, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 33571, 355, 6284, 62, 33571, 198, 198, 6738, 5473, 276, 1045, 1330, 5009, 628, 198, 6371, 33279, 82, 796, 685, 198, 220,...
2.684685
111
# -*- coding: utf-8 -*- from datetime import datetime, timedelta import errno import urllib import zipfile from django.core.files.base import File from django.utils.encoding import iri_to_uri from limited.core.files.utils import FilePath from limited.core.files.api.base import file_pre_change, FileStorageBaseApi fro...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 11748, 11454, 3919, 198, 11748, 2956, 297, 571, 198, 11748, 19974, 7753, 198, 198, 6738, 42625, 14208, 13, ...
2.084778
3,114
''' This file is automatically generated; Do not edit it. :) ''' VERSION_INFO = { 'final': True, 'version': '1.14.0.post1', 'branch_nick': 'patch-0-Release_procedure_fix', 'revision_id': 'e8d709d6a275dd81c673edec4e1229bac0de1a99', 'revno': 5642 }
[ 198, 7061, 6, 198, 1212, 2393, 318, 6338, 7560, 26, 2141, 407, 4370, 340, 13, 14373, 198, 7061, 6, 198, 43717, 62, 10778, 796, 1391, 198, 220, 220, 220, 705, 20311, 10354, 6407, 11, 198, 220, 220, 220, 705, 9641, 10354, 705, 16, 1...
2.16129
124
import datetime import enum import typing import warnings from contextlib import contextmanager from types import TracebackType from .__version__ import __version__ from ._auth import Auth, BasicAuth, FunctionAuth from ._compat import asynccontextmanager from ._config import ( DEFAULT_LIMITS, DEFAULT_MAX_REDIR...
[ 11748, 4818, 8079, 198, 11748, 33829, 198, 11748, 19720, 198, 11748, 14601, 198, 6738, 4732, 8019, 1330, 4732, 37153, 198, 6738, 3858, 1330, 34912, 1891, 6030, 198, 198, 6738, 764, 834, 9641, 834, 1330, 11593, 9641, 834, 198, 6738, 47540,...
2.29254
14,357
import pickle import pandas as pd import os import io import requests alpha_vantage_url = 'https://www.alphavantage.co/query?' \ 'function=TIME_SERIES_DAILY&symbol={}&outputsize=full&apikey={}&datatype=csv'
[ 11748, 2298, 293, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 28686, 198, 11748, 33245, 198, 11748, 7007, 198, 198, 26591, 62, 38815, 62, 6371, 796, 705, 5450, 1378, 2503, 13, 17307, 615, 36403, 13, 1073, 14, 22766, 8348, 3467, ...
2.641975
81
# Configures some of the install files for denarii. # This assumes that denarii has been cloned into your %HOMEDRIVE%%HOMEPATH% repository. # To see what that is try 'printenv HOMEDRIVE' and 'printenve HOMEPATH' # This is only for windows import argparse import glob import os import pathlib import platform import re i...
[ 2, 17056, 942, 617, 286, 262, 2721, 3696, 329, 2853, 2743, 72, 13, 198, 2, 770, 18533, 326, 2853, 2743, 72, 468, 587, 537, 12004, 656, 534, 4064, 39, 2662, 1961, 49, 9306, 16626, 39, 2662, 8905, 12599, 4, 16099, 13, 198, 2, 1675, ...
2.7431
471
from tkinter import * from tkinter import ttk import tkinter as tk import json import requests from tkinter import messagebox jiemian = Tk() jiemian.title("登录小助手") a, b = jiemian_info() jiemian.geometry("300x150+%d+%d" % (a, b)) urll = 'http://192.168.18.38:8073/login' Label(jiemian, text="用户:").place(x=55, ...
[ 6738, 256, 74, 3849, 1330, 1635, 201, 198, 6738, 256, 74, 3849, 1330, 256, 30488, 201, 198, 11748, 256, 74, 3849, 355, 256, 74, 201, 198, 11748, 33918, 201, 198, 11748, 7007, 201, 198, 6738, 256, 74, 3849, 1330, 3275, 3524, 201, 198...
1.739211
1,622
from . import analysis
[ 6738, 764, 1330, 3781 ]
5.5
4
# test_netdb.py - Test netdb.py # Author: Chris Barry <chris@barry.im> # License: MIT # Note: this uses py.test. import netdb,os,random ''' def test_inspect(): netdb.inspect() ''' # TODO: test_entry* # Make some garbage files and hope they break things.
[ 2, 1332, 62, 3262, 9945, 13, 9078, 532, 6208, 2010, 9945, 13, 9078, 198, 2, 6434, 25, 5180, 14488, 1279, 354, 2442, 31, 5657, 563, 13, 320, 29, 198, 2, 13789, 25, 17168, 198, 198, 2, 5740, 25, 428, 3544, 12972, 13, 9288, 13, 198...
2.626263
99
import cv2 import numpy as np import os import time if __name__=="__main__" : for i in range(1000) : list = np.loadtxt('dataset/eyesPos.csv', dtype='int', delimiter=',') box_info = list[i][1:] imgshow(i, box_info)
[ 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 640, 198, 198, 361, 11593, 3672, 834, 855, 1, 834, 12417, 834, 1, 1058, 628, 220, 220, 220, 329, 1312, 287, 2837, 7, 12825, 8, 1058, 628, 220, ...
2.218182
110
# -*- coding: utf-8 -*- """ directors services module. """ from pyrin.application.services import get_component from charma.persons.directors import DirectorsPackage def register_hook(instance): """ registers the given instance into director hooks. :param DirectorHookBase instance: director hook instan...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 12942, 669, 2594, 8265, 13, 198, 37811, 198, 198, 6738, 279, 2417, 259, 13, 31438, 13, 30416, 1330, 651, 62, 42895, 198, 198, 6738, 1149, 2611, 13, 19276, ...
2.690351
1,140
print(list(fun(5)))
[ 198, 4798, 7, 4868, 7, 12543, 7, 20, 22305 ]
2.222222
9
import os import glob import pandas as pd import io import xml.etree.ElementTree as ET import argparse def convert(size: tuple, box: list): """Takes as input: (width, height) of an image (xmin, ymin, xmax, ymax) of the bounding box and returns (x, y, w, h) of the bounding ...
[ 11748, 28686, 201, 198, 11748, 15095, 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 11748, 33245, 201, 198, 11748, 35555, 13, 316, 631, 13, 20180, 27660, 355, 12152, 201, 198, 11748, 1822, 29572, 201, 198, 201, 198, 4299, 10385, ...
1.9625
1,040
# Copyright (c) 2012 The Khronos Group Inc. # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and /or associated documentation files (the "Materials "), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publi...
[ 2, 15069, 357, 66, 8, 2321, 383, 5311, 1313, 418, 4912, 3457, 13, 201, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 286, 428, 3788, 290, 1220, 273, 3917, 10314, 3696, 357, 1169, ...
1.951429
12,662
import dataclasses import datetime import typing from pycspr.types.cl import CLType from pycspr.types.cl import CLTypeInfo # Domain type: chain name. ChainName = typing.NewType("Simple chain identifer", str) # Domain type: output of a hashing function. ContractHash = typing.NewType("32 byte array emitted by a hashi...
[ 11748, 4818, 330, 28958, 198, 11748, 4818, 8079, 198, 11748, 19720, 198, 198, 6738, 12972, 6359, 1050, 13, 19199, 13, 565, 1330, 7852, 6030, 198, 6738, 12972, 6359, 1050, 13, 19199, 13, 565, 1330, 7852, 6030, 12360, 628, 198, 2, 20021, ...
3.480241
1,493
__author__ = "Junhee Yoon" __version__ = "1.0.0" __maintainer__ = "Junhee Yoon" __email__ = "swiri021@gmail.com" """ Description: This code cleans normalized matrix which contains informal Ensembl ID as index and columns with informal string, and it takes care of duplications of Ensembl IDs. After doing this code, R/...
[ 834, 9800, 834, 796, 366, 22396, 21067, 575, 2049, 1, 198, 834, 9641, 834, 796, 366, 16, 13, 15, 13, 15, 1, 198, 834, 76, 2913, 10613, 834, 796, 366, 22396, 21067, 575, 2049, 1, 198, 834, 12888, 834, 796, 366, 2032, 14783, 46821, ...
2.684136
706