content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
import array
import torch
from torch import Tensor
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
import os
from scipy.io import loadmat, savemat
from typing import Type, Any, Callable, Union, List, Optional
from lib.utils import conv3x3, conv1x1
import os.path as osp
def conv3x3(in_planes,... | [
11748,
7177,
198,
11748,
28034,
198,
6738,
28034,
1330,
309,
22854,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28686,
198,
6738,
629,
54... | 2.725753 | 299 |
"""
Class for table approves_room_request
"""
from datetime import datetime
from . import db
class ApprovesRoomRequest(db.Model):
"""This class connects which approver is currently responsible for which room request."""
room_request_id = db.Column(db.Integer, db.ForeignKey('room_request.id'), primary_key=True)
ap... | [
37811,
198,
9487,
329,
3084,
43770,
62,
3823,
62,
25927,
198,
37811,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
764,
1330,
20613,
628,
198,
4871,
20010,
1158,
41178,
18453,
7,
9945,
13,
17633,
2599,
198,
197,
37811,
1212,
1398,... | 3.293413 | 167 |
"""
ESS Quantile Plot
=================
_thumb: .4, .5
"""
import matplotlib.pyplot as plt
import arviz as az
az.style.use("arviz-darkgrid")
idata = az.load_arviz_data("radon")
az.plot_ess(idata, var_names=["sigma"], kind="quantile", color="C4")
plt.show()
| [
37811,
198,
7597,
16972,
576,
28114,
198,
4770,
28,
198,
198,
62,
400,
2178,
25,
764,
19,
11,
764,
20,
198,
37811,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
198,
11748,
610,
85,
528,
355,
35560,
198,
198,
... | 2.369369 | 111 |
# -*- coding: utf-8 -*-
"""
Created on Sat May 6 16:03:00 2017
@author: thy1995
"""
import pandas as pd
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
37811,
201,
198,
41972,
319,
7031,
1737,
220,
718,
1467,
25,
3070,
25,
405,
2177,
201,
198,
201,
198,
31,
9800,
25,
11906,
21908,
201,
198,
37811,
201,
198,
201,
... | 2.089286 | 56 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
33918,
198,
198,
6738,
435,
541,
323,
13,
64,
404,
13,
15042,
13,
26209,
13,
2348,
541,
323,
31077,
1330,
978,... | 2.571429 | 49 |
# -*- coding:utf-8 -*-
import unittest
import mock
from django.core.urlresolvers import reverse
from django import forms
from ..views import EditEmployeeQuestionnaireFromProfileFormView
from ..models import EmployeeQuestionnaire
from .. import constants
| [
2,
532,
9,
12,
19617,
25,
40477,
12,
23,
532,
9,
12,
198,
11748,
555,
715,
395,
198,
11748,
15290,
198,
198,
6738,
42625,
14208,
13,
7295,
13,
6371,
411,
349,
690,
1330,
9575,
198,
6738,
42625,
14208,
1330,
5107,
198,
198,
6738,
1... | 3.724638 | 69 |
from django.conf import settings
from django.db import models
| [
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
42625,
14208,
13,
9945,
1330,
4981,
628,
198
] | 3.764706 | 17 |
import pytest
import time as ttime
import json
import multiprocessing
import threading
import asyncio
from bluesky_queueserver.manager.comms import (
PipeJsonRpcReceive, PipeJsonRpcSendAsync, CommTimeoutError, CommJsonRpcError)
from bluesky_queueserver.tests.common import format_jsonrpc_msg
def count_threads_with... | [
11748,
12972,
9288,
198,
11748,
640,
355,
256,
2435,
198,
11748,
33918,
198,
11748,
18540,
305,
919,
278,
198,
11748,
4704,
278,
198,
11748,
30351,
952,
198,
6738,
25570,
2584,
62,
4188,
947,
18497,
13,
37153,
13,
785,
907,
1330,
357,
... | 2.643155 | 5,515 |
#################################################################################
# Copyright 2020 Ricardo F Tafas Jr
# 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.ap... | [
29113,
29113,
14468,
2,
201,
198,
2,
15069,
12131,
38847,
376,
309,
1878,
292,
7504,
201,
198,
201,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
345,
743,
407,
201,
198,
2,
779,
428,
... | 3.763485 | 241 |
import random
import re
from abc import abstractmethod
from collections import defaultdict, Counter
from typing import Dict, Any, Set, Optional, List
import numpy as np
import tensorflow as tf
from dpu_utils.codeutils.identifiersplitting import split_identifier_into_parts
from dpu_utils.mlutils.vocabulary import Vocab... | [
11748,
4738,
198,
11748,
302,
198,
6738,
450,
66,
1330,
12531,
24396,
198,
6738,
17268,
1330,
4277,
11600,
11,
15034,
198,
6738,
19720,
1330,
360,
713,
11,
4377,
11,
5345,
11,
32233,
11,
7343,
198,
198,
11748,
299,
32152,
355,
45941,
... | 2.535826 | 321 |
# Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved.
#
# This software is licensed under the Apache License, Version 2.0 (the
# "License") as published by the Apache Software Foundation.
#
# You may not use this file except in compliance with the License. You may
# obtain a copy of the License at... | [
2,
15069,
357,
66,
8,
33448,
11,
569,
3861,
40,
23500,
290,
14,
273,
663,
29116,
13,
1439,
2489,
10395,
13,
198,
2,
198,
2,
770,
3788,
318,
11971,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
198,
2,
366,
34156,
49... | 3.806569 | 274 |
import sys
if sys.version_info[:2] < (2, 7):
import unittest2 as unittest # NOQA
else:
import unittest # NOQA
if sys.version_info < (3,):
from mock import call, Mock, patch, ANY # NOQA
else:
from unittest.mock import call, Mock, patch, ANY # NOQA
| [
11748,
25064,
198,
198,
361,
25064,
13,
9641,
62,
10951,
58,
25,
17,
60,
1279,
357,
17,
11,
767,
2599,
198,
220,
220,
220,
1330,
555,
715,
395,
17,
355,
555,
715,
395,
220,
1303,
8005,
48,
32,
198,
17772,
25,
198,
220,
220,
220,... | 2.359649 | 114 |
import math
from functools import lru_cache
from typing import Dict, Optional, Tuple
from gql import Client, gql
from rich.console import Console
from web3 import Web3
from helpers.constants import DECIMAL_MAPPING
from helpers.digg_utils import digg_utils
from helpers.discord import (
get_discord_url,
send_er... | [
11748,
10688,
198,
6738,
1257,
310,
10141,
1330,
300,
622,
62,
23870,
198,
6738,
19720,
1330,
360,
713,
11,
32233,
11,
309,
29291,
198,
198,
6738,
308,
13976,
1330,
20985,
11,
308,
13976,
198,
6738,
5527,
13,
41947,
1330,
24371,
198,
... | 3.029762 | 168 |
import multiprocessing.pool
import os
import fastobo
from ..logic.lineage import Lineage
from ..utils.meta import typechecked
from ._fastobo import FastoboParser
from .base import BaseParser
| [
11748,
18540,
305,
919,
278,
13,
7742,
198,
11748,
28686,
198,
198,
11748,
3049,
20391,
198,
198,
6738,
11485,
6404,
291,
13,
1370,
496,
1330,
6910,
496,
198,
6738,
11485,
26791,
13,
28961,
1330,
2099,
26752,
198,
6738,
47540,
7217,
203... | 3.660377 | 53 |
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
from __future__ import division
from pyecs import *
from pycompupipe.components import Process, ProcessConnection
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
17,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
11593,
37443,
834,
1330,
7297,
198,
198,
6738,
12972,
721,
82,
1330,
1635,
198,
6738,
12972,
5589,
929,
3757,... | 3.075472 | 53 |
"""Runway variables."""
from __future__ import annotations
import logging
import re
from typing import (
TYPE_CHECKING,
Any,
Dict,
Generic,
Iterable,
Iterator,
List,
MutableMapping,
MutableSequence,
Optional,
Set,
Type,
TypeVar,
Union,
cast,
overload,
)
... | [
37811,
10987,
1014,
9633,
526,
15931,
198,
6738,
11593,
37443,
834,
1330,
37647,
198,
198,
11748,
18931,
198,
11748,
302,
198,
6738,
19720,
1330,
357,
198,
220,
220,
220,
41876,
62,
50084,
2751,
11,
198,
220,
220,
220,
4377,
11,
198,
... | 2.34165 | 12,264 |
# coding=utf-8
from __future__ import unicode_literals
from celery import Task
| [
2,
19617,
28,
40477,
12,
23,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
6738,
18725,
1924,
1330,
15941,
628
] | 3.333333 | 24 |
import os.path
import glob
from .listdataset import ListDataset
from .util import split2list
def make_dataset(dir, split=None):
"""
Will search for triplets that go by the pattern '[name]_img1.ppm [name]_img2.ppm [name]_flow.flo
"""
images = []
for flow_map in sorted(glob.glob(os.path.join(dir... | [
11748,
28686,
13,
6978,
198,
11748,
15095,
198,
6738,
764,
4868,
19608,
292,
316,
1330,
7343,
27354,
292,
316,
198,
6738,
764,
22602,
1330,
6626,
17,
4868,
628,
198,
4299,
787,
62,
19608,
292,
316,
7,
15908,
11,
6626,
28,
14202,
2599,... | 2.23565 | 331 |
from setuptools import setup
setup(
name = 'redis_luamodules',
py_modules = ['redis_luamodules'],
version = '0.0.1',
description = 'Higher-level Redis Lua scripting',
author = 'Leif K-Brooks',
author_email = 'eurleif@gmail.com',
url = 'https://github.com/leifkb/redis_scripts',
keywords = ['re... | [
6738,
900,
37623,
10141,
1330,
9058,
201,
198,
201,
198,
40406,
7,
201,
198,
220,
1438,
796,
705,
445,
271,
62,
2290,
321,
375,
5028,
3256,
201,
198,
220,
12972,
62,
18170,
796,
37250,
445,
271,
62,
2290,
321,
375,
5028,
6,
4357,
... | 2.558036 | 224 |
from app import db
from datetime import datetime
from werkzeug.security import generate_password_hash, check_password_hash
from flask_login import UserMixin
from app import login
@login.user_loader
User.__repr__
Listing.__repr__
| [
6738,
598,
1330,
20613,
198,
6738,
4818,
8079,
1330,
220,
4818,
8079,
198,
6738,
266,
9587,
2736,
1018,
13,
12961,
1330,
7716,
62,
28712,
62,
17831,
11,
2198,
62,
28712,
62,
17831,
198,
6738,
42903,
62,
38235,
1330,
11787,
35608,
259,
... | 3.171053 | 76 |
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
"""
File name: ImageCanvasExtendedFunc.py
Author: Fredrik Forsberg
Date created: 2020-11-11
Date last modified: 2020-11-11
Python Version: 3.8
"""
import os
import sys
import numpy as np
import cv2
import tkinter as tk
from tkinter.filedialog import ... | [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
198,
220,
220,
220,
9220,
1438,
25,
7412,
6090,
11017,
11627,
1631,
37,
19524,
13,
9078,
198,
220,
... | 2.867188 | 256 |
from django.conf import settings
from evennia.utils.utils import class_from_module
from athanor.gamedb.objects import AthanorObject
from athanor_entity.entities.base import BaseGameEntity
MIXINS = [class_from_module(mixin) for mixin in settings.MIXINS["ENTITY_STRUCTURE"]]
MIXINS.sort(key=lambda x: getattr(x, "mixin_p... | [
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
198,
6738,
772,
18142,
13,
26791,
13,
26791,
1330,
1398,
62,
6738,
62,
21412,
198,
6738,
5782,
272,
273,
13,
70,
2434,
65,
13,
48205,
1330,
13548,
272,
273,
10267,
198,
6738,
5782,
272,
... | 2.964602 | 113 |
from tkinter import ttk
import tkinter as tk
from views.View import View
"""
View responsible for showing registered customers.
"""
| [
6738,
256,
74,
3849,
1330,
256,
30488,
198,
11748,
256,
74,
3849,
355,
256,
74,
198,
6738,
5009,
13,
7680,
1330,
3582,
628,
198,
37811,
198,
220,
220,
220,
3582,
4497,
329,
4478,
6823,
4297,
13,
198,
37811,
198
] | 3.538462 | 39 |
#!/usr/bin/env python3
import argparse
import sys
if __name__ == '__main__':
parser = argparse.ArgumentParser( 'Script to add meta data columns to promoter matrix rows file.' )
parser.add_argument('--in_promoter_matrix_row_name_file', required=True, help='Input file with promoter matrix official gene name... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
11748,
1822,
29572,
198,
11748,
25064,
628,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
30751,
796,
1822,
29572,
13,
28100,
17... | 2.714004 | 507 |
import kociemba
import pycuber
| [
11748,
479,
1733,
368,
7012,
198,
11748,
12972,
66,
18478,
628
] | 2.909091 | 11 |
# 1. Scrape, using BeautifulSoup, the local html page: Presidents.html.
# Scrape the term number and President name into a dictionary.
from bs4 import BeautifulSoup
import json
PAGE="Presidents.html"
presidents_dict = {}
with open(PAGE, "r") as f:
contents = f.read()
soup = BeautifulSoup(contents, 'lxml')
... | [
2,
352,
13,
1446,
13484,
11,
1262,
23762,
50,
10486,
11,
262,
1957,
27711,
2443,
25,
35506,
13,
6494,
13,
198,
2,
1446,
13484,
262,
3381,
1271,
290,
1992,
1438,
656,
257,
22155,
13,
198,
6738,
275,
82,
19,
1330,
23762,
50,
10486,
... | 2.936782 | 522 |
import os
# Automatically set the __all__ variable with all
# the available plugins.
plugin_dir = "kahuna/plugins"
__all__ = []
for filename in os.listdir(plugin_dir):
filename = plugin_dir + "/" + filename
if os.path.isfile(filename):
basename = os.path.basename(filename)
base, extension = o... | [
11748,
28686,
198,
198,
2,
17406,
4142,
900,
262,
11593,
439,
834,
7885,
351,
477,
198,
2,
262,
1695,
20652,
13,
198,
198,
33803,
62,
15908,
796,
366,
74,
993,
9613,
14,
37390,
1,
198,
198,
834,
439,
834,
796,
17635,
198,
1640,
29... | 2.575581 | 172 |
# Copyright 2013, Rackspace US, 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 writi... | [
2,
15069,
2211,
11,
37927,
13200,
1294,
11,
3457,
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,
351,
262,
13789,
1... | 3.802395 | 167 |
# Generated by Django 3.1.13 on 2021-11-21 17:40
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import model_utils.fields
import uuid
| [
2,
2980,
515,
416,
37770,
513,
13,
16,
13,
1485,
319,
33448,
12,
1157,
12,
2481,
1596,
25,
1821,
198,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
... | 3.111111 | 63 |
# Copyright 2018 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,
2864,
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,
7330... | 3.075356 | 491 |
###Hacker Rank Code!!!!##############
#!/bin/python3
import math
import os
import random
import re
import sys
first_multiple_input = input().rstrip().split()
n = int(first_multiple_input[0])
m = int(first_multiple_input[1])
matrix = []
for _ in range(n):
matrix_item = input()
matrix.append(matrix_item)
... | [
21017,
39,
10735,
10916,
6127,
13896,
7804,
4242,
2235,
198,
2,
48443,
8800,
14,
29412,
18,
198,
198,
11748,
10688,
198,
11748,
28686,
198,
11748,
4738,
198,
11748,
302,
198,
11748,
25064,
198,
198,
11085,
62,
48101,
62,
15414,
796,
512... | 2.826797 | 306 |
import os
import sys
import shutil
import itertools
from itertools import product
import json
import pandas as pd
import numpy as np
import random
from random import choices
from scipy.spatial import distance
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
import tensorflow as tf
#import tensorflow_probability as tfp
from sci... | [
11748,
28686,
198,
11748,
25064,
198,
11748,
4423,
346,
198,
11748,
340,
861,
10141,
198,
6738,
340,
861,
10141,
1330,
1720,
198,
11748,
33918,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
4738,
... | 2.284628 | 3,025 |
from django.conf.urls import include, url
from wagtail.core import urls as wagtail_urls
from wagtail_feeds.feeds import BasicFeed, ExtendedFeed
urlpatterns = [
url(r'^blog/feed/basic$', BasicFeed(), name='basic_feed'),
url(r'^blog/feed/extended$', ExtendedFeed(), name='extended_feed'),
# For anything n... | [
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
2291,
11,
19016,
198,
198,
6738,
266,
363,
13199,
13,
7295,
1330,
2956,
7278,
355,
266,
363,
13199,
62,
6371,
82,
198,
198,
6738,
266,
363,
13199,
62,
12363,
82,
13,
12363,
82,
1330... | 2.840764 | 157 |
#!/usr/bin/env python3.6
# Use the numpy library
import numpy as np
input_array, inputs_minus_min, inputs_div_max = prepare_inputs([-1,2,7])
print("Input: {}".format(input_array))
print("Input 'normalized': {}".format(inputs_div_max))
print("Multiply:\n{}".format(multiply_inputs(np.array([[1,2,3],[4,5,6... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
13,
21,
220,
198,
198,
2,
5765,
262,
299,
32152,
5888,
198,
11748,
299,
32152,
355,
45941,
628,
220,
220,
220,
220,
198,
220,
220,
220,
220,
198,
198,
15414,
62,
18747,
11,
17311,
6... | 2.251256 | 199 |
"""
public, protected, private
_ protect/protect (public _)
__ private (__NOMECLASSE__nomeatributo)
"""
bd = BaseDeDados()
bd.inserir_clientes(1, 'Otávio')
bd.inserir_clientes(2, 'Luiza')
bd.inserir_clientes(3, 'Maria')
bd.__dados = 'Outra Coisa'
#print(bd.__dados)
#print(bd._BaseDeDados__dados)
#bd.listaClientes()
#p... | [
37811,
198,
11377,
11,
6861,
11,
2839,
198,
62,
1805,
14,
35499,
357,
11377,
4808,
8,
198,
834,
2839,
357,
834,
45,
2662,
2943,
43,
1921,
5188,
834,
77,
462,
265,
2455,
78,
8,
198,
37811,
198,
198,
17457,
796,
7308,
5005,
35,
2248... | 2.218543 | 151 |
#!/usr/bin/env ipython
# )paths for pipeline diagnostics
v6a = False
v6b = True
base_dir = '/cluster/work/grlab/clinical/Inselspital/DataReleases/01-19-2017/InselSpital/'
splits_file = base_dir + '/misc_derived/temporal_split_180918.tsv'
chunks_file = base_dir + '/misc_derived/id_lists/v6b/patients_in_clean_chunking... | [
2,
48443,
14629,
14,
8800,
14,
24330,
20966,
7535,
198,
2,
1267,
6978,
82,
329,
11523,
6689,
34558,
198,
198,
85,
21,
64,
796,
10352,
198,
85,
21,
65,
796,
6407,
198,
198,
8692,
62,
15908,
796,
31051,
565,
5819,
14,
1818,
14,
2164... | 2.231894 | 1,505 |
# dataset settings
dataset_type = 'ScoliosisDataset3'
dataset_gan_type = 'ScoliosisDataset_gan_m'
data_root = '/mnt/sd2/Semantic_Seg/mmsegmentation_for_3classes/data/scoliosis3classes'
img_norm_cfg = dict(
mean=[75.99], std=[84.15], to_rgb=False)
crop_size = (448, 448)
train_pipeline = [
dict(type='LoadImageFro... | [
2,
27039,
6460,
198,
19608,
292,
316,
62,
4906,
796,
705,
3351,
349,
42960,
27354,
292,
316,
18,
6,
198,
19608,
292,
316,
62,
1030,
62,
4906,
796,
705,
3351,
349,
42960,
27354,
292,
316,
62,
1030,
62,
76,
6,
198,
7890,
62,
15763,
... | 2.10728 | 1,305 |
#!/usr/bin/env python
# MIT License
#
# Copyright (c) 2018 Károly Harsányi
#
# 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 limitation the rights
# to ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
17168,
13789,
198,
2,
198,
2,
15069,
357,
66,
8,
2864,
509,
6557,
305,
306,
367,
945,
6557,
3281,
72,
198,
2,
198,
2,
2448,
3411,
318,
29376,
7520,
11,
1479,
286,
3877,
11,
28... | 3.080263 | 760 |
# -*- coding: utf-8 -*-
# Standard Library
import threading
import random
import json
import urlparse
# Third Party Stuff
import factory
from factory import fuzzy
# Make a mock of the response
# Make a mock of the response of registering a device
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
8997,
10074,
198,
11748,
4704,
278,
198,
11748,
4738,
198,
11748,
33918,
198,
11748,
19016,
29572,
198,
198,
2,
10467,
3615,
27864,
198,
11748,
8860,
198,
6738,
... | 3.619718 | 71 |
"""
Add the
[OMS](https://blogs.technet.microsoft.com/momteam/2015/11/03/announcing-linux-docker-container-management-with-oms/)
monitoring solution to the cluster.
Visit http://mms.microsoft.com and sign up for a free OMS
account. Then click "Settings" and then "Connected Sources". You will
need to copy your Workspac... | [
37811,
198,
4550,
262,
198,
58,
2662,
50,
16151,
5450,
1378,
49096,
13,
23873,
316,
13,
40485,
13,
785,
14,
32542,
15097,
14,
4626,
14,
1157,
14,
3070,
14,
1236,
18155,
12,
23289,
12,
45986,
12,
34924,
12,
27604,
12,
4480,
12,
3150,... | 3.465704 | 277 |
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.animation import ArtistAnimation
from matplotlib.animation import FuncAnimation
pos3d = np.loadtxt("pos3d.txt")
anime = 0
fig, ax = plt.subplots()
line, = ax.plot([], [], 'r',label='trajectory')
line2, = ax.plot([], [], 'kx',label='current p... | [
11748,
299,
32152,
355,
45941,
201,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
201,
198,
6738,
2603,
29487,
8019,
13,
11227,
341,
1330,
18902,
39520,
201,
198,
6738,
2603,
29487,
8019,
13,
11227,
341,
1330,
11138,
66,... | 1.909986 | 711 |
import os
import sys
import unittest
import maya.standalone
maya.standalone.initialize()
import maya.cmds as cmds
MODULE_PATH = os.environ.get("PUZZLE_REPO_PATH")
if MODULE_PATH:
sys.path.append(MODULE_PATH)
PIECES_PATH = os.environ.get("PUZZLE_PIECE_PATH")
if not PIECES_PATH and MODULE_PATH:
PIECES_PATH = ... | [
11748,
28686,
198,
11748,
25064,
198,
11748,
555,
715,
395,
198,
198,
11748,
743,
64,
13,
1481,
17749,
198,
11261,
64,
13,
1481,
17749,
13,
36733,
1096,
3419,
198,
198,
11748,
743,
64,
13,
28758,
82,
355,
23991,
82,
198,
198,
33365,
... | 2.621359 | 206 |
from weatherbit.utils import UnicodeMixin, PropertyUnavailable
import datetime
import requests
| [
6738,
6193,
2545,
13,
26791,
1330,
34371,
35608,
259,
11,
14161,
3118,
15182,
198,
11748,
4818,
8079,
198,
11748,
7007,
628,
198
] | 4.409091 | 22 |
# 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, so... | [
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... | 2.170891 | 9,035 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import simplejson as json
from alipay.aop.api.constant.ParamConstants import *
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
2829,
17752,
355,
33918,
198,
198,
6738,
435,
541,
323,
13,
64,
404,
13,
15042,
13,
9979,
415,
13,
22973,
3418... | 2.58 | 50 |
import requests
import pybry.LBRYException as LBRYUtils
'''
What needs to be done is the following
An API Wrapper for LBRY.io needs to be made in order to make requests to the API
The only two examples I've seen both were making requests to the authorized-api, which
required a username and a password... | [
11748,
7007,
198,
11748,
12972,
65,
563,
13,
43,
11473,
56,
16922,
355,
406,
11473,
56,
18274,
4487,
198,
198,
7061,
6,
198,
220,
220,
220,
1867,
2476,
284,
307,
1760,
318,
262,
1708,
628,
220,
220,
220,
1052,
7824,
27323,
2848,
329... | 3.59204 | 201 |
# -*- coding: utf-8 -*-
import asyncio
import collections
import contextlib
import io
import os
import os.path
import re
import textwrap
import time
import traceback
import typing
import discord
from discord.ext import commands
from core import commands as inspector
from utils.converters import Codeblock, CodeblockC... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
30351,
952,
198,
11748,
17268,
198,
11748,
4732,
8019,
198,
11748,
33245,
198,
11748,
28686,
198,
11748,
28686,
13,
6978,
198,
11748,
302,
198,
11748,
2420,
37... | 3.468992 | 258 |
"""
visualization.py.
Collection of functions to display images of the Sun.
"""
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import ticker
from sunpy.visualization import axis_labels_from_ctype
import astropy.units as u
from astropy.coordinates import SkyCoord
import warnings
def add_plots(sma... | [
37811,
198,
41464,
1634,
13,
9078,
13,
198,
198,
36307,
286,
5499,
284,
3359,
4263,
286,
262,
3825,
13,
198,
37811,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
6738,
2603... | 2.170213 | 1,457 |
import pytest
import random
import pennylane as qml
import pennylane.numpy as pnp
from maskit.circuits import variational_circuit as original_variational_circuit
from maskit._masks import (
PerturbationAxis as Axis,
PerturbationMode as Mode,
DropoutMask,
FreezeMask,
)
from maskit._masked_circuits impo... | [
11748,
12972,
9288,
198,
11748,
4738,
198,
198,
11748,
22429,
2645,
1531,
355,
10662,
4029,
198,
11748,
22429,
2645,
1531,
13,
77,
32152,
355,
279,
37659,
198,
198,
6738,
9335,
270,
13,
21170,
15379,
1330,
5553,
864,
62,
21170,
5013,
35... | 3.007092 | 141 |
from ..chromagram import Chromagram
import numpy
import math
import librosa
_HAMMINGWINDOWNORM = [0.0011244659258033, 0.11559343551383, 0.42817348241183, 0.81822361914331, 1.0, 0.81822361914331, 0.42817348241183, 0.11559343551383, 0.0011244659258033]
'''
borrowed heavily from https://github.com/BansMarbol/PolyPitch... | [
6738,
11485,
28663,
6713,
1330,
18255,
6713,
198,
11748,
299,
32152,
198,
11748,
10688,
198,
11748,
9195,
4951,
64,
628,
198,
62,
33363,
44,
2751,
28929,
14165,
1581,
44,
796,
685,
15,
13,
8298,
1065,
2598,
36445,
1495,
1795,
2091,
11,
... | 2.338129 | 139 |
"""Various helper functions"""
import os
from PyQt5 import QtWidgets, QtCore
import cv2
def disconnect(signal, *args, **kwargs):
"""Disconnects the signal, catching any TypeError"""
try:
signal.disconnect(*args, **kwargs)
return True
except TypeError:
pass
else:
retur... | [
37811,
40009,
31904,
5499,
37811,
198,
198,
11748,
28686,
198,
198,
6738,
9485,
48,
83,
20,
1330,
33734,
54,
312,
11407,
11,
33734,
14055,
198,
198,
11748,
269,
85,
17,
198,
198,
4299,
22837,
7,
12683,
282,
11,
1635,
22046,
11,
12429,... | 2.618792 | 745 |
import base64
import os
import shutil
import requests
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
import src
import sys
import time
from datetime import datetime
import pytz
from io import BytesIO
from PIL import Image
from keras.applications.imagenet_utils import preprocess_in... | [
11748,
2779,
2414,
198,
11748,
28686,
198,
11748,
4423,
346,
198,
11748,
7007,
198,
6738,
384,
11925,
1505,
1330,
3992,
26230,
198,
6738,
384,
11925,
1505,
13,
12384,
26230,
13,
46659,
13,
25811,
1330,
18634,
198,
11748,
12351,
198,
11748... | 2.276825 | 1,575 |
# Generated by Django 2.2.4 on 2019-08-20 22:31
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
362,
13,
17,
13,
19,
319,
13130,
12,
2919,
12,
1238,
2534,
25,
3132,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
# -*- coding: utf-8 -*-
r"""MassSolution is a class for storing the simulation results.
After a :class:`~.Simulation` is used to simulate a :mod:`mass` model,
:class:`MassSolution`\ s are created to store the results computed over the
time interval specified when simulating. These results are divided into two
categori... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
81,
37811,
20273,
46344,
318,
257,
1398,
329,
23069,
262,
18640,
2482,
13,
198,
198,
3260,
257,
1058,
4871,
25,
63,
93,
13,
8890,
1741,
63,
318,
973,
284,
29308,
257,
... | 2.388494 | 6,605 |
import array
import struct
import unittest
from python3_gearman import protocol
from python3_gearman.connection import GearmanConnection
from python3_gearman.constants import JOB_PENDING, JOB_CREATED, JOB_FAILED, JOB_COMPLETE
from python3_gearman.errors import ConnectionError, ServerUnavailable, ProtocolError
from t... | [
11748,
7177,
198,
11748,
2878,
198,
11748,
555,
715,
395,
198,
198,
6738,
21015,
18,
62,
31763,
805,
1330,
8435,
198,
198,
6738,
21015,
18,
62,
31763,
805,
13,
38659,
1330,
10740,
805,
32048,
198,
6738,
21015,
18,
62,
31763,
805,
13,
... | 3.506757 | 296 |
from demosys.effects.effect import Effect # noqa
| [
6738,
35551,
893,
13,
34435,
13,
10760,
1330,
7896,
220,
1303,
645,
20402,
198
] | 3.571429 | 14 |
import torch
from ..utils.container import Container
from ..utils.nms import batched_nms
CONFIDENCE_THRESHOLD = 0.01
MAX_PER_CLASS = -1
MAX_PER_IMAGE = 100
NMS_THRESHOLD = 0.45
| [
11748,
28034,
198,
198,
6738,
11485,
26791,
13,
34924,
1330,
43101,
198,
6738,
11485,
26791,
13,
77,
907,
1330,
7365,
1740,
62,
77,
907,
198,
198,
10943,
37,
2389,
18310,
62,
4221,
19535,
39,
15173,
796,
657,
13,
486,
198,
22921,
62,
... | 2.571429 | 70 |
from django.urls import path, include
from rest_framework.routers import DefaultRouter
from api import views
router = DefaultRouter()
router.register('words', views.WordViewSet)
router.register('users', views.UserViewSet)
router.register('learningdata', views.LearningDataViewSet)
app_name = 'api'
urlpatterns = [
... | [
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
11,
2291,
198,
198,
6738,
1334,
62,
30604,
13,
472,
1010,
1330,
15161,
49,
39605,
198,
198,
6738,
40391,
1330,
5009,
628,
198,
472,
353,
796,
15161,
49,
39605,
3419,
198,
472,
353,
13,
3... | 2.600543 | 368 |
import logging
LOG = logging.getLogger(__name__)
# special cases to try, like when a user asks to convert 25 pints to oz
SPECIAL = {
'ounce': 'floz',
'boltzmann_constant': 'km'
}
if __name__ == '__main__':
from sys import argv
print Converter().convert(argv[1])
| [
11748,
18931,
198,
198,
25294,
796,
18931,
13,
1136,
11187,
1362,
7,
834,
3672,
834,
8,
198,
198,
2,
2041,
2663,
284,
1949,
11,
588,
618,
257,
2836,
7893,
284,
10385,
1679,
279,
29503,
284,
15649,
198,
48451,
12576,
796,
1391,
198,
... | 2.62037 | 108 |
from tests.testcase import BaseTestCase
| [
198,
6738,
5254,
13,
9288,
7442,
1330,
7308,
14402,
20448,
628
] | 3.818182 | 11 |
from browserquest_pb2 import WelcomeRequest
from browserquest_pb2 import SpawnRequest
from browserquest_pb2 import DamageRequest
from browserquest_pb2 import ListRequest
from browserquest_pb2 import BrowserQuest
from browserquest_pb2 import BrowserQuest_Stub
from entity_pb2 import Player
from entity_pb2 import Entity... | [
6738,
6444,
6138,
62,
40842,
17,
1330,
19134,
18453,
198,
6738,
6444,
6138,
62,
40842,
17,
1330,
36356,
18453,
198,
6738,
6444,
6138,
62,
40842,
17,
1330,
8995,
18453,
198,
6738,
6444,
6138,
62,
40842,
17,
1330,
7343,
18453,
198,
6738,
... | 3.891026 | 156 |
# 通知対象の Twitter アカウントのスクリーンネームネーム(複数指定可)
SCREEN_NAMES = ['@yousuck2020', '@kskgroup2017']
# メンション先の Discord アカウントの ID
# ID は Discord の設定から開発者モードを有効化し、自分のユーザーアイコンを右クリックで出てくる [IDをコピー] から取得できる
# MENTION_TO = None に設定するとメンションされない
MENTION_TO = '123456789012345678'
# Discord の Webhook URL
WEBHOOK_URL = 'YOUR_DISCORD_WEBHO... | [
198,
2,
16268,
222,
248,
163,
253,
98,
43380,
122,
164,
109,
94,
5641,
3009,
220,
11839,
21763,
16165,
6527,
13298,
5641,
8943,
14099,
12675,
31708,
44916,
12045,
254,
44916,
12045,
254,
171,
120,
230,
164,
97,
229,
46763,
108,
162,
2... | 1.317269 | 249 |
# coding=utf-8
from OTLMOW.OTLModel.Classes.AIMNaamObject import AIMNaamObject
from OTLMOW.GeometrieArtefact.PuntGeometrie import PuntGeometrie
# Generated with OTLClassCreator. To modify: extend, do not edit
class LoopTerminationAndProtection(AIMNaamObject, PuntGeometrie):
"""(Groene) aansluitblok met afsluitimp... | [
2,
19617,
28,
40477,
12,
23,
198,
6738,
440,
14990,
44,
3913,
13,
2394,
43,
17633,
13,
9487,
274,
13,
32,
3955,
26705,
321,
10267,
1330,
317,
3955,
26705,
321,
10267,
198,
6738,
440,
14990,
44,
3913,
13,
10082,
908,
5034,
3163,
660,... | 2.647619 | 210 |
# Execute para ver as diferenças
# Exemplos para serem usados com print:
print ("Hello World")
print ('Hello,"World"')
print ('I\'m RAR')
print (2+2)
print (6//3,end=" ") # end="" define como vai ser o final - nesse caso vazio
print (6/3,"\n") # \n É usado para quebra de linha
... | [
2,
8393,
1133,
31215,
3326,
355,
288,
361,
14226,
16175,
292,
198,
198,
2,
1475,
18856,
418,
31215,
384,
2787,
514,
22484,
401,
3601,
25,
198,
4798,
5855,
15496,
2159,
4943,
198,
4798,
19203,
15496,
553,
10603,
1,
11537,
198,
4798,
19... | 2.092537 | 335 |
import numpy as np
import pandas as pd
import time
import os
params_appliance = {
'kettle': {
'windowlength': 599,
'on_power_threshold': 2000,
'max_on_power': 3998,
'mean': 700,
'std': 1000,
's2s_length': 128,
'houses': [1, 2],
'channels': [10, 8],
... | [
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
640,
198,
11748,
28686,
198,
198,
37266,
62,
1324,
75,
3610,
796,
1391,
198,
220,
220,
220,
705,
74,
23570,
10354,
1391,
198,
220,
220,
220,
220,
220,
... | 2.107268 | 1,995 |
import unittest
import bill_info
import fixtures
import utils
import datetime
# hr3590-111 went through everything except a veto
# s1-113 was introduced and went nowhere
# s227-113 was introduced, read, and passed by unanimous consent without a referral,
# then (at fixture-time) sat at the House
... | [
11748,
555,
715,
395,
198,
11748,
2855,
62,
10951,
198,
11748,
34609,
198,
11748,
3384,
4487,
198,
198,
11748,
4818,
8079,
628,
198,
220,
220,
220,
1303,
39436,
2327,
3829,
12,
16243,
1816,
832,
2279,
2845,
257,
18860,
628,
220,
220,
... | 3.409091 | 154 |
from tests.sharepoint_case import SPTestCase
| [
6738,
5254,
13,
20077,
4122,
62,
7442,
1330,
6226,
14402,
20448,
628
] | 3.833333 | 12 |
# 38. Count and Say
# Runtime: 32 ms, faster than 75.03% of Python3 online submissions for Count and Say.
# Memory Usage: 13.8 MB, less than 6.38% of Python3 online submissions for Count and Say.
| [
2,
4353,
13,
2764,
290,
13816,
198,
198,
2,
43160,
25,
3933,
13845,
11,
5443,
621,
5441,
13,
3070,
4,
286,
11361,
18,
2691,
22129,
329,
2764,
290,
13816,
13,
198,
198,
2,
14059,
29566,
25,
1511,
13,
23,
10771,
11,
1342,
621,
718,
... | 3.413793 | 58 |
print("Hello!")
for num in range(10, 0, -2):
print(num)
| [
4798,
7203,
15496,
2474,
8,
198,
1640,
997,
287,
2837,
7,
940,
11,
657,
11,
532,
17,
2599,
198,
220,
220,
220,
3601,
7,
22510,
8,
198
] | 2.222222 | 27 |
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2017 Judit Acs <judit@sch.bme.hu>
#
# Distributed under terms of the MIT license.
from argparse import ArgumentParser
from sys import stdin
if __name__ == '__main__':
main()
| [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
43907,
25,
69,
12685,
28,
40477,
12,
23,
198,
2,
198,
2,
15069,
10673,
2177,
4794,
270,
4013,
82,
1279,
... | 2.553398 | 103 |
from setuptools import setup
setup(name='box-requests',
version='0.1',
description='Helper for using Box API with python-requests',
url='http://github.com/cg2v/box-requests',
author='Chaskiel Grundman',
author_email='cg2v@andrew.cmu.edu',
license='BSD',
packages=['box_requests... | [
6738,
900,
37623,
10141,
1330,
9058,
198,
198,
40406,
7,
3672,
11639,
3524,
12,
8897,
3558,
3256,
198,
220,
220,
220,
220,
220,
2196,
11639,
15,
13,
16,
3256,
198,
220,
220,
220,
220,
220,
6764,
11639,
47429,
329,
1262,
8315,
7824,
... | 2.350282 | 177 |
"""
Build, fit, and evaluate predictive models.
"""
import logging
import typing
from time import time
import pandas as pd
import sklearn.compose
from numpy import NaN
from sklearn.compose import ColumnTransformer
from sklearn.ensemble import GradientBoostingRegressor
from sklearn.model_selection import train_test_sp... | [
37811,
198,
15580,
11,
4197,
11,
290,
13446,
33344,
4981,
13,
198,
37811,
198,
11748,
18931,
198,
11748,
19720,
198,
6738,
640,
1330,
640,
198,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
1341,
35720,
13,
785,
3455,
198,
6738,
2... | 2.65388 | 3,415 |
# Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | [
2,
15069,
33448,
43208,
21852,
1766,
1539,
12052,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198... | 3.423841 | 453 |
# -*- coding: utf-8 -*-
"""Turbinia component scaffolder."""
import datetime
import os
import logging
from typing import Dict
from typing import Iterator
from typing import Tuple
from l2tscaffolder.lib import definitions
from l2tscaffolder.lib import mapping_helper
from l2tscaffolder.scaffolders import interface
from... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
51,
5945,
43168,
7515,
41498,
19892,
526,
15931,
198,
11748,
4818,
8079,
198,
11748,
28686,
198,
11748,
18931,
198,
198,
6738,
19720,
1330,
360,
713,
198,
6738,
197... | 2.695807 | 1,407 |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may... | [
2,
220,
49962,
284,
262,
24843,
10442,
5693,
357,
1921,
37,
8,
739,
530,
198,
2,
220,
393,
517,
18920,
5964,
11704,
13,
220,
4091,
262,
28536,
2393,
198,
2,
220,
9387,
351,
428,
670,
329,
3224,
1321,
198,
2,
220,
5115,
6634,
9238,... | 3.88835 | 206 |
"""
@Time : 203/21/19 17:11
@Author : TaylorMei
@Email : mhy845879017@gmail.com
@Project : iccv
@File : crop_image.py
@Function:
"""
import os
import numpy as np
import skimage.io
input_path = '/media/iccd/TAYLORMEI/depth/image'
output_path = '/media/iccd/TAYLORMEI/depth/crop'
if not os.path.exists(... | [
37811,
198,
2488,
7575,
220,
220,
220,
1058,
27408,
14,
2481,
14,
1129,
1596,
25,
1157,
198,
2488,
13838,
220,
1058,
8121,
5308,
72,
198,
2488,
15333,
220,
220,
1058,
285,
12114,
23,
29334,
3720,
29326,
31,
14816,
13,
785,
198,
220,
... | 2.160763 | 367 |
# coding=utf-8
'''
Created on 2016-8-24
@author: Devuser
'''
from business.auth_user.user_service import UserService
from doraemon.project.models import Project,Version,ProjectMember
from doraemon.api.project.viewmodel.api_project_member import ApiProjectMember
class ApiProject(Project):
'''
classdocs
''... | [
2,
19617,
28,
40477,
12,
23,
198,
7061,
6,
198,
41972,
319,
1584,
12,
23,
12,
1731,
198,
198,
31,
9800,
25,
6245,
7220,
198,
7061,
6,
198,
6738,
1597,
13,
18439,
62,
7220,
13,
7220,
62,
15271,
1330,
11787,
16177,
198,
6738,
288,
... | 2.526316 | 190 |
import qml
import numpy as np
import os
import sys
from qml.wrappers import arad_local_kernels, arad_local_symmetric_kernels
def get_energies(filename):
""" Returns a dictionary with heats of formation for each xyz-file.
"""
f = open(filename, "r")
lines = f.readlines()
f.close()
energies = ... | [
11748,
10662,
4029,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28686,
198,
11748,
25064,
198,
198,
6738,
10662,
4029,
13,
29988,
11799,
1330,
610,
324,
62,
12001,
62,
74,
44930,
11,
610,
324,
62,
12001,
62,
1837,
3020,
19482,
62,
... | 2.201525 | 918 |
#coding:utf-8
#
# id: bugs.core_5457
# title: Bugcheck 167 (invalid SEND request)
# decription:
# Reproduced on: WI-V3.0.1.32609 - got in firebird.log:
# "internal Firebird consistency check (invalid SEND request (167), file: JrdStatement.cpp line: 325)"
# ... | [
2,
66,
7656,
25,
40477,
12,
23,
198,
2,
198,
2,
4686,
25,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
11316,
13,
7295,
62,
20,
33032,
198,
2,
3670,
25,
220,
220,
220,
220,
220,
220,
220,
15217,
9122,
26118,
357,
259,
121... | 2.03914 | 3,117 |
# coding: utf-8
import matplotlib.pyplot as plt
import numpy as np
# データの作成
x = np.arange(0, 6, 0.1)
y = np.sin(x)
# グラフの描画
plt.plot(x, y)
plt.show()
| [
2,
19617,
25,
3384,
69,
12,
23,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
299,
32152,
355,
45941,
198,
198,
2,
14524,
229,
6312,
23376,
5641,
43291,
22755,
238,
198,
87,
796,
45941,
13,
283,
858,
7,
... | 1.707865 | 89 |
import getpass
import grp
import logging
import os
import subprocess
from contextlib import contextmanager
import sys
from retry import retry
from skipper import utils
# pylint: disable=too-many-arguments
# pylint: disable=too-many-locals
# pylint: disable=too-many-arguments
@contextmanager
@retry(delay=... | [
11748,
651,
6603,
198,
11748,
1036,
79,
198,
11748,
18931,
198,
11748,
28686,
198,
11748,
850,
14681,
198,
6738,
4732,
8019,
1330,
4732,
37153,
198,
11748,
25064,
198,
6738,
1005,
563,
1330,
1005,
563,
198,
6738,
1341,
14710,
1330,
3384,
... | 3 | 112 |
import logging
logging.basicConfig(level=logging.DEBUG,
filename="./log/prova.log",
format='%(asctime)s %(name)s %(levelname)s: %(message)s')
logger = logging.getLogger(__name__) | [
11748,
18931,
628,
198,
198,
6404,
2667,
13,
35487,
16934,
7,
5715,
28,
6404,
2667,
13,
30531,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
29472,
28,
1911,
14,
6404,
14,
... | 2 | 111 |
import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
from torch.autograd import Variable
from .Efficient_ResBlocks import CasResB
from ..utils import optical_flow_warp
| [
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
28034,
13,
2306,
519,
6335,
1330,
35748,
198,
198,
6738,
764,
36,
5632,
62,
49... | 3.440678 | 59 |
#!/bin/env python
output_filename = './skyblock-ce'
# Make sure this is false before releasing
creative = False
| [
2,
48443,
8800,
14,
24330,
21015,
198,
198,
22915,
62,
34345,
796,
705,
19571,
15688,
9967,
12,
344,
6,
198,
198,
2,
6889,
1654,
428,
318,
3991,
878,
13011,
198,
20123,
425,
796,
10352,
198
] | 3.257143 | 35 |
# System imports
import RPi.GPIO as GPIO
from time import sleep
# Define pins
STEP_PIN = 23
DIRECTION_PIN = 24
# Create a new instance of our stepper class (note if you're just starting out with this you're probably better off using a delay of ~0.1)
stepperHandler = StepperHandler(STEP_PIN, DIRECTION_PIN, 0.0005)
# ... | [
2,
4482,
17944,
198,
11748,
25812,
72,
13,
16960,
9399,
355,
50143,
198,
6738,
640,
1330,
3993,
198,
198,
2,
2896,
500,
20567,
198,
42135,
62,
44032,
796,
2242,
198,
17931,
23988,
2849,
62,
44032,
796,
1987,
198,
198,
2,
13610,
257,
... | 3.041176 | 170 |
from __future__ import unicode_literals
from . import __version__ as app_version
app_name = "frappe"
app_title = "Frappe Framework"
app_publisher = "Frappe Technologies"
app_description = "Full stack web framework with Python, Javascript, MariaDB, Redis, Node"
app_icon = "octicon octicon-circuit-board"
app_color = "o... | [
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
6738,
764,
1330,
11593,
9641,
834,
355,
598,
62,
9641,
628,
198,
1324,
62,
3672,
796,
366,
69,
430,
27768,
1,
198,
1324,
62,
7839,
796,
366,
49562,
27768,
25161,
1,
19... | 2.420889 | 3,533 |
# Generated by Django 3.0 on 2020-02-23 01:21
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
15,
319,
12131,
12,
2999,
12,
1954,
5534,
25,
2481,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.966667 | 30 |
l = [0, 1, 2, 3, 4]
print([i > 2 for i in l])
# [False, False, False, True, True]
print(all([i > 2 for i in l]))
# False
print(any([i > 2 for i in l]))
# True
print(type([i > 2 for i in l]))
# <class 'list'>
print(type((i > 2 for i in l)))
# <class 'generator'>
print(type(i > 2 for i in l))
# <class 'generator'>
... | [
75,
796,
685,
15,
11,
352,
11,
362,
11,
513,
11,
604,
60,
198,
198,
4798,
26933,
72,
1875,
362,
329,
1312,
287,
300,
12962,
198,
2,
685,
25101,
11,
10352,
11,
10352,
11,
6407,
11,
6407,
60,
198,
198,
4798,
7,
439,
26933,
72,
1... | 2.212264 | 212 |
#-*- coding:utf-8 -*-
from ..compatibility.urlparse_ import urlparse_
from .filter import Filter | [
2,
12,
9,
12,
19617,
25,
40477,
12,
23,
532,
9,
12,
198,
198,
6738,
11485,
5589,
25901,
13,
6371,
29572,
62,
1330,
19016,
29572,
62,
198,
6738,
764,
24455,
1330,
25853
] | 3.03125 | 32 |
import numpy as np
def JD_to_LST(JDs, longitude):
"""
:param JDs:
Iterable of Julian Dates.
:param longitude:
Value of local longitude [+/-degrees where sign "-" for West to
Greenwitch sites].
:return:
Numpy array with Local Sidereal Time values.
"""
JDs = np.ar... | [
11748,
299,
32152,
355,
45941,
628,
198,
4299,
28591,
62,
1462,
62,
43,
2257,
7,
41,
30832,
11,
890,
3984,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1058,
17143,
28591,
82,
25,
198,
220,
220,
220,
220,
220,
220,
220,
40... | 2.223358 | 685 |
from typing import (
Union,
)
from platon_typing import (
NodeID,
URI,
BLSPubkey,
BLSSignature,
HexStr,
Decodable,
)
from platon_typing.evm import (
Bech32Address,
)
from platon.types import (
InnerFn,
)
from platon.types import (
Von,
Version,
)
from platon._utils.inner_con... | [
6738,
19720,
1330,
357,
198,
220,
220,
220,
4479,
11,
198,
8,
198,
198,
6738,
458,
13951,
62,
774,
13886,
1330,
357,
198,
220,
220,
220,
19081,
2389,
11,
198,
220,
220,
220,
43975,
11,
198,
220,
220,
220,
9878,
4303,
549,
2539,
11... | 2.294479 | 163 |
import discord
import traceback
from discord.ext import commands
def trace_back(err, advance: bool = True):
""" debug your code anywhere """
_traceback = ''.join(traceback.format_tb(err.__traceback__))
error = '```py\n{1}{0}: {2}\n```'.format(type(err).__name__, _traceback, err)
return error if advan... | [
11748,
36446,
198,
11748,
12854,
1891,
198,
198,
6738,
36446,
13,
2302,
1330,
9729,
628,
198,
4299,
12854,
62,
1891,
7,
8056,
11,
5963,
25,
20512,
796,
6407,
2599,
198,
220,
220,
220,
37227,
14257,
534,
2438,
6609,
37227,
198,
220,
22... | 2.755725 | 131 |
from __future__ import annotations
from typing import List, Callable
| [
6738,
11593,
37443,
834,
1330,
37647,
198,
198,
6738,
19720,
1330,
7343,
11,
4889,
540,
628
] | 4.4375 | 16 |
from pytpp.attributes._helper import IterableMeta, Attribute
from pytpp.attributes.certificate_authority_base import CertificateAuthorityBaseAttributes
| [
6738,
12972,
83,
381,
13,
1078,
7657,
13557,
2978,
525,
1330,
40806,
540,
48526,
11,
3460,
4163,
198,
6738,
12972,
83,
381,
13,
1078,
7657,
13,
22583,
22460,
62,
9800,
414,
62,
8692,
1330,
27895,
13838,
414,
14881,
29021,
628
] | 3.825 | 40 |
"""This module does blah blah."""
import argparse
import gc
import tensorflow as tf
import numpy as np
from PIL import Image
import data_processing as data
import model
import output
import dcgan_alt as dcgan
import latent_space
from constants import (SEED, BATCH_SIZE, Z_NOISE_DIM, DIM_X, DIM_Y, DIM_Z, NUM_EPOCHS, Y_DI... | [
37811,
1212,
8265,
857,
33367,
33367,
526,
15931,
198,
11748,
1822,
29572,
198,
11748,
308,
66,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
350,
4146,
1330,
7412,
198,
11748,
1366,
62,
36948,
... | 2.226742 | 2,483 |
# vim: set sw=2 ts=2 softtabstop=2 expandtab:
import logging
import os
import re
_logger = logging.getLogger(__name__)
| [
2,
43907,
25,
900,
1509,
28,
17,
40379,
28,
17,
2705,
8658,
11338,
28,
17,
4292,
8658,
25,
198,
11748,
18931,
198,
11748,
28686,
198,
11748,
302,
198,
198,
62,
6404,
1362,
796,
18931,
13,
1136,
11187,
1362,
7,
834,
3672,
834,
8,
1... | 2.727273 | 44 |
from setuptools import setup, find_packages
setup(
name='PyInvest',
version='1.0.1',
packages=find_packages(),
data_files=[("pyinvestconf", ['conf/pyinvest.json'])],
install_requires=['requests', 'selenium'],
author='Jeff Moorhead',
author_email='Jeff.moorhead1@gmail.com',
description='... | [
6738,
900,
37623,
10141,
1330,
9058,
11,
1064,
62,
43789,
198,
198,
40406,
7,
198,
220,
220,
220,
1438,
11639,
20519,
19070,
3256,
198,
220,
220,
220,
2196,
11639,
16,
13,
15,
13,
16,
3256,
198,
220,
220,
220,
10392,
28,
19796,
62,
... | 2.717647 | 170 |
import elasticsearch_dsl as dsl
from . import client, any_key_to_string_array
| [
11748,
27468,
12947,
62,
67,
6649,
355,
288,
6649,
198,
6738,
764,
1330,
5456,
11,
597,
62,
2539,
62,
1462,
62,
8841,
62,
18747,
628
] | 3.16 | 25 |
from .event import * # noqa
from .msg import * # noqa
| [
6738,
764,
15596,
1330,
1635,
220,
1303,
645,
20402,
198,
6738,
764,
19662,
1330,
1635,
220,
1303,
645,
20402,
198
] | 2.8 | 20 |
# 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.067568 | 370 |