content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import numpy as np from ukfm import SO3, SE3 import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D class PENDULUM: """Pendulum example, where the state lives on the 2-sphere. See a text description of the spherical pendulum dynamics in :cite:`sjobergAn2019`, Section 7, and :cite:`kotaru...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 334, 74, 38353, 1330, 12809, 18, 11, 7946, 18, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 285, 489, 62, 25981, 74, 896, 13, 76, 29487, 18, 67, 1330, 12176, 274,...
1.900667
2,547
"""Run the Sample ACE problem from [Breiman85]_.""" import numpy.random import scipy.special from ace import ace def build_sample_ace_problem_breiman85(N=200): """Sample problem from Breiman 1985.""" x_cubed = numpy.random.standard_normal(N) x = scipy.special.cbrt(x_cubed) noise = numpy.random.stand...
[ 37811, 10987, 262, 27565, 40488, 1917, 422, 685, 12679, 24086, 5332, 60, 62, 526, 15931, 198, 198, 11748, 299, 32152, 13, 25120, 198, 11748, 629, 541, 88, 13, 20887, 198, 198, 6738, 31506, 1330, 31506, 628, 198, 4299, 1382, 62, 39873, ...
2.182166
785
""" Modifications copyright (C) 2020 Michael Strobl """ import pprint import configparser pp = pprint.PrettyPrinter() #endinit if __name__=='__main__': c = Config("configs/allnew_mentions_config.ini", verbose=True)
[ 37811, 198, 5841, 6637, 6634, 357, 34, 8, 12131, 3899, 30183, 2436, 198, 37811, 198, 198, 11748, 279, 4798, 198, 11748, 4566, 48610, 198, 198, 381, 796, 279, 4798, 13, 35700, 6836, 3849, 3419, 628, 220, 220, 220, 1303, 437, 15003, 198...
2.8375
80
import pandas as pd import dill as pickle # sklearn from sklearn.model_selection import train_test_split import json import os import numpy as np import matplotlib.pyplot as plt import itertools from collections import Counter # sklearn from sklearn.preprocessing import MinMaxScaler from sklearn.metrics import roc_au...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 288, 359, 355, 2298, 293, 198, 2, 1341, 35720, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4512, 62, 9288, 62, 35312, 198, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 299, 321...
3.532934
167
"""Utility functions for interacting with the console""" #----------------------------------------------------------------------------- # Copyright (c) 2013, the IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this ...
[ 37811, 18274, 879, 5499, 329, 24986, 351, 262, 8624, 37811, 198, 2, 10097, 32501, 198, 2, 15069, 357, 66, 8, 2211, 11, 262, 6101, 7535, 7712, 4816, 13, 198, 2, 198, 2, 4307, 6169, 739, 262, 2846, 286, 262, 40499, 347, 10305, 13789, ...
2.947955
1,345
# coding=utf-8 from os import sys, path from logging import getLogger from items.view import app sys.path.append(path.dirname(path.abspath(__file__))) logger = getLogger(__name__) logger.info(sys.path) if __name__ == '__main__': app.run(host='0.0.0.0', port=8080)
[ 2, 19617, 28, 40477, 12, 23, 198, 198, 6738, 28686, 1330, 25064, 11, 3108, 198, 6738, 18931, 1330, 651, 11187, 1362, 198, 198, 6738, 3709, 13, 1177, 1330, 598, 198, 198, 17597, 13, 6978, 13, 33295, 7, 6978, 13, 15908, 3672, 7, 6978,...
2.469027
113
from lib import action
[ 6738, 9195, 1330, 2223, 628 ]
4.8
5
""" ******************************************************************************** * Name: gen_commands.py * Author: Nathan Swain * Created On: 2015 * Copyright: (c) Brigham Young University 2015 * License: BSD 2-Clause ******************************************************************************** """ import os imp...
[ 37811, 198, 17174, 17174, 8412, 198, 9, 6530, 25, 2429, 62, 9503, 1746, 13, 9078, 198, 9, 6434, 25, 18106, 2451, 391, 198, 9, 15622, 1550, 25, 1853, 198, 9, 15069, 25, 357, 66, 8, 37434, 6960, 2059, 1853, 198, 9, 13789, 25, 347, ...
2.461287
917
if __name__ == "__main__": grid = [[0 for x in range(9)] for y in range(9)] grid = [[3, 0, 6, 5, 0, 8, 4, 0, 0], [5, 2, 0, 0, 0, 0, 0, 0, 0], [0, 8, 7, 0, 0, 0, 0, 3, 1], [0, 0, 3, 0, 1, 0, 0, 8, 0], [9, 0, 0, 8, 6, 3, 0, 0, 5], ...
[ 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 201, 198, 201, 198, 220, 220, 220, 10706, 796, 16410, 15, 329, 2124, 287, 2837, 7, 24, 15437,...
1.477612
402
# -*- coding: utf-8 -*- # # Hymn documentation build configuration file import os import sys PROJECT_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '../')) sys.path.insert(0, PROJECT_DIR) import hymn extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.coverage', 'sphinx.ext.viewcode', ] sourc...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 367, 4948, 77, 10314, 1382, 8398, 2393, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 31190, 23680, 62, 34720, 796, 28686, 13, 6978, 13, 397, 2777, 776, 7...
2.302428
453
# coding=utf-8 from services.base import BaseService from services.service_locator import ServiceLocator from logger import error __author__ = 'Glebov Boris'
[ 2, 19617, 28, 40477, 12, 23, 198, 198, 6738, 2594, 13, 8692, 1330, 7308, 16177, 198, 6738, 2594, 13, 15271, 62, 17946, 1352, 1330, 4809, 33711, 1352, 198, 6738, 49706, 1330, 4049, 198, 198, 834, 9800, 834, 796, 705, 38, 293, 65, 709...
3.5
46
import os from typing import List import random import h5py import numpy as np from PIL import Image, ImageFile import threading # force pillow to load also truncated images ImageFile.LOAD_TRUNCATED_IMAGES = True # number of images to take from the folder N_EL = int(5e5) # path/to/folder that contains the images. No p...
[ 11748, 28686, 198, 6738, 19720, 1330, 7343, 198, 11748, 4738, 198, 11748, 289, 20, 9078, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 350, 4146, 1330, 7412, 11, 7412, 8979, 198, 11748, 4704, 278, 198, 2, 2700, 28774, 284, 3440, 635, ...
2.372252
2,047
import urllib.request import os import argparse from bs4 import BeautifulSoup parser = argparse.ArgumentParser() parser.add_argument("url", type=str, nargs=1, help="Main url with list of recipe URLs") parser.add_argument("cuisine", type=str, nargs=1, help="Type of cuisine on the main url page") parser.add_argument("pa...
[ 11748, 2956, 297, 571, 13, 25927, 198, 11748, 28686, 198, 11748, 1822, 29572, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 3419, 198, 48610, 13, 2860, 62, 49140, 7203, 6371, ...
2.442408
764
""" Here are declare all the settings of the app. 1. Database configurations. 2. Develop config 3. Prod config 4. Also default config that is develop """ import os # file' path BASE_DIR = os.path.abspath(os.path.dirname(__file__)) #main class configuration # Develop configuration ...
[ 37811, 198, 220, 220, 220, 3423, 389, 13627, 477, 262, 6460, 286, 262, 598, 13, 198, 220, 220, 220, 220, 220, 220, 220, 352, 13, 24047, 25412, 13, 198, 220, 220, 220, 220, 220, 220, 220, 362, 13, 6013, 4566, 198, 220, 220, 220, ...
2.852071
169
import pytest from django.urls import reverse from freezegun import freeze_time from rest_framework import status from datahub.company_referral.test.factories import ( ClosedCompanyReferralFactory, CompanyReferralFactory, ) from datahub.core.test_utils import format_date_or_datetime, get_attr_or_none from data...
[ 11748, 12972, 9288, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 6738, 1479, 89, 1533, 403, 1330, 16611, 62, 2435, 198, 6738, 1334, 62, 30604, 1330, 3722, 198, 198, 6738, 4818, 993, 549, 13, 39722, 62, 260, 2232, 1373, 13, ...
2.444885
1,261
""" The AwsIamTester class implements all necessary logic to run validations on an account, role or user. """ # pylint: disable=broad-except,C0103,E0401,R0912,R0913,R0914,R0915,R1702,W0603,W1203 from __future__ import annotations import os import sys import errno import json import logging import re import time impo...
[ 37811, 198, 464, 5851, 82, 40, 321, 51, 7834, 1398, 23986, 477, 3306, 9156, 284, 1057, 4938, 602, 319, 281, 1848, 11, 2597, 393, 2836, 13, 198, 37811, 198, 198, 2, 279, 2645, 600, 25, 15560, 28, 36654, 12, 16341, 11, 34, 486, 3070...
3.139665
179
#!/usr/bin/python -u import datetime import calendar if __name__ == "__main__": print datetime.datetime.today().weekday() # 3 print calendar.day_name[datetime.datetime.today().weekday()] # Thursday
[ 2, 48443, 14629, 14, 8800, 14, 29412, 532, 84, 198, 11748, 4818, 8079, 198, 11748, 11845, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 3601, 4818, 8079, 13, 19608, 8079, 13, 40838, 22446, 1046...
2.776316
76
from rich.console import Console import subprocess as sp import time import click @click.command() @click.option('--path','-p',help='Path of file to watch') @click.option('--arguments','-args',help='Arguments to run when file changes') @click.option('--delay','-d',default=4,help='Delay in seconds') def star...
[ 6738, 5527, 13, 41947, 1330, 24371, 201, 198, 11748, 850, 14681, 355, 599, 201, 198, 11748, 640, 201, 198, 11748, 3904, 201, 198, 201, 198, 201, 198, 31, 12976, 13, 21812, 3419, 201, 198, 31, 12976, 13, 18076, 10786, 438, 6978, 3256, ...
2.864035
228
import json import os from lib.object_documentor import ( documentize_object, documentize_prop, documentize_array, ) file_name = input("Specify json to document: ") file = open(file_name) data = json.load(file) # Iterating through the json lines = [" Prop | Type | Description | Example \n", "----|----|-...
[ 11748, 33918, 198, 11748, 28686, 198, 6738, 9195, 13, 15252, 62, 22897, 273, 1330, 357, 198, 220, 220, 220, 3188, 1096, 62, 15252, 11, 198, 220, 220, 220, 3188, 1096, 62, 22930, 11, 198, 220, 220, 220, 3188, 1096, 62, 18747, 11, 198...
2.64486
321
# Blackheart Day Damage Skin success = sm.addDamageSkin(2435313) if success: sm.chat("The Blackheart Day Damage Skin has been added to your account's damage skin collection.") # sm.consumeItem(2435313)
[ 2, 2619, 11499, 3596, 8995, 17847, 198, 13138, 796, 895, 13, 2860, 22022, 42455, 7, 1731, 2327, 25838, 8, 198, 361, 1943, 25, 198, 220, 220, 220, 895, 13, 17006, 7203, 464, 2619, 11499, 3596, 8995, 17847, 468, 587, 2087, 284, 534, 1...
3.28125
64
import numpy as np import tensorflow as tf from tensorflow.keras import backend as K from tensorflow.keras.layers import Layer class ScheduledDropout(Layer): """Applies Scheduled Dropout to the input. The Dropout layer randomly sets input units to 0 with a frequency of `rate` scheduled by network...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 198, 6738, 11192, 273, 11125, 13, 6122, 292, 1330, 30203, 355, 509, 198, 6738, 11192, 273, 11125, 13, 6122, 292, 13, 75, 6962, 1330, 34398, 628, 198, 4871, ...
2.604788
3,049
import re string = "" while True: command = input() if command == "": break else: string += " "+command search_patter = r"(www\.([A-Za-z0-9]+((-[A-Za-z0-9]+))*)\.([a-z]+((\.[a-z]+))*))" for i in re.findall(search_patter, string): print(i[0])
[ 11748, 302, 198, 198, 8841, 796, 13538, 198, 4514, 6407, 25, 198, 220, 220, 220, 3141, 796, 5128, 3419, 198, 220, 220, 220, 611, 3141, 6624, 366, 1298, 198, 220, 220, 220, 220, 220, 220, 220, 2270, 198, 220, 220, 220, 2073, 25, 19...
2.014706
136
""" Do not modify this file. It is generated from the Swagger specification. Container module for JSONSchema definitions. This does not include inlined definitions. The pretty-printing functionality provided by the json module is superior to what is provided by pformat, hence the use of json.loads(). """ import json ...
[ 37811, 198, 5211, 407, 13096, 428, 2393, 13, 632, 318, 7560, 422, 262, 2451, 7928, 20855, 13, 198, 198, 29869, 8265, 329, 19449, 27054, 2611, 17336, 13, 198, 1212, 857, 407, 2291, 287, 10837, 17336, 13, 198, 198, 464, 2495, 12, 4798, ...
3.675676
148
# VMware vCloud Director Python SDK # Copyright (c) 2014-2019 VMware, Inc. All Rights Reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 ...
[ 2, 37754, 410, 18839, 5890, 11361, 26144, 198, 2, 15069, 357, 66, 8, 1946, 12, 23344, 37754, 11, 3457, 13, 1439, 6923, 33876, 13, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, ...
2.287694
3,681
import graphene from graphene import relay from api.schema.benefit import BenefitQuery from api.schema.branch import BranchQuery from api.schema.cultural_fit import CulturalFitQuery from api.schema.dashboard import DashboardQuery from api.schema.faq_category import FAQCategoryQuery from api.schema.company import Compa...
[ 11748, 42463, 198, 198, 6738, 42463, 1330, 24248, 198, 6738, 40391, 13, 15952, 2611, 13, 48649, 1330, 38065, 20746, 198, 6738, 40391, 13, 15952, 2611, 13, 1671, 3702, 1330, 20551, 20746, 198, 6738, 40391, 13, 15952, 2611, 13, 30844, 62, ...
3.707048
454
import pandas as pd import h5py from sentence_transformers import SentenceTransformer, util import re import pickle class Sample(): """Samples a relevant paper given an input, using corpus_embeddings """ def sample(self, paper_id, abstract, title): """Given paper_text ( = paper_abstract+paper_tit...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 289, 20, 9078, 198, 6738, 6827, 62, 35636, 364, 1330, 11352, 594, 8291, 16354, 11, 7736, 198, 11748, 302, 198, 11748, 2298, 293, 628, 198, 4871, 27565, 33529, 198, 220, 220, 220, 37227, 50,...
2.646712
1,019
# Copyright (c) Facebook, Inc. and its affiliates. from mmf.common.registry import registry from mmf.datasets.builders.visual_genome.builder import VisualGenomeBuilder from mmf.datasets.builders.visual_genome.masked_dataset import MaskedVisualGenomeDataset @registry.register_builder("masked_visual_genome")
[ 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 198, 198, 6738, 8085, 69, 13, 11321, 13, 2301, 4592, 1330, 20478, 198, 6738, 8085, 69, 13, 19608, 292, 1039, 13, 50034, 13, 41464, 62, 5235, 462, 13, 38272, 1330, 1561...
3.206186
97
from unittest import TestCase from core.download import DownloadHelperMulti, DownLoadUrl, DownLoadUrlAdvance # def test
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 6738, 4755, 13, 15002, 1330, 10472, 47429, 29800, 11, 5588, 8912, 28165, 11, 5588, 8912, 28165, 2782, 19259, 628, 198, 220, 220, 220, 1303, 825, 1332, 628, 198 ]
3.486486
37
#!/usr/bin/env python3 # The MIT License (MIT) # # Copyright (c) 2017 allancth # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 383, 17168, 13789, 357, 36393, 8, 198, 2, 198, 2, 15069, 357, 66, 8, 2177, 477, 272, 310, 71, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, ...
3.241463
410
from pathlib import Path EXP_NAME = 'Transformer32' EPOCH = 20 EMBEDDING_DIM = 64 ENCODER_STACK = 6 ATTENTION_HEAD = 1 DROPOUT = 0.1 LR = 0.0001 BATCH_SIZE = 32 AUGMENTATION = None MAX_FEATURE = 32 SMOTE_SEED = 23904 PYTORCH_SEED = 321295675063 PYTHON_SEED = 123146427 ML_SEED = 32129 MODEL_DIR = Path.cwd() / "models...
[ 6738, 3108, 8019, 1330, 10644, 198, 198, 49864, 62, 20608, 796, 705, 8291, 16354, 2624, 6, 198, 8905, 46, 3398, 796, 1160, 198, 3620, 33, 1961, 35, 2751, 62, 35, 3955, 796, 5598, 198, 24181, 3727, 1137, 62, 2257, 8120, 796, 718, 198...
2.473016
315
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Tue Mar 31 11:55:42 2020 @author: esteban """ # Este script necesita que instales # conda install geopandas #conda install -c conda-forge descartes fechaAAnalizar='2020-05-04' alFecha=" al 04/05" cuarentena_total=['Arica', 'Estación C...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 201, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 37811, 201, 41972, 319, 30030, 1526, 3261, 1367, 25, 2816, 25, 3682, 12131, 201, 31, 9800, 25, 1556, 1765, 272, 2...
2.039841
5,045
#!/usr/bin/env python # # Copyright (c) 2019, Arista Networks, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # - Redistributions of source code must retain the above copyright notice, # ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 15069, 357, 66, 8, 13130, 11, 943, 12523, 27862, 11, 3457, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 1...
2.549626
3,073
# Space: O(1) # Time: O(n)
[ 198, 2, 4687, 25, 440, 7, 16, 8, 198, 2, 3862, 25, 440, 7, 77, 8, 628, 628, 198 ]
1.684211
19
#!/usr/bin/env python import rospy from mavros_msgs.msg import PositionTarget from geometry_msgs.msg import PoseStamped from std_msgs.msg import Float32, String, Bool if __name__ == '__main__': rospy.init_node('checker_1') server = Server() rospy.Subscriber("/uav1/mavros/local_position/pose", PoseStampe...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 686, 2777, 88, 198, 6738, 285, 615, 4951, 62, 907, 14542, 13, 19662, 1330, 23158, 21745, 198, 6738, 22939, 62, 907, 14542, 13, 19662, 1330, 37557, 1273, 13322, 198, 6738, 14367, ...
2.606742
178
"""Models!""" from pathlib import Path import re import glob from django.db import models from django.urls import reverse from gbt_archive.utils import get_archive_path class History(models.Model): """Stores history of CSV exports, intended for AAT consumption""" historyid = models.AutoField(db_column="...
[ 37811, 5841, 1424, 2474, 15931, 198, 6738, 3108, 8019, 1330, 10644, 198, 11748, 302, 198, 11748, 15095, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 198, 6738, 308, 18347, 6...
2.83557
298
from talon import ctrl, noise, actions noise.register( "pop", lambda m: ctrl.mouse_click() if actions.speech.enabled() else actions.speech.enable(), )
[ 6738, 3305, 261, 1330, 269, 14859, 11, 7838, 11, 4028, 198, 198, 3919, 786, 13, 30238, 7, 198, 220, 220, 220, 366, 12924, 1600, 198, 220, 220, 220, 37456, 285, 25, 269, 14859, 13, 35888, 62, 12976, 3419, 198, 220, 220, 220, 611, 4...
2.666667
63
from PIL import Image from io import BytesIO from base64 import b64decode import numpy import re import cv2 import random from collections import namedtuple from math import hypot if cv2.__version__.split()[0] == '3': old_find_contours = cv2.findContours cv2.findContours = new_find_contours RotatedRect = n...
[ 6738, 350, 4146, 1330, 7412, 198, 6738, 33245, 1330, 2750, 4879, 9399, 198, 6738, 2779, 2414, 1330, 275, 2414, 12501, 1098, 198, 11748, 299, 32152, 198, 11748, 302, 198, 11748, 269, 85, 17, 198, 11748, 4738, 198, 6738, 17268, 1330, 3706...
2.010254
2,243
import ubelt as ub import numpy as np from . import embeding from . import util __all__ = ['InteractiveIter'] INDEXABLE_TYPES = (list, tuple, np.ndarray) class InteractiveIter(object): """ Choose next value interactively iterable should be a list, not a generator. sorry """ def __init__(iiter...
[ 11748, 20967, 2120, 355, 20967, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 764, 1330, 11525, 278, 198, 6738, 764, 1330, 7736, 198, 198, 834, 439, 834, 796, 37250, 9492, 5275, 29993, 20520, 628, 198, 12115, 6369, 17534, 62, 9936, 47,...
2.043153
2,943
import cv2 as cv import numpy as np import kociemba DEBUG = False eps = 0.00001 firstRead = [] secondRead = [] firstDone = False cam = cv.VideoCapture(0) cam.set(cv.CAP_PROP_FRAME_HEIGHT, 720) W, H = int(cam.get(cv.CAP_PROP_FRAME_WIDTH)), int(cam.get(cv.CAP_PROP_FRAME_HEIGHT)) if W != 1280 or H != 720: print("WAR...
[ 11748, 269, 85, 17, 355, 269, 85, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 479, 1733, 368, 7012, 198, 198, 30531, 796, 10352, 198, 25386, 796, 657, 13, 2388, 16, 198, 11085, 5569, 796, 17635, 198, 12227, 5569, 796, 17635, 198, ...
1.767335
13,556
#!/usr/bin/env python # -*- coding: utf-8 -*- __metaclss__=type import random import math import collections from PIL import Image, ImageDraw, ImageFont from utils.font import FontObj from utils.color import Color import skimage.util import numpy as np import cv2 import matplotlib.pyplot as plt import sys import time...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 834, 4164, 37779, 824, 834, 28, 4906, 198, 198, 11748, 4738, 198, 11748, 10688, 198, 11748, 17268, 198, 6738, 350,...
2.897638
127
from dimacs import load_file
[ 6738, 5391, 16436, 1330, 3440, 62, 7753, 198 ]
3.625
8
# Code behind module for DCAL_Custom_Mosaics.ipynb ################################ ## ## Import Statments ## ################################ # Import standard Python modules import sys import datacube # Import DCAL utilities containing function definitions used generally across DCAL sys.path.append('../DCAL_utils'...
[ 2, 6127, 2157, 8265, 329, 6257, 1847, 62, 15022, 62, 44, 8546, 873, 13, 541, 2047, 65, 198, 198, 29113, 198, 2235, 198, 2235, 17267, 5133, 902, 198, 2235, 198, 29113, 198, 198, 2, 17267, 3210, 11361, 13103, 198, 11748, 25064, 198, 1...
4.623656
93
import fulfillment fulfillment.core.api_key = 'YOUR_API_KEY_GOES_HERE' # set debug to true to get print json fulfillment.core.Debug = True fulfillment.Warehouse.retrieveALL()
[ 11748, 32402, 198, 198, 913, 20797, 434, 13, 7295, 13, 15042, 62, 2539, 796, 705, 56, 11698, 62, 17614, 62, 20373, 62, 11230, 1546, 62, 39, 9338, 6, 198, 2, 900, 14257, 284, 2081, 284, 651, 3601, 33918, 198, 913, 20797, 434, 13, 7...
2.854839
62
r""" Solve Poisson equation in 2D with periodic bcs in one direction and homogeneous Neumann in the other \nabla^2 u = f, Use Fourier basis for the periodic direction and Shen's Neumann basis for the non-periodic direction. The equation to solve is (\nabla^2 u, v) = (f, v) """ import sys import os from sy...
[ 81, 37811, 198, 50, 6442, 7695, 30927, 16022, 287, 362, 35, 351, 27458, 275, 6359, 287, 530, 4571, 198, 392, 3488, 32269, 3169, 40062, 287, 262, 584, 628, 220, 220, 220, 3467, 77, 397, 5031, 61, 17, 334, 796, 277, 11, 198, 198, 11...
2.505988
1,002
import subprocess import itertools command="xrandr --listmonitors" output = subprocess.run(command.split(), stdout=subprocess.PIPE, check=True, text=True) output = output.stdout displays_lines = output.split('\n')[1:-1] displays = [] for line in displays_lines: displays.append(line.split()[-1]) options = [] fo...
[ 11748, 850, 14681, 198, 11748, 340, 861, 10141, 198, 198, 21812, 2625, 87, 25192, 81, 1377, 4868, 2144, 6742, 1, 198, 198, 22915, 796, 850, 14681, 13, 5143, 7, 21812, 13, 35312, 22784, 14367, 448, 28, 7266, 14681, 13, 47, 4061, 36, ...
2.454829
321
from random import randint import threading # Variavel global n_populacao = [] # funcoes if __name__ == '__main__': # Leitura do arquivo externo (instancias) file = open("100.txt") arquivo = file.read() # ler a cadeia de caracteres do arquivo .txt instancias = arquivo.split() # separar e agrupar os caracteres # ...
[ 6738, 4738, 1330, 43720, 600, 198, 11748, 4704, 278, 198, 2, 569, 10312, 626, 3298, 198, 77, 62, 12924, 377, 330, 5488, 796, 17635, 198, 2, 1257, 1073, 274, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 19...
1.867358
3,566
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-07-25 11:53 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, 201, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 319, 2177, 12, 2998, 12, 1495, 1367, 25, 4310, 201, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 201,...
2.586667
75
# Generated by Django 3.0 on 2020-10-16 11:43 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 319, 12131, 12, 940, 12, 1433, 1367, 25, 3559, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.966667
30
#!/usr/bin/env python # # Copyright @2014 blackshirtmuslim@yahoo.com # Licensed: see Python license """Utility module""" import json import uuid import hashlib from decimal import Decimal from datetime import date, datetime from tornado import concurrent, ioloop from concurrent.futures import ThreadPoolExecutor de...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 15069, 2488, 4967, 2042, 15600, 14664, 2475, 31, 40774, 13, 785, 198, 2, 49962, 25, 766, 11361, 5964, 198, 198, 37811, 18274, 879, 8265, 37811, 198, 198, 11748, 33918, 198, ...
3.151786
336
from main import summation,summation1
[ 6738, 1388, 1330, 30114, 341, 11, 82, 13929, 341, 16, 628 ]
3.545455
11
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # В строке могут присутствовать скобки как круглые, так и квадратные скобки. Каждой # открывающей скобке соответствует закрывающая того же типа (круглой – круглая, # квадратной- квадратная). Напишите рекурсивную функцию, проверяющую правильность # расстановки скобок в...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 201, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 2, 12466, 240, 220, 21727, 20375, 21169, 25443, 118, 16843, 12466, 120, 25443, 111, 35072, 20375, 12466, ...
1.094987
379
from functools import partial, reduce from itertools import chain, product from math import sqrt def cluster_iter(clustered, point, threshold): """Add a point to a grid-like cluster structure. This allows comparing point distances only to clusters from nearby grids, not to all clusters. Useful when there...
[ 6738, 1257, 310, 10141, 1330, 13027, 11, 4646, 198, 6738, 340, 861, 10141, 1330, 6333, 11, 1720, 198, 6738, 10688, 1330, 19862, 17034, 628, 628, 198, 200, 198, 4299, 13946, 62, 2676, 7, 565, 436, 1068, 11, 966, 11, 11387, 2599, 198, ...
2.902287
962
from django.http import HttpResponse from django.shortcuts import render, render_to_response, RequestContext from uno.models import Question_m from django.views.generic import FormView from uno.forms import Question_f import requests #rom uno.info import information from copy import deepcopy from uno.a import i...
[ 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 201, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 8543, 62, 1462, 62, 26209, 11, 19390, 21947, 201, 198, 6738, 555, 78, 13, 27530, 1330, 18233, 62, 76, 201, 198, 673...
3.2
155
from .user_id import UserID from .channel_id import ChannelID from .enum_converter import EnumConverter from .boolean_converter import BooleanConverter from .colour_converter import ColourConverter from .filtered_user import FilteredUser, FilteredMember from .number_converter import NumberConverter
[ 6738, 764, 7220, 62, 312, 1330, 11787, 2389, 198, 6738, 764, 17620, 62, 312, 1330, 11102, 2389, 198, 6738, 764, 44709, 62, 1102, 332, 353, 1330, 2039, 388, 3103, 332, 353, 198, 6738, 764, 2127, 21052, 62, 1102, 332, 353, 1330, 41146, ...
3.448276
87
import torch as t from torch import nn import math as m import torchvision.models as models import numpy as np import matplotlib.pyplot as plt import copy '''neural_net.py: Custom network object deriving from nn.Module to track the architecture ''' __author__ = "Luis Quinones" __email__ = "luis@complicitmatter.com" __...
[ 11748, 28034, 355, 256, 198, 6738, 28034, 1330, 299, 77, 198, 11748, 10688, 355, 285, 198, 11748, 28034, 10178, 13, 27530, 355, 4981, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198,...
2.182765
5,663
import argparse import logging import os import unittest from keras.layers import recurrent import numpy as np from shcomplete.model2correct import Seq2seq, generate_model, get_chars, train_correct from shcomplete.model2correct import generator_misprints, dislpay_sample_correction if __name__ == '__main__': u...
[ 11748, 1822, 29572, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 555, 715, 395, 198, 198, 6738, 41927, 292, 13, 75, 6962, 1330, 42465, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 427, 20751, 13, 19849, 17, 30283, 1330, 1001...
3.284314
102
import unittest from draftjs_exporter.error import ConfigException from draftjs_exporter.options import Options
[ 11748, 555, 715, 395, 198, 198, 6738, 4538, 8457, 62, 1069, 26634, 13, 18224, 1330, 17056, 16922, 198, 6738, 4538, 8457, 62, 1069, 26634, 13, 25811, 1330, 18634, 628 ]
3.931034
29
import unittest from zope.testing import doctest, module import zc.set if __name__ == '__main__': unittest.main(defaultTest='test_suite')
[ 11748, 555, 715, 395, 198, 198, 6738, 1976, 3008, 13, 33407, 1330, 10412, 395, 11, 8265, 198, 11748, 1976, 66, 13, 2617, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 1241...
2.735849
53
import os import tarfile output = os.path.splitext(input)[0] try: os.makedirs(output) except OSError: if not os.path.exists(output): raise with tarfile.open(input, 'r') as tf: tf.extractall(output)
[ 11748, 28686, 198, 11748, 13422, 7753, 628, 198, 22915, 796, 28686, 13, 6978, 13, 22018, 578, 742, 7, 15414, 38381, 15, 60, 198, 198, 28311, 25, 198, 220, 220, 220, 28686, 13, 76, 4335, 17062, 7, 22915, 8, 198, 16341, 440, 5188, 81,...
2.265306
98
import enum import struct from .abstract import AbstractNode from .utils import ValuedNodeMixin, NodeContext
[ 11748, 33829, 198, 11748, 2878, 198, 198, 6738, 764, 397, 8709, 1330, 27741, 19667, 198, 6738, 764, 26791, 1330, 3254, 1739, 19667, 35608, 259, 11, 19081, 21947, 628, 628, 628, 628 ]
3.774194
31
from gevent import monkey monkey.patch_time() monkey.patch_socket() import abc import datetime import time from rx.concurrency.eventloopscheduler import EventLoopScheduler from rx.concurrency.historicalscheduler import HistoricalScheduler from rx.concurrency.mainloopscheduler import GEventScheduler from rx.concurren...
[ 6738, 4903, 1151, 1330, 21657, 198, 198, 49572, 13, 17147, 62, 2435, 3419, 198, 49572, 13, 17147, 62, 44971, 3419, 198, 198, 11748, 450, 66, 198, 11748, 4818, 8079, 198, 11748, 640, 198, 198, 6738, 374, 87, 13, 1102, 34415, 13, 15596,...
3.322034
177
# coding: utf-8 # Node class based on the book "Inteligencia Artificial - Fundamentos, práctica y aplicaciones" by Alberto García Serrano
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 19081, 1398, 1912, 319, 262, 1492, 366, 24123, 9324, 33743, 35941, 532, 7557, 3263, 418, 11, 778, 6557, 28914, 331, 257, 489, 291, 49443, 274, 1, 416, 40649, 16364, 29690, 2930, 35823 ]
3.341463
41
numero = int(input("Fatorial de: ") ) resultado=1 count=1 while count <= numero: resultado *= count count --1 print(resultado)
[ 22510, 3529, 796, 493, 7, 15414, 7203, 37, 21592, 390, 25, 366, 8, 1267, 198, 198, 20274, 4533, 28, 16, 198, 9127, 28, 16, 198, 198, 4514, 954, 19841, 997, 3529, 25, 198, 220, 220, 220, 1255, 4533, 1635, 28, 954, 198, 220, 220, ...
2.464286
56
import torch import os import torch.nn as nn import logging import time from sklearn.metrics import f1_score, classification_report, confusion_matrix from transformers import BertForSequenceClassification
[ 11748, 28034, 198, 11748, 28686, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 18931, 198, 11748, 640, 198, 6738, 1341, 35720, 13, 4164, 10466, 1330, 277, 16, 62, 26675, 11, 17923, 62, 13116, 11, 10802, 62, 6759, 8609, 198, ...
3.961538
52
import numpy as np from scipy import signal import matplotlib.pyplot as plt import cv2 numDem=500 numRep=500 numColumns=50 numRows=50 numGrid=numColumns*numRows windowSize=3 kernel=np.ones((windowSize,windowSize)) kernel[(windowSize-1)/2,(windowSize-1)/2]=0 numIter=100 valueThreshold=0.375*((windowSize**2)-1) #S...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 1330, 6737, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 269, 85, 17, 198, 198, 22510, 11522, 28, 4059, 198, 22510, 6207, 28, 4059, 198, 198, 22510, ...
2.644468
931
#!/usr/bin/env python # -*- coding: utf-8 -*- # # download some test data to run example notebook # # Author: M. Giomi (matteo.giomi@desy.de) import os from urllib.request import urlretrieve from shutil import unpack_archive
[ 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, 4321, 617, 1332, 1366, 284, 1057, 1672, 20922, 198, 2, 198, 2, 6434, 25, 337, 13, 8118, 12753, 357, 6759...
2.72619
84
import plasma import plasmafx from plasmafx import plugins import time FPS = 60 NUM_LIGHTS = 10 plasma.set_light_count(10) sequence = plasmafx.Sequence(NUM_LIGHTS) for x in range(NUM_LIGHTS): sequence.set_plugin(x, plugins.FXCycle( speed=2, spread=5, offset=(360.0/NUM_LIGHTS) * x )) ...
[ 11748, 16074, 198, 11748, 458, 8597, 1878, 87, 198, 6738, 458, 8597, 1878, 87, 1330, 20652, 198, 11748, 640, 198, 198, 37, 3705, 796, 3126, 198, 41359, 62, 43, 34874, 796, 838, 198, 198, 489, 11797, 13, 2617, 62, 2971, 62, 9127, 7, ...
2.122507
351
# Copyright 2020 Akamai Technologies, Inc # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
[ 2, 15069, 12131, 9084, 1689, 72, 21852, 11, 3457, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 1...
2.950729
1,441
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
[ 2220, 7203, 31, 65, 41319, 62, 31391, 1003, 31391, 14, 11249, 62, 4299, 82, 14, 260, 7501, 25, 26791, 13, 65, 48274, 1600, 366, 25991, 4943, 198, 2220, 7203, 31, 65, 41319, 62, 31391, 1003, 31391, 14, 11249, 62, 4299, 82, 14, 260, ...
2.357143
56
url = r"onlinelibrary.wiley.com/journal/{ID}/(?P<ISSN>\(ISSN\)[\d-]*)" extractor_args = dict(restrict_text=[r"author\s*guidelines"]) template = ( "https://onlinelibrary.wiley.com/page/journal/{ID}/{ISSN}/homepage/forauthors.html" )
[ 6371, 796, 374, 1, 261, 2815, 417, 4115, 13, 86, 9618, 13, 785, 14, 24891, 14, 90, 2389, 92, 29006, 30, 47, 27, 1797, 15571, 29, 59, 7, 1797, 15571, 22725, 58, 59, 67, 12, 60, 9, 16725, 198, 2302, 40450, 62, 22046, 796, 8633, ...
2.226415
106
import json from flask import Flask, request, jsonify, make_response from flask_restful import Api, Resource, reqparse from simplexml import dumps from estimator import estimator app = Flask(__name__) api = Api(app, default_mediatype=None) @api.representation('application/json') def output_xml(data, code, headers=No...
[ 11748, 33918, 198, 6738, 42903, 1330, 46947, 11, 2581, 11, 33918, 1958, 11, 787, 62, 26209, 198, 6738, 42903, 62, 2118, 913, 1330, 5949, 72, 11, 20857, 11, 43089, 29572, 198, 6738, 2829, 19875, 1330, 45514, 198, 6738, 3959, 1352, 1330, ...
2.157895
532
import torch import torch.nn as nn import torch.nn.functional as F import sys from .layers import PixelShuffle_ICNR
[ 201, 198, 11748, 28034, 201, 198, 11748, 28034, 13, 20471, 355, 299, 77, 201, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 201, 198, 11748, 25064, 201, 198, 6738, 764, 75, 6962, 1330, 11349, 2484, 18137, 62, 2149, 24723, 220, 20...
2.421053
57
import os import pandas as pd df = pd.read_csv( "{}/practice-pandas/data/test-participant.csv".format(os.getcwd()), sep=',', engine='python', verbose=True) df_grouped = df.groupby("GENRE_CODE").count() df_sorted = df_grouped["ID"].sort_values(ascending=False) # Top 1000. print(df_sorted.head(1000)) """ GENRE_CO...
[ 11748, 28686, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 7568, 796, 279, 67, 13, 961, 62, 40664, 7, 198, 220, 220, 220, 45144, 92, 14, 39541, 12, 79, 392, 292, 14, 7890, 14, 9288, 12, 48013, 415, 13, 40664, 1911, 18982, 7, ...
1.886567
335
from vietocr.tool.translate import build_model, translate, translate_beam_search, process_input, predict from vietocr.tool.utils import download_weights from vietocr.tool.config import Cfg import sys import os import cv2 import numpy as np import math import pandas as pd import torch import time from cropper import Cro...
[ 6738, 410, 1155, 1696, 13, 25981, 13, 7645, 17660, 1330, 1382, 62, 19849, 11, 15772, 11, 15772, 62, 40045, 62, 12947, 11, 1429, 62, 15414, 11, 4331, 198, 6738, 410, 1155, 1696, 13, 25981, 13, 26791, 1330, 4321, 62, 43775, 198, 6738, ...
2.052817
1,420
a= 30 a //= 2 print(a)
[ 64, 28, 1542, 201, 198, 64, 3373, 28, 362, 201, 198, 4798, 7, 64, 8, 201, 198 ]
1.529412
17
##script used to combine multiple files into a matrix import os, sys import pandas as pd import numpy as np sum_matrix = open(sys.argv[1]+"_binary.matrix.txt","w") # open with pandas df = pd.read_csv(sys.argv[1], sep='\t', index_col = 0) #get first line as title list col_list= list(df.columns.values) print (col_list...
[ 2235, 12048, 973, 284, 12082, 3294, 3696, 656, 257, 17593, 198, 11748, 28686, 11, 25064, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 628, 198, 16345, 62, 6759, 8609, 796, 1280, 7, 17597, 13, 853, 85, 58, ...
1.983385
963
from django.urls import path from .views import index, TodoDetailView from django.conf import settings urlpatterns = [ path('', index), path('edit/<int:pk>', TodoDetailView.as_view()), path('delete/<int:pk>', TodoDetailView.as_view()), ] react_routes = getattr(settings, 'REACT_ROUTES', []) for route i...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 198, 6738, 764, 33571, 1330, 6376, 11, 309, 24313, 11242, 603, 7680, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 107...
2.39645
169
#!/usr/bin/python # # Copyright (c) 2017, United States Government, as represented by the # Administrator of the National Aeronautics and Space Administration. # # All rights reserved. # # The Astrobee platform is licensed under the Apache License, Version 2.0 # (the "License"); you may not use this file except in comp...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 198, 2, 15069, 357, 66, 8, 2177, 11, 1578, 1829, 5070, 11, 355, 7997, 416, 262, 198, 2, 22998, 286, 262, 2351, 15781, 261, 2306, 873, 290, 4687, 8694, 13, 198, 2, 198, 2, 1439, 2489,...
2.885906
1,043
from datetime import timedelta from flask import request, current_app from flask_jwt_extended import jwt_required, create_access_token, get_jwt_identity from marshmallow.exceptions import ValidationError from sqlalchemy import or_ from app.api.utils import success_response, error_response, get_items_per_page, get_req...
[ 6738, 4818, 8079, 1330, 28805, 12514, 198, 198, 6738, 42903, 1330, 2581, 11, 1459, 62, 1324, 198, 6738, 42903, 62, 73, 46569, 62, 2302, 1631, 1330, 474, 46569, 62, 35827, 11, 2251, 62, 15526, 62, 30001, 11, 651, 62, 73, 46569, 62, 7...
2.96729
214
import os import torch import warnings warnings.filterwarnings('ignore') from hpbandster.core.worker import Worker from nes.ensemble_selection.create_baselearners import create_baselearner
[ 11748, 28686, 198, 11748, 28034, 198, 11748, 14601, 198, 40539, 654, 13, 24455, 40539, 654, 10786, 46430, 11537, 198, 198, 6738, 27673, 3903, 1706, 13, 7295, 13, 28816, 1330, 35412, 198, 6738, 299, 274, 13, 1072, 11306, 62, 49283, 13, 1...
3.641509
53
import tkinter from tkinter import ttk mainclass()
[ 11748, 256, 74, 3849, 201, 198, 6738, 256, 74, 3849, 1330, 256, 30488, 201, 198, 201, 198, 201, 198, 201, 198, 12417, 4871, 3419, 201, 198, 220, 220, 220, 220, 201, 198, 201, 198, 220, 220, 220, 220, 220, 220, 220, 220, 201, 198 ]
1.772727
44
#!/usr/bin/env python3 from math import sqrt # init conds x = [15, 15, f(15, 15)] lamb = 2 xold = [99, 99, f(99, 99)] while dist(xold, x) > 0.5 and lamb >= 0.0001: print("x:", x) print("xold", xold) xnew = grad(*x) xnew = [x[0] - lamb * xnew[0], x[1] - lamb * xnew[1], 0] xnew[2] = f(xnew[0], ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 10688, 1330, 19862, 17034, 628, 628, 198, 198, 2, 2315, 1779, 82, 198, 87, 796, 685, 1314, 11, 1315, 11, 277, 7, 1314, 11, 1315, 15437, 198, 2543, 65, 796, 362, 198,...
1.857664
274
# coding=utf-8 """ Definition of models. """ from django.contrib.auth.models import User from django.db import models from django.urls import reverse
[ 2, 19617, 28, 40477, 12, 23, 198, 37811, 198, 36621, 286, 4981, 13, 198, 37811, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 637...
3.208333
48
from PyQt5.QtCore import Qt from PyQt5.QtWidgets import (QSlider, QStyleOptionSlider, QStyle) import time
[ 6738, 9485, 48, 83, 20, 13, 48, 83, 14055, 1330, 33734, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 1330, 357, 48, 11122, 1304, 11, 1195, 21466, 19722, 11122, 1304, 11, 1195, 21466, 8, 198, 11748, 640, 628 ]
2.547619
42
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from .. import _utilitie...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 17202, 39410, 25, 428, 2393, 373, 7560, 416, 262, 21624, 12994, 24118, 687, 10290, 357, 27110, 5235, 8, 16984, 13, 17202, 198, 2, 17202, 2141, 407, 4370, 416, 1021, 4556, 345, 821, 1728, 345, 760...
3.03
300
from django import forms from django.utils.translation import gettext_lazy as _ from rusel.base.forms import BaseCreateForm, BaseEditForm from rusel.widgets import DateInput, Select, NumberInput, UrlsInput from task.const import NUM_ROLE_SERVICE, APART_SERVICE from task.models import Task from apart.config import app_...
[ 6738, 42625, 14208, 1330, 5107, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 651, 5239, 62, 75, 12582, 355, 4808, 198, 198, 6738, 7422, 741, 13, 8692, 13, 23914, 1330, 7308, 16447, 8479, 11, 7308, 18378, 8479, 198, 6738, 7422, ...
3.601695
118
import sensor, time, image # Reset sensor sensor.reset() # Sensor settings sensor.set_contrast(1) sensor.set_gainceiling(16) sensor.set_framesize(sensor.QCIF) sensor.set_pixformat(sensor.GRAYSCALE) # Load Haar Cascade # By default this will use all stages, lower satges is faster but less accurate. face_cascade = ima...
[ 11748, 12694, 11, 640, 11, 2939, 198, 198, 2, 30027, 12694, 198, 82, 22854, 13, 42503, 3419, 198, 198, 2, 35367, 6460, 198, 82, 22854, 13, 2617, 62, 3642, 5685, 7, 16, 8, 198, 82, 22854, 13, 2617, 62, 48544, 344, 4386, 7, 1433, ...
2.838275
371
from rti_python.Ensemble.Ensemble import Ensemble import logging class InstrumentVelocity: """ Instrument Velocity DataSet. [Bin x Beam] data. """ def decode(self, data): """ Take the data bytearray. Decode the data to populate the velocities. :param d...
[ 6738, 374, 20259, 62, 29412, 13, 4834, 15140, 13, 4834, 15140, 1330, 2039, 15140, 201, 198, 11748, 18931, 201, 198, 201, 198, 4871, 42410, 46261, 11683, 25, 201, 198, 220, 220, 220, 37227, 201, 198, 220, 220, 220, 42410, 43137, 6060, ...
1.936637
1,231
from django.core.management.base import BaseCommand, CommandError from odds.domain.models.manager.betTypeManager import BetTypeManager from odds.domain.models.bet import Bet from odds.domain.models.sureBet import SureBet from odds.domain.models.manager.SureBetManager import SureBetManager from odds.domain.models.event...
[ 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 11, 9455, 12331, 198, 198, 6738, 10402, 13, 27830, 13, 27530, 13, 37153, 13, 11181, 6030, 13511, 1330, 5147, 6030, 13511, 198, 6738, 10402, 13, 27830, 13, 27530, 13, ...
3.895349
86
# -*- coding: utf-8 -*- # flake8: noqa """ Defintion of the campaign and datasets for 2016 legacy rereco data. """ import order as od from analysis.config.processes import * # campaign campaign_name = "Run2_pp_13TeV_Legacy16" campaign = od.Campaign( campaign_name, 2, ecm=13, bx=25, ) # datasets data...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 781, 539, 23, 25, 645, 20402, 198, 198, 37811, 198, 7469, 600, 295, 286, 262, 1923, 290, 40522, 329, 1584, 10655, 302, 260, 1073, 1366, 13, 198, 37811, 628, 198, ...
1.936888
8,065
#!/usr/bin/env python import csv import argparse import numpy as np import pandas as pd import tqdm # Modified from: CosmiQ Solaris # https://github.com/CosmiQ/solaris/blob/master/solaris/preproc/sar.py def haversine(lat1, lon1, lat2, lon2, rad=False, radius=6.371E6): """ Haversine formula for distance betwee...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 269, 21370, 198, 11748, 1822, 29572, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 256, 80, 36020, 198, 198, 2, 40499, 422, 25, 1043...
2.327314
443
# import the main window object (mw) from aqt from aqt import mw # import the "show info" tool from utils.py from aqt.utils import showInfo # import all of the Qt GUI library from aqt.qt import * # We're going to add a menu item below. First we want to create a function to # be called when the menu item is activated....
[ 2, 1330, 262, 1388, 4324, 2134, 357, 76, 86, 8, 422, 257, 39568, 198, 6738, 257, 39568, 1330, 285, 86, 198, 2, 1330, 262, 366, 12860, 7508, 1, 2891, 422, 3384, 4487, 13, 9078, 198, 6738, 257, 39568, 13, 26791, 1330, 905, 12360, 19...
3.20442
181
from __future__ import absolute_import import logging from flask import current_app from changes.api.build_index import BuildIndexAPIView from changes.models import ProjectStatus, Project, ProjectConfigError, ProjectOptionsHelper, Revision from changes.utils.diff_parser import DiffParser from changes.utils.project_tr...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 11748, 18931, 198, 198, 6738, 42903, 1330, 1459, 62, 1324, 198, 6738, 2458, 13, 15042, 13, 11249, 62, 9630, 1330, 10934, 15732, 2969, 3824, 769, 198, 6738, 2458, 13, 27530, 1330,...
4.17
100
import timeit import selenium.webdriver from selenium import webdriver from selenium.webdriver.support.wait import WebDriverWait from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC import time import pandas as pd ...
[ 11748, 640, 270, 198, 198, 11748, 384, 11925, 1505, 13, 12384, 26230, 198, 6738, 384, 11925, 1505, 1330, 3992, 26230, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 11284, 13, 17077, 1330, 5313, 32103, 21321, 198, 6738, 384, 11925, ...
2.470339
944
import sys import logging import time import tensorflow as tf tf.compat.v1.enable_v2_behavior() from tf_agents.drivers import dynamic_step_driver from tf_agents.drivers import dynamic_episode_driver from modules.runtime.commons.parameters import ParameterServer from tf_agents.metrics import tf_metrics from tf_agents....
[ 11748, 25064, 198, 11748, 18931, 198, 11748, 640, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 27110, 13, 5589, 265, 13, 85, 16, 13, 21633, 62, 85, 17, 62, 46571, 3419, 198, 198, 6738, 48700, 62, 49638, 13, 36702, 1330, 8925, 62, ...
2.683835
1,262
#!/usr/bin/env python from setuptools import setup, find_packages import versioneer INSTALL_REQUIRES = open("requirements.txt").readlines() setup( name="lagtraj", version=versioneer.get_version(), cmdclass=versioneer.get_cmdclass(), description="Python trajectory code for Lagrangian simulations", ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 11748, 2196, 28153, 198, 198, 38604, 7036, 62, 2200, 10917, 4663, 1546, 796, 1280, 7203, 8897, 18883, 13, 14116, 11074, 961...
2.60274
292
#executar um audio mp3 import pygame pygame.init() pygame.mixer.music.load('BlackDog.mp3') pygame.mixer.music.play() pygame.event.wait()
[ 2, 18558, 315, 283, 23781, 6597, 29034, 18, 198, 198, 11748, 12972, 6057, 198, 9078, 6057, 13, 15003, 3419, 198, 9078, 6057, 13, 19816, 263, 13, 28965, 13, 2220, 10786, 9915, 32942, 13, 3149, 18, 11537, 198, 9078, 6057, 13, 19816, 263...
2.464286
56
from dataclasses import dataclass from bindings.gmd.geometric_complex_type import GeometricComplexType __NAMESPACE__ = "http://www.opengis.net/gml" @dataclass
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 34111, 13, 70, 9132, 13, 469, 16996, 62, 41887, 62, 4906, 1330, 2269, 16996, 5377, 11141, 6030, 198, 198, 834, 45, 29559, 47, 11598, 834, 796, 366, 4023, 1378, 2503, 13, 404, ...
2.842105
57
from .base import registered_device_types # noqa from .kettle_redmond import RedmondKettle # noqa from .xiaomi_ht import XiaomiHumidityTemperatureV1 # noqa from .xiaomi_lywsd03 import XiaomiHumidityTemperatureLYWSD # noqa
[ 6738, 764, 8692, 1330, 6823, 62, 25202, 62, 19199, 220, 1303, 645, 20402, 198, 6738, 764, 74, 23570, 62, 445, 6327, 1330, 49420, 42, 23570, 220, 1303, 645, 20402, 198, 6738, 764, 36072, 12753, 62, 4352, 1330, 46726, 32661, 17995, 42492,...
3.228571
70
import sys, getopt, subprocess from src.common.load_h5 import H5COUNTS from src.preprocess.build_h5_GSE103224 import build_h5 import pandas as pd # # Load data # scRNAdata = H5COUNTS('data/GSE103224.h5') # # Preprocess data # scRNAdata.preprocess_data(log_normalize=True, filter_genes=False, n_neighbors=False, umap=Fal...
[ 11748, 25064, 11, 651, 8738, 11, 850, 14681, 198, 6738, 12351, 13, 11321, 13, 2220, 62, 71, 20, 1330, 367, 20, 34, 19385, 4694, 198, 6738, 12351, 13, 3866, 14681, 13, 11249, 62, 71, 20, 62, 38, 5188, 940, 2624, 1731, 1330, 1382, 6...
2.720217
554