content stringlengths 1 1.05M | input_ids listlengths 1 883k | ratio_char_token float64 1 22.9 | token_count int64 1 883k |
|---|---|---|---|
""" Bifurcation point classes. Each class locates and processes bifurcation points.
* _BranchPointFold is a version based on BranchPoint location algorithms
* BranchPoint: Branch process is broken (can't find alternate branch -- see MATCONT notes)
Drew LaMar, March 2006
"""
from __future__ import absolu... | [
37811,
347,
361,
333,
30907,
966,
6097,
13,
220,
5501,
1398,
1179,
689,
290,
7767,
275,
361,
333,
30907,
2173,
13,
628,
220,
220,
220,
1635,
4808,
33,
25642,
12727,
37,
727,
318,
257,
2196,
1912,
319,
20551,
12727,
4067,
16113,
198,
... | 2.826303 | 403 |
"""Urls for the marion application"""
from django.urls import include, path
from rest_framework import routers
from .. import views
router = routers.DefaultRouter()
router.register(r"requests", views.DocumentRequestViewSet)
urlpatterns = [
path("", include(router.urls)),
]
| [
37811,
16692,
7278,
329,
262,
1667,
295,
3586,
37811,
198,
198,
6738,
42625,
14208,
13,
6371,
82,
1330,
2291,
11,
3108,
198,
198,
6738,
1334,
62,
30604,
1330,
41144,
198,
198,
6738,
11485,
1330,
5009,
198,
198,
472,
353,
796,
41144,
1... | 3.179775 | 89 |
"""
PyXLL-Jupyter
This package integrated Jupyter notebooks into Microsoft Excel.
To install it, first install PyXLL (see https://www.pyxll.com).
Briefly, to install PyXLL do the following::
pip install pyxll
pyxll install
Once PyXLL is installed then installing this package will add a
button to the PyXLL ... | [
37811,
198,
20519,
55,
3069,
12,
41,
929,
88,
353,
198,
198,
1212,
5301,
11521,
449,
929,
88,
353,
43935,
656,
5413,
24134,
13,
198,
198,
2514,
2721,
340,
11,
717,
2721,
9485,
55,
3069,
357,
3826,
3740,
1378,
2503,
13,
9078,
87,
2... | 2.361905 | 735 |
from typing import List
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from django.http import JsonResponse
from django.shortcuts import render
from django.urls import reverse_lazy
from django.views import generic, View
from board.forms import SignUpForm
from .co... | [
6738,
19720,
1330,
7343,
198,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
12501,
273,
2024,
1330,
17594,
62,
35827,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27530,
1330,
11787,
198,
6738,
42625,
14208,
13,
4023,... | 3.071942 | 278 |
# -*- coding: utf-8 -*-
# Learn more: https://github.com/kennethreitz/setup.py
from setuptools import setup, find_packages
import os
with open('README.md') as f:
readme = f.read()
with open('LICENSE') as f:
license = f.read()
setup(
name='lazmond3-pylib-instagram-type',
version='1.0.8',
desc... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
14365,
517,
25,
3740,
1378,
12567,
13,
785,
14,
74,
1697,
2788,
260,
4224,
14,
40406,
13,
9078,
198,
198,
6738,
900,
37623,
10141,
1330,
9058,
11,
1064,
62,
... | 2.388514 | 296 |
# -*- coding: utf-8 -*-
# Generated by Django 1.11.16 on 2019-01-15 22:49
from __future__ import unicode_literals
from django.db import migrations
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2980,
515,
416,
37770,
352,
13,
1157,
13,
1433,
319,
13130,
12,
486,
12,
1314,
2534,
25,
2920,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,... | 2.709091 | 55 |
#!/usr/bin/env python3
#
# Copyright (c) 2019 Miklos Vajna and contributors.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""The test_webframe module covers the webframe module."""
from typing import List
from typing import TYPE_CHECKING
from typing import Tupl... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
198,
2,
15069,
357,
66,
8,
13130,
17722,
33280,
39838,
2616,
290,
20420,
13,
198,
2,
5765,
286,
428,
2723,
2438,
318,
21825,
416,
257,
347,
10305,
12,
7635,
5964,
326,
460,
... | 3.12 | 225 |
from __future__ import unicode_literals
import spotipy
from spotipy.oauth2 import SpotifyClientCredentials
import requests
from youtube_search import YoutubeSearch
import youtube_dl
import eyed3.id3
import eyed3
import lyricsgenius
import telepot
spotifyy = spotipy.Spotify(
client_credentials_manager=SpotifyClient... | [
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
11748,
4136,
541,
88,
198,
6738,
4136,
541,
88,
13,
12162,
1071,
17,
1330,
26778,
11792,
34,
445,
14817,
198,
11748,
7007,
198,
6738,
35116,
62,
12947,
1330,
27431,
18243,... | 2.216028 | 287 |
#------------------------------------------------------------------------------
# Copyright (c) 2018-2019, Nucleic Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
#------------------------------------------------... | [
2,
10097,
26171,
198,
2,
15069,
357,
66,
8,
2864,
12,
23344,
11,
399,
14913,
291,
7712,
4816,
13,
198,
2,
198,
2,
4307,
6169,
739,
262,
2846,
286,
262,
40499,
347,
10305,
13789,
13,
198,
2,
198,
2,
383,
1336,
5964,
318,
287,
262... | 2.425037 | 1,334 |
from datetime import datetime
| [
6738,
4818,
8079,
1330,
4818,
8079,
628
] | 4.428571 | 7 |
from django.contrib import admin
from bible.models import Bible, VerseOfTheDay
| [
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
6738,
41169,
13,
27530,
1330,
9111,
11,
38641,
5189,
464,
12393,
628,
198
] | 3.681818 | 22 |
"""
Our own implementation of an abstract syntax tree (AST).
The convert function recursively converts a Python AST (from the module `ast`)
to our own AST (of the class `Node`).
"""
import ast
from logging import debug
from typy.builtin import data_types
from typy.exceptions import NotYetSupported, NoSuchAttribute, ... | [
37811,
198,
5122,
898,
7822,
286,
281,
12531,
15582,
5509,
357,
11262,
737,
198,
198,
464,
10385,
2163,
664,
1834,
2280,
26161,
257,
11361,
29273,
357,
6738,
262,
8265,
4600,
459,
63,
8,
198,
1462,
674,
898,
29273,
357,
1659,
262,
139... | 2.589744 | 468 |
"""
Testing:
- uploading over existing files
- using deleted credentials
- using expired credentials
"""
import io
import minio
from minio import Minio
import pytest
from minio.credentials import AssumeRoleProvider, Credentials
from entityservice.object_store import connect_to_object_store, connect_to_upload_obje... | [
37811,
198,
44154,
25,
198,
532,
33794,
625,
4683,
3696,
198,
532,
1262,
13140,
18031,
198,
532,
1262,
21350,
18031,
198,
198,
37811,
198,
11748,
33245,
198,
198,
11748,
949,
952,
198,
6738,
949,
952,
1330,
1855,
952,
198,
11748,
12972,... | 2.689516 | 248 |
# Copyright 2020 Soil, Inc.
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc.
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); yo... | [
2,
15069,
12131,
1406,
346,
11,
3457,
13,
198,
2,
15069,
357,
66,
8,
2813,
1395,
13,
27061,
11,
257,
1597,
4326,
286,
21698,
3457,
13,
198,
2,
15069,
3050,
1578,
1829,
5070,
355,
7997,
416,
262,
198,
2,
22998,
286,
262,
2351,
1578... | 3.440341 | 352 |
import calendar
import datetime
from unittest import TestCase
import pytz
from dateutil.parser import parse as date_parse
from tests import BaseTestCase
from redash import models, redis_connection
from redash.models import db, types
from redash.utils import gen_query_hash, utcnow
def _set_up_dashboard_test... | [
11748,
11845,
198,
11748,
4818,
8079,
198,
6738,
555,
715,
395,
1330,
6208,
20448,
198,
198,
11748,
12972,
22877,
198,
6738,
3128,
22602,
13,
48610,
1330,
21136,
355,
3128,
62,
29572,
198,
6738,
5254,
1330,
7308,
14402,
20448,
198,
198,
... | 2.315549 | 656 |
'''
Fibonacci Sequence
'''
import HeaderOfFiles
while True:
try:
f = int(input("Enter a number for Fibonacci: "))
break
except:
print("Give me a number please!")
fibonacciSeq(f) | [
7061,
6,
198,
37,
571,
261,
44456,
45835,
198,
7061,
6,
198,
198,
11748,
48900,
5189,
25876,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
198,
198,
4514,
6407,
25,
198,
220,
220,
220,
1949,
25,
198,
220,
... | 2.073394 | 109 |
# Copyright 2021 MosaicML. All Rights Reserved.
from composer.algorithms.mixup.mixup import MixUp as MixUp
from composer.algorithms.mixup.mixup import MixUpHparams as MixUpHparams
from composer.algorithms.mixup.mixup import mixup_batch as mixup_batch
_name = 'MixUp'
_class_name = 'MixUp'
_functional = 'mixup_batch'
_... | [
2,
15069,
33448,
5826,
18452,
5805,
13,
1439,
6923,
33876,
13,
198,
198,
6738,
26777,
13,
282,
7727,
907,
13,
19816,
929,
13,
19816,
929,
1330,
15561,
4933,
355,
15561,
4933,
198,
6738,
26777,
13,
282,
7727,
907,
13,
19816,
929,
13,
... | 2.840491 | 163 |
from __future__ import absolute_import, print_function
import unittest
import os
import tensorflow as tf
from tensorflow.keras import regularizers
from niftynet.network.simple_gan import SimpleGAN
from tests.niftynet_testcase import NiftyNetTestCase
if __name__ == "__main__":
tf.test.main()
| [
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
11,
3601,
62,
8818,
198,
198,
11748,
555,
715,
395,
198,
198,
11748,
28686,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
6738,
11192,
273,
11125,
13,
6122,
292,
1330,
3218,
11341,
198,
... | 3.212766 | 94 |
import time
import thingspeak_wrapper as tsw
# Initiate the class ThingWrapper with (CHANNEL_ID, WRITE_API__KEY, READ_API_KEY)
# if is a public channel just pass the CHANNEL_ID argument, api_key defaults are None
my_channel = tsw.wrapper.ThingWrapper(501309, '6TQDNWJQ44FA0GAQ', '10EVD2N6YIHI5O7Z')
# all set of func... | [
11748,
640,
198,
198,
11748,
1243,
36729,
62,
48553,
355,
256,
2032,
198,
198,
2,
16204,
378,
262,
1398,
21561,
36918,
2848,
351,
357,
3398,
22846,
3698,
62,
2389,
11,
44423,
62,
17614,
834,
20373,
11,
20832,
62,
17614,
62,
20373,
8,
... | 2.754615 | 921 |
#
# Copyright (c) 2019, Neptune Labs Sp. z o.o.
#
# 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 agr... | [
2,
198,
2,
15069,
357,
66,
8,
13130,
11,
26461,
23500,
1338,
13,
1976,
267,
13,
78,
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,
... | 2.665714 | 1,050 |
#!/usr/bin/python
#
# This might be horrible code...
# ...but it works
# Feel free to re-write in a better way
# And if you want to - send it to us, we'll update ;)
# maltego@paterva.com (2010/10/18)
#
import sys
from xml.dom import minidom
| [
2,
48443,
14629,
14,
8800,
14,
29412,
220,
198,
2,
198,
2,
770,
1244,
307,
12361,
2438,
986,
198,
2,
2644,
4360,
340,
2499,
198,
2,
18571,
1479,
284,
302,
12,
13564,
287,
257,
1365,
835,
198,
2,
843,
611,
345,
765,
284,
532,
375... | 2.697917 | 96 |
# Generated by Django 2.1.5 on 2019-02-12 21:18
import django.db.models.deletion
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
362,
13,
16,
13,
20,
319,
13130,
12,
2999,
12,
1065,
2310,
25,
1507,
198,
198,
11748,
42625,
14208,
13,
9945,
13,
27530,
13,
2934,
1616,
295,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
... | 2.818182 | 44 |
# -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2018 CERN.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""IIIF API for Invenio."""
IIIF_API_PREFIX = '/iiif/'
"""URL prefix to IIIF API."""
III... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
198,
2,
770,
2393,
318,
636,
286,
554,
574,
952,
13,
198,
2,
15069,
357,
34,
8,
2864,
327,
28778,
13,
198,
2,
198,
2,
554,
574,
952,
318,
1479,
3788,
26,
345,... | 2.665574 | 305 |
#!/user/bin/env/python
"""
pub_ingest.py -- Read a bibtex file and make VIVO RDF
The following objects will be made as needed:
-- publisher
-- journal
-- information resource
-- timestamp for the information resource
-- people
-- authorships
-- concepts
The result... | [
2,
48443,
7220,
14,
8800,
14,
24330,
14,
29412,
198,
37811,
198,
220,
220,
220,
2240,
62,
278,
395,
13,
9078,
1377,
4149,
257,
275,
571,
16886,
2393,
290,
787,
569,
3824,
46,
371,
8068,
628,
220,
220,
220,
383,
1708,
5563,
481,
30... | 2.542837 | 5,626 |
#!/usr/bin/env python
'''Generally useful bits and bobs.'''
import queue # For PrintThread and exe_run
from time import sleep, time, gmtime, strftime # For lock timeout, exe_run timeout and logging
from multiprocessing import RLock
from copy import copy
import threading # For Print... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
7061,
6,
37058,
4465,
10340,
290,
275,
8158,
2637,
7061,
198,
198,
11748,
16834,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
... | 2.041316 | 22,679 |
import numpy as np
import astropy.modeling.blackbody as bb
import astropy.constants as const
from astropy.io import fits
from scipy.interpolate import interp2d
def get_a(P, M_star, M_p):
"""
Use Kepler's third law to derive the star-planet separation.
"""
return (P ** 2 * const.G.value * (M_star + M_p) / (4 * np.... | [
11748,
299,
32152,
355,
45941,
198,
11748,
6468,
28338,
13,
4666,
10809,
13,
13424,
2618,
355,
275,
65,
220,
198,
11748,
6468,
28338,
13,
9979,
1187,
355,
1500,
198,
6738,
6468,
28338,
13,
952,
1330,
11414,
198,
6738,
629,
541,
88,
13... | 2.648438 | 128 |
import torch.nn.utils.prune as prune
import torch
from src.vanilla_pytorch.utils import count_rem_weights
from src.vanilla_pytorch.models.linearnets import LeNet, init_weights
from src.vanilla_pytorch.models.resnets import Resnets
def get_masks(model, prune_amts=None):
"""
prune the lowest p% weights by magn... | [
11748,
28034,
13,
20471,
13,
26791,
13,
1050,
1726,
355,
778,
1726,
198,
11748,
28034,
198,
6738,
12351,
13,
10438,
5049,
62,
9078,
13165,
354,
13,
26791,
1330,
954,
62,
2787,
62,
43775,
198,
6738,
12351,
13,
10438,
5049,
62,
9078,
13... | 2.486529 | 631 |
"""
read_instance_BH-cyclic.py
"""
'''
[seed graph]
V_C : "V_C"
E_C : "E_C"
[core specification]
ell_LB : "\ell_{\rm LB}"
ell_UB : "\ell_{\rm UB}"
cs_LB : "\textsc{cs}_{\rm LB}"
cs_UB : "\textsc{cs}_{\rm UB}"
'''
import sys
# prepare a set of chemical ro... | [
37811,
198,
961,
62,
39098,
62,
33,
39,
12,
15539,
291,
13,
9078,
198,
37811,
198,
198,
7061,
6,
198,
58,
28826,
4823,
60,
198,
220,
220,
569,
62,
34,
220,
220,
220,
220,
220,
220,
220,
1058,
366,
53,
62,
34,
1,
198,
220,
220,... | 1.748765 | 1,417 |
from .system import *
from .colours import *
| [
6738,
764,
10057,
1330,
1635,
198,
6738,
764,
4033,
4662,
1330,
1635,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198
] | 2.454545 | 22 |
# Lint as: python3
# Copyright 2019, The TensorFlow Federated Authors.
#
# 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 ... | [
2,
406,
600,
355,
25,
21015,
18,
198,
2,
15069,
13130,
11,
383,
309,
22854,
37535,
35089,
515,
46665,
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,
... | 3.419014 | 284 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import peewee
from flask import current_app,abort
from flask.ext.login import AnonymousUserMixin, UserMixin
from itsdangerous import TimedJSONWebSignatureSerializer as Serializer
from peewee import Model, IntegerField, CharField,PrimaryKeyField
from website.app import db_wr... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
613,
413,
1453,
198,
6738,
42903,
1330,
1459,
62,
1324,
11,
397,
419,
198,
6738,
42903,
13,
2302,
13,
38235,
1... | 3.375796 | 157 |
# application
import application | [
2,
3586,
198,
11748,
3586
] | 6.4 | 5 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# (c) 2012 Michal Kalewski <mkalewski at cs.put.poznan.pl>
#
# This file is a part of the Simple Network Simulator (sim2net) project.
# USE, MODIFICATION, COPYING AND DISTRIBUTION OF THIS SOFTWARE IS SUBJECT TO
# THE TERMS AND CONDITIONS OF THE MIT LICENSE. YOU SHOULD H... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
628,
198,
2,
357,
66,
8,
2321,
2843,
282,
12612,
46151,
220,
1279,
28015,
282,
46151,
379,
50115,
13,
1996,
13,
7501,
89,
... | 3.136531 | 271 |
from nexula.nexula_utility.utility_import_var import import_class
| [
6738,
497,
87,
4712,
13,
12413,
4712,
62,
315,
879,
13,
315,
879,
62,
11748,
62,
7785,
1330,
1330,
62,
4871,
628
] | 3.045455 | 22 |
import os
from configparser import ConfigParser
cfg = ConfigParser()
#PATH_CUR = os.getcwd() + '/pynori'
PATH_CUR = os.path.dirname(__file__)
cfg.read(PATH_CUR+'/config.ini')
# PREPROCESSING
ENG_LOWER = cfg.getboolean('PREPROCESSING', 'ENG_LOWER')
| [
11748,
28686,
198,
6738,
4566,
48610,
1330,
17056,
46677,
198,
198,
37581,
796,
17056,
46677,
3419,
198,
2,
34219,
62,
34,
4261,
796,
28686,
13,
1136,
66,
16993,
3419,
1343,
31051,
79,
2047,
10145,
6,
198,
34219,
62,
34,
4261,
796,
28... | 2.432692 | 104 |
#
# THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS
# FOR A PARTICULAR PURPOSE. THIS CODE AND INFORMATION ARE NOT SUPPORTED BY XEBIALABS.
#
import com.xhaus.jyson.JysonCodec... | [
2,
198,
2,
12680,
42714,
5357,
38044,
15986,
36592,
2389,
1961,
366,
1921,
3180,
1,
42881,
34764,
56,
3963,
15529,
509,
12115,
11,
412,
10554,
1137,
7788,
32761,
1961,
6375,
198,
2,
8959,
49094,
11,
47783,
2751,
21728,
5626,
40880,
5390... | 2.805217 | 575 |
# Generated by Django 2.2.10 on 2020-03-31 15:33
from django.db import migrations
| [
2,
2980,
515,
416,
37770,
362,
13,
17,
13,
940,
319,
12131,
12,
3070,
12,
3132,
1315,
25,
2091,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
628
] | 2.8 | 30 |
"""
The Depth First Search (DFS)
The goal of a dfs is to search as deeply as possible, connecting as many nodes in the graph as possible and
branching where necessary. Think of the BFS that builds a search tree one level at a time, whereas the DFS
creates a search tree by exploring one branch of the tree a... | [
37811,
198,
464,
36350,
3274,
11140,
357,
8068,
50,
8,
628,
220,
220,
220,
383,
3061,
286,
257,
288,
9501,
318,
284,
2989,
355,
7744,
355,
1744,
11,
14320,
355,
867,
13760,
287,
262,
4823,
355,
1744,
290,
198,
220,
220,
220,
49526,
... | 3.551724 | 232 |
def sysrc(value):
"""Call sysrc.
CLI Example:
.. code-block:: bash
salt '*' freebsd_common.sysrc sshd_enable=YES
salt '*' freebsd_common.sysrc static_routes
"""
return __salt__['cmd.run_all']("sysrc %s" % value)
| [
4299,
827,
10677,
7,
8367,
2599,
198,
220,
220,
220,
37227,
14134,
827,
10677,
13,
198,
220,
220,
220,
43749,
17934,
25,
628,
220,
220,
220,
11485,
2438,
12,
9967,
3712,
27334,
628,
220,
220,
220,
220,
220,
220,
220,
8268,
705,
9,
... | 2.212389 | 113 |
from .rest import RestClient
| [
6738,
764,
2118,
1330,
8324,
11792,
628
] | 4.285714 | 7 |
# coding=utf-8
#
# The MIT License (MIT)
#
# Copyright (c) 2016-2018 yutiansut/QUANTAXIS
#
# 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 th... | [
2,
19617,
28,
40477,
12,
23,
198,
2,
198,
2,
383,
17168,
13789,
357,
36393,
8,
198,
2,
198,
2,
15069,
357,
66,
8,
1584,
12,
7908,
331,
315,
1547,
315,
14,
10917,
1565,
5603,
55,
1797,
198,
2,
198,
2,
2448,
3411,
318,
29376,
75... | 2.886914 | 619 |
"""
field.py
Class instance used for modifying field via Display window.
"""
# Load the needed packages
from functools import partial
from ..core import Variable, Component, QtGui, QtCore
| [
37811,
198,
3245,
13,
9078,
198,
198,
9487,
4554,
973,
329,
30620,
2214,
2884,
16531,
4324,
13,
198,
37811,
198,
198,
2,
8778,
262,
2622,
10392,
198,
6738,
1257,
310,
10141,
1330,
13027,
198,
198,
6738,
11485,
7295,
1330,
35748,
11,
3... | 3.84 | 50 |
from bson.errors import InvalidId
from django.core.exceptions import ValidationError
from django.utils.encoding import smart_str
from mongoengine import dereference
from mongoengine.base.document import BaseDocument
from mongoengine.document import Document
from rest_framework import serializers
from mongoengine.fields... | [
6738,
275,
1559,
13,
48277,
1330,
17665,
7390,
198,
6738,
42625,
14208,
13,
7295,
13,
1069,
11755,
1330,
3254,
24765,
12331,
198,
6738,
42625,
14208,
13,
26791,
13,
12685,
7656,
1330,
4451,
62,
2536,
198,
6738,
285,
25162,
18392,
1330,
... | 3.754902 | 102 |
import pytest
from fuzz_lightyear.datastore import _ALL_POST_FUZZ_HOOKS_BY_OPERATION
from fuzz_lightyear.datastore import _ALL_POST_FUZZ_HOOKS_BY_TAG
from fuzz_lightyear.datastore import _RERUN_POST_FUZZ_HOOKS_BY_OPERATION
from fuzz_lightyear.datastore import _RERUN_POST_FUZZ_HOOKS_BY_TAG
from fuzz_lightyear.datastore... | [
11748,
12972,
9288,
198,
198,
6738,
26080,
62,
2971,
1941,
13,
19608,
459,
382,
1330,
4808,
7036,
62,
32782,
62,
38989,
30148,
62,
39,
15308,
50,
62,
17513,
62,
31054,
6234,
198,
6738,
26080,
62,
2971,
1941,
13,
19608,
459,
382,
1330,... | 2.995851 | 241 |
"""Module for a Data Vault field."""
from typing import Optional
from . import (
FIELD_PREFIX,
FIELD_SUFFIX,
METADATA_FIELDS,
TABLE_PREFIXES,
UNKNOWN,
FieldDataType,
FieldRole,
TableType,
)
| [
37811,
26796,
329,
257,
6060,
23450,
2214,
526,
15931,
198,
6738,
19720,
1330,
32233,
198,
198,
6738,
764,
1330,
357,
198,
220,
220,
220,
18930,
24639,
62,
47,
31688,
10426,
11,
198,
220,
220,
220,
18930,
24639,
62,
12564,
5777,
10426,
... | 2.309278 | 97 |
"""DEEPSCORESV2
Provides access to the DEEPSCORESV2 database with a COCO-like interface. The
only changes made compared to the coco.py file are the class labels.
Author:
Lukas Tuggener <tugg@zhaw.ch>
Yvan Satyawan <y_satyawan@hotmail.com>
Created on:
November 23, 2019
"""
from .coco import *
import os
im... | [
37811,
35,
6500,
3705,
44879,
1546,
53,
17,
198,
198,
15946,
1460,
1895,
284,
262,
5550,
36,
3705,
44879,
1546,
53,
17,
6831,
351,
257,
327,
4503,
46,
12,
2339,
7071,
13,
383,
198,
8807,
2458,
925,
3688,
284,
262,
8954,
78,
13,
90... | 2.686567 | 134 |
#!/usr/bin/env python
import unittest
from xml.dom.minidom import parseString
import xml.etree.ElementTree as ET
from decimal import Decimal
from gomatic import GoCdConfigurator, FetchArtifactDir, RakeTask, ExecTask, ScriptExecutorTask, FetchArtifactTask, \
FetchArtifactFile, Tab, GitMaterial, PipelineMaterial,... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
555,
715,
395,
198,
6738,
35555,
13,
3438,
13,
1084,
312,
296,
1330,
21136,
10100,
198,
11748,
35555,
13,
316,
631,
13,
20180,
27660,
355,
12152,
198,
198,
6738,
32465,
133... | 2.896321 | 299 |
import logging
from qrutilities.imageutils import ImageUtils
from PyQt4.QtGui import QColor
logger = logging.getLogger('console') | [
11748,
18931,
198,
6738,
10662,
81,
315,
2410,
13,
9060,
26791,
1330,
7412,
18274,
4487,
198,
6738,
9485,
48,
83,
19,
13,
48,
83,
8205,
72,
1330,
1195,
10258,
198,
6404,
1362,
796,
18931,
13,
1136,
11187,
1362,
10786,
41947,
11537
] | 3.146341 | 41 |
from django.conf.urls import url
from . import views
app_name = "messages"
urlpatterns = [
url(r'^$', views.InboxListView.as_view(), name='inbox'),
url(r'^sent/$', views.SentMessagesListView.as_view(), name='sent'),
url(r'^compose/$', views.MessagesCreateView.as_view(), name='compo... | [
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
19016,
201,
198,
201,
198,
6738,
764,
1330,
5009,
201,
198,
201,
198,
1324,
62,
3672,
796,
366,
37348,
1095,
1,
201,
198,
201,
198,
6371,
33279,
82,
796,
685,
201,
198,
201,
198,
... | 2.162455 | 277 |
import datetime
import json
import dateutil.parser
from django.contrib.auth import get_user_model
from django.test import Client, TestCase
from django.utils import timezone
from apps.devicelocation.models import DeviceLocation
from apps.physicaldevice.models import Device
from apps.property.models import GenericProp... | [
11748,
4818,
8079,
198,
11748,
33918,
198,
198,
11748,
3128,
22602,
13,
48610,
198,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
1330,
651,
62,
7220,
62,
19849,
198,
6738,
42625,
14208,
13,
9288,
1330,
20985,
11,
6208,
20448,
198,... | 3.719844 | 257 |
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | [
2,
220,
220,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
345,
743,
198,
2,
220,
220,
220,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
921,
743,
7330,
198,
2,
220,
220,
... | 1.983881 | 6,142 |
# !/usr/bin python
"""
#
# set-env - a small python program to setup the configuration environment for data-push.py
# data-push.py contains the python program to push attribute values to vROps
# Author Sajal Debnath <sdebnath@vmware.com>
#
"""
# Importing the required modules
import json
import base64
i... | [
2,
5145,
14,
14629,
14,
8800,
21015,
201,
198,
201,
198,
37811,
201,
198,
2,
201,
198,
2,
900,
12,
24330,
532,
257,
1402,
21015,
1430,
284,
9058,
262,
8398,
2858,
329,
1366,
12,
14689,
13,
9078,
201,
198,
2,
1366,
12,
14689,
13,
... | 2.903571 | 280 |
import unittest
# Definition for a binary tree node.
if __name__ == "__main__":
unittest.main()
| [
11748,
555,
715,
395,
198,
2,
30396,
329,
257,
13934,
5509,
10139,
13,
628,
220,
220,
220,
220,
220,
220,
220,
220,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
555,
715,
395,
13,
12417,
3... | 2.346939 | 49 |
TOKEN = "1876415562:AAEsX_c9k3Fot2IT0BYRqkCCQ5vFEHQDLDQ"
CHAT_ID = [957539786] # e.g. [1234567, 2233445, 3466123...]
| [
10468,
43959,
796,
366,
23451,
2414,
1314,
43918,
25,
3838,
23041,
55,
62,
66,
24,
74,
18,
37,
313,
17,
2043,
15,
17513,
49,
80,
74,
4093,
48,
20,
85,
15112,
41275,
35,
11163,
48,
1,
198,
198,
31542,
62,
2389,
796,
685,
3865,
24... | 1.761194 | 67 |
"""entry point"""
from . import main
start = main.app.launch
| [
37811,
13000,
966,
37811,
198,
198,
6738,
764,
1330,
1388,
198,
198,
9688,
796,
1388,
13,
1324,
13,
35681,
198
] | 3.15 | 20 |
from tests import run_main_and_assert
FAST_LOCAL_TEST_ARGS = "--exp-name local_test --datasets mnist" \
" --network LeNet --num-tasks 5 --seed 1 --batch-size 32" \
" --nepochs 2 --num-workers 0 --stop-at-task 3"
| [
6738,
5254,
1330,
1057,
62,
12417,
62,
392,
62,
30493,
198,
198,
37,
11262,
62,
29701,
1847,
62,
51,
6465,
62,
1503,
14313,
796,
366,
438,
11201,
12,
3672,
1957,
62,
9288,
1377,
19608,
292,
1039,
285,
77,
396,
1,
3467,
198,
220,
2... | 2.015504 | 129 |
# Autor: Anuj Sharma (@optider)
# Github Profile: https://github.com/Optider/
# Problem Link: https://leetcode.com/problems/contains-duplicate/
| [
2,
5231,
273,
25,
1052,
23577,
40196,
4275,
8738,
1304,
8,
198,
2,
38994,
13118,
25,
3740,
1378,
12567,
13,
785,
14,
27871,
1304,
14,
198,
2,
20647,
7502,
25,
3740,
1378,
293,
316,
8189,
13,
785,
14,
1676,
22143,
14,
3642,
1299,
1... | 2.959184 | 49 |
#!/usr/bin/env python
#
# Copyright 2013 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 json
import logging
import optparse
import os
import sys
import tempfile
import zipfile
from util import build_utils
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
198,
2,
15069,
2211,
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,
... | 3.218487 | 119 |
from django.shortcuts import render
from django.http import HttpResponse
from django.contrib.auth.hashers import check_password, make_password
from django.views import View
from utils.response_code import RET, error_map
from rest_framework.views import APIView
from rest_framework.response import Response
from apps.ser... | [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
198,
6738,
42625,
14208,
13,
4023,
1330,
367,
29281,
31077,
198,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
10134,
7084,
1330,
2198,
62,
28712,
11,
787,
62,
28712,
198,
6738,... | 2.400881 | 681 |
import numpy as np;
from .covariance_target import CovarianceTarget;
| [
11748,
299,
32152,
355,
45941,
26,
198,
198,
6738,
764,
66,
709,
2743,
590,
62,
16793,
1330,
39751,
2743,
590,
21745,
26,
198
] | 3.043478 | 23 |
{
'target_defaults': {
'win_delay_load_hook': 'false',
'conditions': [
['OS=="win"', {
'msvs_disabled_warnings': [
4530, # C++ exception handler used, but unwind semantics are not enabled
4506, # no definition for inline function
],
}],
],
},
'targets'... | [
90,
198,
220,
705,
16793,
62,
12286,
82,
10354,
1391,
198,
220,
220,
220,
705,
5404,
62,
40850,
62,
2220,
62,
25480,
10354,
705,
9562,
3256,
198,
220,
220,
220,
705,
17561,
1756,
10354,
685,
198,
220,
220,
220,
220,
220,
37250,
2640... | 1.757683 | 846 |
"""Django settings for botwtracker project.
Copyright (c) 2017, Evan Moritz.
botw-tracker is an open source software project released under the MIT License.
See the accompanying LICENSE file for terms.
"""
import os
from .config_local import *
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
... | [
37811,
35,
73,
14208,
6460,
329,
10214,
86,
2213,
10735,
1628,
13,
198,
198,
15269,
357,
66,
8,
2177,
11,
21523,
3461,
4224,
13,
198,
198,
13645,
86,
12,
2213,
10735,
318,
281,
1280,
2723,
3788,
1628,
2716,
739,
262,
17168,
13789,
1... | 2.339214 | 1,247 |
from flask import Blueprint, request, jsonify
from app.domains.users.actions import get_all_users, insert_user, get_user_by_id, update_user, delete_user
app_users = Blueprint('app.users', __name__)
| [
6738,
42903,
1330,
39932,
11,
2581,
11,
33918,
1958,
198,
6738,
598,
13,
3438,
1299,
13,
18417,
13,
4658,
1330,
651,
62,
439,
62,
18417,
11,
7550,
62,
7220,
11,
651,
62,
7220,
62,
1525,
62,
312,
11,
4296,
62,
7220,
11,
12233,
62,
... | 3.203125 | 64 |
import legacy_code.tf_cnn_siamese.configurations as conf
import tensorflow as tf
import numpy as np
def construct_cnn(x, conv_weights, conv_biases, fc_weights, fc_biases,
dropout = False):
"""
constructs the convolution graph for one image
:param x: input node
:param conv_weights: convolutio... | [
11748,
10655,
62,
8189,
13,
27110,
62,
66,
20471,
62,
13396,
1047,
68,
13,
11250,
20074,
355,
1013,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
11748,
299,
32152,
355,
45941,
628,
198,
4299,
5678,
62,
66,
20471,
7,
87,
11,
3063,
... | 2.365379 | 3,599 |
import sys
import logging
import unittest
from testfixtures import LogCapture
from twisted.python.failure import Failure
from scrapy.utils.log import (failure_to_exc_info, TopLevelFormatter,
LogCounterHandler, StreamLogger)
from scrapy.utils.test import get_crawler
from scrapy.extensions... | [
11748,
25064,
198,
11748,
18931,
198,
11748,
555,
715,
395,
198,
198,
6738,
1332,
69,
25506,
1330,
5972,
49630,
198,
6738,
19074,
13,
29412,
13,
32165,
495,
1330,
25743,
198,
198,
6738,
15881,
88,
13,
26791,
13,
6404,
1330,
357,
32165,
... | 2.872881 | 118 |
import heapq
from typing import List
from definitions import RoomPosition, Position
import random
import sys
| [
11748,
24575,
80,
198,
6738,
19720,
1330,
7343,
198,
6738,
17336,
1330,
10096,
26545,
11,
23158,
198,
11748,
4738,
198,
11748,
25064,
628,
628
] | 4.666667 | 24 |
from pypeflow.common import *
from pypeflow.data import PypeLocalFile, makePypeLocalFile, fn
from pypeflow.task import PypeTask, PypeThreadTaskBase, PypeTaskBase
from pypeflow.controller import PypeWorkflow, PypeThreadWorkflow
from falcon_kit.FastaReader import FastaReader
import subprocess, shlex
import os, re
cigar... | [
6738,
279,
2981,
11125,
13,
11321,
1330,
1635,
220,
198,
6738,
279,
2981,
11125,
13,
7890,
1330,
350,
2981,
14565,
8979,
11,
787,
47,
2981,
14565,
8979,
11,
24714,
198,
6738,
279,
2981,
11125,
13,
35943,
1330,
350,
2981,
25714,
11,
35... | 2.078177 | 2,085 |
from keras.datasets import mnist
from keras.layers.merge import _Merge
from keras.layers import Input, Dense, Reshape, Flatten, Dropout
from keras.layers import BatchNormalization, Activation, ZeroPadding2D
from keras.layers.advanced_activations import LeakyReLU
from keras.layers.convolutional import UpSampling2D, Conv... | [
6738,
41927,
292,
13,
19608,
292,
1039,
1330,
285,
77,
396,
198,
6738,
41927,
292,
13,
75,
6962,
13,
647,
469,
1330,
4808,
13102,
469,
198,
6738,
41927,
292,
13,
75,
6962,
1330,
23412,
11,
360,
1072,
11,
1874,
71,
1758,
11,
1610,
... | 3.245 | 200 |
from Core.IFactory import IFactory
from Regs.Block_C import RC480
| [
6738,
7231,
13,
5064,
9548,
1330,
16876,
9548,
198,
6738,
3310,
82,
13,
12235,
62,
34,
1330,
13987,
22148,
628
] | 3.35 | 20 |
###############################################################################
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
###############################################################################
imp... | [
29113,
29113,
7804,
4242,
21017,
198,
2,
15069,
357,
66,
8,
5413,
10501,
13,
1439,
2489,
10395,
13,
198,
2,
49962,
739,
262,
17168,
13789,
13,
4091,
13789,
13,
14116,
287,
262,
1628,
6808,
329,
198,
2,
5964,
1321,
13,
198,
29113,
29... | 3.439286 | 280 |
'''Test package.'''
import xroms
from glob import glob
import os
def test_open_netcdf():
'''Test xroms.open_netcdf().'''
base = os.path.join(xroms.__path__[0],'..','tests','input')
files = glob('%s/ocean_his_000?.nc' % base)
ds = xroms.open_netcdf(files)
assert ds
def test_open_zar... | [
7061,
6,
14402,
5301,
2637,
7061,
198,
198,
11748,
2124,
398,
82,
198,
6738,
15095,
1330,
15095,
198,
11748,
28686,
628,
198,
4299,
1332,
62,
9654,
62,
3262,
66,
7568,
33529,
198,
220,
220,
220,
705,
7061,
14402,
2124,
398,
82,
13,
... | 2.036765 | 272 |
from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.home, name='home'),
url(r'^piechart/', views.demo_piechart, name='demo_piechart'),
url(r'^linechart/', views.demo_linechart, name='demo_linechart'),
url(r'^linechart_without_date/', views.demo_linechart_without_date,... | [
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
19016,
198,
6738,
764,
1330,
5009,
628,
198,
6371,
33279,
82,
796,
685,
198,
220,
220,
220,
19016,
7,
81,
6,
61,
3,
3256,
5009,
13,
11195,
11,
1438,
11639,
11195,
33809,
198,
220,
... | 2.470483 | 559 |
import time
import mido
from pinaps.piNapsController import PiNapsController
from NeuroParser import NeuroParser
"""
Equation of motion used to modify virbato.
"""
CTRL_LFO_PITCH = 26
CTRL_LFO_RATE = 29
MIDI_MESSAGE_PERIOD = 1
vibratoPos = 0
vibratoVel = 0
vibratoAcc = 4
if __name__ == '__main... | [
11748,
640,
201,
198,
11748,
3095,
78,
201,
198,
201,
198,
6738,
6757,
1686,
13,
14415,
45,
1686,
22130,
1330,
13993,
45,
1686,
22130,
201,
198,
6738,
13782,
46677,
1330,
13782,
46677,
201,
198,
201,
198,
37811,
201,
198,
197,
23588,
... | 2.317241 | 145 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Jul 31 11:47:47 2019
@author: yanyanyu
"""
"""
Tab1-plot1: candlestick
"""
import json
import datetime
import pandas as pd
from math import pi
from random import choice
from pytz import timezone
from bokeh.plotting import figure,show
from bokeh.p... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
3300,
5979,
3261,
1367,
25,
2857,
25,
2857,
13130,
198,
198,
31,
9800,
25,
331,
1092,
109... | 2.966184 | 207 |
# -*- coding:utf-8 -*-
import tensorflow as tf
| [
2,
532,
9,
12,
19617,
25,
40477,
12,
23,
532,
9,
12,
198,
11748,
11192,
273,
11125,
355,
48700,
628,
628,
628
] | 2.363636 | 22 |
import cv2
import mediapipe as mp
from time import sleep
import numpy as np
import autopy
import pynput
wCam, hCam = 1280, 720
wScr, hScr = autopy.screen.size()
cap = cv2.VideoCapture(0)
cap.set(3, wCam)
cap.set(4, hCam)
mp_drawing = mp.solutions.drawing_utils
mp_hands = mp.solutions.hands
mouse = pynput.mouse.Cont... | [
11748,
269,
85,
17,
198,
11748,
16957,
499,
3757,
355,
29034,
198,
6738,
640,
1330,
3993,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
1960,
11081,
198,
11748,
279,
2047,
1996,
198,
198,
86,
21701,
11,
289,
21701,
796,
37674,
11,
2... | 2.021645 | 1,155 |
import glob
import logging
import os
import shutil
import sys
"""script to divide a folder with generated/training data into a train and val folder
- val folder contains 500 Samples if not changed in source code
- DOES NOT work if images structured in subfolders, see below
- if there is no dir in the given... | [
11748,
15095,
198,
11748,
18931,
198,
11748,
28686,
198,
11748,
4423,
346,
198,
11748,
25064,
198,
198,
37811,
12048,
284,
14083,
257,
9483,
351,
7560,
14,
34409,
1366,
656,
257,
4512,
290,
1188,
9483,
198,
220,
220,
220,
532,
1188,
948... | 3.564935 | 154 |
import threading
from queue import Queue
from multiprocessing.pool import ApplyResult
import tabular_logger as tlogger
def close(self):
self.available_workers.put(None)
self.input_queue.put(None)
self.done_buffer.put(None)
class AsyncTaskHub(object):
| [
198,
11748,
4704,
278,
198,
6738,
16834,
1330,
4670,
518,
198,
6738,
18540,
305,
919,
278,
13,
7742,
1330,
27967,
23004,
198,
198,
11748,
7400,
934,
62,
6404,
1362,
355,
256,
6404,
1362,
628,
198,
220,
220,
220,
825,
1969,
7,
944,
2... | 2.638889 | 108 |
import os
registry = {}
| [
198,
11748,
28686,
198,
198,
2301,
4592,
796,
23884,
198,
220,
220,
628,
628,
220,
220,
220,
220,
198
] | 1.947368 | 19 |
"""Django Admin Panels for App"""
from django.contrib import admin
from mailer import models
| [
37811,
35,
73,
14208,
32053,
5961,
1424,
329,
2034,
37811,
198,
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
198,
6738,
6920,
263,
1330,
4981,
198
] | 3.481481 | 27 |
DEBUG = True
USE_TZ = True
SECRET_KEY = "dummy"
DATABASES = {"default": {"ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:"}}
INSTALLED_APPS = [
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sites",
"rest_framework",
"django_filters",
"belt",
"tests.app",
]... | [
30531,
796,
6407,
198,
19108,
62,
51,
57,
796,
6407,
198,
198,
23683,
26087,
62,
20373,
796,
366,
67,
13513,
1,
198,
198,
35,
1404,
6242,
1921,
1546,
796,
19779,
12286,
1298,
19779,
26808,
8881,
1298,
366,
28241,
14208,
13,
9945,
13,
... | 2.157895 | 228 |
import sys
import json
import transformation
if __name__ == "__main__":
fin_u1 = int(sys.argv[1])
x_cells = int(sys.argv[2])
y_cells = int(sys.argv[3])
assert (x_cells%2) == 0
gate_u = 2
if fin_u1%2 != 0:
fin_u = fin_u1 + 1
else... | [
11748,
25064,
198,
11748,
33918,
198,
11748,
13389,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
220... | 1.853846 | 390 |
from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import By
import os
import time
import csv
from webdriver_manager.chrome import ChromeDriverManager
import math
from basic_function import ... | [
6738,
384,
11925,
1505,
1330,
3992,
26230,
198,
6738,
384,
11925,
1505,
13,
11321,
13,
1069,
11755,
1330,
1400,
16678,
20180,
16922,
198,
6738,
384,
11925,
1505,
13,
12384,
26230,
13,
46659,
13,
25811,
1330,
18634,
198,
6738,
384,
11925,
... | 3.898876 | 89 |
from pydantic import BaseSettings
settings = Settings()
| [
6738,
279,
5173,
5109,
1330,
7308,
26232,
628,
198,
198,
33692,
796,
16163,
3419,
198
] | 3.933333 | 15 |
#!/usr/bin/env python
''' This module provides configuration options for OS project. No more magic numbers! '''
BLOCK_SIZE = 16 # words
WORD_SIZE = 4 # bytes
# length od RS in blocks
RESTRICTED_LENGTH = 1
# length of DS in blocks
DS_LENGTH = 6
# timer value
TIMER_VALUE = 10
# buffer size
BUFFER_SIZE = 16
# num... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
7061,
6,
770,
8265,
3769,
8398,
3689,
329,
7294,
1628,
13,
1400,
517,
5536,
3146,
0,
705,
7061,
198,
198,
9148,
11290,
62,
33489,
796,
1467,
220,
220,
1303,
2456,
198,
54,
12532... | 2.641935 | 310 |
#!/usr/bin/env python
import numpy as np
from roboticstoolbox.robot.ERobot import ERobot
from math import pi
if __name__ == "__main__": # pragma nocover
robot = Puma560()
print(robot)
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
25810,
301,
970,
3524,
13,
305,
13645,
13,
1137,
672,
313,
1330,
13793,
672,
313,
198,
6738,
10688,
1330,
31028,
628,
198,
198,
361,
1159... | 2.571429 | 77 |
#!/usr/bin/env python
# Copyright (c) 2016 Orange and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
"""Define t... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
2,
15069,
357,
66,
8,
1584,
11942,
290,
1854,
13,
198,
2,
198,
2,
1439,
2489,
10395,
13,
770,
1430,
290,
262,
19249,
5696,
198,
2,
389,
925,
1695,
739,
262,
2846,
286,
262,
... | 2.742188 | 384 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
ntptrace - trace peers of an NTP server
Usage: ntptrace [-n | --numeric] [-m number | --max-hosts=number]
[-r hostname | --host=hostname] [--help | --more-help]
hostname
See the manual page for details.
"""
# SPDX-License-Identifier: BS... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
429,
457,
16740,
532,
12854,
14495,
286,
281,
399,
7250,
4382,
198,
198,
28350,
25,
299,
83,
457,
16740,
... | 2.23035 | 1,285 |
import struct
import msgpack
from lbrynet.wallet.transaction import Transaction, Output
from torba.server.hash import hash_to_hex_str
from torba.server.block_processor import BlockProcessor
from lbrynet.schema.claim import Claim
from lbrynet.wallet.server.model import ClaimInfo
| [
11748,
2878,
198,
198,
11748,
31456,
8002,
198,
198,
6738,
18360,
563,
3262,
13,
44623,
13,
7645,
2673,
1330,
45389,
11,
25235,
198,
6738,
7332,
7012,
13,
15388,
13,
17831,
1330,
12234,
62,
1462,
62,
33095,
62,
2536,
198,
198,
6738,
7... | 3.506173 | 81 |
from ProjectEulerCommons.Base import *
numbers_list = """37107287533902102798797998220837590246510135740250
46376937677490009712648124896970078050417018260538
74324986199524741059474233309513058123726617309629
91942213363574161572522430563301811072406154908250
23067588207539346171171980310421047513778063246676
8926167... | [
6738,
4935,
36,
18173,
6935,
684,
13,
14881,
1330,
1635,
198,
198,
77,
17024,
62,
4868,
796,
37227,
2718,
15982,
2078,
2425,
29626,
2999,
40403,
4089,
44673,
2079,
6469,
1238,
5999,
2425,
3829,
1731,
2996,
8784,
27277,
1821,
9031,
198,
... | 2.293771 | 2,376 |
"""Endpoint for the manipulation of datasets
"""
import hashlib
from flask import Response
from flask_restx import Namespace, Resource, abort
from app.common import client
from app.common import datasets as datasets_fcts
from app.common import path
api = Namespace("datasets", description="Datasets related endpoints... | [
37811,
12915,
4122,
329,
262,
17512,
286,
40522,
198,
37811,
198,
198,
11748,
12234,
8019,
198,
198,
6738,
42903,
1330,
18261,
198,
6738,
42903,
62,
2118,
87,
1330,
28531,
10223,
11,
20857,
11,
15614,
198,
198,
6738,
598,
13,
11321,
133... | 2.510769 | 325 |
from .knn import KNNClassifier
__all__ = ['KNNClassifier'] | [
6738,
764,
15418,
77,
1330,
509,
6144,
9487,
7483,
198,
198,
834,
439,
834,
796,
37250,
42,
6144,
9487,
7483,
20520
] | 2.809524 | 21 |
import unicodedata
from django.forms import fields
| [
11748,
28000,
9043,
1045,
198,
198,
6738,
42625,
14208,
13,
23914,
1330,
7032,
628
] | 3.785714 | 14 |
import sys
import time
import uasyncio as asyncio
from ahttpserver import sendfile, Server
app = Server()
# @app.route("GET", "/") # if uncommented raises route already declared exception
# async def also_root(reader, writer, request):
# return
async def hello():
""" For demo purpo... | [
11748,
25064,
201,
198,
11748,
640,
201,
198,
11748,
334,
292,
13361,
952,
355,
30351,
952,
201,
198,
201,
198,
6738,
257,
5450,
18497,
1330,
3758,
7753,
11,
9652,
201,
198,
201,
198,
1324,
796,
9652,
3419,
201,
198,
201,
198,
201,
... | 2.355224 | 335 |
import torch
import torch.nn as nn
import torch.nn.functional as F
# Defines the submodule with skip connection.
# X -------------------identity---------------------- X
# |-- downsampling -- |submodule| -- upsampling --|
| [
11748,
28034,
201,
198,
11748,
28034,
13,
20471,
355,
299,
77,
201,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
201,
198,
201,
198,
201,
198,
201,
198,
2,
2896,
1127,
262,
850,
21412,
351,
14267,
4637,
13,
201,
198,
2,
1395,
... | 3.263889 | 72 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Path hack
import os
import sys
sys.path.insert(0, os.path.abspath('..'))
try:
import unittest2 as unittest
except ImportError:
import unittest
from kgtool.core import * # noqa
if __name__ == '__main__':
unittest.main()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
10644,
8156,
198,
11748,
28686,
198,
11748,
25064,
198,
17597,
13,
6978,
13,
28463,
7,
15,
11,
28686,
13,
6978,
13... | 2.368852 | 122 |
from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
import scriptcontext as sc
import compas_rhino
from compas_ags.rhino import SettingsForm
from compas_ags.rhino import FormObject
from compas_ags.rhino import ForceObject
__commandname__ = "AGS_toolbar_displa... | [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
6738,
11593,
37443,
834,
1330,
7297,
198,
198,
11748,
4226,
22866,
355,
629,
198,
198,
11748,
552,
292,
62,
17179,
2879,
198,
6738,... | 4.283465 | 127 |
from typing import (
Any,
cast,
List,
Optional,
Type
)
import lpp.ast as ast
from lpp.builtins import BUILTINS
from lpp.object import(
Boolean,
Builtin,
Environment,
Error,
Function,
Integer,
Null,
Object,
ObjectType,
String,
Return
)
TRUE = Boolean(True... | [
6738,
19720,
1330,
357,
198,
220,
220,
220,
4377,
11,
198,
220,
220,
220,
3350,
11,
198,
220,
220,
220,
7343,
11,
198,
220,
220,
220,
32233,
11,
198,
220,
220,
220,
5994,
198,
8,
198,
198,
11748,
300,
381,
13,
459,
355,
6468,
19... | 2.345865 | 266 |
# Copyright 2019 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "LICENSE.txt" file accom... | [
2,
15069,
13130,
6186,
13,
785,
11,
3457,
13,
393,
663,
29116,
13,
1439,
6923,
33876,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
11074,
921,
743,
407,
779,
428,
2393,
2845,
28... | 2.330352 | 4,807 |
from flask import Flask
from flask import request
from flask import Response
from resources import resourcePing, resourceResolution
from message_protocol.resolution_input import parseResolutionInput
import json
app = Flask(__name__)
| [
6738,
42903,
1330,
46947,
198,
6738,
42903,
1330,
2581,
198,
6738,
42903,
1330,
18261,
198,
6738,
4133,
1330,
8271,
49806,
11,
8271,
4965,
2122,
198,
6738,
3275,
62,
11235,
4668,
13,
29268,
62,
15414,
1330,
21136,
4965,
2122,
20560,
198,
... | 4.415094 | 53 |