content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
'''This code is written MTH Junaidi github: Miranjunaidi on 26th Oct 2019 at 7:15 PM IST''' #POP function removes the last element of the list #push function adds a new number num to the list at the end. #print function prints all the element of the stack sequestially #This is where the main funtions start print("\n...
[ 7061, 6, 1212, 2438, 318, 3194, 337, 4221, 7653, 1698, 72, 33084, 25, 7381, 272, 29741, 1698, 72, 319, 2608, 400, 2556, 13130, 379, 767, 25, 1314, 3122, 45790, 7061, 6, 198, 198, 2, 47, 3185, 2163, 20694, 262, 938, 5002, 286, 262, ...
2.660777
283
import os from collections import defaultdict from typing import Any, Dict, Iterable, List, Set, Union
[ 11748, 28686, 198, 6738, 17268, 1330, 4277, 11600, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 11, 40806, 540, 11, 7343, 11, 5345, 11, 4479, 628, 628, 628, 628 ]
3.793103
29
from django.conf.urls import url from lotus_auth import forms from django.contrib.auth import views as django_auth_views from lotus_auth import views as lotus_auth_views urlpatterns = [ # MWC Custom Auth Views url(r'^login/$', lotus_auth_views.login, { 'template_name': 'lotus_auth/login.ht...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 6738, 1256, 385, 62, 18439, 1330, 5107, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 5009, 355, 42625, 14208, 62, 18439, 62, 33571, 198, 6738, 1256, 385, 62, 1...
2.535714
168
# -*- coding: cp1251 -* import socket import time import sys from PyQt5 import QtWidgets from threading import Thread from PyQt5 import QtCore from PyQt5.QtWidgets import (QVBoxLayout, QSplitter, QTextEdit, QWidget) from PyQt5.QtGui import QTextCursor import MySQLdb if __name__ == '__main__': app = QtWidgets.Q...
[ 2, 532, 9, 12, 19617, 25, 31396, 1065, 4349, 532, 9, 198, 11748, 17802, 198, 11748, 640, 198, 11748, 25064, 198, 6738, 9485, 48, 83, 20, 1330, 33734, 54, 312, 11407, 198, 6738, 4704, 278, 1330, 14122, 198, 6738, 9485, 48, 83, 20, ...
2.61165
206
""" Command Line Interface Module """ import optparse import sys import os from ansibledocgen.parser.dir import DirParser from ansibledocgen.formatter.markup import MarkupFormatter
[ 37811, 9455, 6910, 26491, 19937, 37227, 198, 11748, 2172, 29572, 198, 11748, 25064, 198, 11748, 28686, 198, 6738, 9093, 571, 992, 420, 5235, 13, 48610, 13, 15908, 1330, 36202, 46677, 198, 6738, 9093, 571, 992, 420, 5235, 13, 687, 1436, ...
3.714286
49
# # -*- coding: utf-8 -*- # # This file is part of reclass (http://github.com/madduck/reclass) # # Copyright 200714 martin f. krafft <madduck@madduck.net> # Released under the terms of the Artistic Licence 2.0 # from __future__ import absolute_import from __future__ import division from __future__ import print_functio...
[ 2, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 302, 4871, 357, 4023, 1378, 12567, 13, 785, 14, 9937, 646, 694, 14, 260, 4871, 8, 198, 2, 198, 2, 15069, 220, 4343, ...
3.037736
212
from fastapi import FastAPI from elasticapm.contrib.starlette import ElasticAPM from starlette_exporter import PrometheusMiddleware, handle_metrics from app.api import database, engine, metadata from app.api.auth import session from app.api.reports import reports, apm metadata.create_all(engine) app = FastAPI(openap...
[ 6738, 3049, 15042, 1330, 12549, 17614, 198, 6738, 27468, 499, 76, 13, 3642, 822, 13, 7364, 21348, 1330, 48567, 2969, 44, 198, 6738, 3491, 21348, 62, 1069, 26634, 1330, 42696, 34621, 1574, 11, 5412, 62, 4164, 10466, 198, 198, 6738, 598, ...
3.15873
189
# -*- coding: utf-8 -*- """ Created on Fri Jul 15 16:20:49 2016 @author: Philippe """ import numpy as np from scipy.sparse.linalg import svds from functools import partial def em_svd(Y, k=None, tol=1e-3, maxiter=None): """ Approximate SVD on data with missing values via expectation-maximization Paramet...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 19480, 5979, 1315, 1467, 25, 1238, 25, 2920, 1584, 198, 198, 31, 9800, 25, 39393, 198, 37811, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738,...
2.255924
844
from picraftzero.log import logger from picraftzero.interfaces.hardware.providers import MotorProvider from picraftzero.utils import constrain from picraftzero.utils import dedupe from picraftzero.thirdparty import piconzero as pz
[ 198, 6738, 8301, 1617, 22570, 13, 6404, 1330, 49706, 628, 198, 6738, 8301, 1617, 22570, 13, 3849, 32186, 13, 10424, 1574, 13, 15234, 4157, 1330, 12533, 29495, 198, 6738, 8301, 1617, 22570, 13, 26791, 1330, 1500, 3201, 198, 6738, 8301, 1...
3.676923
65
# example of an average forecast from numpy import mean from numpy import median # one-step average forecast # define dataset data = [10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 80.0, 90.0, 100.0] print(data) # test naive forecast for i in range(1, len(data)+1): print(average_forecast(data, (i, 'mean')))
[ 2, 1672, 286, 281, 2811, 11092, 198, 6738, 299, 32152, 1330, 1612, 198, 6738, 299, 32152, 1330, 14288, 198, 198, 2, 530, 12, 9662, 2811, 11092, 198, 198, 2, 8160, 27039, 198, 7890, 796, 685, 940, 13, 15, 11, 1160, 13, 15, 11, 1542...
2.615385
117
# Copyright 2021 MosaicML. All Rights Reserved. from composer.algorithms.cutout.cutout import CutOut as CutOut from composer.algorithms.cutout.cutout import CutOutHparams as CutOutHparams from composer.algorithms.cutout.cutout import cutout as cutout _name = 'CutOut' _class_name = 'CutOut' _functional = 'cutout' _tld...
[ 2, 15069, 33448, 5826, 18452, 5805, 13, 1439, 6923, 33876, 13, 198, 198, 6738, 26777, 13, 282, 7727, 907, 13, 8968, 448, 13, 8968, 448, 1330, 9712, 7975, 355, 9712, 7975, 198, 6738, 26777, 13, 282, 7727, 907, 13, 8968, 448, 13, 8968...
2.98125
160
#encoding:utf-8 import six from genius.tools import StringHelper
[ 2, 12685, 7656, 25, 40477, 12, 23, 198, 11748, 2237, 198, 6738, 15632, 13, 31391, 1330, 10903, 47429, 628, 198 ]
3.35
20
from __future__ import unicode_literals from django.db import models
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 628, 628 ]
3.47619
21
#!/usr/bin/env python """ @file test.py @author Pablo Alvarez Lopez @date 2016-11-25 @version $Id$ python script used by sikulix for testing netedit SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/ Copyright (C) 2009-2017 DLR/TS, Germany This file is part of SUMO. SUMO is free software; you can red...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 31, 7753, 220, 220, 220, 1332, 13, 9078, 198, 31, 9800, 220, 33185, 36952, 22593, 198, 31, 4475, 220, 220, 220, 1584, 12, 1157, 12, 1495, 198, 31, 9641, 720, 7390, 3, 1...
3.361266
1,074
''' Extract a subset of lines from a file. ''' import random
[ 7061, 6, 29677, 257, 24637, 286, 3951, 422, 257, 2393, 13, 705, 7061, 198, 198, 11748, 4738, 198 ]
3.444444
18
import torch import torch.utils.data import numpy as np import csv import random import scvi import scanpy as sc import json from collections import Counter import json import os
[ 11748, 28034, 198, 11748, 28034, 13, 26791, 13, 7890, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 269, 21370, 220, 198, 11748, 4738, 198, 11748, 629, 8903, 198, 11748, 9367, 9078, 355, 629, 198, 11748, 33918, 198, 6738, 17268, 1330, ...
3.770833
48
# -*- coding: utf-8 -* import wx import matplotlib matplotlib.use("WxAgg") from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas from matplotlib.backends.backend_wx import NavigationToolbar2Wx from matplotlib.figure import Figure if __name__ == '__main__': app = wx.App() frame = wx.F...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 198, 11748, 266, 87, 198, 11748, 2603, 29487, 8019, 198, 6759, 29487, 8019, 13, 1904, 7203, 54, 87, 46384, 4943, 198, 6738, 2603, 29487, 8019, 13, 1891, 2412, 13, 1891, 437, 62, ...
2.608696
161
import argparse import os import re import warnings from carto.auth import APIKeyAuthClient from carto.datasets import DatasetManager from carto.sql import SQLClient warnings.filterwarnings('ignore') # set input arguments parser = argparse.ArgumentParser( description='Exports the CREATE TABLE scripts of all the ...
[ 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 14601, 198, 198, 6738, 6383, 78, 13, 18439, 1330, 7824, 9218, 30515, 11792, 198, 6738, 6383, 78, 13, 19608, 292, 1039, 1330, 16092, 292, 316, 13511, 198, 6738, 6383, 78...
2.224414
1,622
import socket import sys import threading import time import pyaudio recipient = sys.argv[1] inPort = int(sys.argv[2]) outPort = int(sys.argv[3]) inSock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) outSock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) host = socket.gethostname() inSock.bind((host, inPort...
[ 11748, 17802, 198, 11748, 25064, 198, 11748, 4704, 278, 198, 11748, 640, 198, 11748, 12972, 24051, 198, 198, 8344, 48137, 796, 25064, 13, 853, 85, 58, 16, 60, 198, 259, 13924, 796, 493, 7, 17597, 13, 853, 85, 58, 17, 12962, 198, 448...
2.408511
235
# -*- coding: utf-8 -*- """ Created on Fri Sep 13 09:14:27 2019 @author: hcji """ import os os.environ["CUDA_VISIBLE_DEVICES"] = "-1" # cpugpu import numpy as np import keras.backend as K from keras.models import Model from keras.layers import Input, Dense, Add, concatenate, Conv1D, MaxPooling1D, Flatten from keras...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 19480, 8621, 1511, 7769, 25, 1415, 25, 1983, 13130, 198, 198, 31, 9800, 25, 289, 66, 7285, 198, 37811, 198, 198, 11748, 28686, 198, 418, 13, 26...
2.473988
346
has_high_income = True has_good_credit = True if has_high_income and has_good_credit: print("Eligible for loan") else: print("Ineligible for loan")
[ 10134, 62, 8929, 62, 12519, 796, 6407, 201, 198, 10134, 62, 11274, 62, 43082, 796, 6407, 201, 198, 201, 198, 361, 468, 62, 8929, 62, 12519, 290, 468, 62, 11274, 62, 43082, 25, 201, 198, 220, 220, 220, 3601, 7203, 36, 4604, 856, 32...
2.5625
64
from djcelery.models import WorkerState from django.views.generic import ListView import datetime
[ 198, 6738, 42625, 7015, 88, 13, 27530, 1330, 220, 35412, 9012, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 1330, 7343, 7680, 198, 11748, 4818, 8079, 628, 628, 198 ]
3.586207
29
""" Init module for main serializers """ from kaznet.apps.main.serializers.bounty import BountySerializer # noqa from kaznet.apps.main.serializers.client import ClientSerializer # noqa from kaznet.apps.main.serializers.contenttype import KaznetContentTypeSerializer # noqa from kaznet.apps.main.serializers.locations ...
[ 37811, 198, 31768, 8265, 329, 1388, 11389, 11341, 198, 37811, 198, 6738, 479, 1031, 3262, 13, 18211, 13, 12417, 13, 46911, 11341, 13, 65, 17705, 1330, 38166, 32634, 7509, 220, 1303, 645, 20402, 198, 6738, 479, 1031, 3262, 13, 18211, 13,...
2.646739
368
import torch import torchvision.models as models from torch.profiler import profile, record_function, ProfilerActivity from torch.utils.data import DataLoader from torchvision import datasets from torchvision.transforms import ToTensor, Lambda, Compose import matplotlib.pyplot as plt from signal_perceptron import * fro...
[ 11748, 28034, 198, 11748, 28034, 10178, 13, 27530, 355, 4981, 198, 6738, 28034, 13, 5577, 5329, 1330, 7034, 11, 1700, 62, 8818, 11, 4415, 5329, 16516, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 6060, 17401, 198, 6738, 28034, 10178, 13...
3.21914
721
from openpyxl.styles import PatternFill # Color dict for background fill COLORS = {'red': PatternFill(fgColor='FF0000', fill_type='solid'), 'green': PatternFill(fgColor='00b050', fill_type='solid'), 'orange': PatternFill(fgColor='FFC000', fill_type='solid'), 'yellow': PatternFill(fgColor=...
[ 6738, 1280, 9078, 87, 75, 13, 47720, 1330, 23939, 33762, 198, 198, 2, 5315, 8633, 329, 4469, 6070, 198, 25154, 20673, 796, 1391, 6, 445, 10354, 23939, 33762, 7, 40616, 10258, 11639, 5777, 2388, 3256, 6070, 62, 4906, 11639, 39390, 33809,...
2.596273
161
from __future__ import annotations import asyncio from datetime import datetime from typing import ( TYPE_CHECKING, Union, Optional ) import discord from .Base import DatabaseChecker from .Punishments import Punisher if TYPE_CHECKING: from .Punishments import Punishment from discord.ext import c...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 30351, 952, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 19720, 1330, 357, 198, 220, 220, 220, 41876, 62, 50084, 2751, 11, 198, 220, 220, 220, 4479, 11, 198, 220, 220, 220,...
3.267327
101
# languages = [ # ("EL", "EL"), # ("EN", "EN"), # ] # gender = [ # ("", "---"), # ("M", " / Male"), # ("F", " / Female"), # ] # # age = [ # ("", "---"), # ("u17", "-17"), # ("18-25", "18-25"), # ("26-35", "26-35"), # ("36-45", "36-45"), # ("46-54", "46-54"), # ("55-64", ...
[ 2, 8950, 796, 685, 198, 2, 220, 220, 220, 220, 5855, 3698, 1600, 366, 3698, 12340, 198, 2, 220, 220, 220, 220, 5855, 1677, 1600, 366, 1677, 12340, 198, 2, 2361, 198, 198, 2, 5279, 796, 685, 198, 2, 220, 220, 220, 220, 5855, 1600...
1.908602
558
import mogp_emulator import numpy as np # simple Dimension Reduction examples # simulator function -- returns a single "important" dimension from # at least 4 inputs # Experimental design -- create a design with 5 input parameters # all uniformly distributed over [0,1]. ed = mogp_emulator.LatinHypercubeDesign(5) #...
[ 11748, 32985, 79, 62, 368, 8927, 198, 11748, 299, 32152, 355, 45941, 198, 198, 2, 2829, 34024, 33396, 6096, 198, 198, 2, 35375, 2163, 1377, 5860, 257, 2060, 366, 18049, 1, 15793, 422, 198, 2, 379, 1551, 604, 17311, 198, 198, 2, 3228...
3.041451
772
from flask import Flask, render_template, request, redirect, url_for, session from flask_mysqldb import MySQL,MySQLdb from os import path from notifypy import Notify app = Flask(__name__) app.config['MYSQL_HOST'] = 'localhost' app.config['MYSQL_USER'] = 'root' app.config['MYSQL_PASSWORD'] = '' app.config['MYSQL_D...
[ 6738, 42903, 1330, 46947, 11, 220, 8543, 62, 28243, 11, 2581, 11, 18941, 11, 19016, 62, 1640, 11, 6246, 220, 198, 6738, 42903, 62, 28744, 80, 335, 65, 1330, 33476, 11, 3666, 17861, 9945, 220, 198, 6738, 28686, 1330, 3108, 220, 198, ...
2.520619
194
from model import issuedb as idb import os from model import util, work_path __GENERATE__ = False if __GENERATE__: SRC_DIR = 'tsv/' TEST_DIR = 'tsv_test/' TSV_FILE = work_path.in_project('./model/conf/tab_url.tsv') __data_tsv = util.read_tsv(TSV_FILE) if __name__ == '__main__': # generate_lookup_tabl...
[ 6738, 2746, 1330, 4884, 65, 355, 4686, 65, 198, 11748, 28686, 198, 6738, 2746, 1330, 7736, 11, 670, 62, 6978, 198, 198, 834, 35353, 1137, 6158, 834, 796, 10352, 198, 361, 11593, 35353, 1137, 6158, 834, 25, 198, 220, 220, 220, 311, 7...
2.338889
180
from flask import redirect, render_template, request from . import main
[ 6738, 42903, 1330, 18941, 11, 8543, 62, 28243, 11, 2581, 198, 6738, 764, 1330, 1388, 198 ]
4.5
16
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Nov 11 17:27:59 2020 @author: ladvien """ import sys import os import cv2 import numpy as np from random import randint import matplotlib.pyplot as plt image_tools_path = "/home/ladvien/deep_arcane/" sys.path.append(image_tools_path) from image_ut...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 3300, 5267, 1367, 1596, 25, 1983, 25, 3270, 12131, 198, 198, 31, 9800, 25, 9717, 85, 2013...
2.00074
1,352
"""This script generates README.md based on s3_list.txt. If an S3 object's parent folder(s) doesn't exist, this script will be smart enough to create the parent folder(s) as separate items in output MD file. """ TXT_FILENAME = "processed/s3_list.txt" MD_FILENAME = "processed/README.md" def get_md_name(s3_name): "...
[ 37811, 1212, 4226, 18616, 20832, 11682, 13, 9132, 1912, 319, 264, 18, 62, 4868, 13, 14116, 13, 1002, 281, 311, 18, 2134, 338, 198, 8000, 9483, 7, 82, 8, 1595, 470, 2152, 11, 428, 4226, 481, 307, 4451, 1576, 284, 2251, 198, 1169, 2...
2.127917
1,157
from django_filters import rest_framework as filters from accounts.models import (User) from cantiin.models import (Product, Order, Comment) from my_functions.filters_mixins import (DateTimeFilter, IdFilter) from accounts.models import (User) from django.db.models import Q # https://stackoverflow.com/a/57270647/148...
[ 6738, 42625, 14208, 62, 10379, 1010, 1330, 1334, 62, 30604, 355, 16628, 198, 6738, 5504, 13, 27530, 1330, 357, 12982, 8, 198, 6738, 269, 17096, 259, 13, 27530, 1330, 357, 15667, 11, 8284, 11, 18957, 8, 198, 6738, 616, 62, 12543, 2733,...
3.230769
104
import numpy as np
[ 11748, 299, 32152, 355, 45941, 628 ]
3.333333
6
#Submitted by thr3sh0ld #Logic: Swap half the length of string with the other half
[ 2, 7004, 3291, 416, 5636, 18, 1477, 15, 335, 198, 2, 11187, 291, 25, 48408, 2063, 262, 4129, 286, 4731, 351, 262, 584, 2063 ]
3.416667
24
TLS = TLSParser() SSL = SSLParser() output = 0 with open("input.txt", "r") as f: for line in f: for c in line: TLS.addChar(c) SSL.addChar(c) if SSL.endSequence(): output += 1 print output
[ 201, 198, 201, 198, 201, 198, 201, 198, 51, 6561, 796, 24811, 4303, 28198, 3419, 201, 198, 31127, 796, 6723, 19930, 28198, 3419, 201, 198, 22915, 796, 657, 201, 198, 201, 198, 4480, 1280, 7203, 15414, 13, 14116, 1600, 366, 81, 4943, ...
1.973684
114
import unittest from p004 import solution, is_palindrome if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 279, 22914, 1330, 4610, 11, 318, 62, 18596, 521, 5998, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 628 ]
2.7
40
#!/usr/bin/env python # -*- encoding:utf-8 -*- __author__ = 'LexusLee' """ threading.Thread """ import logging.config import os import yaml from foundation import const BASE_DIR = os.path.dirname(__file__) if const.env == "development": log_config_path = os.path.abspath(os.path.join(BASE_DIR, os.pardir, 'confi...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 21004, 25, 40477, 12, 23, 532, 9, 12, 198, 834, 9800, 834, 796, 705, 45117, 385, 24338, 6, 198, 37811, 198, 16663, 278, 13, 16818, 198, 198, 37811, 198, 198, 11748, ...
2.541114
377
from pathlib import Path from typing import Generator, Union import pandas as pd from .fit import read_fit from .gpx import read_gpx from .tcx import read_tcx def read_file(fpath: Union[str, Path], *args, **kwargs) -> pd.DataFrame: """This method tries to recognize the file type of the fpath argument by reading...
[ 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 35986, 11, 4479, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 764, 11147, 1330, 1100, 62, 11147, 198, 6738, 764, 70, 8416, 1330, 1100, 62, 70, 8416, 198, 6738, 764, ...
2.734584
373
import argparse import hail as hl from gnomad.utils.vep import ( process_consequences, filter_vep_to_canonical_transcripts, get_most_severe_consequence_for_summary, CSQ_CODING_HIGH_IMPACT, CSQ_CODING_MEDIUM_IMPACT, CSQ_CODING_LOW_IMPACT, CSQ_NON_CODING, ) from hail.genetics import reference...
[ 11748, 1822, 29572, 198, 11748, 32405, 355, 289, 75, 198, 198, 6738, 19967, 296, 324, 13, 26791, 13, 303, 79, 1330, 357, 198, 220, 220, 220, 1429, 62, 1102, 3107, 3007, 11, 198, 220, 220, 220, 8106, 62, 303, 79, 62, 1462, 62, 4988...
2.132009
856
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
""" Helper functions used within the test suite """ import glob from contextlib import suppress from os import environ, remove, rmdir from os.path import join, exists from pymongo import MongoClient def remove_file(files): """remove a single file if it exists.""" for f in files: if exists(f): ...
[ 37811, 198, 47429, 5499, 973, 1626, 262, 1332, 18389, 198, 37811, 198, 198, 11748, 15095, 198, 6738, 4732, 8019, 1330, 18175, 198, 6738, 28686, 1330, 551, 2268, 11, 4781, 11, 374, 9132, 343, 198, 6738, 28686, 13, 6978, 1330, 4654, 11, ...
2.583153
463
import _thread import time import requests headers = { "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) Mobile/14G60 MicroMessenger/6.5.19 NetType/4...
[ 11748, 4808, 16663, 198, 11748, 640, 198, 198, 11748, 7007, 198, 198, 50145, 796, 1391, 198, 220, 220, 220, 366, 38855, 1298, 366, 5239, 14, 6494, 11, 31438, 14, 87, 6494, 10, 19875, 11, 31438, 14, 19875, 26, 80, 28, 15, 13, 24, 1...
2.365854
287
# coding: utf-8 """Tests for IPython.core.application""" import os import tempfile from IPython.core.application import Application def test_unicode_cwd(): """Check that IPython starts with non-ascii characters in the path.""" wd = tempfile.mkdtemp(suffix=u"") old_wd = os.getcwdu() os.chdir(wd) ...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 37811, 51, 3558, 329, 6101, 7535, 13, 7295, 13, 31438, 37811, 198, 198, 11748, 28686, 198, 11748, 20218, 7753, 198, 198, 6738, 6101, 7535, 13, 7295, 13, 31438, 1330, 15678, 198, 198, 4299, 1332, ...
2.263435
949
#!/usr/bin/env python3 """Rechunk a Zarr with chunks of size 1 in time, full size in lat/lon. If s3fs is installed, "s3://..." arguments can be used and credentials will be read from standard environment variables or files (see s3fs docs). The output dataset will have the same data as the input dataset, rechunked so...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 37811, 3041, 354, 2954, 257, 1168, 3258, 351, 22716, 286, 2546, 352, 287, 640, 11, 1336, 2546, 287, 3042, 14, 14995, 13, 198, 198, 1532, 264, 18, 9501, 318, 6589, 11, 366, ...
3.487805
164
from discord.ext import commands from alttprbot.exceptions import SahasrahBotException from alttprbot.alttprgen.smvaria import generate_preset
[ 6738, 36446, 13, 2302, 1330, 9729, 198, 198, 6738, 435, 926, 1050, 13645, 13, 1069, 11755, 1330, 22982, 292, 11392, 20630, 16922, 198, 6738, 435, 926, 1050, 13645, 13, 282, 926, 1050, 5235, 13, 5796, 7785, 544, 1330, 7716, 62, 18302, ...
3.318182
44
#import numpy as np if __name__ == "__main__": with open("rosalind_scc.txt", "r") as f: vertex_quant, edges_quant = map(int, f.readline().strip().split()) grph = MyGrph(vertex_quant, edges_quant) grph.build_graph(f) rslt = grph.scc() print(rslt) with open("scc_answer.txt",...
[ 2, 11748, 299, 32152, 355, 45941, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 351, 1280, 7203, 4951, 282, 521, 62, 82, 535, 13, 14116, 1600, 366, 81, 4943, 355, 277, 25, 198, 220, 22...
2.051429
175
#!/usr/bin/env python3 # Programm : test_tastatur.py # Version : 1.01 # SW-Stand : 17.02.2022 # Autor : Kanopus1958 # Beschreibung : Tastur Beispiel in Python from rwm_steuerung import color as c from rwm_mod01 import show_header import platform import sys G_OS = ('Raspbian', 'Debian') G_HEADER_1...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 6118, 76, 220, 220, 220, 220, 1058, 1332, 62, 83, 459, 2541, 13, 9078, 198, 2, 10628, 220, 220, 220, 220, 220, 1058, 352, 13, 486, 198, 2, 12672, 12, 15480, 220, 220,...
2.173729
236
/home/sheldon/anaconda3/lib/python3.6/sre_constants.py
[ 14, 11195, 14, 7091, 25900, 14, 272, 330, 13533, 18, 14, 8019, 14, 29412, 18, 13, 21, 14, 82, 260, 62, 9979, 1187, 13, 9078 ]
2.16
25
from nfsn import NearlyFreeSpeechService from webfaction import WebFactionService services= [WebFactionService, NearlyFreeSpeechService] services_by_name= dict(((s.__name__,s) for s in services))
[ 6738, 299, 9501, 77, 1330, 21233, 11146, 5248, 3055, 16177, 198, 6738, 3992, 69, 2673, 1330, 5313, 37, 2673, 16177, 198, 198, 30416, 28, 685, 13908, 37, 2673, 16177, 11, 21233, 11146, 5248, 3055, 16177, 60, 198, 30416, 62, 1525, 62, 3...
3.283333
60
# coding: utf-8 import math from const import CUR_FOLDER, FILE_FOLDER, FILE_TRAIN, FEATURE_NUM, K, FOLD, VALUES if __name__ == '__main__': crossvalidation()
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 11748, 10688, 198, 198, 6738, 1500, 1330, 327, 4261, 62, 37, 3535, 14418, 11, 45811, 62, 37, 3535, 14418, 11, 45811, 62, 51, 3861, 1268, 11, 220, 18630, 40086, 62, 41359, 11, 509, 11, 376,...
2.388889
72
import socket import struct # Funzione send_names chiede al utente tramite l'input il suo nome da inviare al server
[ 11748, 17802, 198, 11748, 2878, 198, 198, 2, 11138, 89, 7935, 3758, 62, 14933, 442, 798, 68, 435, 3384, 21872, 29957, 578, 300, 6, 15414, 4229, 424, 78, 299, 462, 12379, 800, 72, 533, 435, 4382 ]
3.222222
36
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); y...
[ 2, 220, 220, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 2, 220, 220, 393, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 2, 220, 220, 9387, 351, 428, 670, 329, 3224, 1321, 198, 2, 220, ...
3.747604
313
import ynet from util import * from singa.layer import Conv2D, Activation, MaxPooling2D, AvgPooling2D, Flatten, Slice, LRN from singa import initializer from singa import layer from singa import loss from singa import tensor import cPickle as pickle import logging import os import numpy as np from numpy.core.umath_te...
[ 11748, 331, 3262, 198, 6738, 7736, 1330, 1635, 198, 198, 6738, 1702, 64, 13, 29289, 1330, 34872, 17, 35, 11, 13144, 341, 11, 5436, 27201, 278, 17, 35, 11, 33455, 27201, 278, 17, 35, 11, 1610, 41769, 11, 3454, 501, 11, 37491, 45, 1...
3.083916
143
from textwrap import dedent import json from gluon import current from constants import ONE_HOUR from versecontent import VERSECONTENT
[ 6738, 2420, 37150, 1330, 4648, 298, 198, 11748, 33918, 198, 198, 6738, 1278, 84, 261, 1330, 1459, 198, 198, 6738, 38491, 1330, 16329, 62, 39, 11698, 198, 6738, 3326, 2363, 38564, 1330, 44156, 2943, 35830, 3525, 628 ]
3.72973
37
#!/usr/bin/env python # # Copyright (c) 2008-2010 Stefan Krah. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, t...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 198, 2, 15069, 357, 66, 8, 3648, 12, 10333, 28842, 509, 11392, 13, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, ...
2.311475
4,392
import cv2 import numpy as np from joblib import load as model_load from api.services.file_select import FileTask
[ 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 1693, 8019, 1330, 3440, 355, 2746, 62, 2220, 198, 198, 6738, 40391, 13, 30416, 13, 7753, 62, 19738, 1330, 9220, 25714, 198 ]
3.314286
35
# -*- coding: utf-8 -*- # @Time : 2020/9/9-22:50 # @Author : TuringEmmy # @Email : yonglonggeng@163.com # @WeChat : csy_lgy # @File : support_vector_machine.py # @Project : Sep-Dragon # ************************************************* import numpy as np import pandas as pd from sklearn.datasets import ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 7575, 220, 220, 220, 220, 1058, 12131, 14, 24, 14, 24, 12, 1828, 25, 1120, 198, 2, 2488, 13838, 220, 220, 1058, 39141, 10161, 1820, 198, 2, 2488, 15333, 220...
2.173451
565
# Copyright 2019 Intel Corporation. import numpy as np import plaidml2 as plaidml import plaidml2.settings as plaidml_settings from plaidml2.ffi import ForeignObject, decode_str, ffi, ffi_call, lib ffi.init_once(__init, 'plaidml_exec_init')
[ 2, 15069, 13130, 8180, 10501, 13, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 458, 1698, 4029, 17, 355, 458, 1698, 4029, 198, 11748, 458, 1698, 4029, 17, 13, 33692, 355, 458, 1698, 4029, 62, 33692, 198, 6738, 458, 1698, ...
2.808989
89
#!/usr/bin/env python """ Unittest for the LLA module VolumeLLA """ from ConfigParser import ConfigParser import datetime import os import sys import time import unittest from afs.tests.BaseTest import parse_commandline import afs.lla.VolServerLLA import afs.lla.VLDBLLA import afs if __name__ == '__main__' : ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 198, 3118, 715, 395, 329, 262, 406, 13534, 8265, 14701, 3069, 32, 198, 37811, 198, 198, 6738, 17056, 46677, 1330, 17056, 46677, 198, 11748, 4818, 8079, 198, 11748, 28686, 198...
2.701068
281
from math import pi, sin if __name__ == '__main__': test()
[ 6738, 10688, 1330, 31028, 11, 7813, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1332, 3419, 198 ]
2.56
25
# MIT License # # Copyright (c) 2021 Soohwan Kim # # 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, ...
[ 2, 17168, 13789, 198, 2, 198, 2, 15069, 357, 66, 8, 33448, 1406, 1219, 8149, 6502, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 2, 286, 428, 3788, 290, 3917, 10314, ...
3.749296
355
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import _utilities from...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 17202, 39410, 25, 428, 2393, 373, 7560, 416, 262, 21624, 12994, 26144, 35986, 13, 17202, 198, 2, 17202, 2141, 407, 4370, 416, 1021, 4556, 345, 821, 1728, 345, 760, 644, 345, 389, 1804, 0, 17202, ...
3.048951
286
import dbops from loguru import logger import traceback from bson.objectid import ObjectId import utils import global_vars as g import fs_utils
[ 11748, 20613, 2840, 220, 198, 6738, 2604, 14717, 1330, 49706, 198, 11748, 12854, 1891, 220, 198, 6738, 275, 1559, 13, 15252, 312, 1330, 9515, 7390, 198, 11748, 3384, 4487, 198, 11748, 3298, 62, 85, 945, 355, 308, 220, 198, 11748, 43458,...
2.983333
60
import smtplib import os from os.path import basename from email.mime.application import MIMEApplication from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from email.utils import COMMASPACE, formatdate GMAIL_USERNAME = client_secret=os.getenv("GMAIL_USERNAME") GMAIL_PASSWORD = client...
[ 11748, 895, 83, 489, 571, 198, 11748, 28686, 198, 6738, 28686, 13, 6978, 1330, 1615, 12453, 198, 6738, 3053, 13, 76, 524, 13, 31438, 1330, 337, 12789, 23416, 198, 6738, 3053, 13, 76, 524, 13, 16680, 541, 433, 1330, 337, 3955, 3620, ...
2.902439
123
"""Add some sphinx-docutils directives related to lessons. """ # pylint: disable=E701 import os from docutils import nodes from docutils.parsers.rst.directives.admonitions \ import Admonition as AdmonitionDirective from sphinx.util.docutils import SphinxDirective from sphinx.util.logging import getLogger from . im...
[ 37811, 4550, 617, 599, 20079, 87, 12, 15390, 26791, 34819, 3519, 284, 11658, 13, 198, 37811, 198, 2, 279, 2645, 600, 25, 15560, 28, 36, 41583, 198, 198, 11748, 28686, 198, 198, 6738, 2205, 26791, 1330, 13760, 198, 6738, 2205, 26791, 1...
2.374825
715
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # # 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 ...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 2864, 383, 3012, 9552, 15417, 4816, 46665, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393,...
3.612167
263
#!/usr/bin/env python # -*- coding: utf-8 -*- from pathlib import Path from setuptools import setup CURRENT_DIR = Path(__file__).parent setup( name="eksi", version="0.0.1", description="Komut satrnda Ekiszlk!", long_description=get_long_description(), long_description_content_type="text/markdo...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 34, 39237, 62, 34720, 796,...
2.439791
382
"""Module for reading the SETTINGS.json file. """ import json import os with open(os.path.dirname(os.path.realpath(__file__)) + '/SETTINGS.json') as data_file: PATHS = json.load(data_file) TRAIN_DATA_PATH = PATHS["TRAIN_DATA_PATH"] TEST_DATA_PATH = PATHS["VALIDATE_DATA_PATH"] PKL_TRAIN_DATA_PATH = PATHS["PKL_TRA...
[ 37811, 26796, 329, 3555, 262, 25823, 51, 20754, 13, 17752, 2393, 13, 198, 37811, 198, 198, 11748, 33918, 198, 11748, 28686, 198, 198, 4480, 1280, 7, 418, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 5305, 6978, 7, 834, 7753, 834...
2.311047
344
# what not to do - use empty function # race conditions may cause it not to finish right away # but the timeout will catch it # UPDATE: solved in d9c4fad import sys sys.path.append('..') from pykron.core import Pykron, PykronLogger import time app = Pykron() logger = PykronLogger.getInstance() result = fun4().w...
[ 198, 2, 644, 407, 284, 466, 532, 779, 6565, 2163, 198, 2, 3234, 3403, 743, 2728, 340, 407, 284, 5461, 826, 1497, 198, 2, 475, 262, 26827, 481, 4929, 340, 198, 198, 2, 35717, 25, 16019, 287, 288, 24, 66, 19, 69, 324, 628, 198, ...
2.96063
127
import sys, os, itertools, operator import datetime import shapely from shapely.geometry import asShape as geoj2geom from shapely.geometry import mapping as geom2geoj import rtree from . import loader def intersecting(self, bbox): results = self.spindex.intersection(bbox) return ...
[ 11748, 25064, 11, 28686, 11, 340, 861, 10141, 11, 10088, 198, 11748, 4818, 8079, 628, 198, 198, 11748, 5485, 306, 198, 6738, 5485, 306, 13, 469, 15748, 1330, 355, 33383, 355, 4903, 13210, 17, 469, 296, 198, 6738, 5485, 306, 13, 469, ...
2.278388
1,365
#!/usr/bin/env python3 """ day10-2021.py - my solution to day 10 of advent of code 2021. the link to the problem is: https://adventofcode.com/2021/day/10 use by running `./aoc-day10-2021.py [input]` this code was originally posted here: ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 198, 820, 940, 12, 1238, 2481, 13, 9078, 532, 616, 4610, 284, 1110, 838, 286, 19980, 286, 2438, 33448, 13, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 22...
2.160825
485
# Copyright(c) 2019-2020 Intel Corporation All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # * Redistributions of source code must retain the above copyright # notice, this list of condition...
[ 2, 15069, 7, 66, 8, 13130, 12, 42334, 8180, 10501, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 393, 1231, 198, 2, 17613, 11, 389, 10431, 2810, 326, 262, 1708, 3403, 198, ...
2.270588
4,080
import os import uvicorn as uvicorn import telegram_bot import fastAPI_server.start_fast_api as fAPI if __name__ == '__main__': telegram_bot.__init__() ROOT_DIR = os.path.dirname(os.path.abspath(__file__)) fAPI.init_elems(ROOT_DIR) uvicorn.run(fAPI.app, host='0.0.0.0', port=8000, lifespan="on")
[ 11748, 28686, 198, 198, 11748, 334, 25531, 1211, 355, 334, 25531, 1211, 198, 198, 11748, 573, 30536, 62, 13645, 198, 11748, 3049, 17614, 62, 15388, 13, 9688, 62, 7217, 62, 15042, 355, 277, 17614, 198, 198, 361, 11593, 3672, 834, 6624, ...
2.282609
138
import requests import json from DataBase import * #9301500 #9:30, if __name__=='__main__': getmindata()
[ 11748, 7007, 198, 11748, 33918, 198, 6738, 6060, 14881, 1330, 1635, 198, 2, 6052, 486, 4059, 198, 2, 24, 25, 1270, 11, 198, 198, 361, 11593, 3672, 834, 855, 6, 834, 12417, 834, 10354, 198, 220, 220, 220, 651, 10155, 1045, 3419 ]
2.595238
42
""" Assign an annotation (and possibly a value) to a variable. """ from _ast import AnnAssign, Name from typing import Optional from src.compiler.Util import Util from src.pyexpressions.abstract.PyExpression import PyExpression from src.pyexpressions.concrete.PyName import PyName from src.pyexpressions.highlevel.PyIde...
[ 37811, 198, 8021, 570, 281, 23025, 357, 392, 5457, 257, 1988, 8, 284, 257, 7885, 13, 198, 37811, 198, 6738, 4808, 459, 1330, 5506, 8021, 570, 11, 6530, 198, 6738, 19720, 1330, 32233, 198, 198, 6738, 12351, 13, 5589, 5329, 13, 18274, ...
3.484277
159
# -*- coding: utf-8 -*- # Copyright 2021 Tampere University and VTT Technical Research Centre of Finland # This software was developed as a part of the ProCemPlus project: https://www.senecc.fi/projects/procemplus # This source code is licensed under the MIT license. See LICENSE in the repository root directory. # Auth...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 33448, 11552, 431, 260, 2059, 290, 569, 15751, 20671, 4992, 9072, 286, 17837, 198, 2, 770, 3788, 373, 4166, 355, 257, 636, 286, 262, 1041, 34, 368, 17860, 16...
2.9722
1,259
# Copyright (C) 2008 Andi Albrecht, albrecht.andi@gmail.com # # This module is part of python-sqlparse and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php. """Parse SQL statements.""" __version__ = '0.1.14' # Setup namespace from sqlparse import engine from sqlparse import f...
[ 2, 15069, 357, 34, 8, 3648, 843, 72, 978, 4679, 21474, 11, 435, 4679, 21474, 13, 26800, 31, 14816, 13, 785, 198, 2, 198, 2, 770, 8265, 318, 636, 286, 21015, 12, 25410, 29572, 290, 318, 2716, 739, 198, 2, 262, 347, 10305, 13789, ...
3.178645
974
# -*- coding: utf-8 -*- from django.conf.urls import patterns, include, url # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover() urlpatterns = patterns('', # Login view url(r'^$', 'ghost.views.index_view'), url(r'^login/$', 'ghost.views.lo...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 7572, 11, 2291, 11, 19016, 201, 198, 201, 198, 2, 791, 23893, 262, 1306, 734, 3951, 284, 7139, 262, 13169, 25, ...
2.476726
623
import os import pandas as pd from pandas import read_csv import glob from joblib import Parallel, delayed import numpy as np import argparse if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('train_folder', help='Train folder root path') parser.add_argument('actor_label_...
[ 11748, 28686, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 19798, 292, 1330, 1100, 62, 40664, 198, 11748, 15095, 198, 6738, 1693, 8019, 1330, 42945, 11, 11038, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 1822, 29572, 628, 628, 1...
2.711027
263
example = Road(5000, 20) print(example.calculatiion(5))
[ 198, 20688, 796, 5567, 7, 27641, 11, 1160, 8, 198, 4798, 7, 20688, 13, 9948, 3129, 7246, 295, 7, 20, 4008 ]
2.666667
21
from sspipe import p, px import numpy as np
[ 6738, 264, 2777, 3757, 1330, 279, 11, 279, 87, 198, 11748, 299, 32152, 355, 45941, 628, 628, 628, 198 ]
2.631579
19
# Generated by Django 4.0.3 on 2022-03-18 15:22 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 604, 13, 15, 13, 18, 319, 33160, 12, 3070, 12, 1507, 1315, 25, 1828, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, ...
2.818182
44
import datetime import enum
[ 11748, 4818, 8079, 198, 11748, 33829, 628 ]
4.142857
7
# find position of `target` in subarray nums[leftright] my_list = [1, 3, 5, 7, 9] right = len(my_list) - 1 left = 0 print(binary_search(my_list, left, right, 3)) print(binary_search(my_list, left, right, -1))
[ 2, 1064, 2292, 286, 4600, 16793, 63, 287, 850, 18747, 997, 82, 58, 9464, 3506, 60, 628, 198, 1820, 62, 4868, 796, 685, 16, 11, 513, 11, 642, 11, 767, 11, 860, 60, 198, 3506, 796, 18896, 7, 1820, 62, 4868, 8, 532, 352, 198, 946...
2.494118
85
import logging import random from pathlib import Path from datetime import datetime, timezone import click import datasets as nlp import torch import numpy as np import pandas as pd from simpletransformers.classification import ClassificationModel from sklearn.metrics import f1_score, accuracy_score, recall_score, pre...
[ 11748, 18931, 198, 11748, 4738, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 640, 11340, 198, 198, 11748, 3904, 198, 11748, 40522, 355, 299, 34431, 198, 11748, 28034, 198, 11748, 299, 32152, 355, 45941,...
3.804348
184
"Command-Line Arguments" ''' The sys module is also where Python makes available the words typed on the command that is used to start a Python script. These words are usually referred to as commandline arguments and show up in sys.argv, a built-in list of strings. ''' import sys print(sys.argv) ''' C:\...\PP4E\S...
[ 1, 21575, 12, 13949, 20559, 2886, 1, 198, 7061, 6, 198, 464, 25064, 8265, 318, 635, 810, 11361, 1838, 1695, 262, 2456, 25683, 319, 262, 3141, 198, 5562, 318, 973, 284, 923, 257, 11361, 4226, 13, 2312, 2456, 389, 3221, 6412, 284, 355...
3.244776
335
from math import floor, ceil, sqrt, log2 from libraries import Digits
[ 6738, 10688, 1330, 4314, 11, 2906, 346, 11, 19862, 17034, 11, 2604, 17, 198, 6738, 12782, 1330, 7367, 896, 628 ]
3.55
20
# Copyright 2017 Semaphore Solutions, Inc. # --------------------------------------------------------------------------- from collections import defaultdict def get_parent_artifacts(lims, artifacts): """ Helper method to get the parent artifacts keyed to the supplied artifacts :param LIMS lims: :par...
[ 2, 15069, 2177, 12449, 6570, 382, 23555, 11, 3457, 13, 198, 2, 16529, 32284, 198, 198, 6738, 17268, 1330, 4277, 11600, 628, 198, 4299, 651, 62, 8000, 62, 50179, 7, 2475, 82, 11, 20316, 2599, 198, 220, 220, 220, 37227, 198, 220, 220,...
2.685876
2,655
import hou from wizard.prefs.main import prefs from wizard.vars import defaults from wizard.tools import log from wizard.asset import main as asset_core from softwares.houdini_wizard.tools import * from wizard.tools import utility as utils import os import traceback import shutil from wizard.project import wall from wi...
[ 11748, 289, 280, 198, 6738, 18731, 13, 3866, 9501, 13, 12417, 1330, 7694, 82, 198, 6738, 18731, 13, 85, 945, 1330, 26235, 198, 6738, 18731, 13, 31391, 1330, 2604, 198, 6738, 18731, 13, 562, 316, 1330, 1388, 355, 11171, 62, 7295, 198, ...
3.423729
118
import discord from discord.ext import commands #Helper Libraries from datetime import datetime import feedparser import json #Utils import strings #IRI: changed 'Server' to 'timers'
[ 11748, 36446, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 198, 2, 47429, 46267, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 3745, 48610, 198, 11748, 33918, 198, 198, 2, 18274, 4487, 198, 11748, 13042, 198, 198, 2, 4663, 40, ...
3.576923
52
import sys import os.path if __name__ == '__main__' and __package__ is None: sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) from table import Table from loader import load from utils import groupby from report_writer import RestWriter from prettyprint import * if __name__ == ...
[ 11748, 25064, 198, 11748, 28686, 13, 6978, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 6, 290, 11593, 26495, 834, 318, 6045, 25, 198, 220, 220, 220, 25064, 13, 6978, 13, 33295, 7, 418, 13, 6978, 13, 397, 2777, 776, ...
2.90678
118
from .bind_annotation import blueprint from .bind_annotation import delete_route from .bind_annotation import get_route from .bind_annotation import head_route from .bind_annotation import patch_route from .bind_annotation import post_route from .bind_annotation import put_route from .bind_annotation import route from ...
[ 6738, 764, 21653, 62, 1236, 14221, 1330, 30881, 198, 6738, 764, 21653, 62, 1236, 14221, 1330, 12233, 62, 38629, 198, 6738, 764, 21653, 62, 1236, 14221, 1330, 651, 62, 38629, 198, 6738, 764, 21653, 62, 1236, 14221, 1330, 1182, 62, 38629,...
4.111111
270
#coding: utf-8 import os import time
[ 2, 66, 7656, 25, 3384, 69, 12, 23, 198, 11748, 28686, 198, 11748, 640 ]
2.571429
14
import base64
[ 11748, 2779, 2414, 198, 220, 220, 220, 220 ]
2.25
8
"""Integration with Astoria.""" import asyncio import logging from json import JSONDecodeError, loads from pathlib import Path from typing import Match, NamedTuple, Optional from astoria.common.broadcast_event import StartButtonBroadcastEvent from astoria.common.consumer import StateConsumer from astoria.common.messa...
[ 37811, 34500, 1358, 351, 8304, 7661, 526, 15931, 198, 198, 11748, 30351, 952, 198, 11748, 18931, 198, 6738, 33918, 1330, 19449, 10707, 1098, 12331, 11, 15989, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 13225, 11, 34441, 5...
3.641509
159
#! /usr/bin/env python # encoding: utf-8 from aoc2017.day_16 import permutations_1
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 21004, 25, 3384, 69, 12, 23, 198, 198, 6738, 257, 420, 5539, 13, 820, 62, 1433, 1330, 9943, 32855, 62, 16, 628 ]
2.575758
33
#!/usr/bin/env python # Created by Adam Melton (.dok) referenceing https://bitmessage.org/wiki/API_Reference for API documentation # Distributed under the MIT/X11 software license. See the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. import time import sys import os import json i...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 15622, 416, 7244, 5616, 1122, 20262, 67, 482, 8, 4941, 278, 3740, 1378, 2545, 20500, 13, 2398, 14, 15466, 14, 17614, 62, 26687, 329, 7824, 10314, 198, 2, 4307, 6169, 739, 262...
2.617234
499
# Generated by Django 2.2.24 on 2021-09-21 10:21 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 1731, 319, 33448, 12, 2931, 12, 2481, 838, 25, 2481, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.875
32