content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import numpy as np from collections import deque from blist import blist from pyBreakDown import explanation as e class Explainer: """ Explainer object. Parameters ---------- clf : np.array Sklearn predicition model (regression or classification). data : np.array ...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 17268, 1330, 390, 4188, 198, 6738, 698, 396, 1330, 698, 396, 198, 6738, 12972, 31737, 8048, 1330, 7468, 355, 304, 198, 198, 4871, 5905, 10613, 25, 198, 220, 220, 220, 37227, 198, 220, 220, 220...
2.43179
799
import matplotlib.pyplot as plt import jax import jax.numpy as np import numpy as onp import jax.random as random import tigercontrol from tigercontrol.utils.random import set_key, generate_key from tigercontrol.environments import Environment from tigercontrol.controllers import Controller from jax import grad,jit fr...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 474, 897, 198, 11748, 474, 897, 13, 77, 32152, 355, 45941, 198, 11748, 299, 32152, 355, 319, 79, 198, 11748, 474, 897, 13, 25120, 355, 4738, 198, 11748, 256, 328, ...
2.138826
1,772
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
[ 2, 16529, 1783, 10541, 198, 2, 15069, 357, 66, 8, 5413, 10501, 13, 1439, 2489, 10395, 13, 198, 2, 49962, 739, 262, 17168, 13789, 13, 4091, 13789, 13, 14116, 287, 262, 1628, 6808, 329, 5964, 1321, 13, 198, 2, 16529, 1783, 10541, 198,...
5
205
# A demonstration of a simple optimization problem in TACS: minimize the # mass of the CRM model subject to a global stress aggregate constraint # enforcing that the maximum stress at any quadrature point is less than # a specified upper bound. from __future__ import print_function # Import necessary libraries impo...
[ 2, 317, 13646, 286, 257, 2829, 23989, 1917, 287, 309, 2246, 50, 25, 17775, 262, 198, 2, 2347, 286, 262, 8740, 44, 2746, 2426, 284, 257, 3298, 5503, 19406, 32315, 198, 2, 26587, 326, 262, 5415, 5503, 379, 597, 15094, 81, 1300, 966, ...
2.335891
1,694
import os import uuid from mlflow.entities.experiment import Experiment from mlflow.entities.metric import Metric from mlflow.entities.param import Param from mlflow.entities.run import Run from mlflow.entities.run_data import RunData from mlflow.entities.run_info import RunInfo from mlflow.entities.run_status impor...
[ 11748, 28686, 198, 198, 11748, 334, 27112, 198, 198, 6738, 285, 1652, 9319, 13, 298, 871, 13, 23100, 3681, 1330, 29544, 198, 6738, 285, 1652, 9319, 13, 298, 871, 13, 4164, 1173, 1330, 3395, 1173, 198, 6738, 285, 1652, 9319, 13, 298, ...
2.438486
317
from typing import Dict import torch import torch.nn as nn from transformers import AutoConfig, AutoModel
[ 6738, 19720, 1330, 360, 713, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 6121, 364, 1330, 11160, 16934, 11, 11160, 17633, 628 ]
3.857143
28
# -*- coding: utf-8 -*- # Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 33160, 3012, 11419, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2...
2.468559
6,695
""" This Package responsible for the logs in the WP-exploiter. """ try: import enum import asyncio from datetime import datetime except BaseException as e: print("Import Error: ", e) class LoggerMode(enum.Enum): """ :DEVELOP: Will output all the logs to the screen also. :DEBUG: Will outpu...
[ 37811, 198, 1212, 15717, 4497, 329, 262, 17259, 287, 262, 28993, 12, 20676, 78, 2676, 13, 198, 37811, 198, 198, 28311, 25, 198, 220, 220, 220, 1330, 33829, 198, 220, 220, 220, 1330, 30351, 952, 198, 220, 220, 220, 422, 4818, 8079, 1...
2.272919
949
from config import user_list from flask import g from app.helpers.render import render_json, render_error from app.models.User import User from app.instances import db def get_my_profile(): """ Returns the logged in user's profile or a JSON with `unauthorized: true` """ if isinstance(g.user, User): ...
[ 6738, 4566, 1330, 2836, 62, 4868, 198, 6738, 42903, 1330, 308, 198, 198, 6738, 598, 13, 16794, 364, 13, 13287, 1330, 8543, 62, 17752, 11, 8543, 62, 18224, 198, 6738, 598, 13, 27530, 13, 12982, 1330, 11787, 198, 6738, 598, 13, 8625, ...
2.67033
819
"""empty message Revision ID: 77219ff4194a Revises: d0605c00c98e Create Date: 2019-11-18 18:22:03.915031 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision = "77219ff4194a" down_revision = "d0605c00c98e" branch_labels = None...
[ 37811, 28920, 3275, 198, 198, 18009, 1166, 4522, 25, 767, 4761, 1129, 487, 19, 22913, 64, 198, 18009, 2696, 25, 288, 15, 32417, 66, 405, 66, 4089, 68, 198, 16447, 7536, 25, 13130, 12, 1157, 12, 1507, 1248, 25, 1828, 25, 3070, 13, ...
2.56391
133
import json from rest_framework.views import APIView from rest_framework import permissions from rest_framework.authentication import TokenAuthentication from django.http import HttpResponse from django.utils import timezone from datetime import timedelta from app.models import Game, Winner
[ 11748, 33918, 198, 6738, 1334, 62, 30604, 13, 33571, 1330, 3486, 3824, 769, 198, 6738, 1334, 62, 30604, 1330, 21627, 198, 6738, 1334, 62, 30604, 13, 41299, 3299, 1330, 29130, 47649, 3299, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29...
4.138889
72
# -*- coding: utf-8 -*- """ Created on Sun May 10 22:59:10 2020 @author: Christopher Cheng """ # The value is the function mapped areas = {"sq": square, "ci": circle, "eqtri": equal_tri} # When accessing the dictionary keys, you can pass a parameter if it's a function n = 2 print(areas["sq"](n)) print(areas["ci"](...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 3825, 1737, 838, 2534, 25, 3270, 25, 940, 12131, 198, 198, 31, 9800, 25, 12803, 27692, 198, 37811, 198, 198, 2, 383, 1988, 318, 262, 2163, 2766...
2.761905
126
from __future__ import division from builtins import range from past.utils import old_div from collections import Counter import numpy as np def propensity(y, A=0.55, B=1.5): """ Computes propensity scores based on ys """ N, Nl, ml = metrics(y) C = (np.log(N) - 1) * (B + 1) ** A wei...
[ 6738, 11593, 37443, 834, 1330, 7297, 201, 198, 6738, 3170, 1040, 1330, 2837, 201, 198, 6738, 1613, 13, 26791, 1330, 1468, 62, 7146, 201, 198, 6738, 17268, 1330, 15034, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 201, 198, 4299, ...
2.326633
199
#-*- coding:utf-8; mode:python; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- import os from os import path from bes.key_value.key_value_list import key_value_list from bes.common.check import check from bes.system.log import log from .vfs_cli_command import vfs_cli_command from .vfs_list_options import...
[ 2, 12, 9, 12, 19617, 25, 40477, 12, 23, 26, 4235, 25, 29412, 26, 33793, 12, 8658, 82, 12, 14171, 25, 18038, 26, 269, 12, 35487, 12, 28968, 25, 362, 26, 7400, 12, 10394, 25, 362, 532, 9, 12, 198, 198, 11748, 28686, 198, 6738, 2...
2.772358
123
from argparse import Namespace from torchvision.datasets import CIFAR10 import numpy as np import torch import utils DEFAULT_ARGS=Namespace( dataset='cifar10', data='data', cutout=None, cutout_length=None, train_portion=0.9, batch_size=256, evaluate_batch_size=256, )
[ 6738, 1822, 29572, 1330, 28531, 10223, 198, 198, 6738, 28034, 10178, 13, 19608, 292, 1039, 1330, 327, 5064, 1503, 940, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 11748, 3384, 4487, 198, 198, 7206, 38865, 62, 1503, 14313, ...
2.471074
121
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Jul 2 10:21:16 2021 @author: fabian """ import pypsa import pytest import os import pandas as pd from numpy.testing import assert_array_almost_equal as equal from pandas import IndexSlice as idx from pypsa.descriptors import get_activity_mask @pytest...
[ 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, 19480, 5979, 220, 362, 838, 25, 2481, 25, 1433, 33448, 198, 198, 31, 9800, 25, 7843, 666,...
2.675862
145
import intentparser as ip __author__ = 'Nonthakon Jitchiranant' <<<<<<< HEAD intent = intentparser.intentParser({ 'description' : { "type" : 'FavMusicIntent', "args" : [(1, "musics_types")], "keyword" : [ (0, "musics_keyword"), ...
[ 11748, 6824, 48610, 355, 20966, 198, 198, 834, 9800, 834, 796, 705, 15419, 400, 461, 261, 449, 2007, 343, 272, 415, 6, 198, 198, 16791, 16791, 16791, 27, 39837, 198, 48536, 796, 6824, 48610, 13, 48536, 46677, 15090, 198, 220, 220, 220...
1.873536
854
from cx_Freeze import setup, Executable import os additional_packages = [] additional_mods = [] PROJECT_DIR = os.path.abspath(os.path.dirname(__file__)) # directory where this file is in DIST_DIR = os.path.join(PROJECT_DIR, 'release\\bin') # directory where all the final builds will be found BUILD_DIR = os....
[ 6738, 43213, 62, 11146, 2736, 1330, 9058, 11, 8393, 18187, 201, 198, 11748, 28686, 201, 198, 201, 198, 2860, 1859, 62, 43789, 796, 17635, 201, 198, 2860, 1859, 62, 24122, 796, 17635, 201, 198, 201, 198, 31190, 23680, 62, 34720, 796, 2...
2.740891
247
luck_desc = [ { "charaid": ["1", "2"], "_name": "凯露", "type": [ { "good-luck": 10, "content": "仅限今天而已!别想多了!!" }, { "good-luck": 8, "content": "宜抽卡﹁十连五彩不是梦﹂" }, { ...
[ 46708, 62, 20147, 796, 685, 198, 220, 220, 220, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 366, 10641, 1698, 1298, 14631, 16, 1600, 366, 17, 33116, 198, 220, 220, 220, 220, 220, 220, 220, 45434, 3672, 1298, 366, 49035, 107, 165, ...
1.083815
23,540
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import pandas as pd from torch.utils.data import DataLoader from sklearn.preprocessing import StandardScaler from models import GRU, rmse_loss from Dataset import BikeDataSet if __name__ == '__main__': device = torch.device('c...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 6060, ...
2.293617
470
# -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. # # File Name : tardis_minimal_model.py # # Purpose : # # Creation Date : 18-02-2016 # # Last Modified : Tue 02 Aug 2016 15:09:26 CEST # # Created By : # # _._._._._._._._._._._._._._._._._._._._._. """This module provides an interface object which holds the essential i...
[ 2, 532, 7874, 7874, 7874, 7874, 7874, 7874, 7874, 7874, 7874, 7874, 7874, 7874, 7874, 7874, 7874, 7874, 7874, 7874, 7874, 7874, 13, 198, 2, 198, 2, 220, 9220, 6530, 1058, 256, 446, 271, 62, 1084, 4402, 62, 19849, 13, 9078, 198, 2, ...
2.116491
6,258
import copy import glob import mss import os import pygame import random import sys from PIL import Image, ImageOps from threading import Timer from core.device_manager import HandJointsFrame from core.kinect_manager import KinectManager CRACK_PATHS = glob.glob(os.path.join(resource_path(), "assets", "cracks", "*.p...
[ 11748, 4866, 198, 11748, 15095, 198, 11748, 285, 824, 198, 11748, 28686, 198, 11748, 12972, 6057, 198, 11748, 4738, 198, 11748, 25064, 198, 6738, 350, 4146, 1330, 7412, 11, 7412, 41472, 198, 6738, 4704, 278, 1330, 5045, 263, 198, 198, 6...
3.012658
158
import marso import pytest
[ 11748, 1667, 568, 198, 198, 11748, 12972, 9288, 628 ]
3.222222
9
from django.shortcuts import render # Create your views here. from django.shortcuts import render, redirect from django.contrib.auth.decorators import login_required from django.contrib import messages from .forms import UserRegisterForm,UserUpdateForm,ProfileUpdateForm # Create your views here. @login_required
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 198, 2, 13610, 534, 5009, 994, 13, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 18941, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 12501, 273, 2024, 1330, ...
3.72093
86
from rest_framework import serializers from uploader.models import UploadFileModel
[ 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 6738, 9516, 263, 13, 27530, 1330, 36803, 8979, 17633, 198 ]
4.611111
18
import sys import json import mock import requests import requests_mock import unittest2 as unittest from drf_client.connection import Api from drf_client.exceptions import HttpClientError, HttpServerError
[ 11748, 25064, 198, 11748, 33918, 198, 11748, 15290, 198, 11748, 7007, 198, 11748, 7007, 62, 76, 735, 198, 11748, 555, 715, 395, 17, 355, 555, 715, 395, 198, 198, 6738, 1553, 69, 62, 16366, 13, 38659, 1330, 5949, 72, 198, 6738, 1553, ...
3.483333
60
import logging import colorlog
[ 11748, 18931, 201, 198, 11748, 3124, 6404, 201 ]
4
8
import base64 import hashlib import datetime
[ 11748, 2779, 2414, 198, 11748, 12234, 8019, 198, 11748, 4818, 8079, 198 ]
3.75
12
from datetime import datetime, date import json import urllib from bottle import request, response import bauble.db as db from bauble.model import Model, SystemModel class ArgsPlugin(object): """ Plugin to add an args property to every request that contains the url_args for the route. """ name = 'arg...
[ 6738, 4818, 8079, 1330, 4818, 8079, 11, 3128, 198, 11748, 33918, 198, 11748, 2956, 297, 571, 198, 198, 6738, 9294, 1330, 2581, 11, 2882, 198, 198, 11748, 26605, 26664, 13, 9945, 355, 20613, 198, 6738, 26605, 26664, 13, 19849, 1330, 9104...
2.967846
311
# encoding: latin1 """spatial lag of a variable """ __author__ = "Juan C. Duque, Alejandro Betancourt" __credits__ = "Copyright (c) 2010-11 Juan C. Duque" __license__ = "New BSD License" __version__ = "1.0.0" __maintainer__ = "RiSE Group" __email__ = "contacto@rise-group.org" __all__ = ['spatialLag'] import numpy def...
[ 2, 21004, 25, 3042, 259, 16, 198, 37811, 2777, 34961, 19470, 286, 257, 7885, 198, 37811, 198, 834, 9800, 834, 796, 366, 41, 7258, 327, 13, 10343, 4188, 11, 9300, 47983, 5147, 1192, 15666, 1, 198, 834, 66, 20696, 834, 796, 366, 15269...
2.507205
347
import tkinter as tk from tkinter import ttk from matplotlib.pyplot import close from matplotlib.figure import Figure from matplotlib.backends.backend_tkagg import (FigureCanvasTkAgg, NavigationToolbar2Tk) from matplotlib.mathtext import math_to_image from io import BytesIO from PIL import ImageTk, Image from sympy im...
[ 11748, 256, 74, 3849, 355, 256, 74, 198, 6738, 256, 74, 3849, 1330, 256, 30488, 198, 6738, 2603, 29487, 8019, 13, 9078, 29487, 1330, 1969, 198, 6738, 2603, 29487, 8019, 13, 26875, 1330, 11291, 198, 6738, 2603, 29487, 8019, 13, 1891, 2...
2.501471
2,040
from selenium import webdriver from selenium.webdriver.chrome.service import Service from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC # from selenium.webdriver.chrome.options import Options import re impo...
[ 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 46659, 13, 15271, 1330, 4809, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 11284, 13, 9019, 1330, 5313, 32103, 21321, 198, 6738, 384, 11...
2.693603
594
import bottle import model ID_IGRE_COOKIE_NAME = 'id_igre' COOKIE_SECRET = 'my_very_special - secret key' vislice = model.Vislice() vislice.preberi_iz_datoteke() @bottle.get('/') @bottle.post('/nova_igra/') @bottle.get('/igra/') @bottle.post('/igra/') bottle.run(reloader=True, debug=True)
[ 11748, 9294, 198, 11748, 2746, 628, 198, 2389, 62, 3528, 2200, 62, 34, 15308, 10008, 62, 20608, 796, 705, 312, 62, 328, 260, 6, 198, 34, 15308, 10008, 62, 23683, 26087, 796, 705, 1820, 62, 548, 62, 20887, 532, 3200, 1994, 6, 198, ...
2.179856
139
import base64 import datetime import re import os def parse_irc_msg(s): """Breaks a message from an IRC server into its tags, prefix, command, and arguments. """ if not s: raise IRCBadMessage("Empty IRC line.") tags = {} if s.startswith("@"): s = s[1:] tags_str, s = s.split...
[ 11748, 2779, 2414, 198, 11748, 4818, 8079, 198, 11748, 302, 198, 11748, 28686, 198, 198, 4299, 21136, 62, 1980, 62, 19662, 7, 82, 2599, 198, 220, 220, 220, 37227, 12679, 4730, 257, 3275, 422, 281, 30039, 4382, 656, 663, 15940, 11, 212...
2.168937
367
from stretchme import Structure from simulation_data import data_partial from os import remove, replace import sys import numpy as np directory = '/Users/pawel/PycharmProjects/Rozciaganie/data/' proteins = {'5wyr': 248, 'trmd-no-knot': 240, 'trmd': 240, 'tm1570': 193, 'fuzja': 432} missing = {'5wyr': 14, 'trmd-no-k...
[ 6738, 7539, 1326, 1330, 32522, 198, 6738, 18640, 62, 7890, 1330, 1366, 62, 47172, 198, 6738, 28686, 1330, 4781, 11, 6330, 198, 11748, 25064, 198, 11748, 299, 32152, 355, 45941, 198, 198, 34945, 796, 31051, 14490, 14, 79, 707, 417, 14, ...
2.139059
978
# Generated by Django 3.1 on 2020-08-13 08:17 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 319, 12131, 12, 2919, 12, 1485, 8487, 25, 1558, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.892857
28
# Copyright 2019 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "LICENSE.txt" file accom...
[ 2, 15069, 13130, 6186, 13, 785, 11, 3457, 13, 393, 663, 29116, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 11074, 921, 743, 407, 779, 428, 2393, 2845, 28...
2.005427
3,317
import math from decimal import Decimal, getcontext getcontext().prec = 30 if __name__ == '__main__': v1 = Vector([8.218, -9.341]) v2 = Vector([-1.129, 2.111]) print('Add:', v1 + v2) v3 = Vector([7.119, 8.215]) v4 = Vector([-8.223, 0.878]) print('Minus:', v3 - v4) v5 = Vector([1.671, -1....
[ 11748, 10688, 198, 6738, 32465, 1330, 4280, 4402, 11, 651, 22866, 198, 198, 1136, 22866, 22446, 3866, 66, 796, 1542, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 410, 16, 796, 20650, 26933, 2...
1.938287
794
BinaryOperators = {'/' : lambda a, b: '\\frac{' + a + '}{' + b + '}'} UnaryOperators = {'sqrt' : lambda a: '\\sqrt{'+ a + '}'} read(set('2 / 4 * 3'))
[ 33, 3219, 18843, 2024, 796, 1391, 26488, 6, 1058, 37456, 257, 11, 275, 25, 705, 6852, 31944, 90, 6, 1343, 257, 1343, 705, 18477, 6, 1343, 275, 1343, 705, 92, 6, 92, 198, 3118, 560, 18843, 2024, 796, 1391, 6, 31166, 17034, 6, 1058,...
2.04
75
# file: parser.py # vim:fileencoding=utf-8:ft=python # Copyright © 2014-2021 R.F. Smith <rsmith@xs4all.nl>. All rights reserved. # SPDX-License-Identifier: BSD-2-Clause # Created: 2014-02-21 21:35:41 +0100 # Last modified: 2022-01-21T17:09:55+0100 """Parser for lamprop files.""" import copy import logging from .core i...
[ 2, 2393, 25, 30751, 13, 9078, 198, 2, 43907, 25, 7753, 12685, 7656, 28, 40477, 12, 23, 25, 701, 28, 29412, 198, 2, 15069, 10673, 1946, 12, 1238, 2481, 371, 13, 37, 13, 4176, 1279, 3808, 22947, 31, 34223, 19, 439, 13, 21283, 28401,...
2.250711
3,518
import conversion as conv
[ 11748, 11315, 355, 3063, 198 ]
5.2
5
import sys, os, cv2 import numpy as np import time, datetime import logging import copy, random, itertools from prettytable import PrettyTable import pickle import torch import torch.nn as nn from torch.utils.tensorboard import SummaryWriter from torch.utils.data import Dataset, DataLoader, ConcatDataset import config...
[ 11748, 25064, 11, 28686, 11, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 640, 11, 4818, 8079, 198, 11748, 18931, 198, 11748, 4866, 11, 4738, 11, 340, 861, 10141, 198, 6738, 2495, 11487, 1330, 20090, 10962, 198, 11748, ...
3.197015
335
from pyminion.expansions.base import estate, smithy, vassal, village from pyminion.game import Game from pyminion.players import Human
[ 6738, 12972, 1084, 295, 13, 11201, 504, 507, 13, 8692, 1330, 7964, 11, 895, 342, 88, 11, 410, 562, 282, 11, 7404, 198, 6738, 12972, 1084, 295, 13, 6057, 1330, 3776, 198, 6738, 12972, 1084, 295, 13, 32399, 1330, 5524, 628, 628, 628, ...
3.227273
44
#!/usr/bin/env python """ Solution to Project Euler Problem 3 http://projecteuler.net/ by Apalala <apalala@gmail.com> (cc) Attribution-ShareAlike http://creativecommons.org/licenses/by-sa/3.0/ Find the largest prime factor of the given number """ from factorization import factors TARGET = 600851475143 if __na...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 198, 46344, 284, 4935, 412, 18173, 20647, 513, 198, 4023, 1378, 16302, 68, 18173, 13, 3262, 14, 198, 198, 1525, 5949, 282, 6081, 1279, 499, 282, 6081, 31, 14816, 13, 785, ...
2.79845
129
#!/usr/bin/env python3 """ Classes for PWMing fans """ __author__ = "<Daniel Casner <www.danielcasner.org>" def DiscreteFan(object): "A simple fan controller with discrete PWM speeds" def __init__(self, pi, gpio, speeds=(0, 4095), phase=0): "Setup the fan" self.pi = pi self.gpio = gpio...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 198, 9487, 274, 329, 350, 22117, 278, 3296, 198, 37811, 198, 834, 9800, 834, 796, 33490, 19962, 11294, 1008, 1279, 2503, 13, 67, 6321, 34004, 1008, 13, 2398, 24618, 198, 198...
2.302041
245
#!/usr/bin/env python # -*- coding: utf-8 -*- import re import os import sys import glob import time import zipfile import signal import ConfigParser import Mobigen.Common.Log as Log; Log.Init() SHUTDOWN = False signal.signal(signal.SIGTERM, handler) signal.signal(signal.SIGINT , handler) signal.signal(signal.SIGHUP...
[ 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, 302, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 15095, 198, 11748, 640, 198, 11748, 19974, 7753, 198, ...
2.440945
254
#!/usr/bin/env python # -*- coding: utf-8 -*- """ distribute- and pip-enabled setup.py for simffa """ from distribute_setup import use_setuptools use_setuptools() from setuptools import setup import re setup( name='simffa', version='dev', include_package_data=True, install_requires=parse_requi...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 14983, 12, 290, 7347, 12, 25616, 9058, 13, 9078, 329, 985, 487, 64, 37227, 198, 198, 6738, 14983, 62, 404...
2.8125
160
import networkx as nx import codecs import json import pickle import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt from string import ascii_lowercase histogram = None for char in ['a', 'b', 'c', 'd']: for c in ascii_lowercase: filename = "hist"+char+c print("R...
[ 11748, 3127, 87, 355, 299, 87, 198, 11748, 40481, 82, 198, 11748, 33918, 198, 11748, 2298, 293, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 198, 6759, 29487, 8019, 13, 1904, 10786, 46384, 11537, 198, 11748, 2603, ...
2.05379
409
from django.urls import path from rest_framework.urlpatterns import format_suffix_patterns from api import views urlpatterns = [ path('studentdb',views.StudentDbDetail.as_view()), path('add',views.AddStudentAPIView.as_view()), path('studentdetail/<student_number>',views.GetStudentAPIView.as_view()), pa...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 1334, 62, 30604, 13, 6371, 33279, 82, 1330, 5794, 62, 37333, 844, 62, 33279, 82, 198, 6738, 40391, 1330, 5009, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 1...
2.869565
184
# Generated by Django 3.1.2 on 2020-12-18 03:43 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 17, 319, 12131, 12, 1065, 12, 1507, 7643, 25, 3559, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
import logging import pandas as pd from library.file_utils import file_md5sum
[ 11748, 18931, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 5888, 13, 7753, 62, 26791, 1330, 2393, 62, 9132, 20, 16345, 628 ]
3.24
25
import hashlib import uuid import appserversdao import constants from pymongo import MongoClient mongo = MongoClient(constants.MONGO_URI) mongodb = mongo[constants.MONGO_DATABASE] mongocollection = mongodb[constants.MONGO_USERS_COLLECTION] users = list()
[ 11748, 12234, 8019, 198, 11748, 334, 27112, 198, 11748, 598, 2655, 690, 67, 5488, 198, 11748, 38491, 198, 6738, 279, 4948, 25162, 1330, 42591, 11792, 198, 198, 76, 25162, 796, 42591, 11792, 7, 9979, 1187, 13, 27857, 11230, 62, 47269, 8,...
2.847826
92
import pytest import joblib from pathlib import Path @pytest.fixture(scope='session') @pytest.fixture(scope='module') @pytest.fixture(scope='module') @pytest.fixture(scope='module') @pytest.fixture(scope='module') @pytest.fixture(scope='session') @pytest.fixture(scope='module') @pytest.fixture(scope='m...
[ 198, 11748, 12972, 9288, 198, 11748, 1693, 8019, 198, 6738, 3108, 8019, 1330, 10644, 628, 198, 31, 9078, 9288, 13, 69, 9602, 7, 29982, 11639, 29891, 11537, 628, 198, 31, 9078, 9288, 13, 69, 9602, 7, 29982, 11639, 21412, 11537, 628, 19...
2.708134
209
import sys, os # sys.path.append(os.path.join(os.path.dirname(__file__)) #TODO: Is this a good idea? Dunno! It works! # print(os.path.join(os.path.dirname(__file__))) import argparse import markov_pilot.environment.properties as prp from markov_pilot.environment.environment import NoFGJsbSimEnv_multi, J...
[ 11748, 25064, 11, 28686, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 198, 2, 25064, 13, 6978, 13, 33295, 7, 418, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 4008, 1303, 51, 3727, 46...
2.873123
1,332
from selenium import webdriver import time import os from urllib.parse import urlparse, parse_qs from pprint import pprint BASE_DIR = os.path.dirname(os.path.abspath(__file__)) # EXECUTABLE PATH FOR PHANTOMJS(HEADLESS BROWSER) EXE_PHANTOM = os.path.join(BASE_DIR, 'webdrivers/phantomjs') def get_params(url): """...
[ 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 11748, 640, 198, 11748, 28686, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 19016, 29572, 11, 21136, 62, 48382, 198, 6738, 279, 4798, 1330, 279, 4798, 198, 198, 33, 11159, 62, 34720, 796, ...
2.39625
800
# LICENSE # # _This file is Copyright 2018 by the Image Processing and Analysis Group (BioImage Suite Team). Dept. of Radiology & Biomedical Imaging, Yale School of Medicine._ # # BioImage Suite Web is licensed under the Apache License, Version 2.0 (the "License"); # # - you may not use this software except in compl...
[ 2, 38559, 24290, 198, 2, 220, 198, 2, 4808, 1212, 2393, 318, 15069, 2864, 416, 262, 7412, 28403, 290, 14691, 4912, 357, 42787, 5159, 26264, 4816, 737, 28786, 13, 286, 5325, 12371, 1222, 8436, 35914, 48656, 11, 19681, 3961, 286, 11558, ...
3.530249
281
#!/usr/bin/env python from yaml import load, dump from collections import OrderedDict import time, os from visualize import visualize DIV = '\n'+ '='*64 + '\n' start_time = time.time() # Iterate over all conversation threads # Generates insight data on a single conversation thread # Execute one at a time in o...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 331, 43695, 1330, 3440, 11, 10285, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 11748, 640, 11, 28686, 198, 198, 6738, 38350, 1330, 38350, 198, 198, 33569, 796, 705, 5...
3.151261
119
from django.shortcuts import render_to_response from django.template import RequestContext from django.core.exceptions import ObjectDoesNotExist from django.http import HttpResponse, HttpResponseRedirect from session_csrf import anonymous_csrf from ..models import Config from ..forms import SettingsForm @anonymous_cs...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 62, 1462, 62, 26209, 198, 6738, 42625, 14208, 13, 28243, 1330, 19390, 21947, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 9515, 13921, 3673, 3109, 396, 198, 198, 6738, 42625, ...
3.755814
86
import logging import typing import warnings from typing import Dict, Text, Any, List, Optional from abc import ABC from rasa_sdk import utils from rasa_sdk.events import SlotSet, EventType from rasa_sdk.interfaces import Action logger = logging.getLogger(__name__) if typing.TYPE_CHECKING: # pragma: no cover fr...
[ 11748, 18931, 198, 11748, 19720, 198, 11748, 14601, 198, 6738, 19720, 1330, 360, 713, 11, 8255, 11, 4377, 11, 7343, 11, 32233, 198, 198, 6738, 450, 66, 1330, 9738, 198, 6738, 374, 15462, 62, 21282, 74, 1330, 3384, 4487, 198, 6738, 374...
2.37763
3,755
import cv2 import numpy as np from utils import detector_utils import tensorflow as tf import sys import cv2 (major_ver, minor_ver, subminor_ver) = (cv2.__version__).split('.') detection_graph, sess = detector_utils.load_inference_graph() sess = tf.Session(graph=detection_graph) width = 680 height = 440 flago = Fals...
[ 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 3384, 4487, 1330, 31029, 62, 26791, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 25064, 198, 11748, 269, 85, 17, 628, 220, 198, 7, 22478, 62, 332, 11, 4159, ...
2.019939
1,956
import numpy as np import pandas as pd # The file is stored at the following path: # 'https://media-doselect.s3.amazonaws.com/generic/NMgEjwkAEGGQZBoNYGr9Ld7w0/rating.csv' df = pd.read_csv('https://media-doselect.s3.amazonaws.com/generic/NMgEjwkAEGGQZBoNYGr9Ld7w0/rating.csv') df.set_index(['Office','Department'],inpla...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 2, 383, 2393, 318, 8574, 379, 262, 1708, 3108, 25, 198, 2, 705, 5450, 1378, 11431, 12, 34436, 801, 13, 82, 18, 13, 33103, 8356, 13, 785, 14, 41357, 14,...
2.466258
163
#!/usr/bin/env python # Alert state used for tests. from __future__ import absolute_import from __future__ import print_function import json import TestRsrcs class Dashboard(TestRsrcs.Rsrc): """ A class that encompasses some dashboard data used for tests """ kubeBoxPkiNameMatchString = "SomeNameToBeMache...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 23276, 1181, 973, 329, 5254, 13, 628, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 33918, 198, 1174...
3.178295
129
import pathlib import time import scipy.misc from mxnet import nd import mxnet as mx import h5py import numpy as np from mxnet import gluon class BernoulliLogLik(gluon.HybridBlock): """Calculate log probability of a Bernoulli.""" def hybrid_forward(self, F, x, logits): """Bernoulli log prob is x * log...
[ 11748, 3108, 8019, 198, 11748, 640, 198, 11748, 629, 541, 88, 13, 44374, 198, 6738, 285, 87, 3262, 1330, 299, 67, 198, 11748, 285, 87, 3262, 355, 285, 87, 198, 11748, 289, 20, 9078, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 285...
2.216682
1,103
""" This module contains machinery to annotate Notes with a "global address", the path of that note in a with respect to some global root score. Note: the annotated Notes are defined here with considerable amount of duplication with clef.py, most notably in the fact that we define a separate subclass for each note cla...
[ 37811, 198, 1212, 8265, 4909, 20230, 284, 24708, 378, 11822, 351, 257, 366, 20541, 2209, 1600, 262, 3108, 286, 326, 3465, 287, 257, 351, 2461, 284, 198, 11246, 3298, 6808, 4776, 13, 198, 198, 6425, 25, 262, 24708, 515, 11822, 389, 544...
2.970243
1,109
# Imports import re import os import glob import imageio def gifer(glob_pattern, out_fpath): """Converts a series of images into a gif in order of numerical numbers in their name""" try: paths = glob.glob(glob_pattern) paths = list(sorted(paths, \ key=lambda x: int(re.sub('[^0-9]','...
[ 2, 1846, 3742, 198, 11748, 302, 198, 11748, 28686, 198, 11748, 15095, 198, 11748, 2939, 952, 198, 198, 4299, 308, 7087, 7, 4743, 672, 62, 33279, 11, 503, 62, 69, 6978, 2599, 198, 220, 220, 220, 37227, 3103, 24040, 257, 2168, 286, 42...
2.379913
229
import bpy from . import combine_mesh, group_settings, util
[ 11748, 275, 9078, 201, 198, 6738, 764, 1330, 12082, 62, 76, 5069, 11, 1448, 62, 33692, 11, 7736, 201, 198, 201, 198 ]
2.909091
22
#!/usr/bin/env python # -*- coding: UTF-8 -*- import os import time import pandas as pd from pandas import DataFrame from base import BaseObject from base import FileIO class InversionLibraryLoader(BaseObject): """ Load Inversion Library """ __df_inversion = None __header_row = ["Id", ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 628, 198, 11748, 28686, 198, 11748, 640, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 19798, 292, 1330, 6060, 19778, 1...
2.062663
383
from django.db import models
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 628, 198 ]
3.444444
9
#!/usr/bin/env python3 # Standard Imports import os import grp import pwd import sys import glob import random import shutil import string # Module Imports import click import json from passlib.hash import pbkdf2_sha256 import requests # Initialize shutil copy function cp = shutil.copyfile # Define working director...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 8997, 1846, 3742, 198, 11748, 28686, 198, 11748, 1036, 79, 198, 11748, 279, 16993, 198, 11748, 25064, 198, 11748, 15095, 198, 11748, 4738, 198, 11748, 4423, 346, 198, 11748, ...
2.248415
10,410
import json import re from django.db import models from kubernetes_manager.consts import byte_units from kubernetes import client, config class KubernetesTelemetryMixin(models.Model): """ KubernetesTelemetryMixin :type: mixin :description: Extends child model to include telemetry features. :inher...
[ 11748, 33918, 198, 11748, 302, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 479, 18478, 3262, 274, 62, 37153, 13, 1102, 6448, 1330, 18022, 62, 41667, 198, 6738, 479, 18478, 3262, 274, 1330, 5456, 11, 4566, 628, 198, ...
2.411806
1,423
from django.conf import settings from django.db import migrations
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628, 198 ]
3.777778
18
import sys sys.path.insert(1,"../../") import h2o import math import os from tests import pyunit_utils def calculate_chunk_size(file_path, num_cols, cores, cloud_size): """ Return size of a chunk calculated for optimal data handling in h2o java backend. :param file_path: path to...
[ 11748, 25064, 198, 17597, 13, 6978, 13, 28463, 7, 16, 553, 40720, 40720, 4943, 198, 11748, 289, 17, 78, 198, 11748, 10688, 198, 11748, 28686, 198, 6738, 5254, 1330, 12972, 20850, 62, 26791, 628, 220, 220, 220, 220, 220, 220, 220, 220,...
2.435098
1,379
from mule.task import ITask import mule.util.docker_util as docker from mule.error import messages from mule.util import update_dict import re
[ 6738, 285, 2261, 13, 35943, 1330, 7283, 2093, 198, 11748, 285, 2261, 13, 22602, 13, 45986, 62, 22602, 355, 36253, 198, 6738, 285, 2261, 13, 18224, 1330, 6218, 198, 6738, 285, 2261, 13, 22602, 1330, 4296, 62, 11600, 198, 11748, 302, 19...
3.404762
42
# SPDX-FileCopyrightText: 2017 Tony DiCola for Adafruit Industries # # SPDX-License-Identifier: MIT """ `adafruit_drv2605` ==================================================== CircuitPython module for the DRV2605 haptic feedback motor driver. See examples/simpletest.py for a demo of the usage. * Author(s...
[ 2, 30628, 55, 12, 8979, 15269, 8206, 25, 2177, 8832, 6031, 28635, 329, 1215, 1878, 4872, 20171, 201, 198, 2, 201, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 17168, 201, 198, 201, 198, 37811, 201, 198, 63, 324, 1878, 4872, ...
2.174534
3,919
from sofi.ui import DescriptionDefinition
[ 6738, 523, 12463, 13, 9019, 1330, 12489, 36621, 198 ]
4.666667
9
from .button import * from settings import Colors
[ 6738, 764, 16539, 1330, 1635, 198, 6738, 6460, 1330, 29792, 628, 198 ]
4.333333
12
import pandas as pd if __name__ == '__main__': website = 'https://www.peakbagger.com/' links = pd.read_csv('raw_data/links.csv') links['full_link'] = website + links['link'] full_links = links[['Mountain', 'full_link']] full_links = full_links.rename(columns={'full_link': 'link'}) full_links.t...
[ 11748, 19798, 292, 355, 279, 67, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 3052, 796, 705, 5450, 1378, 2503, 13, 36729, 65, 7928, 13, 785, 14, 6, 628, 220, 220, 220, 6117, 796, 279, 67...
2.483221
149
import os from pathlib import Path from decouple import config, Csv import dj_database_url from functools import partial BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = config('SECRET_KEY') DEBUG = config('DEBUG', cast=bool) ALLOWED_HOSTS = config('ALLOWED_HOSTS', cast=Csv()) AUTH_USER_MODEL = 'bas...
[ 11748, 28686, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 875, 43846, 1330, 4566, 11, 327, 21370, 198, 11748, 42625, 62, 48806, 62, 6371, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 198, 33, 11159, 62, 34720, 796, 10644, 7, 834, ...
2.251134
1,764
from __future__ import print_function import fileinput import sys keys_down = [] i = 0 for line in fileinput.input(): i += 1 split_line = line.rstrip().split(' ') if len(split_line) != 2: print('Unrecognized format on line ' + str(i), file=sys.stderr) continue action = split_line...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 2393, 15414, 198, 11748, 25064, 198, 198, 13083, 62, 2902, 796, 17635, 198, 72, 796, 657, 198, 1640, 1627, 287, 2393, 15414, 13, 15414, 33529, 198, 220, 220, 220, 1312, 15853, ...
2.192488
426
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628, 198 ]
2.842105
38
#!/usr/bin/env python import sys, getopt import glob,os # sample the first 10**7 reads help_message = 'usage example: python read_phyler.py -r 1 -i /project/home/original_reads/ -o /project/home/phyler/' if __name__ == "__main__": try: opts, args = getopt.getopt(sys.argv[1:],'hr:i:o:',["inputdir="]) except: pr...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 25064, 11, 651, 8738, 198, 11748, 15095, 11, 418, 198, 198, 2, 6291, 262, 717, 838, 1174, 22, 9743, 198, 198, 16794, 62, 20500, 796, 705, 26060, 1672, 25, 21015, 1100, 62...
2.215463
789
"""Tests for the Neato init file.""" import pytest from unittest.mock import patch from homeassistant.components.neato.const import NEATO_DOMAIN, CONF_VENDOR from homeassistant.const import CONF_PASSWORD, CONF_USERNAME from homeassistant.setup import async_setup_component from tests.common import MockConfigEntry USE...
[ 37811, 51, 3558, 329, 262, 3169, 5549, 2315, 2393, 526, 15931, 198, 11748, 12972, 9288, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 198, 198, 6738, 1363, 562, 10167, 13, 5589, 3906, 13, 710, 5549, 13, 9979, 1330, 10635, 1404, ...
2.481481
918
# This module is to estimate the sequence or position biases. It provides # ways to access and save the bias parameters. import pysam import numpy as np import matplotlib.pyplot as plt class FastaFile: """docstring for FastaFile""" def get_seq(self, qref, start, stop): """get the sequence in a given ...
[ 2, 770, 8265, 318, 284, 8636, 262, 8379, 393, 2292, 29275, 13, 632, 3769, 198, 2, 2842, 284, 1895, 290, 3613, 262, 10690, 10007, 13, 198, 198, 11748, 279, 893, 321, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, ...
1.760098
7,328
from ..objects.list import ObjectList from ..objects.method import Method from .base import ResourceBase
[ 6738, 11485, 48205, 13, 4868, 1330, 9515, 8053, 198, 6738, 11485, 48205, 13, 24396, 1330, 11789, 198, 6738, 764, 8692, 1330, 20857, 14881, 628 ]
4.416667
24
from click.testing import CliRunner from reset import reset as command
[ 6738, 3904, 13, 33407, 1330, 1012, 72, 49493, 198, 6738, 13259, 1330, 13259, 355, 3141, 628 ]
4.5
16
from microbit import * SET, RUN, ALARM = range(3) state = SET while True: if state == SET: handle_set_state() elif state == RUN: handle_run_state() elif state == ALARM: handle_alarm_state()
[ 6738, 4580, 2545, 1330, 1635, 198, 198, 28480, 11, 32494, 11, 8355, 33456, 796, 2837, 7, 18, 8, 198, 5219, 796, 25823, 198, 220, 198, 4514, 6407, 25, 198, 220, 220, 220, 611, 1181, 6624, 25823, 25, 198, 220, 220, 220, 220, 220, 22...
2.257426
101
# -*- coding: utf-8 -*- ''' Copyright (c) 2014, Esteban Pardo Sánchez All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 7061, 6, 198, 15269, 357, 66, 8, 1946, 11, 10062, 1765, 272, 350, 13109, 311, 21162, 2395, 89, 198, 3237, 2489, 10395, 13, 198, 198, 7738, 396, 3890, 290, 779, 287, ...
3.323944
497
import unittest import io import os import collections import polytaxis normal_tags = {'a': set(['a'])} raw_unsized_notags = ( b'polytaxis00u\n' b'<<<<\n' b'wug' ) raw_unsized_normal = ( b'polytaxis00u\n' b'a=a\n' b'<<<<\n' b'wug' ) raw_sized_minimized_notags = ( b'polytaxis00 0000...
[ 11748, 555, 715, 395, 198, 11748, 33245, 198, 11748, 28686, 198, 11748, 17268, 198, 198, 11748, 7514, 19290, 271, 198, 198, 11265, 62, 31499, 796, 1391, 6, 64, 10354, 900, 7, 17816, 64, 6, 12962, 92, 198, 198, 1831, 62, 13271, 1143, ...
1.801047
382
import os from blockbased_synapseaware.hole_filling.components import FindPerBlockConnectedComponents from blockbased_synapseaware.hole_filling.connect import ConnectLabelsAcrossBlocks, CombineAssociatedLabels from blockbased_synapseaware.hole_filling.mapping import RemoveHoles from blockbased_synapseaware.utilities...
[ 11748, 28686, 628, 198, 198, 6738, 2512, 3106, 62, 28869, 7512, 9685, 13, 13207, 62, 69, 4509, 13, 5589, 3906, 1330, 9938, 5990, 12235, 13313, 276, 7293, 3906, 198, 6738, 2512, 3106, 62, 28869, 7512, 9685, 13, 13207, 62, 69, 4509, 13,...
3.709091
110
import os from Tkinter import IntVar, Menu, Tk import Tkinter as tk from tkMessageBox import askyesnocancel from multiprocessing import freeze_support from globalconst import RAVEN_ICON, VERSION, TITLE, BLACK, get_preferences_from_file, write_preferences_to_file from aboutbox import AboutBox from setupboard impo...
[ 11748, 28686, 201, 198, 6738, 309, 74, 3849, 1330, 2558, 19852, 11, 21860, 11, 309, 74, 201, 198, 11748, 309, 74, 3849, 355, 256, 74, 201, 198, 6738, 256, 74, 12837, 14253, 1330, 1265, 8505, 77, 420, 21130, 201, 198, 6738, 18540, 30...
3.088235
170
import pygame import sys import time from intro_controller import IntroController from settings import RESOLUTION from spacebar_controller import SpacebarController, LONGPRESS, SHORTPRESS from game_controller import ControllerResignException from gameplay_controller import GameplayController from outro_controller impo...
[ 11748, 12972, 6057, 198, 11748, 25064, 198, 11748, 640, 198, 6738, 18951, 62, 36500, 1330, 37219, 22130, 198, 6738, 6460, 1330, 15731, 3535, 35354, 198, 198, 6738, 2272, 5657, 62, 36500, 1330, 4687, 5657, 22130, 11, 44533, 32761, 11, 6006...
3.643939
132
#!/usr/bin/env python # -*- coding: utf-8 -*- from VASP import calc_files_vasp, ctrl_job_vasp, collect_vasp from QE import calc_files_qe, ctrl_job_qe, collect_qe from soiap import calc_files_soiap, ctrl_job_soiap, collect_soiap from ..IO import read_input as rin
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 569, 1921, 47, 1330, 42302, 62, 16624, 62, 85, 5126, 11, 269, 14859, 62, 21858, 62, 85, 5126, 11, 2824, ...
2.344828
116
semmed = { "AnatomicalEntity": { "affected_by": [ "ChemicalSubstance", "BiologicalProcess", "Disease", "Gene", "CellularComponent" ], "affects": [ "Disease", "BiologicalProcess" ], "causes": [...
[ 43616, 1150, 796, 1391, 198, 220, 220, 220, 366, 2025, 265, 22545, 32398, 1298, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 366, 43958, 62, 1525, 1298, 685, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 366, 41829, ...
1.613429
13,180
# Generated by Django 4.0.3 on 2022-04-12 14:56 from django.conf import settings from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 604, 13, 15, 13, 18, 319, 33160, 12, 3023, 12, 1065, 1478, 25, 3980, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14...
3.019231
52
from __future__ import unicode_literals import yaml try: from yaml import CSafeLoader as SafeLoader except ImportError: from yaml import SafeLoader from django.utils.module_loading import import_string from .settings import setting_ocr_backend, setting_ocr_backend_arguments ocr_backend = import_string( ...
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 331, 43695, 198, 198, 28311, 25, 198, 220, 220, 220, 422, 331, 43695, 1330, 9429, 8635, 17401, 355, 19978, 17401, 198, 16341, 17267, 12331, 25, 198, 220, 220, ...
2.852761
163
# -*- coding: utf-8 -*- """ Main click group for CLI """ import logging import os import sys import click from click_plugins import with_plugins # from pkg_resources import iter_entry_points import scarlett_os from scarlett_os.common.configure.ruamel_config import ConfigManager # from scarlett_os.compat import con...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 13383, 3904, 1448, 329, 43749, 198, 37811, 198, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 11748, 3904, 198, 6738, 3904, 62, 37390, 133...
2.574169
2,137
from podiomirror.transactions.transaction import Transaction, MODIFY_RELATION
[ 6738, 279, 23130, 296, 343, 1472, 13, 7645, 4658, 13, 7645, 2673, 1330, 45389, 11, 19164, 5064, 56, 62, 16448, 6234, 628 ]
3.590909
22
# Yilin Wang # pre_lecture assignment # BMES T580 import random import math print('**********************************') print(' GUESS_THAT_PRIMER GAME ') print('**********************************') print() DNA = ['A','G','C','T'] # DNA base # set the initial sequence as a empty string # the base will be added int...
[ 2, 575, 346, 259, 15233, 198, 2, 662, 62, 801, 495, 16237, 198, 2, 29944, 1546, 309, 39322, 198, 198, 11748, 4738, 198, 11748, 10688, 198, 198, 4798, 10786, 17174, 1174, 11537, 198, 4798, 10786, 220, 19348, 7597, 62, 4221, 1404, 62, ...
3.22541
732
import logging import fmcapi
[ 11748, 18931, 198, 11748, 277, 76, 11128, 72, 628 ]
3.333333
9
import re number = int(input()) pattern_valid = r"@#+[A-Z][A-Za-z0-9]{4,}[A-Z]@#+" for _ in range(number): lines = input() if re.match(pattern_valid,lines): digits = re.findall(r"\d", lines) if digits: print(f'Product group: {"".join(digits)}') else: print...
[ 11748, 302, 198, 198, 17618, 796, 493, 7, 15414, 28955, 628, 198, 33279, 62, 12102, 796, 374, 1, 41573, 10, 58, 32, 12, 57, 7131, 32, 12, 57, 64, 12, 89, 15, 12, 24, 60, 90, 19, 11, 92, 58, 32, 12, 57, 60, 41573, 10, 1, 62...
2.037037
189