content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
# Pandigital prime
# Problem 41
# We shall say that an n-digit number is pandigital if it makes use of all the digits 1 to n exactly once. For example,
# 2143 is a 4-digit pandigital and is also prime.
# What is the largest n-digit pandigital prime that exists?
# https://projecteuler.net/problem=41
import datetime
i... | [
2,
16492,
328,
1287,
6994,
198,
198,
2,
20647,
6073,
198,
2,
775,
2236,
910,
326,
281,
299,
12,
27003,
1271,
318,
19798,
328,
1287,
611,
340,
1838,
779,
286,
477,
262,
19561,
352,
284,
299,
3446,
1752,
13,
1114,
1672,
11,
220,
198... | 2.313472 | 386 |
# -*- coding:utf-8 -*-
import hashlib
def md5_hex(data):
"""
shortcut of hashlib.md5('xxx').hexdigest()
>>> md5_hex('123')
'202cb962ac59075b964b07152d234b70'
"""
return hashlib.md5(data).hexdigest()
def md5_stream(stream, block_size=8192):
"""Compute md5 checksum from stream"""
md5 ... | [
2,
532,
9,
12,
19617,
25,
40477,
12,
23,
532,
9,
12,
198,
11748,
12234,
8019,
628,
198,
4299,
45243,
20,
62,
33095,
7,
7890,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
29401,
286,
12234,
8019,
13,
9132,
20,
10786,
31811,... | 2.039427 | 279 |
#! /usr/bin/env python
"""
Copyright 2010-2018 University Of Southern California
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 appl... | [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
21015,
198,
37811,
198,
15269,
3050,
12,
7908,
2059,
3226,
8050,
3442,
198,
198,
26656,
15385,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
5832,
743,
407,
... | 1.910523 | 11,556 |
import graphene
from graphene_django import DjangoObjectType
from app.models import Person, Family
schema = graphene.Schema(query=Query, mutation=Mutation)
| [
11748,
42463,
198,
6738,
42463,
62,
28241,
14208,
1330,
37770,
10267,
6030,
198,
198,
6738,
598,
13,
27530,
1330,
7755,
11,
7884,
198,
220,
220,
220,
220,
198,
15952,
2611,
796,
42463,
13,
27054,
2611,
7,
22766,
28,
20746,
11,
15148,
... | 3.521739 | 46 |
from shipmaster.core.plugins import Plugin
| [
6738,
4074,
9866,
13,
7295,
13,
37390,
1330,
42636,
628,
198
] | 4.090909 | 11 |
dtype = 'float32'
import os
os.environ['THEANO_FLAGS'] = f'floatX={dtype},device=cuda'
import pymc3 as pm
import numpy as np
N, P = 100000, 100
n_iter = 100000
X = np.random.randn(N, P).astype(dtype)
beta = np.random.randn(P, 1).astype(dtype)
eps = np.random.randn(N, 1).astype(dtype)
y = X @ beta + eps
wit... | [
67,
4906,
796,
705,
22468,
2624,
6,
198,
198,
11748,
28686,
198,
418,
13,
268,
2268,
17816,
10970,
1565,
46,
62,
38948,
50,
20520,
796,
277,
6,
22468,
55,
34758,
67,
4906,
5512,
25202,
28,
66,
15339,
6,
198,
198,
11748,
279,
4948,
... | 2.206422 | 218 |
from math import ceil
import uuid
from sqlalchemy import create_engine
import hashlib
from datetime import datetime, timedelta
engine = create_engine(
'mysql+pymysql://zd:zhangding@101.132.145.148:3306/axf_project'
)
| [
6738,
10688,
1330,
2906,
346,
201,
198,
201,
198,
11748,
334,
27112,
201,
198,
6738,
44161,
282,
26599,
1330,
2251,
62,
18392,
201,
198,
11748,
12234,
8019,
201,
198,
6738,
4818,
8079,
1330,
4818,
8079,
11,
28805,
12514,
201,
198,
201,
... | 2.401961 | 102 |
from sys import stdin
from collections import Counter
two, three = 0, 0
for id in stdin.readlines():
counter = Counter(id)
if 2 in counter.values():
two += 1
if 3 in counter.values():
three += 1
print(two*three)
| [
6738,
25064,
1330,
14367,
259,
198,
6738,
17268,
1330,
15034,
198,
198,
11545,
11,
1115,
796,
657,
11,
657,
198,
1640,
4686,
287,
14367,
259,
13,
961,
6615,
33529,
198,
220,
220,
220,
3753,
796,
15034,
7,
312,
8,
198,
220,
220,
220,... | 2.5 | 100 |
"""
Базовый класс создаёт таблицу (название | поле ввода) в соответствии с переданными названиями.
На его оснве сделан ещё один класс добавляющий к нему заголовок.
Есть заготовка для работы с COM портом, её нужно дописать для корректной работы
Все это компануется в один класс, имеющий два раздела для вывода и ввода д... | [
37811,
198,
140,
239,
16142,
140,
115,
25443,
110,
45035,
140,
117,
12466,
118,
30143,
16142,
21727,
21727,
220,
21727,
25443,
115,
43666,
16142,
141,
239,
20375,
220,
20375,
16142,
140,
109,
30143,
18849,
141,
228,
35072,
357,
22177,
161... | 1.461377 | 3,340 |
from django import template
register = template.Library()
@register.filter
def result_of(fight, user):
"""Returns result of a fight relative to the user.
So this:
User {{ entry.user }}
{% if fight.x.user == entry.user %}
{{ fight.result_of_x }}
{% else %}
... | [
6738,
42625,
14208,
1330,
11055,
198,
198,
30238,
796,
11055,
13,
23377,
3419,
628,
198,
31,
30238,
13,
24455,
198,
4299,
1255,
62,
1659,
7,
15481,
11,
2836,
2599,
198,
220,
220,
220,
37227,
35561,
1255,
286,
257,
1907,
3585,
284,
262... | 2.139963 | 543 |
# Copyright 2015
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | [
2,
15069,
1853,
198,
2,
1439,
6923,
33876,
13,
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,
220,
220,
220,
407,
779,
428,
2393,
2845,
287,
... | 2.525994 | 654 |
from http import HTTPStatus
from http.server import SimpleHTTPRequestHandler
from typing import Optional
import time
import base64
import database
from profile import read_userid_cookie
| [
6738,
2638,
1330,
14626,
19580,
198,
6738,
2638,
13,
15388,
1330,
17427,
40717,
18453,
25060,
198,
6738,
19720,
1330,
32233,
198,
11748,
640,
198,
11748,
2779,
2414,
198,
198,
11748,
6831,
198,
6738,
7034,
1330,
1100,
62,
7220,
312,
62,
... | 4.395349 | 43 |
from datetime import datetime
from pytz import timezone as pytz_timezone
from pytz.exceptions import UnknownTimeZoneError
from django.utils import timezone
from rest_framework import status
from rest_framework.exceptions import APIException
from .utils import (
map_exceptions as map_exceptions_utility,
get_... | [
6738,
4818,
8079,
1330,
4818,
8079,
198,
198,
6738,
12972,
22877,
1330,
640,
11340,
355,
12972,
22877,
62,
2435,
11340,
198,
6738,
12972,
22877,
13,
1069,
11755,
1330,
16185,
7575,
26961,
12331,
198,
198,
6738,
42625,
14208,
13,
26791,
13... | 2.830696 | 1,896 |
"""Contains general ccino utilities."""
from __future__ import absolute_import
from .get_func_args import get_func_args, get_num_args
from .load_module import load_module
from .make_builtin import make_builtin
from .redirect_print import redirect_print
| [
37811,
4264,
1299,
2276,
36624,
2879,
20081,
526,
15931,
198,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
198,
6738,
764,
1136,
62,
20786,
62,
22046,
1330,
651,
62,
20786,
62,
22046,
11,
651,
62,
22510,
62,
22046,
198,
6... | 3.445946 | 74 |
#!/usr/bin/env python
"""
runner test
"""
# Import Modules
import pygame as pg
from frameRunner.FrameRunner import FrameRunner
from Animation import createBySheet
from PuyoAnima import puyoAnima
width = 1800
height = 1000
# Game Over
# this calls the 'main' function when this script is executed
if __name__ =... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
37811,
220,
198,
16737,
1332,
198,
37811,
628,
198,
2,
17267,
3401,
5028,
198,
11748,
12972,
6057,
355,
23241,
198,
198,
6738,
5739,
49493,
13,
19778,
49493,
1330,
25184,
49493,
198,
673... | 3.194444 | 108 |
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/ads/googleads_v4/proto/services/merchant_center_link_service.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2980,
515,
416,
262,
8435,
11876,
17050,
13,
220,
8410,
5626,
48483,
0,
198,
2,
2723,
25,
23645,
14,
5643,
14,
13297,
5643,
62,
85,
19,
14,
1676,
1462,
14,
30416,... | 2.600447 | 8,497 |
from undine.client.command.base_command import BaseCommand
from undine.utils.exception import UndineException
import json
| [
6738,
3318,
500,
13,
16366,
13,
21812,
13,
8692,
62,
21812,
1330,
7308,
21575,
198,
6738,
3318,
500,
13,
26791,
13,
1069,
4516,
1330,
13794,
500,
16922,
198,
198,
11748,
33918,
628
] | 3.875 | 32 |
#!/usr/bin/env python
from io import open
from setuptools import find_packages, setup
setup(
version='1.0',
name='django.api',
description='A django app',
url='http://www.trisiki.com',
author='Lord-Mallam Nugwan',
author_email='lordmallam@trisiki.com',
license='Apache2 License',
pac... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
6738,
33245,
1330,
1280,
198,
6738,
900,
37623,
10141,
1330,
1064,
62,
43789,
11,
9058,
628,
198,
40406,
7,
198,
220,
220,
220,
2196,
11639,
16,
13,
15,
3256,
198,
220,
220,
220... | 2.586466 | 133 |
import _plotly_utils.basevalidators
| [
11748,
4808,
29487,
306,
62,
26791,
13,
8692,
12102,
2024,
628
] | 3.363636 | 11 |
from ..factory import Method
| [
6738,
11485,
69,
9548,
1330,
11789,
628
] | 4.285714 | 7 |
load("@rules_java//java:defs.bzl", "java_library")
load("@com_github_airyhq_bazel_tools//lint:checkstyle.bzl", "checkstyle")
| [
2220,
7203,
31,
38785,
62,
12355,
1003,
12355,
25,
4299,
82,
13,
65,
48274,
1600,
366,
12355,
62,
32016,
4943,
198,
2220,
7203,
31,
785,
62,
12567,
62,
13021,
71,
80,
62,
65,
41319,
62,
31391,
1003,
75,
600,
25,
9122,
7635,
13,
65... | 2.45098 | 51 |
from channels.generic.websocket import AsyncWebsocketConsumer
from asgiref.sync import async_to_sync, sync_to_async
from django.contrib.auth.models import User
from django.utils import timezone
from .models import *
import json
@sync_to_async
class ChatConsumer(AsyncWebsocketConsumer):
"""
Connection to room... | [
6738,
9619,
13,
41357,
13,
732,
1443,
5459,
1330,
1081,
13361,
1135,
1443,
5459,
49106,
198,
6738,
355,
70,
557,
69,
13,
27261,
1330,
30351,
62,
1462,
62,
27261,
11,
17510,
62,
1462,
62,
292,
13361,
198,
6738,
42625,
14208,
13,
3642,
... | 2.69697 | 165 |
"""
homeassistant.components.light.wink
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Support for Wink lights.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/light.wink/
"""
import logging
from homeassistant.components.light import ATTR_BRIGHTNESS
from homeassist... | [
37811,
198,
11195,
562,
10167,
13,
5589,
3906,
13,
2971,
13,
86,
676,
198,
27156,
27156,
4907,
93,
198,
15514,
329,
48450,
7588,
13,
198,
198,
1890,
517,
3307,
546,
428,
3859,
11,
3387,
3522,
284,
262,
10314,
379,
198,
5450,
1378,
1... | 2.501634 | 612 |
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | [
2,
15069,
12131,
43208,
21852,
1766,
1539,
12052,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198... | 3.61165 | 309 |
#!/usr/bin/env python3
import numpy as np
import pandas as pd
import statsmodels.api as sm
from scipy.stats import linregress
from scipy.signal import find_peaks
# Load data
a = pd.pandas.read_csv('data.txt', delimiter='\t')
# Correct baseline
x = a.iloc[30:530]['Time (s)']
y = a.iloc[30:530]['VoltageB (V)']
slope, ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
9756,
27530,
13,
15042,
355,
895,
198,
6738,
629,
541,
88,
13,
34242,
1330,
9493,
2301,
601,
... | 2.642169 | 830 |
from testil import eq
from ...tests.util import (
async_test,
do_command,
FakeEditor,
gentest,
)
TEXT = """
pyxt/cmd/replace.py
path/TO/file
"""
| [
6738,
1332,
346,
1330,
37430,
198,
198,
6738,
2644,
41989,
13,
22602,
1330,
357,
198,
220,
220,
220,
30351,
62,
9288,
11,
198,
220,
220,
220,
466,
62,
21812,
11,
198,
220,
220,
220,
33482,
17171,
11,
198,
220,
220,
220,
25049,
395,
... | 2.338028 | 71 |
print('Buy! Buy! Buy!') | [
4798,
10786,
14518,
0,
11763,
0,
11763,
0,
11537
] | 2.555556 | 9 |
from drf_prettify_json_serializer.fields import PrettifyDataFromJsonField
from drf_prettify_json_serializer.fields import (Charfield,
EmailField,
DecimalField,
IntegerField)... | [
6738,
1553,
69,
62,
3866,
926,
1958,
62,
17752,
62,
46911,
7509,
13,
25747,
1330,
3771,
926,
1958,
6601,
4863,
41,
1559,
15878,
198,
6738,
1553,
69,
62,
3866,
926,
1958,
62,
17752,
62,
46911,
7509,
13,
25747,
1330,
357,
12441,
3245,
... | 1.597015 | 201 |
'''
Created on 22-04-2013
@author: Damian Rusinek <damian.rusinek@gmail.com>
'''
| [
7061,
6,
198,
41972,
319,
2534,
12,
3023,
12,
6390,
198,
198,
31,
9800,
25,
42574,
9223,
500,
74,
1279,
11043,
666,
13,
14932,
500,
74,
31,
14816,
13,
785,
29,
198,
7061,
6,
628,
220,
220,
220,
220,
628,
198,
220,
220,
220,
220
... | 2.088889 | 45 |
import requests
from requests import Session
import json
from bs4 import BeautifulSoup
from flask import Flask, request, jsonify
from flask_sqlalchemy import SQLAlchemy
from getId import get_id
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql://postgres:Aizhan1212@localhost/PythonAssignment'
d... | [
11748,
7007,
198,
6738,
7007,
1330,
23575,
198,
11748,
33918,
198,
6738,
275,
82,
19,
1330,
23762,
50,
10486,
198,
6738,
42903,
1330,
46947,
11,
2581,
11,
33918,
1958,
198,
6738,
42903,
62,
25410,
282,
26599,
1330,
16363,
2348,
26599,
1... | 2.924051 | 158 |
# -*- coding: utf-8 -*-
"""
Created on Wed Dec 5 17:23:06 2020
@author: Wesley
AoC - Day 5
"""
import math
f = open("data/input5.txt", "r")
inputArray = []
inputArray = [eachLine.strip('\n\r') for eachLine in f]
length = len(inputArray)
#rowLength = len((inputArray[0]))
##### Part 1 #####
if __name__ == "__m... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
3300,
4280,
220,
642,
1596,
25,
1954,
25,
3312,
12131,
198,
198,
31,
9800,
25,
28634,
198,
32,
78,
34,
532,
3596,
642,
198,
37811,
198,
198,
... | 2.431655 | 139 |
from pipelime.sequences.readers.filesystem import UnderfolderReader
import time
import torch.nn.functional as F
import kornia.geometry as geometry
import sys
import argparse
import os
import cv2
import glob
import numpy as np
import torch
from PIL import Image
from core.raft import RAFT
from core.utils import flow_viz
... | [
6738,
7347,
417,
524,
13,
3107,
3007,
13,
961,
364,
13,
16624,
6781,
1330,
4698,
43551,
33634,
198,
11748,
640,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
198,
11748,
479,
3317,
13,
469,
15748,
355,
22939,
198,
11748,
25064,
1... | 3.187097 | 310 |
'''
Author: Michael Mazzone
Functions for writing data to CSV or Excel files
'''
import csv
import realtime
import xlsxwriter
# TODO: Append to end of existing CSV file
def saveCSV(tickerSymbolList, fileName):
'''
tickerSymbolList is given as a list of strings, but must be converted to
a list of lists fo... | [
7061,
6,
198,
13838,
25,
3899,
337,
8101,
505,
198,
198,
24629,
2733,
329,
3597,
1366,
284,
44189,
393,
24134,
3696,
198,
7061,
6,
198,
198,
11748,
269,
21370,
198,
11748,
1103,
2435,
198,
11748,
2124,
7278,
87,
16002,
198,
198,
2,
... | 2.499102 | 557 |
import os
import sys
sys.path.append(os.path.dirname(__file__))
from libs.AbstractLanguageDetectionModel import AbstractLanguageDetectionModel
from textblob import TextBlob
| [
11748,
28686,
198,
11748,
25064,
198,
17597,
13,
6978,
13,
33295,
7,
418,
13,
6978,
13,
15908,
3672,
7,
834,
7753,
834,
4008,
198,
198,
6738,
9195,
82,
13,
23839,
32065,
11242,
3213,
17633,
1330,
27741,
32065,
11242,
3213,
17633,
198,
... | 3.45098 | 51 |
import apprise
import os
import yaml
# from datetime import datetime
pbul = ""
msteams = ""
try:
with open("notify.cfg", "r") as ymlfile:
cfg = yaml.safe_load(ymlfile)
pbul = cfg["pbul"]
msteams = cfg["msteams"]
except FileNotFoundError:
print("make sure you've got a notify.cfg file w... | [
11748,
598,
17163,
198,
11748,
28686,
198,
11748,
331,
43695,
198,
198,
2,
422,
4818,
8079,
1330,
4818,
8079,
198,
198,
79,
15065,
796,
13538,
198,
76,
4169,
4105,
796,
13538,
198,
198,
28311,
25,
198,
220,
220,
220,
351,
1280,
7203,
... | 2.397436 | 312 |
import os
import torch
try:
import horovod.torch as hvd
except ImportError:
hvd = None
| [
11748,
28686,
198,
198,
11748,
28034,
198,
198,
28311,
25,
198,
220,
220,
220,
1330,
3076,
709,
375,
13,
13165,
354,
355,
289,
20306,
198,
16341,
17267,
12331,
25,
198,
220,
220,
220,
289,
20306,
796,
6045,
628,
628,
628,
628
] | 2.536585 | 41 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
if len(sys.argv) < 2:
print("ERROR: You must run program with file name as argument.")
sys.exit(50)
fname = sys.argv[1]
fileread = open(fname.strip(), "r")
file_contents = fileread.read()
# If find "ERROR: AddressSanitizer:", then happens invalid rea... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
25064,
198,
198,
361,
18896,
7,
17597,
13,
853,
85,
8,
1279,
362,
25,
198,
220,
220,
220,
3601,
7203,
2... | 3.204138 | 725 |
import numpy as np
import glob
import h5py
import cv2
from keras.preprocessing.image import load_img, img_to_array
import os
import sys
from statistics import mean
import os.path
#線画抽出
inpath = './dataset/input' #出力先
outpath = './dataset/output' #h5py保存先
datapath = './dataset/safebooru' #読み込み先
orgs = []
... | [
11748,
299,
32152,
355,
45941,
198,
11748,
15095,
198,
11748,
289,
20,
9078,
198,
11748,
269,
85,
17,
198,
6738,
41927,
292,
13,
3866,
36948,
13,
9060,
1330,
3440,
62,
9600,
11,
33705,
62,
1462,
62,
18747,
198,
11748,
28686,
198,
1174... | 1.922695 | 1,410 |
from flask_migrate import Migrate,MigrateCommand
from flask_script import Manager
from info import create_app,db
from info import models
from info.models import User
app = create_app('development')
manager = Manager(app)
Migrate(app,db)
manager.add_command('db',MigrateCommand)
@manager.option('-n','--name',dest = 'n... | [
6738,
42903,
62,
76,
42175,
1330,
337,
42175,
11,
44,
42175,
21575,
198,
6738,
42903,
62,
12048,
1330,
9142,
198,
6738,
7508,
1330,
2251,
62,
1324,
11,
9945,
198,
6738,
7508,
1330,
4981,
198,
6738,
7508,
13,
27530,
1330,
11787,
198,
1... | 2.375691 | 362 |
from django.db import models
from django.utils import timezone
from django.contrib.auth.models import User
from api.fields import JSONField | [
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
42625,
14208,
13,
26791,
1330,
640,
11340,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27530,
1330,
11787,
198,
6738,
40391,
13,
25747,
1330,
19449,
15878
] | 3.756757 | 37 |
"""This module provides a simple way to load configuration files.
Configuration files are defined in python syntax. All symbols defined
in UPPER_CASE are loaded from the configuration file. This way, your
configuration can calculate values dynamically, if you so desire.
"""
__version__ = '1.0.1'
import imp
import os... | [
37811,
1212,
8265,
3769,
257,
2829,
835,
284,
3440,
8398,
3696,
13,
198,
198,
38149,
3696,
389,
5447,
287,
21015,
15582,
13,
1439,
14354,
5447,
198,
259,
471,
10246,
1137,
62,
34,
11159,
389,
9639,
422,
262,
8398,
2393,
13,
770,
835,
... | 3.095723 | 491 |
import math
| [
11748,
10688,
198
] | 4 | 3 |
import aspose.slides as slides
| [
171,
119,
123,
11748,
355,
3455,
13,
6649,
1460,
355,
19392,
198
] | 2.666667 | 12 |
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from __future__ import unicode_literals
from ..odf import SFPeaks
| [
2,
47044,
46,
12,
35353,
1137,
11617,
416,
4899,
14,
42116,
431,
6359,
13,
9078,
532,
8410,
5626,
48483,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
6738,
11485,
375,
69,
1330,
311,
5837,
68,
4730,
628
] | 2.95122 | 41 |
print("Hello python you are most Welcome")
| [
4798,
7203,
15496,
21015,
345,
389,
749,
19134,
4943,
198
] | 4.3 | 10 |
"""
SwiftLog - file ``/var/log/containers/swift/swift.log`` and ``/var/log/swift/swift.log``
========================================================================================
"""
from insights import parser, Syslog
from insights.specs import Specs
@parser(Specs.swift_log)
class SwiftLog(Syslog):
"""Class ... | [
37811,
198,
10462,
2135,
11187,
532,
2393,
7559,
14,
7785,
14,
6404,
14,
3642,
50221,
14,
2032,
2135,
14,
2032,
2135,
13,
6404,
15506,
290,
7559,
14,
7785,
14,
6404,
14,
2032,
2135,
14,
2032,
2135,
13,
6404,
15506,
198,
23926,
4770,
... | 2.87315 | 473 |
from fileRetriever import Retriever
import re
import json
import sys
class Extractor:
"""
Evaluates a given file and for a file returns:
Tuple - first entry is:
Array of tuples
Each tuple consists of
1) String with each method's signature
2) Arra... | [
6738,
2393,
9781,
380,
964,
1330,
4990,
380,
964,
198,
11748,
302,
198,
11748,
33918,
198,
11748,
25064,
198,
198,
4871,
29677,
273,
25,
628,
220,
220,
220,
37227,
198,
220,
220,
220,
26439,
12632,
257,
1813,
2393,
290,
329,
257,
2393... | 2.369001 | 1,542 |
from abc import abstractmethod
import torchvision.transforms as transforms
| [
6738,
450,
66,
1330,
12531,
24396,
198,
198,
11748,
28034,
10178,
13,
7645,
23914,
355,
31408,
628,
628
] | 4.388889 | 18 |
import os
import logging
import sys
import platform
import nuke
import perforce.GlobalVars
from perforce import Utils
from perforce.version import __version__
from perforce.AppInterop.BaseInterop import BaseInterop, BaseCallbacks
from perforce.GUI.qtpy import QtCore, QtGui, QtWidgets
| [
11748,
28686,
198,
11748,
18931,
198,
11748,
25064,
198,
11748,
3859,
198,
198,
11748,
299,
4649,
198,
220,
220,
220,
220,
198,
11748,
583,
3174,
13,
22289,
53,
945,
198,
6738,
583,
3174,
1330,
7273,
4487,
198,
6738,
583,
3174,
13,
96... | 3.306818 | 88 |
from none import on_command, CommandSession
from none import on_natural_language, NLPSession, NLPResult
from jieba import posseg
from .data_source import get_weather_of_city
@on_command('weather', aliases=('天气', '天气预报', '查天气'))
@weather.args_parser
# on_natural_language 装饰器将函数声明为一个自然语言处理器
# keywords 表示需要响应的关键词,类... | [
6738,
4844,
1330,
319,
62,
21812,
11,
9455,
36044,
198,
6738,
4844,
1330,
319,
62,
11802,
62,
16129,
11,
22879,
3705,
2521,
11,
22879,
4805,
274,
586,
198,
6738,
474,
494,
7012,
1330,
1426,
325,
70,
198,
198,
6738,
764,
7890,
62,
10... | 1.457746 | 284 |
num1 = int(input('Digite número 1: '))
num2 = int(input('Digite número 2: '))
soma = num1 + num2
if soma > 10:
print(soma) | [
22510,
16,
796,
493,
7,
15414,
10786,
19511,
578,
299,
21356,
647,
78,
352,
25,
705,
4008,
201,
198,
22510,
17,
796,
493,
7,
15414,
10786,
19511,
578,
299,
21356,
647,
78,
362,
25,
705,
4008,
201,
198,
201,
198,
82,
6086,
796,
997... | 1.970588 | 68 |
import numpy as np
from lstchain.mc import (
power_law_integrated_distribution,
int_diff_sp,
rate,
weight
)
| [
11748,
299,
32152,
355,
45941,
198,
6738,
300,
301,
7983,
13,
23209,
1330,
357,
198,
220,
220,
220,
1176,
62,
6270,
62,
18908,
4111,
62,
17080,
3890,
11,
198,
220,
220,
220,
493,
62,
26069,
62,
2777,
11,
198,
220,
220,
220,
2494,
... | 2.384615 | 52 |
import gensim
import json
import nltk
import string
from nltk.decorators import memoize
import numpy as np
import os
import sys
import os.path
TOTAL_NUM_TOPICS = int(sys.argv[1])
TOTAL_NUM_ITER = int(sys.argv[2])
ldadir = "./lda-train-document-lemma-topic-"+str(TOTAL_NUM_TOPICS)+"-iter-"+str(TOTAL_NUM_ITER)
# Co... | [
11748,
308,
641,
320,
198,
11748,
33918,
198,
11748,
299,
2528,
74,
198,
11748,
4731,
198,
6738,
299,
2528,
74,
13,
12501,
273,
2024,
1330,
16155,
1096,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28686,
198,
11748,
25064,
198,
1174... | 2.219876 | 805 |
import requests
_API_URL: str = 'https://inputtools.google.com/request'
| [
11748,
7007,
198,
198,
62,
17614,
62,
21886,
25,
965,
796,
705,
5450,
1378,
15414,
31391,
13,
13297,
13,
785,
14,
25927,
6,
198
] | 3.041667 | 24 |
#!/usr/bin/python
"""
This file is generate by AoB.
Please do not change it.
"""
import os
import re
#If the ta-folder is a symblink, the following code can not handle it
ta_name = os.path.basename(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
ta_lib_name = re.sub("[^\\w]+", "_", ta_name.lower())
__impo... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
37811,
198,
1212,
2393,
318,
7716,
416,
27378,
33,
13,
198,
5492,
466,
407,
1487,
340,
13,
198,
37811,
198,
11748,
28686,
198,
11748,
302,
198,
198,
2,
1532,
262,
20486,
12,
43551,
318,
257... | 2.657459 | 181 |
#!/usr/bin/env python
# coding: utf-8
# Copyright 2013 Abram Hindle
#
# 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 a... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
19617,
25,
3384,
69,
12,
23,
198,
2,
15069,
2211,
39631,
17099,
293,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,... | 2.79981 | 1,054 |
# -*- coding: utf-8 -*-
# copyright: sktime developers, BSD-3-Clause License (see LICENSE file)
"""Machine type converters for scitypes.
Exports
-------
convert_to(obj, to_type: str, as_scitype: str, store=None)
converts object "obj" to type "to_type", considerd as "as_scitype"
convert(obj, from_type: str, to_typ... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
6634,
25,
1341,
2435,
6505,
11,
347,
10305,
12,
18,
12,
2601,
682,
13789,
357,
3826,
38559,
24290,
2393,
8,
198,
37811,
37573,
2099,
6718,
1010,
329,
629,
414,
1227... | 2.657366 | 4,480 |
"""Helpers for tests."""
import json
import pathlib
from importlib import import_module
from typing import Any, Dict, Optional, Type
import aioresponses
import attrs
import requests_mock
def get_fixture_path(filename: str) -> pathlib.Path:
"""Get path of a fixture."""
return pathlib.Path(__file__).parent.joi... | [
37811,
12621,
19276,
329,
5254,
526,
15931,
198,
11748,
33918,
198,
11748,
3108,
8019,
198,
6738,
1330,
8019,
1330,
1330,
62,
21412,
198,
6738,
19720,
1330,
4377,
11,
360,
713,
11,
32233,
11,
5994,
198,
198,
11748,
257,
72,
382,
20587,
... | 2.403086 | 1,620 |
from . import lf
# GPIO signals
IO_1 = (1 << 22)
IO_2 = (1 << 23)
IO_3 = (1 << 2)
IO_4 = (1 << 30)
IO_5 = (1 << 29)
IO_6 = (1 << 28)
IO_7 = (1 << 27)
IO_8 = (1 << 7)
IO_9 = (1 << 8)
IO_10 = (1 << 26)
IO_11 = (1 << 25)
IO_12 = (1 << 24)
IO_14 = (1 << 16)
IO_15 = (1 << 7)
IO_16 = (1 << 6)
# USB signals
IO_DP = (1 << 11)... | [
6738,
764,
1330,
300,
69,
198,
198,
2,
50143,
10425,
198,
9399,
62,
16,
796,
357,
16,
9959,
2534,
8,
198,
9399,
62,
17,
796,
357,
16,
9959,
2242,
8,
198,
9399,
62,
18,
796,
357,
16,
9959,
362,
8,
198,
9399,
62,
19,
796,
357,
... | 1.812665 | 379 |
from core.models import User
from django import test
from django.test import TestCase
from django.contrib.auth import get_user_model | [
6738,
4755,
13,
27530,
1330,
11787,
198,
6738,
42625,
14208,
1330,
1332,
198,
6738,
42625,
14208,
13,
9288,
1330,
6208,
20448,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
1330,
651,
62,
7220,
62,
19849
] | 3.666667 | 36 |
"""show() smoke tests
show relies heavily on a notebook environment, so we can only ahve some smoke
tests in the test suite. There is also a notebook with tests that you can run
to cover common scenarios.
"""
from __future__ import absolute_import, division, print_function
import pytest
import numpy as np
import luci... | [
37811,
12860,
3419,
7523,
5254,
198,
12860,
16507,
7272,
319,
257,
20922,
2858,
11,
523,
356,
460,
691,
29042,
303,
617,
7523,
198,
41989,
287,
262,
1332,
18389,
13,
1318,
318,
635,
257,
20922,
351,
5254,
326,
345,
460,
1057,
198,
146... | 2.884211 | 190 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
"""SuperBench CLI commands."""
from knack.arguments import ArgumentsContext
from knack.commands import CLICommandsLoader, CommandGroup
class SuperBenchCommandsLoader(CLICommandsLoader):
"""SuperBench CLI commands loader."""
def load_co... | [
2,
15069,
357,
66,
8,
5413,
10501,
13,
198,
2,
49962,
739,
262,
17168,
13789,
13,
198,
198,
37811,
12442,
44199,
43749,
9729,
526,
15931,
198,
198,
6738,
47868,
13,
853,
2886,
1330,
20559,
2886,
21947,
198,
6738,
47868,
13,
9503,
1746... | 2.371404 | 1,182 |
from django.contrib.auth.forms import AuthenticationForm, UserCreationForm
from django import forms
from users.models import User
| [
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
23914,
1330,
48191,
8479,
11,
11787,
12443,
341,
8479,
198,
6738,
42625,
14208,
1330,
5107,
198,
198,
6738,
2985,
13,
27530,
1330,
11787,
628,
628
] | 3.941176 | 34 |
mainWindow = browser.activeWindow()
try: mainWindow.counter
except:
mainWindow.counter = 0
url = mainWindow.tabWidget().currentWidget().url().toString()
title = mainWindow.tabWidget().currentWidget().windowTitle()
if mainWindow.counter == 0:
mainWindow.locationBar.setEditText("[URL=%s]%s[/URL]" % (url, title))
... | [
12417,
27703,
796,
6444,
13,
5275,
27703,
3419,
198,
28311,
25,
1388,
27703,
13,
24588,
198,
16341,
25,
198,
220,
220,
220,
1388,
27703,
13,
24588,
796,
657,
198,
6371,
796,
1388,
27703,
13,
8658,
38300,
22446,
14421,
38300,
22446,
6371... | 2.84507 | 213 |
from typing import List
| [
6738,
19720,
1330,
7343,
628
] | 5 | 5 |
from xendit.models._base_model import BaseModel
class VirtualAccountBank(BaseModel):
"""Bank class for Virtual Account (API Reference: Virtual Account)
Attributes:
- name (str)
- code (str)
"""
name: str
code: str
| [
6738,
2124,
437,
270,
13,
27530,
13557,
8692,
62,
19849,
1330,
7308,
17633,
201,
198,
201,
198,
201,
198,
4871,
15595,
30116,
28650,
7,
14881,
17633,
2599,
201,
198,
220,
220,
220,
37227,
28650,
1398,
329,
15595,
10781,
357,
17614,
2098... | 2.528846 | 104 |
from django.urls import path
from django.contrib.auth import views as auth_views
from .views import sign_up, profile
urlpatterns = [
path('register/', sign_up, name='signup'),
path('login/', auth_views.LoginView.as_view(template_name='login.html'), name='login'),
path('logout/', auth_views.LogoutView.as_v... | [
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
1330,
5009,
355,
6284,
62,
33571,
198,
198,
6738,
764,
33571,
1330,
1051,
62,
929,
11,
7034,
198,
198,
6371,
33279,
82,
796,
685,
198,
... | 2.889655 | 145 |
from Xdmf import *
if __name__ == "__main__":
#functions are passed as callable pyobjects
XdmfFunction.addFunction("MAX", maximum)
functionVector = XdmfFunction.getSupportedFunctions()
for i in functionVector:
print i
XdmfFunction.addOperation("@", prepend, 2)
print XdmfFunction.getSupportedOperations()
... | [
6738,
1395,
36020,
69,
1330,
1635,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
197,
2,
12543,
2733,
389,
3804,
355,
869,
540,
12972,
48205,
198,
197,
55,
36020,
69,
22203,
13,
2860,
22203,
7203,
22921,
1600... | 2.969359 | 718 |
# import instance of class
from zequipmentDAO import equipmentDAO
#create; values are category= %s, name= %s, supplier= %s, cost_eur=%
latestid = equipmentDAO.create(('Tier 1', 'Hammer T22', 'BBB', 2145.00))
# find by id
find_id = latestid # change it to look for a user specifed id
result = equipmentDAO.findByID(find... | [
2,
1330,
4554,
286,
1398,
198,
6738,
1976,
4853,
4667,
5631,
46,
1330,
5112,
5631,
46,
198,
198,
2,
17953,
26,
3815,
389,
6536,
28,
4064,
82,
11,
1438,
28,
4064,
82,
11,
22693,
28,
4064,
82,
11,
1575,
62,
23365,
28,
4,
198,
4286... | 2.768595 | 242 |
import svgpathtools.svgpathtools as svg
import json
import math
import argparse
import RationalBezier as rb
SAMPLE_MAX_DEPTH = 5
SAMPLE_ERROR = 1e-3
def compute_samples_aux(curve, start, end, start_point, end_point, error, max_depth, depth):
"""Recursively approximates the length by straight lines"""
mid... | [
11748,
38487,
70,
6978,
31391,
13,
21370,
70,
6978,
31391,
355,
38487,
70,
198,
11748,
33918,
198,
11748,
10688,
198,
11748,
1822,
29572,
198,
11748,
46863,
3856,
89,
959,
355,
374,
65,
628,
198,
49302,
16437,
62,
22921,
62,
46162,
4221... | 2.514541 | 447 |
import sys
from collections import deque
l = deque(sys.stdin.readlines())
n, m = (int(x) for x in l[0].split())
l.popleft()
ab = deque()
for i in range(m):
a, b = tuple(int(x) for x in l[i].split())
if a == 1 or b == n:
ab.append((a, b))
for i in ab:
if i[0] == 1:
if (i[1], n... | [
11748,
25064,
201,
198,
6738,
17268,
1330,
390,
4188,
201,
198,
201,
198,
75,
796,
390,
4188,
7,
17597,
13,
19282,
259,
13,
961,
6615,
28955,
201,
198,
77,
11,
285,
796,
357,
600,
7,
87,
8,
329,
2124,
287,
300,
58,
15,
4083,
353... | 1.88785 | 214 |
from threading import current_thread, active_count
from time import sleep
from toolz import unique
import tkinter as tk
from tkinter import filedialog
from enum import Enum
from requests import request
from requests.exceptions import RequestException, ProxyError, Timeout
from concurrent.futures import as_completed, Thr... | [
6738,
4704,
278,
1330,
1459,
62,
16663,
11,
4075,
62,
9127,
198,
6738,
640,
1330,
3993,
198,
6738,
2891,
89,
1330,
3748,
198,
11748,
256,
74,
3849,
355,
256,
74,
198,
6738,
256,
74,
3849,
1330,
5717,
498,
519,
198,
6738,
33829,
1330... | 2.45907 | 6,169 |
import datetime
import re
from os import path
import git
from cSharpRegexBuilder import CLASS_FIELD_REGEX, FUNCTION_REGEX, PARAM_REGEX
OUTPUT_FILE = "intellisense.lua"
IMGUI_NET_GENERATED = "./ImGui.NET/src/ImGui.NET/Generated/"
QUAVER_SHARED = "./Quaver/Quaver.Shared/"
QUAVER_ENUM_DIR = "./Quaver/Quaver.API/Quaver... | [
11748,
4818,
8079,
198,
11748,
302,
198,
6738,
28686,
1330,
3108,
198,
198,
11748,
17606,
198,
198,
6738,
269,
44336,
3041,
25636,
32875,
1330,
42715,
62,
44603,
62,
31553,
6369,
11,
29397,
4177,
2849,
62,
31553,
6369,
11,
29463,
2390,
... | 2.28697 | 1,251 |
from distutils.core import setup
setup(
name='jupyterdevview',
version='1.0.1',
author='Nick Tiligadas',
author_email='nick@tiligadas.net',
py_modules=['jupyterdevview'],
scripts=[],
url='http://pypi.python.org/pypi/jupyterdevview/',
license='LICENSE.txt',
description='Side by side ... | [
6738,
1233,
26791,
13,
7295,
1330,
9058,
198,
198,
40406,
7,
198,
220,
220,
220,
1438,
11639,
73,
929,
88,
353,
7959,
1177,
3256,
198,
220,
220,
220,
2196,
11639,
16,
13,
15,
13,
16,
3256,
198,
220,
220,
220,
1772,
11639,
23609,
4... | 2.466063 | 221 |
import gym
import time
import numpy as np
from collections import deque
from math import floor, log
import matplotlib.pyplot as plt
import sys
# Simple
# Classic control
# Box2d
# MuJoCo
| [
11748,
11550,
198,
11748,
640,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
17268,
1330,
390,
4188,
198,
6738,
10688,
1330,
4314,
11,
2604,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
25064,
628,
198,
198... | 3.163934 | 61 |
from on_demand.models import UserDetails
from django.contrib.auth.models import User
from django.db.models.signals import post_save
from django.dispatch import receiver
@receiver(post_save, sender=User)
@receiver(post_save, sender=User)
| [
6738,
319,
62,
28550,
13,
27530,
1330,
11787,
24259,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27530,
1330,
11787,
198,
6738,
42625,
14208,
13,
9945,
13,
27530,
13,
12683,
874,
1330,
1281,
62,
21928,
198,
6738,
42625,
14208... | 3.213333 | 75 |
""" Libraries of physical data used by the drivers
"""
from mechroutines.pf.models import blocks
from mechroutines.pf.models import ene
from mechroutines.pf.models import tunnel
from mechroutines.pf.models import typ
from mechroutines.pf.models import inf
__all__ = [
'blocks',
'ene',
'tunnel',
'typ',... | [
37811,
46267,
286,
3518,
1366,
973,
416,
262,
6643,
198,
37811,
198,
198,
6738,
36571,
81,
448,
1127,
13,
79,
69,
13,
27530,
1330,
7021,
198,
6738,
36571,
81,
448,
1127,
13,
79,
69,
13,
27530,
1330,
551,
68,
198,
6738,
36571,
81,
... | 2.685484 | 124 |
import csv
from kanji import Kanji
from index_utils import IndexUtils
index = IndexUtils()
with open('n5_data.csv', encoding="utf8") as n5_data_file:
n5_data = csv.reader(n5_data_file, delimiter=',')
n5_list = [row for row in n5_data]
kanji = Kanji(n5_list[index.get_today_index() - 1][0],
... | [
11748,
269,
21370,
198,
6738,
43998,
7285,
1330,
14248,
7285,
198,
6738,
6376,
62,
26791,
1330,
12901,
18274,
4487,
198,
198,
9630,
796,
12901,
18274,
4487,
3419,
198,
198,
4480,
1280,
10786,
77,
20,
62,
7890,
13,
40664,
3256,
21004,
26... | 2.165854 | 205 |
# coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import serialize
from twilio.base import values
from twilio.base.instance_resource import InstanceResource
from twilio.base.list_resource import Li... | [
2,
19617,
28,
40477,
12,
23,
198,
37811,
198,
1212,
2438,
373,
7560,
416,
198,
59,
1220,
4808,
220,
220,
220,
4808,
220,
4808,
91,
220,
220,
4808,
220,
4808,
198,
930,
44104,
8,
11139,
28264,
5769,
62,
91,
11139,
91,
930,
7,
47835... | 2.377848 | 5,399 |
# This demo script allows continous interactive imaging.
# End the script by closing the window it opens.
#
# Author: Robert Haase (http://haesleinhuepf.net) at MPI CBG (http://mpi-cbg.de)
# April 2018
#
#########################################################################################
from net.clearcontrol.ea... | [
2,
770,
13605,
4226,
3578,
1261,
516,
14333,
19560,
13,
220,
198,
2,
5268,
262,
4226,
416,
9605,
262,
4324,
340,
9808,
13,
198,
2,
220,
198,
2,
6434,
25,
5199,
9398,
589,
357,
4023,
1378,
3099,
274,
33663,
71,
518,
79,
69,
13,
3... | 3.227048 | 1,013 |
from django.conf.urls import patterns, include, url
from django.contrib import admin
from django.views.generic.base import RedirectView
from allauth.account import views as allauth_views
from . import views
urlpatterns = [
# admin
url(r'^admin/', include(admin.site.urls)),
# django-allauth
url(
... | [
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
7572,
11,
2291,
11,
19016,
198,
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
6738,
42625,
14208,
13,
33571,
13,
41357,
13,
8692,
1330,
2297,
1060,
7680,
198,
198,
6738,
477,
1... | 2.361953 | 594 |
from hashtable import HashTable
if __name__ == '__main__':
test_set()
| [
6738,
20267,
540,
1330,
21059,
10962,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
1332,
62,
2617,
3419,
198
] | 2.75 | 28 |
funds = [
{
"name": "ARKF",
"csv_url": "https://ark-funds.com/wp-content/fundsiteliterature/csv/ARK_FINTECH_INNOVATION_ETF_ARKF_HOLDINGS.csv"
},
{
"name": "ARKG",
"csv_url": "https://ark-funds.com/wp-content/fundsiteliterature/csv/ARK_GENOMIC_REVOLUTION_MULTISECTOR_ETF_ARKG_H... | [
10990,
82,
796,
685,
198,
220,
220,
220,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
366,
3672,
1298,
366,
14175,
37,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
366,
40664,
62,
6371,
1298,
366,
5450,
1378,
668,
12,
10990,
82,... | 1.939394 | 594 |
from Encryptor import encrypt,decrypt
import pickle
decision = input("Do you want to (e)ncrypt or (d)ecrypt ? ")
if decision == "e":
print(" [!] To quit the program just type 'Exit' ")
encrypt_it()
elif decision == "d":
try:
decrypt_it()
print("[+] Sucessfully decrypted the pas... | [
6738,
14711,
6012,
273,
1330,
34117,
11,
12501,
6012,
201,
198,
11748,
2298,
293,
201,
198,
201,
198,
12501,
1166,
796,
5128,
7203,
5211,
345,
765,
284,
357,
68,
8,
10782,
6012,
393,
357,
67,
8,
721,
6012,
5633,
220,
366,
8,
201,
... | 2.476744 | 172 |
"""NOTE: These are Not actually constants.
If referenced in another file, the values can
be reassigned in the scope of that specific project.
"""
WIND1_SPEED_TOPIC = 'wind_sensor_1_speed_knots'
WIND1_ANGLE_TOPIC = 'wind_sensor_1_angle_degrees'
WIND2_SPEED_TOPIC = 'wind_sensor_2_speed_knots'
WIND2_ANGLE_TOPIC = 'wind... | [
198,
37811,
16580,
25,
2312,
389,
1892,
1682,
38491,
13,
198,
1532,
20717,
287,
1194,
2393,
11,
262,
3815,
460,
198,
1350,
12719,
3916,
287,
262,
8354,
286,
326,
2176,
1628,
13,
198,
198,
37811,
198,
198,
28929,
16,
62,
4303,
41841,
... | 2.139098 | 798 |
import unittest
from Constants.Command import Command
from Domain.Message import Message
if __name__ == '__main__':
unittest.main() | [
11748,
555,
715,
395,
198,
198,
6738,
4757,
1187,
13,
21575,
1330,
9455,
198,
6738,
20021,
13,
12837,
1330,
16000,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
555,
715,
395,
13,
12417,
... | 3.232558 | 43 |
def test_regex(a_project, a_name):
""" Test the `a_project'.get_tools_regex(`a_name') feature."""
l_regex = a_project.get_tools_regex(a_name)
l_file = open(a_project.config_file_path() +
"/test_python_input/" + a_name + "_regex.input", "r")
l_result = l_regex.findall(l_file.read())
... | [
4299,
1332,
62,
260,
25636,
7,
64,
62,
16302,
11,
257,
62,
3672,
2599,
198,
220,
220,
220,
37227,
6208,
262,
4600,
64,
62,
16302,
4458,
1136,
62,
31391,
62,
260,
25636,
7,
63,
64,
62,
3672,
11537,
3895,
526,
15931,
198,
220,
220,
... | 1.909688 | 609 |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import copy
import json
import multiprocessing
import shutil
from collections import defaultdict
from enum import Enum
import os
from typing import List
import jsonpickle
import pyinotify
import logging
import re
from .batch_request import Batch... | [
2,
15069,
357,
66,
8,
5413,
10501,
13,
198,
2,
49962,
739,
262,
17168,
13789,
13,
198,
198,
11748,
4866,
198,
11748,
33918,
198,
11748,
18540,
305,
919,
278,
198,
11748,
4423,
346,
198,
6738,
17268,
1330,
4277,
11600,
198,
6738,
33829... | 2.556362 | 1,792 |
a,b=map(int, input().split())
c,d=map(int, input().split())
if a != c:
print(1)
else:
print(0) | [
64,
11,
65,
28,
8899,
7,
600,
11,
5128,
22446,
35312,
28955,
198,
66,
11,
67,
28,
8899,
7,
600,
11,
5128,
22446,
35312,
28955,
198,
220,
198,
361,
257,
14512,
269,
25,
198,
220,
3601,
7,
16,
8,
198,
17772,
25,
198,
220,
3601,
... | 2.083333 | 48 |
import codecs
import csv
import logging
import os
from time import monotonic
from typing import IO
from zipfile import ZipFile, ZIP_DEFLATED
from cachalot.api import cachalot_disabled
from django.conf import settings
from django.db.models import QuerySet
from django.core.cache import cache
from django.utils.timezone i... | [
11748,
40481,
82,
198,
11748,
269,
21370,
198,
11748,
18931,
198,
11748,
28686,
198,
6738,
640,
1330,
937,
313,
9229,
198,
6738,
19720,
1330,
24418,
198,
6738,
19974,
7753,
1330,
38636,
8979,
11,
42977,
62,
7206,
3697,
11617,
198,
198,
... | 3.459677 | 124 |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""Return sorted list of all users of group GROUP
Script 'list_all_users_in_group' return sorted list of all users of group GROUP
License: CC0 1.0 Universal or newer.
Origin sources is in https://github.com/vazhnov/list_all_users_in_group
"""
# pylint: disable=line-too... | [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
13615,
23243,
1351,
286,
477,
2985,
286,
1448,
44441,
198,
198,
7391,
705,
4868,
62,
439,
62,
18417,
62... | 2.585302 | 381 |
from typing import Dict, List, Tuple, Union
from parsimonious.nodes import NodeVisitor
from py_models_parser.parsers.pydal import process_pydal_table_definition
from py_models_parser.types import (
orm_triggers,
ormar_and_piccollo_types,
pony_orm_fields,
)
| [
6738,
19720,
1330,
360,
713,
11,
7343,
11,
309,
29291,
11,
4479,
198,
198,
6738,
13544,
20473,
699,
13,
77,
4147,
1330,
19081,
15854,
2072,
198,
198,
6738,
12972,
62,
27530,
62,
48610,
13,
79,
945,
364,
13,
79,
5173,
282,
1330,
1429... | 2.679612 | 103 |
'''
@name: state_collector.py
@brief: This class provides custom policies used in stable-baselines library
@author: Ronja Gueldenring
@version: 3.5
@date: 2019/04/05
'''
from stable_baselines.common.policies import *
import stable_baselines.common.policies as common
import rospy
... | [
7061,
6,
198,
220,
220,
220,
2488,
3672,
25,
220,
220,
220,
220,
220,
1181,
62,
33327,
273,
13,
9078,
198,
220,
220,
220,
2488,
65,
3796,
25,
220,
220,
220,
220,
770,
1398,
3769,
2183,
4788,
973,
287,
8245,
12,
12093,
20655,
5888,... | 2.566755 | 2,629 |
"""
Module for testing the model_selection.search module.
"""
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import os
import numpy as np
import pytest
from scipy.stats import randint, uniform
from amaze import Dataset
from amaze import Reader
from amaze ... | [
37811,
198,
26796,
329,
4856,
262,
2746,
62,
49283,
13,
12947,
8265,
13,
198,
37811,
198,
198,
6738,
11593,
37443,
834,
1330,
357,
48546,
62,
11748,
11,
7297,
11,
3601,
62,
8818,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,... | 2.084612 | 8,474 |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import pulumi
import pulumi.runtime
from .. import utilities, tables
class NetworkInterface(pulumi.CustomResource):
"""
Manage... | [
2,
19617,
28,
40477,
12,
23,
198,
2,
17202,
39410,
25,
428,
2393,
373,
7560,
416,
262,
21624,
12994,
24118,
687,
10290,
357,
27110,
5235,
8,
16984,
13,
17202,
198,
2,
17202,
2141,
407,
4370,
416,
1021,
4556,
345,
821,
1728,
345,
760... | 2.639922 | 1,022 |
from S3C21 import MT19937
from random import randint
from Crypto import Random
from S2C10 import xor_data
import struct
def find_mt19937_stream_cipher_key(ciphertext, known_plaintext):
"""Brute-force all possible 16-bit seeds (used as a key for the MT19937 stream cipher) until the
ciphertext decrypts to a me... | [
6738,
311,
18,
34,
2481,
1330,
19308,
19104,
2718,
198,
6738,
4738,
1330,
43720,
600,
198,
6738,
36579,
1330,
14534,
198,
6738,
311,
17,
34,
940,
1330,
2124,
273,
62,
7890,
198,
11748,
2878,
628,
198,
198,
4299,
1064,
62,
16762,
19104... | 2.948553 | 311 |
__all__ = ('filters', 'partition')
| [
834,
439,
834,
796,
19203,
10379,
1010,
3256,
705,
3911,
653,
11537,
198
] | 2.692308 | 13 |
# python3
import pyautogui
import time
print('Taking control in 5 seconds...)')
time.sleep(5)
pyautogui.click() # click to put drawing program in focus
distance = 200
# DO NOT FUCK AROUND WITH DISTANCE IT WILL GO OUT OF THE BOX
# FURTHERMORE, YOU CANT CTRL-C OUT OF IT BECAUSE YOURE IN ANOTHER PROGRAM
# HOLY FUCK... | [
2,
21015,
18,
198,
198,
11748,
12972,
2306,
519,
9019,
198,
11748,
640,
198,
198,
4798,
10786,
26556,
1630,
287,
642,
4201,
23029,
11537,
198,
2435,
13,
42832,
7,
20,
8,
198,
198,
9078,
2306,
519,
9019,
13,
12976,
3419,
220,
1303,
3... | 2.720755 | 265 |
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import By
# from selenium import webdriver
# from selenium.common.exceptions import TimeoutException
# from selenium.webdriver.chrome.options import Options
# from selenium.webdriver.common.by import... | [
6738,
220,
384,
11925,
1505,
1330,
3992,
26230,
198,
6738,
384,
11925,
1505,
13,
12384,
26230,
13,
46659,
13,
25811,
1330,
18634,
198,
6738,
384,
11925,
1505,
13,
12384,
26230,
13,
11321,
13,
1525,
1330,
2750,
198,
198,
2,
422,
384,
1... | 2.808581 | 606 |
print(add_all_nums(2, 'b', 3))
| [
198,
4798,
7,
2860,
62,
439,
62,
77,
5700,
7,
17,
11,
705,
65,
3256,
513,
4008,
198
] | 1.777778 | 18 |