content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
import unittest from flask_monitoringdashboard.core.profiler.util.stringHash import StringHash
[ 11748, 555, 715, 395, 198, 198, 6738, 42903, 62, 41143, 278, 42460, 3526, 13, 7295, 13, 5577, 5329, 13, 22602, 13, 8841, 26257, 1330, 10903, 26257, 628 ]
3.592593
27
from django.shortcuts import render, get_object_or_404 from .models import News # Create your views here.
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 651, 62, 15252, 62, 273, 62, 26429, 198, 6738, 764, 27530, 1330, 3000, 198, 2, 13610, 534, 5009, 994, 13, 628, 628 ]
3.516129
31
#!/usr/bin/python import os.path import cppcodebase import random
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 28686, 13, 6978, 198, 11748, 269, 381, 8189, 8692, 198, 11748, 4738, 628, 628, 198 ]
2.84
25
""" FOTA update tool which is called from the dispatcher during installation Copyright (C) 2017-2022 Intel Corporation SPDX-License-Identifier: Apache-2.0 """ import logging import os import platform from threading import Timer from typing import Any, Optional, Mapping from future.moves.urllib.parse impo...
[ 37811, 198, 220, 220, 220, 376, 29009, 4296, 2891, 543, 318, 1444, 422, 262, 49952, 1141, 9988, 628, 220, 220, 220, 15069, 357, 34, 8, 2177, 12, 1238, 1828, 8180, 10501, 198, 220, 220, 220, 30628, 55, 12, 34156, 12, 33234, 7483, 25,...
3.462838
296
import copy import datetime import sys import os import time import argparse import traceback import pytz import syncthing from influxdb import InfluxDBClient import yaml from yaml2dataclass import Schema, SchemaPath from typing import Optional, Dict, Type, List from dataclasses import dataclass, asdict, field ...
[ 11748, 4866, 198, 11748, 4818, 8079, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 640, 198, 11748, 1822, 29572, 198, 11748, 12854, 1891, 198, 198, 11748, 12972, 22877, 198, 11748, 6171, 310, 722, 198, 6738, 25065, 9945, 1330, 4806, 2...
2.552374
1,432
# -*- coding: utf-8 -*- import os import re import shutil import typing from PIL import Image from PyPDF2 import PdfFileReader import PyPDF2.utils import pytest from preview_generator.exception import UnavailablePreviewType from preview_generator.manager import PreviewManager from tests import test_utils CURRENT_DI...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 4423, 346, 198, 11748, 19720, 198, 198, 6738, 350, 4146, 1330, 7412, 198, 6738, 9485, 20456, 17, 1330, 350, 7568, 8979, 3...
2.757709
227
from ipso_phen.ipapi.base.ipt_abstract import IptBase from ipso_phen.ipapi.tools import regions import numpy as np import cv2 import logging logger = logging.getLogger(__name__) from ipso_phen.ipapi.base import ip_common as ipc
[ 6738, 20966, 568, 62, 31024, 13, 541, 15042, 13, 8692, 13, 10257, 62, 397, 8709, 1330, 314, 457, 14881, 201, 198, 6738, 20966, 568, 62, 31024, 13, 541, 15042, 13, 31391, 1330, 7652, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, ...
2.585106
94
from wrapper_tests.upsert_test import * from wrapper_tests.upsertvaluedict_test import * import os import logging import sys import argparse import signal logging.getLogger().setLevel(logging.DEBUG) ch = logging.StreamHandler(sys.stdout) ch.setLevel(logging.DEBUG) formatter = logging.Formatter('[%(asctime)s - %(name)s...
[ 6738, 29908, 62, 41989, 13, 4739, 861, 62, 9288, 1330, 1635, 198, 6738, 29908, 62, 41989, 13, 4739, 861, 39728, 713, 62, 9288, 1330, 1635, 198, 11748, 28686, 198, 11748, 18931, 198, 11748, 25064, 198, 11748, 1822, 29572, 198, 11748, 673...
2.610909
275
import smtplib gmail_user = 'your email' gmail_password = 'your password' sent_from = gmail_user to = ['reciever email'] #Create a list for all the recievers subject = 'OMG Super Important Message' body = 'Hey, what\'s up?\n- You' email_text = """\ From: %s To: %s Subject: %s %s """ % (sent_from, ", "....
[ 11748, 895, 83, 489, 571, 198, 198, 14816, 62, 7220, 796, 705, 14108, 3053, 6, 220, 220, 198, 14816, 62, 28712, 796, 705, 14108, 9206, 6, 198, 198, 34086, 62, 6738, 796, 308, 4529, 62, 7220, 220, 220, 198, 1462, 796, 37250, 8344, ...
2.430894
246
''' Created on 11 Sep 2015 @author: si ''' import json import random import time from threading import Thread # import urllib import urllib2 from Queue import Queue import logging logger = logging.getLogger(__name__) API_URL = "http://127.0.0.1:5000/" if __name__ == '__main__': l = LoadTest(10,30) l.go() ...
[ 7061, 6, 198, 41972, 319, 1367, 8621, 1853, 198, 198, 31, 9800, 25, 33721, 198, 7061, 6, 198, 11748, 33918, 198, 11748, 4738, 198, 11748, 640, 198, 6738, 4704, 278, 1330, 14122, 198, 2, 1330, 2956, 297, 571, 198, 11748, 2956, 297, 5...
2.563492
126
from django.contrib import admin from django.conf.urls import include,url from .import views urlpatterns = [ url(r'^$', views.IndexView.as_view(),name='index'), #homeapp_detail_view_url url(r'^(?P<pk>[0-9]+)/$',views.LocationView.as_view(),name='property'), #homeapp/detailview/moredetailview url(r'...
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 2291, 11, 6371, 198, 6738, 764, 11748, 5009, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 19016, 7, 81, 6, 61, 3, ...
2.352601
173
from utils import * from model import Model2 if __name__ == '__main__': train_data = DataLoader('../data/trainX.txt', '../data/trainY.txt') test_data = DataLoader('../data/testX.txt', '../data/testY.txt') train_data.set_batch(100) test_data.set_batch(100) char_dic = CharDic([train_data]...
[ 6738, 3384, 4487, 1330, 1635, 201, 198, 6738, 2746, 1330, 9104, 17, 201, 198, 201, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 201, 198, 220, 220, 220, 4512, 62, 7890, 796, 6060, 17401, 10786, 40720, 7890, 14, 27432...
1.99631
271
#!/usr/bin/env python ############################################################################## ## # This file is part of Sardana ## # http://www.sardana-controls.org/ ## # Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain ## # Sardana is free software: you can redistribute it and/or modify # it under th...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 29113, 29113, 7804, 4242, 2235, 198, 2235, 198, 2, 770, 2393, 318, 636, 286, 46997, 2271, 198, 2235, 198, 2, 2638, 1378, 2503, 13, 82, 446, 2271, 12, 13716, 82, 13, 2398, 14, ...
3.711974
309
import numpy as np
[ 11748, 299, 32152, 355, 45941, 628 ]
3.333333
6
from asaas.typing import SyncAsync from typing import Any, Optional, Dict
[ 6738, 355, 64, 292, 13, 774, 13886, 1330, 35908, 42367, 198, 6738, 19720, 1330, 4377, 11, 32233, 11, 360, 713, 628 ]
3.571429
21
from functools import partial from uuid import UUID from dateutil.parser import parse as dateutil_parse from django.apps import apps from django.conf import settings from django.core.exceptions import ObjectDoesNotExist from rest_framework import serializers from rest_framework.exceptions import ValidationError from r...
[ 6738, 1257, 310, 10141, 1330, 13027, 198, 6738, 334, 27112, 1330, 471, 27586, 198, 198, 6738, 3128, 22602, 13, 48610, 1330, 21136, 355, 3128, 22602, 62, 29572, 198, 6738, 42625, 14208, 13, 18211, 1330, 6725, 198, 6738, 42625, 14208, 13, ...
3.497778
225
import math import random from ark import dear_imgui, ApplicationFacade, Arena, Event, Integer, Collider, RenderObject, Size, Camera, Vec3, Numeric if __name__ == '__main__': main(Application(_application))
[ 11748, 10688, 198, 11748, 4738, 198, 198, 6738, 610, 74, 1330, 13674, 62, 320, 48317, 11, 15678, 47522, 671, 11, 10937, 11, 8558, 11, 34142, 11, 50253, 11, 46722, 10267, 11, 12849, 11, 20432, 11, 38692, 18, 11, 399, 39223, 628, 628, ...
3.375
64
# coding: utf-8 """ Jamf Pro API ## Overview This is a sample Jamf Pro server which allows for usage without any authentication. The Jamf Pro environment which supports the Try it Out functionality does not run the current beta version of Jamf Pro, thus any newly added endpoints will result in an error and sh...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 9986, 69, 1041, 7824, 628, 220, 220, 220, 22492, 28578, 770, 318, 257, 6291, 9986, 69, 1041, 4382, 543, 3578, 329, 8748, 1231, 597, 18239, 13, 383, 9986, 69, 104...
2.920561
428
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'ssokeygendialog.ui' # # Created: Sun Feb 1 12:33:36 2015 # by: PyQt5 UI code generator 5.4 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 5178, 7822, 7560, 422, 3555, 334, 72, 2393, 705, 82, 568, 2539, 70, 437, 498, 519, 13, 9019, 6, 198, 2, 198, 2, 15622, 25, 3825, 3158, 220, 352, 1105, 25, ...
2.622642
106
import urllib.request import os from typing import List from util.n_util import NUser from util.n_util import get_n_entry import time import threading from util.array_util import slice_array delay: float = 2.5 def save_files_to_dir(file_url_list: List[str], path: str, update=None, thread_count: int = 1) -> None: ...
[ 11748, 2956, 297, 571, 13, 25927, 198, 11748, 28686, 198, 6738, 19720, 1330, 7343, 198, 6738, 7736, 13, 77, 62, 22602, 1330, 399, 12982, 198, 6738, 7736, 13, 77, 62, 22602, 1330, 651, 62, 77, 62, 13000, 198, 11748, 640, 198, 11748, ...
2.359792
1,348
import pytest from stable_baselines import A2C, ACER, ACKTR, DeepQ, DDPG, PPO1, PPO2, TRPO from stable_baselines.ddpg import AdaptiveParamNoiseSpec from stable_baselines.common.identity_env import IdentityEnv, IdentityEnvBox from stable_baselines.common.vec_env import DummyVecEnv PARAM_NOISE_DDPG = AdaptiveParamNoise...
[ 11748, 12972, 9288, 198, 198, 6738, 8245, 62, 12093, 20655, 1330, 317, 17, 34, 11, 7125, 1137, 11, 7125, 42, 5446, 11, 10766, 48, 11, 360, 6322, 38, 11, 350, 16402, 16, 11, 350, 16402, 17, 11, 7579, 16402, 198, 6738, 8245, 62, 120...
2.521645
462
import tensorflow as tf from tensorflow.python.saved_model import signature_constants from tensorflow.python.saved_model import tag_constants export_dir = './reference/00000002' graph_pb = './creditcardfraud.pb' builder = tf.saved_model.builder.SavedModelBuilder(export_dir) with tf.gfile.GFile(graph_pb, "rb") as f: ...
[ 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 11192, 273, 11125, 13, 29412, 13, 82, 9586, 62, 19849, 1330, 9877, 62, 9979, 1187, 198, 6738, 11192, 273, 11125, 13, 29412, 13, 82, 9586, 62, 19849, 1330, 7621, 62, 9979, 1187, 198, 198...
2.253493
501
from __future__ import division from __future__ import absolute_import from pycuda.tools import context_dependent_memoize import numpy as np
[ 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 6738, 12972, 66, 15339, 13, 31391, 1330, 4732, 62, 21186, 62, 11883, 78, 1096, 198, 11748, 299, 32152, 355, 45941, 628, 628, 198 ]
3.65
40
import torch from scipy.stats import median_absolute_deviation
[ 11748, 28034, 201, 198, 6738, 629, 541, 88, 13, 34242, 1330, 14288, 62, 48546, 62, 7959, 3920, 201, 198, 201, 198, 201, 198, 201, 198 ]
2.84
25
# eliminate duplicate service periods from a GTFS database from graphserver.ext.gtfs.gtfsdb import GTFSDatabase import sys from optparse import OptionParser if __name__=='__main__':
[ 2, 11005, 23418, 2139, 9574, 422, 257, 7963, 10652, 6831, 198, 198, 6738, 4823, 15388, 13, 2302, 13, 13655, 9501, 13, 13655, 9501, 9945, 1330, 7963, 37, 10305, 265, 5754, 198, 198, 11748, 25064, 198, 6738, 2172, 29572, 1330, 16018, 4667...
2.871429
70
print(MyClass().__repr__())
[ 4798, 7, 3666, 9487, 22446, 834, 260, 1050, 834, 28955, 198 ]
2.545455
11
import pytest from prefect.core import Edge, Flow, Parameter, Task from prefect.tasks.core import collections from prefect.tasks.core.constants import Constant from prefect.tasks.core.function import FunctionTask
[ 11748, 12972, 9288, 198, 198, 6738, 662, 2309, 13, 7295, 1330, 13113, 11, 27782, 11, 25139, 2357, 11, 15941, 198, 6738, 662, 2309, 13, 83, 6791, 13, 7295, 1330, 17268, 198, 6738, 662, 2309, 13, 83, 6791, 13, 7295, 13, 9979, 1187, 13...
3.57377
61
"""Node class module for Binary Tree."""
[ 37811, 19667, 1398, 8265, 329, 45755, 12200, 526, 15931, 628 ]
4.2
10
# This file is part of QuTiP: Quantum Toolbox in Python. # # Copyright (c) 2011 and later, Paul D. Nation and Robert J. Johansson. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: ...
[ 2, 770, 2393, 318, 636, 286, 2264, 40533, 47, 25, 29082, 16984, 3524, 287, 11361, 13, 198, 2, 198, 2, 220, 220, 220, 15069, 357, 66, 8, 2813, 290, 1568, 11, 3362, 360, 13, 8741, 290, 5199, 449, 13, 16053, 44038, 13, 198, 2, 220,...
2.340166
11,415
#!/usr/bin/env python # -*- coding: utf-8 -*- import pytest from deepsv import deepsv from unittest.mock import patch """Tests for the deepsv module. """ # Fixture example
[ 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, 12972, 9288, 198, 6738, 2769, 21370, 1330, 2769, 21370, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, ...
2.695652
69
#!/usr/bin/env python """TcEx Dependencies Command""" # standard library import os import platform import shutil import subprocess # nosec import sys from distutils.version import StrictVersion # pylint: disable=no-name-in-module from pathlib import Path from typing import List from urllib.parse import quote # third...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 51, 66, 3109, 37947, 3976, 9455, 37811, 198, 2, 3210, 5888, 198, 11748, 28686, 198, 11748, 3859, 198, 11748, 4423, 346, 198, 11748, 850, 14681, 220, 1303, 9686, 66, 198, 11748, ...
3.255319
141
from .AST.sentence import * from .AST.expression import * from .AST.error import * import sys sys.path.append("../") from console import *
[ 6738, 764, 11262, 13, 34086, 594, 1330, 1635, 198, 6738, 764, 11262, 13, 38011, 1330, 1635, 198, 6738, 764, 11262, 13, 18224, 1330, 1635, 220, 198, 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 7203, 40720, 4943, 198, 6738, 8624, 1330,...
3.227273
44
# Copyright 2017-present Open Networking Foundation # # 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 ag...
[ 198, 2, 15069, 2177, 12, 25579, 4946, 7311, 278, 5693, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, ...
3.554806
593
#!/usr/bin/env python # -*- coding: utf-8 -*- # @author: x.huang # @date:17-8-4 import logging from pony.orm import db_session from handlers.base.base import BaseRequestHandler
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 2488, 9800, 25, 2124, 13, 13415, 648, 198, 2, 2488, 4475, 25, 1558, 12, 23, 12, 19, 198, 198, 11748, 18931,...
2.628571
70
# -*- coding: utf-8 -*- #| This file is part of cony #| #| @package Pysol python cli application #| @author <lotfio lakehal> #| @license MIT #| @version 0.1.0 #| @copyright 2019 lotfio lakehal import sys # load module function # this function loads a module by string name
[ 2, 220, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 91, 770, 2393, 318, 636, 286, 369, 88, 198, 2, 91, 198, 2, 91, 2488, 26495, 220, 220, 220, 220, 350, 893, 349, 21015, 537, 72, 3586, 198, 2, 91, 2488, 98...
2.491525
118
import torch import torch.nn as nn import torch.nn.functional as F import pytest from . import autograd_hacks # Autograd helpers, from https://gist.github.com/apaszke/226abdf867c4e9d6698bd198f3b45fb7 def jacobian(y: torch.Tensor, x: torch.Tensor, create_graph=False): jac = [] flat_y = y.reshape(-1) ...
[ 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 11748, 12972, 9288, 198, 198, 6738, 764, 1330, 1960, 519, 6335, 62, 71, 4595, 628, 628, 628, 198, 2, 5231, 519, 6...
2.194118
340
import unittest import mailpile from mock import patch from mailpile.commands import Action as action from tests import MailPileUnittest if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 11748, 6920, 79, 576, 198, 6738, 15290, 1330, 8529, 198, 6738, 6920, 79, 576, 13, 9503, 1746, 1330, 7561, 355, 2223, 198, 198, 6738, 5254, 1330, 11099, 47, 576, 3118, 715, 395, 628, 628, 628, 198, 361, 115...
3.080645
62
from gym import spaces import numpy as np from scipy import interpolate import yaml from navrep.envs.navreptrainenv import NavRepTrainEnv from navrep.rosnav_models.utils.reward import RewardCalculator from navrep.rosnav_models.utils.reward import RewardCalculator
[ 6738, 11550, 1330, 9029, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 1330, 39555, 378, 198, 11748, 331, 43695, 198, 198, 6738, 6812, 7856, 13, 268, 14259, 13, 28341, 260, 457, 3201, 24330, 1330, 13244, 6207, 44077, 4834...
3.271605
81
from __future__ import annotations import sys from functools import wraps from typing import TYPE_CHECKING, Callable, Dict, Iterable, List, Optional, Tuple from pdm._types import CandidateInfo, Source from pdm.context import context from pdm.exceptions import CandidateInfoNotFound, CorruptedCacheError from pdm.models...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 25064, 198, 6738, 1257, 310, 10141, 1330, 27521, 198, 6738, 19720, 1330, 41876, 62, 50084, 2751, 11, 4889, 540, 11, 360, 713, 11, 40806, 540, 11, 7343, 11, 32233, 11, 309, 29291, ...
3.437838
185
import pytest from starsessions import SessionBackend
[ 11748, 12972, 9288, 198, 198, 6738, 5788, 6202, 1330, 23575, 7282, 437, 628, 628, 198 ]
3.933333
15
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import logging from pyarrow import flight from sqlalchemy_dremio.exceptions import Error, NotSupportedError from sqlalchemy_dremio.flight_auth import HttpDremioClientAu...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 18931, 198, ...
3.275701
214
#!/opt/rasa/anaconda/bin/python # -*-: coding utf-8 -*- """ Snips core and nlu server. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import json import time import os from socket import error as socket_error fr...
[ 2, 48443, 8738, 14, 8847, 64, 14, 272, 330, 13533, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 25, 19617, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 5489, 2419, 4755, 290, 299, 2290, 4382, 13, 37227, 198, 6738, 11593, 37443, 834, 13...
3.005348
187
# -*- coding: utf-8 -*- # Generated by Django 1.11.9 on 2018-08-02 17:53 from __future__ import unicode_literals from django.db import migrations, models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 24, 319, 2864, 12, 2919, 12, 2999, 1596, 25, 4310, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.736842
57
from abc import ABCMeta, abstractmethod import random import json import pickle import numpy as np import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' import nltk from nltk.stem import WordNetLemmatizer from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense, Dropout from tensorflow....
[ 6738, 450, 66, 1330, 9738, 48526, 11, 12531, 24396, 198, 198, 11748, 4738, 198, 11748, 33918, 198, 11748, 2298, 293, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 198, 418, 13, 268, 2268, 17816, 10234, 62, 8697, 47, 62, ...
2.906832
161
import discord from discord.ext import commands client = commands.Bot(command_prefix='your prefix',owner_ids = {your user id},case_insensitive=True )
[ 11748, 36446, 198, 6738, 36446, 13, 2302, 1330, 9729, 628, 198, 16366, 796, 9729, 13, 20630, 7, 21812, 62, 40290, 11639, 14108, 21231, 3256, 18403, 62, 2340, 796, 1391, 14108, 2836, 4686, 5512, 7442, 62, 1040, 18464, 28, 17821, 1267, 62...
3.731707
41
""" @brief Generate Fe55 images and associated darks and bias images according to section 5.4 of the E/O document (Dec 19, 2012 version). @author J. Chiang <jchiang@slac.stanford.edu> """ import os import numpy as np from sim_inputs import * from sim_tools import * if __name__ == '__main__': nexp = 10 expt...
[ 37811, 198, 31, 65, 3796, 2980, 378, 5452, 2816, 4263, 290, 3917, 288, 5558, 290, 10690, 4263, 198, 38169, 284, 2665, 642, 13, 19, 286, 262, 412, 14, 46, 3188, 357, 10707, 678, 11, 2321, 2196, 737, 198, 198, 31, 9800, 449, 13, 609...
2.6
175
import math import numpy as np import torch import torch.nn as nn from ....ops.pointnet2.pointnet2_stack import pointnet2_modules as pointnet2_stack_modules from ....ops.pointnet2.pointnet2_stack import pointnet2_utils as pointnet2_stack_utils from ....utils import common_utils from ...backbones_2d.transformer import ...
[ 11748, 10688, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 198, 6738, 19424, 2840, 13, 4122, 3262, 17, 13, 4122, 3262, 17, 62, 25558, 1330, 966, 3262, 17, 62, 18170, 355, 966,...
2.064066
2,076
import os
[ 11748, 28686, 628 ]
3.666667
3
#PRIMARY IMPORTS import discord, os, datetime, sys, json, traceback, logging #SECONDARY IMPORTS from apscheduler.schedulers.asyncio import AsyncIOScheduler from discord.ext import commands from data import config #LOGGING logger = logging.getLogger("ivry") logger.debug("errors.py Started")
[ 2, 4805, 3955, 13153, 30023, 33002, 201, 198, 201, 198, 11748, 36446, 11, 28686, 11, 4818, 8079, 11, 25064, 11, 33918, 11, 12854, 1891, 11, 18931, 201, 198, 201, 198, 2, 23683, 18672, 13153, 30023, 33002, 201, 198, 201, 198, 6738, 257...
2.758929
112
## Problem 5: Extracting Data from JSON # Example: http://py4e-data.dr-chuck.net/comments_42.json # data consists of a number of names and comment counts in JSON # { # comments: [ # { # name: "Matthias" # count: 97 # }, # { # name: "Geomer" # count: 97 # } # ... # ] # } ...
[ 2235, 20647, 642, 25, 29677, 278, 6060, 422, 19449, 198, 2, 17934, 25, 2638, 1378, 9078, 19, 68, 12, 7890, 13, 7109, 12, 354, 1347, 13, 3262, 14, 15944, 62, 3682, 13, 17752, 198, 2, 1366, 10874, 286, 257, 1271, 286, 3891, 290, 291...
2.815846
467
from ariadne import make_executable_schema, load_schema_from_path from ariadne.asgi import GraphQL from resolvers import query, skill, person, eye_color, mutation # import schema from GraphQL file type_defs = load_schema_from_path("./schema.gql") schema = make_executable_schema( type_defs, query, skill, person, ...
[ 6738, 257, 21244, 710, 1330, 787, 62, 18558, 18187, 62, 15952, 2611, 11, 3440, 62, 15952, 2611, 62, 6738, 62, 6978, 198, 6738, 257, 21244, 710, 13, 292, 12397, 1330, 29681, 9711, 198, 6738, 581, 349, 690, 1330, 12405, 11, 5032, 11, ...
2.892308
130
import importlib import time from pathlib import Path import os import sys print("Import plugins ..") import_plugins() print("Import app ..") import modules.app.App as piTomation app: piTomation.App print("Start app ..") app = piTomation.App() #try: # app = piTomation.App() #except Exception as ex: # print(e...
[ 11748, 1330, 8019, 198, 11748, 640, 198, 6738, 3108, 8019, 1330, 10644, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 4798, 7203, 20939, 20652, 11485, 4943, 198, 11748, 62, 37390, 3419, 198, 198, 4798, 7203, 20939, 598, 11485, 4943, 198...
2.551724
174
""" Functions support other modules. """ import uuid def check_response(response, key=None): """CHeck the api response. Make sure the status call is successful and the response have specific key. Return: class: `Response <Response>` """ code = response.status_code if not 200 <= code ...
[ 37811, 198, 24629, 2733, 1104, 584, 13103, 13, 198, 37811, 198, 11748, 334, 27112, 628, 198, 4299, 2198, 62, 26209, 7, 26209, 11, 1994, 28, 14202, 2599, 198, 220, 220, 220, 37227, 34, 1544, 694, 262, 40391, 2882, 13, 628, 220, 220, ...
2.592275
466
import numpy as np if __name__ == '__main__': main()
[ 11748, 299, 32152, 355, 45941, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
2.4
25
import tensorflow as tf import numpy as np with tf.variable_scope("student"): input_label = tf.placeholder(dtype=tf.float32, shape=[10, 10], name="label") input_image = tf.placeholder(dtype=tf.float32, shape=[10, 224, 224, 3], name="input") conv1 = tf.layers.conv2d(inputs=input_image, filters=64, kernel_s...
[ 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 355, 45941, 628, 198, 4480, 48700, 13, 45286, 62, 29982, 7203, 50139, 1, 2599, 198, 220, 220, 220, 5128, 62, 18242, 796, 48700, 13, 5372, 13829, 7, 67, 4906, 28, 27110, 13,...
2.37744
461
import scipy.stats import numpy as np def f_test(sample_x, sample_y, larger_varx_alt): """ Computes the F-value and corresponding p-value for a pair of samples and alternative hypothesis. Parameters ---------- sample_x : list A random sample x1,...,xnx. Let its (underlying) variance be ox...
[ 11748, 629, 541, 88, 13, 34242, 198, 11748, 299, 32152, 355, 45941, 628, 198, 4299, 277, 62, 9288, 7, 39873, 62, 87, 11, 6291, 62, 88, 11, 4025, 62, 7785, 87, 62, 2501, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 3082, ...
2.489559
2,155
import os, subprocess def compile_core(comp, scilib): """ ATTENTION, NOT FINISHED """ subprocess.call(("make pawpy_%s"%comp).split()) def compile_core(comp, scilib): """ ATTENTION, NOT FINISHED """ subprocess.call("make hfc".split())
[ 11748, 28686, 11, 850, 14681, 198, 198, 4299, 17632, 62, 7295, 7, 5589, 11, 629, 22282, 2599, 198, 197, 37811, 198, 197, 17139, 45589, 11, 5626, 33642, 18422, 1961, 198, 197, 37811, 198, 197, 7266, 14681, 13, 13345, 7, 7203, 15883, 41...
2.641304
92
""" Example usage of Finnhub socket API. """ from __future__ import print_function # Py2 compat import websocket from finnhub_python.utils import get_finnhub_api_key tick_file = 'raw_ticks.txt' token = get_finnhub_api_key() SYMBOLS = [ "AAPL", "SPY", "VXX", "BINANCE:ETHUSDT", "BINANCE:BTCU...
[ 37811, 198, 16281, 8748, 286, 15368, 40140, 17802, 7824, 13, 198, 37811, 198, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 1303, 9485, 17, 8330, 198, 11748, 2639, 5459, 198, 6738, 957, 77, 40140, 62, 29412, 13, 26791, 1330, 651, ...
1.932551
341
""" Pycovjson - Command line interface Author: rileywilliams Version: 0.1.0 """ import argparse from pycovjson.write import Writer from pycovjson.read_netcdf import NetCDFReader as Reader def main(): """ Command line interface for pycovjson - Converts Scientific Data Formats into CovJSON and saves to disk. ...
[ 37811, 198, 20519, 66, 709, 17752, 532, 9455, 1627, 7071, 198, 13838, 25, 374, 9618, 10594, 1789, 82, 198, 14815, 25, 657, 13, 16, 13, 15, 198, 37811, 198, 11748, 1822, 29572, 198, 198, 6738, 12972, 66, 709, 17752, 13, 13564, 1330, ...
2.572573
999
import discord from discord.ext import commands from .utils import checks from .utils.dataIO import dataIO from __main__ import send_cmd_help from __main__ import settings from datetime import datetime from random import choice from random import sample from copy import deepcopy from collections import namedt...
[ 11748, 36446, 201, 198, 6738, 36446, 13, 2302, 1330, 9729, 201, 198, 6738, 764, 26791, 1330, 8794, 201, 198, 6738, 764, 26791, 13, 7890, 9399, 1330, 1366, 9399, 201, 198, 6738, 11593, 12417, 834, 1330, 3758, 62, 28758, 62, 16794, 201, ...
3.085427
199
"""Citizens model.""" # Django from django.db import models from django.contrib.auth.models import AbstractUser from django.core.validators import RegexValidator # models from paranuara.companies.models import Company # PostgreSQL fields from django.contrib.postgres.fields import JSONField # Utilities from paranuar...
[ 37811, 34, 34100, 2746, 526, 15931, 198, 198, 2, 37770, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 27741, 12982, 198, 6738, 42625, 14208, 13, 7295, 13, 12102, 2024,...
3.485437
103
# -*- coding: utf-8 -*- from cobra.utils import normalize
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 22843, 430, 13, 26791, 1330, 3487, 1096, 198 ]
2.458333
24
import pygame from chess.board import Board from .variable_declaration import black_piece, white_piece, position_piece, board_square_size
[ 11748, 12972, 6057, 198, 6738, 19780, 13, 3526, 1330, 5926, 198, 6738, 764, 45286, 62, 32446, 10186, 1330, 2042, 62, 12239, 11, 2330, 62, 12239, 11, 2292, 62, 12239, 11, 3096, 62, 23415, 62, 7857, 628 ]
3.861111
36
import numpy as np from kivygames.games import Game import kivygames.games.noughtsandcrosses.c as c
[ 11748, 299, 32152, 355, 45941, 198, 198, 6738, 479, 452, 88, 19966, 13, 19966, 1330, 3776, 198, 198, 11748, 479, 452, 88, 19966, 13, 19966, 13, 77, 619, 912, 392, 19692, 274, 13, 66, 355, 269, 628, 198 ]
2.736842
38
#! /usr/bin/env python import argparse import json import time import urllib.error import urllib.request if __name__ == "__main__": main()
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 1822, 29572, 198, 11748, 33918, 198, 11748, 640, 198, 11748, 2956, 297, 571, 13, 18224, 198, 11748, 2956, 297, 571, 13, 25927, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366,...
2.754717
53
import functools import re import asyncio from io import BytesIO from discord.ext import commands import discord from Utils import canvas import random
[ 11748, 1257, 310, 10141, 198, 11748, 302, 198, 11748, 30351, 952, 198, 6738, 33245, 1330, 2750, 4879, 9399, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 11748, 36446, 198, 6738, 7273, 4487, 1330, 21978, 198, 11748, 4738, 628 ]
4.026316
38
# -*- coding: utf-8 -*- from __future__ import unicode_literals from appconf import AppConf from django.conf import settings # noqa
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 598, 10414, 1330, 2034, 18546, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 220, 1303, 645, ...
3
45
import awkward as ak from coffea.nanoevents.methods import vector import pytest ATOL = 1e-8
[ 11748, 13006, 355, 47594, 198, 6738, 763, 16658, 64, 13, 77, 5733, 31534, 13, 24396, 82, 1330, 15879, 198, 11748, 12972, 9288, 628, 198, 1404, 3535, 796, 352, 68, 12, 23, 628, 628, 628 ]
2.911765
34
import roadrunner import teplugins as tel i = 0 #for i in range(100): try: noisePlugin = tel.Plugin ("tel_add_noise") print noisePlugin.listOfProperties() # Create a roadrunner instance rr = roadrunner.RoadRunner() rr.load("sbml_test_0001.xml") # Generate data data = rr.simulate(0, 10, 51...
[ 11748, 2975, 16737, 198, 11748, 573, 37390, 355, 13632, 198, 198, 72, 796, 657, 198, 2, 1640, 1312, 287, 2837, 7, 3064, 2599, 198, 28311, 25, 198, 220, 220, 220, 7838, 37233, 796, 13632, 13, 37233, 5855, 37524, 62, 2860, 62, 3919, 7...
2.472527
364
from renpy import store
[ 6738, 8851, 9078, 1330, 3650, 628 ]
4.166667
6
import logging from ncservice.ncDeviceOps.nc_device_ops import NcDeviceOps from ncservice.ncDeviceOps.task_report import TaskReport from ncservice.ncDeviceOps.threaded.base_thread_class import BaseThreadClass logger = logging.getLogger('main.{}'.format(__name__)) extra = {'signature': '---SIGNATURE-NOT-SET---'}
[ 11748, 18931, 198, 6738, 299, 66, 15271, 13, 10782, 24728, 41472, 13, 10782, 62, 25202, 62, 2840, 1330, 399, 66, 24728, 41472, 198, 6738, 299, 66, 15271, 13, 10782, 24728, 41472, 13, 35943, 62, 13116, 1330, 15941, 19100, 198, 6738, 299,...
3.088235
102
""" This program visualizes nested for loops by printing number 0 through 3 and then 0 through 3 for the nested loop. """ for i in range(4): print("Outer for loop: " + str(i)) for j in range(4): print(" Inner for loop: " + str(j))
[ 37811, 201, 198, 1212, 1430, 5874, 4340, 28376, 329, 23607, 416, 13570, 1271, 657, 832, 513, 201, 198, 392, 788, 657, 832, 513, 329, 262, 28376, 9052, 13, 201, 198, 37811, 201, 198, 201, 198, 1640, 1312, 287, 2837, 7, 19, 2599, 201,...
2.6875
96
from collections import defaultdict import graphene import pytest from django.core.exceptions import ValidationError from ....shipping.error_codes import ShippingErrorCode from ..mutations import BaseChannelListingMutation
[ 6738, 17268, 1330, 4277, 11600, 198, 198, 11748, 42463, 198, 11748, 12972, 9288, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 3254, 24765, 12331, 198, 198, 6738, 19424, 1477, 4501, 13, 18224, 62, 40148, 1330, 24147, 12331, 10...
4.087719
57
# -*- coding: utf-8 -*- # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # # Authors: Luc LEGER / Cooprative ARTEFACTS <artefacts.lle@gmail.com> import requests from django.conf import settings from django.contrib import...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 921, 815, 423, 2722, 257, 4866, 286, 262, 22961, 6708, 3529, 3611, 5094, 13789, 198, 2, 1863, 351, 428, 1430, 13, 220, 1002, 407, 11, 766, 1279, 4023, 1378, 2503, ...
2.240092
4,365
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. import socket from twisted.persisted import styles from twisted.internet.base import BaseConnector from twisted.internet import defer, interfaces, error from twisted.python import failure from abstract import ConnectedSocket from ops ...
[ 2, 15069, 357, 66, 8, 5878, 12, 15724, 40006, 24936, 46779, 13, 198, 2, 4091, 38559, 24290, 329, 3307, 13, 628, 198, 11748, 17802, 198, 198, 6738, 19074, 13, 19276, 6347, 1330, 12186, 198, 6738, 19074, 13, 37675, 13, 8692, 1330, 7308,...
4.446809
94
import unittest from pypika import Table from pypika.analytics import Count from pypika.dialects import MSSQLQuery from pypika.utils import QueryException
[ 11748, 555, 715, 395, 198, 198, 6738, 279, 4464, 9232, 1330, 8655, 198, 6738, 279, 4464, 9232, 13, 38200, 14094, 1330, 2764, 198, 6738, 279, 4464, 9232, 13, 38969, 478, 82, 1330, 337, 5432, 9711, 20746, 198, 6738, 279, 4464, 9232, 13,...
3.340426
47
import cvxpy as cvx import numpy as np from collections import namedtuple from metric import metric, cd import pandas as pd import sys from helper import make_dataset
[ 11748, 269, 85, 87, 9078, 355, 269, 85, 87, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 6738, 18663, 1330, 18663, 11, 22927, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 25064, 198, 6738, 319...
2.80303
66
import unittest import os import subprocess import base
[ 11748, 555, 715, 395, 198, 11748, 28686, 198, 11748, 850, 14681, 198, 198, 11748, 2779, 628 ]
3.625
16
"""Queue implementation using circularly linked list for storage."""
[ 37811, 34991, 7822, 1262, 18620, 306, 6692, 1351, 329, 6143, 526, 15931, 198 ]
5.307692
13
# -*- encoding: utf-8 """ Various helper constants and functions. """ import os import re import sys import time import traceback def curr_time(): """Current time in %H:%M""" return time.strftime("%H:%M") def curr_time_sec(): """Current time in %H:%M:%S""" return time.strftime("%H:%M:%S") def ge...
[ 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 198, 37811, 198, 40009, 31904, 38491, 290, 5499, 13, 198, 37811, 198, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 25064, 198, 11748, 640, 198, 11748, 12854, 1891, 628, 198, 4299, 1090, ...
2.326606
545
""" :mod:`meshes` -- Discretization =============================== Everything related to meshes appropriate for the multigrid solver. """ # Copyright 2018-2020 The emg3d Developers. # # This file is part of emg3d. # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except...
[ 37811, 198, 198, 25, 4666, 25, 63, 6880, 956, 63, 1377, 8444, 1186, 1634, 198, 4770, 25609, 18604, 198, 198, 19693, 3519, 284, 48754, 5035, 329, 262, 1963, 3692, 312, 1540, 332, 13, 198, 198, 37811, 198, 2, 15069, 2864, 12, 42334, 3...
2.313914
11,844
#! /usr/bin/python2 # -*- coding: utf-8 -*- """ Clock function to take running time following Segmatch. """ # BSD 3-Clause License # # Copyright (c) 2019, FPAI # Copyright (c) 2019, SeriouslyHAO # Copyright (c) 2019, xcj2019 # Copyright (c) 2019, Leonfirst # # All rights reserved. # # Redistribution and use in source a...
[ 2, 0, 1220, 14629, 14, 8800, 14, 29412, 17, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 44758, 2163, 284, 1011, 2491, 640, 1708, 31220, 15699, 13, 198, 37811, 198, 2, 347, 10305, 513, 12, 2601, ...
3.467836
513
from office365.runtime.client_object_collection import ClientObjectCollection from office365.runtime.resource_path_service_operation import ResourcePathServiceOperation from office365.sharepoint.view import View
[ 6738, 2607, 24760, 13, 43282, 13, 16366, 62, 15252, 62, 43681, 1330, 20985, 10267, 36307, 198, 6738, 2607, 24760, 13, 43282, 13, 31092, 62, 6978, 62, 15271, 62, 27184, 1330, 20857, 15235, 16177, 32180, 198, 6738, 2607, 24760, 13, 20077, ...
4.630435
46
from common_src.lib.model.post import Post from common_src.lib.model.source import Source from common_src.scrapers.abstract_scraper import make_soup, remove_dups, now SOURCE_CODE = "second_extinction" WEBSITE = "https://www.secondextinctiongame.com/news" ALT_IMAGE = 'https://www.secondextinctiongame.com/static/242486b...
[ 6738, 2219, 62, 10677, 13, 8019, 13, 19849, 13, 7353, 1330, 2947, 198, 6738, 2219, 62, 10677, 13, 8019, 13, 19849, 13, 10459, 1330, 8090, 198, 6738, 2219, 62, 10677, 13, 1416, 2416, 364, 13, 397, 8709, 62, 1416, 38545, 1330, 787, 62...
2.74359
156
# # alexnet.py # # Author(s): # Matteo Spallanzani <spmatteo@iis.ee.ethz.ch> # # Copyright (c) 2020-2021 ETH Zurich. # # 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...
[ 2, 220, 198, 2, 257, 2588, 3262, 13, 9078, 198, 2, 220, 198, 2, 6434, 7, 82, 2599, 198, 2, 38789, 78, 1338, 439, 35410, 3216, 1279, 2777, 6759, 660, 78, 31, 72, 271, 13, 1453, 13, 2788, 89, 13, 354, 29, 198, 2, 220, 198, 2, ...
3.268519
216
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 11, 15720, 602, 628 ]
2.891892
37
#!/bin/python3 # Libraries import sys import array import textwrap # Variable Declaration madlib_selection = "example.txt" madlib_array = array.array('i') copy_state = False user_filler = "" new_madlib = [] if len(sys.argv) != 1: print(len(sys.argv)) if sys.argv[1] == "-": print("This program takes t...
[ 2, 48443, 8800, 14, 29412, 18, 198, 198, 2, 46267, 198, 11748, 25064, 198, 11748, 7177, 198, 11748, 2420, 37150, 198, 198, 2, 35748, 24720, 198, 9937, 8019, 62, 49283, 796, 366, 20688, 13, 14116, 1, 198, 9937, 8019, 62, 18747, 796, ...
2.466513
433
import pytest from django.utils.timezone import now from pretix.base.models import Device, Event, Organizer, Team, User from pretix.base.models.devices import generate_api_token
[ 11748, 12972, 9288, 198, 6738, 42625, 14208, 13, 26791, 13, 2435, 11340, 1330, 783, 198, 198, 6738, 2181, 844, 13, 8692, 13, 27530, 1330, 16232, 11, 8558, 11, 7221, 7509, 11, 4816, 11, 11787, 198, 6738, 2181, 844, 13, 8692, 13, 27530,...
3.418182
55
import numpy as np from PIL import Image, ImageOps, ImageEnhance import albumentations as A # ndarray: H x W x C # ----------------------------------- Blur ------------------------------------------- # ----------------------------------- Noise ------------------------------------------- # ---------------------...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 350, 4146, 1330, 7412, 11, 7412, 41472, 11, 7412, 35476, 590, 198, 11748, 435, 65, 1713, 602, 355, 317, 198, 198, 2, 299, 67, 18747, 25, 367, 2124, 370, 2124, 327, 628, 198, 198, 2, 20368, ...
2.597022
2,015
# -*- coding: utf-8 -*- import bleach import json def strip_html(unclean): """Sanitize a string, removing (as opposed to escaping) HTML tags :param unclean: A string to be stripped of HTML tags :return: stripped string :rtype: str """ return bleach.clean(unclean, strip=True, tags=[], attribu...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 49024, 198, 11748, 33918, 628, 198, 4299, 10283, 62, 6494, 7, 403, 27773, 2599, 198, 220, 220, 220, 37227, 15017, 270, 1096, 257, 4731, 11, 10829, 357, 292, 6886,...
2.568733
1,113
import torch import torch.nn as nn import torch.nn.functional as F from torch.utils.tensorboard import SummaryWriter from torch.utils import data from torch import optim import torchvision.models as models from torch.autograd import Variable import torchvision as tv import random import math import time from datetime i...
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 6738, 28034, 13, 26791, 13, 83, 22854, 3526, 1330, 21293, 34379, 198, 6738, 28034, 13, 26791, 1330, 1366, 198, 6738, 28034...
3.582734
139
"""Utilities""" import pandas as pd import numpy as np from attrdict import AttrDict import yaml def average_predictions(cv_predictions, n_splits, num_samples = 153164, num_labels = 6): """Average k-fold predictions stored in a dict""" preds = np.zeros((num_samples, num_labels)) for preds_i in cv_predictio...
[ 37811, 18274, 2410, 37811, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 708, 4372, 713, 1330, 3460, 81, 35, 713, 198, 11748, 331, 43695, 198, 198, 4299, 2811, 62, 28764, 9278, 7, 33967, 62, 2876...
2.469751
281
import airflow from airflow.models import DAG from airflow.operators.dummy_operator import DummyOperator args = { 'owner': 'Mike', 'start_date': airflow.utils.dates.days_ago(2), } dag = DAG( dag_id='exercise1', default_args=args, schedule_interval=None ) t1 = DummyOperator(task_id='task1', dag=da...
[ 11748, 45771, 198, 6738, 45771, 13, 27530, 1330, 360, 4760, 198, 6738, 45771, 13, 3575, 2024, 13, 67, 13513, 62, 46616, 1330, 360, 13513, 18843, 1352, 198, 198, 22046, 796, 1391, 198, 220, 220, 220, 705, 18403, 10354, 705, 16073, 3256, ...
2.294372
231
# -*- coding: utf-8 -*- """ Created on Tue Feb 27 10:54:25 2018 @author: jsgosselin """ # ---- Standard Library Imports from itertools import product import os.path as osp import os # ---- Third Party Imports import netCDF4 from geopandas import GeoDataFrame import pandas as pd from shapely.geometry import Point, P...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 30030, 3158, 2681, 838, 25, 4051, 25, 1495, 2864, 198, 31, 9800, 25, 44804, 70, 418, 741, 259, 198, 37811, 198, 198, 2, 13498, 8997, 10074, 184...
2.029658
1,551
# pylint:disable=ungrouped-imports import uuid import pytest import activitylogs from db.models.activitylogs import ActivityLog from events.registry.experiment import EXPERIMENT_DELETED_TRIGGERED from events.registry.user import USER_ACTIVATED from factories.factory_experiments import ExperimentFactory from factorie...
[ 2, 279, 2645, 600, 25, 40223, 28, 2150, 3233, 276, 12, 320, 3742, 198, 11748, 334, 27112, 198, 198, 11748, 12972, 9288, 198, 198, 11748, 3842, 6404, 82, 198, 198, 6738, 20613, 13, 27530, 13, 21797, 6404, 82, 1330, 24641, 11187, 198, ...
3.477876
113
import unittest from shapy.framework.tcelements import * from shapy.framework.executor import run from tests import TCTestCase
[ 11748, 555, 715, 395, 198, 198, 6738, 427, 12826, 13, 30604, 13, 83, 344, 3639, 1330, 1635, 198, 6738, 427, 12826, 13, 30604, 13, 18558, 38409, 1330, 1057, 198, 198, 6738, 5254, 1330, 309, 4177, 395, 20448, 198 ]
3.394737
38
from colorsys import hsv_to_rgb from math import fabs, fmod import os from hippietrap.color import Color
[ 6738, 7577, 893, 1330, 289, 21370, 62, 1462, 62, 81, 22296, 198, 6738, 10688, 1330, 7843, 82, 11, 277, 4666, 198, 11748, 28686, 198, 6738, 18568, 1155, 2416, 13, 8043, 1330, 5315, 198 ]
3.181818
33
from stix_shifter_utils.utils.entry_point_base import EntryPointBase from stix_shifter_utils.modules.cim.stix_translation.cim_data_mapper import CimDataMapper from stix_shifter_utils.modules.car.stix_translation.car_data_mapper import CarDataMapper from .stix_translation.stix_to_elastic import StixToElastic
[ 6738, 336, 844, 62, 1477, 18171, 62, 26791, 13, 26791, 13, 13000, 62, 4122, 62, 8692, 1330, 21617, 12727, 14881, 198, 6738, 336, 844, 62, 1477, 18171, 62, 26791, 13, 18170, 13, 66, 320, 13, 301, 844, 62, 41519, 13, 66, 320, 62, 78...
2.942857
105
from PyQt5.QtWidgets import (QMainWindow, QToolButton, QWidget, QHBoxLayout) from PyQt5.QtGui import QIcon from PyQt5 import QtCore from math import floor import sys
[ 6738, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 1330, 357, 48, 13383, 27703, 11, 1195, 25391, 21864, 11, 1195, 38300, 11, 1195, 39, 14253, 32517, 8, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 8205, 72, 1330, 1195, 19578, 198, ...
2.75
60
""" Crack a password using a genetic algorithm! """ import random as rnd def main(): """ This file implements a genetic algorithm to solve the problem of cracking a given password, by creating 'generations' of different words, selecting the best, breeeding them, applying a simple crossover (randomi...
[ 37811, 198, 13916, 441, 257, 9206, 1262, 257, 8513, 11862, 0, 198, 37811, 198, 11748, 4738, 355, 374, 358, 198, 198, 4299, 1388, 33529, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 770, 2393, 23986, 257, 8513, 11862, 284, 8494, 262,...
2.667229
2,371