content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import SimpleITK as sitk import matplotlib.pyplot as plt import numpy as np # # Set of methods used for displaying the registration metric during the optimization. # # Callback invoked when the StartEvent happens, sets up our new data. # Callback invoked when the EndEvent happens, do cleanup of data and figure. #...
[ 11748, 17427, 2043, 42, 355, 1650, 74, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 198, 2, 198, 2, 5345, 286, 5050, 973, 329, 19407, 262, 9352, 18663, 1141, 262, 23989, 13, ...
2.352802
1,695
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: communicate.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.pro...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 262, 8435, 11876, 17050, 13, 220, 8410, 5626, 48483, 0, 198, 2, 2723, 25, 10996, 13, 1676, 1462, 198, 37811, 8645, 515, 8435, 11876, 2438, 526, 1593...
2.537507
1,773
import asyncio import json import os import aiofiles import discord with open('config.json') as f: config = json.load(f) if __name__ == '__main__': main()
[ 11748, 30351, 952, 198, 11748, 33918, 198, 11748, 28686, 198, 198, 11748, 257, 952, 16624, 198, 11748, 36446, 198, 198, 4480, 1280, 10786, 11250, 13, 17752, 11537, 355, 277, 25, 198, 220, 220, 220, 4566, 796, 33918, 13, 2220, 7, 69, 8...
2.698413
63
""" Useful functions for a PDA """ from .state import State from .symbol import Symbol from .stack_symbol import StackSymbol from .epsilon import Epsilon class PDAObjectCreator: """ A Object in a PDA """ def to_state(self, given): """ Convert to a state """ if isinstance(given, State...
[ 37811, 49511, 5499, 329, 257, 350, 5631, 37227, 198, 198, 6738, 764, 5219, 1330, 1812, 198, 6738, 764, 1837, 23650, 1330, 38357, 198, 6738, 764, 25558, 62, 1837, 23650, 1330, 23881, 13940, 23650, 198, 6738, 764, 538, 18217, 261, 1330, 4...
2.175439
570
infile = open("input.txt") T =int(infile.readline().strip()) for t in range(1, T+1): solve(t, infile.readline().split(' '))
[ 198, 259, 7753, 796, 1280, 7203, 15414, 13, 14116, 4943, 198, 51, 796, 600, 7, 259, 7753, 13, 961, 1370, 22446, 36311, 28955, 198, 198, 1640, 256, 287, 2837, 7, 16, 11, 309, 10, 16, 2599, 198, 197, 82, 6442, 7, 83, 11, 1167, 576...
2.37037
54
# -*- coding: utf-8 -*- """ File to test Isis performance """ __created__ = "2007-05-15" __updated__ = "2008-05-15" __author__ = "Rodrigo Senra <rsenra@acm.org>" # Setup test environment from timeit import Timer from pyisis.tests.config_tests import test_data, Lyer, initialize config = initialize() setup=""" from ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 8979, 284, 1332, 16530, 2854, 198, 37811, 198, 198, 834, 25598, 834, 796, 366, 12726, 12, 2713, 12, 1314, 1, 198, 834, 43162, 834, 796, 366, 11528, 12...
2.737705
183
from typing import Dict, List import numpy as np from keras import utils from keras.engine import Layer from keras.layers import Embedding from keras.models import Sequential from keras.preprocessing import text, sequence from unify_eval.model.mixins.classification import DeepModel, Classifier from unify_eval.model.t...
[ 6738, 19720, 1330, 360, 713, 11, 7343, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 41927, 292, 1330, 3384, 4487, 198, 6738, 41927, 292, 13, 18392, 1330, 34398, 198, 6738, 41927, 292, 13, 75, 6962, 1330, 13302, 6048, 278, 198, ...
2.129216
1,927
#!/usr/bin/env python3 ################################################################ # Check for 'myfile.csv' in a certain directory # Since this has more than two lines, it will output the files contents # You should also try renaming to 'myfile3.csv' and re-running to ensure it catches it #######################...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 29113, 29113, 198, 2, 6822, 329, 705, 1820, 7753, 13, 40664, 6, 287, 257, 1728, 8619, 198, 2, 4619, 428, 468, 517, 621, 734, 3951, 11, 340, 481, 5072, 262, 3696, 10154, 19...
2.996661
599
## The Drug Interaction Knowledge Base (DIKB) is (C) Copyright 2005 by ## Richard Boyce ## Original Authors: ## Richard Boyce ## This library is free software; you can redistribute it and/or ## modify it under the terms of the GNU Library General Public ## License as published by the Free Software Foundation; eithe...
[ 2235, 383, 11095, 4225, 2673, 20414, 7308, 357, 17931, 22764, 8, 318, 357, 34, 8, 15069, 5075, 416, 198, 2235, 6219, 6387, 344, 198, 198, 2235, 13745, 46665, 25, 198, 2235, 220, 220, 6219, 6387, 344, 198, 198, 2235, 770, 5888, 318, ...
2.738818
1,252
import pytest from tartiflette import Resolver, create_engine _SDL = """ type bobby { c: String } type boby { b: bobby! } type bob { a: boby } type Query { string1: String! stringList: [String] stringListNonNull: [String]! nonNullStringList: [String!] nonNullStringListNonNull: [Str...
[ 11748, 12972, 9288, 198, 198, 6738, 35842, 361, 21348, 1330, 1874, 14375, 11, 2251, 62, 18392, 198, 198, 62, 10305, 43, 796, 37227, 198, 198, 4906, 275, 11369, 1391, 198, 220, 220, 220, 269, 25, 10903, 198, 92, 198, 198, 4906, 275, ...
1.705357
2,352
# Test fairness of scheduler try: import uasyncio as asyncio except ImportError: try: import asyncio except ImportError: print("SKIP") raise SystemExit asyncio.run(main())
[ 2, 6208, 22692, 286, 6038, 18173, 198, 198, 28311, 25, 198, 220, 220, 220, 1330, 334, 292, 13361, 952, 355, 30351, 952, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 1949, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1330, 30351,...
2.420455
88
# Copyright 2019 Matthias Ring # Machine Learning and Data Analytics Lab # Friedrich-Alexander-University Erlangen-Nuremberg # # 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.apa...
[ 2, 15069, 13130, 45524, 4448, 12569, 198, 2, 10850, 18252, 290, 6060, 30437, 3498, 198, 2, 46099, 12, 38708, 12, 21009, 5256, 17204, 268, 12, 45, 495, 47369, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357...
3.654412
272
# Turtles in space import turtle sky = turtle.Screen() sky.tracer(0) sky.bgcolor('black') rocket = turtle.Turtle() rocket.speed(0) rocket.color('green') a = 10.0 b = 28.0 c = 8.0/3.0 x = y = z= 1.0e-1 #x = y = z= 1.0e-200 tic = 0.0 sky.ontimer(tictoc, 5)
[ 2, 44356, 287, 2272, 198, 11748, 28699, 198, 198, 15688, 796, 28699, 13, 23901, 3419, 198, 15688, 13, 2213, 11736, 7, 15, 8, 198, 15688, 13, 35904, 8043, 10786, 13424, 11537, 198, 30431, 796, 28699, 13, 51, 17964, 3419, 198, 30431, 13...
2.096774
124
# Licensed under an MIT style license -- see LICENSE.md import numpy as np from pesummary.utils.utils import logger, iterator from pesummary.utils.decorators import array_input from .spins import chi_p __author__ = ["Charlie Hoy <charlie.hoy@ligo.org>"] try: import lalsimulation from lalsimulation import ( ...
[ 2, 49962, 739, 281, 17168, 3918, 5964, 1377, 766, 38559, 24290, 13, 9132, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 32317, 388, 6874, 13, 26791, 13, 26791, 1330, 49706, 11, 41313, 198, 6738, 32317, 388, 6874, 13, 26791, ...
2.361624
11,653
# PA Well Permit Scraper import re from datetime import datetime, timedelta import xlrd #import uuid from string import Template from xml.sax.saxutils import escape from dateutil.parser import parse as parse_date from scrapy.spider import BaseSpider from scrapy.contrib.loader import ItemLoader from scrapy.http import...
[ 2, 8147, 3894, 2448, 2781, 1446, 38545, 198, 198, 11748, 302, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 11748, 2124, 75, 4372, 198, 2, 11748, 334, 27112, 198, 6738, 4731, 1330, 37350, 198, 6738, 35555, 13, 82, 89...
3.51
200
from bitcoinaddress import Wallet import os from multiprocessing import Process import argparse import sys import signal # Set the signal handler signal.signal(signal.SIGINT, handler) parser = argparse.ArgumentParser() parser.add_argument("-o", "--output", action='store', dest='output', help="Results will wr...
[ 6738, 8550, 21975, 1330, 37249, 201, 198, 11748, 28686, 201, 198, 6738, 18540, 305, 919, 278, 1330, 10854, 201, 198, 11748, 1822, 29572, 201, 198, 11748, 25064, 201, 198, 11748, 6737, 201, 198, 2, 5345, 262, 6737, 21360, 201, 198, 12683...
2.683495
515
import django from django.conf import settings from django.db import transaction from django.contrib.auth import get_user_model django.setup() from billing.models import Account, Payment from billing.utils import complete_payment USER = get_user_model()
[ 11748, 42625, 14208, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 8611, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 198, 198, 28241, 14208, 13, 40406, 34...
3.611111
72
"""Vistas de miembros del círculo""" # Django REST Framework from rest_framework import mixins, viewsets, status from rest_framework.generics import get_object_or_404 from rest_framework.decorators import action from rest_framework.response import Response # Models from cride.circles.models import Circle, Membership,...
[ 37811, 53, 37503, 390, 21504, 24419, 4951, 1619, 269, 8836, 81, 3129, 78, 37811, 198, 198, 2, 37770, 30617, 25161, 198, 6738, 1334, 62, 30604, 1330, 5022, 1040, 11, 5009, 1039, 11, 3722, 198, 6738, 1334, 62, 30604, 13, 8612, 873, 1330...
2.436709
2,686
import json import os from ..util import cast, datetime_to_json class Backend: """ base class for metadir backends. currently only local filesystem backend implemented. """ def get_base_path(self): """return a base path to a local file dir or a cloud bucket""" raise NotImplemente...
[ 11748, 33918, 198, 11748, 28686, 198, 198, 6738, 11485, 22602, 1330, 3350, 11, 4818, 8079, 62, 1462, 62, 17752, 628, 198, 4871, 5157, 437, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 2779, 1398, 329, 1138, 324, 343, 736, 2412, ...
2.638889
720
import math from decimal import Decimal # Used for rotations: # https://stackoverflow.com/questions/34372480/rotate-point-about-another-point-in-degrees-python/34374437#34374437 # Accessed November 17, 2017 class Post: """A post""" def displayString(self): """Return this item as it would be displayed to the use...
[ 11748, 10688, 198, 6738, 32465, 1330, 4280, 4402, 198, 198, 2, 16718, 329, 5724, 602, 25, 198, 2, 3740, 1378, 25558, 2502, 11125, 13, 785, 14, 6138, 507, 14, 2682, 2718, 1731, 1795, 14, 10599, 378, 12, 4122, 12, 10755, 12, 29214, 12...
2.697026
538
#!/usr/bin/env python # -*- coding: utf-8 -*- """ File: source/module/memory_helper.py """ import torch import torch.nn as nn
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 8979, 25, 2723, 14, 21412, 14, 31673, 62, 2978, 525, 13, 9078, 201, 198, 37811, 201, 198, ...
2.209677
62
from datetime import timedelta from .base import * SECRET_KEY = '' DEBUG = True ALLOWED_HOSTS = '*' INSTALLED_APPS += [ 'drf_yasg' ] INTERNAL_IPS = ['127.0.0.1', ] # required for drf_yasg REST_FRAMEWORK['DEFAULT_AUTHENTICATION_CLASSES'] = ['rest_framework.authentication.SessionAuthentication'] + \ ...
[ 6738, 4818, 8079, 1330, 28805, 12514, 198, 198, 6738, 764, 8692, 1330, 1635, 198, 198, 23683, 26087, 62, 20373, 796, 10148, 198, 198, 30531, 796, 6407, 198, 198, 7036, 3913, 1961, 62, 39, 10892, 50, 796, 705, 9, 6, 198, 198, 38604, ...
2.078285
1,073
from django.contrib.auth.forms import UserCreationForm from .models import User from django import forms
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 23914, 1330, 11787, 12443, 341, 8479, 198, 6738, 764, 27530, 1330, 11787, 198, 6738, 42625, 14208, 1330, 5107, 628 ]
3.785714
28
#!/usr/bin/python # # Copyright (c) SAS Institute Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 198, 2, 15069, 357, 66, 8, 35516, 5136, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428...
3.366359
434
import datetime from udaru_anomaly_detection.trail.insert import trail_insert from udaru_anomaly_detection.tests.generator import generate_resource
[ 198, 11748, 4818, 8079, 198, 198, 6738, 334, 67, 11493, 62, 272, 24335, 62, 15255, 3213, 13, 9535, 346, 13, 28463, 1330, 8025, 62, 28463, 198, 6738, 334, 67, 11493, 62, 272, 24335, 62, 15255, 3213, 13, 41989, 13, 8612, 1352, 1330, 7...
3.282609
46
from src import detect_faces, show_bboxes from PIL import Image import os os.environ["CUDA_VISIBLE_DEVICES"] = '1' img_path = '/net/deepfake-defense/datasets/CelebA/img/img_celeba/' pert_path = '/net/deepfake-defense/datasets/CelebA/img/MTCNN_ifgsm/' result_f = open('/home/zhujunxiao/protect_face_identity/face_image_...
[ 6738, 12351, 1330, 4886, 62, 32186, 11, 905, 62, 65, 29305, 198, 6738, 350, 4146, 1330, 7412, 198, 11748, 28686, 220, 198, 198, 418, 13, 268, 2268, 14692, 43633, 5631, 62, 29817, 34563, 62, 39345, 34444, 8973, 796, 705, 16, 6, 198, ...
2.407524
638
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Mar 20 14:08:42 2019 @author: smrak """ import numpy as np from cartomap import geogmap as gm from datetime import datetime import matplotlib.pyplot as plt import cartopy.crs as ccrs import apexpy as ap latlim = [-0,60] lonlim= [-140,0] date = datetim...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 3300, 1526, 1160, 1478, 25, 2919, 25, 3682, 13130, 198, 198, 31, 9800, 25, 895, 17716, 19...
1.874459
2,079
from agent.base_agent import BaseAgent from functional.motion import get_foot_vel import torch
[ 6738, 5797, 13, 8692, 62, 25781, 1330, 7308, 36772, 198, 6738, 10345, 13, 38714, 1330, 651, 62, 5898, 62, 626, 198, 11748, 28034, 628, 198 ]
3.88
25
# This is an example VISAN script for the SCI_NL__1P product # Make sure to set the 'products-file directory' option in the VISAN Preferences panel to # a directory containing SCI_NL__1P products. # This example will then take the first product it finds in this directory and # for that product plot the measured limb ...
[ 2, 770, 318, 281, 1672, 50035, 1565, 4226, 329, 262, 6374, 40, 62, 32572, 834, 16, 47, 1720, 198, 198, 2, 6889, 1654, 284, 900, 262, 705, 29498, 12, 7753, 8619, 6, 3038, 287, 262, 50035, 1565, 49780, 6103, 284, 198, 2, 257, 8619, ...
3.802083
96
from server import server from app1 import app as app1 from app2 import app as app2 app1.enable_dev_tools(debug=True) app2.enable_dev_tools(debug=True)
[ 6738, 4382, 1330, 4382, 198, 6738, 598, 16, 1330, 598, 355, 598, 16, 198, 6738, 598, 17, 1330, 598, 355, 598, 17, 198, 1324, 16, 13, 21633, 62, 7959, 62, 31391, 7, 24442, 28, 17821, 8, 198, 1324, 17, 13, 21633, 62, 7959, 62, 313...
2.961538
52
# Copyright (c) 2019-2021, Felix Fontein <felix@fontein.de> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type import fcntl import os import os.path import socket as pysocket from ansibl...
[ 2, 15069, 357, 66, 8, 13130, 12, 1238, 2481, 11, 29721, 376, 261, 22006, 1279, 69, 417, 844, 31, 69, 261, 22006, 13, 2934, 29, 198, 2, 22961, 3611, 5094, 13789, 410, 18, 13, 15, 10, 357, 3826, 27975, 45761, 393, 3740, 1378, 2503, ...
2.787402
127
#!/usr/bin/env conda-execute # conda execute # env: # - python # - click # - jinja2 # - requests # - ruamel.yaml # - conda-smithy # - pygithub # - fuzzywuzzy # channels: # - conda-forge # run_with: python import click import conda_smithy.feedstocks as feedstocks import jinja2 import json import requests impo...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 1779, 64, 12, 41049, 198, 198, 2, 1779, 64, 12260, 198, 2, 17365, 25, 198, 2, 220, 532, 21015, 198, 2, 220, 532, 3904, 198, 2, 220, 532, 474, 259, 6592, 17, 198, 2, 220, 532, 7007, 198, 2,...
2.581545
1,864
from flask import Blueprint, render_template, session, redirect, url_for from flask_wtf import FlaskForm from wtforms import SelectField from application.mod_collage.photoManip import generateCollage from application.mod_auth.models import Landmark mod_collage = Blueprint('collage', __name__, url_prefix='/collage') ...
[ 6738, 42903, 1330, 39932, 11, 8543, 62, 28243, 11, 6246, 11, 18941, 11, 19016, 62, 1640, 198, 6738, 42903, 62, 86, 27110, 1330, 46947, 8479, 198, 6738, 266, 83, 23914, 1330, 9683, 15878, 198, 198, 6738, 3586, 13, 4666, 62, 26000, 496,...
3.415254
118
# Generated by Django 3.1.6 on 2021-02-05 12:46 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 21, 319, 33448, 12, 2999, 12, 2713, 1105, 25, 3510, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, ...
2.818182
44
#!/usr/bin/env python3 from lightning import Plugin import json import psutil import subprocess import threading import time import os try: # C-lightning v0.7.2 plugin = Plugin(dynamic=False) except: plugin = Plugin() @plugin.init() def inject_manifest(plugin, manifest): """Once we have the manife...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 6738, 14357, 1330, 42636, 198, 11748, 33918, 198, 11748, 26692, 22602, 198, 11748, 850, 14681, 198, 11748, 4704, 278, 198, 11748, 640, 198, 11748, 28686, 198, 198, 28311, 25, 198, 22...
3.008929
672
from PyQt4 import QtCore, QtGui import maya.cmds as cmds import maya.OpenMayaUI as mui import sip try: dialog.deleteLater() except: pass dialog = show()
[ 6738, 9485, 48, 83, 19, 1330, 33734, 14055, 11, 33734, 8205, 72, 198, 198, 11748, 743, 64, 13, 28758, 82, 355, 23991, 82, 198, 11748, 743, 64, 13, 11505, 6747, 64, 10080, 355, 285, 9019, 198, 198, 11748, 31145, 628, 220, 220, 220, ...
2.076087
92
import pytest from fitbert import FitBert from fitbert.delemmatize import Delemmatizer dl = Delemmatizer() """ def test_masker_works_without_instantiating(): masked_string, masked = FitBert.mask( "This might be justified to signalling the connection between drunken driving and fatal accidents.", ...
[ 11748, 12972, 9288, 198, 6738, 4197, 4835, 1330, 25048, 33, 861, 198, 6738, 4197, 4835, 13, 2934, 293, 3020, 265, 1096, 1330, 42226, 3020, 265, 7509, 198, 198, 25404, 796, 42226, 3020, 265, 7509, 3419, 628, 628, 628, 198, 37811, 198, ...
3.052632
171
from django.utils import timezone from orders.models import Order class OrderIsPaidSetter: """Mark order as paid"""
[ 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 198, 198, 6738, 6266, 13, 27530, 1330, 8284, 628, 198, 4871, 8284, 3792, 47, 1698, 7248, 353, 25, 198, 220, 220, 220, 37227, 9704, 1502, 355, 3432, 37811, 198 ]
3.324324
37
"""Nested Stack for the sample IAM Role creation for Managing SWIFT components""" from typing import List from aws_cdk import ( aws_rds as _rds, aws_iam as _iam ) from constructs import Construct from aws_cdk import NestedStack class SwiftIAMRole(NestedStack): """Nested Stack for the sample IAM Role creat...
[ 37811, 45, 7287, 23881, 329, 262, 6291, 314, 2390, 20934, 6282, 329, 37108, 12672, 32297, 6805, 37811, 198, 6738, 19720, 1330, 7343, 198, 198, 6738, 3253, 82, 62, 10210, 74, 1330, 357, 198, 220, 220, 220, 3253, 82, 62, 4372, 82, 355, ...
2.072076
2,095
import argparse import csv from os.path import join from pathlib import Path from tqdm import tqdm import torch import torchaudio import numpy as np from librosa import resample if __name__ == "__main__": main()
[ 11748, 1822, 29572, 198, 11748, 269, 21370, 198, 6738, 28686, 13, 6978, 1330, 4654, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 198, 11748, 28034, 198, 11748, 28034, 24051, 198, 11748, 299, ...
3.112676
71
#!/usr/bin/env python import os from PIL import Image import glob, os from tqdm import tqdm import six #import cv2 import pandas as pd from keras_segmentation.data_utils.data_loader import get_image_array, get_segmentation_array import numpy as np import re import json from pandas.io.json import json_normalize impor...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 28686, 198, 198, 6738, 350, 4146, 1330, 7412, 220, 198, 11748, 15095, 11, 28686, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 11748, 2237, 198, 2, 11748, 269, 85, 17, ...
3.025641
117
from enum import Enum, auto from new_movies import movies_directory weekly_schedule = { Weekday.MONDAY: movies_directory.available_movies[0:2], Weekday.TUESDAY: movies_directory.available_movies[2:4], Weekday.WEDNESDAY: movies_directory.available_movies[4:6], Weekday.THURSDAY: movies_directory.avail...
[ 6738, 33829, 1330, 2039, 388, 11, 8295, 198, 198, 6738, 649, 62, 76, 20526, 1330, 6918, 62, 34945, 628, 198, 198, 45291, 62, 15952, 5950, 796, 1391, 198, 220, 220, 220, 6119, 820, 13, 44, 18672, 4792, 25, 6918, 62, 34945, 13, 15182,...
2.626866
201
#!/usr/bin/env python # -*- coding: utf-8 -*- ########################################################### # WARNING: Generated code! # # ************************** # # Manual changes may get lost if file is generated again. # # Only code inside the [MANUAL] ta...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 29113, 14468, 7804, 21017, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 39410, 25, ...
2.911688
385
import sys import transaction from zope.component.hooks import setSite PKGNAME = 'uu.formlibrary' PROFILE = 'profile-%s:default' % PKGNAME _installed = lambda site: site.portal_quickinstaller.isProductInstalled product_installed = lambda site, name: _installed(site)(name) if __name__ == '__main__' and 'app' i...
[ 11748, 25064, 198, 198, 11748, 8611, 198, 6738, 1976, 3008, 13, 42895, 13, 25480, 82, 1330, 900, 29123, 198, 198, 40492, 16630, 10067, 796, 705, 12303, 13, 687, 32016, 6, 198, 31190, 25664, 796, 705, 13317, 12, 4, 82, 25, 12286, 6, ...
2.717277
191
#!/usr/bin/env python # # This script helps at the generation or correction of groundtruths. # # Usage: python missing_incorrect_files.py <pickle_filename> # where <pickle_filename> has been generated by '0_check_data.py'. # e.g. python missing_incorrect_files.py 201809192209_incorrect_lesion.pkl # # Charley Gros 20...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 770, 4226, 5419, 379, 262, 5270, 393, 17137, 286, 2323, 35310, 82, 13, 198, 2, 198, 2, 29566, 25, 21015, 4814, 62, 1939, 47315, 62, 16624, 13, 9078, 1279, 27729, 293, 62...
2.455319
470
from rouge import Rouge import csv """Creates a csv file with rouge scores between summaries in a cluster""" CLUSTERS = { 'sandy':[ "After Sandy hit the East Coast Monday night, more than 2 million New Jersey residents were left without power and feeling powerless", "Superstorm Sandy crashed ashore this week, cuttin...
[ 6738, 13805, 469, 1330, 27478, 198, 11748, 269, 21370, 198, 198, 37811, 16719, 274, 257, 269, 21370, 2393, 351, 13805, 469, 8198, 1022, 30114, 3166, 287, 257, 13946, 37811, 628, 198, 5097, 7759, 4877, 796, 1391, 198, 338, 10757, 10354, ...
4.613006
1,261
import dearpygui._dearpygui as internal_dpg import dearpygui.dearpygui as dpg # 0.6 functions # * add_column # * delete_column # * set_table_data # * get_table_data # * get_table_item # * set_table_item # * get_table_selections # * set_table_selections # * insert_column # * insert_row # * set_hea...
[ 11748, 390, 5117, 88, 48317, 13557, 67, 451, 9078, 48317, 355, 5387, 62, 67, 6024, 198, 11748, 390, 5117, 88, 48317, 13, 67, 451, 9078, 48317, 355, 288, 6024, 198, 198, 2, 657, 13, 21, 5499, 198, 2, 220, 220, 1635, 751, 62, 28665,...
2.345324
139
""" Experiment using all GALAH data. """ from __future__ import division # Just in case. Use Python 3. import os import sys import pickle import numpy as np import matplotlib import matplotlib.pyplot as plt import yaml from matplotlib.ticker import MaxNLocator from collections import Counter from scipy import linalg...
[ 198, 37811, 198, 20468, 3681, 1262, 477, 402, 1847, 18429, 1366, 13, 198, 37811, 198, 198, 6738, 11593, 37443, 834, 1330, 7297, 1303, 2329, 287, 1339, 13, 5765, 11361, 513, 13, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 2298...
2.015957
5,828
from feeds.tests.test_latest import *
[ 6738, 21318, 13, 41989, 13, 9288, 62, 42861, 1330, 1635, 198 ]
3.454545
11
# Sample TCP Server '''from server import server server_name = 'server' domain = '192.168.1.218' protocol = 'TCP' port = '5060' server_network_name = 'SERVER' content_type = 'application' content_sub_type = 'sdp' server_ = server(server_name, domain, protocol, port, server_network_name, content_type...
[ 2, 27565, 23633, 9652, 198, 7061, 6, 6738, 4382, 1330, 4382, 628, 198, 15388, 62, 3672, 796, 705, 15388, 6, 198, 27830, 796, 705, 17477, 13, 14656, 13, 16, 13, 28727, 6, 198, 11235, 4668, 796, 705, 4825, 47, 6, 198, 634, 796, 705,...
2.81153
451
import unittest import random from Analysis.ResAnalyser import PDF_Parser # Pro tip - Am a noob at Testing :| class ParserTests(unittest.TestCase): """ All tests for PDFParser class & all it's methods go here """ if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 11748, 4738, 198, 6738, 14691, 13, 4965, 2025, 26266, 263, 1330, 12960, 62, 46677, 198, 198, 2, 1041, 8171, 532, 1703, 257, 645, 672, 379, 23983, 1058, 91, 198, 198, 4871, 23042, 263, 51, 3558, 7, 403, 715...
2.777778
99
# -*- coding: utf-8 -*- # Copyright (c) 2020, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import unittest import pytest pytest.importorskip("tensorflow", minversion=...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 220, 15069, 357, 66, 8, 12131, 11, 4196, 3457, 13, 1439, 2489, 10395, 13, 198, 2, 198, 2, 220, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, ...
2.963964
222
# Tarsnap - tarsnap website interface import datetime from pathlib import Path import requests from bs4 import BeautifulSoup, element URL = "https://www.tarsnap.com"
[ 2, 309, 945, 77, 499, 532, 256, 945, 77, 499, 3052, 7071, 198, 198, 11748, 4818, 8079, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 7007, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 11, 5002, 198, 198, 21886, 796, 366, ...
3.090909
55
#Kunal Gautam #Codewars : @Kunalpod #Problem name: Simple Fun #204: Smallest Integer #Problem level: 7 kyu from itertools import groupby, chain
[ 2, 42, 18835, 402, 2306, 321, 198, 2, 43806, 413, 945, 1058, 2488, 42, 18835, 33320, 198, 2, 40781, 1438, 25, 17427, 11138, 1303, 18638, 25, 10452, 395, 34142, 198, 2, 40781, 1241, 25, 767, 479, 24767, 198, 198, 6738, 340, 861, 1014...
2.959184
49
from .devicelist import ( ChannelList, ChannelInfo, DeviceTokenList, APIDList, DeviceInfo, ) from .tag import ( ChannelTags, OpenChannelTags ) from .segment import ( Segment, SegmentList ) from .channel_uninstall import ( ChannelUninstall ) from .open_channel import ( Ope...
[ 6738, 764, 7959, 291, 46331, 1330, 357, 198, 220, 220, 220, 11102, 8053, 11, 198, 220, 220, 220, 11102, 12360, 11, 198, 220, 220, 220, 16232, 30642, 8053, 11, 198, 220, 220, 220, 3486, 2389, 8053, 11, 198, 220, 220, 220, 16232, 1236...
2.502058
243
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import torch from torch import nn from typing import List, Union, Dict from ..builder import NECKS from ..utils import build_stack_conv_layers, random_init_weights @NECKS.register_module
[ 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 198, 198, 11748, 28034, 198, 6738, 28034, 1330, 299, 77, 198, 6738, 19720, 1330, 7343, 11, 4479, 11, 360, 713, 198, 198, 6738, ...
3.607595
79
''' --------------------------- runserver.py --------------------------- Created on 24.04.2015 Last modified on 12.01.2016 Author: Marc Wieland Description: Starts the application using a local flask server (NOT RECOMMENDED: use wsgi implementation instead see README.md) ---- ''' from webapp import app, db, models ...
[ 7061, 6, 198, 22369, 6329, 198, 220, 220, 220, 1057, 15388, 13, 9078, 198, 22369, 6329, 198, 41972, 319, 1987, 13, 3023, 13, 4626, 198, 5956, 9518, 319, 1105, 13, 486, 13, 5304, 198, 13838, 25, 13067, 370, 8207, 392, 198, 11828, 25,...
3.417178
163
# @file setup.py # This contains setup info for mu_environment pip module # ## # Copyright (c) 2018, Microsoft Corporation # # 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. Redistribut...
[ 2, 2488, 7753, 9058, 13, 9078, 201, 198, 2, 770, 4909, 9058, 7508, 329, 38779, 62, 38986, 7347, 8265, 201, 198, 2, 201, 198, 2235, 201, 198, 2, 15069, 357, 66, 8, 2864, 11, 5413, 10501, 201, 198, 2, 201, 198, 2, 1439, 2489, 1039...
2.879808
1,040
# Copyright 2020 The TensorFlow Probability Authors. # # 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 o...
[ 2, 15069, 12131, 383, 309, 22854, 37535, 30873, 1799, 46665, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262,...
2.59136
1,412
"""Setup file """ import setuptools import compphys with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup(name='compphys', version=compphys.__version__, description='compphys', long_description=long_description, long_...
[ 37811, 40786, 2393, 198, 37811, 198, 198, 11748, 900, 37623, 10141, 198, 198, 11748, 401, 381, 71, 893, 198, 198, 4480, 1280, 7203, 15675, 11682, 13, 9132, 1600, 366, 81, 4943, 355, 277, 71, 25, 198, 220, 220, 220, 890, 62, 11213, 7...
1.678238
749
"""Functions to convert objects to a type"""
[ 37811, 24629, 2733, 284, 10385, 5563, 284, 257, 2099, 37811, 198 ]
4.090909
11
import os from typing import List, Optional import multiprocessing as mp from fastapi import FastAPI, BackgroundTasks from Blocktrace.Networks import Wax from Blocktrace.Streaming import stream_writer, publish_messages app = FastAPI() API_KEY = os.getenv("BT__API_KEY") or "" GCP_PROJECT_ID = os.getenv("BT__GCP_PROJ...
[ 11748, 28686, 198, 6738, 19720, 1330, 7343, 11, 32233, 198, 11748, 18540, 305, 919, 278, 355, 29034, 198, 198, 6738, 3049, 15042, 1330, 12549, 17614, 11, 25353, 51, 6791, 198, 198, 6738, 9726, 40546, 13, 7934, 5225, 1330, 42656, 198, 67...
2.435685
241
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Title ''' __author__ = 'Hiroshi Kajino <KAJINO@jp.ibm.com>' __copyright__ = 'Copyright IBM Corp. 2020, 2021' import math import torch from ..data import (EventSeq, MultivariateEventSeq, append_hidden) from ..utils import complet...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 7061, 6, 11851, 705, 7061, 198, 198, 834, 9800, 834, 796, 705, 39, 7058, 44019, 509, 1228, 2879, 1279, 25123, 41, 460...
2.42623
183
import argparse import subprocess import os import re if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("url", help="Specify youtube url to download audio from.") parser.add_argument("--out", default="out", metavar="<FILENAME>", help="Specify name of output file.") parse...
[ 11748, 1822, 29572, 198, 11748, 850, 14681, 198, 11748, 28686, 198, 11748, 302, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 30751, 796, 1822, 29572, 13, 28100, 1713, 46677, 3419, 198, 220, 220,...
3.226804
194
import os, sys import run_tests from libtbx import easy_run import libtbx.load_env qrefine_path = libtbx.env.find_in_repositories("qrefine") pdb_lines = ''' CRYST1 72.470 66.336 68.552 90.00 90.00 90.00 P 1 ATOM 387 N HIS A 30 62.619 25.986 37.359 1.00 66.84 N ATOM 388 CA HIS A ...
[ 11748, 28686, 11, 25064, 198, 11748, 1057, 62, 41989, 198, 6738, 9195, 83, 65, 87, 1330, 2562, 62, 5143, 198, 11748, 9195, 83, 65, 87, 13, 2220, 62, 24330, 198, 198, 80, 5420, 500, 62, 6978, 796, 9195, 83, 65, 87, 13, 24330, 13, ...
1.708571
1,050
from HashFunctions import HashFunctions # def __getitem__(self, data): # pos = self.hashFunction(data) % self.maxSize if __name__ == "__main__": h = ChainingHashing() h.insert(1, 'a') h.insert(2, 'b') h.insert(3, 'c') h.insert(3, 'd') print(h[3])
[ 6738, 21059, 24629, 2733, 1330, 21059, 24629, 2733, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220, 220, 1303, 825, 11593, 1136, 9186, 834, 7, 944, 11, 1366, 2599, 198, 220, 220, 220, 1303, 220, 220, ...
1.944444
162
import warnings import sys def bits(v, numbits=None): """ Display the bits used to store an object :param v: the value to display the bits of :param numbits: the number of bits to display. Only used for int objects. bytes objects always show the exact bits stored, and int objects d...
[ 11748, 14601, 198, 11748, 25064, 628, 198, 4299, 10340, 7, 85, 11, 997, 9895, 28, 14202, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 16531, 262, 10340, 973, 284, 3650, 281, 2134, 198, 220, 220, 220, 1058, 17143, 410, 25, 26...
2.500522
2,871
import csv import matplotlib.pyplot as plt with open('idsfinal.csv',mode='r') as csv_file: csv_reader=csv.DictReader(csv_file) mydata=[] for row in csv_reader: mydata.append(float(row["pot"])) plt.boxplot(mydata) plt.ylabel("Potassium") plt.title("Potassium distribution") plt.show()
[ 11748, 269, 21370, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 628, 198, 4480, 1280, 10786, 2340, 20311, 13, 40664, 3256, 14171, 11639, 81, 11537, 355, 269, 21370, 62, 7753, 25, 198, 269, 21370, 62, 46862, 28, 40664, ...
2.487395
119
#!/usr/bin/env python """ Detect events or relations from text. """ from train import workdir, getDetector, getSteps import sys, os import tempfile import codecs import Utils.Settings as Settings import Utils.Stream as Stream import Utils.Download from Utils.Connection.Connection import getConnection import Utils.Down...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 198, 47504, 2995, 393, 2316, 422, 2420, 13, 198, 37811, 198, 6738, 4512, 1330, 670, 15908, 11, 651, 11242, 9250, 11, 651, 8600, 82, 198, 11748, 25064, 11, 28686, 198, 11748...
2.918018
2,281
import pytest from tennis_probability import set, InvalidInput, InvalidProbability, NegativeNumber
[ 11748, 12972, 9288, 198, 6738, 20790, 62, 1676, 65, 1799, 1330, 900, 11, 17665, 20560, 11, 17665, 2964, 65, 1799, 11, 36183, 15057, 628 ]
4.166667
24
# # Copyright (c) 2020 BlackBerry Limited. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
[ 2, 198, 2, 220, 220, 15069, 357, 66, 8, 12131, 30845, 15302, 13, 220, 1439, 6923, 33876, 13, 198, 2, 198, 2, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 220, 345, 7...
2.238433
9,877
#!/usr/bin/env python """ @package ion.services.sa.observatory.test.test_platform_instrument @file ion/services/sa/observatory/test/test_platform_instrument.py @author Carlos Rueda, Maurice Manning @brief Tests involving some more detailed platform-instrument interations """ __author__ = 'Carlos Rueda, Maurice ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 198, 31, 26495, 22088, 13, 30416, 13, 11400, 13, 672, 3168, 2870, 13, 9288, 13, 9288, 62, 24254, 62, 259, 43872, 198, 31, 7753, 220, 220, 220, 22088, 14, 30416, 14, 11400...
3.585987
471
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 49962, 284, 1012, 280, 1082, 64, 11, 3457, 13, 739, 530, 198, 2, 393, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 2, 9387, 351, 428, 670, 329, 3224, 1321, 198...
3.840336
238
#!/usr/bin/env python # coding: utf-8 ''' * Author : Hutter Valentin * Date : 13.05.2019 * Description : Hector agent monitoring * Help : - https://psutil.readthedocs.io/en/latest/#processes - https://psutil.readthedocs.io/en/latest/#psutil.process_iter - https://psutil.readthedocs.io/en/latest/#unic...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 7061, 6, 198, 1635, 6434, 1058, 367, 10381, 17284, 259, 198, 1635, 7536, 1058, 1511, 13, 2713, 13, 23344, 198, 1635, 12489, 1058, 42621, 579...
2.70625
160
""" Constants used across all files """ # The constants in this file must be defined and checked by the user of the template import numpy as np from typing import Dict, List, Optional from copy import deepcopy from datetime import date seed = 0 true_params = {"b0": 6, "b1": 1.3, "scale": 50} n = 300 x_min = -5...
[ 37811, 198, 220, 220, 220, 4757, 1187, 973, 1973, 477, 3696, 198, 37811, 198, 198, 2, 383, 38491, 287, 428, 2393, 1276, 307, 5447, 290, 10667, 416, 262, 2836, 286, 262, 11055, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, ...
2.681159
207
""" Class containing the dictionary for the Yeelight protocol """ # COMMAND message {id_pair, method_pair, params_pair} # id_pair is "id":<number> # method_pair is "method":"<method>" # params_pair is "params":["<param1>","<param2>", <numeric_param3>] # <param1> is "property":<property_value> ...
[ 37811, 198, 220, 220, 220, 5016, 7268, 262, 22155, 329, 262, 11609, 49984, 8435, 198, 37811, 198, 198, 2, 22240, 6981, 3275, 1391, 312, 62, 24874, 11, 2446, 62, 24874, 11, 42287, 62, 24874, 92, 198, 2, 4686, 62, 24874, 318, 220, 220...
2.676301
173
# Rope Burning Riddler from fivethirtyeight.com # Main program # Numbers of ropes to do MinRopes = 1 MaxRopes = 6 for N in range(MinRopes,MaxRopes+1): # ropes is a list of pairs. each pair is: [ends-lit # (0, 1, or 2), time (has been or will be) extinguished]. # We start with extinction time 0 as a dummy value. ...
[ 2, 371, 3008, 21460, 371, 26458, 422, 1936, 400, 5893, 26022, 13, 785, 198, 198, 2, 8774, 1430, 198, 198, 2, 27797, 286, 31001, 284, 466, 198, 9452, 49, 13920, 796, 352, 198, 11518, 49, 13920, 796, 718, 198, 198, 1640, 399, 287, 2...
2.919118
272
import os import pandas as pd from sklearn import ensemble from sklearn import preprocessing from sklearn import metrics import joblib import numpy as np import time from . import dispatcher TEST_DATA = os.environ.get("TEST_DATA") MODEL = os.environ.get("MODEL") PATH = os.environ.get("MODEL_PATH") NUM_FOLDS = int(os...
[ 11748, 28686, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 1341, 35720, 1330, 34549, 198, 6738, 1341, 35720, 1330, 662, 36948, 198, 6738, 1341, 35720, 1330, 20731, 198, 11748, 1693, 8019, 198, 11748, 299, 32152, 355, 45941, 198, 11748...
2.561151
278
#!/usr/bin/env python import rospy import tf import roslib import random import math import copy as copy_module from tf.transformations import euler_from_quaternion, quaternion_from_euler from nav_msgs.msg import Odometry from geometry_msgs.msg import Point, Pose, Quaternion, Twist, Vector3 from ackermann_msgs.msg i...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 686, 2777, 88, 198, 11748, 48700, 198, 11748, 686, 6649, 571, 198, 11748, 4738, 220, 198, 11748, 10688, 198, 11748, 4866, 355, 4866, 62, 21412, 198, 6738, 48700, 13, 35636, ...
2.993711
159
import contextlib import os import signal import subprocess import time from distutils.spawn import find_executable import cudf import pytest from cudf.tests.utils import assert_eq import nvtabular as nvt import nvtabular.ops as ops triton = pytest.importorskip("nvtabular.inference.triton") grpcclient = pytest.impor...
[ 11748, 4732, 8019, 198, 11748, 28686, 198, 11748, 6737, 198, 11748, 850, 14681, 198, 11748, 640, 198, 6738, 1233, 26791, 13, 48183, 1330, 1064, 62, 18558, 18187, 198, 198, 11748, 269, 463, 69, 198, 11748, 12972, 9288, 198, 6738, 269, 46...
2.842342
222
# -*- coding: utf-8 -*- ''' The networking module for Debian based distros References: * http://www.debian.org/doc/manuals/debian-reference/ch05.en.html ''' # Import python libs from __future__ import absolute_import import functools import logging import os.path import os import re import time # Import third party...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 7061, 6, 198, 464, 19140, 8265, 329, 26062, 1912, 1233, 4951, 198, 198, 19927, 25, 198, 198, 9, 2638, 1378, 2503, 13, 24689, 13, 2398, 14, 15390, 14, 805, 723, 82, 1...
2.112762
32,440
import numpy as np import simtk.openmm as openmm import simtk.unit as units from openmmtools import testsystems from pymbar import timeseries from functools import partial from openmmmcmc.mcmc import HMCMove, GHMCMove, LangevinDynamicsMove, MonteCarloBarostatMove import logging # Test various combinations of syste...
[ 11748, 299, 32152, 355, 45941, 198, 198, 11748, 985, 30488, 13, 9654, 3020, 355, 1280, 3020, 198, 11748, 985, 30488, 13, 20850, 355, 4991, 198, 198, 6738, 1280, 3020, 31391, 1330, 1332, 10057, 82, 198, 198, 6738, 12972, 2022, 283, 1330,...
2.812877
497
from time import sleep #Aula N°13 print("Aula N°13 \n") sleep(0.2) s = 0 for c in range(1, 4): n = int(input('Escolha um numero: ')) s = s + n print(s)
[ 6738, 640, 1330, 3993, 198, 198, 2, 32, 4712, 399, 7200, 1485, 198, 198, 4798, 7203, 32, 4712, 399, 7200, 1485, 3467, 77, 4943, 198, 42832, 7, 15, 13, 17, 8, 198, 198, 82, 796, 657, 198, 198, 1640, 269, 287, 2837, 7, 16, 11, 6...
2.0375
80
''' Author : MiKueen Level : Easy Problem Statement : Two Sum II - Input array is sorted Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two numbers such that they add up to the ta...
[ 7061, 6, 198, 13838, 1058, 13756, 42, 518, 268, 198, 4971, 1058, 16789, 198, 40781, 21983, 1058, 4930, 5060, 2873, 532, 23412, 7177, 318, 23243, 198, 198, 15056, 281, 7177, 286, 37014, 326, 318, 1541, 23243, 287, 41988, 1502, 11, 1064, ...
3.463054
203
# -*- coding: utf-8 -*- from __future__ import with_statement import warnings from almost import Approximate from pytest import deprecated_call, raises from conftest import various_backends import trueskill as t from trueskill import ( quality, quality_1vs1, rate, rate_1vs1, Rating, setup, TrueSkill) warnings....
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 351, 62, 26090, 198, 198, 11748, 14601, 198, 198, 6738, 2048, 1330, 2034, 13907, 1920, 198, 6738, 12972, 9288, 1330, 39224, 62, 13345, 11, ...
2.357864
2,378
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, 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 cop...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 2864, 383, 3012, 9552, 15417, 4816, 46665, 290, 383, 12905, 2667, 32388, 3457, 13, 1074, 13, 198, 2, 15069, 357, 66, 8, 2864, 11, 15127, 23929, 44680, 6234, 13, 220, 1439, 2489, 10395, 13,...
2.180834
5,541
# -*- coding: utf-8 -*- # Generated by Django 1.11.14 on 2018-08-01 17:43 from django.conf import settings import django.core.validators 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, 1415, 319, 2864, 12, 2919, 12, 486, 1596, 25, 3559, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 11748, 42625, 142...
2.864865
74
# IPython log file from tqdm import tqdm import dask.array as da import zarr import itertools from skimage.transform import downscale_local_mean lls = da.from_zarr('data/gokul-lls/aollsm-m4-560nm.zarr') lls3 = zarr.open('data/gokul-lls/aollsm-m4-560nm-downscale.zarr', dtype=np.float32, shape=(199, 201, 192, 256), chu...
[ 2, 6101, 7535, 2604, 2393, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 11748, 288, 2093, 13, 18747, 355, 12379, 198, 11748, 1976, 3258, 198, 11748, 340, 861, 10141, 198, 6738, 1341, 9060, 13, 35636, 1330, 866, 9888, 62, 1200...
2.35545
211
import pygame,sys from pygame.locals import * pygame.init() FPS = 10 frametime = 1000/FPS fpsClock = pygame.time.Clock () DISPLAYSURF = pygame.display.set_mode((700,500),pygame.DOUBLEBUF, 32) DISPLAYSURF = pygame.display.set_caption ('Snakes!') snakeImg = pygame.image.load ('snake.png') WHITE = (255,255,255) snakeht...
[ 11748, 12972, 6057, 11, 17597, 198, 6738, 12972, 6057, 13, 17946, 874, 1330, 1635, 198, 198, 9078, 6057, 13, 15003, 3419, 198, 198, 37, 3705, 796, 838, 198, 19298, 8079, 796, 8576, 14, 37, 3705, 198, 29647, 44758, 796, 12972, 6057, 13...
2.144124
451
# Start of panic.py. # End of panic.py.
[ 2, 7253, 286, 13619, 13, 9078, 13, 198, 198, 2, 5268, 286, 13619, 13, 9078, 13, 198 ]
2.411765
17
# # (C) Copyright 2013 Enthought, Inc., Austin, TX # All right reserved. # # This file is open source software distributed according to the terms in # LICENSE.txt # from __future__ import absolute_import # Enthought library imports from traits.api import Any # Local imports from .data_context import DataContext cla...
[ 2, 198, 2, 357, 34, 8, 15069, 2211, 2039, 28895, 11, 3457, 1539, 9533, 11, 15326, 198, 2, 1439, 826, 10395, 13, 198, 2, 198, 2, 770, 2393, 318, 1280, 2723, 3788, 9387, 1864, 284, 262, 2846, 287, 198, 2, 38559, 24290, 13, 14116, ...
3.729483
329
from setuptools import setup, find_packages setup( name='quiver_engine', version="0.1.4.1.4", author="Jake Bian", author_email="jake@keplr.io", description=("Interactive per-layer visualization for convents in keras"), license='mit', packages=find_packages(), include_package_data=True, ...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 421, 1428, 62, 18392, 3256, 198, 220, 220, 220, 2196, 2625, 15, 13, 16, 13, 19, 13, 16, 13, 19, 1600, 198, 220, 220, ...
2.230189
265
# coding: utf-8 """ Speech Services API v2.0 Speech Services API v2.0. # noqa: E501 OpenAPI spec version: v2.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import swagger_client from swagger_client.api.voice_endp...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 37811, 198, 220, 220, 220, 24709, 6168, 7824, 410, 17, 13, 15, 628, 220, 220, 220, 24709, 6168, 7824, 410, 17, 13, 15, 13, 220, 1303, 645, 20402, 25, 412, 33548, 628, 220, 220, 220, 4946...
2.514663
682
"""Infoset utilities package. This package's modules which perform important tasks within the project but are either not specific enough or not large enough to warrant their own package """
[ 37811, 18943, 418, 316, 20081, 5301, 13, 198, 198, 1212, 5301, 338, 13103, 543, 1620, 1593, 8861, 1626, 198, 1169, 1628, 475, 389, 2035, 407, 2176, 1576, 393, 407, 1588, 198, 48229, 284, 8084, 511, 898, 5301, 198, 198, 37811, 198 ]
4.682927
41
""" *Lower-East Capital 4* ⠨ The lower-east capital four gi. """ from dataclasses import dataclass from ....._gi import Gi from ....capital import CapitalGi from ...._gi import StrismicGi from ....east import EasternGi from ...._number import FourGi from ..._gi import LowerGi __all__ = ["LowerEastCapital4...
[ 37811, 628, 220, 220, 220, 1635, 31426, 12, 25234, 9747, 604, 9, 220, 220, 2343, 254, 101, 628, 220, 383, 2793, 12, 23316, 3139, 1440, 308, 72, 13, 198, 198, 37811, 198, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 198,...
3.082569
109
import cv2 import numpy as np
[ 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941 ]
2.9
10
from openvino.inference_engine import IECore, IENetwork import ngraph as ng from ngraph.impl.op import Parameter from ngraph.impl import Function, Shape, Type
[ 6738, 1280, 85, 2879, 13, 259, 4288, 62, 18392, 1330, 314, 2943, 382, 11, 314, 1677, 316, 1818, 198, 198, 11748, 23370, 1470, 355, 23370, 198, 6738, 23370, 1470, 13, 23928, 13, 404, 1330, 25139, 2357, 198, 6738, 23370, 1470, 13, 23928...
3.285714
49
"""Provide tools for creating parametirc aircraft geometry.""" import numpy as np import matplotlib.pyplot as plt import openvsp as vsp def naca_4_series(max_camber, max_camber_loc, max_tc, n_points, plot_switch=False): """Plot NACA 4-Series airfoil with the given characteristics.""" airfoi...
[ 37811, 15946, 485, 4899, 329, 4441, 5772, 316, 1980, 6215, 22939, 526, 15931, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 1280, 85, 2777, 355, 410, 2777, 628, 198, ...
1.871007
1,628
import cv2 import yaml import numpy as np def centroidFeetFromFile(fileName="/home/davide/Documenti/progetti/playground/centroid-to-feet-interpolation/101_640x480.yaml", normalization=False): ''' funzione che carica e restituisce le coordinate di centroide e piedi nel formato [[x y]] ''' with open(file...
[ 11748, 269, 85, 17, 198, 11748, 331, 43695, 198, 11748, 299, 32152, 355, 45941, 198, 198, 4299, 1247, 3882, 14304, 316, 4863, 8979, 7, 7753, 5376, 35922, 11195, 14, 67, 615, 485, 14, 24941, 72, 14, 1676, 1136, 20259, 14, 1759, 2833, ...
2.074856
521
import sys import numpy as np import random import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F from torch.distributions import Categorical from Tetris.src.tetris import Tetris from PIL import Image from time import sleep from pathlib import Path import cv2 # height, w...
[ 11748, 25064, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 4738, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 40085, 355, 6436, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 673...
2.779037
353