content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
# -*- coding: utf-8 -*-
import re
from scrapy import Spider, Request
from dateutil import parser
from artbot_scraper.items import EventItem
from pytz import timezone
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
302,
198,
6738,
15881,
88,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1330,
12648,
11,
19390,
198,
6738,
3128,
22602,
220,
220,
220,
... | 2.271739 | 92 |
"""
DBA 1337_TECH, AUSTIN TEXAS © MAY 2021
Proof of Concept code, No liabilities or warranties expressed or implied.
"""
from django import forms
from django.contrib.auth.forms import UserCreationForm
from django.urls import reverse
from .models import User
| [
37811,
198,
35,
4339,
1511,
2718,
62,
51,
25994,
11,
317,
7759,
1268,
309,
6369,
1921,
10673,
26720,
33448,
198,
44683,
286,
26097,
2438,
11,
1400,
25333,
393,
50174,
6241,
393,
17142,
13,
198,
37811,
198,
198,
6738,
42625,
14208,
1330,... | 3.48 | 75 |
# -*- coding: utf-8 -*-
# website: https://loovien.github.io
# author: luowen<bigpao.luo@gmail.com>
# time: 2018/9/29 21:41
# desc:
from src.tools.video_builder import VideoBuilder
import traceback
import click
import logging
from src.crawl import CrawlFactory
from src.logs import config_logging
from src.pub.bilib imp... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
3052,
25,
3740,
1378,
5439,
709,
2013,
13,
12567,
13,
952,
198,
2,
1772,
25,
300,
84,
322,
268,
27,
14261,
79,
5488,
13,
2290,
78,
31,
14816,
13,
785,
29,
198,
... | 2.793194 | 764 |
from django.contrib import messages
from django.shortcuts import render
from django.shortcuts import render, get_object_or_404
from django.db.models import Q
from home.models import Comment
from .models import Category, Product, ProductImage
from cart.forms import CartAddProductForm
from django.views.generic import Lis... | [
6738,
42625,
14208,
13,
3642,
822,
1330,
6218,
198,
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
198,
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
11,
651,
62,
15252,
62,
273,
62,
26429,
198,
6738,
42625,
14208,
13,
9945,
13,
... | 3.711111 | 135 |
#!/usr/bin/env python
import turtle
turtle.pen(fillcolor="black", pencolor="red", pensize=10)
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
11748,
28699,
198,
198,
83,
17964,
13,
3617,
7,
20797,
8043,
2625,
13424,
1600,
3112,
8043,
2625,
445,
1600,
29707,
1096,
28,
940,
8,
198
] | 2.794118 | 34 |
from termcolor import cprint, colored
ni = float(input(colored('Primeiro termo da progressão aritmética: ', 'blue')))
pa = float(input(colored('Razão da progressão aritmética: ', 'blue')))
c = 0
p = 10
lp = []
lc = []
np = ni
while c < p:
while c < p:
lp += [str(np)]
ne = len(str(np))
np += ... | [
6738,
3381,
8043,
1330,
269,
4798,
11,
16396,
198,
8461,
796,
12178,
7,
15414,
7,
25717,
10786,
26405,
7058,
3381,
78,
12379,
4371,
28749,
610,
270,
76,
25125,
3970,
25,
46083,
705,
17585,
6,
22305,
198,
8957,
796,
12178,
7,
15414,
7,... | 2.099678 | 311 |
"""
Cached, database-backed sessions.
"""
import logging
from django.contrib.sessions.backends.db import SessionStore as DBStore
from django.core.cache import cache
from django.core.exceptions import SuspiciousOperation
from django.utils import timezone
from django.utils.encoding import force_text
KEY_PREFIX = "djan... | [
37811,
198,
34,
2317,
11,
6831,
12,
17078,
10991,
13,
198,
37811,
198,
198,
11748,
18931,
198,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
82,
6202,
13,
1891,
2412,
13,
9945,
1330,
23575,
22658,
355,
20137,
22658,
198,
6738,
42625,
14... | 2.876866 | 268 |
from azure.identity import AzureCliCredential
from azure.mgmt.resource import ResourceManagementClient
from azure.mgmt.network import NetworkManagementClient
from azure.mgmt.compute import ComputeManagementClient
from azure.mgmt.storage import StorageManagementClient
from azure.common.credentials import ServicePrincipa... | [
6738,
35560,
495,
13,
738,
414,
1330,
22134,
2601,
72,
34,
445,
1843,
198,
6738,
35560,
495,
13,
11296,
16762,
13,
31092,
1330,
20857,
48032,
11792,
198,
6738,
35560,
495,
13,
11296,
16762,
13,
27349,
1330,
7311,
48032,
11792,
198,
6738... | 3.321739 | 230 |
#!/usr/bin/python3
helpMessage = """
This runs a unit test for dset64/dset64-gccAtomic.hpp.
Invoke with 5 arguments:
- The number of items (vertices).
- The number of union operations (edges).
- The number of threads.
- The number of union operations per batch.
- The random seed.
"""
import shasta
import sys
if no... | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
198,
16794,
12837,
796,
37227,
198,
1212,
4539,
257,
4326,
1332,
329,
288,
2617,
2414,
14,
67,
2617,
2414,
12,
70,
535,
2953,
10179,
13,
71,
381,
13,
198,
198,
19904,
2088,
351,
642,
... | 2.484127 | 252 |
import math
import doctest
def pick(n, k):
"""
Return the number of ways to select k objects from n objects with order
:param n: int
:param k: int
:return: int
>>> pick(1, 0)
1
>>> pick(1, 2)
0
>>> pick(5, 2)
20
"""
return math.factorial(n) // math.factorial(n - k) ... | [
11748,
10688,
198,
11748,
10412,
395,
628,
198,
4299,
2298,
7,
77,
11,
479,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
8229,
262,
1271,
286,
2842,
284,
2922,
479,
5563,
422,
299,
5563,
351,
1502,
198,
220,
220,
220,
1058,
... | 2.296053 | 304 |
"""Utility module for date and time controls."""
# Official Libraries
import datetime
from typing import Union
# Thirdparty Libraries
from dateutil.relativedelta import relativedelta
# My Modules
__all__ = (
'after_day_str_from',
'next_day_str_from',
'next_month_str_from',
)
# D... | [
37811,
18274,
879,
8265,
329,
3128,
290,
640,
6973,
526,
15931,
628,
198,
2,
15934,
46267,
198,
11748,
4818,
8079,
198,
6738,
19720,
1330,
4479,
198,
198,
2,
10467,
10608,
46267,
198,
6738,
3128,
22602,
13,
2411,
265,
1572,
12514,
1330,... | 2.697183 | 142 |
##########################################################################
#
# pgAdmin 4 - PostgreSQL Tools
#
# Copyright (C) 2013 - 2018, The pgAdmin Development Team
# This software is released under the PostgreSQL Licence
#
##########################################################################
""" Implements Co... | [
29113,
29113,
7804,
2235,
198,
2,
198,
2,
23241,
46787,
604,
532,
2947,
47701,
20003,
198,
2,
198,
2,
15069,
357,
34,
8,
2211,
532,
2864,
11,
383,
23241,
46787,
7712,
4816,
198,
2,
770,
3788,
318,
2716,
739,
262,
2947,
47701,
10483,... | 2.020533 | 16,315 |
"""Module for the xls diffing and CLI.
IndexedVenn
This is a named tuple that is meant to carry information about two
sequences (called "a" and "b"). It has the following ordered members:
- common_a: The index and item of all items in both a and b with the
condition that the item appears ex... | [
37811,
26796,
329,
262,
2124,
7278,
814,
278,
290,
43749,
13,
198,
198,
15732,
276,
53,
1697,
198,
220,
220,
220,
770,
318,
257,
3706,
46545,
326,
318,
4001,
284,
3283,
1321,
546,
734,
198,
220,
220,
220,
16311,
357,
7174,
366,
64,
... | 2.156733 | 8,020 |
"""
Session: 4
Topic: Conditional: IF statement
"""
x = 200
y = 1000
if (x > y):
print ('x > y is true')
print ('new line 1')
print('new line 11')
print ('new line 2')
"""
if (x < y):
print ('x < y is true')
print ('new line 3')
print ('new line 4')
""" | [
37811,
198,
36044,
25,
604,
198,
33221,
25,
9724,
1859,
25,
16876,
2643,
198,
37811,
198,
87,
796,
939,
198,
88,
796,
8576,
198,
198,
361,
357,
87,
1875,
331,
2599,
198,
220,
220,
220,
3601,
19203,
87,
1875,
331,
318,
2081,
11537,
... | 2.477477 | 111 |
API_BASE_URL = 'https://min-api.cryptocompare.com/'
DATA_URL = API_BASE_URL + 'data/'
DATA_V2_URL = DATA_URL + 'v2/'
DATA_V3_URL = DATA_URL + 'v3/'
DATA_V3_ALL_URL = DATA_V3_URL + 'all/'
# Specific APIs
# History APIs
DAILY_HISTORY_URL = DATA_V2_URL + 'histoday'
HOURLY_HISTORY_URL = DATA_V2_URL + 'histohour'
MINUTE_... | [
198,
17614,
62,
33,
11159,
62,
21886,
796,
705,
5450,
1378,
1084,
12,
15042,
13,
29609,
420,
3361,
533,
13,
785,
14,
6,
198,
26947,
62,
21886,
796,
7824,
62,
33,
11159,
62,
21886,
1343,
705,
7890,
14,
6,
198,
26947,
62,
53,
17,
... | 2.267932 | 474 |
import re
import datetime
import dateutil.parser
from bs4 import BeautifulSoup
def from_requests_response(response):
"""Attempts to find a date from a response object.
If a more reliable method can be used, (RSS timestamp) use that
in preference to this.
"""
content_date = from_content(response.co... | [
11748,
302,
198,
11748,
4818,
8079,
198,
11748,
3128,
22602,
13,
48610,
198,
6738,
275,
82,
19,
1330,
23762,
50,
10486,
198,
198,
4299,
422,
62,
8897,
3558,
62,
26209,
7,
26209,
2599,
198,
220,
220,
220,
37227,
48452,
284,
1064,
257,
... | 2.976415 | 212 |
import torch
from torch.distributions.categorical import Categorical
from torch.distributions.uniform import Uniform
import torch.nn.functional as F
| [
11748,
28034,
198,
6738,
28034,
13,
17080,
2455,
507,
13,
66,
2397,
12409,
1330,
327,
2397,
12409,
198,
6738,
28034,
13,
17080,
2455,
507,
13,
403,
6933,
1330,
35712,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
628
] | 3.846154 | 39 |
from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
ext_module = Extension(
"pdist",
["pdist.pyx"],
extra_compile_args=['-fopenmp'],
extra_link_args=['-fopenmp'],
)
setup(
name = 'Cython-based sped-up routines',
cmdclass = {'build_e... | [
6738,
1233,
26791,
13,
7295,
1330,
9058,
198,
6738,
1233,
26791,
13,
2302,
3004,
1330,
27995,
198,
6738,
327,
7535,
13,
20344,
26791,
1330,
1382,
62,
2302,
198,
198,
2302,
62,
21412,
796,
27995,
7,
198,
220,
220,
220,
366,
79,
17080,
... | 2.576389 | 144 |
"""
This demo will draw a few rectangles onto the screen along with some text
on top of that.
This example is for use on (Linux) computers that are using CPython with
Adafruit Blinka to support CircuitPython libraries. CircuitPython does
not support PIL/pillow (python imaging library)!
Author(s): Melissa LeBl... | [
37811,
201,
198,
1212,
13605,
481,
3197,
257,
1178,
13621,
27787,
4291,
262,
3159,
1863,
351,
617,
2420,
201,
198,
261,
1353,
286,
326,
13,
201,
198,
201,
198,
1212,
1672,
318,
329,
779,
319,
357,
19314,
8,
9061,
326,
389,
1262,
169... | 2.438596 | 1,767 |
from urgent.cli import main
main() | [
6738,
18039,
13,
44506,
1330,
1388,
198,
12417,
3419
] | 3.777778 | 9 |
import mnist_loader
import network
training_data, validation_data, test_data = mnist_loader.load_data_wrapper()
# print("training data")
# print(type(training_data))
# print(len(training_data))
# print(training_data[0][0].shape)
# print(training_data[0][1].shape)
net = network.Network([784, 30, 10])
net.SGD(training_... | [
11748,
285,
77,
396,
62,
29356,
198,
11748,
3127,
198,
198,
34409,
62,
7890,
11,
21201,
62,
7890,
11,
1332,
62,
7890,
796,
285,
77,
396,
62,
29356,
13,
2220,
62,
7890,
62,
48553,
3419,
198,
2,
3601,
7203,
34409,
1366,
4943,
198,
2... | 2.761538 | 130 |
### Based on https://github.com/pytorch/examples/tree/master/imagenet/main.py
import argparse
import os
import random
import shutil
import time
import warnings
import sys
import torch
import torch.nn as nn
import torch.nn.parallel
import torch.backends.cudnn as cudnn
import torch.distributed as dist
import torch.opti... | [
21017,
13403,
319,
3740,
1378,
12567,
13,
785,
14,
9078,
13165,
354,
14,
1069,
12629,
14,
21048,
14,
9866,
14,
320,
11286,
316,
14,
12417,
13,
9078,
198,
198,
11748,
1822,
29572,
198,
11748,
28686,
198,
11748,
4738,
198,
11748,
4423,
... | 2.335655 | 2,297 |
from setuptools import setup
setup(
name='bp',
version=open('VERSION').read().strip(),
description='A command-line interface for populating Jinja2 templates',
long_description='Populate Jinja2 templates from plaintext JSON, YAML, or'
' TXT files.',
author='Jon McKenzie',
au... | [
6738,
900,
37623,
10141,
1330,
9058,
198,
198,
40406,
7,
198,
220,
220,
220,
1438,
11639,
46583,
3256,
198,
220,
220,
220,
2196,
28,
9654,
10786,
43717,
27691,
961,
22446,
36311,
22784,
198,
220,
220,
220,
6764,
11639,
32,
3141,
12,
1... | 2.505102 | 196 |
# -*- coding: utf-8 -*-
# This file is code generated, do not make changes here
# If the generated information is not correct for python
# changes can be made in functions_addon.py and they will be
# applied at build time
functions = {
'AbortGeneration': {
'returns': 'ViStatus',
'parameters': ... | [
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
770,
2393,
318,
2438,
7560,
11,
466,
407,
787,
2458,
994,
198,
2,
220,
1002,
262,
7560,
1321,
318,
407,
3376,
329,
21015,
198,
2,
220,
2458,
460,
307,
925,
... | 2.580995 | 122,514 |
import pytest
from fairing.utils import is_runtime_phase, get_image_full, get_image
REPO_NAME = 'testrepo'
IMAGE_NAME = 'fairing-test'
IMAGE_TAG = 'some-tag'
@pytest.mark.parametrize("runtime_phase", [True, False])
| [
11748,
12972,
9288,
198,
198,
6738,
3148,
278,
13,
26791,
1330,
318,
62,
43282,
62,
40715,
11,
651,
62,
9060,
62,
12853,
11,
651,
62,
9060,
198,
198,
2200,
16402,
62,
20608,
796,
705,
9288,
260,
7501,
6,
198,
3955,
11879,
62,
20608,... | 2.595238 | 84 |
from transformers import *
from synthesis import *
err_msg = "sparse_coo_tensor(): argument 'size' must be tuple of ints\", ' not NoneTyp"
sentences = err_msg
tokenizer = BertTokenizer.from_pretrained('bert-base-uncased')
model = BertModel.from_pretrained('bert-base-uncased')
sentence_embeddings = tokenizer.encode(er... | [
6738,
6121,
364,
1330,
1635,
198,
6738,
21263,
1330,
1635,
198,
198,
8056,
62,
19662,
796,
366,
82,
29572,
62,
1073,
78,
62,
83,
22854,
33529,
4578,
705,
7857,
6,
1276,
307,
46545,
286,
493,
82,
34607,
705,
407,
6045,
31467,
1,
198,... | 2.94 | 200 |
import pandas as pd
import sys
from multiprocessing import Pool
import numpy as np
import cv2
from lib.utils import load_image, info, debug, display_imgs
from lib.config import gen_config
config = gen_config()
# use the ladder trick to make it O(n) instead of O(n^2)
# identical_pair = {
# 'test_id': te... | [
11748,
19798,
292,
355,
279,
67,
198,
11748,
25064,
198,
6738,
18540,
305,
919,
278,
1330,
19850,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
269,
85,
17,
198,
6738,
9195,
13,
26791,
1330,
3440,
62,
9060,
11,
7508,
11,
14257,
11,
... | 2.022222 | 585 |
from ..core.king_geometry import KingGeometry
from matplotlib.pyplot import Line2D
import abc
from matplotlib.transforms import Affine2D
from matplotlib.text import Text
| [
6738,
11485,
7295,
13,
3364,
62,
469,
15748,
1330,
2677,
10082,
15748,
198,
6738,
2603,
29487,
8019,
13,
9078,
29487,
1330,
6910,
17,
35,
198,
11748,
450,
66,
198,
6738,
2603,
29487,
8019,
13,
7645,
23914,
1330,
6708,
500,
17,
35,
198... | 3.352941 | 51 |
from pre_processing.features import read_feature_dfs_as_dict
from pre_processing.features import df_dict_to_df_dataframe
from util.helper import pop_labels
from models.ComputedFeaturesFFNN import ComputedFeaturesFFNN
from util.metrics import rmse, correlation_coefficient
from util.constants import LEARNING_SET, FULL_TE... | [
6738,
662,
62,
36948,
13,
40890,
1330,
1100,
62,
30053,
62,
7568,
82,
62,
292,
62,
11600,
198,
6738,
662,
62,
36948,
13,
40890,
1330,
47764,
62,
11600,
62,
1462,
62,
7568,
62,
7890,
14535,
198,
6738,
7736,
13,
2978,
525,
1330,
1461,... | 3.188679 | 159 |
#!/usr/bin/env python
import sys
sys.path.insert(0, '../config/')
from sqlalchemy import create_engine, Table, MetaData, Column, Integer, String, ForeignKey
from sqlalchemy.orm import mapper, relationship, sessionmaker
from config import config
if __name__ == '__main__':
run() | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
11748,
25064,
198,
17597,
13,
6978,
13,
28463,
7,
15,
11,
705,
40720,
11250,
14,
11537,
198,
6738,
44161,
282,
26599,
1330,
2251,
62,
18392,
11,
8655,
11,
30277,
6601,
11,
29201,
11,
... | 3.275862 | 87 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import argparse
import sys
import os
import subprocess
import shutil
import logging
import glob
import multiprocessing
import tempfile
from pathlib import Path
from Bio import SeqIO
from Bio.SeqRecord import SeqRecord
from py16db.shared_methods import filter_sraFind, ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
1822,
29572,
198,
11748,
25064,
198,
11748,
28686,
198,
11748,
850,
14681,
198,
11748,
4423,
346,
198,
... | 2.810127 | 158 |
"""Supervisr Puppet Apps Config"""
from supervisr.core.apps import SettingBootstrapper, SupervisrAppConfig
class SupervisrPuppetConfig(SupervisrAppConfig):
"""Supervisr Puppet app config"""
name = 'supervisr.puppet'
verbose_name = 'Supervisr Puppet'
navbar_enabled = lambda self, request: request.use... | [
37811,
12442,
4703,
81,
34447,
27710,
17056,
37811,
198,
198,
6738,
2208,
4703,
81,
13,
7295,
13,
18211,
1330,
25700,
36476,
12044,
2848,
11,
3115,
4703,
81,
4677,
16934,
628,
198,
4871,
3115,
4703,
81,
47,
44933,
16934,
7,
12442,
4703,... | 3.047244 | 127 |
"""
MSX SDK
MSX SDK client. # noqa: E501
The version of the OpenAPI document: 1.0.9
Generated by: https://openapi-generator.tech
"""
import sys
import unittest
import python_msx_sdk
from python_msx_sdk.model.change_request_summary import ChangeRequestSummary
from python_msx_sdk.model.change_reques... | [
37811,
198,
220,
220,
220,
6579,
55,
26144,
628,
220,
220,
220,
6579,
55,
26144,
5456,
13,
220,
1303,
645,
20402,
25,
412,
33548,
628,
220,
220,
220,
383,
2196,
286,
262,
4946,
17614,
3188,
25,
352,
13,
15,
13,
24,
198,
220,
220,
... | 2.922636 | 349 |
# -*- coding: utf-8 -*-
# Copyright 2016 Objectif Libre
#
# 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 ... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
15069,
1584,
9515,
361,
44384,
198,
2,
198,
2,
220,
220,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
345,
743,
198,
... | 2.631148 | 366 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Time : 19-4-24 下午8:50
# @Author : MaybeShewill-CV
# @Site : https://github.com/MaybeShewill-CV/lanenet-lane-detection
# @File : lanenet.py
# @IDE: PyCharm
"""
Implement LaneNet Model
"""
import tensorflow as tf
from lanenet_model import lanenet_back_end
from ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2488,
7575,
220,
220,
220,
1058,
678,
12,
19,
12,
1731,
220,
10310,
233,
39355,
230,
23,
25,
1120,
198,
2,
... | 2.027609 | 1,485 |
from typing import Awaitable, TypeVar, Union
__all__ = ['MaybeAwaitable']
T = TypeVar('T')
MaybeAwaitable = Union[Awaitable[T], T]
| [
6738,
19720,
1330,
5851,
4548,
540,
11,
5994,
19852,
11,
4479,
198,
198,
834,
439,
834,
796,
37250,
13300,
32,
17077,
540,
20520,
628,
198,
51,
796,
5994,
19852,
10786,
51,
11537,
198,
198,
13300,
32,
17077,
540,
796,
4479,
58,
32,
... | 2.7 | 50 |
from __future__ import annotations
from dataclasses import dataclass
from reamber.base.Timed import Timed
MIN_SV = 0.01
MAX_SV = 10.0
@dataclass | [
6738,
11593,
37443,
834,
1330,
37647,
198,
198,
6738,
4818,
330,
28958,
1330,
4818,
330,
31172,
198,
198,
6738,
302,
7789,
13,
8692,
13,
14967,
276,
1330,
5045,
276,
198,
198,
23678,
62,
50,
53,
796,
657,
13,
486,
198,
22921,
62,
50... | 2.740741 | 54 |
import datetime
import os
from airflow.contrib.operators import dataproc_operator
from airflow.contrib.operators.bigquery_operator import BigQueryOperator
from airflow.contrib.operators.gcs_to_bq import GoogleCloudStorageToBigQueryOperator
from airflow.models import DAG
from airflow.utils import trigger_rule
PROJECT_... | [
11748,
4818,
8079,
198,
11748,
28686,
198,
198,
6738,
45771,
13,
3642,
822,
13,
3575,
2024,
1330,
4818,
499,
12204,
62,
46616,
198,
6738,
45771,
13,
3642,
822,
13,
3575,
2024,
13,
14261,
22766,
62,
46616,
1330,
4403,
20746,
18843,
1352,... | 2.141923 | 1,529 |
from api import serializers as s
from api.vm.base.serializers import VmSerializer as _VmSerializer, ExtendedVmSerializer as _ExtendedVmSerializer
| [
6738,
40391,
1330,
11389,
11341,
355,
264,
198,
6738,
40391,
13,
14761,
13,
8692,
13,
46911,
11341,
1330,
569,
76,
32634,
7509,
355,
4808,
53,
76,
32634,
7509,
11,
24204,
53,
76,
32634,
7509,
355,
4808,
11627,
1631,
53,
76,
32634,
750... | 3.363636 | 44 |
import urllib3
import telegram
from bs4 import BeautifulSoup
import time
import requests
from lxml import html
import argparse
from urllib.parse import urlparse
import threading
CHECKING = "Sorry bookings are not open for Movie you wanted, Don't worry i will be checking and will tell you once it is available."
BOOKIN... | [
11748,
2956,
297,
571,
18,
198,
11748,
573,
30536,
198,
6738,
275,
82,
19,
1330,
23762,
50,
10486,
198,
11748,
640,
198,
11748,
7007,
198,
6738,
300,
19875,
1330,
27711,
198,
11748,
1822,
29572,
198,
6738,
2956,
297,
571,
13,
29572,
1... | 3.160584 | 274 |
""" __init__.py for pyarchops_dnsmasq """
__version__ = '0.0.2'
| [
37811,
11593,
15003,
834,
13,
9078,
329,
12972,
998,
2840,
62,
67,
5907,
5356,
80,
37227,
198,
198,
834,
9641,
834,
796,
705,
15,
13,
15,
13,
17,
6,
198
] | 2.166667 | 30 |
# -*- coding: utf-8 -*-
from importlib import import_module
import sys
from flask_migrate import MigrateCommand
import settings
sys.path.insert(1, settings.BASE_DIR)
sys.path.insert(1, settings.APP_DIR)
api = import_module('api')
manager = api.manager
manager.add_command('db', MigrateCommand)
if __name__ == '__m... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
628,
198,
6738,
1330,
8019,
1330,
1330,
62,
21412,
198,
11748,
25064,
198,
198,
6738,
42903,
62,
76,
42175,
1330,
337,
42175,
21575,
198,
198,
11748,
6460,
198,
198,
17597,
1... | 2.836066 | 122 |
import numpy as np
from collections import OrderedDict
import torch
import torch.optim as optim
import rlkit.torch.pytorch_util as ptu
from rlkit.torch.core import np_to_pytorch_batch
from rlkit.torch.torch_base_algorithm import TorchBaseAlgorithm
| [
11748,
299,
32152,
355,
45941,
198,
6738,
17268,
1330,
14230,
1068,
35,
713,
198,
198,
11748,
28034,
198,
11748,
28034,
13,
40085,
355,
6436,
198,
198,
11748,
374,
75,
15813,
13,
13165,
354,
13,
9078,
13165,
354,
62,
22602,
355,
279,
... | 2.988095 | 84 |
import csv
import glob
import multiprocessing
import os
from fuseq.timer import Timer
from fuseq.base import Base
| [
11748,
269,
21370,
198,
11748,
15095,
198,
11748,
18540,
305,
919,
278,
198,
11748,
28686,
198,
6738,
32738,
80,
13,
45016,
1330,
5045,
263,
198,
6738,
32738,
80,
13,
8692,
1330,
7308,
628
] | 3.484848 | 33 |
# Generated by Django 3.0.7 on 2020-07-01 08:32
from django.db import migrations, models
import django.db.models.deletion
| [
2,
2980,
515,
416,
37770,
513,
13,
15,
13,
22,
319,
12131,
12,
2998,
12,
486,
8487,
25,
2624,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
14208,
13,
9945,
13,
27530,
13,
2934,
1616,
295,
... | 2.818182 | 44 |
#!/usr/bin/python3
import matplotlib.pyplot as plt
import numpy as np
import argparse
parser = argparse.ArgumentParser(
description="Pass path to the data storage location")
parser.add_argument(
"-p",
"--path",
type=str,
help="Path to the result data of run_mandelbrot that should be plotted.")
par... | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
1822,
29572,
198,
198,
48610,
796,
1822,
29572,
13,
28100,
1713,
46677,
7,
19... | 2.702857 | 175 |
import requests
from bs4 import BeautifulSoup
if __name__ == "__main__":
print(ask_catty())
| [
11748,
7007,
198,
6738,
275,
82,
19,
1330,
23762,
50,
10486,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
3601,
7,
2093,
62,
9246,
774,
28955,
198
] | 2.75 | 36 |
# -*- coding: utf-8 -*-
'''Top-level package for Henchman.
Has the following modules:
diagnostics
learning
selection
plotting
Package is under active development.
'''
__author__ = '''Feature Labs Team'''
__email__ = 'team@featurelabs.com'
__version__ = '0.0.4'
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
7061,
6,
9126,
12,
5715,
5301,
329,
6752,
354,
805,
13,
198,
19242,
262,
1708,
13103,
25,
198,
220,
220,
220,
220,
220,
220,
220,
6689,
34558,
198,
220,
220,
22... | 2.478992 | 119 |
"""
this module impplements the morse potential
"""
import copy
from collections import OrderedDict
import numpy as np
from pypospack.potential import PairPotential
from pypospack.potential import determine_symbol_pairs
__author__ = "Eugene J. Ragasa"
__copyright__ = "Copyright (C) 2017"
__license__ = "Simplified BSD L... | [
37811,
198,
5661,
8265,
545,
381,
3639,
262,
2146,
325,
2785,
198,
37811,
198,
11748,
4866,
198,
6738,
17268,
1330,
14230,
1068,
35,
713,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
12972,
1930,
8002,
13,
13059,
1843,
1330,
39645,
25... | 2.146402 | 2,015 |
import logging
import warnings
from dataclasses import dataclass
from fastapi import (
BackgroundTasks,
Depends,
Request
)
from fastapi_mail import (
FastMail,
MessageSchema
)
from ...api.dependencies.mail import MailSenderMarker
from ...resources.mail.subjects import (
CONFIRMATION_MAIL_SUBJE... | [
11748,
18931,
198,
11748,
14601,
198,
6738,
4818,
330,
28958,
1330,
4818,
330,
31172,
198,
198,
6738,
3049,
15042,
1330,
357,
198,
220,
220,
220,
25353,
51,
6791,
11,
198,
220,
220,
220,
2129,
2412,
11,
198,
220,
220,
220,
19390,
198,... | 2.828244 | 262 |
# Copyright (C) 2004-present Facebook. All Rights Reserved
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import absolute_import
"""Add, change, or delete a route on FBOSS controller
"""
import contextlib
import ipaddr
from argparse impo... | [
2,
15069,
357,
34,
8,
5472,
12,
25579,
3203,
13,
1439,
6923,
33876,
198,
198,
6738,
11593,
37443,
834,
1330,
7297,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
19... | 2.644909 | 766 |
import numpy as np
import pandas as pd
from sklearn.linear_model import Ridge
def batch_scoring(model: Ridge, df: pd.DataFrame) -> np.array:
"""[Batch scoring method]
Args:
model (Ridge): [Model]
df (pd.DataFrame): [Input dataframe for prediction]
Returns:
np.array : Returns pred... | [
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
6738,
1341,
35720,
13,
29127,
62,
19849,
1330,
20614,
628,
198,
4299,
15458,
62,
46536,
7,
19849,
25,
20614,
11,
47764,
25,
279,
67,
13,
6601,
19778,
8,
4613,
... | 2.639241 | 158 |
from django.urls import include, path
from . import views
urlpatterns = [
# Examples:
# url(r'^$', 'celery_try.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
path('', views.index,name='index'),
path('poll_state', views.poll_state,name='poll_state'),
]
| [
6738,
42625,
14208,
13,
6371,
82,
1330,
2291,
11,
3108,
198,
6738,
764,
1330,
5009,
198,
198,
6371,
33279,
82,
796,
685,
198,
220,
220,
220,
1303,
21066,
25,
198,
220,
220,
220,
1303,
19016,
7,
81,
6,
61,
3,
3256,
705,
7015,
88,
... | 2.534483 | 116 |
# Copyright 2018 SME Virtual Network Contributors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required ... | [
2,
15069,
2864,
9447,
36,
15595,
7311,
25767,
669,
13,
1439,
6923,
33876,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
1... | 4.285106 | 235 |
# This sample tests a case where a method calls its own constructor
# with a specialized type that uses its own TypeVar and the expected
# type is a protocol.
from typing import Generic, TypeVar, Protocol
T = TypeVar("T")
| [
2,
770,
6291,
5254,
257,
1339,
810,
257,
2446,
3848,
663,
898,
23772,
198,
2,
351,
257,
16976,
2099,
326,
3544,
663,
898,
5994,
19852,
290,
262,
2938,
198,
2,
2099,
318,
257,
8435,
13,
198,
198,
6738,
19720,
1330,
42044,
11,
5994,
... | 3.964912 | 57 |
"""endpoint stuff goes here?"""
import flask
import flask_restful
from . import endpoints
blueprint = flask.Blueprint(
'auth',
__name__,
url_prefix='/auth',
)
api = flask_restful.Api(blueprint)
api.add_resource(endpoints.Login, '/login')
| [
37811,
437,
4122,
3404,
2925,
994,
1701,
15931,
198,
11748,
42903,
198,
11748,
42903,
62,
2118,
913,
198,
198,
6738,
764,
1330,
886,
13033,
198,
198,
17585,
4798,
796,
42903,
13,
14573,
4798,
7,
198,
220,
220,
220,
705,
18439,
3256,
1... | 2.73913 | 92 |
import unittest
import comandante as cli
import comandante.errors as error
from comandante.inner.test import suppress_output, capture_output
class ArgumentTests(unittest.TestCase):
"""Integration tests for cli-argument passing."""
| [
11748,
555,
715,
395,
198,
198,
11748,
401,
392,
12427,
355,
537,
72,
198,
11748,
401,
392,
12427,
13,
48277,
355,
4049,
198,
6738,
401,
392,
12427,
13,
5083,
13,
9288,
1330,
18175,
62,
22915,
11,
8006,
62,
22915,
628,
198,
198,
487... | 3.366197 | 71 |
from __future__ import annotations
import ujson
from .data_model import RefactorRuleSpec
from .log_utils import Console
__all__ = ["load_spec"]
logger = Console(name=__name__).logger
| [
6738,
11593,
37443,
834,
1330,
37647,
198,
198,
11748,
334,
17752,
198,
198,
6738,
764,
7890,
62,
19849,
1330,
6524,
11218,
31929,
22882,
198,
6738,
764,
6404,
62,
26791,
1330,
24371,
198,
198,
834,
439,
834,
796,
14631,
2220,
62,
16684... | 3.241379 | 58 |
from __future__ import absolute_import, division, print_function, unicode_literals
import torch
import torch.nn as nn
from torch.autograd import grad
import logging
logger = logging.getLogger(__name__)
| [
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
11,
7297,
11,
3601,
62,
8818,
11,
28000,
1098,
62,
17201,
874,
198,
198,
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
6738,
28034,
13,
2306,
519,
6335,
1330,
3915,
198,... | 3.416667 | 60 |
import subprocess
from flask import Flask
app = Flask(__name__)
@app.route("/rce/<string:payload>")
@app.route("/rce/<string:payload>")
@app.route("/rce/<int:payload>")
| [
11748,
850,
14681,
198,
198,
6738,
42903,
1330,
46947,
628,
198,
1324,
796,
46947,
7,
834,
3672,
834,
8,
628,
198,
31,
1324,
13,
38629,
7203,
14,
81,
344,
14,
27,
8841,
25,
15577,
2220,
29,
4943,
628,
198,
31,
1324,
13,
38629,
720... | 2.405405 | 74 |
from ai.go.go_player import GoPlayer
import numpy as np
| [
6738,
257,
72,
13,
2188,
13,
2188,
62,
7829,
1330,
1514,
14140,
201,
198,
11748,
299,
32152,
355,
45941,
201,
198,
201,
198,
201,
198,
201,
198,
201,
198
] | 2.275862 | 29 |
from __future__ import print_function
import PILasOPENCV as Image
import cv2
im = Image.open("lena.jpg")
numpy_image = im.getim()
print(type(numpy_image), numpy_image.shape)
cv2.imshow("numpy_image", numpy_image)
cv2.waitKey(0)
# import numpy image
new_im = Image.new("RGB", (512, 512), "black")
new_im.show()
... | [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
201,
198,
11748,
350,
4146,
292,
3185,
24181,
53,
355,
7412,
201,
198,
11748,
269,
85,
17,
201,
198,
320,
796,
7412,
13,
9654,
7203,
75,
8107,
13,
9479,
4943,
201,
198,
77,
32152,
62,
... | 2.359477 | 153 |
# -*- coding: utf-8 -*-
"""Common types used across the project."""
import typing
import numpy as np
ArrayLike = typing.Union[typing.List[float], np.ndarray]
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
17227,
3858,
973,
1973,
262,
1628,
526,
15931,
198,
11748,
19720,
198,
198,
11748,
299,
32152,
355,
45941,
198,
198,
19182,
7594,
796,
19720,
13,
38176,
58,
774,
... | 2.909091 | 55 |
'''
This module contains various utilitarian functions used by other modules.
'''
#***************************************
# Imports
#***************************************
import sys
import os
import stat
import threading
import logging, logging.handlers
from dependencies.pefile import pefile
import globs
impo... | [
7061,
6,
198,
1212,
8265,
4909,
2972,
48239,
5499,
973,
416,
584,
13103,
13,
198,
7061,
6,
198,
2,
17174,
2466,
8162,
198,
2,
1846,
3742,
198,
2,
17174,
2466,
8162,
198,
11748,
25064,
198,
198,
11748,
28686,
198,
198,
11748,
1185,
1... | 2.080462 | 5,804 |
from flask_login import UserMixin | [
6738,
42903,
62,
38235,
1330,
11787,
35608,
259
] | 4.125 | 8 |
#
# Heavily inspired from https://github.com/IINemo/docker-syntaxnet_rus://github.com/IINemo/docker-syntaxnet_rus
# itself inspired from https://github.com/tensorflow/models/blob/master/syntaxnet/syntaxnet/parser_eval.py
# just modified to be able to call wrapper several time for the same process
#
"""A program to ann... | [
2,
198,
2,
679,
615,
813,
7867,
422,
3740,
1378,
12567,
13,
785,
14,
40,
1268,
41903,
14,
45986,
12,
1837,
41641,
3262,
62,
14932,
1378,
12567,
13,
785,
14,
40,
1268,
41903,
14,
45986,
12,
1837,
41641,
3262,
62,
14932,
198,
2,
234... | 3.611789 | 492 |
cores = {'branco':'\033[30m','vermelho':'\033[31m','amarelo':'\033[33m'}
m = float(input('\033[32mDigite uma distância em metros: '))
km = m/1000
hm = m/100
dam = m/10
dm = m*10
c = m*100
mm = m*1000
print(f'{(cores["branco"])}A medida de {(cores["vermelho"])}{m}m {(cores["branco"])}equivale a:\n{(cores["amarelo"])}{k... | [
66,
2850,
796,
1391,
6,
1671,
47699,
10354,
6,
59,
44427,
58,
1270,
76,
41707,
332,
17694,
8873,
10354,
6,
59,
44427,
58,
3132,
76,
41707,
321,
533,
5439,
10354,
6,
59,
44427,
58,
2091,
76,
6,
92,
198,
198,
76,
796,
12178,
7,
15... | 1.854478 | 268 |
import inspect
import numpy as np
from primitives_ubc.regCCFS.src.utils.commonUtils import sVT
from primitives_ubc.regCCFS.src.utils.commonUtils import is_numeric
from primitives_ubc.regCCFS.src.utils.commonUtils import fastUnique
from primitives_ubc.regCCFS.src.utils.commonUtils import queryIfColumnsVary
from primitiv... | [
11748,
10104,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
2684,
20288,
62,
549,
66,
13,
2301,
4093,
10652,
13,
10677,
13,
26791,
13,
11321,
18274,
4487,
1330,
264,
36392,
198,
6738,
2684,
20288,
62,
549,
66,
13,
2301,
4093,
10652,
... | 2.34368 | 8,054 |
import glob
import os
from math import ceil
from typing import Dict, Any, List, Optional, Sequence
import gym
import numpy as np
import torch
import torch.nn as nn
import torch.optim as optim
from torch.optim.lr_scheduler import LambdaLR
from torchvision import models
from constants import ABS_PATH_OF_TOP_LEVEL_DIR
f... | [
11748,
15095,
198,
11748,
28686,
198,
6738,
10688,
1330,
2906,
346,
198,
6738,
19720,
1330,
360,
713,
11,
4377,
11,
7343,
11,
32233,
11,
45835,
198,
198,
11748,
11550,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28034,
198,
11748,
2... | 2.285141 | 1,494 |
__author__ = 'Harutya'
__date__ = '2021/07/07'
from app.server import opggApi
from flask import Blueprint
from utils import harutyaResponse
servlet = Blueprint('harutya-lol-api', __name__)
@servlet.route('/tiers')
@servlet.route('/heroes')
@servlet.route('/hero/<string:hero_name>')
| [
834,
9800,
834,
796,
705,
13587,
3935,
64,
6,
198,
834,
4475,
834,
796,
705,
1238,
2481,
14,
2998,
14,
2998,
6,
198,
198,
6738,
598,
13,
15388,
1330,
1034,
1130,
32,
14415,
198,
6738,
42903,
1330,
39932,
198,
6738,
3384,
4487,
1330,... | 2.645455 | 110 |
from pycocotools.coco import COCO
import numpy as np
import skimage.io as io
import os.path
import sys
if len(sys.argv) <= 1:
print("Data Type argument needs to be `val2014` or `train2014`.")
sys.exit(1)
dataDir = './data'
dataType = sys.argv[1]
fdir = '%s/%s' % (dataDir, dataType)
if not os.path.exists(fdir):
... | [
6738,
12972,
66,
420,
313,
10141,
13,
66,
25634,
1330,
327,
4503,
46,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
1341,
9060,
13,
952,
355,
33245,
198,
11748,
28686,
13,
6978,
198,
11748,
25064,
198,
198,
361,
18896,
7,
17597,
13,... | 2.188482 | 382 |
#
# Copyright (c) 2020, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | [
2,
198,
2,
15069,
357,
66,
8,
12131,
11,
15127,
23929,
44680,
6234,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
... | 2.795158 | 537 |
## TODO: define the convolutional neural network architecture
import torch
import torch.nn as nn
import torch.nn.functional as F
# can use the below import should you choose to initialize the weights of your Net
import torch.nn.init as I
## TODO: define the convolutional neural network architecture
| [
2235,
16926,
46,
25,
8160,
262,
3063,
2122,
282,
17019,
3127,
10959,
198,
198,
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
198,
2,
460,
779,
262,
2174,
1330,
815,
345,
... | 3.817073 | 82 |
# Jackson Negus | [
2,
6612,
13496,
385
] | 3.75 | 4 |
import gensim
from gensim.models import Word2Vec, word2vec, KeyedVectors
import numpy as np
import os
import sys
import warnings
import string
import multiprocessing
import string
import pickle
import pandas as pd
if not sys.warnoptions:
warnings.simplefilter("ignore")
import nltk
nltk.download('averaged_perceptron_t... | [
11748,
308,
641,
320,
198,
6738,
308,
641,
320,
13,
27530,
1330,
9678,
17,
53,
721,
11,
1573,
17,
35138,
11,
7383,
276,
53,
478,
669,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
14601,
198,
... | 2.45073 | 548 |
from sklearn.model_selection import train_test_split as tts
| [
6738,
1341,
35720,
13,
19849,
62,
49283,
1330,
4512,
62,
9288,
62,
35312,
355,
256,
912,
198
] | 3.529412 | 17 |
from .. import util
import torch
from torch import nn, Tensor
from typing import Union, Tuple, List, Iterable, Dict
from torch.nn import functional as F
class MarginMSELoss(nn.Module):
"""
Computes the Margin MSE loss between the query, positive passage and negative passage. This loss
is used to train den... | [
6738,
11485,
1330,
7736,
198,
11748,
28034,
198,
6738,
28034,
1330,
299,
77,
11,
309,
22854,
198,
6738,
19720,
1330,
4479,
11,
309,
29291,
11,
7343,
11,
40806,
540,
11,
360,
713,
198,
6738,
28034,
13,
20471,
1330,
10345,
355,
376,
628... | 2.342593 | 324 |
import ida_kernwin
import codecs
g_icon_data_ascii = (
b"89504E470D0A1A0A0000000D4948445200000020000000200806000000737A7A",
b"F4000000097048597300000EC300000EC301C76FA8640000001974455874536F",
b"667477617265007777772E696E6B73636170652E6F72679BEE3C1A0000036249",
b"4441545885ADD75B8855651407F0DF... | [
11748,
220,
3755,
62,
74,
1142,
5404,
201,
198,
201,
198,
11748,
40481,
82,
201,
198,
201,
198,
70,
62,
4749,
62,
7890,
62,
292,
979,
72,
796,
357,
201,
198,
220,
220,
220,
275,
1,
4531,
33580,
36,
27790,
35,
15,
32,
16,
32,
1... | 1.657931 | 1,450 |
import torch
from torch.autograd import Variable
import torch.nn as nn
from scipy.stats import special_ortho_group
| [
11748,
28034,
198,
6738,
28034,
13,
2306,
519,
6335,
1330,
35748,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
6738,
629,
541,
88,
13,
34242,
1330,
2041,
62,
1506,
78,
62,
8094,
628,
198
] | 3.342857 | 35 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#---------------------------------------------------------------------------------
#
# ,--.
# | |-. ,---. ,---. ,--.--.,--,--,
# ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
10097,
1783,
12,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
... | 2.395683 | 2,224 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
File : resource.py
Author : Zerui Qin
CreateDate : 2018-12-07 10:00:00
Note : 设备资源信息,POST
"""
from flask_restful import Resource
from flask_restful import fields
from flask_restful import marshal_with
from flask_restful import reqparse
from src.restfuls.apps.db_model imp... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
198,
8979,
1058,
8271,
13,
9078,
198,
13838,
1058,
37028,
9019,
31482,
198,
16447,
10430,
1058,
2864,
12,
1065,
12... | 2.131675 | 2,453 |
import sys
import pytest
from draconic.exceptions import *
class TestOperations:
"""
Tests the operations with a custom handler:
ast.Add: self._safe_add,
ast.Sub: self._safe_sub,
ast.Mult: self._safe_mult,
ast.Pow: self._safe_power,
ast.LShift: self._safe_lshift,
"""
| [
11748,
25064,
198,
198,
11748,
12972,
9288,
198,
198,
6738,
27733,
291,
13,
1069,
11755,
1330,
1635,
628,
628,
628,
198,
4871,
6208,
18843,
602,
25,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
30307,
262,
4560,
351,
257,
2183,
2136... | 2.536585 | 123 |
import abc
from dataclasses import dataclass
from datetime import date, datetime, timedelta, timezone
import time
from typing import List, Optional
import asyncio
from github import Github
import pytz
import httpx
import gidgethub.httpx
import matplotlib.pyplot as plt
from bokeh.plotting import figure, output_file, sho... | [
11748,
450,
66,
198,
6738,
4818,
330,
28958,
1330,
4818,
330,
31172,
198,
6738,
4818,
8079,
1330,
3128,
11,
4818,
8079,
11,
28805,
12514,
11,
640,
11340,
198,
11748,
640,
198,
6738,
19720,
1330,
7343,
11,
32233,
198,
11748,
30351,
952,
... | 1.847059 | 1,615 |
from investing_algorithm_framework import Position
from tests.resources import TestBase
| [
6738,
14771,
62,
282,
42289,
62,
30604,
1330,
23158,
198,
6738,
5254,
13,
37540,
1330,
6208,
14881,
628
] | 4.944444 | 18 |
import cv2
import numpy
from os import path, walk, listdir, makedirs
from __config__ import *
face_detector = cv2.CascadeClassifier(CASCADE_FILE)
face_recognizer = cv2.face.LBPHFaceRecognizer_create()
# build dataset for face recognizer
# train face recognizer
print("buil... | [
11748,
269,
85,
17,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
198,
11748,
299,
32152,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
198,
6738... | 2.487013 | 154 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
CIE Lab Colourspace
===================
Defines the *CIE Lab* colourspace transformations:
- :func:`XYZ_to_Lab`
- :func:`Lab_to_XYZ`
- :func:`Lab_to_LCHab`
- :func:`LCHab_to_Lab`
See Also
--------
`CIE Lab Colourspace IPython Notebook
<http://nbviewer.ipytho... | [
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,
34,
10008,
3498,
38773,
13200,
198,
4770,
18604,
198,
198,
7469,
1127,
262,
1635,
34,
10008,
3498,
9,
... | 2.128338 | 2,696 |
'''
Data used in Section 5.3 of the following article:
S. Bortolomiol, V. Lurkin, M. Bierlaire (2021).
A Simulation-Based Heuristic to Find Approximate Equilibria with
Disaggregate Demand Models. Transportation Science 55(5):1025-1045.
https://doi.org/10.1287/trsc.2021.1071
Discrete choice model derived from th... | [
7061,
6,
201,
198,
6601,
973,
287,
7275,
642,
13,
18,
286,
262,
1708,
2708,
25,
201,
198,
50,
13,
347,
419,
349,
296,
1669,
11,
569,
13,
47851,
5116,
11,
337,
13,
347,
959,
5031,
557,
357,
1238,
2481,
737,
201,
198,
32,
41798,
... | 2.703804 | 736 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1)
#
# (1) Kamaelia Contributors are listed in the AUTHORS file and at
# http://www.kamaelia.org/AUTHORS - please extend this file,
# not this notice.
#
# Licensed under the Apache License... | [
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,
15069,
3050,
3517,
32250,
10501,
290,
509,
1689,
25418,
25767,
669,
7,
16,
8,
198,
2,
198,
2,
357,
16,
... | 3.090535 | 729 |
#
# Copyright (c) 2015-2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
import argparse
from netaddr import IPAddress
import signal
import socket
import sys
from wsgiref import simple_server
from nfv_common import config
from nfv_common import debug
from nfv_common import selobj
from nfv_common ... | [
2,
198,
2,
15069,
357,
66,
8,
1853,
12,
5304,
3086,
5866,
11998,
11,
3457,
13,
198,
2,
198,
2,
30628,
55,
12,
34156,
12,
33234,
7483,
25,
24843,
12,
17,
13,
15,
198,
2,
198,
11748,
1822,
29572,
198,
6738,
2010,
29851,
1330,
2796... | 2.212647 | 1,961 |
import numpy as np
# w is the vector of weights
w = np.array([0.1, 0.2, 0.3])
# matrices as input datasets
data1 = np.array([0.3, 1.5, 2.8])
data2 = np.array([0.5, 0.4, 0.9])
data3 = np.array([2.3, 3.1, 0.5])
data_in = np.array([data1[0],data2[0],data3[0]])
print('Predicted value: $%.2f' % ... | [
11748,
299,
32152,
355,
45941,
201,
198,
201,
198,
201,
198,
2,
266,
318,
262,
15879,
286,
19590,
201,
198,
86,
796,
45941,
13,
18747,
26933,
15,
13,
16,
11,
657,
13,
17,
11,
657,
13,
18,
12962,
220,
201,
198,
201,
198,
2,
2603,... | 1.927374 | 179 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Ed Mountjoy
#
import sys
import os
import argparse
import pandas as pd
import numpy as np
from sklearn.preprocessing import quantile_transform
import seaborn as sns
import matplotlib.pyplot as plt
from matplotlib import rcParams
# from scipy.stats import rankdata
def... | [
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,
1717,
5628,
2633,
198,
2,
198,
198,
11748,
25064,
198,
11748,
28686,
198,
11748,
1822,
29572,
198,
11748,
... | 2.143498 | 1,338 |
from twine.cli import dispatch
| [
6738,
665,
500,
13,
44506,
1330,
27965,
628
] | 4 | 8 |
import sys
import subprocess
# from fHDHR.exceptions import TunerError
| [
11748,
25064,
198,
11748,
850,
14681,
198,
198,
2,
422,
277,
10227,
17184,
13,
1069,
11755,
1330,
13932,
263,
12331,
628
] | 3.47619 | 21 |
# 用于显示层view的消息解析与组装的工具模块
# 自报家门数据格式: self:{username}:{any info}
# 请求广播格式:broadcast:{username}:{info wanted to send}, 注:广播消息根据实际到达client的时间排序
# 单播数据报格式: {time of client msg creating}:{friendusername}:{info wanted to send},注:单播消息的数据顺序由接收客户端负责
# 上下文:
# 剩余工作
# 完成该工具模块
# 完成view层的各种事件 | [
2,
13328,
242,
101,
12859,
236,
23626,
122,
163,
97,
118,
161,
109,
224,
1177,
21410,
162,
114,
230,
162,
223,
107,
164,
100,
96,
162,
252,
238,
10310,
236,
163,
119,
226,
35318,
21410,
32432,
98,
17739,
115,
162,
101,
94,
161,
25... | 0.944444 | 324 |
import sys
from colour import Color
from random import random, randint | [
11748,
25064,
198,
6738,
9568,
1330,
5315,
198,
6738,
4738,
1330,
4738,
11,
43720,
600
] | 4.666667 | 15 |
"""Queenbee output types for functions.
For more information on plugins see plugin module.
"""
from typing import Union
from pydantic import constr, Field
from ..common import PathOutput, ItemType
class FunctionFileOutput(PathOutput):
"""Function File output."""
type: constr(regex='^FunctionFileOutput$') =... | [
37811,
32466,
20963,
5072,
3858,
329,
5499,
13,
198,
198,
1890,
517,
1321,
319,
20652,
766,
13877,
8265,
13,
198,
37811,
198,
198,
6738,
19720,
1330,
4479,
198,
6738,
279,
5173,
5109,
1330,
1500,
81,
11,
7663,
198,
198,
6738,
11485,
1... | 3.228448 | 928 |
#!/usr/bin/env python
#From Stephanie Greer's github
"""
:Author: Ji Research Group/Stanford Genome Technology Center
:Contact: sgreer2@stanford.edu
:Creation date: 24.11.2016
:Description:
This script counts the number of unique barcodes in windows around the SV breakpoints
This script requires:
- all of the pyt... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
2,
4863,
26085,
11955,
263,
338,
33084,
198,
198,
37811,
198,
198,
25,
13838,
25,
29380,
4992,
4912,
14,
32140,
3841,
5215,
462,
8987,
3337,
198,
25,
17829,
25,
264,
16694,
263,
... | 2.626812 | 1,104 |
import FWCore.ParameterSet.Config as cms
process = cms.Process("TEST")
process.load("CondCore.DBCommon.CondDBCommon_cfi")
process.CondDBCommon.connect = 'sqlite_file:testhv.db'
process.CondDBCommon.DBParameters.authenticationPath = '.'
#process.DTHVCheckByAbsoluteValues = cms.Service("DTHVCheckByAbsoluteValues")
pro... | [
11748,
48849,
14055,
13,
36301,
7248,
13,
16934,
355,
269,
907,
198,
198,
14681,
796,
269,
907,
13,
18709,
7203,
51,
6465,
4943,
198,
14681,
13,
2220,
7203,
25559,
14055,
13,
35,
2749,
2002,
261,
13,
25559,
35,
2749,
2002,
261,
62,
... | 2.105892 | 1,171 |
from flask import jsonify
from flask_restful import Resource
from . import app
| [
6738,
42903,
1330,
33918,
1958,
198,
6738,
42903,
62,
2118,
913,
1330,
20857,
198,
198,
6738,
764,
1330,
598,
628,
198
] | 3.904762 | 21 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# =============================================================================
# @file test_generate.py
# @author Albert Puig (albert.puig@cern.ch)
# @date 27.02.2019
# =============================================================================
"""Basic dimensionali... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
38093,
25609,
198,
2,
2488,
7753,
220,
220,
1332,
62,
8612,
378,
13,
9078,
198,
2,
2488,
9800,
9966,
11634,
... | 2.070645 | 1,458 |