content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# # BSD 3-Clause License # # Copyright (c) 2017-2018, plures # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this...
[ 2, 198, 2, 347, 10305, 513, 12, 2601, 682, 13789, 198, 2, 198, 2, 15069, 357, 66, 8, 2177, 12, 7908, 11, 458, 942, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351,...
2.22079
7,215
# coding=utf-8 from openerp import models, fields, api from ..controllers import client
[ 2, 19617, 28, 40477, 12, 23, 198, 198, 6738, 21996, 79, 1330, 4981, 11, 7032, 11, 40391, 198, 6738, 11485, 3642, 36667, 1330, 5456, 628, 198 ]
3.5
26
# Copyright 2019 Shigeki Karita # Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) """Transformer speech recognition model (pytorch).""" from argparse import Namespace from distutils.util import strtobool import logging import math import json import numpy as np from collections import OrderedDict import to...
[ 2, 15069, 13130, 911, 328, 39548, 9375, 5350, 198, 2, 220, 24843, 362, 13, 15, 220, 357, 4023, 1378, 2503, 13, 43073, 13, 2398, 14, 677, 4541, 14, 43, 2149, 24290, 12, 17, 13, 15, 8, 198, 198, 37811, 8291, 16354, 4046, 9465, 2746,...
2.134799
5,230
"""Centrality based source detection methods.""" from collections import Counter from typing import Dict, Optional, Union from networkx import Graph from rpasdt.algorithm.centralities import ( compute_centrality, compute_unbiased_centrality, ) from rpasdt.algorithm.models import ( CentralityBasedSourceDet...
[ 37811, 30645, 414, 1912, 2723, 13326, 5050, 526, 15931, 198, 6738, 17268, 1330, 15034, 198, 6738, 19720, 1330, 360, 713, 11, 32233, 11, 4479, 198, 198, 6738, 3127, 87, 1330, 29681, 198, 198, 6738, 374, 44429, 28664, 13, 282, 42289, 13, ...
3.484211
190
# Python script for use Moodle API. # In this case the code allows to get enrrolled users in a iMOOC course # Required libraries for use this code # - Python JSON library # - Python Requests library http://docs.python-requests.org/en/latest/ # The required parameters are: # - The course ID -> variable course...
[ 2, 11361, 4226, 329, 779, 25723, 293, 7824, 13, 198, 2, 554, 428, 1339, 262, 2438, 3578, 284, 651, 551, 81, 8375, 2985, 287, 257, 1312, 11770, 4503, 1781, 198, 198, 2, 20906, 12782, 329, 779, 428, 2438, 198, 2, 220, 220, 220, 532,...
3.060377
265
for _ in range(int(input())): x=int(input()) for i in range(x): if i==0 or i==x-1: print('#'*x) else: print('#'+'J'*(x-2)+'#') print()
[ 1640, 4808, 287, 2837, 7, 600, 7, 15414, 28955, 2599, 198, 2124, 28, 600, 7, 15414, 28955, 198, 329, 1312, 287, 2837, 7, 87, 2599, 198, 220, 611, 1312, 855, 15, 393, 1312, 855, 87, 12, 16, 25, 3601, 10786, 2, 6, 9, 87, 8, 198,...
2.043478
69
#!/usr/bin/env python3 from __future__ import print_function from __future__ import absolute_import import phue import traceback import sys from constants import HUE_ROOM, HUE_BRIDGE_IP if sys.version_info < (3, 0): input = raw_input # pylint: disable=E0602 if __name__ == '__main__': bridge = phue.Bri...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 11748, 872, 518, 198, 11748, 12854, 1891, 198, 11748, 25064, 198, ...
2.64375
160
import os import shutil import unittest from xbrr.edinet.client.document_client import DocumentClient from tests.utils import delay
[ 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 555, 715, 395, 198, 6738, 2124, 1671, 81, 13, 27152, 316, 13, 16366, 13, 22897, 62, 16366, 1330, 16854, 11792, 198, 6738, 5254, 13, 26791, 1330, 5711, 628 ]
3.694444
36
from django.conf import settings from django.contrib.auth.models import ( AbstractBaseUser, BaseUserManager, PermissionsMixin) from django.db import models from django.db.models.signals import post_save from django.dispatch import receiver from rest_framework.authtoken.models import Token @receiver(post_save, s...
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 357, 198, 220, 220, 220, 27741, 14881, 12982, 11, 7308, 12982, 13511, 11, 2448, 8481, 35608, 259, 8, 198, 6738, 42625, 14208,...
3.352381
105
expr = x**2 + x**4 replacements = {x**2: y} expr = expr.xreplace(replacements)
[ 31937, 796, 2124, 1174, 17, 1343, 2124, 1174, 19, 198, 35666, 28613, 796, 1391, 87, 1174, 17, 25, 331, 92, 198, 31937, 796, 44052, 13, 87, 33491, 7, 35666, 28613, 8 ]
2.516129
31
from django.shortcuts import render from django.http import HttpResponse, HttpResponseRedirect from urllib import urlencode import random, math, os, base64 import requests from . import utils from .forms import BPMPlaylistForm # Spotify API keys CLIENT_ID= '4df0271d6b1f4768a5bd929a13091e8b' CLIENT_SECRET = os.environ....
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 11, 367, 29281, 31077, 7738, 1060, 198, 6738, 2956, 297, 571, 1330, 2956, 11925, 8189, 198, 11748, 4738, 11, 10688, 11, 28686, ...
2.778523
149
'''OpenGL extension EXT.convolution Overview (from the spec) This extension defines 1 and 2 dimensional convolution operations at a fixed location in the pixel transfer process. Thus pixel drawing, reading, and copying, as well as texture image definition, are all candidates for convolution. The convolution ke...
[ 7061, 6, 11505, 8763, 7552, 27489, 13, 42946, 2122, 198, 198, 29064, 357, 6738, 262, 1020, 8, 198, 197, 198, 197, 1212, 7552, 15738, 352, 290, 362, 38517, 3063, 2122, 4560, 198, 197, 265, 257, 5969, 4067, 287, 262, 17465, 4351, 1429, ...
2.735794
3,414
num = int(input()) value = range(1,num+1) print("----") mu_function()
[ 22510, 796, 493, 7, 15414, 28955, 198, 8367, 796, 2837, 7, 16, 11, 22510, 10, 16, 8, 198, 4798, 7203, 650, 4943, 628, 198, 30300, 62, 8818, 3419, 197, 197, 197, 198 ]
2.34375
32
from TheSphinx.tests import *
[ 6738, 383, 50, 746, 28413, 13, 41989, 1330, 1635, 198 ]
3
10
import sys,json,boto3 from botocore.exceptions import ClientError from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import serialization,hashes from cryptography.hazmat.primitives.asymmetric import rsa from cryptography import x509 from cryptography.x509.oid import NameOID de...
[ 11748, 25064, 11, 17752, 11, 65, 2069, 18, 198, 6738, 10214, 420, 382, 13, 1069, 11755, 1330, 20985, 12331, 198, 6738, 45898, 13, 71, 1031, 6759, 13, 1891, 2412, 1330, 4277, 62, 1891, 437, 198, 6738, 45898, 13, 71, 1031, 6759, 13, 1...
2.748054
1,028
import tensorflow as tf # Default hyperparameters: hparams = tf.contrib.training.HParams( # Comma-separated list of cleaners to run on text prior to training and eval. For non-English # text, you may want to use "basic_cleaners" or "transliteration_cleaners" See TRAINING_DATA.md. cleaners='korean_cleaners'...
[ 11748, 11192, 273, 11125, 355, 48700, 198, 198, 2, 15161, 8718, 17143, 7307, 25, 198, 71, 37266, 796, 48700, 13, 3642, 822, 13, 34409, 13, 39, 10044, 4105, 7, 198, 220, 220, 220, 1303, 1520, 64, 12, 25512, 515, 1351, 286, 50102, 284...
2.260223
807
"""Fast servo implementation.""" from mpf.core.utility_functions import Util from mpf.platforms.interfaces.servo_platform_interface import ServoPlatformInterface class FastServo(ServoPlatformInterface): """A servo in the FAST platform.""" __slots__ = ["number", "net_connection"] def __init__(self, numb...
[ 37811, 22968, 1113, 78, 7822, 526, 15931, 198, 6738, 29034, 69, 13, 7295, 13, 315, 879, 62, 12543, 2733, 1330, 7273, 346, 198, 6738, 29034, 69, 13, 24254, 82, 13, 3849, 32186, 13, 3168, 78, 62, 24254, 62, 39994, 1330, 3116, 78, 3714...
2.514412
451
# Copyright (c) MNELAB developers # # License: BSD (3-clause) from .readers import read_raw from .writers import write_raw, writers
[ 2, 15069, 357, 66, 8, 29060, 3698, 6242, 6505, 198, 2, 198, 2, 13789, 25, 347, 10305, 357, 18, 12, 565, 682, 8, 198, 198, 6738, 764, 961, 364, 1330, 1100, 62, 1831, 198, 6738, 764, 34422, 1330, 3551, 62, 1831, 11, 8786, 198 ]
3.022727
44
import dash import dash_table import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output, State from tools.serial.tools.list_ports import comports from app import app from datetime import date as dt import select_port import edit_deployment import download_page im...
[ 11748, 14470, 198, 11748, 14470, 62, 11487, 198, 11748, 14470, 62, 7295, 62, 5589, 3906, 355, 288, 535, 198, 11748, 14470, 62, 6494, 62, 5589, 3906, 355, 27711, 198, 6738, 14470, 13, 45841, 3976, 1330, 23412, 11, 25235, 11, 1812, 198, ...
2.191715
2,076
import re import glob, os import spacy import xml.etree.ElementTree as ET os.chdir("xml_datasets/") sentences=[] nlp=spacy.load('el_unnamed') for file in glob.glob("*.xml"): tree = ET.parse('{}'.format(file)) root = tree.getroot() begin=[] end=[] for child in root: if (child.tag=='{http:///uima/cas.ecore}Sofa'):...
[ 11748, 302, 198, 11748, 15095, 11, 28686, 198, 11748, 599, 1590, 198, 11748, 35555, 13, 316, 631, 13, 20180, 27660, 355, 12152, 198, 418, 13, 354, 15908, 7203, 19875, 62, 19608, 292, 1039, 14, 4943, 198, 34086, 3007, 28, 21737, 198, 2...
2.21365
337
""" Test operators in deep-learning. Using PyTorch. ==================================== **Author**: `Size Zheng` """ import sys sys.path.append('../../../') import tvm import torch import numpy as np import copy from flextensor.nn import * from flextensor.utils import test_allclose import pyimpl if...
[ 37811, 198, 14402, 12879, 287, 2769, 12, 40684, 13, 198, 12814, 9485, 15884, 354, 13, 198, 198, 10052, 1421, 198, 1174, 13838, 1174, 25, 4600, 10699, 44583, 63, 198, 37811, 198, 11748, 25064, 220, 198, 17597, 13, 6978, 13, 33295, 10786,...
3.092308
130
import tensorflow as tf import numpy as np import argparse import os batch_size = 10 files, input_layer, output_layer = [None]*3 if __name__ == "__main__": args=get_arguments() print "Extracting Features" io = build_prepro_graph(args.inception_path) forward_pass(io, args.data_path) print "done...
[ 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 198, 43501, 62, 7857, 796, 838, 198, 16624, 11, 5128, 62, 29289, 11, 5072, 62, 29289, 796, 685, 14202, 60, 9, 1...
2.639344
122
# Copyright (C) 2019-2020 Intel Corporation # # SPDX-License-Identifier: MIT import logging as log import os import os.path as osp from datumaro.components.extractor import DatasetItem, SourceExtractor, Importer from datumaro.components.converter import Converter from datumaro.util.image import Image
[ 198, 2, 15069, 357, 34, 8, 13130, 12, 42334, 8180, 10501, 198, 2, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 17168, 198, 198, 11748, 18931, 355, 2604, 198, 11748, 28686, 198, 11748, 28686, 13, 6978, 355, 267, 2777, 198, 198,...
3.315217
92
import logging log = logging.getLogger() log.setLevel(logging.CRITICAL)
[ 11748, 18931, 198, 198, 6404, 796, 18931, 13, 1136, 11187, 1362, 3419, 198, 6404, 13, 2617, 4971, 7, 6404, 2667, 13, 9419, 2043, 20151, 8, 198 ]
2.807692
26
from PIL import Image #max value for luminance is ~277 (rounded down), min is 0 #print(255*0.299+255*0.7152+255*0.0722) #max value for luminance is 277.032 chars = ["@","$","#","H","E","W","g","h","f","e","c","n","<","+","=","~","-","^","*","'"] #chars in order of perceived brightness: left to right - dark to bri...
[ 6738, 350, 4146, 1330, 7412, 201, 198, 201, 198, 2, 9806, 1988, 329, 29763, 590, 318, 5299, 27019, 357, 39262, 866, 828, 949, 318, 657, 1303, 4798, 7, 13381, 9, 15, 13, 22579, 10, 13381, 9, 15, 13, 22, 17827, 10, 13381, 9, 15, 1...
2.354271
398
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Feb 12 21:17:42 2018 @author: hendrawahyu """ import os, glob, csv import argparse # ============================================================================= # Read images files using rawpy library # param: index - index number of image fi...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 2892, 3158, 1105, 2310, 25, 1558, 25, 3682, 2864, 198, 198, 31, 9800, 25, 339, 358, 1831,...
2.606884
552
from .element import Element from .prop import ValidProp, IntProp from .func import get_word
[ 6738, 764, 30854, 1330, 11703, 198, 6738, 764, 22930, 1330, 48951, 24331, 11, 2558, 24331, 198, 6738, 764, 20786, 1330, 651, 62, 4775 ]
4
23
import logging from timeit import default_timer as timer logger = logging.getLogger(__name__) class Timer: """Simple timer focused on practical use. Args: label (str): label of the timer at_enter (bool): whether it should be also displayed when entering the context. Defaults to F...
[ 11748, 18931, 198, 6738, 640, 270, 1330, 4277, 62, 45016, 355, 19781, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628, 198, 4871, 5045, 263, 25, 198, 220, 220, 220, 37227, 26437, 19781, 5670, 319, ...
2.942857
140
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from ..utils import InvWarp
[ 2, 47044, 46, 12, 35353, 1137, 11617, 416, 4899, 14, 42116, 431, 6359, 13, 9078, 532, 8410, 5626, 48483, 198, 6738, 11485, 26791, 1330, 10001, 54, 5117, 628 ]
2.964286
28
import blockformer_core as bc import blockformer_init as bi window = bc.Window(1400,500,300,300,60,"Blockformer") #initialize variables #Landscape(self,color,x,y,width=20,height=20) landscape = bc.Landscape(window,(0,255,0),0,0,window.width,100) window.background.add(landscape.drawable_sprite) sprite = bc.SmartSpri...
[ 11748, 2512, 16354, 62, 7295, 355, 47125, 198, 11748, 2512, 16354, 62, 15003, 355, 3182, 198, 198, 17497, 796, 47125, 13, 27703, 7, 1415, 405, 11, 4059, 11, 6200, 11, 6200, 11, 1899, 553, 12235, 16354, 4943, 198, 198, 2, 36733, 1096, ...
2.583333
156
# -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2018-10-31 15:31 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 1433, 319, 2864, 12, 940, 12, 3132, 1315, 25, 3132, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.753623
69
""" :codeauthor: Rahul Handay <rahulha@saltstack.com> """ import pytest import salt.states.win_dns_client as win_dns_client from tests.support.mock import MagicMock, patch @pytest.fixture def test_dns_exists(): """ Test to configure the DNS server list in the specified interface """ ret = {"nam...
[ 37811, 198, 220, 220, 220, 1058, 8189, 9800, 25, 48543, 7157, 323, 1279, 11392, 377, 3099, 31, 82, 2501, 25558, 13, 785, 29, 198, 37811, 198, 198, 11748, 12972, 9288, 198, 11748, 8268, 13, 27219, 13, 5404, 62, 67, 5907, 62, 16366, 3...
1.841185
2,632
# Append header file search paths to specified Environment Object # env: Environment object # paths: array of absolute paths
[ 198, 2, 2034, 437, 13639, 2393, 2989, 13532, 284, 7368, 9344, 9515, 198, 2, 17365, 25, 220, 220, 220, 220, 9344, 2134, 198, 2, 13532, 25, 220, 220, 7177, 286, 4112, 13532, 198 ]
4
33
# Generated by Django 3.1.7 on 2021-03-17 06:07 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 22, 319, 33448, 12, 3070, 12, 1558, 9130, 25, 2998, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys import keyboard from random import randint from time import sleep if __name__ == "__main__": xmastree = ChristmasTree() try: while True: xmastree.draw() if keyboard.is_pressed('q'): raise KeyboardInterr...
[ 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, 11748, 25064, 198, 11748, 10586, 198, 6738, 4738, 1330, 43720, 600, 198, 6738, 640, 1330, 3993, 628, 198, 361,...
2.239766
171
from django.conf.urls import url from django_info_system.generic_views import url_helper as u from person import views PERSON_REGEXP = r'^(?P<id>[0-9]+)/' urlpatterns = [ u(r'^$', views.PersonList), u(r'^(?P<tab>[a-z][a-z][a-z]+)$', views.PersonList, url_name_suffix="_tab"), u(PERSON_REGEXP + '...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 198, 6738, 42625, 14208, 62, 10951, 62, 10057, 13, 41357, 62, 33571, 1330, 19016, 62, 2978, 525, 355, 334, 198, 198, 6738, 1048, 1330, 5009, 198, 198, 47, 29086, 62, 31553...
2.226519
181
# -*- coding: utf-8 -*- """ Created on Sat Sep 05 16:29:11 2015 @author: Celso Objective: General funcions to create a mindmap file """ #import pickle listdesc3 = [] listdesc4 = [] listdesc7 = [] listdesc11 = [] # End CalcSizeIpc1 # End CalcSizeIpc3 # End CalcSizeIpc4 # End CalcSizeIpc7 # End CalcSizeIpc11 # end L...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 7031, 8621, 8870, 1467, 25, 1959, 25, 1157, 1853, 198, 198, 31, 9800, 25, 15248, 568, 198, 198, 10267, 425, 25, 3611, 25439, 507, 284, 2251, 25...
2.385965
171
from bitarray import bitarray from bitarray.util import ba2int from bitarray.util import int2ba import random
[ 6738, 1643, 18747, 1330, 1643, 18747, 198, 6738, 1643, 18747, 13, 22602, 1330, 26605, 17, 600, 198, 6738, 1643, 18747, 13, 22602, 1330, 493, 17, 7012, 198, 11748, 4738, 198 ]
3.666667
30
import os import matplotlib.pyplot as plt import numpy as np import math import torch import gotex.vgg as vgg import wget import ssl ssl._create_default_https_context = ssl._create_unverified_context def ReadImg(imagePath): ''' Read an image as tensor and ensure that it has 3 channel and range from 0 to 255 ...
[ 11748, 28686, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 10688, 198, 11748, 28034, 198, 11748, 1392, 1069, 13, 85, 1130, 355, 410, 1130, 198, 11748, 266, 1136, 198, 1174...
2.297782
947
############################################################################## # # Copyright (c) 2008 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOF...
[ 29113, 29113, 7804, 4242, 2235, 198, 2, 198, 2, 15069, 357, 66, 8, 3648, 1168, 3008, 5693, 290, 25767, 669, 13, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 770, 3788, 318, 2426, 284, 262, 8617, 286, 262, 1168, 3008, 5094, 13789...
3.816438
365
## importing import csv import argparse ## arguments parser = argparse.ArgumentParser() parser.add_argument("-n", "--spanlen", type=int, help="The number of nucleotides to extract") parser.add_argument("-i", "--infile", help="Input file containing SNV data") parser.add_argument("-s", "--sample", help="The name of the ...
[ 2235, 33332, 198, 11748, 269, 21370, 198, 11748, 1822, 29572, 198, 198, 2235, 7159, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 3419, 198, 48610, 13, 2860, 62, 49140, 7203, 12, 77, 1600, 366, 438, 12626, 11925, 1600, 2099, 28,...
2.232099
810
import logging from typing import List from kubails.utils.service_helpers import call_command, get_command_output logger = logging.getLogger(__name__)
[ 11748, 18931, 198, 6738, 19720, 1330, 7343, 198, 6738, 479, 549, 1768, 13, 26791, 13, 15271, 62, 16794, 364, 1330, 869, 62, 21812, 11, 651, 62, 21812, 62, 22915, 628, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, ...
3.422222
45
import torch from .Module import Module
[ 11748, 28034, 198, 6738, 764, 26796, 1330, 19937, 628 ]
4.555556
9
"""Module for migrating data from the .xml files in the Stack Overflow data dump to a SQL database. .. module:: migrate_data :platform: Linux :synopsis: Data migration functions. .. moduleauthor:: Simon Larsén <slarse@kth.se>, Li Ling <liling@kth.se> """ from typing import Iterable, Callable, Set from xml.etr...
[ 37811, 26796, 329, 45879, 1366, 422, 262, 764, 19875, 3696, 287, 262, 23881, 3827, 11125, 1366, 198, 39455, 284, 257, 16363, 6831, 13, 198, 198, 492, 8265, 3712, 32492, 62, 7890, 198, 220, 220, 220, 1058, 24254, 25, 7020, 198, 220, 22...
2.362602
2,198
''' Brent Waters (Pairing-based) | From: "Ciphertext-Policy Attribute-Based Encryption: An Expressive, Efficient, and Provably Secure Realization", Appendix C. | Published in: 2008 | Available from: http://eprint.iacr.org/2008/290.pdf | Notes: Security Assumption: parallel q-DBDHE. The sole disadvantage of this schem...
[ 7061, 6, 198, 33, 1156, 21827, 357, 47, 958, 278, 12, 3106, 8, 198, 220, 198, 91, 3574, 25, 366, 34, 10803, 5239, 12, 36727, 3460, 4163, 12, 15001, 14711, 13168, 25, 1052, 5518, 3314, 11, 412, 5632, 11, 290, 7518, 1346, 26707, 641...
2.948171
328
#!/usr/bin/env python3 # 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, softwar...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 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, 92...
3.545455
264
''' // Layout of fields in a DDR4 SPD. // Individual field descriptions are taken directly from the JEDEC spec. struct Ddr4Fields { // Number of Serial PD Bytes Written / SPD Device Size / CRC Coverage uint8_t bytes_used_bytes_total_crc_coverage; // SPD Revision uint8_t spd_revision; // ...
[ 7061, 6, 201, 198, 1003, 47639, 286, 7032, 287, 257, 30085, 19, 30628, 13, 201, 198, 220, 3373, 18629, 2214, 16969, 389, 2077, 3264, 422, 262, 449, 1961, 2943, 1020, 13, 201, 198, 220, 2878, 360, 7109, 19, 15878, 82, 1391, 201, 198,...
2.500838
2,386
from celery.schedules import crontab from celery.task.base import periodic_task from corehq.apps.callcenter.indicator_sets import CallCenterIndicators from corehq.apps.callcenter.utils import get_call_center_domains, is_midnight_for_domain, get_call_center_cases from celery.utils.log import get_task_logger logger = ge...
[ 6738, 18725, 1924, 13, 1416, 704, 5028, 1330, 1067, 756, 397, 198, 6738, 18725, 1924, 13, 35943, 13, 8692, 1330, 27458, 62, 35943, 198, 6738, 4755, 71, 80, 13, 18211, 13, 13345, 16159, 13, 521, 26407, 62, 28709, 1330, 4889, 23656, 549...
2.568359
512
#!/usr/bin/env python # Copyright (C) 2011 # Brett Alistair Kromkamp - brettkromkamp@gmail.com # Copyright (C) 2012-2017 # Xiaming Chen - chenxm35@gmail.com # and other contributors. # All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complian...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 15069, 357, 34, 8, 2813, 198, 2, 18726, 978, 396, 958, 509, 398, 40899, 532, 1449, 926, 74, 398, 40899, 31, 14816, 13, 785, 198, 2, 15069, 357, 34, 8, 2321, 12, 5539, 198, 2, ...
3.61435
223
# -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2020-05-06 10:37 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 1959, 319, 12131, 12, 2713, 12, 3312, 838, 25, 2718, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198,...
2.728571
70
from project.fish.base_fish import BaseFish
[ 6738, 1628, 13, 11084, 13, 8692, 62, 11084, 1330, 7308, 39428, 201, 198, 201, 198 ]
3.133333
15
import numpy as np import matplotlib.pyplot as plt from matplotlib import cm class attrdict(dict): ''' Use dict key as attribute if available ''' @classmethod @classmethod
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 2603, 29487, 8019, 1330, 12067, 628, 198, 4871, 708, 4372, 713, 7, 11600, 2599, 628, 220, 220, 220, 705, 7061, 198, 220, 220, 220,...
2.77027
74
from setting.Ini import Ini from _python.designpattern.Singleton import Singleton import pathlib from setting.YamlMeta import YamlMeta import yaml #class Config(metaclass=Singleton):
[ 6738, 4634, 13, 818, 72, 1330, 554, 72, 220, 198, 6738, 4808, 29412, 13, 26124, 33279, 13, 29974, 10565, 1330, 5573, 10565, 198, 11748, 3108, 8019, 198, 6738, 4634, 13, 56, 43695, 48526, 1330, 14063, 75, 48526, 198, 11748, 331, 43695, ...
3.407407
54
import json import logging import os import apache_beam as beam from xml.etree import ElementTree from apache_beam.coders import coders logger = logging.getLogger(__name__) def run_pipeline(config): """ Execute the SOTorrent pipeline in Google Cloud. :return: None """ input_paths = config.input...
[ 11748, 33918, 198, 11748, 18931, 198, 11748, 28686, 198, 198, 11748, 2471, 4891, 62, 40045, 355, 15584, 198, 198, 6738, 35555, 13, 316, 631, 1330, 11703, 27660, 198, 6738, 2471, 4891, 62, 40045, 13, 19815, 364, 1330, 14873, 364, 198, 19...
2.376868
1,807
from __future__ import print_function def cut_rod(price, length): """ simplest cut rod algorithm return value of maximum income """ if length == 0: return 0 income = float("-Inf") for i in range(length): # recursive call for rod with a shorter length (n - i - 1) inc...
[ 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 4299, 2005, 62, 14892, 7, 20888, 11, 4129, 2599, 198, 220, 220, 220, 37227, 24043, 2005, 15299, 11862, 198, 220, 220, 220, 220, 220, 220, 220, 1441, 1988, 286, 5415, 3739, ...
2.44603
1,121
import re import json import flask _URIPATH_REGEX = re.compile(r'http[s]?://[^/]+/(.*)')
[ 11748, 302, 198, 11748, 33918, 198, 11748, 42903, 628, 198, 62, 4261, 4061, 12599, 62, 31553, 6369, 796, 302, 13, 5589, 576, 7, 81, 6, 4023, 58, 82, 60, 30, 1378, 58, 61, 14, 48688, 29006, 15885, 8, 11537, 198 ]
2.275
40
# Generated by Django 3.2.6 on 2022-01-08 17:35 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 21, 319, 33160, 12, 486, 12, 2919, 1596, 25, 2327, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
# Generated by Django 2.2.4 on 2019-08-21 15:41 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 19, 319, 13130, 12, 2919, 12, 2481, 1315, 25, 3901, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
def create_tag(item, tag="a"): """ some function to wrapp HTML-tag with data-attributes around a string""" try: item_text = item.text except AttributeError: item_text = "no text provided" try: item_lang = item.language except AttributeError: item_lang = "no lang provi...
[ 4299, 2251, 62, 12985, 7, 9186, 11, 7621, 2625, 64, 1, 2599, 198, 220, 220, 220, 37227, 617, 2163, 284, 7917, 381, 11532, 12, 12985, 351, 1366, 12, 1078, 7657, 1088, 257, 4731, 37811, 198, 220, 220, 220, 1949, 25, 198, 220, 220, 2...
2.221854
302
#!/usr/bin/env python from loginsightwebhookdemo import app, parse, callapi from flask import request, json import logging __author__ = "Steve Flanders" __license__ = "Apache v2" __verion__ = "1.0" # Parameters JENKINSURL = 'https://wh.jandi.com/connect-api/webhook/15292345/a76ad35760d264ff84ddc964e35efa2f' # Only...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 2604, 1040, 432, 12384, 25480, 9536, 78, 1330, 598, 11, 21136, 11, 869, 15042, 198, 6738, 42903, 1330, 2581, 11, 33918, 198, 11748, 18931, 628, 198, 834, 9800, 834, 796, 366...
2.264253
1,105
# -*- coding: utf-8 -*- """ @Time : 2020/3/11 16:28 @Author : 半纸梁 @File : urls.py """ from django.urls import path from BDUser import views app_name = "bd" urlpatterns = [ path("register/", views.register, name="register") ]
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 31, 7575, 220, 220, 220, 1058, 12131, 14, 18, 14, 1157, 1467, 25, 2078, 198, 31, 13838, 220, 1058, 10263, 235, 232, 163, 118, 116, 162, 95, 223, 198, 31,...
2.192661
109
""" Exercício Python 095: Aprimore o desafio 93 (https://github.com/ItanuRomero/PythonStudyPrograms/blob/master/ProgramsToRead/ExampleDictionaryFunctions003.py) para que ele funcione com vários jogadores, incluindo um sistema de visualização de detalhes do aproveitamento de cada jogador. """ jogador = dict() lista_joga...
[ 37811, 198, 3109, 2798, 8836, 66, 952, 11361, 657, 3865, 25, 2758, 9401, 267, 748, 1878, 952, 10261, 357, 5450, 1378, 12567, 13, 785, 14, 1026, 42357, 22834, 3529, 14, 37906, 39841, 15167, 82, 14, 2436, 672, 14, 9866, 14, 15167, 82, ...
2.167677
990
#!/usr/bin/python3 import numpy as np import torch from torch import Tensor from torch.utils.data import Dataset, DataLoader import pickle import os import librosa from feature_extraction import LFCC from torch.utils.data.dataloader import default_collate lfcc = LFCC(320, 160, 512, 16000, 20, with_energy=False) wavfo...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 6738, 28034, 1330, 309, 22854, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 16092, 292, 316, 11, 6060, 17401, 198, 11748, 2298, ...
2.668605
172
from imdbpie import Imdb from bs4 import BeautifulSoup from termcolor import colored import requests imdb = Imdb(cache=True)
[ 6738, 545, 9945, 21749, 1330, 1846, 9945, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 6738, 3381, 8043, 1330, 16396, 198, 11748, 7007, 198, 320, 9945, 796, 1846, 9945, 7, 23870, 28, 17821, 8, 628 ]
3.405405
37
from serif.model.relation_model import RelationModel
[ 6738, 1055, 361, 13, 19849, 13, 49501, 62, 19849, 1330, 4718, 341, 17633, 628 ]
3.857143
14
# """ Implementation based on 'pkg_resources' from 'setuptools' """ import copy import enum import pkg_resources INDENTATION = 2 def main(user_selection, is_reverse, is_flat): """ Main function """ # preselection = _make_preselection(user_selection, is_reverse) (distribut...
[ 2, 198, 198, 37811, 46333, 1912, 319, 705, 35339, 62, 37540, 6, 422, 705, 2617, 37623, 10141, 6, 198, 37811, 198, 198, 11748, 4866, 198, 11748, 33829, 198, 198, 11748, 279, 10025, 62, 37540, 198, 198, 12115, 3525, 6234, 796, 362, 628,...
2.272506
411
from __future__ import annotations import base64 import logging import pickle import threading from pathlib import Path from typing import TYPE_CHECKING, Any import click from flask import Flask, current_app from rich.box import SIMPLE_HEAVY from rich.table import Table from textual.app import App from textual.widget...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 11748, 2779, 2414, 198, 11748, 18931, 198, 11748, 2298, 293, 198, 11748, 4704, 278, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 41876, 62, 50084, 2751, 11, 4377, 198, 198, ...
2.765038
532
from selenium import webdriver from selenium.webdriver.common.keys import Keys chrome_driver_path = "C:\Development\chromedriver_win32\chromedriver.exe" options = webdriver.ChromeOptions() options.add_experimental_option('excludeSwitches', ['enable-logging']) driver = webdriver.Chrome(executable_path=chrome_driver_pat...
[ 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 11321, 13, 13083, 1330, 26363, 198, 198, 46659, 62, 26230, 62, 6978, 796, 366, 34, 7479, 41206, 59, 28663, 276, 38291, 62, 5404, 2624, 59, 2...
3.044843
223
import pytest from pywps import Service from pywps.tests import assert_response_success import requests from .common import TESTDATA, client_for from hummingbird.processes.wps_cfchecker import CFChecker @pytest.mark.skip("cfchecker not installed") @pytest.mark.skipif( requests.head(TESTDATA['noaa_nc_1']).ok is ...
[ 11748, 12972, 9288, 198, 6738, 12972, 86, 862, 1330, 4809, 198, 6738, 12972, 86, 862, 13, 41989, 1330, 6818, 62, 26209, 62, 13138, 198, 198, 11748, 7007, 198, 198, 6738, 764, 11321, 1330, 43001, 26947, 11, 5456, 62, 1640, 198, 6738, 4...
3
127
from django.core.cache import get_cache
[ 6738, 42625, 14208, 13, 7295, 13, 23870, 1330, 651, 62, 23870, 628, 628, 198 ]
3.142857
14
import requests from urllib import parse import pandas as pd dashboard_url = '' output_path = '' cert = '' # VPN cert if needed tags = [] # tags to filter among anns api_key = '' server = '' endpoint_path = "/api/annotations/" url = dashboard_url input_dict = parse.parse_qs(parse.urlsplit(url).query) dashboard...
[ 11748, 7007, 198, 6738, 2956, 297, 571, 1330, 21136, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 42460, 3526, 62, 6371, 796, 10148, 198, 22915, 62, 6978, 796, 10148, 198, 22583, 796, 10148, 220, 1303, 21669, 5051, 611, 2622, 198, ...
2.603922
255
# KNN # Created by JKChang # 27/01/2020, 15:53 # Tag: # Description: import operator import matplotlib.pyplot as plt from numpy import * group, labels = createDataSet() drawGraph(group, labels) print(classify([0.5, 0.5], group, labels, 2))
[ 2, 509, 6144, 198, 2, 15622, 416, 449, 42, 1925, 648, 198, 2, 2681, 14, 486, 14, 42334, 11, 1315, 25, 4310, 198, 2, 17467, 25, 198, 2, 12489, 25, 220, 198, 198, 11748, 10088, 198, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, ...
2.638298
94
BTC_MAGIC_NUMBERS = { "main": 0xD9B4BEF9, "testnet": 0xDAB5BFFA, "testnet3": 0x0709110B, "regtest": 0xDAB5BFFA, "namecoin": 0xFEB4BEF9 } # The length of everything in the header minus the checksum BTC_HEADER_MINUS_CHECKSUM = 20 BTC_HDR_COMMON_OFF = 24 # type: int BTC_BLOCK_HDR_SIZE = 80 BTC_SHORT_...
[ 35964, 62, 45820, 2149, 62, 41359, 33, 4877, 796, 1391, 198, 220, 220, 220, 366, 12417, 1298, 657, 87, 35, 24, 33, 19, 12473, 37, 24, 11, 198, 220, 220, 220, 366, 9288, 3262, 1298, 657, 87, 5631, 33, 20, 33, 5777, 32, 11, 198, ...
2.168212
755
INT, FLOAT, STR = int, float, str
[ 12394, 11, 9977, 46, 1404, 11, 19269, 796, 493, 11, 12178, 11, 965, 628, 628, 628 ]
2.4375
16
from flask_script import Manager from schedule import frontend, api from werkzeug.wsgi import DispatcherMiddleware from werkzeug.serving import run_simple from schedule.core import db manager = Manager(frontend.create_app()) @manager.command @manager.command @manager.command if __name__ == '__main__': manag...
[ 6738, 42903, 62, 12048, 1330, 9142, 198, 6738, 7269, 1330, 2166, 437, 11, 40391, 198, 6738, 266, 9587, 2736, 1018, 13, 18504, 12397, 1330, 3167, 8071, 2044, 34621, 1574, 198, 6738, 266, 9587, 2736, 1018, 13, 31293, 1330, 1057, 62, 36439...
3.327103
107
#!/usr/bin/env python # Copyright 2016 Attic Labs, Inc. All rights reserved. # Licensed under the Apache License, version 2.0: # http://www.apache.org/licenses/LICENSE-2.0 import argparse, os, subprocess, sys if __name__ == "__main__": main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 15069, 1584, 3460, 291, 23500, 11, 3457, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 24843, 13789, 11, 2196, 362, 13, 15, 25, 198, 2, 2638, 1378, 2503, 13, 43073, 1...
2.885057
87
from conftest import get_mysql_database from synch.factory import get_writer
[ 6738, 369, 701, 395, 1330, 651, 62, 28744, 13976, 62, 48806, 198, 6738, 6171, 354, 13, 69, 9548, 1330, 651, 62, 16002, 628, 628 ]
3.333333
24
#! /usr/bin/env python # --- import ------------------------------------------------------------------------------------- import os from setuptools import setup, find_packages # --- define ------------------------------------------------------------------------------------- here = os.path.abspath(os.path.dirna...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 628, 198, 2, 11420, 1330, 16529, 19351, 12, 628, 198, 11748, 28686, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 628, 198, 2, 11420, 8160, 16529, 19351, 12, 628, ...
2.946515
617
# Copyright 2021 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
[ 2, 15069, 33448, 3012, 11419, 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, 921, 743, 733...
3.234694
294
# Import packages import csv # Read in case parameters and write out solutions import numpy as np #----------------------------------------------------------------- with open('casefile.csv',newline='') as casefile: # load cases casereader = csv.DictReader(casefile) i = 0 caselist = {} for row in ca...
[ 2, 17267, 10392, 198, 11748, 269, 21370, 1303, 4149, 287, 1339, 10007, 290, 3551, 503, 8136, 198, 11748, 299, 32152, 355, 45941, 198, 2, 10097, 12, 198, 198, 4480, 1280, 10786, 7442, 7753, 13, 40664, 3256, 3605, 1370, 28, 7061, 8, 355...
2.468889
450
# Copyright 2022 The Google AI Language Team Authors and # The HuggingFace Inc. team. # Copyright (c) 2020, NVIDIA CORPORATION. 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 Lice...
[ 2, 15069, 33160, 383, 3012, 9552, 15417, 4816, 46665, 290, 198, 2, 383, 12905, 2667, 32388, 3457, 13, 1074, 13, 198, 2, 15069, 357, 66, 8, 12131, 11, 15127, 23929, 44680, 6234, 13, 220, 1439, 2489, 10395, 13, 198, 2, 198, 2, 49962, ...
3.695652
253
import re from typing import List import string from qanta import qlogging from nltk import word_tokenize from sklearn.model_selection import train_test_split from qanta.datasets.abstract import TrainingData log = qlogging.get(__name__) ftp_patterns = { "\n", ", for 10 points,", ", for ten points,", ...
[ 11748, 302, 198, 6738, 19720, 1330, 7343, 198, 11748, 4731, 198, 198, 6738, 10662, 4910, 1330, 10662, 6404, 2667, 198, 6738, 299, 2528, 74, 1330, 1573, 62, 30001, 1096, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4512, 62, 9288,...
2.117081
1,973
from PySide2 import QtWidgets from PySide2.QtCore import Qt from PySide2.QtGui import QPixmap from node_launcher.gui.assets import asset_access
[ 6738, 9485, 24819, 17, 1330, 33734, 54, 312, 11407, 198, 6738, 9485, 24819, 17, 13, 48, 83, 14055, 1330, 33734, 198, 6738, 9485, 24819, 17, 13, 48, 83, 8205, 72, 1330, 1195, 47, 844, 8899, 198, 198, 6738, 10139, 62, 38722, 2044, 13,...
2.862745
51
import matplotlib.pyplot as plt # plt.ion() # 在使用matplotlib的过程中,常常会需要画很多图,但是好像并不能同时展示许多图。这是因为python可视化库matplotlib的显示模式默认为阻塞(block)模式。 # 什么是阻塞模式那?我的理解就是在plt.show()之后,程序会暂停到那儿,并不会继续执行下去。 # 如果需要继续执行程序,就要关闭图片。那如何展示动态图或多个窗口呢? # 这就要使用plt.ion()这个函数,使matplotlib的显示模式转换为交互(interactive)模式。即使在脚本中遇到plt.show(),代码还是会继续执行。 # 在交互模式下: ...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 2, 458, 83, 13, 295, 3419, 198, 2, 10263, 250, 101, 45635, 18796, 101, 6759, 29487, 8019, 21410, 32573, 229, 163, 101, 233, 40792, 171, 120, 234, 30585, 116, 30585, ...
0.824973
937
# -*- coding: utf-8 -*- # # QEMU documentation build configuration file for the 'specs' manual. # # This includes the top level conf file and then makes any necessary tweaks. import sys import os qemu_docdir = os.path.abspath("..") parent_config = os.path.join(qemu_docdir, "conf.py") exec(compile(open(parent_config, "...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 1195, 3620, 52, 10314, 1382, 8398, 2393, 329, 262, 705, 4125, 6359, 6, 10107, 13, 198, 2, 198, 2, 770, 3407, 262, 1353, 1241, 1013, 2393, 290, 788, 1838, ...
3.19209
177
# coding: utf-8 """ Implements various interpreters and modders for FEFF calculations. """ import os from pymatgen.io.feff.sets import FEFFDictSet from custodian.ansible.actions import FileActions, DictActions from custodian.ansible.interpreter import Modder class FeffModder(Modder): """ A Modder for Feff...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 3546, 1154, 902, 2972, 16795, 1010, 290, 953, 67, 364, 329, 18630, 5777, 16765, 13, 198, 37811, 198, 198, 11748, 28686, 198, 198, 6738, 279, 4948, 265, 5235, 13, 952, 13, 5036, ...
2.109005
1,266
import json from peewee import * db = SqliteDatabase('assets.db') class Base(Model): """ Base Model """ class User(Base): """ User Model Attributes --------- id: int Primary key of the user name: String Name of user """ id = IntegerField(primary_key=True...
[ 11748, 33918, 198, 6738, 613, 413, 1453, 1330, 1635, 198, 198, 9945, 796, 311, 13976, 578, 38105, 10786, 19668, 13, 9945, 11537, 628, 198, 4871, 7308, 7, 17633, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 7308, 9104, 198, 220...
2.119303
2,699
from swaps.model.market.candlestick import Candlestick from swaps.model.market.candlestick_event import CandlestickEvent from swaps.model.market.candlestick_req import CandlestickReq from swaps.model.market.last_trade_bestquote import LastTradeAndBestQuote from swaps.model.market.pricedepth import PriceDepth from swaps...
[ 6738, 43997, 13, 19849, 13, 10728, 13, 46188, 32712, 624, 1330, 15518, 32712, 624, 198, 6738, 43997, 13, 19849, 13, 10728, 13, 46188, 32712, 624, 62, 15596, 1330, 15518, 32712, 624, 9237, 198, 6738, 43997, 13, 19849, 13, 10728, 13, 4618...
3.483627
397
import math an = float(input("Digite um angulo: ")) seno = math.sin(math.radians(an)) cos = math.cos(math.radians(an)) tan = math.tan(math.tan(an)) print("O seno de {} é,{:.2f}".format(an, seno)) print("O cosseno de {} é,{:.2f}".format(an, cos)) print("A tangente de {} é,{:.2f}".format(an, tan))
[ 11748, 10688, 198, 198, 272, 796, 12178, 7, 15414, 7203, 19511, 578, 23781, 3550, 43348, 25, 366, 4008, 198, 6248, 78, 796, 10688, 13, 31369, 7, 11018, 13, 6335, 1547, 7, 272, 4008, 198, 6966, 796, 10688, 13, 6966, 7, 11018, 13, 633...
2.267176
131
""" Checks that primitive values are not used in an iterating/mapping context. """ # pylint: disable=missing-docstring,invalid-name,too-few-public-methods,no-init,no-self-use,import-error,unused-argument,bad-mcs-method-argument,wrong-import-position,no-else-return from __future__ import print_function # primitives num...
[ 37811, 198, 7376, 4657, 326, 20049, 3815, 389, 407, 973, 287, 281, 198, 2676, 803, 14, 76, 5912, 4732, 13, 198, 37811, 198, 2, 279, 2645, 600, 25, 15560, 28, 45688, 12, 15390, 8841, 11, 259, 12102, 12, 3672, 11, 18820, 12, 32146, ...
2.431429
700
import os import numpy as np import pandas as pd #postive_300 = pd.read_pickle(r'300_pos_exs.pkl') #postive_300 = pd.read_pickle(r'63_1a2o_neg_exs.pkl') #postive_300 = pd.read_pickle(r'1000_decoy_exs.pkl') #postive_300 = pd.read_pickle(r'1000_pos_exs.pkl') #print("postive samples:", len(postive_300)) def run(workd...
[ 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 2, 7353, 425, 62, 6200, 796, 279, 67, 13, 961, 62, 27729, 293, 7, 81, 6, 6200, 62, 1930, 62, 1069, 82, 13, 79, 41582, 11537, 198, ...
1.941935
930
__author__ = 'flipajs'
[ 834, 9800, 834, 796, 705, 2704, 541, 1228, 82, 6, 198 ]
2.090909
11
import subprocess import config import argparse import itertools SPLA_PATH = config.DEPS / "spla" SPLA_BUILD = SPLA_PATH / "build" SPLA_TARGETS = ["spla_bfs", "spla_sssp", "spla_tc", "spla_data"] if __name__ == '__main__': exit(main())
[ 11748, 850, 14681, 198, 11748, 4566, 198, 11748, 1822, 29572, 198, 11748, 340, 861, 10141, 198, 198, 4303, 13534, 62, 34219, 796, 4566, 13, 7206, 3705, 1220, 366, 22018, 64, 1, 198, 4303, 13534, 62, 19499, 26761, 796, 6226, 13534, 62, ...
2.401961
102
""" Functions for type inference. """ # pylint: disable=unused-argument from typing import TYPE_CHECKING, List, Optional, Type, Union, cast from sqloxide import parse_sql from datajunction.models.column import Column from datajunction.sql.functions import function_registry from datajunction.sql.parse import find_no...
[ 37811, 198, 24629, 2733, 329, 2099, 32278, 13, 198, 37811, 198, 198, 2, 279, 2645, 600, 25, 15560, 28, 403, 1484, 12, 49140, 198, 198, 6738, 19720, 1330, 41876, 62, 50084, 2751, 11, 7343, 11, 32233, 11, 5994, 11, 4479, 11, 3350, 198...
2.672983
2,058
from django.conf.urls import include, url from django.contrib import admin import hello_world.urls urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^', include(hello_world.urls)) ]
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 2291, 11, 19016, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 11748, 23748, 62, 6894, 13, 6371, 82, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 19016, ...
2.5875
80
# Copyright (c) 2019-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. # import difflib
[ 2, 15069, 357, 66, 8, 13130, 12, 25579, 11, 3203, 11, 3457, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 5964, 1043, 287, 262, 198, 2, 38559, 24290, 2393, 287, 262, 6808, 8619, 286, 4...
3.732143
56
""" Filename: test_localint.py Tests for localint.py """ import numpy as np from numpy.testing import assert_array_equal, assert_equal from quantecon.game_theory import LocalInteraction class TestLocalInteraction: '''Test the methods of LocalInteraction''' def setUp(self): '''Setup a LocalInterac...
[ 37811, 198, 35063, 25, 1332, 62, 12001, 600, 13, 9078, 198, 198, 51, 3558, 329, 1957, 600, 13, 9078, 198, 198, 37811, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 299, 32152, 13, 33407, 1330, 6818, 62, 18747, 62, 40496, 11, 6...
2.155556
360
__author__ = 'gsanroma' import argparse from fnmatch import fnmatch import os import subprocess import sys import csv from scheduler import Launcher, check_file_repeat from shutil import rmtree parser = argparse.ArgumentParser(description='Computes Dice score of estimated segmentations w.r.t. ground truth segmentatio...
[ 834, 9800, 834, 796, 705, 70, 12807, 42902, 6, 198, 198, 11748, 1822, 29572, 198, 6738, 24714, 15699, 1330, 24714, 15699, 198, 11748, 28686, 198, 11748, 850, 14681, 198, 11748, 25064, 198, 11748, 269, 21370, 198, 6738, 6038, 18173, 1330, ...
2.238587
1,840
#!/usr/bin/env python # -*- coding: utf8 -*- from numpy import * import json import sys ParseInput(sys.argv)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 23, 532, 9, 12, 198, 6738, 299, 32152, 1330, 1635, 198, 11748, 33918, 198, 11748, 25064, 198, 198, 10044, 325, 20560, 7, 17597, 13, 853, 85, 8, ...
2.444444
45
# dataframe: a data-frame implementation using method piping # # Copyright (C) 2016 Simon Dirmeier # # This file is part of dataframe. # # dataframe is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either versi...
[ 2, 1366, 14535, 25, 257, 1366, 12, 14535, 7822, 1262, 2446, 48426, 198, 2, 198, 2, 15069, 357, 34, 8, 1584, 11288, 36202, 49468, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 1366, 14535, 13, 198, 2, 198, 2, 1366, 14535, 318, 1479, ...
2.390956
2,123