content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from django.shortcuts import render, redirect from .forms import RegistrationForm from .models import Account from django.contrib import messages, auth from django.contrib.auth.decorators import login_required from django.http import HttpResponse from carts.models import Cart, CartItem from carts.views import _cart_id ...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 18941, 198, 6738, 764, 23914, 1330, 24610, 8479, 198, 6738, 764, 27530, 1330, 10781, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 6218, 11, 6284, 198, 6738, 42625, 14208, 13, 3642, ...
3.480519
231
begin_unit comment|'# Copyright 2010 United States Government as represented by the' nl|'\n' comment|'# Administrator of the National Aeronautics and Space Administration.' nl|'\n' comment|'# All Rights Reserved.' nl|'\n' comment|'#' nl|'\n' comment|'# Licensed under the Apache License, Version 2.0 (the "License"); ...
[ 27471, 62, 20850, 198, 23893, 91, 6, 2, 15069, 3050, 1578, 1829, 5070, 355, 7997, 416, 262, 6, 198, 21283, 91, 6, 59, 77, 6, 198, 23893, 91, 6, 2, 22998, 286, 262, 2351, 15781, 261, 2306, 873, 290, 4687, 8694, 2637, 198, 21283, ...
2.262136
927
import io from google.cloud import vision # Prepare image to be classified # Get the labels for an image
[ 11748, 33245, 198, 6738, 23645, 13, 17721, 1330, 5761, 628, 220, 220, 220, 1303, 43426, 2939, 284, 307, 10090, 628, 220, 220, 220, 1303, 3497, 262, 14722, 329, 281, 2939, 198 ]
3.709677
31
from django.db import models from django.db.models.signals import pre_save from user.models import CustomUser # Signals pre_save.connect(caculate_university_overall_score, sender=UniversityRate) pre_save.connect(caculate_professor_overall_score, sender=ProfessorRate)
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 13, 12683, 874, 1330, 662, 62, 21928, 198, 6738, 2836, 13, 27530, 1330, 8562, 12982, 628, 628, 628, 628, 628, 198, 2, 5865, 874, 628, 198, 198, ...
3.122222
90
# -*- coding: utf-8 -*- from __future__ import unicode_literals import json import logging import sys from argparse import ArgumentParser from six import PY2 import yaml from . import ( __url__, __version__, api, ) from .provider import ProviderError from .serializer import ( get_json_encoder, ge...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 25064, 198, 6738, 1822, 29572, 1330, 45751, 46677, 198, ...
2.338028
2,272
from unittest import TestCase from string_utils.generation import roman_range
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 6738, 4731, 62, 26791, 13, 20158, 1330, 374, 5185, 62, 9521, 628 ]
3.809524
21
""" Copyright (C) 2011 Mads Chr. Olesen <mchro@cs.aau.dk> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later versi...
[ 37811, 220, 198, 220, 220, 220, 15069, 357, 34, 8, 2813, 198, 220, 220, 220, 4627, 82, 49369, 13, 440, 829, 268, 1279, 76, 354, 305, 31, 6359, 13, 64, 559, 13, 34388, 29, 628, 220, 220, 220, 770, 1430, 318, 1479, 3788, 25, 345, ...
3.428224
411
from org.nsclient4j import NSClient4j, NSClient4JException
[ 6738, 8745, 13, 5907, 16366, 19, 73, 1330, 10896, 11792, 19, 73, 11, 10896, 11792, 19, 41, 16922, 201 ]
3.105263
19
import string import random import time from flask import Flask, Response from flask.json import jsonify app = Flask(__name__) @app.route('/') if __name__ == '__main__': app.run()
[ 11748, 4731, 198, 11748, 4738, 198, 11748, 640, 198, 198, 6738, 42903, 1330, 46947, 11, 18261, 198, 6738, 42903, 13, 17752, 1330, 33918, 1958, 198, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 628, 198, 220, 220, 220, 220, 220, 220, ...
2.716216
74
from fastapi.testclient import TestClient from dogapp.app import app client = TestClient(app)
[ 6738, 3049, 15042, 13, 9288, 16366, 1330, 6208, 11792, 198, 198, 6738, 3290, 1324, 13, 1324, 1330, 598, 198, 16366, 796, 6208, 11792, 7, 1324, 8 ]
3.615385
26
import math # Import appropriate version of tkinter try: import Tkinter as tk except ImportError: import tkinter as tk import numpy as np import matplotlib as mpl import matplotlib.backends.backend_tkagg as backend_tkagg import faraday_numerics import entry_boxes import options if __name__ == '__main__': ...
[ 11748, 10688, 198, 198, 2, 17267, 5035, 2196, 286, 256, 74, 3849, 198, 28311, 25, 198, 220, 220, 220, 1330, 309, 74, 3849, 355, 256, 74, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 1330, 256, 74, 3849, 355, 256, 74, 198, 198...
2.955357
112
comanda = "" while comanda != "quit": comanda = input("> ").lower() if comanda == "start": print("Masina a pornit") elif comanda == "stop": print("Masina sa oprit") elif comanda == "help": print(''' Start - Masina porneste Stop - Masina se opreste quit - A iesi ...
[ 785, 5282, 796, 13538, 198, 4514, 401, 5282, 14512, 366, 47391, 1298, 198, 220, 220, 401, 5282, 796, 5128, 7, 5320, 366, 737, 21037, 3419, 198, 220, 220, 611, 401, 5282, 6624, 366, 9688, 1298, 198, 220, 220, 220, 220, 220, 220, 3601...
2.137931
174
# -*- coding: utf-8 -*- # global import from xlwt import * # local import # global vars header_names = [ u"影片名称", u"片长", u"语言", u"开映时间", u"结束时间", u"场间", ] ## HEADER STYLE header_pat = Pattern() header_pat.pattern = header_pat.SOLID_PATTERN header_pat.pattern_fore_colour = 1 header_pat.patte...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 3298, 1330, 198, 6738, 2124, 75, 46569, 1330, 1635, 198, 198, 2, 1957, 1330, 198, 198, 2, 3298, 410, 945, 198, 25677, 62, 14933, 796, 685, 198, 220, 220, 220...
2.704362
619
import _dk_core as core # interpolation type CATMULL_ROM = 0 UNIFORM_CUBIC = 1 HERMITE = 2 BEZIER = 3 Spline = core.Spline class Spline2: '''spline for Vector2''' class Spline3: '''spline for Vector3''' class Spline4: '''spline for Vector4'''
[ 11748, 4808, 34388, 62, 7295, 355, 4755, 198, 198, 2, 39555, 341, 2099, 198, 34, 1404, 44, 9994, 62, 33676, 796, 657, 198, 4944, 5064, 1581, 44, 62, 34, 10526, 2149, 796, 352, 198, 16879, 44, 12709, 796, 362, 198, 12473, 57, 38311, ...
2.278261
115
# Lint as: python3 """LIT wrappers for T5, supporting both HuggingFace and SavedModel formats.""" import re from typing import List import attr from lit_nlp.api import model as lit_model from lit_nlp.api import types as lit_types from lit_nlp.examples.models import model_utils from lit_nlp.lib import utils import ten...
[ 2, 406, 600, 355, 25, 21015, 18, 198, 37811, 43, 2043, 7917, 11799, 329, 309, 20, 11, 6493, 1111, 12905, 2667, 32388, 290, 8858, 276, 17633, 17519, 526, 15931, 198, 11748, 302, 198, 6738, 19720, 1330, 7343, 198, 198, 11748, 708, 81, ...
2.585776
4,640
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2017-01-18 14:49 from __future__ import unicode_literals from django.db import migrations, models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 940, 13, 19, 319, 2177, 12, 486, 12, 1507, 1478, 25, 2920, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 1...
2.736842
57
from .methods import Randomizer from .plots import oned, twod from .utils import * __version__ = "0.1.4"
[ 6738, 764, 24396, 82, 1330, 14534, 7509, 198, 6738, 764, 489, 1747, 1330, 319, 276, 11, 665, 375, 198, 6738, 764, 26791, 1330, 1635, 628, 198, 834, 9641, 834, 796, 366, 15, 13, 16, 13, 19, 1, 198 ]
2.815789
38
##Script to prepare data for pollination analyses ##Before running, you must have the NLCD and CDL rasters for your year(s) of analysis and the states raster in one folder # Import modules, reset environments import arcpy arcpy.CheckOutExtension("spatial") arcpy.ResetEnvironments() import tkFileDialog # Se...
[ 2235, 7391, 284, 8335, 1366, 329, 3278, 1883, 13523, 201, 198, 2235, 8421, 2491, 11, 345, 1276, 423, 262, 399, 5639, 35, 290, 6458, 43, 374, 7060, 329, 534, 614, 7, 82, 8, 286, 3781, 290, 262, 2585, 374, 1603, 287, 530, 9483, 201,...
2.832985
479
from keprekars_constant import find_keprekars_constant_steps import unittest if __name__ == "__main__": unittest.main()
[ 6738, 885, 3866, 74, 945, 62, 9979, 415, 1330, 1064, 62, 365, 3866, 74, 945, 62, 9979, 415, 62, 20214, 198, 11748, 555, 715, 395, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 555, 715...
2.591837
49
import cv2 from qualipy.utils.focus_measure import * IMAGE = cv2.imread('tests/images/lama.jpg', 0) BLURRED = cv2.blur(IMAGE, (10, 10))
[ 11748, 269, 85, 17, 198, 198, 6738, 4140, 541, 88, 13, 26791, 13, 37635, 62, 1326, 5015, 1330, 1635, 198, 198, 3955, 11879, 796, 269, 85, 17, 13, 320, 961, 10786, 41989, 14, 17566, 14, 75, 1689, 13, 9479, 3256, 657, 8, 198, 9148, ...
2.184615
65
from .api import API
[ 6738, 764, 15042, 1330, 7824, 628 ]
3.666667
6
from utils import cpp, table_reader if __name__ == "__main__": main()
[ 6738, 3384, 4487, 1330, 269, 381, 11, 3084, 62, 46862, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419, 198 ]
2.566667
30
"""Send file for not5oclock_bot""" import argparse from os import path import botskeleton if __name__ == "__main__": SECRETS_DIR = path.join(path.abspath(path.dirname(__file__)), "SECRETS") botskeleton = botskeleton.BotSkeleton(SECRETS_DIR, bot_name="not5oclock_bot") # Get arg. # Could probably do i...
[ 37811, 25206, 2393, 329, 407, 20, 420, 5354, 62, 13645, 37811, 198, 198, 11748, 1822, 29572, 198, 6738, 28686, 1330, 3108, 198, 198, 11748, 29641, 38800, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, ...
2.617886
246
""" stanCode Breakout Project Adapted from Eric Roberts's Breakout by Sonja Johnson-Yu, Kylie Jue, Nick Bowman, and Jerry Liao. This is a breakout game with loading animation, two levels of games, and a score board """ from campy.gui.events.timer import pause from breakoutgraphics import BreakoutGraphics FRAME_RATE ...
[ 37811, 198, 14192, 10669, 12243, 448, 4935, 198, 48003, 276, 422, 7651, 10918, 338, 12243, 448, 416, 198, 31056, 6592, 5030, 12, 40728, 11, 39859, 494, 449, 518, 11, 8047, 38774, 11, 198, 392, 13075, 406, 13481, 13, 198, 198, 1212, 31...
3.352941
119
import os.path as osp import mmcv from tools_yuan.convert_data.utils import parse_xml from tools_yuan.convert_data.utils import track_progress_yuan import getpass """ Author: Yuan Yuan Date:2018/12/16 Location:SCU """ if __name__ == '__main__': main()
[ 11748, 28686, 13, 6978, 355, 267, 2777, 198, 11748, 8085, 33967, 198, 6738, 4899, 62, 88, 7258, 13, 1102, 1851, 62, 7890, 13, 26791, 1330, 21136, 62, 19875, 198, 6738, 4899, 62, 88, 7258, 13, 1102, 1851, 62, 7890, 13, 26791, 1330, 2...
2.755319
94
#!/usr/bin/env python from control.msg import heaveFeedback, heaveAction, heaveResult import rospy import time import actionlib if __name__ == '__main__': rospy.init_node('heaveServer') server = Heave(rospy.get_name()) rospy.spin()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 6738, 1630, 13, 19662, 1330, 339, 1015, 18332, 1891, 11, 339, 1015, 12502, 11, 339, 1015, 23004, 198, 11748, 686, 2777, 88, 198, 11748, 640, 198, 11748, 2223, 8019, 198, 198, 361, 1159...
2.606383
94
import numpy as np from net_utils import net_catalogue from net_utils.local_settings import gpu_available from utils import resize_image
[ 11748, 299, 32152, 355, 45941, 198, 6738, 2010, 62, 26791, 1330, 2010, 62, 9246, 30326, 198, 6738, 2010, 62, 26791, 13, 12001, 62, 33692, 1330, 308, 19944, 62, 15182, 198, 6738, 3384, 4487, 1330, 47558, 62, 9060, 628, 628, 628 ]
3.55
40
from itertools import product as it_product import tqdm from scipy import sparse from provided_code.constants_class import ModelParameters from provided_code.data_loader import DataLoader from provided_code.general_functions import get_paths, get_predictions_to_optimize from provided_code.optimizer import PlanningMod...
[ 6738, 340, 861, 10141, 1330, 1720, 355, 340, 62, 11167, 198, 198, 11748, 256, 80, 36020, 198, 6738, 629, 541, 88, 1330, 29877, 198, 198, 6738, 2810, 62, 8189, 13, 9979, 1187, 62, 4871, 1330, 9104, 48944, 198, 6738, 2810, 62, 8189, 1...
2.259524
1,680
"""Implementation of ALI-G in tensorflow 1.""" import tensorflow as tf def minimize(optimizer, loss, global_step=None, var_list=None, gate_gradients=tf.compat.v1.train.Optimizer.GATE_OP, aggregation_method=None, colocate_gradients_with_ops=False, name=None, grad_loss=None): ...
[ 37811, 3546, 32851, 286, 8355, 40, 12, 38, 287, 11192, 273, 11125, 352, 526, 15931, 198, 11748, 11192, 273, 11125, 355, 48700, 628, 198, 4299, 17775, 7, 40085, 7509, 11, 2994, 11, 3298, 62, 9662, 28, 14202, 11, 1401, 62, 4868, 28, 1...
2.310567
776
from . trace_form import Trace from . average_form import Average from . extension_form import Extension from . restriction_form import Restriction from . injection_form import Injection from . point_trace_form import PointTrace from . xii_assembly import assemble as ii_assemble from . average_shape import Square, Squa...
[ 6738, 764, 12854, 62, 687, 1330, 34912, 198, 6738, 764, 2811, 62, 687, 1330, 13475, 198, 6738, 764, 7552, 62, 687, 1330, 27995, 198, 6738, 764, 17504, 62, 687, 1330, 37163, 295, 198, 6738, 764, 16954, 62, 687, 1330, 554, 29192, 198, ...
4
94
#!/bin/python3 # https://www.DIVD.nl # Developed by Hidde Smit & Wietse Boonstra # Usage: cat ips.txt | python3 ip-whois-mail.py # ips.txt 1 ip per line # Debugging: sys.stdin = ['1.1.1.1', '8.8.8.8'] from ipwhois import IPWhois import sys for line in sys.stdin: try: ip = line.strip('\n') obj = IP...
[ 2, 48443, 8800, 14, 29412, 18, 198, 2, 3740, 1378, 2503, 13, 33569, 35, 13, 21283, 198, 2, 6013, 276, 416, 367, 1638, 68, 2439, 270, 1222, 370, 1155, 325, 347, 2049, 12044, 198, 2, 29566, 25, 3797, 220, 2419, 13, 14116, 930, 21015...
2.127451
408
#!/usr/bin/python # -*- coding: utf-8 -*- # ProDy: A Python Package for Protein Dynamics Analysis # # Copyright (C) 2010-2012 Ahmet Bakan # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 1041, 35, 88, 25, 317, 11361, 15717, 329, 31702, 33806, 14691, 198, 2, 198, 2, 15069, 357, 34, 8, 3050, 12, 6999, 7900,...
2.838791
794
# https://atcoder.jp/contests/abc202/tasks/abc202_d A, B, K = map(int, input().split()) # memo[a][b] aがa個, bがb個の時の場合の数 memo = [[0 for _ in range(31)] for _ in range(31)] memo[0][0] = 1 for i in range(A + 1): for j in range(B + 1): if i == 0: memo[i][j] = 1 continue if j == 0...
[ 2, 3740, 1378, 265, 66, 12342, 13, 34523, 14, 3642, 3558, 14, 39305, 19004, 14, 83, 6791, 14, 39305, 19004, 62, 67, 198, 32, 11, 347, 11, 509, 796, 3975, 7, 600, 11, 5128, 22446, 35312, 28955, 198, 198, 2, 16155, 58, 64, 7131, 6...
1.71374
262
# Copyright 2021 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
[ 2, 15069, 33448, 383, 309, 22854, 37535, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846,...
3.147929
338
from util import Util
[ 6738, 7736, 1330, 7273, 346, 198 ]
3.666667
6
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
[ 2, 15069, 13130, 3012, 11419, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, 733...
2.910929
3,907
from __future__ import ( unicode_literals, absolute_import, print_function, division, ) import sys from PySide2 import QtCore import avb if str is not bytes: unicode = str if __name__ == "__main__": from PySide2 import QtWidgets from optparse import OptionParser parser = Opti...
[ 6738, 11593, 37443, 834, 1330, 357, 198, 220, 220, 220, 28000, 1098, 62, 17201, 874, 11, 198, 220, 220, 220, 4112, 62, 11748, 11, 198, 220, 220, 220, 3601, 62, 8818, 11, 198, 220, 220, 220, 7297, 11, 198, 220, 220, 220, 1267, 198,...
2.343525
556
from pytensor.network.variable import * from pytensor.network.parameter import * from pytensor.network.operation import *
[ 6738, 12972, 83, 22854, 13, 27349, 13, 45286, 1330, 1635, 198, 6738, 12972, 83, 22854, 13, 27349, 13, 17143, 2357, 1330, 1635, 198, 6738, 12972, 83, 22854, 13, 27349, 13, 27184, 1330, 1635, 198 ]
3.588235
34
"""Common shell interaction logic shared between different shells""" from __future__ import print_function import os import sys import inspect import subprocess import pyparsing as pp from six.moves import input from friendlyshell.command_parsers import default_line_parser # Path where configuration data is stored for...
[ 37811, 17227, 7582, 10375, 9156, 4888, 1022, 1180, 19679, 37811, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 10104, 198, 11748, 850, 14681, 198, 11748, 279, 4464, 945, 278, 355, 97...
2.364155
7,365
#!/usr/bin/env python # -*- coding: utf-8 -*- #----------------------------------------------------------------------------- # Copyright (c) 2015, IBM Corp. # All rights reserved. # # Distributed under the terms of the BSD Simplified License. # # The full license is in the LICENSE file, distributed with this software. ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 10097, 32501, 198, 2, 15069, 357, 66, 8, 1853, 11, 19764, 11421, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198,...
3.9375
208
import os import wandb import pytorch_lightning as pl import argparse from thanos.trainers.lit_detector import LitGestureTransformer from thanos.trainers import load_config if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("config", type=str, help="Path to config py file") ...
[ 11748, 28686, 198, 11748, 11569, 65, 198, 11748, 12972, 13165, 354, 62, 2971, 768, 355, 458, 198, 11748, 1822, 29572, 198, 198, 6738, 621, 418, 13, 27432, 364, 13, 18250, 62, 15255, 9250, 1330, 25659, 38, 395, 495, 8291, 16354, 198, 6...
2.895928
221
# Rotate String if __name__ == "__main__": sol = Solution() s = "abcde" goal = "cdeab" s = "abcde" goal = "abced" s = "bbbacddceeb" goal = "ceebbbbacdd" print(sol.rotateString(s, goal))
[ 2, 18481, 378, 10903, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1540, 796, 28186, 3419, 198, 220, 220, 220, 264, 796, 366, 39305, 2934, 1, 198, 220, 220, 220, 3061, 796, 366, 66, 2934, ...
1.990909
110
# Copyright 2020 Huawei Technologies Co., Ltd # # 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...
[ 2, 15069, 12131, 43208, 21852, 1766, 1539, 12052, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198...
3.961864
236
"""bugfix: correct active to is_active Revision ID: cb98a72750ab Revises: 7685fd00e696 Create Date: 2021-12-03 12:16:09.979253 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'cb98a72750ab' down_revision = '7685fd00e696' branch_labels = None depends_on = None ...
[ 37811, 25456, 13049, 25, 3376, 4075, 284, 318, 62, 5275, 198, 198, 18009, 1166, 4522, 25, 269, 65, 4089, 64, 47760, 1120, 397, 198, 18009, 2696, 25, 767, 35978, 16344, 405, 68, 38205, 198, 16447, 7536, 25, 33448, 12, 1065, 12, 3070, ...
2.609756
123
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function import codecs from unidecode import unidecode from itertools import product SUBSTITUTIONS = { u'a': u'áảàãạâấẩẫầậăắẳẵằặ', u'á': u'aảàãạâấẩẫầậăắẳẵằặ', ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, ...
1.016159
6,374
"""Dataloaders for MNIST, FashionMNIST, CIFAR10""" from typing import Tuple import torchvision from torch.utils.data import DataLoader from opacus.utils.uniform_sampler import UniformWithReplacementSampler
[ 37811, 35, 10254, 1170, 364, 329, 29060, 8808, 11, 30958, 39764, 8808, 11, 327, 5064, 1503, 940, 37811, 198, 198, 6738, 19720, 1330, 309, 29291, 198, 11748, 28034, 10178, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 6060, 17401, 198, 67...
3.459016
61
import logging from django.db import models from django.template.defaultfilters import floatformat from django.urls import reverse from django.utils import timezone from django.contrib.auth.models import User from django.contrib.postgres.fields import JSONField from django_rq import get_connection, job from iso639 i...
[ 11748, 18931, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 28243, 13, 12286, 10379, 1010, 1330, 5530, 3390, 265, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 6738, 42625, 14208, 13, 26791, ...
3.418919
148
#! /usr/bin/env python """ the html test reporter """ import sys, os, re import pprint import py from pypy.tool.pytest import result from pypy.tool.pytest.overview import ResultCache # # various interesting path objects # html = py.xml.html NBSP = py.xml.raw("&nbsp;") # # rendering # #...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 198, 1169, 27711, 1332, 9095, 220, 198, 198, 37811, 198, 11748, 25064, 11, 28686, 11, 302, 198, 11748, 279, 4798, 198, 11748, 12972, 220, 198, 6738, 279, 4464, 88, 13, ...
2.459119
159
from simpleWebServer import SimpleWebServer #--------------------------------------------------- usersCount = 0 estonianPopulation = { "tallinn" : 441000, "tartu" : 94000, "narva" : 58000, "parnu" : 41000 } #--------------------------------------------------- SimpleWebServer().serve(8088, getPopul...
[ 6738, 2829, 13908, 10697, 1330, 17427, 13908, 10697, 198, 198, 2, 47232, 6329, 198, 198, 18417, 12332, 796, 657, 198, 198, 19115, 666, 45251, 796, 1391, 198, 220, 220, 220, 366, 35429, 3732, 1, 1058, 604, 3901, 830, 11, 198, 220, 220,...
3.326531
98
import logging import _thread from threading import Timer from . import hpim_globals from .metric import AssertMetric, Metric from .tree_interface import TreeInterface from .non_root_state_machine import SFMRNonRootState from .assert_state import AssertState, SFMRAssertABC from .downstream_state import SFMRPruneState,...
[ 11748, 18931, 198, 11748, 4808, 16663, 198, 6738, 4704, 278, 1330, 5045, 263, 198, 198, 6738, 764, 1330, 27673, 320, 62, 4743, 672, 874, 198, 6738, 764, 4164, 1173, 1330, 2195, 861, 9171, 1173, 11, 3395, 1173, 198, 6738, 764, 21048, 6...
3.44
100
from Automator import Automator position_dictionary = { "skill_1": (54, 432), "skill_2": (123, 432), "skill_3": (192, 432), "skill_4": (291, 432), "skill_5": (362, 432), "skill_6": (432, 432), "skill_7": (530, 432), "skill_8": (600, 432), "skill_9": (672, 432), "mast...
[ 6738, 17406, 1352, 1330, 17406, 1352, 201, 198, 201, 198, 9150, 62, 67, 14188, 796, 1391, 201, 198, 220, 220, 220, 366, 42401, 62, 16, 1298, 357, 4051, 11, 46393, 828, 201, 198, 220, 220, 220, 366, 42401, 62, 17, 1298, 357, 10163, ...
2.047521
484
from counterfit_connection import CounterFitConnection CounterFitConnection.init('127.0.0.1', 5000) import time from counterfit_shims_rpi_vl53l0x.vl53l0x import VL53L0X distance_sensor = VL53L0X() distance_sensor.begin() while True: distance_sensor.wait_ready() print(f'Distance = {distance_sensor.get_distan...
[ 6738, 3753, 11147, 62, 38659, 1330, 15034, 31805, 32048, 198, 31694, 31805, 32048, 13, 15003, 10786, 16799, 13, 15, 13, 15, 13, 16, 3256, 23336, 8, 198, 198, 11748, 640, 198, 198, 6738, 3753, 11147, 62, 1477, 12078, 62, 81, 14415, 62,...
2.616541
133
from Database import DatabaseContext
[ 6738, 24047, 1330, 24047, 21947 ]
7.2
5
import re
[ 11748, 302 ]
4.5
2
# -*- coding: utf-8 -*- """Active user in game. Greyd Rule: 1xx """ import logging from datetime import datetime, timedelta from greyd.db import session from greyd.models.user import User from greyd.models.lobby import Lobby from greyd.models.user_to_lobby import UserToLobby from greyd.models.chat import Chat from g...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 13739, 2836, 287, 983, 13, 198, 49141, 67, 14330, 25, 352, 5324, 198, 37811, 198, 198, 11748, 18931, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 1251...
2.081916
3,528
#!/usr/bin/env python from argparse import ArgumentParser import sys if __name__ == '__main__': arg_parser = ArgumentParser(description='compute primes') arg_parser.add_argument('implmentation', choices=['python', 'numba' 'python_array', ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 1822, 29572, 1330, 45751, 46677, 198, 11748, 25064, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1822, 62, 48610, 796, 45751, 46677,...
2.020785
433
# Generated by Django 3.1.7 on 2021-04-08 07:14 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 22, 319, 33448, 12, 3023, 12, 2919, 8753, 25, 1415, 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
from django.db.models.query import QuerySet from rest_framework import generics, mixins, viewsets from rest_framework import filters import django_filters.rest_framework from django.http import JsonResponse from rest_framework.renderers import JSONRenderer from django.shortcuts import get_object_or_404 from fiche_prod...
[ 6738, 42625, 14208, 13, 9945, 13, 27530, 13, 22766, 1330, 43301, 7248, 198, 6738, 1334, 62, 30604, 1330, 1152, 873, 11, 5022, 1040, 11, 5009, 1039, 198, 6738, 1334, 62, 30604, 1330, 16628, 198, 11748, 42625, 14208, 62, 10379, 1010, 13, ...
3.203857
363
# flake8: noqa import warnings from .drf_urls import * warnings.warn( "drf-urls.py is not a valid module name and will be " "removed in a future version, use drf_urls.py instead", PendingDeprecationWarning )
[ 2, 781, 539, 23, 25, 645, 20402, 198, 11748, 14601, 198, 6738, 764, 7109, 69, 62, 6371, 82, 1330, 1635, 198, 198, 40539, 654, 13, 40539, 7, 198, 220, 220, 220, 366, 7109, 69, 12, 6371, 82, 13, 9078, 318, 407, 257, 4938, 8265, 14...
2.630952
84
import logging import socket from concurrent.futures import Executor from time import time import cv2 import numpy as np from adbutils import AdbDevice from .raw_socket import send_raw logger = logging.getLogger(__name__)
[ 11748, 18931, 198, 11748, 17802, 198, 6738, 24580, 13, 69, 315, 942, 1330, 8393, 38409, 198, 6738, 640, 1330, 640, 198, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 512, 4360, 4487, 1330, 1215, 65, 24728, 19...
3.304348
69
# Test of phase Module (Manual) import numpy as np import math as math import data as data import phase as phase import matplotlib.pyplot as plt import statistics ########################################################## # Test Difference of identical phase # 1 #######################################################...
[ 2, 6208, 286, 7108, 19937, 357, 5124, 723, 8, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 10688, 355, 10688, 198, 11748, 1366, 355, 1366, 198, 11748, 7108, 355, 7108, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, ...
1.991946
2,359
#!/usr/bin/python3 import sys import os sys.path.append( os.path.dirname( os.path.realpath(__file__) ) + '/../..' ) from shared import Ipv4Validator from common import Parameter import unittest import mock if __name__ == '__main__': unittest.main()
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 11748, 25064, 198, 11748, 28686, 198, 17597, 13, 6978, 13, 33295, 7, 28686, 13, 6978, 13, 15908, 3672, 7, 28686, 13, 6978, 13, 5305, 6978, 7, 834, 7753, 834, 8, 1267, 1343, 31051, 40720...
2.712766
94
""" @brief test log(time=1s) """ import sys import os import unittest from datetime import datetime from pyquickhelper.loghelper import fLOG try: import src except ImportError: path = os.path.normpath( os.path.abspath( os.path.join( os.path.split(__file__)[0], ...
[ 37811, 198, 31, 65, 3796, 220, 220, 220, 220, 220, 1332, 2604, 7, 2435, 28, 16, 82, 8, 198, 37811, 628, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 555, 715, 395, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 12972, 2420...
2.163987
311
from dataclasses import dataclass from typing import List, Generic from datetime import datetime import Adafruit_ADS1x15 from app.sensors.sensor import Sensor @dataclass
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 19720, 1330, 7343, 11, 42044, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 11748, 1215, 1878, 4872, 62, 47149, 16, 87, 1314, 198, 198, 6738, 598, 13, 82, 641, 669, 13, ...
3.301887
53
import pygame from pygame.sprite import Sprite
[ 11748, 12972, 6057, 198, 6738, 12972, 6057, 13, 34975, 578, 1330, 33132 ]
3.833333
12
############################################################################################ # # Project: Peter Moss Acute Myeloid & Lymphoblastic Leukemia AI Research Project # Repository: ALL Detection System 2019 # Project: Facial Authentication Server # # Author: Adam Milton-Barker (AdamMilton...
[ 29113, 29113, 14468, 7804, 4242, 198, 2, 198, 2, 4935, 25, 220, 220, 220, 220, 220, 220, 5613, 19935, 4013, 1133, 2011, 417, 1868, 1222, 406, 20896, 45292, 3477, 1004, 43505, 9552, 4992, 4935, 198, 2, 1432, 13264, 25, 220, 220, 220, ...
2.115942
3,657
# File content is auto-generated. Do not modify. # pylint: skip-file from ._internal import NDArrayBase from ..base import _Null def ElementWiseSum(*args, **kwargs): r"""Adds all input arguments element-wise. .. math:: add\_n(a_1, a_2, ..., a_n) = a_1 + a_2 + ... + a_n ``add_n`` is potentially mor...
[ 2, 9220, 2695, 318, 8295, 12, 27568, 13, 2141, 407, 13096, 13, 198, 2, 279, 2645, 600, 25, 14267, 12, 7753, 198, 6738, 47540, 32538, 1330, 25524, 19182, 14881, 198, 6738, 11485, 8692, 1330, 4808, 35067, 198, 198, 4299, 11703, 54, 786,...
2.514054
21,311
# Module for platform specific stuff. from . import map_platform_specifics
[ 2, 19937, 329, 3859, 2176, 3404, 13, 198, 6738, 764, 1330, 3975, 62, 24254, 62, 11423, 82, 628 ]
4.222222
18
from rest_framework import viewsets from rest_framework import filters from rest_framework.permissions import IsAuthenticated from rest_framework.pagination import PageNumberPagination from .serializers import ItemSerializer from .models import Item class CustomSearchFilter(filters.SearchFilter): """ Filte...
[ 6738, 1334, 62, 30604, 1330, 5009, 1039, 198, 6738, 1334, 62, 30604, 1330, 16628, 198, 6738, 1334, 62, 30604, 13, 525, 8481, 1330, 1148, 47649, 3474, 198, 6738, 1334, 62, 30604, 13, 79, 363, 1883, 1330, 7873, 15057, 47, 363, 1883, 198...
3.171429
315
#!/usr/bin/env python # PYTHON_ARGCOMPLETE_OK import argparse from textwrap import dedent from glob import glob import matlab2cpp hstring = "*** Matlab2cpp version " + str(matlab2cpp.__version__) + " ***\n\n" + """\ The toolbox frontend of the Matlab2cpp library. Use this to try to do automatic and semi-automatic tr...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 350, 56, 4221, 1340, 62, 1503, 38, 41335, 9328, 62, 11380, 198, 198, 11748, 1822, 29572, 198, 6738, 2420, 37150, 1330, 4648, 298, 198, 6738, 15095, 1330, 15095, 198, 11748, 2603, 23...
3.037464
1,388
import torch def rademacher(shape, gpu=True): """ Creates a random tensor of size [shape] under the Rademacher distribution (P(x=1) == P(x=-1) == 0.5) """ x = torch.empty(shape) if gpu: x = x.cuda() x.random_(0, 2) x[x == 0] = -1 return x def second_directional_derivative(G, ...
[ 11748, 28034, 628, 198, 4299, 2511, 368, 3493, 7, 43358, 11, 308, 19944, 28, 17821, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 7921, 274, 257, 4738, 11192, 273, 286, 2546, 685, 43358, 60, 739, 262, 5325, 368, 3493, 6082, 3...
2.331269
1,615
from __future__ import annotations from io import BytesIO from unittest.mock import Mock import pytest from vine import promise import t.skip from kombu.asynchronous import http from kombu.asynchronous.http.base import BaseClient, normalize_header from kombu.exceptions import HttpError from t.mocks import PromiseMoc...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 6738, 33245, 1330, 2750, 4879, 9399, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 44123, 198, 198, 11748, 12972, 9288, 198, 6738, 17793, 1330, 6991, 198, 198, 11748, 256, 13, 48267, 198, ...
3.037037
135
#!/usr/bin/env python # -*- coding: utf8 -*- """ Copyright (c) 2011 Tyler Kenendy <tk@tkte.ch> 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...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 23, 532, 9, 12, 198, 37811, 198, 15269, 357, 66, 8, 2813, 14886, 7148, 437, 88, 1279, 30488, 31, 30488, 660, 13, 354, 29, 198, 198, 5990, 3411...
3.010929
732
#!/usr/bin/env python3 # Copyright (c) 2015-2020 by the parties listed in the AUTHORS file. # All rights reserved. Use of this source code is governed by # a BSD-style license that can be found in the LICENSE file. """ Simpler version of the ground simulation script """ import argparse import dateutil.parser import...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 15069, 357, 66, 8, 1853, 12, 42334, 416, 262, 4671, 5610, 287, 262, 37195, 20673, 2393, 13, 198, 2, 1439, 2489, 10395, 13, 220, 5765, 286, 428, 2723, 2438, 318, 21825, ...
2.235628
2,644
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Type checking functions for datetime related types for use with arparse.""" from argparse import ArgumentTypeError
[ 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, 6030, 10627, 5499, 329, 4818, 8079, 3519, 3858, 329, 779, 351, 610, 29572, 526, 15931, 198, 198, 6738, 1822,...
3.34
50
#!/usr/bin/env python3 # coding=utf-8 # author: @netmanchris # -*- coding: utf-8 -*- """ This module contains functions for working with the device capabilities of the HPE IMC NMS platform using the RESTful API """ # This section imports required libraries import json import requests from pyhpeimc.auth import HEADE...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 19617, 28, 40477, 12, 23, 198, 2, 1772, 25, 2488, 3262, 805, 354, 2442, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 1212, 8265, 4909, 5...
2.624469
12,236
from .base import ( CPObject, TextField, ObjectField, BooleanField, LinkField, CollectionField ) from .qualifier import Qualifier
[ 6738, 764, 8692, 1330, 357, 198, 220, 220, 220, 16932, 10267, 11, 8255, 15878, 11, 9515, 15878, 11, 41146, 15878, 11, 7502, 15878, 11, 12251, 15878, 198, 8, 198, 6738, 764, 13255, 7483, 1330, 9537, 7483, 628 ]
3.648649
37
from pydp.algorithms import laplacian as dp import numpy as np import pandas as pd import time import os import psutil from utils import * epsilon = pd.read_pickle('epsilon.pkl') library_name = 'pydp'
[ 6738, 279, 5173, 79, 13, 282, 7727, 907, 1330, 8591, 489, 330, 666, 355, 288, 79, 198, 11748, 299, 32152, 355, 45941, 220, 198, 11748, 19798, 292, 355, 279, 67, 220, 198, 11748, 640, 198, 11748, 28686, 198, 11748, 26692, 22602, 198, ...
2.329787
94
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
import io from pathlib import Path import re import responses from shutil import copy from testpath import MockCommand, modified_env, assert_isfile, assert_isdir from testpath.tempdir import TemporaryWorkingDirectory from zipfile import ZipFile from nsist import main from nsist.util import CACHE_ENV_VAR from .utils im...
[ 11748, 33245, 198, 6738, 3108, 8019, 1330, 10644, 198, 11748, 302, 198, 11748, 9109, 198, 6738, 4423, 346, 1330, 4866, 198, 6738, 1332, 6978, 1330, 44123, 21575, 11, 9518, 62, 24330, 11, 6818, 62, 4468, 576, 11, 6818, 62, 9409, 343, 1...
3.513043
115
""" .. Copyright (c) 2014-2017, Magni developers. All rights reserved. See LICENSE.rst for further information. Module providing a robust configger class. Routine listings ---------------- Configger(object) Provide functionality to access a set of configuration options. Notes ----- This module does n...
[ 37811, 198, 492, 198, 220, 220, 220, 15069, 357, 66, 8, 1946, 12, 5539, 11, 2944, 8461, 6505, 13, 198, 220, 220, 220, 1439, 2489, 10395, 13, 198, 220, 220, 220, 4091, 38559, 24290, 13, 81, 301, 329, 2252, 1321, 13, 198, 198, 26796...
2.507784
2,698
""" Grouped boxplots ================ """ import seaborn as sns sns.set(style="ticks") tips = sns.load_dataset("tips") sns.boxplot("day", "total_bill", "sex", tips, palette="PRGn") sns.despine(offset=10, trim=True)
[ 37811, 198, 13247, 276, 3091, 489, 1747, 198, 4770, 198, 198, 37811, 198, 11748, 384, 397, 1211, 355, 3013, 82, 198, 82, 5907, 13, 2617, 7, 7635, 2625, 83, 3378, 4943, 198, 198, 41315, 796, 3013, 82, 13, 2220, 62, 19608, 292, 316, ...
2.494253
87
import gspread.utils from django.contrib import admin from django.utils.safestring import mark_safe from .models import ( Campaign, Preparedness, Surge, Round, Config, CountryUsersGroup, URLCache, SpreadSheetImport, LQASIMCache, IMStatsCache, ) admin.site.register(Campaign,...
[ 11748, 308, 43639, 13, 26791, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 26791, 13, 49585, 395, 1806, 1330, 1317, 62, 21230, 198, 198, 6738, 764, 27530, 1330, 357, 198, 220, 220, 220, 13718, 11, ...
2.838983
236
import numpy as np
[ 11748, 299, 32152, 355, 45941 ]
3.6
5
import cv2 def read(path, video): """ @get path, video as string @return void """ realpath = path + video i = 0 myvideo = cv2.VideoCapture(realpath) while(myvideo.isOpened()): ret, frame = myvideo.read() i += 1 cv2.imshow('frame', frame) if (c...
[ 11748, 269, 85, 17, 628, 198, 4299, 1100, 7, 6978, 11, 2008, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 2488, 1136, 220, 3108, 11, 2008, 355, 4731, 628, 220, 220, 220, 220, 220, 220, 220, 2488, 7783, ...
1.976667
300
import os from pathlib import Path from typing import List import pytest
[ 11748, 28686, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 7343, 198, 198, 11748, 12972, 9288, 628, 198 ]
3.8
20
# coding=utf-8 # Copyright 2021 The Balloon Learning Environment 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 require...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 33448, 383, 47821, 18252, 9344, 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, 284...
2.505035
2,681
""" Process settlement layer Written by Ed Oughton. December 2020 """ import os import configparser import json import math import glob import numpy as np import pandas as pd import geopandas as gpd import pyproj from shapely.geometry import Point, LineString, Polygon, MultiPolygon, shape, mapping, box from shapely....
[ 37811, 198, 18709, 9443, 7679, 198, 198, 25354, 416, 1717, 440, 6724, 1122, 13, 198, 198, 20588, 12131, 198, 198, 37811, 198, 11748, 28686, 198, 11748, 4566, 48610, 198, 11748, 33918, 198, 11748, 10688, 198, 11748, 15095, 198, 11748, 299,...
2.430433
4,298
fig, axes = plt.subplots(nrows=1, ncols=3, figsize=(9, 3)) cols = ['vp', 'vs', 'rho'] labels = ['$V_p$ (m/s)', '$V_s$ (m/s)', 'Density (kg/m$^3$)'] for i, ax in enumerate(axes): ax.hist(df[cols[i]], density=True, edgecolor='k', linewidth=0.5) ax.set_xlabel(labels[i]) ax.set_ylabel('Probability') plt.tight_l...
[ 5647, 11, 34197, 796, 458, 83, 13, 7266, 489, 1747, 7, 77, 8516, 28, 16, 11, 299, 4033, 82, 28, 18, 11, 2336, 7857, 16193, 24, 11, 513, 4008, 198, 4033, 82, 796, 37250, 36133, 3256, 705, 14259, 3256, 705, 81, 8873, 20520, 198, 2...
1.973545
189
import re import json from functools import reduce from operator import itemgetter from ip2loc import ip2loc, ip2loc_bulk from funcs import count_occurence, folding, get_events_before_timestamp, get_timestamp, get_first_timestamp, get_unique_values LOG_FILE_PATH = 'honey.log' COUNTRY_STAT_HEADER_FORMAT = '{:<2...
[ 11748, 302, 201, 198, 11748, 33918, 201, 198, 6738, 1257, 310, 10141, 1330, 4646, 201, 198, 6738, 10088, 1330, 2378, 1136, 353, 201, 198, 6738, 20966, 17, 17946, 1330, 20966, 17, 17946, 11, 20966, 17, 17946, 62, 65, 12171, 201, 198, 6...
2.438532
1,635
from imutils import face_utils from imutils.face_utils import FaceAligner import numpy as np import imutils import dlib import cv2 from skimage.metrics import structural_similarity as ssim #import os import glob #import time from tkinter import * import tkinter as tk from tkinter import filedialog from pandas import D...
[ 198, 6738, 545, 26791, 1330, 1986, 62, 26791, 198, 6738, 545, 26791, 13, 2550, 62, 26791, 1330, 15399, 2348, 570, 263, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 545, 26791, 198, 11748, 288, 8019, 198, 11748, 269, 85, 17, 198, 67...
2.349838
3,090
# AUTOGENERATED! DO NOT EDIT! File to edit: 00_scraper.ipynb (unless otherwise specified). __all__ = ['Scraper', 'print_something'] # Cell # Cell from fastcore.foundation import patch from facebook_scraper import get_posts @patch # Cell
[ 2, 47044, 7730, 1677, 1137, 11617, 0, 8410, 5626, 48483, 0, 9220, 284, 4370, 25, 3571, 62, 1416, 38545, 13, 541, 2047, 65, 357, 25252, 4306, 7368, 737, 198, 198, 834, 439, 834, 796, 37250, 3351, 38545, 3256, 705, 4798, 62, 18927, 20...
3.12987
77
# Copyright 2010 New Relic, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
[ 2, 15069, 3050, 968, 43437, 11, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, ...
2.903974
1,510
import jira __URL = "http://jira.example.com" __USER = "my_user" __PASS = "my_pass" __ISSUE = "VOL-1234" my_jira = jira.Jira(__URL, __USER, __PASS) my_issue = my_jira.get_issue(__ISSUE) print(my_issue.summary)
[ 11748, 474, 8704, 198, 198, 834, 21886, 796, 366, 4023, 1378, 73, 8704, 13, 20688, 13, 785, 1, 198, 834, 29904, 796, 366, 1820, 62, 7220, 1, 198, 834, 47924, 796, 366, 1820, 62, 6603, 1, 198, 834, 16744, 8924, 796, 366, 44558, 12,...
2.197917
96
import os from typing import List import cv2 from fastapi import APIRouter, Depends, HTTPException, status from fastapi.requests import Request from fastapi.responses import FileResponse from natsort import os_sorted from pydantic import BaseModel, validator from .projects import ProjectType from ..config import Sett...
[ 11748, 28686, 198, 6738, 19720, 1330, 7343, 198, 198, 11748, 269, 85, 17, 198, 6738, 3049, 15042, 1330, 3486, 4663, 39605, 11, 2129, 2412, 11, 14626, 16922, 11, 3722, 198, 6738, 3049, 15042, 13, 8897, 3558, 1330, 19390, 198, 6738, 3049,...
3.085616
292
r = range(8) for x in r: for y in r: for x1 in r: if x < x1: print '(nCell %d east %d %d %d %d)' % (x1-x, x, y, x1, y) elif x > x1: print '(nCell %d west %d %d %d %d)' % (x-x1, x, y, x1, y) for y1 in r: if y < y1: print '(nCell %d south %d %d %d %d)' % (y1-y, x, y, x, y1) elif y > y1: p...
[ 81, 796, 2837, 7, 23, 8, 198, 1640, 2124, 287, 374, 25, 198, 197, 1640, 331, 287, 374, 25, 198, 197, 197, 1640, 2124, 16, 287, 374, 25, 198, 197, 197, 197, 361, 2124, 1279, 2124, 16, 25, 198, 197, 197, 197, 197, 4798, 29513, 7...
1.657895
228
# -*- coding: utf-8 -*- import json from datetime import datetime, timedelta import requests import lxml from pykml.factory import KML_ElementMaker as KML URL = 'http://iss-positioner.nkoshelev.tech/lst' NOW = datetime.utcnow() PARAMS = dict(start_dt=NOW.isoformat(), end_dt=(NOW + timedelta(days=21)).i...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 33918, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 198, 11748, 7007, 198, 11748, 300, 19875, 198, 6738, 12972, 74, 4029, 13, 69, 9548, 1330, 5...
2.209205
239
""" Module for implementation Naive Bayes Classifier. """ import string from collections import Counter from typing import Dict from bayesian_classifier import * import pandas as pd from nltk.corpus import stopwords from nltk.tokenize import word_tokenize def process_data(data_file): """ Function for data pro...
[ 37811, 198, 26796, 329, 7822, 11013, 425, 4696, 274, 5016, 7483, 13, 198, 37811, 198, 11748, 4731, 198, 6738, 17268, 1330, 15034, 198, 6738, 19720, 1330, 360, 713, 198, 6738, 15489, 35610, 62, 4871, 7483, 1330, 1635, 198, 11748, 19798, ...
2.622705
599
#!/usr/bin/env python # -*-python-*- # # Copyright (C) 1999-2013 The ViewCVS Group. All Rights Reserved. # # By using this file, you agree to the terms and conditions set forth in # the LICENSE.html file which can be found at the top level of the ViewVC # distribution or at http://viewvc.org/license-1.html. # # For mor...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 29412, 12, 9, 12, 198, 2, 198, 2, 15069, 357, 34, 8, 7358, 12, 6390, 383, 3582, 34, 20304, 4912, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 2750, 1262, 428, 2393...
2.840671
954
try: import pkg_resources pkg_resources.declare_namespace(__name__) except ImportError: # don't prevent use of paste if pkg_resources isn't installed from pkgutil import extend_path __path__ = extend_path(__path__, __name__) try: import modulefinder except ImportError: pass else: for p...
[ 28311, 25, 198, 220, 220, 220, 1330, 279, 10025, 62, 37540, 198, 220, 220, 220, 279, 10025, 62, 37540, 13, 32446, 533, 62, 14933, 10223, 7, 834, 3672, 834, 8, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 1303, 836, 470, 2948, ...
2.659722
144