content stringlengths 1 1.05M | input_ids listlengths 1 883k | ratio_char_token float64 1 22.9 | token_count int64 1 883k |
|---|---|---|---|
'''
Classes implementing various kinematic chains. This module is perhaps mis-located
as it does not have a direct BMI role but rather contains code which is useful in
supporting BMI control of kinematic chains.
This code depends on the 'robot' module (https://github.com/sgowda/robotics_toolbox)
'''
import numpy as np... | [
7061,
6,
198,
9487,
274,
15427,
2972,
479,
7749,
1512,
14659,
13,
770,
8265,
318,
3737,
2984,
12,
75,
10533,
198,
292,
340,
857,
407,
423,
257,
1277,
22456,
2597,
475,
2138,
4909,
2438,
543,
318,
4465,
287,
198,
11284,
278,
22456,
1... | 2.698925 | 465 |
import pygame
from pygame.math import Vector2
import json, math | [
11748,
12972,
6057,
198,
6738,
12972,
6057,
13,
11018,
1330,
20650,
17,
198,
198,
11748,
33918,
11,
10688
] | 3.555556 | 18 |
"""
Miscellaneous utility functions.
"""
import random
import time
from contextlib import contextmanager
import math
import numpy as np
import torch
from PIL.ImageDraw import Draw
# Joints to connect for visualisation, giving the effect of drawing a
# basic "skeleton" of the pose.
BONES = {
'right_lower_leg': (0... | [
37811,
198,
31281,
25673,
10361,
5499,
13,
198,
37811,
198,
198,
11748,
4738,
198,
11748,
640,
198,
6738,
4732,
8019,
1330,
4732,
37153,
198,
198,
11748,
10688,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28034,
198,
6738,
350,
4146,
... | 2.272591 | 2,678 |
import os
import time
from datetime import datetime
from multiprocessing import Process, Pool
if __name__ == '__main__':
print('id', os.getpid())
# 1.
# start = datetime.now()
# for i in range(10):
# run_proc(i)
# print(':', datetime.now() - start)
# 2.
# 2.1
# start = d... | [
11748,
28686,
198,
11748,
640,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
18540,
305,
919,
278,
1330,
10854,
11,
19850,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
628,
220,
220,
220,
3601,
10786,
... | 2.152805 | 517 |
import pytest
from ..change_case import change_case
| [
11748,
12972,
9288,
201,
198,
6738,
11485,
3803,
62,
7442,
1330,
1487,
62,
7442,
201,
198,
201,
198
] | 3.111111 | 18 |
if __name__ == '__main__':
c1 = Carro(180)
for _ in range(25):
print(f'Acelerando {c1.acelerar(8)}')
for _ in range(10):
print(f' reduzindo a velocidade {c1.frear(delta=20)}') | [
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
269,
16,
796,
1879,
305,
7,
15259,
8,
628,
220,
220,
220,
329,
4808,
287,
2837,
7,
1495,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
... | 1.934579 | 107 |
# coding: utf-8
"""
Consolidate Services
Description of all APIs # noqa: E501
The version of the OpenAPI document: version not set
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from argocd_client.configuration import Configuration
def to_... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
37811,
198,
220,
220,
220,
43419,
378,
6168,
628,
220,
220,
220,
12489,
286,
477,
23113,
220,
1303,
645,
20402,
25,
412,
33548,
628,
220,
220,
220,
383,
2196,
286,
262,
4946,
17614,
3188,
... | 2.684783 | 368 |
"""
This module contains the retry decorator, which can be used as
``Node`` decorators to retry nodes. See ``kedro.pipeline.node.decorate``
"""
import logging
from functools import wraps
from time import sleep
from typing import Callable, Type
def retry(
exceptions: Type[Exception] = Exception, n_times: int = 1,... | [
37811,
198,
1212,
8265,
4909,
262,
1005,
563,
11705,
1352,
11,
543,
460,
307,
973,
355,
198,
15506,
19667,
15506,
11705,
2024,
284,
1005,
563,
13760,
13,
4091,
7559,
9091,
305,
13,
79,
541,
4470,
13,
17440,
13,
12501,
16262,
15506,
19... | 3.12459 | 305 |
"""Test the ability to download files.
Test target:
- :py:meth:`lmp.dset._base.BaseDset.download`.
"""
import os
from typing import Callable
import pytest
import lmp.dset._base
import lmp.util.path
def test_download_as_text_file(file_path: str, file_url: str) -> None:
"""Must be able to download file and outp... | [
37811,
14402,
262,
2694,
284,
4321,
3696,
13,
198,
198,
14402,
2496,
25,
198,
12,
1058,
9078,
25,
76,
2788,
25,
63,
75,
3149,
13,
67,
2617,
13557,
8692,
13,
14881,
35,
2617,
13,
15002,
44646,
198,
37811,
198,
198,
11748,
28686,
198,... | 2.819923 | 261 |
"""account models."""
from django.contrib.auth.hashers import (
check_password, make_password
)
from django.db import models
from extension.modelutils import RandomFixedCharField
| [
37811,
23317,
4981,
526,
15931,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
10134,
7084,
1330,
357,
198,
220,
220,
220,
2198,
62,
28712,
11,
787,
62,
28712,
198,
8,
198,
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
198,
... | 3.490566 | 53 |
# -*- coding: utf-8 -*-
import json
import unittest
from .. import MoviesTest
if __name__ == '__main__':
unittest.main()
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
33918,
198,
11748,
555,
715,
395,
198,
198,
6738,
11485,
1330,
27151,
14402,
628,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
22... | 2.5 | 52 |
from django.urls import path, re_path
from drf_yasg import openapi
from drf_yasg.views import get_schema_view
from rest_framework.routers import SimpleRouter, DefaultRouter
from rest_framework_simplejwt import views as jwt_views
from api.views import *
# ,
router = SimpleRouter()
router.register("basket... | [
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
11,
302,
62,
6978,
198,
6738,
1553,
69,
62,
88,
292,
70,
1330,
1280,
15042,
198,
6738,
1553,
69,
62,
88,
292,
70,
13,
33571,
1330,
651,
62,
15952,
2611,
62,
1177,
198,
6738,
1334,
62,
... | 2.502947 | 509 |
# -*- coding: utf-8 -*-
import os
import argparse
import pathlib
import pickle
import shutil
import time
from functools import partial
import sys
sys.path.append('../')
from pathlib import Path
import fire
import numpy as np
import torch
import torch.nn as nn
import os
print(torch.__version__)
print(os.environ['PYTHONP... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
28686,
198,
11748,
1822,
29572,
198,
11748,
3108,
8019,
198,
11748,
2298,
293,
198,
11748,
4423,
346,
198,
11748,
640,
198,
6738,
1257,
310,
10141,
1330,
13027,
198... | 2.179632 | 3,908 |
#!/usr/bin/env python3
""" HIAS TassAI Facial Recognition Agent.
HIAS TassAI Facial Recognition Agent processes streams from local
or remote cameras to identify known and unknown humans.
MIT License
Copyright (c) 2021 Asociacin de Investigacion en Inteligencia Artificial
Para la Leucemia Peter Moss
Permission is he... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
37811,
36210,
1921,
309,
562,
20185,
13585,
498,
31517,
653,
15906,
13,
198,
198,
25374,
1921,
309,
562,
20185,
13585,
498,
31517,
653,
15906,
7767,
15190,
422,
1957,
198,
273,
6569,... | 3.811947 | 452 |
# -*- coding: utf-8 -*-
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
628
] | 1.785714 | 14 |
from CommandBase import *
import json
from MythicResponseRPC import *
| [
6738,
9455,
14881,
1330,
1635,
198,
11748,
33918,
198,
6738,
18900,
291,
31077,
49,
5662,
1330,
1635,
628,
198
] | 3.789474 | 19 |
import tensorflow as tf
from tensorflow.keras import backend
#DEPRECATED
# An implementation of wasserstein used for a naive implementation of WGAN
# calculate wasserstein loss
# Define the loss functions for the discriminator,
# which should be (fake_loss - real_loss).
# We will add the gradient penalty later to th... | [
11748,
11192,
273,
11125,
355,
48700,
198,
6738,
11192,
273,
11125,
13,
6122,
292,
1330,
30203,
198,
198,
2,
46162,
38827,
11617,
198,
2,
1052,
7822,
286,
373,
2655,
5714,
973,
329,
257,
24354,
7822,
286,
370,
45028,
198,
2,
15284,
37... | 3.87 | 100 |
import re
import math
import numexpr as ne
MATH_CONST = {
'pi': math.pi,
'': math.pi,
'e': math.e,
'inf': math.inf,
'i': 1j,
'j': 1j,
}
SUB_MAP = {
# replace UTF char with ASCII char
'': '(',
'': ')',
'': ',',
'': '-',
'': '/',
'': '*',
'': '+',
# replace... | [
11748,
302,
198,
11748,
10688,
198,
198,
11748,
997,
31937,
355,
497,
198,
198,
44,
12599,
62,
10943,
2257,
796,
1391,
198,
220,
220,
220,
705,
14415,
10354,
10688,
13,
14415,
11,
198,
220,
220,
220,
10148,
25,
10688,
13,
14415,
11,
... | 1.896 | 250 |
from collections import Mapping
from . import yang_models
| [
6738,
17268,
1330,
337,
5912,
198,
198,
6738,
764,
1330,
331,
648,
62,
27530,
628,
198
] | 3.8125 | 16 |
import gym
import torch
from asym_rlpo.utils.debugging import checkraise
from .base import Representation
| [
11748,
11550,
198,
11748,
28034,
198,
198,
6738,
355,
4948,
62,
45895,
7501,
13,
26791,
13,
24442,
2667,
1330,
2198,
40225,
198,
198,
6738,
764,
8692,
1330,
10858,
341,
628
] | 3.633333 | 30 |
import sys
import traceback
from ggplib.util import log
from ggplib.statemachine import builder
from ggplib.db import signature
###############################################################################
###############################################################################
def install_draughts(a... | [
11748,
25064,
198,
11748,
12854,
1891,
198,
198,
6738,
308,
70,
489,
571,
13,
22602,
1330,
2604,
198,
6738,
308,
70,
489,
571,
13,
14269,
368,
20480,
1330,
27098,
198,
6738,
308,
70,
489,
571,
13,
9945,
1330,
9877,
628,
628,
198,
19... | 2.636023 | 533 |
import fiber
from django.test import SimpleTestCase
from ...test_util import RenderMixin
| [
11748,
13608,
198,
6738,
42625,
14208,
13,
9288,
1330,
17427,
14402,
20448,
198,
6738,
2644,
9288,
62,
22602,
1330,
46722,
35608,
259,
628
] | 3.913043 | 23 |
#! /usr/bin/python3
import sys, re
from PIL import Image
# return the argument if it exists (converted to the same type as the default), otherwise default
default = lambda arg, defa: type(defa)(sys.argv[arg]) if len(sys.argv) > arg and sys.argv[arg] else defa
# filename of image to evaluate, default is image.jpg
IMAG... | [
2,
0,
1220,
14629,
14,
8800,
14,
29412,
18,
198,
11748,
25064,
11,
302,
198,
6738,
350,
4146,
1330,
7412,
198,
198,
2,
1441,
262,
4578,
611,
340,
7160,
357,
1102,
13658,
284,
262,
976,
2099,
355,
262,
4277,
828,
4306,
4277,
198,
1... | 2.334264 | 1,433 |
import pytest
from coding_challenge.users.models import User
from coding_challenge.users.tests.factories import UserFactory
from coding_challenge.ship_manager.models import Ship
from coding_challenge.ship_manager.tests.factories import ShipFactory
| [
11748,
12972,
9288,
198,
198,
6738,
19617,
62,
36747,
3540,
13,
18417,
13,
27530,
1330,
11787,
198,
6738,
19617,
62,
36747,
3540,
13,
18417,
13,
41989,
13,
22584,
1749,
1330,
11787,
22810,
198,
6738,
19617,
62,
36747,
3540,
13,
6720,
62... | 3.818182 | 66 |
# -*- coding: utf-8 -*-
# @Author: edward
# @Date: 2016-05-12 14:11:21
# @Last Modified by: edward
# @Last Modified time: 2016-05-12 17:29:48
from functools import partial
# api = swagger.docs(Api(app), apiVersion='0.1',
# basePath='http://localhost:5000',
# resourcePath='/',
... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2488,
13838,
25,
1225,
904,
198,
2,
2488,
10430,
25,
220,
220,
1584,
12,
2713,
12,
1065,
1478,
25,
1157,
25,
2481,
198,
2,
2488,
5956,
40499,
416,
25,
220,
220,
... | 2.053156 | 301 |
import os
import unittest
import sqlalchemy
from flask import Flask,session,url_for,redirect
from flask_sqlalchemy import SQLAlchemy
from application import create_app ,db
import unittest
import json
from caruser.models import User, UserBank
from carupload.models import CarOption,Car,CarImage
from flask_testing import ... | [
11748,
28686,
198,
11748,
555,
715,
395,
198,
11748,
44161,
282,
26599,
198,
6738,
42903,
1330,
46947,
11,
29891,
11,
6371,
62,
1640,
11,
445,
1060,
198,
6738,
42903,
62,
25410,
282,
26599,
1330,
16363,
2348,
26599,
198,
6738,
3586,
133... | 2.964912 | 285 |
# train-net.py
# Use the neural network module to detect simple signals
import numpy as np
import matplotlib.pyplot as plt
import random
from src.net import Net
def main():
""" Step 1: make dataset """
random.seed()
# Make 3 inputs - 1 base and 2 added inputs
sig_len = 10
y_base = np.array([1, 2,... | [
2,
4512,
12,
3262,
13,
9078,
198,
2,
5765,
262,
17019,
3127,
8265,
284,
4886,
2829,
10425,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
4738,
198,
198,
6738,
12351,... | 2.177852 | 894 |
# allowable multiple choice node and edge features
# code from https://github.com/snap-stanford/ogb/blob/master/ogb/utils/features.py
allowable_features = {
"possible_atomic_num_list": list(range(1, 119)) + ["misc"], # type: ignore
"possible_chirality_list": [
"CHI_UNSPECIFIED",
"CHI_TETRAHEDRA... | [
2,
49299,
3294,
3572,
10139,
290,
5743,
3033,
198,
2,
2438,
422,
3740,
1378,
12567,
13,
785,
14,
45380,
12,
14192,
3841,
14,
519,
65,
14,
2436,
672,
14,
9866,
14,
519,
65,
14,
26791,
14,
40890,
13,
9078,
198,
12154,
540,
62,
40890... | 2.028269 | 566 |
"""coupling Hamiltonian class def"""
from math import exp
import numpy as np
from .spinconfig import SpinConfig
| [
37811,
66,
280,
11347,
11582,
666,
1398,
825,
37811,
198,
6738,
10688,
1330,
1033,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
764,
39706,
11250,
1330,
28002,
16934,
628
] | 3.896552 | 29 |
import numpy as np
| [
198,
11748,
299,
32152,
355,
45941,
628,
628,
628
] | 2.777778 | 9 |
#!/usr/bin/python
import os, sys, shutil
import subprocess as sub
import string
import re
import datetime, time
import optparse
target_root = "/sys/kernel/config/target/"
spec_root = "/var/target/fabric/"
if __name__ == "__main__":
main()
| [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
11748,
28686,
11,
25064,
11,
4423,
346,
198,
11748,
850,
14681,
355,
850,
198,
11748,
4731,
198,
11748,
302,
198,
11748,
4818,
8079,
11,
640,
198,
11748,
2172,
29572,
198,
198,
16793,
62,
157... | 2.769231 | 91 |
"""
Helper classes for creating maps in any Source Engine game that uses hl2mp.fgd.
This file was auto-generated by import_fgd.py on 2020-01-19 09:11:14.977620.
"""
from vmflib2.vmf import *
| [
37811,
198,
47429,
6097,
329,
4441,
8739,
287,
597,
8090,
7117,
983,
326,
3544,
289,
75,
17,
3149,
13,
69,
21287,
13,
198,
1212,
2393,
373,
8295,
12,
27568,
416,
1330,
62,
69,
21287,
13,
9078,
319,
12131,
12,
486,
12,
1129,
7769,
... | 2.816901 | 71 |
import os
BASE_DIR = os.path.dirname(__file__)
__config__ = os.path.abspath(os.path.join(BASE_DIR, "../config.cfg"))
__template__ = os.path.abspath(os.path.join(BASE_DIR, "templates"))
__static__ = os.path.abspath(os.path.join(BASE_DIR, "static"))
__upload__ = os.path.abspath(os.path.join(__static__, "uploads"))
| [
11748,
28686,
628,
198,
33,
11159,
62,
34720,
796,
28686,
13,
6978,
13,
15908,
3672,
7,
834,
7753,
834,
8,
198,
834,
11250,
834,
796,
28686,
13,
6978,
13,
397,
2777,
776,
7,
418,
13,
6978,
13,
22179,
7,
33,
11159,
62,
34720,
11,
... | 2.383459 | 133 |
import nextcord
from nextcord.ext import commands
import json
import os
import pymongo
import os
from keep_alive import keep_alive
# Set environment variables
# os.environ['info'] = "test:pass123"
# os.environ['TOKEN'] = "MY-AWSOME-TOKEN"
intents = nextcord.Intents.all()
TOKEN = os.environ['TOKEN']
client = nextco... | [
11748,
1306,
66,
585,
198,
6738,
1306,
66,
585,
13,
2302,
1330,
9729,
198,
11748,
33918,
198,
11748,
28686,
198,
11748,
279,
4948,
25162,
198,
11748,
28686,
198,
6738,
1394,
62,
282,
425,
1330,
1394,
62,
282,
425,
198,
198,
2,
5345,
... | 2.479675 | 246 |
from models.model_contact import Contact
import random
import string
import os.path
import jsonpickle
import getopt
import sys
try:
opts, args = getopt.getopt(sys.argv[1:], "n:f:", ["number_of_groups", "file"])
except getopt.GetoptError as err:
getopt.usage()
sys.exit(2)
n = 5
f = "data/contacts.json"
fo... | [
6738,
4981,
13,
19849,
62,
32057,
1330,
14039,
198,
11748,
4738,
198,
11748,
4731,
198,
11748,
28686,
13,
6978,
198,
11748,
33918,
27729,
293,
198,
11748,
651,
8738,
198,
11748,
25064,
628,
198,
28311,
25,
198,
220,
220,
220,
2172,
82,
... | 1.936916 | 856 |
# License: BSD 3 clause
import gc
import unittest
import weakref
import numpy as np
import scipy
from scipy.sparse import csr_matrix
from tick.array.build.array import tick_double_sparse2d_from_file
from tick.array.build.array import tick_double_sparse2d_to_file
from tick.array_test.build import array_test as test
... | [
2,
13789,
25,
347,
10305,
513,
13444,
198,
198,
11748,
308,
66,
198,
11748,
555,
715,
395,
198,
11748,
4939,
5420,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
629,
541,
88,
198,
6738,
629,
541,
88,
13,
82,
29572,
1330,
269,... | 2.816794 | 131 |
# Author: DINDIN Meryll
# Date: 15 September 2019
# Project: RoadBuddy
try: from chatbot.imports import *
except: from imports import *
| [
2,
6434,
25,
220,
360,
12115,
1268,
337,
1924,
297,
198,
2,
7536,
25,
220,
220,
220,
1315,
2693,
13130,
198,
2,
4935,
25,
5567,
33,
21584,
198,
198,
28311,
25,
422,
8537,
13645,
13,
320,
3742,
1330,
1635,
198,
16341,
25,
422,
1794... | 3 | 47 |
# encoding=utf-8
import re
#
import types
# noinspection PyUnresolvedReferences
import maya.mel as mel
# noinspection PyUnresolvedReferences
import maya.cmds as cmds
#
_objectStore = {}
#
#
#
#
#
#
#
#
#
#
#
#
#
#
def nodeAttr(self, attr):
return self.template.nodeAttr(attr)
... | [
2,
21004,
28,
40477,
12,
23,
198,
11748,
302,
198,
2,
198,
11748,
3858,
198,
2,
645,
1040,
14978,
9485,
3118,
411,
5634,
19927,
198,
11748,
743,
64,
13,
17694,
355,
7758,
198,
2,
645,
1040,
14978,
9485,
3118,
411,
5634,
19927,
198,
... | 2.069196 | 448 |
from .bubbleio import BubbleIo
| [
6738,
764,
46176,
903,
952,
1330,
33691,
40,
78,
198
] | 3.1 | 10 |
import pandas as pd
| [
11748,
19798,
292,
355,
279,
67,
628
] | 3 | 7 |
import logging
import json
import uuid
from collections import defaultdict
import tornado.web
import tornado.httpclient
from tornado.platform.asyncio import to_asyncio_future
import pymongo
import motor
from rest_tools.client import RestClient
from iceprod.server.rest import RESTHandler, RESTHandlerSetup, authorizati... | [
11748,
18931,
198,
11748,
33918,
198,
11748,
334,
27112,
198,
6738,
17268,
1330,
4277,
11600,
198,
198,
11748,
33718,
13,
12384,
198,
11748,
33718,
13,
4023,
16366,
198,
6738,
33718,
13,
24254,
13,
292,
13361,
952,
1330,
284,
62,
292,
1... | 2.564802 | 733 |
# -*- coding: utf-8 -*-
# author: itimor
import requests
import json
try:
from urllib.parse import urlencode
except ImportError:
from urllib import urlencode
if __name__ == '__main__':
cli = FalconClient(endpoint="http://n9e.xxoo.com", user='admin', token='11871bd159bd19da9ab624d161c569e3c8')
param... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
1772,
25,
340,
320,
273,
198,
198,
11748,
7007,
198,
11748,
33918,
198,
198,
28311,
25,
198,
220,
220,
220,
422,
2956,
297,
571,
13,
29572,
1330,
2956,
11925,
8189,... | 2.35 | 180 |
import matplotlib.pyplot
meses = ['Janeiro','Fevereiro','Marco','Abril','Maio','Junho']
valores = [105235, 107697, 110256, 109236, 108859, 109986]
matplotlib.pyplot.plot(meses, valores)
matplotlib.pyplot.title('Faturamento no primeiro semestre de 2017')
matplotlib.pyplot.xlabel('Meses')
matplotlib.pyplot.ylabel('Fatur... | [
11748,
2603,
29487,
8019,
13,
9078,
29487,
198,
198,
6880,
274,
796,
37250,
41083,
7058,
41707,
14304,
4119,
7058,
41707,
37179,
41707,
32,
1671,
346,
41707,
21467,
952,
41707,
22396,
8873,
20520,
198,
2100,
2850,
796,
685,
13348,
22370,
... | 2.521472 | 163 |
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import mysql.connector
mydb = mysql.connector.connect(
host = "localhost",
user = "root",
passwd = "schleichkatze",
database = "helmstedt"
)
mycursor = mydb.cursor()
mycursor.execute("SELECT id, gnd FROM helmstedt.temp_prof_kat")
myresult = mycursor.fetchall()
gnds ... | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
48761,
13,
8443,
273,
198,
198,
1820,
9945,
796,
48761,
13,
8443,
273,
13,
8443,
7,
198,
220,
2583,
796,
3... | 2.358616 | 1,358 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
'''
Unit tests for scrapername.
'''
import difflib
import filecmp
from datetime import datetime
from os.path import join
from tempfile import gettempdir
import pytest
from hdx.hdx_configuration import Configuration
import hdx.utilities.downloader
from hdx.utilities.compare im... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
7061,
6,
198,
26453,
5254,
329,
19320,
525,
3672,
13,
198,
198,
7061,
6,
198,
11748,
814,
8019,
198,
11748,
2393,
48991,
198... | 2.838111 | 593 |
# optimizer
optimizer = dict(type='SGD', lr=0.001, momentum=0.9, weight_decay=0.001)
optimizer_config = dict(grad_clip=None)
# learning policy
lr_config = dict(policy='step', step=[40, 70, 90])
runner = dict(type='EpochBasedRunner', max_epochs=100)
| [
2,
6436,
7509,
201,
198,
40085,
7509,
796,
8633,
7,
4906,
11639,
38475,
35,
3256,
300,
81,
28,
15,
13,
8298,
11,
12858,
28,
15,
13,
24,
11,
3463,
62,
12501,
323,
28,
15,
13,
8298,
8,
201,
198,
40085,
7509,
62,
11250,
796,
8633,
... | 2.55 | 100 |
""" Advent of Code Day 6 - Signals and Noise"""
with open('inputs/day_06.txt', 'r') as f:
rows = [row.strip() for row in f.readlines()]
flipped = zip(*rows)
message = ''
mod_message = ''
for chars in flipped:
most_freq = ''
least_freq = ''
highest = 0
lowest = 100
for char in chars:
... | [
37811,
33732,
286,
6127,
3596,
718,
532,
5865,
874,
290,
30964,
37811,
628,
198,
4480,
1280,
10786,
15414,
82,
14,
820,
62,
3312,
13,
14116,
3256,
705,
81,
11537,
355,
277,
25,
198,
220,
220,
220,
15274,
796,
685,
808,
13,
36311,
34... | 2.408163 | 294 |
import hashlib
import json
import os
import pathlib
import shlex
import nbformat
from invoke import task
files_to_format = ["chmp/src", "tasks.py", "chmp/setup.py"]
inventories = [
"http://daft-pgm.org",
"https://matplotlib.org",
"http://www.numpy.org",
"https://pandas.pydata.org",
"https://docs.... | [
11748,
12234,
8019,
198,
11748,
33918,
198,
11748,
28686,
198,
11748,
3108,
8019,
198,
11748,
427,
2588,
198,
198,
11748,
299,
65,
18982,
198,
6738,
26342,
1330,
4876,
198,
198,
16624,
62,
1462,
62,
18982,
796,
14631,
354,
3149,
14,
106... | 2.365079 | 252 |
# -*- coding:utf-8 -*-
import requests
import json
import random
import hashlib
KEY = ''
APPID = ''
API = 'http://api.fanyi.baidu.com/api/trans/vip/translate'
| [
2,
532,
9,
12,
19617,
25,
40477,
12,
23,
532,
9,
12,
198,
11748,
7007,
198,
11748,
33918,
198,
11748,
4738,
198,
11748,
12234,
8019,
198,
198,
20373,
796,
10148,
198,
24805,
2389,
796,
10148,
198,
17614,
796,
705,
4023,
1378,
15042,
... | 2.5 | 64 |
import bolinette.defaults.models
import bolinette.defaults.mixins
import bolinette.defaults.services
import bolinette.defaults.middlewares
import bolinette.defaults.controllers
import bolinette.defaults.topics
| [
11748,
11572,
259,
5857,
13,
12286,
82,
13,
27530,
198,
11748,
11572,
259,
5857,
13,
12286,
82,
13,
19816,
1040,
198,
11748,
11572,
259,
5857,
13,
12286,
82,
13,
30416,
198,
11748,
11572,
259,
5857,
13,
12286,
82,
13,
27171,
86,
3565,... | 3.230769 | 65 |
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# Copyright (c) 2021 Salvador E. Tropea
# Copyright (c) 2021 Instituto Nacional de Tecnologa Industrial
# License: Apache 2.0
# Project: KiCost
# Adapted from: https://github.com/alexprengere/currencyconverter
"""
CurrencyConverter:
This is reduced version of the 'Currency Con... | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
15069,
357,
66,
8,
33448,
26482,
412,
13,
8498,
431,
64,
198,
2,
15069,
357,
66,
8,
33448,
37931,
9390,
399,
330,
... | 3.175862 | 290 |
import streamlit as st
import leafmap
| [
11748,
4269,
18250,
355,
336,
198,
11748,
12835,
8899,
628
] | 3.9 | 10 |
# -*- coding = utf-8 -*-
# @Time:2021/3/1417:56
# @Author:Linyu
# @Software:PyCharm
from web.pageutils import BooksScore
from web.pageutils import BooksCount
from web.pageutils import pointsDraw
from web.pageutils import scoreRelise
from web.pageutils import messBarInfo
from web.pageutils import tagRader
from web.mod... | [
2,
532,
9,
12,
19617,
796,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2488,
7575,
25,
1238,
2481,
14,
18,
14,
1415,
1558,
25,
3980,
198,
2,
2488,
13838,
25,
43,
3541,
84,
198,
2,
2488,
25423,
25,
20519,
1925,
1670,
628,
198,
6738,
... | 2.688196 | 449 |
# -*- coding: utf-8 -*-
import scrapy
from scrapy.linkextractors import LinkExtractor
from scrapy.spiders import CrawlSpider, Rule
from readability import Document
import datetime
from pprint import pprint
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
15881,
88,
198,
6738,
15881,
88,
13,
2815,
365,
742,
974,
669,
1330,
7502,
11627,
40450,
198,
6738,
15881,
88,
13,
2777,
4157,
1330,
327,
13132,
41294,
11,
14330,... | 3.322581 | 62 |
from django.db import models
from django.contrib.auth.models import User
from django.db.models.signals import post_save
from django.dispatch import receiver
from django_countries.fields import CountryField
| [
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27530,
1330,
11787,
198,
6738,
42625,
14208,
13,
9945,
13,
27530,
13,
12683,
874,
1330,
1281,
62,
21928,
198,
6738,
42625,
14208,
13,
6381,... | 3.603448 | 58 |
import os
import sys
import tempfile
import unittest
import subprocess
from unittest.mock import Mock, patch
import mock
from prometheus_client import Histogram
from flower.command import apply_options, warn_about_celery_args_used_in_flower_command, apply_env_options
from tornado.options import options
from tests.uni... | [
11748,
28686,
198,
11748,
25064,
198,
11748,
20218,
7753,
198,
11748,
555,
715,
395,
198,
11748,
850,
14681,
198,
6738,
555,
715,
395,
13,
76,
735,
1330,
44123,
11,
8529,
198,
198,
11748,
15290,
198,
6738,
1552,
36916,
62,
16366,
1330,
... | 3.645833 | 96 |
#!/usr/bin/env python
import requests
import subprocess
import os
import tempfile
temp_directory = tempfile.gettempdir()
os.chdir(temp_directory)
download("http://ip/image.jpg")
subprocess.Popen("image.jpg", shell=True)
download("http://ip/backdoor.exe")
subprocess.call("backdoor.exe", shell=True)
os.remove("image... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
7007,
198,
11748,
850,
14681,
198,
11748,
28686,
198,
11748,
20218,
7753,
628,
198,
29510,
62,
34945,
796,
20218,
7753,
13,
1136,
29510,
15908,
3419,
198,
418,
13,
354,
15908... | 2.917355 | 121 |
import numpy as np
import cv2
import math
import random
import os
from tempfile import TemporaryFile
from sklearn.model_selection import train_test_split
# Creating classes.
length=[7,15]
width=[1,3]
col=[]
col.append([0,0,255]) #Blue
col.append([255,0,0]) #Red
interval=15
angles=[]
x=0
while x<180:
angles.append(x... | [
11748,
299,
32152,
355,
45941,
198,
11748,
269,
85,
17,
198,
11748,
10688,
220,
198,
11748,
4738,
198,
11748,
28686,
198,
6738,
20218,
7753,
1330,
46042,
8979,
198,
6738,
1341,
35720,
13,
19849,
62,
49283,
1330,
4512,
62,
9288,
62,
3531... | 1.91939 | 1,836 |
# coding: utf-8
"""
Octopus Server API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: 2019.6.7+Branch.tags-2019.6.7.Sha.aa18dc6809953218c66f57eff7d26481d9b23d6a
Generated by: https://github.com/swagger-api... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
37811,
198,
220,
220,
220,
2556,
25790,
9652,
7824,
628,
220,
220,
220,
1400,
6764,
2810,
357,
27568,
416,
2451,
7928,
6127,
5235,
3740,
1378,
12567,
13,
785,
14,
2032,
7928,
12,
15042,
14,
... | 2.471354 | 384 |
"""
Does the legwork of searching for matching tracks.
Contains:
(1) Search functions:
- search_message
- search_spotipy
- search_db
- search_lookup
(2) String parsers (to clean title name):
- clean_title
- remove_punctuation
(3) Creates new Spotify playlist.
- create_playlist
"""
from typing import Any, Lis... | [
37811,
198,
13921,
262,
1232,
1818,
286,
10342,
329,
12336,
8339,
13,
198,
198,
4264,
1299,
25,
198,
198,
7,
16,
8,
11140,
5499,
25,
198,
532,
2989,
62,
20500,
198,
532,
2989,
62,
20485,
541,
88,
198,
532,
2989,
62,
9945,
198,
532... | 2.484218 | 4,087 |
from urllib import urlencode
from urllib2 import urlopen
import simplejson
from django.conf import settings
from django.contrib.gis.geos import Point, LineString
from django.utils.text import capfirst
from django.utils.translation import ugettext as _
from molly.apps.places.models import bearing_to_compass
from molly... | [
6738,
2956,
297,
571,
1330,
2956,
11925,
8189,
198,
6738,
2956,
297,
571,
17,
1330,
19016,
9654,
198,
11748,
2829,
17752,
198,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
70,
271,
13,
46... | 2.212226 | 1,734 |
num_list = [10,50,30,12,6,8,100]
print( max_min_first_last(num_list) )
| [
22510,
62,
4868,
796,
685,
940,
11,
1120,
11,
1270,
11,
1065,
11,
21,
11,
23,
11,
3064,
60,
198,
198,
4798,
7,
3509,
62,
1084,
62,
11085,
62,
12957,
7,
22510,
62,
4868,
8,
1267,
198
] | 1.945946 | 37 |
# MIT License
# Copyright (c) 2017 MassChallenge, Inc.
import json
from oauth2_provider.models import get_application_model
from rest_framework.test import APIClient
from test_plus.test import TestCase
from django.core import mail
from django.conf import settings
from django.contrib.auth.models import Group
from djan... | [
2,
17168,
13789,
198,
2,
15069,
357,
66,
8,
2177,
5674,
41812,
3540,
11,
3457,
13,
198,
198,
11748,
33918,
198,
6738,
267,
18439,
17,
62,
15234,
1304,
13,
27530,
1330,
651,
62,
31438,
62,
19849,
198,
6738,
1334,
62,
30604,
13,
9288,... | 2.364903 | 1,077 |
from django.db import models
from pydis_site.apps.api.models.bot.user import User
from pydis_site.apps.api.models.mixins import ModelReprMixin
| [
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
198,
6738,
279,
5173,
271,
62,
15654,
13,
18211,
13,
15042,
13,
27530,
13,
13645,
13,
7220,
1330,
11787,
198,
6738,
279,
5173,
271,
62,
15654,
13,
18211,
13,
15042,
13,
27530,
13,
19816,
... | 2.9 | 50 |
import pickle
best_trees = [
{'accuracy': 0.36416184971098264, 'tree':
['Attribute', 'att1',
['Value', 'Pend Oreille',
['Leaf', 2.0, 0, 69]
],
['Value', 'Okanogan',
['Leaf', 3.0, 0, 314]
],
['Value... | [
11748,
2298,
293,
220,
201,
198,
201,
198,
13466,
62,
83,
6037,
796,
685,
201,
198,
220,
220,
220,
1391,
6,
4134,
23843,
10354,
657,
13,
26780,
1433,
1507,
38073,
940,
4089,
18897,
11,
705,
21048,
10354,
220,
201,
198,
220,
220,
220... | 2.174052 | 5,010 |
import json
#Parse csv to kdb.json
with open("kdb.csv", "r", encoding="utf_8") as f:
l=[]
lines = f.readlines()
# remove the header
lines.pop(0)
for line in lines:
tmp1 = line.split('"')
if tmp1[15] == "":
tmp1[15] = " "
if not "" in set([tmp1[1], tmp1[3], tmp... | [
11748,
33918,
198,
198,
2,
10044,
325,
269,
21370,
284,
479,
9945,
13,
17752,
198,
4480,
1280,
7203,
74,
9945,
13,
40664,
1600,
366,
81,
1600,
21004,
2625,
40477,
62,
23,
4943,
355,
277,
25,
198,
220,
220,
220,
300,
28,
21737,
198,
... | 1.95 | 320 |
import os
import shutil
import tarfile
import urllib.request
import pandas as pd
CIFAR10_URL = 'https://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz'
| [
11748,
28686,
198,
11748,
4423,
346,
198,
11748,
13422,
7753,
198,
11748,
2956,
297,
571,
13,
25927,
198,
11748,
19798,
292,
355,
279,
67,
198,
198,
34,
5064,
1503,
940,
62,
21886,
796,
705,
5450,
1378,
2503,
13,
6359,
13,
13165,
5957... | 2.46875 | 64 |
for _ in range(int(input())):
n,k=map(int,input().split())
lst=list(map(int,input().split()))
printer(n,k,lst) | [
198,
1640,
4808,
287,
2837,
7,
600,
7,
15414,
28955,
2599,
198,
197,
77,
11,
74,
28,
8899,
7,
600,
11,
15414,
22446,
35312,
28955,
198,
197,
75,
301,
28,
4868,
7,
8899,
7,
600,
11,
15414,
22446,
35312,
3419,
4008,
198,
197,
1050,
... | 2.150943 | 53 |
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: commands/v1/oracles.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from go... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2980,
515,
416,
262,
8435,
11876,
17050,
13,
220,
8410,
5626,
48483,
0,
198,
2,
2723,
25,
9729,
14,
85,
16,
14,
273,
9928,
13,
1676,
1462,
198,
37811,
8645,
515,
... | 2.472389 | 1,666 |
import os
parameter_tuning_options = {
"experiment_name": "non-regression-tests",
# Tuning method alternatives:
# - "optimization": use bayesian optimisation
# - "grid_search"
"tuning_method": "grid_search",
# Additionnal options for the grid search method
"use_cache": False,
# Addit... | [
11748,
28686,
198,
198,
17143,
2357,
62,
28286,
278,
62,
25811,
796,
1391,
198,
220,
220,
220,
366,
23100,
3681,
62,
3672,
1298,
366,
13159,
12,
2301,
2234,
12,
41989,
1600,
628,
220,
220,
220,
1303,
13932,
278,
2446,
14693,
25,
198,
... | 2.439195 | 1,143 |
import networkx as nx
from misc import maximum_matching_all
from networkx import get_node_attributes
# Use this for non-binary graph
| [
11748,
3127,
87,
355,
299,
87,
198,
6738,
12747,
1330,
5415,
62,
15699,
278,
62,
439,
198,
6738,
3127,
87,
1330,
651,
62,
17440,
62,
1078,
7657,
628,
628,
198,
2,
5765,
428,
329,
1729,
12,
39491,
4823,
628
] | 3.538462 | 39 |
__all__ = ["BaseIdCardAuthenticationView", "IdCardSigner"]
from .signer import IdCardSigner
from .views import BaseIdCardAuthenticationView
| [
834,
439,
834,
796,
14631,
14881,
7390,
16962,
47649,
3299,
7680,
1600,
366,
7390,
16962,
11712,
263,
8973,
198,
198,
6738,
764,
12683,
263,
1330,
5121,
16962,
11712,
263,
198,
6738,
764,
33571,
1330,
7308,
7390,
16962,
47649,
3299,
7680,... | 3.439024 | 41 |
from arcade import Sprite
| [
198,
6738,
27210,
1330,
33132,
628,
628,
628
] | 4 | 8 |
"""RESTful API Document resource."""
from flask_restx import Resource, reqparse
from flask_restx._http import HTTPStatus
from werkzeug.datastructures import FileStorage
from ..service.document_service import (
delete_document,
edit_document,
get_all_documents,
get_document,
save_document,
)
from .... | [
37811,
49,
6465,
913,
7824,
16854,
8271,
526,
15931,
198,
198,
6738,
42903,
62,
2118,
87,
1330,
20857,
11,
43089,
29572,
198,
6738,
42903,
62,
2118,
87,
13557,
4023,
1330,
14626,
19580,
198,
6738,
266,
9587,
2736,
1018,
13,
19608,
459,
... | 2.595533 | 403 |
#!/usr/bin/env python
# encoding: utf-8
col_shortener = {
'Q1':'confirm',
'Q2':'faculty',
'Q3':'department',
'Q4':'funders',
'Q5':'position',
'Q6':'use_software',
'Q7':'importance_software',
'Q8':'develop_own_code',
'Q9':'development_expertise',
'Q10':'sufficient_training',
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
21004,
25,
3384,
69,
12,
23,
628,
198,
4033,
62,
19509,
877,
796,
1391,
198,
220,
220,
220,
705,
48,
16,
10354,
6,
10414,
2533,
3256,
198,
220,
220,
220,
705,
48,
17,
10354,
6... | 2.10961 | 666 |
import pytest
import numpy as np
from anndata import AnnData
from scipy.sparse import csr_matrix
import scanpy as sc
# test "data" for 3 cells * 4 genes
X = [
[-1, 2, 0, 0],
[1, 2, 4, 0],
[0, 2, 2, 0],
] # with gene std 1,0,2,0 and center 0,2,2,0
X_scaled = [
[-1, 2, 0, 0],
[1, 2, 2, 0],
[0, ... | [
11748,
12972,
9288,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
281,
358,
1045,
1330,
5506,
6601,
198,
6738,
629,
541,
88,
13,
82,
29572,
1330,
269,
27891,
62,
6759,
8609,
198,
198,
11748,
9367,
9078,
355,
629,
198,
198,
2,
1332,
... | 1.929688 | 256 |
import cv2
import numpy as np
import bilinear
import patchreg
from skimage.util import view_as_windows
MAX_FEATURES = 5000
GOOD_MATCH_PERCENT = 0.45
if __name__ == "__main__":
# draw_img()
# exit()
root = "../data/"
master_srcdata = cv2.imread(root + "OK1_1.jpg")
target_srcdata = cv2.imread... | [
11748,
269,
85,
17,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
47027,
259,
451,
198,
11748,
8529,
2301,
198,
6738,
1341,
9060,
13,
22602,
1330,
1570,
62,
292,
62,
28457,
628,
628,
198,
198,
22921,
62,
15112,
47471,
796,
23336,
19... | 2.357504 | 593 |
# Copyright (c) 2020
# [This program is licensed under the "MIT License"]
# Please see the file LICENSE in the source
# distribution of this software for license terms.
import pygame as pg
import ruamel.yaml
from random import choice
vec = pg.math.Vector2
| [
2,
15069,
357,
66,
8,
12131,
198,
2,
685,
1212,
1430,
318,
11971,
739,
262,
366,
36393,
13789,
8973,
198,
2,
4222,
766,
262,
2393,
38559,
24290,
287,
262,
2723,
198,
2,
6082,
286,
428,
3788,
329,
5964,
2846,
13,
198,
198,
11748,
1... | 3.7 | 70 |
import fnmatch
import os
import shutil
import subprocess
import sys
import time
from collections import OrderedDict
try:
import configparser
except ImportError:
import ConfigParser as configparser
if '__file__' not in globals():
__is_frozen = True
__file__ = ''
else:
__is_frozen = False
_co... | [
11748,
24714,
15699,
198,
11748,
28686,
198,
11748,
4423,
346,
198,
11748,
850,
14681,
198,
11748,
25064,
198,
11748,
640,
198,
6738,
17268,
1330,
14230,
1068,
35,
713,
198,
28311,
25,
198,
220,
220,
220,
1330,
4566,
48610,
198,
16341,
... | 2.320513 | 390 |
import sys
import plotly
import plotly.plotly as py
import plotly.graph_objs as go
#Argument 1 must be your plotly username, argument 2 is your api key. Get those by registering for a plotly account.
#Argument 3 is the name of the input file to input data from. Must be in the form: Date \n Download \n Upload \n
plotl... | [
11748,
25064,
198,
11748,
7110,
306,
198,
11748,
7110,
306,
13,
29487,
306,
355,
12972,
198,
11748,
7110,
306,
13,
34960,
62,
672,
8457,
355,
467,
198,
198,
2,
28100,
1713,
352,
1276,
307,
534,
7110,
306,
20579,
11,
4578,
362,
318,
... | 2.393502 | 554 |
from crosshair.libimpl import builtinslib
from crosshair.libimpl import collectionslib
from crosshair.libimpl import datetimelib
from crosshair.libimpl import mathlib
from crosshair.libimpl import randomlib
from crosshair.libimpl import relib
| [
6738,
3272,
27108,
13,
8019,
23928,
1330,
3170,
1040,
8019,
198,
6738,
3272,
27108,
13,
8019,
23928,
1330,
17268,
8019,
198,
6738,
3272,
27108,
13,
8019,
23928,
1330,
4818,
316,
320,
417,
571,
198,
6738,
3272,
27108,
13,
8019,
23928,
13... | 3.8125 | 64 |
import re
from django.urls import reverse
from rest_framework import serializers
from schedulesy.apps.ade_legacy.models import Customization
| [
11748,
302,
198,
198,
6738,
42625,
14208,
13,
6371,
82,
1330,
9575,
198,
6738,
1334,
62,
30604,
1330,
11389,
11341,
198,
198,
6738,
24025,
88,
13,
18211,
13,
671,
62,
1455,
1590,
13,
27530,
1330,
8562,
1634,
628
] | 3.789474 | 38 |
"""
Test Filter Operator
"""
import os
import sys
sys.path.insert(1, os.path.join(sys.path[0], '..'))
from gva.flows.operators import FilterOperator
try:
from rich import traceback
traceback.install()
except ImportError:
pass
if __name__ == "__main__":
test_filter_operator_default()
... | [
37811,
201,
198,
14402,
25853,
35946,
201,
198,
37811,
201,
198,
11748,
28686,
201,
198,
11748,
25064,
201,
198,
17597,
13,
6978,
13,
28463,
7,
16,
11,
28686,
13,
6978,
13,
22179,
7,
17597,
13,
6978,
58,
15,
4357,
705,
492,
6,
4008,... | 2.496599 | 147 |
# -*- coding: utf-8 -*-
"""
Created on Tue May 25 10:24:05 2021
@author: danaukes
https://en.wikipedia.org/wiki/Rotation_formalisms_in_three_dimensions
https://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation
https://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles
"""
import sympy
sympy.in... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
30030,
1737,
1679,
838,
25,
1731,
25,
2713,
33448,
198,
198,
31,
9800,
25,
46078,
559,
5209,
198,
5450,
1378,
268,
13,
31266,
13,
2398,
14,
154... | 1.986807 | 379 |
"""Adds voice category per channel
Revision ID: 6e982c9318a6
Revises: ef54f035a75c
Create Date: 2021-12-03 13:18:57.468342
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = "6e982c9318a6"
down_revision = "ef54f035a75c"
branch_labels = None
depends_on = None
| [
37811,
46245,
3809,
6536,
583,
6518,
198,
198,
18009,
1166,
4522,
25,
718,
68,
4089,
17,
66,
6052,
1507,
64,
21,
198,
18009,
2696,
25,
304,
69,
4051,
69,
44215,
64,
2425,
66,
198,
16447,
7536,
25,
33448,
12,
1065,
12,
3070,
1511,
... | 2.507937 | 126 |
__all__ = ['Token', 'Scanner', 'getscanner']
import types
__scanners = {}
| [
834,
439,
834,
796,
37250,
30642,
3256,
705,
33351,
1008,
3256,
705,
11407,
5171,
1008,
20520,
198,
11748,
3858,
198,
834,
1416,
15672,
796,
23884,
198
] | 2.846154 | 26 |
#!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. (http://www.facebook.com)
import unittest
if __name__ == "__main__":
unittest.main()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
15069,
357,
66,
8,
3203,
11,
3457,
13,
290,
663,
29116,
13,
357,
4023,
1378,
2503,
13,
19024,
13,
785,
8,
198,
11748,
555,
715,
395,
628,
198,
198,
361,
11593,
3672,
834,
... | 2.721311 | 61 |
#!/usr/bin/env python
#title :main.py
#description :Tensorflow implementation of CapsNet.
#author :Jose Chavez
#date :2019/04/30
#version :1.0
#usage :python3 main.py
#python_version :3.6.7
#============================================================================... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
7839,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1058,
12417,
13,
9078,
198,
2,
11213,
220,
220,
220,
220,
1058,
51,
22854,
11125,
7822,
286,
23534,
7934,
13,
198,
2,
980... | 2.542169 | 332 |
import os
import sys
import time
import decimal
import sqlite3
import multiprocessing
from secret import rpc_user, rpc_password
from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
import cluster_db_query as cdq
import db_query as dq
rpc_ip = '127.0.0.1'
rpc_port = '8332'
timeout = 300
def get... | [
11748,
28686,
198,
11748,
25064,
198,
11748,
640,
198,
11748,
32465,
198,
11748,
44161,
578,
18,
198,
11748,
18540,
305,
919,
278,
198,
6738,
3200,
1330,
374,
14751,
62,
7220,
11,
374,
14751,
62,
28712,
198,
6738,
8550,
81,
14751,
13,
... | 1.877128 | 1,351 |
from typing import Optional, List
from pydantic import Field
from pydantic.main import BaseModel
from inoft_vocal_framework.utils.formatters import normalize_intent_name
| [
6738,
19720,
1330,
32233,
11,
7343,
198,
6738,
279,
5173,
5109,
1330,
7663,
198,
6738,
279,
5173,
5109,
13,
12417,
1330,
7308,
17633,
198,
198,
6738,
287,
11205,
62,
85,
4374,
62,
30604,
13,
26791,
13,
18982,
1010,
1330,
3487,
1096,
6... | 3.632653 | 49 |
# -*- encoding: utf-8 -*-
from django.contrib import admin
from emailtemplates.models import EmailTemplate
from emailtemplates.models import MailServerFailure
admin.site.register(EmailTemplate, EmailTemplateAdmin)
admin.site.register(MailServerFailure, MailServerFailureAdmin)
| [
2,
532,
9,
12,
21004,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
201,
198,
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
201,
198,
6738,
3053,
11498,
17041,
13,
27530,
1330,
9570,
30800,
201,
198,
6738,
3053,
11498,
17041,
13,
... | 3.255556 | 90 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#--------------------------------#
"""
File name: TPEX_STOCKBOT/main.py
Author: WEI-TA KUAN
Date created: 12/9/2021
Date last modified: 9/10/2021
Version: 1.0
Python Version: 3.8.8
Status: Developing
"""
#--------------------------------#
from scraping_data import stock_da... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
3880,
2,
198,
37811,
198,
8979,
1438,
25,
24525,
6369,
62,
2257,
11290,
33,
2394,
14,
12417,
13,
9078,
198,
13838,... | 2.766234 | 385 |
"""
list twikis:
List all L1 Trigger Offline Twikis
Usage:
list twikis [check=1]
Parameters:
check: force a check of the twiki URL before printing.
Useful when adding new entries. Default: 0
"""
import logging
import urllib
import hepshell
LOG = log... | [
37811,
198,
220,
220,
220,
1351,
665,
1134,
271,
25,
198,
220,
220,
220,
220,
220,
220,
220,
7343,
477,
406,
16,
24593,
49749,
1815,
1134,
271,
198,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
29566,
25,
198,
220,
... | 2.391677 | 817 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""IAAFT surrogates for correlated noise.
The properties of linearly correlated noise can be captured quite
accurately by IAAFT surrogates. Thus, they cannot easily fool
a dimension estimator (here we use Takens's maximum likelihood estimator
for the correlation dimensio... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
3539,
8579,
51,
27552,
689,
329,
23551,
7838,
13,
198,
198,
464,
6608,
286,
9493,
11458,
23551,
7838,
460,
... | 2.27381 | 672 |
import time
from unittest import TestCase
from app.pubmed.source_entrez import *
| [
11748,
640,
198,
6738,
555,
715,
395,
1330,
6208,
20448,
198,
6738,
598,
13,
12984,
1150,
13,
10459,
62,
298,
21107,
1330,
1635,
628
] | 3.416667 | 24 |
import nltk
import numpy as np
from nltk.stem.porter import PorterStemmer
nltk.download('punkt')
stemmer = PorterStemmer()
# splitting a string into words, punctuation and numbers
# generating the root form the words ex: universe - univers, university - univers
# put all these words in a bag to be used later
| [
198,
11748,
299,
2528,
74,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
299,
2528,
74,
13,
927,
13,
26634,
1330,
20890,
1273,
368,
647,
198,
77,
2528,
74,
13,
15002,
10786,
30354,
83,
11537,
198,
198,
927,
647,
796,
20890,
1273,
3... | 3.456522 | 92 |
#!/usr/bin/env python3
import os
import click
from bank_api import create_app, db, models, utils
app = create_app(os.getenv('FLASK_CONFIG') or 'default')
if __name__ == '__main__':
app.run(debug=True)
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
11748,
28686,
198,
11748,
3904,
198,
6738,
3331,
62,
15042,
1330,
2251,
62,
1324,
11,
20613,
11,
4981,
11,
3384,
4487,
198,
198,
1324,
796,
2251,
62,
1324,
7,
418,
13,
1136,
2433... | 2.592593 | 81 |
import sys
if sys.version_info[:2] >= (3, 8):
# TODO: Import directly (no need for conditional) when `python_requires = >= 3.8`
from importlib.metadata import PackageNotFoundError, version # pragma: no cover
else:
from importlib_metadata import PackageNotFoundError, version # pragma: no cover
try:
#... | [
11748,
25064,
198,
198,
361,
25064,
13,
9641,
62,
10951,
58,
25,
17,
60,
18189,
357,
18,
11,
807,
2599,
198,
220,
220,
220,
1303,
16926,
46,
25,
17267,
3264,
357,
3919,
761,
329,
26340,
8,
618,
4600,
29412,
62,
47911,
796,
18189,
... | 3.226087 | 230 |
import os
import sys
rootpath=str("D:/_1work/pycharmcode/pycharmproject/resrep")
syspath=sys.path
sys.path=[]
sys.path.append(rootpath)#python
sys.path.extend([rootpath+i for i in os.listdir(rootpath) if i[0]!="."])#python
sys.path.extend(syspath)
print(sys.path) | [
11748,
28686,
198,
11748,
25064,
198,
15763,
6978,
28,
2536,
7203,
35,
14079,
62,
16,
1818,
14,
9078,
354,
1670,
8189,
14,
9078,
354,
1670,
16302,
14,
411,
7856,
4943,
198,
17597,
6978,
28,
17597,
13,
6978,
198,
17597,
13,
6978,
28,
... | 2.457944 | 107 |
import argparse
import os
import shutil
import time
import sys
import sklearn
import sklearn.metrics
import torch
torch.cuda.init()
import torch.nn as nn
import torch.nn.parallel
import torch.nn.functional as F
import torch.backends.cudnn as cudnn
import torch.distributed as dist
import torch.optim
import torch.utils.... | [
11748,
1822,
29572,
198,
11748,
28686,
198,
11748,
4423,
346,
198,
11748,
640,
198,
11748,
25064,
198,
11748,
1341,
35720,
198,
11748,
1341,
35720,
13,
4164,
10466,
198,
198,
11748,
28034,
198,
13165,
354,
13,
66,
15339,
13,
15003,
3419,
... | 2.545164 | 1,251 |