content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
#!/usr/bin/env python3 import random N = 32 M = 64 # NOTE: 0 is a reserved value randu = lambda x: random.randint(1, 2**x-1) randU32 = lambda: randu(32) randU64 = lambda: randu(64) fmt_by_dtype = { 'u32hex': '0x{:08x}', 'u64hex': '0x{:016x}', } cpp_by_dtype = { 'u32hex': 'uint32_t', 'u64hex': 'ui...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 628, 198, 11748, 4738, 628, 198, 45, 796, 3933, 198, 44, 796, 5598, 198, 2, 24550, 25, 657, 318, 257, 10395, 1988, 198, 25192, 84, 220, 220, 796, 37456, 2124, 25, 4738, 13, 25192, 6...
2.245714
525
"""Toy environment launcher. See the docs for more details about this environment. """ import sys import logging import numpy as np from deer.default_parser import process_args from deer.agent import NeuralAgent from deer.learning_algos.q_net_keras import MyQNetwork from Toy_env import MyEnv as Toy_env import deer.e...
[ 37811, 48236, 2858, 24008, 13, 4091, 262, 34165, 329, 517, 3307, 546, 428, 2858, 13, 198, 198, 37811, 198, 198, 11748, 25064, 198, 11748, 18931, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 20096, 13, 12286, 62, 48610, 1330, 1429...
2.908593
1,827
# ------------------------------------------------------------------ # # RDF and CN related analysis # # ------------------------------------------------------------------ import sys py_path = '../../../../postprocessing/' sys.path.insert(0, py_path) py_path = '../../../../postprocessing/io_operations/' sys.path.inse...
[ 2, 16529, 438, 198, 2, 198, 2, 197, 49, 8068, 290, 31171, 3519, 3781, 197, 198, 2, 198, 2, 16529, 438, 198, 198, 11748, 25064, 198, 9078, 62, 6978, 796, 705, 40720, 40720, 40720, 40720, 7353, 36948, 14, 6, 198, 17597, 13, 6978, 13...
2.911628
215
from ..doctools import document from .geom import geom from .geom_path import geom_path from .geom_point import geom_point from .geom_linerange import geom_linerange
[ 6738, 11485, 4598, 310, 10141, 1330, 3188, 198, 6738, 764, 469, 296, 1330, 4903, 296, 198, 6738, 764, 469, 296, 62, 6978, 1330, 4903, 296, 62, 6978, 198, 6738, 764, 469, 296, 62, 4122, 1330, 4903, 296, 62, 4122, 198, 6738, 764, 469,...
3.092593
54
#!/usr/bin/python # -*- coding: utf-8 -*- __author__ = 'ar' import json import os import skimage.io as skio import matplotlib.pyplot as plt import numpy as np import keras from keras.models import Model from keras.layers import Input, Convolution2D, MaxPooling2D, Flatten, Dense from keras.utils.visualize_util import ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 834, 9800, 834, 796, 705, 283, 6, 198, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 1341, 9060, 13, 952, 355, 1341, 952...
2.561644
438
""" Test the integrations related to the internal interface implementation and the 'Interface' interface itself """ import pytest from cppython_core.schema import InterfaceConfiguration from pytest_cppython.plugin import InterfaceIntegrationTests from cppython.console import ConsoleInterface
[ 37811, 198, 14402, 262, 4132, 9143, 3519, 284, 262, 5387, 7071, 7822, 290, 262, 705, 39317, 6, 7071, 2346, 198, 37811, 198, 198, 11748, 12972, 9288, 198, 6738, 269, 381, 7535, 62, 7295, 13, 15952, 2611, 1330, 26491, 38149, 198, 6738, ...
4.484848
66
#@contact Sejoon Oh (soh337@gatech.edu), Georgia Institute of Technology #@version 1.0 #@date 2021-08-17 #Influence-guided Data Augmentation for Neural Tensor Completion (DAIN) #This software is free of charge under research purposes. #For commercial purposes, please contact the main author. import torch f...
[ 2, 31, 32057, 220, 220, 220, 1001, 73, 2049, 3966, 357, 568, 71, 31496, 31, 10494, 354, 13, 15532, 828, 7859, 5136, 286, 8987, 198, 2, 31, 9641, 220, 220, 220, 352, 13, 15, 198, 2, 31, 4475, 220, 220, 220, 220, 220, 220, 33448, ...
3.288557
201
# Copyright 2019 Province of British Columbia # # 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 agre...
[ 2, 15069, 220, 13130, 22783, 286, 3517, 9309, 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, 13, 198, ...
2.393301
5,314
from datetime import datetime, timedelta import jwt from flask import current_app from app import db from app.user.repository import UserRepository
[ 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 198, 11748, 474, 46569, 198, 6738, 42903, 1330, 1459, 62, 1324, 198, 198, 6738, 598, 1330, 20613, 198, 6738, 598, 13, 7220, 13, 260, 1930, 37765, 1330, 11787, 6207, 13264, 628 ]
3.682927
41
import _init_paths import argparse import random import time import utils import os from collections import defaultdict import numpy as np import csv from progress.bar import IncrementalBar from utils.hash import * if __name__ == '__main__': main()
[ 11748, 4808, 15003, 62, 6978, 82, 198, 11748, 1822, 29572, 198, 11748, 4738, 198, 11748, 640, 198, 11748, 3384, 4487, 198, 11748, 28686, 198, 6738, 17268, 1330, 4277, 11600, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 269, 21370, 198,...
3.350649
77
import math from pprint import pprint import matplotlib.pyplot as plt from scipy.optimize import minimize from frispy import Disc from frispy import Discs from frispy import Model model = Discs.roc mph_to_mps = 0.44704 v = 56 * mph_to_mps rot = -v / model.diameter ceiling = 4 # 4 meter ceiling tunnel_width = 4 # 4 ...
[ 11748, 10688, 198, 6738, 279, 4798, 1330, 279, 4798, 198, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 629, 541, 88, 13, 40085, 1096, 1330, 17775, 198, 198, 6738, 1216, 8802, 88, 1330, 8444, 198, 6738, 1216...
2.22695
423
# 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, software # distribu...
[ 2, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 220, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 220, 220, 921, 743, 7330, 257, 4866,...
3.473118
186
import os from Bio import AlignIO, Phylo from Bio.Phylo.TreeConstruction import DistanceCalculator, DistanceTreeConstructor
[ 11748, 28686, 198, 6738, 16024, 1330, 978, 570, 9399, 11, 1380, 2645, 78, 198, 6738, 16024, 13, 2725, 2645, 78, 13, 27660, 36687, 1330, 34600, 9771, 3129, 1352, 11, 34600, 27660, 42316, 273 ]
3.727273
33
#!/usr/bin/env python # #The MIT License (MIT) # # Copyright (c) 2015 Bit9 + Carbon Black # # 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 Software without restriction, including without limitation t...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 464, 17168, 13789, 357, 36393, 8, 198, 2, 198, 2, 15069, 357, 66, 8, 1853, 4722, 24, 1343, 23699, 2619, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 38...
3.255
1,000
# -*- coding: utf-8 -*- """Exceptions raised by the h application.""" from __future__ import unicode_literals from h.i18n import TranslationString as _ # N.B. This class **only** covers exceptions thrown by API code provided by # the h package. memex code has its own base APIError class.
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 3109, 11755, 4376, 416, 262, 289, 3586, 526, 15931, 198, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 289, 13, 72, 1507, ...
3.325843
89
#!/usr/bin/env python # Copyright (c) 2018 Orange and others. # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Apache License, Version 2.0 # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 """ Shaker_...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 15069, 357, 66, 8, 2864, 11942, 290, 1854, 13, 198, 2, 198, 2, 1439, 2489, 10395, 13, 770, 1430, 290, 262, 19249, 5696, 198, 2, 389, 925, 1695, 739, 262, 2846, 286, 262, ...
3.561321
212
import torch import functools if torch.__version__.startswith('0'): from .sync_bn.inplace_abn.bn import InPlaceABNSync BatchNorm2d = functools.partial(InPlaceABNSync, activation='none') BatchNorm2d_class = InPlaceABNSync relu_inplace = False else: # BatchNorm2d_class = BatchNorm2d = torch.nn.SyncBa...
[ 11748, 28034, 198, 11748, 1257, 310, 10141, 198, 198, 361, 28034, 13, 834, 9641, 834, 13, 9688, 2032, 342, 10786, 15, 6, 2599, 198, 220, 220, 220, 422, 764, 27261, 62, 9374, 13, 259, 5372, 62, 397, 77, 13, 9374, 1330, 554, 27271, ...
2.440476
168
from django.db import models from ordered_model.models import OrderedModel, OrderedModelBase
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 6149, 62, 19849, 13, 27530, 1330, 14230, 1068, 17633, 11, 14230, 1068, 17633, 14881, 628, 628, 628, 628, 628 ]
3.642857
28
import os import sys import numpy as np import pandas as pd def get_columns_percent_dataframe(df: pd.DataFrame, totals_column=None, percent_names=True) -> pd.DataFrame: """ @param totals_column: (default = use sum of columns) @param percent_names: Rename names from 'col' => 'col %' Return a dataframe...
[ 11748, 28686, 198, 11748, 25064, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 628, 198, 4299, 651, 62, 28665, 82, 62, 25067, 62, 7890, 14535, 7, 7568, 25, 279, 67, 13, 6601, 19778, 11, 26310, 62, 28...
2.516832
505
from app.db import db # Ignore it if db can't find the row when updating/deleting # Todo: not ignore it, raise some error, remove checkers in view
[ 6738, 598, 13, 9945, 1330, 20613, 628, 198, 2, 41032, 340, 611, 20613, 460, 470, 1064, 262, 5752, 618, 19698, 14, 2934, 293, 889, 198, 2, 309, 24313, 25, 407, 8856, 340, 11, 5298, 617, 4049, 11, 4781, 2198, 364, 287, 1570, 198 ]
3.465116
43
""" How to set up virtual environment pip install virtualenv pip install virtualenvwrapper # export WORKON_HOME=~/Envs source /usr/local/bin/virtualenvwrapper.sh # To activate virtualenv and set up flask 1. mkvirtualenv my-venv ###2. workon my-venv 3. pip install Flask 4. pip freeze 5. #...
[ 37811, 198, 220, 1374, 284, 900, 510, 7166, 2858, 198, 220, 220, 220, 7347, 2721, 7166, 24330, 198, 220, 220, 220, 7347, 2721, 7166, 24330, 48553, 628, 220, 1303, 10784, 30936, 1340, 62, 39069, 31820, 14, 4834, 14259, 198, 220, 2723, ...
3.212963
216
from SemiBin.main import generate_data_single import os import pytest import logging import pandas as pd
[ 6738, 35525, 33, 259, 13, 12417, 1330, 7716, 62, 7890, 62, 29762, 198, 11748, 28686, 198, 11748, 12972, 9288, 198, 11748, 18931, 198, 11748, 19798, 292, 355, 279, 67 ]
3.586207
29
# Copyright 2020 - The Android Open Source Project # # 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 ...
[ 2, 15069, 12131, 532, 383, 5565, 4946, 8090, 4935, 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, 13, ...
2.65142
634
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys from cx_Freeze import setup,Executable icondata='icon.ico' base = None # GUI=, CUI= if sys.platform == 'win32' : base = 'win32GUI' exe = Executable(script = 'main.py', base = base, #icon=icondata ) s...
[ 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, 198, 6738, 43213, 62, 11146, 2736, 1330, 9058, 11, 23002, 18187, 198, 198, 291, 623, 1045, 11639, 47...
2.079439
214
from __future__ import annotations from threading import Lock from typing import List, Set, Optional, Any, Tuple from stereotype.utils import ConfigurationError _roles: List[Role] = [] _roles_lock = Lock() DEFAULT_ROLE = Role('default')
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 6738, 4704, 278, 1330, 13656, 198, 6738, 19720, 1330, 7343, 11, 5345, 11, 32233, 11, 4377, 11, 309, 29291, 198, 198, 6738, 31240, 13, 26791, 1330, 28373, 12331, 628, 198, 198, 62, 305, 8...
3.402778
72
# coding:utf-8 ''' VSWR 10marker ''' import os import logging from commoninterface.zvlbase import ZVLBase logger = logging.getLogger('ghost')
[ 2, 19617, 25, 40477, 12, 23, 198, 7061, 6, 198, 53, 17887, 49, 198, 940, 4102, 263, 198, 7061, 6, 198, 11748, 28686, 198, 11748, 18931, 198, 6738, 2219, 39994, 13, 89, 19279, 8692, 1330, 1168, 47468, 14881, 198, 198, 6404, 1362, 796...
2.769231
52
from __future__ import division import numpy as np import matplotlib.pyplot as plt import shellmodelutilities as smutil # Set bin width and range bin_width = 0.20 Emax = 14 Nbins = int(np.ceil(Emax/bin_width)) Emax_adjusted = bin_width*Nbins # Trick to get an integer number of bins bins = np.linspace(0,Emax_adjust...
[ 6738, 11593, 37443, 834, 1330, 7297, 198, 11748, 299, 32152, 355, 45941, 220, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 220, 198, 11748, 7582, 19849, 315, 2410, 355, 895, 22602, 628, 198, 198, 2, 5345, 9874, 9647, ...
2.279678
994
import abc import secrets from collections.abc import AsyncIterator, Awaitable, Callable, Mapping from contextlib import AbstractAsyncContextManager, asynccontextmanager from dataclasses import dataclass from datetime import datetime, timezone import pytest from aiohttp import ClientSession from yarl import URL from ...
[ 11748, 450, 66, 198, 11748, 13141, 198, 6738, 17268, 13, 39305, 1330, 1081, 13361, 37787, 11, 5851, 4548, 540, 11, 4889, 540, 11, 337, 5912, 198, 6738, 4732, 8019, 1330, 27741, 42367, 21947, 13511, 11, 355, 2047, 535, 261, 5239, 37153, ...
3.214789
284
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ sbpy bandpass Module """ __all__ = [ 'bandpass' ] import os from astropy.utils.data import get_pkg_data_filename def bandpass(name): """Retrieve bandpass transmission spectrum from sbpy. Parameters ---------- name : string ...
[ 2, 49962, 739, 257, 513, 12, 565, 682, 347, 10305, 3918, 5964, 532, 766, 38559, 24290, 13, 81, 301, 198, 37811, 198, 36299, 9078, 4097, 6603, 19937, 198, 198, 37811, 198, 198, 834, 439, 834, 796, 685, 198, 220, 220, 220, 705, 3903, ...
2.21076
2,249
from django.http import HttpResponse from django.shortcuts import render, redirect from community.models import Community # Create your views here.
[ 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 18941, 198, 6738, 2055, 13, 27530, 1330, 8108, 628, 198, 2, 13610, 534, 5009, 994, 13, 628, 628 ]
4.135135
37
# Generated by Django 3.1.2 on 2020-10-18 17:19 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 17, 319, 12131, 12, 940, 12, 1507, 1596, 25, 1129, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
# OxfordInstruments_ILM200.py class, to perform the communication between the Wrapper and the device # Copyright (c) 2017 QuTech (Delft) # Code is available under the available under the `MIT open-source license <https://opensource.org/licenses/MIT>`__ # # Pieter Eendebak <pieter.eendebak@tno.nl>, 2017 # Takafumi Fujit...
[ 2, 13643, 818, 2536, 2886, 62, 4146, 44, 2167, 13, 9078, 1398, 11, 284, 1620, 262, 6946, 1022, 262, 27323, 2848, 290, 262, 3335, 198, 2, 15069, 357, 66, 8, 2177, 2264, 17760, 357, 13856, 701, 8, 198, 2, 6127, 318, 1695, 739, 262, ...
2.983516
182
import numpy as np import matplotlib.pyplot as plt import pickle """ The CIFAR-10 dataset consists of 60000 32x32 colour images in 10 classes, with 6000 images per class. There are 50000 training images and 10000 test images. The dataset is divided into five training batches and one test batch, each with 10000 image...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 2298, 293, 198, 198, 37811, 198, 464, 327, 5064, 1503, 12, 940, 27039, 10874, 286, 718, 2388, 3933, 87, 2624, 9568, 4263, 287, 83...
2.353223
1,877
# This file is Copyright 2019 Volatility Foundation and licensed under the Volatility Software License 1.0 # which is available at https://www.volatilityfoundation.org/license/vsl-v1.0 # """A module containing a collection of plugins that produce data typically found in Mac's lsmod command.""" from volatility3.framewor...
[ 2, 770, 2393, 318, 15069, 13130, 4709, 18486, 5693, 290, 11971, 739, 262, 4709, 18486, 10442, 13789, 352, 13, 15, 198, 2, 543, 318, 1695, 379, 3740, 1378, 2503, 13, 10396, 18486, 42526, 13, 2398, 14, 43085, 14, 85, 6649, 12, 85, 16,...
4.484615
130
''' instahunter.py Author: Araekiel Copyright: Copyright 2019, Araekiel License: MIT Version: 1.6.3 ''' import click import requests import json from datetime import datetime headers = { "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:55.0) Gecko/20100101 Firefox/55.0"} cli...
[ 7061, 6, 198, 220, 220, 220, 916, 993, 403, 353, 13, 9078, 628, 220, 220, 220, 6434, 25, 30574, 988, 8207, 198, 220, 220, 220, 15069, 25, 220, 15069, 220, 13130, 11, 30574, 988, 8207, 198, 220, 220, 220, 13789, 25, 17168, 198, 220...
2.5
184
#!/usr/bin/env python # Copyright 2014-2019 The PySCF Developers. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # U...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 15069, 1946, 12, 23344, 383, 9485, 6173, 37, 34152, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341,...
2.184343
1,188
import random import magent from magent.builtin.rule_model import RandomActor import numpy as np if __name__ == "__main__": gw = magent.gridworld cfg = gw.Config() map_size = 25 cfg.set({"map_width": map_size, "map_height": map_size}) agent_group = cfg.add_group( cfg.register_agent_type...
[ 11748, 4738, 198, 11748, 2153, 298, 198, 6738, 2153, 298, 13, 18780, 259, 13, 25135, 62, 19849, 1330, 14534, 40277, 198, 11748, 299, 32152, 355, 45941, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, ...
2.023102
1,212
import itertools import logging from datetime import date from django.apps import apps from django.conf import settings from django.db import connection, transaction from django.db.models import Q from dimagi.utils.chunked import chunked from corehq.apps.accounting.models import Subscription from corehq.apps.account...
[ 11748, 340, 861, 10141, 198, 11748, 18931, 198, 6738, 4818, 8079, 1330, 3128, 198, 198, 6738, 42625, 14208, 13, 18211, 1330, 6725, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 4637, 11, 8611, ...
2.894247
2,364
"""Subdivided icosahedral mesh generation""" from __future__ import print_function import numpy as np # following: http://blog.andreaskahler.com/2009/06/creating-icosphere-mesh-in-code.html # hierarchy: # Icosphere -> Triangle -> Point def calculate_npts(level): n = 2**level...
[ 37811, 7004, 7146, 1384, 14158, 8546, 21962, 19609, 5270, 37811, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 299, 32152, 355, 45941, 198, 198, 2, 1708, 25, 2638, 1378, 14036, 13, 49078, 2093, 993, 1754, 13, 785, 14, ...
2.429519
603
# Resolve the problem!! import string import random SYMBOLS = list('!"#$%&\'()*+,-./:;?@[]^_`{|}~') if __name__ == '__main__': run()
[ 2, 1874, 6442, 262, 1917, 3228, 198, 11748, 4731, 198, 11748, 4738, 198, 198, 23060, 10744, 3535, 50, 796, 1351, 10786, 2474, 29953, 4, 5, 43054, 3419, 9, 10, 12095, 19571, 25, 26, 30, 31, 21737, 61, 62, 63, 90, 91, 92, 93, 11537,...
2.21875
64
#!/usr/bin/env python # Copyright JS Foundation and other contributors, http://js.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....
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 15069, 26755, 5693, 290, 584, 20420, 11, 2638, 1378, 8457, 13, 42526, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198...
2.277516
3,398
from math import sqrt import emoji num = int(input("Digite um nmero: ")) raiz = sqrt(num) print("A raiz do nmero {0} {1:.2f}.".format(num, raiz)) print(emoji.emojize("Hello World! :earth_americas:", use_aliases=True))
[ 6738, 10688, 1330, 19862, 17034, 198, 11748, 44805, 198, 22510, 796, 493, 7, 15414, 7203, 19511, 578, 23781, 299, 647, 78, 25, 366, 4008, 198, 430, 528, 796, 19862, 17034, 7, 22510, 8, 198, 4798, 7203, 32, 2179, 528, 466, 299, 647, ...
2.406593
91
macs_response = '''<?xml version="1.0"?><s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wxf="http://schemas.xmlsoap.org/ws/2004/09/transfer"><s:Header><wsa:To>http://schemas.xmlsoap.org...
[ 76, 16436, 62, 26209, 796, 705, 7061, 47934, 19875, 2196, 2625, 16, 13, 15, 13984, 6927, 82, 25, 4834, 1091, 68, 35555, 5907, 25, 82, 2625, 4023, 1378, 2503, 13, 86, 18, 13, 2398, 14, 16088, 14, 2713, 14, 568, 499, 12, 268, 1091, ...
2.55264
3,163
from __future__ import print_function import argparse import os import time, platform import cv2 import torch import torch.optim as optim from torch.utils.data import DataLoader from datasets import DATASET_NAMES, BipedDataset, TestDataset, dataset_info from losses import * from model import DexiNed # from model0C ...
[ 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 640, 11, 3859, 198, 198, 11748, 269, 85, 17, 198, 11748, 28034, 198, 11748, 28034, 13, 40085, 355, 6436, 198, 6738, 28034, ...
1.806565
6,276
#!/usr/bin/env python3 # coding=utf-8 # # Copyright (c) 2021 Huawei Device Co., Ltd. # 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 # # Unle...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 19617, 28, 40477, 12, 23, 198, 198, 2, 198, 2, 15069, 357, 66, 8, 33448, 43208, 16232, 1766, 1539, 12052, 13, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, ...
4.43254
252
from __future__ import absolute_import from django.conf.urls import patterns, url from django_comments.feeds import LatestCommentFeed from custom_comments import views feeds = { 'comments': LatestCommentFeed, } urlpatterns = patterns('', url(r'^post/$', views.custom_submit_comment), url(r'^flag/(\d+)...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 7572, 11, 19016, 198, 198, 6738, 42625, 14208, 62, 15944, 13, 12363, 82, 1330, 26603, 21357, 18332, 198, 198, 6738, 2183, 62, ...
2.659919
247
import pandas as pd, numpy as np from sklearn.preprocessing import OneHotEncoder author_int_dict = {'EAP':0,'HPL':1,'MWS':2} if __name__ == '__main__': pass
[ 11748, 19798, 292, 355, 279, 67, 11, 299, 32152, 355, 45941, 201, 198, 6738, 1341, 35720, 13, 3866, 36948, 1330, 1881, 21352, 27195, 12342, 201, 198, 201, 198, 9800, 62, 600, 62, 11600, 796, 1391, 6, 36, 2969, 10354, 15, 4032, 39, 6...
2.328767
73
# pylint: skip-file import sys import os # code to automatically download dataset curr_path = os.path.dirname(os.path.abspath(os.path.expanduser(__file__))) sys.path = [os.path.join(curr_path, "../autoencoder")] + sys.path import mxnet as mx import numpy as np import data from scipy.spatial.distance import cdist from s...
[ 2, 279, 2645, 600, 25, 14267, 12, 7753, 198, 11748, 25064, 198, 11748, 28686, 198, 2, 2438, 284, 6338, 4321, 27039, 198, 22019, 81, 62, 6978, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 397, 2777, 776, 7, 418, 13,...
2.78392
199
from __future__ import division from cctbx.array_family import flex from cctbx import xray from cctbx import crystal from cctbx import maptbx from cctbx.maptbx import minimization from libtbx.test_utils import approx_equal import random from cctbx.development import random_structure from cctbx import sgtbx if (1): r...
[ 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 269, 310, 65, 87, 13, 18747, 62, 17989, 1330, 7059, 198, 6738, 269, 310, 65, 87, 1330, 2124, 2433, 198, 6738, 269, 310, 65, 87, 1330, 15121, 198, 6738, 269, 310, 65, 87, 1330, 285, 2...
2.111644
2,920
""" LED matrix """ __all__ = ['Matrix'] from .colors import Color, on, off from .fonts import font_6x8
[ 37811, 12365, 17593, 198, 37811, 198, 834, 439, 834, 796, 37250, 46912, 20520, 198, 198, 6738, 764, 4033, 669, 1330, 5315, 11, 319, 11, 572, 198, 6738, 764, 10331, 82, 1330, 10369, 62, 21, 87, 23, 628 ]
2.837838
37
from pytest import raises from datek_app_utils.env_config.base import BaseConfig from datek_app_utils.env_config.errors import InstantiationForbiddenError
[ 6738, 12972, 9288, 1330, 12073, 198, 198, 6738, 3128, 74, 62, 1324, 62, 26791, 13, 24330, 62, 11250, 13, 8692, 1330, 7308, 16934, 198, 6738, 3128, 74, 62, 1324, 62, 26791, 13, 24330, 62, 11250, 13, 48277, 1330, 24470, 3920, 1890, 3797...
3.511111
45
# -*- coding: utf-8 -*- # Name: comprehend # Version: 0.1a2 # Owner: Ruslan Korniichuk # Maintainer(s): import boto3 def get_sentiment(text, language_code='en'): """Get sentiment. Inspects text and returns an inference of the prevailing sentiment (positive, neutral, mixed, or negative). Args: ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 6530, 25, 24772, 198, 2, 10628, 25, 657, 13, 16, 64, 17, 198, 2, 23853, 25, 9223, 9620, 509, 1211, 72, 488, 2724, 198, 2, 337, 2913, 10613, 7, 82, 2599, 198, ...
2.84657
554
# -*- coding: utf-8 -*- ################################################################################ ## Form generated from reading UI file 'configuredialog.ui' ## ## Created by: Qt User Interface Compiler version 5.15.2 ## ## WARNING! All changes made in this file will be lost when recompiling UI file! ##########...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 29113, 29113, 14468, 198, 2235, 5178, 7560, 422, 3555, 12454, 2393, 705, 11250, 1522, 498, 519, 13, 9019, 6, 198, 2235, 198, 2235, 15622, 416, 25, 33734, 11787, 264...
4.163793
116
import base64 import tempfile import requests from osbot_aws.apis import Secrets from osbot_aws.apis.Lambdas import Lambdas
[ 11748, 2779, 2414, 198, 11748, 20218, 7753, 198, 11748, 7007, 198, 6738, 220, 220, 28686, 13645, 62, 8356, 13, 499, 271, 220, 220, 220, 220, 220, 220, 220, 1330, 23561, 198, 6738, 220, 220, 28686, 13645, 62, 8356, 13, 499, 271, 13, ...
2.440678
59
from sys import argv from getopt import getopt from os import R_OK, access from string import Template DEFAULT_DATASET_FILE_PATH = "dataset/data.csv" DEFAULT_DATASET_COLUMNS = ['surface (m2)', 'height (m)', 'latitude', 'housing_type', 'longitude', 'country_code', 'city'] DEFAULT_VISU = ["sca...
[ 6738, 25064, 1330, 1822, 85, 198, 6738, 651, 8738, 1330, 651, 8738, 198, 6738, 28686, 1330, 371, 62, 11380, 11, 1895, 198, 6738, 4731, 1330, 37350, 198, 198, 7206, 38865, 62, 35, 1404, 1921, 2767, 62, 25664, 62, 34219, 796, 366, 19608...
2.424837
153
# Must run example4.py first # Read an Excel sheet and save running config of devices using pandas import pandas as pd from netmiko import ConnectHandler # Read Excel file of .xlsx format data = pd.read_excel(io="Example4-Device-Details.xlsx", sheet_name=0) # Convert data to data frame df = pd.DataFrame(data=data) ...
[ 2, 12039, 1057, 1672, 19, 13, 9078, 717, 198, 2, 4149, 281, 24134, 9629, 290, 3613, 2491, 4566, 286, 4410, 1262, 19798, 292, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 2010, 76, 12125, 1330, 8113, 25060, 198, 198, 2,...
2.542662
586
# Copyright (C) 2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 VERIFIED_OP_REFERENCES = [ 'Abs-1', 'Acos-1', 'Add-1', 'Asin-1', 'Asinh-3', 'Assign-6', 'AvgPool-1', 'BatchNormInference-5', 'BatchToSpace-2', 'BinaryConvolution-1', 'Broadcast-1', 'Broadcast-3'...
[ 2, 15069, 357, 34, 8, 33448, 8180, 10501, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 198, 5959, 28343, 62, 3185, 62, 2200, 24302, 24181, 1546, 796, 685, 198, 220, 220, 220, 705, 24849, 12, 16, ...
1.837442
1,298
"""Utilities for interacting with GitHub""" import os import json import webbrowser import stat import sys from git import Repo from .context import Context event_dict = { "added_to_project": ( lambda event: "{} added the issue to a project.".format(event["actor"]["login"]) ), "assigned": ( ...
[ 37811, 18274, 2410, 329, 24986, 351, 21722, 37811, 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 3992, 40259, 198, 11748, 1185, 198, 11748, 25064, 198, 6738, 17606, 1330, 1432, 78, 198, 198, 6738, 764, 22866, 1330, 30532, 198, 198, 15...
2.404891
2,208
# Generated by Django 3.0.7 on 2020-09-18 05:52 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import multiselectfield.db.fields
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 22, 319, 12131, 12, 2931, 12, 1507, 8870, 25, 4309, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14...
3.080645
62
import pytest import gen from dcos_installer import cli
[ 11748, 12972, 9288, 198, 198, 11748, 2429, 198, 6738, 288, 6966, 62, 17350, 263, 1330, 537, 72, 628, 628 ]
3.157895
19
#!/usr/bin/env python3 import sys from random import randint import os try: import networkx as nx except: print("gPrint#-1#" + "netwrokx not installed for " + sys.executable) sys.stdout.flush() try: import igraph as ig except: print("gPrint#-1#" + "igraph not installed for " + ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 25064, 198, 6738, 4738, 1330, 43720, 600, 198, 11748, 28686, 198, 28311, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1330, 3127, 87, 355, 299, 87, 198, 16341, 25, 198...
2.076456
824
# -*- coding: utf-8 -*- """Define the base module for server test.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import sys from influxdb.tests import using_pypy from influxdb.tests.server_tests.influxdb_instanc...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 7469, 500, 262, 2779, 8265, 329, 4382, 1332, 526, 15931, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, ...
3.347518
141
# -*- coding: utf-8 -*- #------------------------------------------------------------------------------ # file: $Id$ # auth: Philip J Grabner <grabner@cadit.com> # date: 2013/10/21 # copy: (C) Copyright 2013 Cadit Health Inc., All Rights Reserved. #-----------------------------------------------------------------------...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 10097, 26171, 198, 2, 2393, 25, 720, 7390, 3, 198, 2, 6284, 25, 14576, 449, 25339, 1008, 1279, 32393, 1008, 31, 66, 324, 270, 13, 785, 29, 198, 2, 3128, 25, 221...
3.579545
616
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # This dictionary of GPU information was captured from a run of # Telemetry on a Linux workstation with NVIDIA GPU. It helps test # telemetry.internal.platfo...
[ 2, 15069, 1853, 383, 18255, 1505, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 5964, 326, 460, 307, 198, 2, 1043, 287, 262, 38559, 24290, 2393, 13, 198, 198, 2, ...
1.908676
7,238
#! /usr/bin/env python3 # vim: et:ts=4:sw=4:fenc=utf-8 from abc import ABC, abstractmethod from collections import defaultdict import re
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 43907, 25, 2123, 25, 912, 28, 19, 25, 2032, 28, 19, 25, 69, 12685, 28, 40477, 12, 23, 198, 198, 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 198, 198, 6738, 17268, 1330,...
2.685185
54
import os from os import path import json import shutil import tensorflow as tf import numpy as np # Importa cosas de Keras API from tensorflow.keras.optimizers import Adam, RMSprop from tensorflow.keras.models import Sequential from tensorflow.keras.utils import plot_model # Importa callbacks del modelo from traini...
[ 11748, 28686, 198, 6738, 28686, 1330, 3108, 198, 11748, 33918, 198, 11748, 4423, 346, 198, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 355, 45941, 198, 198, 2, 17267, 64, 8615, 292, 390, 17337, 292, 7824, 198, 673...
3.342612
467
#!/usr/bin/env python """Setup script to make PUDL directly installable with pip.""" import os from pathlib import Path from setuptools import find_packages, setup install_requires = [ 'coloredlogs', 'datapackage>=1.9.0', 'dbfread', 'goodtables', 'matplotlib', 'networkx>=2.2', 'numpy', ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 40786, 4226, 284, 787, 350, 8322, 43, 3264, 2721, 540, 351, 7347, 526, 15931, 198, 198, 11748, 28686, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 6738, 900, 37623, 10141, 1330, ...
2.324201
1,533
from BTrees import OOBTree from datetime import datetime, date, timedelta from persistent import Persistent from .vulnerability import Vulnerability import fcntl import glob import gzip import json import logging import os import os.path as p import requests import transaction import ZODB import ZODB.FileStorage DEFAU...
[ 6738, 22205, 6037, 1330, 440, 9864, 27660, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 3128, 11, 28805, 12514, 198, 6738, 16218, 1330, 9467, 7609, 198, 6738, 764, 85, 40920, 1330, 569, 40920, 198, 11748, 277, 66, 429, 75, 198, 11748, ...
2.993377
151
from scapy.all import * src = input("Source IP: ") target = input("Target IP: ") i=1 while True: for srcport in range(1, 65535): ip = IP(src=src, dst=target) tcp = TCP(sport=srcport, dport=80) pkt = ip / tcp send(pkt, inter= .0001) print("Packet Sent ", i) i=i+1
[ 6738, 629, 12826, 13, 439, 1330, 1635, 198, 198, 10677, 796, 5128, 7203, 7416, 6101, 25, 366, 8, 198, 16793, 796, 5128, 7203, 21745, 6101, 25, 366, 8, 198, 198, 72, 28, 16, 198, 4514, 6407, 25, 198, 220, 220, 220, 329, 12351, 634,...
2.025641
156
import hashlib import unittest from colicoords.cell import Cell, CellList from colicoords.preprocess import data_to_cells from test import testcase from test.test_functions import load_testdata if __name__ == '__main__': unittest.main()
[ 11748, 12234, 8019, 201, 198, 11748, 555, 715, 395, 201, 198, 6738, 951, 3713, 3669, 13, 3846, 1330, 12440, 11, 12440, 8053, 201, 198, 6738, 951, 3713, 3669, 13, 3866, 14681, 1330, 1366, 62, 1462, 62, 46342, 201, 198, 6738, 1332, 1330...
2.865169
89
# --------------------------------------------------------------------------- # # Importing section # --------------------------------------------------------------------------- # import os import sys import argparse import logging import json from classes.alerts import SlackClient from influxdb import InfluxDBClient...
[ 2, 16529, 32284, 1303, 198, 2, 17267, 278, 2665, 198, 2, 16529, 32284, 1303, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 1822, 29572, 198, 11748, 18931, 198, 11748, 33918, 198, 198, 6738, 6097, 13, 44598, 82, 1330, 36256, 117...
3.174236
1,211
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'ipetrash' import re DEBUG = False lines = """ function II1I1_II takes real II1I1__I returns nothing local real II1I1_1I local real st=TimerGetElapsed(II1I___I) if st<=0 then set II1I___I=CreateTimer() call TimerStart(II1I___I,1000000,false,null) endif...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 834, 9800, 834, 796, 705, 541, 21879, 1077, 6, 628, 198, 11748, 302, 628, 198, 30531, 796, 10352, 628, 198, ...
2.089457
1,252
from common.commons import * DATA_PATH = os.environ["DATA_PATH"]
[ 6738, 2219, 13, 9503, 684, 1330, 1635, 198, 26947, 62, 34219, 796, 28686, 13, 268, 2268, 14692, 26947, 62, 34219, 8973, 198 ]
2.954545
22
# -*- coding: utf-8 -*- import os import sys import tensorflow as tf import numpy as np import data_utils from translate import Transliteration from flask import Flask, request, jsonify transliteration = Transliteration() app = Flask(__name__) # Flask , . app.config['JSON_AS_ASCII'] = False # . if __name...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 1366, 62, 26791, 198, 6738, 15772, 1330, 3602, ...
2.72
150
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
""" Interface to the env_build.xml file. This class inherits from EnvBase """ from CIME.XML.standard_module_setup import * from CIME.XML.env_base import EnvBase logger = logging.getLogger(__name__)
[ 37811, 198, 39317, 284, 262, 17365, 62, 11249, 13, 19875, 2393, 13, 220, 770, 1398, 10639, 896, 422, 2039, 85, 14881, 198, 37811, 198, 6738, 327, 12789, 13, 55, 5805, 13, 20307, 62, 21412, 62, 40406, 1330, 1635, 198, 198, 6738, 327, ...
2.871429
70
# -*- coding: utf-8 -*- {{{ # vim: set fenc=utf-8 ft=python sw=4 ts=4 sts=4 et: # # Copyright 2019, Battelle Memorial Institute. # # 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...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 22935, 90, 198, 2, 43907, 25, 900, 277, 12685, 28, 40477, 12, 23, 10117, 28, 29412, 1509, 28, 19, 40379, 28, 19, 39747, 28, 19, 2123, 25, 198, 2, 198, 2, 15069, 13130, ...
3.626387
811
from rest_framework.serializers import ModelSerializer from .models import Place, Status, OSType, Stock, ComputerStock
[ 6738, 1334, 62, 30604, 13, 46911, 11341, 1330, 9104, 32634, 7509, 198, 198, 6738, 764, 27530, 1330, 8474, 11, 12678, 11, 440, 2257, 2981, 11, 10500, 11, 13851, 26207, 628, 628, 628 ]
3.90625
32
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 2321, 12, 4626, 26778, 9564, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743,...
3.637755
196
# -*- coding: UTF-8 -*- import logging from typing import List from echoscope.config import config from echoscope.util import mysql_util, str_util, log_util from echoscope.model import ds_model, config_model from echoscope.source import source
[ 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 198, 11748, 18931, 198, 6738, 19720, 1330, 7343, 198, 198, 6738, 304, 354, 40326, 13, 11250, 1330, 4566, 198, 6738, 304, 354, 40326, 13, 22602, 1330, 48761, 62, 22602, 11, ...
3.25
76
# last edited: 10/08/2017, 10:25 import os, sys, glob, subprocess from datetime import datetime from PyQt4 import QtGui, QtCore import math #from XChemUtils import mtztools import XChemDB import XChemRefine import XChemUtils import XChemLog import XChemToolTips import csv try: import gemmi import pandas excep...
[ 2, 938, 13012, 25, 838, 14, 2919, 14, 5539, 11, 838, 25, 1495, 198, 198, 11748, 28686, 11, 25064, 11, 15095, 11, 850, 14681, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 9485, 48, 83, 19, 1330, 33734, 8205, 72, 11, 33734, 1...
2.102446
654
# -*- coding: utf-8 -*- """ Global app forms """ # Standard Library import re # Django Library from django import forms from django.contrib.auth.forms import UserChangeForm, UserCreationForm from django.utils.translation import ugettext_lazy as _ # Thirdparty Library from dal import autocomplete # Localfolder Librar...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 22289, 598, 5107, 198, 37811, 198, 2, 8997, 10074, 198, 11748, 302, 198, 198, 2, 37770, 10074, 198, 6738, 42625, 14208, 1330, 5107, 198, 6738, 42625, 14208, ...
4.237037
135
from unittest import mock import pytest from django.http import HttpRequest from rest_framework.response import Response from rest_framework.test import APIClient from drf_viewset_profiler.middleware import LineProfilerViewSetMiddleware
[ 6738, 555, 715, 395, 1330, 15290, 198, 198, 11748, 12972, 9288, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 18453, 198, 6738, 1334, 62, 30604, 13, 26209, 1330, 18261, 198, 6738, 1334, 62, 30604, 13, 9288, 1330, 3486, 2149, 75, ...
3.641791
67
# This allows for running the example when the repo has been cloned import sys from os.path import abspath sys.path.extend([abspath(".")]) # Example code follows import logging import numpy as np import matplotlib.pyplot as plt import muDIC.vlab as vlab import muDIC as dic """ This example case runs an experiment whe...
[ 2, 770, 3578, 329, 2491, 262, 1672, 618, 262, 29924, 468, 587, 537, 12004, 198, 11748, 25064, 198, 6738, 28686, 13, 6978, 1330, 2352, 6978, 198, 17597, 13, 6978, 13, 2302, 437, 26933, 397, 2777, 776, 7203, 19570, 12962, 198, 198, 2, ...
2.653473
1,339
mongo = { "user": "", "passwd": "", "db": "ghtorrent" } perspective_api_key = ""
[ 76, 25162, 796, 1391, 366, 7220, 1298, 366, 1600, 366, 6603, 16993, 1298, 366, 1600, 366, 9945, 1298, 366, 456, 13165, 1156, 1, 1782, 198, 19276, 806, 425, 62, 15042, 62, 2539, 796, 13538, 198 ]
2.314286
35
from tests.unit.dataactcore.factories.staging import DetachedAwardFinancialAssistanceFactory from tests.unit.dataactvalidator.utils import number_of_errors, query_columns _FILE = 'fabs38_detached_award_financial_assistance_2' def test_success(database): """ AwardingOfficeCode must be six characters long. """ ...
[ 6738, 5254, 13, 20850, 13, 7890, 529, 7295, 13, 22584, 1749, 13, 301, 3039, 1330, 4614, 2317, 32, 904, 43621, 8021, 9311, 22810, 198, 6738, 5254, 13, 20850, 13, 7890, 529, 12102, 1352, 13, 26791, 1330, 1271, 62, 1659, 62, 48277, 11, ...
2.951276
431
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Aug 31 22:48:21 2021 @author: apple """ import numpy as np import pandas as pd from HRP import seriation import fastcluster from scipy.cluster.hierarchy import fcluster from gap_statistic import OptimalK from backtest import df_to_matrix #HERC #...
[ 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, 30030, 2447, 3261, 2534, 25, 2780, 25, 2481, 33448, 198, 198, 31, 9800, 25, 17180, 198, 3...
2.674419
129
import urllib.request from bs4 import BeautifulSoup import csv import requests import os import json import time import glob files = glob.glob("/Users/nakamura/git/d_iiif/iiif/src/collections/nijl/data/json/*.json") for i in range(len(files)): file = files[i] file_id = file.split("/")[-1].replace(".json", "...
[ 11748, 2956, 297, 571, 13, 25927, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 11748, 269, 21370, 198, 11748, 7007, 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 640, 198, 11748, 15095, 198, 198, 16624, 796, 15095, 13, 4743,...
1.529832
2,380
from lib import get_itineraries import data if __name__ == '__main__': for itinerary in get_itineraries(data.sicily): print("#" * 24) print(itinerary) print("")
[ 6738, 9195, 1330, 651, 62, 270, 7274, 3166, 198, 11748, 1366, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 329, 45142, 560, 287, 651, 62, 270, 7274, 3166, 7, 7890, 13, 21383, 813, 2599, 198...
2.289157
83
import numpy as np from sawyer.mujoco.tasks.base import ComposableTask
[ 11748, 299, 32152, 355, 45941, 198, 198, 6738, 2497, 9860, 13, 76, 23577, 25634, 13, 83, 6791, 13, 8692, 1330, 29936, 540, 25714, 628, 628, 628 ]
2.961538
26
# coding: utf-8 from types import SimpleNamespace from datetime import datetime, timedelta from unittest.mock import patch from dateutil.relativedelta import relativedelta from jinja2 import Undefined, Markup from mock import Mock from app.jinja_filters import ( format_date, format_conditional_date, format_curre...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 6738, 3858, 1330, 17427, 36690, 10223, 198, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 198, 198, 6738, 3128, 22602, 13, 2411, 26...
2.065426
5,319
import arcade import os SPRITE_SCALING = 0.5 SPRITE_NATIVE_SIZE = 128 SPRITE_SIZE = int(SPRITE_NATIVE_SIZE * SPRITE_SCALING) SCREEN_WIDTH = SPRITE_SIZE * 14 SCREEN_HEIGHT = SPRITE_SIZE * 10 MOVEMENT_SPEED = 5 COIN_SCALE = 0.7 def setup_room_1(): """ Create and return room 1. If your ...
[ 11748, 27210, 201, 198, 11748, 28686, 201, 198, 201, 198, 4303, 49, 12709, 62, 6173, 1847, 2751, 796, 657, 13, 20, 201, 198, 4303, 49, 12709, 62, 34259, 9306, 62, 33489, 796, 13108, 201, 198, 4303, 49, 12709, 62, 33489, 796, 493, 7,...
2.180004
4,811
# Copyright (c) 2018 gevent community # # 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 Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, di...
[ 2, 15069, 357, 66, 8, 2864, 4903, 1151, 2055, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 2, 286, 428, 3788, 290, 3917, 10314, 3696, 357, 1169, 366, 25423, 12340, 2...
3.173964
845
''' marathon_example.py performs a simple matrix multiply using 3 compute nodes ''' if __name__ == '__main__': from sys import argv import tensorflow as tf from dtforchestrator import * args = parseargs() with MultiprocessTensorFlowSession(args.taskname, args.n_tasks) as tfdevices: wit...
[ 7061, 6, 198, 220, 220, 22336, 62, 20688, 13, 9078, 198, 220, 220, 220, 220, 220, 17706, 257, 2829, 17593, 29162, 1262, 513, 24061, 13760, 198, 7061, 6, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 2...
2.28841
371
''' Original code contributor: mentzera Article link: https://aws.amazon.com/blogs/big-data/building-a-near-real-time-discovery-platform-with-aws/ ''' import boto3 import json import twitter_to_es # from Examples.Demo.AWS_Related.TwitterStreamWithAWS.LambdaWithS3Trigger import \ # twitter_to_es from tweet_utils i...
[ 7061, 6, 198, 20556, 2438, 18920, 25, 6229, 89, 8607, 198, 14906, 2792, 25, 3740, 1378, 8356, 13, 33103, 13, 785, 14, 49096, 14, 14261, 12, 7890, 14, 16894, 12, 64, 12, 40093, 12, 5305, 12, 2435, 12, 67, 40821, 12, 24254, 12, 4480...
2.73301
206
from django.contrib.messages.constants import DEFAULT_LEVELS from user_messages.api import get_messages def messages(request): """ Return a lazy 'messages' context variable as well as 'DEFAULT_MESSAGE_LEVELS'. """ return { "messages": get_messages(request=request), "DEFAULT_MESSAG...
[ 6738, 42625, 14208, 13, 3642, 822, 13, 37348, 1095, 13, 9979, 1187, 1330, 5550, 38865, 62, 2538, 18697, 50, 198, 198, 6738, 2836, 62, 37348, 1095, 13, 15042, 1330, 651, 62, 37348, 1095, 628, 198, 4299, 6218, 7, 25927, 2599, 198, 220, ...
2.451389
144
## Highest Score # Don't change the code below student_scores = input("Input a list of student scores: ").split() for n in range(0, len(student_scores)): student_scores[n] = int(student_scores[n]) print(student_scores) # Don't change the code above # Write your code below this row highest_score = 0 for score...
[ 2235, 41864, 15178, 198, 2, 220, 2094, 470, 1487, 262, 2438, 2174, 220, 198, 50139, 62, 1416, 2850, 796, 5128, 7203, 20560, 257, 1351, 286, 3710, 8198, 25, 366, 737, 35312, 3419, 198, 1640, 299, 287, 2837, 7, 15, 11, 18896, 7, 50139...
2.940828
169
import argparse from loader import MoleculeDataset from torch_geometric.data import DataLoader import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from tqdm import tqdm import numpy as np from model import GNN, GNN_graphpred from sklearn.metrics import roc_auc_score from ...
[ 11748, 1822, 29572, 198, 198, 6738, 40213, 1330, 25726, 23172, 27354, 292, 316, 198, 6738, 28034, 62, 469, 16996, 13, 7890, 1330, 6060, 17401, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20...
3.107955
176
from jumpscale.core import exceptions
[ 6738, 18045, 38765, 13, 7295, 1330, 13269, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 198 ]
3.222222
18
# -*- coding: utf-8 -*- import matplotlib.pyplot as plt import numpy as np import pandas as pd from ..events import events_plot from ..stats import standardize as nk_standardize def signal_plot( signal, sampling_rate=None, subplots=False, standardize=False, labels=None, **kwargs ): """Plot signal with events...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 11485, 31534, 1330, 29...
2.118499
2,692