content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
# -------------------------------------------------------------------------- # # OpenSim Moco: examplePredictAndTrack.py # # -------------------------------------------------------------------------- # # Copyright (c) 2018 Stanford University and the Authors # # ...
[ 2, 16529, 35937, 1303, 198, 2, 4946, 8890, 337, 25634, 25, 1672, 47, 17407, 1870, 24802, 13, 9078, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.55477
849
import sqlite3 from pandas import DataFrame conn = sqlite3.connect('./data.db',check_same_thread=False)
[ 11748, 44161, 578, 18, 201, 198, 6738, 19798, 292, 1330, 6060, 19778, 201, 198, 201, 198, 37043, 796, 44161, 578, 18, 13, 8443, 7, 4458, 14, 7890, 13, 9945, 3256, 9122, 62, 31642, 62, 16663, 28, 25101, 8, 201 ]
2.769231
39
""" Utility methods for parsing data returned from MapD """ import datetime from collections import namedtuple from sqlalchemy import text import mapd.ttypes as T from ._utils import seconds_to_time Description = namedtuple("Description", ["name", "type_code", "display_size", ...
[ 37811, 198, 18274, 879, 5050, 329, 32096, 1366, 4504, 422, 9347, 35, 198, 37811, 198, 11748, 4818, 8079, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 6738, 44161, 282, 26599, 1330, 2420, 198, 11748, 3975, 67, 13, 83, 19199, 355, 309, ...
2.12524
1,565
import logging import warnings import dask.dataframe as dd import numpy as np import pandas as pd from featuretools import variable_types as vtypes from featuretools.utils.entity_utils import ( col_is_datetime, convert_all_variable_data, convert_variable_data, get_linked_vars, infer_variable_types...
[ 11748, 18931, 198, 11748, 14601, 198, 198, 11748, 288, 2093, 13, 7890, 14535, 355, 49427, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 3895, 31391, 1330, 7885, 62, 19199, 355, 410, 19199, 198...
2.158948
6,046
import re from urllib.parse import urlparse import logging
[ 11748, 302, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 19016, 29572, 198, 11748, 18931, 198 ]
3.6875
16
import itertools from ez_lib import ez_flow_tool from collections import defaultdict from ez_scheduler import EzScheduler from ez_lib.ez_ob import CenUpdateInfo, UpdateNext from misc import constants, logger from domain.message import * from collections import deque from misc import global_vars import time import even...
[ 11748, 340, 861, 10141, 198, 198, 6738, 304, 89, 62, 8019, 1330, 304, 89, 62, 11125, 62, 25981, 198, 6738, 17268, 1330, 4277, 11600, 198, 6738, 304, 89, 62, 1416, 704, 18173, 1330, 21034, 50, 1740, 18173, 198, 6738, 304, 89, 62, 801...
3.324786
117
import numpy as np import cv2 as cv # Create a black image, a window img = np.zeros((300, 512, 3), np.uint8) cv.namedWindow('image') # create trackbars for color change cv.createTrackbar('R', 'image', 0, 255, nothing) cv.createTrackbar('G', 'image', 0, 255, nothing) cv.createTrackbar('B', 'image', 0, 255, nothing) ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 269, 85, 17, 355, 269, 85, 628, 198, 198, 2, 13610, 257, 2042, 2939, 11, 257, 4324, 198, 9600, 796, 45941, 13, 9107, 418, 19510, 6200, 11, 22243, 11, 513, 828, 45941, 13, 28611, 23, 8, 19...
2.33518
361
from functools import reduce # https://stackoverflow.com/questions/6800193/what-is-the-most-efficient-way-of-finding-all-the-factors-of-a-number-in-python # takes around 20s pt1, pt2 = solve(29000000) print("Part 1:", pt1) print("Part 2:", pt2)
[ 6738, 1257, 310, 10141, 1330, 4646, 198, 198, 2, 3740, 1378, 25558, 2502, 11125, 13, 785, 14, 6138, 507, 14, 3104, 405, 24943, 14, 10919, 12, 271, 12, 1169, 12, 1712, 12, 16814, 12, 1014, 12, 1659, 12, 41070, 12, 439, 12, 1169, 12...
2.447619
105
import pathlib import setuptools setuptools.setup( name="labels", version="0.3.0.dev0", author="Raphael Pierzina", author_email="raphael@hackebrot.de", maintainer="Raphael Pierzina", maintainer_email="raphael@hackebrot.de", license="MIT", url="https://github.com/hackebrot/labels", ...
[ 11748, 3108, 8019, 198, 11748, 900, 37623, 10141, 628, 198, 198, 2617, 37623, 10141, 13, 40406, 7, 198, 220, 220, 220, 1438, 2625, 23912, 1424, 1600, 198, 220, 220, 220, 2196, 2625, 15, 13, 18, 13, 15, 13, 7959, 15, 1600, 198, 220, ...
2.562718
574
# -*- coding: utf-8 -*- __about__ = """ This project demonstrates a social networking site. It provides profiles, friends, photos, blogs, tribes, wikis, tweets, bookmarks, swaps, locations and user-to-user messaging. In 0.5 this was called "complete_project". """
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 201, 198, 834, 10755, 834, 796, 37227, 201, 198, 1212, 1628, 15687, 257, 1919, 19140, 2524, 13, 632, 3769, 16545, 11, 201, 198, 36154, 11, 5205, 11, 19118, 11, 15...
3.089888
89
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from ralph.business.models import Venture, VentureRole
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 11593, 37443, 834,...
3.553846
65
for x range(4): print(x)
[ 1640, 2124, 2837, 7, 19, 2599, 198, 220, 220, 3601, 7, 87, 8, 198 ]
2
14
""" manage.py for flask application """ import unittest import coverage import os from flask.cli import FlaskGroup from project import create_app, db from project.api.models import User # Code coverage COV = coverage.Coverage( branch=True, include='project/*', omit=[ 'project/tests/*', 'p...
[ 37811, 198, 805, 496, 13, 9078, 329, 42903, 3586, 198, 37811, 198, 11748, 555, 715, 395, 198, 11748, 5197, 198, 11748, 28686, 198, 198, 6738, 42903, 13, 44506, 1330, 46947, 13247, 198, 6738, 1628, 1330, 2251, 62, 1324, 11, 20613, 198, ...
2.69186
172
import os from keras.callbacks import ModelCheckpoint from keras_transformer.training.custom_callbacks.CustomCallbackABC import CustomCallbackABC from keras_transformer.utils.io_utils import save_to_pickle
[ 11748, 28686, 198, 6738, 41927, 292, 13, 13345, 10146, 1330, 9104, 9787, 4122, 198, 6738, 41927, 292, 62, 7645, 16354, 13, 34409, 13, 23144, 62, 13345, 10146, 13, 15022, 47258, 24694, 1330, 8562, 47258, 24694, 198, 198, 6738, 41927, 292, ...
3.649123
57
import os import shutil input_dir = 'E:\Dataset\zhitang\Dataset_Zhitang_Yolo5' output_dir = 'E:\Dataset\zhitang\Dataset_Zhitang_Yolo5\ZhitangYolo5' in_img_dir = os.path.join(input_dir, 'Images') in_label_dir = os.path.join(input_dir, 'Labels') out_img_dir = os.path.join(output_dir, 'images') out_label_dir = os.path.jo...
[ 11748, 28686, 198, 11748, 4423, 346, 198, 15414, 62, 15908, 796, 705, 36, 7479, 27354, 292, 316, 59, 89, 17945, 648, 59, 27354, 292, 316, 62, 57, 17945, 648, 62, 56, 14057, 20, 6, 198, 22915, 62, 15908, 796, 705, 36, 7479, 27354, ...
2.242553
235
""" Support for controlling projector via the PJLink protocol. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/media_player.pjlink/ """ import logging import voluptuous as vol from homeassistant.components.media_player import ( PLATFORM_SCHEMA, SUPP...
[ 37811, 198, 15514, 329, 12755, 43396, 2884, 262, 44941, 11280, 8435, 13, 198, 198, 1890, 517, 3307, 546, 428, 3859, 11, 3387, 3522, 284, 262, 10314, 379, 198, 5450, 1378, 11195, 12, 562, 10167, 13, 952, 14, 5589, 3906, 14, 11431, 62, ...
2.514457
1,003
# Level: Hard if __name__ == "__main__": ss = 'abbbbbc' p = 'a*' print(isMatch(ss, p))
[ 2, 5684, 25, 6912, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 37786, 796, 705, 6485, 11848, 15630, 6, 198, 220, 220, 220, 279, 796, 705, 64, 9, 6, 198, 220, 220, 220, 3601, 7, 271, 238...
1.98
50
import factory from django.contrib.auth.models import User, Group, Permission from waliki.models import ACLRule, Page, Redirect
[ 11748, 8860, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 11, 4912, 11, 2448, 3411, 198, 6738, 6514, 5580, 13, 27530, 1330, 17382, 31929, 11, 7873, 11, 2297, 1060, 628, 628, 628, 198 ]
3.526316
38
# Built-in import copy import logging import time # External from Qt.QtWidgets import QUndoCommand # Internal from nxt_editor import colors from nxt_editor import user_dir from nxt import nxt_path from nxt.nxt_layer import LAYERS, SAVE_KEY from nxt.nxt_node import (INTERNAL_ATTRS, META_ATTRS, get_node_as_dict, ...
[ 2, 28477, 12, 259, 198, 11748, 4866, 198, 11748, 18931, 198, 11748, 640, 198, 198, 2, 34579, 198, 6738, 33734, 13, 48, 83, 54, 312, 11407, 1330, 19604, 358, 78, 21575, 198, 198, 2, 18628, 198, 6738, 299, 742, 62, 35352, 1330, 7577, ...
2.235071
1,055
# -*- coding: utf-8 -*- # Copyright (c) 2021, libracore AG and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document from datetime import datetime from PyPDF2 import PdfFileWriter from frappe.utils.file_manager im...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 357, 66, 8, 33448, 11, 300, 2889, 330, 382, 13077, 290, 20420, 198, 2, 1114, 5964, 1321, 11, 3387, 766, 5964, 13, 14116, 198, 198, 6738, 11593, 37443, 834, ...
1.591618
2,887
from .connection import Connection import socket
[ 6738, 764, 38659, 1330, 26923, 198, 11748, 17802, 628 ]
5.555556
9
#!/pxrpythonsubst # # Copyright 2017 Pixar # # Licensed under the Apache License, Version 2.0 (the "Apache License") # with the following modification; you may not use this file except in # compliance with the Apache License and the following modification to it: # Section 6. Trademarks. is deleted and replaced with: # ...
[ 2, 48443, 8416, 81, 79, 5272, 684, 549, 301, 198, 2, 198, 2, 15069, 2177, 46706, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 25189, 4891, 13789, 4943, 198, 2, 351, 262, 1708, 17613, 26, ...
3.531429
350
import pandas as pd from datetime import timedelta
[ 11748, 19798, 292, 355, 279, 67, 198, 6738, 4818, 8079, 1330, 28805, 12514, 628 ]
3.714286
14
####################### # Dennis MUD # # locate_item.py # # Copyright 2018-2020 # # Michael D. Reiley # ####################### # ********** # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal i...
[ 14468, 4242, 21017, 198, 2, 16902, 337, 8322, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 198, 2, 17276, 62, 9186, 13, 9078, 220, 220, 220, 220, 220, 1303, 198, 2, 15069, 2864, 12, 42334, 1303, 198, 2, 3899, 360, 13, 797, ...
3.49884
431
import json import pandas as pd import matplotlib.pyplot as plt from sklearn.linear_model import LinearRegression from sklearn.ensemble import RandomForestRegressor from sklearn.tree import DecisionTreeRegressor from xgboost import XGBRegressor from catboost import CatBoostRegressor from sklearn.model_selection import ...
[ 11748, 33918, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 1341, 35720, 13, 29127, 62, 19849, 1330, 44800, 8081, 2234, 198, 6738, 1341, 35720, 13, 1072, 11306, 1330, 1453...
2.451187
1,137
# Databricks notebook source # MAGIC %md # MAGIC # XGBoost training # MAGIC This is an auto-generated notebook. To reproduce these results, attach this notebook to the **10-3-ML-Cluster** cluster and rerun it. # MAGIC - Compare trials in the [MLflow experiment](#mlflow/experiments/406583024052808/s?orderByKey=metrics.%...
[ 2, 16092, 397, 23706, 20922, 2723, 198, 2, 28263, 2149, 4064, 9132, 198, 2, 28263, 2149, 1303, 1395, 4579, 78, 455, 3047, 198, 2, 28263, 2149, 770, 318, 281, 8295, 12, 27568, 20922, 13, 1675, 22919, 777, 2482, 11, 10199, 428, 20922, ...
3.005438
4,965
import importlib import pkgutil __all__ = [] for loader, module_name, is_pkg in pkgutil.walk_packages(__path__): module = importlib.import_module('.'+module_name,package=__name__) try: globals().update({k: getattr(module, k) for k in module.__all__}) __all__ += module.__all__ except Att...
[ 220, 220, 198, 11748, 1330, 8019, 198, 11748, 279, 10025, 22602, 198, 834, 439, 834, 796, 17635, 198, 1640, 40213, 11, 8265, 62, 3672, 11, 318, 62, 35339, 287, 220, 279, 10025, 22602, 13, 11152, 62, 43789, 7, 834, 6978, 834, 2599, 1...
2.583333
132
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Dec 30 22:04:48 2020 @author: baptistelafoux """ import domino import numpy as np import numpy.lib.arraysetops as aso
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 3300, 4280, 1542, 2534, 25, 3023, 25, 2780, 12131, 198, 198, 31, 9800, 25, 20452, 396, 41...
2.217391
92
import numpy as np
[ 11748, 299, 32152, 355, 45941, 628, 628, 198 ]
2.875
8
from distutils.core import setup from Cython.Build import cythonize setup(ext_modules = cythonize(["license_chk.py"]))
[ 6738, 1233, 26791, 13, 7295, 1330, 9058, 198, 6738, 327, 7535, 13, 15580, 1330, 3075, 400, 261, 1096, 198, 198, 40406, 7, 2302, 62, 18170, 796, 3075, 400, 261, 1096, 7, 14692, 43085, 62, 354, 74, 13, 9078, 8973, 4008, 628 ]
2.95122
41
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Nicira, Inc. # All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/lic...
[ 2, 43907, 25, 7400, 11338, 28, 19, 6482, 10394, 28, 19, 2705, 8658, 11338, 28, 19, 198, 198, 2, 15069, 2211, 8377, 8704, 11, 3457, 13, 198, 2, 1439, 6923, 33876, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, ...
2.128783
1,685
"""easyneuron.math contains all of the maths tools that you'd ever need for your AI projects, when used alongside Numpy. To suggest more to be added, please add an issue on the GitHub repo. """ from easyneuron.math.distance import euclidean_distance
[ 37811, 38171, 710, 44372, 13, 11018, 4909, 477, 286, 262, 47761, 4899, 326, 345, 1549, 1683, 761, 329, 534, 9552, 4493, 11, 618, 973, 7848, 399, 32152, 13, 198, 198, 2514, 1950, 517, 284, 307, 2087, 11, 3387, 751, 281, 2071, 319, 26...
3.861538
65
# Tai Sakuma <tai.sakuma@gmail.com> import pytest try: import unittest.mock as mock except ImportError: import mock from alphatwirl.concurrently import TaskPackageDropbox ##__________________________________________________________________|| ##________________________________________________________________...
[ 2, 11144, 13231, 7487, 1279, 83, 1872, 13, 82, 461, 7487, 31, 14816, 13, 785, 29, 198, 11748, 12972, 9288, 198, 198, 28311, 25, 198, 220, 220, 220, 1330, 555, 715, 395, 13, 76, 735, 355, 15290, 198, 16341, 17267, 12331, 25, 198, 2...
3.021828
733
# Copyright (c) 2017 OpenStack Foundation # 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 ...
[ 2, 15069, 357, 66, 8, 2177, 4946, 25896, 5693, 198, 2, 1439, 6923, 33876, 13, 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, 4...
3.185185
324
# Generated by Django 2.2.2 on 2019-11-13 13:52 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 17, 319, 13130, 12, 1157, 12, 1485, 1511, 25, 4309, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
from datetime import timedelta from django.contrib.auth import get_user_model from drf_spectacular.utils import extend_schema from rest_framework.response import Response from rest_framework.permissions import IsAdminUser from rest_framework.views import APIView from baserow.api.decorators import accept_timezone fr...
[ 6738, 4818, 8079, 1330, 28805, 12514, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 651, 62, 7220, 62, 19849, 198, 198, 6738, 1553, 69, 62, 4443, 12754, 13, 26791, 1330, 9117, 62, 15952, 2611, 198, 198, 6738, 1334, 62,...
3.625
144
# -*- coding: UTF-8 -*- import sys import socket import time import threading import select HOST = '192.168.11.98' PORT = int(sys.argv[1]) queue = [] s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((HOST, PORT)) queue.append(s) print("add client to queue") socketThread = threading.Thread(target=s...
[ 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 11748, 25064, 198, 11748, 17802, 198, 11748, 640, 198, 11748, 4704, 278, 198, 11748, 2922, 198, 198, 39, 10892, 796, 705, 17477, 13, 14656, 13, 1157, 13, 4089, 6, 198, 1549...
2.482877
292
# GENERATED BY KOMAND SDK - DO NOT EDIT import komand import json
[ 2, 24700, 1137, 11617, 11050, 509, 2662, 6981, 26144, 532, 8410, 5626, 48483, 198, 11748, 479, 296, 392, 198, 11748, 33918, 628, 198, 220, 220, 220, 220, 198, 220, 220, 220, 220, 628 ]
2.393939
33
# Copyright 2012 OpenStack Foundation # # 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 l...
[ 2, 220, 220, 220, 15069, 2321, 4946, 25896, 5693, 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,...
3.222462
463
from flask_restful import reqparse
[ 6738, 42903, 62, 2118, 913, 1330, 43089, 29572, 198 ]
3.888889
9
from mmdet.apis import init_detector, inference_detector, show_result, draw_poly_detections import mmcv from mmcv import Config from mmdet.datasets import get_dataset import cv2 import os import numpy as np from tqdm import tqdm import DOTA_devkit.polyiou as polyiou import math import pdb CLASS_NAMES_KR = (' ', ' ', '...
[ 6738, 8085, 15255, 13, 499, 271, 1330, 2315, 62, 15255, 9250, 11, 32278, 62, 15255, 9250, 11, 905, 62, 20274, 11, 3197, 62, 35428, 62, 15255, 478, 507, 198, 11748, 8085, 33967, 198, 6738, 8085, 33967, 1330, 17056, 198, 6738, 8085, 152...
1.821458
1,221
from django.contrib import admin from dicoms.models import Subject from dicoms.models import Session from dicoms.models import Series admin.site.register(Session) admin.site.register(Subject) admin.site.register(Series)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 288, 291, 3150, 13, 27530, 1330, 15540, 198, 6738, 288, 291, 3150, 13, 27530, 1330, 23575, 198, 6738, 288, 291, 3150, 13, 27530, 1330, 7171, 198, 198, 28482, 13, 15654, 13, 30...
3.453125
64
""" WSGI config for django-react-redux-jwt-base project. """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "djangoreactredux.settings.dev") from django.core.wsgi import get_wsgi_application from whitenoise.django import DjangoWhiteNoise application = get_wsgi_application() application = DjangoWhiteNoise...
[ 37811, 198, 19416, 18878, 4566, 329, 42625, 14208, 12, 45018, 12, 445, 2821, 12, 73, 46569, 12, 8692, 1628, 13, 198, 198, 37811, 198, 198, 11748, 28686, 198, 418, 13, 268, 2268, 13, 2617, 12286, 7203, 35028, 1565, 11230, 62, 28480, 51...
3.009009
111
# -*- coding: utf-8 -*- import re from copy import deepcopy import jsonpickle
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 302, 198, 6738, 4866, 1330, 2769, 30073, 198, 198, 11748, 33918, 27729, 293, 628 ]
2.758621
29
#!/usr/bin/env python # # Copyright (c) 2018 # FZI Forschungszentrum Informatik, Karlsruhe, Germany (www.fzi.de) # KIT, Institute of Measurement and Control, Karlsruhe, Germany (www.mrt.kit.edu) # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted p...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 15069, 357, 66, 8, 2864, 198, 2, 376, 48926, 27325, 354, 2150, 82, 89, 298, 6582, 554, 18982, 1134, 11, 15415, 82, 622, 258, 11, 4486, 357, 2503, 13, 69, 17027, 13, 29...
3.002857
1,050
#!/usr/bin/env python3 import sys print(sys.argv)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 25064, 198, 198, 4798, 7, 17597, 13, 853, 85, 8, 198 ]
2.26087
23
from itertools import chain
[ 6738, 340, 861, 10141, 1330, 6333, 198 ]
4
7
# Import kratos core and applications import KratosMultiphysics import KratosMultiphysics.KratosUnittest as KratosUnittest import KratosMultiphysics.kratos_utilities as KratosUtilities from KratosMultiphysics.FluidDynamicsApplication.fluid_dynamics_analysis import FluidDynamicsAnalysis if __name__ == '__main__': t...
[ 2, 17267, 479, 10366, 418, 4755, 290, 5479, 198, 11748, 509, 10366, 418, 15205, 13323, 23154, 198, 11748, 509, 10366, 418, 15205, 13323, 23154, 13, 42, 10366, 418, 3118, 715, 395, 355, 509, 10366, 418, 3118, 715, 395, 198, 11748, 509, ...
2.771028
214
from .basic_controller import BasicMAC from .cate_broadcast_comm_controller import CateBCommMAC from .cate_broadcast_comm_controller_full import CateBCommFMAC from .cate_broadcast_comm_controller_not_IB import CateBCommNIBMAC from .tar_comm_controller import TarCommMAC from .cate_pruned_broadcast_comm_controller import...
[ 6738, 764, 35487, 62, 36500, 1330, 14392, 44721, 198, 6738, 764, 66, 378, 62, 36654, 2701, 62, 9503, 62, 36500, 1330, 327, 378, 2749, 2002, 44721, 198, 6738, 764, 66, 378, 62, 36654, 2701, 62, 9503, 62, 36500, 62, 12853, 1330, 327, ...
2.378676
272
import asyncio import json import logging import websockets logging.basicConfig() if __name__ == "__main__": asyncio.run(main())
[ 11748, 30351, 952, 198, 11748, 33918, 198, 11748, 18931, 198, 11748, 2639, 11603, 198, 198, 6404, 2667, 13, 35487, 16934, 3419, 628, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 30351, 952, 13, ...
3
46
import random import pandas as pd import numpy as np import matplotlib.pyplot as plt #%matplotlib inline import tensorflow as tf import keras.backend as K from keras.utils import to_categorical from keras import metrics from keras.models import Model, load_model from keras.layers import Input, BatchNormalizat...
[ 11748, 4738, 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 201, 198, 2, 4, 6759, 29487, 8019, 26098, 201, 198, 11748, 11192, 273,...
3.037037
459
from ..base import BaseModel # returned from https://vk.com/dev/account.getActiveOffers
[ 6738, 11485, 8692, 1330, 7308, 17633, 198, 198, 2, 4504, 422, 3740, 1378, 85, 74, 13, 785, 14, 7959, 14, 23317, 13, 1136, 13739, 9362, 364, 628 ]
3.333333
27
# -------------------------------------------------------- # TFFRCNN - Resnet50 # Copyright (c) 2016 # Licensed under The MIT License [see LICENSE for details] # Written by miraclebiu # -------------------------------------------------------- import tensorflow as tf from .network import Network from ..fast_rcnn.config...
[ 2, 20368, 22369, 198, 2, 309, 5777, 7397, 6144, 532, 1874, 3262, 1120, 198, 2, 15069, 357, 66, 8, 1584, 198, 2, 49962, 739, 383, 17168, 13789, 685, 3826, 38559, 24290, 329, 3307, 60, 198, 2, 22503, 416, 20820, 8482, 84, 198, 2, 20...
4.625
72
import re import numbers import collections import logging from collections.abc import Iterable import itertools import aws_error_utils from .lookup import Ids, lookup_accounts_for_ou from .format import format_account_id LOGGER = logging.getLogger(__name__) _Context = collections.namedtuple("_Context", [ "sess...
[ 11748, 302, 198, 11748, 3146, 198, 11748, 17268, 198, 11748, 18931, 198, 6738, 17268, 13, 39305, 1330, 40806, 540, 198, 11748, 340, 861, 10141, 198, 198, 11748, 3253, 82, 62, 18224, 62, 26791, 198, 198, 6738, 764, 5460, 929, 1330, 5121,...
2.544218
1,911
import threading from concurrent.futures import ThreadPoolExecutor from service.train import do_train
[ 11748, 4704, 278, 198, 6738, 24580, 13, 69, 315, 942, 1330, 14122, 27201, 23002, 38409, 198, 6738, 2139, 13, 27432, 1330, 466, 62, 27432, 628 ]
4.12
25
#!/usr/bin/env python3 import os import argparse import subprocess if __name__ == '__main__': from version import __version__ from configParser import ConfigParser else: from .version import __version__ from .configParser import ConfigParser def command(cmd): """Run a shell command""" subprocess.call(cmd, sh...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 28686, 198, 11748, 1822, 29572, 198, 11748, 850, 14681, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 197, 6738, 2196, 1330, 11593, 9641, 834, ...
2.830189
212
#This file is auto-generated. See modules.json and autogenerator.py for details #!/usr/bin/python3 """ get_links.py MediaWiki API Demos Demo of `Links` module: Get all links on the given page(s) MIT License """ import requests S = requests.Session() URL = "https://en.wikipedia.org/w/api.php" PAR...
[ 2, 1212, 2393, 318, 8295, 12, 27568, 13, 4091, 13103, 13, 17752, 290, 1960, 519, 877, 1352, 13, 9078, 329, 3307, 198, 198, 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 37811, 198, 220, 220, 220, 651, 62, 28751, 13, 9078, 62...
2.468619
239
#! /usr/bin/env python3 ######################################################################## # # # This script was written by Thomas Heavey in 2015. # # theavey@bu.edu thomasjheavey@gmail.com # # ...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 29113, 29113, 7804, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220,...
2.076903
7,555
import json import copy import pdb import numpy as np import pickle
[ 11748, 33918, 198, 11748, 4866, 198, 11748, 279, 9945, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2298, 293, 628 ]
3.45
20
from faker import Faker import csv # Reference: https://pypi.org/project/Faker/ output = open('data.CSV', 'w', newline='') fake = Faker() header = ['name', 'age', 'street', 'city', 'state', 'zip', 'lng', 'lat'] mywriter=csv.writer(output) mywriter.writerow(header) for r in range(1000): mywriter...
[ 6738, 277, 3110, 1330, 376, 3110, 201, 198, 11748, 269, 21370, 201, 198, 201, 198, 2, 20984, 25, 3740, 1378, 79, 4464, 72, 13, 2398, 14, 16302, 14, 37, 3110, 14, 201, 198, 201, 198, 22915, 796, 1280, 10786, 7890, 13, 7902, 53, 325...
2.103571
280
# Generated by Django 2.2.4 on 2019-10-03 21:09 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 19, 319, 13130, 12, 940, 12, 3070, 2310, 25, 2931, 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
from __future__ import print_function, division import os,unittest from pyscf.nao import tddft_iter dname = os.path.dirname(os.path.abspath(__file__)) td = tddft_iter(label='water', cd=dname) try: from pyscf.lib import misc libnao_gpu = misc.load_library("libnao_gpu") td_gpu = tddft_iter(label='water', cd...
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 11, 7297, 198, 11748, 28686, 11, 403, 715, 395, 198, 6738, 279, 893, 12993, 13, 2616, 78, 1330, 256, 1860, 701, 62, 2676, 198, 198, 67, 3672, 796, 28686, 13, 6978, 13, 15908, 3672, 7, ...
2.387283
173
import io from os import path from setuptools import setup dirname = path.abspath(path.dirname(__file__)) with io.open(path.join(dirname, 'README.md'), encoding='utf-8') as f: long_description = f.read() setup( name='osm2geojson', version='0.1.27', license='MIT', description='Parse OSM and Overpas...
[ 11748, 33245, 198, 6738, 28686, 1330, 3108, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 15908, 3672, 796, 3108, 13, 397, 2777, 776, 7, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 4008, 198, 4480, 33245, 13, 9654, 7, 6978, 13, ...
2.594203
276
import sqlite3 from contextlib import closing nome = input('Nome do produto: ').lower().capitalize() with sqlite3.connect('precos.db') as conexao: with closing(conexao.cursor()) as cursor: cursor.execute('SELECT * FROM Precos WHERE nome_produto = ?', (nome,)) registro = cursor.fetchone() ...
[ 11748, 44161, 578, 18, 198, 6738, 4732, 8019, 1330, 9605, 198, 198, 77, 462, 796, 5128, 10786, 45, 462, 466, 40426, 9390, 25, 705, 737, 21037, 22446, 27544, 1096, 3419, 198, 198, 4480, 44161, 578, 18, 13, 8443, 10786, 3866, 6966, 13, ...
2.026442
416
import torch import time import copy from jet20.backend.constraints import * from jet20.backend.obj import * from jet20.backend.config import * from jet20.backend.core import solve,OPTIMAL,SUB_OPTIMAL,USER_STOPPED import logging logger = logging.getLogger(__name__)
[ 198, 11748, 28034, 198, 11748, 640, 198, 11748, 4866, 198, 6738, 12644, 1238, 13, 1891, 437, 13, 1102, 2536, 6003, 1330, 1635, 198, 6738, 12644, 1238, 13, 1891, 437, 13, 26801, 1330, 1635, 198, 6738, 12644, 1238, 13, 1891, 437, 13, 11...
2.508333
120
import torch from mmdet.datasets.pipelines.transforms import Pad from mmdet.datasets.pipelines.transforms import FilterBox import numpy as np import cv2 if __name__ == '__main__': # test_pad() test_filter_box()
[ 11748, 28034, 198, 6738, 8085, 15255, 13, 19608, 292, 1039, 13, 79, 541, 20655, 13, 7645, 23914, 1330, 15744, 198, 6738, 8085, 15255, 13, 19608, 292, 1039, 13, 79, 541, 20655, 13, 7645, 23914, 1330, 25853, 14253, 198, 11748, 299, 32152,...
2.753086
81
# # All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or # its licensors. # # For complete copyright and license terms please see the LICENSE at the root of this # distribution (the "License"). All use of this software is governed by the License, # or, if provided, by the license below or th...
[ 2, 198, 2, 1439, 393, 16690, 286, 428, 2393, 15069, 357, 66, 8, 6186, 13, 785, 11, 3457, 13, 393, 663, 29116, 393, 198, 2, 663, 8240, 669, 13, 198, 2, 198, 2, 1114, 1844, 6634, 290, 5964, 2846, 3387, 766, 262, 38559, 24290, 379,...
2.247398
6,726
#!/usr/bin/env python3 """Curve fitting with linear programming. Minimizes the sum of error for each fit point to find the optimal coefficients for a given polynomial. Overview: Objective: Sum of errors Subject to: Bounds on coefficients Credit: "Curve Fitting with Linear Programming", H. Swanson and R. E. ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 37811, 26628, 303, 15830, 351, 14174, 8300, 13, 198, 198, 9452, 320, 4340, 262, 2160, 286, 4049, 329, 1123, 4197, 966, 284, 1064, 262, 16586, 44036, 198, 1640, 257, 1813, 745,...
2.527234
1,891
#!/usr/bin/env python """ This source file is part of the Swift.org open source project Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors Licensed under Apache License v2.0 with Runtime Library Exception See https://swift.org/LICENSE.txt for license information See https://swift.org/CONTRI...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 198, 220, 770, 2723, 2393, 318, 636, 286, 262, 15608, 13, 2398, 1280, 2723, 1628, 628, 220, 15069, 357, 66, 8, 1946, 532, 2864, 4196, 3457, 13, 290, 262, 15608, 1628, 703...
4.028708
209
"""deCONZ scene platform tests.""" from unittest.mock import patch from openpeerpower.components.scene import DOMAIN as SCENE_DOMAIN, SERVICE_TURN_ON from openpeerpower.const import ATTR_ENTITY_ID from .test_gateway import ( DECONZ_WEB_REQUEST, mock_deconz_put_request, setup_deconz_integration, )
[ 37811, 2934, 10943, 57, 3715, 3859, 5254, 526, 15931, 198, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 198, 198, 6738, 1280, 33350, 6477, 13, 5589, 3906, 13, 29734, 1330, 24121, 29833, 355, 6374, 39267, 62, 39170, 29833, 11, 47...
2.73913
115
from pathlib import PosixPath import configparser from typing import Dict, Optional, Any, List from inspect import cleandoc import shutil import tensorhive import os import logging log = logging.getLogger(__name__) ConfigInitilizer() config = ConfigLoader.load(CONFIG_FILES.MAIN_CONFIG_PATH, displayed_title='main')...
[ 6738, 3108, 8019, 1330, 18574, 844, 15235, 198, 11748, 4566, 48610, 198, 6738, 19720, 1330, 360, 713, 11, 32233, 11, 4377, 11, 7343, 198, 6738, 10104, 1330, 1190, 392, 420, 198, 11748, 4423, 346, 198, 11748, 11192, 273, 71, 425, 198, ...
2.448441
417
import random from typing import Tuple import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F from torch import Tensor
[ 11748, 4738, 198, 6738, 19720, 1330, 309, 29291, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 40085, 355, 6436, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 6738, 28034, 1330, 309, 228...
3.294118
51
import torch import torch.nn as nn import torch.optim as optim from torchtext.datasets import Multi30k from torchtext.data import Field, BucketIterator import numpy as np import spacy import random from torch.utils.tensorboard import SummaryWriter # to print to tensorboard from utils import translate_sentence, bleu, s...
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 40085, 355, 6436, 198, 6738, 28034, 5239, 13, 19608, 292, 1039, 1330, 15237, 1270, 74, 198, 6738, 28034, 5239, 13, 7890, 1330, 7663, 11, 48353, 37787, 198,...
2.604089
1,614
from typing import Dict, Any, List import string from parlai.core.agents import Agent from parlai.core.message import Message from random import sample import pathlib path = pathlib.Path(__file__).parent.absolute()
[ 6738, 19720, 1330, 360, 713, 11, 4377, 11, 7343, 198, 198, 11748, 4731, 198, 198, 6738, 1582, 75, 1872, 13, 7295, 13, 49638, 1330, 15906, 198, 6738, 1582, 75, 1872, 13, 7295, 13, 20500, 1330, 16000, 198, 6738, 4738, 1330, 6291, 628, ...
3.453125
64
"""https://www.educative.io/courses/grokking-the-coding-interview/N7rwVyAZl6D Categories: - Binary - Bit Manipulation - Blind 75 See Also: - pytudes/_2021/leetcode/blind_75/linked_list/_141__linked_list_cycle__easy.py """ from pytudes._2021.utils.linked_list import ( ListNode, NodeType, ...
[ 37811, 5450, 1378, 2503, 13, 18123, 876, 13, 952, 14, 66, 39975, 14, 27333, 74, 3364, 12, 1169, 12, 66, 7656, 12, 3849, 1177, 14, 45, 22, 31653, 53, 88, 22778, 75, 21, 35, 198, 198, 34, 26129, 25, 198, 220, 220, 220, 532, 45755,...
2.185374
588
import sys import os import socket import time import threading if __name__ == '__main__': input_port = int(sys.argv[1]) input_doc_root = sys.argv[2] server = MyServer(input_port, input_doc_root) # Add code to start your server here threads = [] with socket.socket(socket.AF_INET, socket.SOCK...
[ 11748, 25064, 198, 11748, 28686, 198, 11748, 17802, 198, 11748, 640, 198, 11748, 4704, 278, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 5128, 62, 634, 796, 493, 7, 17597, 13, 853, 85, ...
2.167224
299
from git import Repo from pf_pweb_sourceman.common.console import console from pf_py_file.pfpf_file_util import PFPFFileUtil
[ 6738, 17606, 1330, 1432, 78, 198, 6738, 279, 69, 62, 79, 12384, 62, 10459, 805, 13, 11321, 13, 41947, 1330, 8624, 198, 6738, 279, 69, 62, 9078, 62, 7753, 13, 79, 46428, 69, 62, 7753, 62, 22602, 1330, 350, 5837, 5777, 576, 18274, 3...
2.8
45
import socket import paramiko import json Hostname = '34.224.2.243' Username = 'ec2-user' key = 'G:/Projects/Python/Asset-Discovery-Tool/tool/s.pem' is_connected() try: ssh = paramiko.SSHClient() ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) ssh.connect(hostname=Hostname, username=Username, ...
[ 11748, 17802, 198, 11748, 5772, 12125, 198, 11748, 33918, 198, 198, 17932, 3672, 796, 705, 2682, 13, 24137, 13, 17, 13, 26660, 6, 198, 5842, 13292, 796, 705, 721, 17, 12, 7220, 6, 198, 2539, 796, 705, 38, 14079, 16775, 82, 14, 37906...
2.536688
477
#!/usr/bin/env python # -*- coding: utf-8 -*- """KvV2 methods module.""" from hvac import exceptions, utils from hvac.api.vault_api_base import VaultApiBase DEFAULT_MOUNT_POINT = 'secret'
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 42, 85, 53, 17, 5050, 8265, 526, 15931, 198, 6738, 289, 85, 330, 1330, 13269, 11, 3384, 4487, 198, 6738, 289, ...
2.5
76
# Install all examples to connected device(s) import subprocess import sys answer = input("Install all vulkan examples to attached device, this may take some time! (Y/N)").lower() == 'y' if answer: BUILD_ARGUMENTS = "" for arg in sys.argv[1:]: if arg == "-validation": BUILD_ARGUMENTS += "-v...
[ 2, 15545, 477, 6096, 284, 5884, 3335, 7, 82, 8, 198, 11748, 850, 14681, 198, 11748, 25064, 198, 198, 41484, 796, 5128, 7203, 15798, 477, 410, 31263, 6096, 284, 7223, 3335, 11, 428, 743, 1011, 617, 640, 0, 357, 56, 14, 45, 8, 11074...
2.612245
196
from generators.ahoughton import AhoughtonGenerator from render_config import RendererConfig from problem_renderer import ProblemRenderer from moonboard import get_moonboard from adapters.default import DefaultProblemAdapter from adapters.crg import CRGProblemAdapter from adapters.ahoughton import AhoughtonAdapter impo...
[ 6738, 27298, 13, 993, 619, 1122, 1330, 7900, 619, 1122, 8645, 1352, 198, 6738, 8543, 62, 11250, 1330, 28703, 11882, 16934, 198, 6738, 1917, 62, 10920, 11882, 1330, 20647, 49, 437, 11882, 198, 6738, 8824, 3526, 1330, 651, 62, 22977, 3526...
3.73
100
import discord from Util import Utils, Emoji, Translator page_handlers = dict() known_messages = dict() def basic_pages(pages, page_num, action): if action == "PREV": page_num -= 1 elif action == "NEXT": page_num += 1 if page_num < 0: page_num = len(pages) - 1 if page_n...
[ 11748, 36446, 198, 198, 6738, 7273, 346, 1330, 7273, 4487, 11, 2295, 31370, 11, 3602, 41880, 198, 198, 7700, 62, 4993, 8116, 796, 8633, 3419, 198, 198, 4002, 62, 37348, 1095, 796, 8633, 3419, 628, 628, 628, 198, 198, 4299, 4096, 62, ...
1.90184
1,467
#!/usr/bin/env python # This file is part of Diamond. # # Diamond 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 version. # # ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 220, 220, 220, 770, 2393, 318, 636, 286, 13566, 13, 198, 2, 198, 2, 220, 220, 220, 13566, 318, 1479, 3788, 25, 345, 460, 17678, 4163, 340, 290, 14, 273, 13096, 198, 2, 22...
2.703551
1,943
from __future__ import annotations from dataclasses import dataclass, field, InitVar from typing import List, Tuple, Iterator, Iterable, Optional from random import choice import pyxel # ------------------------------------------------------- # Types # ------------------------------------------------------- Maze = T...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 11, 2214, 11, 44707, 19852, 198, 6738, 19720, 1330, 7343, 11, 309, 29291, 11, 40806, 1352, 11, 40806, 540, 11, 32233, 198, 6738, 4738, 1330,...
3.485207
338
""" Django settings for bobjiang project. Generated by 'django-admin startproject' using Django 2.0.6. For more information on this file, see https://docs.djangoproject.com/en/2.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.0/ref/settings/ """ import os i...
[ 37811, 198, 35, 73, 14208, 6460, 329, 29202, 39598, 1628, 13, 198, 198, 8645, 515, 416, 705, 28241, 14208, 12, 28482, 923, 16302, 6, 1262, 37770, 362, 13, 15, 13, 21, 13, 198, 198, 1890, 517, 1321, 319, 428, 2393, 11, 766, 198, 54...
2.208217
2,507
from django.db import models from django.contrib.auth.models import User from PIL import Image
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 350, 4146, 1330, 7412, 628, 220, 220, 220, 220, 220, 220, 220, 220, 198 ]
2.916667
36
""" DVC ---- Make your data science projects reproducible and shareable. """ import os import warnings VERSION_BASE = '0.23.2' __version__ = VERSION_BASE PACKAGEPATH = os.path.abspath(os.path.dirname(__file__)) HOMEPATH = os.path.dirname(PACKAGEPATH) VERSIONPATH = os.path.join(PACKAGEPATH, 'version.py') def _updat...
[ 37811, 198, 35, 15922, 198, 650, 198, 12050, 534, 1366, 3783, 4493, 8186, 37369, 290, 2648, 540, 13, 198, 37811, 198, 11748, 28686, 198, 11748, 14601, 628, 198, 43717, 62, 33, 11159, 796, 705, 15, 13, 1954, 13, 17, 6, 198, 834, 9641...
2.798773
815
## MODULE WITH UTIL FUNCTIONS - NOTION "----------------------------------------------------------------------------------------------------------------------" ####################################################### Imports ######################################################## "---------------------------------...
[ 2235, 33893, 13315, 19255, 4146, 29397, 4177, 11053, 532, 5626, 2849, 628, 628, 198, 198, 1, 10097, 3880, 19351, 438, 1, 198, 29113, 14468, 4242, 21017, 1846, 3742, 1303, 29113, 14468, 4242, 21017, 198, 1, 10097, 3880, 19351, 438, 1, 62...
2.967363
3,064
import unittest import logging import contextlib from libpermian.settings import Settings from .proxy import IssueAnalyzerProxy from .base import BaseAnalyzer, BaseIssue from .issueset import IssueSet LOGGER = logging.getLogger('test') # TrackedResolvedIssue should behave the same way as TrackedUnresolvedIssue # so...
[ 11748, 555, 715, 395, 198, 11748, 18931, 198, 11748, 4732, 8019, 198, 198, 6738, 9195, 16321, 666, 13, 33692, 1330, 16163, 198, 198, 6738, 764, 36436, 1330, 18232, 37702, 9107, 44148, 198, 6738, 764, 8692, 1330, 7308, 37702, 9107, 11, 7...
3.755906
127
# Copyright (c) 2011-2014 Kyle Gorman and Michael Wagner # # 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,...
[ 2, 15069, 357, 66, 8, 2813, 12, 4967, 14316, 402, 26183, 290, 3899, 26451, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 198, 2, 4866, 286, 428, 3788, 290, 3917, 10314, 3696, 35...
2.65221
2,421
#!/usr/bin/env python3 import codecs import os import os.path import shutil import subprocess import logging import glob import json CONTEST_DIR = 'polygon-contest' INIT_FILE = 'init.txt' BUILD_DIR = 'build' LANGUAGE = 'russian' FILES_DIR = 'files-' + LANGUAGE if __name__ == '__main__': main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 40481, 82, 198, 11748, 28686, 198, 11748, 28686, 13, 6978, 198, 11748, 4423, 346, 198, 11748, 850, 14681, 198, 11748, 18931, 198, 11748, 15095, 198, 11748, 33918, 198, 19...
2.606838
117
# -*- coding: utf-8 -*- # from conans import python_requires import conans.tools as tools import os base = python_requires("Eigen3ToPython/latest@multi-contact/dev")
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 198, 6738, 369, 504, 1330, 21015, 62, 47911, 198, 11748, 369, 504, 13, 31391, 355, 4899, 198, 11748, 28686, 198, 198, 8692, 796, 21015, 62, 47911, 7203, 36, 93...
2.913793
58
# Generated by Django 2.1.5 on 2019-02-18 22:51 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 362, 13, 16, 13, 20, 319, 13130, 12, 2999, 12, 1507, 2534, 25, 4349, 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
import torch import json import numpy as np from torch.autograd import Variable import gzip import yaml from re import split from matplotlib import pyplot config = readYaml('./config.yaml') def loadTrainedModel( model, opt ): """Load a pretrained model into given model""" print('loading pretrained mode...
[ 11748, 28034, 198, 11748, 33918, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 28034, 13, 2306, 519, 6335, 1330, 35748, 198, 11748, 308, 13344, 198, 11748, 331, 43695, 198, 6738, 302, 1330, 6626, 198, 6738, 2603, 29487, 8019, 1330, 12972...
2.612121
330
# errors from libvips import sys import logging from pyvips import ffi, vips_lib logger = logging.getLogger(__name__) _is_PY3 = sys.version_info[0] == 3 if _is_PY3: text_type = str else: text_type = unicode ffi.cdef(''' const char* vips_error_buffer (void); void vips_error_clear (void); ''') de...
[ 2, 8563, 422, 9195, 85, 2419, 198, 198, 11748, 25064, 198, 11748, 18931, 198, 198, 6738, 12972, 85, 2419, 1330, 277, 12463, 11, 410, 2419, 62, 8019, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 198,...
2.411917
386
#!/usr/bin/env python """ Module for painting output on and obtaining input from a text-based terminal window using the curses library. """ import curses import textwrap def display_string_with_prompt(screen, first_line_num, a_string, prompt): """Paints two strings and accepts input. Paints two strings ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 198, 26796, 329, 12036, 5072, 319, 290, 16727, 5128, 422, 257, 2420, 12, 3106, 12094, 198, 17497, 1262, 262, 43878, 5888, 13, 198, 37811, 198, 198, 11748, 43878, 198, 11748, ...
2.809154
2,316
import json from tkinter import * from tkinter import ttk from tkinter import messagebox from tr_data import TRData, NO_DATA_MEETS_CRITERIA from email_text import email_body_template from helpers import send_email RECIPIENT = <email_address> EXCEPTION_FILE = "tr_number_exceptions.json"
[ 11748, 33918, 198, 198, 6738, 256, 74, 3849, 1330, 1635, 198, 6738, 256, 74, 3849, 1330, 256, 30488, 198, 6738, 256, 74, 3849, 1330, 3275, 3524, 198, 198, 6738, 491, 62, 7890, 1330, 7579, 6601, 11, 8005, 62, 26947, 62, 11682, 32716, ...
3.085106
94
#coding:utf-8 #0 import tensorflow as tf import numpy as np import matplotlib.pyplot as plt import opt4_8_generateds import opt4_8_forward STEPS = 40000 BATCH_SIZE = 30 LEARNING_RATE_BASE = 0.001 LEARNING_RATE_DECAY = 0.999 REGULARIZER = 0.01 if __name__=='__main__': backward()
[ 2, 66, 7656, 25, 40477, 12, 23, 198, 2, 15, 220, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 2172, 19, 62, 23, 62, 27568, ...
2.317073
123
#// #// ------------------------------------------------------------- #// Copyright 2011 Synopsys, Inc. #// Copyright 2019-2020 Tuomas Poikela (tpoikela) #// All Rights Reserved Worldwide #// #// Licensed under the Apache License, Version 2.0 (the #// "License"); you may not use this file except in #//...
[ 2, 1003, 220, 198, 2, 1003, 20368, 1783, 32501, 198, 2, 1003, 220, 220, 220, 15069, 2813, 16065, 2840, 893, 11, 3457, 13, 198, 2, 1003, 220, 220, 220, 15069, 13130, 12, 42334, 16749, 16911, 7695, 522, 5031, 357, 83, 7501, 522, 5031,...
3.26087
322
# -*- coding: utf-8 -*- # MIT License # # Copyright 2018-2020 New York University Abu Dhabi # # 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 limitatio...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 17168, 13789, 198, 2, 198, 2, 15069, 2864, 12, 42334, 968, 1971, 2059, 13098, 43941, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 2...
3.498943
473