content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
""" class Event: def __init__( self, relative_match_position, sample, incomming_data, correlation, percentage): self.data = { "relative_match_position": relative_match_position, "sample": sample, "incoming_data": incomming_data, "corre...
[ 37811, 198, 4871, 8558, 25, 628, 220, 220, 220, 825, 11593, 15003, 834, 7, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 11, 3585, 62, 15699, 62, 9150, 11, 6291, 11, 198, 220, 220, 220, 220, 220, 220, 220, 22...
2.264264
333
""" User Entity Module """ # Standard Library import datetime # Third Party Library from django.utils import timezone from django.contrib.auth.models import User from django.db.models.aggregates import Count from django.contrib.auth.hashers import make_password
[ 37811, 198, 12982, 20885, 19937, 198, 37811, 198, 198, 2, 8997, 10074, 198, 11748, 4818, 8079, 198, 198, 2, 10467, 3615, 10074, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13,...
3.533333
75
import datetime import os from io import BytesIO import boto3 from botocore.exceptions import ClientError _S3_ACCESS_KEY = os.environ["AWSAccessKeyId"].replace("\r", "") _S3_SECRET_KEY = os.environ["AWSSecretKey"].replace("\r", "") _S3_BUCKET_NAME = "coronavirus-calculator-data" DATESTRING_FORMAT_READABLE = "%A %d %...
[ 11748, 4818, 8079, 198, 11748, 28686, 198, 6738, 33245, 1330, 2750, 4879, 9399, 198, 198, 11748, 275, 2069, 18, 198, 6738, 10214, 420, 382, 13, 1069, 11755, 1330, 20985, 12331, 198, 198, 62, 50, 18, 62, 26861, 7597, 62, 20373, 796, 28...
2.478343
531
#!/usr/bin/env python # coding: utf-8 # In[12]: import tensorflow as tf import numpy as np import keras import pandas as pd import os import matplotlib.pyplot as plt dropout_rate = 0.4 # In[2]: # In[3]: #image = tf.placeholder(tf.float32 , [batch_size,224,224,3]) #x = image_layer(image) #print(x.shape) # I...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 554, 58, 1065, 5974, 628, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 41927, 292, 198, 117...
2.32766
235
""" This project trains an AI to detect german traffic signs and sends the recognized signs to ros TODO: - interpolate ROI from CSV to new dimensions - integrate ROS platform Authors: Jan Fuesting Last edited: 10.09.2018 """ import os from Misc import Misc from Recognition import Recognition from Training ...
[ 37811, 198, 1212, 1628, 13404, 281, 9552, 284, 4886, 308, 2224, 4979, 5895, 290, 12800, 262, 8018, 5895, 284, 686, 82, 198, 198, 51, 3727, 46, 25, 198, 12, 39555, 378, 15107, 40, 422, 44189, 284, 649, 15225, 198, 12, 19386, 48263, 3...
2.564103
624
# -*- coding: utf-8 -*- """ 权限表 """ from typing import Optional from pydantic import BaseModel class RoleCreate(BaseModel): """ 创建角色字段 """ role_id: int role_name: str permission_id: int re_mark: Optional[str] = None class RoleUpdate(BaseModel): """ 角色更新字段 """ role_name...
[ 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 30266, 225, 165, 247, 238, 26193, 101, 198, 37811, 198, 6738, 19720, 1330, 32233, 198, 198, 6738, 279, 5173, 5109, 1330, 7308, 17633, 628, 198, 487...
1.984211
190
import pyiem.cscap_utils as util drive = util.get_driveclient(util.get_config(), "cscap") spr_client = util.get_spreadsheet_client(util.get_config()) res = drive.files().list(q="title contains 'Plot Identifiers'").execute() for item in res["items"]: if item["mimeType"] != "application/vnd.google-apps.spreadsheet"...
[ 11748, 12972, 26597, 13, 66, 1416, 499, 62, 26791, 355, 7736, 198, 198, 19472, 796, 7736, 13, 1136, 62, 19472, 16366, 7, 22602, 13, 1136, 62, 11250, 22784, 366, 66, 1416, 499, 4943, 198, 34975, 62, 16366, 796, 7736, 13, 1136, 62, 43...
2.614035
228
from airflow import AirflowException
[ 6738, 45771, 1330, 3701, 11125, 16922, 628 ]
5.428571
7
# -*- coding: utf-8 -*- # Copyright (c) 2016-2020 by University of Kassel and Fraunhofer Institute for Energy Economics # and Energy System Technology (IEE), Kassel. All rights reserved. import numpy as np import pytest import pandapower as pp import pandapower.networks as nw from pandapower.pd2ppc import _pd2ppc f...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 15069, 357, 66, 8, 1584, 12, 42334, 416, 2059, 286, 15035, 741, 290, 39313, 403, 71, 30288, 5136, 329, 6682, 18963, 198, 2, 290, 6682, 4482, 8987, 357, 40, 6...
3.013333
225
""" Class to organize QA for a full DESI production run """ from __future__ import print_function, absolute_import, division import numpy as np import glob, os import warnings from lvmspec.io import get_exposures from lvmspec.io import get_files from lvmspec.io import read_frame from lvmspec.io import read_meta_fram...
[ 37811, 5016, 284, 16481, 1195, 32, 329, 257, 1336, 22196, 40, 3227, 1057, 198, 37811, 198, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 11, 4112, 62, 11748, 11, 7297, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 15095, ...
3.051095
137
import io import os import nest_asyncio import uvicorn # from PIL import Image from dotenv import load_dotenv from fastapi import FastAPI, UploadFile, File, Request from fastapi.middleware.cors import CORSMiddleware from pydantic import BaseModel import base64 # from coreai.tichHop import Vgg16DetectFace from rete imp...
[ 11748, 33245, 198, 11748, 28686, 198, 198, 11748, 16343, 62, 292, 13361, 952, 198, 11748, 334, 25531, 1211, 198, 2, 422, 350, 4146, 1330, 7412, 198, 6738, 16605, 24330, 1330, 3440, 62, 26518, 24330, 198, 6738, 3049, 15042, 1330, 12549, ...
2.291469
844
import tkinter as tk if __name__ == '__main__': master = tk.Tk() dict_entries = { 'item 1': int, 'item 2': str, } master.title('Hello World!') i = 0 dict_tk_entry = {} for key, val in dict_entries.items(): tk.Label(master, text=str(key)).grid(row=i) dict_...
[ 11748, 256, 74, 3849, 355, 256, 74, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 4958, 796, 256, 74, 13, 51, 74, 3419, 628, 220, 220, 220, 8633, 62, 298, 1678, 796, 1391, 198, 220, 220, ...
2
332
#THIRD PARTY IMPORTS from datetime import datetime from views.utils import RequiredLoginViewMixin from flask.globals import current_app, g from flask.helpers import send_file from flask.templating import render_template from flask.views import MethodView import os import shutil # LOCAL IMPORTS
[ 2, 4221, 46833, 16652, 56, 30023, 33002, 201, 198, 6738, 4818, 8079, 1330, 4818, 8079, 201, 198, 6738, 5009, 13, 26791, 1330, 20906, 47790, 7680, 35608, 259, 201, 198, 6738, 42903, 13, 4743, 672, 874, 1330, 1459, 62, 1324, 11, 308, 20...
3.038095
105
from collections import deque print(stock_availability(["choco", "vanilla", "banana"], "delivery", "caramel", "berry")) print(stock_availability(["chocolate", "vanilla", "banana"], "delivery", "cookie","banana")) print(stock_availability(["chocolate", "vanilla", "banana"], "sell")) print(stock_availability(["chocola...
[ 6738, 17268, 1330, 390, 4188, 628, 198, 198, 4798, 7, 13578, 62, 47274, 7, 14692, 354, 25634, 1600, 366, 10438, 5049, 1600, 366, 3820, 2271, 33116, 366, 12381, 6315, 1600, 366, 7718, 17983, 1600, 366, 8396, 48774, 198, 4798, 7, 13578, ...
3.193717
191
from .fasthdl import module, In, Out, Reg, Wire, X # noqa __version__ = "0.0.1"
[ 6738, 764, 69, 292, 400, 25404, 1330, 8265, 11, 554, 11, 3806, 11, 3310, 11, 14712, 11, 1395, 220, 1303, 645, 20402, 198, 198, 834, 9641, 834, 796, 366, 15, 13, 15, 13, 16, 1, 198 ]
2.277778
36
from urllib.parse import quote_plus import click from sqlalchemy import Boolean, Column, ForeignKey, Integer, String, create_engine from sqlalchemy.exc import OperationalError from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker Base = declarative_base() def get_db_connect...
[ 6738, 2956, 297, 571, 13, 29572, 1330, 9577, 62, 9541, 198, 198, 11748, 3904, 198, 6738, 44161, 282, 26599, 1330, 41146, 11, 29201, 11, 8708, 9218, 11, 34142, 11, 10903, 11, 2251, 62, 18392, 198, 6738, 44161, 282, 26599, 13, 41194, 13...
2.480962
499
"""Core YAML Path classes.""" # Establish the version number common to all components __version__ = "3.6.3" from yamlpath.yamlpath import YAMLPath from yamlpath.processor import Processor
[ 37811, 14055, 575, 2390, 43, 10644, 6097, 526, 15931, 198, 2, 10062, 17148, 262, 2196, 1271, 2219, 284, 477, 6805, 198, 834, 9641, 834, 796, 366, 18, 13, 21, 13, 18, 1, 198, 198, 6738, 331, 43695, 6978, 13, 88, 43695, 6978, 1330, ...
3.315789
57
#============================================================================= # # Copyright (c) Kitware, Inc. # All rights reserved. # See LICENSE.txt for details. # # This software is distributed WITHOUT ANY WARRANTY; without even # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR # PURPOSE. ...
[ 2, 23926, 25609, 28, 198, 2, 198, 2, 220, 15069, 357, 66, 8, 10897, 1574, 11, 3457, 13, 198, 2, 220, 1439, 2489, 10395, 13, 198, 2, 220, 4091, 38559, 24290, 13, 14116, 329, 3307, 13, 198, 2, 198, 2, 220, 770, 3788, 318, 9387, ...
2.857988
1,352
from math import floor from random import shuffle from pandas import DataFrame import numpy as np from matplotlib import pyplot from PIL import Image BOT_USER = 'usr-71' TRAIN_SET_PERCENT = 0.75 SCALE_X = 299 SCALE_Y = 299
[ 6738, 10688, 1330, 4314, 198, 6738, 4738, 1330, 36273, 198, 6738, 19798, 292, 1330, 6060, 19778, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 198, 6738, 350, 4146, 1330, 7412, 628, 198, 33, 2394, ...
2.973684
76
# emacs: -*- mode: python-mode; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See COPYING file distributed along with the NiBabel package for the # copyright and license terms. # ### ### ### #...
[ 2, 795, 16436, 25, 532, 9, 12, 4235, 25, 21015, 12, 14171, 26, 12972, 12, 521, 298, 12, 28968, 25, 604, 26, 33793, 12, 8658, 82, 12, 14171, 25, 18038, 532, 9, 12, 198, 2, 25357, 25, 900, 10117, 28, 29412, 39747, 28, 19, 40379, ...
2.469433
6,265
import pandas as pd from .base import * from tqdm import tqdm
[ 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 764, 8692, 1330, 1635, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020 ]
2.818182
22
import json import logging import os from typing import Any, Dict, Optional import boto3 LOGGER = logging.getLogger() LOGGER.setLevel(logging.INFO)
[ 11748, 33918, 198, 11748, 18931, 198, 11748, 28686, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 11, 32233, 198, 198, 11748, 275, 2069, 18, 198, 198, 25294, 30373, 796, 18931, 13, 1136, 11187, 1362, 3419, 198, 25294, 30373, 13, 2617, 497...
3.145833
48
# -*- coding: utf-8 -*- """Script writes out numpy archive of nd AUC and peak latency array data""" # Authors: Kambiz Tavabi <ktavabi@gmail.com> # License: MIT from os import path as op import time import numpy as np from mne import read_evokeds from badbaby import parameters as params from badbaby import return_dat...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 7391, 6797, 503, 299, 32152, 15424, 286, 299, 67, 317, 9598, 290, 9103, 24812, 7177, 1366, 37811, 198, 198, 2, 46665, 25, 509, 4131, 528, 41489, 17914, 1279,...
2.039457
811
# coding:UTF-8 ''' Date:20161030 @author: zhaozhiyong ''' from math import pow class node: '''树的节点的类 ''' def split_tree(data, fea, value): '''根据特征fea中的值value将数据集data划分成左右子树 input: data(list):数据集 fea(int):待分割特征的索引 value(float):待分割的特征的具体值 output: (set1,set2)(tuple):分...
[ 2, 19617, 25, 48504, 12, 23, 198, 7061, 6, 198, 10430, 25, 5304, 940, 1270, 198, 31, 9800, 25, 1976, 3099, 8590, 5303, 88, 506, 198, 7061, 6, 198, 6738, 10688, 1330, 7182, 198, 198, 4871, 10139, 25, 198, 220, 220, 220, 705, 7061, ...
1.369912
2,506
# Calculator using Python Tkinter from tkinter import Tk, Entry, Button, StringVar base = Tk() calculator__pad = Calculator(base) base.mainloop()
[ 2, 43597, 1262, 11361, 309, 74, 3849, 198, 6738, 256, 74, 3849, 1330, 309, 74, 11, 21617, 11, 20969, 11, 10903, 19852, 628, 220, 220, 220, 220, 220, 220, 220, 220, 198, 198, 8692, 796, 309, 74, 3419, 198, 198, 9948, 3129, 1352, 83...
2.77193
57
# -*- coding: utf-8 -*- from __future__ import unicode_literals import textwrap import unittest from io import StringIO from calmjs.parse import asttypes from calmjs.parse.parsers.es5 import Parser from calmjs.parse.parsers.es5 import parse from calmjs.parse.parsers.es5 import read from calmjs.parse.unparsers.es5 imp...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 2420, 37150, 198, 11748, 555, 715, 395, 198, 6738, 33245, 1330, 10903, 9399, 198, 198, 6738, ...
2.706818
440
from tkinter import * root = Tk() root.geometry("300x400") btn_fill = Button(root, text="Button fill") btn_fill.pack(fill=X) btn_expand = Button(root, text="Button expand ") btn_expand.pack(expand=YES) btn_side = Button(root, text="Button side") btn_side.pack(side=LEFT) root.mainloop()
[ 6738, 256, 74, 3849, 1330, 1635, 198, 15763, 796, 309, 74, 3419, 198, 15763, 13, 469, 15748, 7203, 6200, 87, 7029, 4943, 198, 198, 46118, 62, 20797, 796, 20969, 7, 15763, 11, 2420, 2625, 21864, 6070, 4943, 198, 46118, 62, 20797, 13, ...
2.589286
112
from sklearn import datasets import matplotlib.pyplot as plt import matplotlib.cm as cmx import matplotlib.colors as colors import numpy as np from mlfromscratch.unsupervised_learning import PCA if __name__ == "__main__": main()
[ 6738, 1341, 35720, 1330, 40522, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 2603, 29487, 8019, 13, 11215, 355, 12067, 87, 198, 11748, 2603, 29487, 8019, 13, 4033, 669, 355, 7577, 198, 11748, 299, 32152, 355...
3.078947
76
""" hubspot workflows api """ from hubspot3.base import BaseClient from hubspot3.utils import get_log WORKFLOWS_API_VERSION = "3" class WorkflowsClient(BaseClient): """ The hubspot3 Workflows client uses the _make_request method to call the API for data. It returns a python object translated from the js...
[ 37811, 198, 40140, 20485, 670, 44041, 40391, 198, 37811, 198, 6738, 12575, 20485, 18, 13, 8692, 1330, 7308, 11792, 198, 6738, 12575, 20485, 18, 13, 26791, 1330, 651, 62, 6404, 198, 198, 33249, 3697, 22845, 62, 17614, 62, 43717, 796, 366...
2.509091
440
import os import io import sys import time import string import random import pstats import unittest import cProfile import itertools import statistics from unittest.mock import patch, MagicMock import bucky3.statsd as statsd if __name__ == '__main__': unittest.main()
[ 198, 198, 11748, 28686, 198, 11748, 33245, 198, 11748, 25064, 198, 11748, 640, 198, 11748, 4731, 198, 11748, 4738, 198, 11748, 279, 34242, 198, 11748, 555, 715, 395, 198, 11748, 269, 37046, 198, 11748, 340, 861, 10141, 198, 11748, 7869, ...
3.097826
92
from collections import OrderedDict if __name__ == '__main__': main()
[ 6738, 17268, 1330, 14230, 1068, 35, 713, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
2.851852
27
# copyright 2003-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of astroid. # # astroid is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by the #...
[ 2, 6634, 5816, 12, 6390, 41605, 4146, 6242, 311, 13, 32, 13, 357, 40313, 11, 8782, 19240, 828, 477, 2489, 10395, 13, 198, 2, 2800, 2638, 1378, 2503, 13, 6404, 346, 397, 13, 8310, 14, 1377, 6920, 1462, 25, 32057, 31, 6404, 346, 397...
3.470968
310
from weighted_random import random_choice import requests import random import uuid import json import logging from ipaddress import IPv4Address, AddressValueError from mixpanel import Mixpanel from constants import * from typing import List, ClassVar, Any, Optional import sys import threading from random_user import g...
[ 6738, 26356, 62, 25120, 1330, 4738, 62, 25541, 198, 11748, 7007, 198, 11748, 4738, 198, 11748, 334, 27112, 198, 11748, 33918, 198, 11748, 18931, 198, 6738, 20966, 21975, 1330, 25961, 19, 20231, 11, 17917, 11395, 12331, 198, 6738, 5022, 35...
2.349738
1,524
#!/usr/bin/env python ''' ODC-GEE Setup ''' from setuptools import setup, find_packages with open('README.md', 'r', encoding='utf-8') as fh: LONG_DESCRIPTION = fh.read() setup(name='odc-gee', version='2.25', author='Andrew Lubawy', author_email='andrew.m.lubawy@ama-inc.com', description='...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 7061, 6, 440, 9697, 12, 38, 6500, 31122, 705, 7061, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 4480, 1280, 10786, 15675, 11682, 13, 9132, 3256, 705, ...
2.17052
692
import os import glob import logging import random import geckodriver_autoinstaller from selenium import webdriver from selenium.webdriver.common.proxy import Proxy, ProxyType from .deepl import Translator from .srt_parser import wrap_line, save_srt from .utils import get_proxies # Check if the current version of ge...
[ 11748, 28686, 198, 11748, 15095, 198, 11748, 18931, 198, 11748, 4738, 198, 11748, 4903, 694, 375, 38291, 62, 23736, 17350, 263, 198, 198, 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 11321,...
2.173851
696
''' This is the worker module for the votes task handler. ''' from google.appengine.ext import ndb import json import logging import model.poll as Poll import model.vote as Vote import webapp2 USER_VOTES = {} #Called when there is a new vote #Add a New Vote app = webapp2.WSGIApplication([ ('/worker/process_vo...
[ 7061, 6, 198, 1212, 318, 262, 8383, 8265, 329, 262, 5690, 4876, 21360, 13, 198, 7061, 6, 198, 198, 6738, 23645, 13, 1324, 18392, 13, 2302, 1330, 299, 9945, 198, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 2746, 13, 30393, 355, ...
3.025641
117
""" A language to describe data, its interpretations and its transformations. """
[ 37811, 198, 32, 3303, 284, 6901, 1366, 11, 663, 26146, 290, 663, 38226, 13, 198, 37811 ]
5.0625
16
import pytest from helpers.cluster import ClickHouseCluster cluster = ClickHouseCluster(__file__) instance = cluster.add_instance('instance', config_dir="configs") @pytest.fixture(scope="module", autouse=True) @pytest.fixture(autouse=True)
[ 11748, 12972, 9288, 198, 6738, 49385, 13, 565, 5819, 1330, 6914, 18102, 2601, 5819, 198, 198, 565, 5819, 796, 6914, 18102, 2601, 5819, 7, 834, 7753, 834, 8, 198, 39098, 796, 13946, 13, 2860, 62, 39098, 10786, 39098, 3256, 4566, 62, 15...
3.08642
81
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
# Copyright 2016 Intel Corporation # # 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 wri...
[ 2, 15069, 1584, 8180, 10501, 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, 7330...
2.263905
3,524
from persistence.models.models_base import Base from sqlalchemy.orm import relationship from sqlalchemy import Column, Integer, String, Boolean, ForeignKey
[ 6738, 30802, 13, 27530, 13, 27530, 62, 8692, 1330, 7308, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 2776, 198, 6738, 44161, 282, 26599, 1330, 29201, 11, 34142, 11, 10903, 11, 41146, 11, 8708, 9218, 628, 198 ]
4.27027
37
# -*- coding: utf-8 -*- ################################################################################ ## Form generated from reading UI file 'qr_to_text.ui' ## ## Created by: Qt User Interface Compiler version 5.15.0 ## ## WARNING! All changes made in this file will be lost when recompiling UI file! #######...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 201, 198, 29113, 29113, 14468, 201, 198, 2235, 5178, 7560, 422, 3555, 12454, 2393, 705, 80, 81, 62, 1462, 62, 5239, 13, 9019, 6, 201, 198, 2235, 201, 198, 2235, ...
3.030769
260
""" test maf_transform """ import pytest import transform.mc3.mc3_maf_transform as mc3_maf_transform from bmeg.ioutils import reader import os import contextlib import shutil import json @pytest.fixture def maf_file(request): """ get the full path of the test fixture """ return os.path.join(request.fspat...
[ 198, 198, 37811, 1332, 285, 1878, 62, 35636, 37227, 198, 198, 11748, 12972, 9288, 198, 198, 11748, 6121, 13, 23209, 18, 13, 23209, 18, 62, 76, 1878, 62, 35636, 355, 36650, 18, 62, 76, 1878, 62, 35636, 198, 6738, 275, 28917, 13, 72, ...
2.664151
795
import os import torch from torchvision.utils import make_grid from tensorboardX import SummaryWriter from dataloaders.utils import decode_seg_map_sequence, decode_confidence_map_sequence # def visualize_image(self, writer, dataset, image, target, output, # global_step, flag='imviz'): #...
[ 11748, 28686, 198, 11748, 28034, 198, 6738, 28034, 10178, 13, 26791, 1330, 787, 62, 25928, 198, 6738, 11192, 273, 3526, 55, 1330, 21293, 34379, 198, 6738, 4818, 282, 1170, 364, 13, 26791, 1330, 36899, 62, 325, 70, 62, 8899, 62, 43167, ...
2.215031
479
from pathlib import Path KIDCONNECT_LOGIN="your_email@kidconnect.pl" KIDCONNECT_PASSWORD="YourPassword12345" IFTTT_KEY="Get it from https://ifttt.com/services/maker_webhooks/settings" HISTORY_FILE=Path(__file__).parent.joinpath('history.json') # Where to store the news history (so you don't get double-notified)" CONV...
[ 6738, 3108, 8019, 1330, 10644, 198, 198, 42, 2389, 10943, 48842, 62, 25294, 1268, 2625, 14108, 62, 12888, 31, 38439, 8443, 13, 489, 1, 198, 42, 2389, 10943, 48842, 62, 47924, 54, 12532, 2625, 7120, 35215, 10163, 2231, 1, 198, 5064, 15...
3.074074
135
from collections import OrderedDict from datetime import date from tempfile import NamedTemporaryFile from django.conf import settings from django.db.models import Q, Sum from django.http import HttpResponse from openpyxl import Workbook from openpyxl.styles import Font from openpyxl.utils import get_column_letter f...
[ 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 6738, 4818, 8079, 1330, 3128, 198, 6738, 20218, 7753, 1330, 34441, 12966, 5551, 8979, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 1330, ...
2.36413
3,312
import torch import torch.nn as nn from torch_scatter import scatter_add, scatter_max, scatter_mean, scatter_min, scatter_mul from utils import decompose_graph LATENT_SIZE = 32 class GlobalBlock(nn.Module): """Global block, f_g. A block that updates the global features of each graph based on the p...
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 198, 6738, 28034, 62, 1416, 1436, 1330, 41058, 62, 2860, 11, 41058, 62, 9806, 11, 41058, 62, 32604, 11, 41058, 62, 1084, 11, 41058, 62, 76, 377, 198, 198, 6738, 3384, 44...
2.275168
1,937
#!/usr/bin/python # coding: utf-8 import logging import os from cattledb.core.models import MetricDefinition, EventDefinition, MetricType, EventSeriesType METRICS = [ MetricDefinition("test", "test", MetricType.FLOATSERIES, True), # Raw Metrics MetricDefinition("rawph", "rph", MetricType.FLOATSERIES, F...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 11748, 18931, 198, 11748, 28686, 198, 198, 6738, 269, 43535, 65, 13, 7295, 13, 27530, 1330, 3395, 1173, 36621, 11, 8558, 36621, 11, 3395, 1173, 603...
2.450593
759
from .package import run, start, check
[ 6738, 764, 26495, 1330, 1057, 11, 923, 11, 2198, 198 ]
3.9
10
import csv import logging import os from enum import Enum from army_ant.util.text import textrank from . import Index logger = logging.getLogger(__name__)
[ 11748, 269, 21370, 198, 11748, 18931, 198, 11748, 28686, 198, 6738, 33829, 1330, 2039, 388, 198, 198, 6738, 5428, 62, 415, 13, 22602, 13, 5239, 1330, 2420, 43027, 198, 198, 6738, 764, 1330, 12901, 198, 198, 6404, 1362, 796, 18931, 13, ...
3.18
50
from typing import List from webdnn.backend.code_generator.allocator import MemoryLayout from webdnn.backend.code_generator.injectors.buffer_injector import BufferInjector from webdnn.backend.code_generator.injectors.kernel_name_injector import KernelNameInjector from webdnn.backend.webgpu.generator import WebGPUDescr...
[ 6738, 19720, 1330, 7343, 198, 198, 6738, 3992, 67, 20471, 13, 1891, 437, 13, 8189, 62, 8612, 1352, 13, 32332, 1352, 1330, 14059, 32517, 198, 6738, 3992, 67, 20471, 13, 1891, 437, 13, 8189, 62, 8612, 1352, 13, 259, 752, 669, 13, 2225...
2.107807
1,076
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import import datetime from django.contrib.auth.models import AbstractUser from django.urls import reverse from django.db import models from six import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ from djan...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 11, 4112, 62, 11748, 198, 11748, 4818, 8079, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 2753...
3.298246
114
import nltk import re import pandas as pd from sklearn.feature_extraction.text import CountVectorizer from sklearn.naive_bayes import MultinomialNB from sklearn import metrics from sklearn.model_selection import cross_val_predict #nltk.download('punkt') from textblob import TextBlob from DataLake import Mongo obj...
[ 11748, 299, 2528, 74, 198, 11748, 302, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 1341, 35720, 13, 30053, 62, 2302, 7861, 13, 5239, 1330, 2764, 38469, 7509, 198, 6738, 1341, 35720, 13, 2616, 425, 62, 24406, 274, 1330, 7854, 259,...
2.794521
146
from flask import Flask, render_template, request, Markup, jsonify import json, time app = Flask(__name__) @app.route('/') @app.route('/heatmap') @app.route('/parallel-coordinates') @app.route('/getArticlesByAuthor/<author_name>') if __name__ == '__main__': app.run(port = 5000)
[ 6738, 42903, 1330, 46947, 11, 8543, 62, 28243, 11, 2581, 11, 2940, 929, 11, 33918, 1958, 198, 198, 11748, 33918, 11, 640, 198, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 628, 198, 31, 1324, 13, 38629, 10786, 14, 11537, 198, 198, ...
2.621622
111
import os import json import subprocess import logging from .ninja import NinjaBackend class Meson: """ Base class that handles data fetching and setting options for Meson. """
[ 11748, 28686, 198, 11748, 33918, 198, 11748, 850, 14681, 198, 11748, 18931, 198, 198, 6738, 764, 35073, 6592, 1330, 14152, 7282, 437, 628, 198, 4871, 14937, 261, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 7308, 1398, 326, 17105,...
3.368421
57
score = None count = 0 total = 0 average = 0 while score != 'done': try: number = input('Enter a number: ') if number == 'done': break number = float(number) total = total + number count = count + 1 average = total/count except: ...
[ 26675, 796, 6045, 201, 198, 9127, 796, 657, 201, 198, 23350, 796, 657, 201, 198, 23913, 796, 657, 201, 198, 201, 198, 4514, 4776, 14512, 705, 28060, 10354, 201, 198, 220, 220, 220, 1949, 25, 201, 198, 220, 220, 220, 220, 220, 220, ...
2.154286
175
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 17202, 39410, 25, 428, 2393, 373, 7560, 416, 262, 21624, 12994, 24118, 687, 10290, 357, 27110, 5235, 8, 16984, 13, 17202, 198, 2, 17202, 2141, 407, 4370, 416, 1021, 4556, 345, 821, 1728, 345, 760...
3.267857
168
import FWCore.ParameterSet.Config as cms dtCalibValidation = cms.EDAnalyzer("DTCalibValidation", # Write the histos on file OutputMEsInRootFile = cms.bool(False), # Lable to retrieve 2D segments from the event segment2DLabel = cms.untracked.string('dt2DSegments'), OutputFileName = cms.string('resid...
[ 11748, 48849, 14055, 13, 36301, 7248, 13, 16934, 355, 269, 907, 198, 198, 28664, 9771, 571, 7762, 24765, 796, 269, 907, 13, 1961, 37702, 9107, 7203, 35, 4825, 282, 571, 7762, 24765, 1600, 198, 220, 220, 220, 1303, 19430, 262, 1554, 41...
2.669355
248
pets = { 'Felix': { 'kind': 'cat', 'owner': 'Milton', }, 'Nelly': { 'kind': 'dog', 'owner': 'Stilton', }, 'Maurice': { 'kind': 'parrot', 'owner': 'Tyra', }, } for pet, pet_details in pets.items(): print(f"\n {pet_details['owner']}'s {pet_details['kind']}'s name is {pet}!")
[ 79, 1039, 796, 1391, 628, 197, 6, 42493, 844, 10354, 1391, 198, 197, 197, 6, 11031, 10354, 705, 9246, 3256, 198, 197, 197, 6, 18403, 10354, 705, 44, 9044, 3256, 198, 197, 5512, 628, 197, 6, 45, 6148, 10354, 1391, 198, 197, 197, 6,...
2.06993
143
#!/usr/bin/env python # -*- coding: utf-8 -*- from pathlib import Path from counting_sequences import SequenceCounter, CutadaptMatch import pypipegraph as ppg import pandas as pd import pytest import collections __author__ = "MarcoMernberger" __copyright__ = "MarcoMernberger" __license__ = "mit" @pytest.fixture @...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 14143, 62, 3107, 3007, 1330, 45835, 31694, 11, 9712, 42552, 23850, 198, 11748, ...
2.450479
313
from datetime import date from fbprophet import Prophet from fbprophet.plot import plot_plotly from plotly import graph_objs as go import streamlit as st import yfinance as yf START = "2010-01-01" TODAY = date.today().strftime("%Y-%m-%d") st.title("Stock Prediction App") st.header('Parameters') stocks = ("AAPL", "GO...
[ 6738, 4818, 8079, 1330, 3128, 198, 6738, 277, 65, 22930, 3202, 1330, 13583, 198, 6738, 277, 65, 22930, 3202, 13, 29487, 1330, 7110, 62, 29487, 306, 198, 6738, 7110, 306, 1330, 4823, 62, 672, 8457, 355, 467, 198, 11748, 4269, 18250, 35...
2.644385
374
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. from twisted.application.service import ServiceMaker TwistedSOCKS = ServiceMaker( "Twisted SOCKS", "twisted.tap.socks", "A SOCKSv4 proxy service.", "socks" )
[ 2, 15069, 357, 66, 8, 40006, 24936, 46779, 13, 198, 2, 4091, 38559, 24290, 329, 3307, 13, 198, 198, 6738, 19074, 13, 31438, 13, 15271, 1330, 4809, 48890, 198, 198, 5080, 6347, 50, 11290, 50, 796, 4809, 48890, 7, 198, 220, 220, 220, ...
3.105263
76
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Dec 23 17:32:31 2021 @author: ifti """ from ipapy import UNICODE_TO_IPA from ipapy import is_valid_ipa from ipapy.ipachar import IPAConsonant from ipapy.ipachar import IPAVowel from ipapy.ipastring import IPAString from IPATranscription ...
[ 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, 26223, 4280, 2242, 1596, 25, 2624, 25, 3132, 33448, 198, 198, 31, 9800, 25, 611, 20259, 1...
2.128755
1,398
#recursive approach numTerms = int(input("How many terms of Fibonacci sequence to print? ")) # What are the first few terms of the fib seq? # 0 1 1 2 3 # main method # check if the number of terms is valid if numTerms <= 0: print("Please enter a positive integer") else: print("Fibonacci sequence:") for...
[ 2, 8344, 30753, 3164, 198, 22510, 15156, 907, 796, 493, 7, 15414, 7203, 2437, 867, 2846, 286, 41566, 261, 44456, 8379, 284, 3601, 30, 366, 4008, 198, 198, 2, 1867, 389, 262, 717, 1178, 2846, 286, 262, 12900, 33756, 30, 198, 2, 657, ...
2.832061
131
import unittest import pdf2images import os THIS_DIR = os.path.dirname(os.path.realpath(__file__)) ASSETS_DIR = os.path.join(THIS_DIR, "assets")
[ 11748, 555, 715, 395, 198, 11748, 37124, 17, 17566, 198, 11748, 28686, 198, 198, 43559, 62, 34720, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 5305, 6978, 7, 834, 7753, 834, 4008, 198, 10705, 32716, 62, 34720, 796, ...
2.625
56
import os
[ 11748, 28686, 628 ]
3.666667
3
VERSION = '8.0.0'
[ 43717, 796, 705, 23, 13, 15, 13, 15, 6, 198 ]
1.8
10
import string import random from flask_bcrypt import Bcrypt import names from flask_sqlalchemy import SQLAlchemy from sqlalchemy import func from sqlalchemy.ext.hybrid import hybrid_property, Comparator from sqlalchemy.schema import MetaData from sqlalchemy.orm import backref from itsdangerous import TimedJSONWebSignat...
[ 11748, 4731, 198, 11748, 4738, 198, 6738, 42903, 62, 15630, 6012, 1330, 347, 29609, 198, 11748, 3891, 198, 6738, 42903, 62, 25410, 282, 26599, 1330, 16363, 2348, 26599, 198, 6738, 44161, 282, 26599, 1330, 25439, 198, 6738, 44161, 282, 265...
2.513222
1,021
#!/usr/bin/env python # -*- coding: utf-8 -*- import os from pyscaffold import templates __author__ = "Florian Wilhelm" __copyright__ = "Blue Yonder" __license__ = "new BSD"
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 28686, 198, 198, 6738, 279, 28349, 2001, 727, 1330, 24019, 198, 198, 834, 9800, 834, 796, 366, 26953, 666, ...
2.608696
69
""" VISIUALIZATION MODULE loading Parameter Matrices CALL BY: <visiualize.py> RETURN: Environment simulation (animated) & Plots INFO: This Module can load a specific File Dump (cPickle) and visiualize the containig matrices onto a OpenAI Gym Environment """ # Some dependencies import numpy as np import...
[ 37811, 198, 29817, 40, 25620, 14887, 6234, 33893, 11046, 25139, 2357, 6550, 45977, 198, 198, 34, 7036, 11050, 25, 220, 220, 220, 1279, 4703, 72, 723, 1096, 13, 9078, 29, 198, 198, 26087, 27064, 25, 220, 220, 220, 220, 9344, 18640, 357...
5.81155
329
from django.db import transaction from rest_framework.generics import get_object_or_404 from SocialNetwork_API.models import * from SocialNetwork_API.services.base import BaseService
[ 6738, 42625, 14208, 13, 9945, 1330, 8611, 198, 198, 6738, 1334, 62, 30604, 13, 8612, 873, 1330, 651, 62, 15252, 62, 273, 62, 26429, 628, 198, 6738, 5483, 26245, 62, 17614, 13, 27530, 1330, 1635, 198, 6738, 5483, 26245, 62, 17614, 13, ...
3.76
50
# Purple Damage Skin success = sm.addDamageSkin(2435432) if success: sm.chat("The Purple Damage Skin has been added to your account's damage skin collection.") # sm.consumeItem(2435432)
[ 2, 17265, 8995, 17847, 198, 13138, 796, 895, 13, 2860, 22022, 42455, 7, 1731, 32182, 2624, 8, 198, 361, 1943, 25, 198, 220, 220, 220, 895, 13, 17006, 7203, 464, 17265, 8995, 17847, 468, 587, 2087, 284, 534, 1848, 338, 2465, 4168, 49...
3.233333
60
a, b = input().split() a = int(a) b = int(b) print(a+b) print(a-b) print(a*b) print(a//b) print(a%b) print(format(a/b, ".2f"))
[ 64, 11, 275, 796, 5128, 22446, 35312, 3419, 198, 64, 796, 493, 7, 64, 8, 198, 65, 796, 493, 7, 65, 8, 198, 198, 4798, 7, 64, 10, 65, 8, 198, 4798, 7, 64, 12, 65, 8, 198, 4798, 7, 64, 9, 65, 8, 198, 4798, 7, 64, 1003, 6...
1.777778
72
# --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: percent # format_version: '1.3' # jupytext_version: 1.6.0 # kernelspec: # display_name: Python 3 # language: python # name: python3 # --- # %% # %matplotlib inline # %% # %run notebook_setup...
[ 2, 11420, 198, 2, 474, 929, 88, 353, 25, 198, 2, 220, 220, 474, 929, 88, 5239, 25, 198, 2, 220, 220, 220, 220, 2420, 62, 15603, 341, 25, 198, 2, 220, 220, 220, 220, 220, 220, 7552, 25, 764, 9078, 198, 2, 220, 220, 220, 220, ...
3.162085
1,746
# old code from iris example # from sklearn.neighbors import KNeighborsClassifier # from sklearn.datasets import load_iris # from sklearn.externals import joblib #import all the needed imports import numpy as np import pandas as pd import os from sklearn.cross_validation import train_test_split from sklearn.metrics im...
[ 2, 1468, 2438, 422, 4173, 271, 1672, 198, 2, 422, 1341, 35720, 13, 710, 394, 32289, 1330, 509, 46445, 32289, 9487, 7483, 198, 2, 422, 1341, 35720, 13, 19608, 292, 1039, 1330, 3440, 62, 29616, 198, 2, 422, 1341, 35720, 13, 1069, 759,...
2.747788
904
from PySide6.QtWidgets import QApplication, QMainWindow, QPushButton from PySide6.QtGui import QScreen from PySide6.QtCore import QSize from config import t_max, t_min, t_norm, b_x, b_y if __name__ == "__main__": app = QApplication([]) mainWin = MainWindow() mainWin.sho...
[ 6738, 9485, 24819, 21, 13, 48, 83, 54, 312, 11407, 1330, 1195, 23416, 11, 1195, 13383, 27703, 11, 1195, 49222, 21864, 198, 6738, 9485, 24819, 21, 13, 48, 83, 8205, 72, 1330, 1195, 23901, 198, 6738, 9485, 24819, 21, 13, 48, 83, 14055...
2.223684
152
import git import git.exc import os from pathlib import Path import subprocess import sys import collections import enum from typing import List, Dict, Set, Optional from smartsquash.decorators import memorize_files_changed from loguru import logger def retrieve_commits( repo: git.Repo, target_branch: str, rev...
[ 11748, 17606, 198, 11748, 17606, 13, 41194, 198, 11748, 28686, 198, 6738, 3108, 8019, 1330, 10644, 198, 11748, 850, 14681, 198, 11748, 25064, 198, 11748, 17268, 198, 11748, 33829, 198, 6738, 19720, 1330, 7343, 11, 360, 713, 11, 5345, 11, ...
2.825
400
import tensorflow as tf from tensorflow.python.keras.layers import Input # gpus = tf.config.list_physical_devices('GPU') # for gpu in gpus: # tf.config.experimental.set_memory_growth(gpu, True)
[ 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 11192, 273, 11125, 13, 29412, 13, 6122, 292, 13, 75, 6962, 1330, 23412, 198, 198, 2, 27809, 385, 796, 48700, 13, 11250, 13, 4868, 62, 42854, 62, 42034, 10786, 33346, 11537, 198, 2, 329,...
2.6875
80
print( '<' + __name__ + ' name=\'' + __file__ + '\'>' ) import IceRayPy.core.material.instruction.label.coord3d.const import IceRayPy.core.material.instruction.label.coord3d.dynamic import IceRayPy.core.material.instruction.label.coord3d.temp print( '</' + __name__ + ' name=\'' + __file__ + '\'>' )
[ 4798, 7, 705, 27, 6, 1343, 11593, 3672, 834, 1343, 705, 1438, 28, 59, 7061, 1343, 220, 220, 11593, 7753, 834, 1343, 705, 43054, 29, 6, 1267, 201, 198, 201, 198, 11748, 6663, 19591, 20519, 13, 7295, 13, 33665, 13, 8625, 2762, 13, 1...
2.460938
128
#equations for constraints import numpy as np from calcModuleTP import ATransformMatrixTHETA as A_Theta, link2index from calcModuleTP import ATransformMatrix as A_i
[ 2, 4853, 602, 329, 17778, 198, 11748, 299, 32152, 220, 220, 220, 220, 220, 220, 220, 355, 45941, 198, 6738, 220, 220, 42302, 26796, 7250, 220, 220, 1330, 317, 41762, 46912, 4221, 20892, 355, 317, 62, 464, 8326, 11, 2792, 17, 9630, 1...
2.875
64
import tkinter as tk import random board_layout = [] utilities = {} turn = 'X' radio_button = '0' winner = '' count = 0 def minimax(board, min_max): """Computes all possible ways to proceed from the current state and selects the optimal way.""" result = win_draw(board) if result != 2: return re...
[ 11748, 256, 74, 3849, 355, 256, 74, 198, 11748, 4738, 198, 3526, 62, 39786, 796, 17635, 198, 315, 2410, 796, 23884, 198, 15344, 796, 705, 55, 6, 198, 37004, 62, 16539, 796, 705, 15, 6, 198, 39791, 796, 10148, 198, 9127, 796, 657, ...
2.454657
816
from gym.envs.registration import register register( id='SimpleNavigation-v0', entry_point='safe_il.envs:SimpleNavigation', max_episode_steps=10000, reward_threshold=200, ) register( id='BoneDrilling2D-v0', entry_point='safe_il.envs:BoneDrilling2D', max_episode_steps=10000, reward_thre...
[ 6738, 11550, 13, 268, 14259, 13, 2301, 33397, 1330, 7881, 198, 198, 30238, 7, 198, 220, 220, 220, 4686, 11639, 26437, 30575, 7065, 12, 85, 15, 3256, 198, 220, 220, 220, 5726, 62, 4122, 11639, 21230, 62, 346, 13, 268, 14259, 25, 2643...
2.430657
137
from brownie import network, config, AuthenticatorProvider from scripts.utils import get_account, is_network_local from scripts.deploy import deploy import pytest
[ 6738, 7586, 494, 1330, 3127, 11, 4566, 11, 31885, 26407, 29495, 198, 6738, 14750, 13, 26791, 1330, 651, 62, 23317, 11, 318, 62, 27349, 62, 12001, 198, 6738, 14750, 13, 2934, 1420, 1330, 6061, 198, 198, 11748, 12972, 9288, 628 ]
4.125
40
''' Q:You are given the following information, but you may prefer to do some research for yourself. 1 Jan 1900 was a Monday. Thirty days has September, April, June and November. All the rest have thirty-one, Saving February alone, Which has twenty-eight, rain or shine. And on leap years, twenty-nine. A leap year occur...
[ 7061, 6, 198, 48, 25, 1639, 389, 1813, 262, 1708, 1321, 11, 475, 345, 743, 4702, 284, 466, 617, 2267, 329, 3511, 13, 198, 198, 16, 2365, 21489, 373, 257, 3321, 13, 198, 38856, 1528, 468, 2693, 11, 198, 16784, 11, 2795, 290, 3389, ...
2.916388
299
from django.contrib import admin from django.contrib.auth.admin import UserAdmin from .models import Finding, Agency, Grant, Grantee, User, Comment admin.site.register(User, UserAdmin) admin.site.register(Agency) admin.site.register(Finding) admin.site.register(Grant) admin.site.register(Grantee) admin.site.register(C...
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 28482, 1330, 11787, 46787, 198, 6738, 764, 27530, 1330, 27063, 11, 7732, 11, 12181, 11, 12181, 1453, 11, 11787, 11, 18957, 198, 198, ...
3.28
100
import unittest import numpy as np import nearest_correlation from nearest_correlation import nearcorr # References # [1] 'Computing the nearest correlation matrix - a problem from finance': Higham, IMA Journal of Numerical Analysis (2002) 22, 329.343 # This test is taken from the example given in the # NAG ...
[ 11748, 555, 715, 395, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 16936, 62, 10215, 49501, 198, 6738, 16936, 62, 10215, 49501, 1330, 1474, 10215, 81, 198, 198, 2, 31458, 198, 2, 685, 16, 60, 705, 5377, 48074, 262, 16936, 16096, 17...
3.681818
330
from pathlib import Path from plmbr.version import version pys = list(Path('.').rglob('*.py')) mds = list(Path('.').rglob('*.md')) sdist = Path('dist') / f'plmbr-{version}.tar.gz'
[ 6738, 3108, 8019, 1330, 10644, 198, 6738, 458, 76, 1671, 13, 9641, 1330, 2196, 198, 198, 79, 893, 796, 1351, 7, 15235, 10786, 2637, 737, 81, 4743, 672, 10786, 24620, 9078, 6, 4008, 198, 9132, 82, 796, 1351, 7, 15235, 10786, 2637, 73...
2.434211
76
""" Abstract base classes for construction asynchronous workers. """ from abc import ABCMeta, abstractmethod from typing import Sequence, Tuple from aiohttp.web import Application class AbstractWorker(metaclass=ABCMeta): """ This base class provides most basic functionality for the worker. """ @pro...
[ 37811, 198, 23839, 2779, 6097, 329, 5103, 39354, 3259, 13, 198, 37811, 198, 198, 6738, 450, 66, 1330, 9738, 48526, 11, 12531, 24396, 198, 6738, 19720, 1330, 45835, 11, 309, 29291, 198, 198, 6738, 257, 952, 4023, 13, 12384, 1330, 15678, ...
3.066092
348
# -*- coding: utf-8 -*- # # ojar - [?] rune # https://github.com/vesche/ojar #
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 198, 2, 267, 9491, 532, 685, 26398, 35930, 198, 2, 3740, 1378, 12567, 13, 785, 14, 1158, 2395, 14, 78, 9491, 198, 2, 628 ]
2.025
40
import torch import torch.nn as nn from util.utils import positive_mask import os import math import util.utils as utils import torch.nn.functional as F class NTXent(nn.Module): """ The Normalized Temperature-scaled Cross Entropy Loss Source: https://github.com/Spijkervet/SimCLR """ def forward...
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 7736, 13, 26791, 1330, 3967, 62, 27932, 198, 11748, 28686, 198, 11748, 10688, 198, 11748, 7736, 13, 26791, 355, 3384, 4487, 198, 11748, 28034, 13, 20471, 13, 45124, 35...
2.2488
1,250
import datetime import os import requests import re import pandas as pd import numpy as np from bs4 import BeautifulSoup if __name__ == '__main__': civil_names = CivilNames() civil_names.write_civil_file(civil_names.get_civil_names())
[ 11748, 4818, 8079, 198, 11748, 28686, 198, 11748, 7007, 198, 11748, 302, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 628, 198, 361, 11593, 3672, 834, 6624, ...
2.987805
82
import gc import prometheus_client import sys enabled = prometheus_client.Gauge( 'python_gc_enabled', 'Whether the garbage collector is enabled.') enabled.set_function(gc.isenabled) debug = prometheus_client.Gauge( 'python_gc_debug', 'The debug flags currently set on the Python GC.') debug.set_function(gc....
[ 11748, 308, 66, 198, 11748, 1552, 36916, 62, 16366, 198, 11748, 25064, 628, 198, 198, 25616, 796, 1552, 36916, 62, 16366, 13, 38, 559, 469, 7, 198, 220, 220, 220, 705, 29412, 62, 36484, 62, 25616, 3256, 705, 15354, 262, 15413, 22967, ...
2.639175
679
import unittest from ddt import ddt, data, unpack #installation of this library is required 'pip install ddt' from pyunitreport import HTMLTestRunner from selenium import webdriver @ddt if __name__ == "__main__": unittest.main(verbosity = 2)
[ 11748, 555, 715, 395, 198, 6738, 288, 28664, 1330, 288, 28664, 11, 1366, 11, 555, 8002, 1303, 17350, 341, 286, 428, 5888, 318, 2672, 705, 79, 541, 2721, 288, 28664, 6, 198, 6738, 12972, 20850, 13116, 1330, 11532, 14402, 49493, 198, 67...
3.128205
78
import asyncio import random import typing from aiozipkin.span import SpanAbc from ....quru_logger import logger from ....env import HEARTBEAT_INTERVAL from ....words import RaftLog from ..timer import Timer from .base import BaseState, log_consistency_check, candidate_qualification
[ 11748, 30351, 952, 198, 11748, 4738, 198, 11748, 19720, 198, 198, 6738, 257, 952, 13344, 5116, 13, 12626, 1330, 49101, 4826, 66, 198, 198, 6738, 19424, 80, 14717, 62, 6404, 1362, 1330, 49706, 198, 6738, 19424, 24330, 1330, 11179, 7227, ...
3.54321
81
import bpy;
[ 11748, 275, 9078, 26 ]
2.75
4
# Reference Codes # https://github.com/kentaroy47/vision-transformers-cifar10 # https://github.com/FrancescoSaverioZuppichini/ViT # https://github.com/lucidrains/vit-pytorch #Lib import from __future__ import print_function import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as ...
[ 2, 20984, 44380, 198, 2, 3740, 1378, 12567, 13, 785, 14, 74, 298, 283, 726, 2857, 14, 10178, 12, 35636, 364, 12, 66, 361, 283, 940, 198, 2, 3740, 1378, 12567, 13, 785, 14, 6732, 1817, 1073, 50, 8770, 952, 57, 7211, 488, 5362, 14...
2.516402
4,603
""" Goes over a directory, looks for all matching filenames (csv's), picks one row and writes them to another file. """ import re, sys, os import polygon2cog as p2c import validation as v if __name__ == "__main__": # line index we want to collect TARGET_LINE = 0 # priority list of file keys, the first one ...
[ 37811, 198, 38, 3028, 625, 257, 8619, 11, 3073, 329, 477, 12336, 1226, 268, 1047, 357, 40664, 338, 828, 11103, 530, 5752, 290, 6797, 606, 284, 1194, 2393, 13, 198, 37811, 198, 11748, 302, 11, 25064, 11, 28686, 198, 11748, 7514, 14520,...
2.180348
804
from a_top_k import * from b_top_k import * import sys import time if __name__ == "__main__": main()
[ 6738, 257, 62, 4852, 62, 74, 1330, 1635, 198, 6738, 275, 62, 4852, 62, 74, 1330, 1635, 198, 11748, 25064, 198, 11748, 640, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419, 198 ]
2.511628
43
import fishtank from machine import Pin, I2C import machine import time import ssd1306 from adafruit_mqtt import AdafruitMQTTClient import passwords try: i2c = I2C(-1, scl=Pin(22), sda=Pin(21)) oled_width = 128 oled_height = 64 oled = ssd1306.SSD1306_I2C(oled_width, oled_height, i2c) sensor = ...
[ 11748, 5916, 28451, 198, 6738, 4572, 1330, 13727, 11, 314, 17, 34, 198, 11748, 4572, 198, 11748, 640, 198, 11748, 264, 21282, 12952, 21, 198, 6738, 512, 1878, 4872, 62, 76, 80, 926, 1330, 1215, 1878, 4872, 49215, 15751, 11792, 198, 11...
2.18232
362
# coding=utf-8 # Copyright 2018 The HuggingFace Inc. team and Jangwon Park # # 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 requir...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 2864, 383, 12905, 2667, 32388, 3457, 13, 1074, 290, 449, 648, 26502, 3250, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 34...
3.084746
1,121