content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
self.DataField = DataField
self.numberOfFields = len(self.DataField) | [
220,
220,
220,
220,
220,
220,
220,
2116,
13,
6601,
15878,
796,
6060,
15878,
198,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
17618,
5189,
15878,
82,
796,
18896,
7,
944,
13,
6601,
15878,
8
] | 2.333333 | 36 |
# -*- coding: utf8 -*-
'''
Created on Jun 24, 2013
sys
@author: hidura
'''
from datetime import datetime
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from multiprocessing import Process, Queue
import os
import smtplib
import julian
import jdcal
# import astropy.time as astime
# ... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
23,
532,
9,
12,
198,
7061,
6,
198,
41972,
319,
7653,
1987,
11,
2211,
198,
17597,
198,
31,
9800,
25,
24519,
5330,
198,
7061,
6,
198,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
3053,
13... | 1.854181 | 2,990 |
import asyncio
import pytest
from modmail.utils.general import await_nonblocking, nonblocking
@pytest.mark.asyncio
async def test_await_nonblocking() -> None:
"""Ensure that we can execute coroutines asynchronously from a sync task."""
a = 0
task = await_nonblocking(test(1))
assert a == 0
await... | [
11748,
30351,
952,
198,
198,
11748,
12972,
9288,
198,
198,
6738,
953,
4529,
13,
26791,
13,
24622,
1330,
25507,
62,
13159,
41938,
11,
1729,
41938,
628,
198,
31,
9078,
9288,
13,
4102,
13,
292,
13361,
952,
198,
292,
13361,
825,
1332,
62,... | 2.969697 | 264 |
from src.setting import *
| [
6738,
12351,
13,
33990,
1330,
1635,
628,
628,
628,
628,
628
] | 3.181818 | 11 |
import logging
import pickle
from shutil import copyfile
import torch
import torch.nn as nn
import platalea.dataset as D
import platalea.mtl as M
from platalea.score import score, score_asr
torch.manual_seed(123)
batch_size = 8
hidden_size = 1024
dropout = 0.0
feature_fname = 'mfcc_delta_features.pt'
language = 'jp'... | [
11748,
18931,
198,
11748,
2298,
293,
198,
6738,
4423,
346,
1330,
4866,
7753,
198,
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
198,
11748,
40315,
1000,
64,
13,
19608,
292,
316,
355,
360,
198,
11748,
40315,
1000,
64,
... | 1.977298 | 1,806 |
from setuptools import setup
setup(
name="static-type-checker",
version="0.1",
description="Simple runtime type checking",
url="https://github.com/twolodzko/typed",
author="Tymoteusz Wołodźko",
author_email="twolodzko+typed@gmail.com",
license="MIT",
py_modules=["typed"],
python_req... | [
6738,
900,
37623,
10141,
1330,
9058,
198,
198,
40406,
7,
198,
220,
220,
220,
1438,
2625,
12708,
12,
4906,
12,
9122,
263,
1600,
198,
220,
220,
220,
2196,
2625,
15,
13,
16,
1600,
198,
220,
220,
220,
6764,
2625,
26437,
19124,
2099,
106... | 2.370629 | 143 |
spaces = int(input())
steps =0
while(spaces > 0):
if(spaces >= 5):
spaces -= 5
steps += 1
elif(spaces >= 4):
spaces -= 4
steps += 1
elif(spaces >= 3):
spaces -= 3
steps += 1
elif(spaces >= 2):
spaces -= 2
steps += 1
elif(spaces >= 1):
... | [
2777,
2114,
796,
493,
7,
15414,
28955,
198,
20214,
796,
15,
198,
4514,
7,
2777,
2114,
1875,
657,
2599,
198,
220,
220,
220,
611,
7,
2777,
2114,
18189,
642,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
9029,
48185,
642,
198,
220,
2... | 1.918367 | 196 |
import matplotlib.pyplot as plt
import numpy as np
import json
with open('../tokamaks.json') as f:
machines = json.load(f)
# by type of machine
plt.figure()
types_labels = ["Tokamaks", "Stellarators", "Inertial", "Others"]
types_machine = ["tokamak", "stellarator", "inertial", "alternate_concept"]
bottom = 0
cou... | [
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
33918,
198,
198,
4480,
1280,
10786,
40720,
83,
482,
321,
4730,
13,
17752,
11537,
355,
277,
25,
198,
220,
220,
220,
8217,
796,
339... | 2.593114 | 639 |
#
# PySNMP MIB module HH3C-DLDP-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HH3C-DLDP-MIB
# Produced by pysmi-0.3.4 at Wed May 1 13:26:04 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 201... | [
2,
198,
2,
9485,
15571,
7378,
337,
9865,
8265,
47138,
18,
34,
12,
19260,
6322,
12,
8895,
33,
357,
4023,
1378,
16184,
76,
489,
8937,
13,
785,
14,
79,
893,
11632,
8,
198,
2,
7054,
45,
13,
16,
2723,
2393,
1378,
14,
14490,
14,
67,
... | 2.700802 | 4,863 |
#List all the patches, files
import os,sys
import numpy as np
import tensorflow as tf
from skimage.filters import gaussian
import yaml
import skimage
from skimage import io
from skimage.transform import resize,rotate
from imgaug import augmenters as iaa
import random
from skimage.transform import rescale, rotate
sys.p... | [
2,
8053,
477,
262,
16082,
11,
3696,
198,
11748,
28686,
11,
17597,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
6738,
1341,
9060,
13,
10379,
1010,
1330,
31986,
31562,
198,
11748,
331,
43695,
198,
11... | 1.79643 | 7,506 |
from .scenario_generators import *
| [
6738,
764,
1416,
39055,
62,
8612,
2024,
1330,
1635,
201,
198
] | 3.272727 | 11 |
date=b'2022/01/09 11:17:29'
| [
4475,
28,
65,
6,
1238,
1828,
14,
486,
14,
2931,
220,
1367,
25,
1558,
25,
1959,
6,
198
] | 1.611111 | 18 |
import importlib
from importlib.abc import Loader, MetaPathFinder
import sys
import time
import warnings
if __name__ == '__main__':
_test()
| [
11748,
1330,
8019,
198,
6738,
1330,
8019,
13,
39305,
1330,
8778,
263,
11,
30277,
15235,
37,
5540,
198,
11748,
25064,
198,
11748,
640,
198,
11748,
14601,
628,
628,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
... | 3.125 | 48 |
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | [
2,
19617,
28,
40477,
12,
23,
198,
2,
16529,
35937,
198,
2,
15069,
357,
66,
8,
5413,
10501,
13,
1439,
2489,
10395,
13,
198,
2,
49962,
739,
262,
17168,
13789,
13,
4091,
13789,
13,
14116,
287,
262,
1628,
6808,
329,
198,
2,
5964,
1321... | 3.081633 | 490 |
from flask import Blueprint
prod_bp = Blueprint('prod_bp', __name__,
template_folder='templates',
static_folder='static')
from . import routes
| [
6738,
42903,
1330,
39932,
198,
198,
1676,
67,
62,
46583,
796,
39932,
10786,
1676,
67,
62,
46583,
3256,
11593,
3672,
834,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
11055,
62,
43551,
1163... | 2.355263 | 76 |
from discord.ext import commands
| [
6738,
36446,
13,
2302,
1330,
9729,
628,
198
] | 4.375 | 8 |
from jupytermodule.finder import open | [
6738,
474,
929,
88,
4354,
375,
2261,
13,
22805,
1330,
1280
] | 3.363636 | 11 |
from time import perf_counter
from pathlib import Path
from stixcore.io.fits.processors import FitsL1Processor
from stixcore.products.product import Product
from stixcore.util.logging import get_logger
logger = get_logger(__name__)
if __name__ == '__main__':
tstart = perf_counter()
fits_path = Path('/User... | [
6738,
640,
1330,
23035,
62,
24588,
198,
6738,
3108,
8019,
1330,
10644,
198,
198,
6738,
336,
844,
7295,
13,
952,
13,
21013,
13,
14681,
669,
1330,
376,
896,
43,
16,
18709,
273,
198,
6738,
336,
844,
7295,
13,
29498,
13,
11167,
1330,
87... | 2.573276 | 232 |
from smogon import SmogonMoveset
import json
import re
from mega_items import mega_items
from math import floor
import logging
logging.basicConfig()
if __name__ == "__main__":
poke = Pokemon("Bulbasaur")
#Team: game/showdown
#Pokemon: handlers.py
| [
6738,
895,
519,
261,
1330,
2439,
519,
261,
44,
5241,
316,
198,
11748,
33918,
198,
11748,
302,
198,
6738,
23465,
62,
23814,
1330,
23465,
62,
23814,
198,
6738,
10688,
1330,
4314,
198,
198,
11748,
18931,
198,
6404,
2667,
13,
35487,
16934,
... | 2.965517 | 87 |
"""Unit test package for fetch_coordinates."""
| [
37811,
26453,
1332,
5301,
329,
21207,
62,
37652,
17540,
526,
15931,
198
] | 3.916667 | 12 |
# Generated by Django 3.2.10 on 2022-01-04 08:48
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
17,
13,
940,
319,
33160,
12,
486,
12,
3023,
8487,
25,
2780,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.875 | 32 |
version = (2, 8, 12)
version_string = "2.8.12"
release_date = "2017.04.25"
| [
9641,
796,
357,
17,
11,
807,
11,
1105,
8,
198,
9641,
62,
8841,
796,
366,
17,
13,
23,
13,
1065,
1,
198,
20979,
62,
4475,
796,
366,
5539,
13,
3023,
13,
1495,
1,
198
] | 2.205882 | 34 |
from scrapy import cmdline
years=['2011']
for year in years:
query = f"scrapy crawl api -a year='{year}' -s HTTPCACHE_ENABLED=1 -o ../../../../db/{year}.json"
cmdline.execute(query.split()) | [
6738,
15881,
88,
1330,
23991,
1370,
198,
19002,
28,
17816,
9804,
20520,
198,
1640,
614,
287,
812,
25,
198,
220,
220,
220,
12405,
796,
220,
277,
1,
1416,
2416,
88,
27318,
40391,
532,
64,
614,
11639,
90,
1941,
92,
6,
532,
82,
7154,
... | 2.475 | 80 |
from rest_framework import viewsets
from rest_framework.response import Response
from rest_framework.permissions import IsAuthenticatedOrReadOnly
from base.models import (
Event,
IOBSource,
ActionType,
IOBType,
Body,
IOBStatus,
VoteType,
UsStates,
Organization,
AccessLevel,... | [
6738,
1334,
62,
30604,
1330,
5009,
1039,
198,
6738,
1334,
62,
30604,
13,
26209,
1330,
18261,
198,
6738,
1334,
62,
30604,
13,
525,
8481,
1330,
1148,
47649,
3474,
5574,
5569,
10049,
198,
6738,
2779,
13,
27530,
1330,
357,
198,
220,
220,
... | 2.899254 | 268 |
import logging
import re
from itertools import groupby
from typing import Dict, Iterator, List, Pattern, Tuple
import discord
from discord.ext import commands
from brotherchris.cogs import utils
log: logging.Logger = logging.getLogger(__name__)
class WordPolice(commands.Cog):
"""
Sends a message with word ... | [
11748,
18931,
198,
11748,
302,
198,
6738,
340,
861,
10141,
1330,
1448,
1525,
198,
6738,
19720,
1330,
360,
713,
11,
40806,
1352,
11,
7343,
11,
23939,
11,
309,
29291,
198,
198,
11748,
36446,
198,
6738,
36446,
13,
2302,
1330,
9729,
198,
... | 2.36043 | 1,673 |
import sqlite3
import pyupbit
import datetime
import pandas as pd
from setting import db_backtest
from matplotlib import pyplot as plt
# noinspection PyMethodMayBeStatic
if __name__ == "__main__":
start = datetime.datetime.now()
BackTesterCoin()
end = datetime.datetime.now()
print(f" 백테스팅 소요시간 {... | [
11748,
44161,
578,
18,
198,
11748,
12972,
929,
2545,
198,
11748,
4818,
8079,
198,
11748,
19798,
292,
355,
279,
67,
198,
6738,
4634,
1330,
20613,
62,
1891,
9288,
198,
6738,
2603,
29487,
8019,
1330,
12972,
29487,
355,
458,
83,
628,
198,
... | 2.375887 | 141 |
# Licensed Materials - Property of IBM
# Copyright IBM Corp. 2016
from __future__ import print_function
from streamsx.topology.topology import *
import streamsx.topology.context
import pubsub_functions;
# Application that publishes a stream
# of integers with the topic 'simple'.
#
# This app is submitted to a distribu... | [
2,
49962,
24310,
532,
14161,
286,
19764,
198,
2,
15069,
19764,
11421,
13,
1584,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
6738,
15190,
87,
13,
4852,
1435,
13,
4852,
1435,
1330,
1635,
198,
11748,
15190,
87,
13,
4852,
143... | 3.814103 | 156 |
import os
import argparse
import math
import json
import time
import sys
import subprocess
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Extract video frames from a video")
parser.add_argument("--input", default="./videos/video_test.mov/", required=True)
parser.add_argument("-... | [
11748,
28686,
198,
11748,
1822,
29572,
198,
11748,
10688,
198,
11748,
33918,
198,
11748,
640,
198,
11748,
25064,
198,
11748,
850,
14681,
628,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
30751,
... | 3 | 215 |
"""
그림 1. 제안하는 방법에서 사용하는 감마톤 필터의 파형
기존 그림 파형 4개 -> 새로운 그림 파형 6개
"""
import numpy as np
import matplotlib.pyplot as plt
plt.rcParams['font.family'] = 'Times New Roman'
plt.rcParams['font.size'] = 20
fig = plt.figure(figsize=(10, 10))
ax = fig.subplots()
ax2 = ax.twinx()
gammatone_filter = np.fromfile("../fft.raw", dty... | [
37811,
198,
166,
115,
116,
167,
99,
120,
352,
13,
23821,
254,
250,
168,
243,
230,
47991,
246,
167,
232,
242,
31619,
108,
102,
167,
110,
243,
168,
245,
238,
168,
226,
250,
23821,
8955,
168,
248,
102,
47991,
246,
167,
232,
242,
220,... | 1.797364 | 607 |
import numpy as np
import tensorflow as tf
ip_tensor_8x8 = np.array([[-0.8520309,-0.8490718, 1.129514,-1.3910682,-1.3713549,-1.2450725,-0.64018744, -0.58683217],
[0.61351526,-0.7573147,-1.0944875,-1.3194267,-1.0564152,-1.0523492,-0.8647979, -0.5105319],
[-1.... | [
11748,
299,
32152,
355,
45941,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
198,
541,
62,
83,
22854,
62,
23,
87,
23,
796,
220,
45941,
13,
18747,
26933,
58,
12,
15,
13,
5332,
1238,
26895,
12095,
15,
13,
23,
2920,
2998,
1507,
11,
... | 1.834582 | 1,868 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from pyramid.i18n import TranslationStringFactory
TranslationString = TranslationStringFactory("hypothesis")
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
6738,
27944,
13,
72,
1507,
77,
1330,
33322,
10100,
22810,
198,
198,
48313,
10100,
796,
33322,
10100,
22810... | 3.55102 | 49 |
import typing
import numpy as np
from abc import ABC, abstractmethod
from view.python_core.areas import frame_mask2perim
class BaseROIData(ABC):
"""
Abstract class to define ROI Data API
"""
def __init__(self, label, basic_text_description="A ROI"):
"""
Initialize label
:param... | [
11748,
19720,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
450,
66,
1330,
9738,
11,
12531,
24396,
198,
6738,
1570,
13,
29412,
62,
7295,
13,
533,
292,
1330,
5739,
62,
27932,
17,
525,
320,
628,
198,
4871,
7308,
13252,
2389,
1045,
7,
... | 2.559862 | 1,161 |
"""
This file only contains test for the different milestones during the project during development and potentially
contains errors in the implementation
"""
import numpy as np
from scipy.optimize import curve_fit
import matplotlib.pyplot as plt
from tqdm import tqdm, trange
from mpi4py import MPI
import os
from la... | [
37811,
198,
1212,
2393,
691,
4909,
1332,
329,
262,
1180,
41926,
1141,
262,
1628,
1141,
2478,
290,
6196,
198,
3642,
1299,
8563,
287,
262,
7822,
198,
37811,
198,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
629,
541,
88,
13,
40085,
10... | 2.661885 | 488 |
"""
pool_sampling.py, SciML-SCD, RAL
Samples data from the test set and transfers them
into the training set for the purposes of active
learning. Go to https://www.kdnuggets.com/2018/10/introduction-active-learning.html
for other means of sampling.
"""
import numpy as np
| [
37811,
198,
7742,
62,
37687,
11347,
13,
9078,
11,
10286,
5805,
12,
6173,
35,
11,
371,
1847,
198,
198,
50,
12629,
1366,
422,
262,
1332,
900,
290,
16395,
606,
220,
198,
20424,
262,
3047,
900,
329,
262,
4959,
286,
4075,
220,
198,
40684... | 3.22093 | 86 |
print( '<' + __name__ + ' name=\'' + __file__ + '\'>' )
import IceRayPy.core.material.instruction.operation.clamp
import IceRayPy.core.material.instruction.operation.mapping
import IceRayPy.core.material.instruction.operation.switch
import IceRayPy.core.material.instruction.operation.coord2d
import IceRayPy.... | [
4798,
7,
705,
27,
6,
1343,
11593,
3672,
834,
1343,
705,
1438,
28,
59,
7061,
1343,
220,
220,
11593,
7753,
834,
1343,
705,
43054,
29,
6,
1267,
201,
198,
201,
198,
11748,
6663,
19591,
20519,
13,
7295,
13,
33665,
13,
8625,
2762,
13,
2... | 2.913462 | 208 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Common Python library imports
# Pip package imports
from flask_security import SQLAlchemyUserDatastore as BaseSQLAlchemyUserDatastore
# Internal package imports
class SQLAlchemyUserDatastore(BaseSQLAlchemyUserDatastore):
"""Overridden because our User model can h... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
8070,
11361,
5888,
17944,
198,
2,
25149,
5301,
17944,
198,
6738,
42903,
62,
12961,
1330,
16363,
2348,
26599,
12... | 2.798365 | 367 |
# %%
from copy import deepcopy
from time import time
import numpy as np
from HARK.utilities import plotFuncs
from HARK.ConsumptionSaving.ConsIndShockModel import (
init_idiosyncratic_shocks
)
from HARK.ConsumptionSaving.ConsRepAgentModel import (
RepAgentConsumerType,
RepAgentMarkovConsumerType,
)
# %% [m... | [
2,
43313,
198,
6738,
4866,
1330,
2769,
30073,
198,
6738,
640,
1330,
640,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
367,
14175,
13,
315,
2410,
1330,
7110,
24629,
6359,
198,
6738,
367,
14175,
13,
9444,
24098,
50,
2703,
13,
9444,
54... | 2.543988 | 1,364 |
import pandas as pd
from .DtnAbstractParser import DtnAbstractParser
from pydantic import validator, PositiveFloat
from typing import Optional
class DtnScenarioParser(DtnAbstractParser):
""" Validator for tag ``scenario in YAML configuration file """
# Simulation epoch
epoch : str = pd.Timestamp.now()
... | [
11748,
19798,
292,
355,
279,
67,
198,
6738,
764,
35,
34106,
23839,
46677,
1330,
360,
34106,
23839,
46677,
198,
6738,
279,
5173,
5109,
1330,
4938,
1352,
11,
33733,
43879,
198,
6738,
19720,
1330,
32233,
198,
198,
4871,
360,
34106,
3351,
3... | 3.310811 | 148 |
from flask import Flask, request, render_template, redirect, url_for, session, g, abort, flash, make_response, jsonify, Response
from datetime import timedelta, datetime
from models import IDC, Asset,Asset_offline , User, db
from common.utility import auth_login_required, hashpass, login_required
from common.util im... | [
6738,
42903,
1330,
46947,
11,
2581,
11,
8543,
62,
28243,
11,
18941,
11,
19016,
62,
1640,
11,
6246,
11,
308,
11,
15614,
11,
7644,
11,
787,
62,
26209,
11,
33918,
1958,
11,
18261,
198,
6738,
4818,
8079,
1330,
28805,
12514,
11,
4818,
80... | 1.897579 | 6,278 |
import numpy as np
import glob
import os
import argparse
import re
import scipy.io as sio
from collections import defaultdict
from enum import Enum
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('--dataname', '-d', type=str, required=True)
parser.add_argument('--exppath',... | [
11748,
299,
32152,
355,
45941,
198,
11748,
15095,
198,
11748,
28686,
198,
11748,
1822,
29572,
198,
11748,
302,
198,
11748,
629,
541,
88,
13,
952,
355,
264,
952,
198,
6738,
17268,
1330,
4277,
11600,
198,
6738,
33829,
1330,
2039,
388,
198... | 1.736237 | 3,306 |
# RULES TO FOLLOW
"""
(1) Variables should follow this naming convention: variableName
(2) Functions should follow this naming convention: function_name
(3) If possible and if it improves the codebase, refactor a function by adding a parameter
(4) If possible use booleans, instead of variables of type i... | [
2,
371,
6239,
1546,
5390,
11895,
44765,
198,
37811,
198,
220,
220,
220,
357,
16,
8,
15965,
2977,
815,
1061,
428,
19264,
9831,
25,
7885,
5376,
198,
220,
220,
220,
357,
17,
8,
40480,
815,
1061,
428,
19264,
9831,
25,
2163,
62,
3672,
... | 2.877406 | 1,974 |
""" Import libraries """
import math
import matplotlib.pyplot as plt
import keras
import pandas as pd
import numpy as np
import getopt
from decimal import Decimal
from keras.models import Sequential
from keras.layers import Dense
from keras.layers import LSTM
from keras.layers import Dropout
from keras.layers import *
... | [
37811,
17267,
12782,
37227,
198,
11748,
10688,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
41927,
292,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
651,
8738,
198,
6... | 3.125523 | 239 |
"""
Example program to form a ciccular polasised beam, pass through
linear polarsier and do a polar plot of the output intensity.
"""
import poptics.jones as j
import matplotlib.pyplot as plt
from poptics.tio import getFloat
import math
main()
| [
37811,
198,
220,
220,
220,
17934,
1430,
284,
1296,
257,
269,
291,
10440,
755,
292,
1417,
15584,
11,
1208,
832,
198,
220,
220,
220,
14174,
755,
945,
959,
290,
466,
257,
13559,
7110,
286,
262,
5072,
12245,
13,
198,
37811,
628,
198,
11... | 3.227848 | 79 |
'''
接口地址:
https://cnodejs.org/api
get请求
1、功能查询数据,对数据库执行查询操作
2、请求参数在url上可以看到
'''
import requests
#请求地址
url = 'https://cnodejs.org/api/v1/topics'
#请求参数
params = {
'page':1,
'tab':'job',
'limit':5,
'mdrender':'false'
}
#创建请求
r = requests.get(url,params)
assert r.status_code == 200
print(r.json())
| [
7061,
6,
198,
162,
236,
98,
20998,
96,
28839,
108,
161,
251,
222,
171,
120,
248,
198,
5450,
1378,
66,
17440,
8457,
13,
2398,
14,
15042,
198,
1136,
46237,
115,
162,
109,
224,
198,
16,
23513,
27950,
253,
47797,
121,
162,
253,
98,
46... | 1.331915 | 235 |
################################################################################
# Modules and functions import statements
################################################################################
import pdb
from helpers.app_helpers import *
from helpers.page_helpers import *
from helpers.jinja2_helpers import ... | [
29113,
29113,
14468,
198,
2,
3401,
5028,
290,
5499,
1330,
6299,
198,
29113,
29113,
14468,
198,
198,
11748,
279,
9945,
198,
6738,
49385,
13,
1324,
62,
16794,
364,
1330,
1635,
198,
6738,
49385,
13,
7700,
62,
16794,
364,
1330,
1635,
198,
... | 4.537549 | 253 |
import sys
import cv2
sys.path.append("../src/")
| [
11748,
25064,
198,
11748,
269,
85,
17,
198,
198,
17597,
13,
6978,
13,
33295,
7203,
40720,
10677,
14,
4943,
198
] | 2.5 | 20 |
from pydash.objects import pick
import datetime
from chalicelib.models import Form, serialize_model
from bson.objectid import ObjectId
from chalicelib.util.renameKey import renameKey, replaceKey
from pydash.objects import set_
| [
6738,
279,
5173,
1077,
13,
48205,
1330,
2298,
198,
11748,
4818,
8079,
198,
6738,
442,
282,
291,
417,
571,
13,
27530,
1330,
5178,
11,
11389,
1096,
62,
19849,
198,
6738,
275,
1559,
13,
15252,
312,
1330,
9515,
7390,
198,
6738,
442,
282,
... | 3.318841 | 69 |
#############################################################################
# Copyright (c) 2018, Voila Contributors #
# #
# Distributed under the terms of the BSD 3-Clause License. #
# ... | [
29113,
29113,
7804,
4242,
2,
198,
2,
15069,
357,
66,
8,
2864,
11,
569,
9437,
64,
25767,
669,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
... | 2.317287 | 457 |
import json;
from ..cStack import cStack;
from ..dxConfig import dxConfig;
| [
11748,
33918,
26,
198,
198,
6738,
11485,
66,
25896,
1330,
269,
25896,
26,
198,
6738,
11485,
34350,
16934,
1330,
44332,
16934,
26,
198
] | 3.304348 | 23 |
from boatsandjoy_api.core.responses import ResponseBuilderInterface
| [
6738,
16659,
392,
2633,
62,
15042,
13,
7295,
13,
16733,
274,
1330,
18261,
32875,
39317,
628
] | 4.3125 | 16 |
import os
from tick.array.serialize import tick_double_sparse2d_from_file, \
tick_double_array_from_file
from tick.linear_model.model_logreg import ModelLogReg
from tick.prox.prox_elasticnet import ProxElasticNet
from tick.solver.saga import SAGA
# Create this dataset with benchmark_util
dirpath = os.path.dirnam... | [
11748,
28686,
198,
198,
6738,
4378,
13,
18747,
13,
46911,
1096,
1330,
4378,
62,
23352,
62,
82,
29572,
17,
67,
62,
6738,
62,
7753,
11,
3467,
198,
220,
220,
220,
4378,
62,
23352,
62,
18747,
62,
6738,
62,
7753,
198,
198,
6738,
4378,
... | 2.418764 | 437 |
# coding: utf-8
"""Tar archive filesystems.
"""
from __future__ import absolute_import
from __future__ import unicode_literals
import io
import sys
import time
import tarfile
import datetime
import six
from ... import errors
from ...info import Info
from ...mode import Mode
from ...time import datetime_to_epoch
from... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
37811,
47079,
15424,
29905,
82,
13,
198,
37811,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
198,
11748,
33245,
198,
11... | 2.276036 | 2,583 |
import tensorflow as tf
from tensorflow.python.platform import gfile
from tensorflow.python.framework import tensor_util
import sys
import pickle
if len(sys.argv) < 3:
print("Usage: python extract_tf_weights.py <frozen_model.pb> <weights_file.pickle>")
frozen_model = sys.argv[1]
weights_file = sys.argv[2]
wei... | [
11748,
11192,
273,
11125,
355,
48700,
198,
6738,
11192,
273,
11125,
13,
29412,
13,
24254,
1330,
308,
7753,
198,
6738,
11192,
273,
11125,
13,
29412,
13,
30604,
1330,
11192,
273,
62,
22602,
198,
11748,
25064,
198,
11748,
2298,
293,
628,
1... | 2.703488 | 172 |
# -*- coding: utf-8 -*-
"""
-------------------------------------------------
File Name: 62
Author : anglemiku
Eamil : anglemiku.v@gmail.com
date: 2020/1/10
-------------------------------------------------
Change Activity: 2020/1/10:
-------------------------------... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
47232,
12,
198,
220,
220,
9220,
6530,
25,
220,
220,
220,
220,
220,
220,
220,
8190,
198,
220,
220,
6434,
1058,
220,
220,
220,
220,
220,
220,
220,
220,
220... | 2.230392 | 204 |
from output.models.nist_data.list_pkg.name.schema_instance.nistschema_sv_iv_list_name_length_2_xsd.nistschema_sv_iv_list_name_length_2 import NistschemaSvIvListNameLength2
__all__ = [
"NistschemaSvIvListNameLength2",
]
| [
6738,
5072,
13,
27530,
13,
77,
396,
62,
7890,
13,
4868,
62,
35339,
13,
3672,
13,
15952,
2611,
62,
39098,
13,
77,
1023,
2395,
2611,
62,
21370,
62,
452,
62,
4868,
62,
3672,
62,
13664,
62,
17,
62,
87,
21282,
13,
77,
1023,
2395,
261... | 2.333333 | 96 |
from pathlib import Path
import albumentations as A
import numpy as np
from PIL import Image
from torch.utils.data import Dataset
from mobile_seg.const import DATA_LFW_DIR
from mylib.albumentations.augmentations.transforms import MyCoarseDropout
# %%
if __name__ == '__main__':
# %%
import matplotlib.pyp... | [
6738,
3108,
8019,
1330,
10644,
198,
198,
11748,
435,
65,
1713,
602,
355,
317,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
350,
4146,
1330,
7412,
198,
6738,
28034,
13,
26791,
13,
7890,
1330,
16092,
292,
316,
198,
198,
6738,
5175,
62... | 1.851942 | 824 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import logging
import colorlog
DEBUG = '[D]'
INFO = '[*]'
SUCCESS = '[+]'
WARNING = '[X]'
ERROR = '[!]'
LOG_FORMAT = '%(log_color)s%(levelname)s%(reset)s %(message_log_color)s%(message)s'
DATE_FORMAT = '%H:%M:%S'
LOG_COLORS = {
DEBUG : 'bold,white',
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
18931,
198,
11748,
3124,
6404,
198,
198,
30531,
220,
220,
796,
44438,
35,
49946,
198,
10778,
220,
220,
220,
... | 1.958816 | 777 |
from tests.test_helper import *
| [
6738,
5254,
13,
9288,
62,
2978,
525,
1330,
1635,
198
] | 3.2 | 10 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# SPDX-License-Identifier: MIT
# Copyright (c) 2015-2021 Nicolas Iooss
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, inc... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
30628,
55,
12,
34156,
12,
33234,
7483,
25,
17168,
198,
2,
15069,
357,
66,
8,
1853,
12,
1238,
2481,
29737,
27853,
... | 3.624352 | 386 |
print('number has int float and complex')
# int
number_int_value = 100
# float
number_float_value = 99.99
# 复数
number_complex_value = complex(number_int_value, number_float_value)
number_int_const_age = 99
# 全部大写代表常量
NUMBER_INT_AGE = 10
print(number_int_value, number_float_value, number_complex_value, number_int_const... | [
4798,
10786,
17618,
468,
493,
12178,
290,
3716,
11537,
198,
2,
493,
198,
17618,
62,
600,
62,
8367,
796,
1802,
198,
2,
12178,
198,
17618,
62,
22468,
62,
8367,
796,
7388,
13,
2079,
198,
2,
36469,
235,
46763,
108,
198,
17618,
62,
41887... | 2.673469 | 294 |
#!/usr/bin/env python
""" Stercus Language Lexer """
import argparse
from constants import BRACKETS
def lex(src):
""" Convert the Stercus source code into a list of tokens. """
lexed_src = ''
for char in src:
if char in BRACKETS['ALL']:
lexed_src += ' ' + char + ' '
else:
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
37811,
18949,
9042,
15417,
17210,
263,
37227,
198,
198,
11748,
1822,
29572,
198,
198,
6738,
38491,
1330,
11177,
8120,
32716,
198,
198,
4299,
31191,
7,
10677,
2599,
198,
220,
220,
220,
37... | 2.37931 | 174 |
import speech_recognition as sr
import webbrowser
import time
import playsound
import os
import random
from gtts import gTTS
from time import ctime
r = sr.Recognizer()
time.sleep(1)
speak('How can I help you')
while 1:
voice_data = audio()
#speak(voice_data) #test if capturing audio at all... | [
11748,
4046,
62,
26243,
653,
355,
19677,
220,
201,
198,
11748,
3992,
40259,
201,
198,
11748,
640,
201,
198,
11748,
5341,
633,
201,
198,
11748,
28686,
201,
198,
11748,
4738,
201,
198,
6738,
308,
83,
912,
1330,
308,
51,
4694,
201,
198,
... | 2.674419 | 129 |
import os
from typing import List
from application.data_preparation.models.column_name import ColumnName
from domain.models.paths import Paths
from domain.services.contract.abstract_converter_service import AbstractConverterService
from shared.helpers.json_to_csv_converter import json_to_csv
| [
11748,
28686,
198,
6738,
19720,
1330,
7343,
198,
198,
6738,
3586,
13,
7890,
62,
3866,
1845,
341,
13,
27530,
13,
28665,
62,
3672,
1330,
29201,
5376,
198,
6738,
7386,
13,
27530,
13,
6978,
82,
1330,
10644,
82,
198,
6738,
7386,
13,
30416,... | 3.597561 | 82 |
"""
Melhore o DESAFIO 061, perguntando para o usuário se ele quer mostrar mais alguns termos. O programa encerra quando
ele disser que quer mostrar 0 termos.
"""
print('Gerador de PA')
print('-=' * 10)
primeiro = int(input('Primeiro termo: '))
razao = int(input('Razão da PA: '))
termo = primeiro
cont = 1
to... | [
37811,
201,
198,
21102,
71,
382,
267,
22196,
8579,
9399,
657,
5333,
11,
583,
70,
2797,
25440,
31215,
267,
514,
84,
6557,
27250,
384,
9766,
42517,
749,
20040,
285,
15152,
435,
44265,
3381,
418,
13,
440,
1430,
64,
551,
2189,
430,
627,
... | 2.339286 | 280 |
from django.apps import AppConfig
| [
6738,
42625,
14208,
13,
18211,
1330,
2034,
16934,
628
] | 3.888889 | 9 |
from django.shortcuts import redirect
from django.utils import timezone
from rest_framework import serializers
from rest_framework.exceptions import ValidationError
from .models import *
| [
6738,
42625,
14208,
13,
19509,
23779,
1330,
18941,
201,
198,
6738,
42625,
14208,
13,
26791,
1330,
640,
11340,
201,
198,
6738,
1334,
62,
30604,
1330,
11389,
11341,
201,
198,
6738,
1334,
62,
30604,
13,
1069,
11755,
1330,
3254,
24765,
12331,... | 3.6 | 55 |
from pandasdmx.api import Request, read_sdmx, read_url
from pandasdmx.source import add_source, list_sources
from pandasdmx.util import Resource
from pandasdmx.writer import write as to_pandas
import logging
__all__ = [
'Request',
'Resource',
'add_source',
'list_sources',
'read_sdmx',
'read_url... | [
6738,
19798,
292,
36020,
87,
13,
15042,
1330,
19390,
11,
1100,
62,
21282,
36802,
11,
1100,
62,
6371,
198,
6738,
19798,
292,
36020,
87,
13,
10459,
1330,
751,
62,
10459,
11,
1351,
62,
82,
2203,
198,
6738,
19798,
292,
36020,
87,
13,
22... | 2.39521 | 167 |
import toga
from toga_winforms.libs import WinForms
from travertino.size import at_least
from .base import Widget
| [
11748,
284,
4908,
198,
6738,
284,
4908,
62,
5404,
23914,
13,
8019,
82,
1330,
7178,
8479,
82,
198,
6738,
1291,
1851,
2879,
13,
7857,
1330,
379,
62,
293,
459,
198,
198,
6738,
764,
8692,
1330,
370,
17484,
628
] | 3.052632 | 38 |
from cryptography.hazmat.primitives.asymmetric.utils import encode_dss_signature | [
6738,
45898,
13,
71,
1031,
6759,
13,
19795,
20288,
13,
4107,
3020,
19482,
13,
26791,
1330,
37773,
62,
67,
824,
62,
12683,
1300
] | 3.478261 | 23 |
import importlib
import os
import sys
from flask import Flask, Response
from flask.json import JSONEncoder
from api.app import ext
from config import config
from db.base import session
| [
11748,
1330,
8019,
198,
11748,
28686,
198,
11748,
25064,
198,
198,
6738,
42903,
1330,
46947,
11,
18261,
198,
6738,
42903,
13,
17752,
1330,
19449,
27195,
12342,
198,
198,
6738,
40391,
13,
1324,
1330,
1070,
198,
6738,
4566,
1330,
4566,
198,... | 3.86 | 50 |
import sys
import os
# to proj root
sys.path.insert(
0,
os.path.dirname(os.path.dirname(
os.path.dirname(os.path.abspath(__file__))))
)
| [
11748,
25064,
198,
11748,
28686,
198,
2,
284,
386,
73,
6808,
198,
17597,
13,
6978,
13,
28463,
7,
198,
220,
220,
220,
657,
11,
198,
220,
220,
220,
28686,
13,
6978,
13,
15908,
3672,
7,
418,
13,
6978,
13,
15908,
3672,
7,
198,
220,
... | 2.125 | 72 |
"""Expectation maximization algorithm.
Lead authors: Thomas Gerald and Hadi Zaatiti.
"""
import logging
from sklearn.base import BaseEstimator, ClusterMixin
import geomstats.backend as gs
from geomstats.learning._template import TransformerMixin
from geomstats.learning.frechet_mean import FrechetMean, variance
from... | [
37811,
3109,
806,
341,
12991,
1634,
11862,
13,
198,
198,
20451,
7035,
25,
5658,
27027,
290,
367,
9189,
44210,
265,
8846,
13,
198,
37811,
198,
198,
11748,
18931,
198,
198,
6738,
1341,
35720,
13,
8692,
1330,
7308,
22362,
320,
1352,
11,
... | 2.332995 | 8,877 |
# A computer vision script to detect common objects in a specified image. Uses OpenCV and YOLO data set.
# Made by Andrew Banonis | @andrewbanonis
# Before you start, install the prerequistes:
# opencv-python
# cvlib
# matplotlib
# tensorflow
import cv2
import matplotlib.pyplot as plt
import cvlib ... | [
2,
317,
3644,
5761,
4226,
284,
4886,
2219,
5563,
287,
257,
7368,
2939,
13,
36965,
4946,
33538,
290,
575,
3535,
46,
1366,
900,
13,
201,
198,
2,
14446,
416,
6858,
10274,
43524,
930,
2488,
392,
1809,
3820,
43524,
201,
198,
201,
198,
2,... | 2.814815 | 351 |
import json
import os
import logging
from biothings.utils.version import get_software_info
logger = logging.getLogger(__name__)
| [
198,
11748,
33918,
198,
11748,
28686,
198,
11748,
18931,
198,
6738,
3182,
849,
654,
13,
26791,
13,
9641,
1330,
651,
62,
43776,
62,
10951,
198,
198,
6404,
1362,
796,
18931,
13,
1136,
11187,
1362,
7,
834,
3672,
834,
8,
198
] | 3.25 | 40 |
import copy
from wingedsheep.carcassonne.carcassonne_game_state import CarcassonneGameState
from wingedsheep.carcassonne.objects.actions.action import Action
from wingedsheep.carcassonne.objects.actions.meeple_action import MeepleAction
from wingedsheep.carcassonne.objects.actions.pass_action import PassAction
from wi... | [
11748,
4866,
198,
198,
6738,
8539,
5379,
258,
538,
13,
66,
5605,
562,
47476,
13,
66,
5605,
562,
47476,
62,
6057,
62,
5219,
1330,
1879,
66,
562,
47476,
8777,
9012,
198,
6738,
8539,
5379,
258,
538,
13,
66,
5605,
562,
47476,
13,
48205,... | 3.182203 | 236 |
###############################################################################
##
## Copyright (C) 2014 Tavendo GmbH
##
## 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:/... | [
29113,
29113,
7804,
4242,
21017,
198,
2235,
198,
2235,
220,
15069,
357,
34,
8,
1946,
41489,
31110,
402,
2022,
39,
198,
2235,
198,
2235,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
223... | 3.828746 | 327 |
from flask import Blueprint
bp = Blueprint('sections', __name__, template_folder='templates')
from app.sections import routes
| [
6738,
42903,
1330,
39932,
198,
198,
46583,
796,
39932,
10786,
23946,
3256,
11593,
3672,
834,
11,
11055,
62,
43551,
11639,
11498,
17041,
11537,
198,
198,
6738,
598,
13,
23946,
1330,
11926,
198
] | 4 | 32 |
# AWS S3 put using Query parameters with MFA token
import sys, os, base64, datetime, hashlib, hmac, urllib, subprocess
import requests
import mimetypes
# Key derivation functions. See:
# http://docs.aws.amazon.com/general/latest/gr/signature-v4-examples.html#signature-v4-examples-python
# Get environment variables
k... | [
2,
30865,
311,
18,
1234,
1262,
43301,
10007,
351,
337,
7708,
11241,
198,
198,
11748,
25064,
11,
28686,
11,
2779,
2414,
11,
4818,
8079,
11,
12234,
8019,
11,
289,
20285,
11,
2956,
297,
571,
11,
850,
14681,
198,
11748,
7007,
198,
11748,
... | 2.917365 | 1,791 |
import numpy as np
from threepy.core import *
from threepy.mathutils import MatrixFactory
| [
11748,
299,
32152,
355,
45941,
198,
6738,
294,
260,
538,
88,
13,
7295,
1330,
1635,
198,
6738,
294,
260,
538,
88,
13,
11018,
26791,
1330,
24936,
22810,
628
] | 3.25 | 28 |
'''lambdata- A Data Science Helper
'''
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
ONES = np.ones(100)
ONES_DF = pd.DataFrame(ONES)
class DataSci:
'''Contains useful functions for data science'''
def sqrt(n):
'''Takes any positive number and returns ... | [
7061,
6,
2543,
65,
7890,
12,
317,
6060,
5800,
5053,
525,
198,
7061,
6,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
220,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
220,
198,
11748,
384... | 2.281506 | 611 |
# -*- coding: utf-8 -*-
#
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
#
# FreeSolv from MoleculeNet for the prediction of hydration free
# energy of small molecules in water
import pandas as pd
from dgl.data.utils import get_download_dir, download, _get_d... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
198,
2,
15069,
6186,
13,
785,
11,
3457,
13,
393,
663,
29116,
13,
1439,
6923,
33876,
13,
198,
2,
30628,
55,
12,
34156,
12,
33234,
7483,
25,
24843,
12,
17,
13,
15... | 2.563314 | 1,690 |
from simple_api.adapters.graphql.graphql import GraphQLAdapter
from simple_api.adapters.utils import generate
from simple_api.django_object.django_object import DjangoObject
from simple_api.object.datatypes import StringType, ObjectType
from simple_api.adapters.graphql.utils import build_patterns
from .models import ... | [
6738,
2829,
62,
15042,
13,
324,
12126,
13,
34960,
13976,
13,
34960,
13976,
1330,
29681,
9711,
47307,
198,
6738,
2829,
62,
15042,
13,
324,
12126,
13,
26791,
1330,
7716,
198,
6738,
2829,
62,
15042,
13,
28241,
14208,
62,
15252,
13,
28241,
... | 3.535433 | 127 |
"""
mobility.py: mobility helpers for moving nodes and calculating wireless range.
"""
import heapq
import logging
import math
import threading
import time
from functools import total_ordering
from pathlib import Path
from typing import TYPE_CHECKING, Callable, Dict, List, Optional, Tuple, Union
from core import util... | [
37811,
198,
39949,
879,
13,
9078,
25,
15873,
49385,
329,
3867,
13760,
290,
26019,
12521,
2837,
13,
198,
37811,
198,
198,
11748,
24575,
80,
198,
11748,
18931,
198,
11748,
10688,
198,
11748,
4704,
278,
198,
11748,
640,
198,
6738,
1257,
31... | 2.137238 | 17,058 |
from setuppy1.words import join
if __name__ == "__main__":
main()
| [
6738,
900,
7211,
88,
16,
13,
10879,
1330,
4654,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
1388,
3419,
198
] | 2.517241 | 29 |
import matplotlib.pyplot as plt
import numpy as np
input_file=open("/home/kirill/project/data/stock_details.csv","r")
lines=input_file.readlines()
ticker=lines[0]
pattern_start_date=lines[1]
ticker_prices_string=lines[3][1:(len(lines[3])-2)].split(",")
ticker_index_string=lines[4][1:(len(lines[4])-2)].split(",")
matc... | [
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
299,
32152,
355,
45941,
198,
198,
15414,
62,
7753,
28,
9654,
7203,
14,
11195,
14,
74,
343,
359,
14,
16302,
14,
7890,
14,
13578,
62,
36604,
13,
40664,
2430,
81,
494... | 2.536713 | 572 |
from sqlalchemy import Column, ForeignKey, Table
from sqlalchemy.dialects.postgresql import UUID
from db.database import Base
event_remediation_mapping = Table(
"event_remediation_mapping",
Base.metadata,
Column(
"event_uuid",
UUID(as_uuid=True),
ForeignKey("event.uuid"),
... | [
6738,
44161,
282,
26599,
1330,
29201,
11,
8708,
9218,
11,
8655,
198,
6738,
44161,
282,
26599,
13,
38969,
478,
82,
13,
7353,
34239,
13976,
1330,
471,
27586,
198,
198,
6738,
20613,
13,
48806,
1330,
7308,
628,
198,
15596,
62,
260,
2379,
... | 2.168776 | 237 |
'''
主函数,用于运行源代码
'''
from urllib.request import urlopen, HTTPError, URLError
import pickle
import json
from bs4 import BeautifulSoup as bs
import re
from TDcup import tree_algorithm, the_module
from lxml import etree
from socket import timeout
'''
# 打开文件,读取信息,关闭文件
all_url_file = open(
"C题.pkl", "rb")
... | [
7061,
6,
201,
198,
197,
10310,
119,
49035,
121,
46763,
108,
171,
120,
234,
18796,
101,
12859,
236,
32573,
238,
26193,
234,
162,
118,
238,
47987,
163,
254,
223,
201,
198,
7061,
6,
201,
198,
6738,
2956,
297,
571,
13,
25927,
1330,
1901... | 1.601426 | 1,543 |
# -*- coding: utf-8 -*-
"""
Configuration IMPORT/EXPORT common functions
**Version:** 1.1.0b1
**Author:** CloudGenix
**Copyright:** (c) 2017, 2018 CloudGenix, Inc
**License:** MIT
**Location:** <https://github.com/CloudGenix/cloudgenix_config>
#### Synopsis
Shared functions for the config pull and devops config w... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
38149,
30023,
9863,
14,
6369,
15490,
2219,
5499,
198,
198,
1174,
14815,
25,
1174,
352,
13,
16,
13,
15,
65,
16,
198,
198,
1174,
13838,
25,
1174,
10130,
1374... | 2.383218 | 8,974 |
# -*- coding: utf-8 -*-
"""This module is about binary trees."""
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
1212,
8265,
318,
546,
13934,
7150,
526,
15931,
198
] | 2.708333 | 24 |
# Author: Nikolaos Perrakis <nikos@nannyml.com>
#
# License: Apache Software License 2.0
"""NannyML data files module."""
| [
2,
220,
6434,
25,
220,
47817,
418,
2448,
17716,
271,
220,
1279,
17187,
418,
31,
77,
7737,
4029,
13,
785,
29,
198,
2,
198,
2,
220,
13789,
25,
24843,
10442,
13789,
362,
13,
15,
198,
198,
37811,
45,
7737,
5805,
1366,
3696,
8265,
526,... | 2.76087 | 46 |
import qi
import argparse
import sys
def main(session):
"""
this example shows the deactivateTag method from the ALDialog API
"""
ALDialog = session.service("ALDialog")
ALDialog.setLanguage("English")
topic_name = ALDialog.loadTopic("/home/nao/aldialog_test_topic_file.top")
ALDialog.activa... | [
11748,
10662,
72,
198,
11748,
1822,
29572,
198,
11748,
25064,
628,
198,
4299,
1388,
7,
29891,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
428,
1672,
2523,
262,
390,
39022,
24835,
2446,
422,
262,
8355,
44204,
7824,
198,
220,
2... | 2.734964 | 981 |
from django.shortcuts import render
from django.http import HttpRequest
from django.http import HttpResponse
# Create your views here.
"""
视图就是python函数
"""
| [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
198,
6738,
42625,
14208,
13,
4023,
1330,
367,
29281,
18453,
198,
6738,
42625,
14208,
13,
4023,
1330,
367,
29281,
31077,
198,
2,
13610,
534,
5009,
994,
13,
198,
37811,
198,
164,
100,
228,... | 2.854545 | 55 |
"""
"""
from datetime import datetime
from time import time
from factory import Factory
from lockout import locker, signin_alert
from membership.models import Credential, Registration, account_types
from membership.validation import (
credential_validator,
password_match_validator,
registration_validator,... | [
37811,
198,
37811,
198,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
640,
1330,
640,
198,
198,
6738,
8860,
1330,
19239,
198,
6738,
48449,
1330,
17355,
11,
1051,
259,
62,
44598,
198,
6738,
9931,
13,
27530,
1330,
327,
445,
1843,
... | 3.668421 | 190 |
## Hardware and Module Test for Pluto SDR
#|-------------------------------------------------------------------------------
#| Author: Chase Timmins
#| Instructor: Dr. Tofighi
#| Course: EE 460
#| Project: 256-QAM Research Project
#| Create Date: December 16, 2020
#|--------------------------------------... | [
2235,
28715,
290,
19937,
6208,
329,
32217,
311,
7707,
198,
2,
91,
10097,
24305,
198,
2,
91,
220,
220,
220,
220,
220,
6434,
25,
16346,
5045,
42951,
198,
2,
91,
220,
47839,
25,
1583,
13,
309,
1659,
394,
72,
198,
2,
91,
220,
220,
2... | 2.483422 | 935 |
# Copyright (C) 2019 Vasiliy Sheredeko
#
# This software may be modified and distributed under the terms
# of the MIT license. See the LICENSE file for details.
from __future__ import annotations
import dataclasses
@dataclasses.dataclass(order=True, repr=False)
@dataclasses.dataclass(repr=False)
| [
2,
15069,
357,
34,
8,
13130,
23663,
2403,
88,
1375,
445,
988,
78,
198,
2,
198,
2,
770,
3788,
743,
307,
9518,
290,
9387,
739,
262,
2846,
198,
2,
286,
262,
17168,
5964,
13,
220,
4091,
262,
38559,
24290,
2393,
329,
3307,
13,
198,
6... | 3.293478 | 92 |
r"""collaboration is a helper module useful for handling synchronisation
in multi-client configuration as well as providing other collaboration
related methods
A simple example:
from paraview import collaboration
collaboration.processServerEvents()
"""
#============================================================... | [
81,
37811,
26000,
4820,
341,
318,
257,
31904,
8265,
4465,
329,
9041,
18305,
5612,
198,
259,
5021,
12,
16366,
8398,
355,
880,
355,
4955,
584,
12438,
198,
5363,
5050,
198,
198,
32,
2829,
1672,
25,
198,
220,
422,
1582,
615,
769,
1330,
... | 3.87664 | 381 |
# -*- coding: utf-8 -*
# Copyright (c) 2019 BuildGroup Data Services Inc.
from caravaggio_rest_api.drf_haystack.viewsets import (
CaravaggioCassandraModelViewSet,
CaravaggioHaystackGEOSearchViewSet,
CaravaggioHaystackFacetSearchViewSet,
)
from .serializers import TaskSerializerV1, TaskSearchSerializerV1, T... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
198,
2,
15069,
357,
66,
8,
13130,
10934,
13247,
6060,
6168,
3457,
13,
198,
6738,
1097,
615,
9460,
952,
62,
2118,
62,
15042,
13,
7109,
69,
62,
71,
323,
25558,
13,
1177,
28709,
... | 2.805755 | 139 |
import json
import pytz
from django.conf import settings
from rest_framework.test import APIClient, APITestCase
from blitz_api.factories import UserFactory, AdminFactory
from datetime import timedelta, datetime
from django.utils import timezone
from django.urls import reverse
from django.contrib.auth import get_user... | [
11748,
33918,
198,
198,
11748,
12972,
22877,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
1334,
62,
30604,
13,
9288,
1330,
3486,
2149,
75,
1153,
11,
3486,
2043,
395,
20448,
198,
6738,
32528,
62,
15042,
13,
22584,
1749,
133... | 3.525974 | 154 |
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
# $File: refresh.py
# $Date: Fri Dec 13 01:23:32 2013 +0800
# $Author: jiakai <jia.kai66@gmail.com>
from . import api_method
from ..util import get_current_user_id, login_required
from ukfetcher import get_user_fetcher_celery_task
@api_method('/refresh')
@login_requi... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
17,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
720,
8979,
25,
14976,
13,
9078,
198,
2,
720,
10430,
25,
19480,
4280,
1511,
5534,
25,
1954,
25,
2624,
2211,
1... | 2.526596 | 188 |
from __future__ import division
import milk.supervised.normalise
from milk.supervised.parzen import get_parzen_rbf_loocv
import numpy as np
import milksets
| [
6738,
11593,
37443,
834,
1330,
7297,
198,
11748,
7545,
13,
16668,
16149,
13,
11265,
786,
198,
6738,
7545,
13,
16668,
16149,
13,
1845,
4801,
1330,
651,
62,
1845,
4801,
62,
81,
19881,
62,
5439,
420,
85,
198,
11748,
299,
32152,
355,
4594... | 3.25 | 48 |