content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
""" Learns a matrix of Z-Space directions using a pre-trained BigGAN Generator. Modified from train.py in the PyTorch BigGAN repo. """ import os from tqdm import tqdm import torch import torch.nn as nn import torch.optim import utils import train_fns from sync_batchnorm import patch_replication_callback from torch.u...
[ 37811, 198, 14961, 5907, 257, 17593, 286, 1168, 12, 14106, 11678, 1262, 257, 662, 12, 35311, 4403, 45028, 35986, 13, 198, 5841, 1431, 422, 4512, 13, 9078, 287, 262, 9485, 15884, 354, 4403, 45028, 29924, 13, 198, 37811, 198, 11748, 28686...
2.233256
3,031
import xlsxwriter import pandas as pd import numpy as np import mysql.connector australia=pd.read_excel(r'\Users\jesica\Desktop\RCEP_economic_analysis.xlsx', sheet_name='Australia') brunei=pd.read_excel(r'\Users\jesica\Desktop\RCEP_economic_analysis.xlsx', sheet_name='Brunei') cambodia=pd.read_excel(r'\Users\jesica\De...
[ 11748, 2124, 7278, 87, 16002, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 48761, 13, 8443, 273, 198, 198, 64, 436, 1373, 544, 28, 30094, 13, 961, 62, 1069, 5276, 7, 81, 6, 59, 14490, 59, 7...
2.207321
2,923
#!/usr/bin/env python3 import os import re import glob import boto3 import requests import subprocess from time import sleep AWS_REGION = os.environ['AWS_REGION'] DEPLOY_UUID = os.environ['DEPLOY_UUID'] SERVICE_NAME = os.environ['SERVICE_NAME'] MOUNT_POINT = "/var/lib/" + SERVICE_NAME...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 15095, 198, 11748, 275, 2069, 18, 198, 11748, 7007, 198, 11748, 850, 14681, 198, 198, 6738, 640, 1330, 3993, 198, 198, 12298, 50, 62...
2.127726
321
import csv import datetime import random import os from parsers.parser_base import ParserBase FILE_TIME_EPOCH = datetime.datetime(1601, 1, 1) FILE_TIME_MICROSECOND = 10
[ 11748, 269, 21370, 198, 11748, 4818, 8079, 198, 11748, 4738, 198, 11748, 28686, 198, 6738, 13544, 364, 13, 48610, 62, 8692, 1330, 23042, 263, 14881, 198, 198, 25664, 62, 34694, 62, 8905, 46, 3398, 796, 4818, 8079, 13, 19608, 8079, 7, ...
2.774194
62
from django.http import HttpRequest from django.middleware.csrf import _compare_salted_tokens as equivalent_tokens from django.template.context_processors import csrf from django.test import SimpleTestCase
[ 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 18453, 201, 198, 6738, 42625, 14208, 13, 27171, 1574, 13, 6359, 41871, 1330, 4808, 5589, 533, 62, 21680, 1513, 62, 83, 482, 641, 355, 7548, 62, 83, 482, 641, 201, 198, 6738, 42625, 14208...
3.117647
68
import sys import das import traceback def _wrap(self, rhs): st = self._get_schema_type() rv = self.__class__(rhs if st is None else st._validate_self(rhs)) rv._set_schema_type(self._get_schema_type()) return rv def _adapt_value(self, value, key=None, index=None): return das.ad...
[ 11748, 25064, 198, 11748, 288, 292, 198, 11748, 12854, 1891, 628, 628, 628, 220, 220, 825, 4808, 37150, 7, 944, 11, 9529, 82, 2599, 198, 220, 220, 220, 220, 220, 336, 796, 2116, 13557, 1136, 62, 15952, 2611, 62, 4906, 3419, 198, 220...
2.168378
974
#! /usr/bin/python3 from help import * import time # short-forms are used, so as to reduce the .json file size # t : type - d or f # d : directory # f : file # ts : timestamp # dirs : The dictionary containing info about directory contents # time : edit time of the file/folder # s : size of the file/folder # p : full ...
[ 2, 0, 1220, 14629, 14, 8800, 14, 29412, 18, 198, 6738, 1037, 1330, 1635, 198, 11748, 640, 198, 198, 2, 1790, 12, 23914, 389, 973, 11, 523, 355, 284, 4646, 262, 764, 17752, 2393, 2546, 198, 2, 256, 1058, 2099, 532, 288, 393, 277, ...
2.65127
433
# -*- coding: utf-8 -*- # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception """ This module implements the 'scan-build' command API. To run the static analyzer against a bui...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2142, 286, 262, 27140, 15996, 4935, 11, 739, 262, 24843, 13789, 410, 17, 13, 15, 351, 27140, 15996, 1475, 11755, 13, 198, 2, 4091, 3740, 1378, 297, 14761, 13, 2398,...
2.505072
6,211
#!/usr/bin/env python3 # pylint: disable=C0103 # pylint: disable=R0902 # pylint: disable=R0903 # pylint: disable=R0913 """ Dfinie la classe TableBorder """ BORDERS = [TableBorder('+', '+', '+',\ '+', '+', '+',\ '+', '+', '+',\ '-', '|'), ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 279, 2645, 600, 25, 15560, 28, 34, 486, 3070, 198, 2, 279, 2645, 600, 25, 15560, 28, 49, 2931, 2999, 198, 2, 279, 2645, 600, 25, 15560, 28, 49, 2931, 3070, 198, 2, 279, ...
1.455598
518
from django.conf.urls import url from . import views urlpatterns = [ url(r'^register/', views.register), url(r'^login/', views.login), url(r'logout/', views.logout), url(r'search/', views.search) ]
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 6738, 764, 1330, 5009, 628, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 19016, 7, 81, 6, 61, 30238, 14, 3256, 5009, 13, 30238, 828, 198, 220, 220, 220, 19016, ...
2.426966
89
#!/usr/bin/python # -*- coding: utf-8 -*- """Simple service for SL (Storstockholms Lokaltrafik).""" import datetime import json import logging from datetime import timedelta import homeassistant.helpers.config_validation as cv import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from ho...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 26437, 2139, 329, 12419, 357, 1273, 273, 13578, 3937, 907, 36861, 2501, 32188, 1134, 21387, 15931, 198, 11748, 4818, 8079...
1.924542
5,566
""" A quick library to deal with searching simbad for info about a SN and parsing the results. Author: Isaac Shivvers, ishivvers@berkeley.edu, 2014 example SIMBAD uri query: http://simbad.u-strasbg.fr/simbad/sim-id?output.format=ASCII&Ident=sn%201998S """ import re from urllib2 import urlopen def get_SN_info( nam...
[ 37811, 198, 32, 2068, 5888, 284, 1730, 351, 10342, 985, 14774, 329, 7508, 198, 546, 257, 11346, 290, 32096, 262, 2482, 13, 198, 198, 13838, 25, 19068, 43305, 690, 11, 318, 71, 452, 690, 31, 527, 13490, 13, 15532, 11, 1946, 628, 198,...
2.367698
873
import os from math import cos from math import sin import Sofa.Core from splib.numerics import Quat, Vec3 from sofacontrol import measurement_models path = os.path.dirname(os.path.abspath(__file__))
[ 11748, 28686, 198, 6738, 10688, 1330, 8615, 198, 6738, 10688, 1330, 7813, 198, 198, 11748, 1406, 13331, 13, 14055, 198, 6738, 4328, 571, 13, 77, 6975, 873, 1330, 2264, 265, 11, 38692, 18, 198, 198, 6738, 523, 38942, 756, 3225, 1330, 1...
2.971429
70
""" This file contains meta information and default configurations of the project """ RSC_YEARS = [1660, 1670, 1680, 1690, 1700, 1710, 1720, 1730, 1740, 1750, 1760, 1770, 1780, 1790, 1800, 1810, 1820, 1830, 1840, 1850, 1860, 1870, 1880, 1890, 1900, 1910, 1920] # cf. Chapter 4....
[ 37811, 198, 1212, 2393, 4909, 13634, 1321, 290, 4277, 25412, 286, 262, 1628, 198, 37811, 628, 198, 198, 49, 6173, 62, 56, 17133, 50, 796, 685, 1433, 1899, 11, 1467, 2154, 11, 1467, 1795, 11, 1467, 3829, 11, 198, 220, 220, 220, 220, ...
1.71677
1,610
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import argparse import numpy as np import os import pandas as pd import util import os.path import pandas as pd import numpy as np import yaml import xa...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 201, 198, 6738, 11593, 37443, 834, 1330, 7297, 201, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 201, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 201, 198, 201,...
2.183569
9,348
<<<<<<< HEAD """ 1. Write a Python program to print the documents (syntax, description etc.) of Python built-in function(s). Sample function : abs() Expected Result : abs(number) -> number Return the absolute value of the argument. Tools: help function 2. Write a Python program to p...
[ 16791, 16791, 16791, 27, 39837, 198, 37811, 198, 16, 13, 19430, 257, 11361, 1430, 284, 3601, 262, 4963, 357, 1837, 41641, 11, 6764, 3503, 2014, 286, 11361, 3170, 12, 259, 2163, 7, 82, 737, 198, 220, 220, 220, 220, 220, 220, 220, 275...
3.238302
1,154
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # michael a.g. avzis # orthologue # (c) 1998-2021 all rights reserved # # """ When a metaclass understands the extra keywords that can be passed during class declaration, it has to override all these to accommodate the change in signature """ def test(): b = b...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 285, 40302, 257, 13, 70, 13, 1196, 89, 271, 198, 2, 29617, 39795, 198, 2, 357, 66, 8, 7795, 12, ...
2.824324
148
from cs1media import * import math statue = load_picture("photos/statue1.jpg") chroma(statue, (41, 75, 146), 70) statue.show()
[ 198, 6738, 50115, 16, 11431, 1330, 1635, 198, 11748, 10688, 198, 198, 14269, 518, 796, 3440, 62, 34053, 7203, 24729, 14, 14269, 518, 16, 13, 9479, 4943, 198, 28663, 64, 7, 14269, 518, 11, 357, 3901, 11, 5441, 11, 22986, 828, 4317, 8...
2.58
50
import numpy as np import scipy import scipy.io import pylab import numpy import glob import pyfits
[ 11748, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 198, 11748, 629, 541, 88, 13, 952, 198, 11748, 279, 2645, 397, 198, 11748, 299, 32152, 198, 11748, 15095, 198, 11748, 12972, 21013, 198 ]
2.941176
34
#!/usr/bin/env python3 """ usage: sort.py [-h] sort lines options: -h, --help show this help message and exit quirks: sorts tabs as different than spaces sorts some spaces ending a line as different than none ending a line examples: Oh no! No examples disclosed!! """ # FIXME: doc -k$N,$N and -n and may...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 37811, 198, 26060, 25, 3297, 13, 9078, 25915, 71, 60, 198, 198, 30619, 3951, 198, 198, 25811, 25, 198, 220, 532, 71, 11, 1377, 16794, 220, 905, 428, 1037, 3275, 290, 8420, ...
2.912621
206
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys, getopt, httplib, urllib, json, os import oauth.oauth as oauth import datetime from configobj import ConfigObj import logging global logger logger = logging.getLogger(os.path.basename(__file__)) import davan.util.application_logger as log_manager #insert your ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 25064, 11, 651, 8738, 11, 1841, 489, 571, 11, 2956, 297, 571, 11, 33918, 11, 28686, 198, 11748, 267, 1843...
2.623077
390
from collections import defaultdict import json import re import time from urllib.parse import urlparse import uuid import boto3 import boto3.exceptions import botocore.exceptions import markus import redis.exceptions import requests import requests.exceptions from sqlalchemy import select import sqlalchemy.exc from ...
[ 6738, 17268, 1330, 4277, 11600, 198, 11748, 33918, 198, 11748, 302, 198, 11748, 640, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 19016, 29572, 198, 11748, 334, 27112, 198, 198, 11748, 275, 2069, 18, 198, 11748, 275, 2069, 18, 13, 1069, ...
2.741135
282
import hugectr from mpi4py import MPI solver = hugectr.CreateSolver(model_name = "dcn", max_eval_batches = 1, batchsize_eval = 16384, batchsize = 16384, lr = 0.001, vvgpu...
[ 11748, 3236, 24087, 198, 6738, 285, 14415, 19, 9078, 1330, 4904, 40, 198, 82, 14375, 796, 3236, 24087, 13, 16447, 50, 14375, 7, 19849, 62, 3672, 796, 366, 17896, 77, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
1.743105
3,807
import numpy as np from pydrake.common.value import AbstractValue from pydrake.math import RigidTransform from pydrake.perception import BaseField, Fields, PointCloud from pydrake.systems.framework import LeafSystem
[ 11748, 299, 32152, 355, 45941, 198, 198, 6738, 279, 5173, 33788, 13, 11321, 13, 8367, 1330, 27741, 11395, 198, 6738, 279, 5173, 33788, 13, 11018, 1330, 24666, 312, 41762, 198, 6738, 279, 5173, 33788, 13, 525, 4516, 1330, 7308, 15878, 11...
3.622951
61
#!/usr/bin/env python """ @author Hongyi Hu 2015 Massachusetts Institute of Technology """ import argparse import random import catan.db from catan.data import NodeMessage # test data STATUS_LIST = ['ok', 'injured', 'deceased'] # nodes # people def gen_people(n, db, start_lat, stop_lat, start_long, stop_long):...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 31, 9800, 9764, 48111, 11256, 628, 1853, 10140, 5136, 286, 8987, 198, 37811, 198, 11748, 1822, 29572, 198, 11748, 4738, 198, 198, 11748, 3797, 272, 13, 9945, 198, 6738, 3797,...
2.253691
1,490
# ------------------------------ # 200. Number of Islands # # Description: # Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assume all four edges of the grid are all surrou...
[ 2, 34400, 26171, 198, 2, 939, 13, 7913, 286, 12010, 198, 2, 220, 198, 2, 12489, 25, 198, 2, 11259, 257, 362, 67, 10706, 3975, 286, 705, 16, 338, 357, 1044, 8, 290, 705, 15, 338, 357, 7050, 828, 954, 262, 1271, 286, 14807, 13, ...
1.933031
881
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for the fseventsd record event formatter.""" from __future__ import unicode_literals import unittest from plaso.formatters import fseventsd from tests.formatters import test_lib if __name__ == '__main__': unittest.main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 51, 3558, 329, 262, 277, 325, 85, 658, 67, 1700, 1785, 1296, 1436, 526, 15931, 198, 198, 6738, 11593, 37443, 8...
2.714286
105
from keras.callbacks import ModelCheckpoint,Callback,LearningRateScheduler,TensorBoard from keras.models import load_model import random import numpy as np from scipy import misc import gc from keras.optimizers import Adam from imageio import imread from datetime import datetime import os import json import models from...
[ 6738, 41927, 292, 13, 13345, 10146, 1330, 9104, 9787, 4122, 11, 47258, 11, 41730, 32184, 50, 1740, 18173, 11, 51, 22854, 29828, 198, 6738, 41927, 292, 13, 27530, 1330, 3440, 62, 19849, 198, 11748, 4738, 198, 11748, 299, 32152, 355, 4594...
3.57377
122
import unittest import numpy import chainer from chainer import cuda from chainer import functions from chainer import gradient_check from chainer import testing from chainer.testing import attr testing.run_module(__name__, __file__)
[ 11748, 555, 715, 395, 198, 198, 11748, 299, 32152, 198, 198, 11748, 6333, 263, 198, 6738, 6333, 263, 1330, 269, 15339, 198, 6738, 6333, 263, 1330, 5499, 198, 6738, 6333, 263, 1330, 31312, 62, 9122, 198, 6738, 6333, 263, 1330, 4856, 19...
3.514706
68
# Generated by Django 3.0.3 on 2020-03-24 09:59 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 18, 319, 12131, 12, 3070, 12, 1731, 7769, 25, 3270, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, ...
2.818182
44
from dm_control import suite from dm_control.rl.control import flatten_observation from dm_env import StepType import gym import numpy as np from metarl.envs import Step from metarl.envs.dm_control.dm_control_viewer import DmControlViewer
[ 6738, 288, 76, 62, 13716, 1330, 18389, 198, 6738, 288, 76, 62, 13716, 13, 45895, 13, 13716, 1330, 27172, 268, 62, 672, 3168, 341, 198, 6738, 288, 76, 62, 24330, 1330, 5012, 6030, 198, 11748, 11550, 198, 11748, 299, 32152, 355, 45941, ...
3.12987
77
from dagster import check from .house import Lakehouse from .table import create_lakehouse_table_def
[ 6738, 48924, 1706, 1330, 2198, 198, 198, 6738, 764, 4803, 1330, 6233, 4803, 198, 6738, 764, 11487, 1330, 2251, 62, 27180, 4803, 62, 11487, 62, 4299, 628, 198 ]
3.714286
28
from maya import cmds import pyblish.api import pype.api import pype.maya.action
[ 6738, 743, 64, 1330, 23991, 82, 198, 198, 11748, 12972, 65, 1836, 13, 15042, 198, 11748, 279, 2981, 13, 15042, 198, 11748, 279, 2981, 13, 11261, 64, 13, 2673, 628 ]
2.766667
30
from flask import Flask # initialize the app app = Flask(__name__) # execute iris function at /iris route
[ 6738, 42903, 1330, 46947, 198, 198, 2, 41216, 262, 598, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 198, 198, 2, 12260, 4173, 271, 2163, 379, 1220, 29616, 6339 ]
3.566667
30
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2018 Brno University of Technology FIT # Author: Jan Profant <jan.profant@phonexia.com> # All Rights Reserved import os import logging import pickle import multiprocessing import numpy as np from sklearn.metrics.pairwise import cosine_similarity from vb...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 357, 34, 8, 2864, 1709, 3919, 2059, 286, 8987, 376, 2043, 198, 2, 6434, 25, 2365, 4415, 415, 1279...
2.234729
1,768
import matplotlib.pyplot as plt import os
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 28686, 628 ]
3.071429
14
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 16529, 35937, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 198, 2, 5964, 1321...
5.354167
96
import datetime import re from .exceptions import ObjectIsNotADate
[ 11748, 4818, 8079, 198, 11748, 302, 198, 198, 6738, 764, 1069, 11755, 1330, 9515, 3792, 3673, 2885, 378, 628 ]
3.631579
19
import numpy as np import os import logging from sklearn.model_selection import train_test_split DATASET_ROOT_FOLDER = os.path.abspath('datasets')
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 18931, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4512, 62, 9288, 62, 35312, 198, 198, 35, 1404, 1921, 2767, 62, 13252, 2394, 62, 37, 3535, 14418, 796, 28686, 13, ...
2.865385
52
# Exerccio Python 56: Desenvolva um programa que leia o nome, idade e sexo de 4 pessoas. No final do programa, mostre: a mdia de idade do grupo, qual o nome do homem mais velho e quantas mulheres tm menos de 20 anos. mediaidade = '' nomelista = [] idadelista = [] sexolista = [] homens = [] mulherescommenosde20 = 0 n...
[ 2, 1475, 263, 535, 952, 11361, 7265, 25, 2935, 268, 10396, 6862, 23781, 1430, 64, 8358, 443, 544, 267, 299, 462, 11, 4686, 671, 304, 1714, 78, 390, 604, 279, 408, 78, 292, 13, 1400, 2457, 466, 1430, 64, 11, 749, 260, 25, 257, 45...
2.707826
575
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2017, 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...
[ 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, 2177, 11, 13130, 13, 198, 2, 198, 2, 770, 2438, 318, 11971, 739, ...
2.055106
10,017
from selenium.webdriver.common.by import By
[ 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 11321, 13, 1525, 1330, 2750, 628 ]
3.214286
14
from urllib2 import Request, urlopen, URLError import json request = Request('https://uk-air.defra.gov.uk/sos-ukair/api/v1/stations/') try: response = urlopen(request) data = response.read() except URLError, e: print 'error:', e stations= json.loads (data) #extract out station 2 stations2 = stations [7] prope...
[ 6738, 2956, 297, 571, 17, 1330, 19390, 11, 19016, 9654, 11, 37902, 2538, 81, 1472, 198, 11748, 33918, 198, 198, 25927, 796, 19390, 10786, 5450, 1378, 2724, 12, 958, 13, 4299, 430, 13, 9567, 13, 2724, 14, 82, 418, 12, 2724, 958, 14, ...
2.590588
425
def hello_world(): """Tests the import.""" return "Hello world!"
[ 4299, 23748, 62, 6894, 33529, 198, 220, 220, 220, 37227, 51, 3558, 262, 1330, 526, 15931, 198, 220, 220, 220, 1441, 366, 15496, 995, 2474, 198 ]
2.807692
26
# Generated by Django 2.0.6 on 2018-07-02 19:13 import core.models from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 15, 13, 21, 319, 2864, 12, 2998, 12, 2999, 678, 25, 1485, 198, 198, 11748, 4755, 13, 27530, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.972973
37
import pytest from unittest import mock from aiohttp import helpers import datetime
[ 11748, 12972, 9288, 198, 6738, 555, 715, 395, 1330, 15290, 198, 6738, 257, 952, 4023, 1330, 49385, 198, 11748, 4818, 8079, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 198 ]
3.142857
35
from os.path import join FAAS_ROOT="/lhome/trulsas/faas-profiler" WORKLOAD_SPECS=join(FAAS_ROOT, "specs", "workloads") #FAAS_ROOT="/home/truls/uni/phd/faas-profiler" WSK_PATH = "wsk" OPENWHISK_PATH = "/lhome/trulsas/openwhisk" #: Location of output data DATA_DIR = join(FAAS_ROOT, "..", "profiler_results") SYSTEM_CPU...
[ 6738, 28686, 13, 6978, 1330, 4654, 198, 198, 7708, 1921, 62, 13252, 2394, 35922, 75, 11195, 14, 2213, 5753, 292, 14, 13331, 292, 12, 5577, 5329, 1, 198, 33249, 35613, 62, 48451, 50, 28, 22179, 7, 7708, 1921, 62, 13252, 2394, 11, 366...
2.089888
178
print divide(10,0) print sum1(10,0)
[ 4798, 14083, 7, 940, 11, 15, 8, 198, 4798, 2160, 16, 7, 940, 11, 15, 8 ]
2.1875
16
# # Copyright (c) 2014, 2016, 2018, 2020 LexisNexis Risk Data Management Inc. # # This file is part of the RadSSH software package. # # RadSSH is free software, released under the Revised BSD License. # You are permitted to use, modify, and redsitribute this software # according to the Revised BSD License, a copy of wh...
[ 2, 198, 2, 15069, 357, 66, 8, 1946, 11, 1584, 11, 2864, 11, 12131, 17210, 271, 45, 1069, 271, 19602, 6060, 8549, 3457, 13, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 262, 5325, 5432, 39, 3788, 5301, 13, 198, 2, 198, 2, 5325, 54...
3.300191
523
''' pymmh3 was written by Fredrik Kihlander and enhanced by Swapnil Gusani, and is placed in the public domain. The authors hereby disclaim copyright to this source code. pure python implementation of the murmur3 hash algorithm https://code.google.com/p/smhasher/wiki/MurmurHash3 This was written for the times when y...
[ 7061, 6, 198, 9078, 3020, 71, 18, 373, 3194, 416, 8559, 12602, 509, 4449, 16235, 290, 13105, 416, 48408, 45991, 37307, 3216, 11, 290, 318, 4624, 287, 262, 1171, 198, 27830, 13, 383, 7035, 29376, 28468, 6634, 284, 428, 2723, 2438, 13, ...
1.853126
7,149
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import dlite thisdir = os.path.abspath(os.path.dirname(__file__)) url = 'json://' + thisdir + '/Person.json' print('-- create: ExPerson') ExPerson = dlite.classfactory(Person, url=url) print('-- create: person1') person1 = Person('Jack Daniel', 42, ['distil...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 28686, 198, 198, 11748, 288, 36890, 198, 198, 5661, 15908, 796, 28686, 13, 6978, 13, 397, 2777, 776, 7, 418, 1...
2.683019
265
''' nn , . , 8 . 1 2 -4 5 3 -2 9 -10 , . [1, 2, -4], [5, 3, -2, 9], [9, -10] . [5, 3, -2, 9] , . 5+3+(-2)+9 = 15 . 1 2 -4 5 3 -2 9 -10 15 100. ''' import sys def getSubsum(data) : ''' n list , . ''' dp = [0] * len(data) d...
[ 7061, 6, 198, 220, 220, 198, 20471, 220, 220, 837, 220, 220, 220, 220, 220, 220, 220, 220, 764, 220, 198, 837, 220, 220, 807, 220, 220, 764, 198, 198, 16, 362, 532, 19, 642, 513, 532, 17, 860, 532, 940, 628, 837, 220, 220, 220...
1.642458
358
#!/usr/bin/env python3 import unittest from mockdock import dns
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 555, 715, 395, 198, 198, 6738, 15290, 67, 735, 1330, 288, 5907, 198 ]
2.64
25
""" Copyright 2019, Amazon Web Services Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing,...
[ 37811, 198, 15269, 13130, 11, 6186, 5313, 6168, 3457, 13, 198, 26656, 15385, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 5832, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198...
3.984536
194
import asyncio import discord from datetime import datetime from operator import itemgetter from discord.ext import commands from Cogs import Nullify from Cogs import DisplayName from Cogs import UserTime from Cogs import Message
[ 11748, 30351, 952, 201, 198, 11748, 36446, 201, 198, 6738, 220, 220, 4818, 8079, 220, 220, 220, 1330, 4818, 8079, 201, 198, 6738, 220, 220, 10088, 220, 220, 220, 1330, 2378, 1136, 353, 201, 198, 6738, 220, 220, 36446, 13, 2302, 1330, ...
2.5625
112
"""Mtodos de preprocessamento de testes individuais """ import pandas as pd import numpy as np import math def test_1(df, seed=0): """training: balanced; test: balanced training: 80k (40k 0, 40k 1) test: 20k (10k 0, 10k 1) """ df_ones = df[df['label'] == 1] df_zeros = df[df['label'] =...
[ 37811, 44, 83, 375, 418, 390, 662, 14681, 3263, 78, 390, 1332, 274, 773, 1699, 6413, 271, 198, 37811, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 10688, 628, 198, 4299, 1332, 62, 16, 7,...
2.351266
2,844
# This file is automatically generated by the generate_constants_module.py script in wrappers/Python. # DO NOT MODIFY THE CONTENTS OF THIS FILE! from __future__ import absolute_import from . import _constants INVALID_PARAMETER = _constants.INVALID_PARAMETER igas_constant = _constants.igas_constant imolar_mass = _cons...
[ 2, 770, 2393, 318, 6338, 7560, 416, 262, 7716, 62, 9979, 1187, 62, 21412, 13, 9078, 4226, 287, 7917, 11799, 14, 37906, 13, 198, 2, 8410, 5626, 19164, 5064, 56, 3336, 22904, 15365, 3963, 12680, 45811, 0, 198, 6738, 11593, 37443, 834, ...
2.334977
3,042
import random import torch.utils.data.sampler
[ 11748, 4738, 198, 11748, 28034, 13, 26791, 13, 7890, 13, 37687, 20053, 628 ]
3.615385
13
#!/usr/bin/env python """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License");...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 26656, 15385, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 273, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 17080, 6169, 351, 428, 670,...
3.436893
412
from sklearn import svm, metrics import random import re lines = open("iris.csv", "r", encoding="utf-8").read().split("\n") csv = list(map(to_columm, lines)) del csv[0] random.shuffle(csv) k = 5 csv_k = [[] for i in range(k)] scores = [] for i in range(len(csv)): csv_k[i % k].append(csv[i]) for test in...
[ 6738, 1341, 35720, 1330, 264, 14761, 11, 20731, 198, 198, 11748, 4738, 198, 11748, 302, 628, 628, 628, 198, 6615, 796, 1280, 7203, 29616, 13, 40664, 1600, 366, 81, 1600, 21004, 2625, 40477, 12, 23, 11074, 961, 22446, 35312, 7203, 59, ...
2.330544
239
load("@wix_oss_infra//:import_external.bzl", import_external = "safe_wix_scala_maven_import_external")
[ 2220, 7203, 31, 86, 844, 62, 793, 62, 10745, 430, 1003, 25, 11748, 62, 22615, 13, 65, 48274, 1600, 1330, 62, 22615, 796, 366, 21230, 62, 86, 844, 62, 1416, 6081, 62, 2611, 574, 62, 11748, 62, 22615, 4943, 198 ]
2.575
40
a = int(input()) b = int(input()) c = int(input()) d = int(input()) if a == 0 and b == 0: print("INF") else: if (d - b * c / a) != 0 and (- b / a) == (- b // a): print(- b // a) else: print("NO")
[ 64, 796, 493, 7, 15414, 28955, 198, 65, 796, 493, 7, 15414, 28955, 198, 66, 796, 493, 7, 15414, 28955, 198, 67, 796, 493, 7, 15414, 28955, 198, 361, 257, 6624, 657, 290, 275, 6624, 657, 25, 198, 220, 220, 220, 3601, 7203, 1268, ...
2.036364
110
import os import pathlib import sklearn.model_selection import tarfile import torch import torchaudio import urllib.request here = pathlib.Path(__file__).resolve().parent if __name__ == '__main__': main()
[ 11748, 28686, 198, 11748, 3108, 8019, 198, 11748, 1341, 35720, 13, 19849, 62, 49283, 198, 11748, 13422, 7753, 198, 11748, 28034, 198, 11748, 28034, 24051, 198, 11748, 2956, 297, 571, 13, 25927, 198, 198, 1456, 796, 3108, 8019, 13, 15235, ...
3.056338
71
from datetime import datetime from typing import List from flask import Blueprint, jsonify, request, json from app.models.products import Product, Category, products_categories from app import db products_blueprint = Blueprint('products', __name__) def create_or_get_categories(p: dict) -> List[Category]...
[ 6738, 4818, 8079, 1330, 4818, 8079, 201, 198, 6738, 19720, 1330, 7343, 201, 198, 201, 198, 6738, 42903, 1330, 39932, 11, 33918, 1958, 11, 2581, 11, 33918, 201, 198, 201, 198, 6738, 598, 13, 27530, 13, 29498, 1330, 8721, 11, 21743, 11,...
2.702247
356
import pytest from httmock import urlmatch, HTTMock from util.config import URLSchemeAndHostname from util.config.validator import ValidatorContext from util.config.validators import ConfigValidationException from util.config.validators.validate_bitbucket_trigger import BitbucketTriggerValidator from test.fixtures i...
[ 11748, 12972, 9288, 198, 198, 6738, 1841, 76, 735, 1330, 19016, 15699, 11, 7154, 15972, 735, 198, 198, 6738, 7736, 13, 11250, 1330, 37902, 6561, 2395, 1326, 1870, 17932, 3672, 198, 6738, 7736, 13, 11250, 13, 12102, 1352, 1330, 48951, 13...
3.666667
90
# -*- coding: utf-8 -*- """ Created on Fri Mar 15 16:51:16 2019 @author: Silvan """ import numpy as np import scipy import matplotlib.pyplot as plt k=1000 n1=2.0 n2=1.0 alpha=np.pi/6.0 beta=np.arcsin(n2/n1*np.sin(alpha)) ya=1.0 xa=-ya*np.tan(alpha) yb=-1.0 xb=-yb*np.tan(beta) K2,x...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 19480, 1526, 1315, 1467, 25, 4349, 25, 1433, 13130, 201, 198, 201, 198, 31, 9800, 25, 4243, 10438, 201, 198, 37811, 201, 198, 201, 19...
1.649254
804
"""Remove the readthedocs elasticsearch index.""" from __future__ import absolute_import from django.conf import settings from django.core.management.base import BaseCommand from elasticsearch import Elasticsearch
[ 37811, 27914, 262, 1100, 83, 704, 420, 82, 27468, 12947, 6376, 526, 15931, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 13, ...
4.037037
54
""" BigGAN: The Authorized Unofficial PyTorch release Code by A. Brock and A. Andonian This code is an unofficial reimplementation of "Large-Scale GAN Training for High Fidelity Natural Image Synthesis," by A. Brock, J. Donahue, and K. Simonyan (arXiv 1809.11096). Let's go. """ import datetime impor...
[ 37811, 4403, 45028, 25, 383, 6434, 1143, 791, 16841, 9485, 15884, 354, 2650, 198, 220, 220, 220, 6127, 416, 317, 13, 20501, 290, 317, 13, 843, 27625, 198, 220, 220, 220, 770, 2438, 318, 281, 27220, 21123, 32851, 286, 198, 220, 220, ...
2.885714
175
# __BEGIN_LICENSE__ #Copyright (c) 2015, United States Government, as represented by the #Administrator of the National Aeronautics and Space Administration. #All rights reserved. # __END_LICENSE__ import os import time import random import shutil from glob import glob import traceback import sys from geocamUtil im...
[ 2, 11593, 33, 43312, 62, 43, 2149, 24290, 834, 198, 2, 15269, 357, 66, 8, 1853, 11, 1578, 1829, 5070, 11, 355, 7997, 416, 262, 220, 198, 2, 41862, 12392, 286, 262, 2351, 15781, 261, 2306, 873, 290, 4687, 8694, 13, 220, 198, 2, 3...
3.509434
106
# Ce fichier contient (au moins) cinq erreurs. # Instructions: # - tester jusqu' atteindre 100% de couverture; # - corriger les bugs;" # - envoyer le diff ou le dpt git par email.""" import hypothesis from hypothesis import given, settings from hypothesis.strategies import integers, lists
[ 2, 20101, 277, 488, 959, 542, 1153, 357, 559, 6941, 1040, 8, 269, 259, 80, 1931, 260, 1834, 13, 198, 2, 27759, 25, 198, 2, 220, 532, 256, 7834, 474, 385, 421, 6, 379, 660, 521, 260, 1802, 4, 390, 2284, 1851, 495, 26, 198, 2, ...
3.138298
94
# -*- coding: utf-8 -*- """The ``snewpy.snowglobes`` module contains functions for interacting with SNOwGLoBES. `SNOwGLoBES <https://github.com/SNOwGLoBES/snowglobes>`_ can estimate detected event rates from a given input supernova neutrino flux. It supports many different neutrino detectors, detector materials and in...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 464, 7559, 82, 3605, 9078, 13, 82, 2197, 4743, 672, 274, 15506, 8265, 4909, 5499, 329, 24986, 351, 11346, 46, 86, 8763, 78, 33, 1546, 13, 198, 198, 63, 50, 15...
2.257986
9,016
from typing import List, Tuple from omegaconf import DictConfig import torch import torch.nn as nn import torch.nn.functional as F from rlcycle.common.abstract.loss import Loss
[ 6738, 19720, 1330, 7343, 11, 309, 29291, 198, 198, 6738, 267, 28917, 7807, 69, 1330, 360, 713, 16934, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 198, 6738, 37...
3.309091
55
"""viewer application which allows to interactively view spatio-temporal gap filling results""" import os import argparse from datetime import datetime, timedelta from tkinter import Canvas, Tk, Button, RAISED, DISABLED, SUNKEN, NORMAL import numpy as np from PIL import Image, ImageTk import probgf.media as media pa...
[ 37811, 1177, 263, 3586, 543, 3578, 284, 9427, 2280, 1570, 15246, 952, 12, 11498, 35738, 7625, 12591, 2482, 37811, 198, 11748, 28686, 198, 11748, 1822, 29572, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 6738, 256, 74, ...
2.650746
1,005
#!/usr/bin/python # -*- coding: utf-8 -*- from django.conf import settings from django.core.handlers.wsgi import WSGIRequest from django.forms import ValidationError from django.http import QueryDict from django.test import TestCase from django.test.client import Client from paypal.pro.fields import CreditCardField fr...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 7295, 13, 4993, 8116, 13, 18504, 12397, 1330, 25290, 1...
2.368681
811
# -*- coding: utf-8 -*- """ Created on Mon Dec 7 19:46:40 2020 @author: Intel """ m = int(input()) grid = [] for i in range(0, m): grid.append(input().strip()) displayPathtoPrincess(m,grid)
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 2892, 4280, 220, 767, 678, 25, 3510, 25, 1821, 12131, 201, 198, 201, 198, 31, 9800, 25, 8180, 201, 198, 37811, 201, 198, 220, 220, ...
1.653409
176
import matplotlib.pyplot as plt import pybedtools import pandas as pnd import numpy as np import tabix import matplotlib.ticker as ticker from matplotlib.patches import Rectangle from matplotlib.patches import Arrow from matplotlib.path import Path from matplotlib.patches import PathPatch import matplotlib.cm as cm imp...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 12972, 3077, 31391, 198, 11748, 19798, 292, 355, 279, 358, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 7400, 844, 198, 11748, 2603, 29487, 8019, 13, 83, 15799, 355...
1.950112
33,535
""" File containing DFA and NFA public classes """ import collections.abc from itertools import product, chain, combinations from string import printable from typing import ( AbstractSet, Container, FrozenSet, Iterable, List, Mapping, MutableMapping, Optional, Set, Tuple, Uni...
[ 37811, 198, 8979, 7268, 360, 7708, 290, 399, 7708, 1171, 6097, 198, 37811, 198, 11748, 17268, 13, 39305, 198, 6738, 340, 861, 10141, 1330, 1720, 11, 6333, 11, 17790, 198, 6738, 4731, 1330, 3601, 540, 198, 6738, 19720, 1330, 357, 198, ...
2.620948
401
#!/usr/bin/env python3 import unittest from roman_number_generator import arabic_to_roman if __name__ == "__main__": unittest.main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 555, 715, 395, 198, 198, 6738, 374, 5185, 62, 17618, 62, 8612, 1352, 1330, 610, 397, 291, 62, 1462, 62, 47119, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417,...
2.517857
56
from infrastructure.satnogClient import SatnogClient import os
[ 6738, 6884, 13, 49720, 77, 519, 11792, 1330, 7031, 77, 519, 11792, 198, 11748, 28686 ]
4.133333
15
#!/usr/bin/env python3 # # Oregano - a lightweight Ergon client # CashFusion - an advanced coin anonymizer # # Copyright (C) 2020 Mark B. Lundeberg # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the So...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 198, 2, 22452, 1030, 78, 532, 257, 18700, 5256, 14520, 5456, 198, 2, 16210, 37, 4241, 532, 281, 6190, 10752, 14571, 7509, 198, 2, 198, 2, 15069, 357, 34, 8, 12131, 2940, 347...
3.116631
926
import matplotlib.pyplot as plt #Funcio per a l'excercici 4.4
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 628, 628, 628, 198, 2, 37, 19524, 952, 583, 257, 300, 6, 1069, 2189, 66, 44070, 604, 13, 19, 628, 198 ]
2.258065
31
# Copyright (C) 2020 Google Inc. # # This file has been licensed under Apache 2.0 license. Please see the LICENSE # file at the root of the repository. # Build rules for building ebooks. # This is the container CONTAINER = "filipfilmar/ebook-buildenv:1.1" # Use this for quick local runs. #CONTAINER = "ebook-builden...
[ 2, 15069, 357, 34, 8, 12131, 3012, 3457, 13, 198, 2, 198, 2, 770, 2393, 468, 587, 11971, 739, 24843, 362, 13, 15, 5964, 13, 220, 4222, 766, 262, 38559, 24290, 198, 2, 2393, 379, 262, 6808, 286, 262, 16099, 13, 198, 198, 2, 10934...
2.214883
2,392
n = int(input()) coelho = rato = sapo = contador = 0 for i in range(0, n): q, t = input().split(' ') t = t.upper() q = int(q) if 1 <= q <= 15: contador += q if t == 'C': coelho += q elif t == 'R': rato += q elif t == 'S': sapo += q po...
[ 77, 796, 493, 7, 15414, 28955, 198, 1073, 417, 8873, 796, 4227, 78, 796, 473, 7501, 796, 542, 7079, 796, 657, 198, 198, 1640, 1312, 287, 2837, 7, 15, 11, 299, 2599, 198, 220, 220, 220, 10662, 11, 256, 796, 5128, 22446, 35312, 1078...
1.969697
363
# coding: utf-8 # Copyright (c) 2015 Fabian Barkhau <fabian.barkhau@gmail.com> # License: MIT (see LICENSE file) from kivy.uix.boxlayout import BoxLayout from gravur.common.labelbox import LabelBox # NOQA from gravur.utils import load_widget
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 15069, 357, 66, 8, 1853, 14236, 666, 20511, 71, 559, 1279, 36434, 666, 13, 65, 668, 71, 559, 31, 14816, 13, 785, 29, 198, 2, 13789, 25, 17168, 357, 3826, 38559, 24290, 2393, 8, 628, 198, ...
2.860465
86
import datetime class Process(object):
[ 11748, 4818, 8079, 628, 198, 198, 4871, 10854, 7, 15252, 2599, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198 ]
2.2
25
# -*- coding: utf8 -*- # Copyright (C) PyZMQ Developers # Distributed under the terms of the Modified BSD License. import os import platform import time import pytest import zmq from zmq.tests import BaseZMQTestCase, skip_pypy
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 23, 532, 9, 12, 198, 2, 15069, 357, 34, 8, 9485, 57, 49215, 34152, 198, 2, 4307, 6169, 739, 262, 2846, 286, 262, 40499, 347, 10305, 13789, 13, 198, 198, 11748, 28686, 198, 11748, 3859, 198, 11...
3.026316
76
#coding:utf-8
[ 2, 66, 7656, 25, 40477, 12, 23, 198 ]
1.75
8
# -*- coding: utf-8 -*- from django.conf.urls.defaults import patterns, url from django_qbe.exports import formats urlpatterns = patterns('django_qbe.views', url(r'^$', 'qbe_form', name="qbe_form"), url(r'^js/$', 'qbe_js', name="qbe_js"), url(r'^results/bookmark/$', 'qbe_bookmark', name="qbe_bookma...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 13, 12286, 82, 1330, 7572, 11, 19016, 198, 6738, 42625, 14208, 62, 80, 1350, 13, 1069, 3742, 1330, 17519, 198, 198, 6371, ...
2.151613
310
# -*- coding:utf-8 -*- # Author: RubanSeven # import cv2 import numpy as np # from transform import get_perspective_transform, warp_perspective from warp_mls import WarpMLS # def distort(src, segment): # img_h, img_w = src.shape[:2] # dst = np.zeros_like(src, dtype=np.uint8) # # cut = im...
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 201, 198, 2, 6434, 25, 6256, 272, 31334, 201, 198, 201, 198, 2, 1330, 269, 85, 17, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 2, 422, 6121, 1330, 651, 62, 19276, 806...
1.906469
1,283
from collections import defaultdict if __name__ == "__main__": g = Graph() g.addEdge("A", "B") g.addEdge("B", "D") g.addEdge("A", "D") g.addEdge("C", "A") g.addEdge("C", "B") g.addEdge("A", "C") paths = g.printAllPaths("A", "B") print(paths)
[ 6738, 17268, 1330, 4277, 11600, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 308, 796, 29681, 3419, 198, 220, 220, 220, 308, 13, 2860, 37021, 7203, 32, 1600, 366, 33, 4943, 198, 220, 22...
2.043478
138
# testing the output of pipegeojson against different input types import berrl as bl import itertools # making line with csv file location line1=bl.make_line('csvs/line_example.csv') # making line with list testlist=bl.read('csvs/line_example.csv') line2=bl.make_line(testlist,list=True) # testing each line geojson ...
[ 2, 4856, 262, 5072, 286, 12656, 469, 13210, 1559, 1028, 1180, 5128, 3858, 198, 11748, 275, 8056, 75, 355, 698, 198, 11748, 340, 861, 10141, 198, 198, 2, 1642, 1627, 351, 269, 21370, 2393, 4067, 198, 1370, 16, 28, 2436, 13, 15883, 62...
2.765537
708
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon May 8 16:19:07 2017 @author: ajaver """ import os import cv2 import sys import glob import threading from functools import partial main_dir = '/Volumes/behavgenom_archive$/Celine/raw/' fnames = glob.glob(os.path.join(main_dir, '**', '*.avi')) fnames =...
[ 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, 2892, 1737, 220, 807, 1467, 25, 1129, 25, 2998, 2177, 198, 198, 31, 9800, 25, 257, 6592, ...
2.375439
285
from devito.ir import Call from devito.passes.iet.definitions import DataManager from devito.passes.iet.langbase import LangBB __all__ = ['CBB', 'CDataManager']
[ 6738, 1614, 10094, 13, 343, 1330, 4889, 198, 6738, 1614, 10094, 13, 6603, 274, 13, 1155, 13, 4299, 50101, 1330, 6060, 13511, 198, 6738, 1614, 10094, 13, 6603, 274, 13, 1155, 13, 17204, 8692, 1330, 16332, 15199, 198, 198, 834, 439, 834...
3.037037
54
#!/usr/bin/env python3 """Test methods about image process Make sure the existance of the images """ from ell import * import numpy as np _filter = Filter.from_name('db4')
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 37811, 14402, 5050, 546, 2939, 1429, 198, 198, 12050, 1654, 262, 2152, 590, 286, 262, 4263, 198, 37811, 628, 198, 6738, 30004, 1330, 1635, 198, 11748, 299, 32152, 355, 45941, ...
3.178571
56
# PyTorch import torch from torch.utils.data import IterableDataset, DataLoader from donkeycar.utils import train_test_split from donkeycar.parts.tub_v2 import Tub from torchvision import transforms from typing import List, Any from donkeycar.pipeline.types import TubRecord, TubDataset from donkeycar.pipeline.sequence ...
[ 2, 9485, 15884, 354, 198, 11748, 28034, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 40806, 540, 27354, 292, 316, 11, 6060, 17401, 198, 6738, 50085, 7718, 13, 26791, 1330, 4512, 62, 9288, 62, 35312, 198, 6738, 50085, 7718, 13, 42632, ...
2.684803
533
import os from tornado.template import Template __SNIPPET__ = os.path.join(os.path.dirname(os.path.abspath(__file__)), '_snippet')
[ 11748, 28686, 198, 6738, 33718, 13, 28243, 1330, 37350, 198, 198, 834, 15571, 31444, 2767, 834, 796, 28686, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 397, 2777, 776, 7, 834, 7753, 834, 36911, 705,...
2.714286
49
""" Support for getting the disk temperature of a host. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.hddtemp/ """ import logging from datetime import timedelta from telnetlib import Telnet import voluptuous as vol import homeassistant.helpers....
[ 37811, 198, 15514, 329, 1972, 262, 11898, 5951, 286, 257, 2583, 13, 198, 198, 1890, 517, 3307, 546, 428, 3859, 11, 3387, 3522, 284, 262, 10314, 379, 198, 5450, 1378, 11195, 12, 562, 10167, 13, 952, 14, 5589, 3906, 14, 82, 22854, 13,...
2.383459
1,064
import random prefix = [ 'Look at you! ', 'Bless ', 'Bless! ', 'I heard about that! ', 'Amen!', 'You and the kids doing alright?', 'Miss ya\'ll!' ] suffix = [ '. Amen!', '. God bless america', '. God bless!', ' haha', '. love ya!', '. love ya\'ll!', ]
[ 11748, 4738, 198, 198, 40290, 796, 685, 198, 6, 8567, 379, 345, 0, 46083, 198, 6, 33, 1203, 46083, 198, 6, 33, 1203, 0, 46083, 198, 6, 40, 2982, 546, 326, 0, 46083, 198, 6, 32, 3653, 0, 3256, 198, 6, 1639, 290, 262, 3988, 1804...
2.466019
103
import telegram from django.conf import settings from django.shortcuts import redirect from django.utils.decorators import method_decorator from django.views.generic import View from django.views.decorators.csrf import csrf_exempt from braces.views import CsrfExemptMixin from rest_framework.authentication import Bas...
[ 11748, 573, 30536, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 18941, 198, 6738, 42625, 14208, 13, 26791, 13, 12501, 273, 2024, 1330, 2446, 62, 12501, 273, 1352, 198, 6738, 42625, ...
3.847682
151
import os from datetime import datetime from os.path import join import pathlib from tqdm import tqdm import argparse import torch from torch import nn, optim from torch.autograd import Variable import torchvision from torchvision.transforms import Pad from torchvision.utils import make_grid import repackage repackage...
[ 11748, 28686, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 28686, 13, 6978, 1330, 4654, 198, 11748, 3108, 8019, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 11748, 1822, 29572, 198, 198, 11748, 28034, 198, 6738, 28034, 1...
2.549517
828