content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
# -*- coding: utf-8 -*-
"""
Pretty much trivial logging demo
Default log file - './logs/vCenter.log'
"""
from common.logger import getLogger
from common.logger import configure_loglevel
_logger = getLogger(__name__) # Default logger is using
# _logger = getLogger("vCenterShell") # for Shell App itself
... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
35700,
881,
20861,
18931,
13605,
198,
198,
19463,
2604,
2393,
532,
705,
19571,
6404,
82,
14,
85,
23656,
13,
6404,
6,
198,
37811,
198,
198,
6738,
2219,
13,
... | 2.651685 | 267 |
from ..test_signatures import extension_module
| [
6738,
11485,
9288,
62,
12683,
6691,
1330,
7552,
62,
21412,
628,
198
] | 4.083333 | 12 |
import django_filters
from proma.common.helpers import CommonFilterHelper
from .models import Client
| [
11748,
42625,
14208,
62,
10379,
1010,
198,
198,
6738,
1552,
64,
13,
11321,
13,
16794,
364,
1330,
8070,
22417,
47429,
198,
198,
6738,
764,
27530,
1330,
20985,
628
] | 3.714286 | 28 |
#!/usr/bin/env python3
from ctypes import *
import m2m2_core
import common_application_interface
M2M2_PS_SYS_PWR_STATE_ENUM_t = {
"type":c_uint8,
"enum_values": [
("M2M2_PS_SYS_PWR_STATE_ACTIVE",0x0),
("M2M2_PS_SYS_PWR_STATE_FLEXI",0x1),
("M2M2_PS_SYS_PWR_STATE_HIBERNATE",0x2),
("M2M2_PS_SYS_PWR... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
6738,
269,
19199,
1330,
1635,
198,
198,
11748,
285,
17,
76,
17,
62,
7295,
198,
198,
11748,
2219,
62,
31438,
62,
39994,
198,
198,
44,
17,
44,
17,
62,
3705,
62,
50,
16309,
... | 1.804818 | 2,034 |
"""
========================================================================
BasePass.py
========================================================================
An "abstract" base class for all passes.
Author : Shunning Jiang
Date : Dec 17, 2017
"""
| [
37811,
198,
23926,
2559,
198,
14881,
14478,
13,
9078,
198,
23926,
2559,
198,
2025,
366,
397,
8709,
1,
2779,
1398,
329,
477,
8318,
13,
198,
198,
13838,
1058,
911,
16596,
32294,
198,
10430,
220,
220,
1058,
4280,
1596,
11,
2177,
198,
378... | 5.906977 | 43 |
# coding=utf-8
from __future__ import unicode_literals
from .. import BaseProvider
localized = True | [
2,
19617,
28,
40477,
12,
23,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
6738,
11485,
1330,
7308,
29495,
198,
198,
12001,
1143,
796,
6407
] | 3.448276 | 29 |
"""Italian language."""
from typing import Dict, Tuple
# Regex to find the pronunciation
pronunciation = r"{IPA\|/([^/]+)/"
# Regex to find the gender
gender = r"{{Pn\|?w?}} ''([fm])[singvol ]*''"
# Float number separator
float_separator = ","
# Thousands separator
thousands_separator = " "
# Markers for sections ... | [
37811,
45696,
3303,
526,
15931,
198,
6738,
19720,
1330,
360,
713,
11,
309,
29291,
198,
198,
2,
797,
25636,
284,
1064,
262,
41694,
198,
31186,
24978,
796,
374,
1,
90,
4061,
32,
59,
91,
14,
26933,
61,
14,
48688,
20679,
1,
198,
198,
... | 2.286416 | 1,222 |
#!/usr/bin/env python
import rospy
from std_msgs.msg import String
from sensor_msgs.msg import MagneticField
from math import atan2, sin, cos, sqrt
if __name__ == '__main__':
listener()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
11748,
686,
2777,
88,
198,
6738,
14367,
62,
907,
14542,
13,
19662,
1330,
10903,
198,
6738,
12694,
62,
907,
14542,
13,
19662,
1330,
44629,
15878,
198,
6738,
10688,
1330,
379,
272,
17,
1... | 2.850746 | 67 |
"""Module containing tests for the delver tool"""
import unittest
from unittest import mock
from context import core as mod_ut
class TestDelveFunctional(unittest.TestCase):
"""Functional tests for the delver tool"""
def setUp(self):
"""Initialize frequently used test objects"""
self.test_obj... | [
37811,
26796,
7268,
5254,
329,
262,
1619,
332,
2891,
37811,
198,
11748,
555,
715,
395,
198,
6738,
555,
715,
395,
1330,
15290,
198,
198,
6738,
4732,
1330,
4755,
355,
953,
62,
315,
628,
198,
4871,
6208,
35,
9954,
22203,
282,
7,
403,
7... | 1.765625 | 4,224 |
#!/usr/bin/env python3
#-*- coding: utf-8 -*-
#import gitlab
import os
import sys
import getopt
import json
import requests
get_mr_title = False
project_id = ''
try:
opts, args = getopt.getopt(sys.argv[1:],"hi:t:ti:p:b",["token=", "title", "project=", "branch="])
except getopt.GetoptError:
print('test.py [-c... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
12,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
628,
198,
2,
11748,
17606,
23912,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
651,
8738,
198,
11748,
33918,
198,
11... | 2.375127 | 981 |
# Third Party (PyPI) Imports
import requests
| [
2,
10467,
3615,
357,
20519,
11901,
8,
1846,
3742,
198,
11748,
7007,
628
] | 3.538462 | 13 |
import time
import requests
from bs4 import BeautifulSoup as bs
url= []
for page in range(1,9):
time.sleep(5)
source = 'https://www.ndtv.com/latest/page-{}'.format(page)
source = requests.get(source).text
soup = bs(source,'html5lib')
soup = soup.find('div',{'class': 'new_storylising'})
for i in ... | [
11748,
640,
198,
11748,
7007,
198,
6738,
275,
82,
19,
1330,
23762,
50,
10486,
355,
275,
82,
198,
6371,
28,
17635,
198,
1640,
2443,
287,
2837,
7,
16,
11,
24,
2599,
198,
220,
220,
220,
640,
13,
42832,
7,
20,
8,
198,
220,
220,
220,... | 2.233871 | 620 |
create_empty_blob = "SELECT lo_creat(-1)"
write_data_to_blob = "SELECT lo_put(CAST(:loid AS OID), :offset, :data)"
read_data_from_blob = "SELECT lo_get(CAST(:loid AS OID), :offset, :length)"
delete_blob = "SELECT lo_unlink(CAST(:loid AS OID))"
get_size_of_blob_function = """
CREATE OR REPLACE FUNCTION pg_temp.get_l... | [
17953,
62,
28920,
62,
2436,
672,
796,
366,
46506,
2376,
62,
20123,
32590,
16,
16725,
198,
198,
13564,
62,
7890,
62,
1462,
62,
2436,
672,
796,
366,
46506,
2376,
62,
1996,
7,
44647,
7,
25,
75,
1868,
7054,
440,
2389,
828,
1058,
28968,
... | 2.469626 | 428 |
from web3._utils.threads import (
Timeout,
)
from web3.providers.eth_tester import (
EthereumTesterProvider,
)
| [
6738,
3992,
18,
13557,
26791,
13,
16663,
82,
1330,
357,
198,
220,
220,
220,
3862,
448,
11,
198,
8,
198,
6738,
3992,
18,
13,
15234,
4157,
13,
2788,
62,
4879,
353,
1330,
357,
198,
220,
220,
220,
20313,
51,
7834,
29495,
11,
198,
8,
... | 2.666667 | 45 |
# -*- coding: utf-8 -*-
# (C) 2016-2021 Muthiah Annamalai
#
# This file is part of 'open-tamil' package
# We generate unigram and bi-gram statistics for Tamil texts
#
import tamil
from ngram.LetterModels import Unigram
import codecs
import pprint
import copy
import operator
from functools import cmp_to_key
import sys
i... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
357,
34,
8,
1584,
12,
1238,
2481,
337,
1071,
9520,
5506,
321,
282,
1872,
198,
2,
198,
2,
770,
2393,
318,
636,
286,
705,
9654,
12,
83,
321,
346,
6,
5301,
198,
... | 2.788079 | 151 |
import grpc
from django.utils.functional import SimpleLazyObject
client = SimpleLazyObject(lambda:grpc.insecure_channel('127.0.0.1:8001'))
| [
11748,
1036,
14751,
201,
198,
6738,
42625,
14208,
13,
26791,
13,
45124,
1330,
17427,
43,
12582,
10267,
201,
198,
16366,
796,
17427,
43,
12582,
10267,
7,
50033,
25,
2164,
14751,
13,
259,
22390,
62,
17620,
10786,
16799,
13,
15,
13,
15,
... | 2.769231 | 52 |
import pybitflyer
import key
from chart.controllers import get_data
import logging
logger = logging.getLogger(__name__)
class BitFlayer_Order():
"""[summary] bitflyer に成り行き注文で売買注文を行うクラス
"""
def AvailableBalance(self):
"""[summary]get available balance from bitflyerapi.
... | [
11748,
12972,
2545,
12254,
263,
201,
198,
201,
198,
11748,
1994,
201,
198,
201,
198,
6738,
8262,
13,
3642,
36667,
1330,
651,
62,
7890,
201,
198,
11748,
18931,
201,
198,
201,
198,
6404,
1362,
796,
18931,
13,
1136,
11187,
1362,
7,
834,
... | 1.898858 | 1,839 |
#!/usr/bin/python3
# -*- coding: utf-8 -*-
## Autor: David Ochoa
import numpy as np
from vispy.scene.visuals import Line
from pymouse import PyMouse
CV = np.arange(0, 2.05, 0.05, dtype=np.float32) * 3.14159
ZCV = np.zeros(CV.size, dtype=np.float32)
C_xy = np.array([np.cos(CV), np.sin(CV), ZCV]).T
C_xz = np.array([np.... | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2235,
5231,
273,
25,
3271,
440,
6679,
64,
198,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
1490,
9078,
13,
29734,
13,... | 2.262032 | 748 |
# coding: utf8
import base64
import codecs
import hashlib
import json
import math
import re
import string
import sys
import uuid
import webbrowser
import datetime
import sublime
import sublime_plugin
try:
from .encodingutils.escape_table import (
html_escape_table,
html5_escape_table,
htm... | [
2,
19617,
25,
3384,
69,
23,
198,
11748,
2779,
2414,
198,
11748,
40481,
82,
198,
11748,
12234,
8019,
198,
11748,
33918,
198,
11748,
10688,
198,
11748,
302,
198,
11748,
4731,
198,
11748,
25064,
198,
11748,
334,
27112,
198,
11748,
3992,
40... | 2.082102 | 1,827 |
import time
import numpy as np
import scipy.sparse as sp
from sklearn.linear_model import MultiTaskLasso as MultiTaskLasso_sk
from sparseglm.estimators import MultiTaskLasso
from sparseglm.utils import make_correlated_data, compute_alpha_max
n_samples = 100
n_features = 3000
n_tasks = 80
snr = 2
corr = 0.7
density... | [
11748,
640,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
629,
541,
88,
13,
82,
29572,
355,
599,
198,
198,
6738,
1341,
35720,
13,
29127,
62,
19849,
1330,
15237,
25714,
43,
28372,
355,
15237,
25714,
43,
28372,
62,
8135,
198,
673... | 2.287172 | 686 |
import math
import os
| [
11748,
10688,
198,
11748,
28686,
198,
220,
220,
220,
220
] | 2.6 | 10 |
#!/usr/bin/env python
#
# Author: Qiming Sun <osirpt.sun@gmail.com>
#
'''
Second order CASSCF
'''
import sys
import time
import copy
from functools import reduce
import numpy
import scipy.linalg
from pyscf import lib
from pyscf.lib import logger
from pyscf.mcscf import casci, mc1step
from pyscf.mcscf.casci import get... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
198,
2,
6434,
25,
1195,
320,
278,
3825,
1279,
418,
343,
457,
13,
19155,
31,
14816,
13,
785,
29,
198,
2,
198,
198,
7061,
6,
198,
12211,
1502,
35106,
6173,
37,
198,
7061,
6,
198... | 1.807785 | 3,751 |
import torch
import torchvision
from torchvision import transforms, datasets
import torchvision.transforms as standard_transforms
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import time
from PIL import Image
import matplotlib.pyplot as plt
import numpy as np
from torch.autograd im... | [
11748,
28034,
198,
11748,
28034,
10178,
198,
6738,
28034,
10178,
1330,
31408,
11,
40522,
198,
11748,
28034,
10178,
13,
7645,
23914,
355,
3210,
62,
7645,
23914,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
28034,
13,
20471,
13,
... | 3.022945 | 523 |
from typing import Iterator
from cog import BasePredictor, Path
| [
6738,
19720,
1330,
40806,
1352,
198,
198,
6738,
43072,
1330,
7308,
47,
17407,
273,
11,
10644,
628
] | 3.882353 | 17 |
# -*- coding: utf-8 -*-
## \package wizbin.launchers
# MIT licensing
# See: docs/LICENSE.txt
import os, shutil, wx
from dbr.language import GT
from dbr.log import DebugEnabled
from dbr.log import Logger
from fileio.fileio import ReadFile
from fileio.fileio import WriteFile
from globals.ident import btnid
f... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2235,
3467,
26495,
266,
528,
8800,
13,
38722,
3533,
198,
198,
2,
17168,
15665,
198,
2,
4091,
25,
34165,
14,
43,
2149,
24290,
13,
14116,
628,
198,
11748,
28686,
11... | 3.07722 | 777 |
"""
pycmark_vfm.readers
~~~~~~~~~~~~~~~~~~~
Vivliostyle Flavored Markdown readers for docutils.
:copyright: Copyright 2020 by Takeshi KOMIYA
:license: Apache License 2.0, see LICENSE for details.
"""
import re
from pycmark.readers import LineReaderDecorator
class WalledBlockReader(LineReaderDe... | [
37811,
198,
220,
220,
220,
12972,
66,
4102,
62,
85,
38353,
13,
961,
364,
198,
220,
220,
220,
220,
27156,
4907,
93,
628,
220,
220,
220,
25313,
4528,
455,
2349,
33026,
1850,
2940,
2902,
7183,
329,
2205,
26791,
13,
628,
220,
220,
220,
... | 2.383292 | 407 |
# -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2017-09-21 14:42
from __future__ import unicode_literals
from django.db import migrations, models
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2980,
515,
416,
37770,
352,
13,
940,
13,
22,
319,
2177,
12,
2931,
12,
2481,
1478,
25,
3682,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
... | 2.736842 | 57 |
GRAB_SPIDER_CONFIG = {
'global': {
'spider_modules': ['tests.script_crawl'],
},
}
| [
38,
3861,
33,
62,
4303,
41237,
62,
10943,
16254,
796,
1391,
198,
220,
220,
220,
705,
20541,
10354,
1391,
198,
220,
220,
220,
220,
220,
220,
220,
705,
2777,
1304,
62,
18170,
10354,
37250,
41989,
13,
12048,
62,
66,
13132,
6,
4357,
198... | 1.96 | 50 |
import functools
from marshmallow import Schema, fields
requiredString = functools.partial(fields.String, required=True)
requiredInteger = functools.partial(fields.Integer, required=True)
requiredBool = functools.partial(fields.Bool, required=True)
requiredFloat = functools.partial(fields.Float, required=True)
requir... | [
11748,
1257,
310,
10141,
198,
198,
6738,
22397,
42725,
1330,
10011,
2611,
11,
7032,
198,
198,
35827,
10100,
796,
1257,
310,
10141,
13,
47172,
7,
25747,
13,
10100,
11,
2672,
28,
17821,
8,
198,
35827,
46541,
796,
1257,
310,
10141,
13,
4... | 3.312081 | 298 |
import boto3
| [
11748,
275,
2069,
18,
628,
198
] | 2.5 | 6 |
import pandas as pd
import numpy as np
vim= pd.read_json("MOCK_DATA.json")
con= vim.to_csv("MOCK_DATA.csv") | [
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
198,
31124,
28,
279,
67,
13,
961,
62,
17752,
7203,
44,
11290,
62,
26947,
13,
17752,
4943,
198,
1102,
28,
43907,
13,
1462,
62,
40664,
7203,
44,
11290,
62,
2694... | 2.347826 | 46 |
# !/usr/bin/env python3
# -*- coding:utf-8 -*-
# @Datetime : 2020/1/17 22:11
# @Author : Fangyang
# @Software : PyCharm
from enum import Enum, unique
class KBarType(Enum):
'''
K 线种类
0 - 5 分钟K 线
1 - 15 分钟K 线
2 - 30 分钟K 线
3 - 1 小时K 线
4 - 日K 线
5 - 周K 线
6 - 月K 线
7 - 1 ... | [
2,
5145,
14,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
40477,
12,
23,
532,
9,
12,
198,
198,
2,
2488,
27354,
8079,
1058,
12131,
14,
16,
14,
1558,
2534,
25,
1157,
198,
2,
2488,
13838,
220,
220,
1058,
... | 1.478923 | 854 |
""" This module is used for setting an intial test configs and values for
the rdfframework """
import datetime
import multiprocessing as mp
import multiprocessing.managers as managers
import pdb
from rdfframework.utilities import SimpleMapReduce
from rdfframework.datatypes import pyrdf, BaseRdfDataType, Uri
def co... | [
37811,
220,
220,
220,
770,
8265,
318,
973,
329,
4634,
281,
493,
498,
1332,
4566,
82,
290,
3815,
329,
198,
1169,
374,
67,
487,
859,
6433,
37227,
198,
11748,
4818,
8079,
198,
11748,
18540,
305,
919,
278,
355,
29034,
198,
11748,
18540,
... | 2.069045 | 10,037 |
import os.path as osp
from functools import reduce
import mmcv
import numpy as np
from mmcv.utils import print_log
from torch.utils.data import Dataset
from mmseg.core import mean_iou
from mmseg.utils import get_root_logger
from .builder import DATASETS
from .pipelines import Compose
@DATASETS.register_module()
cla... | [
11748,
28686,
13,
6978,
355,
267,
2777,
198,
6738,
1257,
310,
10141,
1330,
4646,
198,
198,
11748,
8085,
33967,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
8085,
33967,
13,
26791,
1330,
3601,
62,
6404,
198,
6738,
28034,
13,
26791,
13,... | 2.062974 | 4,351 |
from unittest import TestCase
from Ship import Ship, Repair, Battleship, Corvette, Alignment
| [
6738,
555,
715,
395,
1330,
6208,
20448,
198,
6738,
16656,
1330,
16656,
11,
28912,
11,
25467,
1056,
11,
49105,
11,
978,
16747,
628
] | 4.086957 | 23 |
from toolz import curry
@curry
def nth(n, xs):
"""Returns the nth element of the given list or string. If n is negative the
element at index length + n is returned"""
try:
return xs[n]
except (IndexError, TypeError):
if type(xs) is str:
return ""
return None
| [
6738,
2891,
89,
1330,
34611,
628,
198,
31,
66,
16682,
198,
4299,
299,
400,
7,
77,
11,
2124,
82,
2599,
198,
220,
220,
220,
37227,
35561,
262,
299,
400,
5002,
286,
262,
1813,
1351,
393,
4731,
13,
1002,
299,
318,
4633,
262,
198,
220,... | 2.445313 | 128 |
import scipy.io as sio
import time
import os
import numpy as np
import gym
from keras import regularizers
from keras.models import Sequential, Model
from keras.layers import Dense, Activation, Flatten, Input, Subtract, Concatenate, BatchNormalization
from keras.optimizers import Adam
from rl.agents.dqn import DQNAge... | [
11748,
629,
541,
88,
13,
952,
355,
264,
952,
198,
11748,
640,
198,
11748,
28686,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
11550,
198,
198,
6738,
41927,
292,
1330,
3218,
11341,
198,
6738,
41927,
292,
13,
27530,
1330,
24604,
... | 2.472067 | 1,432 |
def headify(arg):
'''
Eliminates frustration resulting from the automatic formatting
of request header keys.
>>> headify('AUTH_TOKEN')
'Auth-Token'
# TODO::
# >>> headify({'AUTH_TOKEN': 'Unchanged_Value'})
# {'Auth-Token': 'Unchanged_Value'}
'''
func = lambda x: '-'.jo... | [
198,
4299,
1182,
1958,
7,
853,
2599,
198,
220,
220,
220,
705,
7061,
198,
220,
220,
220,
27405,
17540,
14285,
7186,
422,
262,
11353,
33313,
198,
220,
220,
220,
286,
2581,
13639,
8251,
13,
628,
220,
220,
220,
13163,
1182,
1958,
10786,
... | 2.41875 | 160 |
"""
BSD 3-Clause License
Copyright (c) 2018, Maël Kimmerlin, Aalto University, Finland
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright n... | [
37811,
198,
21800,
513,
12,
2601,
682,
13789,
198,
198,
15269,
357,
66,
8,
2864,
11,
6669,
26689,
75,
6502,
647,
2815,
11,
317,
282,
1462,
2059,
11,
17837,
198,
3237,
2489,
10395,
13,
198,
198,
7738,
396,
3890,
290,
779,
287,
2723,
... | 3.459459 | 518 |
import pigpio
import time
if __name__ == "__main__":
main()
| [
11748,
12967,
79,
952,
198,
11748,
640,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
1388,
3419,
198
] | 2.5 | 26 |
students_dict = {
"Ram": "Cricket",
"Naresh": "Football",
"Vani": "Tennis",
"Rahim": "Cricket"
}
# Write your code here
n = int(input())
for i in range(n):
key_value_pair = input().split()
key, value = key_value_pair[0], key_value_pair[1]
students_dict[key]= value
print(students_dict) ... | [
19149,
658,
62,
11600,
796,
1391,
198,
220,
220,
220,
366,
33754,
1298,
366,
34,
5557,
316,
1600,
198,
220,
220,
220,
366,
26705,
3447,
1298,
366,
37316,
1600,
198,
220,
220,
220,
366,
53,
3216,
1298,
366,
51,
10679,
1600,
198,
220,... | 2.234483 | 145 |
#!/usr/bin/env python3
"""Pentago neural net training"""
import argparse
import datasets
import equivariant as ev
import haiku as hk
import jax
import jax.numpy as jnp
import numpy as np
import numbers
import optax
import timeit
if __name__ == '__main__':
main()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
37811,
47,
298,
3839,
17019,
2010,
3047,
37811,
198,
198,
11748,
1822,
29572,
198,
11748,
40522,
198,
11748,
1602,
35460,
415,
355,
819,
198,
11748,
387,
28643,
355,
289,
74,
198,
... | 3 | 91 |
from irekua_database.models import Collection
from irekua_filters.devices import physical_devices as device_utils
from irekua_permissions.data_collections import (
devices as device_permissions)
from selia.views.utils import SeliaList
from selia.views.create_views import SeliaSelectView
| [
6738,
35918,
74,
6413,
62,
48806,
13,
27530,
1330,
12251,
198,
198,
6738,
35918,
74,
6413,
62,
10379,
1010,
13,
42034,
1330,
3518,
62,
42034,
355,
3335,
62,
26791,
198,
6738,
35918,
74,
6413,
62,
525,
8481,
13,
7890,
62,
4033,
26448,
... | 3.511905 | 84 |
from hashlib import blake2b
import logging
import pytest
from config import Config, Network
from ergo_python_appkit.appkit import ErgoAppKit, ErgoValueT
from sigmastate.lang.exceptions import InterpreterException
from org.ergoplatform.appkit import Address, CoveringBoxes, ErgoToken
import java
CFG = Config[Ne... | [
6738,
12234,
8019,
1330,
698,
539,
17,
65,
201,
198,
11748,
18931,
201,
198,
11748,
12972,
9288,
201,
198,
6738,
4566,
1330,
17056,
11,
7311,
201,
198,
6738,
1931,
2188,
62,
29412,
62,
1324,
15813,
13,
1324,
15813,
1330,
5256,
2188,
4... | 3.033898 | 118 |
import numpy as np
import schnell as snl
import matplotlib.pyplot as plt
from matplotlib import rc
rc('font', **{'family': 'sans-serif',
'sans-serif': ['Helvetica']})
rc('text', usetex=True)
freqs = np.geomspace(8., 1010., 2048)
dets = [snl.GroundDetector('Hanford', 46.4, -119.4, 171.8,
... | [
11748,
299,
32152,
355,
45941,
198,
11748,
264,
1349,
695,
355,
3013,
75,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
6738,
2603,
29487,
8019,
1330,
48321,
198,
6015,
10786,
10331,
3256,
12429,
90,
6,
17989,
10354... | 1.819383 | 1,135 |
from django.test import TestCase
import pytest
from items.models import Item_Category, Small_Item, Large_Item
# Create your tests here.
@pytest.mark.django_db
| [
6738,
42625,
14208,
13,
9288,
1330,
6208,
20448,
198,
11748,
12972,
9288,
198,
6738,
3709,
13,
27530,
1330,
9097,
62,
27313,
11,
10452,
62,
7449,
11,
13601,
62,
7449,
198,
198,
2,
13610,
534,
5254,
994,
13,
628,
198,
31,
9078,
9288,
... | 3.24 | 50 |
from minecraft.networking.packets import (
Packet, AbstractKeepAlivePacket, AbstractPluginMessagePacket, PacketBuffer
)
from minecraft.networking.types import (
Integer, FixedPointInteger, Angle, UnsignedByte, Byte, Boolean, UUID,
Short, VarInt, Double, Float, String, Enum, Difficulty, Dimension,
GameM... | [
6738,
6164,
3323,
13,
3262,
16090,
13,
8002,
1039,
1330,
357,
198,
220,
220,
220,
6400,
316,
11,
27741,
15597,
2348,
425,
47,
8317,
11,
27741,
37233,
12837,
47,
8317,
11,
6400,
316,
28632,
198,
8,
198,
198,
6738,
6164,
3323,
13,
326... | 3.105263 | 171 |
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name='fast2phy',
description="Convert aligned FASTA format to interleaved PHYLIP format",
license='MIT',
author='David M Noriega',
author_email='davidmnoriega@gmail.com',
version='1.0',
in... | [
28311,
25,
198,
220,
220,
220,
422,
900,
37623,
10141,
1330,
9058,
198,
16341,
17267,
12331,
25,
198,
220,
220,
220,
422,
1233,
26791,
13,
7295,
1330,
9058,
628,
198,
40406,
7,
198,
220,
220,
220,
1438,
11639,
7217,
17,
6883,
3256,
... | 2.563536 | 181 |
import pdb
import os
import pathlib
import sys
from termcolor import colored
from lib.style import Style
from rich import print as pprint
from rich.panel import Panel
import readline
import re
| [
11748,
279,
9945,
198,
11748,
28686,
198,
11748,
3108,
8019,
198,
11748,
25064,
198,
6738,
3381,
8043,
1330,
16396,
198,
6738,
9195,
13,
7635,
1330,
17738,
198,
6738,
5527,
1330,
3601,
355,
279,
4798,
198,
6738,
5527,
13,
35330,
1330,
1... | 3.636364 | 55 |
import os
from setuptools import setup
BASEDIR_PATH = os.path.abspath(os.path.dirname(__file__))
setup(
name="botaxon",
version=get_version(),
author="Geoffrey GUERET",
author_email="geoffrey@gueret.tech",
description="Taxonomic parser for (sub)species botanical names.",
long_description=ope... | [
11748,
28686,
198,
6738,
900,
37623,
10141,
1330,
9058,
628,
198,
33,
42827,
4663,
62,
34219,
796,
28686,
13,
6978,
13,
397,
2777,
776,
7,
418,
13,
6978,
13,
15908,
3672,
7,
834,
7753,
834,
4008,
198,
198,
40406,
7,
198,
220,
220,
... | 2.567619 | 525 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from glob import glob
import os.path as path
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
"""
analyze_player.py
This program implements functions to analyze (and assist in analyzing) player
stats.
"""
def join_years(player_dir):
"""Join th... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
15095,
1330,
15095,
198,
11748,
28686,
13,
6978,
355,
3108,
198,
11748,
19798,
292,
355,
279,
67,
198,
... | 2.612018 | 1,531 |
'''Objects and methods to support text corpus storage and manipulation'''
import numpy as np
import pandas as pd
import re
import string
from nltk.tokenize import TreebankWordTokenizer
from sklearn.feature_extraction.text import CountVectorizer
# Looks up a dict key up by its values
# Uses get_key to lookup a sequen... | [
7061,
6,
10267,
82,
290,
5050,
284,
1104,
2420,
35789,
6143,
290,
17512,
7061,
6,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
302,
198,
11748,
4731,
198,
198,
6738,
299,
2528,
74,
13,
30001,
... | 3.76259 | 139 |
# _plot_umap.py
__module_name__ = "_plot_umap.py"
__author__ = ", ".join(["Michael E. Vinyard"])
__email__ = ", ".join(["vinyard@g.harvard.edu",])
# package imports #
# --------------- #
import matplotlib.pyplot as plt
import numpy as np
import vinplots
def _setup_plot():
""""""
plot = vinplots.Plot... | [
198,
2,
4808,
29487,
62,
388,
499,
13,
9078,
198,
198,
834,
21412,
62,
3672,
834,
796,
45434,
29487,
62,
388,
499,
13,
9078,
1,
198,
834,
9800,
834,
796,
33172,
27071,
22179,
7,
14692,
13256,
412,
13,
569,
3541,
446,
8973,
8,
198,... | 2.010145 | 690 |
# Drakkar-Software ginit
# Copyright (c) Drakkar-Software, All rights reserved.
# MIT License
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without li... | [
2,
220,
12458,
74,
21070,
12,
25423,
308,
15003,
198,
2,
220,
15069,
357,
66,
8,
12458,
74,
21070,
12,
25423,
11,
1439,
2489,
10395,
13,
198,
2,
220,
17168,
13789,
198,
2,
198,
2,
220,
2448,
3411,
318,
29376,
7520,
11,
1479,
286,
... | 2.45036 | 695 |
from datetime import datetime
from app.models.game import Game
| [
6738,
4818,
8079,
1330,
4818,
8079,
198,
198,
6738,
598,
13,
27530,
13,
6057,
1330,
3776,
628
] | 3.823529 | 17 |
# -*- coding: utf-8 -*-
cmColorForegroundChanged = 71
cmColorBackgroundChanged = 72
cmColorSet = 73
cmNewColorItem = 74
cmNewColorIndex = 75
cmSaveColorIndex = 76
cmSetColorIndex = 77
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11215,
10258,
16351,
2833,
31813,
796,
9166,
198,
11215,
10258,
21756,
31813,
796,
7724,
198,
11215,
10258,
7248,
796,
8854,
198,
11215,
3791,
10258,
7449,
796,
8915,
198,
... | 2.920635 | 63 |
from jose.jwa import keys
from enum import Enum
__all__ = ['SigEnum', 'SigDict', ]
SigDict = dict((i.name, i.name) for i in SigEnum)
| [
6738,
474,
577,
13,
73,
10247,
1330,
8251,
198,
6738,
33829,
1330,
2039,
388,
198,
198,
834,
439,
834,
796,
37250,
50,
328,
4834,
388,
3256,
705,
50,
328,
35,
713,
3256,
2361,
628,
198,
50,
328,
35,
713,
796,
8633,
19510,
72,
13,
... | 2.344828 | 58 |
# ==============================================================================
# Copyright 2018 Intel 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.apa... | [
2,
38093,
25609,
28,
198,
2,
220,
15069,
2864,
8180,
10501,
198,
2,
198,
2,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
220,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
35... | 2.419616 | 2,345 |
import sys
from collections import deque
import numpy as np
if __name__ == '__main__':
main()
| [
11748,
25064,
201,
198,
6738,
17268,
1330,
390,
4188,
201,
198,
201,
198,
11748,
299,
32152,
355,
45941,
201,
198,
201,
198,
201,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
201,
198,
220,
220,
220,
1388,
3419,
198
... | 2.571429 | 42 |
from pytest import approx
from enforce_typing import enforce_types
from agents.PoolAgent import PoolAgent
from util import globaltokens
from util.base18 import fromBase18
from .. import KPIs
@enforce_types
@enforce_types
@enforce_types
@enforce_types
@enforce_types
| [
6738,
12972,
9288,
1330,
5561,
198,
198,
6738,
4605,
62,
774,
13886,
1330,
4605,
62,
19199,
198,
198,
6738,
6554,
13,
27201,
36772,
1330,
19850,
36772,
198,
6738,
7736,
1330,
15095,
2501,
482,
641,
198,
6738,
7736,
13,
8692,
1507,
1330,... | 3.232558 | 86 |
from hyde.errors import BaseError
| [
6738,
2537,
2934,
13,
48277,
1330,
7308,
12331,
628,
198
] | 3.6 | 10 |
import math
from django.http import HttpResponse
from django.template import Context, loader
from django.shortcuts import render, get_object_or_404
from info.models import Brother, Officer, BrotherEntity
from info import utility
from marketing.models import Picture as MarketingPic
from articles.models import Article
... | [
11748,
10688,
198,
198,
6738,
42625,
14208,
13,
4023,
1330,
367,
29281,
31077,
198,
6738,
42625,
14208,
13,
28243,
1330,
30532,
11,
40213,
198,
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
11,
651,
62,
15252,
62,
273,
62,
26429,
19... | 2.687602 | 1,847 |
from django.conf.urls import url
from django.contrib import admin
from wawhfd.views import (
IndexView,
DatesListView,
DatesEditView,
DatesDeleteView,
RecipesListView,
RecipesAddView,
RecipesEditView,
RecipesDeleteView,
)
urlpatterns = [
url(r'^$', IndexView.as_view()),
url(r... | [
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
19016,
198,
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
198,
6738,
266,
707,
71,
16344,
13,
33571,
1330,
357,
198,
220,
220,
220,
12901,
7680,
11,
198,
220,
220,
220,
44712,
... | 2.198492 | 398 |
#!/usr/bin/env python
# Copyright (C) 2019-2020 Emetophobe (snapnaw@gmail.com)
# https://github.com/Emetophobe/steamutils/
import os
import re
import glob
import argparse
def list_games(steamdir):
""" Get the list of installed Steam games. """
# Make sure the directory is valid
steam_apps = os.path.jo... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
15069,
357,
34,
8,
13130,
12,
42334,
220,
220,
2295,
316,
2522,
5910,
357,
45380,
77,
707,
31,
14816,
13,
785,
8,
198,
2,
3740,
1378,
12567,
13,
785,
14,
36,
4164,
2522,
5910,
... | 2.326606 | 1,090 |
#!/usr/bin/env python3
import sys
from collections import OrderedDict
import json
if __name__ == '__main__':
main()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
11748,
25064,
198,
6738,
17268,
1330,
14230,
1068,
35,
713,
198,
198,
11748,
33918,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
138... | 2.818182 | 44 |
# ===========
# Libraries
# ===========
from ..size import Size
from ..filenames import FilenamesHandler
from ..args import args
# ===================
# Class Declaration
# ===================
| [
2,
796,
2559,
855,
198,
2,
220,
46267,
198,
2,
796,
2559,
855,
198,
6738,
11485,
7857,
1330,
12849,
198,
6738,
11485,
10379,
268,
1047,
1330,
7066,
268,
1047,
25060,
198,
6738,
11485,
22046,
1330,
26498,
628,
198,
2,
36658,
855,
198,
... | 3.862745 | 51 |
# encoding: utf-8
"""
Temporary stand-in for main oxml module that came across with the
PackageReader transplant. Probably much will get replaced with objects from
the pptx.oxml.core and then this module will either get deleted or only hold
the package related custom element classes.
"""
from __future__ import absolu... | [
2,
21004,
25,
3384,
69,
12,
23,
198,
198,
37811,
198,
12966,
5551,
1302,
12,
259,
329,
1388,
12018,
4029,
8265,
326,
1625,
1973,
351,
262,
198,
27813,
33634,
23319,
13,
18578,
881,
481,
651,
6928,
351,
5563,
422,
198,
1169,
279,
457... | 2.676331 | 1,690 |
# Import packages for plotting and system
import getopt
import random
import sys
from collections import deque
# make sure the root path is in system path
from pathlib import Path
base_dir = Path(__file__).resolve().parent.parent
sys.path.append(str(base_dir))
from importlib_resources import path
import matplotlib.p... | [
2,
17267,
10392,
329,
29353,
290,
1080,
198,
11748,
651,
8738,
198,
11748,
4738,
198,
11748,
25064,
198,
6738,
17268,
1330,
390,
4188,
198,
198,
2,
787,
1654,
262,
6808,
3108,
318,
287,
1080,
3108,
198,
6738,
3108,
8019,
1330,
10644,
... | 3.193772 | 289 |
# -*- coding: utf-8 -*-
"""
Created on Thu Nov 18 10:38:40 2021
PORTFOLIO MODEL - WHY GLOBAL SENSITIVITY?
@author: PMR
"""
# %% Import libraries
import chaospy as cp
import numpy as np
import matplotlib.pyplot as plt
# %% Portfolio model
# %% Setup problem
Q1_mean = 0
Q1_std = 1
Q2_mean = ... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
37811,
201,
198,
41972,
319,
26223,
5267,
1248,
838,
25,
2548,
25,
1821,
33448,
201,
198,
15490,
37,
3535,
9399,
19164,
3698,
532,
44463,
10188,
9864,
1847,
311,
16... | 1.872852 | 582 |
from . import common as cm
# def mutate(self, client_customer_id=None, sync=None):
# if client_customer_id:
# self.client.SetClientCustomerId(client_customer_id)
# result = self.service.mutate(self.helper.operations)
# for item in result.value:
# item['returnType'] ... | [
6738,
764,
1330,
2219,
355,
12067,
628,
198,
220,
220,
220,
1303,
825,
4517,
378,
7,
944,
11,
5456,
62,
23144,
263,
62,
312,
28,
14202,
11,
17510,
28,
14202,
2599,
198,
220,
220,
220,
1303,
220,
220,
220,
220,
611,
5456,
62,
23144... | 2.356688 | 157 |
import json
| [
11748,
33918,
628
] | 4.333333 | 3 |
import numpy as np
def qubo_to_ising(mat: np.ndarray):
"""inplace-convert numpy matrix from qubo to ising.
Args:
mat (np.ndarray): numpy matrix
"""
mat /= 4
for i in range(mat.shape[0]):
mat[i, i] += np.sum(mat[i, :])
def chimera_to_ind(r: int, c: int, z: int, L: int):
"... | [
11748,
299,
32152,
355,
45941,
198,
198,
4299,
627,
2127,
62,
1462,
62,
1710,
7,
6759,
25,
45941,
13,
358,
18747,
2599,
198,
220,
220,
220,
37227,
259,
5372,
12,
1102,
1851,
299,
32152,
17593,
422,
627,
2127,
284,
318,
278,
13,
628,... | 2.116279 | 430 |
algorithm = "fourier"
potential = "morse"
D = 3
a = 0.3
T = 10
dt = 0.005
eps = 0.2
f = 4.0
ngn = 4096
basis_size = 4
leading_component = 0
P = 1.0j
Q = 1
S = 0.0
p = 0.0
q = 1.5
parameters = [ (P, Q, S, p, q) ]
coefficients = [[(0, 1.0)]]
write_nth = 20
| [
282,
42289,
796,
366,
69,
280,
5277,
1,
198,
198,
13059,
1843,
796,
366,
4491,
325,
1,
198,
35,
796,
513,
198,
64,
796,
657,
13,
18,
198,
198,
51,
796,
838,
198,
28664,
796,
657,
13,
22544,
198,
198,
25386,
796,
657,
13,
17,
1... | 1.865248 | 141 |
#!/usr/bin/env python
#
# Copyright 2011 Google 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 require... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
198,
2,
15069,
2813,
3012,
3457,
13,
1439,
6923,
33876,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743... | 2.867569 | 2,809 |
# -*- coding: utf-8 -*-
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
628
] | 1.785714 | 14 |
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
Tencent is pleased to support the open source community by making Metis available.
Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the BSD 3-Clause License (the "License"); you may not use this file except in compliance with th... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
41002,
12,
23,
532,
9,
12,
198,
37811,
198,
24893,
1087,
318,
10607,
284,
1104,
262,
1280,
2723,
2055,
416,
1642,
3395,
271,
1695,
13,
198,
15269,
357,
34... | 3.58806 | 335 |
# Generated by Django 3.2.2 on 2021-05-10 09:17
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
17,
13,
17,
319,
33448,
12,
2713,
12,
940,
7769,
25,
1558,
201,
198,
201,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
201,
198,
201,
198
] | 2.567568 | 37 |
from . import GlobalConstants as GC
from . import configuration as cf
from . import Utility, Image_Modification, Engine, GenericMapSprite
| [
6738,
764,
1330,
8060,
34184,
1187,
355,
20145,
198,
6738,
764,
1330,
8398,
355,
30218,
198,
6738,
764,
1330,
34030,
11,
7412,
62,
5841,
2649,
11,
7117,
11,
42044,
13912,
38454,
578,
198
] | 4.181818 | 33 |
if '__file__' in globals():
import os
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
import numpy as np
from dezero import Variable, Model, as_variable
from dezero import setup_variable
from dezero.utils import plot_dot_graph
import dezero.functions as F
fr... | [
361,
705,
834,
7753,
834,
6,
287,
15095,
874,
33529,
198,
220,
220,
220,
1330,
28686,
198,
220,
220,
220,
1330,
25064,
198,
220,
220,
220,
25064,
13,
6978,
13,
33295,
7,
418,
13,
6978,
13,
22179,
7,
418,
13,
6978,
13,
15908,
3672,... | 2.201183 | 338 |
#!/usr/bin/env python3
from llvmlite import ir
i1 = ir.IntType(1)
i8 = ir.IntType(8)
i16 = ir.IntType(16)
i32 = ir.IntType(32)
i64 = ir.IntType(64)
void = ir.VoidType()
m = ir.Module()
fty = ir.FunctionType(void, [i32, i32, i32])
f = ir.Function(m, fty, "cmov_test")
entry = f.append_basic_block("entry")
bld = ir.IR... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
6738,
32660,
85,
4029,
578,
1330,
4173,
198,
198,
72,
16,
796,
4173,
13,
5317,
6030,
7,
16,
8,
198,
72,
23,
796,
4173,
13,
5317,
6030,
7,
23,
8,
198,
72,
1433,
796,
41... | 2.094987 | 379 |
from .exporters import export_html, export_pdf # noqa: F401
| [
6738,
764,
1069,
1819,
1010,
1330,
10784,
62,
6494,
11,
10784,
62,
12315,
220,
1303,
645,
20402,
25,
376,
21844,
198
] | 2.904762 | 21 |
import pytest
from sovtokenfees.test.constants import NYM_FEES_ALIAS
from sovtokenfees.test.helper import add_fees_request_with_address
from indy_common.constants import NYM
from plenum.common.exceptions import RequestRejectedException
| [
11748,
12972,
9288,
198,
6738,
523,
85,
30001,
69,
2841,
13,
9288,
13,
9979,
1187,
1330,
6645,
44,
62,
15112,
1546,
62,
1847,
43429,
198,
6738,
523,
85,
30001,
69,
2841,
13,
9288,
13,
2978,
525,
1330,
751,
62,
69,
2841,
62,
25927,
... | 3.12987 | 77 |
from quart import current_app, request, redirect, jsonify
from urllib.parse import quote_plus, parse_qs, urlparse
from quart.exceptions import MethodNotAllowed
from datetime import datetime, timedelta
from typing import List, Tuple
import jwt
import os
from api.models import Token, User
from api.app import API
from ..... | [
6738,
28176,
1330,
1459,
62,
1324,
11,
2581,
11,
18941,
11,
33918,
1958,
198,
6738,
2956,
297,
571,
13,
29572,
1330,
9577,
62,
9541,
11,
21136,
62,
48382,
11,
19016,
29572,
198,
6738,
28176,
13,
1069,
11755,
1330,
11789,
3673,
3237,
6... | 2.240955 | 2,681 |
import numpy as np
import matplotlib.pyplot as plt
# Soluciones a los ejercicios de la seccion 6.2.5
# del libro A Survey of Computational Physics Introductory Computational Science
# de Landau, Paez, Bordeianu (Python Multimodal eTextBook Beta4.0)
#1. Write a double-precision program to integrate an arbitrary func... | [
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
628,
198,
2,
4294,
1229,
295,
274,
257,
22346,
304,
73,
2798,
291,
4267,
390,
8591,
384,
535,
295,
718,
13,
17,
13,
20,
220,
198,
2,
1619... | 3.094972 | 179 |
import random, math, numpy as np
import networkx
import networkx.utils
#from networkx.generators.classic import empty_graph
def random_stub_triangle_graph(s, t, seed=None):
"""Return a random graph G(s,t) with expected degrees given by s+2*t.
:Parameters:
- `s`: list - count of stubs emanating from... | [
11748,
4738,
11,
10688,
11,
299,
32152,
355,
45941,
198,
11748,
3127,
87,
198,
11748,
3127,
87,
13,
26791,
198,
2,
6738,
3127,
87,
13,
8612,
2024,
13,
49421,
1330,
6565,
62,
34960,
198,
198,
4299,
4738,
62,
301,
549,
62,
28461,
9248... | 2.036137 | 1,688 |
# Created by giuseppe
# Date: 22/11/19
from gym.envs.registration import register
register(
id='KukaPush-v0',
entry_point='gym_kuka.envs:KukaPush',
) | [
2,
15622,
416,
308,
72,
1904,
27768,
198,
2,
7536,
25,
2534,
14,
1157,
14,
1129,
198,
198,
6738,
11550,
13,
268,
14259,
13,
2301,
33397,
1330,
7881,
198,
198,
30238,
7,
198,
220,
220,
220,
4686,
11639,
42,
14852,
49222,
12,
85,
15... | 2.338235 | 68 |
import enum
import typing
from ._types import StrOrBytes
from .exceptions import ProtocolError, SOCKSError
from .utils import (
AddressType,
decode_address,
encode_address,
get_address_port_tuple_from_address,
)
class SOCKS4ReplyCode(bytes, enum.Enum):
"""Enumeration of SOCKS4 reply codes."""
... | [
11748,
33829,
198,
11748,
19720,
198,
198,
6738,
47540,
19199,
1330,
4285,
5574,
45992,
198,
6738,
764,
1069,
11755,
1330,
20497,
12331,
11,
311,
11290,
5188,
81,
1472,
198,
6738,
764,
26791,
1330,
357,
198,
220,
220,
220,
17917,
6030,
... | 2.252125 | 3,411 |
f = open('Conventions.txt','r')
message = f.read()
print(message)
f.close()
print (message.splitlines())
| [
69,
796,
1280,
10786,
3103,
16593,
13,
14116,
41707,
81,
11537,
198,
20500,
796,
277,
13,
961,
3419,
198,
4798,
7,
20500,
8,
198,
69,
13,
19836,
3419,
198,
198,
4798,
357,
20500,
13,
35312,
6615,
28955,
198,
220,
198
] | 2.7 | 40 |
"""This module implements the security group helper module for AWSHeet that is aimed at providing idempotent AWS EC2 security groups.
Currently, it only supports Security Groups that are in a VPC.
Rules are created using the SecurityGroupRule type and then they are collected together inside an iterable (usually a set ... | [
37811,
1212,
8265,
23986,
262,
2324,
1448,
31904,
8265,
329,
30865,
1544,
316,
326,
318,
8998,
379,
4955,
4686,
368,
13059,
298,
30865,
13182,
17,
2324,
2628,
13,
198,
21327,
11,
340,
691,
6971,
4765,
27441,
326,
389,
287,
257,
569,
5... | 2.28089 | 16,138 |
from urllib.request import urlopen
if __name__ == '__main__':
output_list = read('output')
for index,n in enumerate(read('input')):
special_number = solve(int(n))
if output_list[index] != special_number:
print('Failed for value n = {}'.format(n) )
| [
6738,
2956,
297,
571,
13,
25927,
1330,
19016,
9654,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
5072,
62,
4868,
796,
1100,
10786,
22915,
11537,
198,
220,
220,
220,
329,
6376,
11,
77,
... | 2.436975 | 119 |
# coding: utf-8
from __future__ import division
import unicodedata, math, re, sys, string, os, ntpath, numpy as np
from time import gmtime, strftime
from io import open, StringIO
from imp import reload
from difflib import SequenceMatcher
try:
from itertools import izip
except ImportError:
izip = zip
WORD = re.... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
6738,
11593,
37443,
834,
1330,
7297,
198,
11748,
28000,
9043,
1045,
11,
10688,
11,
302,
11,
25064,
11,
4731,
11,
28686,
11,
299,
83,
6978,
11,
299,
32152,
355,
45941,
198,
6738,
640,
1330,
308,
... | 2.938596 | 114 |
# Copyright (C) 2019 Simon Biggs
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version (the "AGPL-3.0+").
# This progr... | [
2,
15069,
357,
34,
8,
13130,
11288,
4403,
14542,
198,
198,
2,
770,
1430,
318,
1479,
3788,
25,
345,
460,
17678,
4163,
340,
290,
14,
273,
13096,
198,
2,
340,
739,
262,
2846,
286,
262,
22961,
6708,
3529,
3611,
5094,
13789,
355,
3199,
... | 3.656425 | 358 |
from datetime import datetime
from yaml import Dumper, dump
from webbrowser import open_new_tab
from pathlib import Path
from yattag import Doc, indent
from ingest_validation_tools.message_munger import munge
# Force dump not to use alias syntax.
# https://stackoverflow.com/questions/13518819/avoid-references-in-pyy... | [
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
331,
43695,
1330,
360,
15829,
11,
10285,
198,
6738,
3992,
40259,
1330,
1280,
62,
3605,
62,
8658,
198,
6738,
3108,
8019,
1330,
10644,
198,
6738,
331,
1078,
363,
1330,
14432,
11,
33793,
198,
... | 2.004723 | 1,482 |
import argparse
import os
from multiprocessing import Pool
import logging
import random
import copy
import tensorflow as tf
from generic.data_provider.iterator import BasicIterator
from generic.tf_utils.evaluator import Evaluator
from generic.data_provider.image_loader import get_img_builder
from guesswhat.models.or... | [
198,
11748,
1822,
29572,
198,
11748,
28686,
198,
6738,
18540,
305,
919,
278,
1330,
19850,
198,
11748,
18931,
198,
11748,
4738,
198,
11748,
4866,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
198,
6738,
14276,
13,
7890,
62,
15234,
1304,
... | 2.307418 | 4,206 |
import setuptools
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
test_deps = [
'pytest',
'flake8',
'pylint',
'mypy',
]
extras = {
'test': test_deps
}
setuptools.setup(
name="osm_rasterize",
version="0.0.0",
author="Ruben Lipperts",
author_ema... | [
11748,
900,
37623,
10141,
198,
198,
4480,
1280,
7203,
15675,
11682,
13,
9132,
1600,
366,
81,
1600,
21004,
2625,
40477,
12,
23,
4943,
355,
277,
71,
25,
198,
220,
220,
220,
890,
62,
11213,
796,
277,
71,
13,
961,
3419,
198,
198,
9288,
... | 2.318735 | 411 |
import six
import time
import logging
from elasticsearch.helpers import BulkIndexError
from aleph.core import es_index, db
from aleph.index.mapping import TYPE_RECORD
from aleph.model import DocumentRecord
from aleph.index.util import bulk_op, query_delete
from aleph.text import index_form
log = logging.getLogger(__n... | [
11748,
2237,
198,
11748,
640,
198,
11748,
18931,
198,
6738,
27468,
12947,
13,
16794,
364,
1330,
47900,
15732,
12331,
198,
198,
6738,
31341,
746,
13,
7295,
1330,
1658,
62,
9630,
11,
20613,
198,
6738,
31341,
746,
13,
9630,
13,
76,
5912,
... | 2.36194 | 536 |
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import unittest
import telemetry.timeline.event as timeline_event
from telemetry.testing import test_page_test_results
from telemetry.web_perf.metrics impor... | [
2,
15069,
1853,
383,
18255,
1505,
46665,
13,
1439,
2489,
10395,
13,
198,
2,
5765,
286,
428,
2723,
2438,
318,
21825,
416,
257,
347,
10305,
12,
7635,
5964,
326,
460,
307,
198,
2,
1043,
287,
262,
38559,
24290,
2393,
13,
198,
198,
11748... | 3.678261 | 115 |
from gevent.pywsgi import WSGIServer
import app
app_instance = app.create_app()
http_server = WSGIServer(('127.0.0.1', 8080), app_instance)
http_server.serve_forever() | [
6738,
4903,
1151,
13,
9078,
18504,
12397,
1330,
25290,
38,
1797,
18497,
198,
11748,
598,
198,
198,
1324,
62,
39098,
796,
598,
13,
17953,
62,
1324,
3419,
198,
198,
4023,
62,
15388,
796,
25290,
38,
1797,
18497,
7,
10786,
16799,
13,
15,
... | 2.6 | 65 |
from func import *
from move import *
| [
198,
6738,
25439,
1330,
1635,
198,
6738,
1445,
1330,
1635,
198
] | 3.545455 | 11 |
from RPC import *
from Slack_Connection import *
from flask import Flask, request, Response
from decimal import *
from fractions import *
from Python_Hash import *
import os
import time
app = Flask(__name__)
@app.route("/" ,methods=["POST"])
@app.route("/Button_Pressed",methods=["POST"])
@app.route("/"... | [
6738,
39400,
1330,
1635,
201,
198,
6738,
36256,
62,
32048,
1330,
1635,
201,
198,
6738,
42903,
1330,
46947,
11,
2581,
11,
18261,
201,
198,
6738,
32465,
1330,
1635,
201,
198,
6738,
49876,
1330,
1635,
201,
198,
6738,
11361,
62,
26257,
1330... | 2.689266 | 177 |