content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import asyncio from itertools import cycle import pytest from gino import create_engine from sqlalchemy.orm import scoped_session, sessionmaker from .factory import Factory from .models import db, PG_URL, UserType @pytest.fixture(scope="session") @pytest.fixture(scope="session") @pytest.fixture(scope='function'...
[ 11748, 30351, 952, 198, 6738, 340, 861, 10141, 1330, 6772, 198, 198, 11748, 12972, 9288, 198, 6738, 308, 2879, 1330, 2251, 62, 18392, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 629, 19458, 62, 29891, 11, 6246, 10297, 198, 198, 6738, ...
3.108333
120
import argparse import torch from torch.utils.data import DataLoader from tqdm import tqdm from utils.model import get_model from utils.tools import get_configs_of, to_device, get_mask_from_lengths from dataset import Dataset device = torch.device("cuda" if torch.cuda.is_available() else "cpu") if _...
[ 11748, 1822, 29572, 201, 198, 201, 198, 11748, 28034, 201, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 6060, 17401, 201, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 201, 198, 201, 198, 6738, 3384, 4487, 13, 19849, 1330, 651, 62,...
2.489655
1,015
# $Id$ from module_base import ModuleBase from module_mixins import ScriptedConfigModuleMixin import module_utils import vtk
[ 2, 720, 7390, 3, 198, 198, 6738, 8265, 62, 8692, 1330, 19937, 14881, 198, 6738, 8265, 62, 19816, 1040, 1330, 12327, 276, 16934, 26796, 35608, 259, 198, 11748, 8265, 62, 26791, 198, 11748, 410, 30488, 198, 220, 220, 220, 220, 220, 220,...
2.263889
72
# -*- coding: utf-8 -*- """ Created on Thu Jul 2 03:40:59 2020 @author: hp """ import cv2 # pip install opencv-python import dlib import numpy as np # Use a file on your computer: videoCapture = cv2.VideoCapture('video/clinton.mp4') # Or use a web cam: # videoCapture = cv2.VideoCapture(0) # Initialise three separ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 26223, 5979, 220, 362, 7643, 25, 1821, 25, 3270, 12131, 198, 198, 31, 9800, 25, 27673, 198, 37811, 198, 11748, 269, 85, 17, 220, 1303, 7347, 27...
2.035948
1,530
# ================================================================================================== # Copyright 2011 Twitter, Inc. # -------------------------------------------------------------------------------------------------- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use thi...
[ 2, 38093, 10052, 28, 198, 2, 15069, 2813, 3009, 11, 3457, 13, 198, 2, 16529, 3880, 438, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 670, 2845, 287, ...
5.319767
172
#!/usr/bin/python3 import os import uuid import mne import numpy as np import pandas as pd import pyedflib import scipy.io as sio from mne.time_frequency import * import matplotlib.pyplot as plt def get_recorder_time(data): ''' :param data: raw data :return: 这个文件记录的时间长度 ''' time = data.times[...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 11748, 28686, 198, 11748, 334, 27112, 198, 198, 11748, 285, 710, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 12972, 276, 2704, 571, 198, 117...
1.67758
7,819
from django.contrib import admin from .models import IntegerValue admin.site.register( IntegerValue, list_display=["id", "name", "value"], )
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 764, 27530, 1330, 34142, 11395, 628, 198, 28482, 13, 15654, 13, 30238, 7, 198, 220, 220, 220, 34142, 11395, 11, 198, 220, 220, 220, 1351, 62, 13812, 28, 14692, 312, 1600, 366,...
3.02
50
# -*- coding: utf-8 -*- """ Created on Sat Oct 14 21:35:15 2017 @author: austin V1.2 use SoupStrainer for lower RAM usage. But looks a little bit slow, then skip the sleep time """ #主要程序 import requests import re from bs4 import BeautifulSoup,SoupStrainer import pandas#pandas大法好 from fake_useragent impor...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 7031, 2556, 1478, 2310, 25, 2327, 25, 1314, 2177, 201, 198, 201, 198, 31, 9800, 25, 38132, 259, 201, 198, 53, 16, 13, 17, 779, 3401...
1.64018
5,097
try: raise AssertionError('this is a test') except: print('test passed')
[ 28311, 25, 198, 220, 220, 220, 5298, 2195, 861, 295, 12331, 10786, 5661, 318, 257, 1332, 11537, 198, 16341, 25, 198, 220, 220, 220, 3601, 10786, 9288, 3804, 11537, 198 ]
2.7
30
# !/user/bin/python # coding=utf-8 from __future__ import print_function import urllib import time import os import re try: from my_net import net except ImportError: raise ImportError('Sorry, can not find \'my_net\' .\nPlease view https://github.com/WuJunkai2004/Pyself/blob/master/my_net/my_net.py to downlo...
[ 2, 5145, 14, 7220, 14, 8800, 14, 29412, 198, 2, 19617, 28, 40477, 12, 23, 198, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 2956, 297, 571, 198, 11748, 640, 198, 11748, 28686, 198, 11748, 302, 198, 198, 28311...
2.429185
233
# Import packages import argparse import json import multiprocessing import os from pathlib import Path import numpy as np import scipy as scipy from scipy.io import wavfile from config_path import get_paths from parallel_proc import process from utils import (ProgressBar, is_clipped, read_source_images, ...
[ 2, 17267, 10392, 198, 11748, 1822, 29572, 198, 11748, 33918, 198, 11748, 18540, 305, 919, 278, 198, 11748, 28686, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 355, 629, 541, 88, ...
2.75853
381
""" 写教学评价简直是在浪费我的时间 Author: Aber Sheeran Time: 2017-12-16 """ import re import json from .Base import log def fuck_the_teaching_evaluation(session): """教学评价""" for each in re.findall(r"<a[\s\S]*?href='([\s\S]+?)'", (session.get_page("jxpj/xsjxpj.shtml"))): log.debug(f"处理{each}中...") ...
[ 37811, 201, 198, 37863, 247, 46763, 247, 27764, 99, 46237, 226, 20015, 115, 163, 106, 222, 33566, 112, 42468, 28839, 101, 38184, 103, 164, 112, 117, 22755, 239, 21410, 33768, 114, 29785, 112, 201, 198, 13838, 25, 27700, 1375, 263, 272, ...
1.675926
756
import sys import os # Make sure that the application source directory (this directory's parent) is # on sys.path. import pytest here = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0, here) print(sys.path) @pytest.fixture
[ 11748, 25064, 198, 11748, 28686, 198, 198, 2, 6889, 1654, 326, 262, 3586, 2723, 8619, 357, 5661, 8619, 338, 2560, 8, 318, 198, 2, 319, 25064, 13, 6978, 13, 198, 11748, 12972, 9288, 198, 198, 1456, 796, 28686, 13, 6978, 13, 15908, 36...
2.835165
91
#!/usr/bin/env python3 # https://codeforces.com/problemset/problem/92/A # 之前是模拟解; 现在尝试数学解.. import math n,m = list(map(int,input().split())) #50,1e4 cc = (n*(n+1))//2 m = m%cc x = int((math.sqrt((m<<3)+1)-1)/2) print(m-(x*(x+1))//2)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 3740, 1378, 19815, 891, 273, 728, 13, 785, 14, 1676, 22143, 316, 14, 45573, 14, 5892, 14, 32, 198, 2, 220, 45298, 30298, 235, 42468, 162, 101, 94, 162, 233, 253, 164, ...
1.592105
152
# Copyright 2021 Palo Alto Networks, Inc # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS...
[ 2, 15069, 33448, 44878, 34317, 27862, 11, 3457, 198, 2, 198, 2, 2448, 3411, 284, 779, 11, 4866, 11, 13096, 11, 290, 14, 273, 14983, 428, 3788, 329, 597, 198, 2, 4007, 351, 393, 1231, 6838, 318, 29376, 7520, 11, 2810, 326, 262, 202...
3.414758
393
from xCore import xCore CSS811_REG_STATUS = 0x00 CSS811_REG_MEAS_MODE = 0x01 CSS811_REG_ALG_RST_DATA = 0x02 CSS811_REG_RAW_DATA = 0x03 CSS811_REG_ENV_DATA = 0x05 CSS811_REG_THRESHOLDS = 0x10 CSS811_REG_BASELINE = 0x11 CSS811_REG_HW_VERSION = 0x21 CSS811_REG_FW_BOOT_V = 0x23 CSS811_REG_FW_APP_V = 0x24 CSS811_REG_FW_ERR...
[ 6738, 2124, 14055, 1330, 2124, 14055, 198, 198, 49155, 23, 1157, 62, 31553, 62, 35744, 2937, 796, 657, 87, 405, 198, 49155, 23, 1157, 62, 31553, 62, 11682, 1921, 62, 49058, 796, 657, 87, 486, 198, 49155, 23, 1157, 62, 31553, 62, 184...
1.799505
404
from factory import Sequence, SubFactory from factory.django import DjangoModelFactory from lessons.models import Lesson, Resource, Activity
[ 6738, 8860, 1330, 45835, 11, 3834, 22810, 198, 6738, 8860, 13, 28241, 14208, 1330, 37770, 17633, 22810, 198, 198, 6738, 11658, 13, 27530, 1330, 12892, 261, 11, 20857, 11, 24641, 198 ]
4.580645
31
rainbow = [ 'красный', 'оранжевый', 'жёлтый', 'зелёный', 'голубой', 'синий', 'фиолетовый'] i = 0 for i in range(0, 7): print(rainbow[i])
[ 3201, 8176, 796, 685, 705, 31583, 21169, 16142, 21727, 22177, 45035, 140, 117, 3256, 705, 15166, 21169, 16142, 22177, 140, 114, 16843, 38857, 45035, 140, 117, 3256, 705, 140, 114, 141, 239, 30143, 20375, 45035, 140, 117, 3256, 705, 140, ...
1.293578
109
#------------------------------------------------------------------------------- # bob: environment.py # # Environment object. # # Eli Bendersky (eliben@gmail.com) # This code is in the public domain #------------------------------------------------------------------------------- class Environment(object): """ A...
[ 2, 10097, 24305, 198, 2, 29202, 25, 2858, 13, 9078, 198, 2, 198, 2, 9344, 2134, 13, 220, 198, 2, 198, 2, 25204, 347, 7338, 2584, 357, 417, 571, 268, 31, 14816, 13, 785, 8, 198, 2, 770, 2438, 318, 287, 262, 1171, 7386, 198, 2, ...
2.731017
777
# ***************************************************************************** # # Copyright (c) 2021, the temporal-cache authors. # # This file is part of the temporal-cache library, distributed under the terms of # the Apache License 2.0. The full license can be found in the LICENSE file. #
[ 2, 41906, 17174, 4557, 35625, 198, 2, 198, 2, 15069, 357, 66, 8, 33448, 11, 262, 21964, 12, 23870, 7035, 13, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 262, 21964, 12, 23870, 5888, 11, 9387, 739, 262, 2846, 286, 198, 2, 262, 2484...
4.484848
66
import json import boto3 import logging import decimal from boto3.dynamodb.conditions import Key, Attr dynamodb = boto3.resource('dynamodb') logger = logging.getLogger() logger.setLevel(logging.INFO) # Helper class to convert a DynamoDB item to JSON.
[ 11748, 33918, 198, 11748, 275, 2069, 18, 198, 11748, 18931, 198, 11748, 32465, 198, 6738, 275, 2069, 18, 13, 67, 4989, 375, 65, 13, 17561, 1756, 1330, 7383, 11, 3460, 81, 198, 198, 67, 4989, 375, 65, 796, 275, 2069, 18, 13, 31092, ...
2.908046
87
from django import forms from .models import About, Info
[ 6738, 42625, 14208, 1330, 5107, 198, 6738, 764, 27530, 1330, 7994, 11, 14151 ]
4.307692
13
from gui import * from tkinter import * if __name__ == "__main__": main()
[ 6738, 11774, 1330, 1635, 198, 198, 6738, 256, 74, 3849, 1330, 1635, 628, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419, 198 ]
2.59375
32
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_django-blockstack-auth ------------ Tests for `django-blockstack-auth` views module. """ from django.contrib.staticfiles.testing import StaticLiveServerTestCase from django.test import Client from django_blockstack_auth.views import LoginView, CallbackView, Logo...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 9288, 62, 28241, 14208, 12, 9967, 25558, 12, 18439, 198, 10541, 198, 198, 51, 3558, 329, 4600, 28241, ...
3.043478
138
from .text_to_docs import text_to_docs
[ 198, 198, 6738, 764, 5239, 62, 1462, 62, 31628, 1330, 2420, 62, 1462, 62, 31628, 198 ]
2.5625
16
from .OBJET import OBJET import numpy as np class Objet(object): """OBJET"""
[ 6738, 764, 9864, 41, 2767, 1330, 25334, 41, 2767, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 4871, 1835, 31173, 7, 15252, 2599, 198, 220, 220, 220, 37227, 9864, 41, 2767, 37811, 198 ]
2.441176
34
from unittest import TestCase from fpipe.file import File from fpipe.meta import Size, MD5 from fpipe.gen import Meta, Program from fpipe.exceptions import FileDataException from fpipe.meta.stream import Stream from fpipe.utils.const import PIPE_BUFFER_SIZE from test_utils.test_file import TestStream
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 6738, 277, 34360, 13, 7753, 1330, 9220, 198, 6738, 277, 34360, 13, 28961, 1330, 12849, 11, 10670, 20, 198, 6738, 277, 34360, 13, 5235, 1330, 30277, 11, 6118, 198, 6738, 277, 34360, 13,...
3.454545
88
import tempfile from io import BytesIO import pandas as pd import arrow import hanshu from reportlab.lib import colors from reportlab.pdfbase import pdfmetrics from reportlab.pdfbase.pdfmetrics import registerFontFamily from reportlab.pdfbase.ttfonts import TTFont from reportlab.platypus import Paragraph, Simp...
[ 11748, 20218, 7753, 201, 198, 6738, 33245, 1330, 2750, 4879, 9399, 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 11748, 15452, 201, 198, 11748, 289, 504, 13415, 201, 198, 6738, 989, 23912, 13, 8019, 1330, 7577, 201, 198, 6738, ...
1.407755
17,047
# -*- coding: utf-8 -*- """ Created on Tue Oct 29 20:45:28 2019 @author: satishsaini """ import json
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 30030, 2556, 2808, 1160, 25, 2231, 25, 2078, 13130, 201, 198, 201, 198, 31, 9800, 25, 3332, 680, 82, 391, 72, 201, 198, 37811, 201, ...
2.18
50
""" Loads the dbs for interactive sessions """ from regolith.runcontrol import DEFAULT_RC, load_rcfile, filter_databases, \ connect_db rc = DEFAULT_RC rc._update(load_rcfile("regolithrc.json")) filter_databases(rc) chained_db, dbs = connect_db(rc)
[ 37811, 198, 8912, 82, 262, 288, 1443, 329, 14333, 10991, 198, 37811, 198, 6738, 842, 21446, 13, 5143, 13716, 1330, 5550, 38865, 62, 7397, 11, 3440, 62, 6015, 7753, 11, 8106, 62, 19608, 18826, 11, 3467, 198, 220, 220, 220, 2018, 62, ...
2.76087
92
#!/usr/bin/python3.9 # -*- coding: utf-8 -*- # # Copyright (C) 2021 LinYulong. All Rights Reserved # # @Time : 2021/10/31 # @Author : LinYulong import numpy import pandas import xgboost from sklearn.discriminant_analysis import LinearDiscriminantAnalysis from sklearn.ensemble import ExtraTreesRegressor from sklea...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 13, 24, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 357, 34, 8, 33448, 5164, 56, 377, 506, 13, 1439, 6923, 33876, 220, 198, 2, 198, 2, 2488, ...
3.220588
204
#coding:utf-8 # # id: bugs.core_426 # title: Wrong sort order when using es_ES collate # decription: Check if sort order for collate ES_ES is the one of DRAE , the oficial organization for standarization of spanish # tracker_id: CORE-426 # min_versions: [] # versions: 2.1 # qmid: bugs.c...
[ 2, 66, 7656, 25, 40477, 12, 23, 198, 2, 198, 2, 4686, 25, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 11316, 13, 7295, 62, 42780, 198, 2, 3670, 25, 220, 220, 220, 220, 220, 220, 220, 28843, 3297, 1502, 618, 1262, 1658, 6...
2.532895
1,064
from gym_tak.read_only.read_only_enum import read_only_enum from gym_tak.read_only.read_only_properties import read_only_properties
[ 6738, 11550, 62, 83, 461, 13, 961, 62, 8807, 13, 961, 62, 8807, 62, 44709, 1330, 1100, 62, 8807, 62, 44709, 198, 6738, 11550, 62, 83, 461, 13, 961, 62, 8807, 13, 961, 62, 8807, 62, 48310, 1330, 1100, 62, 8807, 62, 48310, 198 ]
3
44
from __future__ import division, unicode_literals, print_function, absolute_import import pytest import numpy as np from numpy.testing import assert_equal, assert_array_equal import traitlets as tl import podpac from podpac import Coordinates, clinspace, crange from podpac.algorithm import Arange from podpac.data im...
[ 6738, 11593, 37443, 834, 1330, 7297, 11, 28000, 1098, 62, 17201, 874, 11, 3601, 62, 8818, 11, 4112, 62, 11748, 198, 198, 11748, 12972, 9288, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 299, 32152, 13, 33407, 1330, 6818, 62, 40...
3.53211
109
import logging from pokebattle import celery_app from pokemon.helpers import save_pokemon from services.api import get_pokemon_list logger = logging.getLogger(__name__) @celery_app.task
[ 11748, 18931, 198, 198, 6738, 22620, 38471, 1330, 18725, 1924, 62, 1324, 198, 6738, 43962, 13, 16794, 364, 1330, 3613, 62, 79, 12717, 198, 6738, 2594, 13, 15042, 1330, 651, 62, 79, 12717, 62, 4868, 628, 198, 6404, 1362, 796, 18931, 13...
3.183333
60
# Severe Weather Power Disruption Index 15 Day # # - https://weather.com/swagger-docs/ui/sun/v2/SUNv2SevereWeatherPowerDisruptionIndex.json # # The Power Disruption index provides indices indicating the potential for power # disruptions due to weather. # # Base URL: api.weather.com/v2 # Endpoint: /indices/powerDisrupti...
[ 2, 1001, 4119, 15615, 4333, 3167, 6417, 12901, 1315, 3596, 198, 2, 198, 2, 532, 3740, 1378, 23563, 13, 785, 14, 2032, 7928, 12, 31628, 14, 9019, 14, 19155, 14, 85, 17, 14, 50, 4944, 85, 17, 4653, 4119, 41865, 13434, 7279, 6417, 15...
3.315385
130
r"""Functions for $\tau\to V\ell$.""" import flavio from flavio.physics.taudecays import common from math import sqrt, pi import numpy as np # names of LFV sectors in WCxf wcxf_sector_names = {('tau', 'mu'): 'mutau', ('tau', 'e'): 'taue', ('mu', 'e'): 'mue', } def br_tauvl(...
[ 81, 37811, 24629, 2733, 329, 39280, 83, 559, 59, 1462, 569, 59, 695, 3, 526, 15931, 198, 198, 11748, 10525, 952, 198, 6738, 10525, 952, 13, 746, 23154, 13, 83, 3885, 721, 592, 1330, 2219, 198, 6738, 10688, 1330, 19862, 17034, 11, 31...
1.863785
1,226
from flask import render_template, redirect, url_for from app import app from Team import Team from HReferenceParser import HReferenceParser from Schedule import Schedule from GameLog import GameLog from Stats import Stats from BeltGame import BeltGame season = 2014 availableSeasons = { 2006 : Team('CAR', 'Carolina ...
[ 6738, 42903, 1330, 8543, 62, 28243, 11, 18941, 11, 19016, 62, 1640, 198, 6738, 598, 1330, 598, 198, 6738, 4816, 1330, 4816, 198, 6738, 367, 26687, 46677, 1330, 367, 26687, 46677, 198, 6738, 19281, 1330, 19281, 198, 6738, 3776, 11187, 13...
2.933852
257
from __future__ import print_function from cassandra.cluster import Cluster import os import sys import time from pyspark import SparkContext from pyspark.streaming import StreamingContext from pyspark.streaming.kafka import KafkaUtils csvFields = ["Year", "Month", "DayofMonth", "DayOfWeek", "UniqueCarrier", "Origin...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 30606, 15918, 13, 565, 5819, 1330, 38279, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 640, 198, 198, 6738, 279, 893, 20928, 1330, 17732, 21947, 198, 6738, 279, 893, 20...
2.618123
309
# -*- coding: utf-8 -*- # Copyright 2019 The Matrix.org Foundation C.I.C. # # 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 require...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 13130, 383, 24936, 13, 2398, 5693, 327, 13, 40, 13, 34, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, ...
3.130137
292
import RPi.GPIO as GPIO import time pin = 15 GPIO.setmode(GPIO.BOARD) GPIO.setup(pin, GPIO.IN, pull_up_down=GPIO.PUD_DOWN) try: state = GPIO.input(pin) while True: if GPIO.input(pin) != state: state = GPIO.input(pin) if state == 1: print "it's open!" else: print "closed" time.sleep(1) except...
[ 11748, 25812, 72, 13, 16960, 9399, 355, 50143, 198, 11748, 640, 628, 198, 11635, 796, 1315, 198, 198, 16960, 9399, 13, 2617, 14171, 7, 16960, 9399, 13, 8202, 9795, 8, 198, 16960, 9399, 13, 40406, 7, 11635, 11, 50143, 13, 1268, 11, 2...
2.280702
171
import argparse import threading import time # import uuid from http.server import BaseHTTPRequestHandler, HTTPServer from typing import Tuple, Union import consul import yaml from consul.base import Check from logger import create_info_logger from utils.network import find_open_port, get_ip_address logger = create...
[ 11748, 1822, 29572, 198, 11748, 4704, 278, 198, 11748, 640, 198, 198, 2, 1330, 334, 27112, 198, 6738, 2638, 13, 15388, 1330, 7308, 40717, 18453, 25060, 11, 38288, 18497, 198, 6738, 19720, 1330, 309, 29291, 11, 4479, 198, 198, 11748, 762...
2.549282
2,019
from django.shortcuts import render from django.views.generic import FormView, TemplateView from .forms import TestForm from django.contrib import messages from quantityfield import ureg # Create your views here.
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 1330, 5178, 7680, 11, 37350, 7680, 198, 198, 6738, 764, 23914, 1330, 6208, 8479, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 62...
3.639344
61
from __future__ import absolute_import import json from engineauth.models import User from engineauth.strategies.oauth import OAuthStrategy
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 11748, 33918, 198, 198, 6738, 3113, 18439, 13, 27530, 1330, 11787, 198, 6738, 3113, 18439, 13, 2536, 2397, 444, 13, 12162, 1071, 1330, 440, 30515, 13290, 4338, 628 ]
3.837838
37
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
[ 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 921, 743, 7330, 198, 2, 257, 4866, 286, 262, 13789, 379, 198, 2,...
3.811927
218
from ._element import Element __all__ = [ "Element", ]
[ 6738, 47540, 30854, 1330, 11703, 198, 198, 834, 439, 834, 796, 685, 198, 220, 220, 220, 366, 20180, 1600, 198, 60, 198 ]
2.727273
22
#!/usr/bin/env python ######################################################################################### # # Parser for PropSeg binary. # # --------------------------------------------------------------------------------------- # Copyright (c) 2015 Polytechnique Montreal <www.neuro.polymtl.ca> # Authors: Benjami...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 29113, 29113, 14468, 7804, 2, 198, 2, 198, 2, 23042, 263, 329, 8772, 41030, 13934, 13, 198, 2, 198, 2, 16529, 19351, 6329, 198, 2, 15069, 357, 66, 8, 1853, 12280, 23873, 2350, 12871,...
2.438349
7,218
# <<BEGIN-copyright>> # Copyright 2021, Lawrence Livermore National Security, LLC. # See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: BSD-3-Clause # <<END-copyright>> from fudge import outputChannel as outputChannelModule from fudge.productData.distributions import angular as angularModule ...
[ 2, 9959, 33, 43312, 12, 22163, 4766, 4211, 198, 2, 15069, 33448, 11, 13914, 45036, 3549, 2351, 4765, 11, 11419, 13, 198, 2, 4091, 262, 1353, 12, 5715, 27975, 38162, 9947, 2393, 329, 3307, 13, 198, 2, 220, 198, 2, 30628, 55, 12, 34...
2.582329
249
game = { 'TRAINING': True, 'WND_WIDTH': 500, 'WND_HEIGHT': 500, 'SCOREBAR_HEIGHT': 30, # colors 'WHITE': (255, 255, 255), 'BLACK': (0, 0, 0), # game objects 'BALL_SZ': 9, 'PAD_H': 45, 'PAD_W': 15 } game['BALL_XSPD'] = game['WND_WIDTH'] / 160 game['BALL_XSTR'] = 0.5 * game...
[ 6057, 796, 1391, 198, 220, 220, 220, 705, 51, 3861, 1268, 2751, 10354, 6407, 11, 628, 220, 220, 220, 705, 54, 8575, 62, 54, 2389, 4221, 10354, 5323, 11, 198, 220, 220, 220, 705, 54, 8575, 62, 13909, 9947, 10354, 5323, 11, 198, 220...
1.918079
354
""" Write a program that accepts 10 integers from a user into an array, and count the number of occurrences of all present prime numbers. """ if __name__ == "__main__": values = list() for i in range(10): x = int(input(f"Enter the list value { i + 1 }: ")) values.append(x) count_oc...
[ 37811, 198, 220, 220, 220, 19430, 257, 1430, 326, 18178, 838, 37014, 422, 257, 2836, 656, 281, 7177, 11, 220, 198, 220, 220, 220, 290, 954, 262, 1271, 286, 40279, 286, 477, 1944, 6994, 3146, 13, 198, 37811, 198, 198, 361, 11593, 367...
2.653846
130
""" Language: Python Written by: Mostofa Adib Shakib Video Explanation: https://www.youtube.com/watch?v=CWDQJGaN1gY Further Reading: https://www.geeksforgeeks.org/binary-indexed-tree-or-fenwick-tree-2/ https://www.topcoder.com/community/competitive-programming/tutorials/binary-indexed-trees/ Binary In...
[ 37811, 198, 32065, 25, 11361, 198, 25354, 416, 25, 4042, 1659, 64, 1215, 571, 35274, 571, 198, 10798, 50125, 341, 25, 3740, 1378, 2503, 13, 11604, 13, 785, 14, 8340, 30, 85, 28, 34, 22332, 48, 41, 35389, 45, 16, 70, 56, 198, 13518...
3.022333
403
import json from collections import OrderedDict from pathlib import Path
[ 11748, 33918, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 6738, 3108, 8019, 1330, 10644, 198 ]
4.294118
17
#!/usr/bin/python3 # Author: Kenta Ishii # SPDX short identifier: BSD-3-Clause # ./dmx512.py import RPi.GPIO as gpio import threading class DMX512: """Dependency:RPi.GPIO, threading""" if __name__ == '__main__': import sys import time import signal version_info = "DMX512 Alpha" signal.signa...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 2, 6434, 25, 8758, 64, 24303, 4178, 198, 2, 30628, 55, 1790, 27421, 25, 347, 10305, 12, 18, 12, 2601, 682, 198, 2, 24457, 36020, 87, 25836, 13, 9078, 198, 198, 11748, 25812, 72, ...
2.030144
763
#!/usr/bin/env python # coding: utf-8 # In[4]: import serial import time import re from datetime import datetime import subprocess import os import urllib.request # In[5]: #Generic AT CR = '\r\n' ENABLE_AT='ATE1' #Filesystem AT commands UPLOAD_FILE='AT+QFUPL' DELETE_FILE='AT+QFDEL' LIST_FILES='AT+QFLST' LIST_FI...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 554, 58, 19, 5974, 628, 198, 11748, 11389, 198, 11748, 640, 198, 11748, 302, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 850, ...
1.986911
382
from selenium import webdriver from selenium.webdriver.common.keys import Keys import time email = '' password = '' auth = '' start_date = '2020-05-01' end_date = '2020-11-30' driver = webdriver.Chrome("C:/workspace/python/chromedriver/chromedriver.exe") driver.implicitly_wait(10) driver.get("https://hd.mobileindex.c...
[ 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 11321, 13, 13083, 1330, 26363, 198, 11748, 640, 198, 198, 12888, 796, 10148, 198, 28712, 796, 10148, 198, 18439, 796, 10148, 198, 9688, 62, 44...
2.569672
244
import discord from discord.ext import commands, tasks import os, sys, inspect import asyncio current_dir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parent_dir = os.path.dirname(current_dir) sys.path.insert(0, parent_dir) import botlib # import wowapi DEVMODE = os.getenv("DEVMODE") =...
[ 11748, 36446, 198, 6738, 36446, 13, 2302, 1330, 9729, 11, 8861, 198, 11748, 28686, 11, 25064, 11, 10104, 198, 11748, 30351, 952, 198, 198, 14421, 62, 15908, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 397, 2777, 776, ...
2.076312
4,154
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ZetCode PyQt5 tutorial This program creates a quit button. When we press the button, the application terminates. author: Jan Bodnar website: zetcode.com last edited: January 2015 """ import sys from PyQt5.QtWidgets import QWidget, QPushButton, QApplication from ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 57, 316, 10669, 9485, 48, 83, 20, 11808, 220, 198, 198, 1212, 1430, 8075, 257, 11238, 198, 16539...
2.445545
202
from storages.backends.s3boto3 import S3Boto3Storage
[ 6738, 336, 273, 1095, 13, 1891, 2412, 13, 82, 18, 65, 2069, 18, 1330, 311, 18, 33, 2069, 18, 31425, 628, 198 ]
2.5
22
import pandas as pd import numpy as np; np.random.seed(0) import seaborn as sns; sns.set_theme() from matplotlib import pyplot as plt file=pd.read_csv('/home/Documents/Acads/CompGenomics/Proj_ComparitiveGenomics/vf_merged_results.tsv', sep='\t') VF=list(file['Virulence factor']) Is=list(file['Isolate']) genes=['eae...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 26, 45941, 13, 25120, 13, 28826, 7, 15, 8, 198, 11748, 384, 397, 1211, 355, 3013, 82, 26, 3013, 82, 13, 2617, 62, 43810, 3419, 198, 6738, 2603, 29487, 8019, 1330, ...
2
1,048
# -*- coding: utf-8 -*- """ *************************************************************************** Postprocessing.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ************************...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 17174, 17174, 4557, 8162, 198, 220, 220, 220, 2947, 36948, 13, 9078, 198, 220, 220, 220, 41436, 12, 198, 220, 220, 220, 7536, 220, 220, 220, 220, 220,...
2.276137
1,253
""" Functions to plot Pyrado policies """ import numpy as np import torch.nn as nn from matplotlib import ticker, colorbar from matplotlib import pyplot as plt from typing import Any import pyrado from pyrado.plotting.utils import AccNorm from pyrado.policies.adn import ADNPolicy from pyrado.policies.base import Polic...
[ 37811, 198, 24629, 2733, 284, 7110, 27958, 4533, 4788, 198, 37811, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 2603, 29487, 8019, 1330, 4378, 263, 11, 3124, 5657, 198, 6738, 2603, 29487, 80...
2.163877
4,003
from ....models.models import Topic from ....permissions.permissions import Permissions from ...generics.delete import DeleteAction from ...util.default_schema import DefaultSchema from ...util.register import register_action @register_action("topic.delete") class TopicDelete(DeleteAction): """ Action to dele...
[ 6738, 19424, 27530, 13, 27530, 1330, 47373, 198, 6738, 19424, 525, 8481, 13, 525, 8481, 1330, 2448, 8481, 198, 6738, 2644, 8612, 873, 13, 33678, 1330, 23520, 12502, 198, 6738, 2644, 22602, 13, 12286, 62, 15952, 2611, 1330, 15161, 27054, ...
3.538462
143
import os import re import tempfile from subprocess import call from colorama import Fore from getgauge.api import get_step_value registry = Registry()
[ 11748, 28686, 198, 11748, 302, 198, 11748, 20218, 7753, 198, 6738, 850, 14681, 1330, 869, 198, 198, 6738, 3124, 1689, 1330, 4558, 198, 198, 6738, 651, 70, 559, 469, 13, 15042, 1330, 651, 62, 9662, 62, 8367, 628, 628, 628, 198, 198, ...
3.354167
48
# Generated by Django 2.2.24 on 2022-03-07 10:56 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 1731, 319, 33160, 12, 3070, 12, 2998, 838, 25, 3980, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.8
30
# import resource from typing import List, Tuple from matflow.database.ServerData import ServerData from matflow.frontendapi import keys from matflow.hardwareadministration.Server import Server import requests from requests.auth import HTTPBasicAuth
[ 2, 1330, 8271, 198, 6738, 19720, 1330, 7343, 11, 309, 29291, 198, 198, 6738, 2603, 11125, 13, 48806, 13, 10697, 6601, 1330, 9652, 6601, 198, 6738, 2603, 11125, 13, 8534, 437, 15042, 1330, 8251, 198, 6738, 2603, 11125, 13, 10424, 1574, ...
4.2
60
"""Calculations and Fucntions.""" import setup as set def player_statcalc(player): """Print this.""" player_prop = [] player_res = [] player_num = [] for letter in player: prob = set.letter_probs[letter] resIndex = set.resource_position[letter] res = set.resource_index[res...
[ 37811, 9771, 3129, 602, 290, 376, 1229, 429, 507, 526, 15931, 198, 198, 11748, 9058, 355, 900, 628, 198, 4299, 2137, 62, 14269, 9948, 66, 7, 7829, 2599, 198, 220, 220, 220, 37227, 18557, 428, 526, 15931, 198, 220, 220, 220, 2137, 62...
2.217355
1,210
import petl as etl, psycopg2 as pg, pymysql as mysql from config import dbConfig SOURCE_DB_DBO = pg.connect(dbConfig["source"]) STAGING_DB_DBO = pg.connect(dbConfig["staging"]) DW_DB_DBO = mysql.connect( host= dbConfig["data_warehouse"]["host"], user= dbConfig["data_warehouse"]["user"], password= dbConfig["da...
[ 11748, 4273, 75, 355, 2123, 75, 11, 17331, 22163, 70, 17, 355, 23241, 11, 279, 4948, 893, 13976, 355, 48761, 198, 6738, 4566, 1330, 20613, 16934, 220, 198, 198, 47690, 62, 11012, 62, 35, 8202, 796, 23241, 13, 8443, 7, 9945, 16934, 1...
2.678414
454
import os import pickle import random import numpy as np np.set_printoptions(threshold=np.inf) import torch from torch.utils.data import Dataset, DataLoader if __name__ == '__main__': test_data_path = "/Work18/2021/fuyanjie/exp_data/exp_nnsslm/test_data_dir/test_data_frame_level_gcc" test_data = DataLoader(S...
[ 11748, 28686, 198, 11748, 2298, 293, 198, 11748, 4738, 198, 198, 11748, 299, 32152, 355, 45941, 198, 37659, 13, 2617, 62, 4798, 25811, 7, 400, 10126, 28, 37659, 13, 10745, 8, 198, 11748, 28034, 198, 6738, 28034, 13, 26791, 13, 7890, 1...
2.360927
302
import os import cryspy
[ 11748, 28686, 198, 11748, 3960, 2777, 88, 198 ]
3
8
from django.views.generic import TemplateView from directory.models import Organisation from resources.models import Resource from .mixins import ResourcesViewMixin
[ 6738, 42625, 14208, 13, 33571, 13, 41357, 1330, 37350, 7680, 198, 198, 6738, 8619, 13, 27530, 1330, 30801, 198, 6738, 4133, 13, 27530, 1330, 20857, 198, 198, 6738, 764, 19816, 1040, 1330, 13864, 7680, 35608, 259, 628, 198 ]
4.447368
38
# GY171204 from .utils import * from .needle import *
[ 2, 402, 56, 1558, 1065, 3023, 198, 198, 6738, 764, 26791, 1330, 1635, 198, 6738, 764, 31227, 293, 1330, 1635, 198 ]
2.619048
21
import random from fastapi.routing import APIRouter from fastapi.responses import PlainTextResponse from sovereign import XDS_TEMPLATES, __versionstr__ from sovereign import discovery from sovereign.sources import match_node, extract_node_key from sovereign.utils.mock import mock_discovery_request router = APIRouter(...
[ 11748, 4738, 198, 6738, 3049, 15042, 13, 81, 13660, 1330, 3486, 4663, 39605, 198, 6738, 3049, 15042, 13, 16733, 274, 1330, 28847, 8206, 31077, 198, 6738, 18901, 1330, 1395, 5258, 62, 51, 3620, 6489, 29462, 11, 11593, 9641, 2536, 834, 19...
3.694268
157
from io import BytesIO from tarfile import TarInfo def list_tar_files(tar_ball): """ `getmembers()` requires scaning the entire file before returning the first value. Avoid that by making a looping iterator. """ tar_info = tar_ball.next() while tar_info is not None: tar_file = tar_ball...
[ 6738, 33245, 1330, 2750, 4879, 9399, 198, 6738, 13422, 7753, 1330, 14110, 12360, 198, 198, 4299, 1351, 62, 18870, 62, 16624, 7, 18870, 62, 1894, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 4600, 1136, 30814, 3419, 63, 4433, 6...
2.330233
430
import time import sys class ProgressBar(object): """ This object display a simple command line progress bar to wait in style. """ class Timer(object): """ This class is a simple timer for the sake of simplicity. This also provides simple statistics. This work with the python 'with statement...
[ 11748, 640, 198, 11748, 25064, 628, 198, 4871, 18387, 10374, 7, 15252, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 770, 2134, 3359, 257, 2829, 3141, 1627, 4371, 2318, 284, 4043, 287, 3918, 13, 198, 220, 220, 220, 37227, 628, ...
2.259392
559
import forumsweats.discordbot as discordbot from ..commandparser import Member import discord from forumsweats import db name = 'sendbobux' aliases = ('sendkromer', 'transmitkromer') args = '<member> <amount>' async def run(message, member: Member = None, amount: int = 0): 'Sends some of your bobux to another user.'...
[ 11748, 14216, 732, 1381, 13, 15410, 585, 13645, 355, 36446, 13645, 198, 6738, 11485, 21812, 48610, 1330, 10239, 198, 11748, 36446, 198, 6738, 14216, 732, 1381, 1330, 20613, 198, 198, 3672, 796, 705, 21280, 65, 672, 2821, 6, 198, 7344, 1...
2.769928
552
from eventlet.support import six assert six.PY3, 'This is a Python 3 module'
[ 6738, 1785, 1616, 13, 11284, 1330, 2237, 198, 30493, 2237, 13, 47, 56, 18, 11, 705, 1212, 318, 257, 11361, 513, 8265, 6, 198 ]
3.208333
24
# -*- coding: utf-8 -*- """ 装饰器 """ import asyncio from asyncio import iscoroutinefunction from functools import wraps from loguru import logger import traceback from .concurrency import run_function from .helpers import spider_sleep from .url import get_location_from_history from ..request import Request from ..res...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 35318, 165, 98, 108, 161, 247, 101, 198, 37811, 198, 198, 11748, 30351, 952, 198, 6738, 30351, 952, 1330, 318, 10215, 28399, 8818, 198, 6738, 1257, 310, 1014...
3.382353
102
from testing.postgresql import Postgresql import pytest from app import create_app from Model import db as _db from Model import Client, FeatureRequest from configTest import SQLALCHEMY_DATABASE_URI as db_url @pytest.yield_fixture(scope='session') @pytest.fixture(scope='session') @pytest.yield_fixture(scope='se...
[ 6738, 4856, 13, 7353, 34239, 13976, 1330, 2947, 34239, 13976, 198, 11748, 12972, 9288, 198, 198, 6738, 598, 1330, 2251, 62, 1324, 198, 6738, 9104, 1330, 20613, 355, 4808, 9945, 198, 6738, 9104, 1330, 20985, 11, 27018, 18453, 198, 6738, ...
3.007874
127
import pytest from mvlearn.cluster.base_kmeans import BaseKMeans
[ 11748, 12972, 9288, 198, 6738, 285, 85, 35720, 13, 565, 5819, 13, 8692, 62, 74, 1326, 504, 1330, 7308, 42, 5308, 504, 628 ]
2.869565
23
""" Raspagem de dados do Portal Investidor para encontrar detalhes sobre operações feitas pelo Tesouro Direto. PRECISA DE UMA LISTA DE PROTOCOLOS PARA RODAR!!!!!!! Siga as instruções: 1. Navegue a https://portalinvestidor.tesourodireto.com.br/Consulta 2. Preencha os Filtros e clique em Aplicar 3. Vá até ...
[ 37811, 198, 49, 5126, 363, 368, 390, 9955, 418, 466, 25663, 7488, 312, 273, 31215, 2207, 756, 20040, 1062, 282, 956, 523, 4679, 27296, 16175, 127, 113, 274, 198, 5036, 21416, 16176, 78, 10696, 280, 305, 34177, 1462, 13, 198, 198, 47, ...
2.259932
881
"""String module test parameters""" from .helpers import parametrize LIST_TEST_INT = list(range(1, 6)) LIST_TEST_STR = [str(x) for x in LIST_TEST_INT] STR_TEST_SPACES = ' '.join(LIST_TEST_STR) STR_TEST_COMMAS = ','.join(LIST_TEST_STR) STR_TEST_CSV = '1 2, 3\t4, \t5' ALPHA_SIMPLE = 'abcdefghijklmnopqrstuvwxyz' ALPHA_CO...
[ 37811, 10100, 8265, 1332, 10007, 37811, 198, 6738, 764, 16794, 364, 1330, 5772, 316, 380, 2736, 198, 198, 45849, 62, 51, 6465, 62, 12394, 796, 1351, 7, 9521, 7, 16, 11, 718, 4008, 198, 45849, 62, 51, 6465, 62, 18601, 796, 685, 2536,...
1.829178
2,166
from flask import Flask, jsonify from . import hello, probes app = create_app()
[ 6738, 42903, 1330, 46947, 11, 33918, 1958, 198, 198, 6738, 764, 1330, 23748, 11, 33124, 628, 628, 198, 1324, 796, 2251, 62, 1324, 3419, 198 ]
3.4
25
# Copyright 2018 Christoph Heindl. # # Licensed under MIT License # ============================================================ import tensorflow as tf import tfmpl import numpy as np
[ 2, 15069, 2864, 1951, 2522, 679, 521, 75, 13, 198, 2, 198, 2, 49962, 739, 17168, 13789, 198, 2, 46111, 4770, 2559, 18604, 198, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 256, 38353, 489, 198, 11748, 299, 32152, 355, 45941,...
4.348837
43
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2016-10-16 15:36 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 940, 319, 1584, 12, 940, 12, 1433, 1315, 25, 2623, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, ...
2.964286
84
#!/usr/local/bin/python3 import brotli import glob import hashlib import json import machfs import os import struct import sys import typing import urllib.request import zipfile LIBRARY_DIR = os.path.join(os.path.dirname(__file__), "..", "Library") CACHE_DIR = os.path.join("/tmp", "infinite-mac-cache") DEBUG = os.get...
[ 2, 48443, 14629, 14, 12001, 14, 8800, 14, 29412, 18, 198, 198, 11748, 1379, 83, 4528, 198, 11748, 15095, 198, 11748, 12234, 8019, 198, 11748, 33918, 198, 11748, 3235, 9501, 198, 11748, 28686, 198, 11748, 2878, 198, 11748, 25064, 198, 11...
2.237817
1,026
# Copyright (c) 2014 EMC Corporation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
[ 2, 15069, 357, 66, 8, 1946, 412, 9655, 10501, 13, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220...
2.469697
660
import numpy as np import matplotlib.pyplot as plt from scipy import signal from scipy.optimize import curve_fit from scipy.optimize import minimize from scipy.signal import find_peaks from scipy.stats import pearsonr as pearsonr from scipy.special import erf as erf """Fitting functions for multi-Gaussian fitting. """...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 629, 541, 88, 1330, 6737, 198, 6738, 629, 541, 88, 13, 40085, 1096, 1330, 12133, 62, 11147, 198, 6738, 629, 541, 88, 13, 40085, ...
2.39992
25,090
from sklearn.decomposition import PCA from sklearn.feature_extraction.text import TfidfVectorizer import csv outputFile = open('/home/anoukh/SentimentAnalysis/0.3uniqueTFIDFTweetVectorsSize200.csv', "wb") writer = csv.writer(outputFile, delimiter=',', quotechar='"', quoting=csv.QUOTE_MINIMAL, escapechar=',') with open(...
[ 6738, 1341, 35720, 13, 12501, 296, 9150, 1330, 4217, 32, 198, 6738, 1341, 35720, 13, 30053, 62, 2302, 7861, 13, 5239, 1330, 309, 69, 312, 69, 38469, 7509, 198, 11748, 269, 21370, 198, 22915, 8979, 796, 1280, 10786, 14, 11195, 14, 272,...
2.472222
396
#!/usr/bin/env python """ * ******************************************************* * Copyright VMware, Inc. 2018. All Rights Reserved. * SPDX-License-Identifier: MIT * ******************************************************* * * DISCLAIMER. THIS PROGRAM IS PROVIDED TO YOU "AS IS" WITHOUT * WARRANTIES OR CONDITIONS OF ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 198, 9, 41906, 8412, 2466, 8162, 198, 9, 15069, 37754, 11, 3457, 13, 2864, 13, 1439, 6923, 33876, 13, 198, 9, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 17168, 198, 9, ...
3.334118
425
from unittest import TestCase, skip from libumccr.aws import libsm
[ 6738, 555, 715, 395, 1330, 6208, 20448, 11, 14267, 198, 198, 6738, 9195, 388, 535, 81, 13, 8356, 1330, 9195, 5796, 628, 198 ]
3.043478
23
"""# API docs for Datapane Client These docs describe the Python API for building Datapane documents, along with additional information on the Datapane Teams API. Usage docs for Datapane can be found at https://docs.datapane.com These objects are all available under the `datapane` module, via `import datapane as dp`...
[ 37811, 2, 7824, 34165, 329, 16092, 499, 1531, 20985, 198, 198, 4711, 34165, 6901, 262, 11361, 7824, 329, 2615, 16092, 499, 1531, 4963, 11, 1863, 351, 3224, 1321, 319, 262, 16092, 499, 1531, 24690, 7824, 13, 198, 198, 28350, 34165, 329, ...
2.83913
920
#!/usr/bin/python3 # # Copyright 2017, Intel Corporation # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 2, 198, 2, 15069, 2177, 11, 8180, 10501, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 393, 1231, 198, 2, 17613, 11, 389, 10431, 2810, 326, 262, 1...
3.456884
661
""" Create tensorflow TFRecord files from images from the following directory structure: <input-directory> <class1> <image1> <image2> ... <class2> ... """ import getopt import os import sys import tensorflow as tf import numpy as np import png from tqdm import tqdm try: fr...
[ 37811, 198, 16447, 11192, 273, 11125, 24958, 23739, 3696, 422, 4263, 422, 262, 1708, 8619, 4645, 25, 198, 27, 15414, 12, 34945, 29, 198, 220, 220, 220, 1279, 4871, 16, 29, 198, 220, 220, 220, 220, 220, 220, 220, 1279, 9060, 16, 29, ...
2.432432
185
import os import numpy as np import scipy import cupy as cp from cupy.cuda import Device from cupy.cuda.runtime import getDeviceCount from mpi4py import MPI # import socket from ..common import _start, _finish # 計測開始 # 計測終了 # パラメータの初期化
[ 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 198, 11748, 6508, 88, 355, 31396, 198, 6738, 6508, 88, 13, 66, 15339, 1330, 16232, 198, 6738, 6508, 88, 13, 66, 15339, 13, 43282, 1330, 651, 24728, 12332, 198...
2.207207
111
import sqlite3 from skylark import Model, Field, Database
[ 11748, 44161, 578, 18, 198, 198, 6738, 1341, 2645, 668, 1330, 9104, 11, 7663, 11, 24047, 628, 628 ]
3.444444
18
#Python Program to demonstrate single inheritance #Base class #Derived class #Driver's code object=Child() object.fun1() object.fun2()
[ 2, 37906, 6118, 284, 10176, 2060, 24155, 198, 2, 14881, 1398, 198, 2, 28532, 1572, 1398, 198, 2, 32103, 338, 2438, 198, 15252, 28, 16424, 3419, 198, 15252, 13, 12543, 16, 3419, 198, 15252, 13, 12543, 17, 3419, 220, 220, 220, 220, 22...
3.042553
47
import numpy as np import random import tensorflow as tf class QNetwork(object): """ Base class for QNetworks. """ def copy_to(self, dst_net): """ mn = ModelNetwork(2, 3, 0, "actor") mn_target = ModelNetwork(2, 3, 0, "target_actor") s=tf.InteractiveSession() s.run( tf.initialize_all_variables() ) ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 4738, 198, 11748, 11192, 273, 11125, 355, 48700, 628, 198, 198, 4871, 1195, 26245, 7, 15252, 2599, 198, 197, 37811, 198, 197, 14881, 1398, 329, 1195, 7934, 5225, 13, 198, 197, 37811, 628, 628, ...
2.634807
701
#!/usr/bin/python # Copyright (c) 2020, 2021 Oracle and/or its affiliates. # This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Apache License v2.0 # See LICENSE.TXT for d...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 15069, 357, 66, 8, 12131, 11, 33448, 18650, 290, 14, 273, 663, 29116, 13, 198, 2, 770, 3788, 318, 925, 1695, 284, 345, 739, 262, 2846, 286, 262, 38644, 513, 13, 15, 5964, 393, 262, 2...
2.50735
2,381
from ply import lex, yacc from . import tokrules from .parser import DPOMDP, Parser __all__ = ['DPOMDP_Parser', 'parse'] # legacy
[ 6738, 35960, 1330, 31191, 11, 331, 4134, 198, 198, 6738, 764, 1330, 284, 38584, 5028, 198, 6738, 764, 48610, 1330, 27704, 2662, 6322, 11, 23042, 263, 198, 198, 834, 439, 834, 796, 37250, 6322, 2662, 6322, 62, 46677, 3256, 705, 29572, ...
2.8125
48
""" ========================================================================= CGRAFL.py ========================================================================= CGRAFL -- running DFG nodes one by one. Author : Cheng Tan Date : Feb 13, 2020 """ from pymtl3 import * from ..lib.opt_type import * from ..lib.m...
[ 37811, 198, 23926, 2559, 28, 198, 39816, 3861, 3697, 13, 9078, 198, 23926, 2559, 28, 198, 39816, 3861, 3697, 1377, 2491, 360, 30386, 13760, 530, 416, 530, 13, 198, 198, 13838, 1058, 27692, 11818, 198, 220, 7536, 1058, 3158, 1511, 11, ...
5.198113
106