content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import datetime from django.utils.timezone import utc
[ 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, 4981, 11, 15720, 602, 198, 11748, 4818, 8079, 198, 6738, 42625, ...
3.037736
53
import logging import typing from collections.abc import Iterator from enum import Enum from functools import lru_cache from typing import Any, Dict, Mapping, Tuple, TypeVar, Union import pydantic import requests from pydantic import Field, ValidationError, validator from pydantic.class_validators import make_generic_...
[ 11748, 18931, 198, 11748, 19720, 198, 6738, 17268, 13, 39305, 1330, 40806, 1352, 198, 6738, 33829, 1330, 2039, 388, 198, 6738, 1257, 310, 10141, 1330, 300, 622, 62, 23870, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 11, 337, 5912, 11, ...
2.497591
4,982
""" Test report metrics for a mapping job. """ import unittest import logging import numpy from pbcore.io import AlignmentSet, ConsensusAlignmentSet from pbcommand.models import FileTypes from pysiv2.custom.base import TestReportStatistics, setUpFindAlignments log = logging.getLogger(__name__) class TestMapping...
[ 198, 37811, 198, 14402, 989, 20731, 329, 257, 16855, 1693, 13, 198, 37811, 198, 198, 11748, 555, 715, 395, 198, 11748, 18931, 198, 198, 11748, 299, 32152, 198, 198, 6738, 279, 65, 7295, 13, 952, 1330, 978, 16747, 7248, 11, 3515, 7314,...
2.173961
1,805
import unittest from Calculator import Calculator from CsvReader import CsvReader from pprint import pprint if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 43597, 1330, 43597, 198, 6738, 327, 21370, 33634, 1330, 327, 21370, 33634, 198, 6738, 279, 4798, 1330, 279, 4798, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, ...
3.22449
49
# INSTRUCTIONS # Translate the text and write it between the " # EXAMPLE: original -> "This text is in english: value {0}" # translation -> "Aquest text està en anglès: valor {0}" # So it would look like: "ORIGINAL_TEXT" : "TRANSLATED_TEXT", # If you see sth like {0}, {1}, maintain it on th...
[ 2, 3268, 46126, 11053, 198, 198, 2, 3602, 17660, 262, 2420, 290, 3551, 340, 1022, 262, 366, 198, 2, 7788, 2390, 16437, 25, 220, 220, 220, 220, 220, 2656, 220, 220, 220, 4613, 220, 366, 1212, 2420, 318, 287, 46932, 25, 1988, 1391, ...
2.394674
7,510
# some small tests to see whether sets are there and work from py.builtin import set, frozenset
[ 2, 617, 1402, 5254, 284, 766, 1771, 5621, 389, 612, 290, 670, 198, 198, 6738, 12972, 13, 18780, 259, 1330, 900, 11, 8400, 8247, 316, 198 ]
3.730769
26
import os DATA_FOLDER = 'data' TRAIN_CSV = os.path.join(DATA_FOLDER, 'train.csv') VAL_CSV = os.path.join(DATA_FOLDER, 'val.csv') MODEL_FOLDER = 'models' SAVED_ESTIMATOR = os.path.join(MODEL_FOLDER, 'LGBMClassifier.pickle')
[ 11748, 28686, 198, 198, 26947, 62, 37, 3535, 14418, 796, 705, 7890, 6, 198, 51, 3861, 1268, 62, 7902, 53, 796, 28686, 13, 6978, 13, 22179, 7, 26947, 62, 37, 3535, 14418, 11, 705, 27432, 13, 40664, 11537, 198, 23428, 62, 7902, 53, ...
2.133333
105
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Nov 8 19:23:20 2020 @author: alfredocu """ import numpy as np import matplotlib.pyplot as plt from matplotlib.colors import ListedColormap from sklearn.model_selection import train_test_split from sklearn.preprocessing import StandardScaler from sklear...
[ 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, 3825, 5267, 807, 678, 25, 1954, 25, 1238, 12131, 198, 198, 31, 9800, 25, 435, 39193, 420,...
2.345881
1,408
import unittest import im_lib import numpy #class CountObjectsTest(unittest.TestCase): #@classmethod #def setUpClass(clc): #print("\nRunning CountObjects class setUp...") #@classmethod #def tearDownClass(clc): #print("\nRunning CountObjects class tearDown...") #def setUp(sel...
[ 11748, 555, 715, 395, 198, 11748, 545, 62, 8019, 198, 11748, 299, 32152, 628, 628, 628, 198, 2, 4871, 2764, 10267, 82, 14402, 7, 403, 715, 395, 13, 14402, 20448, 2599, 628, 220, 220, 220, 1303, 31, 4871, 24396, 198, 220, 220, 220, ...
2.324201
219
from docutils import nodes from docutils.parsers.rst import directives CODE = """\ <object width="%(width)i" height="%(height)i"> <param name="flashvars" value="offsite=true&lang=en-us&page_show_url=%2Fphotos%2F75341362%40N04%2Fsets%2F72157629059614751%2Fshow%2F&page_show_back_url=%2Fphotos%2F75341362%40N04%2Fsets%2...
[ 6738, 2205, 26791, 1330, 13760, 198, 6738, 2205, 26791, 13, 79, 945, 364, 13, 81, 301, 1330, 34819, 198, 198, 34, 16820, 796, 37227, 59, 198, 198, 27, 15252, 9647, 2625, 4, 7, 10394, 8, 72, 1, 6001, 2625, 4, 7, 17015, 8, 72, 532...
2.352018
892
''' Convolutional AutoEncoder This code serves to load a pretrained model and to train for more epochs with selected data. ''' import LRsymmetrizer as sym import tensorflow as tf import tensorflow.keras as keras from keras.preprocessing import image from keras.models import Model, model_from_json, load_model import os,...
[ 7061, 6, 198, 3103, 85, 2122, 282, 11160, 27195, 12342, 198, 1212, 2438, 9179, 284, 3440, 257, 2181, 13363, 2746, 290, 284, 4512, 329, 517, 36835, 82, 351, 198, 34213, 1366, 13, 198, 7061, 6, 198, 11748, 37491, 1837, 3020, 316, 380, ...
2.403009
1,263
from .trial_scheduler import TrialScheduler from .online_scheduler import OnlineScheduler, OnlineSuccessiveDoublingScheduler, ChaChaScheduler
[ 6738, 764, 45994, 62, 1416, 704, 18173, 1330, 21960, 50, 1740, 18173, 198, 6738, 764, 25119, 62, 1416, 704, 18173, 1330, 7467, 50, 1740, 18173, 11, 7467, 33244, 425, 40287, 11108, 50, 1740, 18173, 11, 20703, 1925, 64, 50, 1740, 18173, ...
3.380952
42
#Chapter 9 notes #1 #states = {} <- dictionary #states = {"Virginia": "Richmond", "Maryland": "Annapolis", "New York": "Albany"} #print states . . . {'Maryland': 'Annapolis', 'New York': 'Albany', 'Virginia': 'Richmond'} #states['Oregon'] = 'Salem' <- adding something to the dictionary #states.pop(Oregon) = Salem; Stat...
[ 2, 14126, 860, 4710, 198, 2, 16, 198, 2, 27219, 796, 23884, 24293, 22155, 198, 2, 27219, 796, 19779, 41017, 1298, 366, 14868, 6327, 1600, 366, 24119, 1044, 1298, 366, 18858, 11174, 1600, 366, 3791, 1971, 1298, 366, 2348, 65, 1092, 206...
2.505447
459
# Copyright Fortior Blockchain, LLLP 2021 # Imports import numpy as np import pandas as pd from pandas_datareader import data ALGO = data.DataReader("ALGO-USD", start='2019-9-18', end='2021-9-14', data_source='yahoo') import matplotlib.pyplot as p...
[ 2, 15069, 6401, 1504, 29724, 11, 406, 3069, 47, 33448, 198, 198, 2, 1846, 3742, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 19798, 292, 62, 19608, 533, 5067, 1330, 1366, 198, 1847, 11230, 796, ...
2.354497
1,134
import base64 import csv import json import os from google.oauth2 import service_account from googleapiclient.discovery import build if __name__ == "__main__": spreadsheet_id = os.environ["SPREADSHEET_ID"] range_name = os.environ["RANGE_NAME"] credential = os.environ["GDOCS_SERVICE_ACCOUNT"] cre...
[ 11748, 2779, 2414, 198, 11748, 269, 21370, 198, 11748, 33918, 198, 11748, 28686, 198, 198, 6738, 23645, 13, 12162, 1071, 17, 1330, 2139, 62, 23317, 198, 6738, 23645, 499, 291, 75, 1153, 13, 67, 40821, 1330, 1382, 628, 628, 628, 198, 3...
2.820809
173
# Generated by Django 2.2.4 on 2019-08-25 02:20 from django.db import migrations
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 19, 319, 13130, 12, 2919, 12, 1495, 7816, 25, 1238, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628 ]
2.766667
30
"""Types.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import apache_beam as beam import numpy as np from tensorflow_data_validation.types_compat import Dict, Text, Union FeatureName = Union[bytes, Text] # Feature type enum value. FeatureNameStati...
[ 37811, 31431, 526, 15931, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 2471, 4891, 62, 40045, 355, 15584, 1...
3.438202
178
# Relative imports from ._estimator import CanonicalRNNEstimator __all__ = ["CanonicalRNNEstimator"]
[ 2, 45344, 17944, 198, 6738, 47540, 395, 320, 1352, 1330, 19507, 605, 49, 6144, 22362, 320, 1352, 198, 198, 834, 439, 834, 796, 14631, 6090, 261, 605, 49, 6144, 22362, 320, 1352, 8973, 198 ]
3
34
""" Transitions for Nivre's parser The parser state consists of the stack, the queue, and the partial graph The partial graph is represented as a dictionary """ __author__ = "Pierre Nugues" import conll import dparser def shift(stack, queue, graph): """ Shift the first word in the queue onto the stack :...
[ 37811, 198, 8291, 1756, 329, 399, 452, 260, 338, 30751, 198, 464, 30751, 1181, 10874, 286, 262, 8931, 11, 262, 16834, 11, 290, 262, 13027, 4823, 198, 464, 13027, 4823, 318, 7997, 355, 257, 22155, 198, 37811, 198, 198, 834, 9800, 834, ...
2.523453
1,471
import torch import torch.nn as nn import torch.nn.functional as F from models.utils import print_debug from misc.utils import PRINT from models.utils import weights_init from misc.normalization import AdainResBlk, ResBlk, MODResBlk, Conv2DMod import numpy as np # ----------------- # # --- GENERATOR --- # # --------...
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 6738, 4981, 13, 26791, 1330, 3601, 62, 24442, 198, 6738, 12747, 13, 26791, 1330, 4810, 12394, 198, 6738, 4981, 13, 26791, ...
3.387755
98
import pytest from sme_financing.main import create_app, db @pytest.fixture(scope="session") @pytest.fixture(scope="session") @pytest.fixture(scope="session") @pytest.fixture(scope="class")
[ 11748, 12972, 9288, 198, 198, 6738, 895, 68, 62, 15643, 5077, 13, 12417, 1330, 2251, 62, 1324, 11, 20613, 628, 198, 31, 9078, 9288, 13, 69, 9602, 7, 29982, 2625, 29891, 4943, 628, 198, 31, 9078, 9288, 13, 69, 9602, 7, 29982, 2625, ...
2.763889
72
""" Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. Example: Input: [ 1->4->5, 1->3->4, 2->6 ] Output: 1->1->2->3->4->4->5->6 """ # Definition for singly-linked list. # class ListNode(object): # def __init__(self, x): # self.val = x # self....
[ 37811, 198, 13102, 469, 479, 23243, 6692, 8341, 290, 1441, 340, 355, 530, 23243, 1351, 13, 16213, 2736, 290, 6901, 663, 13357, 13, 198, 198, 16281, 25, 198, 198, 20560, 25, 198, 58, 198, 220, 352, 3784, 19, 3784, 20, 11, 198, 220, ...
2.469388
147
# -*- coding: utf-8 -*-
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628 ]
1.785714
14
from PyQt5.QtWidgets import QMainWindow, QApplication from PyQt5 import QtGui from UI.ui_updater import Ui_MainWindow from database import Settings
[ 6738, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 1330, 1195, 13383, 27703, 11, 1195, 23416, 198, 6738, 9485, 48, 83, 20, 1330, 33734, 8205, 72, 198, 6738, 12454, 13, 9019, 62, 929, 67, 729, 1330, 471, 72, 62, 13383, 27703, 198,...
3.040816
49
class MouseEventArgs(EventArgs): """ Provides data for the System.Windows.Forms.Control.MouseUp,System.Windows.Forms.Control.MouseDown,and System.Windows.Forms.Control.MouseMove events. MouseEventArgs(button: MouseButtons,clicks: int,x: int,y: int,delta: int) """ def Instance(self): """ This function ...
[ 4871, 21839, 9237, 42035, 7, 9237, 42035, 2599, 201, 198, 37227, 201, 198, 47081, 1366, 329, 262, 4482, 13, 11209, 13, 8479, 82, 13, 15988, 13, 39643, 4933, 11, 11964, 13, 11209, 13, 8479, 82, 13, 15988, 13, 39643, 8048, 11, 392, 44...
2.957006
628
# MIT License # Copyright (c) 2018 Hotox # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the 'Software'), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish,...
[ 2, 17168, 13789, 198, 198, 2, 15069, 357, 66, 8, 2864, 6964, 1140, 198, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 2, 286, 428, 3788, 290, 3917, 10314, 3696, 357, 1169, 70...
3.580046
431
import random,json
[ 11748, 4738, 11, 17752 ]
4.5
4
if __name__ == '__main__': import requests import json url = ('http://newsapi.org/v2/top-headlines?' 'country=us&' 'apiKey=9b8a6a83887b4da4ace3d23b91e57e89') response = requests.get(url) text = response.text my_json = json.loads(text) for ...
[ 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 628, 198, 220, 220, 220, 220, 220, 220, 1330, 7007, 198, 220, 220, 220, 220, 220, 220, 1330, 33918, 628, 220, 220, 220, 220, 220, 220, 19016, 796, 19203, 4023, 1378, 108...
1.88835
206
from djongo import models from django.contrib.auth.models import User
[ 6738, 42625, 25162, 1330, 4981, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 220, 220, 220, 220 ]
3.217391
23
# -*- coding:utf-8 -*- from __future__ import with_statement import os import argparse from fabric.api import * from fabric.contrib.console import confirm # add fabric function here if __name__ == '__main__': parser = argparse.ArgumentParser() # add argument to parser # parser.add_argument() args =...
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 198, 6738, 11593, 37443, 834, 1330, 351, 62, 26090, 198, 198, 11748, 28686, 198, 11748, 1822, 29572, 198, 198, 6738, 9664, 13, 15042, 1330, 1635, 198, 6738, 9664, 13, 3642, ...
2.946667
150
import logging from datetime import datetime, timedelta from typing import Any, List, Optional from fastapi import APIRouter, Depends, HTTPException, Security, status from fastapi.security import OAuth2PasswordRequestForm from jose import JWTError, jwt from passlib.context import CryptContext from pydantic import Base...
[ 11748, 18931, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 6738, 19720, 1330, 4377, 11, 7343, 11, 32233, 198, 198, 6738, 3049, 15042, 1330, 3486, 4663, 39605, 11, 2129, 2412, 11, 14626, 16922, 11, 4765, 11, 3722, 198,...
2.801538
650
t=int(input()) while(t>0): t=t-1 n=int(input()) a=input().split() for i in range(n): a[i]=int(a[i]) b=[0] c=0 d=0 for i in range(-1,-n,-1): if(a[i]==a[i-1]): c=c+0 d=d+1 else: c=c+1+d d=0 b.appen...
[ 83, 28, 600, 7, 15414, 28955, 198, 4514, 7, 83, 29, 15, 2599, 198, 220, 220, 220, 256, 28, 83, 12, 16, 198, 220, 220, 220, 299, 28, 600, 7, 15414, 28955, 198, 220, 220, 220, 257, 28, 15414, 22446, 35312, 3419, 198, 220, 220, 2...
1.413793
290
from tictactoe.game.play import Game
[ 6738, 256, 713, 529, 2577, 13, 6057, 13, 1759, 1330, 3776, 198 ]
3.083333
12
""" Currently just a stupid bridge between twisted.logger and user applications """ # from logging import getLogger as stdlib_getLogger, Logger from twisted import logger def getLogger(namespace: str = None) -> logger.Logger: """ Just an adapted to mimic python's logging getLogger to twisted's Logger...
[ 37811, 198, 220, 220, 220, 16888, 655, 257, 8531, 7696, 1022, 19074, 13, 6404, 1362, 290, 2836, 5479, 198, 198, 37811, 198, 2, 422, 18931, 1330, 651, 11187, 1362, 355, 14367, 8019, 62, 1136, 11187, 1362, 11, 5972, 1362, 198, 6738, 190...
3.205882
136
"""This module contains monitor genrules.""" load("//lib/bazel:py_rules.bzl", "py_binary")
[ 37811, 1212, 8265, 4909, 5671, 2429, 38785, 526, 15931, 198, 198, 2220, 7203, 1003, 8019, 14, 65, 41319, 25, 9078, 62, 38785, 13, 65, 48274, 1600, 366, 9078, 62, 39491, 4943, 198 ]
2.875
32
import models import re from . import base from . import tasks_fetch_currency_exchange from abc import abstractproperty from typing import TypeVar, List, Optional
[ 11748, 4981, 198, 11748, 302, 198, 198, 6738, 764, 1330, 2779, 198, 6738, 764, 1330, 8861, 62, 69, 7569, 62, 34415, 62, 1069, 3803, 198, 6738, 450, 66, 1330, 12531, 26745, 198, 6738, 19720, 1330, 5994, 19852, 11, 7343, 11, 32233 ]
3.97561
41
#!/usr/bin/env python from PyQt4 import QtGui from parse_qca import parse_qca_file from auxil import qca_to_coef, hash_problem import sys from pprint import pprint from random import shuffle import numpy as np # #class QCACell(QtGui.QWidget): # ''' ''' # # def __init__(self, parent=None): #...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 201, 198, 6738, 9485, 48, 83, 19, 1330, 33734, 8205, 72, 201, 198, 6738, 21136, 62, 80, 6888, 1330, 21136, 62, 80, 6888, 62, 7753, 201, 198, 6738, 27506, 346, 1330, 10662, 6888,...
1.773555
1,263
import numpy as np from matplotlib import pyplot as plt from sklearn.gaussian_process import GaussianProcessRegressor from sklearn.gaussian_process.kernels import RBF, ConstantKernel as C np.random.seed(1) # First the noiseless case X = np.array([3.]) # Observations y = np.array([0.]) # Mesh the input space for ...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 83, 198, 198, 6738, 1341, 35720, 13, 4908, 31562, 62, 14681, 1330, 12822, 31562, 18709, 8081, 44292, 198, 6738, 1341, 35720, 13, 4908, 31562, 62, ...
2.464789
781
from django.shortcuts import render def home(request): """ Home page for Tethys Datasets """ context = {} return render(request, 'tethys_datasets/home.html', context)
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 628, 198, 4299, 1363, 7, 25927, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 5995, 2443, 329, 309, 2788, 893, 16092, 292, 1039, 198, 220, 220, 220, 37227, 198, 220, 220, 220, ...
2.714286
70
""" Unit and regression test for the convert module of the molsysmt package. """ # Import package, test suite, and other packages as needed import molsysmt as msm import numpy as np import os # Whole systems (selection='all' and structure_indices='all') # Selection ## Multiple outputs
[ 37811, 198, 26453, 290, 20683, 1332, 329, 262, 10385, 8265, 286, 262, 285, 10220, 893, 16762, 5301, 13, 198, 37811, 198, 198, 2, 17267, 5301, 11, 1332, 18389, 11, 290, 584, 10392, 355, 2622, 198, 11748, 285, 10220, 893, 16762, 355, 28...
3.62963
81
import numpy as np from .. import get_spaced_index_list from ..features import BinaryForegroundMaskComputer class ForegroundSizeScorer(object): """Scores the size of the foreground as a percentage of the average mask size over the entire frame area.""" def score_foreground_size(self, fg_masks): """S...
[ 11748, 299, 32152, 355, 45941, 198, 198, 6738, 11485, 1330, 651, 62, 2777, 2286, 62, 9630, 62, 4868, 198, 6738, 11485, 40890, 1330, 45755, 16351, 2833, 45195, 34556, 628, 198, 4871, 4558, 2833, 10699, 3351, 11934, 7, 15252, 2599, 198, 2...
2.843215
759
#!/usr/bin/env python3 # bkmk.py # Author: Lorenzo Van Muñoz # Last updated Dec 31, 2020 ''' A script to generate pdf bookmarks in cpdf,gs,pdftk syntaxes This script uses regular expressions to identify relevant bookmark information and to typeset the syntaxes. It also supports conversion between the different suppo...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 275, 13276, 74, 13, 9078, 198, 2, 6434, 25, 41721, 6656, 8252, 12654, 8590, 198, 2, 4586, 6153, 4280, 3261, 11, 12131, 198, 198, 7061, 6, 198, 32, 4226, 284, 7716, 3712...
2.314805
9,193
from django.conf.urls import url from .views import OrganizationDetailView, OrganizationListView urlpatterns = [ url(r'^(?P<slug>[-\w]+)/$', OrganizationDetailView.as_view(), name='organization_detail'), url(r'^$', OrganizationListView.as_view(), name='organization_list'), ]
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 198, 6738, 764, 33571, 1330, 12275, 11242, 603, 7680, 11, 12275, 8053, 7680, 628, 198, 6371, 33279, 82, 796, 685, 628, 220, 220, 220, 19016, 7, 81, 6, 61, 7, 30, 47, 2...
2.9
100
# -*- coding: utf-8 -*- # copyright: sktime developers, BSD-3-Clause License (see LICENSE file) """ Base class template for transformers. class name: BaseTransformer Covers all types of transformers. Type and behaviour of transformer is determined by the following tags: "scitype:transform-input" tag with valu...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 6634, 25, 1341, 2435, 6505, 11, 347, 10305, 12, 18, 12, 2601, 682, 13789, 357, 3826, 38559, 24290, 2393, 8, 198, 37811, 198, 14881, 1398, 11055, 329, 6121, 364, 13,...
2.338188
18,815
""" The h5 module is organized like the resulting h5 file's groups. """
[ 37811, 198, 464, 289, 20, 8265, 318, 8389, 588, 262, 7186, 289, 20, 2393, 338, 2628, 13, 198, 37811 ]
3.736842
19
import sys import json import argparse from os import path sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) from reducers.topk import TopkReducer if __name__ == '__main__': parser = argparse.ArgumentParser( description='Top K reducer NBA', formatter_cla...
[ 11748, 25064, 198, 11748, 33918, 198, 11748, 1822, 29572, 198, 6738, 28686, 1330, 3108, 198, 198, 17597, 13, 6978, 13, 33295, 7, 6978, 13, 15908, 3672, 7, 6978, 13, 15908, 3672, 7, 6978, 13, 397, 2777, 776, 7, 834, 7753, 834, 35514, ...
2.035417
480
import contextlib from typing import Dict, Iterable, Optional, Tuple, List, Any, Type, Hashable, \ NamedTuple, Generator, Callable from unittest import mock from unittest.mock import MagicMock, Mock import structlog import pykube import pytest from _pytest.fixtures import FixtureRequest from k8s_snapshots import ...
[ 11748, 4732, 8019, 198, 6738, 19720, 1330, 360, 713, 11, 40806, 540, 11, 32233, 11, 309, 29291, 11, 7343, 11, 4377, 11, 5994, 11, 21059, 540, 11, 3467, 198, 220, 220, 220, 34441, 51, 29291, 11, 35986, 11, 4889, 540, 198, 6738, 555, ...
2.155219
1,849
import os import sys import subprocess import traceback class ConfigParams(object): """This class is used to create different confiuration space for jetson tx1 """ def set_big_core_status(self, cpu_name, status): """This function is used set core status (enable or disable) @input: ...
[ 11748, 28686, 220, 198, 11748, 25064, 198, 11748, 850, 14681, 198, 11748, 12854, 1891, 198, 198, 4871, 17056, 10044, 4105, 7, 15252, 2599, 198, 220, 220, 220, 37227, 1212, 1398, 318, 973, 284, 2251, 1180, 1013, 72, 3924, 2272, 329, 2079...
1.999554
4,483
from django.urls import path from .views import index, InsertSampleDataView, \ GenreListView, GenreDetailView, GenreUpdateView, GenreDeleteView, GenreCreateView, \ AuthorListView, AuthorDetailView, AuthorUpdateView, AuthorDeleteView, AuthorCreateView, \ ArtworkListView, ArtworkDetailView, ArtworkUpdateView,...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 764, 33571, 1330, 6376, 11, 35835, 36674, 6601, 7680, 11, 3467, 198, 220, 220, 220, 5215, 260, 8053, 7680, 11, 5215, 260, 11242, 603, 7680, 11, 5215, 260, 10260, 7680, 11, 5215,...
2.829303
703
#\\ --- backslash print("I am here for the backslash\\")
[ 2, 6852, 11420, 736, 6649, 1077, 201, 198, 4798, 7203, 40, 716, 994, 329, 262, 736, 6649, 1077, 6852, 4943, 201, 198 ]
2.681818
22
from django.contrib import admin from applications.office_panel.models import Patient admin.site.register(Patient)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 6738, 5479, 13, 31810, 62, 35330, 13, 27530, 1330, 35550, 198, 198, 28482, 13, 15654, 13, 30238, 7, 12130, 1153, 8, 198 ]
3.65625
32
from catalog.tasks import scan_catalog, update_catalog from chibi_gob_mx import catalog import datetime import unittest from unittest.mock import patch, Mock from catalog.factories import ( Catalog as Catalog_factory, Catalog_with_id as Catalog_with_id_factory ) from catalog.models import Catalog_pulse, Cat...
[ 6738, 18388, 13, 83, 6791, 1330, 9367, 62, 9246, 11794, 11, 4296, 62, 9246, 11794, 198, 6738, 442, 27567, 62, 44270, 62, 36802, 1330, 18388, 628, 198, 198, 11748, 4818, 8079, 198, 11748, 555, 715, 395, 198, 6738, 555, 715, 395, 13, ...
3.215686
102
# Edinburgh bus tracker - simple example output to a shell # (c) Mark Pentler 2017 from edinbustrack import * import os from time import sleep # setup our variables first. stop id and url are definable in case they change them stop_id = "36232626" # grabbed from the mybustracker website stop_name = get_stop_name(stop...
[ 2, 23475, 1323, 30013, 532, 2829, 1672, 5072, 284, 257, 7582, 198, 2, 357, 66, 8, 2940, 9696, 1754, 2177, 198, 198, 6738, 1225, 259, 65, 436, 39638, 1330, 1635, 198, 11748, 28686, 198, 6738, 640, 1330, 3993, 198, 198, 2, 9058, 674, ...
3.269406
219
""" Unittests for nodes.feature_generation"""
[ 37811, 791, 715, 3558, 329, 13760, 13, 30053, 62, 20158, 37811, 198 ]
3.833333
12
import numpy as np import pandas as pd from sklearn.gaussian_process.kernels import RBF, ExpSineSquared from darts.models import GaussianProcessFilter from darts.models.filtering.moving_average import MovingAverage from darts.models.filtering.kalman_filter import KalmanFilter from darts import TimeSeries from darts.ut...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 1341, 35720, 13, 4908, 31562, 62, 14681, 13, 74, 44930, 1330, 17986, 37, 11, 5518, 50, 500, 22266, 1144, 198, 198, 6738, 47807, 13, 27530, 1330, 12822, 31...
3.414141
198
import torch.nn as nn from .base_model import Up_Conv_Block class Decoder(nn.Module): """ Args: N_p (int): The sum of the poses N_z (int): The dimensions of the noise """
[ 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 764, 8692, 62, 19849, 1330, 3205, 62, 3103, 85, 62, 12235, 628, 198, 4871, 34580, 7, 20471, 13, 26796, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 943, 14542, 25, 198, 220, ...
2.364706
85
""" Copyright (c) 2021, NVIDIA 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 ...
[ 37811, 198, 15069, 357, 66, 8, 33448, 11, 15127, 23929, 44680, 6234, 13, 198, 220, 198, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, ...
2.26087
782
# -*- coding: utf-8 -*- """ Detect genes using blast Revision history: ---------------- 2020-02-13: Amromics created """ from __future__ import division, print_function, absolute_import import subprocess import os, shutil, glob import re import sys import argparse def blast(sample,db,output, identity=90, threads...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 220, 220, 220, 35874, 10812, 1262, 11975, 628, 198, 18009, 1166, 2106, 25, 198, 1783, 198, 42334, 12, 2999, 12, 1485, 25, 1703, 398, 873, 2727, 198, 198, 3...
2.099928
1,391
############################################################################# # Copyright (c) 2018 Eli Polonsky. All rights reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http...
[ 29113, 29113, 7804, 4242, 2, 198, 2, 15069, 357, 66, 8, 2864, 25204, 2165, 684, 2584, 13, 1439, 2489, 10395, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 40...
4.024896
241
from hamcrest import * try: except TypeError: print 'Object class defined at ' + getattr(object, '__file__', 'NOWHERE') raise
[ 6738, 8891, 66, 2118, 1330, 1635, 198, 198, 28311, 25, 198, 16341, 5994, 12331, 25, 198, 220, 220, 220, 3601, 705, 10267, 1398, 5447, 379, 705, 1343, 651, 35226, 7, 15252, 11, 705, 834, 7753, 834, 3256, 705, 45669, 39, 9338, 11537, ...
2.8125
48
# -*- coding: utf-8 -*- ''' File name: code\lowestcost_search\sol_328.py Author: Vaidic Joshi Date created: Oct 20, 2018 Python Version: 3.x ''' # Solution to Project Euler Problem #328 :: Lowest-cost Search # # For more information see: # https://projecteuler.net/problem=328 # Problem Statement ''...
[ 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 7061, 6, 198, 220, 220, 220, 9220, 1438, 25, 2438, 59, 9319, 395, 15805, 62, 12947, 59, 34453, 62, 34256, 13, 9078, 198, 220, 220, 220, 6434, 25, 569, 1698, 291...
3.44152
684
import chainer import chainer.functions as F import chainer.links as L import numpy as np
[ 11748, 6333, 263, 198, 11748, 6333, 263, 13, 12543, 2733, 355, 376, 198, 11748, 6333, 263, 13, 28751, 355, 406, 198, 11748, 299, 32152, 355, 45941, 198 ]
3.333333
27
import pytest from foreshadow.cachemanager import CacheManager from foreshadow.utils import get_transformer from foreshadow.utils.testing import get_file_path @pytest.fixture() def smart_child(): """Get a defined SmartTransformer subclass, TestSmartTransformer. Note: Always returns StandardScaler...
[ 11748, 12972, 9288, 198, 198, 6738, 1674, 19106, 13, 23870, 37153, 1330, 34088, 13511, 198, 6738, 1674, 19106, 13, 26791, 1330, 651, 62, 7645, 16354, 198, 6738, 1674, 19106, 13, 26791, 13, 33407, 1330, 651, 62, 7753, 62, 6978, 628, 628,...
2.645479
5,176
import h2o h2o.init() datasets = "https://raw.githubusercontent.com/DarrenCook/h2o/bk/datasets/" data = h2o.import_file(datasets + "iris_wheader.csv") y = "class" x = data.names x.remove(y) train, valid, test = data.split_frame([0.75,0.15]) from h2o.estimators.random_forest import H2ORandomForestEstimator m = H2ORand...
[ 11748, 289, 17, 78, 198, 71, 17, 78, 13, 15003, 3419, 198, 198, 19608, 292, 1039, 796, 366, 5450, 1378, 1831, 13, 12567, 43667, 13, 785, 14, 32708, 918, 28937, 14, 71, 17, 78, 14, 65, 74, 14, 19608, 292, 1039, 30487, 198, 7890, ...
2.39207
227
from __future__ import division def strongly_connected_components( successors_by_node, omit_single_node_components=True, low_infinite=2**30): """ successors_by_node = { "node1": ["successor1", "successor2"], "node2": ["successor1", "successor3"] } http://en.wikipedia.org/wiki/Tarjan%27s_strong...
[ 6738, 11593, 37443, 834, 1330, 7297, 198, 198, 4299, 7634, 62, 15236, 62, 5589, 3906, 7, 198, 220, 220, 220, 220, 220, 41491, 62, 1525, 62, 17440, 11, 198, 220, 220, 220, 220, 220, 42848, 62, 29762, 62, 17440, 62, 5589, 3906, 28, ...
2.807692
234
# Misc functions to operate on fasta files in the frame of the A. castellanii # genome analysis project # cmdoret, 20190502 from Bio import SeqIO from BCBio import GFF import time import re import os def safe_request(fun): """ Wraps function requesting data to allow safe errors and retry. Parameters ...
[ 2, 29882, 5499, 284, 8076, 319, 3049, 64, 3696, 287, 262, 5739, 286, 262, 317, 13, 3350, 695, 3216, 72, 198, 2, 19270, 3781, 1628, 198, 2, 23991, 9997, 11, 580, 3829, 35126, 198, 6738, 16024, 1330, 1001, 80, 9399, 198, 6738, 11843, ...
2.343445
1,945
import unittest from expression_builder.expression_builder import ExpressionBuilder # noinspection PyPep8Naming
[ 11748, 555, 715, 395, 198, 198, 6738, 5408, 62, 38272, 13, 38011, 62, 38272, 1330, 41986, 32875, 628, 198, 220, 220, 220, 1303, 645, 1040, 14978, 9485, 47, 538, 23, 45, 3723, 198 ]
3.606061
33
# Static typing from typing import List def getTrackName(apiResponse) -> List[str]: ''' This function returns the string name of a single track from the reponse provided by the spotify API. https://developer.spotify.com/console/get-playlist-tracks/ ''' name = apiResponse['track']['name'] artist...
[ 2, 36125, 19720, 198, 6738, 19720, 1330, 7343, 198, 198, 4299, 651, 24802, 5376, 7, 15042, 31077, 8, 4613, 7343, 58, 2536, 5974, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 770, 2163, 5860, 262, 4731, 1438, 286, 257, 2060, 26...
2.87027
185
RD_VERSION = 0x00 WRITE_INFO = 0x01 READ_INFO = 0x02 SEND_RAW = 0x03
[ 198, 35257, 62, 43717, 796, 657, 87, 405, 198, 18564, 12709, 62, 10778, 796, 657, 87, 486, 198, 15675, 62, 10778, 220, 796, 657, 87, 2999, 198, 50, 10619, 62, 20530, 796, 657, 87, 3070, 628 ]
2
36
from django.contrib.auth.backends import BaseBackend from django.contrib.auth.models import User from integrations.discord.models import DiscordCommunity, DiscordUser from urllib import parse import urllib.request import json import logging logger = logging.getLogger(__name__)
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 1891, 2412, 1330, 7308, 7282, 437, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 4132, 9143, 13, 15410, 585, 13, 27530, 1330, 39462, 20012, 11, ...
3.531646
79
from epiinfo import CSUtilities from epiinfo import randata
[ 6738, 2462, 72, 10951, 1330, 9429, 18274, 2410, 198, 6738, 2462, 72, 10951, 1330, 43720, 1045, 198 ]
3.529412
17
# Q = int(input()) while (True): try: x,n = input().split() x = float(x) n = int(n) print( '{:.4f}'.format(search(x,n)) ) except: break
[ 198, 2, 1195, 796, 493, 7, 15414, 28955, 198, 4514, 357, 17821, 2599, 198, 197, 28311, 25, 198, 197, 197, 87, 11, 77, 796, 5128, 22446, 35312, 3419, 198, 197, 197, 87, 796, 12178, 7, 87, 8, 198, 197, 197, 77, 796, 493, 7, 77, ...
1.935065
77
# !usr/bin/env python # -*- coding:utf-8 -*- if __name__ == "__main__": print("hello")
[ 198, 2, 5145, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 220, 532, 9, 12, 628, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 3601, 7203, 31373, 4943, ...
2.155556
45
if __name__ == '__main__': with open("input.txt", 'r') as f: data = f.readlines() dancers="abcdefghijklmnop" print(dancers) instructions = data[0].strip().split(',') for i in range(0, 1000000000): for instruction in instructions: command=instruction[0] pars ...
[ 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 351, 1280, 7203, 15414, 13, 14116, 1600, 705, 81, 11537, 355, 277, 25, 198, 220, 220, 220, 220, 220, 220, 220, 1366, 796, 277, 13, 961, 6615, 3419, 628, ...
1.821317
638
# SyntaxError: annotated name 'var' can't be global var = 0 foo()
[ 2, 26375, 897, 12331, 25, 24708, 515, 1438, 705, 7785, 6, 460, 470, 307, 3298, 198, 198, 7785, 796, 657, 198, 21943, 3419 ]
2.869565
23
import ast import pkg_resources import unittest from rgkit.settings import settings from rgkit import rg map_data = ast.literal_eval( open(pkg_resources.resource_filename('rgkit', 'maps/default.py')).read()) settings.init_map(map_data)
[ 11748, 6468, 198, 11748, 279, 10025, 62, 37540, 198, 11748, 555, 715, 395, 198, 198, 6738, 48670, 15813, 13, 33692, 1330, 6460, 198, 6738, 48670, 15813, 1330, 48670, 198, 198, 8899, 62, 7890, 796, 6468, 13, 18250, 1691, 62, 18206, 7, ...
3.0375
80
from sklearn.linear_model._base import LinearClassifierMixin, SparseCoefMixin from sklearn.base import BaseEstimator from sklearn.utils import check_X_y from sklearn.utils.multiclass import unique_labels from abc import abstractmethod import numpy as np
[ 6738, 1341, 35720, 13, 29127, 62, 19849, 13557, 8692, 1330, 44800, 9487, 7483, 35608, 259, 11, 1338, 17208, 7222, 891, 35608, 259, 198, 6738, 1341, 35720, 13, 8692, 1330, 7308, 22362, 320, 1352, 198, 6738, 1341, 35720, 13, 26791, 1330, ...
3.413333
75
import sys, argparse parser = argparse.ArgumentParser( description='''Download and extract zip archive(s) from https://www.sec.gov/dera/data/financial-statement-data-sets.html.''') parser.add_argument( '-path', type=str, help='''Directory path that zip archives will be saved to. May be absolute ...
[ 11748, 25064, 11, 1822, 29572, 198, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 7, 198, 220, 220, 220, 6764, 28, 7061, 6, 10002, 290, 7925, 19974, 15424, 7, 82, 8, 422, 220, 198, 220, 220, 220, 3740, 1378, 2503, 13, 2363, ...
3.035496
817
from itertools import groupby from unstdlib import now, get_many from sqlalchemy import orm from briefmetrics import api, model, tasks from briefmetrics.web.environment import Response, httpexceptions from briefmetrics.lib.controller import Controller, Context from briefmetrics.lib.exceptions import APIControllerError...
[ 6738, 340, 861, 10141, 1330, 1448, 1525, 198, 6738, 15014, 67, 8019, 1330, 783, 11, 651, 62, 21834, 198, 6738, 44161, 282, 26599, 1330, 393, 76, 198, 198, 6738, 4506, 4164, 10466, 1330, 40391, 11, 2746, 11, 8861, 198, 6738, 4506, 4164...
3.20603
199
import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns from flask import session from sklearn.preprocessing import StandardScaler, LabelEncoder from sklearn.model_selection import train_test_split, cross_val_score, KFold from sklearn.tree import DecisionTreeClassifier, plot_tree fr...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 384, 397, 1211, 355, 3013, 82, 198, 6738, 42903, 1330, 6246, 198, 6738, 1341, 35720, 13, 38...
3.272222
180
# vim: set fileencoding=utf-8 : # # Copyright (c) SAS Institute Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
[ 2, 43907, 25, 900, 2393, 12685, 7656, 28, 40477, 12, 23, 1058, 198, 2, 198, 2, 15069, 357, 66, 8, 35516, 5136, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2...
3.44186
473
#!/usr/bin/env python """ given a point relative to the baseframe, calculate the necessary pan+tilt angle to point camera at it given a pan+tilt angle, calculate the point relative to the base frame """ import unittest #https://github.com/ros/geometry/blob/hydro-devel/tf/src/tf/transformations.py from tf import trans...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 35569, 257, 966, 3585, 284, 262, 2779, 14535, 11, 15284, 262, 3306, 3425, 10, 83, 2326, 9848, 284, 966, 4676, 379, 340, 198, 35569, 257, 3425, 10, 83, 2326, 9848, 11, 152...
3.189542
153
import logging from os import getenv __all__ = ['log', 'check_for_tokens'] logging.basicConfig(level=logging.INFO, format='%(levelname)s: %(asctime)s -' ' %(funcName)s - %(message)s') log = logging.getLogger('webkin')
[ 11748, 18931, 198, 6738, 28686, 1330, 651, 24330, 198, 198, 834, 439, 834, 796, 37250, 6404, 3256, 705, 9122, 62, 1640, 62, 83, 482, 641, 20520, 198, 198, 6404, 2667, 13, 35487, 16934, 7, 5715, 28, 6404, 2667, 13, 10778, 11, 198, 22...
2.062992
127
""" This module contains configuration utilities. """ import json import os FJSON = 'dautils.json' def file_exists(tocheck): """ Checks whether a file exists. :param tocheck: The path of the file. :returns: True if the file exists. """ return os.path.isfile(tocheck) def read_rc(): """ Re...
[ 37811, 770, 8265, 4909, 8398, 20081, 13, 37227, 198, 11748, 33918, 198, 11748, 28686, 628, 198, 37, 40386, 796, 705, 67, 2306, 4487, 13, 17752, 6, 628, 198, 4299, 2393, 62, 1069, 1023, 7, 83, 30848, 694, 2599, 198, 220, 220, 220, 37...
2.676316
380
from django.urls import path from .views import BlogDetailView, BlogListView urlpatterns = [ path('post/<int:pk>/', BlogDetailView.as_view(), name='post_detail'), path('', BlogListView.as_view(), name='home'), ]
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 198, 6738, 764, 33571, 1330, 14001, 11242, 603, 7680, 11, 14001, 8053, 7680, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 10786, 7353, 14, 27, 600, 25, 79, 74, 29,...
2.707317
82
from time import sleep import rospy from geometry_msgs.msg import Quaternion from geometry_msgs.msg import Vector3 from mavros_msgs.msg import Thrust from mavros_msgs.msg import AttitudeTarget node = rospy.init_node("thrust_test") rate = rospy.Rate(20) # Hz pub = rospy.Publisher('/mavros/setpoint_raw/attitude', Att...
[ 6738, 640, 1330, 3993, 198, 198, 11748, 686, 2777, 88, 198, 6738, 22939, 62, 907, 14542, 13, 19662, 1330, 2264, 9205, 295, 198, 6738, 22939, 62, 907, 14542, 13, 19662, 1330, 20650, 18, 198, 6738, 285, 615, 4951, 62, 907, 14542, 13, ...
2.349624
266
""" Created on Mar 8, 2020 @author: hwase """ import settings as S import yagmail if __name__ == '__main__': contents = ['This is the body, and here is just text http://somedomain/image.png', 'You can find an audio file attached.', '/local/path/song.mp3'] # yagmail.register(sender...
[ 37811, 201, 198, 41972, 319, 1526, 807, 11, 12131, 201, 198, 201, 198, 31, 9800, 25, 289, 86, 589, 201, 198, 37811, 201, 198, 11748, 6460, 355, 311, 201, 198, 11748, 331, 363, 4529, 201, 198, 201, 198, 201, 198, 361, 11593, 3672, ...
2.345178
197
from game import Game, TAVERN, TavernTile import math
[ 6738, 983, 1330, 3776, 11, 21664, 5959, 45, 11, 32693, 35103, 198, 11748, 10688, 198 ]
3.6
15
# Define here the models for your scraped items # # See documentation in: # https://docs.scrapy.org/en/latest/topics/items.html import scrapy if __name__ == '__main__': item = LianjiaItem() item['联系方式'] = 'fasgseg' for k, v in item.items(): print(k, v)
[ 2, 2896, 500, 994, 262, 4981, 329, 534, 15881, 276, 3709, 198, 2, 198, 2, 4091, 10314, 287, 25, 198, 2, 3740, 1378, 31628, 13, 1416, 2416, 88, 13, 2398, 14, 268, 14, 42861, 14, 4852, 873, 14, 23814, 13, 6494, 198, 198, 11748, 15...
2.262295
122
"""Minimal Oware server This server doesn't actually implement the Oware game. It simply allows a single client to connect, and speaks the game protocol well enough to allow that client to run. """ import pickle import socket from ..model.board import Board from ..util import ByteFIFO if __name__ == '__main__': ...
[ 37811, 9452, 4402, 440, 1574, 4382, 198, 198, 1212, 4382, 1595, 470, 1682, 3494, 262, 440, 1574, 983, 13, 632, 2391, 198, 47205, 257, 2060, 5456, 284, 2018, 11, 290, 9209, 262, 983, 8435, 880, 198, 48229, 284, 1249, 326, 5456, 284, ...
3.604396
91
# Import standard python modules import threading import time import os import sys # Import paho MQTT client. import paho.mqtt.client as mqtt # Define callback functions which will be called when certain events happen. # Define Functions for Threading if __name__ == "__main__": if(len(sys.argv)!=2): sys.stderr...
[ 2, 17267, 3210, 21015, 13103, 198, 11748, 4704, 278, 198, 11748, 640, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 2, 17267, 279, 17108, 337, 48, 15751, 5456, 13, 198, 11748, 279, 17108, 13, 76, 80, 926, 13, 16366, 355, 285, 80, ...
2.809756
410
import os import numpy as np import chainer
[ 11748, 28686, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 6333, 263, 198 ]
3.214286
14
# coding: utf-8 import math import ctypes from objc_util import parse_struct glk2 = parse_struct('{glkvec2=fff}') 'GLKVector2Make', 'GLKVector2MakeWithArray', 'GLKVector2Length', 'GLKVector2Distance', 'GLKVector2Negate', 'GLKVector2Normalize', 'GLKVector2AddScalar', 'GLKVector2SubtractSc...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 11748, 10688, 198, 11748, 269, 19199, 198, 6738, 26181, 66, 62, 22602, 1330, 21136, 62, 7249, 628, 628, 628, 198, 4743, 74, 17, 796, 21136, 62, 7249, 10786, 90, 4743, 74, 35138, 17, 28, 20972, ...
2.41387
447
from MaltegoTransform import * from mcrits_utils import * crits = mcrits() me = MaltegoTransform() me.parseArguments(sys.argv) id_ = me.getVar('id') crits_type = me.getVar('crits_type') for result in crits.get_related(crits_type, id_, 'Actor'): # For each related object, get the details. obj = crits.get_sing...
[ 6738, 4434, 660, 2188, 41762, 1330, 1635, 198, 6738, 285, 22213, 82, 62, 26791, 1330, 1635, 198, 198, 22213, 82, 796, 285, 22213, 82, 3419, 198, 198, 1326, 796, 4434, 660, 2188, 41762, 3419, 198, 1326, 13, 29572, 28100, 2886, 7, 17597...
2.060886
542
#!/usr/bin/env python import sys import os import unittest from mock import patch, MagicMock, ANY, call import pylacuna.core.map import ast from sys import version_info if version_info.major == 2: import __builtin__ as builtins # pylint:disable=import-error else: import builtins # pylint:disable=import-err...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 555, 715, 395, 198, 6738, 15290, 1330, 8529, 11, 6139, 44, 735, 11, 15529, 11, 869, 198, 198, 11748, 279, 2645, 330, 9613, 13, 7295, 13, ...
1.613346
44,704
#Write a guessing game where the user has to guess a secret number. # After every guess the program tells the user whether their number was too large or too small. # At the end the number of tries needed should be printed. # It counts only as one try if they input the same number multiple times consecutively. import ra...
[ 2, 16594, 257, 25260, 983, 810, 262, 2836, 468, 284, 4724, 257, 3200, 1271, 13, 198, 2, 2293, 790, 4724, 262, 1430, 4952, 262, 2836, 1771, 511, 1271, 373, 1165, 1588, 393, 1165, 1402, 13, 198, 2, 1629, 262, 886, 262, 1271, 286, 84...
2.934509
397
import os from tkinter import filedialog, messagebox from dialogs.password_prompt import askpassword DOCUMENT_PATH = os.path.expanduser("~") FILETYPE_ALL = ("All types", "*.*") FILETYPE_PDF = ("PDF File", "*.pdf") FILETYPE_CSV = ("CSV File", "*.csv") DIALOG_TITLE = "Select {} file" SAVE_DIALOG_TITLE = "Save as {} fil...
[ 11748, 28686, 198, 6738, 256, 74, 3849, 1330, 5717, 498, 519, 11, 3275, 3524, 198, 198, 6738, 17310, 82, 13, 28712, 62, 16963, 457, 1330, 1265, 28712, 198, 198, 38715, 5883, 3525, 62, 34219, 796, 28686, 13, 6978, 13, 11201, 392, 7220,...
2.688525
122
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
import torch import torch.nn.functional as F from typing import Optional from torch import Tensor # flags required to enable jit fusion kernels torch._C._jit_set_profiling_mode(False) torch._C._jit_set_profiling_executor(False) torch._C._jit_override_can_fuse_on_cpu(True) torch._C._jit_override_can_fuse_on_gpu(True) ...
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 6738, 19720, 1330, 32233, 198, 6738, 28034, 1330, 309, 22854, 198, 198, 2, 9701, 2672, 284, 7139, 474, 270, 21748, 50207, 198, 13165, 354, 13557, 34, 13557, 45051, 62...
2.734848
132
# Copyright (c) ZenML GmbH 2021. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
[ 2, 220, 15069, 357, 66, 8, 14760, 5805, 402, 2022, 39, 33448, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 220, 345, 743, 407, 779, ...
2.825336
1,563