content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
import codecs import numpy import glob import re from sklearn.metrics import f1_score def clean_url(word): """ Clean specific data format from social media """ # clean urls word = re.sub(r'https? : \/\/.*[\r\n]*', '<URL>', word) word = re.sub(r'exlink', '<URL>', word) return word
[ 11748, 40481, 82, 198, 11748, 299, 32152, 198, 11748, 15095, 198, 11748, 302, 198, 6738, 1341, 35720, 13, 4164, 10466, 1330, 277, 16, 62, 26675, 198, 198, 4299, 3424, 62, 6371, 7, 4775, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, ...
2.423077
130
import json from glob import glob data = [] for fname in ['critic-0.jsonlines']+glob('*new*.jsonlines'): print fname with open(fname) as f: for line in f: data.append(json.loads(line)) new_data = [] for i in data: if i['imdb_mid'] != -1: new_data.append(i) with open('compact....
[ 11748, 33918, 198, 6738, 15095, 1330, 15095, 198, 198, 7890, 796, 17635, 198, 198, 1640, 277, 3672, 287, 37250, 22213, 291, 12, 15, 13, 17752, 6615, 20520, 10, 4743, 672, 10786, 9, 3605, 24620, 17752, 6615, 6, 2599, 198, 220, 220, 220...
2.166667
168
#!/usr/bin/env python # -*- coding: utf-8 -*- """Exercise 11.5 from Kane 1985.""" from __future__ import division from sympy import expand, solve, symbols, trigsimp from sympy import sin, tan, pi from sympy.physics.mechanics import Point, ReferenceFrame, RigidBody from sympy.physics.mechanics import dot, dynamicsymbol...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 3109, 23697, 1367, 13, 20, 422, 20055, 12863, 526, 15931, 198, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 67...
2.099858
1,412
import hashlib import os import logging import posixpath from seaserv import seafile_api from seahub.utils import normalize_file_path, check_filename_with_rename from seahub.tags.models import FileUUIDMap logger = logging.getLogger(__name__) def send_draft_publish_msg(draft, username, path): """ send...
[ 11748, 12234, 8019, 198, 11748, 28686, 198, 11748, 18931, 198, 11748, 1426, 844, 6978, 198, 198, 6738, 21547, 712, 1330, 25127, 576, 62, 15042, 198, 198, 6738, 384, 993, 549, 13, 26791, 1330, 3487, 1096, 62, 7753, 62, 6978, 11, 2198, ...
2.594796
269
size = int(input()) array_input = [] for x in range(size): array_input.append(tuple(input().split())) g = get_itinerary(array_input,'MSC',[]) print(" ".join(g))
[ 198, 198, 7857, 796, 493, 7, 15414, 28955, 198, 18747, 62, 15414, 796, 17635, 198, 1640, 2124, 287, 2837, 7, 7857, 2599, 198, 220, 220, 220, 7177, 62, 15414, 13, 33295, 7, 83, 29291, 7, 15414, 22446, 35312, 3419, 4008, 198, 198, 70,...
2.470588
68
import threading import time _base = int(time.mktime(time.strptime('2020-1-1', '%Y-%m-%d'))*1000) def makeId(timestamp = 0, machine = 0, flow = 0): """ using unix style timestamp, not python timestamp """ timestamp -= _base return (timestamp<<13) | (machine << 8) | flow
[ 11748, 4704, 278, 198, 11748, 640, 198, 198, 62, 8692, 796, 493, 7, 2435, 13, 28015, 2435, 7, 2435, 13, 2536, 457, 524, 10786, 42334, 12, 16, 12, 16, 3256, 705, 4, 56, 12, 4, 76, 12, 4, 67, 6, 4008, 9, 12825, 8, 628, 198, 42...
2.596491
114
# geneexpr.py - simple gene expression example # Richard M. Murray, 11 Aug 2018 # # This example shows how to use the txtl library to create a model for # a simple gene expression construct. This model is constructed to # demonstrate the ability to mimic the MATLAB TX-TL modeling toolbox # approach as well as a few si...
[ 2, 9779, 31937, 13, 9078, 532, 2829, 9779, 5408, 1672, 198, 2, 6219, 337, 13, 12164, 11, 1367, 2447, 2864, 198, 2, 198, 2, 770, 1672, 2523, 703, 284, 779, 262, 256, 742, 75, 5888, 284, 2251, 257, 2746, 329, 198, 2, 257, 2829, 97...
2.794643
672
from expression_evaluator.token import *
[ 6738, 5408, 62, 18206, 84, 1352, 13, 30001, 1330, 1635 ]
4
10
import re import numpy as np
[ 11748, 302, 198, 11748, 299, 32152, 355, 45941, 628, 628, 628, 628, 628, 198 ]
2.785714
14
from django import forms from django.contrib.auth.forms import UserCreationForm from django.contrib.auth.models import User
[ 6738, 42625, 14208, 1330, 5107, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 23914, 1330, 11787, 12443, 341, 8479, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787 ]
3.617647
34
# # COPYRIGHT (C) 2002-2011 Rajgopal Srinivasan and modified by changjin.hong@gmail.com # """ .. module:: preprocess_clinvar :platform: Unix, Windows, MacOSX :synopsis: Transparent opening of compressed and uncompressed files .. moduleauthor:: ; changjin.hong@gmail.com """ import os, dill, re, argparse from gcn.li...
[ 2, 198, 2, 27975, 38162, 9947, 357, 34, 8, 6244, 12, 9804, 13308, 70, 33067, 311, 12769, 38630, 272, 290, 9518, 416, 1488, 18594, 13, 71, 506, 31, 14816, 13, 785, 198, 2, 198, 37811, 198, 492, 8265, 3712, 662, 14681, 62, 565, 259,...
2.122073
2,007
# Copyright (c) 2019, salesforce.com, inc. # All rights reserved. # SPDX-License-Identifier: MIT # For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT import os import json import time import torch import numpy as np from dist_train.utils.shared_optim import SharedAdam a...
[ 2, 15069, 357, 66, 8, 13130, 11, 4200, 3174, 13, 785, 11, 753, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 17168, 198, 2, 1114, 1336, 5964, 2420, 11, 766, 262, 38559, 24290, 2393, 287, 2...
3.492063
126
# see https://www.codewars.com/kata/5a908da30025e995880000e3/solutions/python from TestFunction import Test Test = Test(None) Test.assert_equals(solve(2,2),'57') Test.assert_equals(solve(10,3),'192') Test.assert_equals(solve(20,9),'414347535') Test.assert_equals(solve(30,12),'616771737983') Test.assert_equals(solve(4...
[ 2, 766, 3740, 1378, 2503, 13, 19815, 413, 945, 13, 785, 14, 74, 1045, 14, 20, 64, 24, 2919, 6814, 6200, 1495, 68, 2079, 39118, 2388, 68, 18, 14, 82, 14191, 14, 29412, 198, 198, 6738, 6208, 22203, 1330, 6208, 198, 198, 14402, 796, ...
2.220096
209
from pygooglechart import Chart from pygooglechart import SimpleLineChart from pygooglechart import Axis try: import stackless except ImportError: stackless = None import timeit import gc results = dict() RANGE = range(0, 100000, 10000)[1:] if stackless: libs = ["stacklessb", "fibrab", "kamaeliab"] else:...
[ 6738, 12972, 13297, 40926, 1330, 22086, 198, 6738, 12972, 13297, 40926, 1330, 17427, 13949, 45488, 198, 6738, 12972, 13297, 40926, 1330, 38349, 198, 198, 28311, 25, 198, 220, 220, 220, 1330, 8931, 1203, 198, 16341, 17267, 12331, 25, 198, ...
2.325658
304
import numpy as np from scipy.linalg import eigh import voice_activity_detector import features_extraction import statistics import utils
[ 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 75, 1292, 70, 1330, 304, 394, 198, 11748, 3809, 62, 21797, 62, 15255, 9250, 198, 11748, 3033, 62, 2302, 7861, 198, 11748, 7869, 198, 11748, 3384, 4487, 628, 628, 628, 628, ...
3.363636
44
# Handles file uploads in Python Tornado: http://tornadoweb.org/ import tornado.web import logging import os import uuid def uuid_naming_strategy(original_name): "File naming strategy that ignores original name and returns an UUID" return str(uuid.uuid4())
[ 2, 7157, 829, 2393, 9516, 82, 287, 11361, 48970, 25, 2638, 1378, 45910, 4584, 1765, 13, 2398, 14, 198, 198, 11748, 33718, 13, 12384, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 334, 27112, 628, 198, 4299, 334, 27112, 62, 77, 372...
3.240964
83
# Program 15d: Plotting a Newton fractal. # See Figure 15.7. from PIL import Image width = height = 512 image = Image.new('RGB', (width, height)) xmin, xmax = -1.5, 1.5 ymin, ymax = -1.5, 1.5 max_iter = 20 h = 1e-6 # Step size eps = 1e-3 # Maximum error # Draw the fractal. for y in range(height): zy = y * (y...
[ 2, 6118, 1315, 67, 25, 28114, 889, 257, 17321, 12999, 282, 13, 198, 2, 4091, 11291, 1315, 13, 22, 13, 198, 198, 6738, 350, 4146, 1330, 7412, 198, 198, 10394, 796, 6001, 796, 22243, 198, 9060, 796, 7412, 13, 3605, 10786, 36982, 3256,...
2.048165
436
import time import tweepy as twitter import os superhour = time.localtime().tm_hour hour = superhour % 12 if hour == 0: hour = 12 sentence = "Tenho %d lgrima%s no canto do mostrador, %s nos Aores%s" if superhour >= 12: if hour == 1: sentence = sentence % (hour, "", "12 lgrimas", "") else: sentence = sentence...
[ 11748, 640, 198, 11748, 4184, 538, 88, 355, 17044, 198, 11748, 28686, 198, 198, 16668, 9769, 796, 640, 13, 12001, 2435, 22446, 17209, 62, 9769, 198, 9769, 796, 2208, 9769, 4064, 1105, 198, 361, 1711, 6624, 657, 25, 198, 197, 9769, 796...
2.433803
355
# -*- coding: utf-8 -*- from .CacheDefaults import CacheDefaults from ..caches.AbstractCacheParameters import AbstractCacheParameters
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628, 198, 6738, 764, 30562, 7469, 13185, 1330, 34088, 7469, 13185, 198, 6738, 11485, 66, 3694, 13, 23839, 30562, 48944, 1330, 27741, 30562, 48944, 628 ]
3.605263
38
#! /usr/bin/env python # import thread import threading import os.path import random import hashlib import socket import time import os import copy import socket letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' host = '' port = 9093 pega_mensagem = '' addr = (host, port) serv_socket = socket.socket(socket.AF_INET, socket.SOCK_...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 1330, 4704, 198, 11748, 4704, 278, 198, 11748, 28686, 13, 6978, 198, 11748, 4738, 198, 11748, 12234, 8019, 198, 11748, 17802, 198, 11748, 640, 198, 11748, 28686, 198, 11748, ...
2.201212
825
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'OhsomeToolsDialogUI.ui' # # Created by: PyQt5 UI code generator 5.15.4 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 5178, 7822, 7560, 422, 3555, 334, 72, 2393, 705, 5812, 11246, 33637, 44204, 10080, 13, 9019, 6, 198, 2, 198, 2, 15622, 416, 25, 9485, 48, 83, 20, 12454, 2438...
3.069767
129
"@generated by @aspect_rules_js//npm/private:npm_translate_lock.bzl from pnpm lock file @aspect_rules_swc@aspect_rules_swc//swc:pnpm-lock.yaml" load("@aspect_rules_js//npm:npm_import.bzl", "npm_import") def npm_repositories(): "Generated npm_import repository rules corresponding to npm packages in @aspect_rules_s...
[ 1, 31, 27568, 416, 2488, 292, 806, 62, 38785, 62, 8457, 1003, 77, 4426, 14, 19734, 25, 77, 4426, 62, 7645, 17660, 62, 5354, 13, 65, 48274, 422, 279, 77, 4426, 5793, 2393, 2488, 292, 806, 62, 38785, 62, 2032, 66, 31, 292, 806, 62...
1.624113
8,178
""" Neural network modules for WaveNet References : https://arxiv.org/pdf/1609.03499.pdf https://github.com/ibab/tensorflow-wavenet https://qiita.com/MasaEguchi/items/cd5f7e9735a120f27e2a https://github.com/musyoku/wavenet/issues/4 """ import torch import numpy as np from utils.exceptions import Input...
[ 37811, 198, 8199, 1523, 3127, 13103, 329, 17084, 7934, 198, 198, 19927, 1058, 198, 220, 220, 220, 3740, 1378, 283, 87, 452, 13, 2398, 14, 12315, 14, 1433, 2931, 13, 49841, 2079, 13, 12315, 198, 220, 220, 220, 3740, 1378, 12567, 13, ...
2.496296
135
import requests import yaml from fair_test import FairTest, FairTestEvaluation
[ 11748, 7007, 198, 11748, 331, 43695, 198, 6738, 3148, 62, 9288, 1330, 7011, 14402, 11, 7011, 14402, 36, 2100, 2288, 628 ]
3.809524
21
import asyncio from virtool_workflow_runtime._redis import connect, VIRTOOL_JOBS_CHANNEL, job_id_queue from virtool_workflow_runtime.runtime import execute_from_redis JOB_IDs = [str(n) for n in range(3)]
[ 11748, 30351, 952, 198, 6738, 4118, 970, 62, 1818, 11125, 62, 43282, 13557, 445, 271, 1330, 2018, 11, 569, 4663, 10468, 3535, 62, 45006, 4462, 62, 3398, 22846, 3698, 11, 1693, 62, 312, 62, 36560, 198, 6738, 4118, 970, 62, 1818, 11125,...
2.776316
76
import abc from probnum.filtsmooth.statespace.transition import Transition __all__ = ["DiscreteModel"]
[ 11748, 450, 66, 198, 198, 6738, 1861, 22510, 13, 10379, 912, 76, 5226, 13, 27219, 10223, 13, 7645, 653, 1330, 40658, 198, 198, 834, 439, 834, 796, 14631, 15642, 8374, 17633, 8973, 628 ]
3.212121
33
'''This plots the bubble results ''' from pickle import load from numpy import array, atleast_2d, hstack, where, zeros from matplotlib.pyplot import close, subplots from examples.temp_bubbles.common import DataObject from seaborn import heatmap no_i_vals = 3 no_j_vals = 3 peaks_1 = zeros((no_i_vals,no_j_vals)) peaks_...
[ 7061, 6, 1212, 21528, 262, 14310, 2482, 198, 7061, 6, 198, 6738, 2298, 293, 1330, 3440, 198, 6738, 299, 32152, 1330, 7177, 11, 379, 293, 459, 62, 17, 67, 11, 289, 25558, 11, 810, 11, 1976, 27498, 198, 6738, 2603, 29487, 8019, 13, ...
2.118065
4,218
#!/usr/bin/env python3 """ Sample script to extract and set level thumbnails. """ import argparse import io import os import sys from dustmaker import DFReader, DFWriter from dustmaker.cmd.common import ( run_utility, CliUtility, ) from dustmaker.variable import VariableBool if __name__ == "__main__": s...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 198, 36674, 4226, 284, 7925, 290, 900, 1241, 294, 13668, 13, 198, 37811, 198, 11748, 1822, 29572, 198, 11748, 33245, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 6738, 8977...
3.008547
117
from common.pages import Page import allure from common.pages import is_displayed, is_enabled, is_disabled from delayed_assert import expect, assert_expectations from allure import severity, severity_level
[ 6738, 2219, 13, 31126, 1330, 7873, 198, 11748, 477, 495, 198, 6738, 2219, 13, 31126, 1330, 318, 62, 13812, 276, 11, 318, 62, 25616, 11, 318, 62, 47730, 198, 6738, 11038, 62, 30493, 1330, 1607, 11, 6818, 62, 1069, 806, 602, 198, 6738...
3.888889
54
from werkzeug.security import check_password_hash, generate_password_hash from Database import DBController
[ 6738, 266, 9587, 2736, 1018, 13, 12961, 1330, 2198, 62, 28712, 62, 17831, 11, 7716, 62, 28712, 62, 17831, 198, 6738, 24047, 1330, 360, 2749, 756, 10646 ]
3.962963
27
import xarray as xray import numpy as np import pandas as pd from .ploteos import correct_mon from .ploteos_e import correct_e
[ 11748, 2124, 18747, 355, 2124, 2433, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 764, 489, 1258, 418, 1330, 3376, 62, 2144, 198, 6738, 764, 489, 1258, 418, 62, 68, 1330, 3376, 62, 68, 198 ]
3.02381
42
import time from kts.ui.components import HTMLRepr, Column, Field, Title, ThumbnailField, Raw from kts.util.formatting import format_value
[ 11748, 640, 198, 198, 6738, 479, 912, 13, 9019, 13, 5589, 3906, 1330, 11532, 6207, 81, 11, 29201, 11, 7663, 11, 11851, 11, 536, 20566, 15878, 11, 16089, 198, 6738, 479, 912, 13, 22602, 13, 18982, 889, 1330, 5794, 62, 8367, 628, 198 ...
3.302326
43
from mmcv.utils import Registry, build_from_cfg TRANSFORMER = Registry('Transformer') def build_transformer(cfg, default_args=None): """Builder for Transformer.""" return build_from_cfg(cfg, TRANSFORMER, default_args)
[ 6738, 8085, 33967, 13, 26791, 1330, 33432, 11, 1382, 62, 6738, 62, 37581, 198, 198, 5446, 15037, 21389, 1137, 796, 33432, 10786, 8291, 16354, 11537, 628, 198, 4299, 1382, 62, 7645, 16354, 7, 37581, 11, 4277, 62, 22046, 28, 14202, 2599, ...
3.094595
74
# import python libraries from airflow import DAG from datetime import datetime, timedelta from airflow.operators.bash_operator import BashOperator from airflow.operators.python_operator import PythonOperator from datacleaner import data_cleaner from airflow.operators.mysql_operator import MySqlOperator from airflow.op...
[ 2, 1330, 21015, 12782, 198, 6738, 45771, 1330, 360, 4760, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 6738, 45771, 13, 3575, 2024, 13, 41757, 62, 46616, 1330, 15743, 18843, 1352, 198, 6738, 45771, 13, 3575, 2024, 13,...
2.793033
976
""" Decoding tools and algorithms. """ from .searchlight import SearchLight from .space_net import SpaceNetClassifier, SpaceNetRegressor from .decoder import Decoder, DecoderRegressor __all__ = ['SearchLight', 'SpaceNetClassifier', 'SpaceNetRegressor', 'Decoder', 'DecoderRegressor']
[ 37811, 198, 10707, 7656, 4899, 290, 16113, 13, 198, 37811, 628, 198, 6738, 764, 12947, 2971, 1330, 11140, 15047, 198, 6738, 764, 13200, 62, 3262, 1330, 4687, 7934, 9487, 7483, 11, 4687, 7934, 8081, 44292, 198, 6738, 764, 12501, 12342, 1...
3.322222
90
from acq4.devices.PressureControl import PressureControl
[ 6738, 936, 80, 19, 13, 42034, 13, 13800, 495, 15988, 1330, 30980, 15988, 628 ]
4.142857
14
SIZEOF_BYTE = 8 SIZEOF_INT_16 = 16 // SIZEOF_BYTE SIZEOF_INT_32 = 32 // SIZEOF_BYTE
[ 11584, 57, 4720, 37, 62, 17513, 9328, 796, 807, 198, 198, 11584, 57, 4720, 37, 62, 12394, 62, 1433, 796, 1467, 3373, 311, 14887, 4720, 37, 62, 17513, 9328, 198, 11584, 57, 4720, 37, 62, 12394, 62, 2624, 796, 3933, 3373, 311, 14887, ...
1.734694
49
#!/usr/bin/python3 """ Sprinkles - Pibow This program lights up and turns off random LEDS using the colors of the Pibow Zero Candy case .................... Functions: - sprinkles: Lights up and turns off random LEDs .................... Author: Paul Ryan This program was written on a Raspberry Pi using the Geany...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 37811, 198, 38454, 676, 829, 532, 350, 571, 322, 198, 198, 1212, 1430, 7588, 510, 290, 4962, 572, 4738, 12365, 50, 1262, 262, 7577, 286, 262, 198, 47, 571, 322, 12169, 24680, 1339, 198,...
2.6
760
import requests import logging from utils.authentification import get_headers logger = logging.getLogger(__name__)
[ 11748, 7007, 198, 11748, 18931, 198, 6738, 3384, 4487, 13, 41299, 2649, 1330, 651, 62, 50145, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 220, 628 ]
3.575758
33
# titlescreen.py import upygame logoPixels = b'\ \x99\x99\x99\x98\x80\x00\x00\x99\x99\x88\x80\x00\x99\x99\x98\x88\x80\x09\x99\x98\x88\x80\x09\x99\x88\x88\x00\x99\x99\x88\x80\x09\x99\x88\x09\ \x01\x11\x11\x19\x88\x00\x00\x91\x11\x98\x88\x99\x11\x11\x19\x98\x88\x99\x11\x99\x88\x88\x91\x11\x98\x88\x89\x11\x19\x9...
[ 2, 8714, 32060, 13, 9078, 201, 198, 201, 198, 11748, 510, 88, 6057, 201, 198, 201, 198, 201, 198, 6404, 78, 47, 14810, 796, 275, 6, 59, 201, 198, 59, 87, 2079, 59, 87, 2079, 59, 87, 2079, 59, 87, 4089, 59, 87, 1795, 59, 87, ...
1.340402
1,792
ax = data.plot.scatter(x=data.columns[0], y=data.columns[1]) ax.plot(X["Flipper Length (mm)"], y_pred, color="black", linewidth=4) _ = ax.set_title("Can I predict penguins' body mass")
[ 897, 796, 1366, 13, 29487, 13, 1416, 1436, 7, 87, 28, 7890, 13, 28665, 82, 58, 15, 4357, 331, 28, 7890, 13, 28665, 82, 58, 16, 12962, 198, 897, 13, 29487, 7, 55, 14692, 37, 4528, 2848, 22313, 357, 3020, 16725, 4357, 331, 62, 287...
2.466667
75
import subprocess import re from typing import Sequence, Text from luh3417.luhfs import LocalLocation, Location, SshLocation from luh3417.luhssh import SshManager from luh3417.utils import LuhError def rsync_files(source: Location, target: Location, delete: bool = False): """ Use rsync to copy files from a ...
[ 11748, 850, 14681, 198, 11748, 302, 198, 198, 6738, 19720, 1330, 45835, 11, 8255, 198, 198, 6738, 300, 7456, 2682, 1558, 13, 2290, 71, 9501, 1330, 10714, 14749, 11, 13397, 11, 311, 1477, 14749, 198, 6738, 300, 7456, 2682, 1558, 13, 22...
2.464799
1,321
''' Given a string which consists of lowercase or uppercase letters, find the length of the longest palindromes that can be built with those letters. This is case sensitive, for example "Aa" is not considered a palindrome here. Note: Assume the length of given string will not exceed 1,010. Example: Input: "abccccd...
[ 7061, 6, 198, 198, 15056, 257, 4731, 543, 10874, 286, 2793, 7442, 393, 334, 39921, 589, 7475, 11, 1064, 262, 4129, 286, 262, 14069, 6340, 521, 398, 274, 326, 460, 307, 3170, 351, 883, 7475, 13, 198, 198, 1212, 318, 1339, 8564, 11, ...
3.276923
130
# Generated by Django 3.0 on 2020-05-22 16:58 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 319, 12131, 12, 2713, 12, 1828, 1467, 25, 3365, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.966667
30
try: import mysql.connector as mysql except : import MySQLdb as mysql
[ 28311, 25, 198, 220, 220, 220, 1330, 48761, 13, 8443, 273, 355, 48761, 198, 16341, 1058, 198, 220, 220, 220, 1330, 33476, 9945, 220, 355, 48761, 198 ]
2.925926
27
from pycode.tinyflow import autodiff as ad import numpy as np from pycode.tinyflow import ndarray from pycode.tinyflow import TrainExecute from pycode.tinyflow import train # executor = ad.Executor([y]) # res = executor.run(feed_dict={X: x_val,b: b_val,W: W_val}) # print('y_true'+str(y_val)) # ...
[ 6738, 12972, 8189, 13, 44152, 11125, 1330, 1960, 375, 733, 355, 512, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 12972, 8189, 13, 44152, 11125, 1330, 299, 67, 18747, 198, 198, 6738, 12972, 8189, 13, 44152, 11125, 1330, 16835, 23002, ...
2.317568
444
# Metadata module to save metadata as dictionary, save trial metadata as yaml and export metadata as csv import yaml import datetime import pandas as pd from pathlib import Path def export(): """ This function exports the metadata.yaml file to a standard metadata.csv and cleans the metadata.yaml history a...
[ 2, 3395, 14706, 8265, 284, 3613, 20150, 355, 22155, 11, 3613, 4473, 20150, 355, 331, 43695, 290, 10784, 20150, 355, 269, 21370, 198, 198, 11748, 331, 43695, 198, 11748, 4818, 8079, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 3108, ...
2.859327
327
from __future__ import absolute_import from __future__ import division from __future__ import print_function from utils.base_solver import BaseSolver import os, logging, importlib, re, copy, random, tqdm, argparse import os.path as osp import cPickle as pickle from pprint import pprint from datetime import datetime ...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 628, 198, 6738, 3384, 4487, 13, 8692, 62, 82, 14375, 1330, 7308, 50, 14375, 198, 198, 11748, ...
3.523207
237
from django.core.management.base import BaseCommand from django.db import transaction from jobya.companies.models import Company from jobya.companies.tests.factories import CompanyFactory
[ 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 198, 6738, 42625, 14208, 13, 9945, 1330, 8611, 198, 198, 6738, 1693, 3972, 13, 34390, 444, 13, 27530, 1330, 5834, 198, 6738, 1693, 3972, 13, 34390, 444, 13, 41989, ...
3.958333
48
# # BugZilla query page scanner to work with ancient # Debian Stable bugzilla installationss # # This includes three test sites # site contains one bug entry # all_bugs contains all Openmoko bugs as of \today # no_bug is a query which showed no bug # from HTMLParser import HTMLParser # bugs_openmoko = """<!-- ...
[ 2, 198, 2, 15217, 57, 5049, 12405, 2443, 27474, 284, 670, 351, 6156, 198, 2, 26062, 520, 540, 5434, 16496, 26162, 82, 198, 2, 198, 2, 770, 3407, 1115, 1332, 5043, 198, 2, 220, 220, 2524, 4909, 530, 5434, 5726, 198, 2, 220, 220, ...
1.785903
77,348
import ast import datetime import cv2 import psutil from utils import *
[ 11748, 6468, 198, 11748, 4818, 8079, 198, 198, 11748, 269, 85, 17, 198, 11748, 26692, 22602, 198, 198, 6738, 3384, 4487, 1330, 1635, 628, 198 ]
3.04
25
import copy import random import numpy as np from sklearn.svm import SVC
[ 11748, 4866, 198, 11748, 4738, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 35720, 13, 82, 14761, 1330, 311, 15922, 198 ]
3.318182
22
from django.test import TestCase, Client from django.urls import reverse
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 11, 20985, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575 ]
3.789474
19
from django import forms from incidences.models import Incidence
[ 6738, 42625, 14208, 1330, 5107, 198, 198, 6738, 753, 44845, 13, 27530, 1330, 3457, 1704, 628 ]
4.1875
16
import cv2 as cv import numpy as np from urllib.request import urlopen import os import datetime import time import sys #change to your ESP32-CAM ip url="http://192.168.31.184:81/stream" CAMERA_BUFFRER_SIZE=4096 stream=urlopen(url) bts=b'' while True: try: while True: bts+=stream.read(CAMERA_BU...
[ 11748, 269, 85, 17, 355, 269, 85, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 2956, 297, 571, 13, 25927, 1330, 19016, 9654, 198, 11748, 28686, 198, 11748, 4818, 8079, 198, 11748, 640, 198, 11748, 25064, 198, 198, 2, 3803, 284, 534,...
1.629247
1,354
# -*- coding: utf-8 -*- import scrapy from scrapy import Request
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 15881, 88, 198, 6738, 15881, 88, 1330, 19390, 198 ]
2.708333
24
from fastapi import FastAPI from vc import vc import json from fastapi.openapi.utils import get_openapi from fastapi.openapi.docs import ( get_redoc_html, get_swagger_ui_html, get_swagger_ui_oauth2_redirect_html, ) with open('config.json') as jf: d = json.load(jf) vh = d['vertica']['host'] vpo ...
[ 6738, 3049, 15042, 1330, 12549, 17614, 198, 6738, 410, 66, 1330, 410, 66, 198, 11748, 33918, 198, 6738, 3049, 15042, 13, 9654, 15042, 13, 26791, 1330, 651, 62, 9654, 15042, 198, 6738, 3049, 15042, 13, 9654, 15042, 13, 31628, 1330, 357, ...
2.360976
615
main()
[ 12417, 3419, 220, 201 ]
2
4
# coding: utf-8 from __future__ import division, print_function, unicode_literals from abc import ABCMeta def is_digit(value): try: float(value) return True except (ValueError, TypeError): return False
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 6738, 11593, 37443, 834, 1330, 7297, 11, 3601, 62, 8818, 11, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 450, 66, 1330, 9738, 48526, 628, 628, 198, 4299, 318, 62, 27003, 7, 8367, 2599, 19...
2.553191
94
from sqlalchemy import Column, Integer, String, Boolean from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import relationship, sessionmaker from sqlalchemy import create_engine Base = declarative_base() site1= Knowledge(IDnumber=1,name="sport",topic="swimming",rating=8) # print(site1.__repr_...
[ 6738, 44161, 282, 26599, 1330, 29201, 11, 34142, 11, 10903, 11, 41146, 198, 6738, 44161, 282, 26599, 13, 2302, 13, 32446, 283, 876, 1330, 2377, 283, 876, 62, 8692, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 2776, 11, 6246, 10297, 19...
3.27
100
from serial_j import SerialJ valid_data = StrIPv4Data({'prop1': '172.16.255.1'}) print(valid_data) # >>> {"prop1": "172.16.255.1"} invalid_data = StrIPv4Data({'prop1': '172.16.256.1'}) # >>> ValueError: Property: 'prop1' with Value: '172.16.256.1' does not confirm with Type: (<class 'str'>, 'ipv4').
[ 6738, 11389, 62, 73, 1330, 23283, 41, 628, 198, 198, 12102, 62, 7890, 796, 4285, 4061, 85, 19, 6601, 15090, 6, 22930, 16, 10354, 705, 23628, 13, 1433, 13, 13381, 13, 16, 6, 30072, 198, 4798, 7, 12102, 62, 7890, 8, 198, 2, 13163, ...
2.420635
126
from __future__ import print_function import pickle import os.path import sys import hashlib from googleapiclient.discovery import build from google_auth_oauthlib.flow import InstalledAppFlow from google.auth.transport.requests import Request from apiclient import errors from googleapiclient.http import MediaIoBaseDown...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 2298, 293, 198, 11748, 28686, 13, 6978, 198, 11748, 25064, 198, 11748, 12234, 8019, 198, 6738, 23645, 499, 291, 75, 1153, 13, 67, 40821, 1330, 1382, 198, 6738, 23645, 62, 18439,...
2.473538
359
# -*- coding: utf-8 -*- # # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 12131, 3012, 11419, 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...
2.440458
62,208
import logging import asyncio from concurrent.futures import CancelledError from discord.ext import commands from utils import Config, permission_node log = logging.getLogger('charfred') formats = { 'MSG': '[**{}**] {}: {}', 'STF': '**{}**: {}', 'DTH': '[**{}**] {} {}', 'ME': '[**{}**] {}: {}', 'S...
[ 11748, 18931, 198, 11748, 30351, 952, 198, 6738, 24580, 13, 69, 315, 942, 1330, 43780, 3353, 12331, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 6738, 3384, 4487, 1330, 17056, 11, 7170, 62, 17440, 198, 198, 6404, 796, 18931, 13, 1136, ...
2.37013
154
# This file has all the functions required to load the information of a city. # - Definition of the class Station # - Definition of the class CityInfo # - Read functions from files # - Structure of the information # __authors__='TO_BE_FILLED' __group__='DL01' # __________________________________________________________...
[ 2, 770, 2393, 468, 477, 262, 5499, 2672, 284, 3440, 262, 1321, 286, 257, 1748, 13, 198, 2, 532, 30396, 286, 262, 1398, 9327, 198, 2, 532, 30396, 286, 262, 1398, 2254, 12360, 198, 2, 532, 4149, 5499, 422, 3696, 198, 2, 532, 32522, ...
2.532609
920
import json import sys import os from tqdm import tqdm from mdf_refinery.validator import Validator from mdf_refinery.parsers.tab_parser import parse_tab # VERSION 0.3.0 # This is the converter for the GW100 dataset. # Arguments: # input_path (string): The file or directory where the data resides. # NOTE: D...
[ 11748, 33918, 198, 11748, 25064, 198, 11748, 28686, 198, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 198, 6738, 285, 7568, 62, 5420, 15451, 13, 12102, 1352, 1330, 48951, 1352, 198, 6738, 285, 7568, 62, 5420, 15451, 13, 79, 9...
3.554054
222
from abstract_keyboard import KeyData, AbstractKeyboard, Colours from physical_keyboard import PhysicalKeyboard
[ 6738, 12531, 62, 2539, 3526, 1330, 7383, 6601, 11, 27741, 9218, 3526, 11, 1623, 4662, 198, 6738, 3518, 62, 2539, 3526, 1330, 16331, 9218, 3526, 198 ]
4.307692
26
import os import uuid import json import yaml import re from nltk.tokenize import RegexpTokenizer import requests from fastapi import FastAPI, HTTPException from fastapi.middleware.cors import CORSMiddleware from get_root_access_token_for_sp import get_token from pydantic import BaseModel from vkaudiotoken import (...
[ 11748, 28686, 198, 11748, 334, 27112, 198, 11748, 33918, 198, 198, 11748, 331, 43695, 198, 11748, 302, 198, 6738, 299, 2528, 74, 13, 30001, 1096, 1330, 797, 25636, 79, 30642, 7509, 198, 198, 11748, 7007, 198, 6738, 3049, 15042, 1330, 12...
2.217
2,447
import math # TODO: Implement acceptibility tests if __name__ == "__main__": import copy params_inner = Appendix13_7_cParams( internal_pressure=100, corner_radius=3, short_side_half_length=5, long_side_half_length=10, thickness=1 ) calc_inner = Appendix13_7_c...
[ 11748, 10688, 198, 198, 2, 220, 16926, 46, 25, 48282, 2453, 2247, 5254, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1330, 4866, 198, 220, 220, 220, 42287, 62, 5083, 796, 30378, 1485, 62, 22...
1.920209
1,529
from __future__ import absolute_import, division, print_function import stripe import pytest pytestmark = pytest.mark.asyncio TEST_RESOURCE_ID = "link_123"
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 198, 198, 11748, 39858, 198, 198, 11748, 12972, 9288, 628, 198, 9078, 9288, 4102, 796, 12972, 9288, 13, 4102, 13, 292, 13361, 952, 628, 198, 51, 6465, 62, ...
3.075472
53
import FWCore.ParameterSet.Config as cms l1GtBeamModeFilter = cms.EDFilter("L1GtBeamModeFilter", # input tag for input tag for ConditionInEdm products CondInEdmInputTag = cms.InputTag("conditionsInEdm"), # input tag for the L1 GT EVM product L1GtEvmReadoutRecordTag = cms.InputTag("gtEvmDigis"), ...
[ 11748, 48849, 14055, 13, 36301, 7248, 13, 16934, 355, 269, 907, 198, 198, 75, 16, 38, 83, 3856, 321, 19076, 22417, 796, 269, 907, 13, 1961, 22417, 7203, 43, 16, 38, 83, 3856, 321, 19076, 22417, 1600, 628, 220, 220, 220, 1303, 5128, ...
2.591837
294
import copy # def _in_matrix(pos, seats): # return 0 <= pos[0] < len(seats[0]) and 0 <= pos[1] < len(seats) def _iterate(self, ignore_floor, tolerant): new_seats = copy.deepcopy(self._seats) for y, row in enumerate(self._seats): for x, seat in enumerate(row): nei...
[ 11748, 4866, 628, 198, 198, 2, 825, 4808, 259, 62, 6759, 8609, 7, 1930, 11, 8632, 2599, 198, 2, 220, 220, 220, 1441, 657, 19841, 1426, 58, 15, 60, 1279, 18896, 7, 325, 1381, 58, 15, 12962, 290, 657, 19841, 1426, 58, 16, 60, 1279...
2.016897
651
import os import json from challenge import FileReader, Product, Listing, MatchSearch import challenge reader = FileReader() search = MatchSearch() products = reader.read_products('products.txt'); listings = reader.read_listings('listings.txt'); listings = listings[0:1000] result = search.match_listings(listings, pro...
[ 11748, 28686, 198, 11748, 33918, 198, 6738, 4427, 1330, 9220, 33634, 11, 8721, 11, 7343, 278, 11, 13225, 18243, 198, 11748, 4427, 198, 198, 46862, 796, 9220, 33634, 3419, 198, 12947, 796, 13225, 18243, 3419, 198, 29498, 796, 9173, 13, 9...
2.861789
492
SEX_ID_TO_NAME = { 1: "male", 2: "female", 3: "both", } SEX_NAME_TO_ID = {v: k for (k, v) in SEX_ID_TO_NAME.items()}
[ 5188, 55, 62, 2389, 62, 10468, 62, 20608, 796, 1391, 198, 220, 220, 220, 352, 25, 366, 22606, 1600, 198, 220, 220, 220, 362, 25, 366, 24724, 1600, 198, 220, 220, 220, 513, 25, 366, 16885, 1600, 198, 92, 198, 198, 5188, 55, 62, 2...
1.756757
74
import paramiko from django.conf import settings remotepath = settings.SQUID_LOGDIR_REMOTE remotepath_messages = settings.PPTP_LOGDIR_REMOTE username = settings.SQUID_USERNAME password = settings.SQUID_PASSWORD # local path for both log types and programs localpath = settings.SQUID_LOGDIR log_filename = s...
[ 11748, 5772, 12125, 201, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 201, 198, 201, 198, 201, 198, 201, 198, 2787, 313, 538, 776, 796, 6460, 13, 50, 10917, 2389, 62, 25294, 34720, 62, 40726, 23051, 201, 198, 2787, 313, 538, 776, ...
2.22205
644
import sys import datetime # Sample program to be initiated by the Simio Step RunExecutable with "Python" ArgumentLogic. # This runs python scripts with argument convention of: 1st arg is the script name, followed # by arguments. All args are surrounded with a double-quote. # The script append-prints the arguments it ...
[ 11748, 25064, 198, 11748, 4818, 8079, 198, 198, 2, 27565, 1430, 284, 307, 16862, 416, 262, 3184, 952, 5012, 5660, 23002, 18187, 351, 366, 37906, 1, 45751, 11187, 291, 13, 198, 2, 770, 4539, 21015, 14750, 351, 4578, 9831, 286, 25, 352,...
2.578804
368
# Copyright 2021 Drexel University # Author: Geoffrey Mainland <mainland@drexel.edu> try: from _dragonradio.net import * except: pass
[ 2, 15069, 33448, 360, 21510, 417, 2059, 198, 2, 6434, 25, 42803, 8774, 1044, 1279, 12417, 1044, 31, 67, 21510, 417, 13, 15532, 29, 198, 198, 28311, 25, 198, 220, 422, 4808, 14844, 37004, 13, 3262, 1330, 1635, 198, 16341, 25, 198, 22...
3.088889
45
import logging from contextlib import suppress from math import fabs from aiogram.dispatcher import FSMContext from aiogram.types import CallbackQuery, Message, ReplyKeyboardRemove from aiogram.utils.exceptions import (MessageToDeleteNotFound, MessageToEditNotFound) from app.__ma...
[ 11748, 18931, 198, 6738, 4732, 8019, 1330, 18175, 198, 6738, 10688, 1330, 7843, 82, 198, 198, 6738, 257, 72, 21857, 13, 6381, 8071, 2044, 1330, 376, 12310, 21947, 198, 6738, 257, 72, 21857, 13, 19199, 1330, 4889, 1891, 20746, 11, 16000,...
2.542308
260
'''from pygame import mixer mixer.init() mixer.music.load('ex021.mp3') mixer.music.play() input('Agora d para escutar')''' # Pode ser feito assim tambm: import playsound playsound.playsound('ex021.mp3')
[ 7061, 6, 6738, 12972, 6057, 1330, 33938, 198, 19816, 263, 13, 15003, 3419, 198, 19816, 263, 13, 28965, 13, 2220, 10786, 1069, 46821, 13, 3149, 18, 11537, 198, 19816, 263, 13, 28965, 13, 1759, 3419, 198, 15414, 10786, 10262, 5799, 288, ...
2.55
80
""" project.conf Configuration module holding all the options """ DEBUG = True import os BASE_DIR = os.path.abspath(os.path.dirname(__file__)) MONGO_DBNAME = os.environ.get("MONGOHQ_URL") or "mongodb://localhost:27017/shakuni" THREADS_PER_PAGE = 2 CSRF_ENABLED = True CSRF_SESSION_KEY = "secret" SECRET_KEY = "sec...
[ 37811, 198, 16302, 13, 10414, 198, 198, 38149, 8265, 4769, 477, 262, 3689, 198, 37811, 198, 198, 30531, 796, 6407, 198, 198, 11748, 28686, 198, 33, 11159, 62, 34720, 796, 28686, 13, 6978, 13, 397, 2777, 776, 7, 418, 13, 6978, 13, 15...
2.321192
302
# -*- coding: utf-8 -*- __about__ = """ This project comes with the bare minimum set of applications and templates to get you started. It includes no extra tabs, only the profile and notices tabs are included by default. From here you can add any extra functionality and applications that you would like. """
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 834, 10755, 834, 796, 37227, 198, 1212, 1628, 2058, 351, 262, 6247, 5288, 900, 286, 5479, 290, 24019, 198, 1462, 651, 345, 2067, 13, 632, 3407, 645, 3131, 22524, ...
4.025974
77
# -*- coding: utf-8 -*- from base import BaseHandler, LanguageHandler, NullHandler from text import SingleSentenceHandler __all__ = [ "LanguageHandler", "NullHandler", "SingleSentenceHandler", ]
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 2779, 1330, 7308, 25060, 11, 15417, 25060, 11, 35886, 25060, 198, 6738, 2420, 1330, 14206, 31837, 594, 25060, 198, 198, 834, 439, 834, 796, 685, 198, 220, 220...
2.985714
70
import os import sys import numpy as np import pandas as pd import logging import gc import tqdm import pickle import json import time import tempfile from gensim.models import Word2Vec cwd = os.getcwd() embed_path = os.path.join(cwd, 'embed_artifact') # Training corpus for w2v model corpus_dic = { 'creative': os.p...
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 299, 32152, 355, 45941, 220, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 18931, 198, 11748, 308, 66, 198, 11748, 256, 80, 36020, 198, 11748, 2298, 293, 198, 11748, 33918, 198, 11748, 64...
2.566929
1,143
import os import gc import glob import time import random import imageio import logging from functools import wraps import cv2 import numpy as np import matplotlib.pyplot as plt import torch import torchvision.utils as torch_utils from postprocess import SegDetectorRepresenter # device = torch.device("cuda" if torch...
[ 11748, 28686, 198, 11748, 308, 66, 198, 11748, 15095, 198, 11748, 640, 198, 11748, 4738, 198, 11748, 2939, 952, 198, 11748, 18931, 198, 6738, 1257, 310, 10141, 1330, 27521, 198, 198, 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 4594...
2.520089
448
# -*- coding: utf-8 -*- from random import random from datetime import timedelta from django.conf import settings from django.utils import timezone from django.views.generic import TemplateView from uncharted.chart import * area100PercentStacked = Area100PercentStacked.as_view() areaStacked = AreaStacked.as_view...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 4738, 1330, 4738, 198, 6738, 4818, 8079, 1330, 28805, 12514, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 26791, 1330, 640,...
3.005602
357
from dotenv import load_dotenv import os import discord from generator import ( GeneratorProcess, GenerateRequest, StopRequest, ResponseType, ) from multiprocessing import Pipe import util import asyncio load_dotenv() ALLOWED_CHANNELS = {"secret-channel-name", "beyond-ideas"} TEST_SERVER_ID = 74822840...
[ 6738, 16605, 24330, 1330, 3440, 62, 26518, 24330, 198, 11748, 28686, 198, 11748, 36446, 198, 6738, 17301, 1330, 357, 198, 220, 220, 220, 35986, 18709, 11, 198, 220, 220, 220, 2980, 378, 18453, 11, 198, 220, 220, 220, 13707, 18453, 11, ...
2.642336
274
''' This module contains a medley of sklearn transformers which can be integrated into a pipeline. ''' import numpy as np from sklearn.base import BaseEstimator, TransformerMixin from sklearn.decomposition import PCA from scipy.stats import kstat from homcv import betti_numbers
[ 7061, 6, 198, 1212, 8265, 4909, 257, 1117, 1636, 286, 1341, 35720, 6121, 364, 543, 460, 307, 11521, 198, 20424, 257, 11523, 13, 198, 7061, 6, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 35720, 13, 8692, 1330, 7308, 22362...
3.433735
83
# -*- coding: utf-8 -*- import time import numpy from krypy.linsys import LinearSystem, Cg from krypy.deflation import DeflatedCg, DeflatedGmres, Ritz from krypy.utils import Arnoldi, ritz, BoundCG from krypy.recycling import RecyclingCg from krypy.recycling.factories import RitzFactory,RitzFactorySimple from k...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 11748, 640, 201, 198, 11748, 299, 32152, 201, 198, 6738, 479, 563, 9078, 13, 21602, 893, 1330, 44800, 11964, 11, 327, 70, 201, 198, 6738, 479, 563, 9078, 13, 4299...
2.162573
855
#!/usr/bin/env python #need to point to classes inorder to import import rospy from blackboard.Robot import Robot from blackboard.RosCommunication import Talker from rosnode import rosnode_ping from blackboard.Blackboard import Blackboard from blackboard.Battery import Battery bat = Battery(100,500,100) talker = Talk...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 31227, 284, 966, 284, 6097, 287, 2875, 284, 1330, 198, 11748, 686, 2777, 88, 198, 6738, 2042, 3526, 13, 14350, 313, 1330, 16071, 198, 6738, 2042, 3526, 13, 35740, 30813, 3299, 1330,...
2.957447
141
from __future__ import unicode_literals import frappe from datetime import datetime, date from club_crm.club_crm.utils.sms_notification import send_sms from club_crm.club_crm.utils.push_notification import send_push from frappe.utils import getdate, get_time, flt from frappe.utils import escape_html from frappe import ...
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 11748, 5306, 27768, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 3128, 198, 6738, 3430, 62, 6098, 76, 13, 18664, 62, 6098, 76, 13, 26791, 13, 82, 907, 62, 1662, 2649, ...
3.188679
106
from keras.models import Sequential from keras.layers import Dense, Activation from keras.layers.pooling import MaxPooling2D from keras.layers.convolutional import Conv2D from keras.initializers import he_normal from keras.initializers import Zeros from keras.activations import relu from keras.layers import Flatten fro...
[ 6738, 41927, 292, 13, 27530, 1330, 24604, 1843, 198, 6738, 41927, 292, 13, 75, 6962, 1330, 360, 1072, 11, 13144, 341, 198, 6738, 41927, 292, 13, 75, 6962, 13, 7742, 278, 1330, 5436, 27201, 278, 17, 35, 198, 6738, 41927, 292, 13, 75,...
2.64723
2,058
from .experiment import Experiment from .experiment1 import Experiment1 from .experiment2 import Experiment21, Experiment22, Experiment23 from .experiment3 import Experiment31, Experiment32, Experiment33, Experiment34, Experiment35, Experiment36
[ 6738, 764, 23100, 3681, 1330, 29544, 198, 6738, 764, 23100, 3681, 16, 1330, 29544, 16, 198, 6738, 764, 23100, 3681, 17, 1330, 29544, 2481, 11, 29544, 1828, 11, 29544, 1954, 198, 6738, 764, 23100, 3681, 18, 1330, 29544, 3132, 11, 29544, ...
4.472727
55
# Generated by Django 2.1.7 on 2019-03-24 05:27 import ckeditor_uploader.fields from django.conf import settings from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 362, 13, 16, 13, 22, 319, 13130, 12, 3070, 12, 1731, 8870, 25, 1983, 198, 198, 11748, 269, 9091, 2072, 62, 25850, 263, 13, 25747, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13,...
3.048387
62
import unittest from app import db from app.models import User
[ 11748, 555, 715, 395, 198, 6738, 598, 1330, 20613, 198, 6738, 598, 13, 27530, 1330, 11787 ]
3.875
16
import http from pathlib import Path from urllib.parse import urlencode from hargreaves.search.models import InvestmentCategoryTypes from hargreaves.session.mocks import MockSessionClient from hargreaves.orders.manual.clients import ManualOrderClient from hargreaves.orders.manual.models import ManualOrder, ManualOrder...
[ 11748, 2638, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 2956, 11925, 8189, 198, 198, 6738, 289, 853, 260, 3080, 13, 12947, 13, 27530, 1330, 20877, 27313, 31431, 198, 6738, 289, 853, 260, 3080, 13, ...
3.51269
197
#!/usr/bin/env python """Creates JADE configuration for stage 1 of pydss_simulation pipeline.""" import logging import sys import click from jade.common import CONFIG_FILE from jade.loggers import setup_logging from jade.utils.utils import load_data from PyDSS.reports.pv_reports import PF1_SCENARIO, CONTROL_MODE_SC...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 16719, 274, 449, 19266, 8398, 329, 3800, 352, 286, 279, 5173, 824, 62, 14323, 1741, 11523, 526, 15931, 198, 198, 11748, 18931, 198, 11748, 25064, 198, 198, 11748, 3904, 198, ...
2.378968
2,016
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: set fileencoding=utf-8 : # # Author: Makoto Shimazu <makoto.shimaz@gmail.com> # URL: https://github.com/Pizaid # License: 2-Clause BSD License # Created: 2014-08-09 # import sys sys.path.append('gen-py') from Pizaid import ControllerService from Pizaid.tty...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 43907, 25, 900, 2393, 12685, 7656, 28, 40477, 12, 23, 1058, 198, 2, 198, 2, 6434, 25, 220, 220, 40627, 31698, 10...
2.704595
457
from auxilliary_functions import * def read_file(filename): """ Reads in a file as utf-8. :param filename: Filepath to the file to be read. """ with open(filename, 'r',encoding='utf-8') as file: return file.read() def moralize(input_text, output_format='pydict'): """ Takes input t...
[ 6738, 27506, 359, 8042, 62, 12543, 2733, 1330, 1635, 628, 198, 4299, 1100, 62, 7753, 7, 34345, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 4149, 82, 287, 257, 2393, 355, 3384, 69, 12, 23, 13, 198, 220, 220, 220, 1058, 171...
2.920354
226
import os import json from pprint import pprint if __name__ == '__main__': convert('/Users/cassiomelo/Downloads/formalcontext.json', '/Users/cassiomelo/Downloads/formalcontext.cxt')
[ 11748, 28686, 198, 11748, 33918, 198, 6738, 279, 4798, 1330, 279, 4798, 198, 220, 220, 220, 220, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 10385, 10786, 14, 14490, 14, 66, 562, 29005, 22126, 14...
2.753623
69
#!/usr/bin/python import os import sys import sklearn from sklearn.naive_bayes import GaussianNB from sklearn.externals import joblib import argparse import numpy as np import fileUtils import tools if __name__ == "__main__": opts = parseOpts(sys.argv) main(opts)
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 1341, 35720, 198, 6738, 1341, 35720, 13, 2616, 425, 62, 24406, 274, 1330, 12822, 31562, 32819, 198, 6738, 1341, 35720, 13, 1069, 759, 874, 1330...
2.721154
104