content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# -*- coding: utf-8 -*- """Align the UniProt with the Bioregistry.""" from typing import Sequence from bioregistry.align.utils import Aligner from bioregistry.external import get_uniprot __all__ = [ "UniProtAligner", ] class UniProtAligner(Aligner): """Aligner for UniProt.""" key = "uniprot" gett...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 2348, 570, 262, 43376, 19703, 351, 262, 8436, 382, 70, 4592, 526, 15931, 198, 198, 6738, 19720, 1330, 45835, 198, 198, 6738, 3182, 382, 70, 4592, 13, 31494, ...
2.449848
329
from django.conf.urls import url from . import views urlpatterns = [ url(r'^search$',views.bikeSearch,name='bikeSearch'), url(r'^submit$',views.bikeSubmit,name='bikeSubmit'), url(r'^sold$',views.bikeSoldSearch,name='bikeSoldSearch'), url(r'^modify/(?P<bikeNumber>[0-9]+)$',views.bikeModify,name="bikeMo...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 220, 220, 19016, 198, 6738, 764, 1330, 5009, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 19016, 7, 81, 6, 61, 12947, 3, 3256, 33571, 13, 32256, 18243, 11, 3672, 11639, 32256...
2.457143
175
#!/usr/bin/env python """ Clean crawler cache at ~/.eiii folder periodically """ import os import shutil import sys import time import datetime CACHE_ROOT=os.path.expanduser('~/.eiii/crawler/') def files_to_clean(limit=7): """ Return files which are older than <limit> days as a generator """ for dirf in ('...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 5985, 27784, 1754, 12940, 379, 39763, 68, 15479, 9483, 26034, 37227, 198, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 25064, 198, 11748, 640, 198, 11748, 4818, 8079, ...
2.060755
609
from rest_framework import serializers from auction_api.models import Auction, Bid from auction_api.serializers.bid import BidSerializer
[ 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 198, 6738, 14389, 62, 15042, 13, 27530, 1330, 36071, 11, 43484, 198, 6738, 14389, 62, 15042, 13, 46911, 11341, 13, 14065, 1330, 43484, 32634, 7509, 628 ]
4.088235
34
#! Master Folder Class MasterFolder(name,path): MasterFolder.name=name MasterFolder.path=path #def checkFolder #update MasterFolderList #def createFolder #def createDB #def getinfo
[ 2, 0, 5599, 48107, 198, 9487, 5599, 41092, 7, 3672, 11, 6978, 2599, 198, 220, 220, 220, 5599, 41092, 13, 3672, 28, 3672, 198, 220, 220, 220, 5599, 41092, 13, 6978, 28, 6978, 628, 198, 220, 220, 220, 1303, 4299, 2198, 41092, 198, 2...
2.666667
81
import os import flask from flask import Flask import mysql.connector user = os.environ['MYSQL_USER'] password = '' insert_vote_query = """ INSERT INTO vote (user_id, weekend) VALUES ({}, {}); """ update_rewards_query = """ UPDATE USER SET RECOMMENDATION_QUOTA = RECOMMENDATION_QUOTA + 1 WHERE ID ...
[ 11748, 28686, 198, 11748, 42903, 198, 6738, 42903, 1330, 46947, 198, 11748, 48761, 13, 8443, 273, 198, 198, 7220, 796, 28686, 13, 268, 2268, 17816, 44, 16309, 9711, 62, 29904, 20520, 198, 28712, 796, 10148, 198, 198, 28463, 62, 27257, 6...
2.379404
369
from functools import wraps from django.utils.decorators import available_attrs from django.shortcuts import redirect from django.urls import reverse_lazy from django_auth_lti.verification import is_allowed
[ 6738, 1257, 310, 10141, 1330, 27521, 198, 6738, 42625, 14208, 13, 26791, 13, 12501, 273, 2024, 1330, 1695, 62, 1078, 3808, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 18941, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 62, 75...
3.525424
59
''' 18-Get current Bitcoin value ''' import requests CBV = requests.get('https://api.coinmarketcap.com/v1/ticker/bitcoin/') for coin in CBV.json(): print("Current USD$ price for 1 Bitcoin") print(coin["price_usd"])
[ 7061, 6, 1248, 12, 3855, 1459, 6185, 1988, 705, 7061, 198, 198, 11748, 7007, 198, 198, 23199, 53, 796, 7007, 13, 1136, 10786, 5450, 1378, 15042, 13, 3630, 10728, 11128, 13, 785, 14, 85, 16, 14, 83, 15799, 14, 35395, 14, 11537, 198, ...
2.8125
80
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -----------------------------------------------------------------...
[ 2, 16529, 1783, 10541, 201, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 201, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 5964, 1321, 13, 201, 198, 2, 16529, ...
3.529412
374
import shutil import os BASE_PATH = 'ops_example' # this will be our base path # let's perform an initial cleanup just in case if os.path.exists(BASE_PATH) and os.path.isdir(BASE_PATH): shutil.rmtree(BASE_PATH) os.mkdir(BASE_PATH) path_b = os.path.join(BASE_PATH, 'A', 'B') path_c = os.path.join(BASE_PATH, 'A...
[ 11748, 4423, 346, 198, 11748, 28686, 628, 198, 33, 11159, 62, 34219, 796, 705, 2840, 62, 20688, 6, 220, 1303, 428, 481, 307, 674, 2779, 3108, 198, 198, 2, 1309, 338, 1620, 281, 4238, 27425, 655, 287, 1339, 198, 361, 28686, 13, 6978,...
2.282486
354
import os import tempfile from infra_buddy.context.deploy_ctx import DeployContext from infra_buddy.aws import s3 from infra_buddy.aws.s3 import S3Buddy, CloudFormationDeployS3Buddy from infra_buddy.deploy.s3_deploy import S3Deploy from testcase_parent import ParentTestCase
[ 11748, 28686, 198, 11748, 20218, 7753, 198, 198, 6738, 1167, 430, 62, 65, 21584, 13, 22866, 13, 2934, 1420, 62, 49464, 1330, 34706, 21947, 198, 198, 6738, 1167, 430, 62, 65, 21584, 13, 8356, 1330, 264, 18, 198, 6738, 1167, 430, 62, ...
2.936842
95
from typing import Collection, Counter # 1st solution # O(km) time | O(1) space # m, n are the length of s1 and s2, and k = n - m # 2nd solution, moving window # O(km) time | O(1) space
[ 6738, 19720, 1330, 12251, 11, 15034, 628, 220, 220, 220, 1303, 352, 301, 4610, 198, 220, 220, 220, 1303, 440, 7, 13276, 8, 640, 930, 440, 7, 16, 8, 2272, 198, 220, 220, 220, 1303, 285, 11, 299, 389, 262, 4129, 286, 264, 16, 290,...
2.315789
95
# coding=utf-8 from email.utils import formataddr from smtplib import SMTPRecipientsRefused from smtplib import SMTPServerDisconnected from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText import tempfile from bika.lims import bikaMessageFactory as _ from bika.lims.utils import t from bik...
[ 2, 19617, 28, 40477, 12, 23, 198, 6738, 3053, 13, 26791, 1330, 5794, 29851, 198, 6738, 895, 83, 489, 571, 1330, 9447, 51, 4805, 721, 541, 2334, 8134, 1484, 198, 6738, 895, 83, 489, 571, 1330, 9447, 28820, 18497, 7279, 15236, 198, 67...
3.268734
387
#!/usr/bin/env mytrader # -*- coding: utf-8 -*- # Created by ZIJIA on 2021/10/15 # import re import scrapy from bs4 import BeautifulSoup
[ 2, 48443, 14629, 14, 8800, 14, 24330, 616, 2213, 5067, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15622, 416, 1168, 23852, 3539, 319, 33448, 14, 940, 14, 1314, 198, 2, 198, 11748, 302, 198, 198, 11748, ...
2.387097
62
import time import numpy as np f = open('test', 'w') for i in range(30): time.sleep(0.5) f.write('%d,%f\n' % (i, np.random.rand())) f.close()
[ 11748, 640, 198, 11748, 299, 32152, 355, 45941, 628, 198, 69, 796, 1280, 10786, 9288, 3256, 705, 86, 11537, 198, 1640, 1312, 287, 2837, 7, 1270, 2599, 198, 220, 220, 220, 640, 13, 42832, 7, 15, 13, 20, 8, 198, 220, 220, 220, 277, ...
2.111111
72
# Auto generated configuration file # using: # Revision: 1.19 # Source: /local/reps/CMSSW/CMSSW/Configuration/Applications/python/ConfigBuilder.py,v # with command line options: Configuration/GenProduction/python/pythonLHEGEN.py --fileout file:eventLHEGEN-output.root --mc --eventcontent RAWSIM,LHE --customise SLHCUp...
[ 2, 11160, 7560, 8398, 2393, 198, 2, 1262, 25, 220, 198, 2, 46604, 25, 352, 13, 1129, 220, 198, 2, 8090, 25, 1220, 12001, 14, 260, 862, 14, 24187, 5432, 54, 14, 24187, 5432, 54, 14, 38149, 14, 41995, 14, 29412, 14, 16934, 32875, ...
2.608089
2,868
import collections from scc_algorithm import StronglyConnectedComponentFinder if __name__ == "__main__": g = Graph.construct_from_matrix([[0.9, 0.1],[0.3, 0.7]], vertices=["A", "B"]) print(g) g2 = Graph(list(range(4)), {0: [1], 1: [2], 2: [3], 3: [0, 1]}) scc_finder = StronglyConnectedComponentFind...
[ 11748, 17268, 198, 6738, 264, 535, 62, 282, 42289, 1330, 13535, 306, 13313, 276, 21950, 37, 5540, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 628, 220, 220, 220, 308, 796, 29681, 13, 41571, 62, 6738, 62, ...
2.318182
154
import torch.nn as nn from torch.utils.data import DataLoader from torch.optim import SGD from torchvision.datasets import CIFAR10 from torchvision.transforms import Compose, ToTensor, Normalize, RandomCrop, RandomHorizontalFlip from horch.datasets import train_test_split from horch.optim.lr_scheduler import CosineA...
[ 11748, 28034, 13, 20471, 355, 299, 77, 198, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 6060, 17401, 198, 6738, 28034, 13, 40085, 1330, 26147, 35, 198, 198, 6738, 28034, 10178, 13, 19608, 292, 1039, 1330, 327, 5064, 1503, 940, 198, 6...
2.524943
882
import time, calendar, sched, winsound duration = 750 # Bell duration in ms freq = 1280 # Bell frequency in hertz bellchar = "\u2407" watches = 'Middle,Morning,Forenoon,Afternoon,First/Last dog,First'.split(',') off = gap scheds = sched.scheduler(time.time, time.sleep) if __name__ == '__main__': s...
[ 11748, 640, 11, 11845, 11, 6038, 11, 7864, 633, 198, 198, 32257, 796, 19683, 220, 220, 220, 220, 220, 1303, 7459, 9478, 287, 13845, 198, 19503, 80, 796, 37674, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 7459, 8373, 287, 607, 2287...
2.677419
124
from django.urls import path,include from . import views from rate import views as user_views from django.conf.urls.static import static from django.conf import settings from django.conf.urls import url urlpatterns=[ path('',views.home,name = 'home'), path('accounts/register/', views.register, name='register')...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 11, 17256, 198, 6738, 764, 1330, 5009, 198, 6738, 2494, 1330, 5009, 355, 2836, 62, 33571, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 13, 12708, 1330, 9037, 198, 6738, 42625, 14208, ...
2.925795
283
from abc import ABC, abstractmethod
[ 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 628 ]
4.111111
9
"""Rolling Statistics View""" __docformat__ = "numpy" import os import matplotlib.pyplot as plt import pandas as pd from pandas.plotting import register_matplotlib_converters from gamestonk_terminal import feature_flags as gtff from gamestonk_terminal.common.quantitative_analysis import rolling_model from gamestonk_...
[ 37811, 26869, 278, 14370, 3582, 37811, 198, 834, 15390, 18982, 834, 796, 366, 77, 32152, 1, 198, 198, 11748, 28686, 198, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 19...
2.158201
3,957
# Copyright (c) 2010-2011 OpenStack, 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 ...
[ 2, 15069, 357, 66, 8, 3050, 12, 9804, 4946, 25896, 11, 11419, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, ...
3.377691
511
import numpy as np np.random.seed(0) import sys sys.path.append('./../..') from forecaster import forecaster from VanillaLSTM_keras import VanillaLSTM_keras from util import myfigure from ABBA import ABBA import matplotlib as mpl import time mpl.rcParams.update(mpl.rcParamsDefault) ts=[349,349,347,351,347,347,347,347,...
[ 11748, 299, 32152, 355, 45941, 198, 37659, 13, 25120, 13, 28826, 7, 15, 8, 198, 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 7, 4458, 14, 40720, 492, 11537, 198, 6738, 1674, 17970, 1330, 1674, 17970, 198, 6738, 33897, 43, 2257, 44, ...
2.000674
2,966
import jinja2 loader = jinja2.FileSystemLoader(['.']) environment = jinja2.Environment(loader=loader) template = environment.get_template('biography.html') who = 'Beatrice Tinsley' what = ['Born 1941', 'Died 1981', 'Studied stellar aging'] result = template.render(name=who, facts=what) print result
[ 11748, 474, 259, 6592, 17, 198, 198, 29356, 796, 474, 259, 6592, 17, 13, 8979, 11964, 17401, 7, 17816, 2637, 12962, 198, 38986, 796, 474, 259, 6592, 17, 13, 31441, 7, 29356, 28, 29356, 8, 198, 28243, 796, 2858, 13, 1136, 62, 28243, ...
3.091837
98
import escher,escher.urls,json,os from IPython.display import HTML def show_map(sol,map_loc,color=0): ''' Returns an escher Builder object for solution 'sol', map 'map_loc' and the supplied color scheme. sol: the solution object containing the simulation results. map_loc: filename of the...
[ 11748, 1658, 2044, 11, 274, 2044, 13, 6371, 82, 11, 17752, 11, 418, 198, 6738, 6101, 7535, 13, 13812, 1330, 11532, 628, 198, 4299, 905, 62, 8899, 7, 34453, 11, 8899, 62, 17946, 11, 8043, 28, 15, 2599, 198, 220, 220, 220, 705, 7061...
2.22401
808
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Jan 24 16:13:53 2018 @author: magalidrumare @ copyright François Cholet DeepLearning with Python """ # Variational autoencoders # -> A classical image autoencoder takes an image, # maps it to a latent vector space via an "encoder" module, # decode...
[ 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, 2365, 1987, 1467, 25, 1485, 25, 4310, 2864, 198, 198, 31, 9800, 25, 2153, 10751, 65...
2.651272
1,494
from pyppy.args import fill_args from pyppy.config import initialize_config, config initialize_config() config().debug = True @fill_args() assert debug_log(message="useful logs") == "debugging: useful logs" config().debug = False assert not debug_log(message="useful logs")
[ 6738, 12972, 14097, 13, 22046, 1330, 6070, 62, 22046, 198, 6738, 12972, 14097, 13, 11250, 1330, 41216, 62, 11250, 11, 4566, 198, 198, 36733, 1096, 62, 11250, 3419, 198, 11250, 22446, 24442, 796, 6407, 198, 198, 31, 20797, 62, 22046, 341...
3.321429
84
# Copyright (C) 2008 Huub van Dam, Science and Technology Facilities Council, # Daresbury Laboratory. # All rights reserved. # # Developed by: Huub van Dam # Science and Technology Facilities Council # Daresbury Laboratory # Computational Science and...
[ 2, 15069, 357, 34, 8, 3648, 11256, 549, 5719, 5245, 11, 5800, 290, 8987, 48939, 4281, 11, 198, 2, 360, 3565, 10711, 18643, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 6013, 276, 416, 25, 220, 220, 220, 220, 220, 220, 220,...
1.974839
12,440
# coding: utf-8 """ Cisco Intersight OpenAPI specification. The Cisco Intersight OpenAPI specification. OpenAPI spec version: 1.0.9-1461 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re class ResourcePerTypeCo...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 28289, 554, 1010, 432, 4946, 17614, 20855, 13, 628, 220, 220, 220, 383, 28289, 554, 1010, 432, 4946, 17614, 20855, 13, 628, 220, 220, 220, 4946, 17614, 1020, 2196,...
2.547753
2,848
from __future__ import absolute_import from __future__ import division from __future__ import print_function import functools import argparse import os import sys import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data from losses import * from sparsity_ops import * from train import * FLAGS ...
[ 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, 1257, 310, 10141, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 25064, 198...
2.508278
604
#!/usr/bin/python # -*- coding: utf-8 -*- from frw_temp import forwardFn import rospy rospy.init_node('frw_tester', anonymous=True, disable_signals=True) x = [0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1] y = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] print("Testing Forward") print(" ") for i in range(1, len(x)): p...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 1216, 86, 62, 29510, 1330, 2651, 37, 77, 198, 11748, 686, 2777, 88, 198, 198, 305, 2777, 88, 13, 15003, 62, 174...
1.928571
238
from django.contrib.auth import get_user_model from django.contrib.auth.models import User as BaseUser from django.core.management.base import BaseCommand, CommandError from django.db import IntegrityError from django.utils.crypto import get_random_string User: BaseUser = get_user_model()
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 355, 7308, 12982, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7...
3.47619
84
class PSF(object): """ class to manage the point-spread-function attributes """ @property def pixel_kernel(self): """ :return: 2d gird of PSF kernel in pixel units """ return 0 def subsampled_kernel(self, subsampling_factor): """ :param subsa...
[ 198, 198, 4871, 6599, 37, 7, 15252, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 1398, 284, 6687, 262, 966, 12, 43639, 12, 8818, 12608, 198, 220, 220, 220, 37227, 628, 220, 220, 220, 2488, 26745, 198, 220, 220, 220, 825, 1...
2.277174
184
# coding: utf-8 # Copyright (C) 2019 Nguyen Ngoc Sang, <https://github.com/SangVn> from functions import P2F # thông số dòng tự do P_freestream = None # Hàm sign_ic: xác định `thêm hay bớt` dòng ở ô lưới kề bên side # Điều kiện dòng chảy vào # P_side = P_freestream # Điều kiện dòng chảy ra # P_side = P_in # Điều...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 15069, 357, 34, 8, 13130, 220, 42379, 34786, 420, 30043, 11, 1279, 5450, 1378, 12567, 13, 785, 14, 50, 648, 53, 77, 29, 198, 198, 6738, 5499, 1330, 350, 17, 37, 198, 198, 2, 294, 27083, ...
1.59854
411
""" Generic time-domain features """ from functools import singledispatch from typing import List, Union, Tuple import numpy as np from numpy.lib.stride_tricks import as_strided from numpy import polyfit from numba import jit, guvectorize @jit def gradient(x): """Calculate the derivative / gradient of the input [...
[ 37811, 42044, 640, 12, 27830, 3033, 198, 37811, 198, 6738, 1257, 310, 10141, 1330, 31958, 8802, 963, 198, 6738, 19720, 1330, 7343, 11, 4479, 11, 309, 29291, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 299, 32152, 13, 8019, 13, 2536, ...
2.333774
3,026
''' Download NLTK data ''' import nltk nltk.download('punkt') nltk.download('averaged_perceptron_tagger')
[ 7061, 6, 198, 10002, 22879, 51, 42, 1366, 198, 7061, 6, 198, 198, 11748, 299, 2528, 74, 198, 77, 2528, 74, 13, 15002, 10786, 30354, 83, 11537, 198, 77, 2528, 74, 13, 15002, 10786, 8770, 1886, 62, 525, 984, 1313, 62, 83, 7928, 1153...
2.377778
45
from tensorflow import keras
[ 6738, 11192, 273, 11125, 1330, 41927, 292 ]
4
7
""" Text fields allow users to enter input """ from kivy.uix.textinput import TextInput from kivy.uix.boxlayout import BoxLayout from kivy.properties import StringProperty, ColorProperty from kivy.lang.builder import Builder __all__ = [ 'CupertinoTextField', 'CupertinoTextView', 'CupertinoSearchBar' ] Bu...
[ 37811, 198, 8206, 7032, 1249, 2985, 284, 3802, 5128, 198, 37811, 198, 198, 6738, 479, 452, 88, 13, 84, 844, 13, 5239, 15414, 1330, 8255, 20560, 198, 6738, 479, 452, 88, 13, 84, 844, 13, 3524, 39786, 1330, 8315, 32517, 198, 6738, 479...
2.098761
2,582
########################### # Reset working directory # ########################### from os import chdir chdir("G:\\My Drive\\Academic\\Research\\Cartpole Simulation") ########################### # Cartpole Package....... # ########################### from cartpole.args.tf_static_args import TFStaticArgs
[ 14468, 7804, 21017, 201, 198, 2, 30027, 1762, 8619, 1303, 201, 198, 14468, 7804, 21017, 201, 198, 6738, 28686, 1330, 442, 15908, 201, 198, 354, 15908, 7203, 38, 25, 6852, 3666, 9974, 6852, 12832, 49113, 6852, 25104, 6852, 43476, 36869, ...
3.95
80
"""Tests for normalization functions.""" import sqlite3 from . import _unittest as unittest from datatest.requirements import BaseRequirement from datatest._utils import IterItems from datatest._normalize import TypedIterator from datatest._normalize import _normalize_lazy from datatest._normalize import _normalize_ea...
[ 37811, 51, 3558, 329, 3487, 1634, 5499, 526, 15931, 198, 11748, 44161, 578, 18, 198, 6738, 764, 1330, 4808, 403, 715, 395, 355, 555, 715, 395, 198, 6738, 4818, 265, 395, 13, 8897, 18883, 1330, 7308, 16844, 24615, 198, 6738, 4818, 265,...
2.936275
408
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 29113, 29113, 7804, 21017, 198, 2, 15069, 357, 66, 828, 383, 317, 4178, 5631, 1074, 13, 1439, 2489, 10395, 13, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.471721
831
# @Author : bamtercelboo # @Datetime : 2018/07/19 22:35 # @File : model_GRU.py # @Last Modify Time : 2018/07/19 22:35 # @Contact : bamtercelboo@{gmail.com, 163.com} import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable import numpy as np import random from DataUtils.Com...
[ 2, 2488, 13838, 1058, 275, 321, 353, 5276, 2127, 78, 198, 2, 2488, 27354, 8079, 1058, 2864, 14, 2998, 14, 1129, 2534, 25, 2327, 198, 2, 2488, 8979, 1058, 2746, 62, 10761, 52, 13, 9078, 198, 2, 2488, 5956, 3401, 1958, 3862, 1058, 2...
2.702532
158
####################################################################################### import nltk from nltk.tokenize import word_tokenize from nltk.corpus import stopwords, wordnet from nltk.stem import WordNetLemmatizer import string from collections import defaultdict # Import default dictionary for dictionary li...
[ 29113, 29113, 14468, 4242, 21017, 198, 198, 11748, 299, 2528, 74, 198, 6738, 299, 2528, 74, 13, 30001, 1096, 1330, 1573, 62, 30001, 1096, 198, 6738, 299, 2528, 74, 13, 10215, 79, 385, 1330, 2245, 10879, 11, 1573, 3262, 198, 6738, 299,...
2.804009
449
import sys N, K = (int(term) for term in sys.stdin.readline().split()) A = sys.stdin.readline().split() for i in range(N): A[i] = int(A[i]) K -= 1 print(f(0, N))
[ 11748, 25064, 198, 198, 45, 11, 509, 796, 357, 600, 7, 4354, 8, 329, 3381, 287, 25064, 13, 19282, 259, 13, 961, 1370, 22446, 35312, 28955, 198, 32, 796, 25064, 13, 19282, 259, 13, 961, 1370, 22446, 35312, 3419, 198, 1640, 1312, 287,...
2.179487
78
# coding=utf-8 from typing import List from src.data_structure.data_structure import ListNode class Solution: """ 旋转单链表 """ def rotate_right(self, head: ListNode, k: int) -> ListNode: """ Time: O(n), Space: O(1) :param head: :param k: :return: """ ...
[ 2, 19617, 28, 40477, 12, 23, 198, 6738, 19720, 1330, 7343, 198, 198, 6738, 12351, 13, 7890, 62, 301, 5620, 13, 7890, 62, 301, 5620, 1330, 7343, 19667, 628, 198, 4871, 28186, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 10545, ...
1.856021
382
import random, time from dtest import debug, Tester from pytools import new_node, insert_c1c2, query_c1c2 from pyassertions import assert_almost_equal from ccmlib.cluster import Cluster from cassandra import ConsistencyLevel
[ 11748, 4738, 11, 640, 198, 6738, 288, 9288, 1330, 14257, 11, 309, 7834, 198, 6738, 12972, 31391, 1330, 649, 62, 17440, 11, 7550, 62, 66, 16, 66, 17, 11, 12405, 62, 66, 16, 66, 17, 198, 6738, 12972, 30493, 507, 1330, 6818, 62, 2817...
3.424242
66
''' lab5.py ''' #3.1 alien_color = 'green' if alien_color == 'green': print('the player just earned 5 points') #3.2 alien_color = 'green' if alien_color == 'green': print('the player just earned 5 points') else: print('you have earned 10 points') #3.3 my_list = ['strawberry', 'pear', 'peach'] if 'st...
[ 7061, 6, 198, 23912, 20, 13, 9078, 198, 7061, 6, 198, 198, 2, 18, 13, 16, 198, 42690, 62, 8043, 796, 705, 14809, 6, 198, 361, 8756, 62, 8043, 6624, 705, 14809, 10354, 198, 220, 220, 220, 3601, 10786, 1169, 2137, 655, 7366, 642, ...
2.321168
274
import os import earhart.plotting as ep from earhart.paths import RESULTSDIR PLOTDIR = os.path.join(RESULTSDIR, 'bisector_span_vs_RV') if not os.path.exists(PLOTDIR): os.mkdir(PLOTDIR) ep.plot_bisector_span_vs_RV(PLOTDIR, which='Gummi') ep.plot_bisector_span_vs_RV(PLOTDIR, which='Hartman')
[ 11748, 28686, 198, 11748, 1027, 18647, 13, 29487, 889, 355, 2462, 198, 6738, 1027, 18647, 13, 6978, 82, 1330, 15731, 35342, 34720, 198, 198, 6489, 2394, 34720, 796, 28686, 13, 6978, 13, 22179, 7, 46274, 34720, 11, 705, 41907, 9250, 62, ...
2.357143
126
# -*- coding: utf-8 -*- from .._common import * site = IfengVideo()
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 11485, 62, 11321, 1330, 1635, 628, 198, 15654, 796, 1002, 1516, 10798, 3419, 198 ]
2.366667
30
""" Individual Class each individual is a set of hyper_features, and has a given set of fitness values (one for each objective) """ from Feature import Feature import random import numpy as np from copy import deepcopy # retrieves the number of features in genotype # generates a featur...
[ 37811, 201, 198, 35392, 5016, 201, 198, 201, 198, 27379, 1981, 318, 257, 900, 286, 8718, 62, 40890, 11, 201, 198, 392, 468, 257, 1813, 900, 286, 13547, 3815, 357, 505, 329, 1123, 9432, 8, 201, 198, 201, 198, 37811, 201, 198, 6738, ...
2.933333
615
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # File : __init__.py # Author : Honghua Dong # Email : dhh19951@gmail.com # Date : 11/21/2019 # # Distributed under terms of the MIT license. from .model import * from .observer import *
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 9220, 220, 220, 1058, 11593, 15003, 834, 13, 9078, 198, 2, 6434, 1058, 8835, 456, 6413, 28831, 198, 2, 957...
2.536842
95
import argparse from distutils.util import strtobool parser = argparse.ArgumentParser() parser.add_argument('arg_bool', type=strtobool) args = parser.parse_args() print(args.arg_bool) print(type(args.arg_bool))
[ 11748, 1822, 29572, 198, 6738, 1233, 26791, 13, 22602, 1330, 965, 83, 672, 970, 198, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 3419, 198, 48610, 13, 2860, 62, 49140, 10786, 853, 62, 30388, 3256, 2099, 28, 2536, 83, 672, 97...
2.878378
74
############################################################################# # # Author: J. Ren # ############################################################################# """ TBD """ import os
[ 29113, 29113, 7804, 4242, 2, 198, 2, 198, 2, 6434, 25, 449, 13, 7152, 198, 2, 198, 29113, 29113, 7804, 4242, 2, 198, 198, 37811, 198, 51, 14529, 198, 37811, 198, 198, 11748, 28686, 198 ]
5.742857
35
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-09-14 05:27 from __future__ import unicode_literals from django.db import migrations, models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 319, 2177, 12, 2931, 12, 1415, 8870, 25, 1983, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738...
2.8
55
from typing import Iterator, Tuple import attr from go_space import consts, exceptions @attr.s(frozen=True)
[ 6738, 19720, 1330, 40806, 1352, 11, 309, 29291, 198, 198, 11748, 708, 81, 198, 198, 6738, 467, 62, 13200, 1330, 1500, 82, 11, 13269, 628, 198, 31, 35226, 13, 82, 7, 69, 42005, 28, 17821, 8, 198 ]
3.027027
37
#! /bin/env python # # Simply verify the environment is valid for running the client apps. # import argparse # pylint: disable=superfluous-parens # pylint: disable=broad-except import importlib import logging import sys from rdr_service.services.gcp_utils import gcp_get_app_access_token, gcp_get_app_host_name from r...
[ 2, 0, 1220, 8800, 14, 24330, 21015, 198, 2, 198, 2, 17973, 11767, 262, 2858, 318, 4938, 329, 2491, 262, 5456, 6725, 13, 198, 2, 198, 198, 11748, 1822, 29572, 198, 198, 2, 279, 2645, 600, 25, 15560, 28, 16668, 35522, 516, 12, 11730...
3.008
250
''' Simple module that checks whether an integer complies with either the fizz rule or the buzz rule. ''' class Checker: ''' Checker class contains two methods is_fizz and is_buzz that return booleans dependent on whether an integer complies with either the fizz or buzz rule ''' @staticmethod ...
[ 7061, 6, 198, 26437, 8265, 326, 8794, 1771, 281, 18253, 2299, 444, 351, 2035, 262, 198, 69, 6457, 3896, 393, 262, 14713, 3896, 13, 198, 7061, 6, 198, 198, 4871, 6822, 263, 25, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 682...
2.651261
238
from django.urls import path from . import views # app_name = "flights" urlpatterns = [ path("", views.index, name="index"), path("<int:flight_id>", views.flight, name="flight"), path("<int:flight_id>/book", views.book, name="book"), ]
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 764, 1330, 5009, 198, 198, 2, 598, 62, 3672, 796, 366, 2704, 2337, 1, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 7203, 1600, 5009, 13, 9630, 11, 1438, 26...
2.648936
94
from cv2 import (ORB_create, BFMatcher_create, perspectiveTransform, warpPerspective, findHomography, NORM_HAMMING, RANSAC, drawKeypoints, imshow, waitKey) from numpy import array, concatenate, float32, int32 class Stitcher: """ The Stitcher class implements manual stitching between two image...
[ 6738, 269, 85, 17, 1330, 357, 1581, 33, 62, 17953, 11, 41646, 19044, 2044, 62, 17953, 11, 6650, 41762, 11, 25825, 30946, 806, 425, 11, 1064, 28718, 4867, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 22...
2.397341
2,557
from copy import deepcopy from shutil import copyfile from sys_simulator.q_learning.environments.completeEnvironment12 import CompleteEnvironment12 from time import time import numpy as np import torch from torch.utils.tensorboard import SummaryWriter from sys_simulator.channels import BANChannel, UrbanMacroNLOSWinne...
[ 6738, 4866, 1330, 2769, 30073, 198, 6738, 4423, 346, 1330, 4866, 7753, 198, 6738, 25064, 62, 14323, 8927, 13, 80, 62, 40684, 13, 268, 12103, 13, 20751, 31441, 1065, 1330, 13248, 31441, 1065, 198, 6738, 640, 1330, 640, 198, 198, 11748, ...
2.508151
1,779
""" Tilapya's internal utilities. Not part of the public API. """ from requests import Session from tilapya import __version__ from .errors import TransLinkAPIError USER_AGENT = '{}/{}'.format("tilapya", __version__)
[ 37811, 198, 51, 346, 499, 3972, 338, 5387, 20081, 13, 1892, 636, 286, 262, 1171, 7824, 13, 198, 37811, 198, 6738, 7007, 1330, 23575, 198, 198, 6738, 21502, 499, 3972, 1330, 11593, 9641, 834, 198, 6738, 764, 48277, 1330, 3602, 11280, 1...
3.25
68
# -*- coding: utf-8 -*- """ LSF remote workflow implementation. See https://www.ibm.com/support/knowledgecenter/en/SSETD4_9.1.3. """ __all__ = ["LSFWorkflow"] import os import logging from abc import abstractmethod from collections import OrderedDict import luigi from law import LocalDirectoryTarget, NO_STR, get...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 6561, 37, 6569, 30798, 7822, 13, 4091, 3740, 1378, 2503, 13, 571, 76, 13, 785, 14, 11284, 14, 45066, 16159, 14, 268, 14, 5432, 2767, 35, 19, 62, 24,...
3.074419
215
# Auto generated by 'inv collect-airflow' from airfly._vendor.airflow.models.baseoperator import BaseOperator
[ 2, 11160, 7560, 416, 705, 16340, 2824, 12, 958, 11125, 6, 198, 6738, 1633, 12254, 13557, 85, 18738, 13, 958, 11125, 13, 27530, 13, 8692, 46616, 1330, 7308, 18843, 1352, 628 ]
3.580645
31
import os import argparse import json from glob import glob import numpy as np import torch import torch.optim as optim import torchvision.transforms as transforms import datasets.wsi_dataset_eval as wsi_dataset import models.mobilenet as mobilenet import loss.censored_crossentropy_loss as cce_loss from utils import ...
[ 11748, 28686, 198, 11748, 1822, 29572, 198, 11748, 33918, 198, 6738, 15095, 1330, 15095, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 11748, 28034, 13, 40085, 355, 6436, 198, 11748, 28034, 10178, 13, 7645, 23914, 355, ...
2.454688
640
###################################################################### # Author: Shawn Villahermosa # Username: villahermosas # # Assignment: A02: Loopy Turtles # Purpose: To very simply demonstrate the turtle library to demo shapes ###################################################################### # Acknowledgemen...
[ 29113, 29113, 4242, 2235, 198, 2, 6434, 25, 25225, 25018, 372, 76, 8546, 198, 2, 50069, 25, 4489, 64, 372, 16785, 292, 198, 2, 198, 2, 50144, 25, 317, 2999, 25, 6706, 11081, 44356, 198, 2, 32039, 25, 1675, 845, 2391, 10176, 262, 2...
2.779394
825
# Native modules import os # Third-party modules import pkg_resources import yaml # Package name PACKAGE_NAME = 'pygame_rl' def get_resource_path(resource_name): """Get the resource path. Args: resource_name (str): The resource name relative to the project root directory. Returns: ...
[ 2, 12547, 13103, 198, 11748, 28686, 198, 198, 2, 10467, 12, 10608, 13103, 198, 11748, 279, 10025, 62, 37540, 198, 11748, 331, 43695, 198, 198, 2, 15717, 1438, 198, 47, 8120, 11879, 62, 20608, 796, 705, 9078, 6057, 62, 45895, 6, 628, ...
2.564948
485
# Copyright (c) 2018 5GTANGO, QUOBIS SL. # 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 appli...
[ 2, 15069, 357, 66, 8, 2864, 642, 19555, 1565, 11230, 11, 19604, 9864, 1797, 12419, 13, 198, 2, 11096, 371, 34874, 15731, 1137, 53, 1961, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34...
3.239884
692
# -*- coding: utf-8 -*- """ cues.canvas =========== This module contains the Canvas class for interpreting and reading information about the console and current output. """ import shutil import traceback from abc import ABC from . import utils class Canvas(ABC): """Abstract base class for handling the console...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 66, 947, 13, 5171, 11017, 198, 2559, 18604, 198, 198, 1212, 8265, 4909, 262, 1680, 11017, 1398, 329, 35391, 290, 3555, 1321, 546, 262, 8624, 290, 1459, ...
2.735537
726
"""/** * @author [Jai Miles] * @email [jaimiles23@gmail.com] * @create date 2020-05-13 22:41:48 * @modify date 2020-05-13 22:41:48 * @desc [ Data module for the check_answer directory. ] */ """ MS_QUESTION = ( "{} times {}" ) MT_EQUALS = ( "is", "equals", ) MS_NOT_ANS = "Not {}!"
[ 37811, 35343, 198, 1635, 2488, 9800, 685, 41, 1872, 20404, 60, 198, 1635, 2488, 12888, 685, 73, 1385, 2915, 1954, 31, 14816, 13, 785, 60, 198, 1635, 2488, 17953, 3128, 12131, 12, 2713, 12, 1485, 2534, 25, 3901, 25, 2780, 198, 1635, ...
2.270677
133
import paho.mqtt.client as mqtt from random import randrange import json import time # Join do node # Função de callback para lidar com as mensagens recebidas # Função que ordena os nodes e define seu sucessor e antecessor if __name__ == '__main__': node = DhtNode() node.join()
[ 11748, 279, 17108, 13, 76, 80, 926, 13, 16366, 355, 285, 80, 926, 198, 6738, 4738, 1330, 43720, 9521, 198, 11748, 33918, 198, 11748, 640, 628, 220, 220, 220, 1303, 15251, 466, 10139, 628, 220, 220, 220, 1303, 11138, 16175, 28749, 390,...
2.754545
110
from django.conf.urls import url, include from . import views urlpatterns = [ # url(r'^$', views.?, name='?'), url(r'^courses/$',views.courses,name="courses"), url(r'^select', views.select, name="select"), url(r'^table', views.table, name="table"), url(r'^teacher', views.teacher, name="teacher"), ...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 11, 2291, 198, 6738, 764, 1330, 5009, 628, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 1303, 19016, 7, 81, 6, 61, 3, 3256, 5009, 13, 21747, 1438, 11639, 8348, 828, ...
2.640693
462
# coding: utf-8 # 2021/8/22 @ tongshiwei from baize.mxnet.utils import format_sequence, mask_sequence_variable_length from mxnet import gluon from mxnet import ndarray
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 33448, 14, 23, 14, 1828, 2488, 10479, 44019, 42990, 198, 198, 6738, 26605, 1096, 13, 36802, 3262, 13, 26791, 1330, 5794, 62, 43167, 11, 9335, 62, 43167, 62, 45286, 62, 13664, 198, 6738, 285, ...
2.822581
62
""" The log analyzer module reads and parses Varian linear accelerator machine logs, both Dynalogs and Trajectory logs. The module also calculates actual and expected fluences as well as performing gamma evaluations. Data is structured to be easily accessible and easily plottable. Unlike most other modules of pylinac,...
[ 37811, 198, 464, 2604, 4284, 9107, 8265, 9743, 290, 13544, 274, 569, 3699, 14174, 44219, 4572, 17259, 11, 1111, 39530, 11794, 82, 290, 4759, 752, 652, 17259, 13, 383, 8265, 635, 198, 9948, 3129, 689, 4036, 290, 2938, 6562, 3007, 355, ...
2.31681
34,295
from sklearn.discriminant_analysis import QuadraticDiscriminantAnalysis from sklearn.naive_bayes import GaussianNB import numpy as np X = np.array([[0.6585,0.2444], [2.246, 0.5281], [-2.7665, -3.8303], [-1.2565, 3.4912], [-0.7973, 1.2288], [1.117, 2.2637]]) Y = np.array([0, 0, 0, 1, 1, 1]) qda = QuadraticDiscriminantAn...
[ 6738, 1341, 35720, 13, 15410, 3036, 42483, 62, 20930, 1330, 20648, 81, 1512, 15642, 3036, 42483, 32750, 198, 6738, 1341, 35720, 13, 2616, 425, 62, 24406, 274, 1330, 12822, 31562, 32819, 198, 11748, 299, 32152, 355, 45941, 198, 55, 796, ...
2.255319
235
from numpy import nan import pytest import pandapower as pp from pandapower.opf.validate_opf_input import _check_necessary_opf_parameters try: import pplog as logging except ImportError: import logging logger = logging.getLogger(__name__) if __name__ == "__main__": if 1: pytest.main(['-...
[ 6738, 299, 32152, 1330, 15709, 198, 11748, 12972, 9288, 198, 198, 11748, 19798, 499, 789, 355, 9788, 198, 6738, 19798, 499, 789, 13, 404, 69, 13, 12102, 378, 62, 404, 69, 62, 15414, 1330, 4808, 9122, 62, 49986, 62, 404, 69, 62, 1714...
2.344444
180
"""League Updater Module."""
[ 37811, 24623, 3205, 67, 729, 19937, 526, 15931, 198 ]
3.222222
9
#- # Copyright (c) 2014 Jonathan Woodruff # Copyright (c) 2014 Robert M. Norton # All rights reserved. # # This software was developed by SRI International and the University of # Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237 # ("CTSRD"), as part of the DARPA CRASH research programme. # # @BE...
[ 2, 12, 198, 2, 15069, 357, 66, 8, 1946, 11232, 5326, 30622, 198, 2, 15069, 357, 66, 8, 1946, 5199, 337, 13, 30722, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 770, 3788, 373, 4166, 416, 311, 7112, 4037, 290, 262, 2059, 286, ...
3.540984
366
import asyncio import pytest import ray from ray import serve import ray.serve.context as context from ray.serve.policy import RoundRobinPolicyQueueActor from ray.serve.backend_worker import create_backend_worker, wrap_to_ray_error from ray.serve.request_params import RequestMetadata from ray.serve.config import Back...
[ 11748, 30351, 952, 198, 198, 11748, 12972, 9288, 198, 198, 11748, 26842, 198, 6738, 26842, 1330, 4691, 198, 11748, 26842, 13, 2655, 303, 13, 22866, 355, 4732, 198, 6738, 26842, 13, 2655, 303, 13, 30586, 1330, 10485, 40656, 36727, 34991, ...
3.342342
111
from parglare import GLRParser from parglare.tables.persist import table_from_serializable from _table import table from grammar import grammar table = table_from_serializable(table, grammar) parser = GLRParser(grammar, table=table) print(parser.parse('aaabbb'))
[ 6738, 279, 853, 75, 533, 1330, 10188, 20031, 28198, 198, 6738, 279, 853, 75, 533, 13, 83, 2977, 13, 19276, 396, 1330, 3084, 62, 6738, 62, 46911, 13821, 198, 198, 6738, 4808, 11487, 1330, 3084, 198, 6738, 23491, 1330, 23491, 628, 198, ...
3.216867
83
from .authentication import AuthenticationMixIn from .post import PostMixin from .request import RequestMixIn from .profile import ProfileMixin from .friendships import FriendshipsMixin from .search import SearchMixin
[ 6738, 764, 41299, 3299, 1330, 48191, 35608, 818, 198, 6738, 764, 7353, 1330, 2947, 35608, 259, 198, 6738, 764, 25927, 1330, 19390, 35608, 818, 198, 6738, 764, 13317, 1330, 13118, 35608, 259, 198, 6738, 764, 6726, 26313, 1330, 14213, 5748,...
4.27451
51
import glob import os # Type in the folder- and filename to read the files folder_name = "TG" file_names = "TG_*.txt" # Fetch the folder with the specific data files abs_path = os.path.abspath(folder_name) # Replace the string here with your target folder # Get all the files in the folder txt_files = glob.glob(abs_...
[ 11748, 15095, 198, 11748, 28686, 198, 198, 2, 5994, 287, 262, 9483, 12, 290, 29472, 284, 1100, 262, 3696, 198, 43551, 62, 3672, 796, 366, 35990, 1, 198, 7753, 62, 14933, 796, 366, 35990, 62, 24620, 14116, 1, 198, 198, 2, 376, 7569, ...
2.462338
385
name = "getv"
[ 3672, 796, 366, 1136, 85, 1, 198 ]
2
7
# David Markham # Fisher Iris Data set # Use a colour Scatterplot to determine relationship between species. # Sepal length versus petal length. # Import Libraries import numpy as np import pandas as pd import matplotlib.pyplot as plt from pandas.plotting import scatter_matrix import seaborn as sns from sklearn impo...
[ 2, 3271, 2940, 2763, 198, 2, 14388, 34230, 6060, 900, 198, 198, 2, 5765, 257, 9568, 1446, 1436, 29487, 284, 5004, 2776, 1022, 4693, 13, 198, 2, 8621, 282, 4129, 9051, 4273, 282, 4129, 13, 198, 198, 2, 17267, 46267, 220, 198, 11748, ...
2.582589
448
import bs4 import requests import collections WeatherReport = collections.namedtuple('WeatherReport', 'loc, temp, scale, condition, feelslike') if __name__ == "__main__": # get zip code from user zipcode = input('What zip code do you want the weather for? ') # g...
[ 11748, 275, 82, 19, 198, 11748, 7007, 198, 11748, 17268, 198, 198, 41865, 19100, 796, 17268, 13, 13190, 83, 29291, 10786, 41865, 19100, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.057971
414
""" The player module contains players, bids, player stats. """ from hand import Hand from hand import HandOwner from collections import namedtuple class Player(HandOwner): """ Player has a hand, a selection strategy (to play a card), and a set of stats. """ def play_card(self, prize_card, hand, max_card): ...
[ 198, 37811, 198, 464, 2137, 8265, 4909, 1938, 11, 27837, 11, 2137, 9756, 13, 198, 37811, 198, 198, 6738, 1021, 1330, 7157, 198, 6738, 1021, 1330, 7157, 42419, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 198, 4871, 7853, 7, 12885, 42...
2.830813
1,058
# -*- coding: utf-8 -*- """ Programa 4: Fórmula de Simpson compuesta """ """ Datos de entrada """ # Función cuya integral queremos aproximar import scipy as sp import numpy as np from numpy.polynomial import polynomial as P import math import scipy.integrate as integrate import scipy.special as special a = 0 b = ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 15167, 64, 604, 25, 376, 10205, 26224, 4712, 390, 20531, 552, 84, 18059, 198, 37811, 198, 198, 37811, 198, 27354, 418, 390, 24481, 4763, 198, 37811, 198...
2.410526
380
import socket # Attacks on target ATTACK_TYPE = [ 'ARP_POISON', 'DNS_HIJACK', 'DNS_AMPLIFY', 'SMURF', 'SYN_FLOOD', 'NTP_AMPLIFY', 'SYN_SCAN', 'ACK_SCAN', 'XMAS_SCAN', 'FIN_SCAN', 'NULL_SCAN' 'INVALID' ] if __name__ == "__main__": main()
[ 11748, 17802, 198, 198, 2, 24647, 319, 2496, 198, 17139, 8120, 62, 25216, 796, 685, 198, 197, 6, 36035, 62, 16402, 39960, 3256, 198, 197, 6, 35, 8035, 62, 39, 23852, 8120, 3256, 198, 197, 6, 35, 8035, 62, 2390, 6489, 5064, 56, 325...
1.818841
138
"""Main Gui window.""" import os import sys from PyQt5 import QtCore, QtGui, QtWidgets from utils import intialize_predection_model from instructions import Ui_Instructions # instructions from about import Ui_About # about from realTime import Ui_RealTime # real time mod...
[ 37811, 13383, 1962, 72, 4324, 526, 15931, 198, 11748, 28686, 198, 11748, 25064, 198, 6738, 9485, 48, 83, 20, 1330, 33734, 14055, 11, 33734, 8205, 72, 11, 33734, 54, 312, 11407, 198, 6738, 3384, 4487, 1330, 493, 498, 1096, 62, 28764, 3...
2.156652
466
from setuptools import setup __version__ = '0.1.0' setup( name='jobqueue', version=__version__, licence='MIT', install_requires=[], test_suite='jobqueue.tests', tests_require=[], packages=['jobqueue'], scripts=['scripts/jobqueue'] )
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 834, 9641, 834, 796, 705, 15, 13, 16, 13, 15, 6, 198, 198, 40406, 7, 198, 220, 1438, 11639, 21858, 36560, 3256, 198, 220, 2196, 28, 834, 9641, 834, 11, 198, 220, 17098, 11639, 36393, ...
2.728261
92
#!/usr/bin/env python3 # # Arm SCP/MCP Software # Copyright (c) 2021, Arm Limited and Contributors. All rights reserved. # # SPDX-License-Identifier: BSD-3-Clause # import check_copyright import check_doc import check_spacing import check_tabs import check_framework import docker import os import signal import subproc...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 198, 2, 7057, 17527, 14, 44, 8697, 10442, 198, 2, 15069, 357, 66, 8, 33448, 11, 7057, 15302, 290, 25767, 669, 13, 1439, 2489, 10395, 13, 198, 2, 198, 2, 30628, 55, 12, 341...
2.221675
406
import unittest import numpy from worldengine.simulations.hydrology import WatermapSimulation from worldengine.model.world import World, Size, GenerationParameters # This does only test that watermap leaves the rng in the state that the # original implementation would have left it in and that a very small s...
[ 11748, 555, 715, 395, 198, 198, 11748, 299, 32152, 198, 198, 6738, 995, 18392, 13, 14323, 5768, 13, 15511, 31142, 1330, 5638, 8899, 8890, 1741, 198, 6738, 995, 18392, 13, 19849, 13, 6894, 1330, 2159, 11, 12849, 11, 16588, 48944, 628, ...
3.478927
261
# flake8: noqa from __future__ import unicode_literals import pivot import sys import re import csv import time client = pivot.Client() stations = client.collection('restorationstations') for station in stations.all(limit=False, noexpand=True): if station.site != station.siteId: station.site = station.si...
[ 2, 781, 539, 23, 25, 645, 20402, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 11748, 30355, 198, 11748, 25064, 198, 11748, 302, 198, 11748, 269, 21370, 198, 11748, 640, 198, 198, 16366, 796, 30355, 13, 11792, ...
2.95
160
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2017-04-23 10:35 from django.db import migrations
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 940, 319, 2177, 12, 3023, 12, 1954, 838, 25, 2327, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.560976
41
""" 2019.10.07新增。 对应一“类”线路数据。数据结构为广义表,成员可以是Line或Category。 是Python基础dict的封装和扩展。 """ from ..data.line import Line from typing import Generator
[ 37811, 198, 23344, 13, 940, 13, 2998, 23877, 108, 161, 95, 252, 16764, 198, 43380, 117, 41753, 242, 31660, 447, 250, 163, 109, 119, 447, 251, 163, 118, 123, 164, 115, 107, 46763, 108, 162, 235, 106, 16764, 46763, 108, 162, 235, 106,...
1.275862
116
""" Script to auto-rotate and configure squid proxy farms using multiple VPS backends using their APIs. """ import argparse import os import sys import signal if __name__ == "__main__": parser = argparse.ArgumentParser(prog='rotate_proxies') parser.add_argument('-C','--conf',help='Use the given configuration...
[ 37811, 198, 7391, 284, 8295, 12, 10599, 378, 290, 17425, 45126, 15741, 15893, 1262, 3294, 198, 53, 3705, 736, 2412, 1262, 511, 23113, 13, 198, 198, 37811, 198, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 6...
2.464451
1,083
from ansible.api_client import APIClient
[ 6738, 9093, 856, 13, 15042, 62, 16366, 1330, 3486, 2149, 75, 1153, 198 ]
3.153846
13
from drivers.sfm3200_flow_sensor import Sfm3200 import logging if __name__ == "__main__": main()
[ 6738, 6643, 13, 28202, 76, 18, 2167, 62, 11125, 62, 82, 22854, 1330, 311, 38353, 18, 2167, 198, 11748, 18931, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419, 198 ]
2.6
40
# -*- coding: utf-8 -*- # Copyright 2021 Cohesity Inc. class DatastoreInfo(object): """Implementation of the 'DatastoreInfo' model. TODO: type model description here. Attributes: capacity (int): Specifies the capacity of the datastore in bytes. free_space (int): Specifies the available ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 33448, 1766, 956, 414, 3457, 13, 628, 198, 4871, 16092, 459, 382, 12360, 7, 15252, 2599, 628, 220, 220, 220, 37227, 3546, 32851, 286, 262, 705, 27354, 459, 3...
2.481013
632
import os WATCHED = [ 'SERVICE', 'STAGE', 'BUCKET', 'TABLE', 'OVERWRITE', 'USERS', ] # load config _config = {k.lower(): v for k, v in os.environ.items() if k in WATCHED} if not _config.get('users'): _config['username'] = os.environ.get('USERNAME') _config['password'] = os.environ.get(...
[ 11748, 28686, 198, 198, 35192, 1961, 796, 685, 198, 220, 220, 220, 705, 35009, 27389, 3256, 198, 220, 220, 220, 705, 2257, 11879, 3256, 198, 220, 220, 220, 705, 33, 16696, 2767, 3256, 198, 220, 220, 220, 705, 38148, 3256, 198, 220, ...
2.342282
149