content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
"""analysis_utils.py: Helper functions that are used multiple
places.
"""
import os
import re
import numpy as np
import scipy.stats as sps
from cclib.parser import ccopen
from sgr_analysis.find_CO2_frequencies import find_CO2_mode_indices
def make_file_iterator(filename):
"""Return an iterator over the conte... | [
37811,
20930,
62,
26791,
13,
9078,
25,
5053,
525,
5499,
326,
389,
973,
3294,
198,
23625,
13,
198,
37811,
628,
198,
11748,
28686,
198,
11748,
302,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
629,
541,
88,
13,
34242,
355,
599,
... | 2.242418 | 4,583 |
from metakernel.tests.utils import (get_kernel, get_log_text, EvalKernel,
clear_log_text)
| [
6738,
1138,
461,
7948,
13,
41989,
13,
26791,
1330,
357,
1136,
62,
33885,
11,
651,
62,
6404,
62,
5239,
11,
26439,
42,
7948,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2... | 1.897059 | 68 |
# Copyright 2019 Red Hat, Inc. 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 applic... | [
2,
220,
220,
15069,
13130,
2297,
10983,
11,
3457,
13,
1439,
2489,
10395,
13,
198,
2,
220,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
345,
743,
198,
2,
220,
220,
407,
779,
428,
2393,
2... | 3.315985 | 269 |
'''
Evaluate and validate the final model.
More details in the "Model Evaluation and Validation" section of the report.
'''
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
import tensorflow.contrib.slim as slim
import numpy as np
impo... | [
7061,
6,
198,
36,
2100,
4985,
290,
26571,
262,
2457,
2746,
13,
198,
5167,
3307,
287,
262,
366,
17633,
34959,
290,
3254,
24765,
1,
2665,
286,
262,
989,
13,
198,
7061,
6,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
6738,... | 3.293605 | 344 |
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.addons.mail.controllers.main import MailController
from odoo import http
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2142,
286,
10529,
2238,
13,
4091,
38559,
24290,
2393,
329,
1336,
6634,
290,
15665,
3307,
13,
198,
198,
6738,
16298,
2238,
13,
39996,
13,
4529,
13,
3642,
36667,
13,
... | 3.345455 | 55 |
# Modules used in CVP-MVSNet
# By: Jiayu
# Date: 2019-08-13
# Note: This file use part of the code from the following projects.
# Thanks for the authors for the great code.
# MVSNet: https://github.com/YoYo000/MVSNet
# MVSNet_pytorch: https://github.com/xy-guo/MVSNet_pytorch
import numpy as np
np.se... | [
2,
3401,
5028,
973,
287,
327,
8859,
12,
44,
20304,
7934,
198,
2,
2750,
25,
29380,
323,
84,
198,
2,
7536,
25,
13130,
12,
2919,
12,
1485,
198,
198,
2,
5740,
25,
770,
2393,
779,
636,
286,
262,
2438,
422,
262,
1708,
4493,
13,
198,
... | 2.616915 | 201 |
import torch
import torch.nn as nn
import torch.nn.functional as F
import json
from transformers import BertModel
from tools.accuracy_tool import multi_label_accuracy, single_label_top1_accuracy
| [
11748,
28034,
201,
198,
11748,
28034,
13,
20471,
355,
299,
77,
201,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
201,
198,
11748,
33918,
201,
198,
201,
198,
6738,
6121,
364,
1330,
22108,
17633,
201,
198,
201,
198,
6738,
4899,
13... | 3.089552 | 67 |
#!/usr/bin/env python
"""Parse and print the list of logs, after validating signature."""
import base64
import datetime
import hashlib
import json
import math
import os
import sys
import gflags
import jsonschema
import M2Crypto
FLAGS = gflags.FLAGS
gflags.DEFINE_string("log_list", None, "Logs list file to parse an... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
37811,
10044,
325,
290,
3601,
262,
1351,
286,
17259,
11,
706,
4938,
803,
9877,
526,
15931,
628,
198,
11748,
2779,
2414,
198,
11748,
4818,
8079,
198,
11748,
12234,
8019,
198,
11748,
33918... | 2.234579 | 1,151 |
from django.forms import ModelForm
from .models import (User, Project, UserProjectEvent, Account, System, Service,
Transaction, Job, StorageCommitment)
from .shortcuts import add_user_to_project, create_account
| [
6738,
42625,
14208,
13,
23914,
220,
220,
1330,
9104,
8479,
198,
198,
6738,
764,
27530,
220,
220,
220,
1330,
357,
12982,
11,
4935,
11,
11787,
16775,
9237,
11,
10781,
11,
4482,
11,
4809,
11,
220,
198,
220,
220,
220,
220,
220,
220,
220... | 2.786517 | 89 |
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
from . im... | [
2,
16529,
45537,
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,
13,
198,
2,
16529,
35937,
198,
1... | 4.518072 | 166 |
# Copyright (c) 2019, CMCC Technologies Co., Ltd.
# Copyright 2019 ZTE Corporation.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless requ... | [
2,
15069,
357,
66,
8,
13130,
11,
16477,
4093,
21852,
1766,
1539,
12052,
13,
198,
2,
15069,
13130,
1168,
9328,
10501,
13,
198,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
... | 3.796296 | 216 |
from setuptools import setup, find_packages
import re
with open('snet_sdk/__init__.py', 'rt', encoding='utf8') as f:
version = re.search(r'__version__ = "(.*?)"', f.read()).group(1)
setup(
name='snet_sdk',
version=version,
packages=find_packages(),
url='https://github.com/singnet/snet-sdk-python',... | [
6738,
900,
37623,
10141,
1330,
9058,
11,
1064,
62,
43789,
198,
11748,
302,
198,
198,
4480,
1280,
10786,
82,
3262,
62,
21282,
74,
14,
834,
15003,
834,
13,
9078,
3256,
705,
17034,
3256,
21004,
11639,
40477,
23,
11537,
355,
277,
25,
198,... | 2.193772 | 289 |
if __name__ == "__main__":
pass
| [
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
1208,
198
] | 2.111111 | 18 |
import luigi
import numpy as np
from src.models.search_grid_base import SearchGridBase
if __name__ == '__main__':
luigi.run()
| [
11748,
300,
84,
25754,
198,
11748,
299,
32152,
355,
45941,
198,
198,
6738,
12351,
13,
27530,
13,
12947,
62,
25928,
62,
8692,
1330,
11140,
41339,
14881,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
... | 2.68 | 50 |
# Generated by Django 2.2.13 on 2021-02-06 07:16
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
362,
13,
17,
13,
1485,
319,
33448,
12,
2999,
12,
3312,
8753,
25,
1433,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.875 | 32 |
# Exercício 3.7 - Faça um programa que peça dois números inteiros. Imprima a soma
# desses dois números na tela.
print('\n')
a = int(input('Informe um número inteiro: '))
b = int(input('Informe outro número inteiro: '))
print('\nA soma de %d + %d é igual a %d' % (a, b, a + b))
print('\n') | [
2,
1475,
2798,
8836,
66,
952,
513,
13,
22,
532,
18350,
50041,
23781,
1430,
64,
8358,
613,
50041,
466,
271,
299,
21356,
647,
418,
493,
20295,
4951,
13,
1846,
1050,
8083,
257,
3870,
64,
198,
2,
288,
44667,
466,
271,
299,
21356,
647,
... | 2.123188 | 138 |
# -*- coding: utf-8 -*-
# The main procedure for CHASER.
# Once run, she will read her memory.
# Once stop, she will save her memory.
# She is not event triggered, but
# internally driven.
import numpy as np
# she is born here.
main()
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
383,
1388,
8771,
329,
5870,
1921,
1137,
13,
198,
2,
4874,
1057,
11,
673,
481,
1100,
607,
4088,
13,
198,
2,
4874,
2245,
11,
673,
481,
3613,
607,
4088,
13,
1... | 2.848837 | 86 |
#!/usr/bin/python
import sys
import re
################
# Jason Weirather 20140317
# Get chromosome names as the first non-whitespace characters
# Pre: fasta file
# Post: write list of chromosomes to standard output
# Modifies: standard output
################
if(len(sys.argv) < 2):
print 'split_genome_fast... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
11748,
25064,
198,
11748,
302,
198,
198,
14468,
198,
2,
220,
8982,
46669,
1032,
580,
31552,
1558,
198,
2,
220,
3497,
34348,
3891,
355,
262,
717,
1729,
12,
1929,
2737,
10223,
3435,
198,
2,
2... | 2.611111 | 198 |
import logging
from .functions import to_snake_case
class Field:
"""This property like object will map against a table field exposed as a snake_cased
attribute on the model.
Args:
model (airstorm.model.Model): The model this field belongs to.
schema (dict): The schema for this field.
... | [
11748,
18931,
198,
198,
6738,
764,
12543,
2733,
1330,
284,
62,
16184,
539,
62,
7442,
628,
198,
4871,
7663,
25,
198,
220,
220,
220,
37227,
1212,
3119,
588,
2134,
481,
3975,
1028,
257,
3084,
2214,
7362,
355,
257,
17522,
62,
66,
839,
1... | 2.567619 | 525 |
import iolib, datasets, tools
from tools.tools import add_constant, categorical
import regression
from .regression.linear_model import OLS, GLS, WLS, GLSAR
from .genmod.generalized_linear_model import GLM
from .genmod import families
import robust
from .robust.robust_linear_model import RLM
from .discrete.discrete_mode... | [
11748,
1312,
349,
571,
11,
40522,
11,
4899,
198,
6738,
4899,
13,
31391,
1330,
751,
62,
9979,
415,
11,
4253,
12409,
198,
11748,
20683,
198,
6738,
764,
2301,
2234,
13,
29127,
62,
19849,
1330,
440,
6561,
11,
402,
6561,
11,
370,
6561,
1... | 2.86087 | 230 |
# Copyright 2021 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | [
2,
15069,
33448,
3012,
11419,
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,
2,
921,
743,
733... | 3.469636 | 247 |
#!/usr/bin/env python3
"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
import argparse
import sys
from textwrap import dedent
from typing import Tuple
from .__version__ import __version__
from ._const import MODULE_NAME
from ._logger import LogLevel, initialize_logger
if __name__ == "__m... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
37811,
198,
492,
2438,
9800,
3712,
23459,
88,
13704,
367,
2381,
12144,
1279,
912,
4669,
13704,
13,
71,
2381,
12144,
31,
14816,
13,
785,
29,
198,
37811,
198,
198,
11748,
1822,
... | 3.008621 | 116 |
from .bronx import r_bronx as rex_neighborhoods_bronx
from .brooklyn import r_brooklyn as rex_neighborhoods_brooklyn
from .manhattan import r_manhattan as rex_neighborhoods_manhattan
from .queens import r_queens as rex_neighborhoods_queens
from .statenisland import r_statenIsland as rex_neighborhoods_statenIsland
from ... | [
6738,
764,
65,
1313,
87,
1330,
374,
62,
65,
1313,
87,
355,
302,
87,
62,
710,
394,
2865,
2894,
82,
62,
65,
1313,
87,
198,
6738,
764,
19094,
6213,
1330,
374,
62,
19094,
6213,
355,
302,
87,
62,
710,
394,
2865,
2894,
82,
62,
19094,
... | 2.793893 | 131 |
# coding: utf-8
"""
蓝鲸用户管理 API
蓝鲸用户管理后台服务 API # noqa: E501
OpenAPI spec version: v2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class DepartmentProfileEdgesSLZ(object):
"""NOTE: This class is auto generated by the... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
37811,
198,
220,
220,
220,
5525,
241,
251,
165,
110,
116,
18796,
101,
22755,
115,
163,
106,
94,
49426,
228,
7824,
628,
220,
220,
220,
5525,
241,
251,
165,
110,
116,
18796,
101,
22755,
115,... | 2.15239 | 2,113 |
import logging
from collections import defaultdict
from datetime import datetime
import queue
from workdocs_dr.aws_clients import AwsClients
from workdocs_dr.directory_minder import DirectoryBackupMinder
from workdocs_dr.listings import WdDirectory, WdItemApexOwner
from workdocs_dr.queue_backup import RunSyncTasks
fr... | [
198,
11748,
18931,
198,
6738,
17268,
1330,
4277,
11600,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
11748,
16834,
198,
198,
6738,
670,
31628,
62,
7109,
13,
8356,
62,
565,
2334,
1330,
5851,
82,
2601,
2334,
198,
6738,
670,
31628,
62,
... | 3.488889 | 180 |
from cloud_scanner.config.process_config import ProcessConfig
from .table_storage import TableStorage
def register_resource_storage(service_name, service_factory):
"""Register resource storage service.
:param service_name: Name of service
:param service_factory: Function to instantiate service
:retur... | [
6738,
6279,
62,
35836,
1008,
13,
11250,
13,
14681,
62,
11250,
1330,
10854,
16934,
198,
6738,
764,
11487,
62,
35350,
1330,
8655,
31425,
628,
198,
4299,
7881,
62,
31092,
62,
35350,
7,
15271,
62,
3672,
11,
2139,
62,
69,
9548,
2599,
198,
... | 2.750562 | 445 |
#!/usr/bin/env python
import csv
import json
import logging
import re
import sys
import unicodedata
_SLUG_STRIP = re.compile(r'[^\w\s-]')
_SLUG_HYPHENATE = re.compile(r'[-\s]+')
def main(program, fecha=None, asunto=None, url=None, \
sumario=None, nombre=None, *args):
""" Main program """
projects = {... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
269,
21370,
198,
11748,
33918,
198,
11748,
18931,
198,
11748,
302,
198,
11748,
25064,
198,
11748,
28000,
9043,
1045,
198,
198,
62,
8634,
7340,
62,
18601,
4061,
796,
302,
13,
... | 2.481481 | 405 |
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
| [
2,
21004,
25,
3384,
69,
12,
23,
198,
11748,
4818,
8079,
198,
6738,
5366,
13,
9945,
1330,
20613,
198,
6738,
5366,
13,
85,
17,
1330,
10011,
2611,
44,
4254,
198,
6738,
42625,
14208,
13,
9945,
1330,
4981,
198
] | 3.263158 | 38 |
# -*- coding: utf-8 -*-
# BottlePy web programming micro-framework
import bottle
from bottle import request, route, template, get, post, delete
# import urllib.request
# from urllib.parse import urlencode
import os
import os.path
import traceback
import json
import socket
hostname = socket.gethostname()
IP = socket.ge... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
33608,
20519,
3992,
8300,
4580,
12,
30604,
198,
11748,
9294,
198,
6738,
9294,
1330,
2581,
11,
6339,
11,
11055,
11,
651,
11,
1281,
11,
12233,
198,
2,
1330,
2956,
297... | 1.498581 | 2,114 |
from allauth.socialaccount.providers.amazon_cognito.provider import (
AmazonCognitoProvider,
)
from allauth.socialaccount.providers.oauth2.urls import default_urlpatterns
urlpatterns = default_urlpatterns(AmazonCognitoProvider)
| [
6738,
477,
18439,
13,
14557,
23317,
13,
15234,
4157,
13,
33103,
62,
66,
2360,
10094,
13,
15234,
1304,
1330,
357,
198,
220,
220,
220,
6186,
34,
2360,
10094,
29495,
11,
198,
8,
198,
6738,
477,
18439,
13,
14557,
23317,
13,
15234,
4157,
... | 3.162162 | 74 |
#!/home/miranda9/miniconda/envs/automl-meta-learning/bin/python3.7
#PBS -V
#PBS -M brando.science@gmail.com
#PBS -m abe
#PBS -l nodes=1:ppn=4:gpus=1,walltime=96:00:00
import torch
import torchvision.transforms as transforms
from torchmeta.datasets.helpers import miniimagenet
from torchmeta.utils.data import BatchMe... | [
2,
48443,
11195,
14,
10793,
5282,
24,
14,
1084,
291,
13533,
14,
268,
14259,
14,
2306,
296,
75,
12,
28961,
12,
40684,
14,
8800,
14,
29412,
18,
13,
22,
198,
2,
47,
4462,
532,
53,
198,
2,
47,
4462,
532,
44,
4508,
78,
13,
16801,
3... | 2.40399 | 401 |
# Made by Mr. Have fun! Version 0.2
# version 0.3 - updated by Kerberos on 2007.11.10
# Visit http://forum.l2jdp.com for more details
import sys
from com.l2jfrozen.gameserver.model.quest import State
from com.l2jfrozen.gameserver.model.quest import QuestState
from com.l2jfrozen.gameserver.model.quest.jython import Que... | [
2,
14446,
416,
1770,
13,
8192,
1257,
0,
10628,
657,
13,
17,
198,
2,
2196,
657,
13,
18,
532,
6153,
416,
17337,
527,
418,
319,
4343,
13,
1157,
13,
940,
198,
2,
16440,
2638,
1378,
27302,
13,
75,
17,
73,
26059,
13,
785,
329,
517,
... | 2.062967 | 937 |
import os
import pytube
from pytube.cli import on_progress
'''
#se necesita instalar pytube con
pip install pytube
python -m pip install --upgrade pytube
o con
pip install pytube==10.8.2
'''
url = str|(input('ingresar url de la canción: '))
#url= 'https://www.youtube.com/watch?v=qk-GWtcdQek' #Ejemplo solamente
try:
... | [
11748,
28686,
198,
11748,
12972,
29302,
198,
6738,
12972,
29302,
13,
44506,
1330,
319,
62,
33723,
198,
7061,
6,
198,
2,
325,
497,
728,
5350,
916,
282,
283,
12972,
29302,
369,
220,
198,
79,
541,
2721,
12972,
29302,
220,
198,
29412,
532... | 2.335329 | 334 |
import requests
from fractions import *
import re
#modulus
#multiplier
#increment
#s1 = (s0*m + c) % n
cookies = get_cookie()
numbers = []
for i in range(8):
numbers.append(int(guess(i)))
print "Cracking these numbers: "
print numbers
(n,m,c) = crack_unknown_modulus(numbers)
print "N=%d" % n
print "m=%... | [
198,
11748,
7007,
198,
6738,
49876,
1330,
1635,
198,
11748,
302,
628,
198,
2,
4666,
23515,
198,
2,
47945,
959,
198,
2,
24988,
434,
628,
198,
2,
82,
16,
796,
357,
82,
15,
9,
76,
1343,
269,
8,
4064,
299,
628,
628,
198,
27916,
444,... | 2.4 | 210 |
import streamlit as st
| [
11748,
4269,
18250,
355,
336,
198
] | 3.833333 | 6 |
import tweepy
from datetime import date
from src.keys import *
import requests
url = 'https://health.hawaii.gov/coronavirusdisease2019/'
r = requests.get(url)
my_text = r.text
full_array = bytearray(my_text, 'utf-8')
pre_total_cases = full_array.partition(b'Total cases:</span> <span class="value">')
after_total_cas... | [
11748,
4184,
538,
88,
198,
6738,
4818,
8079,
1330,
3128,
198,
6738,
12351,
13,
13083,
1330,
1635,
198,
11748,
7007,
198,
198,
6371,
796,
705,
5450,
1378,
13948,
13,
26615,
42648,
13,
9567,
14,
10215,
261,
615,
19397,
67,
786,
589,
233... | 2.408319 | 1,178 |
""" Makes a copy of the plot in the overlay and adds it to the canvas.
"""
# Enthought library imports
from traits.api import Bool, Callable, Enum, Float, Instance, Int, Trait, Tuple
from enable.api import Container
# Chaco imports
from chaco.api import AbstractOverlay
from enable.tools.api import DragTool
class Pl... | [
37811,
27433,
257,
4866,
286,
262,
7110,
287,
262,
33345,
290,
6673,
340,
284,
262,
21978,
13,
198,
37811,
198,
198,
2,
2039,
28895,
5888,
17944,
198,
6738,
12796,
13,
15042,
1330,
347,
970,
11,
4889,
540,
11,
2039,
388,
11,
48436,
... | 2.857791 | 661 |
# coord1 = {'lat':45.766504,'lon':5.791166}
# coord2 = {'lat':45.764019,'lon':5.788881}
# coord3 = {'lat':45.759428,'lon':5.790793}
# coord4 = {'lat':45.762664,'lon':5.792797}
# coord5 = {'lat':45.762664,'lon':5.792797}
# coord6 = {'lat':45.754700,'lon':5.787025}
# coord7 = {'lat':45.753517,'lon':5.789181}
# coord8 = {... | [
2,
6349,
16,
796,
1391,
6,
15460,
10354,
2231,
13,
22,
2791,
33580,
4032,
14995,
10354,
20,
13,
3720,
1157,
2791,
92,
198,
2,
6349,
17,
796,
1391,
6,
15460,
10354,
2231,
13,
22,
2414,
30484,
4032,
14995,
10354,
20,
13,
22,
3459,
3... | 2.064159 | 452 |
import sys,os
import torch
import torch.nn as nn
import config
import numpy as np
from .smpl import SMPL
sys.path.append(os.path.abspath(__file__).replace('models/smpl_regressor.py',''))
from config import args | [
11748,
25064,
11,
418,
198,
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
4566,
198,
11748,
299,
32152,
355,
45941,
220,
198,
6738,
764,
5796,
489,
1330,
9447,
6489,
198,
17597,
13,
6978,
13,
33295,
7,
418,
13,... | 2.971831 | 71 |
#!/usr/bin/env python3
"""Main entry point."""
from zoneh.launcher import ZBotLauncher
from zoneh.log import init_logging
__version__ = '0.2.2'
def main():
"""Main function."""
init_logging()
zoneh = ZBotLauncher()
zoneh.run()
if __name__ == '__main__':
main()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
37811,
13383,
5726,
966,
526,
15931,
198,
198,
6738,
6516,
71,
13,
38722,
2044,
1330,
1168,
20630,
46182,
2044,
198,
6738,
6516,
71,
13,
6404,
1330,
2315,
62,
6404,
2667,
198,
198,... | 2.482759 | 116 |
import sys
string = raw_input()
sys.stdout.write(string)
sys.stdout.flush() | [
11748,
25064,
198,
198,
8841,
796,
8246,
62,
15414,
3419,
198,
17597,
13,
19282,
448,
13,
13564,
7,
8841,
8,
198,
17597,
13,
19282,
448,
13,
25925,
3419
] | 2.714286 | 28 |
from urllib.parse import urlencode
import cherrypy
from cherrypy import _json as json
from ingredients_http.errors.validation import ResponseValidationError
from schematics import Model
from schematics.exceptions import DataError
| [
6738,
2956,
297,
571,
13,
29572,
1330,
2956,
11925,
8189,
198,
198,
11748,
23612,
9078,
198,
6738,
23612,
9078,
1330,
4808,
17752,
355,
33918,
198,
6738,
9391,
62,
4023,
13,
48277,
13,
12102,
341,
1330,
18261,
7762,
24765,
12331,
198,
6... | 4 | 58 |
# coding utf-8
'''
XML value serialization and deserialization for JSON.
'''
import canvas as cv
import canvas.ext as cve
from .exceptions import XMLSyntaxError
from .utils import element_t, serialize, deserialize
from . import plugin_config
@cve.json_serializer(element_t)
| [
2,
197,
66,
7656,
3384,
69,
12,
23,
198,
7061,
6,
198,
55,
5805,
1988,
11389,
1634,
290,
748,
48499,
1634,
329,
19449,
13,
198,
7061,
6,
198,
198,
11748,
21978,
355,
269,
85,
198,
11748,
21978,
13,
2302,
355,
269,
303,
198,
198,
... | 3.043956 | 91 |
#!/usr/bin/env python
import sys
import common
import os
import optparse
import zipfile
# Add the trunk/Python/util directory to the PYTHONPATH
scr = sys.argv[0]
scr = os.path.abspath(scr)
scr_list = scr.split('/')
trunk_pos = scr_list.index('trunk')
util_path = '/'.join(scr_list[:trunk_pos+1] + ['Python','util'])
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
25064,
198,
11748,
2219,
198,
11748,
28686,
198,
11748,
2172,
29572,
198,
11748,
19974,
7753,
628,
198,
2,
3060,
262,
21427,
14,
37906,
14,
22602,
8619,
284,
262,
350,
56,
... | 2.418919 | 444 |
# Webhooks for external integrations.
from __future__ import absolute_import
from django.http import HttpRequest, HttpResponse
from zerver.models import get_client, UserProfile
from zerver.lib.actions import check_send_message
from zerver.lib.response import json_success
from zerver.lib.validator import check_dict
fro... | [
2,
5313,
25480,
82,
329,
7097,
4132,
9143,
13,
198,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
6738,
42625,
14208,
13,
4023,
1330,
367,
29281,
18453,
11,
367,
29281,
31077,
198,
6738,
1976,
18497,
13,
27530,
1330,
651,
... | 3.355482 | 301 |
from rest_framework import serializers
from account.serializers import UserDetailSerializer
from customer.serializers import LinkCustomerSerializer
from liaison.models import Liaison
| [
6738,
1334,
62,
30604,
1330,
11389,
11341,
201,
198,
201,
198,
6738,
1848,
13,
46911,
11341,
1330,
11787,
11242,
603,
32634,
7509,
201,
198,
6738,
6491,
13,
46911,
11341,
1330,
7502,
44939,
32634,
7509,
201,
198,
6738,
43176,
13,
27530,
... | 3.716981 | 53 |
import numpy as np
from astropy import units as u
from .. import Spectrum1D, SpectralRegion
from astropy.nddata.nduncertainty import StdDevUncertainty, VarianceUncertainty, InverseVariance
from .extract_spectral_region import extract_region
__all__ = ['noise_region_uncertainty']
def noise_region_uncertainty(spect... | [
11748,
299,
32152,
355,
45941,
198,
198,
6738,
6468,
28338,
1330,
4991,
355,
334,
198,
198,
6738,
11485,
1330,
27217,
16,
35,
11,
13058,
1373,
47371,
198,
6738,
6468,
28338,
13,
358,
7890,
13,
358,
19524,
1425,
774,
1330,
520,
67,
136... | 2.720881 | 953 |
class IdentificationTypeNotFoundException(Exception):
"""
Raise if an identification type is supplied that does not exist in the application's identification type constants.
"""
pass
class RoleNotFoundException(Exception):
"""
Raise if provided role is not in organization's defined roles
... | [
4871,
38657,
6030,
3673,
21077,
16922,
7,
16922,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
35123,
611,
281,
11795,
2099,
318,
14275,
326,
857,
407,
2152,
287,
262,
3586,
338,
11795,
2099,
38491,
13,
198,
220,
220,
220,
3722... | 3.795455 | 88 |
from ydb.operation import * # noqa
| [
6738,
331,
9945,
13,
27184,
1330,
1635,
220,
1303,
645,
20402,
198
] | 3 | 12 |
import os
from uuid import uuid4
import re
from app.scrape import scrape
from telegram import InlineQueryResultVoice, Update
from telegram.ext import Updater, InlineQueryHandler, CommandHandler, CallbackContext
def inlinequery(update: Update, context: CallbackContext) -> None:
"""Handle the inline query."""
... | [
11748,
28686,
198,
6738,
334,
27112,
1330,
334,
27112,
19,
198,
11748,
302,
198,
6738,
598,
13,
1416,
13484,
1330,
42778,
198,
198,
6738,
573,
30536,
1330,
554,
1370,
20746,
23004,
35708,
11,
10133,
198,
6738,
573,
30536,
13,
2302,
1330... | 2.665714 | 350 |
import roman
| [
11748,
374,
5185,
628,
628,
628
] | 3 | 6 |
from typing import Dict
import torch
from allennlp.data import Batch, Instance, Token, Vocabulary
from allennlp.data.dataset_readers.dataset_utils.span_utils import enumerate_spans
from allennlp.data.fields import TextField, ListField, SpanField
from allennlp.data.token_indexers import TokenIndexer, SingleIdTokenInde... | [
6738,
19720,
1330,
360,
713,
198,
198,
11748,
28034,
198,
198,
6738,
477,
1697,
34431,
13,
7890,
1330,
347,
963,
11,
2262,
590,
11,
29130,
11,
47208,
22528,
198,
6738,
477,
1697,
34431,
13,
7890,
13,
19608,
292,
316,
62,
961,
364,
1... | 3.28481 | 158 |
from functools import partial
from torchnlp.encoders.text.static_tokenizer_encoder import StaticTokenizerEncoder
class MosesEncoder(StaticTokenizerEncoder):
""" Encodes the text using the Moses tokenizer.
**Tokenizer Reference:**
http://www.nltk.org/_modules/nltk/tokenize/moses.html
Args:
*... | [
6738,
1257,
310,
10141,
1330,
13027,
198,
198,
6738,
7332,
1349,
34431,
13,
12685,
375,
364,
13,
5239,
13,
12708,
62,
30001,
7509,
62,
12685,
12342,
1330,
36125,
30642,
7509,
27195,
12342,
628,
198,
4871,
19010,
27195,
12342,
7,
45442,
... | 2.468085 | 423 |
import pandas as pd
import requests
import yaml
import os
import json
import argparse
import math
import time
if __name__ == "__main__":
main()
| [
11748,
19798,
292,
355,
279,
67,
198,
11748,
7007,
198,
11748,
331,
43695,
198,
11748,
28686,
198,
11748,
33918,
198,
11748,
1822,
29572,
198,
11748,
10688,
198,
11748,
640,
628,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
8... | 3.102041 | 49 |
from django.contrib import admin
# Register your models here.
from .models import FamilyTree
###############################################################################
# full views
admin.site.register(FamilyTree, FamilyTreeAdmin)
| [
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
198,
2,
17296,
534,
4981,
994,
13,
198,
198,
6738,
764,
27530,
1330,
7884,
27660,
198,
198,
29113,
29113,
7804,
4242,
21017,
198,
2,
1336,
5009,
198,
28482,
13,
15654,
13,
30238,
7,... | 4.76 | 50 |
import sys
import miner_globals
import m.keywords
#####################
# Syntax token definitions
#####################
tokens = [
'INTEGER', 'HEXINTEGER', 'OCTINTEGER', 'BININTEGER',
'FLOAT',
'STRING',
'ID',
'GE', 'LE', 'EQ', 'NEQ', 'POW',
'MATCH_EQ', 'MATCH_NEQ',
'INCR', ... | [
11748,
25064,
201,
198,
11748,
16285,
62,
4743,
672,
874,
201,
198,
11748,
285,
13,
2539,
10879,
201,
198,
201,
198,
14468,
4242,
2,
201,
198,
2,
26375,
897,
11241,
17336,
201,
198,
14468,
4242,
2,
201,
198,
201,
198,
83,
482,
641,
... | 1.744142 | 3,201 |
"""Pony based StatementConnector.
"""
import datetime
from pony import orm
# This is important as using orm.desc in a query leads to an Exception
from pony.orm import desc
from papilotte.connectors.abstractconnector import AbstractConnector
from papilotte.exceptions import CreationException, ReferentialIntegrityError... | [
37811,
47,
1647,
1912,
21983,
34525,
13,
198,
37811,
198,
11748,
4818,
8079,
198,
198,
6738,
26902,
1330,
393,
76,
198,
2,
770,
318,
1593,
355,
1262,
393,
76,
13,
20147,
287,
257,
12405,
5983,
284,
281,
35528,
198,
6738,
26902,
13,
... | 2.226059 | 2,809 |
MOCKTYPES = ()
try:
from mock import Mock
MOCKTYPES += (Mock,)
except ImportError:
pass
try:
from unittest.mock import Mock
MOCKTYPES += (Mock,)
except ImportError:
pass
| [
44,
11290,
9936,
47,
1546,
796,
7499,
198,
28311,
25,
198,
220,
220,
220,
422,
15290,
1330,
44123,
628,
220,
220,
220,
337,
11290,
9936,
47,
1546,
15853,
357,
44,
735,
35751,
198,
16341,
17267,
12331,
25,
198,
220,
220,
220,
1208,
1... | 2.373494 | 83 |
"""Main module."""
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager
from webdriver_manager.utils import ChromeType
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdri... | [
37811,
13383,
8265,
526,
15931,
198,
6738,
384,
11925,
1505,
1330,
3992,
26230,
198,
6738,
384,
11925,
1505,
13,
12384,
26230,
13,
46659,
13,
15271,
1330,
4809,
198,
6738,
3992,
26230,
62,
37153,
13,
46659,
1330,
13282,
32103,
13511,
198,... | 2.772666 | 739 |
#!/usr/bin/env python
"""
PlexConnectDaemon
Creates a proper daemon on mac/linux
"""
import os
import sys
import signal
import argparse
import atexit
from PlexConnect import startup, shutdown, run, cmdShutdown
def daemonize(args):
"""
do the UNIX double-fork magic, see Stevens' "Advanced
Programming in... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
37811,
198,
46383,
13313,
26531,
7966,
198,
198,
16719,
274,
257,
1774,
33386,
319,
8352,
14,
23289,
198,
37811,
198,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
6737,
198,
11... | 2.324201 | 876 |
"""
绘制期望值
"""
import dash
import dash_html_components as html
import dash_core_components as dcc
from lottery import get_history, expected_value
codes = ['双色球', '七乐彩', '3D', '大乐透', '排列三', '排列五', '七星彩']
count = 20
datas = []
for c in codes:
print('Get %s data...' % c)
try:
his = get_history(c, count)
... | [
37811,
198,
163,
119,
246,
26344,
114,
17312,
253,
17312,
249,
161,
222,
120,
198,
37811,
198,
11748,
14470,
198,
11748,
14470,
62,
6494,
62,
5589,
3906,
355,
27711,
198,
11748,
14470,
62,
7295,
62,
5589,
3906,
355,
288,
535,
198,
198... | 1.856299 | 508 |
import argparse
import time
import math
import numpy as np
import torch
from torch._C import device
import torch.nn as nn
import torch.optim.lr_scheduler as lr_scheduler
from functools import partial
import data
from ONLSTM_model import ONLSTMModel
from AWDLSTM_model import RNNModel
from tqdm import tqdm
from utils imp... | [
11748,
1822,
29572,
198,
11748,
640,
198,
11748,
10688,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28034,
198,
6738,
28034,
13557,
34,
1330,
3335,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
28034,
13,
40085,
13,
14050,
... | 3.014085 | 355 |
# imports
import numpy as np
import pandas as pd
from scipy.interpolate import griddata, Akima1DInterpolator
import random
from utils import io, plotting, fit, modify
import matplotlib.pyplot as plt
plt.style.use(['science', 'ieee', 'std-colors'])
# inspect calibration in-focus coords
"""
# file path
fp_in_focus... | [
198,
2,
17944,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
6738,
629,
541,
88,
13,
3849,
16104,
378,
1330,
1036,
1638,
1045,
11,
9084,
8083,
16,
35,
9492,
16104,
1352,
198,
11748,
4738,
198,
198,
6... | 2.356021 | 1,146 |
import xlsxwriter
import requests
import os,re
from lxml import html
import time
hc=house_crawl()
page_num=1546
for i in range(1,page_num+1):
print('正在爬去第{}页'.format(i))
url = 'http://sh.centanet.com/ershoufang/g{}/?sem=baidu_ty'.format(i)
try:
hc(url)
except:
hc.close()
... | [
11748,
2124,
7278,
87,
16002,
201,
198,
11748,
7007,
201,
198,
11748,
28686,
11,
260,
201,
198,
6738,
300,
19875,
1330,
27711,
201,
198,
11748,
640,
201,
198,
71,
66,
28,
4803,
62,
66,
13132,
3419,
201,
198,
7700,
62,
22510,
28,
131... | 1.816327 | 196 |
from flask_jwt_extended import jwt_required
from flask_restful import Resource, reqparse
from werkzeug.exceptions import NotFound, BadRequest
from model.site import SiteModel
from utils.utils import non_empty_string
arguments = reqparse.RequestParser(bundle_errors=True)
arguments.add_argument('url', type=non_empty_st... | [
6738,
42903,
62,
73,
46569,
62,
2302,
1631,
1330,
474,
46569,
62,
35827,
198,
6738,
42903,
62,
2118,
913,
1330,
20857,
11,
43089,
29572,
198,
6738,
266,
9587,
2736,
1018,
13,
1069,
11755,
1330,
1892,
21077,
11,
7772,
18453,
198,
198,
... | 3.035714 | 140 |
import numpy as np
from pathlib import Path
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Conv2D, MaxPooling2D, Dense, Flatten, Conv2DTranspose, LeakyReLU, BatchNormalization, Activation, Reshape
from tensorflow.keras.utils import to_categorical
from tensorflow.keras.optimizers impo... | [
11748,
299,
32152,
355,
45941,
198,
6738,
3108,
8019,
1330,
10644,
198,
6738,
11192,
273,
11125,
13,
6122,
292,
13,
27530,
1330,
24604,
1843,
198,
6738,
11192,
273,
11125,
13,
6122,
292,
13,
75,
6962,
1330,
34872,
17,
35,
11,
5436,
27... | 2.622276 | 413 |
import dash
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output
import plotly.express as px
df = px.data.tips()
days = df.day.unique()
app = dash.Dash(__name__)
app.layout = html.Div([
dcc.Dropdown(
id="dropdown",
options=[{"label": x... | [
11748,
14470,
198,
11748,
14470,
62,
7295,
62,
5589,
3906,
355,
288,
535,
198,
11748,
14470,
62,
6494,
62,
5589,
3906,
355,
27711,
198,
6738,
14470,
13,
45841,
3976,
1330,
23412,
11,
25235,
198,
11748,
7110,
306,
13,
42712,
355,
279,
... | 2.413043 | 230 |
from datetime import datetime
from mpplugs.Namespace import Namespace
from mpplugs.Settings import Settings
from mpplugs.LogColor import LogColor as CLR
| [
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
285,
381,
75,
10339,
13,
36690,
10223,
1330,
28531,
10223,
198,
6738,
285,
381,
75,
10339,
13,
26232,
1330,
16163,
198,
6738,
285,
381,
75,
10339,
13,
11187,
10258,
1330,
5972,
10258,
355,
... | 3.55814 | 43 |
# -*- coding: utf-8 -*-
"""Workchain to generate pinball hyperparameters"""
from aiida.engine import calcfunction
from aiida.engine.processes import workchains
from aiida_quantumespresso.utils.defaults import calculation
from samos.trajectory import Trajectory
from aiida import orm
from aiida.common import AttributeDic... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
12468,
7983,
284,
7716,
6757,
1894,
8718,
17143,
7307,
37811,
198,
6738,
257,
72,
3755,
13,
18392,
1330,
42302,
8818,
198,
6738,
257,
72,
3755,
13,
18392,
13,
146... | 2.536947 | 5,129 |
import requests
import time
from hashlib import md5
| [
11748,
7007,
198,
11748,
640,
198,
6738,
12234,
8019,
1330,
45243,
20,
628,
198
] | 3.857143 | 14 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Nekozilla is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Nekozilla is distributed... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
37167,
8590,
5049,
318,
1479,
3788,
25,
345,
460,
17678,
4163,
340,
290,
14,
273,
13096,
198,
2,
340,
739,
2... | 3.393939 | 330 |
# Copyright (C) 2016 Nippon Telegraph and Telephone Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | [
2,
15069,
357,
34,
8,
1584,
399,
3974,
261,
21821,
290,
44735,
10501,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846... | 3.34 | 250 |
import cv2
from win32api import GetSystemMetrics
import time
import os
import math
from tkinter import filedialog, messagebox
from cvzone.HandTrackingModule import HandDetector
filepath = filedialog.askopenfilename(initialdir=os.getcwd(), title='Browse Image File', filetypes=(('JPEG Image File', '*.jpg'),('PNG... | [
11748,
269,
85,
17,
201,
198,
6738,
1592,
2624,
15042,
1330,
3497,
11964,
9171,
10466,
201,
198,
11748,
640,
201,
198,
11748,
28686,
201,
198,
11748,
10688,
201,
198,
6738,
256,
74,
3849,
1330,
5717,
498,
519,
11,
3275,
3524,
201,
198... | 2.008727 | 3,552 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import random
import argparse
import pandas as pd
from datetime import datetime
import ray
from ray.tune import run, sample_from
from ray.tune.schedulers import PopulationBasedTraining, AsyncHyperBa... | [
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
6738,
11593,
37443,
834,
1330,
7297,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
198,
11748,
28686,
198,
11748,
4738,
198,
11748,
1822,
29572,
198,
11748,
19798,
292,
... | 2.133023 | 2,150 |
# Parallel implementation template from: https://gitlab.com/lucasrthompson/Sonic-Bot-In-OpenAI-and-NEAT
# PuyoPuyo gym environment from: https://github.com/frostburn/gym_puyopuyo
import os
import pickle
import numpy as np
from gym_puyopuyo import register
import gym
import neat
import visualize
DRAW_NETS = True
NUM_W... | [
2,
42945,
7822,
11055,
422,
25,
3740,
1378,
18300,
23912,
13,
785,
14,
75,
1229,
292,
81,
400,
296,
8430,
14,
50,
9229,
12,
20630,
12,
818,
12,
11505,
20185,
12,
392,
12,
12161,
1404,
198,
2,
350,
4669,
78,
47,
4669,
78,
11550,
... | 2.97351 | 302 |
string = "bbc!"
palavra = "a".join(list(string))
print(palavra)
| [
8841,
796,
366,
11848,
66,
2474,
198,
18596,
615,
430,
796,
366,
64,
1911,
22179,
7,
4868,
7,
8841,
4008,
198,
4798,
7,
18596,
615,
430,
8,
198
] | 2.285714 | 28 |
# pylint: disable-msg=W0703
# pylint: disable-msg=E1103
import logging
import sys
from google.appengine.ext import ndb
from google.appengine.api import users
from app_dashboard_helper import AppDashboardHelper
from app_dashboard_helper import AppHelperException
class DashboardDataRoot(ndb.Model):
""" A Datastore M... | [
2,
279,
2645,
600,
25,
15560,
12,
19662,
28,
54,
15,
36809,
198,
2,
279,
2645,
600,
25,
15560,
12,
19662,
28,
36,
11442,
18,
198,
198,
11748,
18931,
198,
11748,
25064,
198,
6738,
23645,
13,
1324,
18392,
13,
2302,
1330,
299,
9945,
... | 2.810956 | 8,580 |
from .._factorial import factorial
def number_of_subsets(
set_size: int,
subset_size: int,
order_matters: bool = False,
can_reselect: bool = False
):
"""
Gets the number of ways to choose ``subset_size`` items from a set of
``set_size`` possibilities.
:param set_size:
... | [
6738,
11485,
62,
22584,
5132,
1330,
1109,
5132,
628,
198,
4299,
1271,
62,
1659,
62,
7266,
28709,
7,
198,
220,
220,
220,
220,
220,
220,
220,
900,
62,
7857,
25,
493,
11,
198,
220,
220,
220,
220,
220,
220,
220,
24637,
62,
7857,
25,
... | 2.563034 | 936 |
# Analyse eines Textes: Vorkommen von Links
from re import *
#Hauptprogramm
linkliste = linkfind("LICENSE.txt")
print("Links in der Python-LICENSE-Datei: ")
for link in linkliste:
print(link)
#1 Die Sequenz "?:" am Anfang des Ausdrucks "(?:html?|/)"
#1 ist notwendig, damit "findall()" den gesamten... | [
2,
16213,
325,
304,
1127,
8255,
274,
25,
569,
967,
2002,
268,
18042,
21691,
201,
198,
201,
198,
6738,
302,
1330,
1635,
201,
198,
201,
198,
201,
198,
2,
39,
559,
457,
23065,
76,
201,
198,
8726,
4868,
68,
796,
2792,
19796,
7203,
43,... | 2.240741 | 162 |
import unittest
from app.parOimpar import verificar
# IMPAR = FALSE , PAR = TRUE
if __name__ == '__main__':
unittest.main()
| [
11748,
555,
715,
395,
201,
198,
6738,
598,
13,
1845,
46,
320,
1845,
1330,
3326,
811,
283,
201,
198,
201,
198,
201,
198,
220,
220,
220,
1303,
30023,
1503,
796,
26563,
837,
29463,
796,
26751,
201,
198,
201,
198,
201,
198,
361,
11593,
... | 2.265625 | 64 |
# Copyright (C) 2021 Satoshi Konno. 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 law... | [
2,
15069,
357,
34,
8,
33448,
40824,
17431,
3919,
13,
1439,
2489,
10395,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
118... | 3.197216 | 431 |
import getopt
import logging
import re
import time
from models import Models
from classes.Identifier import Identifier
from services.YahooShopping import YahooShopping
from services.AmazonScraper import AmazonScraper, AccessBlocked
from utils.common import get_db_instance, get_yahoo_appid, \
get_amazon_scraping_prox... | [
11748,
651,
8738,
198,
11748,
18931,
198,
11748,
302,
198,
11748,
640,
198,
198,
6738,
4981,
1330,
32329,
198,
6738,
6097,
13,
33234,
7483,
1330,
11440,
7483,
198,
6738,
2594,
13,
56,
12992,
2484,
33307,
1330,
16551,
2484,
33307,
198,
6... | 3.47619 | 105 |
# Copyright (c) 2020 Graphcore Ltd. All rights reserved.
from .logger import Logger
from .argparser import get_common_parser, parse_with_config
from .metrics import Metrics, accuracy
from .ipu_settings import inference_settings, train_settings
from .distributed import handle_distributed_settings, init_popdist, allreduc... | [
2,
15069,
357,
66,
8,
12131,
29681,
7295,
12052,
13,
1439,
2489,
10395,
13,
198,
6738,
764,
6404,
1362,
1330,
5972,
1362,
198,
6738,
764,
853,
48610,
1330,
651,
62,
11321,
62,
48610,
11,
21136,
62,
4480,
62,
11250,
198,
6738,
764,
4... | 3.121053 | 190 |
from SLIT import Lens
import pyfits as pf
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.cm as cm
from scipy import signal as scp
from SLIT import wave_transform as mw
import time
from scipy import signal as scp
import SLIT as slit
from mpl_toolkits.axes_grid1.inset_locator import zoomed_inset_ax... | [
6738,
12419,
2043,
1330,
30092,
198,
11748,
12972,
21013,
355,
279,
69,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
220,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
11215,
355,
12067,
198,
67... | 2.434377 | 1,501 |
########O.K
# str() converte número em string
########O.K
# Ex: s = banana retorna bana
########O.K
########O.K
if __name__ == '__main__':
main()
| [
7804,
46,
13,
42,
201,
198,
2,
965,
3419,
6718,
660,
299,
21356,
647,
78,
795,
4731,
220,
201,
198,
220,
220,
220,
220,
201,
198,
7804,
46,
13,
42,
201,
198,
2,
1475,
25,
264,
796,
25996,
1005,
1211,
64,
275,
2271,
201,
198,
2... | 2.011364 | 88 |
#
# Copyright (c) 2021 Seagate Technology LLC and/or its Affiliates
#
# 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 ap... | [
2,
198,
2,
15069,
357,
66,
8,
33448,
1001,
37861,
8987,
11419,
290,
14,
273,
663,
6708,
2403,
689,
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,
... | 3.578755 | 273 |
#from pivottablejs import pivot_ui
import dash
import dash_core_components as dcc
from dash.dependencies import Input, Output
import dash_html_components as html
import dash_pivottable
from django_plotly_dash import DjangoDash
#app = dash.Dash(__name__)
app = DjangoDash('efiga_pivot_app')
#app.scripts.config.serve_l... | [
2,
6738,
16767,
1252,
540,
8457,
1330,
30355,
62,
9019,
198,
198,
11748,
14470,
198,
11748,
14470,
62,
7295,
62,
5589,
3906,
355,
288,
535,
198,
6738,
14470,
13,
45841,
3976,
1330,
23412,
11,
25235,
198,
11748,
14470,
62,
6494,
62,
55... | 2.206587 | 668 |
import numpy as np
import matplotlib.pyplot as plt
xmin, xmax = -np.pi, np.pi
x = np.arange(xmin, xmax, 0.1)
y_sin = np.sin(x)
y_cos = np.cos(x)
plt.subplot(2, 1, 1)
plt.plot(x, y_sin)
plt.title('$\sin(x)$')
plt.xlim(xmin, xmax)
plt.ylim(-1.3, 1.3)
plot_function_name('$\sin(x)$')
plt.subplot(2, 1, 2)
plt.plot(x, y_c... | [
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
628,
198,
87,
1084,
11,
2124,
9806,
796,
532,
37659,
13,
14415,
11,
45941,
13,
14415,
198,
87,
796,
45941,
13,
283,
858,
7,
87,
1084,
11,
... | 1.786561 | 253 |
from hexagon.support.storage import store_user_data
from hexagon.support.hooks import HexagonHooks
from hexagon.support.hooks.hook import HookSubscription
SUBSCRIPTION_NAME = "test-plugin"
| [
6738,
17910,
1840,
13,
11284,
13,
35350,
1330,
3650,
62,
7220,
62,
7890,
198,
6738,
17910,
1840,
13,
11284,
13,
25480,
82,
1330,
22212,
1840,
39,
31085,
198,
6738,
17910,
1840,
13,
11284,
13,
25480,
82,
13,
25480,
1330,
18531,
7004,
3... | 3.410714 | 56 |
import numpy #for numpy storage
import os #to find files
import time #for time to complete
from sklearn import svm
import pickle
start = time.time()
from sklearn.calibration import CalibratedClassifierCV
from statistics import mean
#Import Training Data & Labels
data = numpy.load("Data/1UkiORBTrainingData.npy")
data =... | [
11748,
299,
32152,
1303,
1640,
299,
32152,
6143,
198,
11748,
28686,
1303,
1462,
1064,
3696,
198,
11748,
640,
1303,
1640,
640,
284,
1844,
198,
6738,
1341,
35720,
1330,
264,
14761,
198,
11748,
2298,
293,
198,
9688,
796,
640,
13,
2435,
341... | 2.331085 | 1,927 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import contractor.Building.models
import django.db.models.deletion
import contractor.fields
| [
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,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
17195,
13,
25954,
13,
27530,
... | 3.262295 | 61 |
import requests
import string
import ephem
from math import atan2, degrees
class MPCORB:
"""Docstring will go here...
...Eventually"""
def __init__ (self, obj):
"""Doc string"""
self.obj = obj
self.objdata = self.getMPC()
self.pdes = self.objdata[0:7].strip()
self... | [
11748,
7007,
198,
11748,
4731,
198,
11748,
2462,
4411,
198,
6738,
10688,
1330,
379,
272,
17,
11,
7370,
198,
198,
4871,
4904,
44879,
33,
25,
198,
220,
220,
220,
37227,
23579,
8841,
481,
467,
994,
986,
628,
220,
220,
220,
2644,
28724,
... | 2.231334 | 1,634 |
import tensorflow as tf
from speechrecproj.data.labels import Label
__author__ = 'Daniel Schlaug'
| [
11748,
11192,
273,
11125,
355,
48700,
198,
6738,
4046,
8344,
1676,
73,
13,
7890,
13,
23912,
1424,
1330,
36052,
198,
198,
834,
9800,
834,
796,
705,
19962,
48467,
7493,
6,
628,
198
] | 3.15625 | 32 |
import asyncio
import json
from mashup.services.music_brainz import MusicBrainzService
from mashup.services.cover_art import CoverArtService
from mashup.services.wikipedia import WikipediaService
| [
198,
11748,
30351,
952,
198,
11748,
33918,
198,
198,
6738,
30407,
929,
13,
30416,
13,
28965,
62,
27825,
89,
1330,
7849,
44687,
89,
16177,
198,
6738,
30407,
929,
13,
30416,
13,
9631,
62,
433,
1330,
17546,
8001,
16177,
198,
6738,
30407,
... | 3.98 | 50 |
#
# PySNMP MIB module CISCO-SVC-INTERFACE-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-SVC-INTERFACE-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 17:56:35 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 ... | [
2,
198,
2,
9485,
15571,
7378,
337,
9865,
8265,
36159,
8220,
12,
50,
15922,
12,
41358,
49836,
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,
14... | 2.463106 | 12,807 |
"""
Copyright 2018-present, Facebook, Inc.
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 in writing,... | [
37811,
198,
15269,
2864,
12,
25579,
11,
3203,
11,
3457,
13,
198,
198,
26656,
15385,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
5832,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
... | 3.859375 | 192 |
'''
Describes core model of bacterio
'''
import random
from app.hexafield import HexCoords, get_step_to
from app.creatures import Predator, Bacteria
from app.rand_p import rand_p
class CoreModel(object):
'''
Describes core (the simpliest one) model of bacterio.
'field' is HexafieldBase instance,
'm... | [
7061,
6,
198,
24564,
22090,
4755,
2746,
286,
19241,
952,
220,
198,
7061,
6,
198,
198,
11748,
4738,
198,
198,
6738,
598,
13,
33095,
1878,
1164,
1330,
22212,
7222,
3669,
11,
651,
62,
9662,
62,
1462,
198,
6738,
598,
13,
20123,
942,
133... | 2.15406 | 2,155 |
from datadog import initialize, statsd
from typing import Dict, List
import os
import json
NUMBER_OF_TERMS = 3
options = {"statsd_host": "127.0.0.1", "statsd_port": 8125}
initialize(**options)
# Gets the newest NUMBER_OF_TERMS terms
tags = {}
if os.environ.get("GITHUB_ACTIONS"):
tags["env"] = "github"
else:... | [
6738,
4818,
324,
519,
1330,
41216,
11,
9756,
67,
198,
6738,
19720,
1330,
360,
713,
11,
7343,
198,
11748,
28686,
198,
11748,
33918,
198,
198,
41359,
13246,
62,
19238,
62,
5781,
5653,
796,
513,
198,
198,
25811,
796,
19779,
34242,
67,
62... | 1.719234 | 1,097 |
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import re
from spack.compiler import Compiler, _version_cache
from spack.util.executable import Executable
| [
2,
15069,
2211,
12,
23344,
13914,
45036,
3549,
2351,
4765,
11,
11419,
290,
584,
198,
2,
1338,
441,
4935,
34152,
13,
4091,
262,
1353,
12,
5715,
27975,
38162,
9947,
2393,
329,
3307,
13,
198,
2,
198,
2,
30628,
55,
12,
34156,
12,
33234,... | 3.488636 | 88 |
# Created by MechAviv
# ID :: [302010000]
# Ariant : Middle of the Desert
# Update Quest Record EX | Quest ID: [32603] | Data: ep1=302010000 | [
2,
15622,
416,
18202,
7355,
452,
198,
2,
4522,
7904,
685,
1270,
1264,
2388,
60,
198,
2,
6069,
415,
1058,
6046,
286,
262,
18692,
198,
198,
2,
10133,
6785,
13266,
7788,
930,
6785,
4522,
25,
685,
2624,
35642,
60,
930,
6060,
25,
2462,
... | 2.9375 | 48 |