content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from __future__ import division from shapely.wkt import loads as wkt_loads import os import shapely import shapely.geometry import shapely.affinity import h5py import pandas as pd import tifffile as tiff from numba import jit, njit from tqdm import tqdm from collections import defaultdict import csv import sys impor...
[ 6738, 11593, 37443, 834, 1330, 7297, 198, 198, 6738, 5485, 306, 13, 86, 21841, 1330, 15989, 355, 266, 21841, 62, 46030, 198, 198, 11748, 28686, 198, 11748, 5485, 306, 198, 11748, 5485, 306, 13, 469, 15748, 198, 11748, 5485, 306, 13, 2...
2.509509
1,262
import tkinter import time import othello as oth LIGHT_FONT = ("Nexa light", 12) BOLD_FONT = ("Nexa Bold", 11) CELL_LENGTH = 60 COL_ROW_NAME_LENGTH = 40 DELAY = 1.5 CRED2 = '\33[91m' CYELLOW2 = '\33[93m' CURRENT_NUMB_CALL = 0 if __name__ == '__main__': game_logic_instance = oth.GameLogic() game_logic_inst...
[ 11748, 256, 74, 3849, 198, 11748, 640, 198, 198, 11748, 267, 1169, 18798, 355, 267, 400, 198, 198, 43, 9947, 62, 37, 35830, 796, 5855, 45, 1069, 64, 1657, 1600, 1105, 8, 198, 33, 15173, 62, 37, 35830, 796, 5855, 45, 1069, 64, 2705...
2.147059
170
""" Java Maven Workflow """ from aws_lambda_builders.workflow import BaseWorkflow, Capability from aws_lambda_builders.actions import CopySourceAction, CleanUpAction from aws_lambda_builders.workflows.java.actions import JavaCopyDependenciesAction, JavaMoveDependenciesAction from aws_lambda_builders.workflows.java.util...
[ 37811, 198, 29584, 337, 4005, 5521, 11125, 198, 37811, 198, 6738, 3253, 82, 62, 50033, 62, 50034, 13, 1818, 11125, 1330, 7308, 12468, 11125, 11, 4476, 1799, 198, 6738, 3253, 82, 62, 50033, 62, 50034, 13, 4658, 1330, 17393, 7416, 12502, ...
3.181818
308
import argparse import csv import os from collections import OrderedDict from datetime import datetime from github import Github if __name__ == "__main__": print("Running...\n") # Variable to let us know how long this takes... begin_time = datetime.now() # Setup arguments parser = argparse.Argu...
[ 11748, 1822, 29572, 198, 11748, 269, 21370, 198, 11748, 28686, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 33084, 1330, 38994, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 1...
2.233522
2,655
#!/usr/bin/python import socket import json import os import pwd UDP_IP = "127.0.0.1" UDP_PORT = 5006 sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) # Internet UDP user = pwd.getpwuid( os.getuid() ).pw_name print "Running as", user session_list = [] while (True) : display_menu() cmd = raw_input("a...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 11748, 17802, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 279, 16993, 198, 198, 52, 6322, 62, 4061, 796, 366, 16799, 13, 15, 13, 15, 13, 16, 1, 198, 52, 6322, 62, 15490, 796, 5323, ...
2.126386
451
# DROP TABLES songplay_table_drop = "DROP TABLE IF EXISTS songplays;" user_table_drop = "DROP TABLE IF EXISTS users;" song_table_drop = "DROP TABLE IF EXISTS songs;" artist_table_drop = "DROP TABLE IF EXISTS artists;" time_table_drop = "DROP TABLE IF EXISTS time;" # CREATE TABLES songplay_table_create = (""" CR...
[ 2, 10560, 3185, 309, 6242, 28378, 198, 198, 34050, 1759, 62, 11487, 62, 14781, 796, 366, 7707, 3185, 43679, 16876, 7788, 1797, 4694, 3496, 26024, 26033, 198, 7220, 62, 11487, 62, 14781, 796, 366, 7707, 3185, 43679, 16876, 7788, 1797, 46...
2.331636
1,375
#! /usr/bin/python3 # # Copyright (c) 2017 Intel Corporation # # SPDX-License-Identifier: Apache-2.0 # # pylint: disable = missing-docstring import os import commonl.testing import tcfl.tc import tcfl.tc_zephyr_sanity import tcfl.tl srcdir = os.path.dirname(__file__) ttbd = commonl.testing.test_ttbd(config_files = ...
[ 2, 0, 1220, 14629, 14, 8800, 14, 29412, 18, 198, 2, 198, 2, 15069, 357, 66, 8, 2177, 8180, 10501, 198, 2, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 2, 198, 2, 279, 2645, 600, 25, 15560, 7...
2.181443
485
''' Created on 30 Jun 2014 @author: julianporter ''' import random import unittest import multiprocessing import collections import tempfile import time import os import sys from .actions import EventGenerator, EventObserver if __name__=='__main__': unittest.main(exit=False)
[ 7061, 6, 198, 41972, 319, 1542, 7653, 1946, 198, 198, 31, 9800, 25, 474, 377, 666, 26634, 198, 7061, 6, 628, 198, 11748, 4738, 198, 11748, 555, 715, 395, 198, 11748, 18540, 305, 919, 278, 198, 11748, 17268, 198, 11748, 20218, 7753, ...
2.625
120
# coding: utf-8 """***************************************************************************** * Copyright (C) 2019 Microchip Technology Inc. and its subsidiaries. * * Subject to your compliance with these terms, you may use Microchip software * and any derivatives exclusively with Microchip products. It is your * re...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 37811, 17174, 17174, 4557, 35625, 198, 9, 15069, 357, 34, 8, 13130, 4527, 35902, 8987, 3457, 13, 290, 663, 34943, 13, 198, 9, 198, 9, 15540, 284, 534, 11846, 351, 777, 2846, 11, 345, 743, 779, ...
4.124324
370
import numpy as np import h5py from typing import List, Tuple, Dict, Callable
[ 11748, 299, 32152, 355, 45941, 198, 11748, 289, 20, 9078, 198, 6738, 19720, 1330, 7343, 11, 309, 29291, 11, 360, 713, 11, 4889, 540, 198 ]
3.12
25
from django.db import models from django.contrib.auth.models import AbstractUser, BaseUserManager, PermissionsMixin # Create your models here.
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 27741, 12982, 11, 7308, 12982, 13511, 11, 2448, 8481, 35608, 259, 198, 2, 13610, 534, 4981, 994, 13, 198 ]
3.763158
38
from django.db import models from django.contrib.postgres.fields import JSONField from django.utils import timezone from model_utils.models import TimeStampedModel from .conf import settings from .manager import MessageManager, MessageAllManager
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 7353, 34239, 13, 25747, 1330, 19449, 15878, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 198, 198, 6738, 2746, 62, 26791, 13, 27530, 1330, 38...
3.952381
63
import numpy as np import pandas as pd ############################################################################### # Load data df_train = pd.read_csv("train_numerical_head.csv") df_train.head() feats = df_train.drop(str(42), axis=1) X_train = feats.values #features y_train = df_train[str(42)].values #tar...
[ 11748, 299, 32152, 355, 45941, 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 201, 198, 29113, 29113, 7804, 4242, 21017, 201, 198, 2, 8778, 1366, 201, 198, 7568, 62, 27432, 796, 279, 67, 13, 961, 62, 40664, 7203, 27432, 62, 77...
2.375486
514
# -*- coding: utf-8 -*- """ http/2 adapter implements ~~~~~~~~~~~~~ This module contains the transport adapters that Requests uses to define and maintain connections. """ import requests from requests.exceptions import InvalidSchema as _SchemaError from urllib3.poolmanager import PoolManager, proxy_from_url from ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 4023, 14, 17, 21302, 23986, 198, 15116, 8728, 93, 198, 198, 1212, 8265, 4909, 262, 4839, 46363, 326, 9394, 3558, 3544, 284, 8160, 198, 392, 5529, 8787, ...
2.7227
1,511
from typing import Any, Dict, Type, TypeVar, Union import attr from ..types import UNSET, Unset T = TypeVar("T", bound="Time") @attr.s(auto_attribs=True) class Time: """ """ time: str calendarmodel: Union[Unset, str] = UNSET timezone: Union[Unset, int] = UNSET before: Union[Unset, int] = UNSET...
[ 6738, 19720, 1330, 4377, 11, 360, 713, 11, 5994, 11, 5994, 19852, 11, 4479, 198, 198, 11748, 708, 81, 198, 198, 6738, 11485, 19199, 1330, 4725, 28480, 11, 791, 2617, 198, 198, 51, 796, 5994, 19852, 7203, 51, 1600, 5421, 2625, 7575, ...
2.482143
168
######## # Copyright (c) 2016 GigaSpaces Technologies Ltd. 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...
[ 7804, 198, 2, 15069, 357, 66, 8, 1584, 402, 13827, 4561, 2114, 21852, 12052, 13, 1439, 2489, 10395, 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, 4...
3.285714
280
result = [] for astronaut in DATA: for i, mission in enumerate(astronaut.pop('missions'), start=1): for field,value in mission.items(): column_name = f'mission{i}_{field}' astronaut[column_name] = value result.append(astronaut)
[ 198, 20274, 796, 17635, 198, 1640, 33779, 287, 42865, 25, 198, 220, 220, 220, 329, 1312, 11, 4365, 287, 27056, 378, 7, 459, 1313, 2306, 13, 12924, 10786, 8481, 33809, 923, 28, 16, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 329, ...
2.445455
110
# -*- coding: utf-8 -*- from pyleecan.Classes.Arc import Arc from pyleecan.Classes.Arc1 import Arc1 from pyleecan.Classes.Arc2 import Arc2 from pyleecan.Classes.Arc3 import Arc3 from pyleecan.Classes.Circle import Circle from pyleecan.Classes.CondType11 import CondType11 from pyleecan.Classes.CondType12 import CondTyp...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 279, 2349, 721, 272, 13, 9487, 274, 13, 24021, 1330, 10173, 198, 6738, 279, 2349, 721, 272, 13, 9487, 274, 13, 24021, 16, 1330, 10173, 16, 198, 6738, 279, ...
2.915823
2,174
from django.conf.urls import url from django.conf.urls import patterns from pyday_social_network import views app_name = 'pyday_social_network' urlpatterns = [ url(r'^upload_picture/$', views.UploadPictureView.as_view(), name='upload_picture'), url(r'^upload_song/$', views.UploadSongView.as_view(), name='uplo...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 7572, 198, 198, 6738, 12972, 820, 62, 14557, 62, 27349, 1330, 5009, 198, 198, 1324, 62, 3672, 796, 705, 9078, 820, 62, ...
2.53629
496
import numpy as np import pandas as pd from ploomber.testing import pandas as pd_t
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 458, 4207, 527, 13, 33407, 1330, 19798, 292, 355, 279, 67, 62, 83, 628, 628, 198 ]
2.9
30
import swgpy from swgpy.object import * from swgpy.sui import RadialMenu, RadialOptions, RadialOptionsList, RadialIdentifier from swgpy.static import ElevatorData, ElevatorDataList from swgpy.utility import vector3, quat
[ 11748, 1509, 70, 9078, 198, 6738, 1509, 70, 9078, 13, 15252, 1330, 1635, 198, 6738, 1509, 70, 9078, 13, 2385, 72, 1330, 5325, 498, 23381, 11, 5325, 498, 29046, 11, 5325, 498, 29046, 8053, 11, 5325, 498, 33234, 7483, 198, 6738, 1509, ...
3.188406
69
#!/usr/bin/python3 # -*- coding: utf-8 -*- # Imports ######################################## import sys, os SciAnalysis_PATH='/home/kyager/current/code/SciAnalysis/main/' SciAnalysis_PATH in sys.path or sys.path.append(SciAnalysis_PATH) import glob from SciAnalysis import tools from SciAnalysis.Data import * #from ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 1846, 3742, 198, 29113, 7804, 198, 198, 11748, 25064, 11, 28686, 198, 50, 979, 32750, 62, 34219, 11639, 14, 1119...
1.872801
8,640
import numpy as np from PIL import Image src = np.array(Image.open('data/src/lena.jpg')) mask = np.array(Image.open('data/src/horse_r.png').resize(src.shape[1::-1], Image.BILINEAR)) print(mask.dtype, mask.min(), mask.max()) # uint8 0 255 mask = mask / 255 print(mask.dtype, mask.min(), mask.max()) # float64 0.0 1.0 ...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 350, 4146, 1330, 7412, 198, 198, 10677, 796, 45941, 13, 18747, 7, 5159, 13, 9654, 10786, 7890, 14, 10677, 14, 75, 8107, 13, 9479, 6, 4008, 198, 27932, 796, 45941, 13, 18747, 7, 5159, 13, 965...
2.366093
407
import numpy as np import pandas as pd import matplotlib.pyplot as plt import dill as pickle import rpy2.robjects as robjects readRDS = robjects.r['readRDS'] r_stan_data = readRDS('r_stan_data.rds') with open('python_stan_data.pkl', 'rb') as file: py_stan_data = pickle.load(file) py_stan_data.keys() for key...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 11748, 288, 359, 355, 2298, 293, 198, 198, 11748, 374, 9078, 17, 13, 22609, 752, 82, 355, 3...
2.226891
238
# # * The source code in this file is based on the soure code of CuPy. # # # NLCPy License # # # Copyright (c) 2020-2021 NEC Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are ...
[ 2, 198, 2, 1635, 383, 2723, 2438, 287, 428, 2393, 318, 1912, 319, 262, 24049, 260, 2438, 286, 14496, 20519, 13, 198, 2, 198, 2, 1303, 399, 5639, 20519, 13789, 1303, 198, 2, 198, 2, 220, 220, 220, 220, 15069, 357, 66, 8, 12131, 1...
3.118721
1,533
import anialtools as alt nwdir = '/home/jsmith48/scratch/ccsd_extrapolation/ccsd_train/tl_train_dhl_7/' h5dir = '/home/jsmith48/scratch/ccsd_extrapolation/h5files/train/cmb/' Nnets = 8 # networks in ensemble Nblock = 16 # Number of blocks in split Nbvald = 2 # number of valid blocks Nbtest = 1 # number of test blocks...
[ 11748, 281, 498, 31391, 355, 5988, 198, 198, 47516, 15908, 796, 31051, 11195, 14, 73, 21453, 2780, 14, 1416, 36722, 14, 535, 21282, 62, 2302, 2416, 21417, 14, 535, 21282, 62, 27432, 14, 28781, 62, 27432, 62, 67, 18519, 62, 22, 14, 6...
2.212121
330
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # from libcst.codemod._cli import ( ParallelTransformResult, diff_code, exec_transform_with_prettyprint, gather_files, para...
[ 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 198, 2, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 17168, 5964, 1043, 287, 262, 198, 2, 38559, 24290, 2393, 287, 262, 6808, 8619, 286, 428, 2723, 5509, 13, 198, ...
2.746667
525
#!/bin/python3
[ 2, 48443, 8800, 14, 29412, 18, 198 ]
2.142857
7
import json from pathlib import Path import tarfile PREDICTIONS_DIR = "./data/predictions" folder = Path(PREDICTIONS_DIR) pred_paths = folder.glob("**/*.jsonl") compiled_errors_path = "error_analysis/errors.jsonl" zipped_path = "error_analysis/errors.tar.gz" with open(compiled_errors_path, "w") as file: pass f...
[ 11748, 33918, 198, 6738, 3108, 8019, 1330, 10644, 198, 11748, 13422, 7753, 198, 198, 4805, 1961, 18379, 11053, 62, 34720, 796, 366, 19571, 7890, 14, 28764, 9278, 1, 198, 198, 43551, 796, 10644, 7, 4805, 1961, 18379, 11053, 62, 34720, 8,...
2.320366
437
import asyncio import json import uuid from json.decoder import JSONDecodeError import discord from discord.ext import commands, tasks from lib import (ReactionPersistentView, Database, has_permissions, ) from DiscordUtils import Embed
[ 11748, 30351, 952, 198, 11748, 33918, 198, 11748, 334, 27112, 198, 6738, 33918, 13, 12501, 12342, 1330, 19449, 10707, 1098, 12331, 198, 198, 11748, 36446, 198, 6738, 36446, 13, 2302, 1330, 9729, 11, 8861, 198, 6738, 9195, 1330, 357, 3041,...
2.814433
97
import numpy as np import pandas as pd import os import datetime import requests from huey.models import Buoy, BuoyRealtimeWaveDetail, BuoyRawSpectralWaveData id ).order_by(BuoyRealtimeWaveDetail.ts.desc()).first() realtime_url = f"https://www.ndbc.noaa.gov/data/realtime2/{station_id}.spec" df = pd.read_csv(r...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 28686, 198, 11748, 4818, 8079, 198, 11748, 7007, 198, 198, 6738, 37409, 88, 13, 27530, 1330, 9842, 726, 11, 9842, 726, 15633, 2435, 39709, 11242, 603, 11, ...
2.345109
368
# Initial imports from calendar import day_abbr import nltk import pandas as pd from pathlib import Path from nltk.sentiment.vader import SentimentIntensityAnalyzer from nltk.tokenize import word_tokenize, sent_tokenize nltk.download('stopwords') nltk.download('punkt') nltk.download('wordnet') from nltk.corpus import...
[ 2, 20768, 17944, 198, 6738, 11845, 1330, 1110, 62, 397, 1671, 198, 11748, 299, 2528, 74, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 299, 2528, 74, 13, 34086, 3681, 13, 85, 5067, 1330, 11352, ...
2.494172
2,831
# --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: light # format_version: '1.5' # jupytext_version: 1.11.1 # kernelspec: # display_name: Python 3 # language: python # name: python3 # --- # # Benchmarking with sktime # # The benchmarking modu...
[ 2, 11420, 198, 2, 474, 929, 88, 353, 25, 198, 2, 220, 220, 474, 929, 88, 5239, 25, 198, 2, 220, 220, 220, 220, 2420, 62, 15603, 341, 25, 198, 2, 220, 220, 220, 220, 220, 220, 7552, 25, 764, 9078, 198, 2, 220, 220, 220, 220, ...
3.215818
1,492
#!/usr/bin/env python import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt from matplotlib.colors import LogNorm, ListedColormap,BoundaryNorm import numpy as np import datetime as dt import sys, os, pickle from scipy.ndimage.filters import gaussian_filter import pandas as pd from mpl_toolkits.basema...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 2603, 29487, 8019, 198, 6759, 29487, 8019, 13, 1904, 10786, 46384, 11537, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 2603, 29487, 8019, 13, 4033...
2.48179
961
import pytest from kickscraper import KickStarterClient from kickscraper import Project @pytest.fixture @pytest.fixture
[ 11748, 12972, 9288, 198, 198, 6738, 17364, 66, 38545, 1330, 10279, 1273, 2571, 11792, 198, 6738, 17364, 66, 38545, 1330, 4935, 628, 198, 31, 9078, 9288, 13, 69, 9602, 628, 198, 31, 9078, 9288, 13, 69, 9602, 628, 198 ]
3.25641
39
from setuptools import setup with open("README.md", "r") as fh: long_description = fh.read() setup( name='pyFortiManagerAPI', description='A Python wrapper for the FortiManager REST API', version='0.1.6', py_modules=["pyFortiManagerAPI"], package_dir={'': 'src'}, keywords=['Fortimanager', ...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 4480, 1280, 7203, 15675, 11682, 13, 9132, 1600, 366, 81, 4943, 355, 277, 71, 25, 198, 220, 220, 220, 890, 62, 11213, 796, 277, 71, 13, 961, 3419, 198, 198, 40406, 7, 198, 220, 220, 22...
2.609023
399
from datetime import datetime import unittest from flight_tables.flight_parsing import Flight, ParsedFlights class TestFlight(unittest.TestCase): """Test the class called Flight""" if __name__ == '__main__': unittest.main()
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 555, 715, 395, 198, 198, 6738, 5474, 62, 83, 2977, 13, 22560, 62, 79, 945, 278, 1330, 13365, 11, 23042, 276, 7414, 2337, 198, 198, 4871, 6208, 43069, 7, 403, 715, 395, 13, 14402, 20448...
3.038961
77
# Generated by Django 3.1.1 on 2020-10-22 20:10 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 16, 319, 12131, 12, 940, 12, 1828, 1160, 25, 940, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
# # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # # # util # import datetime import sys import traceback import collections # end UTCTimestampUsec # end UTCTimestampUsecToString # end enum def import_class(import_str): """Returns a class from a string including module and class.""" mod_...
[ 2, 198, 2, 15069, 357, 66, 8, 2211, 7653, 9346, 27862, 11, 3457, 13, 1439, 2489, 10395, 13, 198, 2, 198, 198, 2, 198, 2, 7736, 198, 2, 198, 198, 11748, 4818, 8079, 198, 11748, 25064, 198, 11748, 12854, 1891, 198, 11748, 17268, 198...
2.444043
277
# -*- coding: utf-8 -*- """leetcode_twosum.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1RPnZuejWl1-nL1k0Q0m7BXYbwQduQJaJ """ # 문제: https://leetcode.com/problems/two-sum/
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 293, 316, 8189, 62, 4246, 418, 388, 13, 541, 2047, 65, 198, 198, 38062, 4142, 7560, 416, 1623, 4820, 2870, 13, 198, 198, 20556, 2393, 318, 5140, 379, 198, 220, ...
2.147826
115
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
"""Implement the Unit class.""" import numpy as np from .. import config, constants __all__ = ["Pixels", "Degrees", "Munits", "Percent"] Pixels = _PixelUnits() Degrees = constants.PI / 180 Munits = 1
[ 37811, 3546, 26908, 262, 11801, 1398, 526, 15931, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 11485, 1330, 4566, 11, 38491, 198, 198, 834, 439, 834, 796, 14631, 47, 14810, 1600, 366, 35, 1533, 6037, 1600, 366, 44, 41667, ...
2.875
72
import os import pandas as pd ric_folders_endswith = ( 'core_dm_daily_c_d_rif', 'core_em_daily_d_rif', 'scap_dm_daily_c_d_rif', 'scap_em_daily_d_rif' ) ric_files_endswith = ( 'CORE_DM_ALL_SECURITY_CODE_DAILY_D_RIF', 'CORE_EM_ALL_SECURITY_CODE_DAILY_D_RIF', 'SCAP_DM_ALL_SECURITY_CODE_DAILY...
[ 11748, 28686, 198, 11748, 19798, 292, 355, 279, 67, 628, 198, 1173, 62, 11379, 364, 62, 437, 2032, 342, 796, 357, 198, 220, 220, 220, 705, 7295, 62, 36020, 62, 29468, 62, 66, 62, 67, 62, 81, 361, 3256, 198, 220, 220, 220, 705, 7...
1.967532
308
import logging import math from pyha.common.context_managers import SimPath from pyha.common.fixed_point import Sfix logging.basicConfig(level=logging.INFO) logger = logging.getLogger('complex') class Complex: """ Complex number with ``.real`` and ``.imag`` elements. Default type is ``Complex(left=0, right=-...
[ 11748, 18931, 198, 11748, 10688, 198, 198, 6738, 12972, 3099, 13, 11321, 13, 22866, 62, 805, 10321, 1330, 3184, 15235, 198, 6738, 12972, 3099, 13, 11321, 13, 34021, 62, 4122, 1330, 311, 13049, 198, 198, 6404, 2667, 13, 35487, 16934, 7, ...
2.237136
894
import urllib from textblob import TextBlob, Word from word2number import w2n from user import User from goal import Goal from responses import get_response
[ 11748, 2956, 297, 571, 198, 198, 6738, 2420, 2436, 672, 1330, 8255, 3629, 672, 11, 9678, 198, 6738, 1573, 17, 17618, 1330, 266, 17, 77, 198, 198, 6738, 2836, 1330, 11787, 198, 6738, 3061, 1330, 25376, 198, 6738, 9109, 1330, 651, 62, ...
3.613636
44
from proxypool.schemas.proxy import Proxy from proxypool.crawlers.base import BaseCrawler import json BASE_URL = 'https://cool-proxy.net/proxies.json' class CoolproxyCrawler(BaseCrawler): """ https://cool-proxy.net/ """ urls = [BASE_URL] if __name__ == '__main__': crawler = CoolproxyCrawler() ...
[ 6738, 14793, 4464, 970, 13, 1416, 4411, 292, 13, 36436, 1330, 38027, 198, 6738, 14793, 4464, 970, 13, 66, 1831, 8116, 13, 8692, 1330, 7308, 34, 39464, 198, 11748, 33918, 198, 198, 33, 11159, 62, 21886, 796, 705, 5450, 1378, 24494, 12,...
2.510067
149
import pytest from tgbotscenario.asynchronous import MemorySceneStorage from tests.generators import generate_chat_id @pytest.mark.parametrize( ("chat_id", "user_id"), ( (generate_chat_id(), generate_chat_id()), # different (generate_chat_id(),) * 2 # same ) ) @pytest.mark.asyncio @py...
[ 11748, 12972, 9288, 198, 198, 6738, 256, 70, 13645, 1416, 39055, 13, 292, 31301, 1330, 14059, 36542, 31425, 198, 6738, 5254, 13, 8612, 2024, 1330, 7716, 62, 17006, 62, 312, 628, 198, 31, 9078, 9288, 13, 4102, 13, 17143, 316, 380, 2736...
2.271111
225
import os import numpy as np import pandas as pd import matplotlib as mpl from matplotlib import pyplot as plt from svphase.utils.config import FONT, COLORS from svphase.learn.evaluation import ClassLabel #def _get_model_and_version(model_stat): # fname = os.path.basename(model_stat).split('.') # return fname[0], '.'....
[ 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 2603, 29487, 8019, 355, 285, 489, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 83, 198, 6738, 38487, 40715, 13, 26791, 13...
2.996516
287
''' May 2017 @author: Burkhard ''' import unittest from Ch08_Code.LanguageResources import I18N from Ch08_Code.GUI_Refactored import OOP as GUI #========================== if __name__ == '__main__': unittest.main()
[ 7061, 6, 198, 6747, 2177, 198, 31, 9800, 25, 37940, 10424, 198, 7061, 6, 198, 198, 11748, 555, 715, 395, 198, 6738, 609, 2919, 62, 10669, 13, 32065, 33236, 1330, 314, 1507, 45, 198, 6738, 609, 2919, 62, 10669, 13, 40156, 62, 8134, ...
2.263158
114
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Given a symbol s, what is the probability P(n|s) of a stroke count of n? Download data for each symbol. """ import logging import sys logging.basicConfig(format='%(asctime)s %(levelname)s %(message)s', level=logging.INFO, strea...
[ 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, 15056, 257, 6194, 264, 11, 644, 318, 262, 12867, 350, 7, 77, 91, 82, 8, 286, 257, 14000, 954, 286,...
1.926132
3,601
""" Example: python compute_metrics.py --inference-path classification_results.json.gz \ --label-path classification/data/net_training_20161115.csv \ --dest-path fltest.html --fishing-ranges classification/data/combined_fishing_ranges.csv \ ...
[ 198, 37811, 198, 198, 16281, 25, 628, 198, 29412, 24061, 62, 4164, 10466, 13, 9078, 220, 220, 220, 220, 1377, 259, 4288, 12, 6978, 17923, 62, 43420, 13, 17752, 13, 34586, 220, 220, 220, 220, 3467, 198, 220, 220, 220, 220, 220, 220, ...
2.112036
9,613
import os import glob import math import subprocess import re from decimal import Decimal from astropy.io import fits from astropy import wcs #MODIFY THESE FIELDS AS NEEDED! #input path *with* ending forward slash input_path='./' #output path *with* ending forward slash #output_path='./renamed/' output_path='./' #doe...
[ 11748, 28686, 198, 11748, 15095, 198, 11748, 10688, 198, 11748, 850, 14681, 198, 11748, 302, 198, 6738, 32465, 1330, 4280, 4402, 198, 6738, 6468, 28338, 13, 952, 1330, 11414, 198, 6738, 6468, 28338, 1330, 266, 6359, 198, 198, 2, 33365, ...
2.459507
568
import os import json import pathlib import pickle import tarfile import pandas as pd import xgboost import joblib import numpy as np import pandas as pd import xgboost from sklearn.metrics import accuracy_score, classification_report, roc_auc_score if __name__ == "__main__": model_path = f"/opt/ml/processing/m...
[ 11748, 28686, 198, 11748, 33918, 198, 11748, 3108, 8019, 198, 11748, 2298, 293, 198, 11748, 13422, 7753, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 2124, 70, 39521, 198, 198, 11748, 1693, 8019, 198, 11748, 299, 32152, 355, 4...
2.446779
714
from math import pi, sqrt import numpy as np import numpy.ma as ma from numpy.linalg import cholesky, solve from copy import copy, deepcopy import choldate import logging from . import loggers from .wrappers import exp, log, gammaln logger = logging.getLogger(__name__) def choleskyQuadForm(L, b): """Compute quadr...
[ 6738, 10688, 1330, 31028, 11, 19862, 17034, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 299, 32152, 13, 2611, 355, 17266, 198, 6738, 299, 32152, 13, 75, 1292, 70, 1330, 442, 4316, 2584, 11, 8494, 198, 6738, 4866, 1330, 4866, 11, 2...
2.347466
1,934
""" MIT License Copyright (c) 2021 mooncell07 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, di...
[ 37811, 198, 36393, 13789, 198, 198, 15269, 357, 66, 8, 33448, 8824, 3846, 2998, 198, 198, 5990, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 1659, 428, 3788, 290, 3917, 10314, 3696, 357, 1169...
2.71195
795
''' Entry point. Init logging, initialize component factory, start asyncio event loop, manage components lifecycle ''' import logging import yaml import pytoml import json import sys from .loadtest import LoadTest LOG = logging.getLogger(__name__) def init_logging(debug=False, filename='bfg.log'): ''' Configur...
[ 7061, 6, 198, 30150, 966, 13, 44707, 18931, 11, 41216, 7515, 8860, 11, 198, 9688, 30351, 952, 1785, 9052, 11, 6687, 6805, 3868, 47510, 198, 7061, 6, 198, 198, 11748, 18931, 198, 11748, 331, 43695, 198, 11748, 12972, 39532, 75, 198, 11...
2.410618
923
import numpy as np import matplotlib.pyplot as plt import os import shutil # Generate the figures in the same folder os.chdir(os.path.dirname(__file__)) rng = np.random.RandomState(42) # 2D parameter space: n_steps = 200 w1 = np.linspace(-2.5, 2.5, n_steps) w2 = np.linspace(-2.5, 2.5, n_steps) w1, w2 = np.meshgrid(w...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 198, 2, 2980, 378, 262, 5538, 287, 262, 976, 9483, 198, 418, 13, 354, 15908, 7, 418, 13, 697...
2.018519
864
from __future__ import division, print_function # This file has a bunch of settings that can be set via the Unity project settings. # It also has some hacks for compatibility between versions of Python and Windows. import getpass import os import tempfile # Unix socket support. whoami = getpass.getuser() tempdir = te...
[ 6738, 11593, 37443, 834, 1330, 7297, 11, 3601, 62, 8818, 198, 198, 2, 770, 2393, 468, 257, 7684, 286, 6460, 326, 460, 307, 900, 2884, 262, 18714, 1628, 6460, 13, 198, 2, 632, 635, 468, 617, 30445, 329, 17764, 1022, 6300, 286, 11361,...
3.564246
179
from django import http from django.conf import settings from django.contrib.auth import logout from django.core.urlresolvers import translate_url from django.http import Http404 from django.http import HttpResponseRedirect from django.utils.http import is_safe_url from django.utils.translation import check_for_languag...
[ 6738, 42625, 14208, 1330, 2638, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 2604, 448, 198, 6738, 42625, 14208, 13, 7295, 13, 6371, 411, 349, 690, 1330, 15772, 62, 6371, 198, ...
2.532731
886
# redirection, so we can use subtree like pip from .cv_pubsubs import webcam_pub, window_sub
[ 2, 2266, 4154, 11, 523, 356, 460, 779, 13284, 631, 588, 7347, 198, 6738, 764, 33967, 62, 12984, 7266, 82, 1330, 49823, 62, 12984, 11, 4324, 62, 7266, 198 ]
3.206897
29
from dataclasses import dataclass from typing import Optional @dataclass
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 19720, 1330, 32233, 628, 198, 31, 19608, 330, 31172, 198 ]
3.75
20
# # e32calendar.py # # Copyright (c) 2006-2009 Nokia Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
[ 2, 198, 2, 304, 2624, 9948, 9239, 13, 9078, 198, 2, 198, 2, 15069, 357, 66, 8, 4793, 12, 10531, 26182, 10501, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743,...
2.78972
428
from sys import stdin, stdout t = int(stdin.readline()) for i in range(t): n, s, k = map(int, stdin.readline().split()) a = [int(ai) for ai in stdin.readline().split()] for j in range(n + 1): if s + j not in a and s + j <= n or s - j not in a and s - j > 0: stdout.write('{}\n'.format(j)) break
[ 6738, 25064, 1330, 14367, 259, 11, 14367, 448, 198, 198, 83, 796, 493, 7, 19282, 259, 13, 961, 1370, 28955, 198, 1640, 1312, 287, 2837, 7, 83, 2599, 198, 220, 299, 11, 264, 11, 479, 796, 3975, 7, 600, 11, 14367, 259, 13, 961, 13...
2.297101
138
import time import pytest import test_vnet as vnet from swsscommon import swsscommon from flaky import flaky # Define fake platform for "DVS" fixture, so it will set "platform" environment variable for "orchagent". # It is needed in order to enable platform specific "orchagent" code for testing "bitmap" VNET implem...
[ 11748, 640, 198, 11748, 12972, 9288, 198, 198, 11748, 1332, 62, 85, 3262, 355, 410, 3262, 198, 198, 6738, 1509, 824, 11321, 1330, 1509, 824, 11321, 198, 6738, 781, 15492, 1330, 781, 15492, 628, 198, 2, 2896, 500, 8390, 3859, 329, 366,...
3.496815
314
import csv, difflib, functools, logging, re, os, sys, pickle import unicodedata, unidecode from collections import defaultdict, Counter from fuzzywuzzy import fuzz from postal.parser import parse_address import enchant DICTS = [ enchant.Dict("en_US") ] SOURCE = 1 REFERENCE = 2 MIN_STRING_SCORE = 20 REQUIRES_SHARED_PR...
[ 11748, 269, 21370, 11, 814, 8019, 11, 1257, 310, 10141, 11, 18931, 11, 302, 11, 28686, 11, 25064, 11, 2298, 293, 198, 11748, 28000, 9043, 1045, 11, 555, 485, 8189, 198, 6738, 17268, 1330, 4277, 11600, 11, 15034, 198, 198, 6738, 34669,...
2.803791
3,746
from data_importers.ems_importers import BaseHalaroseCsvImporter
[ 6738, 1366, 62, 320, 1819, 1010, 13, 5232, 62, 320, 1819, 1010, 1330, 7308, 40202, 283, 577, 34, 21370, 3546, 26634, 628 ]
3
22
# This file is based on the ghp-import package released under # the Tumbolia Public License. # Tumbolia Public License # Copyright 2013, Paul Davis <paul.joseph.davis@gmail.com> # Copying and distribution of this file, with or without modification, are # permitted in any medium without roy...
[ 2, 770, 2393, 318, 1912, 319, 262, 308, 24831, 12, 11748, 5301, 2716, 739, 198, 2, 262, 309, 2178, 22703, 5094, 13789, 13, 198, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 22...
3.20297
202
#!/usr/bin/env python3 import sys import io import getopt from .S.language import SProgram from .S.interp import StopProgram, SInterp
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 25064, 198, 11748, 33245, 198, 11748, 651, 8738, 198, 198, 6738, 764, 50, 13, 16129, 1330, 311, 15167, 198, 6738, 764, 50, 13, 3849, 79, 1330, 13707, 15167, 11, 311, 9492, ...
3.068182
44
from sys import prefix from flask import Blueprint from app.api.v1 import v1_bp from app.api.v2 import v2_bp api_bp = Blueprint('api', __name__) api_bp.register_blueprint(v1_bp, url_prefix='/v1') api_bp.register_blueprint(v2_bp, url_prefix='/v2')
[ 6738, 25064, 1330, 21231, 198, 6738, 42903, 1330, 39932, 198, 6738, 598, 13, 15042, 13, 85, 16, 1330, 410, 16, 62, 46583, 198, 6738, 598, 13, 15042, 13, 85, 17, 1330, 410, 17, 62, 46583, 198, 198, 15042, 62, 46583, 796, 39932, 10786...
2.56701
97
#!/usr/bin/env python3 # Copyright (C) Alibaba Group Holding Limited. """ TAdaConv. """ import math import torch import torch.nn as nn import torch.nn.functional as F from torch.nn.modules.utils import _triple class RouteFuncMLP(nn.Module): """ The routing function for generating the calibration weights. ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 15069, 357, 34, 8, 41992, 4912, 31703, 15302, 13, 220, 198, 198, 37811, 309, 2782, 64, 3103, 85, 13, 37227, 198, 198, 11748, 10688, 198, 11748, 28034, 198, 11748, 28034, 13, 2...
1.968768
1,761
from pathlib import Path import torch import torch.nn as nn from AbstractModel import AbstractModel from Attention import Attention from Tokenizer import Tokenizer from StopWords import StopWords ''' '''
[ 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 198, 6738, 27741, 17633, 1330, 27741, 17633, 198, 6738, 47406, 1330, 47406, 198, 198, 6738, 29130, 7509, 1330, 29130, 7509, 198, 6738,...
3.907407
54
"""Add notes field for tasks Revision ID: 707bac2b6bd1 Revises: 58ea8596e2db Create Date: 2017-09-10 11:31:03.741908 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '707bac2b6bd1' down_revision = '58ea8596e2db' branch_labels = None depends_on = None
[ 37811, 4550, 4710, 2214, 329, 8861, 198, 198, 18009, 1166, 4522, 25, 767, 2998, 65, 330, 17, 65, 21, 17457, 16, 198, 18009, 2696, 25, 7618, 18213, 23, 45734, 68, 17, 9945, 198, 16447, 7536, 25, 2177, 12, 2931, 12, 940, 1367, 25, 3...
2.488
125
from distutils.core import setup import sys import comet with open('requirements.txt') as f: required = f.read().splitlines() setup( name="Comet", description=comet.__description__, author=comet.__author__, author_email=comet.__contact__, version=comet.__version__, url=comet.__url__, p...
[ 6738, 1233, 26791, 13, 7295, 1330, 9058, 198, 11748, 25064, 198, 11748, 31733, 198, 198, 4480, 1280, 10786, 8897, 18883, 13, 14116, 11537, 355, 277, 25, 198, 220, 220, 220, 2672, 796, 277, 13, 961, 22446, 35312, 6615, 3419, 198, 198, ...
1.973404
564
from sys import stdin n, t = map(int, stdin.readline().split()) li = [int(c) for c in stdin.readline().split()] lb = 1 rb = 10 ** 18 while lb < rb: mb = (lb + rb) // 2 s = 0 for i in range(n): s += min(mb // li[i], 10 ** 9) if s >= t: rb = mb else: lb = mb ...
[ 6738, 25064, 1330, 14367, 259, 201, 198, 201, 198, 77, 11, 256, 796, 3975, 7, 600, 11, 14367, 259, 13, 961, 1370, 22446, 35312, 28955, 201, 198, 4528, 796, 685, 600, 7, 66, 8, 329, 269, 287, 14367, 259, 13, 961, 1370, 22446, 35312...
1.827027
185
""" pygments.lexers.functional ~~~~~~~~~~~~~~~~~~~~~~~~~~ Just export lexer classes previously contained in this module. :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.lexers.lisp import SchemeLexer, CommonLis...
[ 37811, 201, 198, 220, 220, 220, 12972, 11726, 13, 2588, 364, 13, 45124, 201, 198, 220, 220, 220, 220, 27156, 15116, 4907, 201, 198, 201, 198, 220, 220, 220, 2329, 10784, 31191, 263, 6097, 4271, 7763, 287, 428, 8265, 13, 201, 198, 20...
2.743083
253
# 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 ...
[ 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 198, 2, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 921, 743, 7330, 198, 2, 257, 4866, 286, 262, 13789, 379, 19...
3.89441
161
# -*- encoding: utf-8 *-* import os import re import sys from glob import glob from distutils.command.build import build from distutils.core import Command import textwrap min_python = (3, 4) my_python = sys.version_info if my_python < min_python: print("Borg requires Python %d.%d or later" % min_python) sy...
[ 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 1635, 12, 9, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 25064, 198, 6738, 15095, 1330, 15095, 198, 198, 6738, 1233, 26791, 13, 21812, 13, 11249, 1330, 1382, 198, 6738, 1233, 26791, 13...
2.529708
2,777
# License: Apache-2.0 from ..transformers.transformer import Transformer from typing import List, Dict, Union import numpy as np import pandas as pd import databricks.koalas as ks class _BaseImputer(Transformer): """Base imputer transformer class. Parameters ---------- strategy : str Imputati...
[ 2, 13789, 25, 24843, 12, 17, 13, 15, 198, 6738, 11485, 35636, 364, 13, 7645, 16354, 1330, 3602, 16354, 198, 6738, 19720, 1330, 7343, 11, 360, 713, 11, 4479, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 1...
2.204924
1,381
# Generated by Django 3.1.5 on 2021-01-11 19:54 from django.db import migrations import django_db_views.migration_functions import django_db_views.operations
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 20, 319, 33448, 12, 486, 12, 1157, 678, 25, 4051, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 198, 11748, 42625, 14208, 62, 9945, 62, 33571, 13, 76, 4254, 62, 12543, 2733, 1...
2.909091
55
# Created byMartin.cz # Copyright (c) Martin Strohalm. All rights reserved. from .. enums import * from .. properties import * from . graphics import Graphics from . frame import Frame, FrameProperty from . path import Path class Layout(Graphics): """ Layout represents an experimental simple table-like lay...
[ 2, 220, 15622, 416, 24778, 13, 26691, 198, 2, 220, 15069, 357, 66, 8, 5780, 30183, 14201, 76, 13, 1439, 2489, 10395, 13, 198, 198, 6738, 11485, 551, 5700, 1330, 1635, 198, 6738, 11485, 6608, 1330, 1635, 198, 6738, 764, 9382, 1330, 1...
2.077967
12,531
import os import boto3 import json dynamodb = boto3.resource('dynamodb') table = dynamodb.Table('dev-dataeng-meetup-table') print(table.creation_date_time)
[ 11748, 28686, 198, 11748, 275, 2069, 18, 198, 11748, 33918, 198, 198, 67, 4989, 375, 65, 796, 275, 2069, 18, 13, 31092, 10786, 67, 4989, 375, 65, 11537, 198, 11487, 796, 6382, 375, 65, 13, 10962, 10786, 7959, 12, 7890, 1516, 12, 477...
2.633333
60
from django.db import models, connection, Error import hashlib from django.contrib.auth.models import AbstractBaseUser
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 11, 4637, 11, 13047, 198, 11748, 12234, 8019, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 27741, 14881, 12982, 628, 628 ]
3.8125
32
#!/usr/bin/env python # # License: BSD # https://raw.github.com/yujinrobot/kobuki/hydro-devel/kobuki_testsuite/LICENSE # ############################################################################## # Imports ############################################################################## import threading impo...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 220, 220, 220, 220, 220, 220, 220, 198, 2, 13789, 25, 347, 10305, 198, 2, 220, 220, 3740, 1378, 1831, 13, 12567, 13, 785, 14, 24767, 18594, 305, 13645, 14, 74, 672, 11308, 14, ...
4.282759
145
import cv2 import numpy as np import tensorflow as tf from keras.models import load_model import os from PIL import Image, ImageOps f = open("./converted_keras/l.txt", "r") labels = f.read().splitlines() f.close() # shape = (224, 224) gpus = tf.config.experimental.list_physical_devices('GPU') if gpus: try: ...
[ 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 41927, 292, 13, 27530, 1330, 3440, 62, 19849, 198, 11748, 28686, 198, 6738, 350, 4146, 1330, 7412, 11, 7412, 41472, 198, 198, ...
2.230193
934
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v1.20.7 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six fr...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 12554, 527, 3262, 274, 628, 220, 220, 220, 1400, 6764, 2810, 357, 27568, 416, 4946, 15042, 35986, 3740, 1378, 12567, 13, 785, 14, 9654, 499, 270, 10141, 14, 9654, ...
2.5104
3,654
from django.db import models from datetime import datetime # Create your models here.
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 2, 13610, 534, 4981, 994, 13, 628 ]
3.826087
23
import numpy as np import pytransform3d.visualizer as pv import pytransform3d.trajectories as ptr from pytransform3d.urdf import UrdfTransformManager from mocap.cleaning import smooth_exponential_coordinates, median_filter from mocap.dataset_loader import load_kuka_dataset, transpose_dataset from movement_primitives.v...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 35636, 18, 67, 13, 41464, 7509, 355, 279, 85, 198, 11748, 12972, 35636, 18, 67, 13, 9535, 752, 1749, 355, 50116, 198, 6738, 12972, 35636, 18, 67, 13, 2799, 69, 1330, 471, 4372, 69, 4...
2.350977
1,587
#! /usr/bin/env python """IOP mail extension for Seaglider Basestation Author: Sebastian Steinke, 21.03.2017 """ import sys import os from scipy.io import netcdf import BaseNetCDF import numpy as np import time import BaseOpts from BaseLog import * import FileMgr from CalibConst import getSGCalibrationConstants impo...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 40, 3185, 6920, 7552, 329, 1001, 363, 75, 1304, 6455, 27364, 198, 220, 220, 6434, 25, 26190, 15215, 365, 11, 2310, 13, 3070, 13, 5539, 198, 37811, 198, 11748, 25064, 198, 11...
1.974041
7,666
################################################################# ###############written by fbb, dkudrow, shillberry######################## #Reads all of the images in a directory, sorts them by Strehl #Ratio or consecutive order, and stacks the specified top percent #either aligned to a guide star, correlating in fou...
[ 29113, 29113, 2, 198, 7804, 4242, 21017, 15266, 416, 277, 11848, 11, 288, 74, 463, 808, 11, 427, 359, 8396, 14468, 7804, 198, 2, 5569, 82, 477, 286, 262, 4263, 287, 257, 8619, 11, 10524, 606, 416, 9737, 18519, 198, 2, 29665, 952, ...
2.627234
2,798
__all__ = ["reservation", "user_info"] for _import in __all__: __import__(__package__ + "." + _import)
[ 834, 439, 834, 796, 14631, 411, 13208, 1600, 366, 7220, 62, 10951, 8973, 198, 198, 1640, 4808, 11748, 287, 11593, 439, 834, 25, 198, 220, 220, 220, 11593, 11748, 834, 7, 834, 26495, 834, 1343, 366, 526, 1343, 4808, 11748, 8, 198 ]
2.571429
42
from .common import load_source_list import tensorflow as tf import numpy as np import ot import os import pickle import argparse g_centering_trick = False # doesn't change results much g_sinkhorn_reg = 0.1
[ 6738, 764, 11321, 1330, 3440, 62, 10459, 62, 4868, 198, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 30972, 198, 11748, 28686, 198, 11748, 2298, 293, 198, 11748, 1822, 29572, 198, 198, 70, 6...
3.102941
68
#!/usr/bin/env python import glob import re import sys # Format generated .htm to have correct syntax and additional styling. STYLE = """\ <style type=\"text/css\"><!-- body { font-family: Verdana; font-size: 10pt; } td { font-family: Verdana; font-size: 10pt; } a { font-weight: bold ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 15095, 198, 11748, 302, 198, 11748, 25064, 198, 198, 2, 18980, 7560, 764, 19211, 284, 423, 3376, 15582, 290, 3224, 35517, 13, 198, 198, 2257, 56, 2538, 796, 37227, 59, 198,...
2.389474
190
from microbit import * P0_MAX = 812 # main program while True: reading = pin0.read_analog() display.clear() barchart(4, reading, P0_MAX) if button_a.was_pressed(): pin2.write_digital(0) # off if button_b.was_pressed(): pin2.write_digital(1) # on sleep(10...
[ 6738, 4580, 2545, 1330, 1635, 198, 198, 47, 15, 62, 22921, 796, 807, 1065, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 2, 1388, 1430, 198, 4514, 6407, 25, 198, 220, 220, 220, 3555, 796, 6757, 15, 13, 961, 62, 272, 11794, 3...
2.06135
163
""" Copyright 2020 Kartik Sharma 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 ...
[ 37811, 198, 220, 220, 15069, 12131, 32872, 1134, 40196, 628, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 220, 220, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 1378...
2.344521
1,460
from dashapp.functions import * from dashapp.layouts import *
[ 6738, 14470, 1324, 13, 12543, 2733, 1330, 1635, 198, 6738, 14470, 1324, 13, 10724, 5269, 1330, 1635, 198 ]
3.444444
18
from django.core.cache import cache from django.test import TestCase as DjangoTestCase from django.conf import settings from scheduler import mock from scheduler.utils import generate_random_name
[ 6738, 42625, 14208, 13, 7295, 13, 23870, 1330, 12940, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 355, 37770, 14402, 20448, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 198, 6738, 6038, 18173, 1330, 15290, 198, 6738, 603...
3.96
50
import logging import pytest from bluesky import RunEngine from bluesky.plan_stubs import close_run, open_run, stage, unstage from ophyd.sim import make_fake_device from ophyd.status import wait as status_wait from pcdsdevices.epics_motor import (IMS, PMC100, BeckhoffAxis, EpicsMotor, ...
[ 11748, 18931, 198, 198, 11748, 12972, 9288, 198, 6738, 25570, 2584, 1330, 5660, 13798, 198, 6738, 25570, 2584, 13, 11578, 62, 301, 23161, 1330, 1969, 62, 5143, 11, 1280, 62, 5143, 11, 3800, 11, 555, 14247, 198, 6738, 267, 746, 5173, 1...
2.236465
1,256
# import sys, time # class TextIntonationDecoder: # color_start = '\u001b' # ansi code start # color_end = 'm' # ansi code end # pause_code = '!pause' # @classmethod # def get_pause_code(cls): # return cls.pause_code # @classmethod # def parse_color(cls, s:str): # ...
[ 2, 1330, 25064, 11, 640, 628, 198, 2, 1398, 8255, 5317, 261, 341, 10707, 12342, 25, 198, 2, 220, 220, 220, 220, 3124, 62, 9688, 796, 705, 59, 84, 8298, 65, 6, 220, 1303, 9093, 72, 2438, 923, 198, 2, 220, 220, 220, 220, 3124, 6...
1.771703
2,707
from __future__ import annotations from homeassistant.components.climate import ( DOMAIN as PLATFORM_CLIMATE, ClimateEntity, ) from homeassistant.components.climate.const import ( PRESET_AWAY, PRESET_COMFORT, PRESET_SLEEP, SUPPORT_PRESET_MODE, SUPPORT_TARGET_TEMPERATURE, CURRENT_HVAC_HEAT, CURRENT_HVAC...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 6738, 1363, 562, 10167, 13, 5589, 3906, 13, 42570, 1330, 357, 198, 220, 220, 220, 24121, 29833, 355, 9297, 1404, 21389, 62, 5097, 3955, 6158, 11, 198, 220, 220, 220, 13963, 32398, 11, 19...
2.25588
1,063
import time import numpy as np import tensorflow as tf import tensorflow_probability as tfp import gpflow from gpflow.utilities import set_trainable def elbo_fullcov(q_mu, q_sqrt_latent, inducing_inputs, D_idxs, max_idxs, kernel, ...
[ 11748, 640, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 11192, 273, 11125, 62, 1676, 65, 1799, 355, 256, 46428, 198, 11748, 27809, 11125, 198, 6738, 27809, 11125, 13, 315, 2410, 1330, 900, ...
2.188674
7,929