content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
#!/usr/bin/env python from splparser.parsetree import * from splparser.exceptions import SPLSyntaxError from splparser.rules.common.evalfnexprrules import * from splparser.rules.common.simplefieldrules import * from splparser.lexers.evallexer import precedence, tokens start = 'cmdexpr' def p_cmdexpr_eval(p): "...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 4328, 48610, 13, 79, 945, 316, 631, 1330, 1635, 198, 6738, 4328, 48610, 13, 1069, 11755, 1330, 6226, 6561, 33567, 897, 12331, 198, 198, 6738, 4328, 48610, 13, 38785, 13, 113...
2.595855
193
from django.conf.urls import url from .views import FAQListView urlpatterns = [ url(r'^', FAQListView.as_view(), name='faq'), ]
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 6738, 764, 33571, 1330, 18749, 8053, 7680, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 19016, 7, 81, 6, 61, 3256, 18749, 8053, 7680, 13, 292, 62, 1177, 2278...
2.607843
51
from pygame import * from trainerbinding import * TestTrainer()
[ 6738, 12972, 6057, 1330, 1635, 198, 6738, 21997, 30786, 1330, 1635, 198, 197, 197, 198, 14402, 2898, 10613, 3419, 198 ]
3.35
20
# -*- coding: UTF-8 -*- #!/usr/bin/python3 from pymycobot.mycobot import MyCobot # Variables needed to initialize MyCobotPi from pymycobot import PI_PORT, PI_BAUD # Initialize MyCobotPi mc = MyCobot(PI_PORT, PI_BAUD) # Check if the controller is connected if mc.is_controller_connected() != 1: print("...
[ 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 201, 198, 2, 48443, 14629, 14, 8800, 14, 29412, 18, 201, 198, 6738, 12972, 1820, 66, 672, 313, 13, 1820, 66, 672, 313, 1330, 2011, 34, 672, 313, 201, 198, 2, 15965, 2977, 26...
2.79403
335
#!/usr/bin/env python3 import sys import os import tarfile import xml.etree.ElementTree as ET from random import random from contextlib import closing from logging import warning # Passage types to exclude from output. These are chosen to # exclude material that could break the flow of text. EXCLUDED_PASSAGE_TYPE ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 13422, 7753, 198, 198, 11748, 35555, 13, 316, 631, 13, 20180, 27660, 355, 12152, 198, 198, 6738, 4738, 1330, 4738, 198, 6738, 4732, ...
2.640693
462
#!/usr/bin/env python3 # Copyright 2016 The Emscripten Authors. All rights reserved. # Emscripten is available under two separate licenses, the MIT license and the # University of Illinois/NCSA Open Source License. Both these licenses can be # found in the LICENSE file. import sys import os from tools import buildin...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 15069, 1584, 383, 412, 907, 6519, 268, 46665, 13, 220, 1439, 2489, 10395, 13, 198, 2, 412, 907, 6519, 268, 318, 1695, 739, 734, 4553, 16625, 11, 262, 17168, 5964, 290, 262, ...
3.717391
138
import boto3 import os
[ 11748, 275, 2069, 18, 198, 11748, 28686, 628 ]
3
8
# -*- coding:utf-8 -*- # coding=<utf8> from django.db import models STATUSES = ((0, 'OK'), (1, 'INFO'), (2, 'WARNING'), (3, 'ERROR')) # Модели для хранения статуса и сообщения к нему # # class Message(models.Model): # for_status = models.ForeignKey(Status, # ...
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 2, 19617, 28, 27, 40477, 23, 29, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 35744, 2937, 1546, 796, 14808, 15, 11, 705, 11380, 33809, 198, 220, 220, 22...
1.674051
316
import diskord, datetime client = diskord.Client() @client.event @client.event client.run("TOKEN")
[ 11748, 11898, 585, 11, 4818, 8079, 198, 198, 16366, 796, 11898, 585, 13, 11792, 3419, 198, 198, 31, 16366, 13, 15596, 628, 198, 31, 16366, 13, 15596, 628, 198, 16366, 13, 5143, 7203, 10468, 43959, 4943, 198 ]
2.837838
37
# Generated by Django 3.2.4 on 2021-07-08 09:39 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 19, 319, 33448, 12, 2998, 12, 2919, 7769, 25, 2670, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
# -*- coding: UTF-8 -*- import select import socket import TimeLapse import Movie timelapse = None movie = None timeLapseState = False # @param port Port de connexion # @param listen Nombre de connexion en attente max # @param socket Socket sur lequelle il faut recuperer les données # @return Donné...
[ 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 628, 198, 11748, 2922, 198, 11748, 17802, 198, 11748, 3862, 43, 7512, 198, 11748, 15875, 198, 198, 16514, 417, 7512, 796, 6045, 198, 41364, 796, 6045, 198, 2435, 43, 7512, 9012, ...
2.915584
154
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Aug 8 14:08:44 2018 @author: dawnstear """ import numpy as np import os from inspect import signature import datetime import subprocess # replaces os.system() import pandas as pd import tensorflow as tf def next_batch(datamatrix,batch_size=0,buffer_s...
[ 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, 2447, 220, 807, 1478, 25, 2919, 25, 2598, 2864, 198, 198, 31, 9800, 25, 17577, 301,...
2.572022
722
import pygame import numpy import random import copy import sys # Boid system from https://www.red3d.com/cwr/boids/ and http://www.kfish.org/boids/pseudocode.html
[ 201, 198, 11748, 12972, 6057, 201, 198, 11748, 299, 32152, 201, 198, 11748, 4738, 201, 198, 11748, 4866, 201, 198, 11748, 25064, 201, 198, 201, 198, 2, 347, 1868, 1080, 422, 3740, 1378, 2503, 13, 445, 18, 67, 13, 785, 14, 66, 18351,...
2.5
70
#!/usr/bin/env python # -*- coding: utf-8 -*- """ setup.py Packaging for dax """ from glob import glob import os from setuptools import setup, find_packages import subprocess description = 'Distributed Automation for XNAT' # Note: this long_description is actually a copy/paste from the top-level # README.txt,...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 9058, 13, 9078, 198, 198, 11869, 3039, 329, 288, 897, 198, 37811, 198, 198, 6738, 15095, 1330, 15095, 198, ...
2.623664
1,310
import nltk import numpy as np import six import pdb # the zinc grammar gram = """smiles -> chain atom -> bracket_atom atom -> aliphatic_organic atom -> aromatic_organic aliphatic_organic -> 'B' aliphatic_organic -> 'C' aliphatic_organic -> 'N' aliphatic_organic -> 'O' aliphatic_organic -> 'S' aliphatic_organic -> 'P'...
[ 11748, 299, 2528, 74, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2237, 198, 11748, 279, 9945, 198, 198, 2, 262, 31861, 23491, 198, 4546, 796, 37227, 5796, 2915, 4613, 6333, 198, 37696, 4613, 19096, 62, 37696, 198, 37696, 4613, 435,...
2.466723
1,187
from app import db from app.base_model import Base
[ 6738, 598, 1330, 20613, 198, 6738, 598, 13, 8692, 62, 19849, 1330, 7308, 628 ]
3.714286
14
import os import numpy as np import pandas as pd import cv2 import matplotlib.pyplot as plt %matplotlib inline import warnings warnings.filterwarnings('ignore') from sklearn.model_selection import train_test_split import itertools from keras.preprocessing import image from keras.preprocessing.image import ImageDataG...
[ 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 269, 85, 17, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 4, 6759, 29487, 8019, 26098, 198, 198, 11748, 14601, 1...
2.292156
2,129
import glob import imageio import cv2 import numpy as np import sys import os n_clusters = 8 n_rodadas = 1 image = cv2.imread(sys.argv[1], cv2.IMREAD_COLOR) rows, cols = image.shape[:2] z = np.float32(image.reshape((-1, 3))) criteria = (cv2.TERM_CRITERIA_EPS + cv2.TERM_CRITERIA_MAX_ITER, 10000, 1e-4) flags = cv2....
[ 11748, 15095, 198, 11748, 2939, 952, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 25064, 198, 11748, 28686, 198, 198, 77, 62, 565, 13654, 796, 807, 220, 220, 198, 77, 62, 14892, 38768, 796, 352, 198, 198, ...
2.304348
345
import os import re import shutil import time from datetime import datetime, timedelta import argparse import functools import numpy as np import torch from torch.nn import DataParallel from torch.optim.lr_scheduler import StepLR from torch.utils.data import DataLoader from torchsummary import summary from utils.reade...
[ 11748, 28686, 198, 11748, 302, 198, 11748, 4423, 346, 198, 11748, 640, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 11748, 1822, 29572, 198, 11748, 1257, 310, 10141, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034...
1.857317
820
# Carlos Pedro Gonçalves (2015), Game Theory with Python # Game Theory and Applied A.I. Classes # Instituto Superior de Ciências Sociais e Políticas (ISCSP) # University of Lisbon # cgoncalves@iscsp.ulisboa.pt # # New Entrant vs Market Leader (payoffs correspond to strategic value) # # For more details see the user man...
[ 2, 17409, 28855, 35371, 16175, 282, 1158, 357, 4626, 828, 3776, 17003, 351, 11361, 198, 2, 3776, 17003, 290, 27684, 317, 13, 40, 13, 38884, 198, 2, 37931, 9390, 22953, 390, 37685, 25792, 77, 979, 292, 3345, 544, 271, 304, 2165, 8836, ...
3.383948
461
import json from extractor import Node, Aggregator import bz2 from dill import dumps, HIGHEST_PROTOCOL
[ 11748, 33918, 198, 6738, 7925, 273, 1330, 19081, 11, 19015, 2301, 1352, 198, 11748, 275, 89, 17, 198, 6738, 288, 359, 1330, 45514, 11, 34677, 6465, 62, 4805, 2394, 4503, 3535, 628, 628, 628 ]
3.176471
34
import mobula as M import mobula.layers as L import numpy as np
[ 11748, 7251, 4712, 355, 337, 198, 11748, 7251, 4712, 13, 75, 6962, 355, 406, 198, 11748, 299, 32152, 355, 45941, 198 ]
3.047619
21
import torch import torch.nn as nn from torch.optim.optimizer import Optimizer from torchwisdom.core.callback import * from torchwisdom.core.utils.data import DatasetCollector from torchwisdom.vision.predictor import ConvClassifierPredictor from torchwisdom.core.trainer import ClassifierTrainer __all__ = ['ConvTraine...
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 28034, 13, 40085, 13, 40085, 7509, 1330, 30011, 7509, 198, 198, 6738, 28034, 86, 9350, 13, 7295, 13, 47423, 1330, 1635, 198, 6738, 28034, 86, 9350, 13, 7295, 13, 267...
3.385417
96
# -*- coding: utf-8 -*- import numpy as np #end def scale #end rotate180 #end myconv2
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 299, 32152, 355, 45941, 198, 2, 437, 825, 5046, 198, 198, 2, 437, 23064, 15259, 198, 2, 437, 616, 42946, 17 ]
2.388889
36
""" Given an array of unsorted numbers, find all unique triplets in it that add up to zero. Example 1: Input: [-3, 0, 1, 2, -1, 1, -2] Output: [-3, 1, 2], [-2, 0, 2], [-2, 1, 1], [-1, 0, 1] Explanation: There are four unique triplets whose sum is equal to zero. Example 2: Input: [-5, 2, -1, -2, 3] Output: [[-5, 2, 3...
[ 37811, 198, 15056, 281, 7177, 286, 5576, 9741, 3146, 11, 1064, 477, 3748, 15055, 912, 287, 340, 326, 751, 510, 284, 6632, 13, 198, 198, 16281, 352, 25, 198, 198, 20560, 25, 25915, 18, 11, 657, 11, 352, 11, 362, 11, 532, 16, 11, ...
2.292683
246
from ..db import * from ..lib import logging, error from . import HostObject from .element import HostElement HostConnection.register_delete_rule(HostElement, "connection", NULLIFY)
[ 6738, 11485, 9945, 1330, 1635, 198, 6738, 11485, 8019, 1330, 18931, 11, 4049, 198, 198, 6738, 764, 1330, 14504, 10267, 198, 6738, 764, 30854, 1330, 14504, 20180, 198, 198, 17932, 32048, 13, 30238, 62, 33678, 62, 25135, 7, 17932, 20180, ...
3.8125
48
"""Lists the available voices.""" from google.cloud import texttospeech from google.cloud.texttospeech import enums client = texttospeech.TextToSpeechClient() # Performs the list voices request voices = client.list_voices() for voice in voices.voices: # Display the voice's name. Example: tpc-vocoded print('N...
[ 198, 37811, 43, 1023, 262, 1695, 10839, 526, 15931, 198, 6738, 23645, 13, 17721, 1330, 2420, 83, 418, 431, 3055, 198, 6738, 23645, 13, 17721, 13, 5239, 83, 418, 431, 3055, 1330, 551, 5700, 198, 16366, 796, 2420, 83, 418, 431, 3055, ...
2.975945
291
# DDP LAB-3 # SOAL 1 - Gunting-Batu-Kertas # Tuliskan program untuk Soal 1 di bawah ini #program mencetak pesan ke layar print("SOAL 1 - Permainan Gunting-Batu-Kertas") #program mencetak pesan ke layar print("------------------------------------------") print("Ketentuan Permainan : ") print("Player hanya dapat memas...
[ 2, 360, 6322, 406, 6242, 12, 18, 198, 198, 2, 12809, 1847, 352, 532, 6748, 889, 12, 24541, 84, 12, 42, 861, 292, 198, 2, 30941, 1984, 272, 1430, 1418, 2724, 1406, 282, 352, 2566, 275, 707, 993, 287, 72, 198, 198, 2, 23065, 1450,...
2.414604
1,616
import pylab as pl import pandas as pd from pathlib import Path import numpy as np root_path = Path("/Users/arminbahl/Desktop/mutant_behavior_data/dot_motion_coherence/chrna2a") df_extracted_features = pd.read_hdf(root_path / "all_data.h5", key="extracted_features") df_extracted_binned_features = pd.read_hdf(root_pat...
[ 11748, 279, 2645, 397, 355, 458, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 3108, 8019, 1330, 10644, 198, 11748, 299, 32152, 355, 45941, 198, 198, 15763, 62, 6978, 796, 10644, 7203, 14, 14490, 14, 283, 1084, 65, 15668, 14, 36881...
2.501907
1,835
# Plot the csphoneix continuum # 30/07/2018 by Zhisong Qu # # Usage: # python plot_csp.py csp_file omega_min omega_max gamma_min gamma_max # Inputs: # csp_file : the csp spectrum file name # omega_min : the min omega to plot (default=-2.0) # omega_max : max (default= 2.0) # gamma_min :...
[ 2, 28114, 262, 50115, 4862, 844, 44422, 198, 2, 1542, 14, 2998, 14, 7908, 416, 10511, 271, 506, 2264, 198, 2, 198, 2, 29566, 25, 198, 2, 220, 220, 220, 21015, 7110, 62, 66, 2777, 13, 9078, 269, 2777, 62, 7753, 37615, 62, 1084, 3...
2.096629
1,335
""" Defines all types in the variable-free language for the WikiTablesQuestions dataset defined in the following paper by Liang et al. (2018) Memory Augmented Policy Optimization for Program Synthesis with Generalization. """ from allennlp.semparse.type_declarations.type_declaration import (NamedBasicType, Com...
[ 37811, 201, 198, 7469, 1127, 477, 3858, 287, 262, 7885, 12, 5787, 3303, 329, 262, 13078, 51, 2977, 35741, 27039, 5447, 287, 262, 201, 198, 27780, 278, 3348, 416, 43322, 2123, 435, 13, 357, 7908, 8, 201, 198, 30871, 2447, 12061, 7820, ...
2.22623
4,575
#!/usr/bin/env python try: from setuptools import setup, find_packages except ImportError: from distutils.core import setup setup(name="chirun", description="Produce flexible and accessible course notes, in a variety of formats, using LaTeX or Markdown source", version="0.7.0", author="E-Lear...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 28311, 25, 198, 220, 220, 220, 422, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 422, 1233, 26791, 13, 7295, 1330, 9058, 198, ...
1.747126
870
# https://www.geeksforgeeks.org/how-to-sort-an-array-in-a-single-loop/ if __name__ == "__main__": # Declaring an integer array of size 11. arr = [1, 2, 99, 9, 8, 7, 6, 0, 5, 4, 3] # Printing the original Array. print("Original array: ", arr) # Sorting the array using a single ...
[ 198, 2, 3740, 1378, 2503, 13, 469, 2573, 30293, 2573, 13, 2398, 14, 4919, 12, 1462, 12, 30619, 12, 272, 12, 18747, 12, 259, 12, 64, 12, 29762, 12, 26268, 14, 628, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, ...
2.353933
178
''' Author : Bhishm Daslaniya [17CE023] "Make it work, make it right, make it fast." – Kent Beck ''' import requests from bs4 import BeautifulSoup #open the web site Vanity fair url = 'http://www.vanityfair.com/society/2014/06/monica-lewinsky-humiliation-cult...
[ 7061, 6, 198, 220, 220, 220, 6434, 1058, 16581, 680, 76, 29533, 75, 3216, 3972, 685, 1558, 5222, 45310, 60, 220, 198, 220, 220, 220, 366, 12050, 340, 670, 11, 787, 340, 826, 11, 787, 340, 3049, 526, 220, 198, 220, 220, 220, 220, ...
2.216981
212
import torch import torchvision import torchvision.transforms as transforms from torch.utils.data import DataLoader from .pose_config import config as pose_config from .pose_resnet import get_pose_net import os import cv2 import math import numpy as np def get_max_preds(batch_heatmaps): ''' get predictions ...
[ 11748, 28034, 198, 11748, 28034, 10178, 198, 11748, 28034, 10178, 13, 7645, 23914, 355, 31408, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 6060, 17401, 198, 198, 6738, 764, 3455, 62, 11250, 1330, 4566, 355, 12705, 62, 11250, 198, 6738, ...
2.290158
4,115
import functools try: import simplejson as json except ImportError: import json import logging import string from jsonschema import RefResolver from jsonschema.validators import Draft4Validator from pkg_resources import resource_filename from six import iteritems from swagger_spec_validator import ref_validat...
[ 11748, 1257, 310, 10141, 198, 28311, 25, 198, 220, 220, 220, 1330, 2829, 17752, 355, 33918, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 1330, 33918, 198, 11748, 18931, 198, 11748, 4731, 198, 198, 6738, 44804, 684, 2395, 2611, 1330...
2.628611
3,635
"""Unit tests for special orthogonal group SO(3).""" import warnings import tests.helper as helper import geomstats.backend as gs import geomstats.tests from geomstats import algebra_utils from geomstats.geometry.special_orthogonal import SpecialOrthogonal EPSILON = 1e-5 ATOL = 1e-5
[ 37811, 26453, 5254, 329, 2041, 29617, 519, 20996, 1448, 12809, 7, 18, 21387, 15931, 198, 198, 11748, 14601, 198, 198, 11748, 5254, 13, 2978, 525, 355, 31904, 198, 198, 11748, 4903, 296, 34242, 13, 1891, 437, 355, 308, 82, 198, 11748, ...
3.052632
95
#!/usr/bin/env python3 # Write a program that compares two files of names to find: # Names unique to file 1 # Names unique to file 2 # Names shared in both files """ python3 checklist.py --file1 --file2 """
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 19430, 257, 1430, 326, 23008, 734, 3696, 286, 3891, 284, 1064, 25, 198, 2, 197, 36690, 3748, 284, 2393, 352, 198, 2, 197, 36690, 3748, 284, 2393, 362, 198, 2, 197, 3669...
3.166667
66
# Parallel simulation environment interfaces import gym import multiprocessing as mp try: import cv2 except: pass import numpy as np
[ 2, 42945, 18640, 2858, 20314, 198, 198, 11748, 11550, 198, 11748, 18540, 305, 919, 278, 355, 29034, 198, 198, 28311, 25, 198, 220, 220, 220, 1330, 269, 85, 17, 198, 16341, 25, 198, 220, 220, 220, 1208, 198, 11748, 299, 32152, 355, 4...
3.222222
45
# The MIT License (MIT) # # Copyright (c) 2016 Petr Fejfar # # 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, modif...
[ 2, 383, 17168, 13789, 357, 36393, 8, 198, 2, 198, 2, 15069, 357, 66, 8, 1584, 47377, 5452, 73, 16370, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 2, 286, 428, 378...
3.810631
301
import numpy as np import scipy.io from glob import glob import pandas import os if "b_rt" not in glob("*") or "n_rt" not in glob("*"): exit("Error, please download the data from " "https://shadlenlab.columbia.edu/resources/RoitmanDataCode.html " "and copy this script into the extracted zip file ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 13, 952, 198, 6738, 15095, 1330, 15095, 198, 11748, 19798, 292, 198, 11748, 28686, 198, 198, 361, 366, 65, 62, 17034, 1, 407, 287, 15095, 7203, 9, 4943, 393, 366, 77, 62, 1703...
2.638095
735
""" 过滤器本质是函数 自定义过滤器步骤 1.自定义一个python函数去实现业务逻辑 2.通过app对象将函数添加到系统过滤器中 3.使用自定义过滤器 """ # 1.自定义一个python函数去实现业务逻辑 from flask import session,current_app,jsonify,g from info.response_code import RET import functools """ 需求:查询当前登陆用户对象的代码在多个视图函数都需要使用,我们可以用装饰器将其封装起来 view_func ,被装饰的函数名称 问题:装饰器会改变被装饰的视图函数的名称 方案:functools_wrap...
[ 37811, 198, 32573, 229, 162, 119, 97, 161, 247, 101, 17312, 105, 164, 112, 101, 42468, 49035, 121, 46763, 108, 198, 164, 229, 103, 22522, 248, 20046, 231, 32573, 229, 162, 119, 97, 161, 247, 101, 29826, 98, 165, 103, 97, 198, 16, ...
0.846348
397
loss = dict( type='IntraWeightedBCEWithLogits', loss_weight=1.0, )
[ 22462, 796, 8633, 7, 198, 220, 220, 220, 2099, 11639, 5317, 430, 25844, 276, 2749, 36, 3152, 11187, 896, 3256, 198, 220, 220, 220, 2994, 62, 6551, 28, 16, 13, 15, 11, 198, 8, 198 ]
2.142857
35
from typing import Dict, Any from unittest import TestCase from server import app from flask.testing import FlaskClient from werkzeug.test import TestResponse from tests.test_firebaser import get_id_token
[ 6738, 19720, 1330, 360, 713, 11, 4377, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 198, 6738, 4382, 1330, 598, 198, 6738, 42903, 13, 33407, 1330, 46947, 11792, 198, 6738, 266, 9587, 2736, 1018, 13, 9288, 1330, 6208, 31077, 198, 6738, ...
3.745455
55
import time import hmac import hashlib import base64 from typing import Dict
[ 11748, 640, 198, 11748, 289, 20285, 198, 11748, 12234, 8019, 198, 11748, 2779, 2414, 198, 6738, 19720, 1330, 360, 713, 628 ]
3.714286
21
import math import cv2 import numpy as np
[ 11748, 10688, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 628, 628, 628 ]
2.9375
16
# Copyright 2021 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, 33448, 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...
4.093137
204
# -*- coding: utf-8 -*- # ''' Allows using DOLFIN's indented block messages with 'with', i.e., with Message('hello world'): # do something ''' from dolfin import begin, end
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 7061, 6, 198, 34934, 1262, 360, 3535, 20032, 338, 773, 4714, 2512, 6218, 351, 705, 4480, 3256, 1312, 13, 68, 1539, 628, 220, 220, 220, 351, 16000, 10786, 31373...
2.597222
72
# -*- coding: utf-8 -*- import logging from django import template register = template.Library() logger = logging.getLogger(__name__) try: from django.template.defaultfilters import truncatechars except ImportError: # We're on Django < 1.4, fake a simple one ... logger.info("truncatechars template filter not ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 18931, 198, 6738, 42625, 14208, 1330, 11055, 198, 30238, 796, 11055, 13, 23377, 3419, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, ...
2.976331
169
import sys import pygame from pygame.locals import * from gfx import * from character import * ## Main Loop ## Event Handler ## Key Up Event ## Key Up Event ## Key Press Event ## Mouse Move Event if __name__ == '__main__': pygame.init() Game(60) pygame.quit() sys.exit()
[ 11748, 25064, 201, 198, 11748, 12972, 6057, 201, 198, 6738, 12972, 6057, 13, 17946, 874, 1330, 1635, 201, 198, 6738, 308, 21373, 1330, 1635, 201, 198, 6738, 2095, 1330, 1635, 201, 198, 201, 198, 201, 198, 197, 2235, 8774, 26304, 201, ...
2.365672
134
# Importing essential libraries from flask import Flask, render_template, request import numpy as np import joblib # Load the Random Forest CLassifier model filename = 'heart_attack_prediction_rfc_model.pkl' scaler_name = 'scaler.pkl' classifier = joblib.load(filename) scaler = joblib.load(scaler_name) app...
[ 2, 17267, 278, 6393, 12782, 201, 198, 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 2581, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 1693, 8019, 201, 198, 201, 198, 2, 8778, 262, 14534, 9115, 7852, 562, 7483, 2746,...
2.574297
249
""" # @Author: chang_an # @Date: 2019-12-21 09:25:37 # @LastEditors: chang_an # @LastEditTime: 2019-12-21 09:28:55 # @FilePath: \calculator2.1.0\calculation\packages\calculator_standard_science.py """ import math def standard_science_calc(event, text): """[标准型和科学型计算过程的实现] Arguments: event ...
[ 198, 37811, 198, 1303, 2488, 13838, 25, 1488, 62, 272, 198, 1303, 2488, 10430, 25, 13130, 12, 1065, 12, 2481, 7769, 25, 1495, 25, 2718, 198, 1303, 2488, 5956, 18378, 669, 25, 1488, 62, 272, 198, 1303, 2488, 5956, 18378, 7575, 25, 13...
1.703623
1,380
# # @lc app=leetcode id=930 lang=python3 # # [930] Binary Subarrays With Sum # # @lc code=start # @lc code=end
[ 2, 198, 2, 2488, 44601, 598, 28, 293, 316, 8189, 4686, 28, 45418, 42392, 28, 29412, 18, 198, 2, 198, 2, 685, 45418, 60, 45755, 3834, 3258, 592, 2080, 5060, 198, 2, 198, 198, 2, 2488, 44601, 2438, 28, 9688, 198, 2, 2488, 44601, 2...
2.354167
48
import json from sure import expect from tests.integration import VCRIntegrationTest, vcr
[ 11748, 33918, 198, 198, 6738, 1654, 1330, 1607, 198, 198, 6738, 5254, 13, 18908, 1358, 1330, 569, 9419, 34500, 1358, 14402, 11, 410, 6098, 628 ]
3.72
25
# -*- coding: utf-8 -*- """ Created on Mon Sep 10 10:41:40 2018 @author: robot """ import readCfg.read_cfg as rd import numpy as np if __name__ == '__main__': print('wtf') resPlan = ResucePlan(cfgFileName = './/data//1_8_8_3_Cfg.dat')
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 2892, 8621, 838, 838, 25, 3901, 25, 1821, 2864, 198, 198, 31, 9800, 25, 9379, 198, 37811, 628, 198, 11748, 1100, 34, 40616, 13, 961, 62, 37581,...
1.903226
155
# -*- coding:utf-8 -*- from rest_framework import serializers from uploaddemo.models import Airticle
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 6738, 9516, 9536, 78, 13, 27530, 1330, 317, 2265, 1548, 628 ]
3.1875
32
# flake8: noqa from .transmitter import *
[ 2, 781, 539, 23, 25, 645, 20402, 198, 6738, 764, 7645, 37974, 1330, 1635, 198 ]
2.8
15
import pandas as pd import itertools def summarize(results): """ Concatenate results and summarize """ results = pd.DataFrame(results) asex = pd.concat( [results['asex_stages'].explode(), results['asex_images'].explode()], axis=1).reset_index(drop=True).dropna() asex.sort_values('asex_...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 340, 861, 10141, 628, 198, 4299, 35743, 7, 43420, 2599, 198, 220, 220, 220, 37227, 1482, 9246, 268, 378, 2482, 290, 35743, 37227, 198, 220, 220, 220, 2482, 796, 279, 67, 13, 6601, 19778, ...
2.169118
408
import argparse def get_input_args(): """ Uses argparse lib to parse command line arguments from user. Returns parse_args() object """ parser = argparse.ArgumentParser() parser.add_argument('data_directory', help = 'absolute path of to-be-trained folder') pa...
[ 11748, 1822, 29572, 198, 198, 4299, 651, 62, 15414, 62, 22046, 33529, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 220, 220, 220, 220, 36965, 1822, 29572, 9195, 284, 21136, 3141, 1627, 7159, 422, 2836, 13, 16409, 21136, 62, 22046, 3...
2.323569
751
# Imports: standard library import os import copy import math import logging import warnings import itertools # Imports: third party import numpy as np import matplotlib as mpl from scipy import stats, linalg from matplotlib import pyplot as plt from scipy.spatial import distance from tqdm.notebook import tqdm as log_...
[ 2, 1846, 3742, 25, 3210, 5888, 198, 11748, 28686, 198, 11748, 4866, 198, 11748, 10688, 198, 11748, 18931, 198, 11748, 14601, 198, 11748, 340, 861, 10141, 198, 198, 2, 1846, 3742, 25, 2368, 2151, 198, 11748, 299, 32152, 355, 45941, 198, ...
3.064516
248
from logging_utils import info, debug, ONLY_MESSAGE_FORMAT import logging import threading import requests from random import randint from concurrent.futures import Future logging.basicConfig(level=logging.DEBUG, format=ONLY_MESSAGE_FORMAT) if __name__ == "__main__": future = generate_request(f"https://pokeapi.co...
[ 6738, 18931, 62, 26791, 1330, 7508, 11, 14257, 11, 22224, 62, 44, 1546, 4090, 8264, 62, 21389, 1404, 198, 11748, 18931, 198, 11748, 4704, 278, 198, 11748, 7007, 198, 6738, 4738, 1330, 43720, 600, 198, 6738, 24580, 13, 69, 315, 942, 13...
2.740196
204
import torch
[ 11748, 28034, 628 ]
4.666667
3
# coding=utf-8 from setuptools import setup, find_packages setup( name='cbake', version='0.1.0', py_modules=['cbake'], packages=find_packages(), include_package_data=True, install_requires=[ 'Click', 'pychalk', 'pyyaml' ], package_data={'': ['*.txt'...
[ 2, 19617, 28, 40477, 12, 23, 201, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 201, 198, 201, 198, 40406, 7, 201, 198, 220, 220, 220, 1438, 11639, 21101, 539, 3256, 201, 198, 220, 220, 220, 2196, 11639, 15, 13, 1...
1.987654
243
from pecan import expose, request from pecan.rest import RestController from smiley.presentation import syntax from smiley.web import nav from smiley.web.controllers import run_context
[ 6738, 613, 5171, 1330, 15651, 11, 2581, 198, 6738, 613, 5171, 13, 2118, 1330, 8324, 22130, 198, 198, 6738, 8212, 88, 13, 25579, 341, 1330, 15582, 198, 6738, 8212, 88, 13, 12384, 1330, 6812, 198, 6738, 8212, 88, 13, 12384, 13, 3642, ...
3.895833
48
# vFabric Administration Server API # Copyright (c) 2012 VMware, Inc. 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 ...
[ 2, 410, 43957, 1173, 8694, 9652, 7824, 198, 2, 15069, 357, 66, 8, 2321, 37754, 11, 3457, 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, ...
1.929167
1,920
# Copyright 2020 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, 12131, 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.977077
698
import os.path as op from nose.tools import assert_true from numpy.testing import assert_array_almost_equal from .. import Raw, pick_types, pick_channels fif_fname = op.join(op.dirname(__file__), 'data', 'test_raw.fif') ctf_fname = op.join(op.dirname(__file__), 'data', 'test_ctf_raw.fif') def test_io_raw(): ""...
[ 11748, 28686, 13, 6978, 355, 1034, 198, 198, 6738, 9686, 13, 31391, 1330, 6818, 62, 7942, 198, 6738, 299, 32152, 13, 33407, 1330, 6818, 62, 18747, 62, 28177, 62, 40496, 198, 198, 6738, 11485, 1330, 16089, 11, 2298, 62, 19199, 11, 2298...
1.976451
1,189
from rest_framework.pagination import LimitOffsetPagination
[ 6738, 1334, 62, 30604, 13, 79, 363, 1883, 1330, 27272, 34519, 47, 363, 1883, 198, 220, 220, 220, 220 ]
3.368421
19
#!/usr/bin/python # Wflow is Free software, see below: # # Copyright (c) J. Schellekens/Deltares 2005-2011 # # 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...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 2, 370, 11125, 318, 3232, 3788, 11, 766, 2174, 25, 198, 2, 220, 198, 2, 15069, 357, 66, 8, 449, 13, 1446, 34454, 14972, 14, 35, 2120, 3565, 5075, 12, 9804, 198, 2, 198, 2, 770, 1...
3.052444
1,125
# app/movies/urls.py from django.urls import path from .views import MovieDetail, MovieList urlpatterns = [ path("api/movies/", MovieList.as_view()), path("api/movies/<int:pk>/", MovieDetail.as_view()), ]
[ 2, 598, 14, 76, 20526, 14, 6371, 82, 13, 9078, 198, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 198, 6738, 764, 33571, 1330, 15875, 11242, 603, 11, 15875, 8053, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, ...
2.4
90
import sys import pyparsing as pp pp.ParserElement.setDefaultWhitespaceChars(" \t") SOL = pp.Suppress(pp.LineStart()).setName("START_OF_LINE") EOL = pp.Suppress(pp.LineEnd()).setName("END_OF_LINE") EMPTY_LINES = pp.Suppress(pp.OneOrMore(pp.LineEnd())).setName("EMPTY_LINES") REAL = pp.Combine( pp.Optional(pp.o...
[ 198, 11748, 25064, 198, 11748, 279, 4464, 945, 278, 355, 9788, 198, 198, 381, 13, 46677, 20180, 13, 2617, 19463, 1199, 2737, 10223, 1925, 945, 7203, 3467, 83, 4943, 198, 198, 50, 3535, 796, 9788, 13, 15979, 601, 7, 381, 13, 13949, 1...
2.18145
1,973
#set laser power #take pd reading #repeat, end up with function mapping laser power to pd reading #set laser power to max #set AOM amplitude #take PD reading #repeat, end up with function mapping aom amplitude to pd reading #combine functions, get function mapping aom amplitude to laser power import sys sys.path.a...
[ 198, 198, 2, 2617, 12855, 1176, 198, 2, 20657, 279, 67, 3555, 198, 2, 44754, 11, 886, 510, 351, 2163, 16855, 12855, 1176, 284, 279, 67, 3555, 198, 198, 2, 2617, 12855, 1176, 284, 3509, 198, 2, 2617, 317, 2662, 37188, 198, 2, 20657...
2.306138
1,336
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Sep 30 17:05:23 2018 @author: user """
[ 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, 3825, 8621, 1542, 1596, 25, 2713, 25, 1954, 2864, 198, 198, 31, 9800, 25, 2836, 198, 3781...
2.326087
46
# Time: set: O(1) # get: O(logn) # Space: O(n) # 981 # Create a timebased key-value store class TimeMap, that supports two operations. # # 1. set(string key, string value, int timestamp) # Stores the key and value, along with the given timestamp. # 2. get(string key, int timestamp) # Returns a value such that...
[ 2, 3862, 25, 220, 900, 25, 440, 7, 16, 8, 198, 2, 220, 220, 220, 220, 220, 220, 220, 651, 25, 440, 7, 75, 2360, 8, 198, 2, 4687, 25, 440, 7, 77, 8, 198, 198, 2, 860, 6659, 198, 2, 13610, 257, 640, 3106, 1994, 12, 8367, 3...
3.018868
318
from setuptools import setup, find_packages with open("README.md", "r") as f: long_description = f.read() setup( name='specqp', version='1.1.5', description='Quick plotting, correcting and fitting of spectroscopic data', long_description=long_description, long_description_content_typ...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 4480, 1280, 7203, 15675, 11682, 13, 9132, 1600, 366, 81, 4943, 355, 277, 25, 198, 220, 220, 220, 890, 62, 11213, 796, 277, 13, 961, 3419, 198, 198, 40406, 7, 198, ...
2.312883
489
#!/usr/bin/python # # funclat Display a cummulative histogram of functions' latencies. # # USAGE: funclat [-v] [-p PID [PID ...]] [-m THRESHOLD] [-u] # [-i INTERVAL] PATH_TO_LIBRARY FUNC1,FUNC2,... # # Written as a basic example of getting cummulative latency of functions in a program from bcc im...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 198, 2, 1257, 565, 265, 220, 220, 220, 220, 220, 220, 220, 16531, 257, 10973, 76, 13628, 1554, 21857, 286, 5499, 6, 3042, 3976, 13, 198, 2, 198, 2, 1294, 11879, 25, 1257, 565, 265, 2...
2.635264
1,157
# Title: data_view.py # Project: Chalokwa Battery Analysis # Author: Lane D. Smith # Date Last Edited: December 14, 2020 import numpy as np import matplotlib.pyplot as plt from matplotlib import rc from matplotlib.dates import DateFormatter import matplotlib.dates as mdates import pandas as pd from pandas.plotting imp...
[ 2, 11851, 25, 1366, 62, 1177, 13, 9078, 198, 2, 4935, 25, 30529, 482, 10247, 23490, 14691, 198, 2, 6434, 25, 15016, 360, 13, 4176, 198, 2, 7536, 4586, 34212, 25, 3426, 1478, 11, 12131, 198, 198, 11748, 299, 32152, 355, 45941, 198, ...
2.45102
2,940
import spatial import general import geometry import filters import servicedef import find __version__ = "2.0.120"
[ 11748, 21739, 198, 11748, 2276, 198, 11748, 22939, 198, 11748, 16628, 198, 11748, 1113, 3711, 891, 198, 11748, 1064, 198, 834, 9641, 834, 796, 366, 17, 13, 15, 13, 10232, 1 ]
3.677419
31
n = int(input()) a, b = input().split() for i in range(n): print(a[i], end='') print(b[i], end='') print()
[ 77, 796, 493, 7, 15414, 28955, 198, 64, 11, 275, 796, 5128, 22446, 35312, 3419, 198, 198, 1640, 1312, 287, 2837, 7, 77, 2599, 198, 220, 220, 220, 3601, 7, 64, 58, 72, 4357, 886, 28, 7061, 8, 198, 220, 220, 220, 3601, 7, 65, 58...
2.052632
57
import matplotlib.pyplot as plt import matplotlib.patches as patches import skimage.io import numpy as np def boxes(script, img_anno, figsize=(15,15), fontsize=15, label_offset=(0,15)): '''Draw bboxes on into an matplotlib figures Args: script (lost.pyapi.script.Script): The script object that uses t...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 2603, 29487, 8019, 13, 8071, 2052, 355, 16082, 198, 11748, 1341, 9060, 13, 952, 198, 11748, 299, 32152, 355, 45941, 628, 198, 4299, 10559, 7, 12048, 11, 33705, 62, 1...
1.991257
2,402
from keras.layers.core import Layer import tensorflow as tf class SpatialTransformLayer(Layer): """Spatial Transformer Layer Implements a spatial transformer layer as described in [1]_. Borrowed from [2]_: downsample_fator : float A value of 1 will keep the orignal size of the image. Va...
[ 6738, 41927, 292, 13, 75, 6962, 13, 7295, 1330, 34398, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 198, 4871, 1338, 34961, 41762, 49925, 7, 49925, 2599, 198, 220, 220, 220, 37227, 4561, 34961, 3602, 16354, 34398, 198, 220, 220, 220,...
2.633721
344
#! /usr/bin/env python import matplotlib.colors as mc import numpy as np import re
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 2603, 29487, 8019, 13, 4033, 669, 355, 36650, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 302, 628 ]
2.833333
30
from nider.core import Font from nider.core import Outline from nider.models import Content from nider.models import Header from nider.models import Image # TODO: change this fontpath to the fontpath on your machine roboto_font_folder = '/home/ovd/.local/share/fonts/Roboto/' text_outline = Outline(1, '#efefef') he...
[ 6738, 299, 1304, 13, 7295, 1330, 24060, 198, 6738, 299, 1304, 13, 7295, 1330, 3806, 1370, 198, 198, 6738, 299, 1304, 13, 27530, 1330, 14041, 198, 6738, 299, 1304, 13, 27530, 1330, 48900, 198, 6738, 299, 1304, 13, 27530, 1330, 7412, 62...
2.391076
381
#!/usr/bin/env python import os import sys if 'Hello' != sys.argv[1]: print "messages doesnt match! |%s|" % (sys.argv[1]) sys.exit(1) sys.exit(0)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 361, 705, 15496, 6, 14512, 25064, 13, 853, 85, 58, 16, 5974, 198, 220, 220, 220, 3601, 366, 37348, 1095, 46701, 2872, 0, 930, 4, 82, ...
2.166667
72
# -*- coding: utf-8 -*- ''' This module implements :class:`BaseSignal`, an array of signals. This is a parent class from which all signal objects inherit: :class:`AnalogSignal` and :class:`IrregularlySampledSignal` :class:`BaseSignal` inherits from :class:`quantities.Quantity`, which inherits from :class:`numpy.ar...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 7061, 6, 198, 1212, 8265, 23986, 1058, 4871, 25, 63, 14881, 11712, 282, 47671, 281, 7177, 286, 10425, 13, 198, 1212, 318, 257, 2560, 1398, 422, 543, 477, 6737, 5563, 1...
2.388618
4,516
import xml.etree.ElementTree as ET import glob, os, sys, shutil from datetime import datetime, timedelta import urllib, urllib2 import urlparse import platform, subprocess, re import imp import sharppy.io.decoder as decoder import utils.frozenutils as frozenutils HOME_DIR = os.path.join(os.path.expanduser("~"), ".sh...
[ 198, 11748, 35555, 13, 316, 631, 13, 20180, 27660, 355, 12152, 198, 11748, 15095, 11, 28686, 11, 25064, 11, 4423, 346, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 11748, 2956, 297, 571, 11, 2956, 297, 571, 17, 198,...
2.58457
337
import asyncio import re import aiohttp import discord import orjson import uvloop from discord.ext import commands from jamdict import Jamdict jam = Jamdict()
[ 11748, 30351, 952, 201, 198, 11748, 302, 201, 198, 201, 198, 11748, 257, 952, 4023, 201, 198, 11748, 36446, 201, 198, 11748, 393, 17752, 201, 198, 11748, 334, 85, 26268, 201, 198, 6738, 36446, 13, 2302, 1330, 9729, 201, 198, 6738, 168...
2.633803
71
import random n1 = input('Nome do 1°aluno: ') n2 = input('Nome do 2°aluno: ') n3 = input('Nome do 3°aluno: ') n4 = input('Nome do 4°aluno: ') nomes = [n1, n2, n3, n4,] random.shuffle(nomes) print('-----ORDEM DO SORTEIO-----') print('O sorteio chegou ao fim!') print('A ordem para apresentar o trabalho é:') print(nomes)...
[ 11748, 4738, 198, 77, 16, 796, 5128, 10786, 45, 462, 466, 352, 7200, 282, 36909, 25, 705, 8, 198, 77, 17, 796, 5128, 10786, 45, 462, 466, 362, 7200, 282, 36909, 25, 705, 8, 198, 77, 18, 796, 5128, 10786, 45, 462, 466, 513, 7200,...
2.175325
154
from abc import ABC, abstractmethod from mcdc.point import Point # ============================================================================= # Particle # ============================================================================= # ======================================================================...
[ 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 198, 198, 6738, 285, 10210, 66, 13, 4122, 1330, 6252, 628, 198, 2, 38093, 25609, 198, 2, 2142, 1548, 198, 2, 38093, 25609, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 2, 38093, 25...
8.019231
52
#!/usr/bin/env python3 from selenium import webdriver from selenium.webdriver.chrome.options import Options import pyfiglet import logging import datetime import base64 if __name__ == "__main__": main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 46659, 13, 25811, 1330, 18634, 198, 11748, 12972, 5647, 1616, 198, 11748, 18931, 19...
3.151515
66
"""The unittest module for the admin blueprint. """ import unittest from urllib.parse import urlparse from flask_login import current_user from app import create_app, db from app.models.administrator import Administrator from app.models.review_status import ReviewStatus class AdminBlueprintTestCase(unittest.TestCas...
[ 37811, 464, 555, 715, 395, 8265, 329, 262, 13169, 30881, 13, 198, 37811, 198, 198, 11748, 555, 715, 395, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 19016, 29572, 198, 6738, 42903, 62, 38235, 1330, 1459, 62, 7220, 198, 198, 6738, 598,...
2.180297
1,076
import sqlite3 with sqlite3.connect("sample.db") as connection: c = connection.cursor() c.execute("DROP TABLE posts") c.execute("CREATE TABLE posts(title TEXT, description TEXT)") c.execute('INSERT INTO posts VALUES("GOOD", "I\'m good.")') c.execute('INSERT INTO posts VALUES("Well", "T\'m well.")')
[ 11748, 220, 44161, 578, 18, 198, 198, 4480, 44161, 578, 18, 13, 8443, 7203, 39873, 13, 9945, 4943, 355, 220, 4637, 25, 198, 197, 66, 796, 4637, 13, 66, 21471, 3419, 198, 197, 66, 13, 41049, 7203, 7707, 3185, 197, 38148, 6851, 4943, ...
2.878505
107
A, B = map(int, input().split()) print("error" if A+B >= 10 else A+B)
[ 32, 11, 347, 796, 3975, 7, 600, 11, 5128, 22446, 35312, 28955, 198, 4798, 7203, 18224, 1, 611, 317, 10, 33, 18189, 838, 2073, 317, 10, 33, 8, 198 ]
2.413793
29
from repair.repair_classes.if_apc import IF_APC_Repair from repair.repair_classes.sq_rmo import SQ_RMO_Repair from repair.repair_classes.sq_rfo import SQ_RFO_Repair from repair.repair_classes.if_rmv import IF_RMV_Repair from repair.repair_classes.if_cc import IF_CC_Repair from repair.repair_classes.if_apc import IF_APC...
[ 6738, 9185, 13, 49932, 62, 37724, 13, 361, 62, 499, 66, 1330, 16876, 62, 2969, 34, 62, 6207, 958, 198, 6738, 9185, 13, 49932, 62, 37724, 13, 31166, 62, 81, 5908, 1330, 49747, 62, 49, 11770, 62, 6207, 958, 198, 6738, 9185, 13, 4993...
2.786517
178
from .main_cls import RomanNumeralConverter print("Roman Numeral Converter imported.")
[ 6738, 764, 12417, 62, 565, 82, 1330, 7993, 33111, 1691, 3103, 332, 353, 198, 4798, 7203, 32454, 31835, 1691, 35602, 353, 17392, 19570 ]
3.73913
23
# -*- coding: utf-8 -*- ''' Copyright (C) 2014 walker li <walker8088@gmail.com> 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 versio...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 7061, 6, 198, 15269, 357, 34, 8, 1946, 220, 2513, 263, 7649, 1279, 20783, 1795, 3459, 31, 14816, 13, 785, 29, 198, 198, 1212, 1430, 318, 1479, 3788, 25, 345, 46...
3.340067
297
################################################################ # # TWEEZO - A set of utility scripts for scraping tweets, # processing them and performing analysis # # Developed to support a series of labs and assignments for # the CEU Digital Tools course for BA students in the # 2021-21 academic year. # #...
[ 29113, 29113, 198, 2, 198, 2, 220, 220, 17306, 6500, 57, 46, 532, 317, 900, 286, 10361, 14750, 329, 46743, 12665, 11, 198, 2, 220, 220, 7587, 606, 290, 9489, 3781, 198, 2, 198, 2, 220, 220, 6013, 276, 284, 1104, 257, 2168, 286, ...
2.883333
5,160
# -*- coding: utf-8 -*- # @Author: 何睿 # @Create Date: 2019-09-02 07:41:16 # @Last Modified by: 何睿 # @Last Modified time: 2019-09-02 07:55:03
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 13838, 25, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 19526, 243, 163, 251, 123, 198, 2, 2488, 16447, 7536, 25, 220, 220, 220, 220, ...
1.771739
92
# -*- coding: UTF-8 -*- """ Author:wistn since:2020-09-11 18:44:30 LastEditors:Do not edit LastEditTime:2021-04-13 Description: """ import asyncio import re import traceback from .android_util_Log import Log from .org_noear_sited_Util import Util from .org_noear_sited_SdAttributeList import SdAttributeList from .mytool...
[ 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 37811, 198, 13838, 25, 86, 396, 77, 198, 20777, 25, 42334, 12, 2931, 12, 1157, 1248, 25, 2598, 25, 1270, 198, 5956, 18378, 669, 25, 5211, 407, 4370, 198, 5956, 18378, 757...
2.76947
321
from PIL import Image im = Image.open("naruto_first.png").convert("RGB") im.save("naruto.jpg", "jpeg")
[ 6738, 350, 4146, 1330, 7412, 198, 198, 320, 796, 7412, 13, 9654, 7203, 23955, 9390, 62, 11085, 13, 11134, 11074, 1102, 1851, 7203, 36982, 4943, 198, 320, 13, 21928, 7203, 23955, 9390, 13, 9479, 1600, 366, 73, 22071, 4943, 198 ]
2.6
40