content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
from django.db import models
from jsonfield import JSONField
from taggit.managers import TaggableManager
from slugify import slugify
#import editarea
| [
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
33918,
3245,
1330,
19449,
15878,
198,
6738,
7621,
18300,
13,
805,
10321,
1330,
309,
9460,
540,
13511,
198,
6738,
31065,
1958,
1330,
31065,
1958,
198,
2,
11748,
4370,
20337,
628,
628,
... | 3.756098 | 41 |
# -*- coding: utf-8 -*-
import scrapy
import re
from locations.items import GeojsonPointItem
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
15881,
88,
198,
11748,
302,
198,
198,
6738,
7064,
13,
23814,
1330,
2269,
13210,
1559,
12727,
7449,
628
] | 2.878788 | 33 |
"""Implement an AST Traversal used by tests to introspect the output of the compiler"""
from supergsl.core.backend import BreadthFirstNodeFilteredPass
class TestOutputAstPass(BreadthFirstNodeFilteredPass):
"""AST Traversal used by Integration tests to introspect the output of the compiler."""
name = 'test'
... | [
37811,
3546,
26908,
281,
29273,
4759,
690,
282,
973,
416,
5254,
284,
18951,
4443,
262,
5072,
286,
262,
17050,
37811,
198,
198,
6738,
2208,
70,
6649,
13,
7295,
13,
1891,
437,
1330,
28731,
400,
5962,
19667,
11928,
4400,
14478,
628,
198,
... | 3.195313 | 128 |
# The Leginon software is Copyright 2004
# The Scripps Research Institute, La Jolla, CA
# For terms of the license agreement
# see http://ami.scripps.edu/software/leginon-license
#
import threading
import wx
import wx.lib.filebrowsebutton as filebrowse
import leginon.gui.wx.Events
import leginon.gui.wx.TargetPanel
im... | [
2,
383,
1004,
1655,
261,
3788,
318,
15069,
5472,
198,
2,
383,
1446,
14602,
82,
4992,
5136,
11,
4689,
449,
33011,
11,
7257,
198,
2,
1114,
2846,
286,
262,
5964,
4381,
198,
2,
766,
2638,
1378,
6277,
13,
1416,
14602,
82,
13,
15532,
14... | 2.806763 | 207 |
"""
PASSENGERS
"""
numPassengers = 4229
passenger_arriving = (
(4, 12, 12, 4, 5, 0, 7, 12, 10, 7, 3, 0), # 0
(8, 5, 6, 5, 2, 0, 5, 13, 7, 5, 3, 0), # 1
(3, 11, 7, 7, 1, 0, 7, 7, 12, 7, 0, 0), # 2
(4, 13, 11, 2, 1, 0, 8, 13, 10, 8, 3, 0), # 3
(8, 7, 13, 6, 5, 0, 11, 17, 9, 8, 2, 0), # 4
(4, 11, 8, 2, 2, 0,... | [
198,
37811,
198,
47924,
26808,
4877,
198,
37811,
198,
198,
22510,
14478,
9302,
796,
604,
23539,
198,
198,
6603,
6540,
62,
283,
380,
1075,
796,
357,
198,
197,
7,
19,
11,
1105,
11,
1105,
11,
604,
11,
642,
11,
657,
11,
767,
11,
1105,... | 2.096154 | 18,148 |
from __future__ import unicode_literals
from prompt_toolkit.contrib.regular_languages.compiler import compile
from .commands import get_commands_taking_locations
#: The compiled grammar for the Vim command line.
COMMAND_GRAMMAR = compile(r"""
# Allow leading colons and whitespace. (They are ignored.)
:*
... | [
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
198,
6738,
6152,
62,
25981,
15813,
13,
3642,
822,
13,
16338,
62,
75,
33213,
13,
5589,
5329,
1330,
17632,
198,
198,
6738,
764,
9503,
1746,
1330,
651,
62,
9503,
1746,
62,
... | 1.946716 | 807 |
# -*- coding: utf-8 -*-
# Wiggle Sort I
# 如果i是奇数,nums[i] >= nums[i - 1]
# 如果i是偶数,nums[i] <= nums[i - 1]
# 不满足上述条件交换就行了
test = Solution()
print test.wiggleSort([1, 5, 1, 1, 6, 4]) | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
370,
24082,
33947,
314,
198,
2,
10263,
99,
224,
162,
252,
250,
72,
42468,
25001,
229,
46763,
108,
171,
120,
234,
77,
5700,
58,
72,
60,
18189,
997,
82,
58,
72,
5... | 1.335821 | 134 |
"""
:testcase_name module_call_2
:author Sriteja Kummita
:script_type Module
:description This program contains two functions 'add' and 'multiply'. There is a call to function 'add' from
the function 'multiply'.
"""
if __name__ == '__main__':
multiply(4, 4)
| [
37811,
198,
25,
9288,
7442,
62,
3672,
8265,
62,
13345,
62,
17,
198,
25,
9800,
311,
6525,
6592,
19162,
2781,
64,
198,
25,
12048,
62,
4906,
19937,
198,
25,
11213,
770,
1430,
4909,
734,
5499,
705,
2860,
6,
290,
705,
16680,
541,
306,
... | 3.022727 | 88 |
"""COMMAND : .cname"""
import asyncio
import time
from telethon.errors import FloodWaitError
from telethon.tl import functions
from userbot import ALIVE_NAME
from userbot.utils import lightning_cmd
DEL_TIME_OUT = 60
DEFAULTUSER = (
str(ALIVE_NAME) if ALIVE_NAME else "Set ALIVE_NAME in config vars in Heroku"
)
... | [
37811,
9858,
44,
6981,
1058,
764,
66,
3672,
37811,
198,
198,
11748,
30351,
952,
198,
11748,
640,
198,
198,
6738,
5735,
400,
261,
13,
48277,
1330,
25588,
21321,
12331,
198,
6738,
5735,
400,
261,
13,
28781,
1330,
5499,
198,
198,
6738,
2... | 2.824818 | 137 |
import unittest
from unittest.mock import Mock, patch
import requests
from src.fuzzingtool.conn.requesters.requester import Requester
from src.fuzzingtool.objects.fuzz_word import FuzzWord
from src.fuzzingtool.utils.consts import (FUZZING_MARK, UNKNOWN_FUZZING, HTTP_METHOD_FUZZING,
... | [
11748,
555,
715,
395,
198,
6738,
555,
715,
395,
13,
76,
735,
1330,
44123,
11,
8529,
198,
198,
11748,
7007,
198,
198,
6738,
12351,
13,
69,
4715,
278,
25981,
13,
37043,
13,
8897,
8586,
13,
8897,
7834,
1330,
9394,
7834,
198,
6738,
1235... | 2.637255 | 204 |
# -*- coding: utf-8 -*-
from model.group import Group
#def test_add_empty_group(app):
#app.session.login(username="admin",password="secret")
#app.open_home_page_group()
#old_groups = app.group.get_group_list()
#group = Group(name="", header="", footer="")
#app.group.init_creat... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
2746,
13,
8094,
1330,
4912,
628,
198,
198,
2,
4299,
1332,
62,
2860,
62,
28920,
62,
8094,
7,
1324,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
1324,
13,... | 2.218241 | 307 |
import os
from sklearn.preprocessing import LabelEncoder
from tensorflow_core.python.keras.layers import RepeatVector, BatchNormalization, Dropout
from tensorflow_core.python.keras.utils import to_categorical
os.environ["CUDA_VISIBLE_DEVICES"] = "2"
from tensorflow.compat.v1 import ConfigProto
from tensorflow.compat.... | [
11748,
28686,
198,
198,
6738,
1341,
35720,
13,
3866,
36948,
1330,
36052,
27195,
12342,
198,
6738,
11192,
273,
11125,
62,
7295,
13,
29412,
13,
6122,
292,
13,
75,
6962,
1330,
30021,
38469,
11,
347,
963,
26447,
1634,
11,
14258,
448,
198,
... | 2.644465 | 2,132 |
from __future__ import print_function
from __future__ import unicode_literals
import logging
import os
import sys
__version__ = "0.3b2"
VERSION = __version__.split(".")
| [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
198,
11748,
18931,
198,
11748,
28686,
198,
11748,
25064,
198,
198,
834,
9641,
834,
796,
366,
15,
13,
18,
65,
17,
1,
... | 3.185185 | 54 |
from numpy.polynomial.polynomial import Polynomial
from functools import reduce
| [
6738,
299,
32152,
13,
35428,
26601,
498,
13,
35428,
26601,
498,
1330,
12280,
26601,
498,
198,
6738,
1257,
310,
10141,
1330,
4646,
628
] | 3.521739 | 23 |
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: PortEnumsProto.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import messag... | [
2,
2980,
515,
416,
262,
8435,
11876,
17050,
13,
220,
8410,
5626,
48483,
0,
198,
2,
2723,
25,
4347,
4834,
5700,
2964,
1462,
13,
1676,
1462,
198,
198,
11748,
25064,
198,
62,
65,
28,
17597,
13,
9641,
62,
10951,
58,
15,
60,
27,
18,
... | 2.281665 | 1,129 |
from .SocketCore import Socket
from .Packet import Packet
from .Packet import ACK, SYN, FIN, NUL, BEG, END
class RDTPSocket(Socket):
"""This class implements the Stop and Wait kind of protocol over the
sockets by overriding the send_stream and inbound_stream methods.
"""
# implement packet division, ... | [
6738,
764,
39105,
14055,
1330,
47068,
198,
6738,
764,
47,
8317,
1330,
6400,
316,
198,
6738,
764,
47,
8317,
1330,
7125,
42,
11,
19704,
45,
11,
33642,
11,
399,
6239,
11,
347,
7156,
11,
23578,
198,
198,
4871,
371,
24544,
3705,
5459,
7,... | 3.62406 | 133 |
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
import argparse
import os
from libmozdata import utils as lmdutils
from . import mail, utils
if __name__ == "__ma... | [
2,
770,
8090,
6127,
5178,
318,
2426,
284,
262,
2846,
286,
262,
29258,
5094,
198,
2,
13789,
11,
410,
13,
362,
13,
15,
13,
1002,
257,
4866,
286,
262,
4904,
43,
373,
407,
9387,
351,
428,
2393,
11,
198,
2,
921,
460,
7330,
530,
379,
... | 2.529801 | 302 |
# Copyright 2014 Hewlett-Packard
#
# 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,
1946,
30446,
15503,
12,
11869,
446,
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,
... | 3.680233 | 172 |
# -*- coding: utf-8 -*-
"""
Created on Mon Jan 01 22:30:59 2018
@author: donny
"""
aStr = "Hello, World!"
bStr = aStr[:7] + "Python!"
count = 0
for ch in bStr[:]:
if ch in ',.!?':
count += 1
print('There are {0:d} punctuation marks.'.format(count)) | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
2892,
2365,
5534,
2534,
25,
1270,
25,
3270,
2864,
198,
198,
31,
9800,
25,
836,
3281,
198,
37811,
198,
198,
64,
13290,
796,
366,
15496,
11,
2159... | 2.278261 | 115 |
import argparse
import os
import glob
import yaml
import itertools
import datetime
from collections import OrderedDict
import shutil
from joblib import Parallel, delayed
import subprocess
import numpy as np # used by config
from tqdm import tqdm
def set_config_value_unknown(config_dict, find_key, new_value, unknow... | [
11748,
1822,
29572,
198,
11748,
28686,
198,
11748,
15095,
198,
11748,
331,
43695,
198,
11748,
340,
861,
10141,
198,
11748,
4818,
8079,
198,
6738,
17268,
1330,
14230,
1068,
35,
713,
198,
11748,
4423,
346,
198,
6738,
1693,
8019,
1330,
42945... | 2.472552 | 1,348 |
# -*- coding: utf-8 -*-
"""
[EN] --- MOIRE CALIPER
[FR] --- PIED A COULISSE A MOIRE
-----------------------------------------------------------------------------
Author: Mojoptix
Website: www.mojoptix.com
Email: julldozer@mojoptix.com
Date: 02 march 2018
License: MIT License... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
37811,
201,
198,
58,
1677,
60,
220,
11420,
220,
220,
13070,
41736,
33290,
4061,
1137,
201,
198,
58,
10913,
60,
220,
11420,
220,
220,
350,
19767,
317,
327,
2606,
4... | 2.280182 | 10,097 |
data = (
'Song ', # 0x00
'Wei ', # 0x01
'Hong ', # 0x02
'Wa ', # 0x03
'Lou ', # 0x04
'Ya ', # 0x05
'Rao ', # 0x06
'Jiao ', # 0x07
'Luan ', # 0x08
'Ping ', # 0x09
'Xian ', # 0x0a
'Shao ', # 0x0b
'Li ', # 0x0c
'Cheng ', # 0x0d
'Xiao ', # 0x0e
'Mang ', # 0x0f
'Fu ', # 0x1... | [
7890,
796,
357,
198,
6,
44241,
46083,
220,
220,
220,
1303,
657,
87,
405,
198,
6,
1135,
72,
46083,
220,
220,
220,
1303,
657,
87,
486,
198,
6,
48559,
46083,
220,
220,
220,
1303,
657,
87,
2999,
198,
6,
33484,
46083,
220,
220,
220,
... | 1.513055 | 3,064 |
import discord
from discord import Embed
from discord.ext import commands
import asyncpraw
import random
| [
11748,
36446,
198,
6738,
36446,
1330,
13302,
276,
198,
6738,
36446,
13,
2302,
1330,
9729,
198,
11748,
355,
2047,
13155,
1831,
198,
11748,
4738,
628
] | 4.24 | 25 |
import numpy as np
from numpy import exp, sin, pi
from numpy.random import uniform
def dosc(a, d, f, p, t):
"""
d -- damping parameter. Typically 0 < d < 1.
f -- frequency.
p -- phase, 0 <= p <= 2 * pi.
t -- time.
"""
return a * exp(-d*t) * sin(f * t + p)
if __name__ == '__main__'... | [
11748,
299,
32152,
355,
45941,
198,
6738,
299,
32152,
1330,
1033,
11,
7813,
11,
31028,
198,
6738,
299,
32152,
13,
25120,
1330,
8187,
198,
198,
4299,
288,
17500,
7,
64,
11,
288,
11,
277,
11,
279,
11,
256,
2599,
198,
220,
220,
220,
... | 1.53609 | 1,330 |
# -*- coding: utf-8 -*-
#███╗ ███╗ █████╗ ███╗ ██╗██╗ ██████╗ ██████╗ ███╗ ███╗██╗ ██████╗
#████╗ ████║██╔══██╗████╗ ██║██║██╔════╝██╔═══██╗████╗ ████║██║██╔═══██╗
#██╔████╔██║███████║██╔██╗ ██║██║██║ ██║ ██║██╔████╔██║██║██║ ██║
#██║╚██╔╝██║██╔══██║██║╚██╗██║██║██║ ██║ ██║██║╚██╔╝██║██║██║ ██║
#... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
9968,
8115,
22880,
245,
220,
220,
23287,
9968,
22880,
245,
23287,
20503,
22880,
245,
23287,
9968,
22880,
245,
220,
220,
23287,
8115,
22880,
245,
9968,
22880,
245,
23287... | 1.408935 | 582 |
#!/usr/bin/python
#
# (c) Copyright 2015 Hewlett Packard Enterprise Development LP
# (c) Copyright 2017 SUSE LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/lice... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
198,
2,
357,
66,
8,
15069,
1853,
30446,
15503,
6400,
446,
14973,
7712,
18470,
198,
2,
357,
66,
8,
15069,
2177,
311,
19108,
11419,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
106... | 2.19992 | 2,491 |
from .utils import *
from .checkpoint import *
| [
6738,
764,
26791,
1330,
1635,
198,
6738,
764,
9122,
4122,
1330,
1635,
198
] | 3.615385 | 13 |
import math
import random
class Polygon:
"""
Class used for testing only
"""
| [
11748,
10688,
198,
11748,
4738,
628,
198,
4871,
12280,
14520,
25,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
5016,
973,
329,
4856,
691,
198,
220,
220,
220,
37227,
198
] | 2.714286 | 35 |
# Exercise_1
#1
# Print the first 5 rows of the text column
print(speech_df['text'].head())
#2
# Replace all non letter characters with a whitespace
speech_df['text_clean'] = speech_df['text'].str.replace('[^a-zA-Z]', ' ')
# Change to lower case
speech_df['text_clean'] = speech_df['text_clean'].str.lower()
# Print t... | [
2,
32900,
62,
16,
220,
198,
2,
16,
198,
2,
12578,
262,
717,
642,
15274,
286,
262,
2420,
5721,
198,
4798,
7,
45862,
62,
7568,
17816,
5239,
6,
4083,
2256,
28955,
198,
2,
17,
198,
2,
40177,
477,
1729,
3850,
3435,
351,
257,
13216,
1... | 3.003232 | 1,547 |
# Generated by Django 3.2.12 on 2022-02-10 05:32
from django.db import migrations, models
import django.db.models.deletion
| [
2,
2980,
515,
416,
37770,
513,
13,
17,
13,
1065,
319,
33160,
12,
2999,
12,
940,
8870,
25,
2624,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
14208,
13,
9945,
13,
27530,
13,
2934,
1616,
295,
... | 2.840909 | 44 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from decimal import Decimal
from django.utils.translation import ugettext_lazy as _
from shop import messages
from shop.exceptions import ProductNotAvailable
from shop.money import AbstractMoney, Money
from shop.modifiers.base import BaseCartModifier
cl... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
198,
6738,
32465,
1330,
4280,
4402,
198,
6738,
42625,
14208,
13,
26791,
13,
41519,
1330,
334,
1136,
5239,
... | 2.951654 | 786 |
import os
import json
from argparse import ArgumentParser
from ml_tracking_ops.ml_tracking_ops import app
from ml_tracking_ops.experiment.experiment_tracking import HyperparameterSweep
from ml_tracking_ops.experiment.utils import get_hyperparameter_samplers
| [
11748,
28686,
198,
11748,
33918,
198,
6738,
1822,
29572,
1330,
45751,
46677,
198,
198,
6738,
25962,
62,
36280,
62,
2840,
13,
4029,
62,
36280,
62,
2840,
1330,
598,
198,
6738,
25962,
62,
36280,
62,
2840,
13,
23100,
3681,
13,
23100,
3681,
... | 3.589041 | 73 |
# Copyright (c) 2009 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'variables': {
'chromium_code': 1,
},
'includes': [
'../../build/common.gypi',
],
'conditions': [
[ 'OS=="win"', {
'targets... | [
2,
15069,
357,
66,
8,
3717,
383,
18255,
1505,
46665,
13,
1439,
2489,
10395,
13,
198,
2,
5765,
286,
428,
2723,
2438,
318,
21825,
416,
257,
347,
10305,
12,
7635,
5964,
326,
460,
307,
198,
2,
1043,
287,
262,
38559,
24290,
2393,
13,
1... | 1.781874 | 651 |
from __future__ import absolute_import
from populus.utils.module_loading import (
import_string,
)
from populus.utils.types import (
is_string,
)
from populus.config.helpers import (
ClassImportPath,
)
from .base import Config
UNSUPPORTED_BACKEND_IDENTIFIER_MSG = (
"Unsupported type. Must be either ... | [
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
198,
6738,
16595,
385,
13,
26791,
13,
21412,
62,
25138,
1330,
357,
198,
220,
220,
220,
1330,
62,
8841,
11,
198,
8,
198,
6738,
16595,
385,
13,
26791,
13,
19199,
1330,
357,
198,
220... | 2.935714 | 140 |
#Aqui es donde se establece la conección a la base de datos
from sqlalchemy import create_engine #El create engine es el que hace a coneccion a la base de datos
from sqlalchemy.orm import sessionmaker #orm convierte a modelo relacional. El sessionmaker crea las sesiones
#de tipo orm
from sqlalchemy.ext.declarative impo... | [
2,
32,
421,
72,
1658,
288,
14378,
384,
1556,
540,
344,
8591,
27763,
35764,
18840,
257,
8591,
2779,
390,
4818,
418,
198,
6738,
44161,
282,
26599,
1330,
2251,
62,
18392,
1303,
9527,
2251,
3113,
1658,
1288,
8358,
289,
558,
257,
27763,
53... | 3.158065 | 310 |
"""Custom Jinja2 filters and tags.
"""
__all__ = (
"convert_py_to_cpp_namespace_code",
"convert_py_namespace_to_cpp_header_def",
"convert_py_to_cpp_namespace",
"convert_py_namespace_to_includes_dir",
"convert_py_namespace_to_header_filename",
"escape_yaml_doublequoted",
)
import os
import jin... | [
37811,
15022,
17297,
6592,
17,
16628,
290,
15940,
13,
198,
37811,
198,
198,
834,
439,
834,
796,
357,
198,
220,
220,
220,
366,
1102,
1851,
62,
9078,
62,
1462,
62,
20322,
62,
14933,
10223,
62,
8189,
1600,
198,
220,
220,
220,
366,
1102... | 2.553157 | 1,853 |
print(squareRoot(50)) | [
4798,
7,
23415,
30016,
7,
1120,
4008
] | 3 | 7 |
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | [
2,
15069,
12131,
3012,
11419,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
921,
743,
733... | 3.37415 | 294 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2012-2021 SoftBank Robotics. All rights reserved.
# Use of this source code is governed by a BSD-style license (see the COPYING file).
""" Dependencies Solver """
from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
15069,
357,
66,
8,
2321,
12,
1238,
2481,
8297,
28650,
47061,
13,
1439,
2489,
10395,
13,
198,
2,
5765,
286,
428,
... | 2.212591 | 3,288 |
import unittest
from ..autoforecast_bitcoin import * # noqa: F401
| [
11748,
555,
715,
395,
198,
198,
6738,
11485,
23736,
754,
2701,
62,
35395,
1330,
1635,
220,
1303,
645,
20402,
25,
376,
21844,
628
] | 3 | 23 |
from django import forms
from django.db.models import QuerySet
from airmozilla.base.forms import BaseForm
from airmozilla.main.models import Event, Channel, Tag
| [
6738,
42625,
14208,
1330,
5107,
198,
6738,
42625,
14208,
13,
9945,
13,
27530,
1330,
43301,
7248,
198,
198,
6738,
1633,
5908,
16496,
13,
8692,
13,
23914,
1330,
7308,
8479,
198,
6738,
1633,
5908,
16496,
13,
12417,
13,
27530,
1330,
8558,
1... | 3.565217 | 46 |
import time
import gym
import pybullet as p
import peg_in_hole_gym
from peg_in_hole_gym.envs.base_env import TASK_LIST
from env import ArtForce
from test_env import TestForce
from tqdm import tqdm
from icecream import install
install()
TASK_LIST['art-force'] = ArtForce
TASK_LIST['test-force'] = TestForce
object_list... | [
11748,
640,
198,
11748,
11550,
198,
11748,
12972,
15065,
1616,
355,
279,
198,
11748,
41350,
62,
259,
62,
13207,
62,
1360,
76,
198,
6738,
41350,
62,
259,
62,
13207,
62,
1360,
76,
13,
268,
14259,
13,
8692,
62,
24330,
1330,
309,
1921,
... | 2.294686 | 414 |
x1 = 1
y1 = 2
print(f"This is the sum: {x1}, {y1}, {add(x1,y1)}")
| [
198,
198,
87,
16,
796,
352,
198,
88,
16,
796,
362,
198,
4798,
7,
69,
1,
1212,
318,
262,
2160,
25,
1391,
87,
16,
5512,
1391,
88,
16,
5512,
1391,
2860,
7,
87,
16,
11,
88,
16,
38165,
4943,
198
] | 1.7 | 40 |
# Copyright 2020 Google LLC
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# https://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, sof... | [
2,
15069,
12131,
3012,
11419,
198,
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,
7330,
... | 2.317907 | 1,491 |
from itertools import product
nucleotides = "ACGT" # this order of nucleotides is important for reversing
mutation_contexts = [a + b for a in nucleotides for b in nucleotides]
amino_acids = "ACDEFGHIKLMNPQRSTVWY"
amino_acids_with_stop = amino_acids + "*"
# complementary_nucleotides = reversed(nucleotides)
complementa... | [
6738,
340,
861,
10141,
1330,
1720,
198,
198,
77,
14913,
313,
1460,
796,
366,
2246,
19555,
1,
220,
1303,
428,
1502,
286,
17751,
313,
1460,
318,
1593,
329,
37556,
198,
76,
7094,
62,
22866,
82,
796,
685,
64,
1343,
275,
329,
257,
287,
... | 1.918033 | 1,769 |
from airflow.operators.dummy_operator import DummyOperator
from dagger.dag_creator.airflow.operator_creator import OperatorCreator
from dagger.dag_creator.airflow.operator_creators import (
airflow_op_creator,
athena_transform_creator,
batch_creator,
dummy_creator,
python_creator,
redshift_load_... | [
6738,
45771,
13,
3575,
2024,
13,
67,
13513,
62,
46616,
1330,
360,
13513,
18843,
1352,
198,
6738,
31322,
13,
67,
363,
62,
45382,
13,
958,
11125,
13,
46616,
62,
45382,
1330,
35946,
16719,
273,
198,
6738,
31322,
13,
67,
363,
62,
45382,
... | 2.903955 | 177 |
#!/usr/bin/env python
"""Job Run Report"""
### usage: ./jobRunReport.py -v mycluster -u admin [-d domain]
### import pyhesity wrapper module
from pyhesity import *
### command line arguments
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('-v', '--vip', type=str, required=True)
parser.add_argu... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
37811,
33308,
5660,
6358,
37811,
198,
198,
21017,
8748,
25,
24457,
21858,
10987,
19100,
13,
9078,
532,
85,
616,
565,
5819,
532,
84,
13169,
25915,
67,
7386,
60,
198,
198,
21017,
1330,
1... | 2.703271 | 428 |
# Copyright (c) 2016 Cisco Systems
# 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 require... | [
2,
15069,
357,
66,
8,
1584,
28289,
11998,
198,
2,
1439,
6923,
33876,
13,
198,
2,
198,
2,
220,
220,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
345,
743,
198,
2,
220,
220,
220,
407,
7... | 3.025397 | 315 |
from qgis._core import QgsVectorLayer, QgsFeature, QgsGeometry
from qgis.core import (QgsTask,
QgsMessageLog,
Qgis,
QgsSpatialIndex,
QgsPointXY,
QgsProject, QgsApplication)
class LancamentoRamal(QgsTask)... | [
6738,
10662,
70,
271,
13557,
7295,
1330,
1195,
14542,
38469,
49925,
11,
1195,
14542,
38816,
11,
1195,
14542,
10082,
15748,
198,
6738,
10662,
70,
271,
13,
7295,
1330,
357,
48,
14542,
25714,
11,
198,
220,
220,
220,
220,
220,
220,
220,
2... | 1.780269 | 223 |
import datetime as dt
from django.http import HttpResponse, JsonResponse
from django.db import connections
from django.shortcuts import render
from data.metadata import team_abbrevs, team_colors
import os
from collections import defaultdict
import boto3
from boto3.dynamodb.conditions import Key
dynamodb = boto3.resou... | [
11748,
4818,
8079,
355,
288,
83,
198,
6738,
42625,
14208,
13,
4023,
1330,
367,
29281,
31077,
11,
449,
1559,
31077,
198,
6738,
42625,
14208,
13,
9945,
1330,
8787,
198,
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
198,
198,
6738,
136... | 3.041096 | 146 |
from tool.runners.python import SubmissionPy
from statistics import median
def test_jon():
"""
Run `python -m pytest ./day-07/part-2/jon.py` to test the submission.
"""
assert (
JonSubmission().run(
"""
16,1,2,0,4,2,7,1,2,14
""".strip()
)
== 168
)
| [
6738,
2891,
13,
36740,
13,
29412,
1330,
42641,
20519,
198,
6738,
7869,
1330,
14288,
628,
628,
198,
4299,
1332,
62,
46286,
33529,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
5660,
4600,
29412,
532,
76,
12972,
9288,
24457,
820,
12,
2... | 2.138889 | 144 |
import colorama
'''
Fore: BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE, RESET.
Back: BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE, RESET.
Style: DIM, NORMAL, BRIGHT, RESET_ALL
'''
switcher = {
'r':colorama.Fore.RED,
'bk':colorama.Fore.BLACK,
'b':colorama.Fore.BLUE,
'g':colorama.Fore.G... | [
11748,
3124,
1689,
198,
198,
7061,
6,
198,
16351,
25,
31963,
11,
23848,
11,
47606,
11,
575,
23304,
3913,
11,
9878,
8924,
11,
28263,
3525,
32,
11,
30440,
1565,
11,
44925,
11,
15731,
2767,
13,
198,
7282,
25,
31963,
11,
23848,
11,
4760... | 2.398892 | 361 |
"""
This module implements helper functions to calculate interpolated states
between successive napari views states
"""
# Author: Guillaume Witz, Science IT Support, Bern University, 2019
# License: BSD3 License
import copy, re
import numpy as np
from pyquaternion import Quaternion as pyQuaternion
from vispy.util.quat... | [
37811,
198,
1212,
8265,
23986,
31904,
5499,
284,
15284,
39555,
515,
2585,
198,
23395,
25175,
25422,
2743,
5009,
2585,
198,
37811,
198,
2,
6434,
25,
1962,
5049,
2454,
370,
4224,
11,
5800,
7283,
7929,
11,
6206,
2059,
11,
13130,
198,
2,
... | 2.41478 | 2,341 |
from django.urls import path
from . import views
app_name = 'predict'
urlpatterns = [
path('predict/', views.PredictView.as_view()),
] | [
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
198,
6738,
764,
1330,
5009,
198,
198,
1324,
62,
3672,
796,
705,
79,
17407,
6,
198,
198,
6371,
33279,
82,
796,
685,
198,
220,
220,
220,
3108,
10786,
79,
17407,
14,
3256,
5009,
13,
47,
1... | 2.641509 | 53 |
""" Download Synthetic Dataset from Unity Simulation Platform
[Unity Simulation](https://unity.com/products/simulation) provides a powerful
platform for running simulations at large scale. This script provides basic
functionality that allow users to download generated synthetic dataset.
"""
import argparse
import logg... | [
37811,
10472,
26375,
6587,
16092,
292,
316,
422,
18714,
41798,
19193,
198,
198,
58,
35955,
41798,
16151,
5450,
1378,
9531,
13,
785,
14,
29498,
14,
14323,
1741,
8,
3769,
257,
3665,
198,
24254,
329,
2491,
27785,
379,
1588,
5046,
13,
770,
... | 2.937269 | 271 |
#!/usr/bin/python | [
2,
48443,
14629,
14,
8800,
14,
29412
] | 2.428571 | 7 |
# Copyright 2019 California Institute of Technology
# ------------------------------------------------------------------
import os
import os.path as _osp
lib_dir = _osp.abspath(_osp.dirname(__file__))
__version__ = '1.7'
# from .wfirst_phaseb import wfirst_phaseb
# from .wfirst_phaseb_compact import wfirst_phaseb... | [
2,
220,
220,
15069,
13130,
3442,
5136,
286,
8987,
198,
2,
16529,
438,
198,
198,
11748,
28686,
198,
11748,
28686,
13,
6978,
355,
4808,
2117,
198,
198,
8019,
62,
15908,
796,
4808,
2117,
13,
397,
2777,
776,
28264,
2117,
13,
15908,
3672,
... | 2.96 | 225 |
import morepath
import pytest
from hashlib import sha256
from onegov.core import Framework
from onegov.core.security import Public, Private, Secret
from onegov.core.utils import scan_morepath_modules, module_path
from onegov.user import Auth, UserApp
from tests.shared.glauth import GLAuth
from tests.shared.client impo... | [
11748,
517,
6978,
198,
11748,
12972,
9288,
198,
198,
6738,
12234,
8019,
1330,
427,
64,
11645,
198,
6738,
530,
9567,
13,
7295,
1330,
25161,
198,
6738,
530,
9567,
13,
7295,
13,
12961,
1330,
5094,
11,
15348,
11,
3943,
198,
6738,
530,
956... | 3.456693 | 127 |
"""
Django settings for pydis_site project.
Generated by 'django-admin startproject' using Django 2.1.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
"""
import os
i... | [
37811,
198,
35,
73,
14208,
6460,
329,
279,
5173,
271,
62,
15654,
1628,
13,
198,
198,
8645,
515,
416,
705,
28241,
14208,
12,
28482,
923,
16302,
6,
1262,
37770,
362,
13,
16,
13,
198,
198,
1890,
517,
1321,
319,
428,
2393,
11,
766,
19... | 2.265368 | 5,238 |
import dvision
model = "run_0923_1"
iteration = "630000"
net_path = "/groups/turaga/home/grisaitisw/experiments/{}/net_test_big.prototxt".format(model)
caffemodel_path = "/groups/turaga/home/grisaitisw/experiments/{}/net_iter_{}.caffemodel".format(model, iteration)
net_output_shape = (116,) * 3
dname = "fib25-e402c... | [
11748,
288,
10178,
628,
198,
19849,
796,
366,
5143,
62,
2931,
1954,
62,
16,
1,
198,
2676,
341,
796,
366,
5066,
2388,
1,
198,
198,
3262,
62,
6978,
796,
12813,
24432,
14,
36590,
8126,
14,
11195,
14,
2164,
271,
4548,
271,
86,
14,
231... | 2.187192 | 203 |
from typing import Optional
from pydantic import BaseModel
from src.schema.call import Call
from src.schema.tile import Tile
| [
6738,
19720,
1330,
32233,
198,
198,
6738,
279,
5173,
5109,
1330,
7308,
17633,
198,
198,
6738,
12351,
13,
15952,
2611,
13,
13345,
1330,
4889,
198,
6738,
12351,
13,
15952,
2611,
13,
40927,
1330,
47870,
628
] | 3.657143 | 35 |
import argparse
import os
import time
import torch
import numpy as np
from torch.utils.data import DataLoader
import torch.optim
from torch.nn.utils import clip_grad_norm_
from data import TrainStation
from motsynth import MOTSynth, MOTSynthBlackBG
from log_utils import log_summary
from utils import save_ckpt, load_ckp... | [
11748,
1822,
29572,
198,
11748,
28686,
198,
11748,
640,
198,
11748,
28034,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
28034,
13,
26791,
13,
7890,
1330,
6060,
17401,
198,
11748,
28034,
13,
40085,
198,
6738,
28034,
13,
20471,
13,
26791,... | 2.521105 | 1,303 |
from setuptools import setup
import os
README = os.path.join(os.path.dirname(__file__), 'README.md')
REQUIREMENTS = os.path.join(os.path.dirname(__file__), 'requirements.txt')
setup(
name='soap-as-rest-server',
version='0.0.2',
description='Soap Proxy Module to get data from SOAP Services',
long_descr... | [
6738,
900,
37623,
10141,
1330,
9058,
198,
11748,
28686,
198,
198,
15675,
11682,
796,
28686,
13,
6978,
13,
22179,
7,
418,
13,
6978,
13,
15908,
3672,
7,
834,
7753,
834,
828,
705,
15675,
11682,
13,
9132,
11537,
198,
2200,
49128,
28957,
7... | 2.623501 | 417 |
#!/usr/bin/env python
import sys
import yaml
import operator
import rospy
sys.path.append('/home/z420/ros_ws/src/jp_baxtertry1/scripts')
import tablero
import Baxtermovimiento
from jp_baxtertry1.srv import *
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
25064,
198,
11748,
331,
43695,
198,
11748,
10088,
198,
11748,
686,
2777,
88,
198,
17597,
13,
6978,
13,
33295,
10786,
14,
11195,
14,
89,
27211,
14,
4951,
62,
18504,
14,
1067... | 2.592593 | 81 |
# Copyright 2019 Gabriele Valvano
#
# 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... | [
2,
220,
15069,
13130,
12300,
5034,
293,
3254,
85,
5733,
198,
2,
198,
2,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
220,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
2... | 3.275488 | 461 |
import psycopg2
conn = psycopg2.connect(database="news")
cursor = conn.cursor()
cursor.execute('''select articles.slug, count(log.path) as a from
articles join log on SUBSTRING( log.path, 10)=articles.slug
group by articles.slug order by a desc limit 3;''')
results = cursor.fetchall()
print('1. What are the most popu... | [
198,
11748,
17331,
22163,
70,
17,
198,
198,
37043,
796,
17331,
22163,
70,
17,
13,
8443,
7,
48806,
2625,
10827,
4943,
198,
66,
21471,
796,
48260,
13,
66,
21471,
3419,
198,
66,
21471,
13,
41049,
7,
7061,
6,
19738,
6685,
13,
6649,
1018... | 3.066282 | 347 |
# imports
from scipy import optimize, math
import numpy
import ROOT
from array import array
ROOT.gStyle.SetOptStat(1100)
ROOT.gStyle.SetOptTitle(0)
###############
# DEFINITIONS #
###############
# Poisson prob
# Poisson LH
# exp prob
# exp LH
# binned chi2, expected uncertainties
##############
# PARAMET... | [
2,
17944,
198,
6738,
629,
541,
88,
1330,
27183,
11,
10688,
198,
11748,
299,
32152,
198,
11748,
15107,
2394,
198,
6738,
7177,
1330,
7177,
628,
198,
13252,
2394,
13,
70,
21466,
13,
7248,
27871,
17126,
7,
42060,
8,
198,
13252,
2394,
13,
... | 2.170974 | 1,006 |
from storage.kv_store import KeyValueStorage
class AttributeStore:
"""
Stores attributes as key value pair where the key is hash of the
attribute as stored in ledger and value is the actual value if the attribute
"""
| [
6738,
6143,
13,
74,
85,
62,
8095,
1330,
7383,
11395,
31425,
628,
198,
4871,
3460,
4163,
22658,
25,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
41835,
12608,
355,
1994,
1988,
5166,
810,
262,
1994,
318,
12234,
286,
262,
198,
220,
2... | 3.671875 | 64 |
import pytest
from spacy.language import Language
from spacy.lang.en import English
from spacy.training import Example
from thinc.api import ConfigValidationError
from pydantic import StrictBool
| [
11748,
12972,
9288,
198,
6738,
599,
1590,
13,
16129,
1330,
15417,
198,
6738,
599,
1590,
13,
17204,
13,
268,
1330,
3594,
198,
6738,
599,
1590,
13,
34409,
1330,
17934,
198,
6738,
294,
1939,
13,
15042,
1330,
17056,
7762,
24765,
12331,
198,... | 3.843137 | 51 |
"""
使用字典
可以存储任意类型对象,与列表、集合不同的是,字典的每个元素都是有一个键和一个值组成的键值对
"""
if __name__ == '__main__':
main()
| [
37811,
201,
198,
45635,
18796,
101,
27764,
245,
17739,
116,
201,
198,
20998,
107,
20015,
98,
27764,
246,
43636,
101,
20015,
119,
35707,
237,
163,
109,
119,
161,
252,
233,
43380,
117,
164,
109,
94,
171,
120,
234,
10310,
236,
26344,
245... | 0.801471 | 136 |
#!/bin/python3
import math
import os
import random
import re
import sys
#
# Complete the 'dayOfProgrammer' function below.
#
# The function is expected to return a STRING.
# The function accepts INTEGER year as parameter.
#
if __name__ == '__main__':
fptr = open(os.environ['OUTPUT_PATH'], 'w')
year = int(in... | [
2,
48443,
8800,
14,
29412,
18,
198,
198,
11748,
10688,
198,
11748,
28686,
198,
11748,
4738,
198,
11748,
302,
198,
11748,
25064,
198,
198,
2,
198,
2,
13248,
262,
705,
820,
5189,
15167,
647,
6,
2163,
2174,
13,
198,
2,
198,
2,
383,
2... | 2.763158 | 152 |
from __future__ import absolute_import
from django.conf.urls import url
from django.shortcuts import redirect
from django.template.response import TemplateResponse
from django.utils.decorators import method_decorator
from django.views.decorators.http import require_POST
from ..cart.models import Cart, user_is_authenti... | [
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
19016,
198,
6738,
42625,
14208,
13,
19509,
23779,
1330,
18941,
198,
6738,
42625,
14208,
13,
28243,
13,
26209,
1330,
37350,
31077,
198,... | 3.798611 | 144 |
"""Tests for the Oocsi for Homeassistant integration."""
| [
37811,
51,
3558,
329,
262,
440,
420,
13396,
329,
5995,
562,
10167,
11812,
526,
15931,
198
] | 3.5625 | 16 |
import setuptools
setuptools.setup(
name="ptranslator",
version="1.5.1",
author="Bogdan Caleta Ivkovic",
author_email="bogdan.caleta@gmail.com",
description="Simple yet effective module for translating that uses Google Translate",
url="https://github.com/Raptr3x/python-translator",
... | [
11748,
900,
37623,
10141,
201,
198,
201,
198,
2617,
37623,
10141,
13,
40406,
7,
201,
198,
220,
220,
220,
1438,
2625,
20692,
504,
41880,
1600,
201,
198,
220,
220,
220,
2196,
2625,
16,
13,
20,
13,
16,
1600,
201,
198,
220,
220,
220,
... | 2.371841 | 277 |
from compas.geometry import Vector, dot_vectors
from compas_slicer.utilities import remap, remap_unbound
import logging
logger = logging.getLogger('logger')
__all__ = ['set_linear_velocity_constant',
'set_linear_velocity_per_layer',
'set_linear_velocity_by_range',
'set_linear_velocity... | [
6738,
552,
292,
13,
469,
15748,
1330,
20650,
11,
16605,
62,
303,
5217,
198,
6738,
552,
292,
62,
82,
677,
263,
13,
315,
2410,
1330,
816,
499,
11,
816,
499,
62,
403,
7784,
198,
11748,
18931,
198,
198,
6404,
1362,
796,
18931,
13,
113... | 2.877841 | 1,408 |
import torch, timeit, functools
A = torch.randn(15000,15000)
B = torch.randn(15000,15000)
Ag = A.cuda()
Bg = B.cuda()
cpu_timer = timeit.Timer(functools.partial(test,A,B))
cpu_time = cpu_timer.timeit(1)
gpu_timer = timeit.Timer(functools.partial(test,Ag,Bg))
gpu_time = gpu_timer.timeit(1)
print(cpu_time)
# 73.342458... | [
11748,
28034,
11,
640,
270,
11,
1257,
310,
10141,
198,
198,
32,
796,
28034,
13,
25192,
77,
7,
1314,
830,
11,
1314,
830,
8,
198,
33,
796,
28034,
13,
25192,
77,
7,
1314,
830,
11,
1314,
830,
8,
198,
10262,
796,
317,
13,
66,
15339,
... | 2.224242 | 165 |
"""Standard names for input dataloader modes.
The following standard keys are defined:
* `TRAIN`: training mode.
* `EVAL`: evaluation mode.
* `PREDICT`: prediction mode.
* `PREDICT_WITH_GT`: prediction mode with groundtruths in returned variables.
"""
from __future__ import absolute_import
from __future__ import div... | [
37811,
23615,
3891,
329,
5128,
4818,
282,
1170,
263,
12881,
13,
198,
198,
464,
1708,
3210,
8251,
389,
5447,
25,
198,
198,
9,
4600,
51,
3861,
1268,
63,
25,
3047,
4235,
13,
198,
9,
4600,
20114,
1847,
63,
25,
12660,
4235,
13,
198,
9,... | 3.054054 | 148 |
#!/usr/bin/env python
#
# Password manager: handles hashing and comparing for passwords used in LikedSavedDownloaderServer
# I'm no expert so use and trust at your own risk!
#
from passlib.context import CryptContext
# It's not strictly necessary to import these, but I do it here for PyInstaller
# (see https://github.... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
198,
2,
30275,
4706,
25,
17105,
49544,
290,
14176,
329,
21442,
973,
287,
406,
17951,
50,
9586,
10002,
263,
10697,
198,
2,
314,
1101,
645,
5887,
523,
779,
290,
3774,
379,
534,
898,... | 3.066055 | 545 |
from ...objects import dp, MySignalEvent
from ...utils import edit_message, new_message, delete_message, sticker_message
from datetime import datetime, date
import time
@dp.my_signal_event_handle('алло')
@dp.my_signal_event_handle('auth')
@dp.my_signal_event_handle('мессага')
@dp.my_signal_event_handle('свалить')
... | [
6738,
2644,
48205,
1330,
288,
79,
11,
2011,
11712,
282,
9237,
198,
6738,
2644,
26791,
1330,
4370,
62,
20500,
11,
649,
62,
20500,
11,
12233,
62,
20500,
11,
27735,
62,
20500,
198,
6738,
4818,
8079,
1330,
4818,
8079,
11,
3128,
198,
11748... | 2.106464 | 263 |
#!/usr/bin/env python
"""
LFU.py: A cache which implements the
least frequently used algorithm.
"""
__author__ = "Yves Weissig"
__email__ = "weissig@uni-mainz.de"
__status__ = "Development"
import random
from AbstractCache import AbstractCache
class LFUCache(AbstractCache):
"""
Represents a cache which u... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
37811,
198,
43,
38989,
13,
9078,
25,
317,
12940,
543,
23986,
262,
198,
293,
459,
6777,
973,
11862,
13,
198,
37811,
198,
198,
834,
9800,
834,
796,
366,
56,
1158,
16152,
328,
1,
198,
... | 2.104204 | 3,925 |
from datetime import datetime
from pathlib import Path
from typing import List, Dict
from autoleagueplay.match_result import MatchResult
| [
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
3108,
8019,
1330,
10644,
198,
6738,
19720,
1330,
7343,
11,
360,
713,
198,
198,
6738,
1960,
2305,
2064,
1759,
13,
15699,
62,
20274,
1330,
13225,
23004,
628
] | 3.971429 | 35 |
import unittest
from algorithms.root_finding import Bisection
if __name__ == "__main__":
unittest.main()
| [
11748,
555,
715,
395,
198,
198,
6738,
16113,
13,
15763,
62,
41070,
1330,
38045,
3213,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
555,
715,
395,
13,
12417,
3419,
198
] | 2.897436 | 39 |
from flask import Blueprint
argumentation = Blueprint('argumentation', __name__, template_folder='templates', static_folder='static')
from . import argumentation_controller
| [
6738,
42903,
1330,
39932,
198,
198,
49140,
341,
796,
39932,
10786,
49140,
341,
3256,
11593,
3672,
834,
11,
11055,
62,
43551,
11639,
11498,
17041,
3256,
9037,
62,
43551,
11639,
12708,
11537,
198,
198,
6738,
764,
1330,
4578,
341,
62,
36500,... | 4.268293 | 41 |
# # # # # WORKING ON PYTHON 3.6.5 # # # # #
# # # # # MADE BY: @rtunazzz | rtuna#4321 # # # # #
# TODO:
# ADD BIO CHANGE SUPPORT
# Add threading support
# Add OCR
print(r'''
____ ____ _ _ ______ __ __ _
| _ \ / __ \ | \ | ||___ / /\ \ \ / /(_)
| |_) || | ... | [
2,
1303,
1303,
1303,
1303,
220,
220,
30936,
2751,
6177,
350,
56,
4221,
1340,
513,
13,
21,
13,
20,
220,
220,
220,
220,
1303,
1303,
1303,
1303,
1303,
198,
2,
1303,
1303,
1303,
1303,
220,
220,
337,
19266,
11050,
25,
220,
220,
220,
24... | 2.095669 | 5,310 |
import logging
from django import template
from apps.property.models import GenericProperty
register = template.Library()
logger = logging.getLogger(__name__)
@register.filter
| [
11748,
18931,
198,
198,
6738,
42625,
14208,
1330,
11055,
198,
198,
6738,
6725,
13,
26745,
13,
27530,
1330,
42044,
21746,
198,
198,
30238,
796,
11055,
13,
23377,
3419,
198,
6404,
1362,
796,
18931,
13,
1136,
11187,
1362,
7,
834,
3672,
834... | 3.714286 | 49 |
import kfp
from kfp import components
chicago_taxi_dataset_op = components.load_component_from_url('https://raw.githubusercontent.com/kubeflow/pipelines/e3337b8bdcd63636934954e592d4b32c95b49129/components/datasets/Chicago%20Taxi/component.yaml')
pandas_transform_csv_op = components.load_component_from_url('https://ra... | [
11748,
479,
46428,
198,
6738,
479,
46428,
1330,
6805,
628,
198,
354,
4549,
62,
19290,
72,
62,
19608,
292,
316,
62,
404,
796,
6805,
13,
2220,
62,
42895,
62,
6738,
62,
6371,
10786,
5450,
1378,
1831,
13,
12567,
43667,
13,
785,
14,
74,
... | 2.783357 | 697 |
from ulauncher.api.client.Extension import Extension
from ulauncher.api.client.EventListener import EventListener
from ulauncher.api.shared.event import KeywordQueryEvent, ItemEnterEvent
from ulauncher.api.shared.item.ExtensionResultItem import ExtensionResultItem
from ulauncher.api.shared.action.RenderResultListAction... | [
6738,
14856,
1942,
2044,
13,
15042,
13,
16366,
13,
11627,
3004,
1330,
27995,
198,
6738,
14856,
1942,
2044,
13,
15042,
13,
16366,
13,
9237,
33252,
1330,
8558,
33252,
198,
6738,
14856,
1942,
2044,
13,
15042,
13,
28710,
13,
15596,
1330,
73... | 3.694444 | 144 |
# selected = 50
selected = 289326
vals_dict = {"0,0": 1}
if __name__ == "__main__":
main()
| [
198,
198,
2,
6163,
796,
2026,
198,
34213,
796,
2579,
6052,
2075,
198,
198,
12786,
62,
11600,
796,
19779,
15,
11,
15,
1298,
352,
92,
628,
628,
628,
628,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
2... | 2.25 | 48 |
# -*- coding: utf-8 -*-
###
# (C) Copyright [2021] Hewlett Packard Enterprise Development LP
#
# 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
#... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
21017,
198,
2,
357,
34,
8,
15069,
685,
1238,
2481,
60,
30446,
15503,
6400,
446,
14973,
7712,
18470,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
... | 2.020833 | 1,536 |
from redis.connection import PythonParser, HiredisParser
from base import Benchmark
if __name__ == '__main__':
SocketReadBenchmark().run_benchmark()
| [
6738,
2266,
271,
13,
38659,
1330,
11361,
46677,
11,
367,
1202,
271,
46677,
198,
6738,
2779,
1330,
25187,
4102,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
47068,
5569,
44199,
4102,
22446,... | 3.319149 | 47 |
import math
import numpy as np
'''a = [
[14,6,-2,3,12],
[3,15,2,-5,32],
[-7,4,-23,2,-24],
[1,-3,-2,16,14]
]'''
'''a = [
[1,1/2,1/3,1],
[1/2,1/3,1/4,0],
[1/3,1/4,1/5,0],
]'''
a = [
[-7,2,-3,4,-12],
[5,-1,14,-1,13],
... | [
11748,
10688,
198,
11748,
299,
32152,
355,
45941,
628,
198,
198,
7061,
6,
64,
796,
685,
198,
220,
220,
220,
220,
220,
220,
220,
685,
1415,
11,
21,
12095,
17,
11,
18,
11,
1065,
4357,
198,
220,
220,
220,
220,
220,
220,
220,
685,
1... | 1.383033 | 389 |
import logging
from astropy.io import fits
import numpy as np
import pandas as pd
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from tidalclassifier.utils.custom_image_utils import augment, apply_corrections
from tidalclassifier.utils.helper_funcs import ThreadsafeIter, shuffle_df, to_json, ... | [
11748,
18931,
198,
198,
6738,
6468,
28338,
13,
952,
1330,
11414,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
2603,
29487,
8019,
198,
6759,
29487,
8019,
13,
1904,
10786,
46384,
11537,
198,
11748,
... | 2.348805 | 4,309 |
print("LIKHITHA");
print("AM.EN.U4CSE18130");
print("CSE");
| [
4798,
7203,
43,
18694,
39,
2043,
7801,
15341,
198,
4798,
7203,
2390,
13,
1677,
13,
52,
19,
34,
5188,
1507,
12952,
15341,
198,
4798,
7203,
34,
5188,
15341,
198
] | 2.068966 | 29 |
F = open("16_Stikordsregister.table", "r")
lines = F.readlines()
F.close()
a1 = r'<div align="left">'
a2 = r'{| class="wikitable" style="text-align: left;")'
a3 = lines[0].strip()
b = "|-"
c1 = r'|}'
c2 = r'</div>'
for i, line in enumerate(lines[1:]):
line = line.strip()
if line == "#N/A":
continue
... | [
198,
198,
37,
796,
1280,
7203,
1433,
62,
1273,
1134,
3669,
30238,
13,
11487,
1600,
366,
81,
4943,
198,
6615,
796,
376,
13,
961,
6615,
3419,
198,
37,
13,
19836,
3419,
198,
198,
64,
16,
796,
374,
6,
27,
7146,
10548,
2625,
9464,
5320... | 1.759791 | 383 |
"""
This module contains the Jump Search algorithm.
"""
import math
def jump_search(arr: list, x: int, n: int) -> int:
"""
This function implements the Jump Search algorithm.
"""
step = int(math.sqrt(n))
prev = 0
while arr[min(step, n) - 1] < x:
prev = step
step += int(math.sqrt... | [
37811,
198,
1212,
8265,
4909,
262,
15903,
11140,
11862,
13,
198,
37811,
198,
11748,
10688,
198,
198,
4299,
4391,
62,
12947,
7,
3258,
25,
1351,
11,
2124,
25,
493,
11,
299,
25,
493,
8,
4613,
493,
25,
198,
220,
220,
220,
37227,
198,
... | 2.161157 | 242 |
# Copyright 2020 Espressif Systems (Shanghai) PTE LTD
#
# 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 ... | [
2,
15069,
12131,
20386,
601,
361,
11998,
357,
2484,
272,
20380,
8,
350,
9328,
42513,
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,
... | 2.184725 | 7,005 |
from .dataset import load_dataset
from .location import TBikeLocation
from .truck import TBikeTruck
NUMBER_OF_GRID = [5, 60]
NUMBER_OF_TRUCKS = [5, 10]
NUMBER_OF_BIKES_IN_EACH_LOCATION = [4, 3]
TRUCK_CAPACITY = 20
TOTAL_TIMES = 12 * 60 # 12 hours
| [
6738,
764,
19608,
292,
316,
1330,
3440,
62,
19608,
292,
316,
198,
6738,
764,
24886,
1330,
23799,
522,
14749,
198,
6738,
764,
83,
30915,
1330,
23799,
522,
51,
30915,
198,
198,
41359,
13246,
62,
19238,
62,
10761,
2389,
796,
685,
20,
11,... | 2.336449 | 107 |
import os
import pickle
def get_queue(config_dir):
"""Get the queue from the queue backup file."""
queue_path = os.path.join(config_dir, 'queue')
if os.path.exists(queue_path):
queue_file = open(queue_path, 'rb')
try:
queue = pickle.load(queue_file)
return queue
... | [
11748,
28686,
198,
11748,
2298,
293,
628,
198,
4299,
651,
62,
36560,
7,
11250,
62,
15908,
2599,
198,
220,
220,
220,
37227,
3855,
262,
16834,
422,
262,
16834,
11559,
2393,
526,
15931,
198,
220,
220,
220,
16834,
62,
6978,
796,
28686,
13... | 2.349558 | 226 |
from chains.core.metrics import accuracy
from chains.core.optimizers import AdamOptimizer
from chains.core.preprocessing import one_hot
from chains.front.model import Model
from chains.front.network import BatchNorm
from chains.front.network import Dense, Sequence, SoftmaxClassifier, ReLu
from chains.front.training imp... | [
6738,
14659,
13,
7295,
13,
4164,
10466,
1330,
9922,
198,
6738,
14659,
13,
7295,
13,
40085,
11341,
1330,
7244,
27871,
320,
7509,
198,
6738,
14659,
13,
7295,
13,
3866,
36948,
1330,
530,
62,
8940,
198,
6738,
14659,
13,
8534,
13,
19849,
1... | 2.610236 | 508 |
import matplotlib.pyplot as plt
import networkx as nx
import numpy as np
import random
#Function to Delete Node
node_list = [0,1,2]
weights = [[0,2,3],[2,0,6],[3,6,0]]
node_list, weights = add(node_list, weights, [1,2,3])
print node_list;
print weights;
| [
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
3127,
87,
355,
299,
87,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
4738,
198,
198,
2,
22203,
284,
23520,
19081,
628,
220,
220,
220,
220,
220,
220,
220,
220,
1... | 2.310924 | 119 |