content stringlengths 1 1.05M | input_ids listlengths 1 883k | ratio_char_token float64 1 22.9 | token_count int64 1 883k |
|---|---|---|---|
# my_script.py
import pandas
from my_lambdata.my_mod import enlarge
print('HAPPY TUESDAY NIGHT')
df = pandas.DataFrame({'x': [1, 2, 3], 'y': [4, 5, 6]})
print(df.head())
x = 5
print("ENLARGE", x, "TO", enlarge(x)) | [
198,
2,
616,
62,
12048,
13,
9078,
198,
198,
11748,
19798,
292,
198,
198,
6738,
616,
62,
2543,
65,
7890,
13,
1820,
62,
4666,
1330,
27475,
628,
198,
4798,
10786,
39,
24805,
56,
309,
35409,
26442,
37707,
11537,
198,
198,
7568,
796,
197... | 2.244898 | 98 |
#!/usr/bin/env python
import matplotlib.pyplot as plt
import numpy as np
from scipy.integrate import simps
from scipy.optimize import curve_fit
x = [ 1., 1.5, 2., 2.5, 3., 3.5, 4., 4.5, 5., 5.5, 6., 6.5, 7., 7.5, 8., 8.5, 9., 9.5, 10. ]
y = [3.43, 4.94, 6.45, 9.22, 6.32, 6.11, 4.63, 8.95, 7.8, ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
629,
541,
88,
13,
18908,
4873,
1330,
985,
862,
198,
6738,
629,
541,
88,
13,
40... | 1.783158 | 475 |
import time
import sys
sys.path.append("/home/ubuntu/quokka/pyquokka")
import pyarrow.compute as compute
import pyarrow as pa
import pandas as pd
from pyquokka.quokka_runtime import TaskGraph
from pyquokka.dataset import InputS3CSVDataset
from pyquokka.executors import UDFExecutor, AggExecutor
import ray
from pyquokka.... | [
11748,
640,
198,
11748,
25064,
198,
17597,
13,
6978,
13,
33295,
7203,
14,
11195,
14,
32230,
14,
421,
482,
4914,
14,
9078,
421,
482,
4914,
4943,
198,
11748,
12972,
6018,
13,
5589,
1133,
355,
24061,
198,
11748,
12972,
6018,
355,
14187,
... | 2.838527 | 353 |
"""Helper functions to initializer Websauna framework for command line applications."""
# Standard Library
import logging
import os
import sys
import typing as t
# Pyramid
import plaster
from pyramid import router
from pyramid import scripting
from rainbow_logging_handler import RainbowLoggingHandler
# Websauna
from... | [
37811,
47429,
5499,
284,
4238,
7509,
47736,
32837,
9355,
329,
3141,
1627,
5479,
526,
15931,
198,
2,
8997,
10074,
198,
11748,
18931,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
19720,
355,
256,
198,
198,
2,
41450,
198,
11748,
46376,
... | 3.005501 | 1,818 |
import typing as t
from ..typing import T_value
from ..database import DataPoint
from ..exceptions import NoDataForTrigger
| [
11748,
19720,
355,
256,
198,
198,
6738,
11485,
774,
13886,
1330,
309,
62,
8367,
198,
6738,
11485,
48806,
1330,
6060,
12727,
198,
6738,
11485,
1069,
11755,
1330,
1400,
6601,
1890,
48344,
628,
198
] | 3.818182 | 33 |
#!/usr/bin/python3
import setup_run_dir # Set the working directory and python sys.path to 2 levels above
import os
from glob import glob
from amrlib.graph_processing.amr_loading_raw import load_raw_amr
# Collect all the amr graphs from multiple files and create a gold test file.
# This simply concatenates fil... | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
11748,
9058,
62,
5143,
62,
15908,
220,
220,
220,
1303,
5345,
262,
1762,
8619,
290,
21015,
25064,
13,
6978,
284,
362,
2974,
2029,
198,
11748,
28686,
198,
6738,
220,
220,
15095,
1330,
15095... | 2.707692 | 390 |
"""empty message
Revision ID: 281362c70f34
Revises: acff3391146d
Create Date: 2020-05-27 16:58:11.029790
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '281362c70f34'
down_revision = 'acff3391146d'
branch_labels = None
depends_on = None
| [
37811,
28920,
3275,
201,
198,
201,
198,
18009,
1166,
4522,
25,
2579,
1485,
5237,
66,
2154,
69,
2682,
201,
198,
18009,
2696,
25,
936,
487,
29626,
1157,
3510,
67,
201,
198,
16447,
7536,
25,
12131,
12,
2713,
12,
1983,
1467,
25,
3365,
2... | 2.330882 | 136 |
from Histogram import Histogram
from HistogramWidget import HistogramWidget
from TrackingHistogramWidget import TrackingHistogramWidget
| [
6738,
5590,
21857,
1330,
5590,
21857,
198,
6738,
5590,
21857,
38300,
1330,
5590,
21857,
38300,
198,
6738,
37169,
13749,
21857,
38300,
1330,
37169,
13749,
21857,
38300,
198
] | 5.037037 | 27 |
"""
numpy
"""
import numpy
#
array = numpy.array([[1,2,3],[4,5,6]])
print(array,'\n',type(array))
#
print(array.ndim)
#
print(array.shape)
#
print(array.size) | [
37811,
198,
77,
32152,
220,
220,
198,
198,
37811,
198,
198,
11748,
299,
32152,
198,
198,
2,
198,
18747,
796,
299,
32152,
13,
18747,
26933,
58,
16,
11,
17,
11,
18,
38430,
19,
11,
20,
11,
21,
11907,
8,
198,
4798,
7,
18747,
4032,
5... | 2.063291 | 79 |
# pylint: disable=unused-wildcard-import,wildcard-import
"""
Please try and avoid modifying this file where possible, doing so may cause
different behaviours between local (development) and production environments.
Instead consider modifying the base (default) config. This way, the production
config is effectively th... | [
2,
279,
2645,
600,
25,
15560,
28,
403,
1484,
12,
21992,
9517,
12,
11748,
11,
21992,
9517,
12,
11748,
198,
198,
37811,
198,
5492,
1949,
290,
3368,
30620,
428,
2393,
810,
1744,
11,
1804,
523,
743,
2728,
198,
39799,
38975,
1022,
1957,
... | 4.388889 | 90 |
#051 - Progresso Aritmtica
primeiro = int(input('primeiro termo: '))
razao = int(input('razao: '))
decimo = primeiro + (10 - 1) * razao
for c in range(primeiro, decimo + razao, razao):
print(f'{c}', end=' - ')
print('acabou')
| [
2,
2713,
16,
532,
1041,
70,
33852,
317,
799,
16762,
3970,
198,
35505,
7058,
796,
493,
7,
15414,
10786,
35505,
7058,
3381,
78,
25,
705,
4008,
198,
3247,
5488,
796,
493,
7,
15414,
10786,
3247,
5488,
25,
705,
4008,
198,
12501,
25147,
7... | 2.3 | 100 |
#!/usr/local/bin/python3
# coding: UTF-8
# Author: David
# Email: youchen.du@gmail.com
# Created: 2017-04-26 11:14
# Last modified: 2017-04-30 15:55
# Filename: rules.py
# Description:
import os
import redis
from scrapy.utils.conf import init_env
from ProxyCrawl.settings import PROJECT_ROOT
conn = redis.Redis(decod... | [
2,
48443,
14629,
14,
12001,
14,
8800,
14,
29412,
18,
198,
2,
19617,
25,
41002,
12,
23,
198,
2,
6434,
25,
3271,
198,
2,
9570,
25,
345,
6607,
13,
646,
31,
14816,
13,
785,
198,
2,
15622,
25,
2177,
12,
3023,
12,
2075,
1367,
25,
14... | 2.377622 | 286 |
# -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making PaaS (BlueKing PaaS Community
Edition) available.
Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in compliance ... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
24893,
1087,
318,
10607,
284,
1104,
262,
1280,
2723,
2055,
416,
1642,
350,
7252,
50,
357,
14573,
15708,
350,
7252,
50,
8108,
198,
7407,
653,
8,
1695,
13,
1... | 3.853175 | 252 |
"""
The roseguarden project
Copyright (C) 2018-2020 Marcus Drobisch,
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 later
version.
This pr... | [
37811,
198,
464,
8278,
5162,
5872,
1628,
198,
198,
15269,
357,
34,
8,
2864,
12,
42334,
220,
17068,
21045,
65,
25308,
11,
198,
198,
1212,
1430,
318,
1479,
3788,
25,
345,
460,
17678,
4163,
340,
290,
14,
273,
13096,
340,
739,
198,
1169... | 3.726908 | 249 |
import json
import requests
| [
11748,
33918,
198,
198,
11748,
7007,
628,
198
] | 3.875 | 8 |
from pyrentals import Cart
import unittest
if __name__ == '__main__':
unittest.main()
| [
6738,
12972,
1156,
874,
1330,
13690,
198,
11748,
555,
715,
395,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
555,
715,
395,
13,
12417,
3419,
198
] | 2.676471 | 34 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Authors:
# - Grgoire Pan <gregoire.pean@hpc-project.com>
# - Ronan Keryell <ronan.keryell@hpc-project.com>
# + Many others...
# Beware: class p4a_scmp_compiler declared in ../scmp/p4a_scmp_compiler.py
# inherits from class p4a_processor.
# Maybe a common parent class w... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
198,
2,
46665,
25,
198,
2,
532,
1902,
2188,
557,
5961,
1279,
16694,
2188,
557,
13,
431,
272,
31,
71,
14751,
12,
... | 2.290227 | 2,026 |
# vim: fdm=marker
'''
author: Fabio Zanini
date: 12/01/15
content: Get subtype entropy from alignments, since it's used so often.
'''
# Modules
import os
import argparse
import cPickle as pickle
import numpy as np
from hivwholeseq.utils.miseq import alpha
from hivwholeseq.utils.one_site_statistics import ... | [
2,
43907,
25,
277,
36020,
28,
4102,
263,
198,
7061,
6,
198,
9800,
25,
220,
220,
220,
220,
14236,
952,
47022,
5362,
198,
4475,
25,
220,
220,
220,
220,
220,
220,
1105,
14,
486,
14,
1314,
198,
11299,
25,
220,
220,
220,
3497,
850,
4... | 1.852282 | 2,586 |
import copy
import json
import itertools
import os
import operator
from .errors import *
# ---------------------------------------------------
# Imports and Variables -
# ---------------------------------------------------
def importFunction(f, args):
"""
Allows a user to import... | [
11748,
4866,
198,
11748,
33918,
198,
11748,
340,
861,
10141,
198,
11748,
28686,
198,
11748,
10088,
198,
6738,
764,
48277,
1330,
1635,
628,
198,
2,
20368,
1783,
6329,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1846,... | 2.312207 | 3,408 |
from aequitas.plot.summary_chart import plot_summary_chart as summary
from aequitas.plot.bubble_disparity_chart import plot_disparity_bubble_chart as disparity
from aequitas.plot.bubble_metric_chart import plot_metric_bubble_chart as absolute
from aequitas.plot.bubble_concatenation_chart import plot_concatenated_bubble... | [
6738,
257,
4853,
21416,
13,
29487,
13,
49736,
62,
40926,
1330,
7110,
62,
49736,
62,
40926,
355,
10638,
198,
6738,
257,
4853,
21416,
13,
29487,
13,
46176,
903,
62,
6381,
1845,
414,
62,
40926,
1330,
7110,
62,
6381,
1845,
414,
62,
46176,... | 3.195489 | 133 |
import numpy as np
from model import get_model
#model = get_fit_model('random.tsv')
#inputs_raw = [[0,0,0,0,0]]
#inputs_np = np.array(inputs_raw)
#print(model.predict(inputs_np))
| [
11748,
299,
32152,
355,
45941,
198,
6738,
2746,
1330,
651,
62,
19849,
198,
198,
2,
19849,
796,
651,
62,
11147,
62,
19849,
10786,
25120,
13,
912,
85,
11537,
198,
2,
15414,
82,
62,
1831,
796,
16410,
15,
11,
15,
11,
15,
11,
15,
11,
... | 2.320513 | 78 |
'''
@Author: dzy
@Date: 2021-09-13 11:07:48
@LastEditTime: 2021-09-26 20:25:17
@LastEditors: dzy
@Description: Helper functions or classes used for the model.
@FilePath: /JDProductSummaryGeneration/src/predict.py
'''
import random
import os
import sys
import pathlib
import torch
import jieba
import config
from model i... | [
7061,
6,
198,
31,
13838,
25,
288,
7357,
198,
31,
10430,
25,
33448,
12,
2931,
12,
1485,
1367,
25,
2998,
25,
2780,
198,
31,
5956,
18378,
7575,
25,
33448,
12,
2931,
12,
2075,
1160,
25,
1495,
25,
1558,
198,
31,
5956,
18378,
669,
25,
... | 2.658291 | 398 |
from django.db import models
from django.db.models import permalink
from django.core.urlresolvers import reverse
from comments.models import Comment
# Create your models here. | [
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
42625,
14208,
13,
9945,
13,
27530,
1330,
583,
31000,
198,
6738,
42625,
14208,
13,
7295,
13,
6371,
411,
349,
690,
1330,
9575,
198,
6738,
3651,
13,
27530,
1330,
18957,
198,
198,
2,
13... | 3.826087 | 46 |
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 |
'''
========================
Wrapper_pyca module
========================
Created on Nov.7, 2017
@author: Xu Ronghua
@Email: rxu22@binghamton.edu
@TaskDescription: This module provide cryptography function based on pyca API.
@Reference:https://cryptography.io/en/latest/
'''
from cryptography.fernet import Fernet
from... | [
7061,
6,
198,
4770,
2559,
198,
36918,
2848,
62,
9078,
6888,
8265,
198,
4770,
2559,
198,
41972,
319,
5267,
13,
22,
11,
2177,
198,
31,
9800,
25,
33591,
6575,
456,
6413,
198,
31,
15333,
25,
220,
374,
87,
84,
1828,
31,
4623,
2763,
112... | 3.548523 | 237 |
import logging
import json
from src.utils.ucm import app_id, env
| [
11748,
18931,
198,
11748,
33918,
198,
6738,
12351,
13,
26791,
13,
1229,
76,
1330,
598,
62,
312,
11,
17365,
628
] | 3.3 | 20 |
"""
Afterglow Core: job plugin package
A job plugin must define a custom model subclassing from
:class:`afterglow_core.models.jobs.Job`, along with the optional custom result
and settings models (subclassing from
:class:`afterglow_core.models.jobs.JobResult` and
:class:`afterglow_core.schemas.AfterglowSchema`, respect... | [
37811,
198,
3260,
4743,
322,
7231,
25,
1693,
13877,
5301,
198,
198,
32,
1693,
13877,
1276,
8160,
257,
2183,
2746,
47611,
278,
422,
198,
25,
4871,
25,
63,
8499,
4743,
322,
62,
7295,
13,
27530,
13,
43863,
13,
33308,
47671,
1863,
351,
... | 3.241071 | 112 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Wrapper class for dictionaries to represent Things.
"""
import six
from wotpy.wot.dictionaries.base import WotBaseDict
from wotpy.wot.dictionaries.interaction import PropertyFragmentDict, ActionFragmentDict, EventFragmentDict
from wotpy.wot.dictionaries.link import L... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
198,
36918,
2848,
1398,
329,
48589,
3166,
284,
2380,
11597,
13,
198,
37811,
198,
198,
11748,
2237,
198,
198... | 2.913043 | 184 |
__all__ = ['app_config']
import sys, os, os.path
try: import ConfigParser as configparser
except ImportError: import configparser
try: import simplejson as json
except ImportError: import json
from .base_utils import *
app_config=AppConfig()
| [
834,
439,
834,
796,
37250,
1324,
62,
11250,
20520,
198,
198,
11748,
25064,
11,
28686,
11,
28686,
13,
6978,
198,
28311,
25,
1330,
17056,
46677,
355,
4566,
48610,
198,
16341,
17267,
12331,
25,
1330,
4566,
48610,
198,
198,
28311,
25,
1330,... | 3.464789 | 71 |
import torch
import torch.nn as nn
from utils.se3_torch import se3_transform_list
_EPS = 1e-6
| [
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
198,
6738,
3384,
4487,
13,
325,
18,
62,
13165,
354,
1330,
384,
18,
62,
35636,
62,
4868,
198,
198,
62,
36,
3705,
796,
352,
68,
12,
21,
628,
198
] | 2.45 | 40 |
from infrastructure.repository.token_snapshot_repo import TokenSnapshotRepo
from http import HTTPStatus
| [
6738,
6884,
13,
260,
1930,
37765,
13,
30001,
62,
45380,
9442,
62,
260,
7501,
1330,
29130,
43826,
9442,
6207,
78,
198,
6738,
2638,
1330,
14626,
19580,
628
] | 3.888889 | 27 |
from typing import Callable, Tuple
from epimargin.models import SIR
import pandas as pd
from epimargin.estimators import analytical_MPVS
from epimargin.etl.covid19india import data_path, get_time_series, load_all_data
import epimargin.plots as plt
from epimargin.smoothing import notched_smoothing
from epimargin.utils ... | [
6738,
19720,
1330,
4889,
540,
11,
309,
29291,
198,
6738,
2462,
320,
853,
259,
13,
27530,
1330,
311,
4663,
198,
11748,
19798,
292,
355,
279,
67,
198,
198,
6738,
2462,
320,
853,
259,
13,
395,
320,
2024,
1330,
30063,
62,
7378,
20304,
1... | 2.375342 | 1,095 |
from flask import Blueprint
main = Blueprint('main', __name__)
| [
6738,
42903,
1330,
39932,
198,
198,
12417,
796,
39932,
10786,
12417,
3256,
11593,
3672,
834,
8,
628
] | 3.823529 | 17 |
# Copyright 2011 Viewfinder Inc. All Rights Reserved.
"""Tests for IdAllocator data object.
"""
__author__ = 'spencer@emailscrubbed.com (Spencer Kimball)'
import unittest
from viewfinder.backend.base import util
from viewfinder.backend.base.testing import async_test
from viewfinder.backend.db.id_allocator import Id... | [
2,
15069,
2813,
3582,
22805,
3457,
13,
1439,
6923,
33876,
13,
198,
198,
37811,
51,
3558,
329,
5121,
3237,
420,
1352,
1366,
2134,
13,
198,
37811,
198,
198,
834,
9800,
834,
796,
705,
2777,
12137,
31,
12888,
1416,
25089,
3077,
13,
785,
... | 3.256637 | 113 |
#
# ayame.link
#
# Copyright (c) 2012-2021 Akinori Hattori <hattya@gmail.com>
#
# SPDX-License-Identifier: MIT
#
import urllib.parse
from . import core, markup, uri, util
from . import model as mm
from .exception import ComponentError
__all__ = ['Link', 'ActionLink', 'PageLink']
# HTML elements
_A = markup.QNa... | [
2,
198,
2,
38762,
480,
13,
8726,
198,
2,
198,
2,
220,
220,
15069,
357,
66,
8,
2321,
12,
1238,
2481,
48857,
10145,
48509,
10145,
1279,
5183,
774,
64,
31,
14816,
13,
785,
29,
198,
2,
198,
2,
220,
220,
30628,
55,
12,
34156,
12,
3... | 2.460076 | 263 |
import requests
import datetime
import time
UPDATE_URL = "http://www.trac-us.appspot.com/api/updates/"
#UPDATE_URL = "http://localhost:8000/api/updates/"
if __name__ == "__main__":
main()
| [
11748,
7007,
198,
11748,
4818,
8079,
198,
11748,
640,
628,
198,
16977,
62,
21886,
796,
366,
4023,
1378,
2503,
13,
2213,
330,
12,
385,
13,
1324,
20485,
13,
785,
14,
15042,
14,
929,
19581,
30487,
198,
2,
16977,
62,
21886,
796,
366,
40... | 2.684211 | 76 |
import pygame
import numpy as np
import random
import torch
from torch import nn
from torch.nn import functional as F
if __name__ == "__main__":
ai = AI()
state = np.random.rand(20, 20)
ai.set_direction(state)
print(ai.direction)
print(ai.body[0])
ai.move()
print(ai... | [
11748,
12972,
6057,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
4738,
198,
11748,
28034,
198,
6738,
28034,
1330,
299,
77,
198,
6738,
28034,
13,
20471,
1330,
10345,
355,
376,
628,
628,
628,
628,
628,
628,
628,
628,
628,
628,
628,
6... | 2.426471 | 136 |
import logging
from random import randint
from flask import Flask, render_template
from flask_ask import Ask, statement, question, session
from firebase import firebase
import time
firebase = firebase.FirebaseApplication('https://iotdev-6b58b.firebaseio.com', None)
app = Flask(__name__)
ask = Ask(app, "/")
#lo... | [
11748,
18931,
198,
198,
6738,
4738,
1330,
43720,
600,
198,
198,
6738,
42903,
1330,
46947,
11,
8543,
62,
28243,
198,
198,
6738,
42903,
62,
2093,
1330,
16981,
11,
2643,
11,
1808,
11,
6246,
198,
198,
6738,
2046,
8692,
1330,
2046,
8692,
1... | 2.862857 | 175 |
# Generated by Django 3.0.5 on 2020-04-12 02:06
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
15,
13,
20,
319,
12131,
12,
3023,
12,
1065,
7816,
25,
3312,
201,
198,
201,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
201,
198,
201,
198
] | 2.567568 | 37 |
# -*- coding: utf-8 -*-
# pylint: disable=missing-docstring,unused-import,reimported
import pytest # type: ignore
import tests.context as ctx
import license_screening.license_screening as lis
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
279,
2645,
600,
25,
15560,
28,
45688,
12,
15390,
8841,
11,
403,
1484,
12,
11748,
11,
260,
320,
9213,
198,
11748,
12972,
9288,
220,
1303,
2099,
25,
8856,
198,
198,
... | 2.855072 | 69 |
import sys
from .display import Display | [
11748,
25064,
198,
198,
6738,
764,
13812,
1330,
16531
] | 4.444444 | 9 |
"""Add user journal table
Revision ID: 6b8cf99be000
Revises: 36c4ecbfd11a
Create Date: 2020-12-21 15:08:07.784568
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.sql import func
# revision identifiers, used by Alembic.
revision = "6b8cf99be000"
down_revision = "36c4ecbfd11a"
branch_labels = None
... | [
37811,
4550,
2836,
3989,
3084,
198,
198,
18009,
1166,
4522,
25,
718,
65,
23,
12993,
2079,
1350,
830,
198,
18009,
2696,
25,
4570,
66,
19,
721,
65,
16344,
1157,
64,
198,
16447,
7536,
25,
12131,
12,
1065,
12,
2481,
1315,
25,
2919,
25,
... | 2.575758 | 132 |
import telebot
from pyowm import OWM
from pyowm.utils.config import get_default_config
bot = telebot.TeleBot("telegram API-key")
bot.polling(none_stop=True, interval=0)
| [
11748,
5735,
13645,
198,
6738,
12972,
322,
76,
1330,
440,
22117,
198,
6738,
12972,
322,
76,
13,
26791,
13,
11250,
1330,
651,
62,
12286,
62,
11250,
198,
198,
13645,
796,
5735,
13645,
13,
31709,
20630,
7203,
660,
30536,
7824,
12,
2539,
... | 2.85 | 60 |
version = '0.38'
| [
9641,
796,
705,
15,
13,
2548,
6,
198
] | 2.125 | 8 |
"""The package indicator for serve.push.stream.
Modules for transferring and registering servable stream data on the server.
"""
| [
37811,
464,
5301,
16916,
329,
4691,
13,
14689,
13,
5532,
13,
198,
198,
5841,
5028,
329,
26140,
290,
28336,
1113,
540,
4269,
1366,
319,
262,
4382,
13,
198,
37811,
198
] | 4.333333 | 30 |
from django.db import models
from django.db.models.fields.related import ForeignKey
# Create your models here.
| [
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
198,
6738,
42625,
14208,
13,
9945,
13,
27530,
13,
25747,
13,
5363,
1330,
8708,
9218,
198,
198,
2,
13610,
534,
4981,
994,
13,
198,
220,
220,
220,
220,
628,
628
] | 3.184211 | 38 |
"""The limitlessled component."""
| [
37811,
464,
44176,
992,
7515,
526,
15931,
198
] | 4.25 | 8 |
"""Project and user settings API"""
import json
from projectroles.models import AppSetting, APP_SETTING_TYPES, SODAR_CONSTANTS
from projectroles.plugins import get_app_plugin, get_active_plugins
# SODAR constants
APP_SETTING_SCOPE_PROJECT = SODAR_CONSTANTS['APP_SETTING_SCOPE_PROJECT']
APP_SETTING_SCOPE_USER = SODAR_... | [
37811,
16775,
290,
2836,
6460,
7824,
37811,
198,
11748,
33918,
198,
198,
6738,
1628,
305,
829,
13,
27530,
1330,
2034,
34149,
11,
43504,
62,
28480,
48996,
62,
9936,
47,
1546,
11,
311,
3727,
1503,
62,
10943,
2257,
1565,
4694,
198,
6738,
... | 2.484979 | 233 |
#! /usr/bin/env python
# Licensed under a 3-clause BSD style license - see LICENSE
from __future__ import print_function
import sys
from optparse import OptionParser
try:
import pyfits
except ImportError:
try:
from astropy.io import fits as pyfits
except ImportError:
raise ImportError("Cann... | [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
49962,
739,
257,
513,
12,
565,
682,
347,
10305,
3918,
5964,
532,
766,
38559,
24290,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
11748,
25064,
198,
6738,
2172,
29572,
... | 2.401566 | 894 |
from sqlalchemy import Column, String, Integer, ForeignKey
from sqlalchemy.orm import relationship
from models.base import Base
from models.servers import Server
from models.users import User
| [
6738,
44161,
282,
26599,
1330,
29201,
11,
10903,
11,
34142,
11,
8708,
9218,
198,
6738,
44161,
282,
26599,
13,
579,
1330,
2776,
198,
198,
6738,
4981,
13,
8692,
1330,
7308,
198,
6738,
4981,
13,
2655,
690,
1330,
9652,
198,
6738,
4981,
13... | 4.195652 | 46 |
# uncompyle6 version 3.2.0
# Python bytecode 2.4 (62061)
# Decompiled from: Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)]
# Embedded file name: pirates.leveleditor.worldData.tortuga_building_int_10
from pandac.PandaModules import Point3, VBase3, Vec4, Vec3
objectStruct = {'Ambien... | [
2,
34318,
2349,
21,
2196,
513,
13,
17,
13,
15,
198,
2,
11361,
18022,
8189,
362,
13,
19,
357,
38850,
5333,
8,
198,
2,
4280,
3361,
3902,
422,
25,
11361,
362,
13,
22,
13,
1415,
357,
85,
17,
13,
22,
13,
1415,
25,
23,
34825,
1129,
... | 2.256436 | 2,991 |
import sys
from . import base
from . import cmd
from . import reentry
| [
11748,
25064,
198,
198,
6738,
764,
1330,
2779,
198,
6738,
764,
1330,
23991,
198,
6738,
764,
1330,
302,
13000,
628
] | 3.6 | 20 |
from django.test import TestCase
from django.contrib.auth import get_user_model
from core import models
from django.utils import timezone
| [
6738,
42625,
14208,
13,
9288,
1330,
6208,
20448,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
1330,
651,
62,
7220,
62,
19849,
198,
6738,
4755,
1330,
4981,
198,
6738,
42625,
14208,
13,
26791,
1330,
640,
11340,
628,
198
] | 3.589744 | 39 |
from flask import redirect, url_for, render_template
from flask_login import current_user
from components.pagination import html_pagination
from db_session import create_session
| [
6738,
42903,
1330,
18941,
11,
19016,
62,
1640,
11,
8543,
62,
28243,
198,
6738,
42903,
62,
38235,
1330,
1459,
62,
7220,
198,
6738,
6805,
13,
79,
363,
1883,
1330,
27711,
62,
79,
363,
1883,
198,
6738,
20613,
62,
29891,
1330,
2251,
62,
... | 4.068182 | 44 |
arr = [1,2,2,1,2,1,5,23,1,91,2,4,1,]
print(quick_sort(arr))
| [
201,
198,
3258,
796,
685,
16,
11,
17,
11,
17,
11,
16,
11,
17,
11,
16,
11,
20,
11,
1954,
11,
16,
11,
6420,
11,
17,
11,
19,
11,
16,
11,
60,
201,
198,
201,
198,
4798,
7,
24209,
62,
30619,
7,
3258,
4008,
201,
198
] | 1.434783 | 46 |
from gtts import gTTS
import os
f=open("1.txt")
x=f.read()
language='en'
audio=gTTS(text=x,lang=language,slow=False)
audio.save("1.wav")
os.system("1.wav")
| [
6738,
308,
83,
912,
1330,
308,
51,
4694,
198,
11748,
28686,
198,
69,
28,
9654,
7203,
16,
13,
14116,
4943,
198,
87,
28,
69,
13,
961,
3419,
198,
16129,
11639,
268,
6,
198,
24051,
28,
70,
51,
4694,
7,
5239,
28,
87,
11,
17204,
28,
... | 2.211268 | 71 |
#! /usr/bin/env python
from PyFoam.Applications.SymlinkToFile import SymlinkToFile
SymlinkToFile()
| [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
6738,
9485,
37,
78,
321,
13,
41995,
13,
13940,
4029,
676,
2514,
8979,
1330,
1632,
4029,
676,
2514,
8979,
198,
198,
13940,
4029,
676,
2514,
8979,
3419,
198
] | 2.589744 | 39 |
#!/usr/bin/env python
from distutils.core import setup
import setuptools
import os
root_dir = os.path.abspath(os.path.dirname(__file__))
with open(f'{root_dir}/README.md') as f:
readme = f.read()
with open(f'{root_dir}/requirements.txt') as f:
requirements = f.read().split()
packages = setuptools.find_pack... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
6738,
1233,
26791,
13,
7295,
1330,
9058,
198,
11748,
900,
37623,
10141,
198,
11748,
28686,
198,
198,
15763,
62,
15908,
796,
28686,
13,
6978,
13,
397,
2777,
776,
7,
418,
13,
6978,
... | 2.362903 | 496 |
"""
Created on 19. 12. 2018
Module for home section of the application.
:author: Martin Doekal
:contact: xdocek09@stud.fit.vubtr.cz
"""
from .widget_manager import WidgetManager
from .section_router import SectionRouter
from functools import partial
from .models import ListLastExperiments
from PySide2.QtCore i... | [
37811,
198,
41972,
319,
678,
13,
1105,
13,
2864,
198,
26796,
329,
1363,
2665,
286,
262,
3586,
13,
198,
198,
25,
9800,
25,
220,
220,
220,
220,
5780,
2141,
988,
282,
198,
25,
32057,
25,
220,
220,
220,
2124,
4598,
344,
74,
2931,
31,
... | 2.982301 | 113 |
from django.conf.urls.defaults import *
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Example:
#(r'^philly_legislative/', include('philly_legislative.foo.urls')),
# Uncomment the admin/doc line below and add 'django.... | [
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
13,
12286,
82,
1330,
1635,
198,
198,
2,
791,
23893,
262,
1306,
734,
3951,
284,
7139,
262,
13169,
25,
198,
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
28482,
13,
2306,
375,
29392,
... | 2.482036 | 334 |
from corsikaio import CorsikaFile
from fact.io import to_h5py
from multiprocessing import Pool, cpu_count
from tqdm import tqdm
import os
import click
import pandas as pd
import numpy as np
from glob import glob
event_columns = [
'run_number',
'event_number',
'particle_id',
'total_energy',
'start... | [
6738,
269,
669,
9232,
952,
1330,
26978,
9232,
8979,
198,
6738,
1109,
13,
952,
1330,
284,
62,
71,
20,
9078,
198,
6738,
18540,
305,
919,
278,
1330,
19850,
11,
42804,
62,
9127,
198,
6738,
256,
80,
36020,
1330,
256,
80,
36020,
198,
1174... | 2.3213 | 277 |
# -*- coding: utf-8 -*-
import pytest
from pibooth.pictures.factory import PilPictureFactory, OpenCvPictureFactory
footer_texts = ('This is the main title', 'Footer text 2', 'Footer text 3')
footer_fonts = ('Amatic-Bold', 'DancingScript-Regular', 'Roboto-LightItalic')
footer_colors = ((10, 0, 0), (0, 50, 0), (0, 50, ... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
12972,
9288,
198,
6738,
279,
571,
5226,
13,
18847,
942,
13,
69,
9548,
1330,
12693,
28070,
22810,
11,
4946,
34,
85,
28070,
22810,
198,
198,
5898,
263,
62,
5... | 2.613793 | 290 |
"""## Question 3: Scrap Hotel Data
The below code is for India and can be extended to other countries by adding an outer loop given in the last part. The below codes takes several minutes to run.
"""
import requests
import pandas as pd
from bs4 import BeautifulSoup
hotelname_list = []
city_list = []
countries_list ... | [
37811,
2235,
18233,
513,
25,
1446,
2416,
12696,
6060,
198,
198,
464,
2174,
2438,
318,
329,
3794,
290,
460,
307,
7083,
284,
584,
2678,
416,
4375,
281,
12076,
9052,
1813,
287,
262,
938,
636,
13,
383,
2174,
12416,
2753,
1811,
2431,
284,
... | 2.370316 | 2,722 |
import pyscreenshot as ImageGrab
i=0
src_path ="C:\\Users\\Public\\ROV\OCR\\"
if __name__ == "__main__":
# part of the screen
im=ImageGrab.grab(bbox=(200,100,1100,600)) # X1,Y1,X2,Y2
im.save(src_path + 'init.png')
| [
198,
11748,
279,
28349,
26892,
355,
7412,
48400,
628,
198,
72,
28,
15,
198,
10677,
62,
6978,
796,
1,
34,
25,
6852,
14490,
6852,
15202,
6852,
49,
8874,
59,
4503,
49,
6852,
1,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
... | 2.186916 | 107 |
# -*- coding: utf-8 -*-
import threading
import time
import bottle
import ephemeral_port_reserve
import pytest
import umsgpack
from bravado_core.content_type import APP_JSON
from bravado_core.content_type import APP_MSGPACK
from six.moves import urllib
ROUTE_1_RESPONSE = b'HEY BUDDY'
ROUTE_2_RESPONSE = b'BYE BUDDY'
... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
4704,
278,
198,
11748,
640,
198,
198,
11748,
9294,
198,
11748,
2462,
39557,
282,
62,
634,
62,
411,
3760,
198,
11748,
12972,
9288,
198,
11748,
334,
19662,
8002,
19... | 1.737273 | 1,100 |
import torch
import torch.utils.data
from torchvision import datasets, transforms
import numpy as np
from udlp.autoencoder.convVAE import ConvVAE
import argparse
parser = argparse.ArgumentParser(description='VAE MNIST Example')
parser.add_argument('--lr', type=float, default=0.0001, metavar='N',
he... | [
11748,
28034,
198,
11748,
28034,
13,
26791,
13,
7890,
198,
6738,
28034,
10178,
1330,
40522,
11,
31408,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
334,
25404,
79,
13,
2306,
6571,
66,
12342,
13,
42946,
11731,
36,
1330,
34872,
11731,
3... | 2.502538 | 591 |
#coding=utf-8
'''
Created on 2013920
@author: Wangliaofan
'''
import bayes
import feedparser
from time import *
if __name__== '__main__':
listOPosts,listClasses = bayes.loadDataSet()
print listOPosts,listClasses
myVocabList = bayes.createVocabList(listOPosts)
print myVocabList
trainMat=[]
for ... | [
2,
66,
7656,
28,
40477,
12,
23,
198,
7061,
6,
198,
41972,
319,
2211,
37128,
198,
198,
31,
9800,
25,
15233,
24660,
1659,
272,
198,
7061,
6,
198,
11748,
15489,
274,
198,
11748,
3745,
48610,
198,
6738,
640,
1330,
1635,
198,
198,
361,
... | 2.225914 | 301 |
# -*- coding: utf-8 -*-
from socket import gethostname
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
17802,
1330,
651,
4774,
3672,
198
] | 2.619048 | 21 |
import logging
import socketio
logger = logging.getLogger("handshake.socket")
sio = socketio.AsyncClient(logger=logger)
async def get_wallet_connection(
url: str, api_key: str, wallet_id: str = "*",
) -> socketio.AsyncClient:
"""
see https://hsd-dev.org/guides/events.html
"""
assert type(url) ... | [
11748,
18931,
198,
11748,
17802,
952,
628,
198,
6404,
1362,
796,
18931,
13,
1136,
11187,
1362,
7203,
4993,
32431,
13,
44971,
4943,
198,
82,
952,
796,
17802,
952,
13,
42367,
11792,
7,
6404,
1362,
28,
6404,
1362,
8,
628,
628,
198,
292,
... | 2.480687 | 233 |
from unittest.mock import patch
from flask import url_for, Response, request
from flask_testing import TestCase
from random import randint
from app import app
| [
6738,
555,
715,
395,
13,
76,
735,
1330,
8529,
198,
6738,
42903,
1330,
19016,
62,
1640,
11,
18261,
11,
2581,
198,
6738,
42903,
62,
33407,
1330,
6208,
20448,
198,
6738,
4738,
1330,
43720,
600,
198,
198,
6738,
598,
1330,
598,
198
] | 3.902439 | 41 |
import argparse
import torch
import assets.utils as utils
| [
11748,
1822,
29572,
198,
11748,
28034,
198,
11748,
6798,
13,
26791,
355,
3384,
4487,
628,
628
] | 3.8125 | 16 |
from google_drive_downloader import GoogleDriveDownloader as gdd
import sys
import os
import requests
platform = get_platform()
if platform == "linux":
print("Nothing needs to install")
else:
print("Installing ffmpeg")
gdd.download_file_from_google_drive(file_id='1Q5zbaXonPEUNQmclp1WMIVVodnUuJdKo',
... | [
6738,
23645,
62,
19472,
62,
15002,
263,
1330,
3012,
24825,
10002,
263,
355,
308,
1860,
198,
11748,
25064,
198,
11748,
28686,
198,
11748,
7007,
628,
198,
24254,
796,
651,
62,
24254,
3419,
198,
198,
361,
3859,
6624,
366,
23289,
1298,
198,... | 2.135678 | 199 |
#!/bin/python3
import math
import os
import random
import re
import sys
# Complete the climbingLeaderboard function below.
if __name__ == '__main__':
fptr = open(os.environ['OUTPUT_PATH'], 'w')
scores_count = int(input())
scores = list(map(int, input().rstrip().split()))
alice_count = int(i... | [
2,
48443,
8800,
14,
29412,
18,
198,
198,
11748,
10688,
198,
11748,
28686,
198,
11748,
4738,
198,
11748,
302,
198,
11748,
25064,
198,
198,
2,
13248,
262,
14281,
45009,
3526,
2163,
2174,
13,
198,
220,
220,
220,
220,
628,
198,
198,
361,
... | 2.58794 | 199 |
#!/usr/bin/python3
# -*- coding: utf-8 -*-
from datetime import datetime
import pprint
import random
import copy
import torch
import torch.nn as nn
from model.deepqnet import DeepQNetwork,DeepQNetwork_v2
import omegaconf
from hydra import compose, initialize
import os
from tensorboardX import SummaryWriter
from col... | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
11748,
279,
4798,
198,
11748,
4738,
198,
198,
11748,
4866,
198,
11748,
28034... | 3.274648 | 142 |
# Generated by Django 3.2 on 2021-05-13 15:20
import uuid
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
17,
319,
33448,
12,
2713,
12,
1485,
1315,
25,
1238,
198,
11748,
334,
27112,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.970588 | 34 |
from mkt.constants import regions
from mkt.developers.cron import exclude_new_region
| [
6738,
285,
21841,
13,
9979,
1187,
1330,
7652,
198,
6738,
285,
21841,
13,
16244,
364,
13,
66,
1313,
1330,
19607,
62,
3605,
62,
36996,
628
] | 3.44 | 25 |
#!/usr/bin/env python3
# Copyright (c) 2019 The Energi Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
import logging... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
15069,
357,
66,
8,
13130,
383,
412,
1008,
12397,
7231,
6505,
198,
2,
4307,
6169,
739,
262,
17168,
3788,
5964,
11,
766,
262,
19249,
198,
2,
2393,
27975,
45761,
393,
2638,
1378,... | 3.463636 | 110 |
import os
from setuptools import find_packages, setup
DIR = os.path.dirname(os.path.abspath(__file__))
setup(
name='graceful',
version='1.2.0',
description='test of graceful shutdown',
url='https://github.com/qubitdigital/graceful/python',
author='Infra',
author_email='infra@qubit.com',
l... | [
11748,
28686,
198,
198,
6738,
900,
37623,
10141,
1330,
1064,
62,
43789,
11,
9058,
198,
198,
34720,
796,
28686,
13,
6978,
13,
15908,
3672,
7,
418,
13,
6978,
13,
397,
2777,
776,
7,
834,
7753,
834,
4008,
198,
198,
40406,
7,
198,
220,
... | 2.145695 | 302 |
# -*- coding: utf-8 -*-
import os
import logging
import logging.handlers
import time
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
28686,
198,
11748,
18931,
198,
11748,
18931,
13,
4993,
8116,
198,
11748,
640,
628
] | 2.965517 | 29 |
import glob
import os
import subprocess
import shutil
source_file_list = glob.glob("../source/assets/*.glb")
for input_file_name in source_file_list:
base_file_name = os.path.split(input_file_name)[1]
output_file_name = "../dist/assets/{}.usdz".format(os.path.splitext(base_file_name)[0])
print(... | [
11748,
15095,
201,
198,
11748,
28686,
201,
198,
11748,
850,
14681,
201,
198,
11748,
4423,
346,
201,
198,
201,
198,
10459,
62,
7753,
62,
4868,
796,
220,
15095,
13,
4743,
672,
7203,
40720,
10459,
14,
19668,
15211,
13,
4743,
65,
4943,
20... | 2.412879 | 264 |
from csv_json.csv_json_conv import * | [
6738,
269,
21370,
62,
17752,
13,
40664,
62,
17752,
62,
42946,
1330,
1635
] | 2.769231 | 13 |
COLUMNS = ['First Name', 'Last Name', 'Class Standing', 'Cum GPA', 'Major Code', 'Dept', 'Email']
DEPTS = ['CSE', 'ECE', 'MATH', 'BENG']
CLASS_STANDINGS = ['SO', 'JR', 'SR']
DEPTS_MAJORS = dict() # bit of a faux-pas...
DEPTS_MAJORS['CSE'] = ['CS25', 'CS26', 'CS27', 'CS28']
DEPTS_MAJORS['ECE'] = ['EC26', 'EC27', 'EC28'... | [
25154,
5883,
8035,
796,
37250,
5962,
6530,
3256,
705,
5956,
6530,
3256,
705,
9487,
22493,
3256,
705,
34,
388,
45283,
3256,
705,
24206,
6127,
3256,
705,
5005,
457,
3256,
705,
15333,
20520,
198,
46162,
4694,
796,
37250,
34,
5188,
3256,
70... | 2.183962 | 212 |
# -*- encoding: utf-8 -*-
"""
License: MIT
Copyright (c) 2019 - present AppSeed.us
"""
from django.contrib import admin
from .models import PERSON
from .models import FACE
# Register your models here.
admin.site.register(PERSON)
admin.site.register(FACE)
| [
2,
532,
9,
12,
21004,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
34156,
25,
17168,
198,
15269,
357,
66,
8,
13130,
532,
1944,
2034,
50,
2308,
13,
385,
198,
37811,
198,
198,
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
... | 3.071429 | 84 |
#!/usr/bin/env python
import re
import sys
import socket
import SocketServer
import struct
import fcntl
import sys
if __name__=='__main__':
# start server
server = SocketServer.ThreadingTCPServer( (getip("eth0"),44444), MyHandler)
server.serve_forever()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
11748,
302,
198,
11748,
25064,
198,
11748,
17802,
198,
11748,
47068,
10697,
198,
11748,
2878,
198,
11748,
277,
66,
429,
75,
198,
11748,
25064,
628,
198,
198,
361,
11593,
3672,
834,
855,
... | 2.965909 | 88 |
"""
Idiomatic Go examples converted to use goless.
"""
from __future__ import print_function
import time
from . import BaseTests
import goless
| [
37811,
198,
7390,
72,
13730,
1514,
6096,
11513,
284,
779,
43791,
408,
13,
198,
37811,
198,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
11748,
640,
198,
6738,
764,
1330,
7308,
51,
3558,
198,
198,
11748,
43791,
408,
628
] | 3.560976 | 41 |
from slackclient import SlackClient
import requests
import os
from Config import slack_env_var_token, slack_username
"""
These functions take care of sending slack messages and emails
"""
def upload_file( filepath ):
"""Upload file to channel
Note:
URLs can be constructed from:
https://ap... | [
6738,
30740,
16366,
1330,
36256,
11792,
198,
11748,
7007,
198,
11748,
28686,
198,
198,
6738,
17056,
1330,
30740,
62,
24330,
62,
7785,
62,
30001,
11,
30740,
62,
29460,
198,
198,
37811,
198,
4711,
5499,
1011,
1337,
286,
7216,
30740,
6218,
... | 2.540146 | 411 |
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: spaceone/api/monitoring/v1/alert.proto
"""Generated protocol buffer code."""
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _m... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2980,
515,
416,
262,
8435,
11876,
17050,
13,
220,
8410,
5626,
48483,
0,
198,
2,
2723,
25,
2272,
505,
14,
15042,
14,
41143,
278,
14,
85,
16,
14,
44598,
13,
1676,
... | 2.386065 | 29,925 |
import numpy as np
import scipy.sparse as sp
from scipy.ndimage import map_coordinates
from scipy.sparse.linalg import factorized
import operators as ops
| [
11748,
299,
32152,
355,
45941,
198,
11748,
629,
541,
88,
13,
82,
29572,
355,
599,
198,
6738,
629,
541,
88,
13,
358,
9060,
1330,
3975,
62,
37652,
17540,
198,
6738,
629,
541,
88,
13,
82,
29572,
13,
75,
1292,
70,
1330,
5766,
1143,
19... | 3.12 | 50 |
from setuptools import setup, find_packages
with open("README.md", "r") as fh:
long_description = fh.read()
PROJECT_URLS = {
'Bug Tracker': 'https://github.com/ngocjr7/geneticpython/issues',
'Documentation': 'https://github.com/ngocjr7/geneticpython/blob/master/README.md',
'Source Code': 'https://gith... | [
6738,
900,
37623,
10141,
1330,
9058,
11,
1064,
62,
43789,
198,
198,
4480,
1280,
7203,
15675,
11682,
13,
9132,
1600,
366,
81,
4943,
355,
277,
71,
25,
198,
220,
220,
220,
890,
62,
11213,
796,
277,
71,
13,
961,
3419,
198,
198,
31190,
... | 2.570175 | 342 |
v = float(input('Valor do produto? R$'))
d = float(input('Porcentagem de desconto: '))
ds = (d*v)/100
p = v-ds
print(f'Voc recebeu R${ds} de desconto, e pagar somente R${p} reais') | [
85,
796,
12178,
7,
15414,
10786,
7762,
273,
466,
40426,
9390,
30,
371,
3,
6,
4008,
198,
67,
796,
12178,
7,
15414,
10786,
47,
273,
1087,
363,
368,
390,
1715,
5957,
25,
705,
4008,
198,
9310,
796,
357,
67,
9,
85,
20679,
3064,
198,
... | 2.278481 | 79 |
# Package modules
from gavia import camera
from gavia import vizualise
from gavia import nav
from gavia import gps
from gavia import log
from gavia import time
# For nested packages
from gavia import image | [
2,
15717,
13103,
198,
6738,
308,
40543,
1330,
4676,
198,
6738,
308,
40543,
1330,
48569,
723,
786,
198,
6738,
308,
40543,
1330,
6812,
198,
6738,
308,
40543,
1330,
308,
862,
198,
6738,
308,
40543,
1330,
2604,
198,
6738,
308,
40543,
1330,
... | 3.714286 | 56 |
#!/usr/bin/env python3
# coding=utf-8
# ----------------------------------------------------------------------------------------------------
import socket
import os
# ----------------------------------------------------------------------------------------------------
# netester
# --------------------------------------... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
19617,
28,
40477,
12,
23,
198,
2,
16529,
3880,
650,
198,
11748,
17802,
198,
11748,
28686,
198,
2,
16529,
3880,
650,
198,
2,
220,
2010,
7834,
198,
2,
16529,
3880,
650,
198,
2... | 7.090909 | 110 |
"""
Creates solvers for the Chemical Master Equation (CME).
"""
import numpy
from cmepy import cme_matrix, domain, ode_solver, other_solver, state_enum
from cmepy import model as mdl
def create_packing_functions(domain_enum):
"""
create_packing_functions(domain_enum) -> (pack, unpack)
where
... | [
37811,
198,
16719,
274,
1540,
690,
329,
262,
24872,
5599,
7889,
341,
357,
34,
11682,
737,
198,
37811,
198,
198,
11748,
299,
32152,
198,
6738,
12067,
538,
88,
1330,
269,
1326,
62,
6759,
8609,
11,
7386,
11,
267,
2934,
62,
82,
14375,
1... | 2.219071 | 3,209 |
import json
import os
import sys
from server_common.ioc_data_source import IocDataSource
from server_common.mysql_abstraction_layer import SQLAbstraction
from server_common.utilities import print_and_log, SEVERITY
def register_ioc_start(ioc_name, pv_database=None, prefix=None):
"""
A helper function to regis... | [
11748,
33918,
198,
11748,
28686,
198,
11748,
25064,
198,
198,
6738,
4382,
62,
11321,
13,
72,
420,
62,
7890,
62,
10459,
1330,
314,
420,
6601,
7416,
198,
6738,
4382,
62,
11321,
13,
28744,
13976,
62,
397,
301,
7861,
62,
29289,
1330,
1636... | 2.466539 | 523 |
import bpy
from bpy.props import StringProperty, IntProperty, CollectionProperty, EnumProperty, BoolProperty
from bpy.types import PropertyGroup, UIList, Operator, Panel
from bpy_extras.io_utils import ImportHelper
from .rman_ui_base import _RManPanelHeader
from ..txmanager3 import txparams
from ..rman_utils import tex... | [
11748,
275,
9078,
198,
6738,
275,
9078,
13,
1676,
862,
1330,
10903,
21746,
11,
2558,
21746,
11,
12251,
21746,
11,
2039,
388,
21746,
11,
347,
970,
21746,
198,
6738,
275,
9078,
13,
19199,
1330,
14161,
13247,
11,
471,
4146,
396,
11,
3594... | 2.43608 | 704 |
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right | [
2,
30396,
329,
257,
13934,
5509,
10139,
13,
198,
2,
1398,
12200,
19667,
25,
198,
2,
220,
220,
220,
220,
825,
11593,
15003,
834,
7,
944,
11,
1188,
28,
15,
11,
1364,
28,
14202,
11,
826,
28,
14202,
2599,
198,
2,
220,
220,
220,
220,... | 2.27381 | 84 |
import pytest
from django.core.exceptions import ValidationError
from rest_framework.exceptions import \
ValidationError as RestFameworkValidationError
from ..models import Question, QuestionSet
from ..serializers.v1 import QuestionSerializer
from ..validators import QuestionLockedValidator
| [
11748,
12972,
9288,
198,
6738,
42625,
14208,
13,
7295,
13,
1069,
11755,
1330,
3254,
24765,
12331,
198,
6738,
1334,
62,
30604,
13,
1069,
11755,
1330,
3467,
198,
220,
220,
220,
3254,
24765,
12331,
355,
8324,
37,
321,
6433,
7762,
24765,
12... | 3.75 | 84 |
""" SAM macro definitions """
from six import string_types
import copy
import uuid
import samtranslator.model.eventsources
import samtranslator.model.eventsources.pull
import samtranslator.model.eventsources.push
import samtranslator.model.eventsources.cloudwatchlogs
from .api.api_generator import ApiGenerator
from .a... | [
37811,
28844,
15021,
17336,
37227,
198,
6738,
2237,
1330,
4731,
62,
19199,
198,
11748,
4866,
198,
11748,
334,
27112,
198,
198,
11748,
6072,
7645,
41880,
13,
19849,
13,
31534,
2203,
198,
11748,
6072,
7645,
41880,
13,
19849,
13,
31534,
2203... | 3.117701 | 1,096 |
from django.conf.urls.defaults import *
from media_logs.models import *
audio_list = {
'queryset': Audio.objects.all(),
}
audio_set_list = {
'queryset': AudioSet.objects.all(),
}
urlpatterns = patterns('',
url(
regex = '^sets/(?P<slug>[-\w]+)/$',
view = 'django.views.generic.list_detail.object_de... | [
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
13,
12286,
82,
1330,
1635,
198,
6738,
2056,
62,
6404,
82,
13,
27530,
1330,
1635,
628,
198,
24051,
62,
4868,
796,
1391,
198,
220,
705,
10819,
893,
316,
10354,
13491,
13,
48205,
13,
439,
22... | 2.133333 | 435 |
#!/usr/bin/env python
'''gopro control over mavlink for the solo-gimbal
To use this module connect to a Solo with a GoPro installed on the gimbal.
'''
import time, os
from MAVProxy.modules.lib import mp_module
from pymavlink import mavutil
def init(mpstate):
'''initialise module'''
return GoProModule(mpstat... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
7061,
6,
70,
404,
305,
1630,
625,
285,
615,
8726,
329,
262,
12199,
12,
70,
320,
6893,
198,
198,
2514,
779,
428,
8265,
2018,
284,
257,
20284,
351,
257,
49789,
6589,
319,
262,
308,
3... | 2.936364 | 110 |