content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
from graviteeio_cli.lint.types.function_result import FunctionResult def length(value, **kwargs): """Count the length of a string an or array, the number of properties in an object, or a numeric value, and define minimum and/or maximum values.""" min = None max = None if "min" in kwargs and type(kwar...
[ 6738, 9067, 578, 68, 952, 62, 44506, 13, 75, 600, 13, 19199, 13, 8818, 62, 20274, 1330, 15553, 23004, 628, 198, 4299, 4129, 7, 8367, 11, 12429, 46265, 22046, 2599, 198, 220, 220, 220, 37227, 12332, 262, 4129, 286, 257, 4731, 281, 39...
2.433155
374
# coding: utf-8 """ Unofficial python library for the SmartRecruiters API The SmartRecruiters API provides a platform to integrate services or applications, build apps and create fully customizable career sites. It exposes SmartRecruiters functionality and allows to connect and build software enhancing it. ...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 791, 16841, 21015, 5888, 329, 262, 10880, 6690, 4872, 364, 7824, 628, 220, 220, 220, 383, 10880, 6690, 4872, 364, 7824, 3769, 257, 3859, 284, 19386, 2594, 393, 547...
3.869048
168
name = input('Hello! What is your name? : ') print('Nice to meet you,', name + '!') print() age = int(input('How old are you ' + name + '? : ')) print() x = age + 1 print(' ', x, end=' ') if x >= 11 and x <= 19: print('', end='') elif x % 10 == 1: print('', end='') elif x % 10 >= 2 and x % 10 <= 4: pri...
[ 3672, 796, 5128, 10786, 15496, 0, 1867, 318, 534, 1438, 30, 1058, 705, 8, 198, 4798, 10786, 35284, 284, 1826, 345, 11, 3256, 1438, 1343, 705, 0, 11537, 198, 4798, 3419, 198, 198, 496, 796, 493, 7, 15414, 10786, 2437, 1468, 389, 345,...
2.308642
162
import numpy as np import pandas as pd import matplotlib.pyplot as plt import warnings warnings.filterwarnings("ignore") import yfinance as yf yf.pdr_override() import datetime as dt # input symbol = 'AAPL' start = dt.date.today() - dt.timedelta(days = 365*2) end = dt.date.today() # Read data df = yf.download(symbol...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 14601, 198, 40539, 654, 13, 24455, 40539, 654, 7203, 46430, 4943, 198, 11748, 331, 69, 14149,...
2.394212
1,002
import requests from urllib.request import urlopen from urllib.request import urlretrieve import cgi import os.path pdf_downloader()
[ 11748, 7007, 198, 6738, 2956, 297, 571, 13, 25927, 1330, 19016, 9654, 198, 6738, 2956, 297, 571, 13, 25927, 1330, 19016, 1186, 30227, 198, 11748, 269, 12397, 198, 11748, 28686, 13, 6978, 198, 220, 220, 220, 220, 198, 198, 12315, 62, 1...
3.136364
44
import spacy import json, os import dill as pickle import numpy as np import pandas as pd from sklearn.feature_extraction.text import TfidfVectorizer from sqlalchemy import create_engine, select, MetaData, Table, Column, Integer, String from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import ...
[ 11748, 599, 1590, 198, 11748, 33918, 11, 28686, 198, 11748, 288, 359, 355, 2298, 293, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 1341, 35720, 13, 30053, 62, 2302, 7861, 13, 5239, 1330, 309, 69...
3.406699
209
from uuid import uuid4 from sqlalchemy import Boolean, Column, DateTime, Integer, String from sqlalchemy.dialects.postgresql import UUID from sqlalchemy.orm import relationship from .database import Base # class User(Base): # __tablename__ = "users" # id = Column(Integer, primary_key=True, index=True) #...
[ 6738, 334, 27112, 1330, 334, 27112, 19, 198, 198, 6738, 44161, 282, 26599, 1330, 41146, 11, 29201, 11, 7536, 7575, 11, 34142, 11, 10903, 198, 6738, 44161, 282, 26599, 13, 38969, 478, 82, 13, 7353, 34239, 13976, 1330, 471, 27586, 198, ...
2.802013
298
mesh_pic_bandits = 0 mesh_pic_mb_warrior_1 = 1 mesh_pic_messenger = 2 mesh_pic_prisoner_man = 3 mesh_pic_prisoner_fem = 4 mesh_pic_prisoner_wilderness = 5 mesh_pic_siege_sighted = 6 mesh_pic_siege_sighted_fem = 7 mesh_pic_camp = 8 mesh_pic_payment = 9 mesh_pic_escape_1 = 10 mesh_pic_escape_1_fem = 11 mesh_pic_victory =...
[ 76, 5069, 62, 16564, 62, 3903, 896, 796, 657, 198, 76, 5069, 62, 16564, 62, 2022, 62, 5767, 7701, 62, 16, 796, 352, 198, 76, 5069, 62, 16564, 62, 37348, 6540, 796, 362, 198, 76, 5069, 62, 16564, 62, 35156, 263, 62, 805, 796, 513...
2.031134
15,899
# ---------------------------------------------------------------------------- # Copyright (c) 2017-2018, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
[ 2, 16529, 10541, 198, 2, 15069, 357, 66, 8, 2177, 12, 7908, 11, 1195, 40, 12789, 362, 2478, 1074, 13, 198, 2, 198, 2, 4307, 6169, 739, 262, 2846, 286, 262, 40499, 347, 10305, 13789, 13, 198, 2, 198, 2, 383, 1336, 5964, 318, 287,...
5.333333
72
# -*- coding: utf-8 -*- import os import sys import state_workflow_sdk.api.state_workflow.callback_pb2 import state_workflow_sdk.api.state_workflow.createStateWorkflow_pb2 import state_workflow_sdk.model.state_workflow.stateWorkflow_pb2 import state_workflow_sdk.api.state_workflow.deleteStateWorkflow_pb2 import g...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 28686, 198, 11748, 25064, 628, 198, 11748, 1181, 62, 1818, 11125, 62, 21282, 74, 13, 15042, 13, 5219, 62, 1818, 11125, 13, 47423, 62, 40842, 17, 198, 198, 11748, ...
2.723849
239
"""Test for motif.classify.mvgaussian """ from __future__ import print_function import unittest import numpy as np from motif.contour_classifiers import random_forest
[ 37811, 14402, 329, 32702, 13, 4871, 1958, 13, 76, 85, 4908, 31562, 198, 37811, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 555, 715, 395, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 32702, 13, 3642, 454, 62...
3.4
50
""" Profile-aware session wrapper. """ from os import environ from botocore.exceptions import ProfileNotFound from botocore.session import Session from awsenv.cache import CachedSession def get_default_profile_name(): """ Get the default profile name from the environment. """ return environ.get("AWS...
[ 37811, 198, 37046, 12, 9685, 6246, 29908, 13, 198, 37811, 198, 6738, 28686, 1330, 551, 2268, 198, 198, 6738, 10214, 420, 382, 13, 1069, 11755, 1330, 13118, 3673, 21077, 198, 6738, 10214, 420, 382, 13, 29891, 1330, 23575, 198, 198, 6738,...
2.171393
1,622
import torch import os import torch.nn.functional as F import numpy as np import copy from torch import nn from torch.optim import Adam from torch.autograd import Variable from torch.utils.tensorboard import SummaryWriter from tqdm import tqdm from typing import Tuple from .ppo import PPO, PPOExpert from ...
[ 11748, 28034, 201, 198, 11748, 28686, 201, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 4866, 201, 198, 201, 198, 6738, 28034, 1330, 299, 77, 201, 198, 6738, 28034, 13, 4...
3.173913
138
import numpy as np import os, shutil import imageio baseDir = "data/train_verbose" outDir = "data/train" #baseDir = "data/test_verbose" #outDir = "data/test" outDirVidCopy = "data/videos" combineVidsAll = {"smoke" : ["densMean", "densSlice", "velMean", "velSlice", "presMean", "presSlice"], "liquid": ["...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 11, 4423, 346, 198, 11748, 2939, 952, 198, 198, 8692, 35277, 796, 366, 7890, 14, 27432, 62, 19011, 577, 1, 198, 448, 35277, 796, 366, 7890, 14, 27432, 1, 198, 2, 8692, 35277, 796, 36...
1.836801
3,989
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modif...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 770, 2438, 318, 636, 286, 1195, 1984, 270, 13, 198, 2, 198, 2, 357, 34, 8, 15069, 19764, 13130, 13, 198, 2, 198, 2, 770, 2438, 318, 11971, 739, 262, 24843,...
2.399828
2,331
import pandas as pd import numpy as np from sklearn.metrics import confusion_matrix import re def convert_data_sparse_matrix(df, row_label = 'stock_code', col_label = 'name_of_ccass_participant', value_label = 'shareholding'): """ Pivot table """ try: # Prepare zero matrix row_dim =...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 35720, 13, 4164, 10466, 1330, 10802, 62, 6759, 8609, 198, 11748, 302, 198, 198, 4299, 10385, 62, 7890, 62, 82, 29572, 62, 6759, 8609, 7, 7568, 11, ...
2.307772
965
''' Prepare some files to test the upload functionality. ''' import sys sys.path.append('../') from database import * from pymongo import MongoClient mongo = MongoClient(MONGOURI) db = mongo['SCV'] coll = db['dataset'] from gene_expression import * expr_df, meta_doc = load_read_counts_and_meta(organism='mouse', gse...
[ 7061, 6, 198, 37534, 533, 617, 3696, 284, 1332, 262, 9516, 11244, 13, 198, 7061, 6, 198, 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 10786, 40720, 11537, 198, 6738, 6831, 1330, 1635, 198, 6738, 279, 4948, 25162, 1330, 42591, 11792, ...
2.56553
557
from flask import Flask, request from flask_restful import Resource, reqparse from flask_jwt_extended import create_access_token, jwt_required from app.api.V1.models import Product, products # Get a single specific product
[ 6738, 42903, 1330, 46947, 11, 2581, 198, 6738, 42903, 62, 2118, 913, 1330, 20857, 11, 43089, 29572, 198, 6738, 42903, 62, 73, 46569, 62, 2302, 1631, 1330, 2251, 62, 15526, 62, 30001, 11, 474, 46569, 62, 35827, 198, 198, 6738, 598, 13,...
3.677419
62
import time from multiprocessing.pool import Pool if __name__ == '__main__': t = time.time() p1 = Pool(processes=30) p2 = Pool(processes=30) p3 = Pool(processes=30) num1 = range(2, 7072) num2 = range(2, 369) num3 = range(2, 85) prime_list1 = p1.map(is_prime, num1) p1.close() p...
[ 11748, 640, 198, 6738, 18540, 305, 919, 278, 13, 7742, 1330, 19850, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 256, 796, 640, 13, 2435, 3419, 198, 220, 220, 220, 279, 16, 796, 19850,...
2.017613
511
# recursion function (Clean Word) print(CleanWord("wwwooooorrrrllddd"))
[ 2, 664, 24197, 2163, 357, 32657, 9678, 8, 198, 198, 4798, 7, 32657, 26449, 7203, 2503, 13321, 273, 21062, 81, 297, 1860, 67, 48774, 198 ]
2.92
25
import typing from commands2 import CommandBase from subsystems.cameracontroller import CameraSubsystem
[ 11748, 19720, 198, 6738, 9729, 17, 1330, 9455, 14881, 198, 198, 6738, 39335, 82, 13, 66, 2382, 330, 756, 10646, 1330, 20432, 7004, 10057, 628 ]
4.24
25
from django.shortcuts import render,redirect from django.http import HttpResponse, Http404,HttpResponseRedirect import datetime as dt from .models import Post,Comment,Follow,Profile from django.contrib.auth.decorators import login_required from .forms import NewPostForm, NewCommentForm, AddProfileForm from django.contr...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 445, 1060, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 11, 367, 29281, 26429, 11, 43481, 31077, 7738, 1060, 198, 11748, 4818, 8079, 355, 288, 83, 198, 6738, 764, 2753...
3.169697
165
import sys import wx sys.path.insert(0, 'lib.zip') from lib.TetrisGame import TetrisGame if __name__ == '__main__': app = wx.PySimpleApp() frame = TetrisGame(None) frame.Show(True) app.MainLoop()
[ 11748, 25064, 201, 198, 11748, 266, 87, 201, 198, 201, 198, 17597, 13, 6978, 13, 28463, 7, 15, 11, 705, 8019, 13, 13344, 11537, 201, 198, 6738, 9195, 13, 51, 316, 2442, 8777, 1330, 27351, 2442, 8777, 201, 198, 201, 198, 201, 198, ...
2.106195
113
import argparse import torch import logger import models import utils NUM_NODES = { 'moments': 391, 'multimoments': 391, 'kinetics': 608, } CRITERIONS = { 'CE': {'func': torch.nn.CrossEntropyLoss}, 'MSE': {'func': torch.nn.MSELoss}, 'BCE': {'func': torch.nn.BCEWithLogitsLoss}, } OPTIMIZERS =...
[ 11748, 1822, 29572, 198, 11748, 28034, 198, 198, 11748, 49706, 198, 11748, 4981, 198, 11748, 3384, 4487, 198, 198, 41359, 62, 45, 3727, 1546, 796, 1391, 198, 220, 220, 220, 705, 32542, 658, 10354, 5014, 16, 11, 198, 220, 220, 220, 705...
2.147708
1,178
import scrapy from bs4 import BeautifulSoup from lab3.items import Lab3Item
[ 11748, 15881, 88, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 6738, 2248, 18, 13, 23814, 1330, 3498, 18, 7449, 628 ]
3.347826
23
import matplotlib.pyplot as plt from lifelines import (WeibullFitter, ExponentialFitter, LogNormalFitter, LogLogisticFitter) import pandas as pd data = pd.read_csv('Dataset/telco_customer.csv') data['tenure'] = pd.to_numeric(data['tenure']) data = data[data['tenure'] > 0] # Replace yes and No ...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 3868, 20655, 1330, 357, 1135, 571, 724, 37, 1967, 11, 5518, 35470, 37, 1967, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2...
2.472
500
import re import num2words INT_PATTERN = re.compile(r'^-?[0-9]+$') FLOAT_PATTERN = re.compile(r'^-?[0-9]+[,\.][0-9]+$') ORDINAL_PATTERN = re.compile(r'^[0-9]+\.?$') NUM_PATTERN = re.compile(r'^-?[0-9]+([,\.][0-9]+$)?')
[ 11748, 302, 198, 11748, 997, 17, 10879, 628, 198, 12394, 62, 47, 1404, 31800, 796, 302, 13, 5589, 576, 7, 81, 6, 61, 12, 30, 58, 15, 12, 24, 48688, 3, 11537, 198, 3697, 46, 1404, 62, 47, 1404, 31800, 796, 302, 13, 5589, 576, 7...
1.757813
128
from django.test import TransactionTestCase from django.test import TestCase from django.urls import reverse from home_page.models import Search from ebaysdk.finding import Connection as finding
[ 6738, 42625, 14208, 13, 9288, 1330, 45389, 14402, 20448, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 6738, 1363, 62, 7700, 13, 27530, 1330, 11140, 198, 6738, 36649, 592, ...
2.345455
110
from key_generator.key_generator import generate all_sizes_required = [(100, '100'), (500, '500'), (1000, '1K'), (5000, '5K'), (10000, '10K'), (50000, '50K'), (100000, '100K'), (500000, '500K')] for file_size in all_sizes_required: OUTPUT_PATH = "./string_test_" + file_size[1] + ".txt" STRING_COUNT = file_size[0] ...
[ 6738, 1994, 62, 8612, 1352, 13, 2539, 62, 8612, 1352, 1330, 7716, 198, 198, 439, 62, 82, 4340, 62, 35827, 796, 47527, 3064, 11, 705, 3064, 33809, 357, 4059, 11, 705, 4059, 33809, 357, 12825, 11, 705, 16, 42, 33809, 357, 27641, 11, ...
2.263021
384
########################################### # Author : Bastien Girardet, Deborah De Wolff # Date : 13.05.2018 # Course : Applications in Object-oriented Programming and Databases # Teachers : Binswanger Johannes, Zrcher Ruben # Project : Bibliotek # Name : portfolio_book.py Portfolio_book Flask_restful reso...
[ 29113, 7804, 21017, 198, 2, 220, 220, 6434, 1058, 17520, 2013, 23837, 446, 316, 11, 36976, 1024, 27094, 487, 198, 2, 220, 220, 7536, 1058, 1511, 13, 2713, 13, 7908, 198, 2, 220, 220, 20537, 1058, 26622, 287, 9515, 12, 17107, 30297, ...
3.853846
130
import logging from absl import app from sensor_msgs.msg import Image from insert_table_op import InsertTableOperator from insert_block_op import InsertBlockOperator from init_robot_op import InitRobotOperator from gel_sight_op import GelSightOperator from mock_loc_obj_op import MockLocateObjectOperator from goto_xyz_...
[ 11748, 18931, 198, 6738, 2352, 75, 1330, 598, 198, 6738, 12694, 62, 907, 14542, 13, 19662, 1330, 7412, 198, 198, 6738, 7550, 62, 11487, 62, 404, 1330, 35835, 10962, 18843, 1352, 198, 6738, 7550, 62, 9967, 62, 404, 1330, 35835, 12235, ...
2.463248
585
# -*- coding: utf-8 -*- from __future__ import unicode_literals import jsonfield.fields from django.conf import settings from django.db import migrations, models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 33918, 3245, 13, 25747, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 1420...
3.215686
51
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2017 Tomoki Hayashi (Nagoya University) # Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) from __future__ import print_function import argparse import numpy as np from sklearn.preprocessing import StandardScaler from utils import read_hdf5 from ut...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 15069, 2177, 4186, 18228, 9075, 12144, 357, 45, 363, 23790, 2059, 8, 198, 2, 220, 24843, 362, 13, 15, 220, ...
2.789116
147
# from decimal import Decimal import collections as coll import sys import math as mt # import random as rd # import bisect as bi import time sys.setrecursionlimit(1000000) # import numpy as np # Starting Time time1 = time.time() ######## CODE STARTS FROM HERE ######## n = uno() a, b, c, ans = 0, 1, 0, 0 whi...
[ 2, 422, 32465, 1330, 4280, 4402, 198, 11748, 17268, 355, 2927, 198, 11748, 25064, 198, 11748, 10688, 355, 45079, 198, 198, 2, 1330, 4738, 355, 374, 67, 198, 2, 1330, 47457, 478, 355, 3182, 198, 11748, 640, 198, 198, 17597, 13, 2617, ...
2.560847
189
from robosuite.models.objects import MujocoXMLObject from robosuite.utils.mjcf_utils import xml_path_completion, array_to_string, string_to_array
[ 6738, 3857, 418, 84, 578, 13, 27530, 13, 48205, 1330, 8252, 73, 25634, 55, 5805, 10267, 198, 6738, 3857, 418, 84, 578, 13, 26791, 13, 76, 73, 12993, 62, 26791, 1330, 35555, 62, 6978, 62, 785, 24547, 11, 7177, 62, 1462, 62, 8841, 1...
2.839286
56
# Problem description: http://python3.softuni.bg/student/lecture/assignment/56b749af7e4f59b649b7e626/ if __name__ == '__main__': main()
[ 2, 20647, 6764, 25, 2638, 1378, 29412, 18, 13, 4215, 35657, 13, 35904, 14, 50139, 14, 801, 495, 14, 562, 16747, 14, 3980, 65, 22, 2920, 1878, 22, 68, 19, 69, 3270, 65, 33300, 65, 22, 68, 45191, 14, 628, 628, 198, 361, 11593, 367...
2.440678
59
# LOGGING # ---------------------------------------------------------------------------------------------------------------------# import logging logger = logging.getLogger('django') # IMPORTS # ---------------------------------------------------------------------------------------------------------------------# # sho...
[ 2, 41605, 38, 2751, 198, 2, 16529, 3880, 19351, 12, 2, 198, 11748, 18931, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 10786, 28241, 14208, 11537, 198, 198, 2, 30023, 33002, 198, 2, 16529, 3880, 19351, 12, 2, 198, 2, 32953, 1...
6.121212
132
# Adam Beardsley # starting from from adafruit example # https://learn.adafruit.com/welcome-to-circuitpython/creating-and-editing-code # import board import digitalio import time led = digitalio.DigitalInOut(board.LED) led.direction = digitalio.Direction.OUTPUT ramp_time = 3 # Time to ramp up, in seconds period = 0....
[ 2, 7244, 1355, 1371, 1636, 198, 2, 3599, 422, 422, 512, 1878, 4872, 1672, 198, 2, 3740, 1378, 35720, 13, 324, 1878, 4872, 13, 785, 14, 86, 9571, 12, 1462, 12, 21170, 5013, 29412, 14, 20123, 278, 12, 392, 12, 276, 1780, 12, 8189, ...
2.822368
304
import argparse from site_checker import SiteChecker if __name__ == "__main__": parser = argparse.ArgumentParser(description="Check sites text.") parser.add_argument("config", type=str, nargs=1, help="Path to config json file.") parser.add_argument( "-a", dest="apiKey", type=str, ...
[ 11748, 1822, 29572, 198, 6738, 2524, 62, 9122, 263, 1330, 14413, 9787, 263, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 30751, 796, 1822, 29572, 13, 28100, 1713, 46677, 7, 11213, 2625, 9787, ...
2.184891
503
import os from pathlib import Path from datetime import datetime from json import dumps import flask as fsk from flask import request, jsonify, Response app = fsk.Flask(__name__) app.config['DEBUG'] = False homedir = os.getenv('HOME') if __name__ == "__main__": app.run(host='0.0.0.0', port=4960)
[ 11748, 28686, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 33918, 1330, 45514, 198, 198, 11748, 42903, 355, 277, 8135, 198, 6738, 42903, 1330, 2581, 11, 33918, 1958, 11, 18261, 198, 198, 1324, ...
2.816514
109
#!/usr/bin/env python3 #################################################################################################### # Created by EH (NL) https://github.com/strebrah/Solaredge_Domoticz_Modbus # # Date: August 2020 ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 201, 198, 29113, 29113, 29113, 4242, 201, 198, 2, 15622, 416, 412, 39, 357, 32572, 8, 3740, 1378, 12567, 13, 785, 14, 22853, 65, 11392, 14, 36949, 1144, 469, 62, 24510, 6210, 89, 62, ...
1.877487
1,910
import senti_lexis import datetime, string, numpy, spwrap, random time, sys, re from sklearn import svm from sklearn import cross_validation from sklearn.feature_extraction.text import CountVectorizer from sklearn.cross_validation import KFold from scipy.sparse import csr_matrix if __name__ == "__main__": main()
[ 198, 198, 11748, 1908, 72, 62, 2588, 271, 198, 11748, 4818, 8079, 11, 4731, 11, 299, 32152, 11, 599, 37150, 11, 4738, 640, 11, 25064, 11, 302, 198, 198, 6738, 1341, 35720, 1330, 264, 14761, 198, 6738, 1341, 35720, 1330, 3272, 62, 12...
3.106796
103
print(machine())
[ 198, 4798, 7, 30243, 28955, 628, 198 ]
2.857143
7
from numpy import isnan from wonambi import Dataset from .paths import axon_abf_file d = Dataset(axon_abf_file)
[ 6738, 299, 32152, 1330, 2125, 272, 198, 198, 6738, 1839, 4131, 72, 1330, 16092, 292, 316, 198, 198, 6738, 764, 6978, 82, 1330, 7877, 261, 62, 397, 69, 62, 7753, 628, 198, 67, 796, 16092, 292, 316, 7, 897, 261, 62, 397, 69, 62, 7...
2.458333
48
from AutoMxL.Preprocessing.Categorical import * from AutoMxL.Preprocessing.Date import * from AutoMxL.Preprocessing.Outliers import * from AutoMxL.Preprocessing.Missing_Values import * import unittest import pandas as pd import math # test config df = pd.read_csv('tests/df_test_bis.csv') """ -----------------------...
[ 6738, 11160, 44, 87, 43, 13, 6719, 36948, 13, 34, 2397, 12409, 1330, 1635, 198, 6738, 11160, 44, 87, 43, 13, 6719, 36948, 13, 10430, 1330, 1635, 198, 6738, 11160, 44, 87, 43, 13, 6719, 36948, 13, 7975, 75, 3183, 1330, 1635, 198, 6...
3.834123
211
""" Session: 4 Topic: Conditional: IF ELSE statement """ x = 20 y = 100 if (x > y): print ('x > y is true') print ('new line 1') else: print('x > y is false') print('new line 2') print ('new line 3')
[ 37811, 198, 36044, 25, 604, 198, 33221, 25, 9724, 1859, 25, 16876, 17852, 5188, 2643, 198, 37811, 198, 87, 796, 1160, 198, 88, 796, 1802, 628, 198, 361, 357, 87, 1875, 331, 2599, 198, 220, 220, 220, 3601, 19203, 87, 1875, 331, 318, ...
2.477273
88
if __name__ == "__main__": with open("input.txt") as f: raw = f.read() commands = [x for x in raw.split("\n")] horizontal, depth = chain_commands(commands) print(f"First answer is {horizontal*depth}") # print(f"Second answer is {count_increasing(measurements, 3)}")
[ 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 351, 1280, 7203, 15414, 13, 14116, 4943, 355, 277, 25, 198, 220, 220, 220, 220, 220, 220, 220, 8246, 796, 277, 13, 961, 3419, 628, 220, 220, 22...
2.525424
118
import codecs import json import rank import train_ranker #Files to be present in home dir TRAINING_FILE_CITIES = 'manual_7_cities.jl' TRAINING_FILE_NAMES = 'manual_50_names.jl' TRAINING_FILE_ETHNICITIES = 'manual_50_ethnicities.jl' ACTUAL_FILE_CITIES = 'manual_50_cities.jl' ACTUAL_FILE_NAMES = 'manual_50_names.jl' A...
[ 11748, 40481, 82, 198, 11748, 33918, 198, 198, 11748, 4279, 198, 11748, 4512, 62, 43027, 263, 198, 198, 2, 25876, 284, 307, 1944, 287, 1363, 26672, 198, 51, 3861, 1268, 2751, 62, 25664, 62, 34, 30383, 796, 705, 805, 723, 62, 22, 62,...
2.415531
734
''' Calculat the leap year''' from datetime import date year = int(input('What year do you want to analyse? Type 0 for the current year.')) if year == 0: year = date.today().year if year%4 ==0 and year%100 != 0 or year%400 == 0: print(F"The year {year} it's a LEAP year.".) else: print(F"The year {year} isn'...
[ 7061, 6, 27131, 265, 262, 16470, 614, 7061, 6, 198, 6738, 4818, 8079, 1330, 3128, 198, 1941, 796, 493, 7, 15414, 10786, 2061, 614, 466, 345, 765, 284, 39552, 30, 5994, 657, 220, 329, 262, 1459, 614, 2637, 4008, 198, 361, 614, 6624, ...
2.823529
119
#!/usr/bin/env python #coding=utf-8 import numpy if __name__ == "__main__": task_list = get_task_list() for task in task_list: print "%d\t%d" % (task.cpu, task.mem)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 66, 7656, 28, 40477, 12, 23, 198, 198, 11748, 299, 32152, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 4876, 62, 4868, 796, 651, 62, 35...
2.152941
85
# This is an empty python file to expose this directory to it's parent
[ 2, 770, 318, 281, 6565, 21015, 2393, 284, 15651, 428, 8619, 284, 340, 338, 2560, 198 ]
4.4375
16
import os import cv2 from sklearn.cluster import KMeans, DBSCAN, MiniBatchKMeans from scipy import spatial from sklearn.preprocessing import StandardScaler import numpy as np from tqdm import tqdm import argparse parser = argparse.ArgumentParser(description='Challenge presentation example') parser.add_argument('--data...
[ 11748, 28686, 198, 11748, 269, 85, 17, 198, 6738, 1341, 35720, 13, 565, 5819, 1330, 509, 5308, 504, 11, 360, 4462, 44565, 11, 12558, 33, 963, 42, 5308, 504, 198, 6738, 629, 541, 88, 1330, 21739, 198, 6738, 1341, 35720, 13, 3866, 369...
2.237354
1,799
""" Prepare training, validation, and testing data after preprocessing of the large dataset. Used in training and evaluating models. """ import numpy as np import pandas as pd from sklearn.model_selection import train_test_split def feature_selection(data, features): """ Choose which features to use for trai...
[ 37811, 198, 37534, 533, 3047, 11, 21201, 11, 290, 4856, 1366, 706, 662, 36948, 286, 262, 1588, 27039, 13, 16718, 287, 198, 34409, 290, 22232, 4981, 13, 198, 37811, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, ...
3.061269
457
#!/usr/bin/env python ############################################################### # \package CyberRadioDriver.radio # # \brief Defines basic functionality for radio handler objects. # # \note This module defines basic behavior only. To customize # a radio handler class for a particular radio, derive a new # ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 29113, 14468, 7804, 4242, 21017, 198, 2, 3467, 26495, 15101, 26093, 32103, 13, 37004, 198, 2, 220, 198, 2, 3467, 65, 3796, 2896, 1127, 4096, 11244, 329, 5243, 21360, 5563, 13, 198, 2, ...
2.740954
13,874
from typing import List, Tuple import numpy as np from alpha_zero.Board import Board
[ 6738, 19720, 1330, 7343, 11, 309, 29291, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 17130, 62, 22570, 13, 29828, 1330, 5926, 628 ]
3.52
25
""" Project : bugaboo Filename : forms.py Author : zhancongc Description : """ from flask_wtf import FlaskForm from wtforms import StringField, BooleanField, TextAreaField, SelectField, FileField, IntegerField, PasswordField, SubmitField from wtforms.validators import DataRequired
[ 37811, 198, 16775, 220, 220, 220, 220, 1058, 5434, 397, 2238, 198, 35063, 220, 220, 220, 1058, 5107, 13, 9078, 198, 13838, 220, 220, 220, 220, 220, 1058, 1976, 71, 1192, 506, 66, 198, 11828, 1058, 220, 198, 37811, 198, 198, 6738, 42...
3.212766
94
import pandas as pd import numpy as np from tqdm import tqdm
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 628 ]
2.818182
22
from django.shortcuts import render from django.utils import timezone from todo.models import Todo from django.http import HttpResponseRedirect
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 198, 6738, 284, 4598, 13, 27530, 1330, 309, 24313, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 7738, 1060, 198 ]
3.692308
39
import random category = ['python', 'java', 'kotlin', 'javascript'] computer = random.choice(category) hidden = list(len(computer) * "-") print("H A N G M A N") counter = 8 while counter > 0: print() print("".join(hidden)) letter = input("Input a letter: ") if (letter in hidden) or (letter in hidden...
[ 11748, 4738, 201, 198, 201, 198, 22872, 796, 37250, 29412, 3256, 705, 12355, 3256, 705, 74, 313, 2815, 3256, 705, 37495, 20520, 201, 198, 33215, 796, 4738, 13, 25541, 7, 22872, 8, 201, 198, 30342, 796, 1351, 7, 11925, 7, 33215, 8, 1...
2.590476
315
# -*- coding: utf-8 -*- """ task """ __author__ = "XuWeitao" import CommonUtilities import rawSql def getTasksList(UserID): """ :param UserID:IDALL :return:{ "SerialNo":, "CreateTime":, "LastModifiedTime":, "ProductNo":, "ColorNo":, "ArriveTime":, "Name":, "GongYingShang":{"id":, "name":}, "WuLiao":{"...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 35943, 198, 37811, 198, 834, 9800, 834, 796, 366, 55, 84, 1135, 5350, 78, 1, 198, 11748, 8070, 18274, 2410, 198, 11748, 8246, 50, 13976, 198, 198, 4299, 65...
2.206609
2,754
# coding=utf-8 # Copyright 2017 The Tensor2Tensor Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 2177, 383, 309, 22854, 17, 51, 22854, 46665, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2...
2.556661
4,121
import pytest from datetime import date, timedelta from adapters import repository from domain.model import Batch, OrderLine, allocate, OutOfStock from domain import model from service_layer import handlers, unit_of_work today = date.today() tomorrow = today + timedelta(days=1) later = tomorrow + timedelta(days=1...
[ 11748, 12972, 9288, 198, 6738, 4818, 8079, 1330, 3128, 11, 28805, 12514, 198, 198, 6738, 46363, 1330, 16099, 198, 6738, 7386, 13, 19849, 1330, 347, 963, 11, 8284, 13949, 11, 31935, 11, 3806, 5189, 26207, 198, 6738, 7386, 1330, 2746, 198...
3.569892
93
import FWCore.ParameterSet.Config as cms electronEfficiencyThresholds = [36, 68, 128, 176] electronEfficiencyBins = [] electronEfficiencyBins.extend(list(xrange(0, 120, 10))) electronEfficiencyBins.extend(list(xrange(120, 180, 20))) electronEfficiencyBins.extend(list(xrange(180, 300, 40))) electronEfficiencyBins.exte...
[ 11748, 48849, 14055, 13, 36301, 7248, 13, 16934, 355, 269, 907, 198, 198, 9509, 1313, 36, 35590, 817, 10126, 82, 796, 685, 2623, 11, 8257, 11, 13108, 11, 26937, 60, 198, 198, 9509, 1313, 36, 35590, 33, 1040, 796, 17635, 198, 9509, 1...
2.649852
674
#!python # external import numpy as np import numba
[ 2, 0, 29412, 198, 198, 2, 7097, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 997, 7012, 628, 628, 628, 628, 628, 628, 628 ]
2.75
24
tokens = input().split(' ') print(result(tokens))
[ 198, 198, 83, 482, 641, 796, 5128, 22446, 35312, 10786, 705, 8, 198, 198, 4798, 7, 20274, 7, 83, 482, 641, 4008 ]
2.363636
22
# Order must match format junk # NOTIFY_ALL is kinda special, if you registerNotifier # with it, you get ALL notifications. NOTIFY_ALL = 0 # Get all notifications NOTIFY_SIGNAL = 1 # Callback on signal/exception NOTIFY_BREAK = 2 # Callback on breakpoint / sigtrap NOTIFY_STEP = 3 # Callback...
[ 2, 8284, 1276, 2872, 5794, 18556, 198, 2, 5626, 5064, 56, 62, 7036, 318, 17855, 2041, 11, 611, 345, 7881, 3673, 7483, 198, 2, 351, 340, 11, 345, 651, 11096, 19605, 13, 198, 11929, 5064, 56, 62, 7036, 796, 657, 220, 220, 220, 220, ...
2.584746
590
# Purpose: Grouping entities by DXF attributes or a key function. # Copyright (c) 2017-2021, Manfred Moitzi # License: MIT License from typing import Iterable, Hashable, Dict, List, TYPE_CHECKING from ezdxf.lldxf.const import DXFValueError, DXFAttributeError if TYPE_CHECKING: from ezdxf.eztypes import DXFEntity, ...
[ 2, 32039, 25, 4912, 278, 12066, 416, 19393, 37, 12608, 393, 257, 1994, 2163, 13, 198, 2, 15069, 357, 66, 8, 2177, 12, 1238, 2481, 11, 1869, 39193, 4270, 4224, 72, 198, 2, 13789, 25, 17168, 13789, 198, 6738, 19720, 1330, 40806, 540, ...
2.447626
1,327
# coding=utf-8 import unittest from companycase import CompanyCase if __name__ == '__main__': unittest.main()
[ 2, 19617, 28, 40477, 12, 23, 198, 11748, 555, 715, 395, 198, 6738, 1664, 7442, 1330, 5834, 20448, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 628 ]
2.853659
41
#!/usr/bin/env python3 import os import tqdm import torch import random import numpy as np import torch.nn as nn import configargparse import torch.optim as optim from tensorboard import program from torch.utils.tensorboard import SummaryWriter import yaml from models import FeatureNet from datasets import get_datase...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 28686, 198, 11748, 256, 80, 36020, 198, 11748, 28034, 198, 11748, 4738, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 4566, ...
3.464516
155
# from .panos import PanosSkillet # from .docker import DockerSkillet # from .pan_validation import PanValidationSkillet # from .python3 import Python3Skillet # from .rest import RestSkillet # from .template import TemplateSkillet # from .workflow import WorkflowSkillet
[ 2, 422, 764, 6839, 418, 1330, 5961, 418, 15739, 32512, 198, 2, 422, 764, 45986, 1330, 25716, 15739, 32512, 198, 2, 422, 764, 6839, 62, 12102, 341, 1330, 5961, 7762, 24765, 15739, 32512, 198, 2, 422, 764, 29412, 18, 1330, 11361, 18, ...
3.662162
74
""" Views for the rss_proxy djangoapp. """ import requests from django.conf import settings from django.core.cache import cache from django.http import HttpResponse, HttpResponseNotFound from lms.djangoapps.rss_proxy.models import WhitelistedRssUrl CACHE_KEY_RSS = "rss_proxy.{url}" def proxy(request): """ ...
[ 37811, 198, 7680, 82, 329, 262, 374, 824, 62, 36436, 42625, 14208, 1324, 13, 198, 37811, 628, 198, 11748, 7007, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 7295, 13, 23870, 1330, 12940, 198, 6738, 42625,...
2.337255
510
#!/usr/bin/env python numTemp = raw_input('Enter a number: ') num = int(numTemp) if num > 0: print '>0' elif num ==0: print '0' else: print '<0'
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 22510, 30782, 796, 8246, 62, 15414, 10786, 17469, 257, 1271, 25, 705, 8, 198, 22510, 796, 493, 7, 22510, 30782, 8, 198, 198, 361, 997, 1875, 657, 25, 198, 197, 4798, 705, 29, 15, 6...
2.191176
68
from django.conf.urls import url from .views import * app_name = "accounts" urlpatterns = [ url(r"^signup/$", CustomSignupView.as_view(), name="custom_signup"), url(r"^destroy/$", AjaxLogoutView.as_view(), name="destroy"), url(r"^(?P<username>[\w.@+-]+)/$", ProfileView.as_view(), name="profile"), ]
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 6738, 764, 33571, 1330, 1635, 198, 198, 1324, 62, 3672, 796, 366, 23317, 82, 1, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 19016, 7, 81, 1, 61, 12683, 929, 32...
2.492063
126
#!/usr/bin/env python Description: Load topology in Mininet Author: James Hongyi Zeng (hyzeng_at_stanford.edu) ''' from argparse import ArgumentParser from socket import gethostbyname from os import getuid from mininet.log import lg, info from mininet.cli import CLI from mininet.net import Mininet from ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 628, 220, 220, 220, 220, 198, 220, 220, 220, 12489, 25, 8778, 1353, 1435, 287, 1855, 42504, 198, 220, 220, 220, 6434, 25, 3700, 9764, 48111, 1168, 1516, 357, 12114, 89, 1516, 62, 265, 62,...
2.087898
3,925
""" Test a site with translated content. Do not test titles as we remove the translation. """ import io import os import shutil import lxml.html import pytest import nikola.plugins.command.init from nikola import __main__ from .helper import cd from .test_empty_build import ( # NOQA test_archive_exists, t...
[ 37811, 198, 14402, 257, 2524, 351, 14251, 2695, 13, 198, 198, 5211, 407, 1332, 8714, 355, 356, 4781, 262, 11059, 13, 198, 37811, 198, 198, 11748, 33245, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 198, 11748, 300, 19875, 13, 6494, ...
2.636569
443
import argparse import os import torch import torch.nn.functional as F from model_ST import * import data import numpy as np import matplotlib.pyplot as plt from torch.utils.data import Dataset, DataLoader import sys from predict import evaluate_MA from tensorboardX import SummaryWriter # print model parameter # Trai...
[ 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 6738, 2746, 62, 2257, 1330, 1635, 198, 11748, 1366, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, ...
2.357964
3,654
"""Raised to quit.""" from illud.exception import IlludException
[ 37811, 21762, 1417, 284, 11238, 526, 15931, 198, 6738, 2801, 463, 13, 1069, 4516, 1330, 5821, 463, 16922, 628 ]
3.473684
19
#!/usr/bin/env python import cv2 import numpy as np import os import glob import itertools import json from numpy.core.fromnumeric import argmax #SECTION 1: UNDISTORT FISHEYE #Read in OpenCV compatible instrinsics & distortion coeffs COLOR_INTRINSIC = np.load('./savedCoeff/colorIntr.npy') COLOR_DIST = np.load('./sav...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 15095, 198, 11748, 340, 861, 10141, 198, 11748, 33918, 198, 6738, 299, 32152, 13, 7295, 13, ...
2.315574
488
import pytest from hypothesis import given from hypothesis.strategies import data from numpy import array, array_equal from tests.strategies import indices, tensor_data from tinytorch.tensor.data import ( IndexingError, TensorData, broadcast_index, shape_broadcast, ) # Check basic properties of layout...
[ 11748, 12972, 9288, 198, 6738, 14078, 1330, 1813, 198, 6738, 14078, 13, 2536, 2397, 444, 1330, 1366, 198, 6738, 299, 32152, 1330, 7177, 11, 7177, 62, 40496, 198, 198, 6738, 5254, 13, 2536, 2397, 444, 1330, 36525, 11, 11192, 273, 62, 7...
2.251719
727
from django.apps import AppConfig from terra_accounts.permissions_mixins import PermissionRegistrationMixin
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 198, 6738, 1059, 430, 62, 23317, 82, 13, 525, 8481, 62, 19816, 1040, 1330, 2448, 3411, 47133, 35608, 259, 628 ]
3.892857
28
#!/usr/bin/env python # Copyright 2021 Jian Wu # License: Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) from typing import List, Union from aps.tokenizer.base import TokenizerAbc, ApsTokenizer
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 15069, 33448, 40922, 18027, 198, 2, 13789, 25, 24843, 362, 13, 15, 357, 4023, 1378, 2503, 13, 43073, 13, 2398, 14, 677, 4541, 14, 43, 2149, 24290, 12, 17, 13, 15, 8, 198, ...
2.888889
72
import os from unittest import mock import pytest import requests from constants import VALID_KEY from utils import FunctionCalledException, function_called_raiser from astrometry_net_client import Session from astrometry_net_client.exceptions import APIKeyError, LoginFailedException some_key = "somekey" # Start o...
[ 11748, 28686, 198, 6738, 555, 715, 395, 1330, 15290, 198, 198, 11748, 12972, 9288, 198, 11748, 7007, 198, 6738, 38491, 1330, 26173, 2389, 62, 20373, 198, 6738, 3384, 4487, 1330, 15553, 34, 4262, 16922, 11, 2163, 62, 7174, 62, 430, 5847,...
3.580645
93
import ast import os.path from typing import Iterable from packaging.requirements import InvalidRequirement from packaging.requirements import Requirement from packaging.utils import canonicalize_name from all_repos_depends.errors import DependsError from all_repos_depends.types import Depends NAME = 'python'
[ 11748, 6468, 198, 11748, 28686, 13, 6978, 198, 6738, 19720, 1330, 40806, 540, 198, 198, 6738, 16846, 13, 8897, 18883, 1330, 17665, 16844, 24615, 198, 6738, 16846, 13, 8897, 18883, 1330, 9394, 24615, 198, 6738, 16846, 13, 26791, 1330, 4009...
3.843373
83
from os import listdir from os.path import isfile, join default_applications = ['Utilities','App Store.app','Automator.app','Calculator.app','Calendar.app','Chess.app','Contacts.app','Dashboard.app','Dictionary.app','DVD Player.app','FaceTime.app','Font Book.app','iBooks.app','Image Capture.app','iTunes.app','Launchpa...
[ 6738, 28686, 1330, 1351, 15908, 198, 6738, 28686, 13, 6978, 1330, 318, 7753, 11, 4654, 198, 198, 12286, 62, 1324, 677, 602, 796, 37250, 18274, 2410, 41707, 4677, 9363, 13, 1324, 41707, 38062, 1352, 13, 1324, 41707, 9771, 3129, 1352, 13,...
2.926219
759
"""StdoutItem class""" from dataclasses import asdict, dataclass from .hark_serialisable import HarkSerialisable, now_str
[ 37811, 1273, 67, 448, 7449, 1398, 37811, 198, 6738, 4818, 330, 28958, 1330, 355, 11600, 11, 4818, 330, 31172, 198, 198, 6738, 764, 71, 668, 62, 46911, 43942, 1330, 367, 668, 32634, 43942, 11, 783, 62, 2536, 628 ]
3.263158
38
# coding: utf-8
[ 2, 19617, 25, 3384, 69, 12, 23, 628 ]
2.125
8
""" Contains database models """ from sqlalchemy import Column, ForeignKey, Integer, String, Float from sqlalchemy.orm import relationship from .database import Base
[ 37811, 198, 4264, 1299, 6831, 4981, 198, 37811, 198, 6738, 44161, 282, 26599, 1330, 29201, 11, 8708, 9218, 11, 34142, 11, 10903, 11, 48436, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 2776, 198, 198, 6738, 764, 48806, 1330, 7308, 628 ]
4.097561
41
# a = rwh_primes2(100) # print(a) # http://stackoverflow.com/questions/2068372/fastest-way-to-list-all-primes-below-n-in-python/3035188#3035188 """ Input n>=6, Returns a list of primes, 2 <= p < n """ print(sieve_for_primes_to(3)) print(sieve_for_primes_to(1)) print(sieve_for_primes_to(100))
[ 201, 198, 2, 257, 796, 374, 1929, 62, 1050, 999, 17, 7, 3064, 8, 201, 198, 2, 3601, 7, 64, 8, 201, 198, 201, 198, 2, 2638, 1378, 25558, 2502, 11125, 13, 785, 14, 6138, 507, 14, 1238, 3104, 36720, 14, 7217, 395, 12, 1014, 12, ...
2.125
144
import numpy as np import matplotlib.pyplot as plt import copy k = 4 ratio=0.95 # push the competitive center if __name__ == '__main__': competitive_k_means()
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 4866, 198, 74, 796, 604, 198, 10366, 952, 28, 15, 13, 3865, 198, 198, 2, 4574, 262, 7606, 3641, 198, 198, 361, 11593, 3672, 834...
2.704918
61
""" Defines a Redshift class which encapsulates a database connection and utility functions for managing that database. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import os import psycopg2 from shiftmanager.mixins import AdminMixin, ReflectionMix...
[ 37811, 198, 7469, 1127, 257, 2297, 30846, 1398, 543, 32652, 15968, 257, 6831, 4637, 198, 392, 10361, 5499, 329, 11149, 326, 6831, 13, 198, 37811, 198, 198, 6738, 11593, 37443, 834, 1330, 357, 48546, 62, 11748, 11, 7297, 11, 3601, 62, ...
3.229508
122
#Python 3.4.3 #coding=gbk # copy file wangyuxia 20160920 import sys, shutil, os, string path = "E:\\test for qgis\\" target_path = "E:\\test for qgis\\HourScale\\" for i in range(2,31): for j in range(0,24): filename = 'N'+str(i).zfill(2)+str(j).zfill(2) shutil.copyfile(path+'d_02.hdr',target_pat...
[ 2, 37906, 513, 13, 19, 13, 18, 198, 2, 66, 7656, 28, 22296, 74, 198, 2, 4866, 2393, 220, 266, 648, 88, 2821, 544, 1584, 2931, 1238, 198, 198, 11748, 25064, 11, 4423, 346, 11, 28686, 11, 4731, 198, 6978, 796, 366, 36, 25, 6852, ...
2.174157
178
import sys from scipy.special import softmax import torch.onnx import onnxruntime as ort import numpy as np import tensorflow as tf from tensorflow.keras import backend as K from pytorch2keras.converter import pytorch_to_keras from models.faceboxes import FaceBoxes input_dim = 1024 num_classes = 2 model_path = "weig...
[ 11748, 25064, 198, 6738, 629, 541, 88, 13, 20887, 1330, 2705, 9806, 198, 198, 11748, 28034, 13, 261, 77, 87, 198, 11748, 319, 77, 87, 43282, 355, 393, 83, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, ...
2.572235
886
from setuptools import setup setup(name='pysteamcmd', version='0.1.2', description='Python package to install and utilize steamcmd', url='http://github.com/f0rkz/pysteamcmd', author='f0rkz', author_email='f0rkz@f0rkznet.net', license='MIT', packages=['pysteamcmd'], insta...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 40406, 7, 3672, 11639, 9078, 21465, 28758, 3256, 198, 220, 220, 220, 220, 220, 2196, 11639, 15, 13, 16, 13, 17, 3256, 198, 220, 220, 220, 220, 220, 6764, 11639, 37906, 5301, 284, 2721, ...
2.265823
158
# Copyright (c) 2017, 2018 Jae-jun Kang # See the file LICENSE for details. from x2py.event_factory import EventFactory from x2py.links.link_events import * from x2py.links.strategy import ChannelStrategy from x2py.util.trace import Trace
[ 2, 15069, 357, 66, 8, 2177, 11, 2864, 34521, 12, 29741, 27504, 198, 2, 4091, 262, 2393, 38559, 24290, 329, 3307, 13, 198, 198, 6738, 2124, 17, 9078, 13, 15596, 62, 69, 9548, 1330, 8558, 22810, 198, 6738, 2124, 17, 9078, 13, 28751, ...
3.213333
75
import os import sys import json import time import tqdm import socket import subprocess import numpy as np import visdom from typing import Tuple from typing import Optional
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 33918, 198, 11748, 640, 198, 11748, 256, 80, 36020, 198, 11748, 17802, 198, 11748, 850, 14681, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 1490, 3438, 198, 198, 6738, 19720, 1330, 309,...
3.714286
49
import os import time from sqlalchemy import create_engine, BigInteger, UnicodeText, Column, Integer from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker, scoped_session from sqlalchemy.exc import SQLAlchemyError from aiogram import Bot, Dispatcher, executor, types from aiogr...
[ 11748, 28686, 198, 11748, 640, 198, 198, 6738, 44161, 282, 26599, 1330, 2251, 62, 18392, 11, 4403, 46541, 11, 34371, 8206, 11, 29201, 11, 34142, 198, 6738, 44161, 282, 26599, 13, 2302, 13, 32446, 283, 876, 1330, 2377, 283, 876, 62, 86...
3.139241
316
import numpy as np import cvnn.layers as complex_layers import tensorflow as tf from pdb import set_trace if __name__ == '__main__': test_functional_api() test_regression() test_cifar()
[ 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 20471, 13, 75, 6962, 355, 3716, 62, 75, 6962, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 279, 9945, 1330, 900, 62, 40546, 628, 628, 628, 198, 361, 11593, 3672, 834, 6624, ...
2.649351
77
"""Write a subset of keys from one CSV to another. Don't use lots of memory. Usage: %s <filename> <outputfile> [--columns=<columns>] [--htm] [--racol=<racol>] [--deccol=<deccol>] [--filtercol=<filtercol>] %s (-h | --help) %s --version Options: -h --help Show this screen. --version ...
[ 37811, 16594, 257, 24637, 286, 8251, 422, 530, 44189, 284, 1194, 13, 2094, 470, 779, 6041, 286, 4088, 13, 198, 198, 28350, 25, 198, 220, 4064, 82, 1279, 34345, 29, 1279, 22915, 7753, 29, 685, 438, 28665, 82, 28, 27, 28665, 82, 37981...
2.42823
418
""" A binary tree is univalued if every node in the tree has the same value. Return trueif and only if the given tree is univalued. Example 1: Input: [1,1,1,1,1,null,1] Output: true Example 2: Input: [2,2,2,5,2] Output: false Note: The number of nodes in the given tree will be in the range [1, 100]. E...
[ 37811, 198, 198, 32, 13934, 5509, 318, 555, 2473, 1739, 611, 790, 10139, 287, 262, 5509, 468, 262, 976, 1988, 13, 198, 13615, 2081, 361, 290, 691, 611, 262, 1813, 5509, 318, 555, 2473, 1739, 13, 198, 198, 16281, 352, 25, 628, 201, ...
2.557604
217
#!/usr/bin/env python """ _GetParentStatus_ MySQL implementation of DBSBufferFile.GetParentStatus """ from WMCore.Database.DBFormatter import DBFormatter
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 62, 3855, 24546, 19580, 62, 198, 198, 3666, 17861, 7822, 286, 360, 4462, 28632, 8979, 13, 3855, 24546, 19580, 198, 37811, 628, 628, 198, 6738, 370, 9655, 382, 13, 38105, 13...
3.18
50