content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
#!/usr/bin/env python """ Retrieve intraday stock data from Google Finance. """ import csv import datetime import re import pandas as pd import requests def intradaystockprices(ticker, period=60, days=1): """ Retrieve intraday stock data from Google Finance. Parameters ---------- ticker : str ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 220, 198, 37811, 198, 9781, 30227, 493, 6335, 323, 4283, 1366, 422, 3012, 15007, 13, 198, 37811, 198, 198, 11748, 269, 21370, 198, 11748, 4818, 8079, 198, 11748, 302, 198, 198, 11748, 19798, ...
1.777961
1,815
#!/usr/bin/env python import os import sys import json from argparse import ArgumentParser ROOT = os.path.dirname(os.path.abspath(__file__)) DB_FILE = os.path.join(ROOT, 'problems.json') def parse_args(): """Parse CLI tool options. """ parser = ArgumentParser() parser.add_argument('problem_id', type...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 33918, 198, 6738, 1822, 29572, 1330, 45751, 46677, 198, 198, 13252, 2394, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, ...
2.218391
348
from __future__ import annotations # Fixes an issue with some annotations from .ascii_box import Light, LineChar from .ascii_drawing import DrawingChar
[ 6738, 11593, 37443, 834, 1330, 37647, 220, 1303, 34258, 281, 2071, 351, 617, 37647, 198, 198, 6738, 764, 292, 979, 72, 62, 3524, 1330, 4401, 11, 6910, 12441, 198, 6738, 764, 292, 979, 72, 62, 19334, 278, 1330, 40027, 12441, 628, 628, ...
3.674419
43
import numpy as np import matplotlib.pyplot as plt # NTC103F397F datasheet d_T = np.array(np.arange(-40, 121, 5)) d_R = np.array([333.110, 240.704, 175.794, 129.707, 96.646, 72.691, 55.169, 42.234, 32.6, 25.364, 19.886, 15.705, 12.490, 10.0, 8.0584, 6.5341, 5.3297, 4.3722, 3.6065, 2.990...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 2, 399, 4825, 15197, 37, 33372, 37, 19395, 25473, 198, 67, 62, 51, 796, 45941, 13, 18747, 7, 37659, 13, 283, 858, 32590, 1821, 11...
1.763425
689
from abc import ABC, abstractmethod from collections import defaultdict from functools import partial from auxiliary import default
[ 6738, 450, 66, 1330, 9738, 11, 12531, 24396, 198, 6738, 17268, 1330, 4277, 11600, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 198, 6738, 37419, 1330, 4277, 628, 628, 628 ]
4.6
30
from . import anasysfile from . import anasysdoc from . import heightmap from . import irspectra from . import anasysio
[ 6738, 764, 1330, 281, 292, 893, 7753, 198, 6738, 764, 1330, 281, 292, 893, 15390, 198, 6738, 764, 1330, 6001, 8899, 198, 6738, 764, 1330, 4173, 4443, 430, 198, 6738, 764, 1330, 281, 292, 893, 952, 198 ]
3.243243
37
import os import sys import time import numpy as np from sklearn.metrics import accuracy_score from utils.config import TRANSFORMATION from utils.ensemble import load_models, prediction, ensemble_defenses_util BSLabelFP=sys.argv[1] samplesDir=sys.argv[2] modelsDir=sys.argv[3] AETypes = { "biml2": ["bim_...
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 640, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 35720, 13, 4164, 10466, 1330, 9922, 62, 26675, 198, 198, 6738, 3384, 4487, 13, 11250, 1330, 44069, 35036, 198, 6738, 3384, 4487, ...
2.10033
2,123
from django.shortcuts import render, redirect from django.contrib.admin.views.decorators import staff_member_required from django.views.decorators.csrf import csrf_exempt from django.contrib.auth import authenticate, login, logout from django.http import HttpResponse from ems.models import Score, Level, Judge, Label, T...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 18941, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 28482, 13, 33571, 13, 12501, 273, 2024, 1330, 3085, 62, 19522, 62, 35827, 198, 6738, 42625, 14208, 13, 33571, 13, 12501, 273, 2024,...
2.529604
5,202
from msedge.selenium_tools import Edge, EdgeOptions from lxml import html import time import curses stdscr = curses.initscr() max_y = stdscr.getmaxyx()[0] - 1 if max_y < 16: raise Exception("Terminal row size must be more then 17, but now it is %d." % (max_y + 1)) # changelog: more OOP. # class: illust,ill...
[ 6738, 13845, 14907, 13, 741, 47477, 62, 31391, 1330, 13113, 11, 13113, 29046, 201, 198, 6738, 300, 19875, 1330, 27711, 201, 198, 11748, 640, 201, 198, 11748, 43878, 201, 198, 19282, 1416, 81, 796, 43878, 13, 259, 896, 6098, 3419, 201, ...
2.050296
1,352
from geo.position import Location import geo.helper
[ 6738, 40087, 13, 9150, 1330, 13397, 198, 11748, 40087, 13, 2978, 525, 628, 628 ]
3.928571
14
from django_tables2 import tables, Column from profiles.models import TeamRoleBinding
[ 6738, 42625, 14208, 62, 83, 2977, 17, 1330, 8893, 11, 29201, 198, 6738, 16545, 13, 27530, 1330, 4816, 47445, 33, 6020, 628 ]
3.954545
22
# Script: bubble_sort_recursive.py # Author: Joseph L. Crandal # Purpose: Demonstrate bubble sort with recursion # data will be the list to be sorted data = [ 0, 5, 2, 3, 10, 123, -53, 23, 9, 2 ] dataOrig = [ 0, 5, 2, 3, 10, 123, -53, 23, 9, 2 ] # In a bubble sort you will work your way through the dataset # and move...
[ 2, 12327, 25, 14310, 62, 30619, 62, 8344, 30753, 13, 9078, 198, 2, 6434, 25, 7212, 406, 13, 3864, 7642, 198, 2, 32039, 25, 7814, 23104, 14310, 3297, 351, 664, 24197, 198, 198, 2, 1366, 481, 307, 262, 1351, 284, 307, 23243, 198, 78...
3.217391
253
# Copyright 2015-2016 Mirantis, 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...
[ 2, 220, 220, 220, 15069, 1853, 12, 5304, 7381, 20836, 11, 3457, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, 428, ...
2.988889
450
# THIS FILE IS GENERATED FROM NUMPY SETUP.PY # # To compare versions robustly, use `numpy_demo.lib.NumpyVersion` short_version = '1.29.0' version = '1.29.0' full_version = '1.29.0' git_revision = 'dd8e9be4d35e25e795d8d139ff4658715767c211' release = True if not release: version = full_version
[ 198, 2, 12680, 45811, 3180, 24700, 1137, 11617, 16034, 399, 20476, 56, 25823, 8577, 13, 47, 56, 198, 2, 198, 2, 1675, 8996, 6300, 12373, 306, 11, 779, 4600, 77, 32152, 62, 9536, 78, 13, 8019, 13, 45, 32152, 14815, 63, 198, 19509, ...
2.373016
126
""" ################# Hammersley Sphere ################# """ import numpy as np from matplotlib import pyplot as plt from mpl_toolkits.mplot3d import Axes3D def return_point(m, n, p): """ m is the index number of the Hammersley point to calculate n is the maximun number of points p is the order of the...
[ 37811, 198, 14468, 2, 198, 39, 36846, 1636, 31798, 198, 14468, 2, 198, 37811, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 83, 198, 6738, 285, 489, 62, 25981, 74, 896, 13, 76, 29487, ...
1.975749
701
import enum import json import os import requests import yaml import socket import sqlite3 import traceback from org.heather.api.tools import Tools from org.heather.api.log import Log, LogLevel
[ 11748, 33829, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 7007, 198, 11748, 331, 43695, 198, 11748, 17802, 198, 11748, 44161, 578, 18, 198, 11748, 12854, 1891, 198, 198, 6738, 8745, 13, 258, 1032, 13, 15042, 13, 31391, 1330, 20003, ...
3.119403
67
import math import sys import time from nltk import word_tokenize import numpy as np
[ 11748, 10688, 198, 11748, 25064, 198, 11748, 640, 198, 198, 6738, 299, 2528, 74, 1330, 1573, 62, 30001, 1096, 198, 11748, 299, 32152, 355, 45941, 198, 220, 220, 220, 220, 198 ]
2.935484
31
from pwn import * shellcode = "\x31\xc0\x31\xdb\x50\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x50\x53\x89\xe1\x31\xd2\xb0\x0b\x51\x52\x55\x89\xe5\x0f\x34\x31\xc0\x31\xdb\xfe\xc0\x51\x52\x55\x89\xe5\x0f\x34" HOST = 'pwn2.jarvisoj.com' PORT = 9877 PrettyTommy(HOST,PORT)
[ 6738, 279, 675, 1330, 1635, 201, 198, 29149, 8189, 796, 37082, 87, 3132, 59, 25306, 15, 59, 87, 3132, 59, 87, 9945, 59, 87, 1120, 59, 87, 3104, 59, 87, 17, 69, 59, 87, 17, 69, 59, 87, 4790, 59, 87, 3104, 59, 87, 3104, 59, 87...
1.479167
192
"""Definition for "invalid bot credentials" error.""" from typing import NoReturn from botx.clients.methods.base import APIErrorResponse, BotXMethod from botx.clients.types.http import HTTPResponse from botx.exceptions import BotXAPIError def handle_error(method: BotXMethod, response: HTTPResponse) -> NoReturn: ...
[ 37811, 36621, 329, 366, 259, 12102, 10214, 18031, 1, 4049, 526, 15931, 198, 6738, 19720, 1330, 1400, 13615, 198, 198, 6738, 10214, 87, 13, 565, 2334, 13, 24396, 82, 13, 8692, 1330, 7824, 12331, 31077, 11, 18579, 55, 17410, 198, 6738, ...
2.77377
305
# This file has a lot going on in it because really ties the game together, # just like The Dude's rug. You can probably read it start to finish, but # by all means start jumping around from here. # Dependencies for rendering the UI from clubsandwich.ui import ( LabelView, LayoutOptions, UIScene, ) # including s...
[ 2, 770, 2393, 468, 257, 1256, 1016, 319, 287, 340, 780, 1107, 8470, 262, 983, 1978, 11, 198, 2, 655, 588, 383, 40628, 338, 14477, 13, 921, 460, 2192, 1100, 340, 923, 284, 5461, 11, 475, 198, 2, 416, 477, 1724, 923, 14284, 1088, ...
3.410095
1,268
import os import shutil import argparse from pathlib import Path from time import time from collections import defaultdict import torch import numpy as np import pandas as pd torch.manual_seed(0) if __name__ == '__main__': parser = argparse.ArgumentParser(description='Null') parser.add_argument('path', hel...
[ 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 1822, 29572, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 640, 1330, 640, 198, 6738, 17268, 1330, 4277, 11600, 198, 11748, 28034, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 29...
2.926154
325
# from __future__ import unicode_literals import frappe, erpnext from frappe import _ import json from frappe.utils import flt, cstr, nowdate, nowtime from six import string_types
[ 2, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 11748, 5306, 27768, 11, 1931, 79, 19545, 198, 6738, 5306, 27768, 1330, 4808, 198, 11748, 33918, 198, 6738, 5306, 27768, 13, 26791, 1330, 781, 83, 11, 269, 2536, ...
3.232143
56
import json import subprocess PACMAN_SYNC_DB_COMMAND = 'sudo pacman --noconfirm -Sy' AUR_HELPER_COMMAND = 'paru --noconfirm -S {}' PACMAN_COMMAND = 'sudo pacman --noconfirm -S {}' with open('./config.json') as f: config = json.load(f) packages_raw = config.get('packages', {}) setup_raw = config.get('setup', {}) ...
[ 11748, 33918, 198, 11748, 850, 14681, 198, 198, 44938, 10725, 62, 23060, 7792, 62, 11012, 62, 9858, 44, 6981, 796, 705, 24032, 23503, 805, 1377, 77, 36221, 69, 2533, 532, 13940, 6, 198, 32, 4261, 62, 39, 3698, 18973, 62, 9858, 44, 6...
2.546371
496
from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, SubmitField, SelectMultipleField, HiddenField from flask_pagedown.fields import PageDownField from wtforms import validators
[ 6738, 42903, 62, 86, 27110, 1330, 46947, 8479, 198, 6738, 266, 83, 23914, 1330, 10903, 15878, 11, 30275, 15878, 11, 39900, 15878, 11, 9683, 31217, 15878, 11, 20458, 15878, 198, 6738, 42903, 62, 79, 1886, 593, 13, 25747, 1330, 7873, 8048...
4.019608
51
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2017/8/18 9:50 # @Author : Matrix # @Github : https://github.com/blackmatrix7/ # @Blog : http://www.cnblogs.com/blackmatrix/ # @File : retry.py # @Software: PyCharm import time from functools import wraps __author__ = 'blackmatrix' """ """ def retry(max_ret...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 7575, 1058, 2177, 14, 23, 14, 1507, 860, 25, 1120, 198, 2, 2488, 13838, 1058, 24936, 198, 2, 2488, 38, 100...
2.25323
387
# -*- coding: utf-8 -*- # @Time : 2021/01/02 16:26 # @Author : lishijie import torch from torch.utils import data from torch.utils.data import DataLoader import torchvision from torchvision.transforms.transforms import Resize from .databases import *
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 7575, 220, 220, 220, 220, 1058, 33448, 14, 486, 14, 2999, 1467, 25, 2075, 198, 2, 2488, 13838, 220, 220, 1058, 300, 680, 2926, 494, 198, 11748, 28034, 198, ...
2.988372
86
import pyeccodes.accessors as _
[ 11748, 279, 5948, 535, 4147, 13, 15526, 669, 355, 4808, 628 ]
3
11
# apetools Libraries from apetools.baseclass import BaseClass from apetools.builders import builder from apetools.lexicographers.lexicographer import Lexicographer # end SetUp
[ 198, 2, 2471, 316, 10141, 46267, 198, 6738, 2471, 316, 10141, 13, 8692, 4871, 1330, 7308, 9487, 198, 6738, 2471, 316, 10141, 13, 50034, 1330, 27098, 198, 6738, 2471, 316, 10141, 13, 2588, 291, 34063, 13, 2588, 291, 18539, 1330, 17210, ...
3.56
50
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Sentence level and Corpus level BLEU score calculation tool """ from __future__ import division, print_function import io import os import math import sys import argparse from fractions import Fraction from collections import Counter from functools import reduce from...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 31837, 594, 1241, 290, 44874, 1241, 347, 2538, 52, 4776, 17952, 2891, 198, 37811, 198, 198, 6738, 1159...
2.254082
3,062
DSN = 'postgresql://edward:edward@postgres:5432/chat'
[ 5258, 45, 796, 705, 7353, 34239, 13976, 1378, 276, 904, 25, 276, 904, 31, 7353, 34239, 25, 4051, 2624, 14, 17006, 6, 198 ]
2.347826
23
from sqlite_framework.sql.item.base import SqlItem from sqlite_framework.sql.item.column import Column
[ 6738, 44161, 578, 62, 30604, 13, 25410, 13, 9186, 13, 8692, 1330, 311, 13976, 7449, 198, 6738, 44161, 578, 62, 30604, 13, 25410, 13, 9186, 13, 28665, 1330, 29201, 628, 198 ]
3.387097
31
from .report_group import GroupReport from .report_single import SingleReport
[ 6738, 764, 13116, 62, 8094, 1330, 4912, 19100, 198, 6738, 764, 13116, 62, 29762, 1330, 14206, 19100, 198 ]
4.333333
18
""" Mixin for returning history frames. """ from collections import deque from typing import Deque from rx.core.typing import Observable from baboon_tracking.models.frame import Frame
[ 37811, 201, 198, 35608, 259, 329, 8024, 2106, 13431, 13, 201, 198, 37811, 201, 198, 201, 198, 6738, 17268, 1330, 390, 4188, 201, 198, 6738, 19720, 1330, 1024, 4188, 201, 198, 6738, 374, 87, 13, 7295, 13, 774, 13886, 1330, 19243, 540, ...
3.229508
61
import json import html from pathlib import Path from elm_doc.utils import Namespace # Note: title tag is omitted, as the Elm app sets the title after # it's initialized. PAGE_TEMPLATE = ''' <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <link rel="shortcut icon" size="16x16, 32x32, 48x48, 64x64, 128...
[ 11748, 33918, 198, 11748, 27711, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 6738, 1288, 76, 62, 15390, 13, 26791, 1330, 28531, 10223, 628, 198, 2, 5740, 25, 3670, 7621, 318, 22532, 11, 355, 262, 35189, 598, 5621, 262, 3670, 706, 19...
2.551948
462
''' v1.0 2021.1 01Studio www.01Studio.org ''' # import time from machine import Pin,SoftI2C,ADC from ssd1306 import SSD1306_I2C #oled i2c = SoftI2C(scl=Pin(10), sda=Pin(11)) #I2Cscl--> 10, sda --> 11 oled = SSD1306_I2C(128, 64, i2c, addr=0x3c) #OLED128*64,OLEDI2C0x3c #ADC1,Pin=27 Water_level = ADC(1) while True...
[ 7061, 6, 198, 198, 85, 16, 13, 15, 198, 1238, 2481, 13, 16, 198, 486, 41501, 7324, 13, 486, 41501, 13, 2398, 198, 198, 7061, 6, 198, 198, 2, 198, 11748, 640, 198, 6738, 4572, 1330, 13727, 11, 18380, 40, 17, 34, 11, 2885, 34, 1...
1.975771
454
from typing import Annotated Problem = Annotated[str, "code cfs problems have, ex. 1348B"] ProblemWidth = int CFSSectionsData = tuple[int, ...]
[ 6738, 19720, 1330, 1052, 1662, 515, 628, 198, 40781, 796, 1052, 1662, 515, 58, 2536, 11, 366, 8189, 269, 9501, 2761, 423, 11, 409, 13, 1511, 2780, 33, 8973, 198, 40781, 30916, 796, 493, 198, 22495, 5432, 478, 507, 6601, 796, 46545, ...
3.0625
48
import pandas as pd import numpy as np import matplotlib.pyplot as plt ### import nltk from nltk.corpus import stopwords from nltk.tokenize import word_tokenize # from nltk.stem import WordNetLemmatizer from nltk.stem import PorterStemmer ### from sklearn.naive_bayes import MultinomialNB from sklearn.metrics import con...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 21017, 198, 11748, 299, 2528, 74, 198, 6738, 299, 2528, 74, 13, 10215, 79, 385, 1330, 2245, 10879,...
2.533062
983
# -*- coding: utf-8 -*- import csv import json outdirectory = "outputCSV/" tweetsFile = "tweets.txt"; outputFile = "mostUsedHasgtags.csv"; tweetsList = [] #List that contains all the tweets readed from a file hashtagTable = {}; # Dictionary with key= hashtags and value= frecuency for this hashtag """ Returns a...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 269, 21370, 198, 11748, 33918, 198, 198, 448, 34945, 220, 197, 28, 366, 22915, 7902, 53, 30487, 198, 83, 732, 1039, 8979, 220, 197, 197, 28, 366, 83, 732, 1039,...
3.379699
532
import time import json import argparse import websocket import requests import github MY_NAME = 'kit' # should be able to avoid this in the future TOKEN = 'XXXXXXX' GITHUB_USERNAME_BY_SLACK_USERNAME = { "adam": "adamsmith", # XXXXXXX ... } channel_ids_by_name = {} channel_names_by_id = {} next_id = 0 if ...
[ 11748, 640, 198, 11748, 33918, 198, 11748, 1822, 29572, 198, 198, 11748, 2639, 5459, 198, 11748, 7007, 198, 198, 11748, 33084, 198, 198, 26708, 62, 20608, 796, 705, 15813, 6, 220, 1303, 815, 307, 1498, 284, 3368, 428, 287, 262, 2003, ...
2.637584
149
import discord import requests from discord.ext import commands
[ 11748, 36446, 198, 11748, 7007, 198, 6738, 36446, 13, 2302, 1330, 9729 ]
5.25
12
target_num = 0 j = 0 while target_num == 0: pent_ind = float((1 + ( 1 + 24*j*(2*j-1))**.5)/6) tri_ind = float((-1 + (1+8*j*(2*j-1)))/2) if pent_ind.is_integer() and tri_ind.is_integer(): num = j*(2*j-1) if num != 1 and num != 40755: target_num = num j += 1 print(target_num)...
[ 16793, 62, 22510, 796, 657, 198, 73, 796, 657, 198, 198, 4514, 2496, 62, 22510, 6624, 657, 25, 198, 220, 220, 220, 28145, 62, 521, 796, 12178, 19510, 16, 1343, 357, 352, 1343, 1987, 9, 73, 9, 7, 17, 9, 73, 12, 16, 4008, 1174, ...
2.626374
273
#!/usr/bin/python # -*- coding: utf-8 -*- # Importo les llibreries import socket import RPi.GPIO as GPIO import time # Faig la configuraci bsica del GPIO GPIO.setwarnings(False) GPIO.setmode(GPIO.BCM) GPIO.setup(18, GPIO.OUT) # Noms utilitzo el 18. Es podria fer un bucle per activar-ne diversos alhora. # Indico la ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 17267, 78, 10287, 32660, 571, 260, 1678, 198, 11748, 17802, 198, 11748, 25812, 72, 13, 16960, 9399, 355, 50143, 198, ...
2.476636
321
## ------------------------------------------------------------------------------------------------- ## -- Project : MLPro - A Synoptic Framework for Standardized Machine Learning Tasks ## -- Package : mlpro.rl.envmodels ## -- Module : mlp_robotinhtm ## -----------------------------------------------------------------...
[ 2235, 16529, 3880, 12, 198, 2235, 1377, 4935, 1058, 10373, 2964, 532, 317, 16065, 8738, 291, 25161, 329, 8997, 1143, 10850, 18252, 309, 6791, 198, 2235, 1377, 15717, 1058, 25962, 1676, 13, 45895, 13, 24330, 27530, 198, 2235, 1377, 19937, ...
3.064449
481
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # @Author : # @Email : 877362867@qq.com # @Date : 2021/02/22 10:29 """ icdar2013 zip """ import re from pyxllib.xl import File, Dir, shorten
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 13838, 1058, 220, 198, 2, 2488, 15333, 220, 1058, 807, 3324, 2623, 2078, 3134, 31, 38227, 13, 785, 198, ...
2.186813
91
import os import numpy as np import torch from transformers import BertTokenizer from tensorflow.keras.utils import to_categorical from NewDataLoader import * from config import * import warnings
[ 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 28034, 198, 6738, 6121, 364, 1330, 22108, 30642, 7509, 198, 198, 6738, 11192, 273, 11125, 13, 6122, 292, 13, 26791, 1330, 284, 62, 66, 2397, 12409, 198, 6738, 968, 6601,...
3.703704
54
from airflow import DAG from operators import LoadDimensionOperator def load_dim_subdag( parent_dag_name: str, task_id: str, redshift_conn_id: str, sql_statement: str, do_truncate: bool, table_name: str, **kwargs, ): """ Airflow's subdag wrapper. Implements LoadDimensionOperator op...
[ 6738, 45771, 1330, 360, 4760, 198, 6738, 12879, 1330, 8778, 29271, 3004, 18843, 1352, 628, 198, 4299, 3440, 62, 27740, 62, 7266, 67, 363, 7, 198, 220, 220, 220, 2560, 62, 67, 363, 62, 3672, 25, 965, 11, 198, 220, 220, 220, 4876, 6...
2.394175
515
# coding: utf-8 from __future__ import print_function from __future__ import absolute_import from __future__ import division from src.yolo_net import YoloTest, Yolo import torch import cv2 import numpy as np # net = Yolo(10177) # state_dict = torch.load('trained_models\\only_params_trained_yolo_coco') # net...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 198, 6738, 12351, 13, 88, 14057, 62, 3262, ...
2.425358
489
# coding=utf-8 """ Google Earth Engine MODIS Collections """ from . import Collection, TODAY, Band from functools import partial IDS = [ 'MODIS/006/MOD09GQ', 'MODIS/006/MYD09GQ', 'MODIS/006/MOD09GA', 'MODIS/006/MYD09GA', 'MODIS/006/MOD13Q1', 'MODIS/006/MYD13Q1' ] START = { 'MODIS/006/MOD09GQ': '2000-...
[ 2, 19617, 28, 40477, 12, 23, 198, 37811, 3012, 3668, 7117, 19164, 1797, 50004, 37227, 198, 198, 6738, 764, 1330, 12251, 11, 20092, 11, 10243, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 198, 14255, 796, 685, 198, 220, 220, 220, 705...
1.97027
370
""" This module provides a method to generate a random number between 0 and the specified number """ import random import math def random_num(max): """ Generates a random number Parameters: max(int): the range upper limit Returns: int: the random number """ return math.floor(rando...
[ 37811, 770, 8265, 3769, 257, 2446, 284, 7716, 257, 4738, 1271, 1022, 657, 290, 262, 7368, 1271, 37227, 198, 11748, 4738, 198, 11748, 10688, 628, 198, 4299, 4738, 62, 22510, 7, 9806, 2599, 198, 220, 220, 220, 37227, 220, 198, 220, 220,...
3.219048
105
import math import numpy as np
[ 11748, 10688, 198, 11748, 299, 32152, 355, 45941, 628 ]
3.555556
9
import ctypes import struct from .dave_define import * from .dave_enum import * from .dave_msg_id import * from .dave_msg_struct import * from .dave_struct import *
[ 11748, 269, 19199, 198, 11748, 2878, 628, 198, 6738, 764, 67, 1015, 62, 13086, 1330, 1635, 198, 6738, 764, 67, 1015, 62, 44709, 1330, 1635, 198, 6738, 764, 67, 1015, 62, 19662, 62, 312, 1330, 1635, 198, 6738, 764, 67, 1015, 62, 1966...
2.964286
56
# -*- coding: utf-8 -*- """@package Methods.Machine.Conductor.check Check that the Conductor is correct @date Created on Thu Jan 22 17:50:02 2015 @copyright (C) 2015-2016 EOMYS ENGINEERING. @author pierre_b """ from pyleecan.Methods.Machine.LamSlotWind.check import Lam_WindCheckError def check(self): """Check th...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 31, 26495, 25458, 13, 37573, 13, 25559, 33029, 13, 9122, 198, 9787, 326, 262, 9724, 33029, 318, 3376, 198, 31, 4475, 15622, 319, 26223, 2365, 2534, 1596, 25, 1120...
2.777143
175
from pathlib import Path from typing import List import cv2 import numpy as np from shapely import geometry from shapely.strtree import STRtree from wholeslidedata.annotation.structures import Annotation, Point, Polygon from wholeslidedata.image.wholeslideimage import WholeSlideImage from wholeslidedata.image.wholesli...
[ 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 7343, 198, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 5485, 306, 1330, 22939, 198, 6738, 5485, 306, 13, 2536, 21048, 1330, 19269, 21048, 198, 6738, 1795...
3.601695
118
import pytest from ..slicing_tuples import tuple_slice
[ 11748, 12972, 9288, 198, 6738, 11485, 82, 677, 278, 62, 28047, 2374, 1330, 46545, 62, 48369, 628 ]
3.294118
17
# -*- coding: utf-8 -*- """This class maintains the internal dfTimewolf state. Use it to track errors, abort on global failures, clean up after modules, etc. """ from dataclasses import dataclass from concurrent.futures import ThreadPoolExecutor, Future import importlib import logging import threading import tracebac...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 1212, 1398, 16047, 262, 5387, 47764, 14967, 413, 4024, 1181, 13, 198, 198, 11041, 340, 284, 2610, 8563, 11, 15614, 319, 3298, 15536, 11, 3424, 510, 706, 13103, 11...
3.165829
398
### Implements database management for Authentication Server and TGS ### from Query import * from sqlite3 import * from config import *
[ 21017, 1846, 1154, 902, 6831, 4542, 329, 48191, 9652, 290, 309, 14313, 44386, 198, 198, 6738, 43301, 1330, 1635, 198, 6738, 44161, 578, 18, 1330, 1635, 198, 6738, 4566, 1330, 1635, 628, 198, 197, 197 ]
4.028571
35
from rest_framework.decorators import api_view from rest_framework.response import Response from rest_framework import status from .models import Person from .serializers import PersonSerializer
[ 6738, 1334, 62, 30604, 13, 12501, 273, 2024, 1330, 40391, 62, 1177, 198, 6738, 1334, 62, 30604, 13, 26209, 1330, 18261, 198, 6738, 1334, 62, 30604, 1330, 3722, 198, 198, 6738, 764, 27530, 1330, 7755, 198, 6738, 764, 46911, 11341, 1330, ...
4.255319
47
import numpy as np import matplotlib.pyplot as plt field_width = 396 #cm field_hight = 180 #cm goal_length = 180 #cm threshold = 36 field_width_threshold_num = field_width / threshold + 1 field_width_threshold = [Y * threshold - field_width / 2.0 for Y in xrange(field_width_threshold_num)] field_hight_threshold_num =...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 3245, 62, 10394, 796, 48758, 1303, 11215, 198, 3245, 62, 71, 432, 796, 11546, 1303, 11215, 198, 35231, 62, 13664, 796, 11546, 1303, ...
2.256959
467
from pytest import raises from gsea_api.molecular_signatures_db import MolecularSignaturesDatabase
[ 6738, 12972, 9288, 1330, 12073, 198, 198, 6738, 308, 8583, 62, 15042, 13, 76, 2305, 10440, 62, 12683, 6691, 62, 9945, 1330, 38275, 11712, 6691, 38105, 628, 198 ]
3.642857
28
from django.contrib import admin, auth from django.contrib.auth.models import Group from django.shortcuts import get_object_or_404, redirect, render from django.urls import path, reverse, reverse_lazy from django.utils.translation import gettext_lazy as _ from adminsortable2.admin import SortableAdminMixin from froid...
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 11, 6284, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 4912, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 651, 62, 15252, 62, 273, 62, 26429, 11, 18941, 11, 85...
3.268025
638
try: import unittest2 as unittest except: import unittest from mpegdash.parser import MPEGDASHParser
[ 28311, 25, 198, 220, 220, 220, 1330, 555, 715, 395, 17, 355, 555, 715, 395, 198, 16341, 25, 198, 220, 220, 220, 1330, 555, 715, 395, 198, 198, 6738, 285, 431, 21287, 1077, 13, 48610, 1330, 41203, 35, 11211, 46677, 628 ]
2.707317
41
arr = [3, 5, 8, 10, 12, 15, 18, 20, 20, 50, 60] low = 1 high = 11 key = 50 index = BinarySearchIt(arr, low, high, key) if index != -1: print ("Element", key,"is present at index %d" %(index)) else: print ("Element %d is not present" %(key))
[ 198, 198, 3258, 796, 685, 18, 11, 642, 11, 807, 11, 838, 11, 1105, 11, 1315, 11, 1248, 11, 1160, 11, 1160, 11, 2026, 11, 3126, 60, 198, 9319, 796, 352, 198, 8929, 796, 1367, 198, 2539, 796, 2026, 198, 198, 9630, 796, 45755, 1824...
2.436893
103
#--- Day 2: Bathroom Security --- from typing import List test_data = """ULL RRDDD LURDL UUUUD""" assert solve1(test_data) == '1985' assert solve2(test_data) == '5DB3' if __name__ == '__main__': from aocd.models import Puzzle puzzle = Puzzle(2016, 2) answer_1 = solve1(puzzle.input_data) print(an...
[ 2, 6329, 3596, 362, 25, 24967, 3823, 4765, 11420, 198, 6738, 19720, 1330, 7343, 628, 628, 198, 198, 9288, 62, 7890, 796, 37227, 9994, 198, 21095, 16458, 35, 198, 43, 4261, 19260, 198, 30100, 52, 8322, 37811, 198, 198, 30493, 8494, 16,...
2.468571
175
#!/usr/bin/python3 import argparse import koji import os from pprint import pprint if __name__ == "__main__": main()
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 11748, 1822, 29572, 198, 11748, 479, 31370, 198, 11748, 28686, 198, 198, 6738, 279, 4798, 1330, 279, 4798, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220...
2.659574
47
# -*- coding: utf-8 -*- """Main module {{cookiecutter.project_name}} """ from __future__ import absolute_import from __future__ import unicode_literals
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 13383, 8265, 22935, 44453, 8968, 353, 13, 16302, 62, 3672, 11709, 37227, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 133...
3.122449
49
from config import * from utils import * import datetime import pickle indir_vocab_jnames = VOCAB_JNAMES indir_bio_srt = BIO_SRT indir_sorted_fperson_fname = SORTED_FPERSON_FNAME indir_sorted_lperson_fname = SORTED_LPERSON_FNAME print indir_vocab_jnames with open(indir_vocab_jnames,'rb') as v: all_vocab=pickle...
[ 6738, 4566, 1330, 1635, 198, 198, 6738, 3384, 4487, 1330, 1635, 198, 11748, 4818, 8079, 198, 11748, 2298, 293, 198, 198, 521, 343, 62, 18893, 397, 62, 73, 14933, 796, 569, 4503, 6242, 62, 41, 45, 29559, 198, 521, 343, 62, 65, 952, ...
2.18705
278
from rich.console import Console from rich.table import Table from rich.progress import track from time import sleep import sys
[ 6738, 5527, 13, 41947, 1330, 24371, 198, 6738, 5527, 13, 11487, 1330, 8655, 198, 6738, 5527, 13, 33723, 1330, 2610, 198, 6738, 640, 1330, 3993, 198, 11748, 25064, 628 ]
4.448276
29
# coding: utf-8 import datetime from flask_login import login_required, current_user from flask import Blueprint, request from app.libs.http import jsonify, error_jsonify from app.libs.db import session from app.serializer.notice import NoticeParaSchema from app.model.notice import Notice bp_admin_notification = B...
[ 2, 220, 19617, 25, 3384, 69, 12, 23, 198, 11748, 4818, 8079, 198, 198, 6738, 42903, 62, 38235, 1330, 17594, 62, 35827, 11, 1459, 62, 7220, 198, 198, 6738, 42903, 1330, 39932, 11, 2581, 198, 198, 6738, 598, 13, 8019, 82, 13, 4023, ...
3.410256
117
from fixture.orm import ORMfixture from model.group import Group from model.contact import Contact import random db = ORMfixture(host='127.0.0.1', name='addressbook', user='root', password='')
[ 6738, 29220, 13, 579, 1330, 6375, 44, 69, 9602, 198, 6738, 2746, 13, 8094, 1330, 4912, 198, 6738, 2746, 13, 32057, 1330, 14039, 198, 198, 11748, 4738, 198, 198, 9945, 796, 6375, 44, 69, 9602, 7, 4774, 11639, 16799, 13, 15, 13, 15, ...
3.266667
60
from django.urls import reverse_lazy from django.contrib.auth import get_user_model from django.views.generic import CreateView from . import forms User = get_user_model()
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 62, 75, 12582, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 1330, 13610, 7680, 198, 198, 6738, 764, 133...
3.240741
54
#!/usr/bin/env python # -*- encoding: utf-8 -*- from torch.nn import Module from torch.nn.modules.loss import _Loss from torch.optim import Optimizer from colossalai.builder import build_gradient_handler from colossalai.context import ParallelMode from colossalai.core import global_context as gpc from colossalai.logg...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 28034, 13, 20471, 1330, 19937, 198, 6738, 28034, 13, 20471, 13, 18170, 13, 22462, 1330, 4808, 43, 793, 198, ...
2.20684
1,228
import numpy as np import cv2 cap = cv2.VideoCapture('motion.avi') ret, frame = cap.read() gs_im0 = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) points_prev = cv2.goodFeaturesToTrack(gs_im0, 100, 0.03, 9.0, False) while(cap.isOpened()): ret, frame = cap.read() gs_im1 = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 17, 198, 198, 11128, 796, 269, 85, 17, 13, 10798, 49630, 10786, 38714, 13, 15820, 11537, 198, 198, 1186, 11, 5739, 796, 1451, 13, 961, 3419, 198, 14542, 62, 320, 15, 796, 269, 85, ...
2
359
import math def make_circle(radius = 10, res = 20, filled = True): points = [] for i in range(res): ang = 2*math.pi * i / res points.append((math.cos(ang) * radius, math.sin(ang) * radius) ) if filled: return FilledPolygon(points) else: return PolyLine(points, True)
[ 11748, 10688, 628, 198, 4299, 787, 62, 45597, 7, 42172, 796, 838, 11, 581, 796, 1160, 11, 5901, 796, 6407, 2599, 198, 220, 220, 220, 2173, 796, 17635, 198, 220, 220, 220, 329, 1312, 287, 2837, 7, 411, 2599, 198, 220, 220, 220, 220...
2.358209
134
"""Tests for the servo classes.""" from typing import List, Optional, Type import pytest from j5.backends import Backend from j5.boards import Board from j5.components.servo import Servo, ServoInterface, ServoPosition def test_servo_interface_implementation(): """Test that we can implement the ServoInterface....
[ 37811, 51, 3558, 329, 262, 1113, 78, 6097, 526, 15931, 198, 6738, 19720, 1330, 7343, 11, 32233, 11, 5994, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 474, 20, 13, 1891, 2412, 1330, 5157, 437, 198, 6738, 474, 20, 13, 12821, 1330, 5...
2.857692
520
frase = str(input('Digite uma frase: ')).lower() print('Sobre a letra "a": \nQuantas vezes ela aparece? {} vezes;'.format(frase.count('a'))) print('Em que posio ela aparece pela primeira vez? {};'.format(frase.strip().index('a')+1)) print('Em que posio ela aparece pela ltima vez? {}.'.format(frase.strip().rfind('a')+1)...
[ 8310, 589, 796, 965, 7, 15414, 10786, 19511, 578, 334, 2611, 1216, 589, 25, 705, 29720, 21037, 3419, 198, 4798, 10786, 50, 672, 260, 257, 1309, 430, 366, 64, 1298, 3467, 77, 24915, 292, 1569, 12271, 1288, 64, 2471, 533, 344, 30, 238...
2.439394
132
from django.contrib.auth.mixins import LoginRequiredMixin from django.views import View from django.views.generic import ListView from django.utils.http import is_safe_url from django.contrib import messages from rest_framework import status from django.core.exceptions import ObjectDoesNotExist from django.shortcuts im...
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 19816, 1040, 1330, 23093, 37374, 35608, 259, 198, 6738, 42625, 14208, 13, 33571, 1330, 3582, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 1330, 7343, 7680, 198, 6738, 42625, 14208, 13, ...
3.560403
298
"""InterviewBit. Programming > Arrays > Rotate Matrix. """ matrices = [ [ [1] ], [ [1, 2], [3, 4] ], [ [1, 2, 3], [4, 5, 6], [7, 8, 9] ], [ ['a', 'b', 'c', 'd'], ['e', 'f', 'g', 'h'], ['i', 'j', 'k', 'l'], ['...
[ 37811, 39945, 13128, 13, 198, 198, 15167, 2229, 1875, 943, 20477, 1875, 18481, 378, 24936, 13, 198, 37811, 628, 198, 198, 6759, 45977, 796, 685, 198, 220, 220, 220, 685, 198, 220, 220, 220, 220, 220, 220, 220, 685, 16, 60, 198, 220,...
1.765861
662
# Copyright (c) 2019, 2020, Oracle Corporation and/or its affiliates. # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. connect('weblogic', 'welcome1', 't3://DOMAINNAME-admin-server:7001') # get all JDBC Properties dsCounter = 0 allJDBCResources = cmo.getJDBCSyst...
[ 2, 15069, 357, 66, 8, 13130, 11, 12131, 11, 18650, 10501, 290, 14, 273, 663, 29116, 13, 198, 2, 49962, 739, 262, 14499, 2448, 33532, 13789, 410, 352, 13, 15, 355, 3402, 379, 3740, 1378, 793, 13, 273, 6008, 13, 785, 14, 677, 4541, ...
2.698266
865
from rdr_service import clock from rdr_service.dao.biobank_stored_sample_dao import BiobankStoredSampleDao from rdr_service.dao.participant_dao import ParticipantDao from rdr_service.model.biobank_stored_sample import BiobankStoredSample from rdr_service.model.participant import Participant from tests.helpers.unittest_...
[ 6738, 374, 7109, 62, 15271, 1330, 8801, 198, 6738, 374, 7109, 62, 15271, 13, 67, 5488, 13, 8482, 672, 962, 62, 301, 1850, 62, 39873, 62, 67, 5488, 1330, 8436, 672, 962, 1273, 1850, 36674, 35, 5488, 198, 6738, 374, 7109, 62, 15271, ...
3.145455
110
import socket, os, atexit from flask import Flask, jsonify, request from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate from flask.helpers import send_from_directory, url_for from zeroconf import ServiceInfo, Zeroconf from pantryflask.config import FlaskConfig from pantryflask.auth import token_a...
[ 11748, 17802, 11, 28686, 11, 379, 37023, 198, 6738, 42903, 1330, 46947, 11, 33918, 1958, 11, 2581, 198, 6738, 42903, 62, 25410, 282, 26599, 1330, 16363, 2348, 26599, 198, 6738, 42903, 62, 76, 42175, 1330, 337, 42175, 198, 6738, 42903, 1...
2.694872
390
# # Copyright 2017 Mycroft AI 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 in writ...
[ 2, 198, 2, 15069, 2177, 2011, 36714, 9552, 3457, 13, 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...
2.102281
3,901
# Defines a velocity profile, which is the big object we've been # working towards. from math import sqrt, ceil import json
[ 2, 2896, 1127, 257, 15432, 7034, 11, 543, 318, 262, 1263, 2134, 356, 1053, 587, 198, 2, 1762, 3371, 13, 198, 6738, 10688, 1330, 19862, 17034, 11, 2906, 346, 198, 198, 11748, 33918, 198 ]
3.676471
34
import os import subprocess test_set_path = '/Users/runelangergaard/Documents/SmartAnnotation/data/test_set' test_imgs = os.listdir(test_set_path) test_imgs cwd_path = '/Users/runelangergaard' os.chdir(cwd_path) for img in test_imgs: full_path = os.path.join(test_set_path, img) subprocess.run([ "scp",...
[ 11748, 28686, 198, 11748, 850, 14681, 198, 9288, 62, 2617, 62, 6978, 796, 31051, 14490, 14, 5143, 417, 2564, 36232, 14, 38354, 14, 25610, 2025, 38983, 14, 7890, 14, 9288, 62, 2617, 6, 198, 9288, 62, 9600, 82, 796, 28686, 13, 4868, 1...
2.079295
227
import random import grom grom.debug(False) dirName = "dump\\" inputName = "example.bmp" outputName = "output.bmp" g = grom.Genome(dirName + inputName, partition=[ ('head', 0x76), ('raw') ]) print(g) print(g.partition) g.apply(lambda x: 255 - x, ['raw']) g(dirName + outputName, pause=False)
[ 11748, 4738, 198, 11748, 308, 398, 198, 70, 398, 13, 24442, 7, 25101, 8, 198, 198, 15908, 5376, 796, 366, 39455, 6852, 1, 198, 15414, 5376, 796, 366, 20688, 13, 65, 3149, 1, 198, 22915, 5376, 796, 366, 22915, 13, 65, 3149, 1, 198,...
2.412698
126
################################################################################ # 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...
[ 29113, 29113, 14468, 198, 2, 220, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 2, 220, 393, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 2, 220, 9387, 351, 428, 670, 329, 3224, 1321, 198, ...
4.448669
263
""" Problem: You are given a list of N points (x1, y1), (x2, y2), ..., (xN, yN) representing a polygon. You can assume these points are given in order; that is, you can construct the polygon by connecting point 1 to point 2, point 2 to point 3, and so on, finally looping around to connect point N to point 1. Determin...
[ 37811, 198, 40781, 25, 198, 198, 1639, 389, 1813, 257, 1351, 286, 399, 2173, 357, 87, 16, 11, 331, 16, 828, 357, 87, 17, 11, 331, 17, 828, 2644, 11, 357, 87, 45, 11, 331, 45, 8, 10200, 257, 198, 35428, 14520, 13, 921, 460, 704...
2.666667
267
# Copyright 2021 Alexis Lopez Zubieta # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publi...
[ 2, 220, 15069, 220, 33448, 31078, 22593, 47828, 1155, 64, 198, 2, 198, 2, 220, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 198, 2, 220, 4866, 286, 428, 3788, 290, 3917, 10314, 3696, 357, 1169, ...
4.124294
177
# Author: Fabio Rodrigues Pereira # E-mail: fabior@uio.no # Author: Per Morten Halvorsen # E-mail: pmhalvor@uio.no # Author: Eivind Grnlie Guren # E-mail: eivindgg@ifi.uio.no try: from Oblig3.packages.preprocess import load_raw_data, filter_raw_data, pad from Oblig3.packages.preprocess import OurCONLLUDatas...
[ 2, 6434, 25, 14236, 952, 16114, 947, 17229, 8704, 198, 2, 412, 12, 4529, 25, 7843, 1504, 31, 84, 952, 13, 3919, 198, 198, 2, 6434, 25, 2448, 10788, 268, 11023, 85, 669, 268, 198, 2, 412, 12, 4529, 25, 9114, 14201, 20867, 31, 84,...
2.416904
1,053
import logging import os import random import string import unittest import warnings from boxsdk.exception import BoxAPIException, BoxOAuthException from parsons.box import Box from parsons.etl import Table """Prior to running, you should ensure that the relevant environment variables have been set, e.g. via # Note...
[ 11748, 18931, 198, 11748, 28686, 198, 11748, 4738, 198, 11748, 4731, 198, 11748, 555, 715, 395, 198, 11748, 14601, 198, 198, 6738, 3091, 21282, 74, 13, 1069, 4516, 1330, 8315, 17614, 16922, 11, 8315, 23621, 1071, 16922, 198, 198, 6738, ...
2.752351
319
import matplotlib.pyplot as plt import numpy as np import cv2 '''Erosion Method''' '''Point Detection Method''' img = cv2.imread("point.jpg",0) sample = img kernel = np.array([[-1,-1,-1], [-1,8,-1], [-1,-1,-1]]) output, co_ord = point_detection(img, kernel...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 269, 85, 17, 201, 198, 201, 198, 7061, 6, 36, 4951, 295, 11789, 7061, 6, 201, 198, 201, 198, 7061, 6, 12727, 46254, ...
2.125277
902
# Generated by Django 3.1.5 on 2021-02-07 08:19 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 20, 319, 33448, 12, 2999, 12, 2998, 8487, 25, 1129, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_login import LoginManager app = Flask(__name__) app.config.from_object('config') db = SQLAlchemy(app) lm = LoginManager(app) from app import views, models, oauth
[ 6738, 42903, 1330, 46947, 198, 6738, 42903, 62, 25410, 282, 26599, 1330, 16363, 2348, 26599, 198, 6738, 42903, 62, 38235, 1330, 23093, 13511, 198, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 198, 1324, 13, 11250, 13, 6738, 62, 15252, ...
3.22973
74
""" https://leetcode.com/problems/to-lower-case/ Difficulty: Easy Given a string s, return the string after replacing every uppercase letter with the same lowercase letter. Example 1: Input: s = "Hello" Output: "hello" Example 2: Input: s = "here" Output: "here" Example 3: Input: s = "LOVELY" Outp...
[ 37811, 198, 5450, 1378, 293, 316, 8189, 13, 785, 14, 1676, 22143, 14, 1462, 12, 21037, 12, 7442, 14, 198, 28813, 22402, 25, 16789, 198, 198, 15056, 257, 4731, 264, 11, 1441, 262, 4731, 706, 13586, 790, 334, 39921, 589, 3850, 351, 26...
2.764706
153
import align_tools as at import matplotlib.pyplot as plt import numpy as np from collections import Counter if __name__ == '__main__': main()
[ 11748, 10548, 62, 31391, 355, 379, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 17268, 1330, 15034, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, ...
3.125
48
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
import os from pygears.hdl.sv import SVModuleInst from .ip_resolver import IPResolver
[ 11748, 28686, 198, 6738, 12972, 70, 4127, 13, 71, 25404, 13, 21370, 1330, 20546, 26796, 6310, 198, 6738, 764, 541, 62, 411, 14375, 1330, 314, 4805, 274, 14375, 628 ]
3
29
import shutil import tempfile from pathlib import Path from typing import Dict import click from commodore.config import Config from .parameters import ClassNotFound, InventoryFactory, InventoryFacts
[ 11748, 4423, 346, 198, 11748, 20218, 7753, 198, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 360, 713, 198, 198, 11748, 3904, 198, 198, 6738, 13088, 382, 13, 11250, 1330, 17056, 198, 198, 6738, 764, 17143, 7307, 1330, 501...
3.961538
52
begin_unit comment|'# Copyright (c) 2013 Intel, Inc.' nl|'\n' comment|'# Copyright (c) 2013 OpenStack Foundation' nl|'\n' comment|'# All Rights Reserved.' nl|'\n' comment|'#' nl|'\n' comment|'# Licensed under the Apache License, Version 2.0 (the "License"); you may' nl|'\n' comment|'# not use this file except in ...
[ 27471, 62, 20850, 198, 23893, 91, 6, 2, 15069, 357, 66, 8, 2211, 8180, 11, 3457, 2637, 198, 21283, 91, 6, 59, 77, 6, 198, 23893, 91, 6, 2, 15069, 357, 66, 8, 2211, 4946, 25896, 5693, 6, 198, 21283, 91, 6, 59, 77, 6, 198, 238...
1.940863
13,122
"""Variational autoencoder model.""" from typing import Tuple import torch from torch import nn from torch.nn import functional as F
[ 37811, 23907, 864, 1960, 6571, 66, 12342, 2746, 526, 15931, 198, 198, 6738, 19720, 1330, 309, 29291, 198, 198, 11748, 28034, 198, 6738, 28034, 1330, 299, 77, 198, 6738, 28034, 13, 20471, 1330, 10345, 355, 376, 628, 198 ]
3.605263
38
from django.http.response import HttpResponse from rest_framework import serializers, viewsets from rest_framework.decorators import action from rest_framework.permissions import IsAuthenticated from .excel import Excel XLSX_MIME = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
[ 6738, 42625, 14208, 13, 4023, 13, 26209, 1330, 367, 29281, 31077, 198, 6738, 1334, 62, 30604, 1330, 11389, 11341, 11, 5009, 1039, 198, 6738, 1334, 62, 30604, 13, 12501, 273, 2024, 1330, 2223, 198, 6738, 1334, 62, 30604, 13, 525, 8481, ...
3.619048
84