content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import traceback import urllib2 from mangrove.contrib.deletion import ENTITY_DELETION_FORM_CODE from mangrove.datastore.database import get_db_manager from mangrove.form_model.form_model import get_form_model_by_code from datetime import datetime from migration.couch.utils import configure_csv, mark_as_completed, shoul...
[ 11748, 12854, 1891, 198, 11748, 2956, 297, 571, 17, 198, 6738, 582, 27333, 303, 13, 3642, 822, 13, 2934, 1616, 295, 1330, 47353, 9050, 62, 7206, 2538, 24131, 62, 21389, 62, 34, 16820, 198, 6738, 582, 27333, 303, 13, 19608, 459, 382, ...
2.784946
186
# Copyright 2020 Michael Janschek # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
[ 2, 15069, 12131, 3899, 449, 504, 2395, 74, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, ...
2.227253
2,341
# main code that contains the neural network setup # policy + critic updates # see ddpg.py for other details in the network from ddpg import DDPGAgent import torch.nn.functional as F import torch from utilities import soft_update, transpose_to_tensor, transpose_list import numpy as np #device = torch.device("cuda" if ...
[ 2, 1388, 2438, 326, 4909, 262, 17019, 3127, 9058, 198, 2, 2450, 1343, 4014, 5992, 198, 2, 766, 49427, 6024, 13, 9078, 329, 584, 3307, 287, 262, 3127, 198, 198, 6738, 49427, 6024, 1330, 360, 6322, 9273, 6783, 198, 11748, 28034, 13, 2...
2.786667
150
from dataclasses import dataclass from typing import ( Optional, ) import pytorch_lightning as pl from hydra.core.config_store import ConfigStore from omegaconf import MISSING from torch.utils.data import DataLoader from torchaudio.datasets import LibriMix from torchrecipes.core.conf import DataModuleConf from tor...
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 19720, 1330, 357, 198, 220, 220, 220, 32233, 11, 198, 8, 198, 198, 11748, 12972, 13165, 354, 62, 2971, 768, 355, 458, 198, 6738, 25039, 13, 7295, 13, 11250, 62, 8095, 1330, ...
2.920354
226
from typing import Optional, TypedDict, Union
[ 6738, 19720, 1330, 32233, 11, 17134, 276, 35, 713, 11, 4479, 628, 628, 628 ]
3.642857
14
import math # We do a straightforward computation thanks to Python's built-in arbitrary precision integer type. def problem020(): """ n! means n × (n − 1) × ... × 3 × 2 × 1 For example, 10! = 10 × 9 × ... × 3 × 2 × 1 = 3628800, and the sum of the digits in the number 10! is 3 + 6 + 2 + 8 + 8 ...
[ 11748, 10688, 628, 198, 2, 775, 466, 257, 15836, 29964, 5176, 284, 11361, 338, 3170, 12, 259, 14977, 15440, 18253, 2099, 13, 198, 4299, 1917, 33618, 33529, 198, 220, 220, 220, 37227, 628, 198, 220, 220, 220, 299, 0, 1724, 299, 13958, ...
2.574163
209
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright Kitware Inc. and Contributors # Distributed under the Apache License, 2.0 (apache.org/licenses/LICENSE-2.0) # See accompanying Copyright.txt and LICENSE files for details ##########...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 29113, 29113, 7804, 4242, 21017, 198, 2, 15069, 10897, 1574, 3457, 13, 290, 25767, 669, 198, 2, 4307, 6169, 739, ...
2.360973
1,809
# -*- coding: utf-8 -*- from setuptools import setup try: # Pour pip >= 10 from pip._internal.req import parse_requirements except ImportError: # For pip <= 9 from pip.req import parse_requirements # Based on http://peterdowns.com/posts/first-time-with-pypi.html __version__ = '0.0.5' # Should match with __...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 28311, 25, 220, 1303, 39128, 7347, 18189, 838, 198, 220, 220, 220, 422, 7347, 13557, 32538, 13, 42180, 1330, 21136, 62, 8897, 1...
2.885526
760
""" Test profiles app """ from django.urls import reverse from authors.apps.profiles.tests.test_base import BaseTestCase from .test_data import (new_user, update_profile) class TestProfile(BaseTestCase): """Handles tests for the user profile feature/app""" def test_get_user_profile(self): """This t...
[ 37811, 198, 14402, 16545, 598, 198, 37811, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 198, 6738, 7035, 13, 18211, 13, 5577, 2915, 13, 41989, 13, 9288, 62, 8692, 1330, 7308, 14402, 20448, 198, 198, 6738, 764, 9288, 62, 789...
2.655271
1,404
""" Given an array A of non-negative integers, half of the integers in A are odd, and half of the integers are even. Sort the array so that whenever A[i] is odd, i is odd; and whenever A[i] is even, i is even. You may return any answer array that satisfies this condition. Example: Input: ...
[ 37811, 198, 220, 220, 220, 11259, 281, 7177, 317, 286, 1729, 12, 31591, 37014, 11, 2063, 286, 262, 37014, 287, 317, 389, 220, 198, 220, 220, 220, 5629, 11, 290, 2063, 286, 262, 37014, 389, 772, 13, 198, 220, 220, 220, 33947, 262, ...
2.609524
315
import mysql.connector mydb = mysql.connector.connect( host="localhost", user="root", passwd="root", auth_plugin='mysql_native_password', database='project' ) print(mydb) mycursor = mydb.cursor() thisdict = { "brand": 6, "model": 8, "year": 10 } print(thisdict) for i in thisdic...
[ 11748, 48761, 13, 8443, 273, 201, 198, 201, 198, 1820, 9945, 796, 48761, 13, 8443, 273, 13, 8443, 7, 201, 198, 220, 2583, 2625, 36750, 1600, 201, 198, 220, 2836, 2625, 15763, 1600, 201, 198, 220, 1208, 16993, 2625, 15763, 1600, 201, ...
2.26749
243
import mechanize if __name__=="__main__": main()
[ 11748, 3962, 1096, 198, 220, 220, 220, 220, 198, 361, 11593, 3672, 834, 855, 1, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419 ]
2.28
25
# -*- coding: utf-8 -*- ## STOLEN from libmagic man page MAGIC_NONE = 0x000000 # No flags MAGIC_DEBUG = 0x000001 # Turn on debugging MAGIC_SYMLINK = 0x000002 # Follow symlinks MAGIC_COMPRESS = 0x000004 # Check inside compressed files MAGIC_DEVICES = 0x000008 # Look at the contents of devices MAGIC_MIME = 0x000010...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2235, 3563, 3535, 1677, 422, 9195, 32707, 582, 2443, 198, 198, 45820, 2149, 62, 45, 11651, 796, 657, 87, 10535, 1303, 1400, 9701, 198, 198, 45820, 2149, 62, 30531, 796, ...
2.706522
460
import os import time import logging import sys from threading import Thread from youtube_transcript_api import YouTubeTranscriptApi from yt_concate.pipeline.steps.step import Step
[ 11748, 28686, 198, 11748, 640, 198, 11748, 18931, 198, 11748, 25064, 198, 198, 6738, 4704, 278, 1330, 14122, 198, 6738, 35116, 62, 7645, 6519, 62, 15042, 1330, 7444, 8291, 6519, 32, 14415, 198, 6738, 331, 83, 62, 1102, 66, 378, 13, 79...
3.588235
51
import unittest from aws_cdk_test_synth.test_synth import TestSynth if __name__ == '__main__': unittest.main()
[ 11748, 555, 715, 395, 198, 6738, 3253, 82, 62, 10210, 74, 62, 9288, 62, 28869, 400, 13, 9288, 62, 28869, 400, 1330, 6208, 29934, 400, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 555, 715, ...
2.416667
48
#! -*- encoding: utf-8 -*- """ Some simple helper scripts to aid in distributed job management. """ from multiprocessing import Process from itertools import islice, product, izip_longest import sqlite3 import datetime import sys import time import numpy as np #dbname = 'fullsupport_temp.db' #conn = sqlite3.connect...
[ 2, 0, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 4366, 2829, 31904, 14750, 284, 6133, 287, 9387, 1693, 4542, 13, 198, 198, 37811, 198, 198, 6738, 18540, 305, 919, 278, 1330, 10854, 198, 6738, 340, 861, ...
2.180831
1,565
import pytest import logging from multiprocessing.process import current_process from threading import current_thread import time logging.basicConfig(filename="log.txt", filemode="w") log = logging.getLogger() log.setLevel(logging.DEBUG) handler = logging.StreamHandler() handler.setLevel(logging.DEBUG) formatter = lo...
[ 11748, 12972, 9288, 198, 11748, 18931, 198, 6738, 18540, 305, 919, 278, 13, 14681, 1330, 1459, 62, 14681, 198, 6738, 4704, 278, 1330, 1459, 62, 16663, 198, 11748, 640, 198, 198, 6404, 2667, 13, 35487, 16934, 7, 34345, 2625, 6404, 13, ...
3.286822
129
import time # class App: import time route = Route() in_route = Bus() while True: main_input = input("(n)ew Route, (s)how, (c)hoose, (q)uit : ") if main_input == "n": route_name = input("Enter route name : ") route.add_route(route_name) for i in range(len(route.all_route)): ...
[ 11748, 640, 628, 628, 198, 2, 1398, 2034, 25, 198, 198, 11748, 640, 198, 198, 38629, 796, 18956, 3419, 198, 259, 62, 38629, 796, 5869, 3419, 198, 4514, 6407, 25, 198, 220, 220, 220, 1388, 62, 15414, 796, 5128, 7203, 7, 77, 8, 413,...
1.928826
843
import re import requests import urllib from UAList import fetchUA, fetchAgent from urllib.parse import quote from urllib.request import urlopen from urllib.error import URLError, HTTPError from termcolor import colored from proxies_list import fetch_proxy from requests.auth import HTTPBasicAuth from pwn import listen ...
[ 11748, 302, 198, 11748, 7007, 198, 11748, 2956, 297, 571, 198, 6738, 471, 1847, 396, 1330, 21207, 34970, 11, 21207, 36772, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 9577, 198, 6738, 2956, 297, 571, 13, 25927, 1330, 19016, 9654, 198, ...
3.549107
224
import os import check_manifest from .base import Tool, Issue IGNORE_MSGS = ( 'lists of files in version control and sdist match', ) class CheckManifestTool(Tool): """ Uses the check-manifest script to detect discrepancies or problems with your project's MANIFEST.in file. """ @classmet...
[ 198, 11748, 28686, 198, 198, 11748, 2198, 62, 805, 8409, 198, 198, 6738, 764, 8692, 1330, 16984, 11, 18232, 628, 198, 16284, 6965, 62, 5653, 14313, 796, 357, 198, 220, 220, 220, 705, 20713, 286, 3696, 287, 2196, 1630, 290, 264, 17080,...
3.035398
113
import sys import pandas as pd import sqlalchemy as sql # Extract data def load_data(messages_filepath, categories_filepath): """ the function creates two DateFrame from two input arguments, and it merges them in one DateFrame :param messages_filepath: the path of messages CSV file :param categories_...
[ 11748, 25064, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 44161, 282, 26599, 355, 44161, 628, 198, 2, 29677, 1366, 198, 4299, 3440, 62, 7890, 7, 37348, 1095, 62, 7753, 6978, 11, 9376, 62, 7753, 6978, 2599, 198, 220, 220, ...
2.79056
678
# This Software (Dioptra) is being made available as a public service by the # National Institute of Standards and Technology (NIST), an Agency of the United # States Department of Commerce. This software was developed in part by employees of # NIST and in part by NIST contractors. Copyright in portions of this softwar...
[ 2, 770, 10442, 357, 18683, 8738, 430, 8, 318, 852, 925, 1695, 355, 257, 1171, 2139, 416, 262, 198, 2, 2351, 5136, 286, 20130, 290, 8987, 357, 45, 8808, 828, 281, 7732, 286, 262, 1578, 198, 2, 1829, 2732, 286, 16127, 13, 770, 3788,...
3.594444
540
import time def get_primes7(n): """ standard optimized sieve algorithm to get a list of prime numbers --- this is the function to compare your functions against! --- """ if n < 2: return [] if n == 2: return [2] # do only odd numbers starting at 3 s = list(range(3, n+1, 2)) # n**0....
[ 11748, 640, 198, 198, 4299, 651, 62, 1050, 999, 22, 7, 77, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 3210, 23392, 264, 12311, 11862, 284, 651, 257, 1351, 286, 6994, 3146, 198, 220, 220, 220, 11420, 428, 318, 262, 2163, ...
2.060386
414
from flask import Flask, request, redirect, url_for, render_template, session, jsonify from flask_api import FlaskAPI, status, exceptions from app.api import api import cgi import os import jinja2 ''' para separar un string por espacios o comas ''' import re env = jinja2.Environment() env.globals.update(zip=zip) app...
[ 6738, 42903, 1330, 46947, 11, 2581, 11, 18941, 11, 19016, 62, 1640, 11, 8543, 62, 28243, 11, 6246, 11, 33918, 1958, 198, 6738, 42903, 62, 15042, 1330, 46947, 17614, 11, 3722, 11, 13269, 198, 6738, 598, 13, 15042, 1330, 40391, 198, 117...
2.338426
1,309
# @Author: Saadettin Yasir AKEL <developer> # @Date: 2019-01-20T18:00:40+03:00 # @Email: yasir@harpiya.com # @Project: Harpiya Kurumsal Yönetim Sistemi # @Filename: moka_success.py # @Last modified by: developer # @Last modified time: 2019-01-20T21:12:47+03:00 # @License: MIT License. See license.txt # @Copyright:...
[ 2, 2488, 13838, 25, 10318, 324, 3087, 259, 25957, 343, 15837, 3698, 1279, 16244, 263, 29, 198, 2, 2488, 10430, 25, 220, 220, 13130, 12, 486, 12, 1238, 51, 1507, 25, 405, 25, 1821, 10, 3070, 25, 405, 198, 2, 2488, 15333, 25, 220, ...
2.493902
164
import unittest from unittest import mock import datetime from pyopentsdb import tsdb from pyopentsdb import errors from pyopentsdb.query import tsdb_query_metrics_validation from tests.testutils import get_mock_requests_post, mock_tsdb_connection_error_post, mock_unexpected_error_post from tests.testutils import Gen...
[ 11748, 555, 715, 395, 198, 6738, 555, 715, 395, 1330, 15290, 198, 11748, 4818, 8079, 198, 198, 6738, 12972, 404, 658, 9945, 1330, 40379, 9945, 198, 6738, 12972, 404, 658, 9945, 1330, 8563, 198, 6738, 12972, 404, 658, 9945, 13, 22766, ...
3.217742
124
# encoding: utf-8 import ckan.lib.base as base CACHE_PARAMETERS = ['__cache', '__no_cache__']
[ 2, 21004, 25, 3384, 69, 12, 23, 198, 198, 11748, 269, 27541, 13, 8019, 13, 8692, 355, 2779, 198, 198, 34, 2246, 13909, 62, 27082, 2390, 2767, 4877, 796, 37250, 834, 23870, 3256, 705, 834, 3919, 62, 23870, 834, 20520, 628 ]
2.365854
41
CONSUMER_KEY = 'paste consumer key here' CONSUMER_SECRET = 'paste consumer secret here' ACCESS_TOKEN = 'paste access token here' ACCESS_TOKEN_SECRET = 'paste access token secret here'
[ 10943, 50, 5883, 1137, 62, 20373, 796, 705, 34274, 7172, 1994, 994, 6, 198, 10943, 50, 5883, 1137, 62, 23683, 26087, 796, 705, 34274, 7172, 3200, 994, 6, 198, 26861, 7597, 62, 10468, 43959, 796, 705, 34274, 1895, 11241, 994, 6, 198, ...
3.155172
58
import pytest from chalice.test import Client from botocore.stub import Stubber @pytest.fixture(autouse=True) @pytest.fixture @pytest.fixture @pytest.fixture
[ 11748, 12972, 9288, 198, 6738, 442, 282, 501, 13, 9288, 1330, 20985, 198, 6738, 10214, 420, 382, 13, 301, 549, 1330, 41135, 527, 628, 198, 31, 9078, 9288, 13, 69, 9602, 7, 2306, 1076, 28, 17821, 8, 628, 198, 31, 9078, 9288, 13, 69...
2.693548
62
######################################## ## Adventure Bot "Dennis" ## ## commands/help.py ## ## Copyright 2012-2013 PariahSoft LLC ## ######################################## ## ********** ## Permission is hereby granted, free of charge, to any person obtaining a copy ## of this software...
[ 29113, 7804, 198, 2235, 9553, 18579, 366, 35, 10679, 1, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 22492, 198, 2235, 9729, 14, 16794, 13, 9078, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220,...
3.380412
970
import sys from setuptools import setup setup( name="micropython-europi", version="0.4.0", description="EuroPi module for MicroPython", long_description="""The EuroPi is a fully user reprogrammable EuroRack module based on the Raspberry Pi Pico, which allows users to process inputs and controls to pro...
[ 11748, 25064, 198, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 2625, 9383, 1773, 7535, 12, 44252, 14415, 1600, 198, 220, 220, 220, 2196, 2625, 15, 13, 19, 13, 15, 1600, 198, 220, 220, 220,...
2.722892
249
from .core import * from .rxtransform import * from .models.all import * from .labeller.all import *
[ 6738, 764, 7295, 1330, 1635, 198, 6738, 764, 81, 742, 26084, 687, 1330, 1635, 198, 6738, 764, 27530, 13, 439, 1330, 1635, 198, 6738, 764, 23912, 12368, 13, 439, 1330, 1635, 198 ]
3.15625
32
import pygame from .settings import * from .player import Player from .udpserver_connection import UDPServerConnection from server.settings import ADDR, PORT pygame.init() username = input("Enter username to join (4 characters max): ") if username == "": print("Empty username!") exit() elif len(username) > 4...
[ 11748, 12972, 6057, 198, 6738, 764, 33692, 1330, 1635, 198, 6738, 764, 7829, 1330, 7853, 198, 6738, 764, 463, 862, 18497, 62, 38659, 1330, 43700, 3705, 18497, 32048, 198, 6738, 4382, 13, 33692, 1330, 5984, 7707, 11, 350, 9863, 628, 198,...
2.457944
428
from .BaseRequest import BaseRequest class AddDefaultPermissionsRequest(BaseRequest): """ Add default permissions request for generating API requests to Tableau Server. Note: update this class in the future to define the valid capability names based on the permissions object passed. :param ts_connect...
[ 6738, 764, 14881, 18453, 1330, 7308, 18453, 628, 198, 4871, 3060, 19463, 5990, 8481, 18453, 7, 14881, 18453, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 3060, 4277, 21627, 2581, 329, 15453, 7824, 7007, 284, 8655, 559, 9652, 13,...
2.712644
348
import os import glob import pandas as pd file_pattern = ':dir/*:year.csv' proc_dir = 'processed' buoys_file = os.path.join(proc_dir, 'icoads_buoys_ships.csv') years = ['2015'] data = None if not os.path.isdir(proc_dir): os.mkdir(proc_dir) for year in years: print('Processing year', year) pattern = fil...
[ 11748, 28686, 198, 11748, 15095, 198, 11748, 19798, 292, 355, 279, 67, 628, 198, 7753, 62, 33279, 796, 705, 25, 15908, 15211, 25, 1941, 13, 40664, 6, 198, 36942, 62, 15908, 796, 705, 14681, 276, 6, 198, 11110, 19417, 62, 7753, 796, ...
2.159864
588
#!/usr/bin/env python3 # Software License Agreement (BSD License) # # Copyright (c) 2020, UFACTORY, Inc. # All rights reserved. # # Author: Vinman <vinman.wen@ufactory.cc> <vinman.cub@gmail.com> import os import math import time import warnings from collections.abc import Iterable from ..core.config.x_config import XC...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 10442, 13789, 12729, 357, 21800, 13789, 8, 198, 2, 198, 2, 15069, 357, 66, 8, 12131, 11, 471, 37, 10659, 15513, 11, 3457, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2...
3.098684
304
# Base class for scalar quantities (single value evolving in time) # import matplotlib.pyplot as plt import numpy as np from . OutputException import OutputException from . UnknownQuantity import UnknownQuantity
[ 2, 7308, 1398, 329, 16578, 283, 17794, 357, 29762, 1988, 21568, 287, 640, 8, 198, 2, 198, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6738, 764, 25235, 16922, 1330, 25235...
4.09434
53
from logging.config import dictConfig import yaml from pkg_resources import resource_stream from workflow import logger, __version__ from workflow.builder import process_project from workflow.config import Config dictConfig(yaml.load(resource_stream(__name__, 'log.yml'))) if __name__ == '__main__': c = Config()...
[ 6738, 18931, 13, 11250, 1330, 8633, 16934, 198, 198, 11748, 331, 43695, 198, 6738, 279, 10025, 62, 37540, 1330, 8271, 62, 5532, 198, 198, 6738, 30798, 1330, 49706, 11, 11593, 9641, 834, 198, 6738, 30798, 13, 38272, 1330, 1429, 62, 16302...
3.224359
156
import os,sys,random,json,timeit from collections import defaultdict filename_dict = dict() filelist = [] feature_weights = defaultdict(int) avg_weights = defaultdict(int) json_dict = defaultdict(int) if __name__ == '__main__': start = timeit.default_timer() with open('train.json',mode='r',...
[ 11748, 28686, 11, 17597, 11, 25120, 11, 17752, 11, 2435, 270, 201, 198, 6738, 17268, 1330, 4277, 11600, 201, 198, 201, 198, 34345, 62, 11600, 796, 8633, 3419, 201, 198, 7753, 4868, 796, 17635, 201, 198, 30053, 62, 43775, 796, 4277, 11...
2.084586
532
from .default import Experiment coil20 = Experiment( arch='alexnet', hidden_dim=1024, verbose=True, log_dir='./logs/mytest', device='cuda', extra_record=True, opt='adam', epochs=50, lr=1e-3, batch_size=24, cluster_hidden_dim=512, ds_name='coil-20', img_size=128, ...
[ 6738, 764, 12286, 1330, 29544, 198, 198, 1073, 346, 1238, 796, 29544, 7, 198, 220, 220, 220, 3934, 11639, 1000, 87, 3262, 3256, 198, 220, 220, 220, 7104, 62, 27740, 28, 35500, 11, 198, 220, 220, 220, 15942, 577, 28, 17821, 11, 198, ...
2.080645
310
from pyramid.authentication import AuthTktAuthenticationPolicy from pyramid.authorization import ACLAuthorizationPolicy from .models import User
[ 6738, 27944, 13, 41299, 3299, 1330, 26828, 51, 21841, 47649, 3299, 36727, 198, 6738, 27944, 13, 9800, 1634, 1330, 17382, 13838, 1634, 36727, 198, 198, 6738, 764, 27530, 1330, 11787, 628 ]
4.741935
31
import argparse import json from wechat import WeChat if __name__ == '__main__': main()
[ 11748, 1822, 29572, 198, 11748, 33918, 198, 198, 6738, 356, 17006, 1330, 775, 30820, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
2.848485
33
# Overrides from .base import * # noqa: F401 SECRET_KEY = 'za#q^j+$6frru&3*)b0yl=#9wmue%rf38akqux(fjvl-&zy@_l' DEBUG = True ALLOWED_HOSTS = ['*'] RUNSERVERPLUS_SERVER_ADDRESS_PORT = '0.0.0.0:8000' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': os.environ.get('DATABASE...
[ 2, 3827, 81, 1460, 198, 6738, 764, 8692, 1330, 1635, 220, 1303, 645, 20402, 25, 376, 21844, 198, 198, 23683, 26087, 62, 20373, 796, 705, 4496, 2, 80, 61, 73, 10, 3, 21, 8310, 622, 5, 18, 28104, 65, 15, 2645, 46249, 24, 26377, 51...
1.886918
451
# Author: Aniruddha Gokhale # Created: Fall 2019 # Modified: Spring 2021 # # Purpose: demonstrate publishing of topic data type using flatbuffers # # Here our topic comprises a sequence number, a timestamp, and a data buffer # of several uint32 numbers (whose value is not relevant to us) # The different packages...
[ 2, 220, 6434, 25, 1052, 343, 4185, 3099, 402, 482, 71, 1000, 198, 2, 220, 15622, 25, 7218, 13130, 198, 2, 220, 40499, 25, 8225, 33448, 198, 2, 198, 2, 220, 32039, 25, 10176, 12407, 286, 7243, 1366, 2099, 1262, 6228, 36873, 364, 19...
3.459627
161
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. import fire import zipfile import requests from tqdm import tqdm from pathlib import Path from loguru import logger if __name__ == "__main__": fire.Fire(GetData)
[ 2, 220, 15069, 357, 66, 8, 5413, 10501, 13, 198, 2, 220, 49962, 739, 262, 17168, 13789, 13, 198, 198, 11748, 2046, 198, 11748, 19974, 7753, 198, 11748, 7007, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 6738, 3108, 8019, 13...
3.266667
75
# coding: utf-8 """Elliptic Curve Signature Algorithms.""" from __future__ import unicode_literals from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives.asymmetric import ec
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 37811, 30639, 10257, 291, 46300, 34894, 978, 7727, 907, 526, 15931, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 628, 198, 6738, 45898, 13, 71, 1031, 6759, 13, 1891, 2412, 1330,...
3.546667
75
# coding=utf-8 # Copyright (c) 2020, NVIDIA CORPORATION. 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 re...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 357, 66, 8, 12131, 11, 15127, 23929, 44680, 6234, 13, 220, 1439, 2489, 10395, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198...
2.893029
832
""" Lib load modules for pyndv """ import logging from pyndv import core logging.basicConfig(format="%(levelname)s: %(message)s", level=logging.INFO) __all__ = core
[ 37811, 198, 25835, 3440, 13103, 329, 12972, 358, 85, 198, 37811, 628, 198, 11748, 18931, 198, 198, 6738, 12972, 358, 85, 1330, 4755, 198, 198, 6404, 2667, 13, 35487, 16934, 7, 18982, 2625, 4, 7, 5715, 3672, 8, 82, 25, 4064, 7, 20500...
2.803279
61
import matplotlib matplotlib.use('agg') from glob import glob import numpy as np import matplotlib.pyplot as plt import pandas as pd import matplotlib.patches as mpatches from statsmodels.distributions.empirical_distribution import ECDF from scipy.stats import ranksums from scipy.stats import ttest_ind from scipy.stat...
[ 11748, 2603, 29487, 8019, 198, 6759, 29487, 8019, 13, 1904, 10786, 9460, 11537, 198, 198, 6738, 15095, 1330, 15095, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 19798, 292, ...
2.341011
1,780
from setuptools import setup setup( name='pso-nn', version='', packages=['pso'], package_dir={'': 'src'}, url='', license='', author='Marcio Carvalho', author_email='marweck@gmail.com', description='', check_format=True, # Enable type checking test_mypy=False, # Enab...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 79, 568, 12, 20471, 3256, 198, 220, 220, 220, 2196, 11639, 3256, 198, 220, 220, 220, 10392, 28, 17816, 79, 568, 6, 4357, 198, 220, 220, 220, ...
2.350318
157
from prime import primelist, primecheck from itertools import product from time import time # ATTEMPT 2 (FASTER) t1 = time() prime_list = set(primelist(10**4)) for p1, p2 in product(prime_list, repeat=2): if p2 > p1: if thingy(p1, p2): for p3 in prime_list: if p3 > p2: ...
[ 6738, 6994, 1330, 2684, 46331, 11, 6994, 9122, 198, 6738, 340, 861, 10141, 1330, 1720, 198, 6738, 640, 1330, 640, 628, 198, 198, 2, 26195, 3620, 11571, 362, 357, 37, 1921, 5781, 8, 198, 83, 16, 796, 640, 3419, 198, 35505, 62, 4868, ...
1.480769
1,040
import argparse import matplotlib.pyplot as plt import numpy as np import os import pickle from sklearn.decomposition import PCA import sys import tqdm import yaml import PoseGenerator if __name__=='__main__': main()
[ 11748, 1822, 29572, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 2298, 293, 198, 6738, 1341, 35720, 13, 12501, 296, 9150, 1330, 4217, 32, 198, 11748, 25...
3
74
import pathlib import time import yaml import itertools import copy from jimmy.constructors.math_constructors import build_range, build_lin_space, build_log_space, sum_nodes from jimmy.constructors.path_constructors import home_path, unique_path, make_absolute, join_paths, make_path, find_glob from jimmy.constructors....
[ 11748, 3108, 8019, 198, 11748, 640, 198, 198, 11748, 331, 43695, 198, 11748, 340, 861, 10141, 198, 11748, 4866, 198, 6738, 474, 320, 1820, 13, 41571, 669, 13, 11018, 62, 41571, 669, 1330, 1382, 62, 9521, 11, 1382, 62, 2815, 62, 13200,...
1.856902
594
""" 给定 n 个非负整数 a1,a2,...,an,每个数代表坐标中的一个点 (i, ai) 。在坐标内画 n 条垂直线,垂直线 i 的两个端点分别为 (i, ai) 和 (i, 0)。找出其中的 两条线,使得它们与 x 轴共同构成的容器可以容纳最多的水。 说明:你不能倾斜容器,且 n 的值至少为 2。 Ex: input: [1,8,6,2,5,4,8,3,7] output: 49 """ """ My thinking:采取动态规划的方法,我们在由线段长度构成的数组中使用两个指针,一个放在开始,一个置于末尾。最初我们考虑由最外围两条线段构成的区域。现在如果我 们试图将指向较长线段的指针向内侧移动,矩形区域的面积将受限于较...
[ 37811, 198, 163, 119, 247, 22522, 248, 299, 220, 10310, 103, 165, 251, 252, 164, 112, 253, 46763, 112, 46763, 108, 257, 16, 171, 120, 234, 64, 17, 171, 120, 234, 986, 171, 120, 234, 272, 171, 120, 234, 162, 107, 237, 10310, 103, ...
0.598462
650
import struct from spec_const import SPEC_PTR_SIZE # int # ptr # str
[ 11748, 2878, 198, 198, 6738, 1020, 62, 9979, 1330, 28196, 62, 47, 5446, 62, 33489, 628, 198, 2, 493, 628, 198, 198, 2, 50116, 628, 198, 2, 965, 198 ]
2.655172
29
import random import re import requests import telegram from telegram.ext import run_async import src.config as config from src.commands.khaleesi.khaleesi import Khaleesi from src.commands.khaleesi.random_khaleesi import RandomKhaleesi from src.commands.orzik import orzik_correction from src.commands.welcome import s...
[ 11748, 4738, 198, 11748, 302, 198, 198, 11748, 7007, 198, 11748, 573, 30536, 198, 6738, 573, 30536, 13, 2302, 1330, 1057, 62, 292, 13361, 198, 198, 11748, 12351, 13, 11250, 355, 4566, 198, 6738, 12351, 13, 9503, 1746, 13, 14636, 1000, ...
2.017998
3,556
from transformers import DistilBertForSequenceClassification, DistilBertModel
[ 6738, 6121, 364, 1330, 4307, 346, 33, 861, 1890, 44015, 594, 9487, 2649, 11, 4307, 346, 33, 861, 17633, 198 ]
3.9
20
# -*- coding: utf-8 -*- import sys import Patterns as p import Nodes module = sys.modules[__name__] for i in Nodes.TWO_OP: setattr(module, i[0] + "Expr", BinaryGen(i[0] + "Expr", i[1])) for i in Nodes.ONE_OP: setattr(module, i[0] + "Expr", UnaryGen(i[0] + "Expr", i[1]))
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 25064, 198, 11748, 47020, 355, 279, 198, 11748, 399, 4147, 628, 628, 628, 198, 220, 220, 220, 220, 628, 628, 628, 628, 198, 198, 21412, 796, 25064, 13, 181...
2.068966
145
# b表示bytes print('ABC'.encode('ascii')) print('ABC'.encode('utf-8')) print('中文'.encode('utf-8')) a = b'\xe4\xb8\xad\xff'.decode('utf-8',errors='ignore') print(a) print(len(a),len(b'\xe4\xb8\xad'),len('中'.encode('utf-8'))) print('中文测试正常') # r表示内部字符默认不转义 print(r'seek\t\n\\') print('''line1 line2 line3''') print(r'''line...
[ 2, 275, 26193, 101, 163, 97, 118, 33661, 198, 4798, 10786, 24694, 4458, 268, 8189, 10786, 292, 979, 72, 6, 4008, 198, 4798, 10786, 24694, 4458, 268, 8189, 10786, 40477, 12, 23, 6, 4008, 198, 4798, 10786, 40792, 23877, 229, 4458, 268, ...
1.666667
369
import binascii import datetime import json import os import re import sys from Crypto import Random from Crypto.Cipher import AES from Crypto.Hash import SHA256 from Crypto.Protocol.KDF import PBKDF1 from Crypto.Util import Counter from flask import Flask, request from flask_sqlalchemy import SQLAlchemy BASE_DIR = o...
[ 11748, 9874, 292, 979, 72, 198, 11748, 4818, 8079, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 302, 198, 11748, 25064, 198, 6738, 36579, 1330, 14534, 198, 6738, 36579, 13, 34, 10803, 1330, 34329, 198, 6738, 36579, 13, 26257, 1330, ...
2.12
925
""" Demo/test program for the MQTT utilities. See https://github.com/sensemakersamsterdam/astroplant_explorer """ # (c) Sensemakersams.org and others. See https://github.com/sensemakersamsterdam/astroplant_explorer # Author: Gijs Mos # ## # H O W T O U S E # # Edit configuration.json and pick a nice 'ae_id' for y...
[ 37811, 198, 11522, 78, 14, 9288, 1430, 329, 262, 337, 48, 15751, 20081, 13, 198, 6214, 3740, 1378, 12567, 13, 785, 14, 33819, 6620, 321, 22506, 14, 459, 305, 15060, 62, 20676, 11934, 198, 37811, 198, 198, 2, 357, 66, 8, 24956, 6620,...
3.101542
1,556
import socketserver import errno import struct from codebase.common.member import Member from codebase.server.taskmanager import TaskManager
[ 11748, 37037, 18497, 198, 11748, 11454, 3919, 198, 11748, 2878, 198, 6738, 2438, 8692, 13, 11321, 13, 19522, 1330, 10239, 198, 6738, 2438, 8692, 13, 15388, 13, 35943, 37153, 1330, 15941, 13511, 628 ]
4.30303
33
# -*- coding: utf-8 -*- import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns from bokeh.plotting import figure as _figure,show,Figure from bokeh.models import ColumnDataSource from bokeh.layouts import gridplot from bokeh.palettes import brewer from bokeh.transform import jit...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 384, 397, 1211, 355, ...
1.623404
2,897
from smpp.twisted.protocol import SMPPServerProtocol from smpp.pdu import pdu_types from zope.interface import Interface from twisted.internet.protocol import ServerFactory # Jasmin update: direct import of UsernamePassword instead of cred from twisted.cred.credentials import UsernamePassword from twisted.cre...
[ 6738, 895, 381, 13, 4246, 6347, 13, 11235, 4668, 1330, 311, 7378, 3705, 18497, 19703, 4668, 201, 198, 6738, 895, 381, 13, 79, 646, 1330, 279, 646, 62, 19199, 201, 198, 201, 198, 6738, 1976, 3008, 13, 39994, 1330, 26491, 201, 198, 20...
3.310345
174
#!/usr/bin/env python import math import rospy from geometry_msgs.msg import Pose, Quaternion, Vector3 from moveit_commander import RobotCommander, MoveGroupCommander from tf.transformations import quaternion_from_euler, euler_from_quaternion def euler_to_quaternion(euler): """Converts euler angles to quaternion...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 10688, 198, 11748, 686, 2777, 88, 198, 6738, 22939, 62, 907, 14542, 13, 19662, 1330, 37557, 11, 2264, 9205, 295, 11, 20650, 18, 198, 6738, 1445, 270, 62, 9503, 4066, 1330, ...
2.245195
2,133
import numpy as np from matplotlib import cm import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from scipy.signal import welch from itertools import islice import matplotlib as mpl from scipy.spatial import distance from sklearn.linear_model import LinearRegression from scipy.ndimage import gaussia...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 2603, 29487, 8019, 1330, 12067, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 285, 489, 62, 25981, 74, 896, 13, 76, 29487, 18, 67, 1330, 12176, 274, 18, 35, 198, 6...
3.139344
122
from pyvista import examples dataset = examples.load_airplane() dataset.plot()
[ 6738, 12972, 85, 12523, 1330, 6096, 198, 19608, 292, 316, 796, 6096, 13, 2220, 62, 958, 14382, 3419, 198, 19608, 292, 316, 13, 29487, 3419, 198 ]
3.038462
26
from dataclasses import dataclass from typing import Optional import numpy as np from qtpy.QtWidgets import QWidget from vispy import scene from ..tree import Annotation, Edge from .base_plotter import TreePlotterQWidgetBase __all__ = ["VisPyPlotter"] @dataclass class VisPyPlotter(TreePlotterQWidgetBase): ""...
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 6738, 19720, 1330, 32233, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 10662, 83, 9078, 13, 48, 83, 54, 312, 11407, 1330, 1195, 38300, 198, 6738, 1490, 9078, 1330, 3715, 198, ...
2.150514
1,847
# !/usr/bin/env python3 #-*- coding:utf-8 -*- """ Foreign exange PLN, Euro ,USDT , BTC """ from urllib.request import urlopen from json import load from argparse import ArgumentParser from bittrex.bittrex import Ask if __name__ == '__main__': currencies = all_rates() ask = Ask('usdt-btc') btc = ask.m...
[ 2, 5145, 14, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 12, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 8708, 409, 858, 9297, 45, 11, 1898, 837, 2937, 24544, 837, 14503, 198, 37811, 198, 198, 6738, 295...
2.26969
419
from django.contrib import admin from django.urls import path, include from main_app.views import handler404 as page_not_found from django.conf.urls import url from django.conf import settings from django.views.static import serve from django.views.generic import TemplateView admin.site.site_header = "Developer: Jonak...
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 11, 2291, 198, 6738, 1388, 62, 1324, 13, 33571, 1330, 21360, 26429, 355, 2443, 62, 1662, 62, 9275, 198, 6738, 42625, 14208, 13, 10414, ...
2.706231
337
# -*- coding: utf-8 -*- """reVX PLEXOS unit test module """ from click.testing import CliRunner import os import pytest import pandas as pd from pandas.testing import assert_series_equal import tempfile import traceback from rex.utilities.loggers import LOGGERS from reVX import TESTDATADIR from reVX.utilities.region_...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 260, 53, 55, 350, 2538, 55, 2640, 4326, 1332, 8265, 198, 37811, 198, 6738, 3904, 13, 33407, 1330, 1012, 72, 49493, 198, 11748, 28686, 198, 11748, 12972, 9288, 198...
2.155071
1,193
new='\nNew Message' savefile=open('first.txt','a') savefile.write(new) savefile.close()
[ 3605, 11639, 59, 77, 3791, 16000, 6, 201, 198, 21928, 7753, 28, 9654, 10786, 11085, 13, 14116, 41707, 64, 11537, 201, 198, 21928, 7753, 13, 13564, 7, 3605, 8, 201, 198, 21928, 7753, 13, 19836, 3419, 201, 198 ]
2.421053
38
# -*- coding: utf-8 -*- from . import pos_category from . import product_import_batch from . import product_cierres_import_batch
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 764, 1330, 1426, 62, 22872, 198, 6738, 764, 1330, 1720, 62, 11748, 62, 43501, 198, 6738, 764, 1330, 1720, 62, 66, 959, 411, 62, 11748, 62, 43501 ]
3
43
# -*- coding: utf-8 -*- """ Created on Thu Jan 6 09:24:13 2022 @author: kawta """ import tensorflow.keras import keras import numpy as np from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense, Dropout, Flatten from tensorflow.keras.layers import Conv2D, MaxPooling2D import matplo...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 26223, 2365, 220, 718, 7769, 25, 1731, 25, 1485, 33160, 198, 198, 31, 9800, 25, 479, 707, 8326, 198, 37811, 628, 198, 198, 11748, 11192, 273, 1...
2.73161
2,746
import torch import torch.nn.functional as F import torch_scatter from torch_geometric.nn import global_add_pool, global_mean_pool, global_max_pool, GlobalAttention from conv import GNN_node
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 11748, 28034, 62, 1416, 1436, 198, 6738, 28034, 62, 469, 16996, 13, 20471, 1330, 3298, 62, 2860, 62, 7742, 11, 3298, 62, 32604, 62, 7742, 11, 3298, 62, 9806, 62, ...
3.316667
60
""" Tools to facilitate working with force fields in OpenMM """
[ 37811, 198, 33637, 284, 15570, 1762, 351, 2700, 7032, 287, 4946, 12038, 198, 37811, 198 ]
4.266667
15
# Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None
[ 2, 30396, 329, 1702, 306, 12, 25614, 1351, 13, 198, 2, 1398, 7343, 19667, 25, 198, 2, 220, 220, 220, 220, 825, 11593, 15003, 834, 7, 944, 11, 2124, 2599, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 2116, 13, 2100, 796, 2124,...
2.196721
61
""" Common resource for stomach annotation terms. """ # convention: preferred name, preferred id, followed by any other ids and alternative names stomach_terms = [ ( "body of stomach", "UBERON:0001161", " FMA:14560", "ILX:0724929"), ( "cardia of stomach", "UBERON:0001162", " FMA:14561", "ILX:0729096"), ( "...
[ 37811, 198, 17227, 8271, 329, 11384, 23025, 2846, 13, 198, 37811, 198, 198, 2, 9831, 25, 9871, 1438, 11, 9871, 4686, 11, 3940, 416, 597, 584, 220, 2340, 290, 5559, 3891, 198, 301, 10806, 62, 38707, 796, 685, 198, 220, 220, 220, 357,...
2.582822
652
import numpy as np import torch from mohou.utils import splitting_slices
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 198, 6738, 285, 1219, 280, 13, 26791, 1330, 26021, 62, 82, 677, 274, 628 ]
3.26087
23
''' Coded by Z1 :) More features are underway! Email questions/concerns/feature requests at slitherthuglife@gmail.com or via twitter: @z1rk4 ''' from tweepy.streaming import StreamListener from tweepy import OAuthHandler from tweepy import Stream from tweepy import API from tweepy import Cursor import tweepy import...
[ 7061, 6, 198, 34, 9043, 416, 1168, 16, 14373, 198, 198, 5167, 3033, 389, 17715, 0, 9570, 2683, 14, 1102, 30903, 82, 14, 30053, 7007, 220, 198, 265, 1017, 1555, 400, 1018, 6042, 31, 14816, 13, 785, 393, 2884, 17044, 25, 2488, 89, 1...
1.954802
3,009
# # __COPYRIGHT__ # # 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, merge, publish, # distribute, sublicen...
[ 2, 198, 2, 11593, 34, 3185, 38162, 9947, 834, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 198, 2, 257, 4866, 286, 428, 3788, 290, 3917, 10314, 3696, 357, 1169, 198, 2, 366, 25423, ...
2.366044
13,553
# !/usr/bin/env python # -*- coding: utf-8 -*- # ====================================================================================================================== # The MIT License (MIT) # ====================================================================================================================== # Copyr...
[ 2, 5145, 14, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 38093, 10052, 4770, 1421, 28, 198, 2, 383, 17168, 13789, 357, 36393, 8, 198, 2, 38093, 10052, 4770, 1421, 28, ...
5.166667
126
from interpreter import Interpreter interpreter = Interpreter() print(interpreter.evaluate_expression("ap send ( 2 , 1 , ( ) )").print()) print( interpreter.evaluate_expression( "ap send ( 3 , 1 , ( 1 , 2 , 3 , 4 ) )").print()) print(interpreter.evaluate_expression("ap send ( 4 , 1 , ( ) )").print())
[ 6738, 28846, 1330, 4225, 3866, 353, 198, 198, 3849, 3866, 353, 796, 4225, 3866, 353, 3419, 198, 198, 4798, 7, 3849, 3866, 353, 13, 49786, 62, 38011, 7203, 499, 3758, 357, 362, 837, 352, 837, 357, 1267, 1267, 11074, 4798, 28955, 198, ...
2.908257
109
from django.apps import AppConfig from django.utils.translation import gettext_lazy as _
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 651, 5239, 62, 75, 12582, 355, 4808, 198 ]
3.56
25
import os basedir = os.path.abspath(os.path.dirname(__file__))
[ 11748, 28686, 198, 198, 3106, 343, 796, 28686, 13, 6978, 13, 397, 2777, 776, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 4008, 198 ]
2.37037
27
#!/usr/bin/python try: from gpxpy import gpx except ImportError: print("gpxpy not found - please run: pip install gpxpy") sys.exit()
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 28311, 25, 198, 220, 220, 220, 422, 308, 8416, 9078, 1330, 308, 8416, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 3601, 7203, 70, 8416, 9078, 407, 1043, 532, 3387, 1057, 25, 7347...
2.561404
57
import sys, os from FlokAlgorithmLocal import FlokDataFrame, FlokAlgorithmLocal import json import cv2 #在flok流程中会执行这个main函数 if __name__ == "__main__": all_info = json.loads(sys.argv[1]) # all_info = { # "input": ["data/test.jpg"], # "inputFormat": ["jpg"], # "inputLocation":[...
[ 11748, 25064, 11, 28686, 201, 198, 6738, 1610, 482, 2348, 42289, 14565, 1330, 1610, 482, 6601, 19778, 11, 1610, 482, 2348, 42289, 14565, 201, 198, 11748, 33918, 201, 198, 11748, 269, 85, 17, 201, 198, 2, 28839, 101, 2704, 482, 38184, ...
2.05802
586
from configs.pathConfig import DATABASE_PATH from peewee import ( SqliteDatabase, Model, IntegerField ) ''' UserLevel表,用于管理用户权限等级 ''' DB = SqliteDatabase(DATABASE_PATH)
[ 6738, 4566, 82, 13, 6978, 16934, 1330, 360, 1404, 6242, 11159, 62, 34219, 198, 6738, 613, 413, 1453, 1330, 357, 198, 220, 220, 220, 311, 13976, 578, 38105, 11, 198, 220, 220, 220, 9104, 11, 198, 220, 220, 220, 34142, 15878, 198, 8, ...
1.858586
99
from flask import ( render_template, Response, redirect, jsonify, request, url_for, Flask, g ) from flask_jwt_extended import ( unset_access_cookies, create_access_token, set_access_cookies, unset_jwt_cookies, get_jwt_identity, jwt_required, jwt_manager, ...
[ 6738, 42903, 1330, 357, 198, 220, 220, 220, 8543, 62, 28243, 11, 198, 220, 220, 220, 18261, 11, 198, 220, 220, 220, 18941, 11, 198, 220, 220, 220, 33918, 1958, 11, 220, 198, 220, 220, 220, 2581, 11, 198, 220, 220, 220, 19016, 62, ...
2.210954
10,225
#Copyright (c) 2020 Jan Kiefer #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...
[ 2, 15269, 357, 66, 8, 12131, 2365, 509, 2086, 263, 198, 2, 10970, 47466, 3180, 36592, 2389, 1961, 366, 1921, 3180, 1600, 42881, 34764, 56, 3963, 15529, 509, 12115, 11, 7788, 32761, 6375, 198, 2, 3955, 49094, 11, 47783, 2751, 21728, 56...
3.19375
160
soma = 0 for n in range (85,908): if n%2==0: print(n) soma+=n print ("Soma:",soma)
[ 82, 6086, 796, 657, 198, 1640, 299, 287, 2837, 357, 5332, 11, 24, 2919, 2599, 198, 220, 220, 220, 611, 299, 4, 17, 855, 15, 25, 198, 220, 220, 220, 220, 220, 220, 220, 3601, 7, 77, 8, 198, 220, 220, 220, 220, 220, 220, 220, ...
1.608696
69
i = input("Enter the number : ") print("Sum of first and last digit of number =", int(i[0]) + int(i[-1]))
[ 72, 796, 5128, 7203, 17469, 262, 1271, 1058, 366, 8, 198, 4798, 7203, 13065, 286, 717, 290, 938, 16839, 286, 1271, 796, 1600, 493, 7, 72, 58, 15, 12962, 1343, 493, 7, 72, 58, 12, 16, 60, 4008, 198 ]
2.717949
39
"""scons.Node.FS File system nodes. These Nodes represent the canonical external objects that people think of when they think of building software: files and directories. This holds a "default_fs" variable that should be initialized with an FS that can be used by scripts or modules looking for the canonical default....
[ 37811, 1416, 684, 13, 19667, 13, 10652, 198, 198, 8979, 1080, 13760, 13, 198, 198, 4711, 399, 4147, 2380, 262, 40091, 7097, 5563, 326, 661, 892, 198, 1659, 618, 484, 892, 286, 2615, 3788, 25, 3696, 290, 29196, 13, 198, 198, 1212, 66...
2.315287
29,091
import argparse import json import os import pandas as pd import requests import sys import numpy as np import time from pyhdf.SD import SD, SDC from typing import Iterable, Union from io import StringIO from shapely.geometry import shape, Point MIN_LAT_KEY = "min_lat" MAX_LAT_KEY = "max_lat" MIN_LON_...
[ 11748, 1822, 29572, 201, 198, 11748, 33918, 201, 198, 11748, 28686, 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 11748, 7007, 201, 198, 11748, 25064, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 640, 201, 198, 201, ...
2.270906
5,142
#!/usr/bin/python # -*- coding: utf-8 -*- """ @Project: wgcpy @File Name: gen_pmml_model.py @Author: weiguang @Date: 2021/6/28 """ import joblib from wgcpy.utils.ext_fn import * from .dz_eval import * from lightgbm import LGBMClassifier from xgboost import XGBClassifier from sklearn.linear_mod...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 31, 16775, 25, 220, 220, 220, 220, 220, 220, 266, 36484, 9078, 198, 31, 8979, 6530, 25, 220, 220, 220, 220, 24...
2.825342
292
import json import os config = { 'mirrors': ['https://xxxx.mirrors.ustc.edu.cn/'] } # def test_config(): # dump_config(config) # path = os.path.expanduser('~/.conf.json') # expected = json.load(open(path, 'r', encoding='utf-8')) # assert expected == config
[ 11748, 33918, 198, 11748, 28686, 198, 198, 11250, 796, 1391, 198, 220, 220, 220, 705, 10793, 5965, 10354, 37250, 5450, 1378, 12343, 13, 10793, 5965, 13, 436, 66, 13, 15532, 13, 31522, 14, 20520, 198, 92, 628, 198, 198, 2, 825, 1332, ...
2.431034
116
# Copyright 2020 Google LLC. 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 a...
[ 2, 15069, 12131, 3012, 11419, 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, 262, 13789, ...
3.492424
396
# Copyright 2020 SAP SE # # 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 appl...
[ 2, 15069, 12131, 48323, 7946, 198, 2, 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, 407, 779, ...
2.894649
598
#!/usr/bin/env python3 import argparse import matplotlib import matplotlib.pyplot as plt import numpy as np font = { # 'weight' : 'bold', 'size': 14} matplotlib.rc('font', **font) # python3 scripts/plan_spectrum.py -o ~/Developer/graindb-benchmark/plan_spectrum/job/plan_spectrum_q4.pdf -j 0.0 # -l Duck Grain ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 1822, 29572, 198, 198, 11748, 2603, 29487, 8019, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 198, 10331, 796, 1391, ...
2.57561
205
from src.Core.Log import Log from src.Core.Core import ASSERT from src.Logic.Line import LineManager, LineWithState from src.UI.Base.Window import Window, WindowProps from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg from matplotlib.figure import Figure import matplotlib.pyplot as plt import matplotlib....
[ 6738, 12351, 13, 14055, 13, 11187, 1330, 5972, 198, 6738, 12351, 13, 14055, 13, 14055, 1330, 24994, 17395, 198, 6738, 12351, 13, 11187, 291, 13, 13949, 1330, 6910, 13511, 11, 6910, 3152, 9012, 198, 6738, 12351, 13, 10080, 13, 14881, 13,...
2.901554
193