content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from django.db import models from datetime import datetime from publish.models import Publishable # publishable model with a reverse relation to # page (as a child) # non-publishable reverse relation to page (as a child) update_pub_date.pub_date = datetime.now()
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 7715, 13, 27530, 1330, 8525, 1836, 540, 628, 628, 628, 628, 198, 2, 7715, 540, 2746, 351, 257, 9575, 8695, 284, 198, 2, 2443, 357, 292, 25...
3.407407
81
import sqlite3 import glob import os import click from flask import current_app, g from flask.cli import with_appcontext @click.command('init-db') @with_appcontext
[ 11748, 44161, 578, 18, 198, 11748, 15095, 198, 11748, 28686, 198, 11748, 3904, 198, 6738, 42903, 1330, 1459, 62, 1324, 11, 308, 198, 6738, 42903, 13, 44506, 1330, 351, 62, 1324, 22866, 628, 628, 198, 198, 31, 12976, 13, 21812, 10786, ...
3.269231
52
import os import angr import nose test_location = str(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../../binaries/tests')) arches = {'x86_64'} if __name__ == "__main__": main()
[ 11748, 28686, 198, 11748, 281, 2164, 198, 11748, 9686, 628, 198, 9288, 62, 24886, 796, 965, 7, 418, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 5305, 6978, 7, 834, 7753, 834, 36911, 705, 40720, 40...
2.45122
82
from datetime import datetime import logging # LOGGING SETTINGS # Save detailed information to log file handler_file = logging.FileHandler("jarvis.log") handler_file.setFormatter(logging.Formatter( "%(asctime)s %(levelname)s %(filename)s:%(lineno)d - %(message)s", "%Y-%m-%d %H:%M:%S" )) # Output simple infor...
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 18931, 198, 198, 2, 41605, 38, 2751, 25823, 51, 20754, 198, 198, 2, 12793, 6496, 1321, 284, 2604, 2393, 198, 30281, 62, 7753, 796, 18931, 13, 8979, 25060, 7203, 9491, 4703, 13, 6404, 494...
2.727273
341
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2016 - cologler <skyoflw@gmail.com> # ---------- # # ---------- import io __all__ = [ 'FormatError', 'SfoFile', 'PSVGameSfo', 'PSPGameSfo', ] _BYTE_ORDER = 'little' if __name__ == '__main__': for i in ra...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 2, 201, 198, 2, 15069, 357, 66, 8, 1584, 532, 269, 928, 1754, 1279, 15688, 1659, 75, 86, 31, 14816, 13, ...
1.853774
212
import factory from bluebottle.payments.models import Payment, OrderPayment from bluebottle.payments_logger.models import PaymentLogEntry from .orders import OrderFactory
[ 11748, 8860, 198, 198, 6738, 4171, 10985, 293, 13, 15577, 902, 13, 27530, 1330, 28784, 11, 8284, 19197, 434, 198, 6738, 4171, 10985, 293, 13, 15577, 902, 62, 6404, 1362, 13, 27530, 1330, 28784, 11187, 30150, 198, 6738, 764, 6361, 1330, ...
3.866667
45
import pytest from telliot_feed_examples.feeds.matic_usd_feed import matic_usd_median_feed @pytest.mark.asyncio
[ 11748, 12972, 9288, 198, 198, 6738, 1560, 5151, 62, 12363, 62, 1069, 12629, 13, 12363, 82, 13, 13849, 62, 385, 67, 62, 12363, 1330, 285, 1512, 62, 385, 67, 62, 1150, 666, 62, 12363, 628, 198, 31, 9078, 9288, 13, 4102, 13, 292, 133...
2.521739
46
from .base import * DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'NAME': 'motels_db', } } ALLOWED_HOSTS = [] CORS_ORIGIN_ALLOW_ALL = True DEBUG = True SECRET_KEY = 'test' INSTALLED_APPS += ( 'autofixture', 'debug_toolbar', '...
[ 6738, 764, 8692, 1330, 1635, 201, 198, 201, 198, 35, 1404, 6242, 1921, 1546, 796, 1391, 201, 198, 220, 220, 220, 705, 12286, 10354, 1391, 201, 198, 220, 220, 220, 220, 220, 220, 220, 705, 26808, 8881, 10354, 705, 28241, 14208, 13, 3...
2.140562
498
import sys import cubey if __name__ == "__main__": if len(sys.argv) != 2: print "Gimme a serial port!" sys.exit(1) serialPort = sys.argv[1] main(serialPort)
[ 11748, 25064, 198, 11748, 13617, 2959, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 611, 18896, 7, 17597, 13, 853, 85, 8, 14512, 362, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 366, ...
2.136364
88
import PySimpleGUI as sg from .base import GeneratorBase
[ 11748, 9485, 26437, 40156, 355, 264, 70, 198, 6738, 764, 8692, 1330, 35986, 14881, 628 ]
3.866667
15
import requests from flask import Flask, render_template, request, redirect base_url = "http://hn.algolia.com/api/v1" # This URL gets the newest stories. new = f"{base_url}/search_by_date?tags=story" # This URL gets the most popular stories popular = f"{base_url}/search?tags=story" # This function makes the URL to...
[ 11748, 7007, 198, 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 2581, 11, 18941, 198, 198, 8692, 62, 6371, 796, 366, 4023, 1378, 21116, 13, 14016, 22703, 13, 785, 14, 15042, 14, 85, 16, 1, 198, 198, 2, 770, 10289, 3011, 262, ...
2.794444
180
from django.conf import settings from django.contrib import admin from django.conf.urls import url, include from django.conf.urls.static import static from rest_framework import routers #from feewaiver import views, users_api, api from feewaiver import views, api from ledger.urls import urlpatterns as ledger_patterns ...
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 11, 2291, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 13, 12708, 1330, ...
2.667002
994
from pid import PID from lowpass import LowPassFilter from yaw_controller import YawController import rospy GAS_DENSITY = 2.858 ONE_MPH = 0.44704
[ 6738, 46514, 1330, 37022, 198, 6738, 1877, 6603, 1330, 7754, 14478, 22417, 198, 6738, 331, 707, 62, 36500, 1330, 575, 707, 22130, 198, 11748, 686, 2777, 88, 198, 198, 38, 1921, 62, 35, 16938, 9050, 796, 362, 13, 23, 3365, 198, 11651, ...
2.796296
54
import torch import torch.nn as nn from torch.utils import data from datetime import datetime import collections import os import random as rnd import copy from Modeling.Pytorch.utilis_rnn_specific import * from SI_Toolkit.load_and_normalize import load_normalization_info, load_data, normalize_df, denormalize_df ...
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 28034, 13, 26791, 1330, 1366, 198, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 11748, 17268, 198, 11748, 28686, 198, 198, 11748, 4738, 355, 374, 358, 198, 198, ...
2.189903
6,477
# -*- coding: utf-8 -*- """ .. admonition:: License Copyright 2019 CNES 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 requir...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 492, 37202, 653, 3712, 13789, 628, 220, 220, 15069, 13130, 31171, 1546, 628, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366,...
2.889392
2,649
import torch from os.path import join, isdir, isfile from os import listdir import re from src.wlstm.models import ReBiL
[ 11748, 28034, 198, 6738, 28686, 13, 6978, 1330, 4654, 11, 318, 15908, 11, 318, 7753, 198, 6738, 28686, 1330, 1351, 15908, 198, 11748, 302, 198, 198, 6738, 12351, 13, 40989, 301, 76, 13, 27530, 1330, 797, 23286, 43, 198 ]
3.128205
39
#!/usr/bin/env python3 import RPi.GPIO as GPIO # Import Raspberry Pi GPIO library import os, time os.system('mpg123 -g100 /home/pi/paw_patrol_courte.mp3 &') GPIO.setwarnings(False) # Ignore warning for now GPIO.setmode(GPIO.BOARD) # Use physical pin numbering GPIO.setup(10, GPIO.IN, pull_up_down=GPIO.PUD_DOWN) # Set...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 25812, 72, 13, 16960, 9399, 355, 50143, 1303, 17267, 24244, 13993, 50143, 5888, 198, 11748, 28686, 11, 640, 628, 198, 418, 13, 10057, 10786, 3149, 70, 10163, 220, 532, 70, 3...
2.762712
295
import time import sys if __name__ == '__main__': ''' @log_called_times_decorator def ff(): print 'f' while True: ff() time.sleep(1) ''' print_progress(45) print '' print_progress(x=20,max=200)
[ 11748, 640, 198, 11748, 25064, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 2488, 6404, 62, 7174, 62, 22355, 62, 12501, 273, 1352, 198, 220, 220, 220, 825, 31...
1.925926
135
from typing import List from os import getcwd from os.path import basename from pkg_resources import resource_filename from logging import Logger from logging import getLogger from pygame import event as Event from pygame import Surface from pygame.font import Font from albow.References import AttrRef from albow....
[ 198, 6738, 19720, 1330, 7343, 198, 198, 6738, 28686, 1330, 651, 66, 16993, 198, 6738, 28686, 13, 6978, 1330, 1615, 12453, 198, 198, 6738, 279, 10025, 62, 37540, 1330, 8271, 62, 34345, 198, 198, 6738, 18931, 1330, 5972, 1362, 198, 6738, ...
3.340426
517
from pyretina.mc import monte_carlo import numpy as np import json import os import os.path as osp import shutil number_of_events = 10 if __name__ == "__main__": main("config/mc.json")
[ 6738, 12972, 1186, 1437, 13, 23209, 1330, 937, 660, 62, 7718, 5439, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 33918, 198, 198, 11748, 28686, 198, 11748, 28686, 13, 6978, 355, 267, 2777, 198, 11748, 4423, 346, 198, 198, 17618,...
2.753623
69
import logging import os import time from math import inf from os import environ from threading import Thread import requests from redis import Redis from block import Block from blockchain import Blockchain from peer2peer import PeerToPeerMessage from transaction import Transaction logging.basicConfig(level=logging...
[ 11748, 18931, 198, 11748, 28686, 198, 11748, 640, 198, 6738, 10688, 1330, 1167, 198, 6738, 28686, 1330, 551, 2268, 198, 6738, 4704, 278, 1330, 14122, 198, 198, 11748, 7007, 198, 6738, 2266, 271, 1330, 2297, 271, 198, 198, 6738, 2512, 13...
3.651376
109
from ._timeit import timeit from ._progressbar import pbar_sql_query from ._retry import retry
[ 6738, 47540, 2435, 270, 1330, 640, 270, 198, 6738, 47540, 33723, 5657, 1330, 279, 5657, 62, 25410, 62, 22766, 198, 6738, 47540, 1186, 563, 1330, 1005, 563, 198 ]
3.392857
28
# -*- coding: utf-8 -*- DEBUG = True db = DAL('sqlite://storage.sqlite',pool_size=1,check_reserved=['all']) response.generic_patterns = ['*'] if request.is_local else [] from gluon.tools import Auth, Service, prettydate auth = Auth(db) auth.define_tables(username=False, signature=False) service = Service() ## confi...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 30531, 796, 6407, 198, 198, 9945, 796, 360, 1847, 10786, 25410, 578, 1378, 35350, 13, 25410, 578, 3256, 7742, 62, 7857, 28, 16, 11, 9122, 62, 411, 8520, 28, 17816...
3.10356
309
from .report_api import ReportAPI
[ 6738, 764, 13116, 62, 15042, 1330, 6358, 17614, 198 ]
3.777778
9
import pandas as pd import numpy as np from sklearn.preprocessing import normalize from .sparse_matrix_builder import build_from_conceptnet_table from .formats import load_hdf, save_hdf def retrofit(row_labels, dense_frame, sparse_csr, iterations=5, verbosity=0, max_cleanup_iters=20, orig_...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 35720, 13, 3866, 36948, 1330, 3487, 1096, 198, 6738, 764, 82, 29572, 62, 6759, 8609, 62, 38272, 1330, 1382, 62, 6738, 62, 43169, 3262, 62, 11487, 19...
2.847197
2,212
# Code from https://medium.com/datadriveninvestor/use-python-to-value-a-stock-automatically-3b520422ab6 by Bohmian # Importing required modules import pandas as pd import numpy as np import matplotlib.pyplot as plt import numpy as np import time from config import financial_model_prep pd.set_option('display.max_column...
[ 2, 6127, 422, 3740, 1378, 24132, 13, 785, 14, 19608, 324, 380, 574, 24859, 273, 14, 1904, 12, 29412, 12, 1462, 12, 8367, 12, 64, 12, 13578, 12, 2306, 296, 4142, 12, 18, 65, 20, 18638, 1828, 397, 21, 416, 347, 34028, 666, 198, 19...
2.231202
3,019
"""Extract simple aggregation features Reference: https://www.kaggle.com/gpreda/lanl-earthquake-eda-and-prediction """ import sys import numpy as np import pandas as pd from pathlib import Path from tqdm import tqdm import competition as cc from common import stop_watch TRAIN_CSV_DIRECTORY_PATH = cc.INPUT_PATH /...
[ 37811, 11627, 974, 2829, 46500, 3033, 628, 220, 220, 220, 20984, 25, 3740, 1378, 2503, 13, 74, 9460, 293, 13, 785, 14, 70, 28764, 64, 14, 9620, 75, 12, 16442, 421, 539, 12, 18082, 12, 392, 12, 28764, 2867, 198, 37811, 198, 198, 11...
2.46129
310
import os from datetime import datetime import json import matplotlib.pyplot as plt from tqdm import tqdm import torch import numpy as np from skimage import measure from shapely.geometry import Polygon, MultiPolygon from PIL import Image import cv2 #model = torch.hub.load('pytorch/vision:v0.10.0', 'deeplabv3_resn...
[ 198, 11748, 28686, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 33918, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 198, 11748, 28034, 198, 11748, 299, 32152...
2.428941
387
import mock import unittest from matrix.common.query.expression_query_results_reader import ExpressionQueryResultsReader
[ 11748, 15290, 198, 11748, 555, 715, 395, 198, 198, 6738, 17593, 13, 11321, 13, 22766, 13, 38011, 62, 22766, 62, 43420, 62, 46862, 1330, 41986, 20746, 25468, 33634, 628 ]
4.241379
29
################################################################################ # # Description: This script provides the formal specification of the study data # that will be extracted from the OpenSAFELY database. # # Output: output/data/input_*.csv.gz # # Author(s): M Green (edited by H Curtis) # Date...
[ 29113, 29113, 14468, 198, 2, 198, 2, 12489, 25, 770, 4226, 3769, 262, 8766, 20855, 286, 262, 2050, 1366, 220, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 326, 481, 307, 21242, 422, 262, 4946, 4090, 37,...
2.292791
9,447
import sqlalchemy from contextlib import contextmanager from typing import List, Iterator, Optional, Union, Tuple import logging from google.cloud.bigquery.dbapi.connection import Connection from google.cloud.bigquery.client import Client from google.cloud.bigquery.job import ExtractJobConfig from records_mover.db.unlo...
[ 11748, 44161, 282, 26599, 198, 6738, 4732, 8019, 1330, 4732, 37153, 198, 6738, 19720, 1330, 7343, 11, 40806, 1352, 11, 32233, 11, 4479, 11, 309, 29291, 198, 11748, 18931, 198, 6738, 23645, 13, 17721, 13, 14261, 22766, 13, 9945, 15042, 1...
3.697115
208
common_config = { } train_config = { "dataset_name": "matterport", "model_name": "ResNet18SkipConnection", "in_channel": 9, "device_ids": [0], "seed": 7122, "num_workers": 8, "mode": "train", "train_path": "/tmp2/tsunghan/new_matterport/v1", "lr": 1e-4, "batch_size": 8, ...
[ 198, 11321, 62, 11250, 796, 1391, 198, 220, 220, 220, 1782, 198, 198, 27432, 62, 11250, 796, 1391, 198, 220, 220, 220, 366, 19608, 292, 316, 62, 3672, 1298, 366, 47635, 634, 1600, 198, 220, 220, 220, 366, 19849, 62, 3672, 1298, 366,...
2.098107
581
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 17-8-13 上午11:33 # @Author : Tom.Lee # @CopyRight : 2016-2017 OpenBridge by yihecloud # @File : demo.py # @Product : PyCharm # @Docs : # @Source : import os from apscheduler.schedulers.blocking import B...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 7575, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 1596, 12, 23, 12, 1485, 220, 41468, 39355, 2...
2.135922
309
from __future__ import absolute_import import atexit from . import Users from . import Devices from . import Collections from . import Messaging from . import Code from .Developers import * # allows you to import Developer from ClearBladeCore from . import cbLogs ############# # USERS # #############...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 11748, 379, 37023, 198, 6738, 764, 1330, 18987, 198, 6738, 764, 1330, 29362, 198, 6738, 764, 1330, 50004, 198, 6738, 764, 1330, 10626, 3039, 198, 6738, 764, 1330, 6127, 198, 6738, 764...
2.722222
198
if __name__ == '__main__': __main__()
[ 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 11593, 12417, 834, 3419, 198 ]
2.142857
21
""" CRUD class for Projects app """ from crudbuilder.abstract import BaseCrudBuilder from .models.project import Project from .models.stakeholder import Stakeholder class ProjectCrud(BaseCrudBuilder): """ CRUD class for Project model """ model = Project search_fields = ["id", "name", "description"] t...
[ 37811, 8740, 8322, 1398, 329, 29898, 598, 37227, 198, 6738, 1067, 463, 38272, 13, 397, 8709, 1330, 7308, 13916, 463, 32875, 198, 198, 6738, 764, 27530, 13, 16302, 1330, 4935, 198, 6738, 764, 27530, 13, 301, 539, 13829, 1330, 520, 539, ...
3.052632
323
import FWCore.ParameterSet.Config as cms omtfFwVersionSource = cms.ESSource( "EmptyESSource", recordName = cms.string('L1TMuonOverlapFwVersionRcd'), iovIsRunNotTime = cms.bool(True), firstValid = cms.vuint32(1) ) ###OMTF FW ESProducer. omtfFwVersion = cms.ESProducer( "L1TMuonOverlapFwVersionESProd...
[ 11748, 48849, 14055, 13, 36301, 7248, 13, 16934, 355, 269, 907, 198, 198, 296, 27110, 37, 86, 14815, 7416, 796, 269, 907, 13, 1546, 7416, 7, 198, 220, 220, 220, 366, 40613, 1546, 7416, 1600, 198, 220, 220, 220, 1700, 5376, 796, 269,...
2.303318
211
from __future__ import unicode_literals import frappe from frappe.utils import getdate, validate_email_add, today import datetime from planning.planning.myfunction import mail_format_pms,actual_date_update,close_task_update @frappe.whitelist() @frappe.whitelist() @frappe.whitelist()
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 11748, 5306, 27768, 198, 6738, 5306, 27768, 13, 26791, 1330, 651, 4475, 11, 26571, 62, 12888, 62, 2860, 11, 1909, 198, 11748, 4818, 8079, 198, 6738, 5410, 13, 11578, 768, ...
2.910891
101
import json import subprocess import sys import redis
[ 11748, 33918, 198, 11748, 850, 14681, 198, 11748, 25064, 198, 198, 11748, 2266, 271, 628, 628 ]
3.625
16
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright Kitware 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 ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 29113, 29113, 7804, 4242, 21017, 198, 2, 220, 15069, 10897, 1574, 3457, 13, 198, 2, 198, 2, 220, 49962, 739, 262...
3.984064
251
from rest_framework import routers from .api import TodoViewSet router = routers.DefaultRouter() router.register('api/todos', TodoViewSet, 'todos') urlpatterns = router.urls
[ 6738, 1334, 62, 30604, 1330, 41144, 198, 198, 6738, 764, 15042, 1330, 309, 24313, 7680, 7248, 198, 198, 472, 353, 796, 41144, 13, 19463, 49, 39605, 3419, 198, 472, 353, 13, 30238, 10786, 15042, 14, 83, 375, 418, 3256, 309, 24313, 7680...
2.95
60
import os import pandas as pd import configuration
[ 11748, 28686, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 11748, 8398, 628 ]
3.785714
14
import sys from converter import processPreTrainModels if __name__ == '__main__': if len(sys.argv) < 4: print("usage: {} proto caffemodel output_dir".format(sys.argv[0])) exit(0) proto = sys.argv[1] model = sys.argv[2] output = sys.argv[3] file_path = processPreTrainModels( proto, ...
[ 198, 11748, 25064, 198, 6738, 38394, 1330, 1429, 6719, 44077, 5841, 1424, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 611, 18896, 7, 17597, 13, 853, 85, 8, 1279, 604, 25, 198, 220, 220, 220, 3601, 7...
2.290909
165
from unittest import TestCase from mock import Mock from cloudshell.cp.aws.domain.common.vm_details_provider import VmDetailsProvider
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 6738, 15290, 1330, 44123, 198, 198, 6738, 6279, 29149, 13, 13155, 13, 8356, 13, 27830, 13, 11321, 13, 14761, 62, 36604, 62, 15234, 1304, 1330, 569, 76, 24259, 29495, 628 ]
3.578947
38
#!/bin/env python """Evaluate a demosaicking model.""" import argparse import os import time import torch as th from torch.utils.data import DataLoader import numpy as np import ttools from ttools.modules.image_operators import crop_like import demosaicnet LOG = ttools.get_logger(__name__) def main(args): """E...
[ 2, 48443, 8800, 14, 24330, 21015, 198, 37811, 36, 2100, 4985, 257, 1357, 8546, 7958, 2746, 526, 15931, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 640, 198, 198, 11748, 28034, 355, 294, 198, 6738, 28034, 13, 26791, 13, 7890,...
2.091289
1,435
''' @author: Sebastian Lapuschkin @maintainer: Sebastian Lapuschkin @contact: sebastian.lapuschkin@hhi.fraunhofer.de, wojciech.samek@hhi.fraunhofer.de @date: 30.09.2015 @version: 1.0 @copyright: Copyright (c) 2015-2017, Sebastian Lapuschkin, Alexander Binder, Gregoire Montavon, Klaus-Robert Mueller, Wojciech Samek @li...
[ 7061, 6, 198, 31, 9800, 25, 26190, 26944, 385, 354, 5116, 198, 31, 76, 2913, 10613, 25, 26190, 26944, 385, 354, 5116, 198, 31, 32057, 25, 384, 65, 459, 666, 13, 37796, 385, 354, 5116, 31, 71, 5303, 13, 69, 430, 403, 71, 30288, 1...
2.373272
434
#!/usr/bin/env python3 from aws_cdk import App from python.python_stack import PythonStack app = App() PythonStack(app, "TestStack") app.synth()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 6738, 3253, 82, 62, 10210, 74, 1330, 2034, 198, 198, 6738, 21015, 13, 29412, 62, 25558, 1330, 11361, 25896, 628, 198, 1324, 796, 2034, 3419, 198, 37906, 25896, 7, 1324, 11, 366, ...
2.811321
53
from abc import ABCMeta, abstractmethod, abstractproperty class ParslExecutor(metaclass=ABCMeta): """Define the strict interface for all Executor classes. This is a metaclass that only enforces concrete implementations of functionality by the child classes. In addition to the listed methods, a Parsl...
[ 6738, 450, 66, 1330, 9738, 48526, 11, 12531, 24396, 11, 12531, 26745, 628, 198, 4871, 23042, 75, 23002, 38409, 7, 4164, 330, 31172, 28, 24694, 48526, 2599, 198, 220, 220, 220, 37227, 7469, 500, 262, 7646, 7071, 329, 477, 8393, 38409, ...
2.665345
1,261
def fourier_transform(yi): """a, b = fourier_transform(yi). Real-valued Fourier transform that determines the coefficients of the Fourier series for a given signal y. The coefficients of the cosine terms are returned in the array a; those of the sine terms in the array b. Frequencies start at ze...
[ 4299, 46287, 5277, 62, 35636, 7, 48111, 2599, 198, 220, 220, 220, 37227, 64, 11, 275, 796, 46287, 5277, 62, 35636, 7, 48111, 737, 198, 220, 220, 220, 6416, 12, 39728, 34296, 5277, 6121, 326, 15947, 262, 198, 220, 220, 220, 44036, 28...
2.320988
405
import cv2 import numpy as np from math import pow, sqrt points = [] letters = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ") image = np.zeros((512, 512, 3), np.uint8) while True: cv2.putText(image, f'TO CLEAR THE POINTS PRESS (c)', (20, 20), cv2.FONT_HERSHEY_PLAIN, 1, (255, 255, 255), 1) cv2.imshow("DISTANCE BETWEEN TWO...
[ 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 10688, 1330, 7182, 11, 19862, 17034, 198, 198, 13033, 796, 17635, 198, 15653, 796, 1351, 7203, 24694, 32988, 17511, 23852, 42, 31288, 45, 3185, 48, 49, 2257, 52, 30133, ...
2.141414
297
import json import pandas as pd import numpy as np from pandas import DataFrame """ output """ # Note: some output is shortened to save spaces. # This file introduces methods to group data. # Data from https://github.com/mwaskom/seaborn-data df = pd.read_csv('E:\\tips.csv') """ total_bill tip sex smoker ...
[ 11748, 33918, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 19798, 292, 1330, 6060, 19778, 198, 198, 37811, 198, 22915, 198, 37811, 198, 2, 5740, 25, 617, 5072, 318, 34464, 284, 3613, 9029, 13, 1...
1.973658
987
# -*- coding: utf-8 -*- # Copyright (C) 2012, Almar Klein # # Visvis is distributed under the terms of the (new) BSD License. # The full license can be found in 'license.txt'. def reportIssue(): """ help() Open a webbrowser with the visvis website at the issue list. """ import webbro...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 357, 34, 8, 2321, 11, 978, 3876, 22864, 198, 2, 198, 2, 6911, 4703, 318, 9387, 739, 262, 2846, 286, 262, 357, 3605, 8, 347, 10305, 13789, 13, 198, 2, 383...
2.638554
166
#!/usr/bin/python def printme3( str ): "This prints a passed string into this function" print(str) return def printme3too( str ): "This prints a passed string into this function" print(str) return
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 4299, 3601, 1326, 18, 7, 965, 15179, 198, 220, 220, 366, 1212, 20842, 257, 3804, 4731, 656, 428, 2163, 1, 198, 220, 220, 3601, 7, 2536, 8, 198, 220, 220, 1441, 198, 198, 4299, 3601, ...
2.893333
75
""" Week 2, day 7, lec 7 """ # i = 5 # while i >= 0: # i = i - 1 # if i == 3: # # break #breaks the smallest loop # # continue #skips the current iteration and moves on # # pass #does nothing, but is placehold if you need something for syntax # print(i) # for ...
[ 37811, 198, 20916, 362, 11, 1110, 767, 11, 443, 66, 767, 198, 37811, 198, 198, 2, 1312, 796, 642, 198, 2, 981, 1312, 18189, 657, 25, 198, 2, 220, 220, 220, 220, 1312, 796, 1312, 532, 352, 198, 2, 220, 220, 220, 220, 611, 1312, ...
1.981481
324
import pandas as pd import numpy as np from collections import Counter from datetime import datetime from nltk.tokenize import RegexpTokenizer from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer import re def annotate_logs(comments, tickets): """ Annotates comments and tickets with additional...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 17268, 1330, 15034, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 299, 2528, 74, 13, 30001, 1096, 1330, 797, 25636, 79, 30642, 7509, 198, 6738, 410, ...
2.62787
4,356
from lldbsuite.test import decorators from lldbsuite.test import lldbinline lldbinline.MakeInlineTest( __file__, globals(), [ decorators.skipIfFreeBSD, decorators.skipIfLinux, decorators.skipIfWindows, decorators.expectedFailureAll( oslist=['macosx'], archs=['i386'], ...
[ 6738, 32660, 67, 1443, 84, 578, 13, 9288, 1330, 11705, 2024, 198, 6738, 32660, 67, 1443, 84, 578, 13, 9288, 1330, 32660, 67, 8800, 1370, 198, 198, 297, 67, 8800, 1370, 13, 12050, 818, 1370, 14402, 7, 198, 220, 220, 220, 11593, 7753,...
2.242038
157
"""Adapt repository rules in npm_import.bzl to be called from MODULE.bazel See https://bazel.build/docs/bzlmod#extension-definition """ load("//js/private:pnpm_utils.bzl", "pnpm_utils") load("//js/private:translate_pnpm_lock.bzl", translate_pnpm_lock_lib = "translate_pnpm_lock") load("//js:npm_import.bzl", "npm_import...
[ 37811, 48003, 16099, 3173, 287, 30599, 62, 11748, 13, 65, 48274, 284, 307, 1444, 422, 33893, 13, 65, 41319, 198, 6214, 3740, 1378, 65, 41319, 13, 11249, 14, 31628, 14, 65, 48274, 4666, 2, 2302, 3004, 12, 46758, 198, 37811, 198, 198, ...
2.574751
301
# Copyright 2015-2018 Yelp 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,...
[ 2, 15069, 1853, 12, 7908, 44628, 3457, 13, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743...
2.649127
4,124
# -*- coding: utf-8 -*- # # Copyright (C) 2019 CESNET. # # Invenio Records Presentation is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """ Example Presentation workflow.""" from invenio_workflows import WorkflowEngine from invenio_re...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 357, 34, 8, 13130, 42700, 12884, 13, 198, 2, 198, 2, 554, 574, 952, 13407, 21662, 341, 318, 1479, 3788, 26, 345, 460, 17678, 4163, 340, 290, 14, ...
3.175879
199
#!/usr/bin/python # -*- coding: utf-8 -*- #add the path of the twitter egg import sys egg_path = '/home/users/web/........./cgi-bin/PyPkg/twitter-1.14.3-py2.7.egg' sys.path.append(egg_path) # Import the CGI, string, sys, and md5crypt modules import json, urllib2, re, time, datetime, sys, cgi, os import sq...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 201, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 201, 198, 2, 2860, 262, 3108, 286, 262, 17044, 5935, 201, 198, 11748, 25064, 201, 198, 33856, 62, 6978, 796, 31051...
1.915826
2,281
""" QAQC Viewer based on Chaco & Traits """ #from enthought.chaco.example_support import COLOR_PALETTE #from enthought.enable.example_support import DemoFrame, demo_main # Enthought library imports from enthought.enable.api import Window, Component, ComponentEditor from enthought.traits.api import HasTraits, Instance...
[ 37811, 198, 48, 32, 48, 34, 3582, 263, 1912, 319, 609, 10602, 1222, 4759, 896, 198, 37811, 198, 198, 2, 6738, 920, 71, 2917, 13, 354, 10602, 13, 20688, 62, 11284, 1330, 20444, 1581, 62, 47, 1847, 2767, 9328, 198, 2, 6738, 920, 71,...
3.240356
337
import datetime from . import relations
[ 198, 11748, 4818, 8079, 198, 198, 6738, 764, 1330, 2316, 628, 628, 628 ]
3.615385
13
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from comics.models import Comic, ComicChapter # class PageFileInline(admin.TabularInline): # model = ComicChapter # # # class PageAdmin(admin.ModelAdmin): # inlines = [PageFileInline, ] # class ChapterInline(adm...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 12770, 13, 27530, 1330, 19949, 11, 19949, ...
2.728571
210
# This program displays 100 lowercase letters, fifteen per line import turtle from random import randint main() print() # Draw a line from (x1, y1) to (x2, y2) # def drawLine(x1, y1, x2, y2): # turtle.penup() # turtle.goto(x1, y1) # turtle.pendown() # turtle.goto(x2, y2) # def writeText(s, x, y): # turtle.pe...
[ 2, 770, 1430, 11298, 1802, 2793, 7442, 7475, 11, 17280, 583, 1627, 198, 198, 11748, 28699, 198, 6738, 4738, 1330, 43720, 600, 628, 628, 628, 198, 12417, 3419, 198, 198, 4798, 3419, 198, 198, 2, 15315, 257, 1627, 422, 357, 87, 16, 11...
2.814132
651
from django.urls import path from . import views urlpatterns = [ path('', views.index, name='index'), path('allrecipes/', views.allrecipes, name='allrecipes'), path('newrecipe/', views.newrecipe, name='newrecipe'), path('profile/', views.profile, name='profile'), path('newuser/', views.newuser, na...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 764, 1330, 5009, 628, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 10786, 3256, 5009, 13, 9630, 11, 1438, 11639, 9630, 33809, 198, 220, 220, 220, 3108, 10786, 439, ...
2.723077
195
# Importing the hashing library import hashlib # Importing the visual libraries from PyInquirer import Separator, prompt from termcolor import colored # Defining the hash function.
[ 2, 17267, 278, 262, 49544, 5888, 198, 11748, 12234, 8019, 198, 198, 2, 17267, 278, 262, 5874, 12782, 198, 6738, 9485, 818, 29782, 81, 1330, 8621, 283, 1352, 11, 6152, 198, 6738, 3381, 8043, 1330, 16396, 198, 198, 2, 2896, 3191, 262, ...
3.957447
47
#----------------------------------------------------------------------------- # # Copyright (c) 2007 by Enthought, Inc. # All rights reserved. # #----------------------------------------------------------------------------- """ The UI service for the Data plugin. """ # Standard library imports. import logging # E...
[ 2, 10097, 32501, 198, 2, 198, 2, 220, 15069, 357, 66, 8, 4343, 416, 2039, 28895, 11, 3457, 13, 198, 2, 220, 1439, 2489, 10395, 13, 198, 2, 198, 2, 10097, 32501, 198, 37811, 198, 464, 12454, 2139, 329, 262, 6060, 13877, 13, 198, ...
2.889734
1,315
import pytest from channels.db import database_sync_to_async from channels.testing import WebsocketCommunicator from ..api.model_mixins import Request from ..api.push import push_message_about_instance, report_error from ..api.serializers import ( EpicSerializer, ProjectSerializer, ScratchOrgSerializer, ...
[ 11748, 12972, 9288, 198, 6738, 9619, 13, 9945, 1330, 6831, 62, 27261, 62, 1462, 62, 292, 13361, 198, 6738, 9619, 13, 33407, 1330, 47736, 5459, 30813, 26407, 198, 198, 6738, 11485, 15042, 13, 19849, 62, 19816, 1040, 1330, 19390, 198, 673...
2.871795
273
import markdown from flask import redirect, url_for, flash, render_template, session, request, current_app, abort from flask_login import current_user, login_user, logout_user, login_required from cajitos_site import bcrypt from cajitos_site.users import users from cajitos_site.users.forms import RegistrationForm, Log...
[ 11748, 1317, 2902, 198, 6738, 42903, 1330, 18941, 11, 19016, 62, 1640, 11, 7644, 11, 8543, 62, 28243, 11, 6246, 11, 2581, 11, 1459, 62, 1324, 11, 15614, 198, 6738, 42903, 62, 38235, 1330, 1459, 62, 7220, 11, 17594, 62, 7220, 11, 260...
3.018325
382
import json import os from typing import Callable, Union from typing import Optional, List import torch from sdc.constants import SCENE_TAG_TYPE_TO_OPTIONS, VALID_TRAJECTORY_TAGS from ..features import FeatureProducerBase from ..proto import get_tags_from_request, proto_to_dict from ..utils import ( get_file_path...
[ 11748, 33918, 198, 11748, 28686, 198, 6738, 19720, 1330, 4889, 540, 11, 4479, 198, 6738, 19720, 1330, 32233, 11, 7343, 198, 198, 11748, 28034, 198, 198, 6738, 264, 17896, 13, 9979, 1187, 1330, 6374, 39267, 62, 42197, 62, 25216, 62, 1046...
2.722513
191
__all__ = ["file_read", 'image_deal', 'search_order', 'static_data']
[ 834, 439, 834, 796, 14631, 7753, 62, 961, 1600, 705, 9060, 62, 31769, 3256, 705, 12947, 62, 2875, 3256, 705, 12708, 62, 7890, 20520, 201, 198 ]
2.692308
26
''' @Author: Pawn @Date: 2020-08-12 @LastEditTime: 2020-08-12 17:06:08 @Description: example for module timer @FilePath: example_wdt.py ''' from machine import WDT from machine import Timer timer1 = Timer(Timer.Timer1) if __name__ == '__main__': wdt = WDT(20) # 启动看门狗,间隔时长 timer1.start(period=15000, mode=ti...
[ 7061, 6, 198, 31, 13838, 25, 350, 3832, 198, 31, 10430, 25, 12131, 12, 2919, 12, 1065, 198, 31, 5956, 18378, 7575, 25, 12131, 12, 2919, 12, 1065, 1596, 25, 3312, 25, 2919, 198, 31, 11828, 25, 1672, 329, 8265, 19781, 198, 31, 8979,...
1.994792
192
from django.conf.urls import url from django.urls import reverse , resolve from rest_framework import status from rest_framework.test import APITestCase from users.views import ( followUser , users , UserProfileUpdate , ProfilePictureUpdate , usersRecommended , user , userMumbles, userArticles, passwordCha...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 837, 10568, 198, 6738, 1334, 62, 30604, 1330, 3722, 198, 6738, 1334, 62, 30604, 13, 9288, 1330, 3486, 2043, 395, 20448, 198, ...
3.633929
112
import configparser import os from redmine import Redmine
[ 11748, 4566, 48610, 198, 11748, 28686, 198, 6738, 2266, 3810, 1330, 2297, 3810, 198 ]
4.142857
14
############################################################################## # # Copyright (c) 2005 Zope Foundation and Contributors. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS I...
[ 29113, 29113, 7804, 4242, 2235, 198, 2, 198, 2, 15069, 357, 66, 8, 5075, 1168, 3008, 5693, 290, 25767, 669, 13, 198, 2, 198, 2, 770, 3788, 318, 2426, 284, 262, 8617, 286, 262, 1168, 3008, 5094, 13789, 11, 198, 2, 10628, 362, 13, ...
2.572399
1,913
emm_fmt = """<?xml version="1.0" encoding="utf-8" ?> <EIGEN_MM> <OPTIONS _splitmaxiters="10" _nodesperevaluator="1" _subproblemsperevaluator="1" _totalsubproblems="1" _nevaluators="1" _taskspernode="%d" _nevals="-1" _nk="10" _nb="4" _p="0" _nv="10" _raditers="20" _splittol="0.9" ...
[ 368, 76, 62, 69, 16762, 796, 37227, 47934, 19875, 2196, 2625, 16, 13, 15, 1, 21004, 2625, 40477, 12, 23, 1, 5633, 29, 198, 27, 36, 3528, 1677, 62, 12038, 29, 198, 220, 220, 220, 1279, 3185, 51, 11053, 220, 198, 197, 197, 62, 353...
1.857414
526
import os # Workarround for nvidia propietary drivers import ctypes import ctypes.util ctypes.CDLL(ctypes.util.find_library("GL"), mode=ctypes.RTLD_GLOBAL) # end of Workarround from qtpy.QtCore import Signal, Slot, QUrl, QTimer from qtpy.QtQuickWidgets import QQuickWidget from qtpyvcp.plugins import getPlugin fr...
[ 11748, 28686, 198, 198, 2, 5521, 283, 744, 329, 299, 21744, 2632, 1155, 560, 6643, 198, 198, 11748, 269, 19199, 198, 11748, 269, 19199, 13, 22602, 198, 198, 310, 9497, 13, 8610, 3069, 7, 310, 9497, 13, 22602, 13, 19796, 62, 32016, 7...
2.70852
223
# Generated by Django 3.2.9 on 2021-11-08 04:50 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 24, 319, 33448, 12, 1157, 12, 2919, 8702, 25, 1120, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
from constants import * import time import threading from chaos import *
[ 6738, 38491, 1330, 1635, 198, 11748, 640, 198, 11748, 4704, 278, 198, 6738, 11918, 1330, 1635, 198 ]
4.294118
17
import argparse import logging import os from .exporter import add_stdout_logging, establish_and_return_ldap_connection, \ establish_and_return_session, fake_connection, fetch_current_ldap_users, \ fetch_users_to_sync, get_config_or_exit, logger, sync_all logger = logging.getLogger('ldap_sync') NAME_LE...
[ 11748, 1822, 29572, 198, 11748, 18931, 198, 11748, 28686, 198, 198, 6738, 764, 1069, 26634, 1330, 751, 62, 19282, 448, 62, 6404, 2667, 11, 4474, 62, 392, 62, 7783, 62, 335, 499, 62, 38659, 11, 3467, 198, 220, 220, 220, 220, 4474, 62...
2.502358
424
""" visdex: Exploratory graphs The exploratory graphs section defines specialised data visualisations that can be generated by the user on request """ import logging from dash import html, dcc import dash_bootstrap_components as dbc from dash.dependencies import Input, Output, State, MATCH import plotly.graph_objects...
[ 37811, 198, 4703, 67, 1069, 25, 5905, 273, 2870, 28770, 198, 198, 464, 39180, 2870, 28770, 2665, 15738, 2041, 1417, 1366, 5874, 38189, 326, 198, 5171, 307, 7560, 416, 262, 2836, 319, 2581, 198, 37811, 198, 11748, 18931, 198, 198, 6738, ...
2.238411
906
# Copyright 2012-2017, Intel Corporation, All Rights Reserved. # # This software is supplied under the terms of a license # agreement or nondisclosure agreement with Intel Corp. # and may not be copied or disclosed except in accordance # with the terms of that agreement. import os import re import micp.kernel as mic...
[ 2, 220, 15069, 2321, 12, 5539, 11, 8180, 10501, 11, 1439, 6923, 33876, 13, 198, 2, 198, 2, 770, 3788, 318, 14275, 739, 262, 2846, 286, 257, 5964, 198, 2, 4381, 393, 30745, 271, 17966, 4381, 351, 8180, 11421, 13, 198, 2, 290, 743, ...
3.125
288
import numpy as np import galsim def BBSED(T): """(unnormalized) Blackbody SED for temperature T in Kelvin. """ waves_nm = np.arange(330.0, 1120.0, 10.0) flambda = planck(T, waves_nm*1e-9) return galsim.SED( galsim.LookupTable(waves_nm, flambda), wave_type='nm', flux_type='...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 308, 874, 320, 628, 198, 4299, 347, 4462, 1961, 7, 51, 2599, 198, 220, 220, 220, 13538, 18109, 403, 11265, 1143, 8, 2619, 2618, 311, 1961, 329, 5951, 309, 287, 46577, 13, 198, 220, 220, 220...
2.055215
163
import re from elasticsearch import Elasticsearch, helpers from itertools import islice # initialize Elasticsearch client es = Elasticsearch()
[ 11748, 302, 198, 6738, 27468, 12947, 1330, 48567, 12947, 11, 49385, 198, 6738, 340, 861, 10141, 1330, 318, 75, 501, 198, 198, 2, 41216, 48567, 12947, 5456, 198, 274, 796, 48567, 12947, 3419, 628, 628 ]
4.2
35
import argparse import configparser import functools import textwrap import pytest import configfetch fetch_ = configfetch.fetch fetch = functools.partial( configfetch.fetch, option_builder=configfetch.FiniOptionBuilder) # blank string returns ``None`` # Just checking the standard library's behavi...
[ 198, 11748, 1822, 29572, 198, 11748, 4566, 48610, 198, 11748, 1257, 310, 10141, 198, 11748, 2420, 37150, 198, 198, 11748, 12972, 9288, 198, 198, 11748, 4566, 69, 7569, 198, 198, 69, 7569, 62, 796, 4566, 69, 7569, 13, 69, 7569, 198, 19...
3.035211
142
import os from portal_gun.commands.helpers import get_provider_config, get_portal_spec, get_portal_name, \ get_provider_from_portal from portal_gun.context_managers.no_print import no_print from .base_command import BaseCommand from .handlers import create_handler
[ 11748, 28686, 198, 198, 6738, 17898, 62, 7145, 13, 9503, 1746, 13, 16794, 364, 1330, 651, 62, 15234, 1304, 62, 11250, 11, 651, 62, 634, 282, 62, 16684, 11, 651, 62, 634, 282, 62, 3672, 11, 3467, 198, 197, 1136, 62, 15234, 1304, 62...
3.152941
85
import time import xcffib.xproto import xpybutil import xpybutil.event as event import xpybutil.ewmh as ewmh import xpybutil.motif as motif import xpybutil.icccm as icccm import xpybutil.rect as rect import xpybutil.util as util import xpybutil.window as window from debug import debug import config import state imp...
[ 11748, 640, 198, 198, 11748, 2124, 66, 487, 571, 13, 87, 1676, 1462, 198, 198, 11748, 2124, 9078, 4360, 346, 198, 11748, 2124, 9078, 4360, 346, 13, 15596, 355, 1785, 198, 11748, 2124, 9078, 4360, 346, 13, 413, 76, 71, 355, 304, 2637...
2.89441
161
from django.db import models
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 201, 198, 201, 198 ]
2.909091
11
#!/usr/bin/env python # coding=utf-8 # Stan 2018-09-27 from __future__ import (division, absolute_import, print_function, unicode_literals) import json from sqlalchemy.types import UserDefinedType, TypeDecorator, Text # class JsonType(UserDefinedType): # def get_col_spec(self, **kw): #...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 28, 40477, 12, 23, 198, 2, 7299, 2864, 12, 2931, 12, 1983, 198, 198, 6738, 11593, 37443, 834, 1330, 357, 21426, 11, 4112, 62, 11748, 11, 198, 220, 220, 220, 220, 220, 220...
2.268707
294
# -*- coding: utf-8 -*- import os.path from chaoslib.settings import get_loaded_settings, load_settings, save_settings settings_dir = os.path.join(os.path.dirname(__file__), "fixtures")
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 28686, 13, 6978, 198, 6738, 11918, 8019, 13, 33692, 1330, 651, 62, 14578, 62, 33692, 11, 3440, 62, 33692, 11, 3613, 62, 33692, 628, 198, 33692, 62, 15908, 796, ...
2.811594
69
import os SECRET_KEY = os.getenv("SECRET_KEY")
[ 11748, 28686, 628, 198, 23683, 26087, 62, 20373, 796, 28686, 13, 1136, 24330, 7203, 23683, 26087, 62, 20373, 4943, 198 ]
2.45
20
# Generated by Django 2.2 on 2021-09-06 08:38 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 319, 33448, 12, 2931, 12, 3312, 8487, 25, 2548, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.892857
28
from source.etl import ETL x = ETL() df = x.extract(True) x.transform(df) #x.load(df)
[ 6738, 2723, 13, 316, 75, 1330, 12152, 43, 198, 198, 87, 796, 12152, 43, 3419, 198, 198, 7568, 796, 2124, 13, 2302, 974, 7, 17821, 8, 198, 198, 87, 13, 35636, 7, 7568, 8, 198, 2, 87, 13, 2220, 7, 7568, 8 ]
2.095238
42
"""Advent of Code 2021, day 9: Smoke Basin""" def main(input_matrix: tuple[str]) -> int: """ Find all of the low points on your heightmap. What is the sum of the risk levels of all low points on your heightmap? """ # It's a brute force approach that does not scale to part two, # but it's what I could think of w...
[ 37811, 2782, 1151, 286, 6127, 33448, 11, 1110, 860, 25, 25416, 32666, 37811, 198, 198, 4299, 1388, 7, 15414, 62, 6759, 8609, 25, 46545, 58, 2536, 12962, 4613, 493, 25, 198, 197, 37811, 198, 197, 16742, 477, 286, 262, 1877, 2173, 319, ...
2.689521
773
import sys import random from trace_gen import * if __name__ == "__main__": random.seed(0) num_cache_p = int(sys.argv[1]) block_size_in_words_p = int(sys.argv[2]) tg = TraceGen(block_size_in_words_p) tg.clear_tags() #words = (2**18)/num_cache_p # 1MB words = (2**18)/num_cache_p # 1MB max_range = (2*...
[ 11748, 25064, 198, 11748, 4738, 198, 6738, 12854, 62, 5235, 1330, 1635, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 4738, 13, 28826, 7, 15, 8, 198, 220, 997, 62, 23870, 62, 79, 796, 493, 7, 17597, ...
2.15415
253
# Copyright 2015 Isotoma Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
[ 2, 15069, 1853, 1148, 313, 6086, 15302, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921...
3.577273
220
from pymbs.processing.loops.loop import Loop from pymbs.common.functions import sqrt from pymbs.processing import Frame from pymbs.processing.loads.constraint import Constraint from numpy import pi from pymbs.symbolics import Matrix, eye, cos, sin, atan, atan2, acos, zeros, transpose AL = 'FB_%s_AL' BE = 'FB_%s_BE'...
[ 6738, 279, 4948, 1443, 13, 36948, 13, 5439, 2840, 13, 26268, 1330, 26304, 198, 6738, 279, 4948, 1443, 13, 11321, 13, 12543, 2733, 1330, 19862, 17034, 198, 6738, 279, 4948, 1443, 13, 36948, 1330, 25184, 198, 198, 6738, 279, 4948, 1443, ...
1.831097
4,695
#!/usr/bin/env python2.7 # # Copyright 2017 Google 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 l...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 13, 22, 198, 2, 198, 2, 15069, 2177, 3012, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 77...
2.927852
596
comma="," result="SET ANSI_NULLS ON\n" result+="GO\n" result+="SET QUOTED_IDENTIFIER ON\n" result+="GO\n" result+="CREATE PROCEDURE "+Model.TableName+"_Update\n" result+=mapcols(pars) result+="AS\n" result+="BEGIN\n" result+="SET NOCOUNT ON;\n" result+="update [dbo].["+Model.TableName+"]\n" result+=" set (" result+=map...
[ 785, 2611, 28, 2430, 198, 20274, 2625, 28480, 3537, 11584, 62, 33991, 50, 6177, 59, 77, 1, 198, 20274, 10, 2625, 11230, 59, 77, 1, 198, 20274, 10, 2625, 28480, 19604, 2394, 1961, 62, 25256, 5064, 38311, 6177, 59, 77, 1, 198, 20274, ...
2.181818
198
# -*- coding: utf-8 -*- import unittest import tests.common import core from core.localisation import _ from core import Rpg import models.player from models.saved_game import saved_game import json import sqlite3
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 555, 715, 395, 198, 198, 11748, 5254, 13, 11321, 198, 11748, 4755, 198, 6738, 4755, 13, 12001, 5612, 1330, 4808, 198, 6738, 4755, 1330, 371, 6024, 198, 11748, 498...
3.191176
68