content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
__name__ = "{{Name}}" __version__ = "{{Version}}"
[ 834, 3672, 834, 796, 366, 27007, 5376, 11709, 1, 198, 834, 9641, 834, 796, 366, 27007, 14815, 11709, 1, 198 ]
2.5
20
import json # PyQt imports from PyQt5.QtCore import Qt, pyqtSignal, pyqtSlot from PyQt5.QtWidgets import QDialog from PyQt5.QtWebChannel import QWebChannel # Local includes from .ui.widget_ui import Ui_Dialog from alfred import data_rc import alfred.alfred_globals as ag from alfred.modules.api.view_components import ...
[ 11748, 33918, 198, 198, 2, 9485, 48, 83, 17944, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 14055, 1330, 33734, 11, 12972, 39568, 11712, 282, 11, 12972, 39568, 38963, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 1330, 119...
2.785714
126
import re from utils import * def get_token_type(self, token): if self.is_keyword(token): return 'keyword' elif self.is_symbol(token): return 'symbol' elif self.is_identifier(token): return 'identifier' elif self.is_int(token): return...
[ 11748, 302, 198, 6738, 3384, 4487, 1330, 1635, 628, 198, 220, 220, 220, 825, 651, 62, 30001, 62, 4906, 7, 944, 11, 11241, 2599, 198, 220, 220, 220, 220, 220, 220, 220, 611, 2116, 13, 271, 62, 2539, 4775, 7, 30001, 2599, 198, 220, ...
1.792965
995
""" Main module of a program. """ import folium from tools import find_coords, user_input def creating_map(): """ Creates HTML page for a given data. """ year, coords = user_input() locations = find_coords(year, coords) mp = folium.Map(location=coords, zoom_start=10) mp.add_child(folium....
[ 37811, 198, 13383, 8265, 286, 257, 1430, 13, 198, 37811, 198, 11748, 5955, 1505, 198, 6738, 4899, 1330, 1064, 62, 1073, 3669, 11, 2836, 62, 15414, 628, 198, 4299, 4441, 62, 8899, 33529, 198, 220, 220, 220, 37227, 198, 220, 220, 220, ...
2.023593
551
from ptCrypt.Symmetric.Modes.Mode import Mode from ptCrypt.Symmetric.BlockCipher import BlockCipher from ptCrypt.Symmetric.Paddings.Padding import Padding
[ 6738, 42975, 23919, 13, 13940, 3020, 19482, 13, 44, 4147, 13, 19076, 1330, 10363, 198, 6738, 42975, 23919, 13, 13940, 3020, 19482, 13, 12235, 34, 10803, 1330, 9726, 34, 10803, 198, 6738, 42975, 23919, 13, 13940, 3020, 19482, 13, 47, 286...
3.163265
49
#!/usr/bin/env python3 # Originally python2 # Sample from https://www.collabora.com/news-and-blog/blog/2019/05/14/an-ebpf-overview-part-5-tracing-user-processes/ # Python program with embedded C eBPF program from bcc import BPF, USDT import sys bpf = """ #include <uapi/linux/ptrace.h> BPF_PERF_OUTPUT(events); struc...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 220, 1303, 19486, 21015, 17, 198, 198, 2, 27565, 422, 3740, 1378, 2503, 13, 26000, 4820, 64, 13, 785, 14, 10827, 12, 392, 12, 14036, 14, 14036, 14, 23344, 14, 2713, 14, 1415, 14, 27...
2.30123
488
import numpy as np import pytest from sudoku import SudokuLine, build_rows, build_columns from sudoku import SudokuSquare, build_squares
[ 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 9288, 198, 198, 6738, 424, 67, 11601, 1330, 14818, 11601, 13949, 11, 1382, 62, 8516, 11, 1382, 62, 28665, 82, 198, 6738, 424, 67, 11601, 1330, 14818, 11601, 48011, 11, 1382, 62, 16485, ...
3.209302
43
import os import json import datetime from pytz import timezone, utc def update_total_score(name_list_dict, score_rules, now_kst_aware, penalty_const=.1): """ Update Total Score when scheduled day written in "ScoreRule.json" :param name_list_dict: This contains contestants score info loaded from "namelist....
[ 11748, 28686, 198, 11748, 33918, 198, 11748, 4818, 8079, 198, 6738, 12972, 22877, 1330, 640, 11340, 11, 3384, 66, 198, 198, 4299, 4296, 62, 23350, 62, 26675, 7, 3672, 62, 4868, 62, 11600, 11, 4776, 62, 38785, 11, 783, 62, 74, 301, 6...
2.498246
570
import os import gzip import pickle import h5py import numpy as np import theano from utils.misc import get_file_names_in_dir from utils.vocab import UNK class Conll05Loader(Loader): class Conll12Loader(Loader): def load_emb(path): word_list = [] emb = [] with open(path) as f: for line in f...
[ 11748, 28686, 198, 11748, 308, 13344, 198, 11748, 2298, 293, 198, 11748, 289, 20, 9078, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 262, 5733, 198, 198, 6738, 3384, 4487, 13, 44374, 1330, 651, 62, 7753, 62, 14933, 62, 259, 62...
2.164045
445
from django.urls import path from .views import ( home, MachineDetailView, MachineListView, DryRunDataDetailView, MachineLastDataView, ) urlpatterns = [ path('', MachineListView.as_view(), name='home-view'), path('', MachineListView.as_view(), name='machine-list-view'), path('machine/<...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 764, 33571, 1330, 357, 198, 220, 220, 220, 1363, 11, 198, 220, 220, 220, 10850, 11242, 603, 7680, 11, 198, 220, 220, 220, 10850, 8053, 7680, 11, 198, 220, 220, 220, 22408, 109...
2.650224
223
""" Python version 3.6.7 OS Linux Ubuntu 18.04.1 LTS Created: 30/11/2018 17:12 Finished: 30/11/2018 19: Author: Adrian Garrido Garcia """ import sys from wall.builder import build_a_wall if __name__ == '__main__': try: build_a_wall(sys.argv[1], sys.argv[2]) except IndexError: rows = input("Ple...
[ 37811, 198, 37906, 2196, 513, 13, 21, 13, 22, 198, 2640, 7020, 14949, 1248, 13, 3023, 13, 16, 406, 4694, 198, 41972, 25, 1542, 14, 1157, 14, 7908, 1596, 25, 1065, 198, 18467, 1348, 25, 1542, 14, 1157, 14, 7908, 678, 25, 198, 13838...
2.539683
189
import os import csv import cv2 import numpy as np import torch from torch.utils.data import Dataset, DataLoader def transform(snippet): ''' stack & noralization ''' snippet = np.concatenate(snippet, axis=-1) snippet = torch.from_numpy(snippet).permute(2, 0, 1).contiguous().float() snippet = snippet.mu...
[ 11748, 28686, 198, 11748, 269, 21370, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 16092, 292, 316, 11, 6060, 17401, 198, 198, 4299, 6121, 7, 16184, 3974, ...
2.454545
209
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-10-19 08:29 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 940, 13, 17, 319, 1584, 12, 940, 12, 1129, 8487, 25, 1959, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 1...
2.73913
69
# generate_tfrecords.py # Note: substantial portions of this code, expecially the create_tf_example() function, are credit to Dat Tran # see his website here: https://towardsdatascience.com/how-to-train-your-own-object-detector-with-tensorflows-object-detector-api-bec72ecfe1d9 # and his GitHub here: https://github.com...
[ 2, 7716, 62, 27110, 8344, 3669, 13, 9078, 198, 198, 2, 5740, 25, 8904, 16690, 286, 428, 2438, 11, 409, 2333, 262, 2251, 62, 27110, 62, 20688, 3419, 2163, 11, 389, 3884, 284, 16092, 833, 272, 198, 2, 766, 465, 3052, 994, 25, 3740, ...
4.346821
519
import gevent.monkey gevent.monkey.patch_all() import os from logging import getLogger #from apscheduler.executors.pool import ThreadPoolExecutor, ProcessPoolExecutor from apscheduler.schedulers.gevent import GeventScheduler as Scheduler from couchdb import Server, Session from couchdb.http import Unauthorized, extract...
[ 11748, 4903, 1151, 13, 49572, 198, 469, 1151, 13, 49572, 13, 17147, 62, 439, 3419, 198, 11748, 28686, 198, 6738, 18931, 1330, 651, 11187, 1362, 198, 2, 6738, 257, 862, 1740, 18173, 13, 18558, 315, 669, 13, 7742, 1330, 14122, 27201, 23...
2.34634
2,691
#code which sends many setBlock commands all in one go, to see if there was # a performance improvement.. It sent them a lot quicker, but you still had to wait # for minecraft to catch up import mcpi.minecraft as minecraft import mcpi.block as block import mcpi.util as util from time import time, sleep mc = minecraft....
[ 2, 8189, 543, 12800, 867, 900, 12235, 9729, 477, 287, 530, 467, 11, 284, 766, 611, 612, 373, 198, 2, 257, 2854, 9025, 492, 632, 1908, 606, 257, 1256, 20061, 11, 475, 345, 991, 550, 284, 4043, 198, 2, 329, 6164, 3323, 284, 4929, ...
2.537736
318
from django import template from django.conf import settings from django.utils.translation import ugettext as _ from django.forms.forms import pretty_name #from yats.diff import generate_patch_html import re try: import json except ImportError: from django.utils import simplejson as json register = template.L...
[ 6738, 42625, 14208, 1330, 11055, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 334, 1136, 5239, 355, 4808, 198, 6738, 42625, 14208, 13, 23914, 13, 23914, 1330, 2495, 62, 3672, 198, ...
3.416667
144
"""Test the binding of names when a circular zaimportuj shares the same name jako an attribute.""" z .rebinding2 zaimportuj util
[ 37811, 14402, 262, 12765, 286, 3891, 618, 257, 18620, 1976, 1385, 634, 23577, 7303, 262, 976, 1438, 474, 25496, 281, 198, 42348, 526, 15931, 198, 89, 764, 260, 30786, 17, 1976, 1385, 634, 23577, 7736, 198 ]
3.583333
36
#!/usr/bin/env python # Python Network Programming Cookbook, Second Edition -- Chapter - 8 # This program is optimized for Python 2.7.12 and Python 3.5.2. # It may run on any other version with/without modifications. import os from scapy.all import * pkts = [] count = 0 pcapnum = 0 if __name__ == '__main__': pr...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 11361, 7311, 30297, 8261, 2070, 11, 5498, 5061, 1377, 7006, 532, 807, 198, 2, 770, 1430, 318, 23392, 329, 11361, 362, 13, 22, 13, 1065, 290, 11361, 513, 13, 20, 13, 17, 13, 198,...
3.070423
142
import pyramid_crud import pytest from pyramid.exceptions import ConfigurationError from pyramid.interfaces import ISessionFactory def test_check_session_no_factory(config): with pytest.raises(ConfigurationError): pyramid_crud.check_session(config) def test_parse_options_from_settings_defaults(): ...
[ 11748, 27944, 62, 6098, 463, 198, 11748, 12972, 9288, 198, 6738, 27944, 13, 1069, 11755, 1330, 28373, 12331, 198, 6738, 27944, 13, 3849, 32186, 1330, 3180, 2521, 22810, 628, 628, 198, 198, 4299, 1332, 62, 9122, 62, 29891, 62, 3919, 62, ...
2.851955
358
""" You are given a sorted array in ascending order that is rotated at some unknown pivot (i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2]) and a target value. Write a function that returns the target value's index. If the target value is not present in the array, return -1. You may assume no duplicate exists in...
[ 37811, 198, 1639, 389, 1813, 257, 23243, 7177, 287, 41988, 1502, 326, 318, 38375, 379, 617, 6439, 30355, 220, 198, 7, 72, 13, 68, 1539, 685, 15, 11, 16, 11, 17, 11, 19, 11, 20, 11, 21, 11, 22, 60, 1244, 1716, 685, 19, 11, 20, ...
2.797872
188
import discord from discord.ext import commands
[ 11748, 36446, 201, 198, 6738, 36446, 13, 2302, 1330, 9729, 201 ]
4.454545
11
import torch from torch.fx.graph import Node from .pattern_utils import ( register_fusion_pattern, ) from .utils import _parent_name from .quantization_types import QuantizerCls, NodePattern, Pattern from ..fuser_method_mappings import get_fuser_method from ..fuser_method_mappings import get_fuser_method_new from a...
[ 11748, 28034, 198, 6738, 28034, 13, 21373, 13, 34960, 1330, 19081, 198, 6738, 764, 33279, 62, 26791, 1330, 357, 198, 220, 220, 220, 7881, 62, 69, 4241, 62, 33279, 11, 198, 8, 198, 6738, 764, 26791, 1330, 4808, 8000, 62, 3672, 198, 6...
3.746667
150
import numpy as np import torch import torch.nn as nn import torchvision EPS = 1e-7
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 10178, 628, 198, 36, 3705, 796, 352, 68, 12, 22, 628, 628, 198 ]
2.8125
32
#!/usr/bin python #coding:utf-8 # # 10^7 import random RANGE = 10000000 f = open('../test/input/bitSort.input','w') for i in random.sample(range(RANGE),RANGE): f.write(str(i) + '\n') f.close() print 'generator input file success!'
[ 2, 48443, 14629, 14, 8800, 21015, 198, 2, 66, 7656, 25, 40477, 12, 23, 198, 2, 198, 2, 838, 61, 22, 198, 198, 11748, 4738, 198, 198, 49, 27746, 796, 1802, 20483, 198, 198, 69, 796, 1280, 10786, 40720, 9288, 14, 15414, 14, 2545, ...
2.418367
98
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 16529, 35937, 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, 19...
5.026316
114
import nibabel as nib import numpy as np from glob import glob
[ 11748, 33272, 9608, 355, 33272, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 15095, 1330, 15095, 628, 628 ]
3.666667
18
import os import unittest from doublebook.ebook import Ebook THIS_DIR = os.path.dirname(os.path.abspath(__file__)) if __name__ == '__main__': unittest.main(verbosity=3)
[ 11748, 28686, 198, 11748, 555, 715, 395, 198, 198, 6738, 4274, 2070, 13, 16497, 1330, 412, 2070, 198, 198, 43559, 62, 34720, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 397, 2777, 776, 7, 834, 7753, 834, 4008, 628, ...
2.507042
71
#!/usr/bin/env python """ run this every time you upgrade the godot-base version to generate new matching github workflows You must be in this directory, and in the modules subfolder of godot (just as if you would install this project into godot) usage: python build_github_actions.py --godot-version "3.4.4-stable" --g...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 5143, 428, 790, 640, 345, 8515, 262, 5770, 313, 12, 8692, 2196, 284, 7716, 649, 12336, 33084, 670, 44041, 198, 1639, 1276, 307, 287, 428, 8619, 11, 290, 287, 262, 13103, ...
2.328794
1,028
from collections import defaultdict from typing import Dict, Iterable, List, Optional, Set, Tuple, cast from sqlalchemy import column from panoramic.cli.husky.common.enum import EnumHelper from panoramic.cli.husky.core.taxonomy.aggregations import AggregationDefinition from panoramic.cli.husky.core.taxonomy.enums imp...
[ 6738, 17268, 1330, 4277, 11600, 198, 6738, 19720, 1330, 360, 713, 11, 40806, 540, 11, 7343, 11, 32233, 11, 5345, 11, 309, 29291, 11, 3350, 198, 198, 6738, 44161, 282, 26599, 1330, 5721, 198, 198, 6738, 3425, 273, 18127, 13, 44506, 13,...
3.066351
422
import os import re import six import h5py import json import logging import tensorflow.keras as keras from tensorflow.python.keras import optimizers from tensorflow.python.keras.saving import hdf5_format from tensorflow.python.keras.utils import tf_utils from tensorflow.python.keras.saving import saving_utils from t...
[ 11748, 28686, 198, 11748, 302, 198, 11748, 2237, 198, 11748, 289, 20, 9078, 198, 11748, 33918, 198, 11748, 18931, 198, 198, 11748, 11192, 273, 11125, 13, 6122, 292, 355, 41927, 292, 198, 198, 6738, 11192, 273, 11125, 13, 29412, 13, 6122...
2.367981
837
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-10-26 06:57 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion from wapps.utils import get_image_model
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 940, 13, 17, 319, 1584, 12, 940, 12, 2075, 9130, 25, 3553, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 1...
2.804878
82
#!/usr/bin/env python import climt from pylab import * # Replicates the behavior of the online radiation calculator # see maths.ucd.ie/~rca scheme = 'ccm3' Insolation = 337. #* .75 Imbalance = 30. Albedo = 30. /100. CO2 = 350. CH4 = 1.7 + 1.e-9 N2O = 0. + 1.e-...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 5424, 83, 198, 6738, 279, 2645, 397, 1330, 1635, 198, 198, 2, 18407, 16856, 262, 4069, 286, 262, 2691, 11881, 28260, 198, 2, 766, 47761, 13, 1229, 67, 13, 494, 14, 93, 6015, ...
1.988971
3,264
{ "ev_get_bg_color" : { "repl_text" : ("(self, color, ea) -> int", "(self, ea) -> int or None"), } }
[ 90, 198, 220, 220, 220, 366, 1990, 62, 1136, 62, 35904, 62, 8043, 1, 1058, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 366, 35666, 62, 5239, 1, 1058, 5855, 7, 944, 11, 3124, 11, 304, 64, 8, 4613, 493, 1600, 30629, 944, 11, 3...
1.918033
61
#pca model n componentes from sklearn.decomposition import PCA import numpy as np from pylab import rcParams import matplotlib.pyplot as plt import pandas as pd def pca_model_n_components(df,n_components): ''' Definition: Initialize pca with n_components args: dataframe and number of components returns: ...
[ 2, 79, 6888, 2746, 299, 7515, 274, 198, 6738, 1341, 35720, 13, 12501, 296, 9150, 1330, 4217, 32, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 279, 2645, 397, 1330, 48321, 10044, 4105, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, ...
2.219205
2,062
import datetime import numpy as np import json from sklearn.decomposition import NMF, LatentDirichletAllocation, TruncatedSVD from sklearn.feature_extraction.text import CountVectorizer from nltk.corpus import stopwords import spacy from media_analyzer import database NUM_TOPICS = 20 if __name__ == "__main...
[ 11748, 4818, 8079, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 33918, 198, 6738, 1341, 35720, 13, 12501, 296, 9150, 1330, 28692, 37, 11, 5476, 298, 35277, 488, 1616, 3237, 5040, 11, 833, 19524, 515, 50, 8898, 198, 6738, 1341, 35720,...
3.138889
108
import urllib2 public_ip = "None" target_url = "http://ip.42.pl/raw" public_ip = get_public_ip(target_url) if not "None" in public_ip: print("Your Public IP address is: %s") % (str(public_ip)) else: print("Your Public IP address was not found")
[ 11748, 2956, 297, 571, 17, 198, 198, 11377, 62, 541, 796, 366, 14202, 1, 198, 16793, 62, 6371, 796, 366, 4023, 1378, 541, 13, 3682, 13, 489, 14, 1831, 1, 198, 11377, 62, 541, 796, 651, 62, 11377, 62, 541, 7, 16793, 62, 6371, 8, ...
2.666667
93
# import necessary modules import os import re import requests import newspaper from bs4 import BeautifulSoup from newspaper import Article from newspaper import Config from article_summarizer import summarizer from time import sleep # clean data
[ 2, 1330, 3306, 13103, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 7007, 198, 11748, 7533, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 6738, 7533, 1330, 10172, 198, 6738, 7533, 1330, 17056, 198, 6738, 2708, 62, 16345, 3876, ...
4.428571
56
from aria.models import Genus, Species, Subspecies from django import forms from django.forms import inlineformset_factory from .templates.templates import createTextInput, createSelectInput
[ 6738, 257, 7496, 13, 27530, 1330, 5215, 385, 11, 28540, 11, 3834, 35448, 198, 6738, 42625, 14208, 1330, 5107, 198, 6738, 42625, 14208, 13, 23914, 1330, 26098, 687, 2617, 62, 69, 9548, 198, 198, 6738, 764, 11498, 17041, 13, 11498, 17041,...
3.803922
51
import math print(angle(20)) i = 0 for m in range(0,1440*60): a = angle(m) / 360 d = a - math.floor(a) if (d < 0.00001): print(a, math.floor(a), d, d == 0.0) i += 1 print(i) for m in range(25): print(360*m/5.5)
[ 11748, 10688, 198, 198, 4798, 7, 9248, 7, 1238, 4008, 198, 198, 72, 796, 657, 198, 1640, 285, 287, 2837, 7, 15, 11, 1415, 1821, 9, 1899, 2599, 198, 220, 220, 220, 257, 796, 9848, 7, 76, 8, 1220, 11470, 198, 220, 220, 220, 288, ...
1.843284
134
#!/usr/bin/env python # # Public Domain 2014-present MongoDB, Inc. # Public Domain 2008-2014 WiredTiger, Inc. # # This is free and unencumbered software released into the public domain. # # Anyone is free to copy, modify, publish, use, compile, sell, or # distribute this software, either in source code form or as a com...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 5094, 20021, 1946, 12, 25579, 42591, 11012, 11, 3457, 13, 198, 2, 5094, 20021, 3648, 12, 4967, 39721, 51, 8254, 11, 3457, 13, 198, 2, 198, 2, 770, 318, 1479, 290, 555, ...
3.666667
456
from django.conf import settings from django.conf.urls.static import static from django.contrib import admin from django.urls import path, re_path, include, reverse_lazy from django.views.generic.base import RedirectView from rest_framework import permissions from rest_framework.authtoken import views from rest_framew...
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 13, 12708, 1330, 9037, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 11, 302, 62, 6...
2.887987
616
# pylint: disable=line-too-long, no-member from __future__ import print_function import arrow import requests from django.conf import settings from django.contrib.gis.geos import GEOSGeometry from django.utils import timezone from django.utils.text import slugify from passive_data_kit_external_sensors.models import...
[ 2, 279, 2645, 600, 25, 15560, 28, 1370, 12, 18820, 12, 6511, 11, 645, 12, 19522, 198, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 11748, 15452, 198, 11748, 7007, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, ...
3.451327
113
import numpy as np import os import sys import yaml from .fgcmUtilities import FocalPlaneProjectorFromOffsets from .fgcmLogger import FgcmLogger def _setVarsFromDict(self, d): for key in d: if key not in type(self).__dict__: raise AttributeError("Unknown config variable: %s" %...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 331, 43695, 198, 198, 6738, 764, 40616, 11215, 18274, 2410, 1330, 376, 4374, 3646, 1531, 16775, 273, 4863, 9362, 28709, 198, 6738, 764, 40616, 11215, 11187, ...
2.042373
944
#Bibeta in action. import numpy as np import matplotlib.pyplot as plt from scipy.stats import beta from scipy.stats import randint a_1 = np.linspace(0,10,100) a_2 = np.linspace(0,10,100) b_1 = np.linspace(0,10,100) b_2 = np.linspace(0,10,100) pi = np.linspace(0,1,10) input_space = np.linspace(0,1,1000) pi_rvs = randi...
[ 2, 33, 571, 17167, 287, 2223, 13, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 629, 541, 88, 13, 34242, 1330, 12159, 198, 6738, 629, 541, 88, 13, 34242, 1330, 43720, 60...
2.027076
554
from setuptools import setup, find_packages from scatteringmatrix import __version__ with open("README.md", "r") as fh: long_description = fh.read() setup(name='scatteringmatrix', version=__version__, description='Optical scattering matrix library', long_description=long_description, long_...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 6738, 45765, 6759, 8609, 1330, 11593, 9641, 834, 198, 198, 4480, 1280, 7203, 15675, 11682, 13, 9132, 1600, 366, 81, 4943, 355, 277, 71, 25, 198, 220, 220, 220, 890, 62, ...
2.423698
557
import os import pytest import sys from time import time try: thisdir = os.path.dirname(os.path.abspath(__file__)) sys.path.append(os.path.join(thisdir, '..')) except: sys.path.append('..') import trinomial
[ 11748, 28686, 198, 11748, 12972, 9288, 198, 11748, 25064, 198, 6738, 220, 220, 640, 1330, 640, 198, 198, 28311, 25, 198, 220, 220, 220, 428, 15908, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 397, 2777, 776, 7, 834,...
2.450549
91
# -*- coding: utf-8 -*- from openprocurement.api.utils import opresource from openprocurement.tender.openua.views.award_complaint_document import TenderUaAwardComplaintDocumentResource
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 1280, 36942, 495, 434, 13, 15042, 13, 26791, 1330, 1034, 31092, 198, 6738, 1280, 36942, 495, 434, 13, 83, 2194, 13, 9654, 6413, 13, 33571, 13, 707, 446, 62, 2385...
3.1
60
# -*- coding: utf-8 -*- from __future__ import print_function, division import torch import torch.nn as nn
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 11, 7297, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198 ]
2.918919
37
# Copyright 2021 Amado Tejada # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
[ 2, 15069, 33448, 1703, 4533, 1665, 73, 4763, 201, 198, 2, 201, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 705, 34156, 24036, 201, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13...
3.298578
211
# -*- coding: utf-8 -*- """ Created on Tue May 26 14:29:26 2020 @author: Walter Dempsey & Jamie Yap """ #%% ############################################################################### # Build a RJMCMC class ############################################################################### from pymc import Stochast...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 30030, 1737, 2608, 1478, 25, 1959, 25, 2075, 12131, 198, 198, 31, 9800, 25, 15819, 41994, 1222, 17826, 575, 499, 198, 37811, 198, 198, 2, 16626, ...
4.146789
109
from unittest.mock import MagicMock from slack.user import User from baseball.team import Team reusableUser = User(token='blah', id='UB00123', team=None) testTeam = Team(abbreviation='CN', location='City Name', full_name='City Name Players', record='0W-162L', division='CL Beast', wins=0, losses=162, standing=5...
[ 6738, 555, 715, 395, 13, 76, 735, 1330, 6139, 44, 735, 198, 6738, 30740, 13, 7220, 1330, 11787, 198, 6738, 9283, 13, 15097, 1330, 4816, 198, 198, 260, 31979, 12982, 796, 11787, 7, 30001, 11639, 2436, 993, 3256, 4686, 11639, 10526, 405...
2.80292
137
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, with_statement import os import sys import logging import time import kaptan from .. import Window, config, exc from ..workspacebuilder import WorkspaceBuilder, freeze from .helpers import TmuxTestCase logger = logging.getLogger...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 11, 351, 62, 26090, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 18931, 198, 1174...
3
153
# -*- coding: utf-8 -*- from __future__ import division, print_function, absolute_import import os import tensorflow as tf import math """ GCL + OMEGA = 180 / 512. {'0.6': {'ground-track-field': 0.573582489319409, 'harbor': 0.3891521609424017, 'bridge': 0.2563337419887201, 'small-vehicle': 0.5648505388890961, 'plane'...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 7297, 11, 3601, 62, 8818, 11, 4112, 62, 11748, 198, 11748, 28686, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 10688, 198, 198, ...
2.300252
3,970
""" Test cases for AST calculator """ from unittest import TestCase from calc import evaluate
[ 37811, 198, 14402, 2663, 329, 29273, 28260, 198, 37811, 198, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 198, 6738, 42302, 1330, 13446, 628 ]
4
24
from flask import request from app.main.extensions import cache
[ 6738, 42903, 1330, 2581, 198, 198, 6738, 598, 13, 12417, 13, 2302, 5736, 1330, 12940, 628, 198 ]
3.941176
17
# -*- coding: utf-8 -*- from __future__ import unicode_literals from gum.utils import elasticsearch_connection
[ 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, 27142, 13, 26791, 1330, 27468, 12947, 62, 38659, 628, 198 ]
3.081081
37
import pickle import json import numpy as np from flask import Flask, request, jsonify app = Flask(__name__) with open('models/regressor.pkl', 'rb') as f: model = pickle.load(f) def __process_input(posted_data) -> np.array: ''' transforms JSON type data acquired from request and transforms it into 2D ...
[ 11748, 2298, 293, 198, 11748, 33918, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 42903, 1330, 46947, 11, 2581, 11, 33918, 1958, 628, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 628, 198, 4480, 1280, 10786, 27530, 14, 2301, 44292, ...
2.360097
411
#!/usr/bin/python # -*- coding: utf-8 -*- import rospy import math from sensor_msgs.msg import * from geometry_msgs.msg import * from sobit_bringup.msg import * #-------------------------------- motion = [0]*21 TIME = 0.1 serial_joint = Serial_motion() state_jointstate = JointState() state_jointstate.name =["L_wheel...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 686, 2777, 88, 198, 11748, 10688, 198, 6738, 12694, 62, 907, 14542, 13, 19662, 1330, 1635, 198, 6738, 22939, 62, ...
3.072423
359
#!/usr/bin/env python """ # Author: Xiong Lei # Created Time : Thu 10 Jan 2019 07:38:10 PM CST # File Name: metrics.py # Description: """ import numpy as np import scipy from sklearn.neighbors import NearestNeighbors, KNeighborsRegressor def batch_entropy_mixing_score(data, batches, n_neighbors=100, n_pools=100, n...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 2, 6434, 25, 1395, 295, 70, 48579, 198, 2, 15622, 3862, 1058, 26223, 838, 2365, 13130, 8753, 25, 2548, 25, 940, 3122, 46429, 198, 198, 2, 9220, 6530, 25, 20731, 13, 9078,...
2.486402
956
from miniciti.bilding import Bilding
[ 6738, 949, 3628, 72, 13, 65, 688, 278, 1330, 44406, 278, 198 ]
3.083333
12
import pandas as pd import random import time # Source: https://stackoverflow.com/a/553320/556935 def str_time_prop(start, end, date_format, prop): """Get a time at a proportion of a range of two formatted times. start and end should be strings specifying times formated in the given format (strftime-styl...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 4738, 198, 11748, 640, 628, 198, 2, 8090, 25, 3740, 1378, 25558, 2502, 11125, 13, 785, 14, 64, 14, 2816, 2091, 1238, 14, 2816, 3388, 2327, 198, 4299, 965, 62, 2435, 62, 22930, 7, 9688, ...
2.966667
270
#!/usr/bin/env python3 ''' #ccpc20qhd-f => #,, #=- #(>0)? #DFS,? ? # O(V+E).. Runtime Error? : 1: DFS 2: ! ''' t = int(input()) for i in range(t): n,m = list(map(int,input().split())) l = [list(map(int,input().split())) for _ in range(m)] print('Case #%d: %s'%((i+1), f(n,l)))
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 7061, 6, 198, 2, 535, 14751, 1238, 80, 31298, 12, 69, 5218, 220, 198, 2, 9832, 198, 2, 10779, 198, 2, 7, 29, 15, 19427, 198, 2, 8068, 50, 11, 30, 5633, 198, 2, 198, 198, ...
1.810651
169
import unittest import pandas as pd from code.feature_extraction.list_counter import PhotosNum, URLsNum, HashtagNum, MentionNum, TokenNum from code.util import COLUMN_PHOTOS, COLUMN_URLS, COLUMN_HASHTAGS, COLUMN_MENTIONS if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 2438, 13, 30053, 62, 2302, 7861, 13, 4868, 62, 24588, 1330, 9434, 33111, 11, 32336, 33111, 11, 21059, 12985, 33111, 11, 337, 1463, 33111, 11, 29130, 33111, 19...
2.705882
102
import unittest from operator import index from EasyMCDM.models.Promethee import Promethee if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 201, 198, 6738, 10088, 1330, 6376, 201, 198, 6738, 16789, 44, 8610, 44, 13, 27530, 13, 24129, 10567, 68, 1330, 10335, 10567, 68, 201, 198, 201, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 201, ...
2.75
52
''' Vortex OpenSplice This software and documentation are Copyright 2006 to TO_YEAR ADLINK Technology Limited, its affiliated companies and licensors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the Lice...
[ 7061, 6, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 49790, 4946, 26568, 501, 198, 198, 1212, 3788, 290, 10314, 389, 15069, 4793, 284, 5390, 62, 56, 17133, 5984, 43...
3.545045
222
import typing import torch from .. import utils
[ 11748, 19720, 198, 198, 11748, 28034, 198, 198, 6738, 11485, 1330, 3384, 4487, 628, 628, 628, 628, 628 ]
3.277778
18
#!/usr/bin/env python2.7 # -*- coding:UTF-8 -*-2 u"""hold.py Copyright (c) 2019 Yukio Kuro This software is released under BSD license. """ import pieces as _pieces import utils.const as _const import utils.layouter as _layouter
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 13, 22, 198, 2, 532, 9, 12, 19617, 25, 48504, 12, 23, 532, 9, 12, 17, 198, 84, 37811, 2946, 13, 9078, 198, 198, 15269, 357, 66, 8, 13130, 19760, 952, 25796, 198, 1212, 3788, 318, ...
2.876543
81
from urllib.parse import urlparse
[ 6738, 2956, 297, 571, 13, 29572, 1330, 19016, 29572, 628 ]
3.5
10
import cv2 import numpy as np # draw_ped() function to draw bounding box with top labeled text
[ 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 198, 2, 3197, 62, 9124, 3419, 2163, 284, 3197, 5421, 278, 3091, 351, 1353, 15494, 2420 ]
3.518519
27
""" Code modified from: apps.fishandwhistle.net/archives/1155 """ from __future__ import print_function import serial import sys import glob port_list = {} def identifyPort(port): """ tests the port and identifies what device is attached to it from probing it :param port: :return: a port list dict w...
[ 37811, 198, 10669, 9518, 422, 25, 198, 18211, 13, 11084, 392, 1929, 12535, 13, 3262, 14, 48814, 14, 1157, 2816, 198, 198, 37811, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 11389, 198, 11748, 25064, 198, 11748, 15095...
2.305139
934
from app.python.utils import get_datetime
[ 6738, 598, 13, 29412, 13, 26791, 1330, 651, 62, 19608, 8079, 628 ]
3.583333
12
from nornir.core.plugins.inventory import InventoryPluginRegister from nornir.core.plugins.runners import RunnersPluginRegister from nornir.plugins.inventory import SimpleInventory from nornir.plugins.runners import SerialRunner, ThreadedRunner from nornir_utils.plugins.inventory import YAMLInventory
[ 6738, 299, 1211, 343, 13, 7295, 13, 37390, 13, 24807, 1330, 35772, 37233, 38804, 198, 6738, 299, 1211, 343, 13, 7295, 13, 37390, 13, 36740, 1330, 5660, 2741, 37233, 38804, 198, 198, 6738, 299, 1211, 343, 13, 37390, 13, 24807, 1330, 17...
3.860759
79
from setuptools import setup, find_packages setup( name="tessled", version="0.0.1", url='http://github.com/hodgestar/tesseract-control-software', license='MIT', description="Tesseract control software and simulator.", long_description=open('README.rst', 'r').read(), author='Simon Cross', ...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 2625, 83, 408, 992, 1600, 198, 220, 220, 220, 2196, 2625, 15, 13, 15, 13, 16, 1600, 198, 220, 220, 220, 19016, 11639, 4023, 13...
2.272142
621
GITLAB_URL = "XXXXXX" GITLAB_TOKEN = "XXXXX"
[ 38, 2043, 48780, 62, 21886, 796, 366, 24376, 8051, 1, 198, 38, 2043, 48780, 62, 10468, 43959, 796, 366, 24376, 55, 1, 198 ]
1.956522
23
#!/usr/bin/python # -*- coding: utf-8 -*- import time def Epoch(data): '''Patching Epoch timestamps.''' for record in data: record['last_updated'] = time.strftime('%Y-%m-%d', time.localtime(record['last_updated'])) return data def Date(data): '''Patching date stamps.''' for record in data: m = t...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 640, 198, 198, 4299, 4551, 5374, 7, 7890, 2599, 198, 220, 705, 7061, 47, 19775, 4551, 5374, 4628, 395, 9430, 263...
2.492228
193
from nltk.tokenize import TweetTokenizer import io dir_path = "../../data/nlmap/" train_en_path = dir_path + "nlmaps.train.en" train_mrl_path = dir_path + "nlmaps.train.mrl" test_en_path = dir_path + "nlmaps.test.en" test_mrl_path = dir_path + "nlmaps.test.mrl" train_txt = dir_path + "train.txt" test_txt = dir...
[ 6738, 299, 2528, 74, 13, 30001, 1096, 1330, 18752, 30642, 7509, 198, 11748, 33245, 628, 628, 628, 198, 198, 15908, 62, 6978, 796, 366, 40720, 40720, 7890, 14, 21283, 8899, 30487, 198, 198, 27432, 62, 268, 62, 6978, 796, 26672, 62, 697...
2.448819
254
states = ['AP', 'AR', 'AS', 'BR', 'CG', 'GA', 'GJ', 'HR', 'HP', 'JH', 'KA', 'KL', 'MP', 'MH', 'MN', 'ML', 'MZ', 'NL', 'OD', 'PB', 'RJ', 'SK', 'TN', 'TS', 'TR', 'UP', 'UK', 'WB', 'AN', 'CH', 'DD', 'DL', 'JK', 'LA', 'LD', 'PY'] def detect_text(path): """D...
[ 27219, 796, 37250, 2969, 3256, 705, 1503, 3256, 705, 1921, 3256, 705, 11473, 3256, 705, 39816, 3256, 705, 9273, 3256, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 705, 38, 41, 3256, 705, 17184, 3256, 705, 14082, 3256, 705, ...
2.050209
717
#!/usr/bin/env python3 from setuptools import setup from distutils.util import convert_path main_ns = {} vpath = convert_path('photorename/version.py') with open(vpath) as vfile: exec(vfile.read(), main_ns) setup( name='photorename', version=main_ns['__version__'], description='bulk rename photos in ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 6738, 1233, 26791, 13, 22602, 1330, 10385, 62, 6978, 198, 198, 12417, 62, 5907, 796, 23884, 198, 85, 6978, 796, 10385, 62, 6978, 1078...
2.461255
271
# -*- coding: utf-8 -*- # UTF-8 encoding when using korean import numpy as np import math input_l = [] while True: user_input = int(input('')) input_l.append(user_input) if len(input_l[1:]) == input_l[0]: #user_input = user_input.split('\n') cnt_input = [] for i in range(1, len(input_l)): if np.sqrt(input...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 41002, 12, 23, 21004, 618, 1262, 479, 29456, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 10688, 198, 198, 15414, 62, 75, 796, 17635, 198, 4514, 6407, 25, 198, 1...
2.101382
217
from setuptools import setup, find_packages setup( name='ContextNet', version='latest', packages=find_packages(), description='ContextNet: Improving Convolutional Neural Networks for Automatic Speech Recognition with Global Context', author='Sangchun Ha', author_email='seomk9896@naver.com', ...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 628, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 21947, 7934, 3256, 198, 220, 220, 220, 2196, 11639, 42861, 3256, 198, 220, 220, 220, 10392, 28, 19796, 62, 43789, 22784, 19...
2.751515
165
from operator import mul
[ 6738, 10088, 1330, 35971, 628 ]
5.2
5
from __future__ import annotations import toolcli from ctc.protocols import curve_utils
[ 6738, 11593, 37443, 834, 1330, 37647, 628, 198, 11748, 2891, 44506, 198, 198, 6738, 269, 23047, 13, 11235, 4668, 82, 1330, 12133, 62, 26791, 628, 198 ]
3.576923
26
""" db constants """ DB_HOST = 'localhost' DB_PORT = 28015 # Database is cavilling DB_NAME = 'cavilling' DB_TABLE_CAVILLS = 'cavills' DB_TABLE_HAIRDOS = 'hairdos' DB_TABLE_POLRUS = 'polrus' DB_TABLE_USERS = 'users'
[ 37811, 198, 9945, 38491, 198, 37811, 198, 198, 11012, 62, 39, 10892, 796, 705, 36750, 6, 198, 11012, 62, 15490, 796, 2579, 25150, 198, 198, 2, 24047, 318, 22357, 4509, 198, 11012, 62, 20608, 796, 705, 66, 615, 4509, 6, 198, 198, 110...
2.319149
94
from flask import Blueprint, render_template, request, abort, jsonify, Response from socfakerservice import status, HTMLRenderer, set_renderers from socfakerservice.model import TokenModel from socfaker import SocFaker socfaker = SocFaker() api_bp = Blueprint( 'api', __name__ ) ### AGENT ROUTES ### ### ALER...
[ 6738, 42903, 1330, 39932, 11, 8543, 62, 28243, 11, 2581, 11, 15614, 11, 33918, 1958, 11, 18261, 198, 6738, 1307, 69, 3979, 712, 501, 1330, 3722, 11, 11532, 49, 437, 11882, 11, 900, 62, 10920, 19288, 198, 6738, 1307, 69, 3979, 712, 5...
2.760263
609
# coding=utf-8 import torch import torch.nn as nn import torch.nn.functional as F from jdit.trainer.single.classification import ClassificationTrainer from jdit.model import Model from jdit.optimizer import Optimizer from jdit.dataset import FashionMNIST from jdit.parallel import SupParallelTrainer def build_task_t...
[ 2, 19617, 28, 40477, 12, 23, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 6738, 474, 5266, 13, 2213, 10613, 13, 29762, 13, 4871, 2649, 1330, 40984, 2898, 10613,...
2.281903
862
#Initialize packages import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt import sklearn.model_selection as model_selection from sklearn import linear_model import sklearn.metrics as metrics from sklearn.preprocessing import StandardScaler from sklearn.ensemble import Ra...
[ 2, 24243, 1096, 10392, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 11748, 384, 397, 1211, 355, 3013, 82, 201, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 201, 198, ...
2.526991
2,260
# -*- coding: utf-8 -*- """ Solution to Project Euler problem 142 - Perfect Square Collection Author: Jaime Liew https://github.com/jaimeliew1/Project_Euler_Solutions """ from itertools import combinations import numpy as np if __name__ == "__main__": print(run())
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 46344, 284, 4935, 412, 18173, 1917, 25181, 532, 16374, 9276, 12251, 198, 198, 13838, 25, 38028, 406, 769, 198, 5450, 1378, 12567, 13, 785, 14, 73, 1385, 417,...
3
91
""" Activity ======== Activities are self generated classes to which you can pass an identifier, and a list of tasks to perform. The activities are in between the decider and the task. For ease, two types of task runners are available: SyncTasks and AsyncTasks. If you need something more specific, you should either c...
[ 37811, 198, 16516, 198, 2559, 198, 198, 25526, 871, 389, 2116, 7560, 6097, 284, 543, 345, 460, 1208, 281, 27421, 11, 198, 392, 257, 1351, 286, 8861, 284, 1620, 13, 383, 4568, 389, 287, 1022, 262, 875, 1304, 290, 198, 1169, 4876, 13,...
3.158416
505
import sys import csv import json import argparse from collections import namedtuple # diff info DiffInfo = namedtuple('DiffInfo', [ 'mark', # diff kind (!, -, +) 'address', # row/column addresses of diff 'keyname', # row/column key names of diff 'value', # values of diff ]) def ...
[ 11748, 25064, 201, 198, 11748, 269, 21370, 201, 198, 11748, 33918, 201, 198, 11748, 1822, 29572, 201, 198, 6738, 17268, 1330, 3706, 83, 29291, 201, 198, 201, 198, 201, 198, 2, 814, 7508, 201, 198, 28813, 12360, 796, 3706, 83, 29291, 1...
2.034637
3,811
import os from time import time import pandas as pd from sqlalchemy import create_engine import logging logger = logging.getLogger(__name__) logger.setLevel(logging.INFO)
[ 11748, 28686, 198, 6738, 640, 1330, 640, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 44161, 282, 26599, 1330, 2251, 62, 18392, 198, 11748, 18931, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 198, 6404...
3.2
55
import codecs import os import sys from setuptools import setup, find_packages from setuptools.command.test import test as TestCommand test_requires = [ 'pytest>=2.5.2', 'pytest-cov>=1.6', 'pytest-flakes>=0.2', 'pytest-pep8>=1.0.5', 'pytest-django>=2.6', 'mock==1.0.1', 'pep8==1.4.6' ] i...
[ 11748, 40481, 82, 198, 11748, 28686, 198, 11748, 25064, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 6738, 900, 37623, 10141, 13, 21812, 13, 9288, 1330, 1332, 355, 6208, 21575, 628, 198, 198, 9288, 62, 47911, 796,...
2.300832
841
# -*- coding: utf-8 -*- # snapshottest: v1 - https://goo.gl/zC4yUc from __future__ import unicode_literals from snapshottest import Snapshot snapshots = Snapshot() snapshots['test_etc 1'] = '[{"lineno": 2, "value": "tup = (1, 2, 3)"}, {"lineno": 3, "source": ["tup\\n"], "value": "(1, 2, 3)"}, {"lineno": 5, "value":...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 11495, 1477, 24879, 25, 410, 16, 532, 3740, 1378, 42469, 13, 4743, 14, 89, 34, 19, 88, 52, 66, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 19...
2.507463
201
import cosypose import os import yaml from joblib import Memory from pathlib import Path import getpass import socket import torch.multiprocessing torch.multiprocessing.set_sharing_strategy('file_system') hostname = socket.gethostname() username = getpass.getuser() PROJECT_ROOT = Path(cosypose.__file__)....
[ 11748, 8615, 88, 3455, 201, 198, 11748, 28686, 201, 198, 11748, 331, 43695, 201, 198, 6738, 1693, 8019, 1330, 14059, 201, 198, 6738, 3108, 8019, 1330, 10644, 201, 198, 11748, 651, 6603, 201, 198, 11748, 17802, 201, 198, 11748, 28034, 13...
2.165083
842
from copy import copy import re opts = [ "addr", "addi", "mulr", "muli", "banr", "bani", "borr", "bori", "setr", "seti", "gtir", "gtri", "gtrr", "eqir", "eqri", "eqrr" ] inputs = [] program = [] parse_mem = lambda s: list(map(int, re.findall(r"[0-9]", s))) parse_params = lambda s: list(map(int, s.split(" ")...
[ 6738, 4866, 1330, 4866, 198, 11748, 302, 628, 198, 198, 404, 912, 796, 685, 198, 220, 220, 220, 366, 29851, 1600, 366, 2860, 72, 1600, 366, 76, 377, 81, 1600, 366, 76, 32176, 1600, 366, 3820, 81, 1600, 366, 65, 3216, 1600, 366, 28...
2.127883
477
import streamlit as st
[ 11748, 4269, 18250, 355, 336 ]
4.4
5
# pylint: disable=missing-docstring import unittest import numpy as np import tensorflow as tf import tf_encrypted as tfe if __name__ == '__main__': unittest.main()
[ 2, 279, 2645, 600, 25, 15560, 28, 45688, 12, 15390, 8841, 198, 11748, 555, 715, 395, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 48700, 62, 43628, 355, 256, 5036, 628, 198, 198, 361,...
2.85
60
import pytest from GraphModels.models.Sarah.model_agricultural_water import AgriculturalWaterNodes from GraphModels.models.Sarah.model_freshwater_available import FreshwaterAvailableNodes from GraphModels.models.Sarah.model_municipal_water import MunicipalWaterNodes nodes_list = AgriculturalWaterNodes + FreshwaterAv...
[ 198, 11748, 12972, 9288, 198, 198, 6738, 29681, 5841, 1424, 13, 27530, 13, 29284, 13, 19849, 62, 363, 1173, 8596, 62, 7050, 1330, 36694, 19184, 45, 4147, 198, 6738, 29681, 5841, 1424, 13, 27530, 13, 29284, 13, 19849, 62, 48797, 7050, ...
3.178082
219
from django.db import transaction from db.scaffold import Scaffold from typing import List from telegram import models as tg_models from pyrogram import types
[ 6738, 42625, 14208, 13, 9945, 1330, 8611, 198, 198, 6738, 20613, 13, 1416, 2001, 727, 1330, 1446, 2001, 727, 198, 6738, 19720, 1330, 7343, 198, 6738, 573, 30536, 1330, 4981, 355, 256, 70, 62, 27530, 198, 6738, 12972, 39529, 1330, 3858, ...
3.833333
42
from flask import Blueprint, request, jsonify from web_util import assert_data_has_keys from users.user import User user_api = Blueprint('users_api', __name__, url_prefix='/api/user')
[ 6738, 42903, 1330, 39932, 11, 2581, 11, 33918, 1958, 198, 6738, 3992, 62, 22602, 1330, 6818, 62, 7890, 62, 10134, 62, 13083, 198, 6738, 2985, 13, 7220, 1330, 11787, 198, 198, 7220, 62, 15042, 796, 39932, 10786, 18417, 62, 15042, 3256, ...
3.381818
55