content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
from typing import List, Tuple, Union import numpy as np import scipy.special from PIL import Image, ImageFilter if __name__ == "__main__": import argparse from PIL import ImageOps parser = argparse.ArgumentParser() parser.add_argument("--operation", choices=("dilate", "erode"), default="dilate"...
[ 6738, 19720, 1330, 7343, 11, 309, 29291, 11, 4479, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 13, 20887, 198, 6738, 350, 4146, 1330, 7412, 11, 7412, 22417, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, ...
2.282609
368
import sys from fabric.utils import error, puts from git import RemoteProgress
[ 11748, 25064, 198, 198, 6738, 9664, 13, 26791, 1330, 4049, 11, 7584, 198, 6738, 17606, 1330, 21520, 32577, 628, 628, 198 ]
4
21
# -*- coding: utf-8 -*- from collections import Counter from konlpy.tag import Okt
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 6738, 17268, 1330, 15034, 198, 6738, 479, 261, 75, 9078, 13, 12985, 1330, 6762, 83, 628 ]
2.741935
31
# Copyright (c) 2014, Fundacion Dr. Manuel Sadosky # 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 condit...
[ 2, 15069, 357, 66, 8, 1946, 11, 7557, 49443, 1583, 13, 25995, 14668, 418, 2584, 198, 2, 1439, 2489, 10395, 13, 198, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 393, 1231, 198, 2, 17613, 11, 389, 10431,...
3.368421
475
#!/usr/bin/env python3 # -*- coding:utf-8 -*- # sema_signal.py # # An example of using a semaphore for signaling between threads import threading import time done = threading.Semaphore(0) # Resource control. item = None t1 = threading.Thread(target=producer) t2 = threading.Thread(target=consumer) t1.sta...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 2, 5026, 64, 62, 12683, 282, 13, 9078, 198, 2, 198, 2, 1052, 1672, 286, 1262, 257, 5026, 6570, 382, 329, 22049, 10...
2.918803
234
'''Analysis utility functions. :Author: Jonathan Karr <karr@mssm.edu> :Date: 2016-03-26 :Copyright: 2016-2018, Karr Lab :License: MIT ''' # TODO(Arthur): IMPORTANT: refactor and replace from matplotlib import pyplot from matplotlib import ticker from wc_lang import Model, Submodel from scipy.constants import Avogadr...
[ 7061, 6, 32750, 10361, 5499, 13, 198, 198, 25, 13838, 25, 11232, 509, 3258, 1279, 74, 3258, 31, 76, 824, 76, 13, 15532, 29, 198, 25, 10430, 25, 1584, 12, 3070, 12, 2075, 198, 25, 15269, 25, 1584, 12, 7908, 11, 509, 3258, 3498, 1...
2.94958
119
from setuptools import setup, find_packages with open("README.md", "r") as readme_file: readme = readme_file.read() requirements = [ 'xgboost>=0.90', 'catboost>=0.26', 'bayesian-optimization>=1.2.0', 'numpy>=1.19.5', 'pandas>=1.1.5', 'matplotlib>=3.2.2', 'seaborn>=0.11.1', 'plotly>...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 4480, 1280, 7203, 15675, 11682, 13, 9132, 1600, 366, 81, 4943, 355, 1100, 1326, 62, 7753, 25, 198, 220, 220, 220, 1100, 1326, 796, 1100, 1326, 62, 7753, 13, 961, 34...
2.201456
412
""" increment_version.py written in Python3 author: C. Lockhart <chris@lockhartlab.org> """ import yaml # Read in version with open('version.yml', 'r') as f: version = yaml.safe_load(f.read()) # Strip "dev" out of micro version['micro'] = int(str(version['micro']).replace('dev', '')) # Update patch version['mi...
[ 37811, 198, 24988, 434, 62, 9641, 13, 9078, 198, 15266, 287, 11361, 18, 198, 9800, 25, 327, 13, 13656, 18647, 1279, 354, 2442, 31, 5354, 18647, 23912, 13, 2398, 29, 198, 37811, 628, 198, 11748, 331, 43695, 198, 198, 2, 4149, 287, 21...
2.761745
298
import sys import numpy try: from collections.abc import Iterable except ImportError: from collections import Iterable from .. import util from ..element import Element from ..ndmapping import NdMapping, item_check, sorted_context from .interface import Interface from . import pandas from .util import cached ...
[ 11748, 25064, 198, 11748, 299, 32152, 198, 198, 28311, 25, 198, 220, 220, 220, 422, 17268, 13, 39305, 1330, 40806, 540, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 422, 17268, 1330, 40806, 540, 198, 198, 6738, 11485, 1330, 7736, ...
3.747368
95
# -*- coding: utf-8 -*- """ Handles the tournament logic """ import datetime from chess.utils.utils import get_new_id from chess.models.actors import Player from chess.models.round import Round TOURNAMENT_ID_WIDTH = 8 NB_ROUND = 4 NB_PLAYERS = 8 NB_MATCH = 4
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 628, 198, 37811, 198, 12885, 829, 262, 7756, 9156, 198, 37811, 628, 198, 11748, 4818, 8079, 198, 198, 6738, 19780, 13, 26791, 13, 26791, 1330, 651, 62, 3605, 62, 312, 198, ...
2.68
100
# !/usr/bin python """ # # set-config - a small python program to setup the configuration environment for data-collect.py # data-collect.py contain the python program to gather Metrics from vROps # Author Sajal Debnath <sdebnath@vmware.com> # """ # Importing the required modules import json import base64 import os,s...
[ 2, 5145, 14, 14629, 14, 8800, 21015, 198, 198, 37811, 198, 2, 198, 2, 900, 12, 11250, 532, 257, 1402, 21015, 1430, 284, 9058, 262, 8398, 2858, 329, 1366, 12, 33327, 13, 9078, 198, 2, 1366, 12, 33327, 13, 9078, 3994, 262, 21015, 14...
3.200837
239
""" Copyright 2018 Inmanta 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 ...
[ 37811, 198, 220, 220, 220, 15069, 2864, 554, 76, 4910, 628, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 220, 220, 220, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351...
2.853896
924
n = int(input()) row = 0 for i in range(100): if 2 ** i <= n <= 2 ** (i + 1) - 1: row = i break k = 0 if row % 2 != 0: k = 2 cri = seki(k, row // 2) if n < cri: print("Aoki") else: print("Takahashi") else: k = 1 cri = seki(k, row // 2) if n < cri: ...
[ 77, 796, 493, 7, 15414, 28955, 198, 808, 796, 657, 198, 1640, 1312, 287, 2837, 7, 3064, 2599, 198, 220, 220, 220, 611, 362, 12429, 1312, 19841, 299, 19841, 362, 12429, 357, 72, 1343, 352, 8, 532, 352, 25, 198, 220, 220, 220, 220, ...
1.772512
211
# CoDVote plugin for BigBrotherBot(B3) (www.bigbrotherbot.net) # Copyright (C) 2015 ph03n1x # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your optio...
[ 2, 1766, 35, 37394, 13877, 329, 4403, 39461, 20630, 7, 33, 18, 8, 357, 2503, 13, 14261, 37343, 13645, 13, 3262, 8, 198, 2, 15069, 357, 34, 8, 1853, 872, 3070, 77, 16, 87, 198, 2, 198, 2, 770, 1430, 318, 1479, 3788, 26, 345, 46...
3.442478
339
# Copyright 2018 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
[ 2, 15069, 2864, 3012, 3457, 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, 13, 198, 2, 921, 743, ...
2.929648
995
# Assumptions: validate_crud_functions available # Assumes __uripwd is defined as <user>:<pwd>@<host>:<plugin_port> from __future__ import print_function from mysqlsh import mysqlx mySession = mysqlx.get_session(__uripwd) ensure_schema_does_not_exist(mySession, 'js_shell_test') schema = mySession.create_schema('js_s...
[ 2, 2195, 388, 8544, 25, 26571, 62, 6098, 463, 62, 12543, 2733, 1695, 198, 2, 2195, 8139, 11593, 333, 541, 16993, 318, 5447, 355, 1279, 7220, 31175, 27, 79, 16993, 29, 31, 27, 4774, 31175, 27, 33803, 62, 634, 29, 198, 6738, 11593, ...
3.180683
1,522
import turtle turtle.bgcolor('black') wn=turtle.Screen() tr=turtle.Turtle() move=1 tr.speed("fastest") for i in range (360): tr.write("ADITYA",'false','center',font=('Showcard gothic',50)) tr.penup() tr.goto(-200,100) tr.pendown() tr.color("orange") tr.right(move) tr.forward(100) tr...
[ 11748, 28699, 198, 83, 17964, 13, 35904, 8043, 10786, 13424, 11537, 198, 675, 28, 83, 17964, 13, 23901, 3419, 198, 2213, 28, 83, 17964, 13, 51, 17964, 3419, 198, 198, 21084, 28, 16, 198, 2213, 13, 12287, 7203, 7217, 395, 4943, 198, ...
1.917391
690
""", , """ from .group import Group from .user import User from .user import UserIndex from .auth import Authentication from .accesspoint import AccessPoint
[ 15931, 1600, 837, 37227, 198, 198, 6738, 764, 8094, 1330, 4912, 198, 6738, 764, 7220, 1330, 11787, 198, 6738, 764, 7220, 1330, 11787, 15732, 198, 6738, 764, 18439, 1330, 48191, 198, 6738, 764, 15526, 4122, 1330, 8798, 12727, 198 ]
4.051282
39
bino = int(input()) cino = int(input()) if (bino+cino)%2==0: print("Bino") else: print("Cino")
[ 65, 2879, 796, 493, 7, 15414, 28955, 198, 66, 2879, 796, 493, 7, 15414, 28955, 198, 361, 357, 65, 2879, 10, 66, 2879, 8, 4, 17, 855, 15, 25, 198, 220, 220, 220, 3601, 7203, 33, 2879, 4943, 198, 17772, 25, 198, 220, 220, 220, 3...
2.019608
51
""" Script updates `README.md` with respect to files at ./easy and ./medium folders. """ import os curr_dir = os.path.dirname(__file__) with open(os.path.join(curr_dir, "README.md"), 'w') as readme: readme.write("# LeetCode\nDeliberate practice in coding.\n") langs = [l for l in os.listdir(curr_dir) if os.path...
[ 37811, 198, 7391, 5992, 4600, 15675, 11682, 13, 9132, 63, 351, 2461, 284, 3696, 379, 24457, 38171, 290, 24457, 24132, 24512, 13, 198, 37811, 198, 11748, 28686, 198, 198, 22019, 81, 62, 15908, 796, 28686, 13, 6978, 13, 15908, 3672, 7, ...
2.104938
486
# -*- coding: utf-8 -*- #retriever import csv from pkg_resources import parse_version from retriever.lib.models import Table from retriever.lib.templates import Script try: from retriever.lib.defaults import VERSION try: from retriever.lib.tools import open_fr, open_fw, open_csvw except ImportEr...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 1186, 380, 964, 198, 198, 11748, 269, 21370, 198, 6738, 279, 10025, 62, 37540, 1330, 21136, 62, 9641, 198, 198, 6738, 37715, 964, 13, 8019, 13, 27530, 1330, 8655, 1...
2.777778
171
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import *
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 33918, 198, 198, 6738, 435, 541, 323, 13, 64, 404, 13, 15042, 13, 9979, 415, 13, 22973, 34184, 1187, 1330, 163...
2.446809
47
# -*- coding: utf-8 -*- """ Created on Mon Dec 2 11:06:59 2019 @author: Paul """ def read_data(filename): """ Reads csv file into a list, and converts to ints """ data = [] f = open(filename, 'r') for line in f: data += line.strip('\n').split(',') ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 2892, 4280, 220, 362, 1367, 25, 3312, 25, 3270, 13130, 201, 198, 201, 198, 31, 9800, 25, 3362, 201, 198, 37811, 201, 198, 201, 198, ...
1.9733
3,221
from django.db import models # Create your models here.
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 2, 13610, 534, 4981, 994, 13, 628, 220, 220, 220, 220, 220, 220, 220, 220, 628, 198 ]
2.653846
26
# -*- coding: utf-8 -*- # Copyright 2019 Open End AB # # 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 o...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 15069, 13130, 4946, 5268, 9564, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 7...
3.195876
291
""" Copyright 2020 InfAI (CC SES) 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...
[ 37811, 198, 220, 220, 15069, 12131, 4806, 20185, 357, 4093, 311, 1546, 8, 628, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 220, 220, 345, 743, 407, 779, 428, 2393, 2845, 287, 1...
3.392694
219
# Generated by Django 3.2.3 on 2021-05-27 13:34 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 18, 319, 33448, 12, 2713, 12, 1983, 1511, 25, 2682, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
#!/usr/bin/env python import unittest from day07 import has_abba, get_abba_allowed_strings, get_abba_disallowed_strings from day07 import supports_tls, count_tls_addresses from day07 import find_abas, supports_ssl, count_ssl_addresses if __name__ == '__main__': unittest.main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 555, 715, 395, 198, 6738, 1110, 2998, 1330, 468, 62, 48910, 11, 651, 62, 48910, 62, 40845, 62, 37336, 11, 651, 62, 48910, 62, 6381, 40845, 62, 37336, 198, 6738, 1110, 299...
2.852941
102
import torch import numpy as np import torch.nn.functional as F from torch.autograd import Variable from basenets.MLP import MLP from basenets.Conv import Conv from torch import nn # TODO: support multi-layer value function in which action is concat before the final layer
[ 11748, 28034, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 6738, 28034, 13, 2306, 519, 6335, 1330, 35748, 198, 6738, 1615, 268, 1039, 13, 5805, 47, 1330, 10373, 47, 198, 6738, 1615, 268, ...
3.618421
76
# Copyright 2015 The TensorFlow Authors. 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 applica...
[ 2, 15069, 1853, 383, 309, 22854, 37535, 46665, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, ...
3.492537
469
""" Copyright 2015 Rackspace 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 dist...
[ 37811, 198, 15269, 1853, 37927, 13200, 198, 198, 26656, 15385, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 5832, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 1639, 743, 7...
3.386228
334
# (C) Datadog, Inc. 2018-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) import os import pytest from datadog_checks.dev import docker_run from datadog_checks.dev.conditions import CheckDockerLogs from datadog_checks.dev.subprocess import run_command from .common import BAS...
[ 2, 357, 34, 8, 16092, 324, 519, 11, 3457, 13, 2864, 12, 25579, 198, 2, 1439, 2489, 10395, 198, 2, 49962, 739, 257, 513, 12, 565, 682, 347, 10305, 3918, 5964, 357, 3826, 38559, 24290, 8, 198, 198, 11748, 28686, 198, 198, 11748, 129...
2.618421
228
import json from typing import Dict, Optional import requests from federation.hostmeta.parsers import ( parse_nodeinfo_document, parse_nodeinfo2_document, parse_statisticsjson_document, parse_mastodon_document, parse_matrix_document, parse_misskey_document) from federation.utils.network import fetch_document ...
[ 11748, 33918, 198, 6738, 19720, 1330, 360, 713, 11, 32233, 198, 198, 11748, 7007, 198, 198, 6738, 36986, 13, 4774, 28961, 13, 79, 945, 364, 1330, 357, 198, 220, 220, 220, 21136, 62, 17440, 10951, 62, 22897, 11, 21136, 62, 17440, 10951...
3.256637
113
import numpy as np from typing import Any, Dict, List, Tuple, NoReturn import argparse import os def parse_arguments() -> Any: """Parse command line arguments.""" parser = argparse.ArgumentParser() parser.add_argument( "--data_dir", default="", type=str, help="Directory where the features (npy files) a...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 11, 7343, 11, 309, 29291, 11, 1400, 13615, 628, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 198, 4299, 21136, 62, 853, 2886, 3419, 4613, 4377, 25, 198, 19...
2.255924
844
# -*- encoding: utf-8 -*- # Copyright (c) 2017 Servionica # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
[ 2, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 357, 66, 8, 2177, 3116, 295, 3970, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, ...
3.625
240
# https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii/ # # Say you have an array for which the ith element is the price of a given stock on day i. # # Design an algorithm to find the maximum profit. # You may complete as many transactions as you like (ie, buy one and sell one share of the stock multiple ti...
[ 2, 3740, 1378, 293, 316, 8189, 13, 785, 14, 1676, 22143, 14, 13466, 12, 2435, 12, 1462, 12, 17846, 12, 392, 12, 7255, 12, 13578, 12, 4178, 14, 198, 2, 198, 2, 13816, 345, 423, 281, 7177, 329, 543, 262, 340, 71, 5002, 318, 262, ...
3.222222
171
import json import os import responses from django.urls import reverse from .. import TestAdminMixin, TestLociMixin
[ 11748, 33918, 198, 11748, 28686, 198, 198, 11748, 9109, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 198, 6738, 11485, 1330, 6208, 46787, 35608, 259, 11, 6208, 43, 1733, 35608, 259, 628 ]
3.5
34
import torch from torch import nn from torch.nn.parameter import Parameter from einops import rearrange, reduce, repeat
[ 11748, 28034, 198, 6738, 28034, 1330, 299, 77, 198, 6738, 28034, 13, 20471, 13, 17143, 2357, 1330, 25139, 2357, 198, 198, 6738, 304, 259, 2840, 1330, 37825, 858, 11, 4646, 11, 9585, 198 ]
3.666667
33
from . import test_helpers from . import test_image_opener from . import test_image_metrick from . import test_compare_tools from . import test_compare_api
[ 6738, 764, 1330, 1332, 62, 16794, 364, 198, 6738, 764, 1330, 1332, 62, 9060, 62, 404, 877, 198, 6738, 764, 1330, 1332, 62, 9060, 62, 4164, 5557, 198, 6738, 764, 1330, 1332, 62, 5589, 533, 62, 31391, 198, 6738, 764, 1330, 1332, 62, ...
3.297872
47
from django.contrib import admin from django.urls import path from .views import index, email, post_detail, posts, hot_takes, take_detail from . import views app_name = "core" urlpatterns = [ path('',views.index,name="index"), path('email/',views.email,name="email"), path('post/<slug>/',views.post_detail,...
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 764, 33571, 1330, 6376, 11, 3053, 11, 1281, 62, 49170, 11, 6851, 11, 3024, 62, 83, 1124, 11, 1011, 62, 49170, 198, 6738, 7...
2.664835
182
from .grid import render_table
[ 6738, 764, 25928, 1330, 8543, 62, 11487 ]
4.285714
7
from mongoengine import * from dotenv import load_dotenv from os import getenv from cassandra.cluster import Cluster from cassandra.auth import PlainTextAuthProvider from cassandra.cqlengine import connection from cassandra.cqlengine.management import sync_table from cassandra.query import ordered_dict_factory from mod...
[ 6738, 285, 25162, 18392, 1330, 1635, 198, 6738, 16605, 24330, 1330, 3440, 62, 26518, 24330, 198, 6738, 28686, 1330, 651, 24330, 198, 6738, 30606, 15918, 13, 565, 5819, 1330, 38279, 198, 6738, 30606, 15918, 13, 18439, 1330, 28847, 8206, 30...
3.412088
182
# stdlib import importlib import sys from typing import Any from typing import Any as TypeAny from typing import Dict as TypeDict from typing import Optional # third party from packaging import version # syft relative from ..ast.globals import Globals from ..lib.python import create_python_ast from ..lib.torch import...
[ 2, 14367, 8019, 198, 11748, 1330, 8019, 198, 11748, 25064, 198, 6738, 19720, 1330, 4377, 198, 6738, 19720, 1330, 4377, 355, 5994, 7149, 198, 6738, 19720, 1330, 360, 713, 355, 5994, 35, 713, 198, 6738, 19720, 1330, 32233, 198, 198, 2, ...
3.562874
167
#!/usr/bin/env python # coding: utf-8 # In[ ]: import pysam import os import pandas as pd import numpy as np import time import argparse import sys from multiprocessing import Pool # In[ ]: # ##arguments for testing # bam_file_path = '/fh/scratch/delete90/ha_g/realigned_bams/cfDNA_MBC_ULP_hg38/realign_bam_pa...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 554, 58, 2361, 25, 628, 198, 11748, 279, 893, 321, 198, 11748, 28686, 198, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152...
2.407969
1,782
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Mar 1 18:17:07 2021 @author: jm """ # %% required libraries import numpy as np import pandas as pd from sqlalchemy import create_engine # %% connect to DB # create connection using pymssql engine = create_engine('mssql+pymssql://sa:<YourStrong@Passw...
[ 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, 2892, 1526, 220, 352, 1248, 25, 1558, 25, 2998, 33448, 198, 198, 31, 9800, 25, 474, 76, ...
2.882004
1,517
import discord from discord.ext import commands arrow = "<a:right:877425183839891496>" kwee = "<:kannawee:877036162122924072>" kdance = "<a:kanna_dance:877038778798207016>" kbored = "<:kanna_bored:877036162827583538>" ksmug = "<:kanna_smug:877038777896427560>" heart = "<a:explosion_heart:877426228775227392>"
[ 11748, 36446, 198, 6738, 36446, 13, 2302, 1330, 9729, 198, 198, 6018, 796, 33490, 64, 25, 3506, 25, 42802, 32114, 1507, 2548, 2670, 4531, 1415, 4846, 24618, 198, 74, 732, 68, 796, 33490, 25, 74, 1236, 707, 1453, 25, 5774, 2154, 2623, ...
2.313433
134
for ch in "Hello world!": d = ord(ch) h = hex(d) o = oct(d) b = bin(d) print ch, d, h, o, b
[ 1640, 442, 287, 366, 15496, 995, 0, 1298, 198, 220, 220, 288, 796, 2760, 7, 354, 8, 198, 220, 220, 289, 796, 17910, 7, 67, 8, 198, 220, 220, 267, 796, 19318, 7, 67, 8, 198, 220, 220, 275, 796, 9874, 7, 67, 8, 628, 220, 220, ...
1.87931
58
# Copyright (c) 2016 Roger Light <roger@atchoo.org> # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 # and Eclipse Distribution License v1.0 which accompany this distribution. # # The Eclipse Public License is available at # ...
[ 2, 15069, 357, 66, 8, 1584, 13637, 4401, 1279, 305, 1362, 31, 963, 2238, 13, 2398, 29, 198, 2, 198, 2, 1439, 2489, 10395, 13, 770, 1430, 290, 262, 19249, 5696, 198, 2, 389, 925, 1695, 739, 262, 2846, 286, 262, 30991, 5094, 13789, ...
2.62199
3,820
from collections import defaultdict if __name__ == "__main__": d = defaultdict(set) # with open('aoc_day_24_sample.txt') as f: with open("aoc_day_24_input.txt") as f: sample = f.readlines() # sample = [ # '0/1', # '1/2', # '1/3', # '1/4', # '5/0', ...
[ 6738, 17268, 1330, 4277, 11600, 628, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 288, 796, 4277, 11600, 7, 2617, 8, 198, 220, 220, 220, 1303, 351, 1280, 10786, 64, 420, 62, 820, 62, ...
1.841549
284
import numpy as np import network if __name__ == "__main__": main()
[ 11748, 299, 32152, 355, 45941, 198, 11748, 3127, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 3419, 198 ]
2.678571
28
#draw the predictions from real-time.py import matplotlib.pyplot as plt import matplotlib.animation as animation from matplotlib import style style.use('fivethirtyeight') fig = plt.figure() ax1 = fig.add_subplot(1,1,1) ani = animation.FuncAnimation(fig, animate, interval=1000) plt.show()
[ 2, 19334, 262, 16277, 422, 1103, 12, 2435, 13, 9078, 198, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 2603, 29487, 8019, 13, 11227, 341, 355, 11034, 198, 6738, 2603, 29487, 8019, 1330, 3918, 198, 7635, 13...
2.92
100
""" Code to load a policy and generate rollout data. Adapted from https://github.com/berkeleydeeprlcourse. Example usage: python run_policy.py ../trained_policies/Humanoid-v1/policy_reward_11600/lin_policy_plus.npz Humanoid-v1 --render \ --num_rollouts 20 """ import numpy as np import gym if __name__...
[ 37811, 198, 198, 10669, 284, 3440, 257, 2450, 290, 7716, 38180, 1366, 13, 30019, 276, 422, 3740, 1378, 12567, 13, 785, 14, 527, 13490, 22089, 45895, 17319, 13, 198, 16281, 8748, 25, 198, 220, 220, 220, 21015, 1057, 62, 30586, 13, 9078...
2.710938
128
""" Generates Tisserand plots """ from enum import Enum import numpy as np from astropy import units as u from matplotlib import pyplot as plt from poliastro.plotting._base import BODY_COLORS from poliastro.twobody.mean_elements import get_mean_elements from poliastro.util import norm
[ 37811, 2980, 689, 309, 747, 263, 392, 21528, 37227, 198, 6738, 33829, 1330, 2039, 388, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 6468, 28338, 1330, 4991, 355, 334, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 83...
3.11828
93
from KeyValueTree import KeyValueTree from truth.models import KeyValue as TruthKeyValue, Truth from systems.models import KeyValue as KeyValue from django.test.client import RequestFactory from api_v2.keyvalue_handler import KeyValueHandler import json factory = RequestFactory()
[ 6738, 7383, 11395, 27660, 1330, 7383, 11395, 27660, 198, 6738, 3872, 13, 27530, 1330, 7383, 11395, 355, 14056, 9218, 11395, 11, 14056, 198, 6738, 3341, 13, 27530, 1330, 7383, 11395, 355, 7383, 11395, 198, 6738, 42625, 14208, 13, 9288, 13,...
3.985915
71
from .trim import trim from .sample import sample from .sort import sort function_map = { 'trim': trim, 'sample': sample, 'sort': sort }
[ 6738, 764, 2213, 320, 1330, 15797, 198, 6738, 764, 39873, 1330, 6291, 198, 6738, 764, 30619, 1330, 3297, 628, 198, 8818, 62, 8899, 796, 1391, 198, 220, 220, 220, 705, 2213, 320, 10354, 15797, 11, 198, 220, 220, 220, 705, 39873, 10354,...
2.745455
55
from .nirspec import divspec from .nirspec import gluespec
[ 6738, 764, 32986, 16684, 1330, 2659, 16684, 198, 6738, 764, 32986, 16684, 1330, 1278, 947, 43106, 198 ]
3.470588
17
from __future__ import absolute_import from __future__ import print_function import datetime import os import random import sys import uuid import base64 import yaml import re try: import en except: print("DOWNLOD NODECUBE") print("""wget https://www.nodebox.net/code/data/media/linguistics.zip unzip lingui...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 4818, 8079, 198, 11748, 28686, 198, 11748, 4738, 198, 11748, 25064, 198, 11748, 334, 27112, 198, 11748, 2779, 2414, 198, 11748...
2.267806
351
# 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.716216
222
#!/usr/bin/env python import argparse import CppHeaderParser import re import sys import yaml import copy import six import os.path import traceback def main(): a = Application() sys.exit(a.exec_()) if __name__ == "__main__": # Execute only if run as a script main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 1822, 29572, 198, 11748, 327, 381, 39681, 46677, 198, 11748, 302, 198, 11748, 25064, 198, 11748, 331, 43695, 198, 11748, 4866, 198, 11748, 2237, 198, 11748, 28686, 13, 6978, ...
2.803922
102
import typing as t from http.server import HTTPServer, BaseHTTPRequestHandler from . import response as resp
[ 11748, 19720, 355, 256, 198, 6738, 2638, 13, 15388, 1330, 38288, 18497, 11, 7308, 40717, 18453, 25060, 198, 198, 6738, 764, 1330, 2882, 355, 1217, 628, 628 ]
4.185185
27
#!/usr/bin/env python3 from fairseq.modules import multihead_attention as fair_multihead from pytorch_translate.attention import ( BaseAttention, attention_utils, register_attention, )
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 628, 198, 6738, 3148, 41068, 13, 18170, 1330, 5021, 2256, 62, 1078, 1463, 355, 3148, 62, 41684, 2256, 198, 6738, 12972, 13165, 354, 62, 7645, 17660, 13, 1078, 1463, 1330, 357, 198, 220,...
2.941176
68
"""Support for Purrsong LavvieBot S""" import asyncio import logging import voluptuous as vol from lavviebot import LavvieBotApi import homeassistant.helpers.config_validation as cv from homeassistant import config_entries from homeassistant.const import EVENT_HOMEASSISTANT_STOP from homeassistant.exceptions import Co...
[ 37811, 15514, 329, 9330, 3808, 506, 21438, 85, 494, 20630, 311, 37811, 198, 11748, 30351, 952, 198, 11748, 18931, 198, 11748, 2322, 37623, 5623, 355, 2322, 198, 6738, 21606, 85, 494, 13645, 1330, 21438, 85, 494, 20630, 32, 14415, 198, 1...
3.129944
177
from mars import main_loop import numpy as np from mars.settings import * if __name__ == "__main__": main_loop(Problem())
[ 198, 6738, 48962, 1330, 1388, 62, 26268, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 48962, 13, 33692, 1330, 1635, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 1388, 62, 26268, 7, 40781, 28...
3
43
# -*- coding: utf-8 -*- """ Check if it is Thai text """ import string _DEFAULT_IGNORE_CHARS = string.whitespace + string.digits + string.punctuation def isthaichar(ch: str) -> bool: """ Check if a character is Thai :param str ch: input character :return: True or False """ ch_val = ord(...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 9787, 611, 340, 318, 18933, 2420, 198, 37811, 198, 11748, 4731, 198, 198, 62, 7206, 38865, 62, 16284, 6965, 62, 3398, 27415, 796, 4731, 13, 1929, 2737, 10223...
2.39322
590
print(b) print(c) print(d) print(e) print(f) print(g)
[ 198, 4798, 7, 65, 8, 198, 4798, 7, 66, 8, 198, 4798, 7, 67, 8, 198, 4798, 7, 68, 8, 198, 4798, 7, 69, 8, 198, 4798, 7, 70, 8 ]
1.8
30
import numpy as np from scipy.signal import savgol_filter import matplotlib.pyplot as plt import MadDog x = [] y = [] # Generating the noisy signal x, y = fill_data() print(len(y)) # Savitzky-Golay filter x_filtered, y_filtered = savitzky(x, y, 2) print("X unfiltered>> ", x) print("Y unfiltered>> ", y) print("X...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 12683, 282, 1330, 6799, 70, 349, 62, 24455, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 4627, 32942, 198, 198, 87, 796, 17635, 198, 88, 796, 1...
2.527273
165
#!/usr/bin/python # # Copyright 2014 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 b...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 198, 2, 15069, 1946, 3012, 3457, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, ...
2.98594
569
import pytest from pyminhash import MinHash from pyminhash.datasets import load_data
[ 11748, 12972, 9288, 198, 198, 6738, 12972, 1084, 17831, 1330, 1855, 26257, 198, 6738, 12972, 1084, 17831, 13, 19608, 292, 1039, 1330, 3440, 62, 7890, 628, 628, 628, 198 ]
3.172414
29
from datetime import datetime, timedelta from typing import final from tools import localize_time RSS_URL_PREFIX: final = 'https://www.youtube.com/feeds/videos.xml?channel_id={0}' LOCATION_ARGUMENT_PREFIX: final = '--location=' CHANNEL_ARGUMENT_PREFIX: final = '--channels=' LAST_CHECK_ARGUMENT_PREFIX: final = '--last...
[ 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 6738, 19720, 1330, 2457, 198, 198, 6738, 4899, 1330, 1957, 1096, 62, 2435, 198, 198, 49, 5432, 62, 21886, 62, 47, 31688, 10426, 25, 2457, 796, 705, 5450, 1378, 2503, 13, 11604...
2.515
200
# SPDX-License-Identifier: BSD-3-Clause from amaranth import Elaboratable, Module, Signal, ResetInserter, EnableInserter __all__ = ( 'PIC16Caravel', )
[ 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 347, 10305, 12, 18, 12, 2601, 682, 198, 6738, 716, 19173, 400, 1330, 2574, 4820, 21156, 11, 19937, 11, 26484, 11, 30027, 818, 2655, 353, 11, 27882, 818, 2655, 353, 198, 198, 834, 439, ...
2.59322
59
from discord.ext import commands import discord
[ 6738, 36446, 13, 2302, 1330, 9729, 198, 11748, 36446, 628, 198 ]
4.545455
11
from mrs.bucket import WriteBucket from mrs import BinWriter, HexWriter # vim: et sw=4 sts=4
[ 6738, 285, 3808, 13, 27041, 316, 1330, 19430, 33, 38811, 198, 6738, 285, 3808, 1330, 20828, 34379, 11, 22212, 34379, 198, 198, 2, 43907, 25, 2123, 1509, 28, 19, 39747, 28, 19, 198 ]
2.848485
33
""" An agent which uses demonstrations and preferences. Code adapted from Learning Reward Functions by Integrating Human Demonstrations and Preferences. """ import itertools import os import time from pathlib import Path from typing import Dict, List import arviz as az from inquire.agents.agent import Agent from inq...
[ 37811, 198, 2025, 5797, 543, 3544, 18721, 290, 15387, 13, 198, 198, 10669, 16573, 422, 18252, 32307, 40480, 198, 1525, 15995, 8821, 5524, 7814, 2536, 602, 290, 49780, 13, 198, 37811, 198, 11748, 340, 861, 10141, 198, 11748, 28686, 198, ...
3.681081
185
"""This module contains all public learners and learner interfaces.""" from coba.learners.primitives import Learner, SafeLearner from coba.learners.bandit import EpsilonBanditLearner, UcbBanditLearner, FixedLearner, RandomLearner from coba.learners.corral import CorralLearner from coba.learners.vowpal impo...
[ 37811, 1212, 8265, 4909, 477, 1171, 46184, 290, 22454, 1008, 20314, 526, 15931, 198, 198, 6738, 269, 19981, 13, 35720, 364, 13, 19795, 20288, 1330, 8010, 1008, 11, 19978, 14961, 1008, 198, 6738, 269, 19981, 13, 35720, 364, 13, 3903, 270...
2.468235
425
# Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license # Copyright (C) 2003-2007, 2009-2011 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and ...
[ 2, 15069, 357, 34, 8, 360, 77, 2777, 7535, 25767, 669, 11, 766, 38559, 24290, 329, 2420, 286, 3180, 34, 5964, 198, 198, 2, 15069, 357, 34, 8, 5816, 12, 12726, 11, 3717, 12, 9804, 399, 6351, 388, 11, 3457, 13, 198, 2, 198, 2, 2...
2.627361
2,171
# Copyright (c) 2010-2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
[ 2, 15069, 357, 66, 8, 3050, 12, 6999, 4946, 25896, 5693, 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...
2.659657
1,284
import resource_files resources = resource_files.ResourceFiles() # sample use case of getting yamls print(resources.get_yaml("Pod", "jumpy-shark-gbapp-frontend-844fdccf55-ggkbf", "default", "mycluster")) # sample use case of getting events print(resources.get_events('mycluster','default','78abd8c9-ac06-11e9-b68f-0e7...
[ 11748, 8271, 62, 16624, 198, 198, 37540, 796, 8271, 62, 16624, 13, 26198, 25876, 3419, 198, 198, 2, 6291, 779, 1339, 286, 1972, 331, 321, 7278, 198, 4798, 7, 37540, 13, 1136, 62, 88, 43695, 7203, 41565, 1600, 366, 73, 32152, 12, 147...
2.693182
176
""" Project: flask-rest Author: Saj Arora Description: Handle auth endpoints such as auth/signup, auth/login """ from api.v1 import make_json_ok_response, SageController, SageMethod from api.v1.fundamentals import helper from .auth_controller import AuthController auth_controller = { 'signup': SageController(sa...
[ 37811, 198, 16775, 25, 42903, 12, 2118, 198, 13838, 25, 311, 1228, 943, 5799, 198, 11828, 25, 33141, 6284, 886, 13033, 884, 355, 6284, 14, 12683, 929, 11, 6284, 14, 38235, 198, 37811, 198, 6738, 40391, 13, 85, 16, 1330, 787, 62, 177...
3.349315
146
import random as rn import numpy as np # open system dynamics of a qubit and compare numerical results with the analytical calculations # NOTE these are also TUTORIALS of the library, so see the Tutorials for what these are doing and analytical # calculations. # currently includes 2 cases: (i) decay only, and (ii) un...
[ 11748, 4738, 355, 374, 77, 198, 11748, 299, 32152, 355, 45941, 198, 198, 2, 1280, 1080, 17262, 286, 257, 627, 2545, 290, 8996, 29052, 2482, 351, 262, 30063, 16765, 198, 2, 24550, 777, 389, 635, 309, 3843, 1581, 12576, 50, 286, 262, ...
3.835294
255
#this file will contain function that related to vector state from .density import * #we may use some functions from them and dependencies
[ 2, 5661, 2393, 481, 3994, 2163, 326, 3519, 284, 15879, 1181, 198, 198, 6738, 764, 43337, 1330, 1635, 220, 220, 220, 1303, 732, 743, 779, 617, 5499, 422, 606, 290, 20086, 198 ]
4.46875
32
#! /usr/bin/env python """ Description: Gather Metadata for the uncover-ml prediction output results: Reference: email 2019-05-24 Overview Creator: (person who generated the model) Model; Name: Type and date: Algorithm: Extent: Lat/long - location on Australia map? SB Notes: None of the above is r...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 11828, 25, 198, 220, 220, 220, 402, 1032, 3395, 14706, 329, 262, 23658, 12, 4029, 17724, 5072, 2482, 25, 198, 198, 26687, 25, 3053, 13130, 12, 2713, 12, 1731, 198, 2906...
2.957371
563
print("hiiiiiiiiiiiiiiiix")
[ 4798, 7203, 71, 4178, 4178, 4178, 4178, 4178, 4178, 15479, 844, 4943, 628 ]
2.230769
13
import numpy as np import pandas as pd from pandas.util import testing as tm
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 19798, 292, 13, 22602, 1330, 4856, 355, 256, 76, 628, 198 ]
3.16
25
#!/usr/bin/env python #=============================================================================# # # # NAME: do_RMsynth_1D.py # # ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 23926, 25609, 46249, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 2...
1.80334
12,753
from .message_passing import MessagePassing from .gcn_conv import GCNConv from .gat_conv import GATConv from .se_layer import SELayer from .aggregator import Meanaggregator from .maggregator import meanaggr __all__ = [ 'MessagePassing', 'GCNConv', 'GATConv', 'SELayer', 'Meanaggregator' ]
[ 6738, 764, 20500, 62, 6603, 278, 1330, 16000, 14478, 278, 198, 6738, 764, 70, 31522, 62, 42946, 1330, 20145, 45, 3103, 85, 198, 6738, 764, 41268, 62, 42946, 1330, 402, 1404, 3103, 85, 198, 6738, 764, 325, 62, 29289, 1330, 311, 3698, ...
2.5
124
# Copyright 2021 The NetKet Authors - 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 ...
[ 2, 15069, 33448, 383, 3433, 42, 316, 46665, 532, 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, ...
3.08971
379
# coding=utf-8 import ee from . import utils import json import csv from .. import tools def fromShapefile(filename, crs=None, start=None, end=None): """ Convert an ESRI file (.shp and .dbf must be present) to a ee.FeatureCollection At the moment only works for shapes with less than 1000 records and does...
[ 2, 19617, 28, 40477, 12, 23, 198, 11748, 304, 68, 198, 6738, 764, 1330, 3384, 4487, 198, 11748, 33918, 198, 11748, 269, 21370, 198, 6738, 11485, 1330, 4899, 628, 198, 4299, 422, 33383, 7753, 7, 34345, 11, 1067, 82, 28, 14202, 11, 92...
2.40635
4,378
# Rock-paper-scissors-lizard-Spock template # The key idea of this program is to equate the strings # "rock", "paper", "scissors", "lizard", "Spock" to numbers # as follows: # # 0 - rock # 1 - Spock # 2 - paper # 3 - lizard # 4 - scissors import random rpsls("rock") rpsls("Spock") rpsls("paper") rpsls("lizard") rpsl...
[ 2, 4631, 12, 20189, 12, 1416, 32555, 12, 75, 8669, 12, 4561, 735, 11055, 198, 198, 2, 383, 1994, 2126, 286, 428, 1430, 318, 284, 45423, 262, 13042, 198, 2, 366, 10823, 1600, 366, 20189, 1600, 366, 1416, 32555, 1600, 366, 75, 8669, ...
2.650794
126
""" Contains functions to generate and combine a clustering ensemble. """ import numpy as np import pandas as pd from sklearn.metrics import pairwise_distances from sklearn.metrics import adjusted_rand_score as ari from sklearn.metrics import adjusted_mutual_info_score as ami from sklearn.metrics import normalized_mutu...
[ 37811, 198, 4264, 1299, 5499, 284, 7716, 290, 12082, 257, 32966, 1586, 34549, 13, 198, 37811, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 1341, 35720, 13, 4164, 10466, 1330, 5166, 3083, 62, 17080...
2.48577
3,584
import logging from django.db import transaction, connection from django.utils import timezone from django.utils.timezone import localtime from chart.application.enums.department_type import DepartmentType from chart.application.enums.gender_type import GenderType from chart.application.service.app_logic_base import ...
[ 11748, 18931, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 8611, 11, 4637, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 198, 6738, 42625, 14208, 13, 26791, 13, 2435, 11340, 1330, 1957, 2435, 198, 198, 6738, 8262, 13, 31438, 13...
2.676983
517
from flask import render_template
[ 6738, 42903, 1330, 8543, 62, 28243, 628, 198 ]
4.5
8
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file '.\hastakayit_gui.ui' # # Created by: PyQt5 UI code generator 5.11.3 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets import mysql.connector from PyQt5.QtWidgets import QMessageBox,QWidget,Q...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 5178, 7822, 7560, 422, 3555, 334, 72, 2393, 45302, 59, 71, 459, 461, 323, 270, 62, 48317, 13, 9019, 6, 198, 2, 198, 2, 15622, 416, 25, 9485, 48, 83, 20, ...
2.450617
324
#!/usr/bin/env python3 ''' Copyright (c) 2021, Collins Aerospace. Developed with the sponsorship of Defense Advanced Research Projects Agency (DARPA). Permission is hereby granted, free of charge, to any person obtaining a copy of this data, including any software or models in source or binary form, as well as any d...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 7061, 6, 198, 15269, 357, 66, 8, 33448, 11, 14006, 43226, 13, 198, 19246, 276, 351, 262, 27418, 286, 5947, 13435, 4992, 29898, 7732, 357, 35, 1503, 4537, 737, 198, 198, 5990...
3.153982
565
#!/usr/bin/env python3 # 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. """ Test components of specific crowdsourcing tasks. """ import json import os import unittest import pandas as pd imp...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 17168, 5964, 1043, 287, 262, 198, 2, 38559, 24290, 2393, 287,...
3.103774
212
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Chatham Financial <oss@chathamfinancial.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 357, 66, 8, 2211, 11, 609, 37520, 11302, 1279, 793, 31, 354, 37520, 46921, 13, 785, 29, 198, 2, 198, 2, 770, 239...
3.131579
570
# Copyright 2016 - Nokia, ZTE # # 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...
[ 2, 15069, 1584, 532, 26182, 11, 1168, 9328, 198, 2, 198, 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, 74...
3.611307
283
import numpy as np
[ 11748, 299, 32152, 355, 45941, 628 ]
3.333333
6
import sys
[ 11748, 25064, 198 ]
3.666667
3
#!/usr/bin/python3 # vim:se tw=0 sts=4 ts=4 et ai: """ Copyright 2014 Osamu Aoki 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, 18, 198, 2, 43907, 25, 325, 665, 28, 15, 39747, 28, 19, 40379, 28, 19, 2123, 257, 72, 25, 198, 37811, 198, 15269, 220, 1946, 8834, 321, 84, 317, 18228, 198, 198, 5990, 3411, 318, 29376, 7520, ...
4.200483
414
from django.core.exceptions import NON_FIELD_ERRORS from rest_framework import status, viewsets, serializers from rest_framework.decorators import list_route from rest_framework.response import Response from rest_framework.serializers import ModelSerializer from jet_django.filters.model_aggregate import AggregateFilte...
[ 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 44521, 62, 44603, 62, 24908, 50, 198, 6738, 1334, 62, 30604, 1330, 3722, 11, 5009, 1039, 11, 11389, 11341, 198, 6738, 1334, 62, 30604, 13, 12501, 273, 2024, 1330, 1351, 62, 38629, 1...
3.248408
314