content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from turtle import Screen # Cannot inherit from Screen class in Turtle, so each Screen method must be recreated here # PUBLIC METHODS (recreated Screen methods)
[ 6738, 28699, 1330, 15216, 628, 220, 220, 220, 1303, 26003, 16955, 422, 15216, 1398, 287, 33137, 11, 523, 1123, 15216, 2446, 1276, 307, 11027, 515, 994, 628, 220, 220, 220, 1303, 44731, 337, 36252, 50, 357, 260, 25598, 15216, 5050, 8, ...
4.071429
42
from .user import Base, User
[ 6738, 764, 7220, 1330, 7308, 11, 11787 ]
4
7
# encoding: utf-8 from __future__ import division import sys import os import time import datetime import pandas as pd import numpy as np import math CURRENT_DIR = os.path.abspath(os.path.dirname(__file__)) ADD_PATH = "%s/../"%(CURRENT_DIR) sys.path.append(ADD_PATH) from tools.mail import MyEmail from tools.html impor...
[ 2, 21004, 25, 3384, 69, 12, 23, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 640, 198, 11748, 4818, 8079, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11...
2.183445
447
# All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
[ 2, 1439, 6923, 33876, 13, 198, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 220, 220, 220, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, ...
3.471429
350
from starwars.resolvers import resolvers from starwars.sdl import STARWARSTIFLETTE __all__ = ["STARWARSTIFLETTE"]
[ 6738, 3491, 86, 945, 13, 411, 349, 690, 1330, 581, 349, 690, 198, 6738, 3491, 86, 945, 13, 21282, 75, 1330, 25424, 16279, 2257, 5064, 28882, 9328, 198, 198, 834, 439, 834, 796, 14631, 46678, 16279, 2257, 5064, 28882, 9328, 8973, 198 ]
2.738095
42
import json import multiprocessing import time from rx.testing import marbles m = marbles from pyshared.core.ref import LocalSharedResourcesManager from pyshared.core.ref import ResourcesManagerListenerAdapter from pyshared.core.ref import default_command_mapper from pyshared.core.rx import ReactiveSharedResourcesSer...
[ 11748, 33918, 198, 11748, 18540, 305, 919, 278, 198, 11748, 640, 198, 198, 6738, 374, 87, 13, 33407, 1330, 1667, 7689, 198, 198, 76, 796, 1667, 7689, 198, 6738, 279, 893, 71, 1144, 13, 7295, 13, 5420, 1330, 10714, 2484, 1144, 33236, ...
2.665746
362
"""This file summarizes functionality for the construction of ConstraintNet with output-constraints in form of convex polytopes. It is possible to constrain output-parts to different convex polytopes independently. The functionality for modelling the output-constraints consists namely of: - Functors to create a ...
[ 37811, 1212, 2393, 46145, 11244, 329, 262, 5103, 286, 1482, 2536, 2913, 7934, 351, 198, 22915, 12, 1102, 2536, 6003, 287, 1296, 286, 24748, 87, 7514, 4852, 274, 13, 632, 318, 1744, 284, 1500, 3201, 198, 22915, 12, 42632, 284, 1180, 24...
2.089081
16,558
import tkinter from FireFoxCookieMonster import * from tkinter import * from tkinter.ttk import * # simple function to retrieve the cookies into a dictionary if __name__ == "__main__": root = Tk() # MainApplication(root).pack(side='top', fill='both', expand=True) MainApplication(root) root.mai...
[ 11748, 256, 74, 3849, 198, 6738, 3764, 19399, 34, 18055, 40872, 1330, 1635, 198, 6738, 256, 74, 3849, 1330, 1635, 198, 6738, 256, 74, 3849, 13, 926, 74, 1330, 1635, 628, 198, 220, 220, 220, 1303, 2829, 2163, 284, 19818, 262, 14746, ...
3.009174
109
#!/usr/bin/env python import string import sys import mtbl if __name__ == '__main__': if not len(sys.argv) == 3: sys.stderr.write('Usage: %s <TXT FILE> <MTBL FILE>\n' % sys.argv[0]) sys.exit(1) main(sys.argv[1], sys.argv[2])
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 4731, 198, 11748, 25064, 198, 198, 11748, 45079, 2436, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 611, 407, 18896, 7, 17597, 13...
2.032258
124
import numpy as np from gnuradio import gr
[ 11748, 299, 32152, 355, 45941, 198, 6738, 19967, 333, 324, 952, 1330, 1036, 628, 198, 220, 220, 220, 220, 220, 220, 198 ]
2.363636
22
# Copyright (c) Microsoft Corporation # Licensed under the MIT License. import re import pytest import semver from responsibleai._tools.shared.versions import CausalVersions
[ 2, 15069, 357, 66, 8, 5413, 10501, 198, 2, 49962, 739, 262, 17168, 13789, 13, 198, 198, 11748, 302, 198, 198, 11748, 12972, 9288, 198, 11748, 5026, 332, 198, 198, 6738, 4497, 1872, 13557, 31391, 13, 28710, 13, 47178, 1330, 6488, 6775,...
4.045455
44
import sys import random import h5pyd import numpy as np # # Extracts a time series for the NCEP dataset # # choose random x,y coordinate for the time series shape = (7850, 720, 1440) x_index = random.randint(0, shape[2]-1) y_index = random.randint(0, shape[1]-1) end_index = shape[0] if len(sys.argv) > 1: if sy...
[ 11748, 25064, 198, 11748, 4738, 198, 11748, 289, 20, 79, 5173, 198, 11748, 299, 32152, 355, 45941, 198, 198, 2, 220, 198, 2, 29677, 82, 257, 640, 2168, 329, 262, 399, 5222, 47, 27039, 198, 2, 198, 198, 2, 3853, 4738, 2124, 11, 88,...
2.101881
638
from django.conf import settings import os RAVEPAY_SECRET_KEY = getattr( settings, "RAVEPAY_SECRET_KEY", os.getenv("RAVEPAY_SECRET_KEY", "") ) RAVEPAY_PUBLIC_KEY = getattr( settings, "RAVEPAY_PUBLIC_KEY", os.getenv("RAVEPAY_PUBLIC_KEY", "") ) ALLOWED_HOSTS = getattr(settings, "ALLOWED_HOSTS", []) RAVEPAY_WEBHO...
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 11748, 28686, 198, 198, 3861, 6089, 4537, 56, 62, 23683, 26087, 62, 20373, 796, 651, 35226, 7, 198, 220, 220, 220, 6460, 11, 366, 3861, 6089, 4537, 56, 62, 23683, 26087, 62, 20373, 1600,...
2.130515
544
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2018, 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 770, 2438, 318, 636, 286, 1195, 1984, 270, 13, 198, 2, 198, 2, 357, 34, 8, 15069, 19764, 2864, 11, 13130, 13, 198, 2, 198, 2, 770, 2438, 318, 11971, 739, ...
2.505587
716
"""dataset_add_created_at Revision ID: 26e723d032b1 Revises: 30474ebed7a2 Create Date: 2022-03-16 15:50:00.805743 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = "26e723d032b1" down_revision = "30474ebed7a2" branch_labels = None depends_on = None
[ 37811, 19608, 292, 316, 62, 2860, 62, 25598, 62, 265, 198, 198, 18009, 1166, 4522, 25, 2608, 68, 22, 1954, 67, 49959, 65, 16, 198, 18009, 2696, 25, 1542, 38652, 1765, 276, 22, 64, 17, 198, 16447, 7536, 25, 33160, 12, 3070, 12, 143...
2.398438
128
from rest_framework import serializers from rest_framework.serializers import HyperlinkedIdentityField from users.models import User
[ 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 6738, 1334, 62, 30604, 13, 46911, 11341, 1330, 15079, 25614, 7390, 26858, 15878, 198, 198, 6738, 2985, 13, 27530, 1330, 11787, 628 ]
4.5
30
import cv2 import numpy as np img_path = r'C:\Users\evan\Documents\GitHub\OCR-Project\BAKR\Crop_IMG__1651113545.png' import cv2; import numpy as np; # Read image image = cv2.imread(img_path) cv2.waitKey(0) # Grayscale gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) # Find Canny edges edged = cv2.Canny(gray, 20, 2...
[ 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 628, 198, 198, 9600, 62, 6978, 796, 374, 6, 34, 7479, 14490, 59, 1990, 272, 59, 38354, 59, 38, 270, 16066, 59, 4503, 49, 12, 16775, 59, 4339, 30758, 59, 34, 1773, 62, 3955, ...
2.42029
552
# encoding: utf8 # # Copyright (C) 2014 Google Inc. # # This file is part of ycmd. # # ycmd is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later vers...
[ 2, 21004, 25, 3384, 69, 23, 198, 2, 198, 2, 15069, 357, 34, 8, 1946, 3012, 3457, 13, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 331, 28758, 13, 198, 2, 198, 2, 331, 28758, 318, 1479, 3788, 25, 345, 460, 17678, 4163, 340, 290, ...
3.171941
948
"""CertDB is a database managing X.509 certificates.""" __all__ = ( 'CertDB', 'CertDBReadOnly', 'CertFileDB', 'CertFileDBReadOnly', 'CertNotAvailableError', 'CertInvalidError', 'CompositeCertDB', 'CompositeCertDBReadOnly', ) __version__ = '1.1' __author__ = 'Radim Podola' from .cert_db...
[ 37811, 37608, 11012, 318, 257, 6831, 11149, 1395, 13, 29022, 20835, 526, 15931, 198, 198, 834, 439, 834, 796, 357, 198, 220, 220, 220, 705, 37608, 11012, 3256, 198, 220, 220, 220, 705, 37608, 11012, 5569, 10049, 3256, 198, 220, 220, 2...
2.786096
187
# -*- coding: utf-8 -*- """ ``units`` classes manage the conversion of units for MPCPy variables. See documentation on ``variables`` for more information. """ from abc import ABCMeta, abstractmethod import numpy as np #%% Display unit abstract interface #%% Display unit quantity implementation #%% Boolean displa...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 15506, 41667, 15506, 6097, 6687, 262, 11315, 286, 4991, 329, 4904, 8697, 88, 9633, 13, 220, 4091, 220, 198, 22897, 341, 319, 7559, 25641, 2977, 15506, 329, 5...
2.807692
650
import numpy as np from pymgt.tindex import generate_directions from pymgt.tindex import projection_index from pymgt.tindex import Projectable from pymgt.tindex import jarque_bera_index from pymgt.tindex import shapiro_index from pymgt.tindex import anderson_index from pymgt.tindex import ks_index
[ 11748, 299, 32152, 355, 45941, 198, 198, 6738, 279, 4948, 13655, 13, 83, 9630, 1330, 7716, 62, 12942, 507, 198, 6738, 279, 4948, 13655, 13, 83, 9630, 1330, 20128, 62, 9630, 198, 6738, 279, 4948, 13655, 13, 83, 9630, 1330, 4935, 540, ...
3.030303
99
import os import unittest from hone.utils import csv_utils dirname = os.path.dirname(__file__) csv_A_path = os.path.join(dirname, "data", "small_cats_dataset.csv") csv_B_path = os.path.join(dirname, "data", "comma_test.csv") small_csv = csv_utils.CSVUtils(csv_A_path) comma_csv = csv_utils.CSVUtils(csv_B_path) if __...
[ 11748, 28686, 198, 11748, 555, 715, 395, 198, 6738, 47267, 13, 26791, 1330, 269, 21370, 62, 26791, 198, 198, 15908, 3672, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 8, 198, 40664, 62, 32, 62, 6978, 796, 28686, 13, 697...
2.305732
157
import gym import torch import numpy as np from networks import ActorNetwork import argparse from torch.autograd import Variable if __name__=='__main__': main()
[ 11748, 11550, 198, 11748, 28034, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 7686, 1330, 27274, 26245, 198, 11748, 1822, 29572, 198, 6738, 28034, 13, 2306, 519, 6335, 1330, 35748, 198, 198, 361, 11593, 3672, 834, 855, 6, 834, 12417, ...
3.543478
46
from wolverine.module import MicroModule
[ 6738, 266, 14375, 500, 13, 21412, 1330, 4527, 26796, 628, 628 ]
4
11
# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2018-03-20 13:35 from __future__ import unicode_literals import django.core.validators from django.db import migrations, models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 22, 319, 2864, 12, 3070, 12, 1238, 1511, 25, 2327, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.818182
66
# -*- coding: utf-8 -*- """ Copyright (c) 2022 Colin Curtain Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, mer...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 15269, 357, 66, 8, 33160, 18373, 4424, 3153, 198, 198, 5990, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 1...
2.127876
14,647
import os print("Hello",os.getenv('NAME')) print("Your age is",os.getenv('AGE'))
[ 11748, 28686, 198, 198, 4798, 7203, 15496, 1600, 418, 13, 1136, 24330, 10786, 20608, 6, 4008, 198, 4798, 7203, 7120, 2479, 318, 1600, 418, 13, 1136, 24330, 10786, 11879, 6, 4008, 198 ]
2.5625
32
import os import re import yaml from .exceptions import MiuraException import logging logger = logging.getLogger(__name__) def load_file_or_directory(path): """ given a path, determine if the path is a file or directory, and yield a list of absolute file paths """ assert os.path.exists(path), "{...
[ 11748, 28686, 198, 11748, 302, 198, 11748, 331, 43695, 198, 6738, 764, 1069, 11755, 1330, 13756, 5330, 16922, 198, 11748, 18931, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628, 198, 198, 4299, 3440, ...
2.203762
957
import ast import matplotlib.pyplot as plt from matplotlib import cm import matplotlib as mpl from matplotlib.ticker import LinearLocator, FormatStrFormatter import numpy as np import os.path import pandas as pd import seaborn as sns import operator as op from functools import reduce from setup import DIR # DIR to g...
[ 11748, 6468, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 2603, 29487, 8019, 1330, 12067, 198, 11748, 2603, 29487, 8019, 355, 285, 489, 198, 6738, 2603, 29487, 8019, 13, 83, 15799, 1330, 44800, 33711, 1352, 1...
3.131455
213
AUTH_USER_MODEL = 'users.User' AUTH_PASSWORD_VALIDATORS = [ { 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', }, { 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', }, { 'NAME': 'django.contrib.auth.password_validat...
[ 32, 24318, 62, 29904, 62, 33365, 3698, 796, 705, 18417, 13, 12982, 6, 198, 198, 32, 24318, 62, 47924, 54, 12532, 62, 23428, 2389, 1404, 20673, 796, 685, 198, 220, 220, 220, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 705, 20608, ...
2.328125
384
import re import sys import logging from collections import Counter # TODO use https://bitbucket.org/spirit/guess_language # for language detection
[ 11748, 302, 198, 11748, 25064, 198, 11748, 18931, 198, 6738, 17268, 1330, 15034, 198, 198, 2, 16926, 46, 779, 3740, 1378, 2545, 27041, 316, 13, 2398, 14, 38685, 14, 5162, 408, 62, 16129, 198, 2, 220, 220, 220, 220, 220, 329, 3303, 1...
3.55814
43
from datetime import timedelta from dotenv import load_dotenv from azure.identity import DefaultAzureCredential from azure.mgmt.media import AzureMediaServices from azure.storage.blob import BlobServiceClient from azure.mgmt.media.models import ( Asset, Transform, TransformOutput, StandardEncoderPreset, AacAu...
[ 6738, 4818, 8079, 1330, 28805, 12514, 198, 6738, 16605, 24330, 1330, 3440, 62, 26518, 24330, 198, 6738, 35560, 495, 13, 738, 414, 1330, 15161, 26903, 495, 34, 445, 1843, 198, 6738, 35560, 495, 13, 11296, 16762, 13, 11431, 1330, 22134, 1...
3.018378
3,428
from reinforcement._version import __version__ name = "reinforcement"
[ 6738, 37414, 13557, 9641, 1330, 11593, 9641, 834, 198, 198, 3672, 796, 366, 260, 259, 13442, 1, 198 ]
3.944444
18
import os import json import collections import numpy as np import pandas as pd # in the standard lib # like regexes but with less annoying wildcards import re from fnmatch import fnmatch try: import webcolors except BaseException: webcolors = None def expand_wildcard(df, key, values): """ Expand f...
[ 11748, 28686, 198, 11748, 33918, 198, 11748, 17268, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 2, 287, 262, 3210, 9195, 198, 2, 588, 40364, 274, 475, 351, 1342, 15774, 4295, 27761, 198, 11748, ...
2.196337
7,645
#!/usr/bin/env python # coding: utf-8 # Twitter: @xrths # www.xrths.fr # Importation des librairies. import os from configparser import ConfigParser
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 3009, 25, 2488, 87, 81, 9998, 198, 2, 7324, 13, 87, 81, 9998, 13, 8310, 198, 198, 2, 1846, 10189, 748, 9195, 430, 18561, 13, 198, 1...
2.732143
56
# -*- coding: utf-8 -*- import datetime from functools import total_ordering import os import stat from .search_record import SearchRecord, FA_DIREC, FA_ARCH @total_ordering # Sort, directories first, then files
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 4818, 8079, 198, 6738, 1257, 310, 10141, 1330, 220, 2472, 62, 34555, 198, 11748, 28686, 198, 11748, 1185, 198, 198, 6738, 764, 12947, 62, 22105, 1330, 11140, 23739,...
3.112676
71
''' File name : rdf_RePlAce.py Author : Jinwook Jung Created on : Tue 30 Jul 2019 10:31:18 PM EDT Last modified : 2020-01-06 15:22:58 Description : ''' import subprocess, os, sys, random, yaml, time from subprocess import Popen, PIPE, CalledProcessError # FIXME sys.path.inser...
[ 7061, 6, 198, 220, 220, 220, 9220, 1438, 220, 220, 220, 220, 220, 1058, 374, 7568, 62, 3041, 3646, 32, 344, 13, 9078, 198, 220, 220, 220, 6434, 220, 220, 220, 220, 220, 220, 220, 220, 1058, 17297, 86, 566, 27134, 198, 220, 220, ...
2.391026
156
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
from tkinter import * import mysql.connector root = Tk() root.title("Doidera") root.geometry("400x400+200+200") my_db = mysql.connector.connect( host="localhost", user="root", passwd="YourPassword", database="doidera" ) # Criar um cursor e inicializa-lo my_cursor = my_db.cursor() # Criar tabela coma...
[ 6738, 256, 74, 3849, 1330, 1635, 198, 11748, 48761, 13, 8443, 273, 198, 198, 15763, 796, 309, 74, 3419, 198, 15763, 13, 7839, 7203, 5211, 1304, 64, 4943, 198, 15763, 13, 469, 15748, 7203, 7029, 87, 7029, 10, 2167, 10, 2167, 4943, 19...
2.128378
296
"""Config flow for Gree.""" from homeassistant import config_entries from homeassistant.helpers import config_entry_flow from .bridge import DeviceHelper from .const import DOMAIN async def _async_has_devices(hass) -> bool: """Return if there are devices that can be discovered.""" devices = await DeviceHelpe...
[ 37811, 16934, 5202, 329, 5251, 526, 15931, 198, 6738, 1363, 562, 10167, 1330, 4566, 62, 298, 1678, 198, 6738, 1363, 562, 10167, 13, 16794, 364, 1330, 4566, 62, 13000, 62, 11125, 198, 198, 6738, 764, 9458, 1330, 16232, 47429, 198, 6738, ...
3.125786
159
import os import sys import django import pytest import pac # noqa from .helpers import sanity @sanity @sanity
[ 11748, 28686, 198, 11748, 25064, 198, 198, 11748, 42625, 14208, 198, 198, 11748, 12972, 9288, 198, 198, 11748, 23503, 220, 1303, 645, 20402, 198, 198, 6738, 764, 16794, 364, 1330, 34182, 628, 198, 31, 12807, 414, 628, 198, 31, 12807, 41...
2.857143
42
import math import matplotlib.pyplot as plt print("Hello World!") x = math.sqrt(30) print(x) plt.plot([1,2,3,4,5]) plt.show()
[ 11748, 10688, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 4798, 7203, 15496, 2159, 2474, 8, 198, 198, 87, 796, 10688, 13, 31166, 17034, 7, 1270, 8, 198, 4798, 7, 87, 8, 198, 489, 83, 13, 29487, 26933, 1...
2.152542
59
# Generated by Django 2.1.2 on 2019-04-08 11:55 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 362, 13, 16, 13, 17, 319, 13130, 12, 3023, 12, 2919, 1367, 25, 2816, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, ...
2.818182
44
#!/usr/bin/env python import numpy as np from matplotlib import pyplot as plt from scipy.interpolate import spline import os from config import failure_class_name_to_id data_type = "SIM" filepath = "/Users/sklaw_mba/Desktop/ex/dr_juan_proj/workshop/data_cooker_code/parse_rcbht_data/my_training_data/"+d...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 201, 198, 201, 198, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 83, 201, 198, 6738, 629, 541, 88, 13, 3849, 16104, ...
2.344311
668
"""Preprocess.""" import numpy as np import menpo from menpofit.fitter import align_shape_with_bounding_box from menpodetect.opencv import detect import common.utils import face_alignment.utils __DETECTOR__ = detect.load_opencv_frontal_face_detector() class Preprocess(object): """Preprocess."""
[ 37811, 6719, 14681, 526, 15931, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 1450, 7501, 198, 6738, 1450, 79, 1659, 270, 13, 69, 1967, 1330, 10548, 62, 43358, 62, 4480, 62, 7784, 278, 62, 3524, 198, 6738, 1450, 33320, 316, 478...
2.916667
108
# Copyright 2018 Waseda University (Nelson Yalta) # 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...
[ 2, 15069, 2864, 370, 839, 64, 2059, 357, 45, 10151, 575, 2501, 64, 8, 198, 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, ...
2.46678
4,696
from typing import Optional, Text, List, Mapping, Callable, Tuple, Union, Counter import tensorflow as tf import tensorflow_probability.python.distributions as tfd from ...utils import types as ts from ...utils import keys def f_child_sample_factory(beta: ts.Float = 0): """ Args: beta: softmax ...
[ 6738, 19720, 1330, 32233, 11, 8255, 11, 7343, 11, 337, 5912, 11, 4889, 540, 11, 309, 29291, 11, 4479, 11, 15034, 198, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 11192, 273, 11125, 62, 1676, 65, 1799, 13, 29412, 13, 17080, ...
2.882353
153
""" Cross-docking truck data. This data is generated by a generate_dataset.py script. Created: Feb 18, 2019 at 07:30:02 PM Copyright (c) 2022, Krerkkiat Chusap This souce code is licensed under BSD 3-Clause "New" or "Revised" License (see LICENSE for details). """ from pathlib import Path # Problem data. name = Pat...
[ 37811, 198, 21544, 12, 67, 8629, 7779, 1366, 13, 198, 198, 1212, 1366, 318, 7560, 416, 257, 7716, 62, 19608, 292, 316, 13, 9078, 4226, 13, 198, 198, 41972, 25, 3158, 1248, 11, 13130, 379, 8753, 25, 1270, 25, 2999, 3122, 198, 198, ...
1.738188
3,090
import pandas as pd import numpy as np import datetime as dt #Debug library functions #Add a new row to dfDebug
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 4818, 8079, 355, 288, 83, 198, 198, 2, 27509, 5888, 5499, 198, 198, 2, 4550, 257, 649, 5752, 284, 47764, 27509, 198 ]
3.166667
36
from unittest import TestCase from RLTest.debuggers import Valgrind
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 6738, 45715, 14402, 13, 24442, 5355, 1330, 3254, 2164, 521, 628 ]
3.5
20
import numpy as np a = range(100) A = np.array(a).reshape(len(a)//2, 2) A = A.ravel().view([('col1', 'i8'), ('col2', 'i8'), ] ).astype([('col1', 'i4'), ('col2', 'i8'), ]) print(A[:5]) # array([(0, 1), (2, 3), (4, 5), (6, 7), (8, 9)], # dtype=[('col1', '<i4'), ('col2', '<i8')]) print(A.dtype) ...
[ 11748, 299, 32152, 355, 45941, 198, 198, 64, 796, 2837, 7, 3064, 8, 198, 32, 796, 45941, 13, 18747, 7, 64, 737, 3447, 1758, 7, 11925, 7, 64, 8, 1003, 17, 11, 362, 8, 198, 32, 796, 317, 13, 25843, 22446, 1177, 26933, 10786, 4033,...
1.798165
218
from examples.settings import settings from office365.runtime.auth.authentication_context import AuthenticationContext from office365.sharepoint.client_context import ClientContext def read_folder_and_files(): """Read a folder example""" list_obj = ctx.web.lists.get_by_title(listTitle) folder = list_obj.r...
[ 6738, 6096, 13, 33692, 1330, 6460, 198, 6738, 2607, 24760, 13, 43282, 13, 18439, 13, 41299, 3299, 62, 22866, 1330, 48191, 21947, 198, 6738, 2607, 24760, 13, 20077, 4122, 13, 16366, 62, 22866, 1330, 20985, 21947, 628, 198, 4299, 1100, 62...
2.688525
427
# Base classes class _ScandinavianStemmer(object): """ This subclass encapsulates a method for defining the string region R1. It is used by the Danish, Norwegian, and Swedish stemmer. """ def _r1_scandinavian(self, word, vowels): """ Return the region R1 that is used by the Scan...
[ 2, 7308, 6097, 628, 198, 4871, 4808, 3351, 392, 26802, 666, 1273, 368, 647, 7, 15252, 2599, 628, 220, 220, 220, 37227, 198, 220, 220, 220, 770, 47611, 32652, 15968, 257, 2446, 329, 16215, 262, 4731, 3814, 371, 16, 13, 198, 220, 220,...
2.176865
2,239
import sqlalchemy as sa from sqlalchemy.orm import relationship from myopenpantry.extensions.database import db # ingredients are a base part of recipes. ex "chicken breast" # association tables will be used to join these with inventory items, as well as the amount needed in recipes
[ 11748, 44161, 282, 26599, 355, 473, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 2776, 198, 6738, 616, 9654, 79, 21238, 13, 2302, 5736, 13, 48806, 1330, 20613, 628, 198, 2, 9391, 389, 257, 2779, 636, 286, 14296, 13, 409, 366, 354, 5...
4.205882
68
import unittest from csrv.model import errors from csrv.model import events from csrv.model import test_base from csrv.model import timing_phases from csrv.model.cards.corp import card01065 if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 269, 27891, 85, 13, 19849, 1330, 8563, 198, 6738, 269, 27891, 85, 13, 19849, 1330, 2995, 198, 6738, 269, 27891, 85, 13, 19849, 1330, 1332, 62, 8692, 198, 6738, 269, 27891, 85, 13, 19849, 1330, 10576, ...
2.86747
83
import unittest from Training.observer_abilities import * if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 13614, 13, 672, 15388, 62, 5738, 1330, 1635, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 198 ]
2.864865
37
#!/usr/bin/env python # coding: utf-8 # <a id='top'></a> # # # # $\texttt{GiRaFFEfood}$: Initial data for $\texttt{GiRaFFE}$ # # ## Aligned Rotator # # $$\label{top}$$ # # This module provides another initial data option for $\texttt{GiRaFFE}$. This is a flat-spacetime test with initial data $$A_{\phi} = \frac{\mu \va...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 1279, 64, 4686, 11639, 4852, 6, 12240, 64, 29, 198, 2, 198, 2, 198, 2, 1303, 39280, 5239, 926, 90, 33704, 21762, 5777, 36, 19425, 92,...
2.377946
1,188
""" Implementing word2vec using the skipgram model using a logistic regression as probability function. """ import tensorflow as tf import numpy as np import zipfile import math from . import directory_util, download import os import collections dataset_name = 'text8.zip' def read_data(filename): """ Step 1 Rea...
[ 37811, 48282, 278, 1573, 17, 35138, 1262, 262, 14267, 4546, 2746, 1262, 257, 2604, 2569, 20683, 198, 292, 12867, 2163, 13, 37227, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19974, 7753, 198,...
2.366311
2,719
# 09_Três amigos, Carlos, André e Felipe. decidiram rachar igualmente a conta de um bar. # Faça um algoritmo para ler o valor total da conta e imprimir quanto cada um deve # pagar, mas faça com que Carlos e André não paguem centavos. Ex: uma conta de # R$101,53 resulta em R$33,00 para Carlos, R$33,00 para André e R$35,...
[ 2, 7769, 62, 2898, 25792, 82, 716, 328, 418, 11, 17409, 11, 843, 29350, 304, 13937, 3757, 13, 875, 312, 343, 321, 374, 620, 283, 45329, 723, 434, 68, 257, 542, 64, 390, 23781, 2318, 13, 198, 2, 18350, 50041, 23781, 435, 7053, 270,...
2.368421
247
############################################## # head-1-2-3-4(tail) <---enqueue # dequeue---^ ############################################## # 测试函数 if __name__ == '__main__': # 运行测试函数 test() # 1 # 2 # 3 # 4 # None
[ 198, 198, 29113, 7804, 4242, 2235, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1182, 12, 16, 12, 17, 12, 18, 12, 19, 7, 13199, 8, 1279, 6329, 268, 36560, 198, 2, 220, 220, 220, 220, 220, 390, 36560, 6329, 61, 198...
2.130435
115
from icevision.models.ultralytics import yolov5
[ 6738, 4771, 10178, 13, 27530, 13, 586, 1373, 88, 14094, 1330, 331, 349, 709, 20, 198 ]
3
16
from django import forms from .models import CustomUser
[ 6738, 42625, 14208, 1330, 5107, 198, 6738, 764, 27530, 1330, 8562, 12982 ]
4.583333
12
from uecp.commands.base import UECPCommand from uecp.commands.bidirectional import ( MessageAcknowledgementCommand, RequestCommand, ResponseCode, ) from uecp.commands.clock_control import ( RealTimeClockCorrectionSetCommand, RealTimeClockEnabledSetCommand, RealTimeClockSetCommand, ) from uecp.co...
[ 6738, 334, 721, 79, 13, 9503, 1746, 13, 8692, 1330, 471, 2943, 5662, 2002, 392, 198, 6738, 334, 721, 79, 13, 9503, 1746, 13, 14065, 4154, 282, 1330, 357, 198, 220, 220, 220, 16000, 39482, 16025, 21575, 11, 198, 220, 220, 220, 19390,...
3.068182
396
import os from datetime import datetime, timedelta, date from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.contrib.sites.models import Site from django.core.files import File from django.core.management import call_command from django.core.management.ba...
[ 11748, 28686, 198, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 11, 3128, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 11299, 19199, 13, 27530,...
3.76087
138
import numpy as np __all__ = [ "img_2x2", "mask_2x2", "img_3x3_rgb", "img_3x3", "img_3x4", "mask_3x3", "mask_3x4", "img_5x5", "mask_5x5", "img_6x6", "img_6x6_lc", "img_6x6_rgb", "mask_6x6", "img_7x7", "cube_3x3x3", ] def img_2x2(): """ Generates a ...
[ 11748, 299, 32152, 355, 45941, 628, 198, 834, 439, 834, 796, 685, 198, 220, 220, 220, 366, 9600, 62, 17, 87, 17, 1600, 198, 220, 220, 220, 366, 27932, 62, 17, 87, 17, 1600, 198, 220, 220, 220, 366, 9600, 62, 18, 87, 18, 62, 81...
1.951515
2,145
#!/usr/bin/env python3 # -*- coding:utf-8 -*- """ emit_log.py published log messages are going to be broadcast to all the receives """ # Pika is a pure-Python implementation of the AMQP 0-9-1 protocol import pika import sys # guest user can only connect via localhost #credentials = pika.PlainCredentials('guest', 'gue...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 37811, 198, 368, 270, 62, 6404, 13, 9078, 3199, 2604, 6218, 389, 1016, 284, 307, 7025, 284, 477, 262, 11583, 198, 37...
2.396226
636
""" Ask the (testing) token service for a token. Run with `python -m lta.solicit_token`. """ import asyncio from rest_tools.client import RestClient # type: ignore from rest_tools.server import from_environment # type: ignore EXPECTED_CONFIG = { 'LTA_AUTH_ROLE': None, 'TOKEN_SERVICE_URL': None, } async d...
[ 37811, 198, 25214, 262, 357, 33407, 8, 11241, 2139, 329, 257, 11241, 13, 198, 198, 10987, 351, 4600, 29412, 532, 76, 300, 8326, 13, 34453, 3628, 62, 30001, 44646, 198, 37811, 198, 198, 11748, 30351, 952, 198, 198, 6738, 1334, 62, 3139...
2.711462
253
# Copyright 2018 The Texar Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ 2, 15069, 2864, 383, 3567, 283, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 2...
2.436516
953
# Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, ...) which sum to n. # Example 1: # Input: n = 12 # Output: 3 # Explanation: 12 = 4 + 4 + 4. # Example 2: # Input: n = 13 # Output: 2 # Explanation: 13 = 4 + 9. # 二刷 200627 # M1. 蛮力算法 TLE # M2. DP # M3. BFS
[ 2, 11259, 257, 3967, 18253, 299, 11, 1064, 262, 1551, 1271, 286, 2818, 6616, 3146, 357, 1640, 1672, 11, 352, 11, 604, 11, 860, 11, 1467, 11, 2644, 8, 543, 2160, 284, 299, 13, 198, 198, 2, 17934, 352, 25, 198, 2, 23412, 25, 299, ...
2.318841
138
from bs4 import BeautifulSoup from lxml import etree import json # xpath需要定期更换,否则数据抓取不全 def overview_info_parse(parse_str:str = ''): """ 传入一个待解析的字符串 """ html_info = etree.HTML(parse_str,parser=None) try: #=======================开始解析字段======================= Price = html_info.xpath...
[ 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 6738, 300, 19875, 1330, 2123, 631, 198, 11748, 33918, 198, 198, 2, 2124, 6978, 165, 250, 222, 17358, 223, 22522, 248, 17312, 253, 162, 249, 112, 162, 235, 95, 171, 120, 234, 28938, 99,...
1.871654
1,457
from marshmallow import Schema, fields from marshmallow.validate import Length from iot_api.user_api.repository.AppKeysRepository import MAX_PER_ORGANIZATION
[ 6738, 22397, 42725, 1330, 10011, 2611, 11, 7032, 198, 6738, 22397, 42725, 13, 12102, 378, 1330, 22313, 198, 6738, 1312, 313, 62, 15042, 13, 7220, 62, 15042, 13, 260, 1930, 37765, 13, 4677, 40729, 6207, 13264, 1330, 25882, 62, 18973, 62,...
3.488889
45
import logging import shlex from kubeyard.commands.devel import BaseDevelCommand logger = logging.getLogger(__name__) class BuildCommand(BaseDevelCommand): """ Builds docker image required to run tests and deployment. Can be overridden in <project_dir>/sripts/build. If kubeyard is set up in development ...
[ 11748, 18931, 198, 11748, 427, 2588, 198, 198, 6738, 479, 549, 2959, 446, 13, 9503, 1746, 13, 2934, 626, 1330, 7308, 5005, 626, 21575, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628, 198, 4871, 10...
3.026846
149
#!/usr/bin/python import MySQLdb as mdb import psycopg2 import psycopg2.extras import psycopg2.extensions from psycopg2 import OperationalError import sys import argparse parser = argparse.ArgumentParser(description='Generate an SQL file to update the ontology terms in the core database based on the matching terms in...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 33476, 9945, 355, 285, 9945, 198, 11748, 17331, 22163, 70, 17, 198, 11748, 17331, 22163, 70, 17, 13, 2302, 8847, 198, 11748, 17331, 22163, 70, 17, 13, 2302, 5736, 198, 6738, 17331...
2.388678
3,692
import numpy as np from torch import nn from rlkit.launchers.experiments.disentanglement import ( contextual_encoder_distance_launcher as cedl, ) from rlkit.torch.core import PyTorchModule from rlkit.torch.distributions import MultivariateDiagonalNormal from rlkit.torch.networks import ( BasicCNN, Flatten,...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 28034, 1330, 299, 77, 198, 198, 6738, 374, 75, 15813, 13, 38722, 3533, 13, 23100, 6800, 13, 6381, 298, 648, 1732, 1330, 357, 198, 220, 220, 220, 38356, 62, 12685, 12342, 62, 30246, 62, 38722, ...
2.580442
317
import matplotlib import matplotlib.pyplot as mpl from dataclasses import dataclass from typing import Callable, List import os import numpy import pkg_resources ## @dataclass
[ 11748, 2603, 29487, 8019, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 285, 489, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 19720, 1330, 4889, 540, 11, 7343, 198, 11748, 28686, 198, 11748, 299, 32152, 198, 1...
3.254545
55
""" # -*- coding:utf-8 -*- # @Time : 2019/5/4 20:24 # @Author : KUN LU @ SXU # @Email : lukun199@gmail.com # @Github : lukun199 """ from __future__ import division #import sys import os, time # import matplotlib.pyplot as plt import tensorflow as tf import tensorflow.contrib.slim as slim import...
[ 37811, 201, 198, 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 201, 198, 2, 2488, 7575, 1058, 13130, 14, 20, 14, 19, 1160, 25, 1731, 201, 198, 2, 2488, 13838, 220, 1058, 509, 4944, 50168, 2488, 44205, 52, 201, 198, 2, 2...
2.38537
1,121
# -*- coding: utf-8 -*- # import des fonctions de temps pour attendre import time ## import de grovepi adresse 4 import grovepi ## import du grovepi adresse 3 import grovepi3 ## import de la division reele qui retourne un chiffre a virgule from operator import truediv ## fonction de stabilisation de la hauteur #...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 1330, 748, 277, 261, 2733, 390, 2169, 862, 12797, 5262, 260, 198, 11748, 640, 198, 2235, 1330, 390, 7128, 303, 14415, 512, 411, 325, 604, 198, 11748, 7128, 303, 144...
2.846626
163
import logging from pyvisdk.exceptions import InvalidArgumentError ######################################## # Automatically generated, do not edit. ######################################## log = logging.getLogger(__name__) def VmPortGroupProfile(vim, *args, **kwargs): '''The VmPortGroupProfile data object repre...
[ 198, 11748, 18931, 198, 6738, 12972, 4703, 34388, 13, 1069, 11755, 1330, 17665, 28100, 1713, 12331, 198, 198, 29113, 7804, 198, 2, 17406, 4142, 7560, 11, 466, 407, 4370, 13, 198, 29113, 7804, 198, 198, 6404, 796, 18931, 13, 1136, 11187,...
3.155508
463
import json import boto3 from botocore.exceptions import ClientError import os from slack import WebClient from slack.errors import SlackApiError boto_session = boto3.session.Session() es_client = boto_session.client('es') ssm_client = boto_session.client('ssm') iam_client = boto_session.client('iam')
[ 11748, 33918, 198, 11748, 275, 2069, 18, 198, 6738, 10214, 420, 382, 13, 1069, 11755, 1330, 20985, 12331, 198, 11748, 28686, 198, 6738, 30740, 1330, 5313, 11792, 198, 6738, 30740, 13, 48277, 1330, 36256, 32, 14415, 12331, 198, 198, 65, ...
3.134021
97
from raiden.exceptions import RaidenUnrecoverableError from raiden.utils.formatting import format_block_id from raiden.utils.typing import BlockIdentifier, NoReturn def raise_on_call_returned_empty(given_block_identifier: BlockIdentifier) -> NoReturn: """Format a message and raise RaidenUnrecoverableError.""" ...
[ 6738, 9513, 268, 13, 1069, 11755, 1330, 12448, 268, 3118, 260, 9631, 540, 12331, 198, 6738, 9513, 268, 13, 26791, 13, 18982, 889, 1330, 5794, 62, 9967, 62, 312, 198, 6738, 9513, 268, 13, 26791, 13, 774, 13886, 1330, 9726, 33234, 7483,...
3.07265
234
#Debangshu Roy #WAP to add input no. in inches and display in cms to program list oldvalue = int(input("Enter your number in inches ")) inches(oldvalue)
[ 2, 16587, 648, 1477, 84, 9817, 220, 198, 2, 54, 2969, 284, 751, 5128, 645, 13, 287, 8331, 290, 3359, 287, 269, 907, 284, 1430, 1351, 198, 198, 727, 8367, 796, 493, 7, 15414, 7203, 17469, 534, 1271, 287, 8331, 366, 4008, 198, 45457...
3.163265
49
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
from __future__ import absolute_import from django import forms from django.contrib import messages from django.core.urlresolvers import reverse from sentry.models import ( OrganizationMember, OrganizationMemberType, Project, Team ) from sentry.web.forms.add_project import AddProjectForm from sentry.web.frontend....
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 6738, 42625, 14208, 1330, 5107, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 6218, 198, 6738, 42625, 14208, 13, 7295, 13, 6371, 411, 349, 690, 1330, 9575, 198, 198, 6738, 1908, ...
3.616279
172
from builtins import SystemError from pathlib import Path from sys import argv from typing import Union if len(argv) == 1: day = int(input('day? ')) else: day = int(argv[1]) day_folder = Path(f'day{day}/') make_files(day_folder, 'data.txt', 'part1.py', 'part2.py', 'notes.md')
[ 6738, 3170, 1040, 1330, 4482, 12331, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 25064, 1330, 1822, 85, 198, 6738, 19720, 1330, 4479, 198, 198, 361, 18896, 7, 853, 85, 8, 6624, 352, 25, 198, 220, 220, 220, 1110, 796, 493, 7, 1541...
2.557522
113
import functools from typing import Callable, Awaitable, Any HandlerType = Callable[..., Awaitable[Any]] from .exceptions import UmountAction
[ 198, 11748, 1257, 310, 10141, 198, 6738, 19720, 1330, 4889, 540, 11, 5851, 4548, 540, 11, 4377, 198, 198, 25060, 6030, 796, 4889, 540, 58, 986, 11, 5851, 4548, 540, 58, 7149, 11907, 628, 198, 6738, 764, 1069, 11755, 1330, 471, 14948, ...
3.311111
45
# 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.444118
340
# -*- coding: utf-8 -*- from pyvoxel.log import Log from pyvoxel.manager import Manager if __name__ == '__main__': log_test() Log.error('Error') p = Manager.auto_load() print(p)
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 6738, 12972, 85, 1140, 417, 13, 6404, 1330, 5972, 201, 198, 6738, 12972, 85, 1140, 417, 13, 37153, 1330, 9142, 201, 198, 201, 198, 361, 11593, 3672, 834, 6624, 70...
2.193548
93
# pixelsplines.py # Pixel-integrated sline utilities. # Written by A. Bolton, U. of Utah, 2010-2013. import numpy as n from scipy import linalg as la from scipy import sparse as sp from scipy import special as sf def compute_duck_slopes(pixbound, flux): """ Compute the slope of the illuminating quadratic ...
[ 2, 17848, 489, 1127, 13, 9078, 198, 2, 11349, 12, 18908, 4111, 1017, 500, 20081, 13, 198, 2, 22503, 416, 317, 13, 35293, 11, 471, 13, 286, 10202, 11, 3050, 12, 6390, 13, 198, 198, 11748, 299, 32152, 355, 299, 198, 6738, 629, 541, ...
2.046381
5,347
import os, os.path, pathlib, shutil from Stat import Stat
[ 11748, 28686, 11, 28686, 13, 6978, 11, 3108, 8019, 11, 4423, 346, 198, 6738, 5133, 1330, 5133, 198 ]
3.222222
18
n = int(input()) solution = [[0 for i in range(n)] for j in range(n)] for j in range(n) : nQueen(0, j, n, solution)
[ 198, 77, 796, 493, 7, 15414, 28955, 198, 82, 2122, 796, 16410, 15, 329, 1312, 287, 2837, 7, 77, 15437, 329, 474, 287, 2837, 7, 77, 15437, 198, 1640, 474, 287, 2837, 7, 77, 8, 1058, 198, 220, 220, 220, 299, 32466, 7, 15, 11, 47...
2.326923
52
import re from typing import Any, Dict import requests from celery import Task from django.conf import settings from posthog.celery import app from posthog.models import Action, Event, Team from posthog.tasks.webhooks import determine_webhook_type, get_formatted_message @app.task(ignore_result=True, bind=True, max_...
[ 11748, 302, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 198, 198, 11748, 7007, 198, 6738, 18725, 1924, 1330, 15941, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 198, 6738, 1281, 31897, 13, 7015, 88, 1330, 598, 198, 6738, 1281, ...
3.31
100
# Copyright (c) 2009-2011 Denis Bilenko. See LICENSE for details. """Managing greenlets in a group. The :class:`Group` class in this module abstracts a group of running greenlets. When a greenlet dies, it's automatically removed from the group. The :class:`Pool` which a subclass of :class:`Group` provides a way to li...
[ 2, 15069, 357, 66, 8, 3717, 12, 9804, 33089, 24207, 32720, 13, 4091, 38559, 24290, 329, 3307, 13, 198, 37811, 5124, 3039, 4077, 5289, 287, 257, 1448, 13, 198, 198, 464, 1058, 4871, 25, 63, 13247, 63, 1398, 287, 428, 8265, 12531, 82,...
2.69352
1,142
import os import configparser import redis from passlib.context import CryptContext from app.util.log_util2 import get_path, get_logger from pydantic import BaseSettings, Field # from fastapi.logger import logger # from logging.handlers import RotatingFileHandler import logging formatter = logging.Formatter( "(%(...
[ 11748, 28686, 198, 11748, 4566, 48610, 198, 11748, 2266, 271, 198, 6738, 1208, 8019, 13, 22866, 1330, 15126, 21947, 198, 6738, 598, 13, 22602, 13, 6404, 62, 22602, 17, 1330, 651, 62, 6978, 11, 651, 62, 6404, 1362, 198, 6738, 279, 5173...
2.451724
580
# Functions that can generate attribute values. # # These are functions that can be used in the GenerateFuncAttribute() class # (see module generator.py). They generate values according to some internal # functionality. # # The requirement of any such functions are: # 1) that it must return a string # 2) it can...
[ 2, 40480, 326, 460, 7716, 11688, 3815, 13, 201, 198, 2, 201, 198, 2, 2312, 389, 5499, 326, 460, 307, 973, 287, 262, 2980, 378, 37, 19524, 33682, 3419, 1398, 201, 198, 2, 357, 3826, 8265, 17301, 13, 9078, 737, 1119, 7716, 3815, 186...
2.595267
9,085
import logging import os import copy from pathlib import Path from mkdocs.utils import warning_filter log = logging.getLogger(__name__) log.addFilter(warning_filter) INCLUDE_STATEMENT = "!tf_modules_root " # TODO should make these config variables in mkdocs.yml DOCUMENT_FILE_NAME = 'README.md' NAVIGATION_KEY_NAME = ...
[ 11748, 18931, 198, 11748, 28686, 198, 11748, 4866, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 6738, 33480, 31628, 13, 26791, 1330, 6509, 62, 24455, 198, 198, 6404, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 198, 6404, ...
2.946429
112
from coworks import TechMicroService from coworks import entry app = SimpleMicroService()
[ 6738, 9875, 3647, 1330, 9634, 13031, 16177, 198, 6738, 9875, 3647, 1330, 5726, 628, 198, 198, 1324, 796, 17427, 13031, 16177, 3419, 628 ]
4.086957
23
import urllib3 import csv import os import json import arin urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) # TODO: Add in reverse lookup csvfile = open('countries_by_rir.csv', 'r') readcsv = csv.reader(csvfile, delimiter=',') rir = {'AFRINIC': [], 'APNIC': [], 'ARIN': [], ...
[ 11748, 2956, 297, 571, 18, 198, 11748, 269, 21370, 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 610, 259, 198, 333, 297, 571, 18, 13, 40223, 62, 40539, 654, 7, 333, 297, 571, 18, 13, 1069, 11755, 13, 818, 22390, 18453, 20361, 8...
2.116667
240
import redis import json import uuid import time HOST = 'localhost' PORT = 6379 MSG_COUNT = 250000 r = redis.Redis (host = HOST, port = PORT) pub = r.pubsub () sender_id = uuid.uuid4 () start_time = time.time () for i in range (MSG_COUNT): data = {"sender_id": str(sender_id), "message_id": i, "body": "I am mess...
[ 11748, 2266, 271, 198, 11748, 33918, 198, 11748, 334, 27112, 198, 11748, 640, 198, 198, 39, 10892, 796, 705, 36750, 6, 198, 15490, 796, 718, 29088, 198, 5653, 38, 62, 34, 28270, 796, 1679, 2388, 198, 198, 81, 796, 2266, 271, 13, 773...
2.622549
204
from flask import Blueprint import json import logging import traceback from datetime import datetime from flask import Response, request, jsonify, current_app from gevent.wsgi import WSGIServer from flask_jwt_simple import ( JWTManager, jwt_required, create_jwt, get_jwt_identity, get_jwt ) from backend.flask_app...
[ 6738, 42903, 1330, 39932, 198, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 12854, 1891, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 42903, 1330, 18261, 11, 2581, 11, 33918, 1958, 11, 1459, 62, 1324, 198, 6738, 4903, 1151, ...
3.18018
222
""" PSET-1 Counting Bobs Assume s is a string of lower case characters. Write a program that prints the number of times the string 'bob' occurs in s. For example, if s = 'azcbobobegghakl', then your program should print: Number of times bob occurs is: 2 """ py_main()
[ 37811, 198, 3705, 2767, 12, 16, 198, 12332, 278, 5811, 82, 198, 198, 8021, 2454, 264, 318, 257, 4731, 286, 2793, 1339, 3435, 13, 198, 198, 16594, 257, 1430, 326, 20842, 262, 1271, 286, 1661, 262, 4731, 705, 65, 672, 6, 220, 198, 1...
2.927083
96