content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import subprocess import dendropy from shutil import copyfile if snakemake.params.enabled: iqtree_cmd = "iqtree --quiet -s " + snakemake.input.alignment + " -t " + snakemake.input.start_tree + \ " -T " + str(snakemake.threads) + " --prefix " + snakemake.params.prefix if snakemake.params.mode =...
[ 11748, 850, 14681, 198, 11748, 288, 437, 28338, 198, 6738, 4423, 346, 1330, 4866, 7753, 198, 198, 361, 17522, 15883, 13, 37266, 13, 25616, 25, 198, 220, 220, 220, 1312, 80, 21048, 62, 28758, 796, 366, 25011, 21048, 1377, 39624, 532, 8...
2.42394
401
import os import time import calculate from github import Github from django.conf import settings from calaccess_raw import get_model_list from calaccess_raw.management.commands import CalAccessCommand from django.contrib.humanize.templatetags.humanize import intcomma
[ 11748, 28686, 198, 11748, 640, 198, 11748, 15284, 198, 6738, 33084, 1330, 38994, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 2386, 15526, 62, 1831, 1330, 651, 62, 19849, 62, 4868, 198, 6738, 2386, 15526, 62, 1831, 13, 276...
3.75
72
L = [11,22,66,22,11,44,55,66,88,77,22,11,44,22,33,77,55,44] print('The given list is: ') print(L) D = {} for item in L: if item not in D: D[item] = L.count(item) print('Frequency of different items is:') print(D)
[ 43, 796, 685, 1157, 11, 1828, 11, 2791, 11, 1828, 11, 1157, 11, 2598, 11, 2816, 11, 2791, 11, 3459, 11, 3324, 11, 1828, 11, 1157, 11, 2598, 11, 1828, 11, 2091, 11, 3324, 11, 2816, 11, 2598, 60, 198, 4798, 10786, 464, 1813, 1351,...
2.13
100
""" Data model and data access methods for Candles. """ import pytz from core.models.instruments import Instrument from django.db import models class Candle(models.Model): """ Candle data model. """ # pylint: disable=too-many-instance-attributes instrument = models.ForeignKey(Instrument, on_delete=mo...
[ 37811, 6060, 2746, 290, 1366, 1895, 5050, 329, 15518, 829, 13, 198, 37811, 198, 11748, 12972, 22877, 198, 6738, 4755, 13, 27530, 13, 259, 2536, 2886, 1330, 42410, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 628, 198, 4871, 44973, 7, ...
2.368984
2,244
#!/usr/bin/env python # coding: utf-8 import itertools import random import numpy as np import sys, os import pandas as pd import torch from torchsummary import summary from torchtext import data import torch.nn as nn import torch.utils.data from torch.utils.data import Dataset, TensorDataset,DataLoader, RandomSample...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 11748, 340, 861, 10141, 198, 11748, 4738, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 25064, 11, 28686, 198, 11748, 19798, 292, 355, 279, ...
3.503759
399
# -*- coding: utf-8 -*- #pylint: disable-msg=E0611, E1101, C0103, R0901, R0902, R0903, R0904, W0232 #------------------------------------------------------------------------------ # Copyright (c) 2007-2014, Acoular Development Team. #------------------------------------------------------------------------------ """Impl...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 79, 2645, 600, 25, 15560, 12, 19662, 28, 36, 3312, 1157, 11, 412, 1157, 486, 11, 327, 486, 3070, 11, 371, 2931, 486, 11, 371, 2931, 2999, 11, 371, 2931, 3070, 1...
2.101289
12,025
# Dependencies import sys, json import classifier ignore_labels = ['duplicate', 'in-progress', 'pending-publication', 'published', 'waiting-for-user-information', 'high priority'] # simple JSON echo script for line in sys.stdin: payload = json.loads(line) ( action, params ) = payload results = {} if a...
[ 2, 37947, 3976, 198, 11748, 25064, 11, 33918, 198, 11748, 1398, 7483, 198, 198, 46430, 62, 23912, 1424, 796, 37250, 646, 489, 5344, 3256, 705, 259, 12, 33723, 3256, 705, 79, 1571, 12, 11377, 341, 3256, 705, 30271, 3256, 705, 10247, 17...
2.744681
282
import pytest from webviz_config.utils._dash_component_utils import calculate_slider_step @pytest.mark.parametrize( "min_value,max_value,steps,res", [ (5, 10, 100, 0.01), (-10, -5, 100, 0.01), (-10, 10, 100, 0.1) ] )
[ 11748, 12972, 9288, 198, 198, 6738, 3992, 85, 528, 62, 11250, 13, 26791, 13557, 42460, 62, 42895, 62, 26791, 1330, 15284, 62, 6649, 1304, 62, 9662, 628, 198, 31, 9078, 9288, 13, 4102, 13, 17143, 316, 380, 2736, 7, 198, 220, 220, 220...
2.015748
127
import models import datetime from app import db from data import constants from logzero import logger from sqlalchemy import exc from sqlalchemy.sql import func from data.subqueries import TestCounts import re import os import pytz utc = pytz.UTC
[ 11748, 4981, 198, 11748, 4818, 8079, 198, 6738, 598, 1330, 20613, 198, 6738, 1366, 1330, 38491, 198, 6738, 2604, 22570, 1330, 49706, 198, 6738, 44161, 282, 26599, 1330, 2859, 198, 6738, 44161, 282, 26599, 13, 25410, 1330, 25439, 198, 6738...
3.577465
71
TESTRAIL_API_TOKEN = "" TESTRAIL_URL = "" TESTRAIL_PWD = ""
[ 51, 6465, 3861, 4146, 62, 17614, 62, 10468, 43959, 796, 13538, 198, 51, 6465, 3861, 4146, 62, 21886, 796, 13538, 198, 51, 6465, 3861, 4146, 62, 47, 22332, 796, 13538 ]
1.966667
30
import sys import csv import random """ Sets up the data for the Link Prediction experiment. Given the raw data file, it: 1)removes a specified amount of edges for representation induction, 2) creates a specified amount of negative examples from the remaining edges, 3) splits the positive and negative examples into tr...
[ 11748, 25064, 198, 11748, 269, 21370, 198, 11748, 4738, 198, 198, 37811, 198, 50, 1039, 510, 262, 1366, 329, 262, 7502, 46690, 6306, 13, 198, 15056, 262, 8246, 1366, 2393, 11, 340, 25, 352, 8, 2787, 5241, 257, 7368, 2033, 286, 13015, ...
3.395604
182
import random import codecs
[ 11748, 4738, 198, 11748, 40481, 82, 198 ]
4
7
#list ----> we store int,float,string.. #ordered collection of item --->DAta structure numbers = [1, 2, 3, 4, 5] print(numbers) print(numbers[2])#we can also access by indexing words = ["Beenash", 'Pervaiz', "Hanan"] print(words) print(words[:2]) # by slicing mixed = [1, 2, 3, 4, "five", "six",2.5, None] print(mixed)...
[ 2, 4868, 13498, 29, 356, 3650, 493, 11, 22468, 11, 8841, 492, 198, 2, 24071, 4947, 286, 2378, 1377, 3784, 35, 2953, 64, 4645, 198, 77, 17024, 796, 685, 16, 11, 362, 11, 513, 11, 604, 11, 642, 60, 198, 4798, 7, 77, 17024, 8, 19...
2.60396
202
from contacts.contacts_modules import delete_contact to_delete = delete_contact.DeleteContact() delete = to_delete.delete_contact("1")
[ 6738, 13961, 13, 3642, 8656, 62, 18170, 1330, 12233, 62, 32057, 198, 198, 1462, 62, 33678, 796, 12233, 62, 32057, 13, 38727, 17829, 3419, 198, 33678, 796, 284, 62, 33678, 13, 33678, 62, 32057, 7203, 16, 4943, 198 ]
3.578947
38
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'MainWindow.ui' # # Created by: PyQt5 UI code generator 5.12.2 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 201, 198, 2, 5178, 7822, 7560, 422, 3555, 334, 72, 2393, 705, 13383, 27703, 13, 9019, 6, 201, 198, 2, 201, 198, 2, 15622, 416, 25, 9485, 48, 83, 20, 12454, 24...
2.57
100
from django.shortcuts import redirect from django.http import HttpResponse from django.template import loader from http.server import HTTPStatus from .User import User import iotweb.views.urls_and_messages as UM import requests import json def devices(request, shdw_id): """ GET request: renders the physical ...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 18941, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 198, 6738, 42625, 14208, 13, 28243, 1330, 40213, 198, 6738, 2638, 13, 15388, 1330, 14626, 19580, 198, 6738, 764, 12982, 1330, 1...
2.140952
1,575
import logging from django.conf import settings from django.contrib.sites.shortcuts import get_current_site from django.template import loader from django.utils.safestring import mark_safe from django.utils.translation import ugettext_lazy as _ from .models import MailTemplate try: from django.template.exception...
[ 11748, 18931, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 49315, 13, 19509, 23779, 1330, 651, 62, 14421, 62, 15654, 198, 6738, 42625, 14208, 13, 28243, 1330, 40213, 198, 6738, 42625, ...
3.472973
148
import subprocess import sys import getopt import json from pyzabbix import ZabbixMetric, ZabbixSender ipa = '' ipb = '' host = '' try: opts, args = getopt.getopt(sys.argv[1:], "ha:b:n:") except getopt.GetoptError: print 'md32xx.py -a <IPControlerA> -b <IPControlerB> -n <HostNameInZabbix>' sys.exit(2) for o...
[ 11748, 850, 14681, 198, 11748, 25064, 198, 11748, 651, 8738, 198, 11748, 33918, 198, 6738, 12972, 89, 6485, 844, 1330, 1168, 6485, 844, 9171, 1173, 11, 1168, 6485, 844, 50, 2194, 198, 541, 64, 796, 10148, 198, 541, 65, 796, 10148, 198...
2.25
1,132
from heapq import nlargest # NOTE: this solution assumes the handles are only english letters handles = ['DogeCoin', 'YangGang', 'HodlForLife', 'fakeDonaldDrumpf', 'GodIsLove', 'BernieOrBust'] new_user = 'iLoveDogs' obj = SimilarAccounts() result1 = obj.make_anagram(new_user) result2 = obj.make_anagram('D...
[ 6738, 24575, 80, 1330, 299, 28209, 198, 198, 2, 24550, 25, 428, 4610, 18533, 262, 17105, 389, 691, 46932, 7475, 198, 198, 4993, 829, 796, 37250, 5211, 469, 24387, 3256, 705, 38663, 38, 648, 3256, 705, 39, 375, 75, 1890, 14662, 3256, ...
2.610619
226
"""Configuration data container with interactive ipywidgets GUI""" import json import ipywidgets import jsonschema class DictWidget(): """Container class for configuration data Constructed from a JSON Schema. Use like a dictionary to store and retrieve configuration data. Will also create a ipywidget i...
[ 37811, 38149, 1366, 9290, 351, 14333, 20966, 88, 28029, 11407, 25757, 37811, 198, 198, 11748, 33918, 198, 198, 11748, 20966, 88, 28029, 11407, 198, 11748, 44804, 684, 2395, 2611, 628, 198, 4871, 360, 713, 38300, 33529, 198, 220, 220, 220,...
2.356366
2,576
from nepali_company_registrar.nepal_company_registrar import NepalCompanyRegistrar
[ 6738, 25919, 7344, 62, 39722, 62, 2301, 396, 20040, 13, 77, 538, 282, 62, 39722, 62, 2301, 396, 20040, 1330, 27026, 39154, 8081, 396, 20040, 198 ]
3.192308
26
from __future__ import (absolute_import, division, print_function, unicode_literals) from datetime import datetime, timedelta from backtrader.feed import DataBase from backtrader import TimeFrame, date2num, num2date from backtrader.utils.py3 import (integer_types, queue, string_types, ...
[ 6738, 11593, 37443, 834, 1330, 357, 48546, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 28000, 1098, 62, 17201...
2.117299
2,029
from photons_products.base import Product, Capability, CapabilityValue from photons_products.enums import VendorRegistry, Zones, Family from photons_products import conditions as cond class Capability(Capability): """ .. attribute:: is_light Is this device a light .. attribute:: zones Th...
[ 6738, 44378, 62, 29498, 13, 8692, 1330, 8721, 11, 4476, 1799, 11, 4476, 1799, 11395, 198, 6738, 44378, 62, 29498, 13, 268, 5700, 1330, 39896, 8081, 4592, 11, 1168, 1952, 11, 7884, 198, 6738, 44378, 62, 29498, 1330, 3403, 355, 1779, 62...
2.916318
956
# 若中断了直接再次运行即可 # 爬取历史数据建立数据库 if __name__ == '__main__': from crypto_1min import Bitfinex_api import threading initially_urls_queue = Bitfinex_api().create_initially_urls_queue() # Bitfinex_api().get_all_symbol_detail() threads = [thread() for i in range(50)] for thread in threads: ...
[ 2, 5525, 233, 98, 40792, 23877, 255, 12859, 228, 33566, 112, 162, 236, 98, 37863, 235, 162, 105, 94, 32573, 238, 26193, 234, 39355, 111, 20998, 107, 201, 198, 2, 13328, 230, 105, 20998, 244, 43889, 228, 20998, 110, 46763, 108, 162, ...
1.88835
206
#! python3 import datetime as dt import requests import pandas as pd import lxml.html as lh '''' Class containing the code that scrapes the stock ticker/information from various stock & crypto sites''' class StockScraper: ''' This is a function that scrapes a table from a provided web page.'''
[ 2, 0, 21015, 18, 198, 11748, 4818, 8079, 355, 288, 83, 198, 11748, 7007, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 300, 19875, 13, 6494, 355, 300, 71, 198, 198, 39115, 5016, 7268, 262, 2438, 326, 15881, 274, 262, 4283, 4378,...
3.483516
91
#!/usr/bin/env python # coding: utf-8 # In[8]: import rebound import numpy as np ############### ### IMPORTS ### ############### params = np.load('sample_params.npy') ################### ### DEFINITIONS ### ################### radeg = np.pi/180 ############################ ############################ ####...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 554, 58, 23, 5974, 628, 198, 11748, 23623, 198, 11748, 299, 32152, 355, 45941, 628, 198, 7804, 4242, 21017, 198, 21017, 30023, 33002, 443...
2.127568
1,850
# coding=utf-8 # Copyright 2019 The Google NoisyStudent Team Authors. # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 13130, 383, 3012, 1400, 13560, 38778, 4816, 46665, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 705, 34156, 24036, 198, 2, 345, 743, 407, 779, 42...
2.807059
850
n = int(input('Digite um número para calcular o fatorial: ')) f = 1 for c in range(n, 0, -1): print(f'{c}', end='') print(' x ' if c > 1 else ' = ', end='') f = f * c print(f'{f}')
[ 77, 796, 493, 7, 15414, 10786, 19511, 578, 23781, 299, 21356, 647, 78, 31215, 2386, 10440, 267, 277, 21592, 25, 705, 4008, 198, 69, 796, 352, 198, 1640, 269, 287, 2837, 7, 77, 11, 657, 11, 532, 16, 2599, 198, 220, 220, 220, 3601, ...
2.053191
94
#!python """ This module provides pytest tests for the functions from preprocessing.py file """ import pytest import alphaviz.preprocessing as preproc # def test_preprocess_ckg_output(): # ckg_output_string_correct = "~Q92934;~Q15149" # ckg_output_string_correct_2 = " ~Q92934; ~Q15149" # ckg_output_stri...
[ 2, 0, 29412, 198, 37811, 198, 1212, 8265, 3769, 12972, 9288, 5254, 329, 262, 5499, 422, 662, 36948, 13, 9078, 2393, 198, 37811, 198, 198, 11748, 12972, 9288, 198, 11748, 435, 746, 615, 528, 13, 3866, 36948, 355, 662, 36942, 628, 198, ...
2.607792
385
from . import * # bind = BindTransmitter(system_id='test_id', password='abc123') # print bind.get_obj() # print bind.get_hex() # print bind.get_bin() # #print json.dumps(bind.get_obj(), indent=4, sort_keys=True) # #print json.dumps(decode_pdu(bind.get_hex()), indent=4, sort_keys=True) # print json...
[ 6738, 764, 1330, 1635, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 198, 2, 11007, 796, 41211, 8291, 37974, 7, 10057, 62, 312, 11639, 9288, 62, 312, 3256, 9206, 11639, 39305, 10163, 11537, 198, 2, 3601, 11007, 13, 1136, 62...
2.48996
249
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # (C) British Crown Copyright 2017-2020 Met Office. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions a...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 16529, 32501, 198, 2, 357, 34, 8, 3517, 12223, 15069, 2177, 12, 42334, 3395, 4452, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, ...
2.595957
9,400
""" Ref: https://dacon.io/competitions/official/235673/talkboard/401911?page=1&dtype=recent """ import os import re import platform import itertools import collections import pkg_resources # pip install py-rouge from io import open if platform.system() == "Windows": try: from eunjeon import Mecab exc...
[ 37811, 198, 8134, 25, 3740, 1378, 67, 7807, 13, 952, 14, 5589, 316, 1756, 14, 16841, 14, 22370, 45758, 14, 16620, 3526, 14, 21844, 35549, 30, 7700, 28, 16, 5, 67, 4906, 28, 49921, 198, 37811, 198, 11748, 28686, 198, 11748, 302, 198,...
2.645963
161
import functools import sys from typing import Set import nltk from flair.data import Sentence from flair.models import SequenceTagger from langdetect import detect @functools.lru_cache(maxsize=1) def get_tagger(language: str) -> SequenceTagger: """Return the tagger needed """ if language == "de": re...
[ 11748, 1257, 310, 10141, 198, 11748, 25064, 198, 6738, 19720, 1330, 5345, 198, 198, 11748, 299, 2528, 74, 198, 6738, 37457, 13, 7890, 1330, 11352, 594, 198, 6738, 37457, 13, 27530, 1330, 45835, 51, 7928, 198, 6738, 42392, 15255, 478, 13...
2.475285
789
from typing import Dict from abc import abstractmethod, ABC from pandas import DataFrame import json import os DEFAULT_TRANSLATION_PROVIDER = SchemaTranslationProvider()
[ 6738, 19720, 1330, 360, 713, 198, 198, 6738, 450, 66, 1330, 12531, 24396, 11, 9738, 198, 6738, 19798, 292, 1330, 6060, 19778, 198, 11748, 33918, 198, 11748, 28686, 628, 628, 198, 7206, 38865, 62, 5446, 1565, 8634, 6234, 62, 41283, 41237...
3.645833
48
from src.contexts.kms.computed_data.application.find_one.ComputedDataByKeyAndInputFinder import \ ComputedDataByKeyAndInputFinder from src.contexts.kms.computed_data.application.find_one.ComputedDataByKeyAndInputQuery import \ ComputedDataByKeyAndInputQuery from src.contexts.kms.computed_data.application.find_o...
[ 6738, 12351, 13, 22866, 82, 13, 74, 907, 13, 785, 17128, 62, 7890, 13, 31438, 13, 19796, 62, 505, 13, 5377, 17128, 6601, 3886, 9218, 1870, 20560, 37, 5540, 1330, 3467, 198, 220, 220, 220, 955, 17128, 6601, 3886, 9218, 1870, 20560, 3...
3.192825
223
import apscheduler from apscheduler.schedulers.blocking import BlockingScheduler #If you want to cleanup all test resources like vms, volumes, workloads then set # following cleanup parameter value to True otherwise False cleanup = True # pre requisite paramter pre_req = True #Test results for reporting PASS = "PAS...
[ 11748, 257, 862, 1740, 18173, 198, 6738, 257, 862, 1740, 18173, 13, 1416, 704, 377, 364, 13, 41938, 1330, 1086, 8629, 50, 1740, 18173, 198, 198, 2, 1532, 345, 765, 284, 27425, 477, 1332, 4133, 588, 410, 907, 11, 15343, 11, 26211, 82...
2.414172
1,637
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License, Ve...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 3050, 3517, 32250, 10501, 290, 509, 1689, 25418, 25767, 669, 7, 16, 8, 198, 2, 198, 2, 357, 16, 8, 509...
2.766667
570
# -*- coding: utf-8 -*- from pandas import DataFrame from typing import List, Tuple def dataframe_astype(df: DataFrame, columns: List[Tuple[str, type]]): """ DataFrame Column Type converter Parameters ---------- df: DataFrame Pandas DataFrame columns: list of tuple of str, type co...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 19798, 292, 1330, 6060, 19778, 198, 6738, 19720, 1330, 7343, 11, 309, 29291, 628, 198, 4299, 1366, 14535, 62, 459, 2981, 7, 7568, 25, 6060, 19778, 11, 15180, 25, ...
2.474453
274
# -*- coding: utf-8 -*- # Import Python Libs from __future__ import absolute_import, print_function, unicode_literals from tempfile import NamedTemporaryFile import os # Import Salt Testing Libs from tests.support.mixins import LoaderModuleMockMixin from tests.support.unit import TestCase, skipIf from tests.support.m...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 17267, 11361, 7980, 82, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 3601, 62, 8818, 11, 28000, 1098, 62, 17201, 874, 198, 6738, 20218, 7753, 1330, ...
2.149709
8,256
import keras from keras.datasets import mnist from keras.models import Sequential from keras.layers import Conv2D, MaxPooling2D, Dropout, Dense, Flatten import matplotlib.pyplot as plt import numpy as np import random pixel_width = 28 pixel_height = 28 no_of_classes = 10 batch_size = 32 epochs = 10 (features_train, l...
[ 11748, 41927, 292, 198, 6738, 41927, 292, 13, 19608, 292, 1039, 1330, 285, 77, 396, 198, 6738, 41927, 292, 13, 27530, 1330, 24604, 1843, 198, 6738, 41927, 292, 13, 75, 6962, 1330, 34872, 17, 35, 11, 5436, 27201, 278, 17, 35, 11, 142...
2.473154
894
test = { 'name': 'q2_1', 'points': 1, 'suites': [ { 'cases': [ {'code': '>>> # Make sure you assigned `binary options` to an array;\n>>> type(binary_options) == np.ndarray\nTrue', 'hidden': False, 'locked': False}, { 'code': '>>> # Should be a two element array of a ...
[ 9288, 796, 1391, 220, 220, 705, 3672, 10354, 705, 80, 17, 62, 16, 3256, 198, 220, 220, 220, 705, 13033, 10354, 352, 11, 198, 220, 220, 220, 705, 2385, 2737, 10354, 685, 220, 220, 1391, 220, 220, 705, 33964, 10354, 685, 220, 220, 1...
1.789894
376
import collections
[ 11748, 17268, 628, 198 ]
5.25
4
import torch import torch.nn as nn from .base_loss import Loss
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 764, 8692, 62, 22462, 1330, 22014, 628 ]
3.368421
19
from .successivehalving import SuccessiveHalving from .base import WarmStartIteration from .successiveresampling import SuccessiveResampling
[ 6738, 764, 13138, 425, 14201, 1075, 1330, 16282, 425, 40202, 1075, 198, 6738, 764, 8692, 1330, 25692, 10434, 29993, 341, 198, 6738, 764, 13138, 425, 411, 321, 11347, 1330, 16282, 425, 4965, 321, 11347, 198 ]
4.028571
35
#!_PYTHONLOC # # (C) COPYRIGHT 2009-2019 Ahasuerus # ALL RIGHTS RESERVED # # The copyright notice above does not evidence any actual or # intended publication of such source code. # # Version: $Revision$ # Date: $Date$ import string import sys import MySQLdb from isfdb import * from comm...
[ 2, 0, 62, 47, 56, 4221, 1340, 29701, 198, 2, 198, 2, 220, 220, 220, 220, 357, 34, 8, 27975, 38162, 9947, 3717, 12, 23344, 220, 220, 7900, 292, 15573, 385, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 11096, 371, 34874, 15731,...
2.255446
1,010
from pybars import Compiler import lxml.etree as etree import collections from . import Artifact import os class ArtifactGenerator(object): """Class used to generate artifacts for WSO2""" """Generate the artifact based on the passed template location and data""" def merge(self, a, b, path=None): "deep merge di...
[ 6738, 12972, 34046, 1330, 3082, 5329, 198, 11748, 300, 19875, 13, 316, 631, 355, 2123, 631, 198, 11748, 17268, 198, 6738, 764, 1330, 45908, 198, 11748, 28686, 198, 4871, 45908, 8645, 1352, 7, 15252, 2599, 198, 197, 37811, 9487, 973, 284...
2.637074
1,408
from math import pi import os import time # sum([n, n, n...]) adds any number of variables # print (subtract(8, 3)) # print (multiply(5, 3)) # print (double(7)) # print (triple(5)) # print (divide(8, 4)) # print (half(4)) # print (celsius_conv(94)) c_c = celsius_conv # print (fahrenheit_conv(49)) # print (p...
[ 6738, 10688, 1330, 31028, 198, 11748, 28686, 198, 11748, 640, 628, 198, 2, 2160, 26933, 77, 11, 299, 11, 299, 986, 12962, 6673, 597, 1271, 286, 9633, 198, 198, 2, 3601, 357, 7266, 83, 974, 7, 23, 11, 513, 4008, 198, 198, 2, 3601, ...
2.309278
485
import config from pymongo import MongoClient from instagram_api import insta_fetch_feed
[ 11748, 4566, 198, 6738, 279, 4948, 25162, 1330, 42591, 11792, 198, 6738, 916, 6713, 62, 15042, 1330, 916, 64, 62, 69, 7569, 62, 12363 ]
3.666667
24
import os import pandas as pd import numpy as np import math from random import shuffle from tensorflow import keras from sklearn.model_selection import train_test_split from sklearn.preprocessing import StandardScaler, MinMaxScaler from person_counting.data_generators.data_generators import Generator_CSVS from perso...
[ 11748, 28686, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 10688, 198, 6738, 4738, 1330, 36273, 198, 198, 6738, 11192, 273, 11125, 1330, 41927, 292, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, ...
2.446412
2,202
from .supervise import *
[ 6738, 764, 16668, 85, 786, 1330, 1635, 198 ]
3.125
8
from datetime import datetime from enum import Enum from typing import Dict, List, Optional, Tuple from .account import Account from .base import BaseModel class Permission(str, Enum): """ Workspace permission levels. """ no_permission = "none" read = "read" write = "write" full_co...
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 33829, 1330, 2039, 388, 198, 6738, 19720, 1330, 360, 713, 11, 7343, 11, 32233, 11, 309, 29291, 198, 198, 6738, 764, 23317, 1330, 10781, 198, 6738, 764, 8692, 1330, 7308, 17633, 628, 628, ...
2.930435
115
import math import numpy as np from sc2.ids.unit_typeid import UnitTypeId from sc2.helpers.control_group import ControlGroup from . import constants as C
[ 11748, 10688, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 17, 13, 2340, 13, 20850, 62, 4906, 312, 1330, 11801, 6030, 7390, 198, 6738, 629, 17, 13, 16794, 364, 13, 13716, 62, 8094, 1330, 6779, 13247, 198, 198, 6738, 764, ...
3.369565
46
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2019 Adrian Englhardt <adrian.englhardt@gmail.com> # Licensed under the MIT License - https://opensource.org/licenses/MIT from .change_detection_helpers import normalize, normalize_2d, normalize_2d_global, prepare_data, smooth_frequency, \ transform_t...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 357, 66, 8, 13130, 21462, 1985, 75, 28375, 1279, 324, 4484, 13, 1516, 75, 28375, 31, 14816, 13, 7...
2.764706
272
# 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 writing, software # distributed under the...
[ 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, 7330, 257, 4866, 286, 262, 13789, 379, 198, 2,...
3.825623
281
import package.tuplist as tl import package.superdict as sd import pulp as pl import package.config as conf import package.params as pm import numpy as np import pprint as pp
[ 11748, 5301, 13, 28047, 489, 396, 355, 256, 75, 198, 11748, 5301, 13, 16668, 11600, 355, 45647, 198, 11748, 38341, 355, 458, 198, 11748, 5301, 13, 11250, 355, 1013, 198, 11748, 5301, 13, 37266, 355, 9114, 198, 11748, 299, 32152, 355, ...
3.571429
49
from django.contrib import admin from guardian.admin import GuardedModelAdmin from ephios.core.models import ( Consequence, Event, EventType, LocalParticipation, Qualification, QualificationCategory, QualificationGrant, Shift, WorkingHours, ) admin.site.register(Qualification) admi...
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 21688, 13, 28482, 1330, 4932, 276, 17633, 46787, 198, 198, 6738, 304, 746, 4267, 13, 7295, 13, 27530, 1330, 357, 198, 220, 220, 220, 1482, 43167, 11, 198, 220, 220, 220, 8558,...
3.117347
196
"""Strptime-related classes and functions. CLASSES: LocaleTime -- Discovers and/or stores locale-specific time information TimeRE -- Creates regexes for pattern matching a string of text containing time information as is returned by time.strftime() FUNCTIONS: _getlang -- Figure out what la...
[ 37811, 13290, 457, 524, 12, 5363, 6097, 290, 5499, 13, 198, 198, 31631, 1546, 25, 198, 220, 220, 220, 15181, 1000, 7575, 1377, 19718, 690, 290, 14, 273, 7000, 36693, 12, 11423, 640, 1321, 198, 220, 220, 220, 3862, 2200, 1377, 7921, ...
2.052365
7,104
from kivy.adapters.dictadapter import DictAdapter from kivy.uix.selectableview import SelectableView from kivy.uix.listview import ListView, ListItemButton from kivy.uix.gridlayout import GridLayout from kivy.lang import Builder from kivy.factory import Factory from fixtures import integers_dict # [TODO] Will Selecta...
[ 6738, 479, 452, 88, 13, 324, 12126, 13, 11600, 324, 3429, 1330, 360, 713, 47307, 198, 6738, 479, 452, 88, 13, 84, 844, 13, 19738, 540, 1177, 1330, 9683, 540, 7680, 198, 6738, 479, 452, 88, 13, 84, 844, 13, 4868, 1177, 1330, 7343, ...
2.787654
405
import math import os import sys import numpy as np from util import load_result from itertools import combinations from itertools import product from ontology import Ontology def get_max_tree_distance(ontology, tags, debug=False): """ Description: Return max tree distance which can be derived with g...
[ 11748, 10688, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 7736, 1330, 3440, 62, 20274, 198, 6738, 340, 861, 10141, 1330, 17790, 198, 6738, 340, 861, 10141, 1330, 1720, 198, 6738, 39585, 1435, ...
2.294637
4,419
#coding:utf-8 import requests import pprint import csv main()
[ 2, 66, 7656, 25, 40477, 12, 23, 198, 11748, 7007, 198, 11748, 279, 4798, 198, 11748, 269, 21370, 198, 220, 220, 220, 220, 198, 198, 12417, 3419 ]
2.481481
27
#!/usr/bin/env python # # pddl_planner.py # ma-goal-recognition # # Created by Felipe Meneguzzi on 2020-03-12. # Copyright 2020 Felipe Meneguzzi. All rights reserved. # from recognizer.pddl.pddl_parser import PDDL_Parser from recognizer.pddl.state import applicable, apply import time
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 220, 279, 1860, 75, 62, 11578, 1008, 13, 9078, 198, 2, 220, 17266, 12, 35231, 12, 26243, 653, 198, 2, 198, 2, 220, 15622, 416, 13937, 3757, 6065, 1533, 4715, 72, 319, ...
2.745283
106
from qualang_tools.config.integration_weights_tools import ( convert_integration_weights, compress_integration_weights, plot_integration_weights, ) from qualang_tools.config.waveform_tools import ( drag_gaussian_pulse_waveforms, drag_cosine_pulse_waveforms, ) from qualang_tools.config.build...
[ 6738, 4140, 648, 62, 31391, 13, 11250, 13, 18908, 1358, 62, 43775, 62, 31391, 1330, 357, 201, 198, 220, 220, 220, 10385, 62, 18908, 1358, 62, 43775, 11, 201, 198, 220, 220, 220, 27413, 62, 18908, 1358, 62, 43775, 11, 201, 198, 220, ...
2.395683
556
import base64 import json import os import re import zlib from retrying import retry from xmlrpc.client import ServerProxy from api.fixture import load_fixture from api.subtitle.model import to_model LANGUAGE = 'en' NEWLINE_PATTERN = re.compile(r'(\r\n|\r|\n)') OPENSUBTITLES_URL = 'http://api.opensubtitles.org/xml-...
[ 11748, 2779, 2414, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 1976, 8019, 198, 198, 6738, 1005, 14992, 1330, 1005, 563, 198, 6738, 35555, 81, 14751, 13, 16366, 1330, 9652, 44148, 198, 198, 6738, 40391, 13, 69, 96...
2.412184
1,264
# /usr/bin/env python3.5 # -*- mode: python -*- # ============================================================================= # @@-COPYRIGHT-START-@@ # # Copyright (c) 2019, Qualcomm Innovation Center, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification,...
[ 2, 1220, 14629, 14, 8800, 14, 24330, 21015, 18, 13, 20, 198, 2, 532, 9, 12, 4235, 25, 21015, 532, 9, 12, 198, 2, 38093, 25609, 198, 2, 220, 25248, 12, 34, 3185, 38162, 9947, 12, 2257, 7227, 12, 12404, 198, 2, 198, 2, 220, 1506...
2.376921
6,638
import json from datetime import datetime from PyQt5.QtWidgets import QWidget, QVBoxLayout, QGridLayout, QHBoxLayout, QLabel, QLineEdit, QPushButton, QMessageBox from PyQt5.QtGui import QIntValidator from PyQt5.QtCore import Qt, pyqtSignal from fitness_tracker.database_wrapper import DatabaseWrapper
[ 11748, 33918, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 1330, 1195, 38300, 11, 1195, 53, 14253, 32517, 11, 1195, 41339, 32517, 11, 1195, 39, 14253, 32517, 11, 1195, 33986, 11, ...
2.980198
101
from ._plot_metadata_table import plot_data_summary, plot_edit_profiler, get_exported_metadata from ._demodata import get_lifeexpectancy_data
[ 6738, 47540, 29487, 62, 38993, 62, 11487, 1330, 7110, 62, 7890, 62, 49736, 11, 7110, 62, 19312, 62, 5577, 5329, 11, 651, 62, 1069, 9213, 62, 38993, 198, 6738, 47540, 9536, 375, 1045, 1330, 651, 62, 6042, 1069, 806, 3883, 62, 7890, 1...
3.302326
43
# -*- coding: UTF-8 -*- import re import json import multiprocessing import math from collections import OrderedDict import pdb from django.db.models import Q from django.db import transaction from django.conf import settings from django.views.decorators.csrf import csrf_exempt from django.shortcuts import render, g...
[ 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 220, 198, 198, 11748, 302, 198, 11748, 33918, 198, 11748, 18540, 305, 919, 278, 198, 11748, 10688, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 11748, 279, 9945, 198, 198, ...
1.777339
759
from NeuralNet.Oli.libs.ProcessingPipeline import ProcessingPipeline from NeuralNet.Oli.libs.Preprocessor import SimplePreprocessor, IPreprocessor #__________Configuration__________# # Path to folder which contains subfolders with the images IMG_PATH = '../../images/Dataset_2' # Name for model when saved MODEL_LOAD_PA...
[ 6738, 47986, 7934, 13, 46, 4528, 13, 8019, 82, 13, 18709, 278, 47, 541, 4470, 1330, 28403, 47, 541, 4470, 198, 6738, 47986, 7934, 13, 46, 4528, 13, 8019, 82, 13, 6719, 41341, 1330, 17427, 6719, 41341, 11, 6101, 260, 41341, 198, 198,...
3.335968
253
from pyrevolve import Checkpoint, Operator from devito import TimeFunction class CheckpointOperator(Operator): """Devito's concrete implementation of the ABC pyrevolve.Operator. This class wraps devito.Operator so it conforms to the pyRevolve API. pyRevolve will call apply with arguments t_start and...
[ 6738, 12972, 18218, 6442, 1330, 6822, 4122, 11, 35946, 198, 6738, 1614, 10094, 1330, 3862, 22203, 628, 198, 4871, 6822, 4122, 18843, 1352, 7, 18843, 1352, 2599, 198, 220, 220, 220, 37227, 13603, 10094, 338, 10017, 7822, 286, 262, 9738, ...
2.542544
1,187
#!/usr/bin/python3 # DRAFT import os import sys import json import numpy as np import matplotlib.pyplot as plt if __name__ == "__main__": if len(sys.argv) == 2: compare_descriptors(sys.argv[1])
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 2, 360, 44700, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 11748, 33918, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 19...
2.428571
84
from account.models.instructor_model import InstructorProfile import json from school.models.class_model import Class from school.models.school_model import School from django.urls.base import reverse from rest_framework.test import APITestCase from country.models import Country, City from django.contrib.auth import ge...
[ 6738, 1848, 13, 27530, 13, 259, 7249, 273, 62, 19849, 1330, 47839, 37046, 198, 11748, 33918, 198, 6738, 1524, 13, 27530, 13, 4871, 62, 19849, 1330, 5016, 198, 6738, 1524, 13, 27530, 13, 14347, 62, 19849, 1330, 3961, 198, 6738, 42625, ...
3.495238
105
import abc from typing import Any import torch AGGREGATION_MODES = ["mean", "max", "min"] class Metric(metaclass=abc.ABCMeta): """abstract class for Metric objects. Example: Simple usage of the Metric class:: class MyMetric(Metric): def _update(self, predictions, truth):...
[ 11748, 450, 66, 198, 6738, 19720, 1330, 4377, 198, 198, 11748, 28034, 198, 198, 4760, 28934, 38, 6234, 62, 33365, 1546, 796, 14631, 32604, 1600, 366, 9806, 1600, 366, 1084, 8973, 628, 198, 4871, 3395, 1173, 7, 4164, 330, 31172, 28, 39...
2.181188
1,010
"""Use this template for creating simple Python3 server""" from http.server import SimpleHTTPRequestHandler from socketserver import TCPServer
[ 37811, 11041, 428, 11055, 329, 4441, 2829, 11361, 18, 4382, 37811, 198, 198, 6738, 2638, 13, 15388, 1330, 17427, 40717, 18453, 25060, 198, 6738, 37037, 18497, 1330, 17283, 3705, 18497, 198 ]
4.645161
31
import numpy as np import matplotlib.pyplot as plt # This import registers the 3D projection, but is otherwise unused. from mpl_toolkits.mplot3d import Axes3D # noqa: F401 unused import def lorenz(x, y, z, s=10, r=28, b=2.667): ''' Given: x, y, z: a point of interest in three dimensional space s, r, b: par...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 2, 770, 1330, 28441, 262, 513, 35, 20128, 11, 475, 318, 4306, 21958, 13, 198, 6738, 285, 489, 62, 25981, 74, 896, 13, 76, 29487, 18, ...
2.304878
574
import torch import torch.nn as nn import torchvision import numpy as np from tqdm import tqdm from dataset import ImageDataset if __name__ == '__main__': device = "cuda:0" network_size = (4, 512, 256) learning_rate = 1e-4 iters = 250 mapping_size = 256 B_gauss = torch.randn((mapping_...
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 10178, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 198, 6738, 27039, 1330, 7412, 27354, 292, 316, 628, 628, 628, ...
2.335423
319
#!/usr/bin/env python # -*- coding: utf-8 -*- # ============================================================================= # IMPORTS # ============================================================================= from __future__ import unicode_literals from unittest import TestCas...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 38093, 25609, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
3.58046
174
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
[ 2, 198, 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 2, 393, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 2, 9387, 351, 428, 670, 329, 3224, 1321, 198, 2, 5115, 6634, 9238, 13, 220, ...
2.968794
705
from app.assets import compile_static_assets from flask import Flask from flask_assets import Environment from flask_compress import Compress from flask_talisman import Talisman from flask_wtf.csrf import CSRFProtect from jinja2 import ChoiceLoader from jinja2 import PackageLoader from jinja2 import PrefixLoader app...
[ 6738, 598, 13, 19668, 1330, 17632, 62, 12708, 62, 19668, 198, 6738, 42903, 1330, 46947, 198, 6738, 42903, 62, 19668, 1330, 9344, 198, 6738, 42903, 62, 5589, 601, 1330, 3082, 601, 198, 6738, 42903, 62, 39240, 23845, 1330, 7193, 23845, 19...
3.692308
91
# based on https://github.com/pypa/sampleproject # MIT License from io import open from os import path # Always prefer setuptools over distutils from setuptools import find_namespace_packages from setuptools import setup import versioneer here = path.abspath(path.dirname(__file__)) # Get the long description from ...
[ 2, 1912, 319, 3740, 1378, 12567, 13, 785, 14, 79, 4464, 64, 14, 39873, 16302, 198, 2, 17168, 13789, 198, 198, 6738, 33245, 1330, 1280, 198, 6738, 28686, 1330, 3108, 198, 198, 2, 16622, 4702, 900, 37623, 10141, 625, 1233, 26791, 198, ...
2.661562
653
#!/usr/bin/env python import sys, random vertices = [] faces = [] with open(sys.argv[1], "r") as file: lines = file.read().split("\n") outputobj = "" for line in lines: if line.startswith("v"): parts = line.split(" ") vertices.append([float(x) for x in parts[1:]]) i...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 25064, 11, 4738, 198, 198, 1851, 1063, 796, 17635, 198, 32186, 796, 17635, 198, 198, 4480, 1280, 7, 17597, 13, 853, 85, 58, 16, 4357, 366, 81, 4943, 355, 2393, 25, 198, 220, ...
1.983051
413
""" Scrape ODS data from the HSCIC """ import json import sys import ffs sys.path.append(ffs.Path.here().parent) import scrape DATA_DIR = ffs.Path.here()/'../../data' DOWNLOADS = 'http://systems.hscic.gov.uk/data/ods/datadownloads/index' def check_sanity_of(metadata): """ We've just finished scraping, let'...
[ 37811, 198, 3351, 13484, 440, 5258, 1366, 422, 262, 367, 6173, 2149, 198, 37811, 198, 11748, 33918, 198, 11748, 25064, 198, 198, 11748, 277, 9501, 198, 198, 17597, 13, 6978, 13, 33295, 7, 487, 82, 13, 15235, 13, 1456, 22446, 8000, 8, ...
2.193341
1,712
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-07-22 19:45 from __future__ import unicode_literals from django.db import migrations
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 940, 13, 20, 319, 2177, 12, 2998, 12, 1828, 678, 25, 2231, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 1...
2.690909
55
import tkinter as tk from tkinter import filedialog, Entry, messagebox from PIL import ImageTk, Image filenames = [] all_labels = [] base_labels = [] Layer_0 = Image.new(mode = "RGB", size = (1, 1)) left_img_out = Image.new(mode = "RGB", size = (1, 1)) right_img_out = Image.new(mode = "RGB", size = (1, 1)) window = ...
[ 11748, 256, 74, 3849, 355, 256, 74, 198, 6738, 256, 74, 3849, 1330, 5717, 498, 519, 11, 21617, 11, 3275, 3524, 198, 6738, 350, 4146, 1330, 7412, 51, 74, 11, 7412, 198, 198, 10379, 268, 1047, 796, 17635, 198, 439, 62, 23912, 1424, ...
2.521265
917
import dash import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output import plotly.express as px # This dataframe has 244 lines, but 4 distinct values for `day` df = px.data.tips() app = dash.Dash(__name__) app.layout = html.Div([ html.P("Selector:"), ...
[ 11748, 14470, 198, 11748, 14470, 62, 7295, 62, 5589, 3906, 355, 288, 535, 198, 11748, 14470, 62, 6494, 62, 5589, 3906, 355, 27711, 198, 6738, 14470, 13, 45841, 3976, 1330, 23412, 11, 25235, 198, 11748, 7110, 306, 13, 42712, 355, 279, ...
2.25
484
# Cron Job - # Problem Assign -- Contest with isProblem False -- Assign Problem # Result Assign -- Contest with isResult False # contest end -- (startTime + duration) <= time.now #Email from django.core.mail import send_mail from codedigger.settings import EMAIL_HOST_USER ## Short Code Contest # from .utils import lo...
[ 2, 31683, 15768, 532, 198, 2, 20647, 2195, 570, 1377, 27297, 351, 318, 40781, 10352, 1377, 2195, 570, 20647, 198, 2, 25414, 2195, 570, 1377, 27297, 351, 318, 23004, 10352, 198, 2, 8414, 886, 1377, 357, 9688, 7575, 1343, 9478, 8, 19841...
2.342541
1,448
"""Recognize and extract forms.""" import os from statistics import fmean from azure.ai.formrecognizer.aio import FormRecognizerClient, FormTrainingClient from azure.core.credentials import AzureKeyCredential class RecognizeCustomFormsSampleAsync: """Class to recognize forms in async mode.""" async def reco...
[ 37811, 6690, 2360, 1096, 290, 7925, 5107, 526, 15931, 198, 11748, 28686, 198, 6738, 7869, 1330, 277, 32604, 198, 198, 6738, 35560, 495, 13, 1872, 13, 687, 26243, 7509, 13, 64, 952, 1330, 5178, 6690, 2360, 7509, 11792, 11, 5178, 44357, ...
1.623806
3,663
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Jan 24 15:39:33 2021 Calculate and plot details of inner Solar System transits as seen from outer Solar System objects. Requires package solarsystem (https://pypi.org/project/solarsystem/) Animation requires imagemagick (imagemagick.org) @author: keat...
[ 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, 2365, 1987, 1315, 25, 2670, 25, 2091, 33448, 198, 198, 9771, 3129, 378, 290, 7110, ...
1.969306
8,601
import os.path as osp import sys import argparse import time import torch from torchvision import transforms this_dir = osp.dirname(__file__) paths = [] paths.append(osp.join(this_dir, '..', 'lib')) paths.append(osp.join(this_dir, '..', 'lib', 'dataset')) for path in paths: if path not in sys.path: sys.pa...
[ 11748, 28686, 13, 6978, 355, 267, 2777, 198, 11748, 25064, 198, 11748, 1822, 29572, 198, 11748, 640, 198, 198, 11748, 28034, 198, 6738, 28034, 10178, 1330, 31408, 198, 198, 5661, 62, 15908, 796, 267, 2777, 13, 15908, 3672, 7, 834, 7753,...
2.213545
1,447
# -*- coding: utf-8 -*- # DO NOT EDIT THIS FILE! # This file has been autogenerated by dephell <3 # https://github.com/dephell/dephell try: from setuptools import setup except ImportError: from distutils.core import setup import os.path readme = '' here = os.path.abspath(os.path.dirname(__file__)) readme_...
[ 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 8410, 5626, 48483, 12680, 45811, 0, 198, 2, 770, 2393, 468, 587, 1960, 519, 877, 515, 416, 1207, 12758, 1279, 18, 198, 2, 3740, 1378, 12567, 13, 785, 14...
2.614325
726
import pytest import urllib.request import os import hashlib from elasticsearch import Elasticsearch, ConnectionError, RequestError, NotFoundError from time import sleep from image_match.elasticsearch_driver import SignatureES from PIL import Image test_img_url1 = 'https://camo.githubusercontent.com/810bdde0a88bc3f8c...
[ 11748, 12972, 9288, 198, 11748, 2956, 297, 571, 13, 25927, 198, 11748, 28686, 198, 11748, 12234, 8019, 198, 6738, 27468, 12947, 1330, 48567, 12947, 11, 26923, 12331, 11, 19390, 12331, 11, 1892, 21077, 12331, 198, 6738, 640, 1330, 3993, 19...
2.059041
813
BASE_DIRECTORY = None CACHE = "/tmp/tru"
[ 33, 11159, 62, 17931, 23988, 15513, 796, 6045, 198, 34, 2246, 13909, 796, 12813, 22065, 14, 83, 622, 1, 198 ]
2.05
20
from src.BandC import * from src.Exceptions import FileFormatNotFound __parsers__ = {'.csv': CSV, '.arff': Arff} __url_parsers__ = {'.csv': URLCSV, '.arff': URLARFF} def assign_parser(file_path: str, contents: str = None, verbose: bool = False) -> callable: """ Allocate a specific parser to a file_path :par...
[ 6738, 12351, 13, 31407, 34, 1330, 1635, 198, 6738, 12351, 13, 3109, 11755, 1330, 9220, 26227, 3673, 21077, 198, 198, 834, 79, 945, 364, 834, 796, 1391, 4458, 40664, 10354, 44189, 11, 45302, 283, 487, 10354, 943, 487, 92, 198, 834, 637...
2.352113
710
from tests.utils import assert_nodes_equal, load_xml, render_node from zibalzeep import xsd
[ 6738, 5254, 13, 26791, 1330, 6818, 62, 77, 4147, 62, 40496, 11, 3440, 62, 19875, 11, 8543, 62, 17440, 198, 6738, 1976, 21342, 2736, 538, 1330, 2124, 21282, 628, 198 ]
3.133333
30
# -*- coding: utf-8 -*- # # Copyright ©2018-2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at apache.org/licenses/LICENSE-2.0. # # Unless required by applicable law or agreed to...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 10673, 7908, 12, 23344, 3012, 11419, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 3...
2.882
1,000
from os import path import pytest import datashader as ds import rasterio as rio from pytest import set_trace BASE_PATH = path.split(__file__)[0] DATA_PATH = path.abspath(path.join(BASE_PATH, 'data')) TEST_RASTER_PATH = path.join(DATA_PATH, 'world.rgb.tif') with rio.open(TEST_RASTER_PATH) as src: x_range = (src...
[ 6738, 28686, 1330, 3108, 198, 198, 11748, 12972, 9288, 198, 11748, 4818, 1077, 5067, 355, 288, 82, 198, 11748, 374, 1603, 952, 355, 374, 952, 198, 198, 6738, 12972, 9288, 1330, 900, 62, 40546, 198, 198, 33, 11159, 62, 34219, 796, 3108...
2.025926
270
#!/usr/bin/python3 # -*- coding: utf-8 -*- import os SETTINGS_PRIORITY = 80 # THESE SETTINGS ARE NEEDED FOR PYSETTINGS SESSIONLOG_PLUGIN_ICON = os.path.join(os.path.dirname(__file__), 'resources', 'history.png') SESSIONLOG_PLUGIN_WINDOW_SIZE = 700, 600 SESSIONLOG_PLUGIN_REFRESH_RATE = 1000
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 28686, 198, 198, 28480, 51, 20754, 62, 4805, 41254, 9050, 796, 4019, 198, 198, 2, 48947, 25823, 51, 20754, 1...
2.274809
131
"""Various utility functions.""" import sys import time import signal import numpy as np def getstop(): """Returns stop so that stop[0] is True if ctrl+c was hit.""" stop = [False] _orig = [None] _orig[0] = signal.signal(signal.SIGINT, handler) return stop def saveopt(fname, opt): """Save ...
[ 37811, 40009, 10361, 5499, 526, 15931, 198, 198, 11748, 25064, 198, 11748, 640, 198, 11748, 6737, 198, 11748, 299, 32152, 355, 45941, 628, 198, 4299, 651, 11338, 33529, 198, 220, 220, 220, 37227, 35561, 2245, 523, 326, 2245, 58, 15, 60,...
2.498866
441
import geopandas as gpd import pandas as pd from shapely.geometry import Point from geopandas.tools import sjoin import sqlite3 #from datetime import datetime, timezone import datetime co_county_sf = '/Users/rl/scratch/covid-19/facebook/co_counties/co_counties.shp' boulder_county_zone_sf = '/Users/rl/scratch/covi...
[ 11748, 30324, 392, 292, 355, 27809, 67, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 5485, 306, 13, 469, 15748, 1330, 6252, 198, 6738, 30324, 392, 292, 13, 31391, 1330, 264, 22179, 198, 11748, 44161, 578, 18, 198, 2, 6738, 4818, ...
2.71831
142
from saiqa.Model.UserModel import User from saiqa.Service.UserService import UserService from saiqa.Service.QuestionService import QuestionService from saiqa.Exception.CustomException import FormatError, PasswordMismatchError, EmptyFormError import re service = UserService('test') qser = QuestionService('test') # Lis...
[ 6738, 473, 72, 20402, 13, 17633, 13, 12982, 17633, 1330, 11787, 198, 6738, 473, 72, 20402, 13, 16177, 13, 12982, 16177, 1330, 11787, 16177, 198, 6738, 473, 72, 20402, 13, 16177, 13, 24361, 16177, 1330, 18233, 16177, 198, 6738, 473, 72, ...
3.553191
141
# Coding Practice #0617 #---------------------------------------------------------------------------------- import numpy as np import cv2 # Go to the directory where the data file is located. # os.chdir(r'~~') # Please, replace the path with your own. # 1. Morphological filtering. # Op...
[ 171, 119, 123, 2, 327, 7656, 19939, 1303, 3312, 1558, 198, 2, 10097, 1783, 438, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 17, 198, 198, 2, 1514, 284, 262, 8619, 810, 262, 1366, 2393, 318, 5140, 13, 220, 198, 2,...
2.002861
699