content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import numpy as np import torch.nn as nn from torch.nn.modules.loss import _Loss from torch.optim.optimizer import Optimizer import torch.optim as optim
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 28034, 13, 20471, 13, 18170, 13, 22462, 1330, 4808, 43, 793, 198, 6738, 28034, 13, 40085, 13, 40085, 7509, 1330, 30011, 7509, 198, 11748, 28034, 13, ...
3.285714
49
"""Compute correlation between access history and next prefetch, using load traces. Need to run from above corr/ directory. If you still get an error, try export PYTHONPATH=. """ import argparse import time from utils.load import get_open_function from utils.load_trace import get_instructions from utils.logging impor...
[ 37811, 7293, 1133, 16096, 1022, 1895, 2106, 290, 1306, 7694, 7569, 11, 198, 3500, 3440, 20675, 13, 198, 198, 23037, 284, 1057, 422, 2029, 1162, 81, 14, 8619, 13, 1002, 345, 991, 651, 281, 4049, 11, 198, 28311, 10784, 350, 56, 4221, ...
2.709817
927
import argparse import os from typing import Iterable, Tuple, List, Optional from .module_definition import Module, Method, ParameterDocumentation from .module_definition.exceptions import MockGeneratorError from .util import CodeBuilder, TemplateFormatter, read_lines if __name__ == '__main__': main()
[ 11748, 1822, 29572, 198, 11748, 28686, 198, 6738, 19720, 1330, 40806, 540, 11, 309, 29291, 11, 7343, 11, 32233, 198, 198, 6738, 764, 21412, 62, 46758, 1330, 19937, 11, 11789, 11, 25139, 2357, 24941, 341, 198, 6738, 764, 21412, 62, 46758...
3.625
88
""" Copyright 2017-present, Airbnb Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, sof...
[ 37811, 198, 15269, 2177, 12, 25579, 11, 35079, 3457, 13, 198, 198, 26656, 15385, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 5832, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13,...
2.248115
6,630
""" Implements the global range check used in the EN quality control system. """ def test(p, parameters): """ Runs the quality control check on profile p and returns a numpy array of quality control decisions with False where the data value has passed the check and True where it failed. """ ...
[ 37811, 220, 198, 3546, 1154, 902, 262, 3298, 2837, 2198, 973, 287, 262, 12964, 3081, 1630, 220, 198, 10057, 13, 220, 198, 37811, 198, 198, 4299, 1332, 7, 79, 11, 10007, 2599, 198, 220, 220, 220, 37227, 220, 198, 220, 220, 220, 44743...
3.025381
197
import logging import threading import time module_logger = logging.getLogger(__name__) __all__ = ["iterativeRun", "Pause", "PausableThread", "PausableThreadCallback"] def iterativeRun(run_fn): """ A decorator for running functions repeatedly inside a PausableThread. Allows one to pause and stop the thre...
[ 11748, 18931, 198, 11748, 4704, 278, 198, 11748, 640, 198, 198, 21412, 62, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 198, 198, 834, 439, 834, 796, 14631, 2676, 876, 10987, 1600, 366, 49991, 1600, 366, 47, ...
2.32872
2,023
#!/bin/env python3 """ If gene name is simply totally missing, use the gene ID for the gene name. (Don't confuse this with the case in which there is actualy a gene name embeded in the gene id, for which you would want to use the utility 'extract_name_embedded_in_gene_id.py'.) """ import argparse import gtfez # co...
[ 2, 48443, 8800, 14, 24330, 21015, 18, 198, 37811, 198, 1532, 9779, 1438, 318, 2391, 6635, 4814, 11, 779, 262, 9779, 4522, 329, 262, 9779, 1438, 13, 198, 7, 3987, 470, 27531, 428, 351, 262, 1339, 287, 543, 612, 318, 4036, 88, 257, ...
3.151515
132
from model.Control import Control from model.Sensor import Sensor from apscheduler.schedulers.background import BackgroundScheduler # The "apscheduler." prefix is hard coded scheduler = BackgroundScheduler({ 'apscheduler.executors.default': { 'class': 'apscheduler.executors.pool:ThreadPoolExecutor', ...
[ 6738, 2746, 13, 15988, 1330, 6779, 198, 6738, 2746, 13, 47864, 1330, 35367, 198, 6738, 257, 862, 1740, 18173, 13, 1416, 704, 377, 364, 13, 25249, 1330, 25353, 50, 1740, 18173, 628, 198, 2, 383, 366, 499, 1416, 704, 18173, 526, 21231, ...
2.1344
625
import sys import os size = os.get_terminal_size() rows, cols = size.lines, size.columns data_to_add = b'Hello, world!' data = bytes((rows * cols) * b' ') data = data_to_add + data[len(data_to_add) : ] for row in range(rows): start = row * cols end = start + cols write(str(data[start : end], 'utf-8')) write('\n...
[ 11748, 25064, 198, 11748, 28686, 198, 198, 7857, 796, 28686, 13, 1136, 62, 23705, 282, 62, 7857, 3419, 198, 8516, 11, 951, 82, 796, 2546, 13, 6615, 11, 2546, 13, 28665, 82, 198, 198, 7890, 62, 1462, 62, 2860, 796, 275, 6, 15496, 1...
2.41791
134
from __future__ import unicode_literals from builtins import super import numpy as np from django.db import models from django.urls import reverse from django.utils.text import slugify # what this moddule does is displaying the price median price, minunum and maximum price and displaying the companies that offer the...
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 3170, 1040, 1330, 2208, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 957...
3.659836
244
from __future__ import print_function from os import path from blazeweb.config import DefaultSettings basedir = path.dirname(path.dirname(__file__)) app_package = path.basename(basedir)
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 28686, 1330, 3108, 198, 198, 6738, 698, 1031, 413, 1765, 13, 11250, 1330, 15161, 26232, 198, 198, 3106, 343, 796, 3108, 13, 15908, 3672, 7, 6978, 13, 15908, 3672, 7, 834, 7753,...
3.177419
62
import urllib2
[ 11748, 2956, 297, 571, 17, 628 ]
2.666667
6
lines = [] with open('Time.txt') as f: lines = f.readlines() f.close() total_lines = len(lines) TimeTakenInDays = dict() DifficultLevelInEachDays = dict() day = 1 for index in range(total_lines): if(index!=0): difficultLevel, Time = lines[index].split(" ") TimeTakenInDays["Day "+str(day-1)] = ...
[ 6615, 796, 17635, 198, 4480, 1280, 10786, 7575, 13, 14116, 11537, 355, 277, 25, 198, 220, 220, 220, 3951, 796, 277, 13, 961, 6615, 3419, 198, 69, 13, 19836, 3419, 198, 198, 23350, 62, 6615, 796, 18896, 7, 6615, 8, 198, 198, 7575, ...
2.144412
1,378
from os import environ from loguru import logger from sentry_sdk import capture_exception
[ 6738, 28686, 1330, 551, 2268, 198, 198, 6738, 2604, 14717, 1330, 49706, 198, 6738, 1908, 563, 62, 21282, 74, 1330, 8006, 62, 1069, 4516, 628, 198 ]
3.576923
26
from datetime import datetime from flask_login import current_user from flask_wtf import FlaskForm from sqlalchemy import asc, or_ from wtforms import StringField, FloatField, SelectField, PasswordField, TextAreaField, HiddenField from wtforms.validators import DataRequired, Length, Regexp, InputRequired, ValidationEr...
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 6738, 42903, 62, 38235, 1330, 1459, 62, 7220, 198, 6738, 42903, 62, 86, 27110, 1330, 46947, 8479, 198, 6738, 44161, 282, 26599, 1330, 10570, 11, 393, 62, 198, 6738, 266, 83, 23914, 1330, 1...
3.302721
294
from datetime import datetime from django.db import models from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic from django.contrib.auth.models import User, Group from django.utils.translation import ugettext_lazy as _ from authority.managers import PermissionManag...
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 11299, 19199, 13, 27530, 1330, 14041, 6030, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 11299, 19199, 1330, 1...
3.285448
536
import unittest from classes import * if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 6097, 1330, 1635, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 198 ]
2.69697
33
import time import numpy as np
[ 11748, 640, 198, 11748, 299, 32152, 355, 45941, 198 ]
3.444444
9
# Copyright (c) OpenMMLab. All rights reserved. import numpy as np from mmcv.utils import print_log from mmdet.datasets.builder import DATASETS from mmdet.datasets.pipelines import Compose from torch.utils.data import Dataset from mmocr.datasets.builder import build_loader @DATASETS.register_module() class BaseDatas...
[ 2, 15069, 357, 66, 8, 4946, 44, 5805, 397, 13, 1439, 2489, 10395, 13, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 8085, 33967, 13, 26791, 1330, 3601, 62, 6404, 198, 6738, 8085, 15255, 13, 19608, 292, 1039, 13, 38272, 1330, 360, 1...
2.161365
2,169
from dataclasses import dataclass, field from typing import TYPE_CHECKING, List, Optional, Tuple if TYPE_CHECKING: from .file import HashFile ADD = "add" MODIFY = "modify" DELETE = "delete" UNCHANGED = "unchanged" @dataclass @dataclass @dataclass ROOT = ("",)
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 11, 2214, 198, 6738, 19720, 1330, 41876, 62, 50084, 2751, 11, 7343, 11, 32233, 11, 309, 29291, 198, 198, 361, 41876, 62, 50084, 2751, 25, 198, 220, 220, 220, 422, 764, 7753, 1330, 21059,...
2.669903
103
import io import re from setuptools import find_packages, setup with io.open("int_rew/__init__.py", "rt", encoding="utf8") as f: version = re.search(r"__version__ = \"(.*?)\"", f.read()).group(1) setup( name="intrinsic_rewards", version=version, url="https://github.com/kngwyu/intrinsic_rewards", ...
[ 11748, 33245, 198, 11748, 302, 198, 198, 6738, 900, 37623, 10141, 1330, 1064, 62, 43789, 11, 9058, 198, 198, 4480, 33245, 13, 9654, 7203, 600, 62, 1809, 14, 834, 15003, 834, 13, 9078, 1600, 366, 17034, 1600, 21004, 2625, 40477, 23, 49...
2.54
450
# Generated by Django 3.1.2 on 2020-10-17 14:58 import django.contrib.gis.db.models.fields from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 17, 319, 12131, 12, 940, 12, 1558, 1478, 25, 3365, 198, 198, 11748, 42625, 14208, 13, 3642, 822, 13, 70, 271, 13, 9945, 13, 27530, 13, 25747, 198, 6738, 42625, 14208, 13, 9945, 1330, 1572...
2.783333
60
import chorecore
[ 11748, 30569, 7295, 628 ]
4.5
4
# Desafio069 quantas pessoas tem mais de 18, quantos homens, quantas mulheres com menos de 20. maiorDeIdade = int() homens = int() mulheresMenor = int() while True: idade = int(input('Qual a idade? ')) sexo = input('M para masculino, e F para feminino ').strip().lower() if idade > 18: maiorDeIdad...
[ 2, 2935, 1878, 952, 3312, 24, 5554, 292, 279, 408, 78, 292, 2169, 285, 15152, 390, 1248, 11, 5554, 418, 3488, 641, 11, 5554, 292, 35971, 19079, 401, 1450, 418, 390, 1160, 13, 628, 198, 2611, 1504, 5005, 7390, 671, 796, 493, 3419, ...
2.261538
325
import builtins import sys import unittest import hebrew_python.hook as hepy from io import StringIO from contextlib import contextmanager import re # for debug the test: true_stdout = sys.stdout true_stderr = sys.stderr DEBUG = False if DEBUG: from ddebug import dd dd.add_output_folder(with_errors=False) tr...
[ 11748, 3170, 1040, 198, 11748, 25064, 198, 11748, 555, 715, 395, 198, 198, 11748, 339, 11269, 62, 29412, 13, 25480, 355, 339, 9078, 198, 6738, 33245, 1330, 10903, 9399, 198, 6738, 4732, 8019, 1330, 4732, 37153, 198, 11748, 302, 198, 2, ...
2.9375
160
# Your LRUCache object will be instantiated and called as such: # obj = LRUCache(capacity) # param_1 = obj.get(key) # obj.put(key,value)
[ 201, 198, 2, 3406, 37491, 9598, 4891, 2134, 481, 307, 9113, 12931, 290, 1444, 355, 884, 25, 201, 198, 2, 26181, 796, 37491, 9598, 4891, 7, 42404, 8, 201, 198, 2, 5772, 62, 16, 796, 26181, 13, 1136, 7, 2539, 8, 201, 198, 2, 26181...
2.711538
52
# python code for KMTNET data astrometry (specially CTIO data) # read kmtnet_astrom.txt first to understand the order and process # 2015.09.17 Changsu Choi from astropy.io import ascii import numpy as np import os,sys from astropy.io import fits import astropy.units as u import astropy.coordinates as coord import ast...
[ 2, 21015, 2438, 329, 509, 13752, 12884, 1366, 6468, 398, 11973, 357, 82, 2333, 16356, 9399, 1366, 8, 198, 2, 1100, 10571, 83, 3262, 62, 459, 398, 13, 14116, 717, 284, 1833, 262, 1502, 290, 1429, 198, 2, 1853, 13, 2931, 13, 1558, 2...
2.301087
920
# coding=utf-8 """Command line processing""" import argparse from sksurgeryspeech import __version__ from sksurgeryspeech.ui import sksurgeryspeech_demo def main(args=None): """Entry point for scikit-surgeryspeech application""" parser = argparse.ArgumentParser(description='scikit-surgeryspeech') ver...
[ 2, 19617, 28, 40477, 12, 23, 198, 198, 37811, 21575, 1627, 7587, 37811, 628, 198, 11748, 1822, 29572, 198, 6738, 264, 591, 32650, 893, 431, 3055, 1330, 11593, 9641, 834, 198, 6738, 264, 591, 32650, 893, 431, 3055, 13, 9019, 1330, 264,...
2.646302
311
import numpy as np import pandas as pd import torch from torch import nn from torch.utils.data import TensorDataset,DataLoader X = np.random.normal(5,2,(10000,30)) Y = X@np.random.normal(1,2,30) model = NeuralNetwork( configuration= nn.Sequential( nn.Linear(30,10), ...
[ 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 28034, 198, 6738, 28034, 1330, 299, 77, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 309, 22854, 27354, 292, 316, 11, 6601, 17401, 198, 220, 220, 22...
2.018608
1,236
# Auto generated by generator.py. Delete this line if you make modification. from scrapy.spiders import Rule from scrapy.linkextractors import LinkExtractor XPATH = { 'name' : "//div[@class='mo-ta']/p[1]", 'price' : "//span[@class='item_price']", 'category' : "//div[@class='tieu-de']/h1/a", 'descriptio...
[ 2, 11160, 7560, 416, 17301, 13, 9078, 13, 23520, 428, 1627, 611, 345, 787, 17613, 13, 198, 6738, 15881, 88, 13, 2777, 4157, 1330, 14330, 198, 6738, 15881, 88, 13, 2815, 365, 742, 974, 669, 1330, 7502, 11627, 40450, 198, 198, 27481, ...
2.297362
417
from time import time from tdw.controller import Controller from tdw.tdw_utils import TDWUtils """ Benchmark the speed of deserializing structs (such as Vector3 and Quaternion). """ if __name__ == "__main__": o_id = 0 cmds = [{"$type": "teleport_object", "position": {"x": 0, "y": 0, "z": 0}, ...
[ 6738, 640, 1330, 640, 198, 6738, 41560, 86, 13, 36500, 1330, 22741, 198, 6738, 41560, 86, 13, 8671, 86, 62, 26791, 1330, 13320, 54, 18274, 4487, 628, 198, 37811, 198, 44199, 4102, 262, 2866, 286, 748, 48499, 2890, 2878, 82, 357, 10508...
2.051597
407
import numpy as np q=__ l=__ x = np.linspace(0,l,__) M = q/2*(l*x-x**2) V = q*(1/2-x) print("Moment") print(__) print("Shear") print(__)
[ 11748, 299, 32152, 355, 45941, 198, 198, 80, 28, 834, 220, 198, 75, 28, 834, 198, 198, 87, 796, 45941, 13, 21602, 10223, 7, 15, 11, 75, 11, 834, 8, 198, 198, 44, 796, 10662, 14, 17, 9, 7, 75, 9, 87, 12, 87, 1174, 17, 8, 19...
1.719512
82
from datetime import datetime, timedelta from collections import defaultdict from flask import render_template, request from flask.ext.login import login_required from ybk.models import Collection from ybk.settings import get_conf from .views import frontend @frontend.route('/calendar/') @login_required
[ 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 6738, 17268, 1330, 4277, 11600, 198, 198, 6738, 42903, 1330, 8543, 62, 28243, 11, 2581, 198, 6738, 42903, 13, 2302, 13, 38235, 1330, 17594, 62, 35827, 198, 198, 6738, 331, 65, ...
3.690476
84
for c in range(1, 50): print(c, ":", fibonacci(c))
[ 198, 1640, 269, 287, 2837, 7, 16, 11, 2026, 2599, 198, 220, 220, 220, 3601, 7, 66, 11, 366, 25, 1600, 12900, 261, 44456, 7, 66, 4008, 198 ]
2
28
# # This is the code for plotting the figures for RQ1. It is optimized towards plotting exactly those figures # Use data_analysis.py for explorative data analysis # import matplotlib matplotlib.rcParams['pdf.fonttype'] = 42 matplotlib.rcParams['ps.fonttype'] = 42 from plotting_utils import load_data_from_folder, creat...
[ 2, 198, 2, 770, 318, 262, 2438, 329, 29353, 262, 5538, 329, 371, 48, 16, 13, 632, 318, 23392, 3371, 29353, 3446, 883, 5538, 198, 2, 5765, 1366, 62, 20930, 13, 9078, 329, 1193, 36478, 1366, 3781, 198, 2, 198, 11748, 2603, 29487, 80...
3.042683
164
# -*- coding: utf-8 -*- # Example code for telegrambot.py module from telegram.ext import CommandHandler, MessageHandler, Filters from django_telegrambot.apps import DjangoTelegramBot import logging logger = logging.getLogger(__name__) # Define a few command handlers. These usually take the two arguments bot and # u...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 17934, 2438, 329, 573, 30536, 13645, 13, 9078, 8265, 198, 6738, 573, 30536, 13, 2302, 1330, 9455, 25060, 11, 16000, 25060, 11, 7066, 1010, 198, 6738, 42625, 14208, 62...
3.59292
113
import os import dlib from pathlib import Path root_path = Path(__file__).parent landmarks_model_path = os.path.join(root_path, 'shape_predictor_68_face_landmarks.dat') landmarks_detector = LandmarksDetector(landmarks_model_path)
[ 11748, 28686, 201, 198, 11748, 288, 8019, 201, 198, 6738, 3108, 8019, 1330, 10644, 201, 198, 15763, 62, 6978, 796, 10644, 7, 834, 7753, 834, 737, 8000, 201, 198, 201, 198, 201, 198, 201, 198, 1044, 14306, 62, 19849, 62, 6978, 796, 2...
2.688889
90
import os import rnnSMAP import matplotlib import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import imp imp.reload(rnnSMAP) rnnSMAP.reload() figTitleLst = ['Temporal Test', 'Spatial Test'] figNameLst = ['temporal', 'spatial'] matplotlib.rcParams.update({'font.size': 14}) matplotlib.rcParams.upda...
[ 11748, 28686, 198, 11748, 374, 20471, 12310, 2969, 198, 11748, 2603, 29487, 8019, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 2603, 29487, 8019, 13, 2164, 2340, 43106, 355, 50000, 43106, 198, 198, 11748, 848,...
2.027938
2,076
import pandas as pd import geopandas as gpd import re import textdistance import numpy as np import math if __name__ == "__main__": main()
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 30324, 392, 292, 355, 27809, 67, 198, 11748, 302, 198, 11748, 2420, 30246, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 10688, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, ...
3
48
from setuptools import setup setup(install_requires=open("requirements.txt").readlines())
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 40406, 7, 17350, 62, 47911, 28, 9654, 7203, 8897, 18883, 13, 14116, 11074, 961, 6615, 28955, 198 ]
3.64
25
# This script handles the SIP configuration and generates the Makefiles. # # Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com> # # This file is part of SIP. # # This copy of SIP is licensed for use under the terms of the SIP License # Agreement. See the file LICENSE for more details. # # Thi...
[ 2, 770, 4226, 17105, 262, 311, 4061, 8398, 290, 18616, 262, 6889, 16624, 13, 198, 2, 198, 2, 15069, 357, 66, 8, 13130, 5866, 17796, 38589, 15302, 1279, 10951, 31, 38291, 17796, 785, 48074, 13, 785, 29, 198, 2, 198, 2, 770, 2393, 3...
2.165177
15,995
import pytest from stix2patterns.pattern import ParseException from stix2matcher.matcher import match _observations = [ { "type": "observed-data", "first_observed": "2004-10-11T21:44:58Z", "last_observed": "2004-10-11T21:44:58Z", "number_observed": 1, "objects": { ...
[ 11748, 12972, 9288, 198, 6738, 336, 844, 17, 33279, 82, 13, 33279, 1330, 2547, 325, 16922, 198, 198, 6738, 336, 844, 17, 6759, 2044, 13, 6759, 2044, 1330, 2872, 198, 198, 62, 672, 3168, 602, 796, 685, 198, 220, 220, 220, 1391, 198, ...
1.859694
392
#reference: https://www.tutorialspoint.com/python/python_database_access.htm import MySQLdb as mysqldb if __name__ == '__main__': store_reldb()
[ 2, 35790, 25, 3740, 1378, 2503, 13, 83, 44917, 2777, 1563, 13, 785, 14, 29412, 14, 29412, 62, 48806, 62, 15526, 13, 19211, 198, 198, 11748, 33476, 9945, 355, 616, 31166, 335, 65, 198, 220, 220, 220, 220, 198, 361, 11593, 3672, 834, ...
2.566667
60
import json from typing import Any, Dict from ..request import Request from ..response import Response from ..router import Router router = Router() @router.get("/users/{user_id}")
[ 11748, 33918, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 198, 198, 6738, 11485, 25927, 1330, 19390, 198, 6738, 11485, 26209, 1330, 18261, 198, 6738, 11485, 472, 353, 1330, 48538, 198, 198, 472, 353, 796, 48538, 3419, 628, 198, 31, 472,...
3.381818
55
import os filename = os.path.join(os.getcwd(), "data.json") # f = open(filename) with open(filename, mode="w") as f: print("name :", f.name) print("mode :", f.mode) print("buffer :", f.buffer) print("encoding :", f.encoding) print("closed :", f.closed) print("errors :", f.errors) ...
[ 11748, 28686, 201, 198, 201, 198, 34345, 796, 28686, 13, 6978, 13, 22179, 7, 418, 13, 1136, 66, 16993, 22784, 366, 7890, 13, 17752, 4943, 201, 198, 201, 198, 2, 277, 796, 1280, 7, 34345, 8, 201, 198, 4480, 1280, 7, 34345, 11, 4235...
2.317881
151
#!/usr/bin/env python3 from setuptools import setup setup( name='notcologger', version='0.1.2', description='Not CO Logger, a cloud logging library.', long_description= '''This library is aimed at helping produce consistent searchable log entries to stdout in a cloud/container environment.''', k...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 628, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 1662, 66, 928, 1362, 3256, 198, 220, 220, 220, 2196, 11639, 15, 13, 16, 13, 17, 3...
2.644886
352
from tensorflow import keras from .tf_base import KerasVectorRegressionModel from .. import normalisation
[ 6738, 11192, 273, 11125, 1330, 41927, 292, 198, 198, 6738, 764, 27110, 62, 8692, 1330, 17337, 292, 38469, 8081, 2234, 17633, 198, 6738, 11485, 1330, 3487, 5612, 628, 628 ]
3.793103
29
#!/usr/bin/env python from __future__ import print_function import sys from PyAnalysisTools.base import get_default_argparser, default_init from PyAnalysisTools.base.YAMLHandle import YAMLLoader, YAMLDumper from PyAnalysisTools.AnalysisTools.XSHandle import Dataset if __name__ == '__main__': main(sys.argv[1:]...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 25064, 198, 198, 6738, 9485, 32750, 33637, 13, 8692, 1330, 651, 62, 12286, 62, 853, 48610, 11, 4277, 62, 15003, 198...
2.954128
109
from nuclear import * from nuclear.parser.error import CliDefinitionError from tests.asserts import MockIO, assert_error from functools import reduce import base64 cli = CliBuilder() @cli.add_command('hello') def say_hello(name: str, decode: bool = False, repeat: int = 1): """ Say hello to someone :para...
[ 6738, 4523, 1330, 1635, 198, 6738, 4523, 13, 48610, 13, 18224, 1330, 1012, 72, 36621, 12331, 198, 6738, 5254, 13, 30493, 82, 1330, 44123, 9399, 11, 6818, 62, 18224, 198, 6738, 1257, 310, 10141, 1330, 4646, 198, 11748, 2779, 2414, 628, ...
2.529976
417
# -*- coding: utf-8 -*- # Generated by Django 1.10.7 on 2017-08-22 18:16 from __future__ import unicode_literals from django.db import migrations, models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 940, 13, 22, 319, 2177, 12, 2919, 12, 1828, 1248, 25, 1433, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.736842
57
n = int(input()) for i in range(0, n+1): if n % i == 0: print(i)
[ 77, 796, 493, 7, 15414, 28955, 198, 1640, 1312, 287, 2837, 7, 15, 11, 299, 10, 16, 2599, 198, 197, 361, 299, 4064, 1312, 6624, 657, 25, 198, 197, 197, 4798, 7, 72, 8 ]
1.970588
34
# Copyright 2021 Victor Guimarães # # 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 i...
[ 2, 220, 15069, 33448, 12622, 1962, 49399, 26102, 274, 198, 2, 198, 2, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, ...
2.101155
21,818
# Generated by Django 2.0 on 2018-12-07 11:05 from django.conf import settings import django.contrib.postgres.fields import django.contrib.postgres.fields.citext from django.db import migrations, models import django.db.models.deletion import uuid
[ 2, 2980, 515, 416, 37770, 362, 13, 15, 319, 2864, 12, 1065, 12, 2998, 1367, 25, 2713, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 11748, 42625, 14208, 13, 3642, 822, 13, 7353, 34239, 13, 25747, 198, 11748, 42625, 14208, ...
3.04878
82
######################################################################################################################## # # # This file is part of kAIvy ...
[ 29113, 29113, 29113, 14468, 7804, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2...
1.963316
1,363
# -*- coding: utf-8 -*- import os import re import warnings from setuptools.dist import Distribution from setuptools.extension import Extension from pip.commands.wheel import WheelCommand from pip.status_codes import SUCCESS from semantic_version import Spec, Version from .._compat import Path, PY2, encode from ..ut...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 14601, 198, 198, 6738, 900, 37623, 10141, 13, 17080, 1330, 27484, 198, 6738, 900, 37623, 10141, 13, 2302, 3004, 1330, 27995...
2.060839
5,342
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
[ 2, 15069, 2864, 383, 309, 22854, 37535, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, ...
2.292143
8,667
""" * Created by Synerty Pty Ltd * * This software is open source, the MIT license applies. * * Website : http://www.synerty.com * Support : support@synerty.com """ import logging from abc import ABCMeta, abstractmethod from collections import deque from twisted.internet import reactor from twisted.internet.defe...
[ 37811, 198, 1635, 15622, 416, 1632, 1008, 774, 350, 774, 12052, 198, 1635, 198, 1635, 770, 3788, 318, 1280, 2723, 11, 262, 17168, 5964, 8991, 13, 198, 1635, 198, 1635, 15887, 1058, 2638, 1378, 2503, 13, 1837, 1008, 774, 13, 785, 198, ...
3.717514
177
# -*- coding: utf-8 -*- import matplotlib matplotlib.use("Agg")
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 11748, 2603, 29487, 8019, 201, 198, 6759, 29487, 8019, 13, 1904, 7203, 46384, 4943, 201, 198, 201, 198 ]
2.090909
33
import numpy as np import tensorflow as tf from src.etc import audio from src.tac.core.wavenet_vocoder import util from src.tac.core.wavenet_vocoder.models.gaussian import sample_from_gaussian from src.tac.core.wavenet_vocoder.models.mixture import \ sample_from_discretized_mix_logistic from src.tac.core.wavenet_v...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 198, 6738, 12351, 13, 14784, 1330, 6597, 198, 6738, 12351, 13, 83, 330, 13, 7295, 13, 86, 4005, 316, 62, 18893, 12342, 1330, 7736, 198, 6738, 12351, 13, 83...
2.312933
12,124
"""Custom User Model""" from django.contrib.auth.models import AbstractBaseUser, BaseUserManager, \ PermissionsMixin from django.db import models class CustomUserManager(BaseUserManager): """Custom User Manager overridden from BaseUserManager for CustomUser""" def _create_user(self, email, password=None...
[ 37811, 15022, 11787, 9104, 37811, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 27741, 14881, 12982, 11, 7308, 12982, 13511, 11, 3467, 198, 220, 220, 220, 2448, 8481, 35608, 259, 198, 6738, 42625, 14208, 13, 9...
2.889961
518
import torch import torch.nn as nn import torch.nn.functional as F import torchvision import torchvision.transforms as transforms import torchvision.utils import torch.optim as optim from torch.utils.data import DataLoader from tensorboardX import SummaryWriter # for mixed precision import torch.nn.utils as torch_util...
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 11748, 28034, 10178, 198, 11748, 28034, 10178, 13, 7645, 23914, 355, 31408, 198, 11748, 28034, 10178, 13, 26791, 198, 11748,...
3.092308
975
from django.conf.urls import url from tenant_tutorial.views import HomeView urlpatterns = [ url(r'^$', HomeView.as_view()), ]
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 6738, 18285, 62, 83, 44917, 13, 33571, 1330, 5995, 7680, 628, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 19016, 7, 81, 6, 61, 3, 3256, 5995, 7680, 13, 292, 62...
2.64
50
from django.views.generic import ListView, CreateView, DetailView from events.models import Talk from . import forms from . import models
[ 6738, 42625, 14208, 13, 33571, 13, 41357, 1330, 7343, 7680, 11, 13610, 7680, 11, 42585, 7680, 198, 198, 6738, 2995, 13, 27530, 1330, 12167, 198, 6738, 764, 1330, 5107, 198, 6738, 764, 1330, 4981, 628, 628 ]
3.944444
36
from discord.ext import commands from random import choice, shuffle import aiohttp import asyncio import discord import urllib.request, json import random import requests class Funs: """Commandes funs.""" @commands.command() async def avatar(self, ctx, user : discord.Member): """...
[ 6738, 36446, 13, 2302, 1330, 9729, 201, 198, 6738, 4738, 1330, 3572, 11, 36273, 201, 198, 11748, 257, 952, 4023, 201, 198, 11748, 30351, 952, 201, 198, 11748, 36446, 201, 198, 11748, 2956, 297, 571, 13, 25927, 11, 33918, 201, 198, 117...
2.143951
2,612
from django.db import models
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 628 ]
3.75
8
""" Create a Marker table from an AnnData Object. """ from statsmodels.stats.proportion import proportions_ztest from scipy.stats import ttest_ind import pandas as pd import numpy as np from ctwingest.scanpyapi import proportion_expressed_cluster, centroids, get_expression, std_gt_0_genes def scale_centroids(centers,...
[ 37811, 198, 16447, 257, 2940, 263, 3084, 422, 281, 5506, 6601, 9515, 13, 198, 37811, 198, 6738, 9756, 27530, 13, 34242, 13, 1676, 16864, 1330, 23250, 62, 89, 9288, 198, 6738, 629, 541, 88, 13, 34242, 1330, 256, 9288, 62, 521, 198, 1...
2.415846
2,032
################################################################# # Copyright (C) # # 2019 Qiskit Team # # Permission given to modify the code as long as you keep this # # declaration at the top ...
[ 29113, 29113, 2, 198, 2, 15069, 357, 34, 8, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 22...
2.504298
349
import numpy as np, time from keras.models import Model, load_model from keras.layers import Input, BatchNormalization, Activation, Dropout, concatenate from keras.layers.convolutional import Conv2D, Conv2DTranspose, Conv3D, Conv3DTranspose from keras.layers.pooling import MaxPooling2D, GlobalMaxPool2D, MaxPooling3D f...
[ 11748, 299, 32152, 355, 45941, 11, 640, 198, 198, 6738, 41927, 292, 13, 27530, 1330, 9104, 11, 3440, 62, 19849, 198, 6738, 41927, 292, 13, 75, 6962, 1330, 23412, 11, 347, 963, 26447, 1634, 11, 13144, 341, 11, 14258, 448, 11, 1673, 3...
3.101563
128
from django.contrib import admin from . import models admin.site.register(models.Address, AddressAdmin) admin.site.register(models.CreditCard, CreditCardAdmin)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 764, 1330, 4981, 198, 198, 28482, 13, 15654, 13, 30238, 7, 27530, 13, 20231, 11, 17917, 46787, 8, 198, 28482, 13, 15654, 13, 30238, 7, 27530, 13, 23690, 16962, 11, 10504, 1696...
3.577778
45
'''Autogenerated by get_gl_extensions script, do not edit!''' from OpenGL import platform as _p, constants as _cs, arrays from OpenGL.GL import glget import ctypes EXTENSION_NAME = 'GL_ARB_base_instance' @_f @_p.types(None,_cs.GLenum,_cs.GLint,_cs.GLsizei,_cs.GLsizei,_cs.GLuint) @_f @_p.types(None,_cs.GLenum,_cs.GLsiz...
[ 7061, 6, 16541, 519, 877, 515, 416, 651, 62, 4743, 62, 2302, 5736, 4226, 11, 466, 407, 4370, 0, 7061, 6, 198, 6738, 30672, 1330, 3859, 355, 4808, 79, 11, 38491, 355, 4808, 6359, 11, 26515, 198, 6738, 30672, 13, 8763, 1330, 1278, 1...
2.462366
279
import configparser import requests import time import numpy as np from PIL import Image from io import BytesIO import configparser from code import CodeRecognizer from utils import * if __name__ == "__main__": cf = configparser.ConfigParser() cf.read("info.conf") while process_orders(cf): t...
[ 11748, 4566, 48610, 198, 11748, 7007, 198, 11748, 640, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 350, 4146, 1330, 7412, 198, 6738, 33245, 1330, 2750, 4879, 9399, 198, 11748, 4566, 48610, 198, 198, 6738, 2438, 1330, 6127, 6690, 2360, ...
2.938053
113
#!/usr/bin/env python ''' A solution to a ROSALIND bioinformatics problem. Problem Title: Finding a Motif in DNA Rosalind ID: SUBS Rosalind #: 009 URL: http://rosalind.info/problems/subs/ ''' if __name__ == "__main__": main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 7061, 6, 198, 32, 4610, 284, 257, 48263, 1847, 12115, 13401, 259, 18982, 873, 1917, 13, 198, 40781, 11851, 25, 27063, 257, 6543, 361, 287, 7446, 198, 35740, 282, 521, 4522, 25, 13558, ...
2.566667
90
from .wrapper import CDataReader
[ 6738, 764, 48553, 1330, 6458, 1045, 33634 ]
4.571429
7
from django.db import models from .timestamp import TimeStamp # from .user import UserProfile from customer.models import UserProfile from .item import Item
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 6738, 764, 16514, 27823, 1330, 3862, 1273, 696, 198, 2, 422, 764, 7220, 1330, 11787, 37046, 198, 6738, 6491, 13, 27530, 1330, 11787, 37046, 198, 6738, 764, 9186, 1330, 9097, 198 ]
3.95
40
#!/usr/bin/env python import os import random from google.protobuf import text_format from google.protobuf.descriptor import Descriptor, FieldDescriptor from .document_pb2 import Document from dremel.consts import * from dremel.simple import create_simple_storage
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 28686, 198, 11748, 4738, 198, 198, 6738, 23645, 13, 11235, 672, 3046, 1330, 2420, 62, 18982, 198, 6738, 23645, 13, 11235, 672, 3046, 13, 20147, 1968, 273, 1330, 2935, 6519, ...
3.308642
81
print("Way to transform two lists into one dict") purchases = ["rice", "beans", "pasta"] prices = ["2.00", "3.80", "4.90"] new_list = {} # for x in range(len(purchases)): # new_list[purchases[x]] = prices[x] # for id, item in enumerate(compras): # new_list[purchases[id]] = prices[id] new_list = {item: prices...
[ 4798, 7203, 25309, 284, 6121, 734, 8341, 656, 530, 8633, 4943, 198, 198, 79, 2575, 1386, 796, 14631, 20970, 1600, 366, 44749, 1600, 366, 30119, 64, 8973, 198, 1050, 1063, 796, 14631, 17, 13, 405, 1600, 366, 18, 13, 1795, 1600, 366, ...
2.468208
173
'''Plotting Utility. Grad-CAM implementation in Pytorch Reference: [1] xyz [2] xyz ''' import matplotlib.pyplot as plt import numpy as np import torch def denormalize(tensor, mean, std): """Denormalize the image for given mean and standard deviation. Args: tensor: Image tensor mean: Dataset...
[ 7061, 6, 43328, 889, 34030, 13, 198, 198, 42731, 12, 34, 2390, 7822, 287, 9485, 13165, 354, 198, 198, 26687, 25, 198, 58, 16, 60, 2124, 45579, 198, 58, 17, 60, 2124, 45579, 198, 7061, 6, 198, 198, 11748, 2603, 29487, 8019, 13, 907...
2.242
500
# coding:utf-8 import os import subprocess if __name__ == "__main__": j = JavaImage(codeDir=os.path.abspath(os.curdir), shell_file="javapack.sh", imageTag="harbor.dev.21vianet.com/cmdb/cmdb_javatopo:latest") j.begin() # print()
[ 2, 19617, 25, 40477, 12, 23, 198, 11748, 28686, 198, 11748, 850, 14681, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 474, 796, 7349, 5159, 7, 8189, 35277, 28, 418, 13, 6978, 13, 397, ...
2.071429
126
from django import forms from uploads.core.models import Document #from uploads.core.models import File # 創造一個依照model的form,會繼承欄位description document # class FileForm(forms.ModelForm): # class Meta: # model = File # fields = ('filename',) # file = forms.FileField() # pid = forms.CharField(...
[ 6738, 42625, 14208, 1330, 5107, 198, 198, 6738, 9516, 82, 13, 7295, 13, 27530, 1330, 16854, 198, 2, 6738, 9516, 82, 13, 7295, 13, 27530, 1330, 9220, 198, 198, 2, 10263, 231, 113, 34460, 254, 31660, 161, 222, 233, 160, 122, 251, 163,...
2.47205
322
import pandas as pd import numpy as np import matplotlib.pyplot as plt pathway_file = '../../drp-data/pathways/9606.enrichr_pathway.edge' pathway = pd.read_csv(pathway_file, sep='\t', header=None) print("pathways:", pathway[0].nunique()) print("pathway genes:", pathway[1].nunique()) gsc_filtered = '../../KnowEng_GSC...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 628, 198, 6978, 1014, 62, 7753, 796, 705, 40720, 40720, 7109, 79, 12, 7890, 14, 6978, 1322, 14, 24, 3...
2.210276
2,316
import os import platform if(platform.system() == 'Windows'): FILENAME = 'terminateFile.bat' elif(platform.system() == 'Linux'): FILENAME = 'idle.sh' TIME = 900 PATH = os.getcwd() # print(platform.system())
[ 11748, 28686, 198, 11748, 3859, 198, 198, 361, 7, 24254, 13, 10057, 3419, 6624, 705, 11209, 6, 2599, 198, 220, 220, 220, 34020, 1677, 10067, 796, 705, 23705, 378, 8979, 13, 8664, 6, 198, 417, 361, 7, 24254, 13, 10057, 3419, 6624, 70...
2.654321
81
import sys import numpy as np import itertools import deeptrack as dt import pytest u = dt.units @pytest.mark.parametrize( "size,gpu", [ *itertools.product( (64, 256, 512), [True, False], ) ], )
[ 11748, 25064, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 340, 861, 10141, 198, 11748, 390, 19598, 39638, 355, 288, 83, 198, 11748, 12972, 9288, 628, 198, 84, 796, 288, 83, 13, 41667, 628, 198, 198, 31, 9078, 9288, 13, 4102, 13, ...
1.953488
129
# helper functions for Euca2ools import subprocess import os import time
[ 2, 31904, 5499, 329, 412, 43120, 17, 10141, 198, 198, 11748, 850, 14681, 198, 11748, 28686, 198, 11748, 640, 198 ]
3.7
20
"""ClaudiusIrae song logic.""" import OSC from Psc2.songs import song from Psc2.modes import bass_doubler from Psc2.modes import looper class ClaudiusIrae(song.Song): """This defines the logic for ClaudiusIrae. For most of the song it is in bass-doubling mode, except for the solo section where the bass is aut...
[ 37811, 2601, 3885, 3754, 40, 430, 68, 3496, 9156, 526, 15931, 198, 198, 11748, 440, 6173, 198, 198, 6738, 350, 1416, 17, 13, 82, 28079, 1330, 3496, 198, 6738, 350, 1416, 17, 13, 76, 4147, 1330, 12702, 62, 67, 12944, 1754, 198, 6738,...
2.02439
861
import random from emulators.Device import Device from emulators.Medium import Medium from emulators.MessageStub import MessageStub # We extend the MessageStub here for the message-types we wish to communicate # the constructor-function takes the source and destination as arguments. These are used for "routing"...
[ 11748, 4738, 198, 198, 6738, 795, 24325, 13, 24728, 1330, 16232, 198, 6738, 795, 24325, 13, 31205, 1330, 13398, 198, 6738, 795, 24325, 13, 12837, 1273, 549, 1330, 16000, 1273, 549, 628, 198, 2, 775, 9117, 262, 16000, 1273, 549, 994, 3...
4.140541
185
#!/usr/bin/env python import setpath import unittest from rename import rename import compiler from bike import testdata from bike.testutils import* from bike.transformer.save import save # Generic tests. These tests are designed to be run in the context of a ui # and in a package hierarchy structure ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 900, 6978, 198, 11748, 555, 715, 395, 198, 6738, 36265, 1330, 36265, 198, 11748, 17050, 198, 6738, 7161, 1330, 1332, 7890, 198, 198, 6738, 7161, 13, 9288, 26791, 1330, 9, 198, 1...
3.064378
233
from rest_framework import serializers from care.users.models import District, LocalBody, State, Ward, Block
[ 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 198, 6738, 1337, 13, 18417, 13, 27530, 1330, 5665, 11, 10714, 25842, 11, 1812, 11, 12150, 11, 9726, 628, 628, 628, 198 ]
3.866667
30
import ijson, csv, json, datetime import sys sys.path.append('../lib') from accounts.company import Company if __name__ == '__main__': main()
[ 11748, 1312, 17752, 11, 269, 21370, 11, 33918, 11, 4818, 8079, 198, 198, 11748, 25064, 198, 198, 17597, 13, 6978, 13, 33295, 10786, 40720, 8019, 11537, 198, 198, 6738, 5504, 13, 39722, 1330, 5834, 628, 628, 198, 361, 11593, 3672, 834, ...
2.921569
51
import numpy as np import random import re import copy
[ 11748, 299, 32152, 355, 45941, 198, 11748, 4738, 198, 11748, 302, 198, 11748, 4866, 628 ]
3.733333
15
# -*- coding: utf-8 -*- __version__ = '1.1.15' from .filemaker import create_files # noqa
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 834, 9641, 834, 796, 705, 16, 13, 16, 13, 1314, 6, 198, 198, 6738, 764, 7753, 10297, 1330, 2251, 62, 16624, 220, 220, 220, 220, 1303, 645, 20402, 198 ]
2.181818
44
from dataclasses import dataclass from functools import partial from typing import Callable, List, Optional from colassigner.constants import PREFIX_SEP from ...utils import chainmap from .artifact_metadata import ArtifactMetadata from .column import Column from .feature_types import CompositeFeature, ForeignKey, Pri...
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 6738, 19720, 1330, 4889, 540, 11, 7343, 11, 32233, 198, 198, 6738, 951, 562, 570, 263, 13, 9979, 1187, 1330, 22814, 47084, 62, 5188, 47, 19...
3.901786
112
from jinfo.utils.one_hot_dna import one_hot_dna from jinfo.utils.random_DNASeq import random_DNASeq from jinfo.utils.DNASeq_from_NCBI import DNASeq_from_NCBI from jinfo.utils.seq_list_to_fasta import seq_list_to_fasta from jinfo.utils.seq_list_from_fasta import seq_list_from_fasta from jinfo.utils.seq_from_fasta import...
[ 6738, 474, 10951, 13, 26791, 13, 505, 62, 8940, 62, 67, 2616, 1330, 530, 62, 8940, 62, 67, 2616, 198, 6738, 474, 10951, 13, 26791, 13, 25120, 62, 35, 18293, 27363, 1330, 4738, 62, 35, 18293, 27363, 198, 6738, 474, 10951, 13, 26791, ...
2.79386
228
from multiprocessing import Pool from random import randrange from absl import logging from patterns.command.action import Action from patterns.command.callback.handler import Callback
[ 6738, 18540, 305, 919, 278, 1330, 19850, 198, 6738, 4738, 1330, 43720, 9521, 198, 198, 6738, 2352, 75, 1330, 18931, 198, 198, 6738, 7572, 13, 21812, 13, 2673, 1330, 7561, 198, 6738, 7572, 13, 21812, 13, 47423, 13, 30281, 1330, 4889, 1...
4.318182
44
''' Created on February 25, 2019 This file is subject to the terms and conditions defined in the file 'LICENSE.txt', which is part of this source code package. @author: David Moss ''' from intelligence.intelligence import Intelligence class LocationMidnightMicroservice(Intelligence): """ Announce midnight t...
[ 7061, 6, 198, 41972, 319, 3945, 1679, 11, 13130, 198, 198, 1212, 2393, 318, 2426, 284, 262, 2846, 290, 3403, 5447, 287, 262, 198, 7753, 705, 43, 2149, 24290, 13, 14116, 3256, 543, 318, 636, 286, 428, 2723, 2438, 5301, 13, 198, 198, ...
3.238281
256
import hashlib from typing import List
[ 11748, 12234, 8019, 198, 6738, 19720, 1330, 7343, 628 ]
4.444444
9
# Copyright 2017 Battelle Energy Alliance, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
[ 2, 15069, 2177, 12350, 13485, 6682, 10302, 11, 11419, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13,...
2.929184
3,149
from rest_framework import serializers from goods.models import SKU from orders.models import OrderInfo, OrderGoods class SKUSerializer(serializers.ModelSerializer): '''SKU''' class OrderGoodsSerialzier(serializers.ModelSerializer): """ 订单商品表 """ sku = SKUSerializer() class OrderSeri...
[ 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 198, 6738, 7017, 13, 27530, 1330, 14277, 52, 198, 6738, 6266, 13, 27530, 1330, 8284, 12360, 11, 8284, 10248, 82, 198, 198, 4871, 14277, 2937, 48499, 7509, 7, 46911, 11341, 13, 17633, 32634...
2.426087
230
#!/usr/bin/env python # # This application creates a Name Server, Event Server, # Pyro server, and clients, and uses a custom event loop to keep them # all running in parallel. # The custom loop runs in its own server thread otherwise we # can't run client invocations, obviously. # The main loop calls Pyro objects to s...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 770, 3586, 8075, 257, 6530, 9652, 11, 8558, 9652, 11, 198, 2, 44954, 4382, 11, 290, 7534, 11, 290, 3544, 257, 2183, 1785, 9052, 284, 1394, 606, 198, 2, 477, 2491, 287, ...
4.081081
259
# Make it run from the examples directory import sys sys.path.append("..") from liquer import * @first_command @command # with default delimiters print (evaluate_template(""" Template example [[]] - $hello$ - $hello/greet$ - $hello/greet-everybody$ """)) # with custom delimiters print (evaluate_template(""" Temp...
[ 2, 6889, 340, 1057, 422, 262, 6096, 8619, 198, 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 7203, 492, 4943, 198, 198, 6738, 14756, 263, 1330, 1635, 198, 198, 31, 11085, 62, 21812, 198, 198, 31, 21812, 198, 198, 2, 351, 4277, 4672...
2.921986
141
import numpy as np
[ 11748, 299, 32152, 355, 45941, 628 ]
3.333333
6