content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from typing import Type, TypeVar, MutableMapping, Any, Iterable import copy from datapipelines import DataSource, DataSink, PipelineContext, Query, NotFoundError, validate_query from cassiopeia.data import Platform, Region from cassiopeia.dto.champion import ChampionRotationDto from cassiopeia.datastores.uniquekeys i...
[ 6738, 19720, 1330, 5994, 11, 5994, 19852, 11, 13859, 540, 44, 5912, 11, 4377, 11, 40806, 540, 198, 11748, 4866, 198, 198, 6738, 4818, 499, 541, 20655, 1330, 6060, 7416, 11, 6060, 50, 676, 11, 37709, 21947, 11, 43301, 11, 1892, 21077, ...
3.462185
119
from __future__ import division """ This is the loadable seq2seq trainer library that is in charge of training details, loss compute, and statistics. See train.py for a use case of this library. Note!!! To make this a general library, we implement *only* mechanism things here(i.e. what to do), and leave the strategy t...
[ 6738, 11593, 37443, 834, 1330, 7297, 198, 37811, 198, 1212, 318, 262, 3440, 540, 33756, 17, 41068, 21997, 5888, 326, 318, 198, 259, 3877, 286, 3047, 3307, 11, 2994, 24061, 11, 290, 7869, 13, 198, 6214, 4512, 13, 9078, 329, 257, 779, ...
1.952589
4,113
from PyQt5.QtWidgets import QApplication, QMainWindow, QFileDialog, QMessageBox from PyQt5.QtCore import pyqtSignal, QDateTime, QThread from PyQt5.QtGui import QPixmap, QIcon import sys import codecs from PIL import Image import threading import shutil import inspect import ctypes from datetime import datetime from...
[ 6738, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 1330, 1195, 23416, 11, 1195, 13383, 27703, 11, 1195, 8979, 44204, 11, 1195, 12837, 14253, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 14055, 1330, 12972, 39568, 11712, 282, 11, 1195, ...
2.841791
335
import numpy as np from sklearn.kernel_ridge import KernelRidge from sklearn.model_selection import GridSearchCV from sklearn.gaussian_process import GaussianProcessRegressor import sklearn.gaussian_process.kernels as Kernels from scipy.optimize import minimize from numpy.linalg import norm import tensorflow as tf fr...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 1341, 35720, 13, 33885, 62, 12818, 1330, 32169, 49, 3130, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 24846, 18243, 33538, 198, 6738, 1341, 35720, 13, 4908, 31562, 62, 14681, 1330, 12822, ...
3.555556
108
import trollius as asyncio from trollius import From, Return from collections import deque __all__ = ( 'Cursor', 'DictCursor', 'SetCursor', 'ZCursor', ) class Cursor(object): """ Cursor for walking through the results of a :func:`scan <trollius_redis.RedisProtocol.scan>` query. """ ...
[ 11748, 13278, 3754, 355, 30351, 952, 198, 6738, 13278, 3754, 1330, 3574, 11, 8229, 198, 6738, 17268, 1330, 390, 4188, 198, 198, 834, 439, 834, 796, 357, 198, 220, 220, 220, 705, 34, 21471, 3256, 198, 220, 220, 220, 705, 35, 713, 34,...
2.163453
1,193
import logging import subprocess import wave logger = logging.getLogger('player') def sample_width_to_string(sample_width): """Convert sample width (bytes) to ALSA format string.""" return {1: 's8', 2: 's16', 4: 's32'}.get(sample_width, None) class WavePlayer(object): """Plays short audio clips from a bu...
[ 11748, 18931, 198, 11748, 850, 14681, 198, 11748, 6769, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 10786, 7829, 11537, 198, 198, 4299, 6291, 62, 10394, 62, 1462, 62, 8841, 7, 39873, 62, 10394, 2599, 198, 220, 220, 220, 3...
2.19421
829
import portmappings import unittest import json
[ 11748, 2493, 76, 39242, 198, 11748, 555, 715, 395, 198, 11748, 33918 ]
3.916667
12
# Solution of; # Project Euler Problem 533: Minimum values of the Carmichael function # https://projecteuler.net/problem=533 # # The Carmichael function λ(n) is defined as the smallest positive integer m # such that am = 1 modulo n for all integers a coprime with n. For example # λ(8) = 2 and λ(240) = 4. Define L(n)...
[ 2, 28186, 286, 26, 198, 2, 4935, 412, 18173, 20647, 642, 2091, 25, 26265, 3815, 286, 262, 17998, 40302, 2163, 198, 2, 3740, 1378, 16302, 68, 18173, 13, 3262, 14, 45573, 28, 44994, 198, 2, 220, 198, 2, 383, 17998, 40302, 2163, 7377, ...
2.74502
251
#required modules import math, factors from functools import reduce from collections import Counter if __name__ == "__main__": main()
[ 2, 35827, 13103, 201, 198, 11748, 10688, 11, 5087, 201, 198, 6738, 1257, 310, 10141, 1330, 4646, 201, 198, 6738, 17268, 1330, 15034, 201, 198, 201, 198, 201, 198, 201, 198, 201, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, ...
3.0625
48
""" Este archivo nada mas es para hacer pruebas uniarias joven """ import LibraryTT.Lidar3D as Lidar from time import sleep from numpy import shape scan = Lidar.Scaner3D() a = scan.Scanear(Angulo_Init=50,Angulo_Fin=150,paso=5,plotear=True) print(shape(a)) sleep(2) # a = scan.Scanear(Angulo_Init=130,Angulo_Fin=30,paso=-...
[ 37811, 198, 36, 4169, 3934, 23593, 299, 4763, 12422, 1658, 31215, 289, 11736, 778, 518, 12093, 555, 72, 2743, 292, 2525, 574, 198, 37811, 198, 11748, 10074, 15751, 13, 43, 312, 283, 18, 35, 355, 406, 312, 283, 198, 6738, 640, 1330, ...
2.309278
194
""" Second Y Axis ============= You can use the following technique to give your brokenaxes plot a second axis on the right. Analogous code works for creating a secondary x axis. """ from brokenaxes import brokenaxes functions = (lambda x: x*0.453592, lambda x: x/0.453592) bax = brokenaxes( xlims=((1, 3), (9,...
[ 37811, 198, 12211, 575, 38349, 198, 25609, 28, 198, 198, 1639, 460, 779, 262, 1708, 8173, 284, 1577, 534, 5445, 897, 274, 7110, 257, 1218, 16488, 319, 262, 826, 13, 198, 2025, 11794, 516, 2438, 2499, 329, 4441, 257, 9233, 2124, 16488,...
2.587302
189
# Copyright 2021 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 or agreed to in writing, ...
[ 2, 15069, 33448, 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, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, 733...
3.770732
205
"""All custom exceptions are defined here""" class CustomException(Exception): """General purpose exception""" pass
[ 37811, 3237, 2183, 13269, 389, 5447, 994, 37811, 198, 198, 4871, 8562, 16922, 7, 16922, 2599, 198, 220, 220, 220, 37227, 12218, 4007, 6631, 37811, 198, 220, 220, 220, 1208, 198, 220, 220, 220 ]
3.764706
34
# This Python file uses the following encoding: utf-8 """autogenerated by genpy from main/GeneralSystemStateMsg.msg. Do not edit.""" import codecs import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct _struct_I = genpy.struct_I _struct_6B = None
[ 2, 770, 11361, 2393, 3544, 262, 1708, 21004, 25, 3384, 69, 12, 23, 198, 37811, 2306, 519, 877, 515, 416, 2429, 9078, 422, 1388, 14, 12218, 11964, 9012, 50108, 13, 19662, 13, 2141, 407, 4370, 526, 15931, 198, 11748, 40481, 82, 198, 1...
3.211111
90
from moai.monads.generation.grid.spatial import ( Grid, MultiScaleGrid ) from moai.monads.generation.grid.spherical import Spherical __all__ = [ "Grid", "MultiScaleGrid", "Spherical", ]
[ 6738, 6941, 1872, 13, 2144, 5643, 13, 20158, 13, 25928, 13, 2777, 34961, 1330, 357, 198, 220, 220, 220, 24846, 11, 198, 220, 220, 220, 15237, 29990, 41339, 198, 8, 198, 6738, 6941, 1872, 13, 2144, 5643, 13, 20158, 13, 25928, 13, 277...
2.575
80
import os import sys import logging import traceback import json from logstash_formatter import LogstashFormatterV1 import threading thread_context = threading.local()
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 18931, 198, 11748, 12854, 1891, 198, 11748, 33918, 198, 6738, 2604, 301, 1077, 62, 687, 1436, 1330, 5972, 301, 1077, 8479, 1436, 53, 16, 198, 198, 11748, 4704, 278, 198, 16663, 62, 22866, 796...
3.5625
48
from django.conf.urls import url from .views import NoteList, NoteDetailView urlpatterns = [ url(r'^$', NoteList.as_view(), name='index'), url(r'^note/[-\w]+/(?P<slug>[-\w]+)$', NoteDetailView.as_view(), name="detail"), ]
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 6738, 764, 33571, 1330, 5740, 8053, 11, 5740, 11242, 603, 7680, 628, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 19016, 7, 81, 6, 61, 3, 3256, 5740, 8053, 13, ...
2.391753
97
#!/usr/bin/env python3 import sys from typing import Counter import gitlab from datetime import datetime, timedelta import pandas as pd from psycopg2 import connect from sqlalchemy import create_engine #---------------------------------------------------------------- # use python version 3.8.9 to support gitlab python ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 25064, 198, 6738, 19720, 1330, 15034, 198, 11748, 17606, 23912, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 173...
2.7268
1,153
from setuptools import setup, find_packages setup( name="caldwell-dirtyfields", version=__import__('dirtyfields').get_version().replace(' ', '-'), url='http://github.com/smn/django-dirtyfields', license='BSD', description="Tracking dirty fields on a Django model instance", long_description=op...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 628, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 2625, 66, 1940, 4053, 12, 49075, 25747, 1600, 198, 220, 220, 220, 2196, 28, 834, 11748, 834, 10786, 49075, 25747, 27691, 1136...
2.874286
175
''' @author: l4zyc0d3r People who are happy makes other happy. I am gonna finish it slowly but definitely.cdt ''' # Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None
[ 7061, 6, 198, 31, 9800, 25, 300, 19, 7357, 66, 15, 67, 18, 81, 220, 198, 8061, 508, 389, 3772, 1838, 584, 3772, 13, 314, 716, 8066, 5461, 340, 6364, 475, 4753, 13, 10210, 83, 198, 7061, 6, 198, 2, 30396, 329, 1702, 306, 12, 25...
2.49
100
from rest_framework import serializers from .models import Contract
[ 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 6738, 764, 27530, 1330, 17453, 220 ]
4.857143
14
import numpy as np import pandas as pd import pylab as plt import seaborn as sns from swyft.utils.mutils import filter_marginals_by_dim from swyft.utils.utils import grid_interpolate_samples if __name__ == "__main__": pass
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 279, 2645, 397, 355, 458, 83, 198, 11748, 384, 397, 1211, 355, 3013, 82, 198, 198, 6738, 1509, 88, 701, 13, 26791, 13, 21973, 4487, 1330, 8106, 62, 308...
2.704545
88
from pyo import * class PsychoPan(PyoObject): """ Uses the precedence effect coupled with a BP filter to pan a signal left and right. :Parent: :py:class:`PyoObject` :Args: input: PyoObject Input signal to pan. pan: float or PyoObject, optional Pan value between -1 and 1 inclu...
[ 6738, 279, 8226, 1330, 1635, 198, 198, 4871, 38955, 15730, 7, 47, 8226, 10267, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 36965, 262, 38177, 1245, 18064, 351, 257, 20997, 8106, 284, 3425, 257, 6737, 1364, 290, 826, 13, 628, ...
2.308756
434
''' FILE NAME hello_v2.py 1. WHAT IT DOES Serves a web page by applying a template to the user's web browser. 2. REQUIRES * Any Raspberry Pi 3. ORIGINAL WORK Raspberry Full stack 2015, Peter Dalmaris 4. HARDWARE None 5. SOFTWARE Command line terminal Simple text editor Libraries: from flask import Flask from fl...
[ 7061, 6, 198, 198, 25664, 36751, 198, 31373, 62, 85, 17, 13, 9078, 198, 198, 16, 13, 25003, 7283, 38359, 198, 50, 11184, 257, 3992, 2443, 416, 11524, 257, 11055, 284, 262, 2836, 338, 3992, 6444, 13, 198, 220, 198, 17, 13, 4526, 10...
2.787611
226
with open("accent_and_phoneme.csv") as f: labels = f.read().split("\n") phonemes = [] accents = [] is_accent = False for label in labels: if is_accent: label = label.replace(", ", ",").replace(" ", " ").replace(" ", " ") accents.append(label) else: phonemes.append(label) is...
[ 4480, 1280, 7203, 330, 1087, 62, 392, 62, 746, 261, 34755, 13, 40664, 4943, 355, 277, 25, 198, 220, 220, 220, 14722, 796, 277, 13, 961, 22446, 35312, 7203, 59, 77, 4943, 198, 198, 746, 261, 368, 274, 796, 17635, 198, 4134, 658, 79...
2.196429
224
import numpy as np import pandas as pd import matplotlib.pyplot as plt import time import datetime from seir.wrapper import MultiPopWrapper from seir.utils import plot_solution # read calibration data actual_hospitalisations = pd.read_excel('data/calibration.xlsx', sheet_name='Hospitalisations') actual_hospitalisa...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 11748, 640, 198, 198, 11748, 4818, 8079, 198, 198, 6738, 384, 343, 13, 48553, 1330, 15237, 16...
1.89589
8,030
# -*- coding: utf-8 -*- # This code is under the GNU Affero General Public License # http://www.gnu.org/licenses/agpl-3.0.html """ Course admin related pages """ import os from datetime import datetime import _strptime # import should prevent thread import blocking issues # ask Google about: A...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 770, 2438, 318, 739, 262, 22961, 6708, 3529, 3611, 5094, 13789, 198, 2, 2638, 1378, 2503, 13, 41791, 13, 2398, 14, 677, 4541, 14, 363, 489, 12, 18, 13, 15, ...
2.238066
14,622
# -*- encoding: utf-8 -*- from __future__ import unicode_literals from django.utils.translation import ugettext_lazy as _ from django.conf import settings from decimal import Decimal import json
[ 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 334, 1136, 5239, 62, 75, 12582, 355, 4808, 198, 6738, 42...
3.283333
60
# Copyright 2020 Rastko Sknepnek, University of Dundee, r.skepnek@dundee.ac.uk # # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated # documentation files (the "Software"), to deal in the Software without restriction, including without limitation # the rights ...
[ 2, 15069, 12131, 371, 459, 7204, 3661, 77, 538, 710, 74, 11, 2059, 286, 37921, 1453, 11, 374, 13, 82, 365, 79, 710, 74, 31, 646, 358, 1453, 13, 330, 13, 2724, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, ...
2.486833
1,405
import os import re import subprocess from sys import platform from processors import get_processor
[ 11748, 28686, 198, 11748, 302, 198, 11748, 850, 14681, 198, 6738, 25064, 1330, 3859, 198, 6738, 20399, 1330, 651, 62, 41341, 628, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 628, 198 ]
3
40
from urllib3 import * disable_warnings() http = PoolManager() url = 'http://localhost:5000' while True: filename = input('请输入需要上传文件的名字(必须在当前目录):') if not filename: break with open(filename, 'rb') as f: filedata = f.read() response = http.request('POST', url, fields={'file':(filename, f...
[ 6738, 2956, 297, 571, 18, 1330, 1635, 198, 198, 40223, 62, 40539, 654, 3419, 198, 4023, 796, 19850, 13511, 3419, 198, 6371, 796, 705, 4023, 1378, 36750, 25, 27641, 6, 198, 4514, 6407, 25, 198, 220, 220, 220, 29472, 796, 5128, 10786, ...
2.113636
176
import shapely import geojson import warnings from shapely.strtree import STRtree from typing import Union, List, Dict, Tuple from pathlib import Path from tqdm import tqdm from .tile import GSONTile from .base_merger import BaseGSONMerger
[ 11748, 5485, 306, 198, 11748, 4903, 13210, 1559, 198, 11748, 14601, 198, 198, 6738, 5485, 306, 13, 2536, 21048, 1330, 19269, 21048, 198, 6738, 19720, 1330, 4479, 11, 7343, 11, 360, 713, 11, 309, 29291, 198, 6738, 3108, 8019, 1330, 10644...
3.315068
73
"""ANSI color support for MILC. """ import sys import re import logging import colorama from .emoji import EMOJI_LOGLEVELS UNICODE_SUPPORT = sys.stdout.encoding.lower().startswith('utf') # Regex was gratefully borrowed from kfir on stackoverflow: # https://stackoverflow.com/a/45448194 ansi_regex = r'\x1b(' \ ...
[ 37811, 1565, 11584, 3124, 1104, 329, 31515, 34, 13, 198, 37811, 198, 11748, 25064, 198, 11748, 302, 198, 11748, 18931, 198, 11748, 3124, 1689, 198, 198, 6738, 764, 368, 31370, 1330, 412, 11770, 41, 40, 62, 25294, 2538, 18697, 50, 198, ...
2.172761
1,094
""" API calls for flowcharts """ from seamm_datastore.database.models import Flowchart from seamm_datastore.database.schema import FlowchartSchema from flask import Response from flask_jwt_extended import jwt_required from seamm_dashboard import authorize import json __all__ = ["get_flowcharts", "get_flowchart", "g...
[ 37811, 198, 17614, 3848, 329, 5202, 354, 5889, 198, 37811, 198, 198, 6738, 384, 6475, 62, 19608, 459, 382, 13, 48806, 13, 27530, 1330, 27782, 40926, 198, 6738, 384, 6475, 62, 19608, 459, 382, 13, 48806, 13, 15952, 2611, 1330, 27782, 4...
2.196314
1,248
"""""" import sys import time import matplotlib.pyplot as plt import matplotlib as mpl import numpy as np import os import pandas as pd from calc_execwise_features import calc_simulation_metrics as load_and_calc_simulation_metrics # Borrowed function from nodewise_features_metapop import calc_node_metric, load_and_p...
[ 15931, 15931, 15931, 198, 11748, 25064, 198, 11748, 640, 198, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 2603, 29487, 8019, 355, 285, 489, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, ...
2.591061
3,580
# -------------------------------------------------------------------------------------- # This script is used to collect the protein and code sequence data # -------------------------------------------------------------------------------------- import os ##for directory import sys def changeComputer(computer_name): ...
[ 2, 16529, 19351, 438, 198, 2, 770, 4226, 318, 973, 284, 2824, 262, 7532, 290, 2438, 8379, 1366, 198, 2, 16529, 19351, 438, 198, 11748, 28686, 220, 22492, 1640, 8619, 198, 11748, 25064, 198, 198, 4299, 1487, 34556, 7, 33215, 62, 3672, ...
2.392125
1,219
ADS_ATTR_CLEAR = 1 ADS_ATTR_UPDATE = 2 ADS_ATTR_APPEND = 3 ADS_ATTR_DELETE = 4 ADS_EXT_MINEXTDISPID = 1 ADS_EXT_MAXEXTDISPID = 16777215 ADS_EXT_INITCREDENTIALS = 1 ADS_EXT_INITIALIZE_COMPLETE = 2 ADS_SEARCHPREF_ASYNCHRONOUS = 0 ADS_SEARCHPREF_DEREF_ALIASES = 1 ADS_SEARCHPREF_SIZE_LIMIT = 2 ADS_SEARCHPREF_TIME_LIMIT = ...
[ 47149, 62, 1404, 5446, 62, 29931, 1503, 796, 352, 198, 47149, 62, 1404, 5446, 62, 16977, 796, 362, 198, 47149, 62, 1404, 5446, 62, 24805, 10619, 796, 513, 198, 47149, 62, 1404, 5446, 62, 7206, 2538, 9328, 796, 604, 198, 47149, 62, 1...
2.041972
6,004
# -*- coding: utf-8 -*- """ @version: python2.7 @author: luofuli @time: 2018/8/6 20:56 """ import argparse from common_options import *
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 220, 220, 198, 37811, 220, 220, 198, 2488, 9641, 25, 21015, 17, 13, 22, 220, 198, 2488, 9800, 25, 300, 20895, 913, 72, 220, 198, 2488, 2435, 25, 2864, 14, 23, 14, 21, 1...
2.292308
65
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __a...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 17202, 39410, 25, 428, 2393, 373, 7560, 416, 262, 21624, 12994, 26144, 35986, 13, 17202, 198, 2, 17202, 2141, 407, 4370, 416, 1021, 4556, 345, 821, 1728, 345, 760, 644, 345, 389, 1804, 0, 17202, ...
3.645161
93
#!/usr/bin/env python # Copyright 2017 Authors of Cilium # # 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 o...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 15069, 2177, 46665, 286, 327, 346, 1505, 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, 23...
2.154995
1,942
from django.contrib.auth import get_user_model from complaints.models import Complaint from django.http import JsonResponse from django.shortcuts import render from django.views.generic import View import datetime from calendar import monthrange from rest_framework.views import APIView from rest_framework.response imp...
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 198, 6738, 9687, 13, 27530, 1330, 20011, 2913, 198, 6738, 42625, 14208, 13, 4023, 1330, 449, 1559, 31077, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 854...
3.72381
105
# flatten_a_list # Created by JKChang # 2019-08-05, 14:54 # Tag: # Description: # Nicola likes to categorize all sorts of things. He categorized a series of numbers and as the result of his efforts, # a simple sequence of numbers became a deeply-nested list. Sophia and Stephan don't really understand his organization #...
[ 2, 27172, 268, 62, 64, 62, 4868, 198, 2, 15622, 416, 449, 42, 1925, 648, 198, 2, 13130, 12, 2919, 12, 2713, 11, 1478, 25, 4051, 198, 2, 17467, 25, 198, 2, 12489, 25, 198, 2, 40396, 7832, 284, 17851, 1096, 477, 10524, 286, 1243, ...
2.904321
648
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from nefi2.model.algorithms._alg import * import cv2 import numpy as np __authors__ = {"Sebastian Schattner": "s9sescat@stud.uni-saarland.de"} # Segmentation routines THRESHOLD_FG_COLOR = 255 THRESHOLD_BG_COLOR = 0 # markers for grabcut, watershed denoting sure-fg, sur...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 497, 12463, 17, 13, 19849, 13, 282, 7727, 907, 13557, 14016, 1330, 1635, 198, 11748, 269, 85, 17, 198, 1174...
2.294755
2,955
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.apps import AppConfig
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 201, 198, 201, 198, 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 201, 198, 201, 198 ]
2.560976
41
from .loader import config_for_module # noqa: F401
[ 6738, 764, 29356, 1330, 4566, 62, 1640, 62, 21412, 220, 1303, 645, 20402, 25, 376, 21844, 198 ]
3.058824
17
import re import sys records = [] record = '' with open('input.txt', mode='rt', encoding='utf-8') as f: for line in f: if line.strip(): # If line is not empty line = re.sub(r'\s+', ' ', line) # Normalize whitespace on line record += line # Add line to record else: # If ...
[ 11748, 302, 198, 11748, 25064, 198, 198, 8344, 3669, 796, 17635, 198, 22105, 796, 10148, 198, 198, 4480, 1280, 10786, 15414, 13, 14116, 3256, 4235, 11639, 17034, 3256, 21004, 11639, 40477, 12, 23, 11537, 355, 277, 25, 198, 220, 220, 220...
2.479592
294
import click from peerplays.message import Message from .decorators import onlineChain, unlockWallet from .main import main @main.group() @click.pass_context @message.command() @click.pass_context @onlineChain @unlockWallet @click.option("--account", type=str, help="Account to use") @click.option("--file", type=cli...
[ 11748, 3904, 198, 6738, 12720, 26024, 13, 20500, 1330, 16000, 198, 6738, 764, 12501, 273, 2024, 1330, 2691, 35491, 11, 12116, 47152, 198, 6738, 764, 12417, 1330, 1388, 628, 198, 31, 12417, 13, 8094, 3419, 198, 31, 12976, 13, 6603, 62, ...
2.843434
396
#!/usr/bin/python # coding = utf-8 import sys import parser from tree_class import Tree axioms = [ "A->(B->A)", "(A->B)->(A->B->C)->(A->C)", "A->B->A&B", "A&B->A", "A&B->B", "A->A|B", "B->A|B", "(A->C)->(B->C)->(A|B->C)", "(A->B)->(A->!B)->!A", "!!A->A" ] past_string_set = set...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 19617, 796, 3384, 69, 12, 23, 198, 198, 11748, 25064, 198, 11748, 30751, 198, 6738, 5509, 62, 4871, 1330, 12200, 198, 198, 897, 72, 3150, 796, 685, 198, 220, 220, 220, 366, 32, 3784, 7...
1.921277
470
from flask import session from werkzeug.security import generate_password_hash from . import database USERNAME_MAX_LEN = 15 EMAIL_MAX_LEN = 320 PASSWORD_MAX_LEN = 100 DEFAULT_RATING = 1000 MIN_RATING = 1 MAX_RATING = 3000 PUBLIC_USER_ID = 0 DRAW_USER_ID = 0 USER_SESSION = 'user_id' def get_data_by_id(userid, field...
[ 6738, 42903, 1330, 6246, 198, 6738, 266, 9587, 2736, 1018, 13, 12961, 1330, 7716, 62, 28712, 62, 17831, 198, 198, 6738, 764, 1330, 6831, 628, 198, 29904, 20608, 62, 22921, 62, 43, 1677, 796, 1315, 198, 27630, 4146, 62, 22921, 62, 43, ...
2.627599
1,058
# -*- coding: utf-8 -*- import sys import re import math import copy import numpy as np import time_define as td from time_struct import * import time_func_ext as tf # convert unit to int # convert lunar # render each unit regularization = RegularizationManager()
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 25064, 198, 11748, 302, 198, 11748, 10688, 198, 11748, 4866, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 11748, 640, 62, 13086, 355, 41560, 198, 6738, 640, ...
2.926606
109
########## # Contribution by the Center on Long-Term Risk: # https://github.com/longtermrisk/marltoolbox ########## import numpy as np
[ 7804, 2235, 198, 2, 2345, 3890, 416, 262, 3337, 319, 5882, 12, 40596, 19602, 25, 198, 2, 3740, 1378, 12567, 13, 785, 14, 6511, 4354, 19121, 14, 3876, 2528, 970, 3524, 198, 7804, 2235, 198, 11748, 299, 32152, 355, 45941, 628 ]
3.317073
41
import logging import os from django.core.management.base import BaseCommand, CommandError from pymongo import MongoClient
[ 11748, 18931, 198, 11748, 28686, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 11, 9455, 12331, 198, 6738, 279, 4948, 25162, 1330, 42591, 11792, 628 ]
4.032258
31
# The MIT License (MIT) # # Copyright (c) 2016 Maciej Borzecki # # 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, m...
[ 2, 383, 17168, 13789, 357, 36393, 8, 198, 2, 198, 2, 15069, 357, 66, 8, 1584, 4100, 494, 73, 12182, 2736, 49108, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 2, 28...
3.638418
354
# Standard lib imports import unittest from unittest.mock import patch # Third party imports import rethinkdb as rethink # Project level imports from pywebhooks import DEFAULT_DB_NAME from pywebhooks.utils.rethinkdb_helper import get_connection
[ 2, 8997, 9195, 17944, 198, 11748, 555, 715, 395, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 198, 198, 2, 10467, 2151, 17944, 198, 11748, 36437, 9945, 355, 36437, 198, 198, 2, 4935, 1241, 17944, 198, 6738, 12972, 12384, 25480, ...
3.507042
71
"""Tests for :mod:`zero.routes`."""
[ 37811, 51, 3558, 329, 1058, 4666, 25, 63, 22570, 13, 81, 448, 274, 63, 526, 15931, 198 ]
2.117647
17
""" Convergence Failure of Glasso ============================= Demonstration of cases where graph_lasso fails to converge and quic succeeds. "The graphical lasso: New Insights and alternatives", by Mazumder & Hastie 2012. https://web.stanford.edu/~hastie/Papers/glassoinsights.pdf """ import sys sys.path.append("....
[ 37811, 198, 3103, 332, 12745, 25743, 286, 12158, 78, 198, 4770, 25609, 28, 198, 198, 35477, 12401, 286, 2663, 810, 4823, 62, 75, 28372, 10143, 284, 47873, 290, 627, 291, 31137, 13, 198, 198, 1, 464, 27831, 300, 28372, 25, 968, 7088, ...
2.938875
409
from qt_py_convert.run import run from qt_py_convert.general import highlight_diffs if __name__ == "__main__": import traceback _tests = filter( lambda key: True if key.startswith("test_") else False, globals().keys() ) failed = [] for test in _tests: try: ...
[ 6738, 10662, 83, 62, 9078, 62, 1102, 1851, 13, 5143, 1330, 1057, 198, 6738, 10662, 83, 62, 9078, 62, 1102, 1851, 13, 24622, 1330, 7238, 62, 67, 10203, 628, 628, 628, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298,...
2.115646
441
"""Viewfinder production scripts Cookbook: * Launch new instances: specify NodeType,Name,Zone $ fab create_instance:STAGING,STAGING_003,us-east-1c * Resume installation of failed instance creation (eg: stuck in state 'pending' or not ssh-able): $ fab create_instance:STAGING,STAGING_003,us-east-1c,i-9a0cdbe9 * Sto...
[ 37811, 7680, 22805, 3227, 14750, 198, 198, 28937, 2070, 25, 198, 198, 9, 21225, 649, 10245, 25, 11986, 19081, 6030, 11, 5376, 11, 26961, 198, 220, 720, 7843, 2251, 62, 39098, 25, 2257, 4760, 2751, 11, 2257, 4760, 2751, 62, 11245, 11, ...
2.728633
9,489
#!/usr/bin/env python r""" Use KOMAscript's \addsec command for unnumbered sections. Usage: - Add the class unnumbered to headings. A single hyphen in an attribute context is equivalent. Also see pandoc's manual: https://pandoc.org/MANUAL.html#heading-identifiers """ from jinja2tex import latex_env import panfl...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 81, 37811, 198, 11041, 509, 2662, 32, 12048, 338, 3467, 2860, 2363, 3141, 329, 555, 35565, 9004, 13, 198, 198, 28350, 25, 198, 198, 12, 3060, 262, 1398, 555, 35565, 284, 1182, 654, 1...
2.825581
172
from mindsdb.libs.data_sources.array_to_cols_ds import ArrayToColsDS from mindsdb.libs.data_sources.csv_file_ds import CSVFileDS from mindsdb.libs.data_sources.window_ds import WindowDS
[ 198, 198, 6738, 9017, 9945, 13, 8019, 82, 13, 7890, 62, 82, 2203, 13, 18747, 62, 1462, 62, 4033, 82, 62, 9310, 1330, 15690, 2514, 5216, 82, 5258, 198, 6738, 9017, 9945, 13, 8019, 82, 13, 7890, 62, 82, 2203, 13, 40664, 62, 7753, ...
2.685714
70
#!/usr/bin/env python3 # Simple Script to replace cron for Docker import argparse import sys from subprocess import CalledProcessError, run from time import sleep, time if __name__ == "__main__": sys.exit(main())
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 17427, 12327, 284, 6330, 1067, 261, 329, 25716, 198, 198, 11748, 1822, 29572, 198, 11748, 25064, 198, 6738, 850, 14681, 1330, 34099, 18709, 12331, 11, 1057, 198, 6738, 640, ...
3.217391
69
# -*- coding: utf-8 -*- # <nbformat>3.0</nbformat> # <headingcell level=1> # Measles in Small Populations # <markdowncell> # Based on *Finkenstadt and Grenfell (2002), Applied Statistics*, the paper introducing the TSIR model. The model relates $S_t$, the number of susceptibles at time $t$, to the number of infecte...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 1279, 46803, 18982, 29, 18, 13, 15, 3556, 46803, 18982, 29, 198, 198, 2, 1279, 33878, 3846, 1241, 28, 16, 29, 198, 198, 2, 2185, 292, 829, 287, 10452, 8099, 5768,...
2.330893
18,030
""" Test PEP 0448 -- Additional Unpacking Generalizations https://www.python.org/dev/peps/pep-0448/ """ # pylint: disable=superfluous-parens, unnecessary-comprehension UNPACK_TUPLE = (*range(4), 4) UNPACK_LIST = [*range(4), 4] UNPACK_SET = {*range(4), 4} UNPACK_DICT = {'a': 1, **{'b': '2'}} UNPACK_DICT2 = {**UNPACK_D...
[ 37811, 198, 14402, 350, 8905, 657, 31115, 1377, 15891, 791, 41291, 3611, 4582, 198, 5450, 1378, 2503, 13, 29412, 13, 2398, 14, 7959, 14, 431, 862, 14, 431, 79, 12, 15, 31115, 14, 198, 37811, 198, 198, 2, 279, 2645, 600, 25, 15560, ...
2.165138
218
from flask import Flask, request import os
[ 6738, 42903, 1330, 46947, 11, 2581, 198, 11748, 28686 ]
4.666667
9
import os import re import html import traceback from warnings import warn
[ 11748, 28686, 198, 11748, 302, 198, 11748, 27711, 198, 11748, 12854, 1891, 198, 198, 6738, 14601, 1330, 9828, 198 ]
4
19
from distutils.core import setup from distutils.extension import Extension setup(name='pyiocontrol', version='0.0.2', description='iarduino.ru module for Raspberry Pi', long_description=readme(), classifiers=[ 'Programming Language :: Python :: 3', ], url='http://github.com/tremaru/pyio...
[ 6738, 1233, 26791, 13, 7295, 1330, 9058, 198, 6738, 1233, 26791, 13, 2302, 3004, 1330, 27995, 198, 198, 40406, 7, 3672, 11639, 9078, 72, 420, 756, 3225, 3256, 198, 220, 220, 220, 2196, 11639, 15, 13, 15, 13, 17, 3256, 198, 220, 220,...
2.420091
219
#!/usr/bin/env python """Tumblr API client unit test cases""" __author__ = "SNF Labs" __TODO__ = """TODO List - link-via detection - photo-caption not present - all strings are Unicode strings """ import os import unittest import tumblr import urlparse def isUrl(str): """Attempts to determine if the given string...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 39415, 7824, 5456, 4326, 1332, 2663, 37811, 198, 198, 834, 9800, 834, 796, 366, 15571, 37, 23500, 1, 198, 834, 51, 3727, 46, 834, 796, 37227, 51, 3727, 46, 7343, 198, 12, 2792...
2.444045
5,281
# from unittest import TestCase # # from osbot_aws.apis.Lambda import Lambda # # # # class Test_Nodes(TestCase): # # def setUp(self): # self.vis_js = Vis_JS() # # def test___update_lambda_function(self): # Lambda('osbot_jira.lambdas.graph').update() # # def test_saved_graph(self): # ...
[ 2, 422, 555, 715, 395, 1330, 6208, 20448, 198, 2, 198, 2, 422, 28686, 13645, 62, 8356, 13, 499, 271, 13, 43, 4131, 6814, 1330, 21114, 6814, 198, 2, 198, 2, 198, 2, 198, 2, 1398, 6208, 62, 45, 4147, 7, 14402, 20448, 2599, 198, ...
1.936585
410
#!/usr/bin/python # -*- coding: utf-8 -*- import requests import sys import colorama from colorama import Fore, Back, Style colorama.init() header = {'User-Agent':'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1'} # merge payload with target host
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 7007, 198, 11748, 25064, 198, 11748, 3124, 1689, 198, 6738, 3124, 1689, 1330, 4558, 11, 5157, 11, 17738, 198, 8043...
2.598131
107
#!/usr/bin/python import timeit ############# # Test the TTTR reading function ############# import phconvert import os import tttrlib import numpy as np import pylab as p test_files = [ ('.../tttr-data/bh/bh_spc132.spc', 'SPC-130'), ('.../tttr-data/bh/bh_spc132.spc', 'SPC-130'), ('.../tttr-data/bh/bh_...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 640, 270, 198, 198, 7804, 4242, 2, 198, 2, 6208, 262, 26653, 5446, 3555, 2163, 198, 7804, 4242, 2, 198, 198, 11748, 872, 1102, 1851, 198, 11748, 28686, 198, 11748, 256, 926, 81,...
2.026214
1,030
"""Deep learning and Reinforcement learning library for Researchers and Engineers""" from __future__ import absolute_import try: install_instr = "Please make sure you install a recent enough version of TensorFlow." import tensorflow except ImportError: raise ImportError("__init__.py : Could not import Tens...
[ 37811, 29744, 4673, 290, 22299, 13442, 4673, 5888, 329, 26685, 290, 27170, 37811, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 28311, 25, 198, 220, 220, 220, 2721, 62, 259, 2536, 796, 366, 5492, 787, 1654, 345, 2721, ...
3.608466
189
from tensortrade.core import TimedIdentifiable from tensortrade.oms.orders import Trade, TradeSide, TradeType class Position(TimedIdentifiable): """A class to represent opened positions in Broker to keep track of opened Positions Parameters ---------- id : int, optional Pos...
[ 201, 198, 6738, 11192, 419, 27585, 13, 7295, 1330, 5045, 276, 33234, 16823, 201, 198, 6738, 11192, 419, 27585, 13, 3150, 13, 6361, 1330, 9601, 11, 9601, 24819, 11, 9601, 6030, 201, 198, 201, 198, 4871, 23158, 7, 14967, 276, 33234, 168...
2.242624
2,271
from rest_framework import routers from . import views app_name = 'quizzes' router = routers.SimpleRouter() router.register(r'tags', views.TagViewSet) router.register(r'questions', views.QuestionViewSet) router.register(r'answers', views.AnswerViewSet) router.register(r'quizzes', views.QuizViewSet)
[ 6738, 1334, 62, 30604, 1330, 41144, 198, 198, 6738, 764, 1330, 5009, 198, 198, 1324, 62, 3672, 796, 705, 421, 6457, 274, 6, 198, 198, 472, 353, 796, 41144, 13, 26437, 49, 39605, 3419, 198, 472, 353, 13, 30238, 7, 81, 470, 3775, 32...
2.885714
105
import argparse from src.config import * from src.games.reversi.reversi_game import ReversiGame as Game from src.coach import Coach import pprint from src.games.reversi.reversi_player import ReversiRandomPlayer, ReversiRLPlayer, ReversiGreedyPlayer, \ ReversiBotzonePlayer, ReversiHumanPlayer from src.referee import...
[ 11748, 1822, 29572, 198, 6738, 12351, 13, 11250, 1330, 1635, 198, 6738, 12351, 13, 19966, 13, 260, 690, 72, 13, 260, 690, 72, 62, 6057, 1330, 797, 690, 72, 8777, 355, 3776, 198, 6738, 12351, 13, 1073, 620, 1330, 16393, 198, 11748, 2...
1.960309
1,940
import os import scipy import scipy.stats import numpy as np from collections import namedtuple from functools import partial from io import StringIO import fitz from lxml import etree BLOCK_IMAGE = 1 BLOCK_TEXT = 0 Block = namedtuple("Block", ['filename','tl','br','w','h','content', 'type', 'density']) SBlock = nam...
[ 11748, 28686, 198, 11748, 629, 541, 88, 198, 11748, 629, 541, 88, 13, 34242, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 6738, 33245, 1330, 10903, 9399, 198...
2.730924
498
import sys sys.path.append("../") from pathlib import Path import re import numpy as np from bcn import Results WP_FROM_SCRATCH_LOC = Path(input("Enter the location of all your *WP from scratch* results\n> ")) EPS = (1, 5, 10, 20) if __name__ == "__main__": _ = main()
[ 198, 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 7203, 40720, 4943, 198, 198, 6738, 3108, 8019, 1330, 10644, 198, 11748, 302, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 275, 31522, 1330, 15691, 198, 198, 25527, 62, 1091...
2.699029
103
#!/usr/local/bin/python3 import socket import re from swapFormats import * def GenerateResponse(serverMessage, sock): """ Processes the message from the server and generates a response. Parameters: serverMessage (byte[]): Message from server in byte[] sock (socket): Socket being used for communication...
[ 2, 48443, 14629, 14, 12001, 14, 8800, 14, 29412, 18, 198, 11748, 17802, 198, 11748, 302, 198, 6738, 16075, 8479, 1381, 1330, 1635, 198, 198, 4299, 2980, 378, 31077, 7, 15388, 12837, 11, 32263, 2599, 198, 220, 220, 220, 37227, 10854, 2...
2.623596
890
# Write your solution here if __name__=="__main__": my_string = "Well hello there!" test_string = "This is a test, lets see how it goes!!!11!" print(change_case(my_string)) print(split_in_half(my_string)) print(remove_special_characters(test_string))
[ 2, 19430, 534, 4610, 994, 198, 361, 11593, 3672, 834, 855, 1, 834, 12417, 834, 1298, 198, 220, 220, 220, 616, 62, 8841, 796, 366, 5779, 23748, 612, 2474, 198, 220, 220, 220, 1332, 62, 8841, 796, 366, 1212, 318, 257, 1332, 11, 8781...
2.755102
98
import os import json import wikipedia import pandas as pd """ Scrape satellite data from Wikipedia to match PRNs to a satellite description. """ url = wikipedia.page("List of GPS satellites").url df = pd.read_html(url, header=0)[0] names = df["Satellite"].to_list() prns = df["PRN"].to_list() statuses = df["Status"]...
[ 11748, 28686, 198, 11748, 33918, 198, 11748, 47145, 11151, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 37811, 198, 3351, 13484, 11210, 1366, 422, 15312, 284, 2872, 4810, 47503, 284, 257, 11210, 6764, 13, 198, 37811, 198, 198, 6371, ...
2.420063
319
# greetings! print "Hello World!" # assign some variables a = 2 b = 4 c = 3 # print the average print (a + b + c)/3
[ 2, 12589, 654, 0, 198, 4798, 366, 15496, 2159, 2474, 198, 198, 2, 8333, 617, 9633, 198, 64, 796, 362, 198, 65, 796, 604, 198, 66, 796, 513, 198, 198, 2, 3601, 262, 2811, 198, 4798, 357, 64, 1343, 275, 1343, 269, 20679, 18, 198 ]
2.622222
45
# -*- coding: utf-8 -*- """ Project: Deep Jass File: Jassen.py Purpose: Recurring Neural Network to learn how to play cards. Created on: 17.03.2019 16:02:49 Author: Simon Thür; Marc Matter Copyright © 2019 Marc Matter, Michael Siebenmann, Ramon Heeb, Simon Thür. All rights reserve...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 16775, 25, 220, 220, 220, 220, 220, 220, 10766, 449, 562, 198, 198, 8979, 25, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 449, 562, 268, 13, 9078, ...
2.36843
12,309
""" This module tests the POST api: https://dxapistage.actiandatacloud.com/v2/logout It Deletes an existing session and logout a user. Here is how you would call the api and use associated methods: x = LogoutAPI("dxapistage.actiandatacloud.com", "Bearer: ZTA4MmRlMDYtY2ViMS00YTk3LTg4YTgtNGMxZTc0MGJ...
[ 37811, 198, 1212, 8265, 5254, 262, 24582, 40391, 25, 3740, 1378, 34350, 41690, 496, 13, 529, 72, 392, 265, 37779, 2778, 13, 785, 14, 85, 17, 14, 6404, 448, 198, 198, 1026, 1024, 40676, 281, 4683, 6246, 290, 2604, 448, 257, 2836, 13,...
2.514658
307
#!/usr/bin/env python # -*- coding: utf-8 -*- from flask import Blueprint, render_template, flash, redirect, url_for, request, current_app from flask_login import current_user, login_required from ..forms import UserDetailForm, RegisterUserForm, ArticleForm, AddTagForm from ..models import Article,db,Favorites,Vote fr...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 42903, 1330, 39932, 11, 8543, 62, 28243, 11, 7644, 11, 18941, 11, 19016, 62, 1640, 11, 2581, 11, 1459, 62,...
2.73384
526
''' DESKRIPSI SOAL Susi dan Santi merupakan kakak beradik yang sangat kompak. Tebaklah, siapa yang menjadi kakak dengan melihat tanggal lahir mereka. PETUNJUK MASUKAN Input terdiri atas 2 baris dengan masing-masing baris 3 input (tanggal, bulan, tahun) Baris pertama untuk Susi, baris kedua untuk Santi PETUNJUK KEL...
[ 7061, 6, 198, 198, 30910, 42, 7112, 3705, 40, 12809, 1847, 198, 198, 30746, 72, 46078, 10844, 72, 4017, 929, 461, 272, 479, 461, 461, 18157, 324, 1134, 331, 648, 25889, 265, 479, 3361, 461, 13, 1665, 65, 461, 9271, 11, 33721, 32678,...
2.151111
450
#!/usr/bin/env python # Copyright 2018 Nils Bore (nbore@kth.se) # # Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this list of conditions and th...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 15069, 2864, 399, 4487, 45409, 357, 46803, 382, 31, 74, 400, 13, 325, 8, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 393, 1231, 17613, ...
2.69927
1,370
import warnings import os from pathlib import Path import pandas as pd from datetime import datetime import streamlit as st from src.data import yahoo_fin_stock_info as si # import pickle import pickle5 as pickle warnings.filterwarnings("ignore") pd.options.display.max_columns = None pd.options.display.max_rows = No...
[ 11748, 14601, 198, 11748, 28686, 198, 6738, 3108, 8019, 1330, 10644, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 11748, 4269, 18250, 355, 336, 198, 6738, 12351, 13, 7890, 1330, 331, 12992, 62, 156...
2.73494
249
"""Language class for gruut""" import logging import os import typing from pathlib import Path import pydash import yaml from gruut_ipa import IPA, Phonemes from .phonemize import Phonemizer from .toksen import PostTokenizeFunc, Token, TokenizeFunc, Tokenizer from .utils import env_constructor # -------------------...
[ 37811, 32065, 1398, 329, 22848, 315, 37811, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 19720, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 279, 5173, 1077, 198, 11748, 331, 43695, 198, 198, 6738, 22848, 315, 62, 541, 64, ...
2.162035
4,678
#!/usr/bin/python # Copyright (C) 2021-2014 Alibaba Group Holding Limited import os import shutil try : import requests except: os.system("pip3 install requests") import requests # curl -o file url is very unstable!!!! replace it script_root = os.path.abspath(os.path.dirname(__file__)) if __name__ == '__main__...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 2, 15069, 357, 34, 8, 33448, 12, 4967, 41992, 4912, 31703, 15302, 198, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 28311, 1058, 198, 197, 11748, 7007, 198, 16341, 25, 198, 197, 418, ...
2.634058
276
from os.path import join from os.path import expandvars Import("env", "projenv") # Relocate firmware from 0x08000000 to 0x08002000 #env['CPPDEFINES'].remove(("VECT_TAB_ADDR", 134217728)) #env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08010000")) # Custom HEX from ELF env.AddPostAction( join("$BUILD_DIR","${PROGNAME}...
[ 6738, 28686, 13, 6978, 1330, 4654, 198, 6738, 28686, 13, 6978, 1330, 4292, 85, 945, 198, 20939, 7203, 24330, 1600, 366, 1676, 73, 24330, 4943, 198, 198, 2, 4718, 13369, 18779, 422, 657, 87, 2919, 10535, 284, 657, 87, 2919, 405, 11024,...
2.365936
593
import os import numpy as np import pycuda.autoinit # noqa: F401 import pycuda.driver as cuda import tensorrt as trt
[ 11748, 28686, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 66, 15339, 13, 23736, 15003, 220, 1303, 645, 20402, 25, 376, 21844, 198, 11748, 12972, 66, 15339, 13, 26230, 355, 269, 15339, 198, 198, 11748, 11192, 273, 17034, ...
2.695652
46
from invoke import task DOMAIN_NAME = '' VENV_NAME = 'schedule' @task @task @task @task @task @task @task(coverage) @task( install_requirements, migrate, collectstatic, restart)
[ 6738, 26342, 1330, 4876, 198, 198, 39170, 29833, 62, 20608, 796, 10148, 198, 28290, 53, 62, 20608, 796, 705, 15952, 5950, 6, 198, 198, 31, 35943, 198, 198, 31, 35943, 198, 198, 31, 35943, 198, 198, 31, 35943, 198, 198, 31, 35943, 19...
2.345679
81
import os import sys import pyauto import ckit from ckit.ckit_const import * import clnch_listwindow import clnch_msgbox import clnch_misc import clnch_ini import clnch_resource import clnch_statusbar #--------------------------------------------------------------------
[ 171, 119, 123, 11748, 28686, 201, 198, 11748, 25064, 201, 198, 201, 198, 11748, 12972, 23736, 201, 198, 201, 198, 11748, 269, 15813, 201, 198, 6738, 269, 15813, 13, 694, 270, 62, 9979, 1330, 1635, 201, 198, 201, 198, 11748, 537, 77, ...
2.969697
99
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # tests/suggestions.py # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list ...
[ 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, 198, 2, 220, 5254, 14, 47811, 507, 13, 9078, 198, 2, 198, 2, 220, 2297, 396, 3890, 290, 779, 287, 2723, 29...
3.062767
701
"""utility library for polling URLs. contains no tests that are run.""" import backoff import requests from spectrum import logger LOGGER = logger.logger(__name__) # intended behavior at the moment: if the page is too slow to load, # timeouts will cut it (a CDN may serve a stale version if it has it) @backoff.on...
[ 37811, 315, 879, 5888, 329, 13985, 32336, 13, 198, 198, 3642, 1299, 645, 5254, 326, 389, 1057, 526, 15931, 198, 198, 11748, 736, 2364, 198, 11748, 7007, 198, 6738, 10958, 1330, 49706, 198, 198, 25294, 30373, 796, 49706, 13, 6404, 1362, ...
3.226563
128
"""Datasets discovery methods Copyright 2018 Spectre Team 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 agree...
[ 37811, 27354, 292, 1039, 9412, 5050, 198, 198, 15269, 2864, 44228, 4816, 198, 198, 26656, 15385, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 5832, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, ...
3.035539
816
# Generated by Django 2.0.1 on 2018-02-16 21:03 from django.db import migrations, models import django.utils.timezone
[ 2, 2980, 515, 416, 37770, 362, 13, 15, 13, 16, 319, 2864, 12, 2999, 12, 1433, 2310, 25, 3070, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 26791, 13, 2435, 11340, 628 ]
2.926829
41
""" RapiDoc static files. See https://github.com/mrin9/RapiDoc. """ import pathlib __all__ = ['static_path'] this_path = pathlib.Path(__file__).parent static_path = this_path / 'vendor'
[ 37811, 198, 49, 15042, 23579, 9037, 3696, 13, 4091, 3740, 1378, 12567, 13, 785, 14, 76, 12769, 24, 14, 49, 15042, 23579, 13, 198, 37811, 198, 198, 11748, 3108, 8019, 198, 198, 834, 439, 834, 796, 37250, 12708, 62, 6978, 20520, 198, ...
2.661972
71
class MyRouter(object): "this is a class that describes the characteristics of a router."
[ 4871, 2011, 49, 39605, 7, 15252, 2599, 201, 198, 220, 220, 220, 366, 5661, 318, 257, 1398, 326, 8477, 262, 9695, 286, 257, 20264, 526, 201, 198 ]
3.555556
27
# ------------------------------ # 468. Validate IP Address # # Description: # Write a function to check whether an input string is a valid IPv4 address or IPv6 address or neither. # IPv4 addresses are canonically represented in dot-decimal notation, which consists of four decimal numbers, each ranging from 0 to 255, ...
[ 2, 34400, 26171, 198, 2, 604, 3104, 13, 3254, 20540, 6101, 17917, 198, 2, 220, 198, 2, 12489, 25, 198, 2, 19430, 257, 2163, 284, 2198, 1771, 281, 5128, 4731, 318, 257, 4938, 25961, 19, 2209, 393, 25961, 21, 2209, 393, 6159, 13, 19...
3.193237
621
"""Update 2021_08_27_13_05_29 Revision ID: 6eb9f72db4f0 Revises: 9c7ed601db2a Create Date: 2021-08-27 13:05:29.530440 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = "6eb9f72db4f0" down_revision = "9c7ed601db2a" branch_labels = None depends_on = None
[ 37811, 10260, 33448, 62, 2919, 62, 1983, 62, 1485, 62, 2713, 62, 1959, 198, 198, 18009, 1166, 4522, 25, 718, 1765, 24, 69, 4761, 9945, 19, 69, 15, 198, 18009, 2696, 25, 860, 66, 22, 276, 41706, 9945, 17, 64, 198, 16447, 7536, 25, ...
2.294118
136