content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from unittest import mock import pytest from django.contrib.auth.models import AnonymousUser from olympia import amo from olympia.access.models import Group, GroupUser from olympia.addons.models import Addon, AddonUser from olympia.amo.tests import addon_factory, TestCase, req_factory_factory from olympia.users.model...
[ 6738, 555, 715, 395, 1330, 15290, 198, 11748, 12972, 9288, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 19200, 12982, 198, 198, 6738, 267, 6760, 544, 1330, 716, 78, 198, 6738, 267, 6760, 544, 13, 15526, 13,...
2.39267
764
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © 2017 Judit Acs <judit@sch.bme.hu> # # Distributed under terms of the MIT license. from __future__ import unicode_literals from argparse import ArgumentParser from sys import stdin from experiment import Seq2seqExperiment from data import ...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 43907, 25, 69, 12685, 28, 40477, 12, 23, 198, 2, 198, 2, 15069, 10673, 2177, 4794, 270, 4013, 82, 1279, 10456,...
2.637755
196
#!/usr/bin/python import argparse from xdg import BaseDirectory import requests import json import sys KOALA_LOGIN_FILE='login' KOALA_SERVER="http://localhost:5000/" KOALA_API_PATH="" X_KOALA_USERNAME='x-koala-username' X_KOALA_KEY='x-koala-key' parser = argparse.ArgumentParser() subparser = parser.add_subparsers() ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 11748, 1822, 29572, 198, 6738, 2124, 67, 70, 1330, 7308, 43055, 198, 11748, 7007, 198, 11748, 33918, 198, 11748, 25064, 198, 198, 22328, 1847, 32, 62, 25294, 1268, 62, 25664, 11639, 38235, 6, ...
2.661631
993
#------------------------------------------------------------------------------ # Copyright (c) 2012, Enthought, Inc. # All rights reserved. #------------------------------------------------------------------------------ import datetime from dateutil import parser as isoparser import wx from .wx_control import WxCo...
[ 2, 10097, 26171, 198, 2, 220, 15069, 357, 66, 8, 2321, 11, 2039, 28895, 11, 3457, 13, 198, 2, 220, 1439, 2489, 10395, 13, 198, 2, 10097, 26171, 198, 11748, 4818, 8079, 198, 198, 6738, 3128, 22602, 1330, 30751, 355, 318, 404, 28198, ...
2.899214
1,399
from django.conf.urls import url, patterns from django.contrib.auth.decorators import login_required, permission_required from django.views.generic import TemplateView from cbsapp import views as v urlpatterns = patterns( 'cbsapp.views', url(r'success/', v.MyView1.as_view()), url(r'func/', 'my_view'), ...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 11, 7572, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 12501, 273, 2024, 1330, 17594, 62, 35827, 11, 7170, 62, 35827, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 1...
2.394856
661
import cv2 import numpy as np # Load an image in grayscale img = cv2.imread('football.jpg', cv2.IMREAD_GRAYSCALE) # Displaying an Image cv2.imshow("Football Picha", img) cv2.waitKey(0) cv2.destroyAllWindows()
[ 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 198, 2, 8778, 281, 2939, 287, 1036, 592, 38765, 198, 9600, 796, 269, 85, 17, 13, 320, 961, 10786, 15914, 13, 9479, 3256, 269, 85, 17, 13, 3955, 15675, 62, 38, 30631, 617...
2.482353
85
from .delete_nth import * from .flatten import * from .garage import * from .josephus import * from .longest_non_repeat import * from .max_ones_index import * from .merge_intervals import * from .missing_ranges import * from .move_zeros import * from .plus_one import * from .rotate import * from .summarize_ranges impor...
[ 6738, 764, 33678, 62, 77, 400, 1330, 1635, 198, 6738, 764, 2704, 41769, 1330, 1635, 198, 6738, 764, 4563, 496, 1330, 1635, 198, 6738, 764, 73, 577, 746, 385, 1330, 1635, 198, 6738, 764, 6511, 395, 62, 13159, 62, 44754, 1330, 1635, 1...
3
153
""" Inforalgo control panel Written by Alexandre Almosni alexandre.almosni@gmail.com (C) 2016 Alexandre Almosni Released under Apache 2.0 license. More info at http://www.apache.org/licenses/LICENSE-2.0 """ import wx #import datetime import wx.grid as gridlib import inforalgo from wx.lib.scrolledpanel import Scroll...
[ 37811, 198, 818, 1640, 282, 2188, 1630, 6103, 198, 25354, 416, 21000, 260, 978, 16785, 8461, 220, 220, 257, 2588, 49078, 13, 282, 16785, 8461, 31, 14816, 13, 785, 198, 7, 34, 8, 1584, 21000, 260, 978, 16785, 8461, 198, 45037, 739, 2...
2.523364
321
from django.conf.urls import include, url from django.views.generic import TemplateView from .models import Strategy, TradingBot from . import views urlpatterns = [ # Landing page, etc url(r'^$', views.landing, name="landing"), url(r'^faq$', TemplateView.as_view(template_name="landing/faq.html"), name="fa...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 2291, 11, 19016, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 1330, 37350, 7680, 198, 198, 6738, 764, 27530, 1330, 20561, 11, 25469, 20630, 198, 6738, 764, 1330, 5009, 198, 198, 6371,...
2.450725
690
dna = open('dna.txt','r') date = dna.readline() rna = "" for i in date: if i == 'T': rna+="A" elif i == 'G': rna +="C" elif i == 'C': rna+="G" elif i == "A": rna+="U" saveRna = open('rna.txt', 'w') saveRna.write(rna) saveRna.close() """ No DNA temos as bases T - A ...
[ 67, 2616, 796, 1280, 10786, 67, 2616, 13, 14116, 41707, 81, 11537, 198, 198, 4475, 796, 288, 2616, 13, 961, 1370, 3419, 198, 81, 2616, 796, 13538, 198, 198, 1640, 1312, 287, 3128, 25, 628, 220, 220, 220, 611, 1312, 6624, 705, 51, ...
1.901709
234
""" Ball Class (based on Gameobject). """ import pygame from game_object import GameObject
[ 37811, 198, 23410, 5016, 357, 3106, 319, 3776, 15252, 737, 198, 37811, 198, 198, 11748, 12972, 6057, 198, 198, 6738, 983, 62, 15252, 1330, 3776, 10267, 198 ]
3.444444
27
from .sentence import Sentence from .sentences import Sentences from .section import Section from .sections import Sections from .document import Document
[ 6738, 764, 34086, 594, 1330, 11352, 594, 198, 6738, 764, 34086, 3007, 1330, 11352, 3007, 198, 6738, 764, 5458, 1330, 7275, 198, 6738, 764, 23946, 1330, 37703, 198, 6738, 764, 22897, 1330, 16854, 198 ]
4.558824
34
'''A substring is a contiguous (non-empty) sequence of characters within a string. A vowel substring is a substring that only consists of vowels ('a', 'e', 'i', 'o', and 'u') and has all five vowels present in it. Given a string word, return the number of vowel substrings in word. Example 1: Input: wor...
[ 7061, 6, 32, 3293, 1806, 318, 257, 48627, 357, 13159, 12, 28920, 8, 8379, 286, 3435, 1626, 257, 4731, 13, 201, 198, 201, 198, 32, 48617, 3293, 1806, 318, 257, 3293, 1806, 326, 691, 10874, 286, 23268, 1424, 19203, 64, 3256, 705, 68, ...
2.274123
456
import os import logging from logging.handlers import RotatingFileHandler from .Statics import * # create format of the log message logFormatter = logging.Formatter(LOG_FORMAT) # Get the path of the running script (api command) appPath = os.path.dirname(os.path.abspath(__file__)) # add subdirectory "log" to the path...
[ 11748, 28686, 198, 11748, 18931, 198, 6738, 18931, 13, 4993, 8116, 1330, 18481, 803, 8979, 25060, 198, 6738, 764, 17126, 873, 1330, 1635, 198, 198, 2, 2251, 5794, 286, 262, 2604, 3275, 198, 6404, 8479, 1436, 796, 18931, 13, 8479, 1436, ...
3
308
import numpy as np # from IPython import embed;embed() from make_densebox_target import \ make_densebox_target as make_densebox_target_old from make_densebox_target_dev import \ make_densebox_target as make_densebox_target_new gt_boxes = np.asarray([[150, 250, 130, 60, 1]]) config_dict = dict( x_size=303, ...
[ 11748, 299, 32152, 355, 45941, 198, 2, 422, 6101, 7535, 1330, 11525, 26, 20521, 3419, 198, 6738, 787, 62, 67, 1072, 3524, 62, 16793, 1330, 3467, 198, 220, 220, 220, 787, 62, 67, 1072, 3524, 62, 16793, 355, 787, 62, 67, 1072, 3524, ...
2.49226
323
import numpy as np import os import pandas as pd LEARNING_RATE = 0.15 REGULARISATION = 0.005 MAX_ITERATION = 15000 TARGET_COLUMN_NAME = 53 FOLD_COUNT = 5 # x^j+1 = x^j - lambda^j * grad(F(x^j)) # block of function for features # normalise values in selected column if __name__ == "__main__": main()
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 2538, 1503, 15871, 62, 49, 6158, 796, 657, 13, 1314, 198, 31553, 37232, 1797, 6234, 796, 657, 13, 22544, 198, 22921, 62, 2043, 1137, 623...
2.483871
124
from datetime import date from behave import * from core.model import to_dict from core.model.membership import Membership from core.model.membership_type import MembershipType from core.utils.serialization import serialize use_step_matcher("re") @when("a serialized membership is requested") def step_impl(context)...
[ 6738, 4818, 8079, 1330, 3128, 198, 198, 6738, 17438, 1330, 1635, 198, 198, 6738, 4755, 13, 19849, 1330, 284, 62, 11600, 198, 6738, 4755, 13, 19849, 13, 30814, 1056, 1330, 37939, 198, 6738, 4755, 13, 19849, 13, 30814, 1056, 62, 4906, 1...
2.991329
346
import glob import os from conans import ConanFile, CMake, tools
[ 11748, 15095, 198, 11748, 28686, 198, 198, 6738, 369, 504, 1330, 31634, 8979, 11, 327, 12050, 11, 4899, 198 ]
3.473684
19
"""Role testing files using testinfra.""" testinfra_hosts = ["node1.osgiliath.test"]
[ 37811, 47445, 4856, 3696, 1262, 1332, 10745, 430, 526, 15931, 198, 9288, 10745, 430, 62, 4774, 82, 796, 14631, 17440, 16, 13, 418, 70, 2403, 776, 13, 9288, 8973, 628 ]
2.866667
30
#Electric potential energy, the easy way to solve physics problems. #This energy is converted from potential to kinetic just like in any other situation. #The calculations based upon Energy in general can be used to design and build anything. #This application will attempt to quickly formulate Energy quantities and int...
[ 2, 44132, 2785, 2568, 11, 262, 2562, 835, 284, 8494, 11887, 2761, 13, 198, 2, 1212, 2568, 318, 11513, 422, 2785, 284, 37892, 655, 588, 287, 597, 584, 3074, 13, 198, 2, 464, 16765, 1912, 2402, 6682, 287, 2276, 460, 307, 973, 284, 1...
3.536765
408
#! /usr/bin/env python import sys import os sys.path.insert(0, os.environ["QUEX_PATH"]) import quex.input.regular_expression.engine as regex import quex.engine.state_machine.algebra.union as union import quex.engine.state_machine.algebra.intersection as intersection import quex.engine.state_machine.ch...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 25064, 198, 11748, 28686, 198, 17597, 13, 6978, 13, 28463, 7, 15, 11, 28686, 13, 268, 2268, 14692, 10917, 6369, 62, 34219, 8973, 8, 198, 198, 11748, 627, 1069, 13, 15414, 13...
2.145911
1,076
from django.test import TestCase from django.contrib.auth.models import User from .models import UserProfile,Post,Comment,Location,Category,Neighborhood,Company # Create your tests here. # Set up method #Testing instance # Set up method #Testing instance # Set up method #Testing instance ...
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 764, 27530, 1330, 11787, 37046, 11, 6307, 11, 21357, 11, 14749, 11, 27313, 11, 46445, 2865, 2894, 11,...
3.164474
152
import torch import torch.nn as nn import torch.nn.functional as F from .discriminative_listener import DiscriminativeListener from ..networks import choose_architecture, layer_init, BetaVAE, reg_nan, hasnan from ..utils import gumbel_softmax use_decision_head = True nbr_head_outputs = 2 not_always_argmax = True ; al...
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 198, 6738, 764, 15410, 3036, 259, 876, 62, 4868, 877, 1330, 8444, 3036, 259, 876, 33252, 198, 6738, 11485, 3262, 5225, 1...
2.793103
232
""" Set of tools to stop continuously running script from a different process via RPyC link. Steps: - the script class should have public method pause(), which will be called by client through RPyC link - once the script is instantiated, assign it as the module to PauseService instance: pause_service_instanc...
[ 37811, 5345, 286, 4899, 284, 2245, 17282, 2491, 4226, 422, 257, 1180, 1429, 198, 8869, 371, 20519, 34, 2792, 13, 198, 198, 8600, 82, 25, 198, 12, 262, 4226, 1398, 815, 423, 1171, 2446, 14985, 22784, 198, 220, 543, 481, 307, 1444, 41...
3.494845
291
from django.urls import path, re_path from . import views app_name = "sales" urlpatterns = [ re_path('^sales/$', views.SalesView.as_view(), name="sales"), re_path('^sales/search/product/$', views.SearchProductView.as_view(), name="search"), re_path('^sales/search/customer/$', views.SearchCustomerView.as_vi...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 11, 302, 62, 6978, 198, 6738, 764, 1330, 5009, 198, 198, 1324, 62, 3672, 796, 366, 82, 2040, 1, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 302, 62, 6978, 10786, 61, 82, 2040, ...
2.522843
394
# -*- coding: utf-8 -*- """Project schema.""" from datetime import datetime from typing import List, Optional from pydantic import BaseModel from projects.schemas.deployment import Deployment from projects.schemas.experiment import Experiment from projects.utils import to_camel_case
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 16775, 32815, 526, 15931, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 19720, 1330, 7343, 11, 32233, 198, 198, 6738, 279, 5173, 5109, 1330, 7308, 17633, 198,...
3.464286
84
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os from utils.data_reader import read_data ,get_data_for_bert from utils import constant from utils.utils import getMetrics from models.transformer import Encoder from models.lstm_model import HLstmModel ...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 28686, 198, 6738, 3384, 4487, 13, 7890, 62, 46862, 1330, 1100, 62, 7890, 837, 1136...
2.181506
2,617
import gym import pickle from mani_skill import env env = gym.make('OpenCabinetDoor-v0') # full environment list can be found in available_environments.txt env.set_env_mode(obs_mode='pointcloud', reward_type='sparse') # obs_mode can be 'state', 'pointcloud' or 'rgbd' # reward_type can be 'sparse' or 'dense' print(env...
[ 11748, 11550, 198, 11748, 2298, 293, 198, 6738, 582, 72, 62, 42401, 1330, 17365, 198, 198, 24330, 796, 11550, 13, 15883, 10786, 11505, 34, 6014, 316, 35, 2675, 12, 85, 15, 11537, 198, 2, 1336, 2858, 1351, 460, 307, 1043, 287, 1695, ...
2.521318
516
#===----------------------------------------------------------------------===# # # Peloton # # model_generator.py # # Identification: src/brain/modelgen/model_generator.py # # Copyright (c) 2015-2018, Carnegie Mellon University Database Group # #===-----------------------------------------------...
[ 2, 18604, 10097, 23031, 18604, 2, 198, 2, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 12903, 18970, 198, 2, 198, 2, 2746, 62, 8612, 1352, 13, ...
2.968586
191
from cffi import FFI # On macOS dynamic libraries have the .dylib extension. Windows has .dll and linux has .so # You can obtain libcuckoofilter_c.xxx.{dylib, so, dll} either by downloading it from the latest Release on GitHub # or by compiling the library using the Zig compiler: # # $ zig build-lib -dynamic --relea...
[ 6738, 269, 487, 72, 1330, 376, 11674, 628, 198, 2, 1550, 40017, 8925, 12782, 423, 262, 764, 31739, 7552, 13, 3964, 468, 764, 12736, 290, 32639, 468, 764, 568, 198, 2, 921, 460, 7330, 9195, 66, 1347, 37711, 346, 353, 62, 66, 13, 31...
2.514886
1,713
#!/usr/bin/env python # Copyright 2021 NVIDIA Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 15069, 33448, 15127, 10501, 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, ...
2.563786
729
""" Build a dummy index, update it, and run tests on it. """ import os import shutil import tempfile from subprocess import check_call, CalledProcessError import captions from lib.common import get_docs_and_lexicon TEST_DATA_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), ...
[ 37811, 198, 15580, 257, 31548, 6376, 11, 4296, 340, 11, 290, 1057, 5254, 319, 340, 13, 198, 37811, 198, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 20218, 7753, 198, 6738, 850, 14681, 1330, 2198, 62, 13345, 11, 34099, 18709, ...
2.392713
247
import pygame from pygame.locals import * import time import random size = 40 # place the block at a certain position on the screen if __name__ == "__main__": game = Game() game.run()
[ 11748, 12972, 6057, 198, 6738, 12972, 6057, 13, 17946, 874, 1330, 1635, 198, 11748, 640, 198, 11748, 4738, 198, 198, 7857, 796, 2319, 628, 220, 220, 220, 1303, 1295, 262, 2512, 379, 257, 1728, 2292, 319, 262, 3159, 628, 198, 361, 1159...
2.985075
67
from flask_script import Manager from flask_migrate import Migrate, MigrateCommand from info import create_app, db app = create_app("development") # class Config(object): # #DEBUG = True # SQLALCHEMY_DATABASE_URI = "mysql://root:mysql@127.0.0.1:3306/python22" # SQLALCHEMY_TRACK_MODIFICATIONS = False # ...
[ 6738, 42903, 62, 12048, 1330, 9142, 198, 6738, 42903, 62, 76, 42175, 1330, 337, 42175, 11, 337, 42175, 21575, 198, 6738, 7508, 1330, 2251, 62, 1324, 11, 20613, 628, 198, 1324, 796, 2251, 62, 1324, 7203, 31267, 4943, 628, 198, 2, 1398,...
1.676389
720
import logging from collections import OrderedDict from copy import deepcopy from datetime import datetime, timedelta from pathlib import Path from time import sleep import cv2 import numpy as np import pandas as pd from PyQt5.QtCore import Qt, QTimer, pyqtSlot from PyQt5.QtGui import QColor, QImage, QPixmap from PyQt...
[ 11748, 18931, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 6738, 4866, 1330, 2769, 30073, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 640, 1330, 3993, 198, 198, 11748, ...
3.1
130
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Aug 1 12:07:15 2021 @author: xavieraguas """ import sqlalchemy as db DBUSER = 'postgres' DBPASS = 'ivan' DBHOST = 'localhost' DBPORT = '5432' DBNAME = 'test' engine = db.create_engine('postgresql+psycopg2://{user}:{passwd}@{host}:{port}/{db}'.for...
[ 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, 2447, 220, 352, 1105, 25, 2998, 25, 1314, 33448, 198, 198, 31, 9800, 25, 2124, 1949...
2.579365
252
from flask import current_app, request from typing import Optional from zeus.constants import Result, Status from zeus.models import Build, FileCoverage, Repository from zeus.utils.trees import build_tree from zeus.vcs import vcs_client from .base_repository import BaseRepositoryResource from ..schemas import FileCov...
[ 6738, 42903, 1330, 1459, 62, 1324, 11, 2581, 198, 6738, 19720, 1330, 32233, 198, 198, 6738, 1976, 27650, 13, 9979, 1187, 1330, 25414, 11, 12678, 198, 6738, 1976, 27650, 13, 27530, 1330, 10934, 11, 9220, 7222, 1857, 11, 1432, 13264, 198,...
3.394958
119
str= ' this | is | a string ' s1, s2, s3 = str.split('|', 2) print('>%s<' % s1.strip()) print('>%s<' % s2) print('>%s<' % s3) s = str.split('|', 2) print(s)
[ 2536, 28, 705, 428, 930, 318, 930, 257, 4731, 220, 705, 198, 198, 82, 16, 11, 264, 17, 11, 264, 18, 796, 965, 13, 35312, 10786, 91, 3256, 362, 8, 198, 198, 4798, 10786, 29, 4, 82, 27, 6, 4064, 264, 16, 13, 36311, 28955, 198, ...
1.862069
87
# Bamboo website specific fields BAMBOO_LOGIN = "https://your_organization.bamboohr.com/login.php" CLOCK_OUT_BTN = "Clock Out" CLOCK_IN_BTN = "Clock In" STANDARD_LOGIN = "Log in with Email and Password" LOGIN_BTN = "Log In" LOGIN_ID = "#lemail" PWD_ID = "#password" # user specific constants MAX_SLEEP = 1200 # 20 ...
[ 2, 347, 27708, 3052, 2176, 7032, 198, 198, 33, 2390, 33, 6684, 62, 25294, 1268, 796, 366, 5450, 1378, 14108, 62, 9971, 1634, 13, 65, 22651, 1219, 81, 13, 785, 14, 38235, 13, 10121, 1, 198, 198, 5097, 11290, 62, 12425, 62, 19313, 4...
2.352632
190
# ballot/urls.py # Brought to you by We Vote. Be good. # -*- coding: UTF-8 -*- from django.conf.urls import url from . import views_admin urlpatterns = [ # views_admin url(r'^import_ballot_items/$', views_admin.ballot_items_import_from_master_server_view, name='ballot_items_import_from_master...
[ 2, 11100, 14, 6371, 82, 13, 9078, 198, 2, 347, 2909, 284, 345, 416, 775, 19175, 13, 1355, 922, 13, 198, 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 1...
2.360502
319
import os import time import datetime import random from bs4 import BeautifulSoup from openpyxl import load_workbook from openpyxl import Workbook from selenium import webdriver data_xls_poz_map = { 1: {'name': '用户名', 'code': 'user_name'}, 2: {'name': '信用等级', 'code': 'credit_level'}, 3: {'name': '贷款金额', 'c...
[ 11748, 28686, 198, 11748, 640, 198, 11748, 4818, 8079, 198, 11748, 4738, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 6738, 1280, 9078, 87, 75, 1330, 3440, 62, 1818, 2070, 198, 6738, 1280, 9078, 87, 75, 1330, 5521, 2070, 198, ...
1.375758
825
from flask import Flask from flask_cors import CORS from app.config import properties from app.api.issues import issues app = Flask(__name__) app.register_blueprint(issues, url_prefix=f'/api/issues') CORS(app, resources={r"/*": {"origins": properties.AUTHORIZED_ORIGIN}}, supports_credentials=True) if __name__ =...
[ 6738, 42903, 1330, 46947, 198, 6738, 42903, 62, 66, 669, 1330, 327, 20673, 198, 6738, 598, 13, 11250, 1330, 6608, 198, 6738, 598, 13, 15042, 13, 37165, 1330, 2428, 198, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 198, 1324, 13, 302...
2.952
125
from flask_restful import Resource, Api # Importamos el contenido de Service from service.service_sql.service import Service # Importamos el make_response from flask import make_response, jsonify
[ 6738, 42903, 62, 2118, 913, 1330, 20857, 11, 5949, 72, 198, 198, 2, 17267, 321, 418, 1288, 542, 268, 17305, 390, 4809, 198, 6738, 2139, 13, 15271, 62, 25410, 13, 15271, 1330, 4809, 198, 198, 2, 17267, 321, 418, 1288, 787, 62, 26209,...
3.685185
54
__all__ = [ 'dependency_graph', 'discoverable_module', 'module_initialization_container', 'module_manager' ]
[ 834, 439, 834, 796, 685, 198, 220, 220, 220, 705, 45841, 1387, 62, 34960, 3256, 198, 220, 220, 220, 705, 67, 29392, 540, 62, 21412, 3256, 198, 220, 220, 220, 705, 21412, 62, 36733, 1634, 62, 34924, 3256, 198, 220, 220, 220, 705, 2...
2.530612
49
from sys import argv if __name__ == '__main__': with open(argv[1], 'r') as f: lines = f.readlines() main(lines)
[ 6738, 25064, 1330, 1822, 85, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 351, 1280, 7, 853, 85, 58, 16, 4357, 705, 81, 11537, 355, 277, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3951, ...
2.186441
59
import subprocess subprocess.call(['pyinstaller', '/home/nbroyles/PycharmProjects/PyinstallerWineCompile/main.py', '--onefile', '-n', 'pycompile'])
[ 11748, 850, 14681, 198, 198, 7266, 14681, 13, 13345, 7, 17816, 9078, 17350, 263, 3256, 31051, 11195, 14, 46803, 3287, 829, 14, 20519, 354, 1670, 16775, 82, 14, 20519, 17350, 263, 54, 500, 7293, 576, 14, 12417, 13, 9078, 3256, 705, 438...
2.690909
55
# Created by Egor Kostan. # GitHub: https://github.com/ikostan # LinkedIn: https://www.linkedin.com/in/egor-kostan/ from tests.config import Config from utils.driver import Driver from element_object_models.element import Element from page_object_models.base_page_model import BasePageModel from page_locators.admin...
[ 2, 220, 15622, 416, 412, 7053, 509, 455, 272, 13, 198, 2, 220, 21722, 25, 3740, 1378, 12567, 13, 785, 14, 1134, 455, 272, 198, 2, 220, 27133, 25, 3740, 1378, 2503, 13, 25614, 259, 13, 785, 14, 259, 14, 1533, 273, 12, 74, 455, ...
3.130814
344
''' python -m baselines.run --alg=deepq --env=BreakoutNoFrameskip-v4 --num_timesteps=0 --load_path=models/Breakout_1e7/baseline --play ''' import os game_name = 'Tennis' model_timesteps = '1e6' methods = os.listdir('models/{}_{}'.format(game_name, model_timesteps)) f = open('test_cmd_{}_{}.txt'.format(game_name, model_...
[ 7061, 6, 198, 29412, 532, 76, 1615, 20655, 13, 5143, 198, 438, 14016, 28, 22089, 80, 198, 438, 24330, 28, 31737, 448, 2949, 35439, 74, 541, 12, 85, 19, 198, 438, 22510, 62, 16514, 395, 25386, 28, 15, 198, 438, 2220, 62, 6978, 28, ...
2.062857
350
"""**Defines models, including transition, observation, reward, policy; Also includes additional components such as the sensor model and grid map.**"""
[ 37811, 1174, 7469, 1127, 4981, 11, 1390, 6801, 11, 13432, 11, 6721, 11, 2450, 26, 4418, 198, 42813, 3224, 6805, 884, 355, 262, 12694, 2746, 290, 10706, 3975, 13, 1174, 37811, 198 ]
4.75
32
import numpy as np import matplotlib.pyplot as plt from enum import Enum import pycwt import os import json import pandas import tensorflow as tf # use Bay Walker at the beginning of the training? #def is_state_vars_set_to_zero(): # return False # updates the buffer so it contains the latest ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 33829, 1330, 2039, 388, 198, 11748, 12972, 66, 46569, 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 19798, 292, 198, 11748, 11192,...
3.142857
126
import collections
[ 11748, 17268 ]
9
2
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file")
[ 2220, 7203, 31, 65, 41319, 62, 31391, 1003, 31391, 14, 11249, 62, 4299, 82, 14, 260, 7501, 25, 4023, 13, 65, 48274, 1600, 366, 4023, 62, 17474, 1600, 366, 4023, 62, 7753, 4943, 198 ]
2.411765
34
from .__about__ import * from .compare import * from .constants import * from .filter import * from .metadata import * from .misc import * __all__ = [ *__about__.__all__, *compare.__all__, *constants.__all__, *filter.__all__, *metadata.__all__, *misc.__all__, ]
[ 6738, 764, 834, 10755, 834, 1330, 1635, 198, 6738, 764, 5589, 533, 1330, 1635, 198, 6738, 764, 9979, 1187, 1330, 1635, 198, 6738, 764, 24455, 1330, 1635, 198, 6738, 764, 38993, 1330, 1635, 198, 6738, 764, 44374, 1330, 1635, 198, 198, ...
2.514019
107
# Copyright 2015 Google 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 # # Unless required by applicable ...
[ 2, 15069, 1853, 3012, 3457, 13, 1439, 6923, 33876, 13, 201, 198, 2, 201, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 201, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 35...
3.592179
179
import requests try: response = requests.get("https://raw.githubusercontent.com/danhab05/bacfrancais-ozar/master/msg.txt") msg = response.text except Exception as e: print(e)
[ 11748, 7007, 198, 28311, 25, 198, 220, 220, 220, 2882, 796, 7007, 13, 1136, 7203, 5450, 1378, 1831, 13, 12567, 43667, 13, 785, 14, 25604, 5976, 2713, 14, 65, 330, 8310, 1192, 15152, 12, 8590, 283, 14, 9866, 14, 19662, 13, 14116, 494...
2.818182
66
import GameManager if __name__ == '__main__': GameManager.GameManager().game_loop()
[ 11748, 3776, 13511, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 3776, 13511, 13, 8777, 13511, 22446, 6057, 62, 26268, 3419, 628, 198 ]
2.935484
31
from plex_metadata.agents.main import Agents
[ 6738, 279, 2588, 62, 38993, 13, 49638, 13, 12417, 1330, 28295, 198 ]
3.75
12
pytest_plugins = "_pytest.pytester"
[ 9078, 9288, 62, 37390, 796, 45434, 9078, 9288, 13, 9078, 4879, 353, 1, 198 ]
2.571429
14
import subprocess as sp import sys try: res_path = sys.argv[1] except: print "Usage: {} karonte_result_file".format(sys.argv[0]) sys.exit(1) o, e = exec_cmd("grep -r 'Sink' {} | sort | cut -d\" \" -f1-5 |sort|uniq ".format(res_path)) counter = 1 alerts = [x for x in o.split('\n') if x] for alert in ale...
[ 11748, 850, 14681, 355, 599, 198, 11748, 25064, 628, 198, 28311, 25, 198, 220, 220, 220, 581, 62, 6978, 796, 25064, 13, 853, 85, 58, 16, 60, 198, 16341, 25, 198, 220, 220, 220, 3601, 366, 28350, 25, 23884, 220, 479, 8045, 660, 62,...
2.444444
270
from django.conf.urls import url from views import request_certificate from views import update_certificate urlpatterns = [ url(r'^request_certificate$', request_certificate, name='request_certificate'), url(r'^update_certificate$', update_certificate, name='update_certificate') ]
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 6738, 5009, 1330, 2581, 62, 22583, 22460, 198, 6738, 5009, 1330, 4296, 62, 22583, 22460, 628, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 19016, 7, 81, 6, 61, 25...
3.244444
90
""" LSTM regression on Actuator data. """ from __future__ import print_function import numpy as np np.random.seed(42) # Keras from keras.optimizers import Adagrad, Adam, SGD, RMSprop from keras.callbacks import EarlyStopping # Model assembling and executing from kgp.utils.assemble import load_NN_configs, assemble fr...
[ 37811, 198, 43, 2257, 44, 20683, 319, 2191, 84, 1352, 1366, 13, 198, 37811, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 299, 32152, 355, 45941, 198, 37659, 13, 25120, 13, 28826, 7, 3682, 8, 198, 198, 2, 1733...
3.006452
155
from brownie import ( Registry, accounts, ) RINKEBY_RESOLVER_ADDRESS = "0x5713a9cCdB31fBa207Fc4Fac7ee398eab3ecB3A6"
[ 6738, 7586, 494, 1330, 357, 198, 220, 220, 220, 33432, 11, 198, 220, 220, 220, 5504, 11, 198, 8, 198, 198, 49, 1268, 7336, 17513, 62, 19535, 3535, 5959, 62, 2885, 7707, 7597, 796, 366, 15, 87, 3553, 1485, 64, 24, 66, 34, 36077, ...
1.923077
65
import inspect import unittest import numpy as np from ringity.ring_scores import ( gap_ring_score, geometric_ring_score, linear_ring_score, amplitude_ring_score, entropy_ring_sco...
[ 11748, 10104, 198, 11748, 555, 715, 395, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 5858, 414, 13, 1806, 62, 1416, 2850, 1330, 357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
1.803279
366
#!/usr/bin/env python import cleanup_management import argparse import datetime import os import re import sys import time try: from management_tools import loggers from management_tools import fs_analysis as fsa # Check for MT version 1.8.1 if not "bytes" in dir(fsa.Filesystem): raise Impor...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 27425, 62, 27604, 198, 198, 11748, 1822, 29572, 198, 11748, 4818, 8079, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 25064, 198, 11748, 640, 628, 198, 28311, 25, 198, 220,...
2.646037
6,447
# Libraries import copy import numpy as np import pandas as pd # DataBlend Library from datablend.core.widgets.base import BaseWidget from datablend.core.consistency import report_unique_value from datablend.utils.pandas import str2func # -------------------------------------------- # Methods # ----------------------...
[ 2, 46267, 198, 11748, 4866, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 2, 6060, 3629, 437, 10074, 198, 6738, 4818, 23117, 437, 13, 7295, 13, 28029, 11407, 13, 8692, 1330, 7308, 38300, 198, 6738...
2.254414
6,344
from django import template from django.template.defaultfilters import stringfilter from django.utils.safestring import mark_safe from django.core.urlresolvers import reverse from main.models import Post from utils.templatetags.post_color import post_color import markdown register = template.Library() disable_image...
[ 6738, 42625, 14208, 1330, 11055, 198, 6738, 42625, 14208, 13, 28243, 13, 12286, 10379, 1010, 1330, 4731, 24455, 198, 6738, 42625, 14208, 13, 26791, 13, 49585, 395, 1806, 1330, 1317, 62, 21230, 198, 6738, 42625, 14208, 13, 7295, 13, 6371, ...
3.443709
151
# Copyright (C) 2016 The Android Open Source Project # # 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 ...
[ 2, 15069, 357, 34, 8, 1584, 383, 5565, 4946, 8090, 4935, 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...
3.757447
235
# coding: utf-8 # @Author: oliver # @Date: 2019-07-14 18:50:35
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 2488, 13838, 25, 25776, 1428, 198, 2, 2488, 10430, 25, 220, 220, 13130, 12, 2998, 12, 1415, 1248, 25, 1120, 25, 2327, 198 ]
2.03125
32
import pytest import cmakeutils # findexe(cmd) # run(*args, path=findexe("cmake"), **runargs) # validate(cmakePath=findexe("cmake")) # configured(buildDir) # clear(buildDir) # configure( # root_dir, # build_dir, # *args, # build_type="Release", # cmakePath=findexe("cmake"), # need_msvc=False, #...
[ 11748, 12972, 9288, 198, 11748, 12067, 539, 26791, 198, 198, 2, 1064, 13499, 7, 28758, 8, 198, 2, 1057, 46491, 22046, 11, 3108, 28, 69, 9630, 68, 7203, 11215, 539, 12340, 12429, 5143, 22046, 8, 198, 2, 26571, 7, 11215, 539, 15235, 2...
2.186321
424
import numpy as np import matplotlib.pyplot as plt import pandas as pd import statsmodels.formula.api as smf from scipy import stats pcr=np.array(data('pcr.txt'))#pcr 날짜 전체확진자 국내발생 해외유입 사망자 vaccine=np.array(data('vaccine.txt'))#vaccine 날짜 전체1차 전체2차 전체3차 AZ1 AZ2 F1 F2 Y1 M1 M2 F3 M3 Y3 lmp='local maximum point' #전체 확진자 ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 9756, 27530, 13, 687, 4712, 13, 15042, 355, 895, 69, 198, 6738, 629, 541, 88, 1330, 9756, ...
1.580495
5,373
#!/usr/bin/env python3 """Tests for ``amici.pandas``""" import sys import amici import unittest import os import copy import numpy as np import itertools class TestAmiciPandasImportExport(unittest.TestCase): """ TestCase class for testing csv import using pandas """ if __name__ == '__main__': suit...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 37811, 51, 3558, 329, 7559, 18127, 72, 13, 79, 392, 292, 15506, 37811, 198, 198, 11748, 25064, 198, 11748, 716, 44070, 198, 11748, 555, 715, 395, 198, 11748, 28686, 198, 11748...
2.741722
151
import html from typing import Optional, List import telegram.ext as tg from telegram import Message, Chat, Update, Bot, ParseMode, User, MessageEntity from telegram import TelegramError from telegram.error import BadRequest from telegram.ext import CommandHandler, MessageHandler, Filters from telegram.ext.dispatcher ...
[ 11748, 27711, 198, 6738, 19720, 1330, 32233, 11, 7343, 198, 198, 11748, 573, 30536, 13, 2302, 355, 256, 70, 198, 6738, 573, 30536, 1330, 16000, 11, 24101, 11, 10133, 11, 18579, 11, 2547, 325, 19076, 11, 11787, 11, 16000, 32398, 198, 6...
3.006659
901
# -*- coding: utf-8 -*- # Copyright 2020 Green Valley Belgium NV # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 12131, 3469, 6916, 15664, 23973, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, ...
3.518519
216
import datetime import logging import random import secrets from fastapi import FastAPI, Depends, APIRouter, HTTPException from fastapi.security import HTTPBasicCredentials, HTTPBasic from starlette import status from uvicorn import Server from uvicorn.config import Config from pyctuator.pyctuator import Pyctuator m...
[ 11748, 4818, 8079, 198, 11748, 18931, 198, 11748, 4738, 198, 11748, 13141, 198, 198, 6738, 3049, 15042, 1330, 12549, 17614, 11, 2129, 2412, 11, 3486, 4663, 39605, 11, 14626, 16922, 198, 6738, 3049, 15042, 13, 12961, 1330, 14626, 26416, 34...
2.886239
545
import os import random import numpy as np import zipfile import collections from mxnet import nd, gluon from mxnet.gluon import utils as gutils, data as gdata def data_iter_consecutive(corpus_indices, batch_size, num_steps, ctx=None): """Sample mini-batches in a consecutive order from sequential data.""" # O...
[ 11748, 28686, 198, 11748, 4738, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19974, 7753, 198, 11748, 17268, 198, 6738, 285, 87, 3262, 1330, 299, 67, 11, 1278, 84, 261, 198, 6738, 285, 87, 3262, 13, 70, 2290, 261, 1330, 3384, 4487,...
2.628601
972
from ..imports import * # loading txt/strings # def to_lineparts(linetxt,seps=set(',:;–—()[].!?'),min_len=1,max_len=25): # o=[] # for sent in to_sents_str(linetxt): # toks=tokenize_agnostic(sent) # ophrase=[] # for tok in toks: # ophrase+=[tok] # #...
[ 6738, 11485, 320, 3742, 1330, 1635, 628, 628, 628, 628, 198, 198, 2, 11046, 256, 742, 14, 37336, 628, 220, 220, 220, 220, 198, 198, 2, 825, 284, 62, 1370, 42632, 7, 2815, 316, 742, 11, 325, 862, 28, 2617, 7, 3256, 25, 26, 1906, ...
2.22449
686
""" This module implements a multi-layer perceptron (MLP) in NumPy. You should fill in code into indicated sections. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from modules import * from functools import reduce class MLP(object): """ This clas...
[ 37811, 198, 1212, 8265, 23986, 257, 5021, 12, 29289, 34953, 1313, 357, 5805, 47, 8, 287, 31835, 20519, 13, 198, 1639, 815, 6070, 287, 2438, 656, 8203, 9004, 13, 198, 37811, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 673...
2.790751
1,319
from django.contrib import auth from backend.accounts import User
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 6284, 198, 6738, 30203, 13, 23317, 82, 1330, 11787, 628, 628 ]
3.833333
18
#!/usr/bin/env python import socket from .decorator import timeout @timeout @timeout # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 17802, 198, 198, 6738, 764, 12501, 273, 1352, 1330, 26827, 628, 198, 31, 48678, 628, 198, 31, 48678, 628, 198, 2, 43907, 25, 7400, 11338, 28, 19, 4292, 8658, 6482, 10394, ...
2.94
50
from pdfminer.converter import TextConverter from pdfminer.layout import LAParams from pdfminer.pdfdocument import PDFDocument from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter from pdfminer.pdfpage import PDFPage from pdfminer.pdfparser import PDFParser from io import StringIO import sys ...
[ 6738, 37124, 1084, 263, 13, 1102, 332, 353, 1330, 8255, 3103, 332, 353, 201, 198, 6738, 37124, 1084, 263, 13, 39786, 1330, 406, 2969, 283, 4105, 201, 198, 6738, 37124, 1084, 263, 13, 12315, 22897, 1330, 12960, 24941, 201, 198, 6738, 3...
2.374074
540
# test_clean_up_standard_json.py """ test clean_up_standard_json """ import _set_path # noqa import unittest # import json import os from pathlib import Path from clean_up_standard_json import _fix_level, _fix_ids from pipelineutilities.pipeline_config import setup_pipeline_config # noqa: E402 local_folder = os.pat...
[ 2, 1332, 62, 27773, 62, 929, 62, 20307, 62, 17752, 13, 9078, 198, 37811, 1332, 3424, 62, 929, 62, 20307, 62, 17752, 37227, 198, 11748, 4808, 2617, 62, 6978, 220, 1303, 645, 20402, 198, 11748, 555, 715, 395, 198, 2, 1330, 33918, 198,...
2.870813
209
from rest_framework.serializers import ( ModelSerializer, SerializerMethodField, ) from .models import Post
[ 6738, 1334, 62, 30604, 13, 46911, 11341, 1330, 357, 198, 220, 220, 220, 9104, 32634, 7509, 11, 198, 220, 220, 220, 23283, 7509, 17410, 15878, 11, 198, 8, 198, 198, 6738, 764, 27530, 1330, 2947, 628 ]
3.277778
36
import pytest from manim.renderer.opengl_renderer import OpenGLRenderer from .simple_scenes import * @pytest.mark.parametrize("enable_preview", [False]) def testGetFrameWithPreviewDisabled(use_opengl_renderer): """Get frame is able to fetch frame with the correct dimensions when preview is disabled""" scene...
[ 11748, 12972, 9288, 198, 198, 6738, 582, 320, 13, 10920, 11882, 13, 404, 1516, 75, 62, 10920, 11882, 1330, 30672, 49, 437, 11882, 198, 198, 6738, 764, 36439, 62, 28123, 1330, 1635, 628, 198, 31, 9078, 9288, 13, 4102, 13, 17143, 316, ...
2.937355
431
S = str(input()) flag = True for i in range(len(S)): if i%2==0 and S[i]=="L": flag = False elif i%2!=0 and S[i]=="R": flag = False if flag: print("Yes") else: print("No")
[ 50, 796, 965, 7, 15414, 28955, 198, 198, 32109, 796, 6407, 198, 1640, 1312, 287, 2837, 7, 11925, 7, 50, 8, 2599, 198, 220, 611, 1312, 4, 17, 855, 15, 290, 311, 58, 72, 60, 855, 1, 43, 1298, 198, 220, 220, 220, 6056, 796, 10352...
2.054945
91
palavra=input("Digite uma palavra: ") x=0 y=len(palavra)-1 while x != len(palavra): if palavra[x]==palavra[y]: resp='É palíndromo' else: resp='Não é palíndromo' y=y-1 x=x+1 print(resp)
[ 198, 18596, 615, 430, 28, 15414, 7203, 19511, 578, 334, 2611, 6340, 615, 430, 25, 366, 8, 198, 198, 87, 28, 15, 198, 88, 28, 11925, 7, 18596, 615, 430, 13219, 16, 198, 4514, 2124, 14512, 18896, 7, 18596, 615, 430, 2599, 198, 220, ...
1.740157
127
import inspect import os import sys import time import traceback from getgauge.messages.messages_pb2 import Message from getgauge.messages.spec_pb2 import ProtoExecutionResult from getgauge.registry import registry, MessagesStore, ScreenshotsStore
[ 11748, 10104, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 640, 198, 11748, 12854, 1891, 198, 198, 6738, 651, 70, 559, 469, 13, 37348, 1095, 13, 37348, 1095, 62, 40842, 17, 1330, 16000, 198, 6738, 651, 70, 559, 469, 13, 37348, 10...
3.459459
74
from mock import call from nose.tools import istest from provy.more.debian import AptitudeRole, RedisRole from tests.unit.tools.helpers import ProvyTestCase
[ 6738, 15290, 1330, 869, 198, 6738, 9686, 13, 31391, 1330, 318, 9288, 198, 198, 6738, 899, 88, 13, 3549, 13, 24689, 1330, 317, 457, 3984, 47445, 11, 2297, 271, 47445, 198, 6738, 5254, 13, 20850, 13, 31391, 13, 16794, 364, 1330, 7518, ...
3.456522
46
from argparse import ArgumentParser from os import listdir from os.path import isfile, join from shutil import copyfile from progress.bar import Bar from io_operations.load_files import load_stats_overall, load_texts, load_stats from outputs.create_html_output import create_output from helpers.dir_exist import create_i...
[ 6738, 1822, 29572, 1330, 45751, 46677, 198, 6738, 28686, 1330, 1351, 15908, 198, 6738, 28686, 13, 6978, 1330, 318, 7753, 11, 4654, 198, 6738, 4423, 346, 1330, 4866, 7753, 198, 6738, 4371, 13, 5657, 1330, 2409, 198, 6738, 33245, 62, 3575...
2.543158
950
from data import initail import numpy as np import matplotlib.pyplot as plt from matplotlib.font_manager import FontProperties data = np.load('./data/Orbits.npy') Names = initail.Names N = Names.shape[0] plotxy() plotxz()
[ 6738, 1366, 1330, 2315, 603, 198, 11748, 299, 32152, 355, 45941, 220, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 2603, 29487, 8019, 13, 10331, 62, 37153, 1330, 24060, 2964, 18200, 198, 198, 7890, 796, 45941...
2.72619
84
#!/usr/bin/python # -*- coding: UTF-8 -*- """ 工具类 利用决策树进行分类处理 贝叶斯公式 p(xy)=p(x|y)p(y)=p(y|x)p(x) p(x|y)=p(y|x)p(x)/p(y) """ import numpy as np def train_naive_bayes(train_mat, train_category): """ 朴素贝叶斯分类 :param train_mat: 训练文本 :param train_category: 对应的文本类别 :return: """ train_doc_num =...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 32432, 98, 17739, 115, 163, 109, 119, 198, 26344, 102, 18796, 101, 37863, 111, 163, 255, 244, 43718, 239, 32573,...
1.322127
1,279
# example of using continue in a loop k = 1 while k <= 10: if k == 7: k += 1 continue print(k) k = k+1
[ 2, 1672, 286, 1262, 2555, 287, 257, 9052, 198, 74, 796, 352, 198, 4514, 479, 19841, 838, 25, 198, 220, 220, 220, 611, 479, 6624, 767, 25, 198, 220, 220, 220, 220, 220, 220, 220, 479, 15853, 352, 198, 220, 220, 220, 220, 220, 220...
2.015385
65
import stripe from stripe import api_requestor, six, util from stripe.stripe_object import StripeObject from stripe.six.moves.urllib.parse import quote_plus stripe.ListObject.list = list_patch stripe.ListObject.create = create_patch stripe.ListObject.retrieve = retrieve_patch stripe.ListObject._request = _request_p...
[ 11748, 39858, 198, 6738, 39858, 1330, 40391, 62, 25927, 273, 11, 2237, 11, 7736, 198, 6738, 39858, 13, 33565, 431, 62, 15252, 1330, 26137, 431, 10267, 198, 198, 6738, 39858, 13, 19412, 13, 76, 5241, 13, 333, 297, 571, 13, 29572, 1330,...
3.184211
152
import pickle if __name__ == "__main__": main()
[ 11748, 2298, 293, 628, 628, 628, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419, 198 ]
2.333333
27
from datetime import datetime import numpy as np import pandas as pd from course_lib.Base.Evaluation.Evaluator import EvaluatorHoldout from src.data_management.New_DataSplitter_leave_k_out import New_DataSplitter_leave_k_out from src.data_management.RecSys2019Reader import RecSys2019Reader from src.data_management.da...
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 1781, 62, 8019, 13, 14881, 13, 36, 2100, 2288, 13, 36, 2100, 84, 1352, 1330, 26439, 84, 1352, 26807, ...
2.263858
1,353
resolver_dict={ 'sawlive.tv': 'sawlive', 'streamking.co': 'streamking', 'streamking.cc': 'streamking', 'castalba.tv' : 'castalba', 'p2pcast.tv' : 'p2pcast', 'p2pcast.tech' : 'p2pcast', 'finecast.tv' : 'finecast', 'filmon.com' : 'filmo...
[ 198, 198, 411, 14375, 62, 11600, 34758, 705, 43439, 12583, 13, 14981, 10354, 705, 43439, 12583, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 5532, 3364, 13, 1073, 10354, 705, 5532, 3364, 3256, 198, 220, 220, ...
1.624481
2,647
""" oktopus algorithm related utils """ import random, statistics from multiprocessing import Pool from collections import defaultdict, deque from sys import maxint import networkx as nx from cytoolz import merge, partial from nx_disjoint_paths import edge_disjoint_paths from ...multicast.session import Session ...
[ 37811, 198, 482, 4852, 385, 11862, 3519, 3384, 4487, 198, 37811, 198, 11748, 4738, 11, 7869, 198, 6738, 18540, 305, 919, 278, 1330, 19850, 198, 6738, 17268, 1330, 4277, 11600, 11, 390, 4188, 198, 6738, 25064, 1330, 3509, 600, 198, 198, ...
3.869231
130
# Check the various features of the ShTest format. # # RUN: rm -f %t.xml # RUN: not %{lit} -j 1 -v %{inputs}/shtest-format --xunit-xml-output %t.xml > %t.out # RUN: FileCheck < %t.out %s # RUN: FileCheck --check-prefix=XUNIT < %t.xml %s # END. # CHECK: -- Testing: # CHECK: PASS: shtest-format :: argv0.txt # CHECK: F...
[ 2, 6822, 262, 2972, 3033, 286, 262, 911, 14402, 5794, 13, 198, 2, 198, 2, 32494, 25, 42721, 532, 69, 4064, 83, 13, 19875, 198, 2, 32494, 25, 407, 4064, 90, 18250, 92, 532, 73, 352, 532, 85, 4064, 90, 15414, 82, 92, 14, 1477, 9...
2.424105
2,655
# -*- coding: utf-8 -*- """ Program for generating a GeoJSON-file from provinces.bmp. This is the main file responsible for running the show. Author: Erkki Mattila, 2014-2015 """ from PIL import Image import time, csv from marcher import Marcher def read_definition(definition): """Function for reading valid ro...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 15167, 329, 15453, 257, 32960, 40386, 12, 7753, 422, 17812, 13, 65, 3149, 13, 198, 198, 1212, 318, 262, 1388, 2393, 4497, 329, 2491, 262, 905, 13, 198...
2.116121
3,083
import json import logging from typing import Any, Dict, List, Optional import requests from . import utils class HEROFetch: """ Handler to search and retrieve literature from US EPA's HERO database. Given a list of HERO IDs, fetch the content for each one and return a list of dictionaries of ci...
[ 11748, 33918, 198, 11748, 18931, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 11, 7343, 11, 32233, 198, 198, 11748, 7007, 198, 198, 6738, 764, 1330, 3384, 4487, 628, 628, 198, 198, 4871, 24906, 19238, 7569, 25, 198, 220, 220, 220, 3722...
3.587786
131
s = input() size = 0 while size != len(s): size = len(s) for i in range(26): letter = chr(ord("a") + i) s = s.replace(letter * 2, letter) print(s)
[ 82, 796, 5128, 3419, 198, 7857, 796, 657, 198, 4514, 2546, 14512, 18896, 7, 82, 2599, 198, 220, 220, 220, 2546, 796, 18896, 7, 82, 8, 198, 220, 220, 220, 329, 1312, 287, 2837, 7, 2075, 2599, 198, 220, 220, 220, 220, 220, 220, 22...
2.060241
83