content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
# Generated by Django 2.0.12 on 2019-04-13 14:41
from django.db import migrations, models
import django.db.models.deletion
import enumfields.fields
import per.models
| [
2,
2980,
515,
416,
37770,
362,
13,
15,
13,
1065,
319,
13130,
12,
3023,
12,
1485,
1478,
25,
3901,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
14208,
13,
9945,
13,
27530,
13,
2934,
1616,
295,... | 3.054545 | 55 |
###
# Copyright 2016-2021 Hewlett Packard Enterprise, 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
#
# Un... | [
21017,
201,
198,
2,
15069,
1584,
12,
1238,
2481,
30446,
15503,
6400,
446,
14973,
11,
3457,
13,
1439,
2489,
10395,
13,
201,
198,
2,
201,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
201... | 2.018857 | 14,371 |
from __future__ import unicode_literals
import hashlib
import hmac
import time
from base64 import standard_b64encode
from datetime import datetime
from urllib.parse import parse_qs, urlparse
from requests.auth import AuthBase
| [
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
198,
11748,
12234,
8019,
198,
11748,
289,
20285,
198,
11748,
640,
198,
6738,
2779,
2414,
1330,
3210,
62,
65,
2414,
268,
8189,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,... | 3.538462 | 65 |
# Generated by Django 3.0.6 on 2020-05-11 05:34
from django.db import migrations
| [
2,
2980,
515,
416,
37770,
513,
13,
15,
13,
21,
319,
12131,
12,
2713,
12,
1157,
8870,
25,
2682,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
628
] | 2.766667 | 30 |
# -*- encoding: utf-8 -*-
"""
@File : aioWebsocket.py
@Time : 2020/6/28 21:21
@Author : chise
@Email : chise123@live.com
@Software: PyCharm
@info :
"""
import json
from typing import List
from settings import server_host
import aiohttp
import asyncio
from .tools import restart, start_task, stop_task, load_o... | [
2,
532,
9,
12,
21004,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
31,
8979,
220,
220,
220,
1058,
257,
952,
1135,
1443,
5459,
13,
9078,
198,
31,
7575,
220,
220,
220,
1058,
12131,
14,
21,
14,
2078,
2310,
25,
2481,
198,
31... | 2.664122 | 131 |
import sys, os
sys.path.append(os.path.join(os.path.dirname(__file__), ".."))
# Import data manipulation libraries
from io import BytesIO
import tarfile
from enum import Enum
from zipfile import ZipFile
# Import scientific
import numpy as np
import pandas as pd
#from . import utils
import utils
from quaternion_ma... | [
11748,
25064,
11,
28686,
198,
17597,
13,
6978,
13,
33295,
7,
418,
13,
6978,
13,
22179,
7,
418,
13,
6978,
13,
15908,
3672,
7,
834,
7753,
834,
828,
366,
492,
48774,
198,
198,
2,
17267,
1366,
17512,
12782,
198,
6738,
33245,
1330,
2750,... | 2.15374 | 9,438 |
#!/usr/bin/env python3
# thoth-worker
# Copyright(C) 2018, 2019 Fridolin Pokorny
#
# 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 3 of the License, or
# (at your option) any la... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
294,
849,
12,
28816,
198,
2,
15069,
7,
34,
8,
2864,
11,
13130,
1305,
312,
24910,
8175,
1211,
88,
198,
2,
198,
2,
770,
1430,
318,
1479,
3788,
25,
345,
460,
17678,
4163,
340... | 2.594724 | 1,668 |
# --
# File: endace_consts.py
#
# Copyright (C) Endace Technology Limited, 2018-2021
#
# Licensed under Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt)
#
# --
# Constants relating to '_get_error_message_from_exception'
ERR_CODE_MSG = "Error code unavailable"
ERR_MSG_UNAVAILABLE = "Error message unavailabl... | [
2,
1377,
198,
2,
9220,
25,
886,
558,
62,
1102,
6448,
13,
9078,
198,
2,
198,
2,
15069,
357,
34,
8,
5268,
558,
8987,
15302,
11,
2864,
12,
1238,
2481,
198,
2,
198,
2,
49962,
739,
24843,
362,
13,
15,
357,
5450,
1378,
2503,
13,
430... | 3.006494 | 308 |
import math
metadata = {
'protocolName': 'PCR Prep',
'author': 'Opentrons <protocols@opentrons.com>',
'source': 'Protocol Library',
'apiLevel': '2.2'
}
| [
198,
198,
11748,
10688,
198,
198,
38993,
796,
1391,
198,
220,
220,
220,
705,
11235,
4668,
5376,
10354,
705,
5662,
49,
19141,
3256,
198,
220,
220,
220,
705,
9800,
10354,
705,
46,
16923,
12212,
1279,
11235,
4668,
82,
31,
404,
298,
12212... | 2.272727 | 77 |
from secrets import choice
from django.contrib import admin
from django.forms import fields_for_model
from polls.models import Choice, Question
# Register your models here.
admin.site.register(Question, QuestionAdmin)
admin.site.register(Choice) | [
6738,
13141,
1330,
3572,
198,
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
6738,
42625,
14208,
13,
23914,
1330,
7032,
62,
1640,
62,
19849,
198,
6738,
9231,
13,
27530,
1330,
18502,
11,
18233,
198,
198,
2,
17296,
534,
4981,
994,
... | 3.691176 | 68 |
# MIT License: Copyright (c) 2021 Lorenzo Loconte, Gennaro Gala
from typing import Optional, List
import numpy as np
from deeprob.context import is_check_spn_enabled
from deeprob.spn.structure.node import Node, Sum, Product
from deeprob.spn.structure.leaf import Leaf
from deeprob.spn.structure.cltree import BinaryCL... | [
2,
17168,
13789,
25,
15069,
357,
66,
8,
33448,
41721,
15181,
38599,
11,
402,
1697,
12022,
5027,
64,
198,
198,
6738,
19720,
1330,
32233,
11,
7343,
198,
198,
11748,
299,
32152,
355,
45941,
198,
198,
6738,
2769,
22609,
13,
22866,
1330,
3... | 2.697414 | 2,591 |
# 相交链表
# 使用一个set
# 双指针法
| [
198,
2,
13328,
249,
116,
12859,
97,
165,
241,
122,
26193,
101,
628,
198,
220,
220,
220,
1303,
220,
45635,
18796,
101,
31660,
10310,
103,
2617,
628,
220,
220,
220,
1303,
10263,
237,
234,
162,
234,
229,
165,
240,
230,
37345,
243,
198
... | 0.837209 | 43 |
"""
BatteryHorse: Encode/Decode binary data as English sentences
https://github.com/cstranex/batteryhorse
(C) Copyright 2018 Chris Stranex <chris@stranex.com>
"""
import os
import sys
import argparse
from functools import lru_cache
import nltk
from nltk.corpus import wordnet
from .version import __version__
try:
f... | [
37811,
198,
47006,
39,
7615,
25,
2039,
8189,
14,
10707,
1098,
13934,
1366,
355,
3594,
13439,
198,
5450,
1378,
12567,
13,
785,
14,
66,
2536,
272,
1069,
14,
65,
16296,
30527,
198,
7,
34,
8,
15069,
2864,
5180,
520,
2596,
1069,
1279,
35... | 2.390509 | 1,749 |
import requests
from bs4 import BeautifulSoup
import json
from .model import *
from .const import *
from .exception import * | [
11748,
7007,
198,
6738,
275,
82,
19,
1330,
23762,
50,
10486,
198,
11748,
33918,
198,
198,
6738,
764,
19849,
1330,
1635,
198,
6738,
764,
9979,
1330,
1635,
198,
6738,
764,
1069,
4516,
1330,
1635
] | 3.676471 | 34 |
from django.views.generic import DetailView, ListView
from .models import BlogPost
| [
6738,
42625,
14208,
13,
33571,
13,
41357,
1330,
42585,
7680,
11,
7343,
7680,
198,
198,
6738,
764,
27530,
1330,
14001,
6307,
628
] | 3.863636 | 22 |
from pylint.lint import Run
import os
if __name__ == "__main__":
dirs = ['data_structures', 'problems']
RunPyLint().run(dirs) | [
6738,
279,
2645,
600,
13,
75,
600,
1330,
5660,
201,
198,
11748,
28686,
201,
198,
201,
198,
201,
198,
201,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
201,
198,
220,
220,
220,
288,
17062,
796,
37250,
7890,
62,
7249,... | 2.234375 | 64 |
import xml.etree.ElementTree as ET
import requests
import os
import sys
import time
word = sys.argv[1].strip()
print(word)
url = 'http://www.dictionaryapi.com/api/v1/references/collegiate/xml/' + word + '?key=' + os.environ['MERRIAM_WEBSTER_API_KEY']
r = requests.get(url)
root = ET.fromstring(r.content)
# root = ET.pa... | [
11748,
35555,
13,
316,
631,
13,
20180,
27660,
355,
12152,
198,
11748,
7007,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
640,
198,
198,
4775,
796,
25064,
13,
853,
85,
58,
16,
4083,
36311,
3419,
198,
4798,
7,
4775,
8,
198,
6371,
... | 2.528689 | 244 |
# -*- coding: utf-8 -*-
SETTINGS = {"DEBUG": True, "DOMAIN": {"test": {}}}
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
28480,
51,
20754,
796,
19779,
30531,
1298,
6407,
11,
366,
39170,
29833,
1298,
19779,
9288,
1298,
1391,
42535,
198
] | 2.272727 | 33 |
from tkinter import BOTH, END, Entry, Frame, Label, Scrollbar, Tk, Button, Toplevel
from tkinter.ttk import Treeview
| [
6738,
256,
74,
3849,
1330,
347,
26946,
11,
23578,
11,
21617,
11,
25184,
11,
36052,
11,
17428,
5657,
11,
309,
74,
11,
20969,
11,
309,
643,
626,
198,
6738,
256,
74,
3849,
13,
926,
74,
1330,
12200,
1177,
628,
220,
220,
220,
220,
220,... | 2.128571 | 70 |
import hashlib
import platform
from datetime import datetime, timezone
from http import HTTPStatus
from typing import Dict, List, Optional
from fastapi import FastAPI, HTTPException
from pydantic import BaseModel
app = FastAPI()
WALLETS = Wallets.parse_file('database/wallets.json')
node_wallet_index = platform.n... | [
11748,
12234,
8019,
198,
11748,
3859,
198,
6738,
4818,
8079,
1330,
4818,
8079,
11,
640,
11340,
198,
6738,
2638,
1330,
14626,
19580,
198,
6738,
19720,
1330,
360,
713,
11,
7343,
11,
32233,
198,
198,
6738,
3049,
15042,
1330,
12549,
17614,
... | 2.836207 | 464 |
from __future__ import annotations
from ..api_client import ApiClient
from .. import models
| [
6738,
11593,
37443,
834,
1330,
37647,
198,
198,
6738,
11485,
15042,
62,
16366,
1330,
5949,
72,
11792,
198,
6738,
11485,
1330,
4981,
628
] | 4.086957 | 23 |
# Copyright (c) 2021 PaddlePaddle 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 ap... | [
2,
15069,
357,
66,
8,
33448,
350,
37382,
47,
37382,
46665,
13,
1439,
6923,
33876,
13,
198,
2,
220,
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,... | 3.502146 | 233 |
#!/usr/bin/env python
import unittest
TEST_MODULES = [
'list',
'your',
'test',
'modules',
'test.test_something',
]
if __name__ == '__main__':
import tornado.testing
tornado.testing.main()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
11748,
555,
715,
395,
198,
198,
51,
6465,
62,
33365,
6239,
1546,
796,
685,
198,
220,
220,
220,
705,
4868,
3256,
198,
220,
220,
220,
705,
14108,
3256,
198,
220,
220,
220,
705,
9288,
... | 2.294737 | 95 |
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QPainter
from PyQt5.QtWidgets import QWidget, QGridLayout, QApplication
import numpy as np
from .dendritePainter import DendritePainter
from .punctaPainter import PunctaPainter
from .radiiPainter import RadiiPainter
| [
6738,
9485,
48,
83,
20,
13,
48,
83,
14055,
1330,
33734,
198,
6738,
9485,
48,
83,
20,
13,
48,
83,
8205,
72,
1330,
1195,
38490,
353,
198,
6738,
9485,
48,
83,
20,
13,
48,
83,
54,
312,
11407,
1330,
1195,
38300,
11,
1195,
41339,
3251... | 2.783505 | 97 |
#!/usr/bin/env python3
# coding=utf-8
# ----------------------------------------------------------------------------------------------------
# 类 clean
# ----------------------------------------------------------------------------------------------------
# 变更履历:
# 2020-06-22 | Zou Mingzhe | Ver0.1 | 初始版本
# ----------... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
19617,
28,
40477,
12,
23,
198,
2,
16529,
3880,
650,
198,
2,
13328,
109,
119,
3424,
198,
2,
16529,
3880,
650,
198,
2,
10263,
237,
246,
162,
249,
112,
161,
109,
98,
43889,
2... | 3.036585 | 410 |
import numpy as np
| [
11748,
299,
32152,
355,
45941,
198
] | 3.166667 | 6 |
import click
import redis
@click.command()
@click.option('-s', '--scenario', default=None, type=int)
if __name__ == "__main__":
main()
| [
11748,
3904,
198,
11748,
2266,
271,
628,
198,
31,
12976,
13,
21812,
3419,
198,
31,
12976,
13,
18076,
10786,
12,
82,
3256,
705,
438,
1416,
39055,
3256,
4277,
28,
14202,
11,
2099,
28,
600,
8,
628,
198,
361,
11593,
3672,
834,
6624,
366... | 2.648148 | 54 |
import argparse
import os
import sys
from fabric.api import *
from fabric.colors import red
from fabric.contrib import files
from fabric.network import disconnect_all
from playback import __version__, common
from playback.templates.glance_api_conf import conf_glance_api_conf
from playback.templates.glance_... | [
11748,
1822,
29572,
201,
198,
11748,
28686,
201,
198,
11748,
25064,
201,
198,
201,
198,
6738,
9664,
13,
15042,
1330,
1635,
201,
198,
6738,
9664,
13,
4033,
669,
1330,
2266,
201,
198,
6738,
9664,
13,
3642,
822,
1330,
3696,
201,
198,
673... | 2.182505 | 2,515 |
# -*- coding: utf-8 -*-
import os
# Função que limpa a tela do prompt de comando
# Linux e Mac = clear
# Windows = cls
clear_screen = lambda: os.system('clear' if os.name != 'nt' else 'cls')
pause = lambda msg: input(msg)
roman_numbers = {
"M": 1000,
"CM": 900,
"D": 500,
"CD": 400,
"C": 100,
... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
28686,
628,
198,
2,
11138,
16175,
28749,
8358,
1761,
8957,
257,
256,
10304,
466,
6152,
390,
401,
25440,
198,
2,
7020,
304,
4100,
796,
1598,
198,
2,
3964,
796,
5... | 2.150735 | 272 |
#Embedded file name: ACEStream\Core\BitTornado\RawServer.pyo
from bisect import insort
from SocketHandler import SocketHandler
import socket
from cStringIO import StringIO
from traceback import print_exc
from select import error
from threading import Event, RLock, currentThread
from thread import get_ident
from clock i... | [
2,
31567,
47238,
2393,
1438,
25,
40488,
12124,
59,
14055,
59,
13128,
51,
1211,
4533,
59,
27369,
10697,
13,
79,
8226,
198,
6738,
47457,
478,
1330,
1035,
419,
198,
6738,
47068,
25060,
1330,
47068,
25060,
198,
11748,
17802,
198,
6738,
269,... | 3.345912 | 159 |
# ckwg +29
# Copyright 2019 by Kitware, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of condition... | [
2,
269,
46265,
70,
1343,
1959,
198,
2,
15069,
13130,
416,
10897,
1574,
11,
3457,
13,
198,
2,
1439,
2489,
10395,
13,
198,
2,
198,
2,
2297,
396,
3890,
290,
779,
287,
2723,
290,
13934,
5107,
11,
351,
393,
1231,
198,
2,
17613,
11,
3... | 2.45598 | 3,612 |
import pandas as pd
import numpy as np
def find_correlation(df, thresh):
"""
Given a numeric pd.DataFrame, this will find highly correlated features,
and return a list of features to remove and the count of collums
Parameters
----------
df : pd.DataFrame
thresh : correlation threshold, wil... | [
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
628,
198,
4299,
1064,
62,
10215,
49501,
7,
7568,
11,
294,
3447,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
11259,
257,
35575,
279,
67,
13,
6601,
19778,
1... | 2.853567 | 799 |
from collections import defaultdict
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
| [
6738,
17268,
1330,
4277,
11600,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
628,
628
] | 3.705882 | 34 |
from asservicescanners.abstractscanner import AbstractScanner
from asservicescanners.serviceutils import RDP_PORT, RDP_SCRIPT, launch_script_without_terminal, launch_terminal, format_script_args
from aslogging import aslog
| [
6738,
840,
712,
1063,
66,
15672,
13,
397,
8709,
35836,
1008,
1330,
27741,
33351,
1008,
198,
6738,
840,
712,
1063,
66,
15672,
13,
15271,
26791,
1330,
371,
6322,
62,
15490,
11,
371,
6322,
62,
6173,
46023,
11,
4219,
62,
12048,
62,
19419,... | 3.446154 | 65 |
import re
sentiment_analysis = "Unfortunately one of those moments wasn't a giant squid monster. User_mentions:2, likes: 9, number of retweets: 7"
# Write a regex to obtain user mentions
print(re.findall(r"User_mentions:\d", sentiment_analysis))
# Write a regex to obtain number of likes
print(re.findall(r"likes:\s\d"... | [
11748,
302,
198,
34086,
3681,
62,
20930,
796,
366,
13898,
530,
286,
883,
7188,
2492,
470,
257,
6175,
45126,
9234,
13,
11787,
62,
434,
507,
25,
17,
11,
7832,
25,
860,
11,
1271,
286,
1005,
732,
1039,
25,
767,
1,
198,
198,
2,
19430,
... | 3.166667 | 144 |
import numpy as np
import pandas as pd
from PIL import Image
from tqdm import tqdm
from preprocessingutils import pwr_transform
import os
from argparse import ArgumentParser
parser = ArgumentParser()
parser.add_argument('--dir', default='slices', help='location of files, should contain subdirs with splits with subdirs... | [
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
6738,
350,
4146,
1330,
7412,
198,
6738,
256,
80,
36020,
1330,
256,
80,
36020,
198,
6738,
662,
36948,
26791,
1330,
279,
18351,
62,
35636,
198,
11748,
28686,
198,
... | 2.819355 | 310 |
from .connection import AWS
class AWSDiscovery(AWS):
"""
"""
def get_instances(self):
"""
"""
resources = self.ec2.describe_instances()
reservations = resources['Reservations']
instances = []
for reservation in reservations:
for instance in r... | [
6738,
764,
38659,
1330,
30865,
628,
198,
4871,
14356,
10305,
40821,
7,
12298,
50,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
37227,
628,
220,
220,
220,
825,
651,
62,
8625,
1817,
7,
944,
2599,
198,
220,
220,
220,
220,
220,
... | 2.075201 | 1,117 |
from utils import log, json_response
from routes import (
redirect,
response_with_headers,
login_required,
current_user,
check_id,
)
from models.todo import Todo
import time
route_dict = {
'/ajax/todo/index': login_required(index),
'/ajax/todo/add': login_required(add),
'/ajax/tod... | [
6738,
3384,
4487,
1330,
2604,
11,
33918,
62,
26209,
198,
6738,
11926,
1330,
357,
198,
220,
220,
220,
18941,
11,
198,
220,
220,
220,
2882,
62,
4480,
62,
50145,
11,
198,
220,
220,
220,
17594,
62,
35827,
11,
198,
220,
220,
220,
1459,
... | 1.734756 | 328 |
##########################################################################################
#
# Copyright (c) 2017 The MadGraph5_aMC@NLO Development team and Contributors
#
# This file is a part of the MadGraph5_aMC@NLO project, an application which
# automatically generates Feynman diagrams and matrix elements for arbi... | [
29113,
29113,
14468,
7804,
2235,
198,
2,
198,
2,
15069,
357,
66,
8,
2177,
383,
4627,
37065,
20,
62,
64,
9655,
31,
45,
21982,
7712,
1074,
290,
25767,
669,
198,
2,
198,
2,
770,
2393,
318,
257,
636,
286,
262,
4627,
37065,
20,
62,
6... | 2.664875 | 4,464 |
"""Exposes Twitch chat to the application.
"""
from twisted.internet import reactor
from twisted.internet import protocol
from twisted.words.protocols import irc
from threading import Thread
from pubsub import pub
| [
37811,
3109,
4832,
23835,
8537,
284,
262,
3586,
13,
198,
37811,
198,
6738,
19074,
13,
37675,
1330,
21905,
198,
6738,
19074,
13,
37675,
1330,
8435,
198,
6738,
19074,
13,
10879,
13,
11235,
4668,
82,
1330,
220,
1980,
198,
6738,
4704,
278,
... | 4.254902 | 51 |
# Generated by Django 3.1.1 on 2020-09-14 15:38
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
16,
13,
16,
319,
12131,
12,
2931,
12,
1415,
1315,
25,
2548,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
#
# -*- coding: utf-8 -*-
# Copyright 2019 Red Hat Inc.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
"""
The ios_lldp_global class
It is in this file where the current configuration (as dict)
is compared to the provided configuration (as dict) and the command set
necessar... | [
2,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
15069,
13130,
2297,
10983,
3457,
13,
198,
2,
22961,
3611,
5094,
13789,
410,
18,
13,
15,
10,
357,
3826,
27975,
45761,
393,
3740,
1378,
2503,
13,
41791,
13,
... | 2.572513 | 2,372 |
from utils import *
from constants import *
logger = logging.getLogger()
def lambda_handler(event, context):
"""Lambda Function to get users information from database.
Args:
event: dict, required
API Gateway Lambda Proxy Input Format
context: object, required
Lambda Context runtime m... | [
6738,
3384,
4487,
1330,
1635,
198,
6738,
38491,
1330,
1635,
198,
198,
6404,
1362,
796,
18931,
13,
1136,
11187,
1362,
3419,
628,
198,
4299,
37456,
62,
30281,
7,
15596,
11,
4732,
2599,
198,
220,
220,
220,
37227,
43,
4131,
6814,
15553,
2... | 3.037801 | 291 |
"""Faça um algoritmo que leia o preço de um produto e mostre seu novo preço, com 5% de desconto"""
preco = float(input('Quanto custa o produto:'))
desconto = preco*(5/100)
print('O produto que valia R${} com o desconto de 5% é R${} '.format(preco, preco-desconto)) | [
37811,
50110,
50041,
23781,
435,
7053,
270,
5908,
8358,
443,
544,
267,
662,
16175,
78,
390,
23781,
40426,
9390,
304,
749,
260,
384,
84,
645,
13038,
662,
16175,
78,
11,
401,
642,
4,
390,
1715,
5957,
37811,
198,
3866,
1073,
796,
12178,
... | 2.563107 | 103 |
import os
from posixpath import join as pjoin
import pyspark as ps
import pytest
import ibis
import ibis.common.exceptions as com
import ibis.util as util
from ibis.tests.util import assert_equal
@pytest.mark.xfail(
reason='Moved from the legacy spark backend, '
'but not working in the pyspark one #2879... | [
11748,
28686,
198,
6738,
1426,
844,
6978,
1330,
4654,
355,
279,
22179,
198,
198,
11748,
279,
893,
20928,
355,
26692,
198,
11748,
12972,
9288,
198,
198,
11748,
24283,
271,
198,
11748,
24283,
271,
13,
11321,
13,
1069,
11755,
355,
401,
198... | 2.511211 | 446 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
220,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874
] | 2.529412 | 34 |
from django.db import models
from django.contrib.auth.models import AbstractBaseUser
from django.contrib.auth.models import PermissionsMixin
from django.contrib.auth.models import BaseUserManager
# Create your models here.
class UserProfileManager(BaserUserManager):
"""Manager for user profiles"""
def create... | [
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27530,
1330,
27741,
14881,
12982,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27530,
1330,
2448,
8481,
35608,
259,
198,
6738,
42... | 2.82345 | 742 |
import scrapy
from recipeKR.items import RecipekrItem
from bs4 import BeautifulSoup
import traceback
| [
11748,
15881,
88,
198,
6738,
8364,
30758,
13,
23814,
1330,
26694,
38584,
7449,
198,
6738,
275,
82,
19,
1330,
23762,
50,
10486,
198,
11748,
12854,
1891,
198
] | 3.740741 | 27 |
#https://docs.google.com/document/d/1Y31Nt05peNIPwLo9O_TsTRAcy0GbDqGvRcHvJ4qtgzk/edit
###################### Indíce #######################
#---- Instruções
#---- Imports
#---- Funções
#---- Leitura de Ficheiros
#---- Correcções à Base de Dados
#---- Tabelas Descritivas
# ---- Nrº Ciclistas por País
# ... | [
2,
5450,
1378,
31628,
13,
13297,
13,
785,
14,
22897,
14,
67,
14,
16,
56,
3132,
45,
83,
2713,
431,
45,
4061,
86,
27654,
24,
46,
62,
33758,
51,
3861,
948,
15,
49017,
35,
80,
38,
85,
49,
66,
39,
85,
41,
19,
80,
25297,
89,
74,
... | 2.478343 | 6,326 |
# Generated by Django 3.1.3 on 2021-02-10 07:05
import django.db.models.deletion
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
16,
13,
18,
319,
33448,
12,
2999,
12,
940,
8753,
25,
2713,
198,
198,
11748,
42625,
14208,
13,
9945,
13,
27530,
13,
2934,
1616,
295,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
... | 2.818182 | 44 |
from copy import deepcopy
from matrices import Matrix
def conjugate_gradient_solve(A, b, residual_vectors=None):
"""
Solves the Ax = b matrix equation given by the given A and b matrices
:param A: the A matrix
:param b: the b matrix
:param residual_vectors: the list to store the residual vectors... | [
6738,
4866,
1330,
2769,
30073,
198,
198,
6738,
2603,
45977,
1330,
24936,
628,
198,
4299,
11644,
1018,
378,
62,
49607,
62,
82,
6442,
7,
32,
11,
275,
11,
29598,
62,
303,
5217,
28,
14202,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,... | 2.3125 | 368 |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import absolute_import, division, print_function, unicode_literals
import pytest
import numpy as np
from numpy.testing import assert_allclose
from ...utils.testing import requires_dependency
from ..poisson import (
background,
backg... | [
2,
49962,
739,
257,
513,
12,
565,
682,
347,
10305,
3918,
5964,
532,
766,
38559,
24290,
13,
81,
301,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
11,
7297,
11,
3601,
62,
8818,
11,
28000,
1098,
62,
17201,
874,
198,
11748,
1297... | 2.294737 | 475 |
# Copyright (c) Twisted Matrix Laboratories
# See LICENSE for details.
"""
This program will retrieve and print the resource at the given URL.
Usage:
$ python getpage.py <URL>
"""
import sys
from twisted.internet import reactor
from twisted.web.client import getPage
from twisted.python.util import println
getP... | [
2,
15069,
357,
66,
8,
40006,
24936,
46779,
198,
2,
4091,
38559,
24290,
329,
3307,
13,
198,
198,
37811,
198,
1212,
1430,
481,
19818,
290,
3601,
262,
8271,
379,
262,
1813,
10289,
13,
198,
198,
28350,
25,
198,
220,
220,
220,
720,
21015... | 3.375839 | 149 |
"""Module handling cover art downloades from goole image search."""
from typing import Union, overload, TYPE_CHECKING
from typing_extensions import Literal
from . import google_images_download
from . import google_images_download_offline
if TYPE_CHECKING:
Online = google_images_download.GoogleImagesDownload
... | [
37811,
26796,
9041,
3002,
1242,
4321,
274,
422,
467,
2305,
2939,
2989,
526,
15931,
198,
198,
6738,
19720,
1330,
4479,
11,
31754,
11,
41876,
62,
50084,
2751,
198,
6738,
19720,
62,
2302,
5736,
1330,
25659,
1691,
198,
198,
6738,
764,
1330,... | 3.268293 | 287 |
from .data_collate import *
from .data_crop import *
from .data_skeleton import *
from .data_affinity import *
from .data_segmentation import *
| [
6738,
764,
7890,
62,
26000,
378,
1330,
1635,
198,
6738,
764,
7890,
62,
31476,
1330,
1635,
198,
6738,
764,
7890,
62,
82,
38800,
1330,
1635,
198,
6738,
764,
7890,
62,
2001,
6269,
1330,
1635,
198,
6738,
764,
7890,
62,
325,
5154,
341,
1... | 3.2 | 45 |
from bust.utils import indent_string
class Header(object):
"""Documentation for Header
"""
| [
6738,
13076,
13,
26791,
1330,
33793,
62,
8841,
628,
198,
4871,
48900,
7,
15252,
2599,
198,
220,
220,
220,
37227,
24941,
341,
329,
48900,
628,
220,
220,
220,
37227,
198
] | 3.4 | 30 |
# coding: utf-8
import requests
import json
import random
import timeperiod
# https://qiita.com/sti320a/items/f20b8cbc06bf70425d33
| [
2,
19617,
25,
3384,
69,
12,
23,
198,
11748,
7007,
198,
11748,
33918,
198,
11748,
4738,
198,
198,
11748,
640,
41007,
198,
2,
3740,
1378,
40603,
5350,
13,
785,
14,
301,
72,
19504,
64,
14,
23814,
14,
69,
1238,
65,
23,
66,
15630,
3312... | 2.64 | 50 |
#from test_plus.test import TestCase
#from . import factories
#from django.test import RequestFactory
#import random
#from django.template import Context, Template
'''
class TestCountUnpaidInvoices(TestCase):
def setUp(self):
self.user = self.make_user('user-{}'.format(random.randint(1, 100)))
def te... | [
2,
6738,
1332,
62,
9541,
13,
9288,
1330,
6208,
20448,
198,
2,
6738,
764,
1330,
17590,
198,
2,
6738,
42625,
14208,
13,
9288,
1330,
19390,
22810,
198,
2,
11748,
4738,
198,
2,
6738,
42625,
14208,
13,
28243,
1330,
30532,
11,
37350,
198,
... | 1.843525 | 10,155 |
# This file is part of the Jsonify.
#
# Copyright (C) 2021 Serghei Iakovlev <egrep@protonmail.ch>
#
# For the full copyright and license information, please view
# the LICENSE file that was distributed with this source code.
import codecs
from os import path
from setuptools import setup, find_packages
import re
def... | [
2,
770,
2393,
318,
636,
286,
262,
449,
1559,
1958,
13,
198,
2,
198,
2,
15069,
357,
34,
8,
33448,
2930,
70,
27392,
314,
44715,
2768,
1279,
1533,
7856,
31,
1676,
1122,
4529,
13,
354,
29,
198,
2,
198,
2,
1114,
262,
1336,
6634,
290,... | 2.352167 | 2,354 |
import altair as alt
import altair_viewer as view
import pandas as pd
import numpy as np
import sklearn
import scipy.stats.stats
import data_cat
import mushroom_class_fix
import util_func
from altair import pipe, limit_rows, to_values
t = lambda data: pipe(data, limit_rows(max_rows=100000), to_values)
al... | [
11748,
5988,
958,
355,
5988,
201,
198,
11748,
5988,
958,
62,
1177,
263,
355,
1570,
201,
198,
11748,
19798,
292,
355,
279,
67,
201,
198,
11748,
299,
32152,
355,
45941,
201,
198,
11748,
1341,
35720,
201,
198,
11748,
629,
541,
88,
13,
... | 2.355535 | 5,285 |
import requests
from requests.exceptions import ConnectTimeout, ConnectionError, ReadTimeout
from server.monitor import MessageTunnel, LogsFile
import json
def portal_scan(item_id, ip="", urls="", port="", method="", username="", password="", client="",
logger=LogsFile.LogsFile().get_monitor_logs()):
... | [
11748,
7007,
198,
6738,
7007,
13,
1069,
11755,
1330,
8113,
48031,
11,
26923,
12331,
11,
4149,
48031,
198,
6738,
4382,
13,
41143,
1330,
16000,
51,
403,
4954,
11,
5972,
82,
8979,
198,
11748,
33918,
628,
198,
4299,
17898,
62,
35836,
7,
9... | 2.083624 | 1,148 |
import torch
import torch.utils.data
import numpy as np
import pandas as pd
import subprocess as sp
import sys
import gzip as gz
from datetime import datetime
from .fasta import parse
def log(msg, file=sys.stderr):
"""
Log datetime-stamped message to file
:param msg: Message to log
:param f: Writabl... | [
11748,
28034,
198,
11748,
28034,
13,
26791,
13,
7890,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
850,
14681,
355,
599,
198,
11748,
25064,
198,
11748,
308,
13344,
355,
308,
89,
198,
6738,
... | 2.307692 | 1,664 |
from kanweek.extensions import db, ma
| [
6738,
43998,
10464,
13,
2302,
5736,
1330,
20613,
11,
17266,
628,
198
] | 3.333333 | 12 |
from enum_choice import EnumChoice
# `str`s members with default label
# `int`s members with custom labels
# `object`s members with default labels
| [
6738,
33829,
62,
25541,
1330,
2039,
388,
46770,
628,
198,
2,
4600,
2536,
63,
82,
1866,
351,
4277,
6167,
628,
198,
2,
4600,
600,
63,
82,
1866,
351,
2183,
14722,
628,
198,
2,
4600,
15252,
63,
82,
1866,
351,
4277,
14722,
198
] | 3.642857 | 42 |
# Author: Liqiang Du <keris.du@gmail.com>
import pandas as pd
import pkg_resources
def german_data():
"""Return german data as a data frame."""
filename = pkg_resources.resource_filename("yasc", "data/german.csv")
df = pd.read_csv(filename)
return df
| [
2,
6434,
25,
7455,
80,
15483,
10343,
1279,
6122,
271,
13,
646,
31,
14816,
13,
785,
29,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
279,
10025,
62,
37540,
628,
198,
4299,
308,
2224,
62,
7890,
33529,
198,
220,
220,
220,
37227,
... | 2.663366 | 101 |
# -*- coding: utf-8 -*-
'''
=========
scrim.api
=========
'''
from __future__ import absolute_import
import os
import atexit
from fstrings import f
from scrim.globals import (
SHELLS,
SCRIM_AUTO_WRITE,
SCRIM_PATH,
SCRIM_SHELL,
SCRIM_SCRIPT
)
from scrim.commands import CommandExecutor, Command, RawCo... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
7061,
6,
198,
2559,
28,
198,
1416,
3036,
13,
15042,
198,
2559,
28,
198,
7061,
6,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
11748,
28686,
198,
11748,
37... | 2.192734 | 2,890 |
import yaml
from tqdm import tqdm
from mann2 import model_lens
from mann2 import network_lens_attitudeDiffusion
from mann2.helper_tqdm import HelperTqdm
| [
11748,
331,
43695,
198,
198,
6738,
256,
80,
36020,
1330,
256,
80,
36020,
198,
198,
6738,
582,
77,
17,
1330,
2746,
62,
75,
641,
198,
6738,
582,
77,
17,
1330,
3127,
62,
75,
641,
62,
1078,
3984,
28813,
4241,
198,
198,
6738,
582,
77,
... | 2.644068 | 59 |
import consts
from cell import Cell
| [
11748,
1500,
82,
198,
198,
6738,
2685,
1330,
12440,
198
] | 3.7 | 10 |
"""
:mod:`GenesisDensity` -- calculate TC genesis density
=====================================================
.. module:: GenesisDensity
:synopsis: Calculate density of TC genesis points over a grid (TCs/year)
.. moduleauthor: Craig Arthur <craig.arthur@ga.gov.au>
TODO: Use `statsmodels.nonparametric.kde.KDEMul... | [
37811,
198,
25,
4666,
25,
63,
13746,
9339,
35,
6377,
63,
1377,
15284,
17283,
48861,
12109,
198,
10052,
4770,
1421,
28,
198,
198,
492,
8265,
3712,
18993,
35,
6377,
198,
220,
220,
1058,
28869,
24608,
25,
27131,
378,
12109,
286,
17283,
4... | 3.114846 | 714 |
# Generated by Django 2.2.9 on 2020-02-19 22:57
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
362,
13,
17,
13,
24,
319,
12131,
12,
2999,
12,
1129,
2534,
25,
3553,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
from .errors import UnitExecutionError, UnitOutputError
| [
198,
6738,
764,
48277,
1330,
11801,
23002,
1009,
12331,
11,
11801,
26410,
12331,
628
] | 4.142857 | 14 |
"""
Draw a single line
"""
from typing import Dict, Tuple, List, AnyStr
from numpy import ndarray
from ...tk.matplotlibTK.legend import format_legend_label
def draw_one_line(
obj_axis, # type: object
xy, # type: List
x_bars, # type: ndarray
y_bars, ... | [
37811,
198,
25302,
257,
2060,
1627,
198,
37811,
198,
6738,
19720,
1330,
360,
713,
11,
309,
29291,
11,
7343,
11,
4377,
13290,
198,
6738,
299,
32152,
1330,
299,
67,
18747,
198,
6738,
2644,
30488,
13,
6759,
29487,
8019,
51,
42,
13,
1455,... | 1.996287 | 808 |
import logging
import signal
from collections import defaultdict
from dataclasses import dataclass
from typing import Optional, List, Dict
from urllib.parse import urlparse, ParseResult
from cancer import telegram
from cancer.adapter.rabbit import RabbitPublisher, RabbitConfig
from cancer.message import (
Message,... | [
11748,
18931,
198,
11748,
6737,
198,
6738,
17268,
1330,
4277,
11600,
198,
6738,
4818,
330,
28958,
1330,
4818,
330,
31172,
198,
6738,
19720,
1330,
32233,
11,
7343,
11,
360,
713,
198,
6738,
2956,
297,
571,
13,
29572,
1330,
19016,
29572,
1... | 2.657509 | 546 |
import re
import uuid
import json
from flask import request, render_template, jsonify, url_for, abort, redirect
from flask.ext.bcrypt import Bcrypt
from flask.ext.mail import Mail, Message
from flask.ext.login import (LoginManager, login_user, logout_user,
login_required, current_user)
fr... | [
11748,
302,
198,
11748,
334,
27112,
198,
11748,
33918,
198,
198,
6738,
42903,
1330,
2581,
11,
8543,
62,
28243,
11,
33918,
1958,
11,
19016,
62,
1640,
11,
15614,
11,
18941,
198,
6738,
42903,
13,
2302,
13,
15630,
6012,
1330,
347,
29609,
... | 2.354362 | 3,519 |
import functools
import shutil
from contextlib import contextmanager
from tempfile import TemporaryFile
from typing import Callable
from protopy.cli.sources import Source
import requests
| [
11748,
1257,
310,
10141,
198,
11748,
4423,
346,
198,
6738,
4732,
8019,
1330,
4732,
37153,
198,
6738,
20218,
7753,
1330,
46042,
8979,
198,
6738,
19720,
1330,
4889,
540,
198,
198,
6738,
1237,
11081,
13,
44506,
13,
82,
2203,
1330,
8090,
19... | 4.295455 | 44 |
from setuptools import find_packages, setup
setup(
name='mt5linux',
packages=find_packages(include=['mt5linux']),
version='0.1.9',
description='MetaTrader5 for linux users',
long_description=open('README.md','r').read(),
long_description_content_type='text/markdown',
author='Lucas Prett Camp... | [
6738,
900,
37623,
10141,
1330,
1064,
62,
43789,
11,
9058,
198,
40406,
7,
198,
220,
220,
220,
1438,
11639,
16762,
20,
23289,
3256,
198,
220,
220,
220,
10392,
28,
19796,
62,
43789,
7,
17256,
28,
17816,
16762,
20,
23289,
20520,
828,
198,... | 2.661765 | 204 |
#!/usr/bin/python
import requests
import re
import sys
import json
import time
# secs for polling Jenkins API
#
QUEUE_POLL_INTERVAL = 2
JOB_POLL_INTERVAL = 20
OVERALL_TIMEOUT = 3600 # 1 hour
# job specifics: should be passed in
auth_token = 'buildmaster:173223588624f980c3AAA68d4d8efe0c'
jenkins_uri... | [
2,
48443,
14629,
14,
8800,
14,
29412,
201,
198,
201,
198,
11748,
7007,
201,
198,
11748,
302,
201,
198,
11748,
25064,
220,
201,
198,
11748,
33918,
201,
198,
11748,
640,
201,
198,
201,
198,
2,
792,
82,
329,
13985,
21835,
7824,
201,
19... | 2.240954 | 1,216 |
#!/usr/bin/env python3
from typing import Dict
import typer
from tabulate import tabulate
from lm_agent.backend_utils import SyncBackendClient
app = typer.Typer(help="CLI for interaction with the license manager configuration table")
client = SyncBackendClient()
@app.command()
def get_all():
"""
Get all c... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
6738,
19720,
1330,
360,
713,
198,
198,
11748,
1259,
525,
198,
6738,
7400,
5039,
1330,
7400,
5039,
198,
198,
6738,
300,
76,
62,
25781,
13,
1891,
437,
62,
26791,
1330,
35908,
7282,
... | 2.457831 | 1,328 |
from flask import Flask
from .routes import app
| [
6738,
42903,
1330,
46947,
198,
6738,
764,
81,
448,
274,
1330,
598,
198
] | 3.692308 | 13 |
# Uses python3
import sys
if __name__ == '__main__':
input = sys.stdin.read()
n, *a = list(map(int, input.split()))
b = n * [0]
print(get_number_of_inversions(a, b, 0, len(a)))
| [
2,
36965,
21015,
18,
198,
11748,
25064,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
5128,
796,
25064,
13,
19282,
259,
13,
961,
3419,
198,
220,
220,
220,
299,
11,
1635,
64,
796,
1351,
7,
... | 2.179775 | 89 |
# Copyright (c) 2015-2018 Cisco Systems, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge... | [
2,
220,
15069,
357,
66,
8,
1853,
12,
7908,
28289,
11998,
11,
3457,
13,
198,
2,
198,
2,
220,
2448,
3411,
318,
29376,
7520,
11,
1479,
286,
3877,
11,
284,
597,
1048,
16727,
257,
4866,
198,
2,
220,
286,
428,
3788,
290,
3917,
10314,
... | 2.733509 | 1,516 |
from datetime import datetime
| [
6738,
4818,
8079,
1330,
4818,
8079,
198
] | 4.285714 | 7 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# kate: space-indent on; indent-width 4; mixedindent off; indent-mode python;
#
# Copyright (C) 2009-2019 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The ... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
479,
378,
25,
2272,
12,
521,
298,
319,
26,
33793,
12,
10394,
604,
26,
7668,
521,
298,
572,
26,
33793,
12,
14171,
21015,... | 2.588065 | 5,178 |
import requests, json, time
import wikipedia
from bot import Bot
| [
11748,
7007,
11,
33918,
11,
640,
198,
11748,
47145,
11151,
198,
6738,
10214,
1330,
18579,
628
] | 4.125 | 16 |
from mock import patch
from notsouid.factories import UUID1Factory, UUID4Factory
| [
6738,
15290,
1330,
8529,
198,
6738,
407,
82,
280,
312,
13,
22584,
1749,
1330,
471,
27586,
16,
22810,
11,
471,
27586,
19,
22810,
628
] | 3.416667 | 24 |
# https://atcoder.jp/contests/practice2/tasks/practice2_c
import sys
from atcoder.math import floor_sum
if __name__ == '__main__':
main()
| [
2,
3740,
1378,
265,
66,
12342,
13,
34523,
14,
3642,
3558,
14,
39541,
17,
14,
83,
6791,
14,
39541,
17,
62,
66,
198,
198,
11748,
25064,
198,
198,
6738,
379,
66,
12342,
13,
11018,
1330,
4314,
62,
16345,
628,
198,
198,
361,
11593,
367... | 2.534483 | 58 |
import numpy as np
def test_camera(make_test_viewer):
"""Test vispy camera creation in 2D."""
viewer = make_test_viewer()
vispy_camera = viewer.window.qt_viewer.camera
np.random.seed(0)
data = np.random.random((11, 11, 11))
viewer.add_image(data)
# Test default values camera values are u... | [
11748,
299,
32152,
355,
45941,
628,
198,
4299,
1332,
62,
25695,
7,
15883,
62,
9288,
62,
1177,
263,
2599,
198,
220,
220,
220,
37227,
14402,
1490,
9078,
4676,
6282,
287,
362,
35,
526,
15931,
198,
220,
220,
220,
19091,
796,
787,
62,
92... | 2.585066 | 2,116 |
# Module for managing user accounts
#
# Author: Doug Harris
from org.gluu.service.cdi.util import CdiUtil
from org.gluu.oxauth.model.common import User
from org.oxauth.persistence.model import PairwiseIdentifier
from org.gluu.service.cdi.util import CdiUtil
from org.gluu.oxauth.service import UserService, PairwiseIden... | [
2,
19937,
329,
11149,
2836,
5504,
198,
2,
198,
2,
6434,
25,
15115,
10026,
198,
198,
6738,
8745,
13,
70,
2290,
84,
13,
15271,
13,
10210,
72,
13,
22602,
1330,
327,
10989,
18274,
346,
198,
6738,
8745,
13,
70,
2290,
84,
13,
1140,
1843... | 3.298246 | 228 |
# -*- coding: utf-8 -*-
from solution import BaileReconciliacion
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
4610,
1330,
8999,
576,
6690,
261,
66,
2403,
49443,
628
] | 2.576923 | 26 |
"""
********************************************************************************
conversions
********************************************************************************
.. currentmodule:: compas_blender.conversions
Classes
=======
.. autosummary::
:toctree: generated/
:nosignatures:
BlenderGeom... | [
37811,
198,
17174,
17174,
8412,
198,
1102,
47178,
198,
17174,
17174,
8412,
198,
198,
492,
1459,
21412,
3712,
552,
292,
62,
2436,
2194,
13,
1102,
47178,
198,
198,
9487,
274,
198,
1421,
18604,
198,
198,
492,
44619,
388,
6874,
3712,
198,
... | 3.506494 | 154 |
from django.contrib import admin
from .models import Strategy
from .models import StrategyType
from .models import StrategyDetail
admin.site.register(StrategyType)
admin.site.register(Strategy)
admin.site.register(StrategyDetail)
| [
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
6738,
764,
27530,
1330,
20561,
198,
6738,
764,
27530,
1330,
20561,
6030,
198,
6738,
764,
27530,
1330,
20561,
11242,
603,
198,
198,
28482,
13,
15654,
13,
30238,
7,
13290,
4338,
6030,
8... | 3.609375 | 64 |
import torch
import sys
if torch.torch.cuda.is_available():
sys.exit(0)
else:
sys.exit(1)
| [
11748,
28034,
198,
11748,
25064,
198,
198,
361,
28034,
13,
13165,
354,
13,
66,
15339,
13,
271,
62,
15182,
33529,
198,
220,
220,
220,
25064,
13,
37023,
7,
15,
8,
198,
17772,
25,
198,
220,
220,
220,
25064,
13,
37023,
7,
16,
8,
198
] | 2.25 | 44 |
# This file is executed on every boot (including wake-boot from deepsleep)
#import esp
#esp.osdebug(None)
import machine
import hw_utils
# Register some useful commands
# setRtcRamSSID = hw_update_ota.setRtcRamSSID
# checkForNewSwAndReboot = hw_utils.Command(hw_update_ota.checkForNewSwAndRebootRepl)
# updateAndReboo... | [
2,
770,
2393,
318,
10945,
319,
790,
6297,
357,
8201,
7765,
12,
18769,
422,
2769,
42832,
8,
198,
2,
11748,
15024,
198,
2,
9774,
13,
418,
24442,
7,
14202,
8,
628,
198,
11748,
4572,
198,
11748,
289,
86,
62,
26791,
198,
198,
2,
17296,... | 2.900763 | 262 |
"""
This module builds a SQLite database to receive job postings from careerjet.com
and provides methods for reading from and writing to the database.
"""
__author__ = "Seth Chart"
__version__ = "0.1.0"
__license__ = "MIT"
import sqlite3
import pandas as pd
| [
37811,
198,
1212,
8265,
12188,
257,
16363,
578,
6831,
284,
3328,
1693,
44656,
422,
3451,
31173,
13,
785,
198,
392,
3769,
5050,
329,
3555,
422,
290,
3597,
284,
262,
6831,
13,
198,
37811,
198,
198,
834,
9800,
834,
796,
366,
50,
2788,
... | 3.333333 | 78 |
from django.db import models
from machina.apps.forum_conversation.abstract_models import AbstractTopic
from machina.apps.forum_conversation.models import * # noqa
| [
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
3235,
1437,
13,
18211,
13,
27302,
62,
1102,
690,
341,
13,
397,
8709,
62,
27530,
1330,
27741,
33221,
628,
198,
198,
6738,
3235,
1437,
13,
18211,
13,
27302,
62,
1102,
690,
341,
13,
... | 3.34 | 50 |
from __future__ import division
| [
6738,
11593,
37443,
834,
1330,
7297,
198
] | 4.571429 | 7 |
# -*- coding: utf-8 -*-
#
# This file is part of Django appschema released under the MIT license.
# See the LICENSE for more information.
import sys
from django.conf import settings
from django.db.models.loading import cache
from django.db.models.signals import post_syncdb
from django.utils.datastructures import Sort... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
198,
2,
770,
2393,
318,
636,
286,
37770,
598,
15952,
2611,
2716,
739,
262,
17168,
5964,
13,
198,
2,
4091,
262,
38559,
24290,
329,
517,
1321,
13,
198,
198,
11748,
... | 2.625948 | 1,318 |
#
# @lc app=leetcode.cn id=15 lang=python3
#
# [15] 三数之和
#
# https://leetcode-cn.com/problems/3sum/description/
#
# algorithms
# Medium (29.29%)
# Likes: 2558
# Dislikes: 0
# Total Accepted: 320K
# Total Submissions: 1.1M
# Testcase Example: '[-1,0,1,2,-1,-4]'
#
# 给你一个包含 n 个整数的数组 nums,判断 nums 中是否存在三个元素 a,b,c ,使得... | [
2,
198,
2,
2488,
44601,
598,
28,
293,
316,
8189,
13,
31522,
4686,
28,
1314,
42392,
28,
29412,
18,
198,
2,
198,
2,
685,
1314,
60,
220,
49011,
46763,
108,
45298,
161,
240,
234,
198,
2,
198,
2,
3740,
1378,
293,
316,
8189,
12,
31522... | 1.207243 | 497 |
from base import *
import agent
import task
AGENT = agent.SoftACAgent
TASK = task.DIAYNTask
COMMENT = "{}_{}_{}".format(ENV, AGENT.__name__, TASK.__name__)
LR = 3e-4
LR_D = 3e-4
SIGMA_EPS = 1e-5
GAMMA = 0.99
BATCH = 256
ALPHA = 1.0
STEPS = 1
TAU = 0.005
RSCALE = 5.0
L_S... | [
6738,
2779,
220,
1330,
1635,
198,
11748,
5797,
198,
11748,
4876,
198,
198,
4760,
3525,
220,
220,
220,
220,
796,
5797,
13,
18380,
26576,
6783,
198,
51,
1921,
42,
220,
220,
220,
220,
220,
796,
4876,
13,
35,
3539,
56,
11251,
2093,
198,... | 1.788462 | 208 |
import logging
logging.basicConfig(level=logging.WARNING) | [
11748,
18931,
201,
198,
201,
198,
6404,
2667,
13,
35487,
16934,
7,
5715,
28,
6404,
2667,
13,
31502,
8
] | 3.157895 | 19 |