content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
import fractions from pprint import pprint lcm_limit = 32 octave_limit = 4 candidates = [(x, y) for x in range(1, lcm_limit + 1) for y in range(1, lcm_limit + 1)] candidates = [c for c in candidates if fractions.gcd(c[0], c[1]) == 1 and c[0] * c[1] <= lcm_limit and 1 / octave_limit <= c[0] / c[1] <= octave_limit] ...
[ 11748, 49876, 198, 6738, 279, 4798, 1330, 279, 4798, 198, 198, 75, 11215, 62, 32374, 796, 3933, 198, 38441, 1015, 62, 32374, 796, 604, 198, 198, 46188, 37051, 796, 47527, 87, 11, 331, 8, 329, 2124, 287, 2837, 7, 16, 11, 300, 11215, ...
2.402367
169
# # @lc app=leetcode id=24 lang=python3 # # [24] Swap Nodes in Pairs # # @lc code=start # Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None # @lc code=end
[ 2, 198, 2, 2488, 44601, 598, 28, 293, 316, 8189, 4686, 28, 1731, 42392, 28, 29412, 18, 198, 2, 198, 2, 685, 1731, 60, 48408, 399, 4147, 287, 350, 3468, 198, 2, 198, 198, 2, 2488, 44601, 2438, 28, 9688, 198, 2, 30396, 329, 1702, ...
2.172727
110
####################################################### # # CEOControl.py # Python implementation of the Class CEOControl # Generated by Enterprise Architect # Created on: 16-5-2019 12:06:10 # Original author: # ####################################################### from Models.Statement import Statement from ...
[ 29113, 14468, 4242, 21017, 198, 2, 220, 198, 2, 6123, 15988, 13, 9078, 198, 2, 11361, 7822, 286, 262, 5016, 6123, 15988, 198, 2, 2980, 515, 416, 14973, 17340, 198, 2, 15622, 319, 25, 220, 220, 220, 220, 220, 1467, 12, 20, 12, 2334...
3.824427
131
import abc import pathlib from importlib import util as importlib_util from typing import Optional, Protocol from plugins.models import MPlugin
[ 11748, 450, 66, 198, 11748, 3108, 8019, 198, 6738, 1330, 8019, 1330, 7736, 355, 1330, 8019, 62, 22602, 198, 6738, 19720, 1330, 32233, 11, 20497, 198, 198, 6738, 20652, 13, 27530, 1330, 337, 37233, 628, 198 ]
4.083333
36
# . , # ( , ). . # , ( ). # . earnings = float(input(" : ")) expenses = float(input(" : ")) if earnings > expenses: # employee = int(input(" : ")) global_Profit = earnings - expenses # employee_Profit = global_Profit / employee # print(f" {global_Pr...
[ 2, 220, 220, 220, 220, 220, 220, 220, 764, 837, 220, 220, 220, 220, 220, 220, 198, 2, 357, 220, 220, 220, 837, 220, 220, 220, 220, 220, 6739, 220, 220, 764, 220, 198, 2, 220, 220, 220, 837, 220, 220, 220, 357, 220, 220, 6739, ...
2.017094
234
import os from abc import ABCMeta, abstractmethod from types import MappingProxyType import dask.dataframe import pandas as pd def get_default_writing_options(self): """ Default options used, if no options are passed in the write functions :return: dictionary with options """ ...
[ 11748, 28686, 198, 6738, 450, 66, 1330, 9738, 48526, 11, 12531, 24396, 198, 6738, 3858, 1330, 337, 5912, 44148, 6030, 198, 198, 11748, 288, 2093, 13, 7890, 14535, 198, 11748, 19798, 292, 355, 279, 67, 628, 198, 220, 220, 220, 825, 651...
2.858025
162
print("This program calculates the area of a trapezoid.") height = float(input("Enter height of trapezoid:")) top_base_length = float(input("Enter top length of trapezoid:")) bottom_base_length = float(input("Enter bottom length of trapezoid:")) area_of_trapezoid = .5 * (top_base_length + bottom_base_length) * height p...
[ 4798, 7203, 1212, 1430, 43707, 262, 1989, 286, 257, 1291, 46057, 1868, 19570, 198, 17015, 796, 12178, 7, 15414, 7203, 17469, 6001, 286, 1291, 46057, 1868, 11097, 4008, 198, 4852, 62, 8692, 62, 13664, 796, 12178, 7, 15414, 7203, 17469, 1...
3.258621
116
"""Define actions decorator.""" import inspect import pandas as pd from typing import cast from datetime import date, datetime from typing import Callable from pumpwood_communication.exceptions import PumpWoodActionArgsException def action(info: str = "", auth_header: str = None): """ Define decorator that ...
[ 37811, 7469, 500, 4028, 11705, 1352, 526, 15931, 198, 11748, 10104, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 19720, 1330, 3350, 198, 6738, 4818, 8079, 1330, 3128, 11, 4818, 8079, 198, 6738, 19720, 1330, 4889, 540, 198, 198, 6738...
2.354289
1,527
# A binary linear classifier for MNIST digits. # # Poses a binary classification problem - is this image showing digit D (for # some D, for example "4"); trains a linear classifier to solve the problem. # # Eli Bendersky (http://eli.thegreenplace.net) # This code is in the public domain from __future__ import print_fun...
[ 2, 317, 13934, 14174, 1398, 7483, 329, 29060, 8808, 19561, 13, 198, 2, 198, 2, 350, 4629, 257, 13934, 17923, 1917, 532, 318, 428, 2939, 4478, 16839, 360, 357, 1640, 198, 2, 617, 360, 11, 329, 1672, 366, 19, 15341, 13404, 257, 14174,...
2.140434
2,535
from views import displayUserProfile
[ 6738, 5009, 1330, 3359, 12982, 37046, 198 ]
5.285714
7
#!/usr/bin/python # -*- coding: utf-8 -*- """ (https://www.kaggle.com/c/ashrae-energy-prediction). Train shape:(590540,394),identity(144233,41)--isFraud 3.5% Test shape:(506691,393),identity(141907,41) ############### TF Version: 1.13.1/Python Version: 3.7 ############### """ import os import math import random impo...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 7, 5450, 1378, 2503, 13, 74, 9460, 293, 13, 785, 14, 66, 14, 1077, 430, 68, 12, 22554, 12, 28764, 2867, ...
2.263356
1,591
import matplotlib.pyplot as plt from base.base_trainer import BaseTrainer from base.base_dataset import BaseADDataset from base.base_net import BaseNet import seaborn as sns from torch.utils.data.dataloader import DataLoader from sklearn.metrics import roc_auc_score, confusion_matrix, average_precision_score, roc_curve...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 2779, 13, 8692, 62, 2213, 10613, 1330, 7308, 2898, 10613, 198, 6738, 2779, 13, 8692, 62, 19608, 292, 316, 1330, 7308, 2885, 27354, 292, 316, 198, 6738, 2779, 13, 8692...
3.255639
133
from .load_image import load_image from .normalize_image import normalize_image from .remove_artefacts import remove_artefacts, fill_small_white_blobs, fill_small_black_blobs from .padding import trim_padding, add_padding from .inpaint import inpaint from .darken import darken from .difference_of_gaussians_pyramid impo...
[ 6738, 764, 2220, 62, 9060, 1330, 3440, 62, 9060, 198, 6738, 764, 11265, 1096, 62, 9060, 1330, 3487, 1096, 62, 9060, 198, 6738, 764, 28956, 62, 433, 891, 8656, 1330, 4781, 62, 433, 891, 8656, 11, 6070, 62, 17470, 62, 11186, 62, 2436,...
2.682927
533
#!/usr/bin/env python # coding:utf8 # @Date : 2018/8/27 # @Author : Koon # @Link : chenzeping.com # When I wrote this, only God and I understood what I was doing. Now, God only knows. if __name__ == "__main__": proxy = Proxy(RealSubject()) proxy.request()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 40477, 23, 198, 2, 2488, 10430, 220, 220, 220, 1058, 2864, 14, 23, 14, 1983, 198, 2, 2488, 13838, 220, 1058, 509, 2049, 198, 2, 2488, 11280, 220, 220, 220, 1058, 269,...
2.603774
106
from .base import BaseTest from authors.apps.articles.models import Article from rest_framework.views import status import json
[ 6738, 764, 8692, 1330, 7308, 14402, 198, 6738, 7035, 13, 18211, 13, 26845, 13, 27530, 1330, 10172, 198, 6738, 1334, 62, 30604, 13, 33571, 1330, 3722, 198, 11748, 33918, 628 ]
4.3
30
import socket import numpy import cv2 import threading import os BUFFER_SIZE = 4096*10 currentPort = 50001 buf = b'' with socket.socket(socket.AF_INET,socket.SOCK_STREAM) as portInfo: portInfo.bind(("0.0.0.0",50000)) portInfo.listen() print("aitayo") while True: (connection, client) = portInf...
[ 11748, 17802, 198, 11748, 299, 32152, 198, 11748, 269, 85, 17, 198, 11748, 4704, 278, 198, 11748, 28686, 198, 198, 19499, 45746, 62, 33489, 796, 42479, 9, 940, 198, 14421, 13924, 796, 5323, 486, 198, 198, 29325, 796, 275, 7061, 198, 1...
2.024259
371
""" Forum signal receivers ====================== This module defines signal receivers. """ from django.db.models import F from django.dispatch import receiver from machina.apps.forum.signals import forum_viewed
[ 37811, 198, 220, 220, 220, 14867, 6737, 19137, 198, 220, 220, 220, 36658, 1421, 28, 628, 220, 220, 220, 770, 8265, 15738, 6737, 19137, 13, 198, 198, 37811, 198, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 1330, 376, 198, 6738, 42625...
3.469697
66
for t in range(int(input())): r,c,k = map(int , input().split()) circuit_board = [] for i in range(r): circuit_board.append(list(map(int,input().split())))
[ 1640, 256, 287, 2837, 7, 600, 7, 15414, 28955, 2599, 198, 220, 220, 220, 374, 11, 66, 11, 74, 796, 3975, 7, 600, 837, 5128, 22446, 35312, 28955, 198, 220, 220, 220, 10349, 62, 3526, 796, 17635, 198, 220, 220, 220, 329, 1312, 287, ...
2.228916
83
# Copyright (C) 2018 Verizon. All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
[ 2, 15069, 357, 34, 8, 2864, 18062, 13, 1439, 6923, 33876, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 1378...
3.552632
228
skills_list = [ "actionscript", "ado.net", "ajax", "akka", "algorithm", "amazon-ec2", "amazon-s3", "amazon-web-services", "android", "angular", "angularjs", "ansible", "ant", "apache", "apache-camel", "apache-kafka", "apache-poi", "apache-spark", ...
[ 8135, 2171, 62, 4868, 796, 685, 198, 220, 220, 220, 366, 4658, 6519, 1600, 198, 220, 220, 220, 366, 4533, 13, 3262, 1600, 198, 220, 220, 220, 366, 1228, 897, 1600, 198, 220, 220, 220, 366, 461, 4914, 1600, 198, 220, 220, 220, 366,...
1.841451
3,059
# handler module centralize the control
[ 2, 21360, 8265, 4318, 1096, 262, 1630, 198 ]
5
8
def escape_team_names(mystr): """ temporary fix for solving ? characters in bad team names encoding from LFP's ICS calendar """ mystr = mystr.replace('N?MES','NMES') mystr = mystr.replace('SAINT-?TIENNE','SAINT-TIENNE') mystr = mystr.replace('H?RAULT', 'HRAULT') return mystr
[ 198, 4299, 6654, 62, 15097, 62, 14933, 7, 1820, 2536, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 8584, 4259, 329, 18120, 5633, 3435, 287, 2089, 1074, 3891, 21004, 198, 220, 220, 220, 422, 406, 5837, 338, 314, 7902, 11845, ...
2.520325
123
"""Plotting support"""
[ 37811, 43328, 889, 1104, 37811 ]
4.4
5
import sublime import sublime_plugin import re import webbrowser from .lib.hl7Event import * from .lib.hl7Segment import * from .lib.hl7TextUtils import * hl7EventList = hl7Event("","") hl7EventList = hl7EventList.loadEventList() hl7SegmentList = hl7Segment("","") hl7SegmentList = hl7SegmentList.loadSegmentList() S...
[ 11748, 41674, 198, 11748, 41674, 62, 33803, 198, 11748, 302, 198, 11748, 3992, 40259, 198, 6738, 764, 8019, 13, 18519, 22, 9237, 1330, 1635, 198, 6738, 764, 8019, 13, 18519, 22, 41030, 434, 1330, 1635, 198, 6738, 764, 8019, 13, 18519, ...
3.014925
201
# https://leetcode.com/problems/sort-items-by-groups-respecting-dependencies/ # graph, dfs
[ 2, 3740, 1378, 293, 316, 8189, 13, 785, 14, 1676, 22143, 14, 30619, 12, 23814, 12, 1525, 12, 24432, 12, 15008, 278, 12, 45841, 3976, 14, 198, 2, 4823, 11, 288, 9501, 198, 220, 220, 220, 220, 220, 220, 220, 220 ]
2.414634
41
#!/usr/bin/python3 import argparse import time import cv2 import glob import sys from pathlib import Path import numpy as np import pandas as pd import yaml from multiprocessing.dummy import Pool as ThreadPool sys.path.append(Path(__file__).resolve().parent.parent.as_posix()) # repo path sys.path.append(Path(__file...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 11748, 1822, 29572, 198, 11748, 640, 198, 198, 11748, 269, 85, 17, 198, 11748, 15095, 198, 11748, 25064, 198, 6738, 3108, 8019, 1330, 10644, 198, 11748, 299, 32152, 355, 45941, 198, 11748, ...
2.099108
1,009
#!/usr/bin/python # Copyright 2011 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 15069, 2813, 3012, 3457, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428...
3.469178
292
import os from cryptography.fernet import Fernet KEY = os.environ.get("DASH_APP_KEY")
[ 11748, 28686, 198, 6738, 45898, 13, 69, 1142, 316, 1330, 38982, 316, 628, 628, 198, 20373, 796, 28686, 13, 268, 2268, 13, 1136, 7203, 35, 11211, 62, 24805, 62, 20373, 4943 ]
2.870968
31
# This empty file makes the sphinxcontrib namespace package work. # It is the only file included in the 'sphinxcontrib' conda package. # Conda packages which use the sphinxcontrib namespace do not include # this file, but depend on the 'sphinxcontrib' conda package instead.
[ 2, 770, 6565, 2393, 1838, 262, 599, 20079, 87, 3642, 822, 25745, 5301, 670, 13, 198, 2, 632, 318, 262, 691, 2393, 3017, 287, 262, 705, 82, 746, 28413, 3642, 822, 6, 1779, 64, 5301, 13, 198, 2, 9724, 64, 10392, 543, 779, 262, 599...
3.666667
75
import boto3 import os import requests
[ 11748, 275, 2069, 18, 198, 11748, 28686, 198, 11748, 7007, 198 ]
3.545455
11
import eventlet import json import rest_lib import urllib import logging as log from openstack_dashboard.dashboards.project.connections import bsn_api eventlet.monkey_patch() URL_TEST_PATH = ('applications/bcf/test/path/controller-view' '[src-tenant=\"%(src-tenant)s\"]' '[src-segment...
[ 11748, 1785, 1616, 198, 11748, 33918, 198, 11748, 1334, 62, 8019, 198, 11748, 2956, 297, 571, 198, 11748, 18931, 355, 2604, 198, 6738, 1280, 25558, 62, 42460, 3526, 13, 42460, 12821, 13, 16302, 13, 8443, 507, 1330, 275, 16184, 62, 15042...
2.092233
206
# # PySNMP MIB module ROHC-MIB (http://pysnmp.sf.net) # ASN.1 source http://mibs.snmplabs.com:80/asn1/ROHC-MIB # Produced by pysmi-0.0.7 at Sun Feb 14 00:27:00 2016 # On host bldfarm platform Linux version 4.1.13-100.fc21.x86_64 by user goose # Using Python version 3.5.0 (default, Jan 5 2016, 17:11:52) # ( Integer, O...
[ 2, 198, 2, 9485, 15571, 7378, 337, 9865, 8265, 371, 12096, 34, 12, 8895, 33, 357, 4023, 1378, 79, 893, 77, 3149, 13, 28202, 13, 3262, 8, 198, 2, 7054, 45, 13, 16, 2723, 2638, 1378, 76, 571, 82, 13, 16184, 76, 489, 8937, 13, 78...
2.791292
14,331
from autogluon.features.generators import DatetimeFeatureGenerator
[ 198, 6738, 1960, 49006, 261, 13, 40890, 13, 8612, 2024, 1330, 16092, 8079, 38816, 8645, 1352, 628, 198 ]
3.888889
18
#!/usr/bin/env python import os os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID" os.environ["CUDA_VISIBLE_DEVICES"]="0" import common as cm import tensorflow as tf import numpy as np import math from scipy import stats from Bio.Seq import Seq half_size = 500 batch_size = 128 scan_step = 1 seq_len = 1001 out = [] os.chdi...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 28686, 198, 418, 13, 268, 2268, 14692, 43633, 5631, 62, 7206, 27389, 62, 12532, 1137, 8973, 2625, 5662, 40, 62, 45346, 62, 2389, 1, 198, 418, 13, 268, 2268, 14692, 43633, 5631, ...
1.983618
1,404
from strong_but_simple_passwords import views
[ 6738, 1913, 62, 4360, 62, 36439, 62, 6603, 10879, 1330, 5009, 628, 628 ]
3.769231
13
#!/usr/bin/env python3 import sys def main(*words): if len(words) < 1: print("Please provide one word or more", file=sys.stderr) return query = ' '.join(words) index = -1 for index, line in enumerate(search(query, reader())): print(line) if index == -1: print("N...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 25064, 628, 198, 4299, 1388, 46491, 10879, 2599, 198, 220, 220, 220, 611, 18896, 7, 10879, 8, 1279, 352, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7203, 5492,...
2.291429
175
import json from django.shortcuts import render, redirect, HttpResponse # Create your views here. from django.urls import reverse from app01 import models from app01.models import Book, Publish, Author, AuthorDetail
[ 11748, 33918, 198, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 18941, 11, 367, 29281, 31077, 198, 198, 2, 13610, 534, 5009, 994, 13, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 198, 6738, 598, 486, 1330, 498...
3.5
66
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Talk with a model using a Slack channel. # Examples ```shell parlai interactive_slack --token xoxb-... --task blend...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 17168, 5964, 1043, 287, 262, 198, 2, 38559, 24290, 2393, 287,...
2.938017
484
''' Includes content from another template. If you assign any keyword arguments, those will be available in the scope of that template. ''' import os from plywood import Plywood from plywood.values import PlywoodValue from plywood.exceptions import InvalidArguments from plywood.env import PlywoodEnv
[ 7061, 6, 198, 42986, 2695, 422, 1194, 11055, 13, 220, 1002, 345, 8333, 597, 21179, 7159, 11, 198, 25591, 481, 307, 1695, 287, 262, 8354, 286, 326, 11055, 13, 198, 7061, 6, 198, 11748, 28686, 198, 198, 6738, 35960, 3822, 1330, 36526, ...
3.961039
77
"""Handle M3U files generation""" import os import logging def generate(software, out_dir, suffix, dry_run): """Generate M3U file for the given software into out_dir""" m3u_filename = software.name + (suffix if suffix else '') + '.m3u' if not dry_run: m3u_fd = open(os.path.join(out_dir, m3u_file...
[ 37811, 37508, 337, 18, 52, 3696, 5270, 37811, 198, 198, 11748, 28686, 198, 11748, 18931, 628, 198, 4299, 7716, 7, 43776, 11, 503, 62, 15908, 11, 35488, 11, 5894, 62, 5143, 2599, 198, 220, 220, 220, 37227, 8645, 378, 337, 18, 52, 239...
2.25239
523
import os import sys import shutil import io # if you got module not found errors, uncomment these. PyCharm IDE does not need it. # get the abs version of . and .. and append them to this process's path. sys.path.append(os.path.abspath('..')) sys.path.append(os.path.abspath('.')) #print sys.path import unittest ...
[ 628, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 220, 4423, 346, 198, 11748, 33245, 198, 198, 2, 611, 345, 1392, 8265, 407, 1043, 8563, 11, 8820, 434, 777, 13, 9485, 1925, 1670, 33497, 857, 407, 761, 340, 13, 198, 2, 651, 262,...
2.440876
2,055
segundos_str = int(input("Por favor, entre com o nmero de segundos que deseja converter:")) dias=segundos_str//86400 segs_restantes1=segundos_str%86400 horas=segs_restantes1//3600 segs_restantes2=segs_restantes1%3600 minutos=segs_restantes2//60 segs_restantes_final=segs_restantes2%60 print(dias,"dias,",horas...
[ 325, 70, 917, 418, 62, 2536, 796, 493, 7, 15414, 7203, 47, 273, 2661, 11, 920, 260, 401, 267, 299, 647, 78, 390, 384, 70, 917, 418, 8358, 748, 68, 6592, 38394, 11097, 4008, 201, 198, 201, 198, 67, 4448, 28, 325, 70, 917, 418, ...
2.186441
177
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Dec 2 15:37:10 2020 Copyright 2020 by Hadrien Montanelli. """ # %% Imports. # Standard library imports: import numpy as np # Chebpy imports: from chebpy.cheb import chebpts, coeffs2vals, vals2coeffs # %% Transforms (1D) on [-1,1]. f = lambda x: np....
[ 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, 4280, 220, 362, 1315, 25, 2718, 25, 940, 12131, 198, 198, 15269, 12131, 416, 11161, ...
1.989474
665
import urllib import StringIO import gzip from difflib import Differ from binascii import unhexlify import Image src = urllib.urlopen('http://huge:file@www.pythonchallenge.com/pc/return/deltas.gz').read() file = gzip.GzipFile(fileobj=StringIO.StringIO(src)) left = [] right = [] for line in file.readlines(): left.ap...
[ 11748, 2956, 297, 571, 198, 11748, 10903, 9399, 198, 11748, 308, 13344, 198, 6738, 814, 8019, 1330, 10631, 263, 198, 6738, 9874, 292, 979, 72, 1330, 555, 33095, 75, 1958, 198, 11748, 7412, 198, 198, 10677, 796, 2956, 297, 571, 13, 637...
2.457627
354
import moonleap.resource.props as P from moonleap import create, extend from moonleap.utils.case import kebab_to_camel, sn from moonleap.verbs import has from titan.django_pkg.djangoapp import DjangoApp from .resources import AppModule # noqa
[ 11748, 8824, 293, 499, 13, 31092, 13, 1676, 862, 355, 350, 198, 6738, 8824, 293, 499, 1330, 2251, 11, 9117, 198, 6738, 8824, 293, 499, 13, 26791, 13, 7442, 1330, 885, 65, 397, 62, 1462, 62, 66, 17983, 11, 3013, 198, 6738, 8824, 29...
3.166667
78
# Copyright 2020 Cisco Systems, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
[ 2, 15069, 12131, 28289, 11998, 11, 3457, 13, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 407, 779, 428, 2393, 2845, 287, 118...
3.717489
223
import pytest from principal import somar from principal import sub
[ 11748, 12972, 9288, 198, 6738, 10033, 1330, 3870, 283, 198, 6738, 10033, 1330, 220, 850, 198, 220, 628, 198 ]
3.842105
19
from PIL import Image from PIL import ImageChops import pathlib import sys sys.path.append(str(pathlib.Path(__file__).parent.absolute())) import TextureConversionMain as tcm ogNormalPath = "" with open(str(pathlib.Path(__file__).parent.absolute()) + '\\' + "Temp.txt") as file: line = file.readline...
[ 6738, 350, 4146, 1330, 7412, 201, 198, 6738, 350, 4146, 1330, 7412, 1925, 2840, 201, 198, 11748, 3108, 8019, 201, 198, 11748, 25064, 201, 198, 201, 198, 17597, 13, 6978, 13, 33295, 7, 2536, 7, 6978, 8019, 13, 15235, 7, 834, 7753, 83...
2.59
200
__author__ = 'Ehsan' from mininet.node import CPULimitedHost from mininet.topo import Topo from mininet.net import Mininet from mininet.log import setLogLevel, info from mininet.node import RemoteController from mininet.cli import CLI """ Instructions to run the topo: 1. Go to directory where this fil is. 2. ru...
[ 834, 9800, 834, 796, 705, 36, 11994, 272, 6, 198, 6738, 949, 42504, 13, 17440, 1330, 9135, 37214, 17932, 198, 6738, 949, 42504, 13, 4852, 78, 1330, 5849, 78, 198, 6738, 949, 42504, 13, 3262, 1330, 1855, 42504, 198, 6738, 949, 42504, ...
3.043478
184
#!/usr/bin/python3 # INTEL CONFIDENTIAL # Copyright 2018-2020 Intel Corporation # The source code contained or described herein and all documents related to the # source code ("Material") are owned by Intel Corporation or its suppliers or # licensors. Title to the Material remains with Intel Corporation or its # suppl...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 2, 17828, 3698, 7102, 37, 25256, 12576, 198, 2, 15069, 2864, 12, 42334, 8180, 10501, 198, 2, 383, 2723, 2438, 7763, 393, 3417, 24028, 290, 477, 4963, 3519, 284, 262, 198, 2, 2723, ...
4.767647
340
"""Create wave training data. Automatically annotate data by identifying waves. The begining, middle and ending are obtained. Windows around these points are collected as training data. They are organized in years. """ import sys, glob, os path = os.getcwd() sys.path.insert(0, ".") from datetime import datetime from v...
[ 37811, 16447, 6769, 3047, 1366, 13, 198, 38062, 4142, 24708, 378, 1366, 416, 13720, 9813, 13, 383, 2221, 278, 11, 220, 198, 27171, 290, 7464, 389, 6492, 13, 3964, 1088, 777, 2173, 389, 198, 4033, 12609, 355, 3047, 1366, 13, 1119, 389,...
2.122365
1,708
import time from neopixel import Adafruit_NeoPixel import argparse # Pixel class corresponds to a light strip # It stores the strip, characteristics, and state
[ 11748, 640, 198, 6738, 497, 404, 7168, 1330, 1215, 1878, 4872, 62, 8199, 78, 40809, 198, 11748, 1822, 29572, 628, 198, 2, 11349, 1398, 24866, 284, 257, 1657, 10283, 198, 2, 632, 7000, 262, 10283, 11, 9695, 11, 290, 1181, 628, 198 ]
3.904762
42
__version__ = '3.6.0.1'
[ 834, 9641, 834, 796, 705, 18, 13, 21, 13, 15, 13, 16, 6, 198 ]
1.714286
14
import sublime from ..SublimeCscope import PACKAGE_NAME SETTING_DEFAULTS = { 'index_file_extensions': [ ".c", ".cc", ".cpp", ...
[ 198, 11748, 41674, 198, 198, 6738, 11485, 7004, 27299, 34, 29982, 1330, 47035, 11879, 62, 20608, 198, 198, 28480, 48996, 62, 7206, 7708, 35342, 796, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220,...
1.236686
845
import os import re from string import letters import random import hashlib import hmac import webapp2 import jinja2 from jinja2 import Environment from google.appengine.ext import db from utils.Utils import Utils from models.Comment import Comment from models.Post import Post from models.User import User from han...
[ 11748, 28686, 198, 11748, 302, 198, 6738, 4731, 1330, 7475, 198, 11748, 4738, 198, 11748, 12234, 8019, 198, 11748, 289, 20285, 198, 198, 11748, 3992, 1324, 17, 198, 11748, 474, 259, 6592, 17, 198, 6738, 474, 259, 6592, 17, 1330, 9344, ...
3.068282
454
import ast, _ast, subprocess, os, argparse if __name__ == '__main__': parser = argparse.ArgumentParser(description='Populate serializers, views, urls, and admin based on models.py') parser.add_argument('--disable_venv', help='Disable creation of virtual environment', action="store_true") parser.add_argumen...
[ 11748, 6468, 11, 4808, 459, 11, 850, 14681, 11, 28686, 11, 1822, 29572, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 30751, 796, 1822, 29572, 13, 28100, 1713, 46677, 7, 11213, 11639, 16979, 5...
2.689855
345
from abc import ABC, abstractmethod from typing import Callable
[ 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 198, 6738, 19720, 1330, 4889, 540, 628 ]
4.333333
15
import sys from django.shortcuts import render from django.shortcuts import render_to_response from django.http import Http404, HttpResponse, HttpResponseRedirect from .forms import SearchForm from .models import Search #add options for popular, recent, no. of results, #todo: get tweets by above function and use id...
[ 11748, 25064, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 62, 1462, 62, 26209, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 26429, 11, 367, 29281, 31077, 11, 367, ...
3.490066
151
from datetime import datetime from calendar import timegm from rest_framework_jwt.compat import get_username, get_username_field from rest_framework_jwt.settings import api_settings def jwt_otp_payload(user, device = None): """ Opcionalmente inclui o Device TOP no payload do JWT """ username_field = ...
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 11845, 1330, 640, 39870, 198, 198, 6738, 1334, 62, 30604, 62, 73, 46569, 13, 5589, 265, 1330, 651, 62, 29460, 11, 651, 62, 29460, 62, 3245, 198, 6738, 1334, 62, 30604, 62, 73, 46569, 13...
2.449749
398
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Sep 15 18:36:44 2021 @author: aiswarya """ #import sys #sys.path.append('/home/aiswarya/bayesvp') from bayesvp.scripts import bvp_write_config as wc from bayesvp.scripts import bvp_process_model as pm from bayesvp.scripts import bvpfit as fit from baye...
[ 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, 8621, 1315, 1248, 25, 2623, 25, 2598, 33448, 198, 198, 31, 9800, 25, 257, 271, 86, ...
2.417407
563
""" This script load and tally the result of UCF24 dataset in latex format. """ import os import json if __name__ == '__main__': base = '/mnt/mercury-alpha/ucf24/cache/resnet50' modes = [['frames',['frame_actions', 'action_ness', 'action']], ['video',['action',]]] logger = open('results_ucf2...
[ 198, 198, 37811, 198, 1212, 4226, 3440, 290, 26767, 262, 1255, 286, 14417, 37, 1731, 27039, 287, 47038, 5794, 13, 198, 37811, 198, 198, 11748, 28686, 198, 11748, 33918, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354,...
1.499197
2,492
# -*- coding: utf-8 -*- """ author:wnl date: 2018-12-7 """ import os from sayhello import app dev_db = 'mysql+pymysql://root:root.123@192.168.100.105:3306/sayhello2' SECRET_KEY = os.getenv('SECRRET','secret string') SQLALCHEMY_TRACK_MODIFICATIONS = False SQLALCHEMY_DATABASE_URI = os.getenv('DATABASE_URI',dev_db)...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 220, 1772, 25, 675, 75, 198, 220, 3128, 25, 2864, 12, 1065, 12, 22, 198, 37811, 198, 11748, 28686, 198, 198, 6738, 910, 31373, 1330, 598, 198, 198, 7959, ...
2.251748
143
""" =============== === Purpose === =============== Downloads wiki access logs and stores unprocessed article counts See also: wiki.py Note: for maximum portability, this program is compatible with both Python2 and Python3 and has no external dependencies (e.g. running on AWS) ================= === Changelog === =...
[ 37811, 198, 25609, 18604, 198, 18604, 32039, 24844, 198, 25609, 18604, 198, 198, 10002, 82, 22719, 1895, 17259, 290, 7000, 555, 14681, 276, 2708, 9853, 198, 198, 6214, 635, 25, 22719, 13, 9078, 198, 6425, 25, 329, 5415, 2493, 1799, 11, ...
2.889137
1,344
# write_results_to_file def test_write_results_to_file_interface(): """ is the basic file writter wraper working as indended """ from aiida_fleur.tools.io_routines import write_results_to_file from os.path import isfile, abspath from os import remove #import os from numpy import array...
[ 628, 198, 2, 3551, 62, 43420, 62, 1462, 62, 7753, 198, 4299, 1332, 62, 13564, 62, 43420, 62, 1462, 62, 7753, 62, 39994, 33529, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 318, 262, 4096, 2393, 1991, 353, 7917, 525, 1762, 355, 7...
2.608501
447
from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware from app import db, viz, eligibility, metrics, geocode app = FastAPI( title='DS API - Family Promise', docs_url='/', version='0.39.6', ) app.include_router(db.router, tags=['Database']) app.include_router(viz.router, tags=['V...
[ 6738, 3049, 15042, 1330, 12549, 17614, 198, 6738, 3049, 15042, 13, 27171, 1574, 13, 66, 669, 1330, 23929, 12310, 2509, 1574, 198, 198, 6738, 598, 1330, 20613, 11, 48569, 11, 20069, 11, 20731, 11, 4903, 420, 1098, 628, 198, 1324, 796, ...
2.517751
338
""" Take a directory of images and their segmentation masks (which only contain two classes - inside and outside) and split the inside class into black and white. Save the resulting masks. """ import argparse import os import numpy as np import cv2 if __name__ == '__main__': main()
[ 37811, 198, 12322, 257, 8619, 286, 4263, 290, 511, 10618, 341, 20680, 357, 4758, 691, 3994, 734, 6097, 532, 2641, 290, 2354, 8, 198, 392, 6626, 262, 2641, 1398, 656, 2042, 290, 2330, 13, 12793, 262, 7186, 20680, 13, 198, 37811, 198, ...
3.617284
81
import uuid import unittest import warnings import json from syngenta_digital_dta.elasticsearch.es_connector import ESConnector from tests.syngenta_digital_dta.elasticsearch.mocks import MockESAdapter
[ 11748, 334, 27112, 198, 11748, 555, 715, 395, 198, 11748, 14601, 198, 11748, 33918, 198, 198, 6738, 827, 782, 29188, 62, 34725, 62, 67, 8326, 13, 417, 3477, 12947, 13, 274, 62, 8443, 273, 1330, 13380, 34525, 198, 6738, 5254, 13, 1837,...
3.311475
61
from typing import List, Dict from collections import defaultdict from pathlib import Path from util import save_dataset, save_word_dict, save_embedding import torch import argparse import nltk import re import logging logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(name)s - %(level...
[ 6738, 19720, 1330, 7343, 11, 360, 713, 198, 6738, 17268, 1330, 4277, 11600, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 7736, 1330, 3613, 62, 19608, 292, 316, 11, 3613, 62, 4775, 62, 11600, 11, 3613, 62, 20521, 12083, 198, 11748, 2...
2.405424
1,438
#!/usr/bin/env python # Convert text and standoff annotations into CoNLL format. import re import sys from pathlib import Path # assume script in brat tools/ directory, extend path to find sentencesplit.py sys.path.append(str(Path(__file__).parent)) sys.path.append('.') from sentencesplit import sentencebreaks_to_...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 38240, 2420, 290, 33379, 37647, 656, 1766, 45, 3069, 5794, 13, 198, 198, 11748, 302, 198, 198, 11748, 25064, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 2, 7048, 4226, 287, ...
2.337322
2,173
import pandas as pd import numpy as np import warnings import os from torch.utils.data.dataset import Dataset from PIL import Image Image.MAX_IMAGE_PIXELS = None warnings.simplefilter('ignore', Image.DecompressionBombWarning)
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 14601, 198, 11748, 28686, 198, 198, 6738, 28034, 13, 26791, 13, 7890, 13, 19608, 292, 316, 1330, 16092, 292, 316, 198, 6738, 350, 4146, 1330, 7412, 198, ...
3.164384
73
#!/usr/bin/env python # -*- coding: utf-8 -*- from collections import OrderedDict import unittest import yaml from datemike import ansible, base, utils from datemike.providers import rackspace desired_task_yaml = """name: Create Cloud Server(s) rax: exact_count: true flavor: performance1-1 image: image-ubuntu-...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 198, 11748, 555, 715, 395, 198, 11748, 331, 43695, 198, 198, 6738, 4818, ...
2.194779
498
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import division, print_function import re import json import requests if __name__ == "__main__": update_others()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 11593, 37443, 834, 1330, 7297, 11, 3601, 62, 8818, 198, 198, 11748, 302, 198, 11748, 33918, 198, 11748, 7007...
2.761194
67
import sqlalchemy as sa import datetime from haminfo.db.models.modelbase import ModelBase
[ 11748, 44161, 282, 26599, 355, 473, 198, 11748, 4818, 8079, 198, 198, 6738, 289, 5669, 6513, 13, 9945, 13, 27530, 13, 19849, 8692, 1330, 9104, 14881, 628 ]
3.407407
27
# Created by Kelvin_Clark on 3/3/2022, 4:58 PM from src import database as db
[ 2, 15622, 416, 46577, 62, 43250, 319, 513, 14, 18, 14, 1238, 1828, 11, 604, 25, 3365, 3122, 198, 6738, 12351, 1330, 6831, 355, 20613, 628, 198 ]
2.962963
27
# 2019-04-24 # John Dunne # Box plot of the data set # pandas box plot documentation: https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.boxplot.html print("The box plot will appear on the screen momentarily") import matplotlib.pyplot as pl import pandas as pd # imported the libraries needed an...
[ 2, 13130, 12, 3023, 12, 1731, 198, 2, 1757, 5648, 710, 198, 2, 8315, 7110, 286, 262, 1366, 900, 198, 2, 19798, 292, 3091, 7110, 10314, 25, 3740, 1378, 79, 392, 292, 13, 79, 5173, 1045, 13, 2398, 14, 79, 392, 292, 12, 31628, 14, ...
3.052356
382
# Generated by Django 2.1.7 on 2019-06-08 21:37 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 16, 13, 22, 319, 13130, 12, 3312, 12, 2919, 2310, 25, 2718, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
import asyncio as _asyncio import os as _os from unittest import SkipTest, expectedFailure, skip, skipIf, skipUnless # noqa from asynctest import TestCase as _TestCase from asynctest import _fail_on from tortoise import Tortoise as _Tortoise from tortoise.backends.base.client import BaseDBAsyncClient as _BaseDBAsync...
[ 11748, 30351, 952, 355, 4808, 292, 13361, 952, 198, 11748, 28686, 355, 4808, 418, 198, 6738, 555, 715, 395, 1330, 32214, 14402, 11, 2938, 50015, 11, 14267, 11, 14267, 1532, 11, 14267, 28042, 220, 1303, 645, 20402, 198, 198, 6738, 355, ...
3.089552
402
""" Common elements for both client and server ========================================== """ import enum import json def make_msg(type, payload): if payload is None: return [type.value,] return [type.value, json.dumps(payload).encode('utf8')] def parse_msg(msg): if len(msg) == 1: return ...
[ 37811, 198, 17227, 4847, 329, 1111, 5456, 290, 4382, 198, 10052, 2559, 855, 198, 198, 37811, 198, 11748, 33829, 198, 11748, 33918, 198, 198, 4299, 787, 62, 19662, 7, 4906, 11, 21437, 2599, 198, 220, 220, 220, 611, 21437, 318, 6045, 25...
2.755435
184
import torch import torchvision.datasets as datasets import torchvision.transforms as transforms import os import sys if __name__ == '__main__': if input('Are you sure to start calculating mean and std? [y/n] ') != y: exit() if len(sys.argv) != 2: print('Please specify the path of the dataset')...
[ 11748, 28034, 198, 11748, 28034, 10178, 13, 19608, 292, 1039, 355, 40522, 198, 11748, 28034, 10178, 13, 7645, 23914, 355, 31408, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198...
2.661157
242
from unittest import TestCase from bloock.infrastructure.hashing.blake2b import Blake2b from bloock.infrastructure.hashing.keccak import Keccak
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 6738, 24924, 735, 13, 10745, 6410, 13, 71, 2140, 13, 2436, 539, 17, 65, 1330, 13307, 17, 65, 198, 6738, 24924, 735, 13, 10745, 6410, 13, 71, 2140, 13, 365, 535, 461, 1330, 3873, 535, 46...
3.173913
46
# coding: utf-8 """ SimScale API The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from simscale_sdk.configuration import Configuration def to_str(self): """Returns the string representation of the...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 3184, 29990, 7824, 628, 220, 220, 220, 383, 2196, 286, 262, 4946, 17614, 3188, 25, 657, 13, 15, 13, 15, 198, 220, 220, 220, 2980, 515, 416, 25, 3740, 1378, 965...
2.581717
361
''' Repository configuration model. ''' from typing import Dict, List, Literal, Optional from .. import types from .configuration import Configuration __all__ = [ 'RepositoryConfiguration' ]
[ 7061, 6, 198, 6207, 13264, 8398, 2746, 13, 198, 7061, 6, 198, 198, 6738, 19720, 1330, 360, 713, 11, 7343, 11, 25659, 1691, 11, 32233, 198, 198, 6738, 11485, 1330, 3858, 198, 6738, 764, 11250, 3924, 1330, 28373, 628, 198, 198, 834, 4...
3.448276
58
#!/usr/bin/env python moves='UDDDUdddDDUDDddDdDddDDUDDdUUD' a=0 b=0 d=0 for m in moves: if m=='D': d += 1 if m=='U': a+=2 b*=4 b+=2*3**d d+=1 if m=='d': a+=1 b*=2 b-=3**d d+=1 # we may then use phi(3*3^d)==phi(3^30)==3^30-3^29 in order # to ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 76, 5241, 11639, 8322, 16458, 52, 1860, 67, 16458, 8322, 35, 1860, 35, 67, 35, 1860, 16458, 8322, 35, 67, 52, 8322, 6, 198, 64, 28, 15, 198, 65, 28, 15, 198, 67, 28, 15, 1...
1.56338
355
"""Represent a Wavelet Coefficient Set. .. module::wave :platform: Unix, Windows .. modelauthor:: Juan C Galan-Hernandez <jcgalanh@gmail.com> """ import numpy as np import waveletcodec.tools as tools import waveletcodec.lwt as lwt import cv2 import math #Constant Section CDF97 = 1 #End _CDF97 = lwt.FilterBa...
[ 37811, 40171, 257, 17084, 1616, 1766, 16814, 5345, 13, 198, 198, 492, 8265, 3712, 19204, 198, 220, 220, 1058, 24254, 25, 33501, 11, 3964, 198, 198, 492, 2746, 9800, 3712, 16852, 327, 5027, 272, 12, 39, 18092, 1279, 48055, 13528, 272, ...
2.214043
883
""" Paint costs You are getting ready to paint a piece of art. The canvas and brushes that you want to use will cost 40.00. Each color of paint that you buy is an additional 5.00. Determine how much money you will need based on the number of colors that you want to buy if tax at this store is 10%. Task Given the to...
[ 37811, 198, 47, 2913, 3484, 198, 1639, 389, 1972, 3492, 284, 7521, 257, 3704, 286, 1242, 13, 383, 21978, 290, 36377, 326, 345, 765, 284, 779, 481, 1575, 2319, 13, 405, 13, 5501, 3124, 286, 7521, 326, 345, 2822, 318, 281, 3224, 642, ...
3.767442
258
from __future__ import division from .curve import Curve from numpy import min, max, seterr seterr(all='raise')
[ 6738, 11593, 37443, 834, 1330, 7297, 198, 198, 6738, 764, 22019, 303, 1330, 46300, 198, 6738, 299, 32152, 1330, 949, 11, 3509, 11, 900, 8056, 198, 82, 2357, 81, 7, 439, 11639, 40225, 11537 ]
3.294118
34
""" Utilities for homework 2. Function "log_progress" is adapted from: https://github.com/kuk/log-progress """ import matplotlib.pyplot as plt import numpy as np import torch from ipywidgets import IntProgress, HTML, VBox from IPython.display import display from blg604ehw2.atari_wrapper import LazyFrames de...
[ 37811, 41086, 329, 26131, 362, 13, 198, 220, 220, 220, 15553, 366, 6404, 62, 33723, 1, 318, 16573, 422, 25, 198, 220, 220, 220, 3740, 1378, 12567, 13, 785, 14, 74, 2724, 14, 6404, 12, 33723, 198, 37811, 198, 198, 11748, 2603, 29487,...
2.295259
928
#!/usr/bin/env python #-*- coding:utf-8; mode:python; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- from bes.testing.unit_test import unit_test from bes.archive.archive_util import archive_util from bes.archive.archiver import archiver from bes.archive.temp_archive import temp_archive if __name__ == ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 12, 9, 12, 19617, 25, 40477, 12, 23, 26, 4235, 25, 29412, 26, 33793, 12, 8658, 82, 12, 14171, 25, 18038, 26, 269, 12, 35487, 12, 28968, 25, 362, 26, 7400, 12, 10394, 25, 362, ...
2.830645
124
# -*- coding: utf-8 -*- import argparse import os from .client import YaleClient yale_base_cli = \ argparse.ArgumentParser(description="Yale-cli is designed to operate on yale systems, and doing tasks like opening " "and closing locks/alarm systems.", ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 6738, 764, 16366, 1330, 19681, 11792, 628, 198, 198, 88, 1000, 62, 8692, 62, 44506, 796, 3467, 198, 220, 220, 220, 1822, 2957...
2.088575
779
from .. import models from django_filters import rest_framework as filters
[ 6738, 11485, 1330, 4981, 198, 6738, 42625, 14208, 62, 10379, 1010, 1330, 1334, 62, 30604, 355, 16628, 628, 628, 198 ]
3.95
20
from django.contrib.auth.models import Group from django.core.management.base import BaseCommand from django.conf import settings from django.views.i18n import set_language from proposals.utils.statistics_utils import get_average_turnaround_time, \ get_qs_for_long_route_reviews, get_qs_for_short_route_reviews, \ ...
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 4912, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 33571, 13, 72, ...
2.722222
198
"""Scraper to get info on the latest Dilbert comic.""" from datetime import timedelta from typing import Optional from constants import LATEST_DATE_REFRESH, SRC_PREFIX from scraper import Scraper, ScrapingException from utils import curr_date, date_to_str, str_to_date
[ 37811, 3351, 38545, 284, 651, 7508, 319, 262, 3452, 29328, 4835, 9048, 526, 15931, 198, 6738, 4818, 8079, 1330, 28805, 12514, 198, 6738, 19720, 1330, 32233, 198, 198, 6738, 38491, 1330, 42355, 6465, 62, 35, 6158, 62, 2200, 10913, 44011, ...
3.345679
81
from montag.domain.entities import Provider from montag.use_cases.fetch_playlists import FetchPlaylists from montag.use_cases.support import Failure, Success from tests import factory
[ 6738, 40689, 363, 13, 27830, 13, 298, 871, 1330, 32549, 198, 6738, 40689, 363, 13, 1904, 62, 33964, 13, 69, 7569, 62, 1759, 20713, 1330, 376, 7569, 11002, 20713, 198, 6738, 40689, 363, 13, 1904, 62, 33964, 13, 11284, 1330, 25743, 11, ...
3.72
50
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2020 tecnovert # Distributed under the MIT software license, see the accompanying # file LICENSE.txt or http://www.opensource.org/licenses/mit-license.php. import unittest from xmrswap.interface_btc import ( testBTCInterface ) from xmrswap.util import...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 15069, 357, 66, 8, 12131, 573, 66, 3919, 1851, 198, 2, 4307, 6169, 739, 262, 17168, 3788, 5964, 11, 766...
2.504274
234
from Panel.master_panel import * """V2Ray""" if __name__ == '__main__': V2Rayc = V2RaycSpider_Master_Panel() try: V2Rayc.home_menu() except Exception as e: V2Rayc.debug(e) finally: V2Rayc.kill()
[ 6738, 18810, 13, 9866, 62, 35330, 1330, 1635, 198, 198, 37811, 53, 17, 19591, 37811, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 569, 17, 19591, 66, 796, 569, 17, 19591, 66, 41294, 62, 18254, 6...
2.034483
116
from django.urls import path from .views import index, supporter_index, customer_index app_name = 'toppage' urlpatterns = [ path('', index, name='index'), path('supporter/', supporter_index, name='supporter_index'), path('customer/', customer_index, name='customer_index'), ]
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 764, 33571, 1330, 6376, 11, 15525, 62, 9630, 11, 6491, 62, 9630, 628, 198, 1324, 62, 3672, 796, 705, 1462, 381, 496, 6, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3...
3.010417
96
from forest_constants import (LEAFY, CONIFEROUS)
[ 6738, 8222, 62, 9979, 1187, 1330, 357, 2538, 8579, 56, 11, 7102, 5064, 1137, 20958, 8, 628, 198 ]
2.833333
18
"""No identified need to test model interface functionality."""
[ 37811, 2949, 5174, 761, 284, 1332, 2746, 7071, 11244, 526, 15931, 198 ]
5.333333
12
import sys import h5py import yaml import numpy as np from fuel.datasets import H5PYDataset from fuel.streams import DataStream from fuel.schemes import SequentialScheme, ShuffledScheme from fuel.transformers import Mapping from blocks.extensions import saveload, predicates from blocks.extensions.training import TrackT...
[ 11748, 25064, 198, 11748, 289, 20, 9078, 198, 11748, 331, 43695, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 5252, 13, 19608, 292, 1039, 1330, 367, 20, 47, 56, 27354, 292, 316, 198, 6738, 5252, 13, 5532, 82, 1330, 6060, 12124, 198,...
3.553846
130
# -*- coding: utf-8 -*- # # Copyright (C) 2012-2013 Vinay Sajip. # Licensed to the Python Software Foundation under a contributor agreement. # See LICENSE.txt and CONTRIBUTORS.txt. # from __future__ import unicode_literals import os import sys from compat import unittest from distlib.compat import url2pathname, urlpa...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 357, 34, 8, 2321, 12, 6390, 11820, 323, 311, 1228, 541, 13, 198, 2, 49962, 284, 262, 11361, 10442, 5693, 739, 257, 18920, 4381, 13, 198, 2, 4091, ...
2.234082
534