content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
import calendar
import time
STATUS_THRESHOLD = 15
class ProxyNode:
"""
ProxyNode class defines a Swift Proxy node. The identifier is the name of the node.
"""
class StorageNode:
"""
StorageNode class defines a Swift storage node. The identifier is the name of the node.
"""
| [
11748,
11845,
198,
11748,
640,
198,
198,
35744,
2937,
62,
4221,
19535,
39,
15173,
796,
1315,
198,
198,
4871,
38027,
19667,
25,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
38027,
19667,
1398,
15738,
257,
15608,
3... | 3.069307 | 101 |
import clr
from System import *
from System.IO import *
if __name__ == "__main__":
f = File.Create("test.MEB")
writer = ContentWriter(f)
writer.WriteInt(42)
writer.Flush()
f.Close()
| [
11748,
537,
81,
198,
198,
6738,
4482,
1330,
1635,
198,
6738,
4482,
13,
9399,
1330,
1635,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
277,
796,
9220,
13,
16447,
7203,
9288,
13,
11682,
33,
49... | 2.273684 | 95 |
import sys
_python3 = False
if (sys.version_info > (3, 0)):
_python3 = True
import os
import platform
import json
import subprocess
import shlex
import argparse
import time
import shutil
import socket
import yaml
import logging
from azure.mgmt.resource import ResourceManagementClient
from azure.common.client_factor... | [
11748,
25064,
198,
62,
29412,
18,
796,
10352,
198,
361,
357,
17597,
13,
9641,
62,
10951,
1875,
357,
18,
11,
657,
8,
2599,
198,
220,
220,
220,
4808,
29412,
18,
796,
6407,
198,
11748,
28686,
198,
11748,
3859,
198,
11748,
33918,
198,
1... | 2.781757 | 8,376 |
import datetime
import os
import re
import shutil
import boto3
from boto3.dynamodb.conditions import Key
from datalake_library import octagon
from datalake_library.commons import init_logger
from datalake_library.configuration.resource_configs import DynamoConfiguration
from datalake_library.interfaces.dynamo_interfa... | [
11748,
4818,
8079,
198,
11748,
28686,
198,
11748,
302,
198,
11748,
4423,
346,
198,
198,
11748,
275,
2069,
18,
198,
6738,
275,
2069,
18,
13,
67,
4989,
375,
65,
13,
17561,
1756,
1330,
7383,
198,
198,
6738,
4818,
282,
539,
62,
32016,
1... | 2.135251 | 1,634 |
''' UVa 465 - Overflow '''
# https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=406
# Date: 2021-08-14 17:38:54
# Run time: 0.010
# Verdict: AC
from sys import stdin
limit = 2 ** 31 - 1
for line in stdin:
a, action, b = line.strip().split()
print(a, action, b)
a,... | [
7061,
6,
22033,
64,
49669,
532,
3827,
11125,
705,
7061,
198,
2,
3740,
1378,
25119,
10456,
469,
13,
2398,
14,
9630,
13,
10121,
30,
18076,
28,
785,
62,
25119,
10456,
469,
5,
7449,
312,
28,
23,
5,
7700,
28,
12860,
62,
45573,
5,
45573... | 2.272727 | 308 |
from unittest import mock
import pytest
from cms.api import create_page, create_title
from cms.toolbar.items import ModalItem, SubMenu
from tests.resources.cmsapp.models import ExtensionModel
@mock.patch('cms_helpers.cms_toolbars.TitleExtensionToolbar.get_item_position')
@pytest.mark.django_db
| [
6738,
555,
715,
395,
1330,
15290,
198,
198,
11748,
12972,
9288,
198,
6738,
269,
907,
13,
15042,
1330,
2251,
62,
7700,
11,
2251,
62,
7839,
198,
6738,
269,
907,
13,
25981,
5657,
13,
23814,
1330,
3401,
282,
7449,
11,
3834,
23381,
198,
... | 3.050505 | 99 |
import json
import numpy as np
import itertools
from tabulate import tabulate
import math
import matplotlib.pyplot as plt
#import pandas as pd
import cv2
import sys
sys.path.append("../../../libs")
from box_utils import generate_anchors
from configs import cfgs
if __name__ == "__main__":
dataset = 'tr... | [
11748,
33918,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
340,
861,
10141,
198,
6738,
7400,
5039,
1330,
7400,
5039,
198,
11748,
10688,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
2,
11748,
19798,
292,
355,
279... | 2.777778 | 216 |
import numpy as np
import numpy.linalg as npla
from pylgmath import se3op, Transformation
TEST_SIZE = 10000
| [
11748,
299,
32152,
355,
45941,
198,
11748,
299,
32152,
13,
75,
1292,
70,
355,
299,
489,
64,
198,
198,
6738,
279,
2645,
70,
11018,
1330,
384,
18,
404,
11,
49127,
198,
198,
51,
6465,
62,
33489,
796,
33028,
628,
628
] | 2.825 | 40 |
#!/usr/bin/python3
""" State Module for HBNB project """
from models.base_model import BaseModel, Base
from models import storage_type
from sqlalchemy import Column, String
class Amenity(BaseModel, Base):
'''amenity class'''
__tablename__ = 'amenities'
if storage_type == 'db':
name = Column(String... | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
37811,
1812,
19937,
329,
367,
15766,
33,
1628,
37227,
198,
6738,
4981,
13,
8692,
62,
19849,
1330,
7308,
17633,
11,
7308,
198,
6738,
4981,
1330,
6143,
62,
4906,
198,
6738,
44161,
282,
2659... | 2.789474 | 133 |
from statuspage import __version__
from setuptools import setup, find_packages
setup(
name='statuspage',
version=__version__,
description='Python library for Statuspage.io APIs',
author='Kunal Lillaney',
author_email='lillaney@jhu.edu',
url='https://github.io/kunallillaney/statuspage-py',
l... | [
6738,
3722,
7700,
1330,
11593,
9641,
834,
198,
6738,
900,
37623,
10141,
1330,
9058,
11,
1064,
62,
43789,
198,
198,
40406,
7,
198,
220,
220,
220,
1438,
11639,
13376,
7700,
3256,
198,
220,
220,
220,
2196,
28,
834,
9641,
834,
11,
198,
... | 2.651429 | 175 |
# -*- coding: utf-8 -*-
import os
import sys
import unittest2
import ubivar
from mock import patch
from ubivar.test.helper import (UbivarTestCase, NOW)
if __name__ == '__main__':
unittest2.main()
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
555,
715,
395,
17,
198,
11748,
20967,
452,
283,
198,
198,
6738,
15290,
1330,
8529,
198,
6738,
20967,
452,
283,
13,
9288,
13,... | 2.530864 | 81 |
# Generated by Django 2.2.11 on 2020-09-16 09:18
import django.core.validators
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
362,
13,
17,
13,
1157,
319,
12131,
12,
2931,
12,
1433,
7769,
25,
1507,
198,
198,
11748,
42625,
14208,
13,
7295,
13,
12102,
2024,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.97561 | 41 |
from django.contrib import auth
from django.contrib.auth.middleware import get_user
from django.utils.functional import SimpleLazyObject
| [
6738,
42625,
14208,
13,
3642,
822,
1330,
6284,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27171,
1574,
1330,
651,
62,
7220,
198,
6738,
42625,
14208,
13,
26791,
13,
45124,
1330,
17427,
43,
12582,
10267,
628
] | 3.631579 | 38 |
import pygame
from data.constants import *
from data.core import animation_asset_loader
# check for any collisions
| [
11748,
12972,
6057,
201,
198,
6738,
1366,
13,
9979,
1187,
1330,
1635,
201,
198,
6738,
1366,
13,
7295,
1330,
11034,
62,
562,
316,
62,
29356,
201,
198,
201,
198,
220,
220,
220,
1303,
2198,
329,
597,
31998,
201
] | 3.263158 | 38 |
import tensorflow as tf
from tensorflow.keras import backend as K
@tf.autograph.experimental.do_not_convert
| [
11748,
11192,
273,
11125,
355,
48700,
198,
6738,
11192,
273,
11125,
13,
6122,
292,
1330,
30203,
355,
509,
628,
198,
31,
27110,
13,
2306,
2384,
13,
23100,
9134,
13,
4598,
62,
1662,
62,
1102,
1851,
628,
220,
220,
220,
220
] | 2.875 | 40 |
""" dynamic_watershed/__init__.py """
# __all__ = []
from .dynamic_watershed import post_process
from .version import __version__
| [
37811,
8925,
62,
41555,
704,
14,
834,
15003,
834,
13,
9078,
37227,
198,
198,
2,
11593,
439,
834,
796,
17635,
198,
198,
6738,
764,
67,
28995,
62,
41555,
704,
1330,
1281,
62,
14681,
198,
198,
6738,
764,
9641,
1330,
11593,
9641,
834,
1... | 3.093023 | 43 |
# pylint: disable=missing-docstring
from contextlib import asynccontextmanager
@asynccontextmanager
async with context_manager(42) as ans:
assert ans == 42
| [
2,
279,
2645,
600,
25,
15560,
28,
45688,
12,
15390,
8841,
198,
198,
6738,
4732,
8019,
1330,
355,
2047,
535,
261,
5239,
37153,
628,
198,
31,
292,
2047,
535,
261,
5239,
37153,
628,
198,
292,
13361,
351,
4732,
62,
37153,
7,
3682,
8,
... | 3 | 55 |
# -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html
import csv
from scrapy import signals
from scrapy.exporters import CsvItemExporter
import inspect
from rt.items import *
from rt... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
2896,
500,
534,
2378,
31108,
994,
198,
2,
198,
2,
2094,
470,
6044,
284,
751,
534,
11523,
284,
262,
7283,
3620,
62,
47,
4061,
3698,
1268,
1546,
4634,
198,
2,
... | 2.825397 | 126 |
"""This module tests the board module."""
import pytest
from tictactoe.player import Player
from tictactoe.row import Row
from tictactoe.board import Board, cell_indices
| [
37811,
1212,
8265,
5254,
262,
3096,
8265,
526,
15931,
198,
11748,
12972,
9288,
198,
6738,
256,
713,
529,
2577,
13,
7829,
1330,
7853,
198,
6738,
256,
713,
529,
2577,
13,
808,
1330,
11314,
198,
6738,
256,
713,
529,
2577,
13,
3526,
1330,... | 3.469388 | 49 |
from django.conf import settings
from oscar.apps.order.abstract_models import AbstractOrder
from oscar.apps.order.models import *
| [
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
198,
6738,
267,
13034,
13,
18211,
13,
2875,
13,
397,
8709,
62,
27530,
1330,
27741,
18743,
628,
198,
198,
6738,
267,
13034,
13,
18211,
13,
2875,
13,
27530,
1330,
1635,
198
] | 3.435897 | 39 |
import requests
import urllib
import uuid
import importlib_metadata
import json
import base64
import logging
from collections import namedtuple, defaultdict, ChainMap
from typing import List
__all__ = [
'KafkaRestClient', 'KafkaRestClientException',
'TopicPartition', 'KafkaMessage'
]
log = logging.getLogger(... | [
11748,
7007,
198,
11748,
2956,
297,
571,
198,
11748,
334,
27112,
198,
11748,
1330,
8019,
62,
38993,
198,
11748,
33918,
198,
11748,
2779,
2414,
198,
11748,
18931,
198,
198,
6738,
17268,
1330,
3706,
83,
29291,
11,
4277,
11600,
11,
21853,
... | 2.086107 | 1,382 |
from django.test import TestCase
from authentication.models import User
from social.models import Posts, Followers, Board
from rest_framework import status
| [
6738,
42625,
14208,
13,
9288,
1330,
6208,
20448,
198,
6738,
18239,
13,
27530,
1330,
11787,
198,
6738,
1919,
13,
27530,
1330,
12043,
11,
7281,
364,
11,
5926,
198,
6738,
1334,
62,
30604,
1330,
3722,
198
] | 4.457143 | 35 |
#
# Copyright (c) 2016, Xerox Corporation (Xerox) and Palo Alto Research Center, Inc (PARC)
# 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 abo... | [
2,
198,
2,
15069,
357,
66,
8,
1584,
11,
44264,
1140,
10501,
357,
55,
263,
1140,
8,
290,
44878,
34317,
4992,
3337,
11,
3457,
357,
47,
25793,
8,
198,
2,
1439,
2489,
10395,
13,
198,
2,
198,
2,
2297,
396,
3890,
290,
779,
287,
2723,
... | 3.655629 | 1,057 |
from sqlalchemy import Boolean, Column, String
from app.models.base import BaseModel
| [
6738,
44161,
282,
26599,
1330,
41146,
11,
29201,
11,
10903,
198,
198,
6738,
598,
13,
27530,
13,
8692,
1330,
7308,
17633,
628
] | 3.954545 | 22 |
# Internationalization
# https://docs.djangoproject.com/en/3.0/topics/i18n/
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Configuración de formatos de fechas
DATETIME_INPUT_FORMATS = (
'%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59'
'%Y-%m-%d %H:%M:%S.%f', # '20... | [
198,
2,
4037,
1634,
198,
2,
3740,
1378,
31628,
13,
28241,
648,
404,
305,
752,
13,
785,
14,
268,
14,
18,
13,
15,
14,
4852,
873,
14,
72,
1507,
77,
14,
198,
198,
43,
15567,
52,
11879,
62,
34,
16820,
796,
705,
268,
12,
385,
6,
1... | 1.393555 | 1,024 |
#!/usr/bin/python
from argparse import ArgumentParser
from pathlib import Path
import subprocess
from getkey import getkey
from pymdownx import keys
# from https://gist.github.com/martin-ueding/4007035
class Colorcodes(object):
"""
Provides ANSI terminal color codes which are gathered via the ``tput``
uti... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
198,
6738,
1822,
29572,
1330,
45751,
46677,
198,
6738,
3108,
8019,
1330,
10644,
198,
11748,
850,
14681,
198,
6738,
651,
2539,
1330,
651,
2539,
198,
6738,
279,
4948,
2902,
87,
1330,
8251,
198,
... | 2.686469 | 303 |
from __future__ import print_function, division, absolute_import
import six
from ..config import config
from . import registry
DEFAULT_SCHEME = config.get('default-scheme', 'tcp')
def parse_address(addr, strict=False):
"""
Split address into its scheme and scheme-dependent location string.
>>> parse_... | [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
11,
7297,
11,
4112,
62,
11748,
198,
198,
11748,
2237,
198,
198,
6738,
11485,
11250,
1330,
4566,
198,
6738,
764,
1330,
20478,
628,
198,
7206,
38865,
62,
50,
3398,
3620,
36,
796,
4566,
13,
... | 2.473278 | 1,815 |
## the following massive function is deprecated
def generate_sensfunc_old(wave, counts, counts_ivar, airmass, exptime, spectrograph, telluric=False, star_type=None,
star_mag=None, ra=None, dec=None, std_file = None, BALM_MASK_WID=5., norder=4, nresln=None,debug=False):
""" Function to generat... | [
198,
2235,
262,
1708,
4858,
2163,
318,
39224,
198,
4299,
7716,
62,
82,
641,
20786,
62,
727,
7,
19204,
11,
9853,
11,
9853,
62,
452,
283,
11,
1633,
22208,
11,
409,
457,
524,
11,
5444,
3828,
1470,
11,
1560,
333,
291,
28,
25101,
11,
... | 2.175512 | 11,777 |
from argparse import ArgumentParser
import os
import re
from collections import defaultdict
import random
import spacy
nlp = spacy.load('en_core_web_sm')
target = DataFetcher()
def ArgParser():
'''
This is the function to parse your arguments into a more understable form and
provide relavant help w... | [
6738,
1822,
29572,
1330,
45751,
46677,
198,
11748,
28686,
198,
11748,
302,
198,
6738,
17268,
1330,
4277,
11600,
198,
11748,
4738,
198,
11748,
599,
1590,
198,
198,
21283,
79,
796,
599,
1590,
13,
2220,
10786,
268,
62,
7295,
62,
12384,
62,... | 2.53066 | 848 |
APPNAME = 'catcher-modules'
APPAUTHOR = 'Valerii Tikhonov, Ekaterina Belova'
APPVSN = '6.0.0'
| [
2969,
13137,
10067,
796,
705,
9246,
2044,
12,
18170,
6,
198,
2969,
4537,
24318,
1581,
796,
705,
7762,
263,
4178,
309,
13848,
261,
709,
11,
31873,
729,
1437,
3944,
10071,
6,
198,
24805,
53,
15571,
796,
705,
21,
13,
15,
13,
15,
6,
1... | 2.136364 | 44 |
from typing import Optional
from bxcommon.utils.alarm_queue import AlarmQueue
from bxutils import logging
logger = logging.get_logger(__name__)
| [
6738,
19720,
1330,
32233,
198,
198,
6738,
275,
87,
11321,
13,
26791,
13,
282,
1670,
62,
36560,
1330,
978,
1670,
34991,
198,
6738,
275,
87,
26791,
1330,
18931,
198,
198,
6404,
1362,
796,
18931,
13,
1136,
62,
6404,
1362,
7,
834,
3672,
... | 3.266667 | 45 |
import sys
sys.path.append("./AcademicDealerBackend/users")
from tests.py import CoreFunctionalTest
CoreFunctionalTest().test_core_functions()
| [
11748,
25064,
198,
17597,
13,
6978,
13,
33295,
7,
1911,
14,
12832,
49113,
45776,
263,
7282,
437,
14,
18417,
4943,
198,
6738,
5254,
13,
9078,
1330,
7231,
22203,
282,
14402,
198,
198,
14055,
22203,
282,
14402,
22446,
9288,
62,
7295,
62,
... | 3.222222 | 45 |
# RunSnakeRun
# https://pypi.python.org/pypi/RunSnakeRun
# http://www.vrplumber.com/programming/runsnakerun/ | [
2,
5660,
49795,
10987,
198,
2,
3740,
1378,
79,
4464,
72,
13,
29412,
13,
2398,
14,
79,
4464,
72,
14,
10987,
49795,
10987,
198,
2,
2638,
1378,
2503,
13,
37020,
489,
4494,
13,
785,
14,
23065,
2229,
14,
5143,
16184,
3110,
403,
14
] | 2.511628 | 43 |
# %%
from typing import List
from monty.serialization import loadfn
import dash
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output
from dash_mp_components import Simple3DScene
from pymatgen import Site
import crystal_toolkit # noqa: F401
from pymatgen.ana... | [
2,
43313,
198,
6738,
19720,
1330,
7343,
198,
6738,
40689,
88,
13,
46911,
1634,
1330,
3440,
22184,
198,
11748,
14470,
198,
11748,
14470,
62,
7295,
62,
5589,
3906,
355,
288,
535,
198,
11748,
14470,
62,
6494,
62,
5589,
3906,
355,
27711,
... | 2.386414 | 898 |
"""
Configuration for pytest fixtures
"""
import boto3 # type: ignore
import pytest # type: ignore
from chalice import Chalice # type: ignore
from moto import mock_ssm # type: ignore
@pytest.fixture
def app() -> Chalice:
"""Return the application for testing"""
from app import app as chalice_app # pylin... | [
37811,
198,
38149,
329,
12972,
9288,
34609,
198,
37811,
198,
198,
11748,
275,
2069,
18,
220,
1303,
2099,
25,
8856,
198,
11748,
12972,
9288,
220,
1303,
2099,
25,
8856,
198,
6738,
442,
282,
501,
1330,
30529,
501,
220,
1303,
2099,
25,
88... | 2.679775 | 356 |
"""Test param_distribution.py"""
| [
37811,
14402,
5772,
62,
17080,
3890,
13,
9078,
37811,
198
] | 3.3 | 10 |
from a10sdk.common.A10BaseClass import A10BaseClass
class AvpList(A10BaseClass):
"""This class does not support CRUD Operations please use parent.
:param int32: {"description": "32 bits integer", "format": "number", "not-list": ["int64", "string"], "maximum": 2147483647, "minimum": 0, "type": "number"}
... | [
6738,
257,
940,
21282,
74,
13,
11321,
13,
32,
940,
14881,
9487,
1330,
317,
940,
14881,
9487,
628,
198,
4871,
5184,
79,
8053,
7,
32,
940,
14881,
9487,
2599,
198,
220,
220,
220,
220,
198,
220,
220,
220,
37227,
1212,
1398,
857,
407,
... | 3.087222 | 1,800 |
import os
import os.path
import sys
import json
import threading
import queue
import uuid
import alembic
import alembic.config
from appdirs import user_data_dir
from . import helper
from dexbot import APP_NAME, AUTHOR
from sqlalchemy import create_engine, Column, String, Integer, Float, Boolean
from sqlalchemy.ext.d... | [
11748,
28686,
198,
11748,
28686,
13,
6978,
198,
11748,
25064,
198,
11748,
33918,
198,
11748,
4704,
278,
198,
11748,
16834,
198,
11748,
334,
27112,
198,
11748,
31341,
2022,
291,
198,
11748,
31341,
2022,
291,
13,
11250,
198,
198,
6738,
598,... | 2.456186 | 2,716 |
from tcutils.util import *
from vnc_api.vnc_api import *
import vnc_api_test
class BDFixture(vnc_api_test.VncLibFixture):
'''
Bridge Domain Fixture
'''
def create_bd(self):
'''
Creates a bridge domain
'''
self.bd_obj = BridgeDomain(name=self.bd_name,
... | [
6738,
256,
8968,
4487,
13,
22602,
1330,
1635,
198,
6738,
410,
10782,
62,
15042,
13,
85,
10782,
62,
15042,
1330,
1635,
198,
11748,
410,
10782,
62,
15042,
62,
9288,
198,
198,
4871,
347,
8068,
9602,
7,
85,
10782,
62,
15042,
62,
9288,
1... | 1.894121 | 6,498 |
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
4818,
8079,
198,
6738,
5366,
13,
9945,
1330,
20613,
198,
6738,
5366,
13,
85,
17,
1330,
10011,
2611,
44,
4254,
198,
6738,
42625,
14208,
13,
9945,
1330,
4981,
198
] | 2.954545 | 44 |
# 094
# Display an array of five numbers. Ask the user to select one
# of the numbers. Once they have selected a number, display the
# position of that item in the array. If they enter something that
# is not in the array, ask them to try again until they select
# a relevant item.
import array as ar
import numpy as np... | [
2,
657,
5824,
198,
2,
16531,
281,
7177,
286,
1936,
3146,
13,
16981,
262,
2836,
284,
2922,
530,
198,
2,
286,
262,
3146,
13,
4874,
484,
423,
6163,
257,
1271,
11,
3359,
262,
198,
2,
2292,
286,
326,
2378,
287,
262,
7177,
13,
1002,
4... | 2.372176 | 841 |
import math
co = float(input('Comprimento do cateto oposto: '))
ca = float(input('Comprimento do cateto adjacente: '))
hi = math.hypot(co, ca)
print('A hipotenusa vai medir {:.2f}'.format(hi))
'''hi = (co ** 2 + ca ** 2) **(1/2)
print('A hipotenusa vai medir {:.2f}'.format(hi))''' '''Usando matematicamente sem precisa... | [
11748,
10688,
198,
1073,
796,
12178,
7,
15414,
10786,
5377,
1050,
3681,
78,
466,
3797,
27206,
1034,
455,
78,
25,
705,
4008,
198,
6888,
796,
12178,
7,
15414,
10786,
5377,
1050,
3681,
78,
466,
3797,
27206,
15909,
68,
25,
705,
4008,
198,... | 2.42029 | 138 |
# (C) Copyright 2016 Hewlett Packard Enterprise Development Company LP
# Copyright 2017 Fujitsu LIMITED
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/L... | [
2,
357,
34,
8,
15069,
1584,
30446,
15503,
6400,
446,
14973,
7712,
5834,
18470,
198,
2,
15069,
2177,
32671,
19831,
40880,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
34... | 3.109195 | 696 |
from typing import List, Union
from ..base import BaseText2Vec
from ....base import catch_vector_errors
from ....doc_utils import ModelDefinition
from ....import_utils import *
from ....models_dict import MODEL_REQUIREMENTS
from datetime import date
if is_all_dependency_installed(MODEL_REQUIREMENTS['encoders-text-torch... | [
6738,
19720,
1330,
7343,
11,
4479,
198,
6738,
11485,
8692,
1330,
7308,
8206,
17,
53,
721,
198,
6738,
19424,
8692,
1330,
4929,
62,
31364,
62,
48277,
198,
6738,
19424,
15390,
62,
26791,
1330,
9104,
36621,
198,
6738,
19424,
11748,
62,
2679... | 3.620513 | 585 |
# -*- coding: utf-8 -*-
# Copyright 2017 Vector Creations 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 applica... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
15069,
2177,
20650,
5844,
602,
12052,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
... | 2.759531 | 341 |
import requests
import pandas as pd
import time
class AlpacaNewsRetriever:
"""
Class for getting historical news from Alpaca
__init__():
API_ID: your Alpaca ID
API_KEY: your Alpaca secret key
get_news():
symbol: Ticker of the stock. e.g. AAPL
start: start timestamp in ... | [
11748,
7007,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
640,
628,
198,
4871,
978,
79,
22260,
9980,
9781,
380,
964,
25,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
5016,
329,
1972,
6754,
1705,
422,
978,
79,
22260,
198,
220,... | 2.336 | 375 |
import contextlib
import concurrent.futures
import os
import sys
import traceback
import typing
import itertools
from conducto.shared import (
async_utils,
client_utils,
types as t,
log,
)
import conducto
from . import dockerfile as dockerfile_mod, names
from conducto.shared import constants, imagepa... | [
11748,
4732,
8019,
198,
11748,
24580,
13,
69,
315,
942,
198,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
12854,
1891,
198,
11748,
19720,
198,
11748,
340,
861,
10141,
198,
198,
6738,
3189,
78,
13,
28710,
1330,
357,
198,
220,
220,
... | 2.935696 | 2,286 |
"""
Quick lambda creator, useful for use in fmap, filter, etc.
e.g. List([1,2]).fmap(x + 1)
"""
from doufo import WrappedFunction, identity, Functor, FunctorArithmeticMixin
import operator
__all__ = ['QuickLambda', 'x']
class QuickLambda(WrappedFunction, FunctorArithmeticMixin):
"""
QuickLambda constructor.... | [
37811,
198,
21063,
37456,
13172,
11,
4465,
329,
779,
287,
277,
8899,
11,
8106,
11,
3503,
13,
198,
198,
68,
13,
70,
13,
7343,
26933,
16,
11,
17,
35944,
69,
8899,
7,
87,
1343,
352,
8,
198,
37811,
198,
6738,
2255,
6513,
1330,
27323,
... | 2.789063 | 128 |
"""A simple plugin manager. Rolling my own for three reasons:
1) Environmental scan did not give me quite what I wanted.
2) The super simple examples didn't support automatic/dynamic loading.
3) I kinda wanted to understand the process :)
"""
import os, sys
from datetime import datetime
import dir_watcher
imp... | [
37811,
32,
2829,
13877,
4706,
13,
21567,
616,
898,
329,
1115,
3840,
25,
198,
220,
220,
352,
8,
13272,
9367,
750,
407,
1577,
502,
2407,
644,
314,
2227,
13,
198,
220,
220,
362,
8,
383,
2208,
2829,
6096,
1422,
470,
1104,
11353,
14,
6... | 2.346487 | 3,345 |
import os
from subprocess import call
from mycroft import MycroftSkill
from .badge import MQTT_Client
from .util import wrap_text
class SwagBadge(MycroftSkill):
"""Provide interaction between Mycroft and a Swag Badge.
For more details on the Swag Badge from LinuxConfAu 2021 see:
http://www.openhardwareco... | [
11748,
28686,
198,
6738,
850,
14681,
1330,
869,
198,
6738,
616,
36714,
1330,
2011,
36714,
35040,
198,
6738,
764,
14774,
469,
1330,
337,
48,
15751,
62,
11792,
198,
6738,
764,
22602,
1330,
14441,
62,
5239,
628,
198,
4871,
2451,
363,
22069... | 2.272864 | 667 |
# -*- coding: utf-8 -*-
from __future__ import division
'''
Copyright © 2014 by Virginia Polytechnic Institute and State University
All rights reserved
Virginia Polytechnic Institute and State University (Virginia Tech) owns the copyright for the BEMOSS software and its
associated documentation (“Software”) and retain... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
11593,
37443,
834,
1330,
7297,
198,
7061,
6,
198,
15269,
10673,
1946,
416,
6025,
12280,
23873,
291,
5136,
290,
1812,
2059,
198,
3237,
2489,
10395,
198,
198,
41017,
... | 3.783245 | 752 |
# Generated by Django 2.0.3 on 2018-03-23 03:23
from django.db import migrations, models
import django.db.models.deletion
| [
2,
2980,
515,
416,
37770,
362,
13,
15,
13,
18,
319,
2864,
12,
3070,
12,
1954,
7643,
25,
1954,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
14208,
13,
9945,
13,
27530,
13,
2934,
1616,
295,
... | 2.818182 | 44 |
import numpy as np
import torch.nn as nn
import torch
from dense_layer import DenseLayer
from fused_bias_activation import FusedBiasActivation
from base_layer import BaseLayer
from tensorboard_logger import TensorboardLogger
| [
11748,
299,
32152,
355,
45941,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
28034,
198,
6738,
15715,
62,
29289,
1330,
360,
1072,
49925,
198,
6738,
43954,
62,
65,
4448,
62,
48545,
1330,
376,
1484,
33,
4448,
25526,
341,
198,
... | 3.53125 | 64 |
expected_output = {
'vrf': {
'default': {
'local_ldp_identifier': {
'10.52.31.247:0': {
'discovery_sources': {
'interfaces': {
'TenGigE0/0/0/5.2097': {
'ldp_id': {
... | [
198,
40319,
62,
22915,
796,
1391,
198,
220,
220,
220,
705,
37020,
69,
10354,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
705,
12286,
10354,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
12001,
62,
335,
7... | 1.27611 | 833 |
import requests
import json
from datetime import datetime
from cad_tickers.exchanges.tsx.gql_data import GQL
from typing import Union
def get_ticker_filings(
symbol: str,
fromDate: str = datetime.today().replace(day=1).strftime("%Y-%m-%d"),
toDate: str = datetime.today().strftime("%Y-%m-%d"),
limit: i... | [
11748,
7007,
198,
11748,
33918,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
20603,
62,
83,
21630,
13,
1069,
36653,
13,
912,
87,
13,
70,
13976,
62,
7890,
1330,
402,
9711,
198,
6738,
19720,
1330,
4479,
628,
198,
4299,
651,
62,
... | 2.148065 | 1,344 |
from os.path import dirname, join
import json
| [
6738,
28686,
13,
6978,
1330,
26672,
3672,
11,
4654,
198,
11748,
33918,
198
] | 3.538462 | 13 |
from django.db import models
# Create your models here.
| [
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
198,
2,
13610,
534,
4981,
994,
13,
198
] | 3.5625 | 16 |
import os, sys
import numpy as np
import time
import math
from scipy.spatial.transform import Rotation as R
from skyfield.api import load,Topos
from skyfield.earthlib import terra, reverse_terra
from timeout import timeout, TimeoutError
timeout_time = int(os.getenv("TIMEOUT",60))
speed_of_light_km_ns = 0.000299792
a... | [
11748,
28686,
11,
25064,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
640,
198,
11748,
10688,
198,
6738,
629,
541,
88,
13,
2777,
34961,
13,
35636,
1330,
371,
14221,
355,
371,
198,
6738,
6766,
3245,
13,
15042,
1330,
3440,
11,
9126,
... | 2.163565 | 1,021 |
import os
| [
11748,
28686,
198
] | 3.333333 | 3 |
"""Hardware Backend for the SR V4 power board."""
import struct
from datetime import timedelta
from time import sleep
from typing import Callable, Dict, Mapping, Set, cast
import usb
from j5.backends.hardware.env import NotSupportedByHardwareError
from j5.backends.hardware.j5.raw_usb import (
RawUSBHardwareBacke... | [
37811,
49865,
5157,
437,
329,
262,
16808,
569,
19,
1176,
3096,
526,
15931,
198,
198,
11748,
2878,
198,
6738,
4818,
8079,
1330,
28805,
12514,
198,
6738,
640,
1330,
3993,
198,
6738,
19720,
1330,
4889,
540,
11,
360,
713,
11,
337,
5912,
1... | 2.433155 | 2,805 |
"""Load a PEP 517 backend from inside the source tree.
"""
from contextlib import contextmanager
import importlib
import os
import pytoml
import sys
__version__ = '1.0'
@contextmanager
loader = HooksLoader(os.path.realpath(os.getcwd()))
| [
37811,
8912,
257,
350,
8905,
642,
1558,
30203,
422,
2641,
262,
2723,
5509,
13,
198,
37811,
198,
6738,
4732,
8019,
1330,
4732,
37153,
198,
11748,
1330,
8019,
198,
11748,
28686,
198,
11748,
12972,
39532,
75,
198,
11748,
25064,
198,
198,
8... | 3.116883 | 77 |
from transformers import (
BertConfig,
BertForSequenceClassification,
BertTokenizer,
DistilBertConfig,
DistilBertForSequenceClassification,
DistilBertTokenizer,
RobertaConfig,
RobertaForSequenceClassification,
RobertaTokenizer,
XLMConfig,
XLMForSequenceClassification,
XLM... | [
6738,
6121,
364,
1330,
357,
198,
220,
220,
220,
22108,
16934,
11,
198,
220,
220,
220,
22108,
1890,
44015,
594,
9487,
2649,
11,
198,
220,
220,
220,
22108,
30642,
7509,
11,
198,
220,
220,
220,
4307,
346,
33,
861,
16934,
11,
198,
220,
... | 2.722581 | 310 |
from .cache import Cache
from .cached import cached
__all__ = (
"Cache",
"cached",
)
| [
6738,
764,
23870,
1330,
34088,
198,
6738,
764,
66,
2317,
1330,
39986,
628,
198,
834,
439,
834,
796,
357,
198,
220,
220,
220,
366,
30562,
1600,
198,
220,
220,
220,
366,
66,
2317,
1600,
198,
8,
198
] | 2.567568 | 37 |
# coding=utf-8
from PyQt4.QtGui import *
from PyQt4.QtCore import *
from c.error import Error
from v.ui_lic_eliminar import Ui_Lic_Eliminar
| [
2,
19617,
28,
40477,
12,
23,
198,
6738,
9485,
48,
83,
19,
13,
48,
83,
8205,
72,
1330,
1635,
198,
6738,
9485,
48,
83,
19,
13,
48,
83,
14055,
1330,
1635,
198,
198,
6738,
269,
13,
18224,
1330,
13047,
198,
6738,
410,
13,
9019,
62,
... | 2.285714 | 63 |
import numpy as np
import matplotlib.pyplot as plt
from scipy.stats import norm
from quantecon import LinearStateSpace
phi_1, phi_2, phi_3, phi_4 = 0.5, -0.2, 0, 0.5
sigma = 0.1
A = [[phi_1, phi_2, phi_3, phi_4],
[1, 0, 0, 0],
[0, 1, 0, 0],
[0, 0, 1, 0]]
C = [[sigma]... | [
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
6738,
629,
541,
88,
13,
34242,
1330,
2593,
198,
6738,
5554,
721,
261,
1330,
44800,
9012,
14106,
198,
198,
34846,
62,
16,
11,
872,
72,
... | 1.868644 | 472 |
#!/usr/bin/env python2
import math
import parser as pr
while True:
print("\n CALCULATOR MENU")
print("1 for addition :")
print("2 for subtraction :")
print('3 for multiplication :')
print("4 for raise to power:")
print("5 for Division:")
print("6 for floor division:")
print("7 for facto... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
17,
198,
11748,
10688,
198,
11748,
30751,
355,
778,
198,
198,
4514,
6407,
25,
198,
220,
220,
220,
3601,
7203,
59,
77,
33290,
34,
6239,
25633,
41597,
52,
4943,
198,
220,
220,
220,
3601,
72... | 2.238227 | 361 |
from datetime import datetime
from collections import defaultdict
import bisect
import numpy as np
import pandas as pd
from .core import new_dd_object, Series
from ..array.core import Array
from .utils import is_index_like, meta_nonempty
from . import methods
from ..base import tokenize
from ..highlevelgraph import H... | [
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
17268,
1330,
4277,
11600,
198,
198,
11748,
47457,
478,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
198,
6738,
764,
7295,
1330,
649,
62,
1860,
62,
15252,
... | 2.380058 | 2,076 |
import numpy as np
import chainer
import chainer.functions as F
import chainer.links as L
| [
11748,
299,
32152,
355,
45941,
198,
11748,
6333,
263,
198,
11748,
6333,
263,
13,
12543,
2733,
355,
376,
198,
11748,
6333,
263,
13,
28751,
355,
406,
628,
628,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220
] | 2.547619 | 42 |
from packaging.version import Version
__credits__ = ["very1fake"]
__license__ = "MIT/Apache-2.0"
__version__ = "1.0.6"
__maintainer__ = "very1fake"
version = Version(__version__)
| [
6738,
16846,
13,
9641,
1330,
10628,
198,
198,
834,
66,
20696,
834,
796,
14631,
548,
16,
30706,
8973,
198,
198,
834,
43085,
834,
796,
366,
36393,
14,
25189,
4891,
12,
17,
13,
15,
1,
198,
834,
9641,
834,
796,
366,
16,
13,
15,
13,
... | 2.637681 | 69 |
# Returns k number of words sorted on their occurrence
if __name__ == '__main__':
inpt = input('Enter space seperated words: ').split()
k = int(
input(
'Enter the amount of words to retreive based on their occurance: ')
)
print(top_k_frequent_words(inpt, k))
| [
2,
16409,
479,
1271,
286,
2456,
23243,
319,
511,
19810,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
287,
457,
796,
5128,
10786,
17469,
2272,
384,
525,
515,
2456,
25,
705,
737,
35312,
3419,
... | 2.560345 | 116 |
# Generated by Django 3.2.5 on 2021-09-03 12:56
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
17,
13,
20,
319,
33448,
12,
2931,
12,
3070,
1105,
25,
3980,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
from crypto_address_validator.validators import default_validator
from crypto_address_validator.validators import atom_validator
from crypto_address_validator.validators import bnb_validator
from crypto_address_validator.validators import aion_validator
from crypto_address_validator.validators import eos_validator
from... | [
6738,
21473,
62,
21975,
62,
12102,
1352,
13,
12102,
2024,
1330,
4277,
62,
12102,
1352,
198,
6738,
21473,
62,
21975,
62,
12102,
1352,
13,
12102,
2024,
1330,
22037,
62,
12102,
1352,
198,
6738,
21473,
62,
21975,
62,
12102,
1352,
13,
12102,... | 2.853933 | 445 |
"""Based on which facebook groups have shared the fake news
published by specific domain names,
this script will generate a bipartite graph
with the facebook groups and the domain names"""
import pandas as pd
import numpy as np
import matplotlib as mpl
import networkx as nx
from networkx.algorithms import bipartite
i... | [
37811,
15001,
319,
543,
23960,
2628,
423,
4888,
262,
8390,
1705,
198,
30271,
416,
2176,
7386,
3891,
11,
198,
5661,
4226,
481,
7716,
257,
14141,
433,
578,
4823,
220,
198,
4480,
262,
23960,
2628,
290,
262,
7386,
3891,
37811,
198,
198,
1... | 2.312088 | 2,730 |
# -*- coding: utf-8 -*- #
# Copyright 2017 Google LLC. 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 requir... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
1303,
198,
2,
15069,
2177,
3012,
11419,
13,
1439,
6923,
33876,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,... | 2.815277 | 3,286 |
# created by Angus Clark 9/2/17 updated 27/2/17
# ToDo impliment traceroute function into this
# Perhaps get rid of unnecessary itemediate temp file
import socket
import os
import json
import my_traceroute
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
host = '130.56.253.43'
#print host
port = 5201 # Change ... | [
2,
2727,
416,
41182,
11264,
860,
14,
17,
14,
1558,
6153,
2681,
14,
17,
14,
1558,
198,
2,
1675,
5211,
4114,
3681,
491,
11736,
13192,
2163,
656,
428,
220,
198,
2,
8673,
651,
5755,
286,
13114,
2378,
276,
9386,
20218,
2393,
198,
198,
... | 2.310298 | 738 |
import numpy as np
import faiss
| [
11748,
299,
32152,
355,
45941,
198,
11748,
24685,
747,
628
] | 3.3 | 10 |
import asyncio
import base64
import datetime
import hashlib
import json
import os
import smopy
import traceback
from json import JSONDecodeError
from uuid import uuid4
import bcrypt
import peewee
from PIL import Image, ImageDraw
from peewee import (
Model,
CharField,
TextField,
IntegerField,
Foreig... | [
11748,
30351,
952,
198,
11748,
2779,
2414,
198,
11748,
4818,
8079,
198,
11748,
12234,
8019,
198,
11748,
33918,
198,
11748,
28686,
198,
11748,
895,
11081,
198,
11748,
12854,
1891,
198,
6738,
33918,
1330,
19449,
10707,
1098,
12331,
198,
6738,... | 2.738636 | 264 |
import unittest
import torch
import gqnlib
if __name__ == "__main__":
unittest.main()
| [
198,
11748,
555,
715,
395,
198,
198,
11748,
28034,
198,
198,
11748,
308,
80,
77,
8019,
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.4 | 40 |
#!/usr/bin/env python
from get_listed_companies import get_listed_companies_from_cache
import tldextract
if __name__ == '__main__':
run_scan('helsinki', True)
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
6738,
651,
62,
17935,
62,
34390,
444,
1330,
651,
62,
17935,
62,
34390,
444,
62,
6738,
62,
23870,
198,
11748,
256,
335,
2302,
974,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834... | 2.6 | 65 |
# -*- coding: utf-8 -*-
"""
Created on 2018/12/27 11:32 AM
---------
@summary: 账号昂贵、限制查询次数及使用时间的用户UserPool
---------
@author: Boris
@email: boris_liu@foxmail.com
"""
import os
import random
import time
from enum import Enum, unique
from typing import Optional, List
from feapder import setting
from feapder.db.redisdb... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
2864,
14,
1065,
14,
1983,
1367,
25,
2624,
3001,
198,
45537,
198,
31,
49736,
25,
5525,
112,
99,
20998,
115,
23626,
224,
164,
112,
113,
23513,
16... | 1.55163 | 2,915 |
"""Test kytos.core.events module."""
from unittest import TestCase
from kytos.core.events import KytosEvent
class TestKytosEvent(TestCase):
"""KytosEvent tests."""
def setUp(self):
"""Instantiate a KytosEvent."""
self.event = KytosEvent('kytos/core.any')
def test__str__(self):
"... | [
37811,
14402,
479,
20760,
418,
13,
7295,
13,
31534,
8265,
526,
15931,
198,
6738,
555,
715,
395,
1330,
6208,
20448,
198,
198,
6738,
479,
20760,
418,
13,
7295,
13,
31534,
1330,
11118,
83,
418,
9237,
628,
198,
4871,
6208,
42,
20760,
418,... | 2.269173 | 665 |
#Get sentence from user
sentence = input('Enter the sentence you want to translate : ').strip().lower()
#Spliting sentence into words
words = sentence.split()
#Converting words to pig latin
latin_words = []
for word in words :
if word[0] in "aeiou" :
latin_word = word + 'yay'
latin_wo... | [
2,
3855,
6827,
422,
2836,
201,
198,
34086,
594,
796,
5128,
10786,
17469,
262,
6827,
345,
765,
284,
15772,
1058,
705,
737,
36311,
22446,
21037,
3419,
201,
198,
201,
198,
2,
26568,
1780,
6827,
656,
2456,
201,
198,
10879,
796,
6827,
13,
... | 2.109043 | 376 |
"""Tests for models.Users.
Copyright (c) 2016-present, Facebook, Inc.
All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree. An additional grant
of patent rights can be found in the PATENTS file in the same directory.
"""
fro... | [
37811,
51,
3558,
329,
4981,
13,
14490,
13,
198,
198,
15269,
357,
66,
8,
1584,
12,
25579,
11,
3203,
11,
3457,
13,
198,
3237,
2489,
10395,
13,
198,
198,
1212,
2723,
2438,
318,
11971,
739,
262,
347,
10305,
12,
7635,
5964,
1043,
287,
... | 3.015576 | 321 |
"""
import os
print(os.getcwd())
"""
#OR#
from time import *
from os import *
print(getcwd())
print(name) ## OS name
print(path.abspath('.'))
print(listdir('.'))
mkdir("india") ## making directory
sleep(2)
rename("india","india2") ## renaming directory
sleep(2)
rmdir("india2") ## removing directory
| [
37811,
198,
11748,
28686,
198,
4798,
7,
418,
13,
1136,
66,
16993,
28955,
198,
37811,
198,
220,
220,
220,
1303,
1581,
2,
198,
6738,
640,
1330,
1635,
198,
6738,
28686,
1330,
1635,
198,
4798,
7,
1136,
66,
16993,
28955,
198,
4798,
7,
36... | 2.666667 | 114 |
import time
from pyresparser import ResumeParser
import os
from scripts.whatsapp import WhatsApp
# spacy.load('en_core_web_sm')
| [
198,
11748,
640,
198,
6738,
12972,
4363,
28198,
1330,
1874,
2454,
46677,
198,
11748,
28686,
198,
6738,
14750,
13,
1929,
1381,
1324,
1330,
37666,
198,
2,
599,
1590,
13,
2220,
10786,
268,
62,
7295,
62,
12384,
62,
5796,
11537,
628,
628,
... | 3.190476 | 42 |
import os
from math import log10
from multiprocessing import cpu_count
from typing import Dict, Any, Tuple, Union
import arrow
import click
from numpy import ndarray
import jesse.helpers as jh
import jesse.services.required_candles as required_candles
from jesse import exceptions
from jesse.config import config
from ... | [
11748,
28686,
198,
6738,
10688,
1330,
2604,
940,
198,
6738,
18540,
305,
919,
278,
1330,
42804,
62,
9127,
198,
6738,
19720,
1330,
360,
713,
11,
4377,
11,
309,
29291,
11,
4479,
198,
198,
11748,
15452,
198,
11748,
3904,
198,
6738,
299,
3... | 3.434066 | 182 |
import pytest
from http_basic_auth import parse_header, generate_header, BasicAuthException
@pytest.mark.parametrize("token,expect", [
('Basic dGVzdDpzZWNyZXQ=', ('test', 'secret')),
('BASIC dGVzdDpzZWNyZXQx', ('test', 'secret1')),
('BaSiC dGVzdDpzZWM6cmV0MQ==', ('test', 'sec:ret1')),
('Basic \t b... | [
11748,
12972,
9288,
198,
198,
6738,
2638,
62,
35487,
62,
18439,
1330,
21136,
62,
25677,
11,
7716,
62,
25677,
11,
14392,
30515,
16922,
628,
198,
31,
9078,
9288,
13,
4102,
13,
17143,
316,
380,
2736,
7203,
30001,
11,
1069,
806,
1600,
685... | 1.786834 | 638 |
__author__ = 'nicole'
| [
834,
9800,
834,
796,
705,
6988,
2305,
6,
198
] | 2.444444 | 9 |
import discord
import importlib
from discord.ext import commands
channels = [725776681159098408, 728691486115233804, 738967638964830341, 725566843766571112, 732288159060328529, 739199815627440232, 730887667491012720, 729753696199508088]
client = MyClient()
client.run('YourTokenHere')
| [
11748,
36446,
198,
11748,
1330,
8019,
198,
198,
6738,
36446,
13,
2302,
1330,
9729,
198,
198,
354,
8961,
796,
685,
45151,
3324,
35809,
1157,
3270,
2931,
23,
26200,
11,
767,
2078,
3388,
1415,
4521,
15363,
1954,
23734,
19,
11,
767,
29769,
... | 2.618182 | 110 |
"""
file : graph.py
author(s) : Thomas LINTANF, Laurent CALYDON
Version : 6.0
Definition de la classe Graph qui permet de stocker un graph orienté et de lui
appliquer différents algorithmes.
"""
import csv
import logging as log
class Graph:
"""
classe Graph : représente un graphe ori... | [
37811,
198,
220,
220,
220,
2393,
1058,
4823,
13,
9078,
198,
220,
220,
220,
1772,
7,
82,
8,
1058,
5658,
406,
12394,
1565,
37,
11,
39734,
33290,
35755,
1340,
198,
220,
220,
220,
10628,
1058,
718,
13,
15,
628,
220,
220,
220,
30396,
3... | 1.87034 | 7,913 |
#EJEMPLO DE BLINKING CON RASPBERRY PI
#Escrito por Gl4r3
import RPi.GPIO as GPIO #importamos la libreria y cambiamos su nombre por "GPIO"
import time #necesario para los delays
#establecemos el sistema de numeracion que queramos, en mi caso BCM
GPIO.setmode(GPIO.BCM)
#configuramos el pin GPIO17 como una salida
GPIO... | [
2,
36,
41,
3620,
6489,
46,
5550,
9878,
17248,
2751,
7102,
371,
1921,
47,
13246,
18276,
30434,
198,
2,
47051,
39834,
16964,
2671,
19,
81,
18,
198,
11748,
25812,
72,
13,
16960,
9399,
355,
50143,
1303,
11748,
321,
418,
8591,
9195,
260,
... | 2.344398 | 241 |
# coding: utf-8
"""
Blog Post endpoints
\"Use these endpoints for interacting with Blog Posts, Blog Authors, and Blog Tags\" # noqa: E501
The version of the OpenAPI document: v3
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from hubspot.cms.blo... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
37811,
198,
220,
220,
220,
14001,
2947,
886,
13033,
628,
220,
220,
220,
19990,
11041,
777,
886,
13033,
329,
24986,
351,
14001,
12043,
11,
14001,
46665,
11,
290,
14001,
44789,
7879,
220,
1303,
... | 2.236079 | 5,244 |
import urllib2
# Base class for image finders.
# This method must be implemented in the derived class.
# Download the file at the specified URL and save it.
if __name__ == "__main__":
f = find_image(["mountain", "alps"])
download_image(f, "mount.jpg")
| [
11748,
2956,
297,
571,
17,
198,
198,
2,
7308,
1398,
329,
2939,
1064,
364,
13,
198,
220,
220,
220,
1303,
770,
2446,
1276,
307,
9177,
287,
262,
10944,
1398,
13,
628,
220,
220,
220,
1303,
10472,
262,
2393,
379,
262,
7368,
10289,
290,
... | 2.913978 | 93 |
from .address import Address
from .calculator_result import CalculatorResult
from .reference_city import ReferenceCity | [
6738,
764,
21975,
1330,
17917,
198,
6738,
764,
9948,
3129,
1352,
62,
20274,
1330,
43597,
23004,
198,
6738,
764,
35790,
62,
19205,
1330,
20984,
14941
] | 4.72 | 25 |
# Modification 2020 RangiLyu
# Copyright 2018-2019 Open-MMLab.
# 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 applicabl... | [
2,
3401,
2649,
12131,
371,
648,
72,
43,
24767,
198,
2,
15069,
2864,
12,
23344,
4946,
12,
44,
5805,
397,
13,
198,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
... | 2.780899 | 534 |
import typing
from collections import Counter
import numpy as np
from pytest import approx
from zero_play.connect4.game import Connect4State
from zero_play.game_state import GameState
from zero_play.heuristic import Heuristic
from zero_play.mcts_player import SearchNode, MctsPlayer, SearchManager
from zero_play.playo... | [
11748,
19720,
198,
6738,
17268,
1330,
15034,
198,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
12972,
9288,
1330,
5561,
198,
198,
6738,
6632,
62,
1759,
13,
8443,
19,
13,
6057,
1330,
8113,
19,
9012,
198,
6738,
6632,
62,
1759,
13,
605... | 2.673777 | 797 |
import unittest
import moddb
from test.test_config import username, password
| [
11748,
555,
715,
395,
198,
11748,
953,
9945,
198,
198,
6738,
1332,
13,
9288,
62,
11250,
1330,
20579,
11,
9206,
198
] | 3.714286 | 21 |
#!/usr/bin/env python3
# SPDX-FileCopyrightText: 2020 Nathaniel Fitzenrider <https://github.com/nfitzen>
#
# SPDX-License-Identifier: CC0-1.0
import itertools
from typing import List
from copy import deepcopy
with open('input.txt') as f:
data = list(list(s.strip()) for s in f.readlines())
def update(state: List[... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
30628,
55,
12,
8979,
15269,
8206,
25,
12131,
49536,
16703,
268,
49449,
1279,
5450,
1378,
12567,
13,
785,
14,
77,
69,
4224,
268,
29,
198,
2,
198,
2,
30628,
55,
12,
34156,
12,... | 2.013223 | 605 |
from MultVAE_Dataset import *
from MultVAE_model import *
from torch import nn
from torch.utils.data import DataLoader
from datetime import datetime
import argparse
from scipy import sparse
import numpy as np
import mlflow.pytorch
| [
6738,
7854,
11731,
36,
62,
27354,
292,
316,
1330,
1635,
198,
6738,
7854,
11731,
36,
62,
19849,
1330,
1635,
198,
6738,
28034,
1330,
299,
77,
198,
6738,
28034,
13,
26791,
13,
7890,
1330,
6060,
17401,
198,
6738,
4818,
8079,
1330,
4818,
8... | 3.362319 | 69 |
from threading import Lock
_name_spaces = {
'': UniqueIDGenerator(),
'nodes': UniqueIDGenerator(),
'view_runtimes': UniqueIDGenerator(),
}
| [
6738,
4704,
278,
1330,
13656,
628,
198,
198,
62,
3672,
62,
2777,
2114,
796,
1391,
198,
220,
220,
220,
10148,
25,
30015,
2389,
8645,
1352,
22784,
198,
220,
220,
220,
705,
77,
4147,
10354,
30015,
2389,
8645,
1352,
22784,
198,
220,
220,
... | 2.672414 | 58 |