content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
# # fanyi.py # @author Wuriqilang # @description # @created Sat Oct 13 2018 09:27:09 GMT+0800 (中国标准时间) # @last-modified Sat Oct 27 2018 19:51:58 GMT+0800 (中国标准时间) # # -*- coding: UTF-8 -*- from urllib import request import ssl if __name__ == "__main__": ssl._create_default_https_context = ssl._create_unverifie...
[ 2, 198, 2, 277, 1092, 72, 13, 9078, 198, 2, 2488, 9800, 370, 9900, 80, 346, 648, 198, 2, 2488, 11213, 220, 198, 2, 2488, 25598, 7031, 2556, 1511, 2864, 7769, 25, 1983, 25, 2931, 16987, 10, 2919, 405, 357, 40792, 32368, 121, 43718,...
2.215434
311
import six # TODO Remove this along with GeoJsonDict when support for python 2.6/2.7 is dropped. import json from collections import OrderedDict from django.contrib.gis.geos import GEOSGeometry, GEOSException from django.contrib.gis.gdal import GDALException from django.core.exceptions import ValidationError from dja...
[ 11748, 2237, 220, 1303, 16926, 46, 17220, 428, 1863, 351, 32960, 41, 1559, 35, 713, 618, 1104, 329, 21015, 362, 13, 21, 14, 17, 13, 22, 318, 5710, 13, 198, 11748, 33918, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 198, 6738, ...
2.486443
627
import sys from django.utils import http from django.utils import unittest from django.utils.datastructures import MultiValueDict from django.http import HttpResponse, utils from django.test import RequestFactory
[ 11748, 25064, 198, 198, 6738, 42625, 14208, 13, 26791, 1330, 2638, 198, 6738, 42625, 14208, 13, 26791, 1330, 555, 715, 395, 198, 6738, 42625, 14208, 13, 26791, 13, 19608, 459, 1356, 942, 1330, 15237, 11395, 35, 713, 198, 6738, 42625, 14...
3.566667
60
#!/usr/bin/env python3 # WESmith 01/07/22 this worked with the simulated camera out # of the box: impressive # WS TODO # - (done) run webcam via opencv # - add command-line inputs: camera type, url, port, frame size # - apply a stylesheet # - generalize camera to support image-processing algorithms from importlib i...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 370, 1546, 22947, 5534, 14, 2998, 14, 1828, 428, 3111, 351, 262, 28590, 4676, 503, 198, 2, 286, 262, 3091, 25, 8036, 198, 198, 2, 25290, 16926, 46, 198, 2, 532, 357, ...
2.228251
1,069
import os from yatr import Document from yatr.base import resolve_url DIR = os.path.abspath(os.path.dirname(__file__)) YF1 = os.path.join(DIR, 'yatrfile1.yml') URL = 'https://raw.githubusercontent.com/mbodenhamer/yatrfiles/master/yatrfiles/test/test1.yml' #-------------------------------------------------------------...
[ 11748, 28686, 198, 6738, 331, 265, 81, 1330, 16854, 198, 6738, 331, 265, 81, 13, 8692, 1330, 10568, 62, 6371, 198, 198, 34720, 796, 28686, 13, 6978, 13, 397, 2777, 776, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 4008, 1...
3.322034
177
# # ⚠ Warning # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT # LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN # NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIA...
[ 2, 1303, 2343, 248, 254, 15932, 198, 2, 198, 2, 3336, 47466, 3180, 36592, 2389, 1961, 366, 1921, 3180, 1600, 42881, 34764, 56, 3963, 15529, 509, 12115, 11, 7788, 32761, 6375, 8959, 49094, 11, 47783, 2751, 21728, 5626, 198, 2, 40880, 5...
3.200521
384
#instance method # static method: since there is no decorator #and there is no self keyword. So not an instance method myemp1 = Employee('Priyanka',600001, 28) Demo.myupdate(myemp1) # passing en employee object to myupdate method
[ 220, 220, 220, 220, 198, 220, 220, 220, 1303, 39098, 2446, 198, 220, 220, 220, 1303, 9037, 2446, 25, 1201, 612, 318, 645, 11705, 1352, 220, 198, 197, 197, 2, 392, 612, 318, 645, 2116, 21179, 13, 1406, 407, 281, 4554, 2446, 198, 19...
3.012195
82
from django.contrib.auth import authenticate, login, logout from django.db import IntegrityError from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render from django.urls import reverse from django.contrib.auth.decorators import login_required from django.core.paginator import Pagi...
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 8323, 5344, 11, 17594, 11, 2604, 448, 198, 6738, 42625, 14208, 13, 9945, 1330, 39348, 12331, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 11, 367, 29281, 31077, 7738, 10...
3.254545
165
#!/usr/bin/env python # -*- coding: utf-8 -*- import datetime from CTFd.models import Tokens, Users from CTFd.schemas.tokens import TokenSchema from CTFd.utils.security.auth import generate_user_token from tests.helpers import create_ctfd, destroy_ctfd, gen_user, login_as_user def test_api_tag_list_post(): """C...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 4818, 8079, 198, 198, 6738, 327, 10234, 67, 13, 27530, 1330, 47365, 11, 18987, 198, 6738, 327, 10234, 67, ...
2.112053
2,124
#! /usr/bin/env python # -*- coding: utf-8 -*- """ Module that contains functions and classes related with shaders """ from __future__ import print_function, division, absolute_import import os from Qt.QtWidgets import QWidget from Qt.QtGui import QPixmap try: from shiboken import wrapInstance except ImportEr...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 26796, 326, 4909, 5499, 290, 6097, 3519, 351, 427, 9972, 198, 37811, 628, 198, 6738, 11593, 37443, ...
2.590975
1,374
# -*- coding: UTF-8 -*- # # Copyright 2010-2014 The pygit2 contributors # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License, version 2, # as published by the Free Software Foundation. # # In addition to the permissions in the GNU General Public Li...
[ 2, 532, 9, 12, 19617, 25, 41002, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 3050, 12, 4967, 383, 12972, 18300, 17, 20420, 198, 2, 198, 2, 770, 2393, 318, 1479, 3788, 26, 345, 460, 17678, 4163, 340, 290, 14, 273, 13096, 198, 2,...
3.378661
478
from django.contrib.gis.forms import * from django.contrib.gis.geos import MultiPoint, Point from django.contrib.gis.measure import D from django.core.exceptions import ValidationError from django.utils.translation import ugettext as _ import math
[ 6738, 42625, 14208, 13, 3642, 822, 13, 70, 271, 13, 23914, 1330, 1635, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 70, 271, 13, 469, 418, 1330, 15237, 12727, 11, 6252, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 70, 271, 13, 1326, ...
2.901099
91
################################################################################# # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # # # # Licensed under the Apache License, Version 2.0 (the "License"). ...
[ 29113, 29113, 14468, 2, 198, 2, 220, 220, 15069, 6186, 13, 785, 11, 3457, 13, 393, 663, 29116, 13, 1439, 6923, 33876, 13, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 22...
2.405266
3,304
#!/usr/bin/env python # -*- coding: utf-8 -*- """Load a basic world with different objects in it Load a basic world (i.e. with a floor and gravity enabled) with different objects (only visual, and with collision shapes) that are movable, fixed, or are moving. The objects with a positive mass and a collision shape can ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 8912, 257, 4096, 995, 351, 1180, 5563, 287, 340, 198, 198, 8912, 257, 4096, 995, 357, 72, 13, 68, 13, 351, 2...
2.7869
1,084
from time import sleep import requests def simulate_request_latency(seconds=0): """ Simulate request latency """ sleep(seconds) def send_post_request(url, data): """ Send POST request """ response = requests.post(url=url, data=data) if response.ok: return response ...
[ 6738, 640, 1330, 3993, 198, 198, 11748, 7007, 628, 198, 4299, 29308, 62, 25927, 62, 15460, 1387, 7, 43012, 28, 15, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 3184, 5039, 2581, 24812, 198, 220, 220, 220, 37227, 628, 220, 22...
2.678261
230
import pytest from libtrust.keys.ec_key import ECPrivateKey, ECPublicKey, generate_private_key from libtrust.keys.rs_key import generate_private_key as generate_rsa_private_key
[ 11748, 12972, 9288, 198, 198, 6738, 9195, 38087, 13, 13083, 13, 721, 62, 2539, 1330, 412, 8697, 15104, 378, 9218, 11, 412, 8697, 841, 9218, 11, 7716, 62, 19734, 62, 2539, 198, 6738, 9195, 38087, 13, 13083, 13, 3808, 62, 2539, 1330, ...
3.140351
57
import logging import multiprocessing as mp import time
[ 11748, 18931, 198, 11748, 18540, 305, 919, 278, 355, 29034, 198, 11748, 640, 628 ]
4.071429
14
# Python standard library: import numpy as np import logging import sys import os import random # Local library: import optimizer.optimizer_mod # Third-party libraries: # a gradient-free optimizer: Nelder-Mead simplex algorithm: # check the general input: #============================...
[ 2, 11361, 3210, 5888, 25, 220, 198, 11748, 299, 32152, 355, 45941, 220, 198, 11748, 18931, 220, 198, 11748, 25064, 220, 198, 11748, 28686, 220, 198, 11748, 4738, 220, 198, 198, 2, 10714, 5888, 25, 220, 198, 11748, 6436, 7509, 13, 4008...
2.923077
429
#coding: utf-8 # Copyright 2015 Sindre Ilebekk Johansen and Andreas Sløgedal Løvland # 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 # Unles...
[ 2, 66, 7656, 25, 3384, 69, 12, 23, 198, 198, 2, 15069, 1853, 44830, 260, 314, 293, 47083, 74, 16053, 33807, 290, 33728, 3454, 24172, 2004, 282, 406, 24172, 85, 1044, 198, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, ...
1.501246
10,839
from .plotting_utils import PlottingUtils from .statistics_utils import StatisticsUtils
[ 6738, 764, 29487, 889, 62, 26791, 1330, 28114, 889, 18274, 4487, 198, 6738, 764, 14269, 3969, 62, 26791, 1330, 14370, 18274, 4487, 198 ]
3.826087
23
#!/usr/bin/env python """ Generate a rom file populated with window coefficients. Ensure the right number of coefficients is generated and that you use the desired window function. """ from bit import sub_integral_to_uint import numpy as np # N = 1024 # COEFF_PREC = 16 # w = np.kaiser(N, 6) # w_int = [sub_integral_t...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 8645, 378, 257, 9267, 2393, 22331, 351, 4324, 44036, 13, 48987, 262, 198, 3506, 1271, 286, 44036, 318, 7560, 290, 326, 345, 779, 262, 10348, 198, 17497, 2163, 13, 198, 3781...
2.51269
197
from time import sleep
[ 6738, 640, 1330, 3993, 628, 198 ]
4.166667
6
import logging import typing as t import numpy as np import pandas as pd from sklearn.impute import SimpleImputer from riiid.config import FLOAT_DTYPE from riiid.core.computation import compute_user_answers_ratio from riiid.core.encoders import Smoother
[ 11748, 18931, 198, 11748, 19720, 355, 256, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 1341, 35720, 13, 11011, 1133, 1330, 17427, 3546, 10549, 198, 198, 6738, 374, 4178, 312, 13, 11250, 1330...
3.047059
85
####################################################################### # FUNCTIONS REQUIRED FOR NUMERICAL INTEGRATION OF THE modRSW MODEL WITH and WITHOUT TOPOGRAPHY ####################################################################### ''' AUTHOR: T. Kent (amttk@leeds.ac.uk) Module contains numerous functions for ...
[ 29113, 29113, 4242, 21017, 198, 2, 29397, 4177, 11053, 4526, 10917, 37819, 7473, 36871, 1137, 20151, 17828, 7156, 49, 6234, 3963, 3336, 953, 6998, 54, 19164, 3698, 13315, 290, 42881, 28662, 49656, 31300, 56, 198, 29113, 29113, 4242, 21017, ...
3.93586
1,029
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making BK-BASE 蓝鲸基础平台 available. Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. BK-BASE 蓝鲸基础平台 is licensed under the MIT License. License for BK-BASE 蓝鲸基础平台: ---------------------------------------------...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 24893, 1087, 318, 10607, 284, 1104, 262, 1280, 2723, 2055, 416, 1642, 347, 42, 12, 33, 11159, 5525, 241, 251, 165, 110, 116, 161, 253, 118, 163, 94, 222, ...
3.510373
482
#! -*- encoding:utf-8 -*- """ @File : models.py @Author : Zachary Li @Contact : li_zaaachary@163.com @Dscpt : """ import math import torch import torch.nn as nn import torch.nn.functional as F from transformers import AlbertModel, AlbertPreTrainedModel
[ 2, 0, 532, 9, 12, 21004, 25, 40477, 12, 23, 532, 9, 12, 198, 37811, 198, 31, 8979, 220, 220, 220, 1058, 220, 220, 4981, 13, 9078, 198, 31, 13838, 220, 1058, 220, 220, 18825, 560, 7455, 198, 31, 17829, 1058, 220, 220, 7649, 62, ...
2.575472
106
#!/usr/bin/env python from visualization_msgs.msg import Marker from visualization_msgs.msg import MarkerArray import rospy import math topic = "visualization_marker_array" publisher = rospy.Publisher(topic, MarkerArray) rospy.init_node("register") markerArray = MarkerArray() count = 0 MARKERS_MAX = 100 while not...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 6738, 32704, 62, 907, 14542, 13, 19662, 1330, 2940, 263, 198, 6738, 32704, 62, 907, 14542, 13, 19662, 1330, 2940, 263, 19182, 198, 11748, 686, 2777, 88, 198, 11748, 10688, 198, 19...
2.46169
509
import csv import json from requests.exceptions import HTTPError from koha_patron.config import config from koha_patron.patron import PATRON_READ_ONLY_FIELDS from koha_patron.request_wrapper import request_wrapper if __name__ == '__main__': main() print("Summary:\n\t- {}\n\t- {}\n\t- {}\n\t- {}".format( ...
[ 11748, 269, 21370, 198, 11748, 33918, 198, 198, 6738, 7007, 13, 1069, 11755, 1330, 14626, 12331, 198, 198, 6738, 479, 28083, 62, 8071, 1313, 13, 11250, 1330, 4566, 198, 6738, 479, 28083, 62, 8071, 1313, 13, 8071, 1313, 1330, 28748, 4580...
2.368889
225
from flask import g, jsonify, request from flask_httpauth import HTTPBasicAuth from flask_restful import Resource, marshal from sqlalchemy.exc import IntegrityError from app import app, db from app.models import User import requests from requests.adapters import HTTPAdapter def create_or_update_resource(**kwargs): ...
[ 6738, 42903, 1330, 308, 11, 33918, 1958, 11, 2581, 198, 6738, 42903, 62, 4023, 18439, 1330, 14626, 26416, 30515, 198, 6738, 42903, 62, 2118, 913, 1330, 20857, 11, 22397, 282, 198, 6738, 44161, 282, 26599, 13, 41194, 1330, 39348, 12331, ...
2.583217
1,430
import requests import json # make API request and parse JSON automatically data = requests.get("https://jsonplaceholder.typicode.com/users").json() # save all data in a single JSON file file_name = "user_data.json" with open(file_name, "w") as f: json.dump(data, f, indent=4) print(file_name, "saved...
[ 11748, 7007, 201, 198, 11748, 33918, 201, 198, 201, 198, 201, 198, 2, 787, 7824, 2581, 290, 21136, 19449, 6338, 201, 198, 7890, 796, 7007, 13, 1136, 7203, 5450, 1378, 17752, 5372, 13829, 13, 774, 16564, 1098, 13, 785, 14, 18417, 11074...
2.504792
313
import threading import online_check as oc import friend_mechanism as fm import check_online_window as cow import image_window as im check_online_ip='127.0.0.1' check_online_port=12346 check_online_type='TCP' friend_file='friends' friend_list=[] Online() Offline()
[ 11748, 4704, 278, 198, 11748, 2691, 62, 9122, 355, 267, 66, 198, 11748, 1545, 62, 1326, 3147, 1042, 355, 277, 76, 198, 11748, 2198, 62, 25119, 62, 17497, 355, 9875, 198, 11748, 2939, 62, 17497, 355, 545, 628, 198, 9122, 62, 25119, 6...
2.732673
101
# This file is executed on every boot (including wake-boot from deepsleep) #import esp #esp.osdebug(None) #import webrepl #webrepl.start()
[ 2, 770, 2393, 318, 10945, 319, 790, 6297, 357, 8201, 7765, 12, 18769, 422, 2769, 42832, 8, 198, 198, 2, 11748, 15024, 198, 2, 9774, 13, 418, 24442, 7, 14202, 8, 198, 2, 11748, 3992, 35666, 198, 2, 732, 4679, 489, 13, 9688, 3419 ]
3.159091
44
from pathlib import Path from src.parse import itemize_log, parse_itemized_log, parse_item, process_log __file_path = Path(__file__).parent.absolute() with open(__file_path / "chatlog_single_item.log", "r") as f: chatlog_single_item_txt = f.readlines() with open(__file_path / "chatlog_three_items.log", "r") as ...
[ 6738, 3108, 8019, 1330, 10644, 198, 198, 6738, 12351, 13, 29572, 1330, 2378, 1096, 62, 6404, 11, 21136, 62, 9186, 1143, 62, 6404, 11, 21136, 62, 9186, 11, 1429, 62, 6404, 198, 198, 834, 7753, 62, 6978, 796, 10644, 7, 834, 7753, 834,...
2.543379
219
#!/usr/bin/env python3 import os import time for n in range(0, 11177): url = 'https://digital.archives.caltech.edu/islandora/object/hale:{:05d}'.format(n) stream = os.popen('curl -s ' + url) output = stream.read() if 'Page not found' not in output: print(url) else: print(n) tim...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 28686, 198, 11748, 640, 198, 198, 1640, 299, 287, 2837, 7, 15, 11, 13374, 3324, 2599, 198, 220, 220, 220, 19016, 796, 705, 5450, 1378, 34725, 13, 48814, 13, 9948, 136...
2.226667
150
# a simple build script suitable for compiling small projects # written by jason wong import os import time COMPILER = "g++" EXECUTABLE = "a.exe" # includes and sources should search recursively INCLUDES = [ "include", ] SOURCES = [ "src" ] LINK = [ ] FLAGS = [ "-std=c++11", "...
[ 2, 257, 2829, 1382, 4226, 11080, 329, 33393, 1402, 4493, 201, 198, 2, 3194, 416, 474, 888, 266, 506, 201, 198, 201, 198, 11748, 28686, 201, 198, 11748, 640, 201, 198, 201, 198, 9858, 47, 4146, 1137, 796, 366, 70, 4880, 1, 201, 198...
2.205457
623
#!/usr/bin/python # TODO: License goes here import library.apigw_base_path_mapping as apigw_base_path_mapping from library.apigw_base_path_mapping import ApiGwBasePathMapping import mock from mock import patch from mock import create_autospec from mock import ANY import unittest import boto from botocore.exceptions im...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 16926, 46, 25, 13789, 2925, 994, 198, 198, 11748, 5888, 13, 499, 328, 86, 62, 8692, 62, 6978, 62, 76, 5912, 355, 2471, 328, 86, 62, 8692, 62, 6978, 62, 76, 5912, 198, 6738, 5888, 13,...
2.969466
131
#!/usr/bin/env python """Temporary glue code for REL_DB flows+AFF4 hunts integration.""" from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from grr_response_core.lib import rdfvalue from grr_response_core.lib.rdfvalues import client as rdf_client from grr_r...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 12966, 5551, 22749, 2438, 329, 29749, 62, 11012, 15623, 10, 32, 5777, 19, 42984, 11812, 526, 15931, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 374...
2.683325
2,081
# System import os import sys from pprint import pprint as pp import argparse import logging import multiprocessing as mp from functools import partial from time import time import shutil # Externals import yaml import numpy as np import pandas as pd import torch import torch.nn as nn from torch_scatter import scatter...
[ 2, 4482, 198, 11748, 28686, 198, 11748, 25064, 198, 6738, 279, 4798, 1330, 279, 4798, 355, 9788, 198, 11748, 1822, 29572, 198, 11748, 18931, 198, 11748, 18540, 305, 919, 278, 355, 29034, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 67...
2.377315
2,160
"""CS1 Final Optional Part C1 | Kyle McCandless This Module has an autosolver to play the game of Cribbage by calculating the maximum points it can get in each outcome, looking a specified number of moves ahead. Calling: python3 final_partC1.py <deckname> <depth> <deckname>: the name of the deck to load for Cribbage ...
[ 37811, 7902, 16, 8125, 32233, 2142, 327, 16, 930, 14316, 5108, 392, 1203, 198, 198, 1212, 19937, 468, 281, 44619, 14375, 284, 711, 262, 983, 286, 327, 822, 13866, 416, 198, 9948, 3129, 803, 262, 5415, 2173, 340, 460, 651, 287, 1123, ...
2.779476
458
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Jul 26 14:14:27 2019 @author: bruno """ import numpy as np import matplotlib.pyplot as plt #Constantes Emax = 2 Emin = 0.06 HR = 75 Rs = 1 Rm = 0.005 Ra = 0.001 Rc = 0.0398 Cr = 4.4 Cs = 1.33 Ca = 0.08 Ls = 0.0005 Vo = 10 Dm = 1 Da = 1 beta0 = 0.17...
[ 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, 19480, 5979, 2608, 1478, 25, 1415, 25, 1983, 13130, 198, 198, 31, 9800, 25, 865, 36909, 1...
1.636991
1,595
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Base-centered reciprocal lattice.""" from decimal import Decimal from geometry import Vector3D from reciprocal_lattice import ReciprocalLattice class BaseCenteredReciprocalLattice(ReciprocalLattice): """Model of the base-centered reciprocal lattice.""" @proper...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 14881, 12, 38050, 48135, 47240, 501, 526, 15931, 198, 198, 6738, 32465, 1330, 4280, 4402, 198, 198, 673...
3.166667
102
# Generated by Django 2.2.3 on 2019-12-20 08:46 from django.conf import settings from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 18, 319, 13130, 12, 1065, 12, 1238, 8487, 25, 3510, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14...
3.019231
52
import PySimpleGUI as sg import time from importlib import import_module import argparse from utils import one_sentence_prep, build_iterator from train_eval import predict_one_sentence parser = argparse.ArgumentParser(description='TextRNN-Attention') parser.add_argument('--model', default='TextRNN_Att', type=s...
[ 11748, 9485, 26437, 40156, 355, 264, 70, 201, 198, 11748, 640, 201, 198, 6738, 1330, 8019, 1330, 1330, 62, 21412, 201, 198, 11748, 1822, 29572, 201, 198, 6738, 3384, 4487, 1330, 530, 62, 34086, 594, 62, 46012, 11, 1382, 62, 48727, 201...
2.06805
1,205
import csv with open('new.csv', 'w') as f: writer = csv.writer(f) foo = [[1,2,3],[4,5,6]] writer.writerows(foo)
[ 11748, 269, 21370, 198, 198, 4480, 1280, 10786, 3605, 13, 40664, 3256, 705, 86, 11537, 355, 277, 25, 198, 220, 220, 220, 6260, 796, 269, 21370, 13, 16002, 7, 69, 8, 198, 220, 220, 220, 22944, 796, 16410, 16, 11, 17, 11, 18, 38430,...
2.016129
62
import csv import json import re import os import os.path import logging import logging.handlers import unicodedata # Directory name for saving log files LOG_FOLDER = 'logs' # Log file name LOG_NAME = 'scraper.log' # Full path to the log file LOG_PATH = os.path.join(LOG_FOLDER, LOG_NAME) # Maximum log file size LOG...
[ 11748, 269, 21370, 198, 11748, 33918, 198, 11748, 302, 198, 11748, 28686, 198, 11748, 28686, 13, 6978, 198, 11748, 18931, 198, 11748, 18931, 13, 4993, 8116, 198, 11748, 28000, 9043, 1045, 198, 198, 2, 27387, 1438, 329, 8914, 2604, 3696, ...
2.914826
317
import sys import tensorflow as tf import leveldb from absl import app from absl import flags from absl import logging import glob import re from contextlib import redirect_stdout import collections import datetime import functools import itertools import math import numpy as np import os import random import sys im...
[ 11748, 25064, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 34002, 335, 65, 198, 6738, 2352, 75, 1330, 598, 198, 6738, 2352, 75, 1330, 9701, 198, 6738, 2352, 75, 1330, 18931, 198, 198, 11748, 15095, 198, 198, 11748, 302, 198, ...
3.253933
445
import importlib from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.shortcuts import get_object_or_404 from django.http import Http404 from django.utils.deprecation import MiddlewareMixin from .models import PhatPage
[ 11748, 1330, 8019, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 12205, 525, 306, 16934, 1522, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 651, 62, 15252, 62, 273, 62...
3.506494
77
import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output from app import app, server from layouts import layout1 import callbacks import dash_bootstrap_components as dbc app.layout = html.Div([ dcc.Location(id='url', refresh=False), html.Div(id='page-c...
[ 11748, 14470, 62, 7295, 62, 5589, 3906, 355, 288, 535, 198, 11748, 14470, 62, 6494, 62, 5589, 3906, 355, 27711, 198, 6738, 14470, 13, 45841, 3976, 1330, 23412, 11, 25235, 198, 198, 6738, 598, 1330, 598, 11, 4382, 198, 6738, 38489, 133...
2.246679
527
from __future__ import unicode_literals from django.utils.translation import ugettext_lazy as _ from navigation import Link link_api = Link( icon='fa fa-plug', tags='new_window', text=_('REST API'), view='rest_api:api_root' ) link_api_documentation = Link( icon='fa fa-book', tags='new_window', text=_('AP...
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 334, 1136, 5239, 62, 75, 12582, 355, 4808, 198, 198, 6738, 16408, 1330, 7502, 198, 198, 8726, 62, 15042, 796, 7502, ...
2.772059
136
# -*- coding: utf-8 -*- """ Copyright Netherlands eScience Center Function : Regridder from curvilinear grid to retilinear grid Author : Yang Liu (y.liu@esciencecenter.nl) First Built : 2019.05.21 Last Update : 2019.05.21 Contributor : Description : This module provides several methods t...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 15269, 12671, 304, 26959, 3337, 198, 22203, 220, 220, 220, 220, 220, 220, 220, 1058, 797, 25928, 1082, 422, 1090, 2991, 259, 451, 10706, 284, 1005, 346, 259,...
2.581197
234
from geopy.distance import vincenty from path_algorithm import AStar from colorama import Fore Infinite = float('inf') range_width = 1000 thresholds = [0]#[0, 10, 20, 30, 40]
[ 6738, 4903, 11081, 13, 30246, 1330, 410, 42816, 88, 198, 6738, 3108, 62, 282, 42289, 1330, 317, 8248, 198, 6738, 3124, 1689, 1330, 4558, 628, 198, 18943, 9504, 796, 12178, 10786, 10745, 11537, 198, 9521, 62, 10394, 796, 8576, 198, 400, ...
2.904762
63
import unittest from unittest.mock import Mock from platron.sdk_exception import SdkException from platron.request.data_objects.item import Item from platron.sdk_exception import SdkException class ItemTest(unittest.TestCase): ''' Item data test '''
[ 11748, 555, 715, 395, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 44123, 198, 198, 6738, 458, 23484, 13, 21282, 74, 62, 1069, 4516, 1330, 311, 34388, 16922, 198, 6738, 458, 23484, 13, 25927, 13, 7890, 62, 48205, 13, 9186, 1330, 909...
2.955056
89
#! /usr/bin/env python ''' FILE: build_st_data.py PURPOSE: Builds the ST product from the intermediate data that was generated. PROJECT: Land Satellites Data Systems (LSDS) Science Research and Development (LSRD) at the USGS EROS LICENSE: NASA Open Source Agreement 1.3 ...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 7061, 6, 198, 220, 220, 220, 45811, 25, 1382, 62, 301, 62, 7890, 13, 9078, 628, 220, 220, 220, 33079, 48933, 25, 10934, 82, 262, 3563, 1720, 422, 262, 19898, 1366, 326, 373,...
2.085676
7,470
#!/usr/bin/python3 """ Script language: Python3 Talks to: - Vega wallet (REST) - Vega node (REST) Apps/Libraries: - REST: requests (https://pypi.org/project/requests/) """ # Note: this file uses smart-tags in comments to section parts of the code to # show them as snippets in our documentation. They are not necessa...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 37811, 198, 7391, 3303, 25, 11361, 18, 198, 198, 51, 23833, 284, 25, 198, 12, 30310, 13008, 357, 49, 6465, 8, 198, 12, 30310, 10139, 357, 49, 6465, 8, 198, 198, 48433, 14, 43, ...
2.725088
3,121
# coding=utf-8 import os import numpy as np from snntoolbox.datasets.utils import get_dataset class TestGetDataset: """Test obtaining the dataset from disk in correct format."""
[ 2, 19617, 28, 40477, 12, 23, 198, 11748, 28686, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 3013, 429, 970, 3524, 13, 19608, 292, 1039, 13, 26791, 1330, 651, 62, 19608, 292, 316, 628, 198, 4871, 6208, 3855, 27354, 292, ...
3.04918
61
import re from setuptools import setup with open("README.md", "r") as readme: long_description = readme.read() with open("django_graylog.py", "r") as src: version = re.match(r'.*__version__ = "(.*?)"', src.read(), re.S).group(1) setup( name="django-graylog", version=version, description="Graylog...
[ 11748, 302, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 4480, 1280, 7203, 15675, 11682, 13, 9132, 1600, 366, 81, 4943, 355, 1100, 1326, 25, 198, 220, 220, 220, 890, 62, 11213, 796, 1100, 1326, 13, 961, 3419, 198, 198, 4...
2.4869
458
#!/usr/bin/env python3 import argparse import datetime import getch import getpass import json import os import pathlib import pyperclip as clipboard import shutil import sys import webbrowser from pbe_with_md5_and_triple_des import PBEWithMD5AndTripleDES if __name__ == "__main__": main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 1822, 29572, 198, 11748, 4818, 8079, 198, 11748, 651, 354, 198, 11748, 651, 6603, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 3108, 8019, 198, 11748, 12972, 525, 15...
2.932692
104
# Generated by Django 3.2.7 on 2021-10-27 09:40 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 22, 319, 33448, 12, 940, 12, 1983, 7769, 25, 1821, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
from uuid import UUID import pytest from app.config import EMAIL_DOMAIN, MAX_NB_EMAIL_FREE_PLAN from app.email_utils import parseaddr_unicode from app.extensions import db from app.models import ( generate_email, User, Alias, Contact, Mailbox, SenderFormatEnum, EnumE, )
[ 6738, 334, 27112, 1330, 471, 27586, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 598, 13, 11250, 1330, 412, 5673, 4146, 62, 39170, 29833, 11, 25882, 62, 32819, 62, 27630, 4146, 62, 39274, 62, 6489, 1565, 198, 6738, 598, 13, 12888, 62...
2.512195
123
import numpy as np import tectosaur as tct from tectosaur.stress_constraints import *
[ 11748, 299, 32152, 355, 45941, 198, 11748, 256, 478, 418, 2899, 355, 256, 310, 198, 6738, 256, 478, 418, 2899, 13, 41494, 62, 1102, 2536, 6003, 1330, 1635, 198 ]
2.965517
29
import numpy as np import os filenames = os.listdir("outfile") for filename in filenames: outfile = np.load("outfile/"+filename) total_epochs = filename.split('_')[1].split('.')[0] # take number string from outfile_*.npy files convert_outfile_to_csv(outfile, total_epochs)
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 220, 628, 198, 10379, 268, 1047, 796, 28686, 13, 4868, 15908, 7203, 448, 7753, 4943, 198, 1640, 29472, 287, 1226, 268, 1047, 25, 198, 220, 220, 220, 503, 7753, 796, 45941, 13, 2220, 72...
2.666667
108
import numpy as np from patty.utils import measure_length from numpy.testing import assert_almost_equal def test_centered_line_on_x_axis(): '''Test measure_length function from patty.utils''' line = np.array([[-5., 0, 0], [0, 0, 0], [5., 0, 0]]) expected = 10 length = measure_length(line) assert_a...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 1458, 774, 13, 26791, 1330, 3953, 62, 13664, 198, 6738, 299, 32152, 13, 33407, 1330, 6818, 62, 28177, 62, 40496, 628, 198, 4299, 1332, 62, 38050, 62, 1370, 62, 261, 62, 87, 62, 22704, 33529, ...
2.552326
516
# coding=utf8 from interfacebdd.PickupDAO import PickupDAO from interfacebdd.Connexion import Connexion from system.Position import Position from system.Pickup import Pickup from flask import Blueprint, request, json import pymysql pickup_api = Blueprint('pickup_api', __name__ ) @pickup_api.route('/pickup/all/') de...
[ 2, 19617, 28, 40477, 23, 198, 198, 6738, 7071, 65, 1860, 13, 31686, 929, 5631, 46, 1330, 12346, 929, 5631, 46, 198, 6738, 7071, 65, 1860, 13, 3103, 12413, 295, 1330, 1482, 12413, 295, 198, 6738, 1080, 13, 26545, 1330, 23158, 198, 67...
2.029428
3,534
import requests from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.core.oauth2.provider import OAuth2Provider provider_classes = [DiscordProvider]
[ 11748, 7007, 198, 198, 6738, 477, 18439, 13, 14557, 23317, 13, 15234, 4157, 13, 8692, 1330, 32549, 30116, 198, 6738, 477, 18439, 13, 14557, 23317, 13, 15234, 4157, 13, 7295, 13, 12162, 1071, 17, 13, 15234, 1304, 1330, 440, 30515, 17, ...
3.625
56
def mendels_first_law(K, M, N): '''Given: Three positive integers representing a population containing k+m+n organisms: k individuals are homozygous dominant for a factor, m are heterozygous, and n are homozygous recessive Return: The probability that two randomly selected mating organisms will produce an ...
[ 4299, 47618, 1424, 62, 11085, 62, 6270, 7, 42, 11, 337, 11, 399, 2599, 198, 220, 220, 220, 705, 7061, 15056, 25, 7683, 3967, 37014, 10200, 257, 3265, 7268, 479, 10, 76, 10, 77, 20296, 25, 479, 198, 220, 220, 220, 3925, 389, 3488, ...
2.511828
465
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Website Events CRM', 'version': '1.0', 'category': 'Website/Website', 'website': 'https://www.odoo.com/page/events', 'description': "Allow per-order lead creation mode", 'depends': ['ev...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2142, 286, 10529, 2238, 13, 4091, 38559, 24290, 2393, 329, 1336, 6634, 290, 15665, 3307, 13, 198, 198, 90, 198, 220, 220, 220, 705, 3672, 10354, 705, 33420, 18715, ...
2.313559
236
# Generated by Django 2.1.4 on 2019-01-22 13:12 from django.db import migrations, models import django.db.models.deletion import django.utils.timezone
[ 2, 2980, 515, 416, 37770, 362, 13, 16, 13, 19, 319, 13130, 12, 486, 12, 1828, 1511, 25, 1065, 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.886792
53
import math import colorama colorama.init() colors = { "WHITE": 0, "YELLOW": 1, "BLUE": 2, "GREEN": 3, "RED": 4, "PURPLE": 5 } color_strings = { 0: colorama.Fore.WHITE + 'W', 1: colorama.Fore.YELLOW + 'Y', 2: colorama.Fore.BLUE + 'B', 3: colorama.Fore.GREEN + 'G', 4: colora...
[ 11748, 10688, 198, 11748, 3124, 1689, 198, 8043, 1689, 13, 15003, 3419, 198, 198, 4033, 669, 796, 1391, 198, 220, 220, 220, 366, 12418, 12709, 1298, 657, 11, 198, 220, 220, 220, 366, 56, 23304, 3913, 1298, 352, 11, 198, 220, 220, 22...
2.172757
1,505
"""Unit test package for pykitopen."""
[ 37811, 26453, 1332, 5301, 329, 12972, 15813, 9654, 526, 15931, 198 ]
3.545455
11
import sys import os sys.path.insert(0, os.path.dirname(__file__) + '/..') import django import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "monkeys.settings") import django django.setup() from typer.models import Die, DieImage, TypedDie ''' http://cs.sipr0n.org/typer/Sega_315-5571_xpol/adminSummary/467/ xwin...
[ 11748, 25064, 198, 11748, 28686, 198, 17597, 13, 6978, 13, 28463, 7, 15, 11, 28686, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 8, 1343, 31051, 492, 11537, 198, 198, 11748, 42625, 14208, 198, 11748, 28686, 198, 418, 13, 268, 2268, ...
2.241497
294
#! /usr/bin/python # -*- coding: utf-8 -*- import subprocess import traceback from loguru import logger # logger = logging.getLogger() import datetime import os import os.path as op from io3d.network import download_file # def write_update_info_in_file(): # import misc # now = datetime.datetime.now() def ...
[ 2, 0, 1220, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 850, 14681, 198, 11748, 12854, 1891, 628, 198, 6738, 2604, 14717, 1330, 49706, 198, 2, 49706, 796, 18931, 13, ...
2.100199
1,507
from terra_sdk.client.lcd import LCDClient, PaginationOptions main()
[ 6738, 1059, 430, 62, 21282, 74, 13, 16366, 13, 75, 10210, 1330, 23598, 11792, 11, 31525, 1883, 29046, 628, 198, 198, 12417, 3419, 198 ]
3
24
import datetime import os import pytest from faker import Faker from odetam import DetaModel from odetam.exceptions import ItemNotFound INTEGRATION_TEST_KEY = os.getenv("INTEGRATION_TEST_KEY") @pytest.fixture @pytest.fixture @pytest.fixture @pytest.fixture @pytest.fixture @pytest.mark.skipif( not os...
[ 11748, 4818, 8079, 198, 11748, 28686, 198, 198, 11748, 12972, 9288, 198, 6738, 277, 3110, 1330, 376, 3110, 198, 198, 6738, 267, 15255, 321, 1330, 4614, 64, 17633, 198, 6738, 267, 15255, 321, 13, 1069, 11755, 1330, 9097, 3673, 21077, 198...
2.751342
559
#!/usr/bin/env python3 # run every 6 hours from controller import get_logger from controller.config import DEVICES_ENDPOINT, SLOTS_ENDPOINT from controller.plants import Plants from social.arduino import Devices, Slots from database import DatabasePlant, DatabaseArduino logger = get_logger("UserData") arduinos = Devi...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 1057, 790, 718, 2250, 198, 6738, 10444, 1330, 651, 62, 6404, 1362, 198, 6738, 10444, 13, 11250, 1330, 5550, 53, 34444, 62, 1677, 6322, 46, 12394, 11, 12419, 33472, 62, 1677, 6...
2.715789
285
# Copyright 2020 Petuum, 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/licenses/LICENSE-2.0 # # Unless required by applicable law or...
[ 2, 15069, 12131, 4767, 13814, 11, 3457, 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, ...
3.717277
191
#! /usr/bin/env python # coding: utf-8 # Playmemories Homeの代わり。 # fileの作成日ごとにファイルを作成する。 from __future__ import print_function import os import os.path as op import datetime import argparse import glob import shutil if __name__ == "__main__": main()
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 3811, 11883, 1749, 5995, 5641, 47987, 1792, 237, 28255, 16764, 198, 2, 2393, 5641, 43291, 22755, 238, 33768, 98, 2515, 242, 30201, 28618, 41...
2.342342
111
# -*- coding: utf-8 -*- # Copyright (c) 2016 Mirantis Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 357, 66, 8, 1584, 7381, 20836, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, ...
3.398305
236
# Form implementation generated from reading ui file 'c:\Users\user\Documents\GitHub\PY_Data_Generator\ui\tela.ui' # # Created by: PyQt6 UI code generator 6.0.3 # # WARNING: Any manual changes made to this file will be lost when pyuic6 is # run again. Do not edit this file unless you know what you are doing. from Py...
[ 2, 5178, 7822, 7560, 422, 3555, 334, 72, 2393, 705, 66, 7479, 14490, 59, 7220, 59, 38354, 59, 38, 270, 16066, 59, 47, 56, 62, 6601, 62, 8645, 1352, 59, 9019, 59, 83, 10304, 13, 9019, 6, 198, 2, 198, 2, 15622, 416, 25, 9485, 48...
3.051282
117
from user_tracker import * sys.path.insert(0, './Province') from province_point import * from geopy.distance import vincenty import operator def filterPlaneUser(userList, pvcmDict): 'Reture dict list of user while also injected filteredTime list field' filtUser = {} for user in userList: if len(use...
[ 6738, 2836, 62, 2213, 10735, 1330, 1635, 198, 17597, 13, 6978, 13, 28463, 7, 15, 11, 705, 19571, 15946, 924, 11537, 198, 6738, 8473, 62, 4122, 1330, 1635, 198, 6738, 4903, 11081, 13, 30246, 1330, 410, 42816, 88, 198, 11748, 10088, 198...
2.462848
646
from __future__ import unicode_literals from django.test import TestCase from .models import Product from django_postgres_extensions.models.functions import * from django_postgres_extensions.models.expressions import Key, Keys from django.db.utils import ProgrammingError from django.db import transaction
[ 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 764, 27530, 1330, 8721, 198, 6738, 42625, 14208, 62, 7353, 34239, 62, 2302, 5736, 13, 27530, 13, 12543, 27...
3.743902
82
#!/usr/bin/python3 """ Created on 19-2-13 @project:bert @ide:PyCharm @author: hesheng """ # from flask.app import import os import tensorflow as tf import modeling from sentiment_generate import model_fn_builder from tokenization import FullTokenizer #input:[(str_mask_tokens,str_labels),list_str_mask_words] #...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 37811, 198, 41972, 319, 678, 12, 17, 12, 1485, 198, 31, 16302, 25, 4835, 220, 198, 31, 485, 25, 20519, 1925, 1670, 198, 31, 9800, 25, 339, 7091, 782, 198, 37811, 198, 2, 422, 42903, ...
2.54023
174
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 12131, 3012, 11419, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2...
2.579882
1,521
# copy yours in keys & token, once you need to use twitter API # If necessary, don't forget regenerating the keys and secrets ACCESS_TOKEN = "" ACCESS_TOKEN_SECRET = "" CONSUMER_KEY = "" CONSUMER_SECRET = ""
[ 2, 4866, 12431, 287, 8251, 1222, 11241, 11, 1752, 345, 761, 284, 779, 17044, 7824, 198, 2, 1002, 3306, 11, 836, 470, 6044, 16935, 803, 262, 8251, 290, 13141, 198, 198, 26861, 7597, 62, 10468, 43959, 796, 13538, 198, 26861, 7597, 62, ...
3.028986
69
nombre_piezas_fen = { 'peon': 'p', 'caballo': 'n', 'alfil': 'b', 'torre': 'r', 'rey': 'k', 'dama': 'q' } notacion_piezas = { 'peon': 'P', ...
[ 77, 2381, 260, 62, 21749, 89, 292, 62, 41037, 796, 1391, 220, 220, 220, 220, 220, 220, 705, 431, 261, 10354, 705, 79, 3256, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220,...
1.224221
834
import json from boto.exception import BotoServerError from cloudforge.watcher import Watcher
[ 11748, 33918, 198, 6738, 275, 2069, 13, 1069, 4516, 1330, 347, 2069, 10697, 12331, 198, 6738, 6279, 30293, 13, 86, 34734, 1330, 12242, 2044, 628, 628, 628, 628, 628, 628, 628, 198 ]
3.375
32
from django import forms from django.contrib import admin from django.forms.models import BaseModelFormSet from django.contrib.sites.models import Site from popularity.models import TopList, TopListItem, Section from etc.entities import obj_to_type from cust_admin.views.main import ExtChangeList from cust_admin.widget...
[ 6738, 42625, 14208, 1330, 5107, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 6738, 42625, 14208, 13, 23914, 13, 27530, 1330, 7308, 17633, 8479, 7248, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 49315, 13, 27530, 1330, ...
3.24
200
# -*- coding: utf-8 -*- """ SALTS XBMC Addon Copyright (C) 2014 tknorris This program 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) a...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 220, 220, 220, 42475, 4694, 1395, 33, 9655, 3060, 261, 198, 220, 220, 220, 15069, 357, 34, 8, 1946, 256, 74, 13099, 2442, 628, 220, 220, 220, 770, 1430, ...
3.224924
329
#!/usr/bin/env python """ Django SECRET_KEY generator. """ from django.utils.crypto import get_random_string chars = 'abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)' print(get_random_string(50, chars))
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 35, 73, 14208, 10729, 26087, 62, 20373, 17301, 13, 198, 37811, 198, 6738, 42625, 14208, 13, 26791, 13, 29609, 78, 1330, 651, 62, 25120, 62, 8841, 198, 198, 354, 945, 796, ...
2.352273
88
#!/usr/bin/env python __author__ = "Gabriel Bassett" """ AUTHOR: {0} DATE: <DATE> DEPENDENCIES: <a list of modules requiring installation> Copyright <YEAR> {0} LICENSE: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this wo...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 834, 9800, 834, 796, 366, 46079, 11719, 19829, 3087, 1, 198, 37811, 198, 44746, 25, 1391, 15, 92, 198, 360, 6158, 25, 1279, 35, 6158, 29, 198, 5550, 47, 10619, 24181, 11015, 25,...
3.216792
798
import pandas as pd import numpy as np from .icd_parsing_functions import get_code_categories, charlson_calc def get_regular_timeseries(timestamp_timeseries: pd.DataFrame, id_vars, feature_names) -> pd.DataFrame: """converts a timeseries with each variable recorded as value - datetime into hourly (or othe...
[ 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 764, 291, 67, 62, 79, 945, 278, 62, 12543, 2733, 1330, 651, 62, 8189, 62, 66, 26129, 11, 1149, 75, 1559, 62, 9948, 66, 628, 628, 198, 4299, ...
2.495935
492
import numpy as np import os import pickle labels = ["airplane", "automobile", "bird", "cat", "deer", "dog", "frog", "horse", "ship", "truck"] load_cifar10()
[ 11748, 299, 32152, 355, 45941, 198, 198, 11748, 28686, 198, 11748, 2298, 293, 198, 198, 23912, 1424, 796, 14631, 958, 14382, 1600, 366, 2306, 296, 3579, 1600, 366, 16944, 1600, 366, 9246, 1600, 366, 2934, 263, 1600, 198, 220, 220, 220, ...
2.272727
77
from django.urls import path from . import views app_name = 'commit' urlpatterns = [ path('history/', views.commitMessageHistory.as_view(), name='commitList'), path('commitmessage/', views.CommitMessage.as_view(), name='commitMessage'), path('commitcheck/', views.commitcheck.as_view(), name='commitcheck'...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 764, 1330, 5009, 198, 198, 1324, 62, 3672, 796, 705, 41509, 6, 198, 198, 6371, 33279, 82, 796, 685, 628, 220, 220, 220, 3108, 10786, 23569, 14, 3256, 5009, 13, 41509, 12837, 1...
3.075472
106
import unittest import time import os import logging import requests import jsonpickle import mock import shutil from arteria.testhelpers import TestFunctionDelta, BaseRestTest from arteria.web.state import State log = logging.getLogger(__name__) if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 11748, 640, 198, 11748, 28686, 198, 11748, 18931, 198, 11748, 7007, 198, 11748, 33918, 27729, 293, 198, 11748, 15290, 198, 11748, 4423, 346, 198, 198, 6738, 30675, 544, 13, 9288, 16794, 364, 1330, 6208, 22203, ...
3.225806
93
import pytest from aiorm.backends.mysql.compiler import MySQLQueryCompiler from aiorm.orm.query import _foregin_fields, SelectQuery from sample.models import DemoUserProfile, DemoUser, DemoPermission @pytest.fixture()
[ 11748, 12972, 9288, 198, 198, 6738, 257, 72, 579, 13, 1891, 2412, 13, 28744, 13976, 13, 5589, 5329, 1330, 33476, 20746, 7293, 5329, 198, 6738, 257, 72, 579, 13, 579, 13, 22766, 1330, 4808, 754, 1655, 62, 25747, 11, 9683, 20746, 198, ...
3.257143
70
#!/usr/bin/env python #################### # Required Modules # #################### # Generic import json import os import pkg_resources from collections import OrderedDict from glob import glob # Libs # Custom ################## # Configurations # ################## TEMPLATE_DIR = pkg_resources.resource_filen...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 14468, 4242, 198, 2, 20906, 3401, 5028, 1303, 198, 14468, 4242, 198, 198, 2, 42044, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 279, 10025, 62, 37540, 198, 6738, 17268, 1330, ...
2.779245
530
#!/usr/bin/env python3 import sys import os from os import path # base dir of sqlx workspace dir_workspace = path.dirname(path.dirname(path.realpath(__file__))) # dir of tests dir_tests = path.join(dir_workspace, "tests") # extend import path to tests/ sys.path.append(dir_tests) import subprocess import time impor...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 25064, 198, 11748, 28686, 198, 6738, 28686, 1330, 3108, 198, 198, 2, 2779, 26672, 286, 44161, 87, 44573, 198, 15908, 62, 5225, 10223, 796, 3108, 13, 15908, 3672, 7, 697...
2.925781
256
from transformers import BertPreTrainedModel, BertModel import torch import torch.nn as nn import numpy as np from config import MHS_ENTITY device = torch.device("cuda:0") if torch.cuda.is_available() else torch.device("cpu")
[ 6738, 6121, 364, 1330, 22108, 6719, 2898, 1328, 17633, 11, 22108, 17633, 201, 198, 11748, 28034, 201, 198, 11748, 28034, 13, 20471, 355, 299, 77, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 6738, 4566, 1330, 337, 7998, 62, 3525, ...
3.078947
76
# Generated by Django 3.0.4 on 2020-07-11 15:34 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 19, 319, 12131, 12, 2998, 12, 1157, 1315, 25, 2682, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
import base64 import signxml from cryptography import x509 from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives.asymmetric import ec from lxml import etree from OpenSSL import crypto XML_NAMESPACES = { "ds": "http://www.w3.org/2000/09/xmldsig#", "dsig11": "http://www.w3.org/20...
[ 11748, 2779, 2414, 198, 198, 11748, 1051, 19875, 198, 6738, 45898, 1330, 2124, 29022, 198, 6738, 45898, 13, 71, 1031, 6759, 13, 19795, 20288, 1330, 46621, 198, 6738, 45898, 13, 71, 1031, 6759, 13, 19795, 20288, 13, 4107, 3020, 19482, 13...
2.234207
2,327
''' wrapper for ReLU ''' import torch import torch.nn as nn from torch.nn import Parameter import torch.nn.functional as F
[ 7061, 6, 198, 48553, 329, 797, 41596, 198, 7061, 6, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 28034, 13, 20471, 1330, 25139, 2357, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 628 ]
3.125
40