content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import utils import json from tqdm import tqdm languages = ['ruby', 'javascript', 'php', 'python', 'java', 'go'] # language model just needs code # distance needs code and query # seq2seq needs code and function name, with function name in code body obfuscated for language in languages: keywords = set() wi...
[ 11748, 3384, 4487, 198, 11748, 33918, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 198, 75, 33213, 796, 37250, 49137, 3256, 705, 37495, 3256, 705, 10121, 3256, 705, 29412, 3256, 705, 12355, 3256, 705, 2188, 20520, 198, 198, 2, ...
1.81
1,900
import pytest
[ 198, 11748, 12972, 9288, 628, 628 ]
3
6
#!/usr/local/bin/python # filename: clonify.py ########################################################################### # # Copyright (c) 2014 Bryan Briney. All rights reserved. # # @version: 1.0.0 # @author: Bryan Briney # @license: MIT (http://opensource.org/licenses/MIT) # #####################################...
[ 2, 48443, 14629, 14, 12001, 14, 8800, 14, 29412, 198, 2, 29472, 25, 537, 261, 1958, 13, 9078, 628, 198, 29113, 29113, 7804, 21017, 198, 2, 198, 2, 15069, 357, 66, 8, 1946, 17857, 1709, 500, 88, 13, 220, 1439, 2489, 10395, 13, 198,...
2.778116
2,961
# -*- coding: utf-8 -*- """ This script computes the official performance metrics for the NIST 2016 SRE. The metrics include EER and DCFs (min/act). """ __author__ = "Timothee Kheyrkhah" __email__ = "timothee.kheyrkhah@nist.gov" __version__ = "4.2" import os # os.system("pause") for windows command line import s...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 1212, 4226, 552, 1769, 262, 1743, 2854, 20731, 329, 262, 399, 8808, 1584, 311, 2200, 13, 198, 464, 20731, 2291, 412, 1137, 290, 6257, 42388, 357, 1084, ...
2.078113
1,293
### rotamer library . Yong Zhao, TSRI, 2005 RotLib={'CYS': [{'C': [1.4151262352831278, -0.50728183016869421, -5.4045176598339212e-08], 'CB': [1.6853382803910799e-09, 1.5392571543613152, -4.144091399812394e-08], 'CA': [-1.9255430583342559e-16, 5.4643789493269423e-16, -3.7990444123892075e-16], 'O': [2.039109873893294, -...
[ 21017, 5724, 2382, 5888, 764, 40633, 29436, 11, 26136, 7112, 11, 5075, 220, 198, 24864, 25835, 34758, 6, 34, 16309, 10354, 685, 90, 6, 34, 10354, 685, 16, 13, 35038, 19420, 22370, 2078, 27970, 3695, 11, 532, 15, 13, 35378, 2078, 1507,...
1.949945
272,318
#!/usr/bin/env python import sys import time from thrift.transport import TTransport from thrift.transport import TSocket from thrift.protocol import TBinaryProtocol from thrift.server import THttpServer from aggr import Aggr processor = Aggr.Processor(AggrHandler()) pfactory = TBinaryProtocol.TBinaryProtoco...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 201, 198, 11748, 25064, 201, 198, 11748, 640, 201, 198, 6738, 5636, 2135, 13, 7645, 634, 1330, 309, 8291, 634, 201, 198, 6738, 5636, 2135, 13, 7645, 634, 1330, 26136, 5459, 201, 198, 6738, ...
2.992701
137
from .utils import latest_sha, load_config
[ 6738, 764, 26791, 1330, 3452, 62, 26270, 11, 3440, 62, 11250, 198 ]
3.583333
12
# -*- coding:utf-8 -*- from preprocess.w2v.w2v_sv import w2sv import pickle import csv from utils.config import Config if __name__ == "__main__": config = Config() w2vs = w2sv() sentencesDict = {} with open(config.waimai_cn_path, newline='', encoding='UTF-8') as f: rows = csv.rea...
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 201, 198, 201, 198, 201, 198, 6738, 662, 14681, 13, 86, 17, 85, 13, 86, 17, 85, 62, 21370, 1330, 266, 17, 21370, 201, 198, 11748, 2298, 293, 201, 198, 11748, 269, 21370, 201...
1.915601
391
import re from os import listdir from os.path import abspath, relpath from scipy.misc import imsave from quiver_engine.util import deprocess_image
[ 11748, 302, 198, 6738, 28686, 1330, 1351, 15908, 198, 6738, 28686, 13, 6978, 1330, 2352, 6978, 11, 823, 6978, 198, 198, 6738, 629, 541, 88, 13, 44374, 1330, 545, 21928, 198, 198, 6738, 627, 1428, 62, 18392, 13, 22602, 1330, 1207, 305,...
3.234043
47
from django.template import library from django.template.defaultfilters import unordered_list from django.utils.http import urlencode try: from django_jinja import library as jinja_library import jinja2 except ImportError: jinja_library = None register = library.Library() @register.simple_tag() @regi...
[ 6738, 42625, 14208, 13, 28243, 1330, 5888, 198, 6738, 42625, 14208, 13, 28243, 13, 12286, 10379, 1010, 1330, 555, 24071, 62, 4868, 198, 6738, 42625, 14208, 13, 26791, 13, 4023, 1330, 2956, 11925, 8189, 628, 198, 28311, 25, 198, 220, 220...
2.743501
577
#!/usr/bin/env python # encoding: utf-8 """ Created by Maria Isabel Restrepo on 2012-12-6. Copyright (c) 2012 . All rights reserved. A script to set up a small "common bounding box for all CVG sites" """ import sys import os sys.path.append(os.pardir) import reg3d_transformations as reg3d_T import numpy as np from ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 21004, 25, 3384, 69, 12, 23, 198, 37811, 198, 41972, 416, 14200, 41838, 8324, 260, 7501, 319, 2321, 12, 1065, 12, 21, 13, 198, 15269, 357, 66, 8, 2321, 764, 1439, 2489, 10395, 1...
2.156633
7,591
"""\ Benchmark ========= Benchmarking methods for problem solutions in Python. """ from time import time def calltime(func): """Record elapsed time and function calls""" print('[benchmark] {}...'.format(func.__doc__)) wrap.cnt = wrap.ms = 0 return wrap
[ 37811, 59, 198, 220, 220, 220, 25187, 4102, 198, 220, 220, 220, 796, 2559, 628, 220, 220, 220, 25187, 4102, 278, 5050, 329, 1917, 8136, 287, 11361, 13, 198, 37811, 198, 198, 6738, 640, 1330, 640, 628, 198, 4299, 869, 2435, 7, 20786,...
2.908163
98
from datetime import datetime from typing import List from beanie import Document, Indexed from bson.objectid import ObjectId as BsonObjectId class CompanyModel(Document): """Company Model""" company_name: str company_id: str creation_datetime: datetime = datetime.now() company_email: Indexed(s...
[ 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 19720, 1330, 7343, 198, 198, 6738, 26394, 494, 1330, 16854, 11, 12901, 276, 198, 6738, 275, 1559, 13, 15252, 312, 1330, 9515, 7390, 355, 347, 1559, 10267, 7390, 628, 198, 198, 4871, 5834, ...
3.18543
151
import Queue number = int(raw_input()) visited = set() q = Queue.Queue() q.put((1, 1, 0)) while True: x, y, steps = q.get(False) if steps > 50: print len(visited) break visited.add((x, y)) if x - 1 >= 0 and not is_wall(x-1, y) and (x-1, y) not in visited: q.put((x-1, y, steps+1)) if x + 1 >= 0 and n...
[ 11748, 4670, 518, 198, 198, 17618, 796, 493, 7, 1831, 62, 15414, 28955, 198, 198, 4703, 863, 796, 900, 3419, 198, 198, 80, 796, 4670, 518, 13, 34991, 3419, 198, 80, 13, 1996, 19510, 16, 11, 352, 11, 657, 4008, 198, 198, 4514, 6407...
2.020761
289
#!/usr/bin/python """ CoinMarketCap USD Price History Print the CoinMarketCap USD price history for a particular cryptocurrency in CSV format. """ import sys import re import urllib2 import argparse import datetime parser = argparse.ArgumentParser() parser.add_argument("currency", help="This is the name of th...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 37811, 198, 24387, 27470, 15610, 11403, 7886, 7443, 628, 220, 12578, 262, 16312, 27470, 15610, 11403, 2756, 2106, 329, 257, 1948, 20210, 287, 44189, 5794, 13, 198, 37811, 198, 198, 11748, ...
2.73322
1,758
s = "String" l = [1, 2, "List"] t = (1, 2, "Tuple") print s[Index(2L)] print l[Index(2L)] print t[Index(2L)]
[ 198, 82, 796, 366, 10100, 1, 198, 75, 796, 685, 16, 11, 362, 11, 366, 8053, 8973, 198, 83, 796, 357, 16, 11, 362, 11, 366, 51, 29291, 4943, 198, 4798, 264, 58, 15732, 7, 17, 43, 15437, 198, 4798, 300, 58, 15732, 7, 17, 43, 1...
1.929825
57
# -*- coding: utf-8 -*- """ Tellus """ import datetime import json import requests class Tellus: """ Tellus """ api_token = "" market_token = "" expires_at = datetime.datetime.now() def auth(self): """ Authenticate for API """ print("Implement it in a ch...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 24446, 385, 198, 37811, 198, 198, 11748, 4818, 8079, 198, 11748, 33918, 198, 198, 11748, 7007, 628, 198, 4871, 14026, 385, 25, 198, 220, 220, 220, 37227, 198...
2.095768
898
#!/usr/bin/env python3 ''' 74x373 - Octal Register ''' from Chipdesc.chip import Chip class F373(Chip): ''' 74x373 - Octal Register ''' symbol_name = "F373" checked = "VAL 0031" symbol = ''' | | | | 11v 1v +--+--o--+ | | | LE OE | 3| |2 -->+D0 Q0+===...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 7061, 6, 8915, 87, 34770, 532, 2556, 282, 17296, 705, 7061, 198, 198, 6738, 17869, 20147, 13, 35902, 1330, 17869, 198, 198, 4871, 376, 34770, 7, 49985, 2599, 628, 220, 220, ...
1.652062
388
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.distributions.multivariate_normal import MultivariateNormal from algorithm import RRT_EPS from environment import LIMITS from utils import load_model
[ 11748, 299, 32152, 355, 45941, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 11748, 28034, 13, 40085, 355, 6436, 198, 6738, 28034, 13, 17080, 2455, 507, 13, ...
3.46988
83
import painter from collections import deque #returns last node (destination_node)
[ 11748, 34537, 198, 6738, 17268, 1330, 390, 4188, 628, 198, 2, 7783, 82, 938, 10139, 357, 16520, 1883, 62, 17440, 8 ]
4
21
from setuptools import setup # from pip.req import parse_requirements # parse_requirements() returns generator of pip.req.InstallRequirement objects # install_requires = [] # extra_requires = {} # for item in parse_requirements("requirements.txt", session=False): # req = str(item.req) # if item.markers is not...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 2, 422, 7347, 13, 42180, 1330, 21136, 62, 8897, 18883, 198, 198, 2, 21136, 62, 8897, 18883, 3419, 5860, 17301, 286, 7347, 13, 42180, 13, 15798, 16844, 24615, 5563, 198, 198, 2, 2721, 62, 47911...
2.642105
285
"""This is a plotting script for one particular configuration specified via command line argument. It can be called like this: `python plot_eigvals_vivit_vs_fb.py --config_str fmnist_2c2d_sgd` `run_plot_eigvals_vivit_vs_fb.py` automatically calls this script for all configurations. This script consists of 3 steps: ...
[ 37811, 1212, 318, 257, 29353, 4226, 329, 530, 1948, 8398, 7368, 2884, 3141, 220, 198, 1370, 4578, 13, 632, 460, 307, 1444, 588, 428, 25, 198, 63, 29412, 7110, 62, 68, 328, 12786, 62, 85, 452, 270, 62, 14259, 62, 21855, 13, 9078, 1...
2.427792
5,318
# Generated by Django 3.0.8 on 2020-10-23 15:06 from django.db import migrations, models import uuid
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 23, 319, 12131, 12, 940, 12, 1954, 1315, 25, 3312, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 334, 27112, 628 ]
2.861111
36
import pygame as game import sys as s import random as r game.init() print('\n' * 1000) print('awncer these questions with Y OR N\n') rick = input('do you like "never gonna give you up"') roll = input('do you like rolling') spam = input('do you like spam (email)') montyspam = input('do you like monty python\'s skit "...
[ 11748, 12972, 6057, 355, 983, 198, 11748, 25064, 355, 264, 198, 11748, 4738, 355, 374, 198, 6057, 13, 15003, 3419, 198, 4798, 10786, 59, 77, 6, 1635, 8576, 8, 198, 4798, 10786, 3832, 2189, 777, 2683, 351, 575, 6375, 399, 59, 77, 115...
2.473598
3,655
import pandas as pd import os
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 28686, 628, 628, 198 ]
2.833333
12
from frsclient.service.v2.api_collection_v2 import ApiCollectionV2 from frsclient.service.v2.compare_service import CompareServiceV2 from frsclient.service.v2.detect_service import DetectServiceV2 from frsclient.service.v2.face_service import FaceServiceV2 from frsclient.service.v2.face_set_service import FaceSetSe...
[ 6738, 1216, 82, 16366, 13, 15271, 13, 85, 17, 13, 15042, 62, 43681, 62, 85, 17, 1330, 5949, 72, 36307, 53, 17, 201, 198, 6738, 1216, 82, 16366, 13, 15271, 13, 85, 17, 13, 5589, 533, 62, 15271, 1330, 27814, 16177, 53, 17, 201, 19...
3.058824
153
import os import csv csv_path = os.path.join("Resources", "election_data.csv") with open(csv_path, newline="") as file: election_data_reader = csv.reader(file, delimiter=",") csv_header = next(election_data_reader) total_votes = 0 candidate_list = [] candidate_votes = [] for row in e...
[ 11748, 28686, 198, 11748, 269, 21370, 628, 198, 40664, 62, 6978, 796, 28686, 13, 6978, 13, 22179, 7203, 33236, 1600, 366, 14300, 62, 7890, 13, 40664, 4943, 628, 198, 4480, 1280, 7, 40664, 62, 6978, 11, 649, 1370, 2625, 4943, 355, 2393...
2.672334
647
# # PySNMP MIB module IF-MIB (http://pysnmp.sf.net) # ASN.1 source file:///usr/share/snmp/mibs/IF-MIB.txt # Produced by pysmi-0.0.7 at Fri Feb 17 12:48:35 2017 # On host 5641388e757d platform Linux version 4.4.0-62-generic by user root # Using Python version 2.7.13 (default, Dec 22 2016, 09:22:15) # ( Integer, ObjectI...
[ 2, 198, 2, 9485, 15571, 7378, 337, 9865, 8265, 16876, 12, 8895, 33, 357, 4023, 1378, 79, 893, 77, 3149, 13, 28202, 13, 3262, 8, 198, 2, 7054, 45, 13, 16, 2723, 2393, 1378, 14, 14629, 14, 20077, 14, 16184, 3149, 14, 76, 571, 82, ...
2.469323
7,579
import sys from django.conf import settings from django.contrib.auth.models import User from privileges.models import Privilege privilege_list = import_obj( getattr(settings, "PRIVILEGES_PRIVILEGE_LIST_CALLABLE", "privileges.grants._privilege_list") ) grantee_list = import_obj( getattr(settings, "PRIVIL...
[ 11748, 25064, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 198, 6738, 18850, 13, 27530, 1330, 9243, 41866, 628, 628, 198, 198, 13776, 41866, 62, 486...
2.737589
141
from __future__ import (absolute_import, print_function, unicode_literals) from acli.services.s3 import (s3_list) from acli.config import Config from moto import mock_s3 import pytest from boto3.session import Session session = Session(region_name="eu-west-1") @pytest.yield_fixture(scope='function') def s3_bucket():...
[ 6738, 11593, 37443, 834, 1330, 357, 48546, 62, 11748, 11, 3601, 62, 8818, 11, 28000, 1098, 62, 17201, 874, 8, 198, 6738, 257, 44506, 13, 30416, 13, 82, 18, 1330, 357, 82, 18, 62, 4868, 8, 198, 6738, 257, 44506, 13, 11250, 1330, 17...
2.241692
331
import argparse import pandas as pd import xgboost as xgb from sklearn.model_selection import train_test_split import hypertune from google.cloud import storage parser = argparse.ArgumentParser() parser.add_argument( '--job-dir', help='GCS location to write checkpoints and export models', required=True, ) ...
[ 11748, 1822, 29572, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 2124, 70, 39521, 355, 2124, 22296, 198, 6738, 1341, 35720, 13, 19849, 62, 49283, 1330, 4512, 62, 9288, 62, 35312, 198, 11748, 32608, 1726, 198, 6738, 23645, 13, 17721...
2.426531
980
from typing import Optional , List from .dbmodel import DBModelMixin from pydantic.types import constr , Any from ..core.jwt import create_access_token, get_file_from_token from enum import Enum, IntEnum from .rwmodel import RWModel from pydantic import validator # Sync with the frontend
[ 6738, 19720, 1330, 32233, 837, 7343, 198, 6738, 764, 9945, 19849, 1330, 20137, 17633, 35608, 259, 198, 6738, 279, 5173, 5109, 13, 19199, 1330, 1500, 81, 837, 4377, 198, 6738, 11485, 7295, 13, 73, 46569, 1330, 2251, 62, 15526, 62, 30001,...
3.355556
90
sol = Solution() target = 5478 result = sol.racecar(target) print(result)
[ 198, 34453, 796, 28186, 3419, 198, 16793, 796, 642, 29059, 198, 20274, 796, 1540, 13, 16740, 7718, 7, 16793, 8, 198, 4798, 7, 20274, 8 ]
2.96
25
from tlv import TLV
[ 6738, 256, 6780, 1330, 24811, 53, 628, 198 ]
2.75
8
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-10-09 17:43 from django.db import migrations import utilities.fields
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 19, 319, 2177, 12, 940, 12, 2931, 1596, 25, 3559, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 198, 11748, 20081, ...
2.729167
48
#------------------------------------------------------------------------------ # Copyright (c) 2019, Nucleic Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #-------------------------------------------------...
[ 2, 10097, 26171, 198, 2, 15069, 357, 66, 8, 13130, 11, 399, 14913, 291, 7712, 4816, 13, 198, 2, 198, 2, 4307, 6169, 739, 262, 2846, 286, 262, 40499, 347, 10305, 13789, 13, 198, 2, 198, 2, 383, 1336, 5964, 318, 287, 262, 2393, 27...
2.565957
705
# -*- coding: utf-8 -*- # Copyright (c) 2012-2015, Cenobit Technologies, Inc. http://cenobit.es/ # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain th...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 357, 66, 8, 2321, 12, 4626, 11, 327, 268, 672, 270, 21852, 11, 3457, 13, 2638, 1378, 66, 268, 672, 270, 13, 274, 14, 198, 2, 1439, 2489, 10395, 13, 198, ...
2.926329
828
text = input("Enter some text: ") y = text.lower() x = text.split() z = "owl" c = 0 index = 0 index1 = [] for i in range(len(x)): if z in x[index]: c = c + 1 index1.append(index) index = index + 1 print "There were " + str(c) + " words that contained \"owl\"." print "They occurred...
[ 5239, 796, 5128, 7203, 17469, 617, 2420, 25, 366, 8, 201, 198, 88, 796, 2420, 13, 21037, 3419, 201, 198, 87, 796, 2420, 13, 35312, 3419, 201, 198, 89, 796, 366, 4883, 1, 201, 198, 66, 796, 657, 201, 198, 9630, 796, 657, 201, 198...
2.272727
154
""" 问题描述:41个人排成一个圈,由第一个人开始报数,报数到3的人就自杀, 然后再由下一个人重新报1,报数到3的人再自杀,这样依次下去,直到剩下 最后一个人时,他可以自由选择自己的命运。这就是著名的约瑟夫问题,现在 请用单向环形链表描述该结构并呈现整个自杀过程 要求:输入一个环形单向链表的头结点head和报数的值m,返回最后生存的节 点,该节点自己组成一个单向环形链表,其他节点都删掉 进阶: 如果链表头结点数为N,想在时间复杂度为O(N)时完成原问题的要求,如何实现 思路:参见https://blog.oldj.net/2010/05/27/joseph-ring/ """ from linkedlist.toolcls...
[ 37811, 198, 29785, 106, 165, 95, 246, 162, 237, 237, 32573, 108, 171, 120, 248, 3901, 10310, 103, 21689, 162, 236, 240, 22755, 238, 31660, 10310, 103, 28839, 230, 171, 120, 234, 18796, 109, 163, 105, 105, 31660, 10310, 103, 21689, 281...
1.155797
828
from multiprocessing import get_context import pickle import re import pytest from rlp import SerializationError from rlp import infer_sedes, encode, decode from rlp.sedes import big_endian_int, binary, List from rlp.sedes.serializable import Serializable _type_1_a = RLPType1(5, b'a', (0, b'')) _type_1_b = RL...
[ 6738, 18540, 305, 919, 278, 1330, 651, 62, 22866, 198, 11748, 2298, 293, 198, 11748, 302, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 374, 34431, 1330, 23283, 1634, 12331, 198, 6738, 374, 34431, 1330, 13249, 62, 36622, 274, 11, 37773,...
1.925276
1,539
from allauth.account.adapter import DefaultAccountAdapter from allauth.socialaccount.adapter import DefaultSocialAccountAdapter from allauth.exceptions import ImmediateHttpResponse from allauth.socialaccount.signals import pre_social_login from allauth.account.models import EmailAddress from django.contrib.auth import ...
[ 6738, 477, 18439, 13, 23317, 13, 324, 3429, 1330, 15161, 30116, 47307, 198, 6738, 477, 18439, 13, 14557, 23317, 13, 324, 3429, 1330, 15161, 20636, 30116, 47307, 198, 6738, 477, 18439, 13, 1069, 11755, 1330, 1846, 13857, 43481, 31077, 198,...
3.181058
359
from .use import ( add_stoys_jars, add_stoys_jars_packages, get_stoys_jars, get_stoys_jars_packages, get_stoys_ui_js_content, ) __all__ = [ "get_stoys_jars_packages", "get_stoys_jars", "get_stoys_ui_js_content", "add_stoys_jars", "add_stoys_jars_packages", ]
[ 6738, 764, 1904, 1330, 357, 198, 220, 220, 220, 751, 62, 301, 19417, 62, 73, 945, 11, 198, 220, 220, 220, 751, 62, 301, 19417, 62, 73, 945, 62, 43789, 11, 198, 220, 220, 220, 651, 62, 301, 19417, 62, 73, 945, 11, 198, 220, 220...
1.923077
156
# 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 writing, software # distributed under t...
[ 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 198, 2, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 921, 743, 7330, 198, 2, 257, 4866, 286, 262, 13789, 379, 198, 2,...
3.742739
241
# This script is a QC implementation of the two population Tennessen Out Of Africa model import msprime import numpy as np import math import stdpopsim.models as models
[ 2, 770, 4226, 318, 257, 36070, 7822, 286, 262, 734, 3265, 9368, 1108, 268, 3806, 3226, 5478, 2746, 198, 11748, 13845, 35505, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 10688, 198, 11748, 14367, 79, 2840, 320, 13, 27530, 355, 4981, ...
4.02381
42
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F # class LeNet(nn.Module): # def __init__(self, n_classes): # super(LeNet, self).__init__() # self.conv1 = nn.Conv2d(1, 5, 5, 1) # self.conv2 = nn.Conv2d(5, 10, 5, 1) # self.fc1 = nn.Linear(4*4*10, ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 198, 2, 1398, 1004, 7934, 7, 20471, 13, 26796, 2599, 198, 2, 220, 220, 220, 220, 8...
1.6618
411
#!/bin/python import sys, re F1, F2 = open(sys.argv[1]), open(sys.argv[2]) f1,f2 = [i.strip('\n') for i in F1], [i.strip('\n') for i in F2] n=0 firstline, secondline = [],[] for i in range(1, len(f1[1])+1): if not i%10: n+=1 firstline.append(colored(str(n))) secondline.append(colored('0'...
[ 2, 48443, 8800, 14, 29412, 198, 198, 11748, 25064, 11, 302, 198, 198, 37, 16, 11, 376, 17, 796, 1280, 7, 17597, 13, 853, 85, 58, 16, 46570, 1280, 7, 17597, 13, 853, 85, 58, 17, 12962, 198, 69, 16, 11, 69, 17, 796, 685, 72, 1...
1.892562
363
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
# # Dimensional and dimensionless parameter values, and scales # import pybamm import pandas as pd import os import numbers class ParameterValues(dict): """ The parameter values for a simulation. Parameters ---------- values : dict or string Explicit set of parameters, or reference to a f...
[ 2, 198, 2, 360, 16198, 290, 15793, 1203, 11507, 3815, 11, 290, 16252, 198, 2, 198, 11748, 12972, 65, 6475, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 28686, 198, 11748, 3146, 628, 198, 4871, 25139, 2357, 40161, 7, 11600, 2599, ...
2.237687
7,228
import psycopg2 import os if __name__ == "__main__": main()
[ 11748, 17331, 22163, 70, 17, 198, 11748, 28686, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419, 198 ]
2.392857
28
# Author: a101269 # Date : 2020/5/26
[ 2, 220, 220, 220, 6434, 25, 220, 257, 8784, 26276, 198, 2, 220, 220, 220, 7536, 220, 1058, 220, 12131, 14, 20, 14, 2075, 628, 628 ]
1.884615
26
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Project : PyCoA - Copyright ©pycoa.fr Date : april 2020 - march 2021 Authors : Olivier Dadoun, Julien Browaeys, Tristan Beau License: See joint LICENSE file Tool : ./list_requires.py About ----- This small tool is for internal use in order to properly maintain the ...
[ 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, 16775, 1058, 9485, 7222, 32, 532, 15069, 10673, 9078, 1073, 64, 13, 8310, 198, 10430, 1058, 220, 220, 220, ...
2.566265
332
from itertools import combinations_with_replacement from ..core import Derivative, Eq, Function, Symbol, diff, sympify from ..core.compatibility import iterable def euler_equations(L, funcs=(), vars=()): r""" Find the Euler-Lagrange equations for a given Lagrangian. Parameters ========== L : Ex...
[ 6738, 340, 861, 10141, 1330, 17790, 62, 4480, 62, 35666, 5592, 198, 198, 6738, 11485, 7295, 1330, 9626, 452, 876, 11, 412, 80, 11, 15553, 11, 38357, 11, 814, 11, 10558, 1958, 198, 6738, 11485, 7295, 13, 5589, 25901, 1330, 11629, 540, ...
2.249632
1,358
SoftBodySettings.effector_weights = None
[ 18380, 25842, 26232, 13, 10760, 273, 62, 43775, 796, 6045, 628, 198 ]
3.583333
12
from flask import request, Blueprint, Response # Import the database object (db) from the main application module # and the app object to initialize the flask_login manager from app import app, db # Import module models (i.e. User) from app.models.tweets_model import Tweet from app.models.labels_model import Label imp...
[ 6738, 42903, 1330, 2581, 11, 39932, 11, 18261, 198, 198, 2, 17267, 262, 6831, 2134, 357, 9945, 8, 422, 262, 1388, 3586, 8265, 198, 2, 290, 262, 598, 2134, 284, 41216, 262, 42903, 62, 38235, 4706, 198, 6738, 598, 1330, 598, 11, 20613...
2.754098
427
# encoding: utf-8 from __future__ import unicode_literals import os.path import pytest from webob.exc import HTTPForbidden, HTTPNotFound from web.core.context import Context from web.app.static import static HERE = os.path.dirname(__file__) sample = Sample()
[ 2, 21004, 25, 3384, 69, 12, 23, 198, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 11748, 28686, 13, 6978, 198, 11748, 12972, 9288, 198, 198, 6738, 3992, 672, 13, 41194, 1330, 14626, 1890, 37978, 11, 14626...
3.067416
89
import os import setuptools with open("README.md", "r") as fh: long_description = fh.read() here = os.path.dirname(os.path.abspath(__file__)) version_ns = {} with open(os.path.join(here, "jupyterlab_heroku", "_version.py")) as f: exec(f.read(), {}, version_ns) setuptools.setup( name="jupyterlab_heroku", ...
[ 11748, 28686, 198, 11748, 900, 37623, 10141, 198, 198, 4480, 1280, 7203, 15675, 11682, 13, 9132, 1600, 366, 81, 4943, 355, 277, 71, 25, 198, 220, 220, 220, 890, 62, 11213, 796, 277, 71, 13, 961, 3419, 198, 198, 1456, 796, 28686, 13,...
2.587786
262
import networkx as nx from pymnet import * import random import matplotlib import numpy as np import math import cascade as cas import pandas as pd import csv matplotlib.use('TkAgg') coords = {} if __name__ == "__main__": """ data_set = [['Kim', 1, 21], ['Park', 2, 23, 70], ['Lee', 3, 19], ['Choi', 4]] ...
[ 11748, 3127, 87, 355, 299, 87, 198, 6738, 279, 4948, 3262, 1330, 1635, 198, 11748, 4738, 198, 11748, 2603, 29487, 8019, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 10688, 198, 11748, 44847, 355, 6124, 198, 11748, 19798, 292, 355, 27...
1.831232
1,428
# -*- coding: utf-8 -*- """ This module provides the funcitonality to save function results persistent between different runs. The `persistent_cache` decorator makes that possible. The result gets stored along with the hash of the function body as key, to determine changes in the function and its behavior. This also m...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 1212, 8265, 3769, 262, 25439, 37752, 1483, 284, 3613, 2163, 2482, 16218, 198, 23395, 1180, 4539, 13, 383, 4600, 19276, 7609, 62, 23870, 63, 11705, 1352, 1838, ...
3.665595
311
import json, argparse from dashboardApi import import_grafana_settings, search_datasource from commons import print_horizontal_line from datetime import datetime parser = argparse.ArgumentParser() parser.add_argument('path', help='folder path to save datasources') parser.add_argument('conf_filename', default="grafana...
[ 11748, 33918, 11, 1822, 29572, 198, 6738, 30415, 32, 14415, 1330, 1330, 62, 70, 32188, 2271, 62, 33692, 11, 2989, 62, 19608, 292, 1668, 198, 6738, 36523, 1330, 3601, 62, 17899, 38342, 62, 1370, 198, 6738, 4818, 8079, 1330, 4818, 8079, ...
2.69258
283
# -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import division import hgtk
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 198, 11748, 289, 13655, 74, 628, 628 ]
2.825
40
if __name__ == '__main__': import keras as ks import numpy as np from agents.deep_q import DeepQLearning from environments.flappybird import FlappyBird from q_network import QNetwork nn = ks.models.Sequential() nn.add(ks.layers.Dense(32, activation='sigmoid', input_shape=(8,))) nn.add(...
[ 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1330, 41927, 292, 355, 479, 82, 198, 220, 220, 220, 1330, 299, 32152, 355, 45941, 198, 220, 220, 220, 422, 6554, 13, 22089, 62, 80, 1330, 10766, 9711...
2.275229
327
import pytest, os, uuid from tenable.cs import ContainerSecurity from tenable.errors import * from tests.checker import check @pytest.fixture(autouse=True) @pytest.fixture(autouse=True) @pytest.fixture @pytest.fixture
[ 11748, 12972, 9288, 11, 28686, 11, 334, 27112, 198, 6738, 3478, 540, 13, 6359, 1330, 43101, 24074, 198, 6738, 3478, 540, 13, 48277, 1330, 1635, 198, 6738, 5254, 13, 9122, 263, 1330, 2198, 198, 198, 31, 9078, 9288, 13, 69, 9602, 7, 2...
2.87013
77
from math import pi, acos, cos, sin from decimal import Decimal import requests import urllib.parse from django.conf import settings
[ 6738, 10688, 1330, 31028, 11, 936, 418, 11, 8615, 11, 7813, 198, 6738, 32465, 1330, 4280, 4402, 198, 198, 11748, 7007, 198, 11748, 2956, 297, 571, 13, 29572, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 628, 198 ]
3.512821
39
import os import json import requests import collections import functools from cachegrab.utils.utils import make_path from cachegrab.utils.hash import hash_md5 class BasicCachingGetter(object): """ Simple cache controller for the most basic use case: wrapping requests, and saving the response as a json. ...
[ 11748, 28686, 198, 11748, 33918, 198, 11748, 7007, 198, 11748, 17268, 198, 11748, 1257, 310, 10141, 198, 198, 6738, 12940, 32393, 13, 26791, 13, 26791, 1330, 787, 62, 6978, 198, 6738, 12940, 32393, 13, 26791, 13, 17831, 1330, 12234, 62, ...
2.418139
849
# -*- coding: utf-8 -*- """Module providing some Jenkins test report in JSON format. """ def get_jenkins_test_report_response(): """Returns a Jenkins test report in JSON format as it is done via the `/testreport/api/json` endpoint.""" # pylint: disable=line-too-long return { "_class": "hudson.tas...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 26796, 4955, 617, 21835, 1332, 989, 287, 19449, 5794, 13, 198, 37811, 628, 198, 4299, 651, 62, 48796, 5331, 62, 9288, 62, 13116, 62, 26209, 33529, 198, 220, ...
1.491737
8,895
import csv import io import json import yaml from airone.celery import app from airone.lib.types import AttrTypeValue from django.conf import settings from entry.models import Entry from job.models import Job from natsort import natsorted @app.task(bind=True)
[ 11748, 269, 21370, 198, 11748, 33245, 198, 11748, 33918, 198, 11748, 331, 43695, 198, 198, 6738, 1633, 505, 13, 7015, 88, 1330, 598, 198, 6738, 1633, 505, 13, 8019, 13, 19199, 1330, 3460, 81, 6030, 11395, 198, 6738, 42625, 14208, 13, ...
3.3125
80
import csv import os import numpy as np import matplotlib.image as mpimg import matplotlib.pyplot as plt import sklearn from sklearn.model_selection import train_test_split import math import cv2 # Read data sample # Load training history # Plot the model loss against learning rate # Plot training data distribution...
[ 11748, 269, 21370, 198, 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9060, 355, 29034, 9600, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 1341, 35720, 198, 6738, 1341, ...
3.516949
236
# Copyright 2019 DeepMind Technologies Limited # # 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 agr...
[ 2, 15069, 13130, 10766, 28478, 21852, 15302, 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, ...
3.02585
735
#!/usr/bin/python3 import plistlib import subprocess if __name__ == "__main__": print("Warning! This script is intended to be run as a library, not a runnable script!") return 1
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 11748, 458, 396, 8019, 198, 11748, 850, 14681, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 3601, 7203, 20361, 0, 770, 4226, 318, 5292, 28...
2.953125
64
# -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2021-01-31 19:08 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 1959, 319, 33448, 12, 486, 12, 3132, 678, 25, 2919, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.753623
69
import errno import shutil
[ 11748, 11454, 3919, 198, 11748, 4423, 346, 628 ]
3.5
8
# -*- coding:utf-8 -*- # # Create an OpenGL window with GLUT to display a 3D mesh # # External dependencies import sys import OpenGL import OpenGL.GL as gl import OpenGL.GLUT as glut import MeshToolkit as mtk # Create an OpenGL frame with GLUT
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 198, 2, 198, 2, 13610, 281, 30672, 4324, 351, 10188, 3843, 284, 3359, 257, 513, 35, 19609, 198, 2, 198, 198, 2, 34579, 20086, 198, 11748, 25064, 198, 11748, 30672, 198, 1...
3.207792
77
# -*- coding: utf-8 -*- from multiprocessing import Pool from .isiscommand import Isis, IsisCommand __all__ = [ 'IsisPool', 'QueuedIsisCommand' ] class IsisPool(Isis): """Multiprocessing pool for ISIS commands. Example for running the following isis script in parallel for a list of images. ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 18540, 305, 919, 278, 1330, 19850, 198, 6738, 764, 271, 271, 21812, 1330, 16530, 11, 16530, 21575, 628, 198, 834, 439, 834, 796, 685, 198, 220, 220, 220, 705, 37...
2.404899
694
""" sentry.models.auditlogentry ~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import, print_function from django.db import models from django.utils import timezone from sentry.db...
[ 37811, 198, 82, 13000, 13, 27530, 13, 3885, 270, 6404, 13000, 198, 27156, 15116, 4907, 93, 198, 198, 25, 22163, 4766, 25, 357, 66, 8, 3050, 12, 4967, 416, 262, 11352, 563, 4816, 11, 766, 37195, 20673, 329, 517, 3307, 13, 198, 25, ...
3.183824
136
from time_series_transform.transform_core_api import ( Pandas_Time_Series_Panel_Dataset, Pandas_Time_Series_Tensor_Dataset, ) from time_series_transform.stock_transform import ( Portfolio_Extractor, Stock_Extractor )
[ 6738, 640, 62, 25076, 62, 35636, 13, 35636, 62, 7295, 62, 15042, 1330, 357, 198, 220, 220, 220, 16492, 292, 62, 7575, 62, 27996, 62, 26639, 62, 27354, 292, 316, 11, 198, 220, 220, 220, 16492, 292, 62, 7575, 62, 27996, 62, 51, 2285...
2.732558
86
import functools import gzip import re from difflib import SequenceMatcher from pathlib import Path from django.conf import settings from django.core.exceptions import ( FieldDoesNotExist, ImproperlyConfigured, ValidationError, ) from django.utils.functional import cached_property, lazy from django.utils.html impo...
[ 11748, 1257, 310, 10141, 198, 11748, 308, 13344, 198, 11748, 302, 198, 6738, 814, 8019, 1330, 45835, 19044, 2044, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 7295, ...
3.102226
1,213
import datetime import gzip import json import logging import random import re import redis import requests import StringIO import time from requests.exceptions import RequestException from timeit import default_timer as timer import paho.mqtt.client as mqtt log = logging.getLogger(__name__) #...
[ 11748, 4818, 8079, 201, 198, 11748, 308, 13344, 201, 198, 11748, 33918, 201, 198, 11748, 18931, 201, 198, 11748, 4738, 201, 198, 11748, 302, 201, 198, 11748, 2266, 271, 201, 198, 11748, 7007, 201, 198, 11748, 10903, 9399, 201, 198, 1174...
2.852459
549
# Generated by Django 2.2.3 on 2019-07-23 07:19 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 18, 319, 13130, 12, 2998, 12, 1954, 8753, 25, 1129, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
import myFunction import numpy as np # def test_similarity_conditional2(self): # freqUV = np.asarray([[2,3],[3,4]]) # freqU = np.asarray([2,0]) # u = 0 # v = 1 # assert myFunction.similarity_conditional(freqUV,freqU, u, v) == 0
[ 11748, 616, 22203, 198, 11748, 299, 32152, 355, 45941, 628, 197, 2, 825, 1332, 62, 38610, 414, 62, 17561, 1859, 17, 7, 944, 2599, 198, 197, 2, 220, 197, 19503, 80, 31667, 796, 45941, 13, 292, 18747, 26933, 58, 17, 11, 18, 38430, 1...
2.153153
111
#!/usr/bin/env python # -*- coding: utf-8 -*- from multiprocessing import Process, Value, Queue, Semaphore import argparse import re import os import sys q = Queue() #inicialização da queue sem = Semaphore(1) #inicialização do semáforo n = Value('i',0) #inicialização da variável partilhada def pgrep(list_files, tex...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628, 198, 6738, 18540, 305, 919, 278, 1330, 10854, 11, 11052, 11, 4670, 518, 11, 12449, 6570, 382, 198, 11748, 1822, 29572, ...
2.557652
954
# # Copyright (c) 2020 by Delphix. All rights reserved. # ####################################################################################################################### # In this module, functions defined for couchbase backup manager ingestion mechanism. ########################################################...
[ 2, 198, 2, 15069, 357, 66, 8, 12131, 416, 4216, 746, 844, 13, 1439, 2489, 10395, 13, 198, 2, 198, 29113, 29113, 29113, 14468, 4242, 21017, 198, 2, 554, 428, 8265, 11, 5499, 5447, 329, 18507, 8692, 11559, 4706, 38382, 9030, 13, 198, ...
4.89
200
#!/usr/bin/env python # encoding: utf-8 # # instrumentState.py # from __future__ import division from __future__ import print_function from __future__ import absolute_import import click from alertsActor.cmds import alerts_context __all__ = ('instrumentState') @click.command() @click.argument('instrument', nargs...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 21004, 25, 3384, 69, 12, 23, 198, 2, 198, 2, 8875, 9012, 13, 9078, 198, 2, 628, 198, 6738, 11593, 37443, 834, 1330, 7297, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198...
2.619385
423
import conmato # Provide your contestID or your contest URL contestID = '256575' groupID = 'bveFK04PIR' ss = conmato.CSession() ss.login('74164707NgocBH','123456789') conmato.crawl_checked_standings(ss, contestID)
[ 11748, 369, 76, 5549, 198, 198, 2, 44290, 534, 8414, 2389, 393, 534, 8414, 10289, 198, 3642, 395, 2389, 796, 705, 1495, 2996, 2425, 6, 198, 8094, 2389, 796, 705, 65, 303, 26236, 3023, 47, 4663, 6, 198, 824, 796, 369, 76, 5549, 13,...
2.529412
85
from .psenet import PSENET_IC15 from .builder import build_data_loader __all__ = ['PSENET_IC15']
[ 6738, 764, 862, 268, 316, 1330, 6599, 1677, 2767, 62, 2149, 1314, 201, 198, 6738, 764, 38272, 1330, 1382, 62, 7890, 62, 29356, 201, 198, 201, 198, 834, 439, 834, 796, 37250, 3705, 1677, 2767, 62, 2149, 1314, 20520, 201, 198 ]
2.487805
41
from requests import Session #Create a re-usable session object which re-uses connection, mantains a pool. session = Session() #Optional: Configure user-agent here so that upstream servers know which library/version is making the request
[ 6738, 7007, 1330, 23575, 198, 198, 2, 16447, 257, 302, 12, 31979, 6246, 2134, 543, 302, 12, 2664, 4637, 11, 24818, 1299, 257, 5933, 13, 198, 29891, 796, 23575, 3419, 198, 2, 30719, 25, 17056, 495, 2836, 12, 25781, 994, 523, 326, 287...
4.444444
54
#-*-coding:utf-8-*- #@Author:刘瀚轩 #@Date:2018-4-28 #@mail:m13143378602@163.com #@function:histogram equalization import PIL import numpy as np import matplotlib.pyplot as plt from tkinter import * from tkinter.ttk import * from tkinter import messagebox from tkinter.filedialog import askopenfilename from collections i...
[ 171, 119, 123, 2, 12, 9, 12, 66, 7656, 25, 40477, 12, 23, 12, 9, 12, 198, 2, 31, 13838, 25, 26344, 246, 163, 222, 248, 164, 121, 102, 198, 2, 31, 10430, 25, 7908, 12, 19, 12, 2078, 198, 2, 31, 4529, 25, 76, 1485, 1415, 209...
1.814815
297
import os import dash_html_components as html import dash_core_components as dcc from dash_bio import ManhattanPlot from dash_bio.component_factory._manhattan import SUGGESTIVE_LINE_LABEL, GENOMEWIDE_LINE_LABEL from tests.dashbio_demos.app_manhattan_plot import DATASET from .test_common_features import ( init_demo_...
[ 11748, 28686, 198, 11748, 14470, 62, 6494, 62, 5589, 3906, 355, 27711, 198, 11748, 14470, 62, 7295, 62, 5589, 3906, 355, 288, 535, 198, 6738, 14470, 62, 65, 952, 1330, 13458, 43328, 198, 6738, 14470, 62, 65, 952, 13, 42895, 62, 69, ...
2.229008
2,096
# 1296. 划分数组为连续数字的集合 # # 20200727 # huao # 这个时间用的很有点长... # 当然,细节上可以改进的,毕竟很多库函数在特定情况下有更好更快的实现方法 from typing import List sol = Solution() print(sol.isPossibleDivide([3, 2, 1, 2, 3, 4, 3, 4, 5, 9, 10, 11], 3))
[ 2, 1105, 4846, 13, 10263, 7134, 26344, 228, 46763, 108, 163, 119, 226, 10310, 118, 32573, 252, 163, 119, 255, 46763, 108, 27764, 245, 21410, 37239, 228, 28938, 230, 198, 2, 198, 2, 1160, 12726, 1983, 198, 2, 289, 84, 5488, 198, 2, ...
1.082051
195
from math import acos, degrees, hypot def checkio(data): """list[list[int, int],] -> list[int,]. Find the convex hull. """ SortedData = sorted(data, key=lambda x: (x[0], x[1])) SortedData += [SortedData[0]] PointList = [] CurrentAngle = 0 CurrentPoint = SortedData[0] while 1: ...
[ 6738, 10688, 1330, 936, 418, 11, 7370, 11, 8813, 628, 628, 198, 4299, 2198, 952, 7, 7890, 2599, 198, 220, 220, 220, 37227, 4868, 58, 4868, 58, 600, 11, 493, 4357, 60, 4613, 1351, 58, 600, 11, 4083, 628, 220, 220, 220, 9938, 262, ...
2.03271
856
from django.test import TestCase from mock import patch from django_datajsonar.models import Node from series_tiempo_ar_api.apps.metadata.indexer.metadata_indexer import run_metadata_indexer from series_tiempo_ar_api.apps.metadata.models import IndexMetadataTask @patch('series_tiempo_ar_api.apps.metadata.indexer.met...
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 15290, 1330, 8529, 198, 6738, 42625, 14208, 62, 7890, 17752, 283, 13, 27530, 1330, 19081, 198, 198, 6738, 2168, 62, 20259, 368, 7501, 62, 283, 62, 15042, 13, 18211, 13, 38993, ...
3.205357
112
# !/usr/bin/env python3 # Author: C.K # Email: theck17@163.com # DateTime:2021-08-30 22:23:43 # Description: if __name__ == "__main__": pass
[ 2, 5145, 14, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 6434, 25, 327, 13, 42, 198, 2, 9570, 25, 262, 694, 1558, 31, 24136, 13, 785, 198, 2, 7536, 7575, 25, 1238, 2481, 12, 2919, 12, 1270, 2534, 25, 1954, 25, 3559, 198, 2,...
2.227273
66
import Drop7.Board as Board import Drop7.Disk as Disk wrapped_disk_value_1 = None wrapped_disk_value_2 = None wrapped_disk_value_3 = None wrapped_disk_value_3_B = None wrapped_disk_value_3_C = None wrapped_disk_value_5 = None visible_disk_value_1 = None visible_disk_value_2 = None visible_disk_value_2_B = None visible...
[ 11748, 14258, 22, 13, 29828, 355, 5926, 198, 11748, 14258, 22, 13, 40961, 355, 31664, 198, 198, 29988, 1496, 62, 39531, 62, 8367, 62, 16, 796, 6045, 198, 29988, 1496, 62, 39531, 62, 8367, 62, 17, 796, 6045, 198, 29988, 1496, 62, 395...
2.135075
17,220
# Generated by Django 3.2.4 on 2021-06-16 09:36 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 19, 319, 33448, 12, 3312, 12, 1433, 7769, 25, 2623, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
""" Support tool for changing and granting course entitlements """ from django.utils.decorators import method_decorator from django.views.generic import View from common.djangoapps.edxmako.shortcuts import render_to_response from common.djangoapps.entitlements.models import CourseEntitlementSupportDetail from lms.dj...
[ 37811, 198, 15514, 2891, 329, 5609, 290, 21787, 1781, 44594, 902, 198, 37811, 628, 198, 6738, 42625, 14208, 13, 26791, 13, 12501, 273, 2024, 1330, 2446, 62, 12501, 273, 1352, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 1330, 3582, 19...
2.847059
425
# Copyright (c) 2016 MetPy Developers. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """Tests for the `_mpl` module.""" from tempfile import TemporaryFile import matplotlib.patheffects as mpatheffects import matplotlib.pyplot as plt import numpy as np # Needed to ...
[ 2, 15069, 357, 66, 8, 1584, 3395, 20519, 34152, 13, 198, 2, 4307, 6169, 739, 262, 2846, 286, 262, 347, 10305, 513, 12, 2601, 682, 13789, 13, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 347, 10305, 12, 18, 12, 2601, 682, 1...
2.777494
391
import requests_with_caching import json
[ 11748, 7007, 62, 4480, 62, 66, 8103, 198, 11748, 33918, 198 ]
3.727273
11
import os import ujson from loc import loc from urllib.request import urlopen import json import numpy as np ak=os.environ['BAIDU_MAP_API_KEY'] def getDistance(origin, destination, getDuration=False): ''' Format of origin and destination: { "latitude": int, "longitude": int } Return the distance/du...
[ 198, 11748, 28686, 198, 11748, 334, 17752, 198, 6738, 1179, 1330, 1179, 198, 198, 6738, 2956, 297, 571, 13, 25927, 1330, 19016, 9654, 198, 11748, 33918, 198, 11748, 299, 32152, 355, 45941, 198, 198, 461, 28, 418, 13, 268, 2268, 17816, ...
2.224897
1,454
from buildercore import core import utils from decorators import requires_aws_stack, echo_output import logging LOG = logging.getLogger(__name__) @requires_aws_stack def rds_snapshots(stackname): "prints all snapshots for given stack, order by creation time" inst = core.find_rds_instances(stackname)[0] con...
[ 6738, 1382, 2798, 382, 1330, 4755, 198, 11748, 3384, 4487, 198, 6738, 11705, 2024, 1330, 4433, 62, 8356, 62, 25558, 11, 9809, 62, 22915, 198, 11748, 18931, 198, 25294, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 198, 198,...
2.77907
258
import os import struct unit_type={ 0:"X-COM Agent", 1:"Multiworm egg", 2:"Brainsucker", 3:"Multiworm", 4:"Hyperworm", 5:"Chrystali", 6:"Anthropods", 7:"Skeletoids", 8:"Spitter", 9:"Poppers", 10:"Megaspawn", 11:"Psimorphs", 12:"Quinspawn", 13:"Micronoid_aggregate", 14:"P...
[ 11748, 28686, 201, 198, 11748, 2878, 201, 198, 201, 198, 20850, 62, 4906, 34758, 201, 198, 220, 657, 11097, 55, 12, 9858, 15906, 1600, 201, 198, 220, 352, 11097, 15205, 14246, 579, 5935, 1600, 201, 198, 220, 362, 11097, 9414, 1299, 12...
2.514444
900
import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np import torch LINE_COLORS = ['w', 'r', 'orange', 'k', 'cyan', 'm', 'b', 'lime', 'g', 'brown', 'navy']
[ 11748, 2603, 29487, 8019, 198, 198, 6759, 29487, 8019, 13, 1904, 10786, 46384, 11537, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 198, 24027, 62, 25154, 20673, ...
2.532468
77