content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import numpy as np import pandas as pd d = { 'A': "foo foo foo bar bar bar".split(), 'B': "one one two two one one".split(), 'C': "x y x y x y".split(), 'D': [1,3,2,5,4,1] } df = pd.DataFrame(d) print(d) print(df['A'].unique()) print(df['A'].value_counts()) print (df.pivot_table(values='D', index = ['A','B'],...
[ 11748, 299, 32152, 355, 45941, 220, 198, 11748, 19798, 292, 355, 279, 67, 220, 198, 198, 67, 796, 1391, 198, 197, 6, 32, 10354, 366, 21943, 22944, 22944, 2318, 2318, 2318, 1911, 35312, 22784, 198, 197, 6, 33, 10354, 366, 505, 530, 7...
2.171271
181
import git # type: ignore from typing import Callable, Iterator, Tuple, List def short_sha(rev: git.Commit) -> str: """ Truncate `rev.hexsha` without ambiguity """ return rev.repo.git.rev_parse(rev.hexsha, short=True) def visit_ancestors(rev: git.Commit) -> Iterator[Tuple[git.Commit, Callable]]: r""" ...
[ 11748, 17606, 220, 220, 1303, 2099, 25, 8856, 198, 6738, 19720, 1330, 4889, 540, 11, 40806, 1352, 11, 309, 29291, 11, 7343, 628, 198, 4299, 1790, 62, 26270, 7, 18218, 25, 17606, 13, 6935, 270, 8, 4613, 965, 25, 198, 220, 220, 220, ...
2.45283
1,219
# Copyright 2019 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from dataclasses import dataclass from pants.build_graph.address import Address from pants.engine.addressable import BuildFileAddresses from pants.engine.console import Console from pants...
[ 2, 15069, 13130, 41689, 1628, 20420, 357, 3826, 27342, 9865, 3843, 20673, 13, 9132, 737, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 3826, 38559, 24290, 737, 198, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 3...
3.488479
217
# Copyright (c) 2016, Xilinx, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of con...
[ 2, 220, 220, 15069, 357, 66, 8, 1584, 11, 1395, 346, 28413, 11, 3457, 13, 198, 2, 220, 220, 1439, 2489, 10395, 13, 198, 2, 198, 2, 220, 220, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 393, 1231, 198, 2, 2...
2.045418
14,972
import os import time import uuid import hprof.parser import hprof.leak_report_writer import hprof.leak_detector ROOT_DIR = "/home/shanbay/memory_guard/server" REPORT_DIR = os.path.join(ROOT_DIR, "report") if __name__ == '__main__': pass
[ 11748, 28686, 198, 11748, 640, 198, 11748, 334, 27112, 198, 198, 11748, 289, 5577, 13, 48610, 198, 11748, 289, 5577, 13, 293, 461, 62, 13116, 62, 16002, 198, 11748, 289, 5577, 13, 293, 461, 62, 15255, 9250, 198, 198, 13252, 2394, 62, ...
2.583333
96
import argparse import os import shutil import tempfile import yaml from contest.impls.lib import datasets if __name__ == '__main__': main()
[ 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 20218, 7753, 198, 198, 11748, 331, 43695, 198, 198, 6738, 8414, 13, 23928, 82, 13, 8019, 1330, 40522, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417,...
3
50
import glob from os import path as osp if __name__ == '__main__': root = '/data2/yangxi/datasets/Vimeo90k/vimeo_septuplet' seq_path_list = sorted(glob.glob(osp.join(root, 'sequences', '*', '*'))) out = [ '{}/{} 7 (256,448,3)\n'.format(seq_path.split('/')[-2], seq_path.split('/')[-1]) for s...
[ 11748, 15095, 198, 6738, 28686, 1330, 3108, 355, 267, 2777, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 6808, 796, 31051, 7890, 17, 14, 17859, 29992, 14, 19608, 292, 1039, 14, 53, 47776, 382...
2.069767
215
# Generated by Django 3.1.4 on 2021-11-13 10:16 import datetime from django.db import migrations, models import django.db.models.deletion from django.utils.timezone import utc import django.utils.timezone import uuid
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 19, 319, 33448, 12, 1157, 12, 1485, 838, 25, 1433, 198, 198, 11748, 4818, 8079, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 9945, 13, 27530,...
3
73
# encoding: UTF-8 """ 通过VT_setting.json加载全局配置 """ print('load vtGlobal.py') import os import traceback import json from .vtFunction import getJsonPath globalSetting = {} # 全局配置字典 settingFileName = "VT_setting.json" settingFilePath = getJsonPath(settingFileName, __file__) try: with open(settingFilePath,'r',e...
[ 2, 21004, 25, 41002, 12, 23, 198, 198, 37811, 198, 34460, 248, 32573, 229, 36392, 62, 33990, 13, 17752, 27950, 254, 164, 121, 121, 17739, 101, 161, 109, 222, 165, 227, 235, 163, 121, 106, 198, 37811, 198, 4798, 10786, 2220, 410, 83,...
2.263736
182
from django.urls import path from . import views app_name = 'users' urlpatterns = [ path('',views.index, name='index'), ]
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 220, 198, 6738, 764, 1330, 5009, 198, 1324, 62, 3672, 796, 705, 18417, 6, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 10786, 3256, 33571, 13, 9630, 11, 1438, 11639, 96...
2.723404
47
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os from telemetry.core import util # TODO(dtu): Move these functions from core.util to here. GetBaseDir = util.GetBaseDir GetTelemetryDir = util.Ge...
[ 2, 15069, 1946, 383, 18255, 1505, 46665, 13, 1439, 2489, 10395, 13, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 5964, 326, 460, 307, 198, 2, 1043, 287, 262, 38559, 24290, 2393, 13, 198, 198, 11748...
2.970297
404
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # https://docs.scrapy.org/en/latest/topics/items.html import scrapy
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 2896, 500, 994, 262, 4981, 329, 534, 15881, 276, 3709, 198, 2, 198, 2, 4091, 10314, 287, 25, 198, 2, 3740, 1378, 31628, 13, 1416, 2416, 88, 13, 2398, 14, 2...
2.725806
62
# stdlib imports import re # third-party imports import structlog # local imports from stretch import exceptions from stretch import logging from .trigger_types import http from .trigger_types import mesos logger = structlog.get_logger() def get_prefixes_from_labels(labels): """Extracts a unique list of trig...
[ 2, 14367, 8019, 17944, 198, 11748, 302, 198, 198, 2, 2368, 12, 10608, 17944, 198, 11748, 2878, 6404, 198, 198, 2, 1957, 17944, 198, 6738, 7539, 1330, 13269, 198, 6738, 7539, 1330, 18931, 198, 6738, 764, 46284, 62, 19199, 1330, 2638, 1...
2.520179
892
from loguru import logger from flexget import plugin from flexget.event import event from . import db logger = logger.bind(name='seen') class FilterSeen: """ Remembers previously downloaded content and rejects them in subsequent executions. Without this plugin FlexGet would download all matching co...
[ 6738, 2604, 14717, 1330, 49706, 198, 198, 6738, 7059, 1136, 1330, 13877, 198, 6738, 7059, 1136, 13, 15596, 1330, 1785, 198, 198, 6738, 764, 1330, 20613, 198, 198, 6404, 1362, 796, 49706, 13, 21653, 7, 3672, 11639, 15898, 11537, 628, 198...
1.998731
2,364
import contextlib from typing import Any, Dict, Iterable, Optional import discord import iso8601 import validators from redbot.core import commands from redbot.vendored.discord.ext import menus
[ 11748, 4732, 8019, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 11, 40806, 540, 11, 32233, 198, 198, 11748, 36446, 198, 11748, 47279, 4521, 486, 198, 11748, 4938, 2024, 198, 6738, 2266, 13645, 13, 7295, 1330, 9729, 198, 6738, 2266, 13645...
3.648148
54
import os from datetime import date date1 = Date(os.environ["ESPANSO_DATES_DAY1"], os.environ["ESPANSO_DATES_MONTH1"], os.environ["ESPANSO_DATES_YEAR1"]).date date2 = Date(os.environ["ESPANSO_DATES_DAY2"], os.environ["ESPANSO_DATES_MONTH2"], os.environ["ESPANSO_DATES_YEAR2"]).date datediff ...
[ 11748, 28686, 198, 6738, 4818, 8079, 1330, 3128, 198, 198, 4475, 16, 796, 7536, 7, 418, 13, 268, 2268, 14692, 1546, 47, 15037, 46, 62, 35, 29462, 62, 26442, 16, 33116, 28686, 13, 268, 2268, 14692, 1546, 47, 15037, 46, 62, 35, 29462,...
2.086705
173
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ """ import sys import tensorflow as tf # to-do: find a way to limit gpu memory usage during training ######## START GPU SETTINGS ############ # Set MEMORY GROWTH to True physical_devices = tf.config.list_physical_devices('GPU') try: tf.config.experimental.set...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 220, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 220, 198, 37811, 220, 198, 37811, 220, 198, 11748, 25064, 220, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 198,...
2.363215
647
#read and display the contents of Employee.csv in 23-a import csv with open('Employee.csv',"r") as fhObj: eReader = csv.reader(fhObj) print("File Employee.csv contains :") for rec in eReader: print(rec)
[ 2, 961, 290, 3359, 262, 10154, 286, 36824, 13, 40664, 287, 2242, 12, 64, 198, 198, 11748, 269, 21370, 198, 4480, 1280, 10786, 29733, 1453, 13, 40664, 40264, 81, 4943, 355, 277, 71, 49201, 25, 198, 220, 220, 220, 304, 33634, 796, 269...
2.574713
87
from urllib.request import urlopen from urllib.parse import urlparse from bs4 import BeautifulSoup import re import datetime import random pages = set() random.seed(datetime.datetime.now()) allExtLinks = set() allIntLinks = set() getAllExternalLinks("http://jcrew.com")
[ 6738, 2956, 297, 571, 13, 25927, 1330, 19016, 9654, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 19016, 29572, 198, 6738, 275, 82, 19, 1330, 23762, 50, 10486, 198, 11748, 302, 198, 11748, 4818, 8079, 198, 11748, 4738, 198, 198, 31126, ...
3.123596
89
""" .. See the NOTICE file distributed with this work for additional information regarding copyright ownership. 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....
[ 37811, 198, 492, 4091, 262, 28536, 2393, 9387, 351, 428, 670, 329, 3224, 1321, 198, 220, 220, 5115, 6634, 9238, 13, 628, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 220, 220, 3...
2.449421
1,987
from onadata.apps.api.tests.models.test_abstract_models import ( TestAbstractModels) from onadata.apps.api.models import TempToken from django.db.utils import IntegrityError
[ 6738, 319, 14706, 13, 18211, 13, 15042, 13, 41989, 13, 27530, 13, 9288, 62, 397, 8709, 62, 27530, 1330, 357, 198, 220, 220, 220, 6208, 23839, 5841, 1424, 8, 198, 6738, 319, 14706, 13, 18211, 13, 15042, 13, 27530, 1330, 24189, 30642, ...
3.314815
54
from generator.actions import Actions import array import random import struct
[ 6738, 17301, 13, 4658, 1330, 24439, 198, 11748, 7177, 198, 11748, 4738, 198, 11748, 2878, 198 ]
4.9375
16
import numpy as np import unittest import chainer.functions as F import chainer.testing as testing import chainer.testing.condition as condition from mkldnn import switch testing.run_module(__name__, __file__)
[ 11748, 299, 32152, 355, 45941, 198, 11748, 555, 715, 395, 198, 11748, 6333, 263, 13, 12543, 2733, 355, 376, 198, 11748, 6333, 263, 13, 33407, 355, 4856, 198, 11748, 6333, 263, 13, 33407, 13, 31448, 355, 4006, 198, 6738, 33480, 335, 20...
3.435484
62
""" Binary Tree Level Order Traversal II Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root). For example: Given binary tree [3,9,20,null,null,15,7], 3 / \ 9 20 / \ 15 7 return its bottom-up level order ...
[ 37811, 198, 33, 3219, 12200, 5684, 8284, 4759, 690, 282, 2873, 198, 198, 15056, 257, 13934, 5509, 11, 1441, 262, 4220, 12, 929, 1241, 1502, 33038, 282, 286, 663, 13760, 6, 3815, 13, 357, 494, 11, 422, 1364, 284, 826, 11, 1241, 416, ...
2.509804
255
from src.PhaseIdentification.voltageBasedPhaseIdentification import * """ ################################################## Fluvinus experiment can be done using "truncated" # CASE A: Rural area # feeder ID = 86315_785383 # number of devices = 22 # CASE B: Urban area # number of de...
[ 6738, 12351, 13, 35645, 33234, 2649, 13, 37764, 496, 15001, 35645, 33234, 2649, 1330, 1635, 198, 198, 37811, 198, 29113, 14468, 2235, 198, 37, 2290, 7114, 385, 6306, 460, 307, 1760, 1262, 366, 2213, 19524, 515, 1, 198, 2, 220, 220, 42...
2.755647
487
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import numpy as np from scipy.integrate import solve_ivp import matplotlib.pyplot as plt np.set_printoptions(threshold=np.nan) np.set_printoptions(precision=5) #<startTeX> sol = solve_ivp(lambda t,rf: [(1-0.02*rf[1])*rf[0], (-1+0.03*rf[0])*rf[1]],[0,20],[20,20],method='...
[ 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, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 18908, 4873, 1330, 8494, 62, 452, 79, 198, 11748...
2.050542
277
# -*- coding: utf-8 -*- # ---------------------------------------------------------------------------- # Created By : Francisco Miras García <francisco.mirasg@gmail.com> # version ='1.0' # --------------------------------------------------------------------------- """ # Codigo para el ejercicio Color 1.- Construye un ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 16529, 10541, 198, 2, 15622, 2750, 220, 1058, 6033, 7381, 292, 16364, 29690, 1279, 8310, 1192, 4861, 13, 10793, 292, 70, 31, 14816, 13, 785, 29, 198, 2, 2196, 796, ...
2.834802
1,362
from __future__ import print_function from builtins import object from lib.common import helpers
[ 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 6738, 3170, 1040, 1330, 2134, 198, 6738, 9195, 13, 11321, 1330, 49385, 628 ]
4.454545
22
from poker.deck import *
[ 6738, 27101, 13, 35875, 1330, 1635 ]
4
6
import dns.resolver # resolveList.append(rData) # ++y # return resolveList domainName = "www.yahoo.com" queryResult = resolve(domainName); for result in queryResult: print(queryResult[0])
[ 11748, 288, 5907, 13, 411, 14375, 198, 2, 197, 197, 411, 6442, 8053, 13, 33295, 7, 81, 6601, 8, 198, 2, 197, 197, 4880, 88, 220, 220, 220, 220, 220, 220, 220, 220, 198, 2, 197, 7783, 10568, 8053, 198, 198, 27830, 5376, 796, 366,...
2.589744
78
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import argparse import os import random import sys import torch import torch.nn.functional as F from io import StringIO from fairseq import o...
[ 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 198, 2, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 17168, 5964, 1043, 287, 262, 198, 2, 38559, 24290, 2393, 287, 262, 6808, 8619, 286, 428, 2723, 5509, 13, 198, ...
3.266376
229
import heapq n = int(input()) h = [] for _ in range(n): q = input().split() if len(q) == 1: print(h[0]) else: v = int(q[1]) if q[0] == "1": heapq.heappush(h, v) else: if h[0] == v: heapq.heappop(h) elif h[-1] == v: ...
[ 11748, 24575, 80, 198, 198, 77, 796, 493, 7, 15414, 28955, 198, 71, 796, 17635, 198, 1640, 4808, 287, 2837, 7, 77, 2599, 198, 220, 220, 220, 10662, 796, 5128, 22446, 35312, 3419, 198, 220, 220, 220, 611, 18896, 7, 80, 8, 6624, 352...
1.43454
359
T = int(input()) myTree = Solution() root = None for i in range(T): data = int(input()) root = myTree.insert(root, data) myTree.levelOrder(root)
[ 198, 51, 796, 493, 7, 15414, 28955, 198, 1820, 27660, 796, 28186, 3419, 198, 15763, 796, 6045, 198, 1640, 1312, 287, 2837, 7, 51, 2599, 198, 220, 220, 220, 1366, 796, 493, 7, 15414, 28955, 198, 220, 220, 220, 6808, 796, 616, 27660, ...
2.566667
60
from django.conf.urls import url from .views import ( PaymentListAPIView, BookingListAPIView, RoomBookingListAPIView, CreateAPIView, UpdateAPIView, CheckOutAPIView ) urlpatterns...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 198, 6738, 764, 33571, 1330, 357, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 28784, 8053, 2969, 3824, 769, 11, ...
1.849722
539
import tempfile from django.core.urlresolvers import reverse from hs_file_types.tests.utils import CompositeResourceTestMixin from hs_core.models import ResourceFile from hs_core.tests.api.rest.base import HSRESTTestCase from hs_file_types.models import FileSetLogicalFile
[ 11748, 20218, 7753, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 6371, 411, 349, 690, 1330, 9575, 198, 6738, 289, 82, 62, 7753, 62, 19199, 13, 41989, 13, 26791, 1330, 49355, 26198, 14402, 35608, 259, 198, 198, 6738, 289, 82, 62, 7295, ...
3.285714
84
import pytest from flatsplode import (explode, flatsplode, flatten) @pytest.mark.parametrize(('item', 'exp'), [ ( { 'a': 'b', 'jar': ['bar', 'car'], 'fizz': ['buzz', 'jazz', 'fuzz'], 'foo': 'bar', }, [ {'a': 'b', 'jar': 'bar', 'f...
[ 11748, 12972, 9288, 198, 198, 6738, 38157, 489, 1098, 1330, 357, 20676, 1098, 11, 38157, 489, 1098, 11, 27172, 268, 8, 628, 198, 31, 9078, 9288, 13, 4102, 13, 17143, 316, 380, 2736, 7, 10786, 9186, 3256, 705, 11201, 33809, 685, 198, ...
1.352902
4,548
from django.test import TestCase from django.test import Client from django.urls import reverse from mock import patch
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 42625, 14208, 13, 9288, 1330, 20985, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 6738, 15290, 1330, 8529, 628 ]
3.870968
31
""" # Definition for a Node. class Node: def __init__(self, val: int = 0, left: 'Node' = None, right: 'Node' = None, next: 'Node' = None): self.val = val self.left = left self.right = right self.next = next """ """ Second Solution : Using previously established...
[ 37811, 198, 2, 30396, 329, 257, 19081, 13, 198, 4871, 19081, 25, 198, 220, 220, 220, 825, 11593, 15003, 834, 7, 944, 11, 1188, 25, 493, 796, 657, 11, 1364, 25, 705, 19667, 6, 796, 6045, 11, 826, 25, 705, 19667, 6, 796, 6045, 11,...
3.081731
208
# -*- coding: utf-8 -*- """miniuser's app specific exceptions""" class MiniUserException(Exception): """Base class for all app specific exceptions""" pass class MiniUserConfigurationException(MiniUserException): """Raised, if there is a mismatch/inconsistency in the app specific settings.""" pass
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 1084, 3754, 263, 338, 598, 2176, 13269, 37811, 628, 198, 4871, 12558, 12982, 16922, 7, 16922, 2599, 198, 220, 220, 220, 37227, 14881, 1398, 329, 477, 598, 2176, 1...
3.419355
93
num = int(input('Digite o valor a ser convertido: ')) base = int(input("""Qual será a base de conversão? sendo: \033[34m1\033[m = binário \033[34m2\033[m = Octal \033[34m3\033[m = Hexadecimal Digite: """)) bin = bin(num) oct = oct(num) hex = hex(num) if base == 1: print('O Resultado é: {}'.format(bin)) elif base =...
[ 22510, 796, 493, 7, 15414, 10786, 19511, 578, 267, 1188, 273, 257, 1055, 10385, 17305, 25, 705, 4008, 198, 8692, 796, 493, 7, 15414, 7203, 15931, 46181, 1055, 6557, 257, 2779, 390, 3453, 28749, 30, 3758, 78, 25, 220, 198, 59, 44427, ...
2.333333
183
# usage: pypy scriptname inputfile outputfile import sys outcontents = [] infile = open(sys.argv[1], "rb").read() for i in infile: #print(ord(i)) outcontents.append(bandlimit(ord(i))) outfile = open(sys.argv[2], "wb") outfile.write(bytearray(outcontents)) outfile.close()
[ 2, 8748, 25, 279, 4464, 88, 4226, 3672, 5128, 7753, 5072, 7753, 198, 198, 11748, 25064, 628, 198, 198, 448, 3642, 658, 796, 17635, 198, 198, 259, 7753, 796, 1280, 7, 17597, 13, 853, 85, 58, 16, 4357, 366, 26145, 11074, 961, 3419, ...
2.477876
113
#!/usr/bin/env python class Slide(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.""" def __init__(self): """ Attributes: swaggerTypes (dict): The key is attribute name and the value is attribute type. ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 4871, 37651, 7, 15252, 2599, 198, 220, 220, 220, 37227, 16580, 25, 770, 1398, 318, 8295, 7560, 416, 262, 1509, 7928, 2438, 17301, 1430, 13, 198, 220, 220, 220, 2141, 407, 4370, ...
2.445378
714
import random from PyQt5.QtWidgets import QGraphicsView, QGraphicsRectItem, QGraphicsScene from random_matrix_generator.block import Block
[ 11748, 4738, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 1330, 1195, 18172, 7680, 11, 1195, 18172, 45474, 7449, 11, 1195, 18172, 36542, 198, 198, 6738, 4738, 62, 6759, 8609, 62, 8612, 1352, 13, 9967, 1330, 9726, 198 ]
3.333333
42
import json import unittest from addict import Dict TEST_VAL = [1, 2, 3] TEST_DICT = {'a': {'b': {'c': TEST_VAL}}} TEST_DICT_STR = str(TEST_DICT) """ Allow for these test cases to be run from the command line via `python test_addict.py` """ if __name__ == '__main__': all_tests = unittest.TestLoader().loadTests...
[ 11748, 33918, 198, 11748, 555, 715, 395, 198, 6738, 19678, 1330, 360, 713, 198, 198, 51, 6465, 62, 23428, 796, 685, 16, 11, 362, 11, 513, 60, 198, 51, 6465, 62, 35, 18379, 796, 1391, 6, 64, 10354, 1391, 6, 65, 10354, 1391, 6, 66...
2.522293
157
import os import pathlib def parse_yaml(file_name): ''' Parse file_name and return dictionary. If file does not exist, return empty dictionary. ''' import yaml import sys if file_name.is_file(): with file_name.open() as f: try: config = yaml.load(f, yaml...
[ 11748, 28686, 198, 11748, 3108, 8019, 628, 198, 4299, 21136, 62, 88, 43695, 7, 7753, 62, 3672, 2599, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 2547, 325, 2393, 62, 3672, 290, 1441, 22155, 13, 198, 220, 220, 220, 1002, 2393,...
2.538557
804
import donna25519, base64 def generateEDKeyPairs(): """A function which generates ED25519 key pairs""" privateKey = donna25519.PrivateKey() pvKey = privateKey.private pbKey = privateKey.get_public().public return (base64.b64encode(pvKey).decode(),base64.b64encode(pbKey).decode())
[ 11748, 836, 2616, 13381, 1129, 11, 2779, 2414, 628, 198, 4299, 7716, 1961, 9218, 47, 3468, 33529, 628, 220, 220, 220, 37227, 32, 2163, 543, 18616, 8392, 13381, 1129, 1994, 14729, 37811, 628, 220, 220, 220, 2839, 9218, 796, 836, 2616, ...
2.781818
110
import pandas as pd import numpy as np import argparse from imblearn.over_sampling import RandomOverSampler import tensorflow as tf from tensorflow import keras from tensorflow.keras.layers.experimental import preprocessing import kerastuner as kt """Use Keras Tuner Hyberband, which trains multiple models on the trai...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 1822, 29572, 198, 6738, 545, 903, 1501, 13, 2502, 62, 37687, 11347, 1330, 14534, 5886, 16305, 20053, 198, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 6...
2.714801
1,939
# Copyright 2015 Google 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 a...
[ 2, 15069, 1853, 3012, 3457, 13, 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, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, ...
3.467128
289
t = int(input()) while t > 0: t= t-1 n,m = input().split() n = int(n) m = int(m) lst = [] c = 0 for i in range(n+1,n+1000): s=findgcd(n,i) if s == 2: c = c+1 lst.append(i) if c == 3: break for i in lst: print(i,end=" ")...
[ 198, 83, 796, 493, 7, 15414, 28955, 198, 4514, 256, 1875, 657, 25, 198, 220, 220, 220, 256, 28, 256, 12, 16, 198, 220, 220, 220, 299, 11, 76, 796, 5128, 22446, 35312, 3419, 198, 220, 220, 220, 299, 796, 493, 7, 77, 8, 198, 220...
1.525114
219
import numpy as np
[ 11748, 299, 32152, 355, 45941, 198 ]
3.166667
6
#!/usr/bin/python # -*- coding: utf-8 -*- ''' The MIT License: 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 us...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 7061, 6, 198, 220, 220, 220, 383, 17168, 13789, 25, 628, 220, 220, 220, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, ...
3.435135
370
from __future__ import absolute_import, division, print_function, unicode_literals import os import sys from os.path import join import re import subprocess import time from pgrunner import ROOT DEVNULL = open(os.devnull, 'wb') # Default database (in the future we will put clones in the ROOT too) DEFAULT = join(RO...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 11, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 6738, 28686, 13, 6978, 1330, 4654, 198, 11748, 302, 198, 198, 11748, 850, 1...
2.429892
1,947
import abc from pyspark.ml.base import Estimator from pyspark.ml.base import Transformer from parallelm.common.mlcomp_exception import MLCompException from parallelm.components.spark_session_component import SparkSessionComponent
[ 11748, 450, 66, 198, 198, 6738, 279, 893, 20928, 13, 4029, 13, 8692, 1330, 10062, 320, 1352, 198, 6738, 279, 893, 20928, 13, 4029, 13, 8692, 1330, 3602, 16354, 198, 198, 6738, 10730, 76, 13, 11321, 13, 4029, 5589, 62, 1069, 4516, 13...
3.530303
66
# from OneTicketLogging import elasticsearch_logger # _logger = elasticsearch_logger(__name__)
[ 2, 422, 1881, 51, 9715, 11187, 2667, 1330, 27468, 12947, 62, 6404, 1362, 198, 198, 2, 4808, 6404, 1362, 796, 27468, 12947, 62, 6404, 1362, 7, 834, 3672, 834, 8, 628, 628, 628, 628 ]
3.029412
34
""" Contributors can be viewed at: http://svn.secondlife.com/svn/linden/projects/2008/pyogp/lib/base/trunk/CONTRIBUTORS.txt $LicenseInfo:firstyear=2008&license=apachev2$ Copyright 2009, Linden Research, Inc. Licensed under the Apache License, Version 2.0. You may obtain a copy of the License at: http://www.apa...
[ 198, 37811, 198, 37146, 669, 460, 307, 9569, 379, 25, 198, 4023, 1378, 21370, 77, 13, 12227, 6042, 13, 785, 14, 21370, 77, 14, 75, 521, 268, 14, 42068, 14, 11528, 14, 9078, 519, 79, 14, 8019, 14, 8692, 14, 2213, 2954, 14, 10943, ...
2.60804
199
from diffhod.mock_observables import *
[ 6738, 814, 2065, 13, 76, 735, 62, 672, 3168, 2977, 1330, 1635, 198 ]
3
13
from typing import Dict, Optional, Tuple, Union import torch import torch.nn as nn from roca.modeling.depth_head.depth_modules import ( DepthFeatures, DepthOutput, Sobel, ) from roca.modeling.logging_metrics import depth_metrics from roca.modeling.loss_functions import ( cosine_distance, inverse_h...
[ 6738, 19720, 1330, 360, 713, 11, 32233, 11, 309, 29291, 11, 4479, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 198, 6738, 686, 6888, 13, 4666, 10809, 13, 18053, 62, 2256, 13, 18053, 62, 18170, 1330, 357, ...
2.70229
131
#!/usr/bin/python # # SPDX-License-Identifier: Apache-2.0 # from __future__ import absolute_import, division, print_function __metaclass__ = type from ansible.module_utils._text import to_native from ..module_utils.dict_utils import copy_dict, equal_dicts, merge_dicts from ..module_utils.module import BlockchainMod...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 24843, 12, 17, 13, 15, 198, 2, 198, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 198, 198, 83...
1.995446
9,442
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ tkRAD - tkinter Rapid Application Development library (c) 2013+ Raphaël SEBAN <motus@laposte.net> 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 S...
[ 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, 198, 220, 220, 220, 256, 74, 49, 2885, 532, 256, 74, 3849, 26430, 15678, 7712, 5888, 628, 220, 220, ...
2.023145
9,635
import os import shutil import random from tqdm import tqdm import torch from torch import nn from torch.backends import cudnn from torch.utils.data import DataLoader from torchvision import transforms from tensorboardX import SummaryWriter from graph.model.horizon_base import HorizonBase, Corner from graph.loss.hor...
[ 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 4738, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 198, 11748, 28034, 198, 6738, 28034, 1330, 299, 77, 198, 6738, 28034, 13, 1891, 2412, 1330, 269, 463, 20471, 198, 6738, 28034, ...
3.331325
166
#!/usr/bin/env python """Upserts Organization records with data from Salesforce Accounts. """ import logging import os from django.core.management.base import BaseCommand import iss.models import iss.membersuite import iss.utils logger = logging.getLogger(os.path.basename(__file__)) def upsert_memberships_recent...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 52, 862, 861, 82, 12275, 4406, 351, 1366, 422, 17329, 3174, 35584, 13, 198, 37811, 198, 11748, 18931, 198, 11748, 28686, 198, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8...
3.120401
299
import os import torch from torch.distributed import get_world_size from transformers import BertConfig, BertTokenizer from zero.common.utils import CONFIG, ModelFromHF, get_model_size from bert.colossalai_utils.model_zoo.colo_tp1dcol_bert import ColoBertMaskedLMLoss, ColoBertForMaskedLM, create_colo_bert_pipe...
[ 11748, 28686, 201, 198, 201, 198, 11748, 28034, 201, 198, 6738, 28034, 13, 17080, 6169, 1330, 651, 62, 6894, 62, 7857, 201, 198, 6738, 6121, 364, 1330, 22108, 16934, 11, 22108, 30642, 7509, 201, 198, 201, 198, 6738, 6632, 13, 11321, 1...
2.206989
372
# Generated by Django 2.0.10 on 2019-02-05 06:24 from django.conf import settings from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 15, 13, 940, 319, 13130, 12, 2999, 12, 2713, 9130, 25, 1731, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
3.125
40
#-*- coding:utf-8 -*- import wx from wx.lib import buttons # def MakeBitmap(self, color): # bmp = wx.EmptyBitmap(16, 15) # dc = wx.MemoryDC(bmp) # dc.SetBackground(wx.Brush(color)) # dc.Clear() # dc.SelectObject(wx.NullBitmap) # return bmp if __name__ == '__main_...
[ 2, 12, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 198, 11748, 266, 87, 198, 6738, 266, 87, 13, 8019, 1330, 12163, 628, 628, 220, 220, 220, 1303, 825, 6889, 13128, 8899, 7, 944, 11, 3124, 2599, 198, 220, 220, 220, 1303, ...
2.01105
181
import sys from time import sleep from mplayerutil import * if __name__ == '__main__': main()
[ 11748, 25064, 198, 6738, 640, 1330, 3993, 198, 198, 6738, 285, 7829, 22602, 1330, 1635, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1388, 3419, 198 ]
2.914286
35
from Bio.PDB import * import os class PDBFilter: """ Class used to provide a filter for reading pdb files Attributes ---------- parser : None A variable to store an instance of the PDBParser Object struct : Structure A variable used to store the structure object of the prote...
[ 6738, 16024, 13, 5760, 33, 1330, 1635, 198, 11748, 28686, 628, 198, 4871, 350, 11012, 22417, 25, 628, 220, 220, 220, 37227, 198, 220, 220, 220, 5016, 973, 284, 2148, 257, 8106, 329, 3555, 279, 9945, 3696, 628, 220, 220, 220, 49213, ...
2.47341
959
#!/usr/bin/python # -*- coding:utf-8 -*- # --------------------------- # Author: deangao # Copyright: 2016 deangao # Version: v1.0.0 # Created: 2016/2/24 # --------------------------- __author__ = 'deangao' ''' Python和C在变量的操作上有些不同,即在内存管理上的差别: http://www.cnblogs.com/CBDoctor/p/3781078.html http://www.cnblogs.com/vam...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 198, 2, 220, 22369, 6329, 198, 2, 6434, 25, 390, 648, 5488, 198, 2, 15069, 25, 1584, 390, 648, 5488, 198, 2, 10628, 25, 410, ...
1.252033
1,230
from api import db from datetime import datetime
[ 6738, 40391, 1330, 20613, 201, 198, 6738, 4818, 8079, 1330, 4818, 8079, 201, 198 ]
3.642857
14
from pygame.constants import MOUSEBUTTONDOWN, MOUSEBUTTONUP from segment import Segment import pygame as pg pg.init() pg.display.set_caption('Inverse kinematics') CLOCK = pg.time.Clock() BLACK = (0, 0, 0) RED = (255, 0, 0) SCREEN_SIZE = (640, 640) PIXEL_SIZE = 8 SCREEN = pg.display.set_mode(SCREEN_SIZE) ...
[ 6738, 12972, 6057, 13, 9979, 1187, 1330, 337, 2606, 5188, 47526, 11357, 41925, 11, 337, 2606, 5188, 47526, 11357, 8577, 201, 198, 6738, 10618, 1330, 1001, 5154, 201, 198, 11748, 12972, 6057, 355, 23241, 201, 198, 201, 198, 6024, 13, 150...
2.094527
603
import numpy as np from astropy.io import fits from scipy.optimize import curve_fit from LDC_version.DensityClust.make_plot import make_plot from LDC_version.DensityClust.get_xx import get_xyz # from sklearn.linear_model import RANSACRegressor def gauss_3d_rotate(x,A,x0,s1,y0,s2,theta,v0,s3): """ 三维...
[ 11748, 299, 32152, 355, 45941, 201, 198, 6738, 6468, 28338, 13, 952, 1330, 11414, 201, 198, 6738, 629, 541, 88, 13, 40085, 1096, 1330, 12133, 62, 11147, 201, 198, 6738, 406, 9697, 62, 9641, 13, 35, 6377, 2601, 436, 13, 15883, 62, 29...
1.653025
1,124
from enum import IntEnum class States(IntEnum): """Map states for tasks to an int.""" unsched = -1 pending = 0 runnable = 1 running = 2 done = 3 failed = 4 dep_fail = 5 retry = 6 if __name__ == "__main__": print(States.pending) print(States.done) print(3 == States.don...
[ 6738, 33829, 1330, 2558, 4834, 388, 628, 198, 4871, 1829, 7, 5317, 4834, 388, 2599, 198, 220, 220, 220, 37227, 13912, 2585, 329, 8861, 284, 281, 493, 526, 15931, 198, 220, 220, 220, 28594, 704, 796, 532, 16, 198, 220, 220, 220, 1331...
2.34058
138
import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from geomulator.surface import Surface def calc_surface(u, v): """Calculate surface according to your definition.""" # # Wavy surface # surface = np.array([ # u, # v, # np.exp(- (u**2 + v**...
[ 11748, 299, 32152, 355, 45941, 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, 198, 6738, 4903, 296, 8927, 13, 42029, 1330,...
2.164329
499
# Copyright (C) 2022 Aaron Gibson (eulersidcrisis@yahoo.com) # # 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, 357, 34, 8, 33160, 12139, 20400, 357, 68, 377, 364, 312, 66, 42841, 31, 40774, 13, 785, 8, 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...
2.774834
906
import json # Handles serial transmission of data # Calculate gradient of a line found # Constrain value within given range
[ 11748, 33918, 198, 198, 2, 7157, 829, 11389, 11478, 286, 1366, 198, 198, 2, 27131, 378, 31312, 286, 257, 1627, 1043, 198, 198, 2, 1482, 2536, 391, 1988, 1626, 1813, 2837 ]
4.064516
31
__version__ = """1.29.0"""
[ 834, 9641, 834, 796, 37227, 16, 13, 1959, 13, 15, 37811 ]
2.363636
11
# -*- coding: utf-8 -*- """The repository of all the binary classifiers implemented with the package. This module exposes a series of `online machine learning`_ models that can be used for binary classification. The models learn by taking one data point at a time and can achieve very good accuracy results. One...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 464, 16099, 286, 477, 262, 13934, 1398, 13350, 9177, 351, 262, 5301, 13, 201, 198, 201, 198, 1212, 8265, 32142, 257, 2168, 286, 4600, 25119, 4572, 4673, 63, ...
2.591775
997
# http://ipset.netfilter.org/iptables-extensions.man.html#lbAE
[ 2, 2638, 1378, 2419, 316, 13, 3262, 24455, 13, 2398, 14, 10257, 2977, 12, 2302, 5736, 13, 805, 13, 6494, 2, 23160, 14242 ]
2.695652
23
# Copyright (C) 2018 by eHealth Africa : http://www.eHealthAfrica.org # # See the NOTICE file distributed with this work for additional information # regarding copyright ownership. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with # the License. Y...
[ 2, 15069, 357, 34, 8, 2864, 416, 304, 18081, 5478, 1058, 2638, 1378, 2503, 13, 68, 18081, 17584, 30997, 13, 2398, 198, 2, 198, 2, 4091, 262, 28536, 2393, 9387, 351, 428, 670, 329, 3224, 1321, 198, 2, 5115, 6634, 9238, 13, 198, 2, ...
2.988571
525
import warnings warnings.filterwarnings('ignore') from env.environment import PortfolioEnv import plot from plot import add_curve, save_plot import os import pandas as pd from pyfolio import timeseries from pypfopt import EfficientFrontier, risk_models, expected_returns plot.initialize() file = open(f'env/data...
[ 11748, 14601, 198, 40539, 654, 13, 24455, 40539, 654, 10786, 46430, 11537, 198, 198, 6738, 17365, 13, 38986, 1330, 4347, 13652, 4834, 85, 198, 11748, 7110, 198, 6738, 7110, 1330, 751, 62, 22019, 303, 11, 3613, 62, 29487, 198, 11748, 286...
2.638596
570
# Copyright 2018 dhtech # # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file import lib def decode_ports(ports, filter_proto): """Given a string like '901-902/tcp,30/udp', return a list of ports.""" if not ports: return [] results = [] for pro...
[ 2, 15069, 2864, 34590, 13670, 198, 2, 198, 2, 5765, 286, 428, 2723, 2438, 318, 21825, 416, 257, 347, 10305, 12, 7635, 198, 2, 5964, 326, 460, 307, 1043, 287, 262, 38559, 24290, 2393, 198, 11748, 9195, 628, 198, 4299, 36899, 62, 3742...
2.278689
732
""" Python sensitivity analysis - run models with varying inputs to produce visualizations including gradient DataFrames and hex-bin plots """ from sensitivity.main import SensitivityAnalyzer
[ 37811, 198, 37906, 14233, 3781, 532, 1057, 4981, 351, 15874, 17311, 284, 4439, 220, 198, 41464, 4582, 1390, 31312, 6060, 35439, 290, 17910, 12, 8800, 21528, 198, 37811, 198, 6738, 14233, 13, 12417, 1330, 14173, 11365, 37702, 9107, 198 ]
4.948718
39
import random import requests from django.core.cache import cache from swiper import config from common import keys from swiper.settings import DEBUG from worker import celery_app @celery_app.task
[ 11748, 4738, 198, 198, 11748, 7007, 198, 6738, 42625, 14208, 13, 7295, 13, 23870, 1330, 12940, 198, 198, 6738, 1509, 9346, 1330, 4566, 198, 6738, 2219, 1330, 8251, 198, 6738, 1509, 9346, 13, 33692, 1330, 16959, 198, 6738, 8383, 1330, 18...
3.672727
55
''' Speech to text transcription, from your mike, in real-time, using IBM Watson. ''' import argparse import time import fluteline import watson_streaming import watson_streaming.utilities if __name__ == '__main__': main()
[ 7061, 6, 198, 5248, 3055, 284, 2420, 26955, 11, 422, 534, 285, 522, 11, 287, 1103, 12, 2435, 11, 1262, 19764, 14959, 13, 198, 7061, 6, 198, 198, 11748, 1822, 29572, 198, 11748, 640, 198, 198, 11748, 781, 315, 4470, 198, 198, 11748, ...
3
78
#!/usr/bin/env python import sys print("error text",file=sys.stderr) print("the command line arguments") for x in sys.argv: print(x) print("the input") text = sys.stdin.read() print(text) exit(2)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 25064, 198, 4798, 7203, 18224, 2420, 1600, 7753, 28, 17597, 13, 301, 1082, 81, 8, 198, 4798, 7203, 1169, 3141, 1627, 7159, 4943, 198, 1640, 2124, 287, 25064, 13, 853, 85, 25, ...
2.597403
77
#!/usr/bin/env python import argparse, sys, math # covalent radius to decide a bond. bond length: r1+r2 radius = {" H": 0.25, " N": 0.65, " C": 0.70, " O": 0.60, " P": 1.00, " S": 1.00, "NA": 1.80, "CL": 1.00 } elebd_radius = {" N": 1.5,...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 1822, 29572, 11, 25064, 11, 10688, 198, 198, 2, 269, 8325, 298, 16874, 284, 5409, 257, 6314, 13, 6314, 4129, 25, 374, 16, 10, 81, 17, 198, 42172, 796, 19779, 367, 1298, ...
1.988439
865
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ 混合方式: get_arguments(...)/get_argument(...) 访问地址: http://localhost:8000/?user=123&user=223 """ from tornado.web import Application, RequestHandler from tornado.ioloop import IOLoop if __name__ == '__main__': app = Application([(r'/', IndexHandler)]) app.list...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 162, 115, 115, 28938, 230, 43095, 28156, 237, 171, 120, 248, 198, 1136, 62, 853, 2886, 7, 986, 20679,...
2.320513
156
product = str(input()) if product == 'apple' or product == 'cherry' or \ product == 'kiwi' or \ product == 'lemon' or \ product == 'grapes' or \ product == 'banana': print('fruit') elif product == 'cucumber' or prod...
[ 11167, 796, 965, 7, 15414, 28955, 198, 198, 361, 1720, 6624, 705, 18040, 6, 393, 1720, 6624, 705, 2044, 563, 6, 393, 3467, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
1.791367
278
# Generated by Django 3.1.7 on 2021-09-16 10:12 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 22, 319, 33448, 12, 2931, 12, 1433, 838, 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.818182
44
from os.path import dirname, abspath, join from setuptools import setup NAME: str = "twitivity" AUTHOR: str = "Saadman Rafat" DESCRIPTION: str = "Twitter Accounts Activity API Client Library for Python" URL: str = "https://github.com/saadmanrafat/twitivity" REQUIRES_PYTHON: str = ">=3.6.0" VERSION = "0.1.0" REQUIRED =...
[ 6738, 28686, 13, 6978, 1330, 26672, 3672, 11, 2352, 6978, 11, 4654, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 20608, 25, 965, 796, 366, 4246, 11365, 1, 198, 32, 24318, 1581, 25, 965, 796, 366, 33890, 324, 805, 20824, 265, ...
2.555336
506
# -*- coding: utf-8 -*- from pyndf.gui.items.abstract import AbstractItem from pyndf.constants import CONST class PdfItem(AbstractItem): """Class for storing data for analyse.""" type = CONST.TYPE.PDF headers = ["matricule", "filename", "name", "nbr_missions", "nbr_indemnites", "status", "time", "retry...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628, 198, 6738, 12972, 358, 69, 13, 48317, 13, 23814, 13, 397, 8709, 1330, 27741, 7449, 198, 6738, 12972, 358, 69, 13, 9979, 1187, 1330, 7102, 2257, 628, 198, 4871, 350, 75...
2.75
124
from itertools import permutations S, k = input().split() for x in list(permutations(sorted(S), int(k))): print(''.join(x))
[ 6738, 340, 861, 10141, 1330, 9943, 32855, 198, 50, 11, 479, 220, 220, 220, 796, 220, 220, 5128, 22446, 35312, 3419, 198, 1640, 2124, 287, 1351, 7, 16321, 32855, 7, 82, 9741, 7, 50, 828, 493, 7, 74, 4008, 2599, 198, 220, 220, 220, ...
2.557692
52
# Given an m x n board and a word, find if the word exists in the grid. # The word can be constructed from letters of sequentially adjacent cells, where "adjacent" cells are horizontally or vertically neighboring. The same letter cell may not be used more than once. # Example 1: # Input: board = [["A","B","C","E"],["...
[ 2, 11259, 281, 285, 2124, 299, 3096, 290, 257, 1573, 11, 1064, 611, 262, 1573, 7160, 287, 262, 10706, 13, 198, 198, 2, 383, 1573, 460, 307, 12006, 422, 7475, 286, 4726, 3746, 15909, 4778, 11, 810, 366, 41255, 12643, 1, 4778, 389, ...
2.607362
326
"""Make a file on disk appear more noaaport-ish.""" import sys from pyiem.util import noaaport_text def main(argv): """Do Main Things""" fn = argv[1] data = noaaport_text(open(fn, "rb").read().decode("ascii")) with open(fn, "w") as fh: fh.write(data) if __name__ == "__main__": main(sys....
[ 37811, 12050, 257, 2393, 319, 11898, 1656, 517, 645, 64, 499, 419, 12, 680, 526, 15931, 198, 11748, 25064, 198, 198, 6738, 12972, 26597, 13, 22602, 1330, 645, 64, 499, 419, 62, 5239, 628, 198, 4299, 1388, 7, 853, 85, 2599, 198, 220,...
2.248276
145
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat May 2 23:09:00 2020 @author: albert """ import glob path = "data/train/box/box00001/" files = glob.glob(path + "*.txt") dryRun = False baddies = 0 for f in files: print(str(f)) if not dryRun: lineFix = [] # Read con...
[ 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, 7031, 1737, 220, 362, 2242, 25, 2931, 25, 405, 12131, 198, 198, 31, 9800, 25, 435, 4835, ...
1.76565
1,246
import unittest import vimdoc from vimdoc.block import Block from vimdoc import error from vimdoc import module
[ 11748, 555, 715, 395, 198, 198, 11748, 43907, 15390, 198, 6738, 43907, 15390, 13, 9967, 1330, 9726, 198, 6738, 43907, 15390, 1330, 4049, 198, 6738, 43907, 15390, 1330, 8265, 198 ]
3.766667
30
from .cutlet import *
[ 6738, 764, 8968, 1616, 1330, 1635, 198 ]
3.142857
7
from django.conf import settings from django.http import HttpResponse from twilio.rest import Client
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 198, 6738, 665, 346, 952, 13, 2118, 1330, 20985, 628 ]
3.777778
27
from config import CarRobot from bot import bot_init import os if __name__ == '__main__': main()
[ 6738, 4566, 1330, 1879, 14350, 313, 198, 6738, 10214, 1330, 10214, 62, 15003, 198, 11748, 28686, 198, 220, 220, 220, 198, 220, 220, 220, 220, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 220,...
2.511111
45
# 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.387602
2,807
# Definition for singly-linked list. # class ListNode(object): # def __init__(self, x): # self.val = x # self.next = None
[ 2, 30396, 329, 1702, 306, 12, 25614, 1351, 13, 198, 2, 1398, 7343, 19667, 7, 15252, 2599, 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...
2.253968
63