content stringlengths 1 1.05M | input_ids listlengths 1 883k | ratio_char_token float64 1 22.9 | token_count int64 1 883k |
|---|---|---|---|
from common.hgraph.hgraph import NonterminalLabel
from common import log
import itertools
# Some general advice for reading this file:
#
# Every rule specifies some fragment of the object (graph, string or both) that
# is being parsed, as well as a visit order on the individual elements of that
# fragment (tokens or e... | [
6738,
2219,
13,
71,
34960,
13,
71,
34960,
1330,
8504,
23705,
282,
33986,
198,
6738,
2219,
1330,
2604,
198,
11748,
340,
861,
10141,
198,
198,
2,
2773,
2276,
5608,
329,
3555,
428,
2393,
25,
198,
2,
198,
2,
3887,
3896,
26052,
617,
2422... | 4.047847 | 209 |
import datetime
import pathlib
from tempfile import NamedTemporaryFile
from typing import List, Dict
from backports.zoneinfo import ZoneInfo
from more_itertools import first
from openpyxl import Workbook
from openpyxl.styles import Alignment, Border, Side
from openpyxl.utils import get_column_letter
from openpyxl.work... | [
11748,
4818,
8079,
198,
11748,
3108,
8019,
198,
6738,
20218,
7753,
1330,
34441,
12966,
5551,
8979,
198,
6738,
19720,
1330,
7343,
11,
360,
713,
198,
198,
6738,
736,
3742,
13,
11340,
10951,
1330,
13035,
12360,
198,
6738,
517,
62,
270,
861... | 3.297753 | 178 |
# from numba import jit
import numpy as np
import logging
numba_logger = logging.getLogger('numba')
numba_logger.setLevel(logging.WARNING)
# @jit(nopython=True)
# @jit(nopython=True)
# @jit(nopython=True)
# @jit(nopython=True)
# @jit(nopython=True) | [
2,
422,
997,
7012,
1330,
474,
270,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
18931,
198,
77,
2178,
64,
62,
6404,
1362,
796,
18931,
13,
1136,
11187,
1362,
10786,
77,
2178,
64,
11537,
198,
77,
2178,
64,
62,
6404,
1362,
13,
2617,... | 2.333333 | 111 |
import torch
from fbgemm_gpu.split_table_batched_embeddings_ops import PoolingMode
from ...lib import pytorch as lib_pytorch
from ...lib.config import make_op_config
from ...lib.init_helper import load_modules
from ...lib.pytorch.config_util import (
ExecutionPass,
create_op_args,
create_op_info,
get_b... | [
11748,
28034,
198,
6738,
277,
65,
24090,
76,
62,
46999,
13,
35312,
62,
11487,
62,
8664,
1740,
62,
20521,
67,
654,
62,
2840,
1330,
19850,
278,
19076,
198,
198,
6738,
2644,
8019,
1330,
12972,
13165,
354,
355,
9195,
62,
9078,
13165,
354,... | 2.787356 | 174 |
import sys
import json
import requests
from src.senders import sender
| [
11748,
25064,
198,
11748,
33918,
198,
11748,
7007,
198,
198,
6738,
12351,
13,
82,
7338,
1330,
29788,
198
] | 3.944444 | 18 |
import os
from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch_ros.actions import Node
| [
11748,
28686,
198,
6738,
257,
434,
62,
9630,
62,
29412,
13,
43789,
1330,
651,
62,
26495,
62,
20077,
62,
34945,
198,
6738,
4219,
1330,
21225,
11828,
198,
6738,
4219,
62,
4951,
13,
4658,
1330,
19081,
198
] | 4.194444 | 36 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
#
# Copyright 2018 Dell Inc. or its subsidiaries. All rights reserved.
# Dell, EMC, and other trademarks are trademarks of Dell Inc. or its subsidiaries.
# Other trademarks may be trademarks of their respective owners.
#
# Licensed under the Apache License, Vers... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
201,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
2,
201,
198,
2,
201,
198,
2,
15069,
220,
2864,
23617,
3457,
13,
393,
663,
34943,
13,
1439,
2489,
1039... | 3.007692 | 520 |
from ..utils import get_logger
from .preprocessors import Preprocessor
LOGGER = get_logger(__name__)
| [
6738,
11485,
26791,
1330,
651,
62,
6404,
1362,
198,
6738,
764,
3866,
14681,
669,
1330,
3771,
41341,
198,
198,
25294,
30373,
796,
651,
62,
6404,
1362,
7,
834,
3672,
834,
8,
628
] | 3.21875 | 32 |
import discord
from discord.ext import commands
client = commands.Bot(command_prefix="-")
client.run("BOT TOKEN")
| [
11748,
36446,
201,
198,
6738,
36446,
13,
2302,
1330,
9729,
201,
198,
201,
198,
16366,
796,
9729,
13,
20630,
7,
21812,
62,
40290,
2625,
12,
4943,
201,
198,
201,
198,
201,
198,
201,
198,
16366,
13,
5143,
7203,
33,
2394,
5390,
43959,
4... | 2.653061 | 49 |
#!/usr/bin/env python
# coding: utf-8
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
from __future__ import print_function
from glob import glob
import os
from os.path import join as pjoin
from setuptools import setup, find_packages
HERE = os.path.dirname(os.path... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
2,
15069,
357,
66,
8,
449,
929,
88,
353,
7712,
4816,
13,
198,
2,
4307,
6169,
739,
262,
2846,
286,
262,
40499,
347,
10305,
13789,
13,
198... | 2.237525 | 501 |
#!/usr/bin python3
"""
<Description of the programme>
Author: Pouria Hadjibagheri <pouria.hadjibagheri@phe.gov.uk>
Created: 16 Dec 2020
License: MIT
Contributors: Pouria Hadjibagheri
"""
# Imports
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Python:... | [
2,
48443,
14629,
14,
8800,
21015,
18,
198,
198,
37811,
198,
27,
11828,
286,
262,
11383,
29,
198,
198,
13838,
25,
220,
220,
220,
220,
220,
220,
220,
350,
280,
7496,
11161,
73,
571,
30450,
72,
1279,
79,
280,
7496,
13,
18108,
73,
571... | 2.714047 | 598 |
import string
punctuation = string.punctuation + "" + '' + "" + ""
| [
11748,
4731,
198,
198,
79,
16260,
2288,
796,
4731,
13,
79,
16260,
2288,
1343,
13538,
1343,
10148,
1343,
13538,
1343,
13538,
198
] | 3.090909 | 22 |
#!/usr/bin/env python3
from abc import abstractmethod
from typing import Dict, Optional
from BeanPorter.bpcml.Exprs import Expr
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
6738,
450,
66,
1330,
12531,
24396,
198,
6738,
19720,
1330,
360,
713,
11,
32233,
198,
198,
6738,
26510,
47,
4337,
13,
65,
14751,
4029,
13,
3109,
1050,
82,
1330,
1475,
1050,
1... | 3.023256 | 43 |
import unittest
from conformalmapping import *
| [
11748,
555,
715,
395,
198,
6738,
17216,
38182,
5912,
1330,
1635,
198
] | 3.916667 | 12 |
# 01_img_read_save.py
# , ,
import cv2
im = cv2.imread("../test_img/Linus.png", #
1) # 1- 0-
print(type(im)) # : ndarray
print(im.shape) #
#
cv2.imshow("im", # (,)
im) # , imread
#
cv2.imwrite("Linus_new.png", #
im)#
cv2.waitKey() # ()
cv2.destroyAllWindows() # | [
2,
5534,
62,
9600,
62,
961,
62,
21928,
13,
9078,
198,
2,
837,
837,
220,
198,
11748,
269,
85,
17,
198,
198,
320,
796,
269,
85,
17,
13,
320,
961,
7203,
40720,
9288,
62,
9600,
14,
14993,
385,
13,
11134,
1600,
1303,
220,
198,
220,
... | 1.781609 | 174 |
# -*- coding: utf-8 -*-
import unittest
import sys
sys.path.append(u'../ftplugin')
import vim
from orgmode._vim import ORGMODE
from orgmode.py3compat.encode_compatibility import *
START = True
END = False
counter = 0
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
555,
715,
395,
198,
11748,
25064,
198,
17597,
13,
6978,
13,
33295,
7,
84,
6,
40720,
701,
33803,
11537,
198,
198,
11748,
43907,
198,
198,
6738,
8745,
14171,
... | 2.666667 | 84 |
my_dog = Dog('Willie',6)
your_dog = Dog('Lucy',2)
print(f"My dog's name is {my_dog.name}.")
print(f"My dog's age is {my_dog.age} years.")
my_dog.sit()
my_dog.roll_over()
print(f"Your dog's name is {my_dog.name}.")
print(f"Your dog's age is {my_dog.age} years.")
your_dog.sit()
| [
198,
1820,
62,
9703,
796,
8532,
10786,
8743,
494,
3256,
21,
8,
198,
14108,
62,
9703,
796,
8532,
10786,
25596,
948,
3256,
17,
8,
198,
198,
4798,
7,
69,
1,
3666,
3290,
338,
1438,
318,
1391,
1820,
62,
9703,
13,
3672,
92,
19570,
198,
... | 2.256 | 125 |
"""
Decorator to gate some of the tools here on what is available in the FL Studio
MIDI Scripting API version.
"""
import general
_fl_midi_scripting_api_version_number = general.getVersion()
| [
37811,
198,
10707,
273,
1352,
284,
8946,
617,
286,
262,
4899,
994,
319,
644,
318,
1695,
287,
262,
9977,
11733,
198,
44,
2389,
40,
12327,
278,
7824,
2196,
13,
198,
37811,
198,
11748,
2276,
628,
198,
62,
2704,
62,
13602,
72,
62,
12048... | 3.403509 | 57 |
import os
import threading
import queue
import numpy as np
from pyrosetta import (
pose_from_sequence,
MoveMap,
rosetta,
create_score_function,
SwitchResidueTypeSetMover,
)
from pyrosetta.rosetta.protocols.minimization_packing import MinMover
from score import score_it
| [
11748,
28686,
198,
11748,
4704,
278,
198,
11748,
16834,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
12972,
305,
2617,
8326,
1330,
357,
198,
220,
220,
220,
12705,
62,
6738,
62,
43167,
11,
198,
220,
220,
220,
10028,
13912,
11,
198,
2... | 2.733945 | 109 |
# -*- coding: utf-8 -*-
""" What is sendfile.py
This module is send 3gx to 3ds via FTP.
FTP3gx3ds
"""
import ftplib
from ftplib import FTP
print("--------------------------")
print("Trying to Send the Plugin over FTP...")
get_ftp = FTP()
HOST_ADDRESS = "192.168.0.50"
PORT = 5000
TIME_OUT = 30.0
try:
get_ftp.co... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
1867,
318,
3758,
7753,
13,
9078,
198,
1212,
8265,
318,
3758,
513,
70,
87,
284,
513,
9310,
2884,
45854,
13,
198,
37,
7250,
18,
70,
87,
18,
9310,
198,
37811,
19... | 2.297082 | 377 |
"""
Description: A Node is basically representing an osm-node. But the class Node also contains useful observer functions,
for example to convert the geometry of a Node-Object into several geo-formats, and mutator functions.
@date: 10/25/2019
@author: Lukas Felzmann, Sebastian Leilich, Kai Plautz
"""
from .node_id imp... | [
37811,
198,
11828,
25,
220,
317,
19081,
318,
6209,
10200,
281,
267,
5796,
12,
17440,
13,
887,
262,
1398,
19081,
635,
4909,
4465,
22890,
5499,
11,
198,
1640,
1672,
284,
10385,
262,
22939,
286,
257,
19081,
12,
10267,
656,
1811,
40087,
1... | 3.707071 | 99 |
""" Data Loader for CAEs on Unstructured Meshes """
import sys, os, pickle, argparse
import numpy as np
from tabulate import tabulate
from datetime import datetime
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from sklearn.cluster import DBSCAN
from scipy.spatial import distance_matrix
from ... | [
198,
37811,
6060,
8778,
263,
329,
7257,
23041,
319,
791,
7249,
1522,
14937,
956,
37227,
198,
11748,
25064,
11,
28686,
11,
2298,
293,
11,
1822,
29572,
198,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
7400,
5039,
1330,
7400,
5039,
198,... | 3.16087 | 230 |
# coding=utf-8
# Copyright 2021 The OneFlow Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | [
2,
19617,
28,
40477,
12,
23,
198,
2,
15069,
33448,
383,
1881,
37535,
46665,
13,
1439,
2489,
10395,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779... | 2.560458 | 612 |
if __name__ == "__main__":
print(Solution().spiralOrder(
[
[1]
]
))
print(Solution().spiralOrder(
[
[1, 2, 3, 4],
[5, 6, 7, 8],
[9, 10, 11, 12],
[13, 14, 15, 16],
[17, 18, 19, 20]
]
))
| [
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
3601,
7,
46344,
22446,
2777,
21093,
18743,
7,
198,
220,
220,
220,
220,
220,
220,
220,
685,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
22... | 1.512315 | 203 |
#!/usr/bin/env python
# -*- coding:UTF-8 -*-
import socket
for host in ['homer','www','www.python.org','nosuchnamenamenameche']:
print host
try:
hostname, aliases, addresses = socket.gethostbyname_ex(host)
print' Hostname:',hostname
print' Aliases:',aliases
print' Addresses:... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
48504,
12,
23,
532,
9,
12,
198,
198,
11748,
17802,
198,
198,
1640,
2583,
287,
37250,
71,
12057,
41707,
2503,
41707,
2503,
13,
29412,
13,
2398,
41707,
39369,... | 2.339181 | 171 |
import os
import time
import subprocess
import tempfile
import re
from worker import BupWorker
#from sudo import sudo
from fuse.root import FuseRoot
from fuse.bup import FuseBup
from fuse.sshfs import FuseSshfs
from fuse.google_drive import FuseGoogleDrive
from fuse.encfs import FuseEncfs
| [
11748,
28686,
198,
11748,
640,
198,
11748,
850,
14681,
198,
11748,
20218,
7753,
198,
11748,
302,
198,
198,
6738,
8383,
1330,
347,
929,
12468,
263,
198,
2,
6738,
21061,
1330,
21061,
198,
6738,
32738,
13,
15763,
1330,
376,
1904,
30016,
19... | 3.344828 | 87 |
"""
This is a collection of tags and filters for models which inherit from the MPTT model
:class:`~integreat_cms.cms.models.abstract_tree_node.AbstractTreeNode`
(:class:`~integreat_cms.cms.models.pages.page.Page` and
:class:`~integreat_cms.cms.models.languages.language_tree_node.LanguageTreeNode`).
"""
from django impo... | [
37811,
198,
1212,
318,
257,
4947,
286,
15940,
290,
16628,
329,
4981,
543,
16955,
422,
262,
4904,
15751,
2746,
198,
25,
4871,
25,
63,
93,
18908,
630,
62,
46406,
13,
46406,
13,
27530,
13,
397,
8709,
62,
21048,
62,
17440,
13,
23839,
27... | 3.173913 | 115 |
import json
import spacy
from nltk.tokenize import word_tokenize
import nltk
nltk.download('punkt')
# print("argss:")
# print(sys.argv[0])
# text = sys.argv[0]
print("Preprocessing the input file ...")
# text = """
# Ashwin Swarup:Alright, let's let's start then. So, welcome to the Daily call. So I wanted a basic ... | [
11748,
33918,
198,
11748,
599,
1590,
198,
6738,
299,
2528,
74,
13,
30001,
1096,
1330,
1573,
62,
30001,
1096,
198,
11748,
299,
2528,
74,
198,
77,
2528,
74,
13,
15002,
10786,
30354,
83,
11537,
198,
2,
3601,
7203,
853,
824,
25,
4943,
1... | 3.877133 | 879 |
from ..common import Ballot, BallotVotingResult, Message, node_factory
from ..network import Endpoint
from ..blockchain import Blockchain
from ..consensus import get_fba_module
from ..consensus.fba.isaac import IsaacState
from .util import StubTransport
IsaacConsensus = get_fba_module('isaac').IsaacConsensus
Isaa... | [
6738,
11485,
11321,
1330,
6932,
313,
11,
6932,
313,
53,
10720,
23004,
11,
16000,
11,
10139,
62,
69,
9548,
198,
6738,
11485,
27349,
1330,
5268,
4122,
198,
6738,
11485,
9967,
7983,
1330,
29724,
198,
6738,
11485,
5936,
7314,
1330,
651,
62,... | 3.424528 | 106 |
def reverse(x):
"""Given a 32-bit signed integer, reverse digits of an integer.
Solve:
Cast int to a string and use string slicing to easily do reversing
Args:
x (int): integer to reverse
Returns:
int: reversed integer or 0 if it exceeds the 32-bit signed integer range: [2^31,... | [
4299,
9575,
7,
87,
2599,
198,
220,
220,
220,
37227,
15056,
257,
3933,
12,
2545,
4488,
18253,
11,
9575,
19561,
286,
281,
18253,
13,
628,
220,
220,
220,
4294,
303,
25,
198,
220,
220,
220,
220,
220,
220,
220,
5833,
493,
284,
257,
473... | 2.386503 | 326 |
"""Create user_notification table.
Revision ID: 3ea865991c72
Revises: 4e8c8d41f23f
Create Date: 2020-04-15 18:43:23.856094
"""
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
from alembic import op
# revision identifiers, used by Alembic.
revision = "3ea865991c72"
down_revision = "4e8c8d41f23f"
b... | [
37811,
16447,
2836,
62,
1662,
2649,
3084,
13,
198,
198,
18009,
1166,
4522,
25,
513,
18213,
23,
2996,
2079,
16,
66,
4761,
198,
18009,
2696,
25,
604,
68,
23,
66,
23,
67,
3901,
69,
1954,
69,
198,
16447,
7536,
25,
12131,
12,
3023,
12,... | 2.238168 | 655 |
"""protocols table: add col is cool
Revision ID: 0974ecc7059c
Revises: a5d44f24dd74
Create Date: 2019-05-12 01:17:23.068006
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '0974ecc7059c'
down_revision = 'a5d44f24dd74'
branch_labels = None
depends_on = None
| [
37811,
11235,
4668,
82,
3084,
25,
751,
951,
318,
3608,
198,
198,
18009,
1166,
4522,
25,
7769,
4524,
68,
535,
2154,
3270,
66,
198,
18009,
2696,
25,
257,
20,
67,
2598,
69,
1731,
1860,
4524,
198,
16447,
7536,
25,
13130,
12,
2713,
12,
... | 2.484375 | 128 |
import argparse
from . import pipeline
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument("--creator", action="store_true",
help="Launch Instance Creator in standalone mode")
parser.add_argument("--loader", action="store_true",
... | [
11748,
1822,
29572,
198,
198,
6738,
764,
1330,
11523,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
30751,
796,
1822,
29572,
13,
28100,
1713,
46677,
3419,
198,
220,
220,
220,
30751,
13,
2860,
... | 2.510246 | 488 |
# clickbait_classifier.py
# Import libraries
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.svm import LinearSVC
from sklearn.metrics import accuracy_score
# globals
DATA_SET_FILE = "clickbait.txt"
if __name__ == '__main__':
main()
| [
2,
3904,
65,
4548,
62,
4871,
7483,
13,
9078,
628,
198,
2,
17267,
12782,
198,
6738,
1341,
35720,
13,
30053,
62,
2302,
7861,
13,
5239,
1330,
309,
69,
312,
69,
38469,
7509,
198,
6738,
1341,
35720,
13,
82,
14761,
1330,
44800,
50,
15922,... | 2.893617 | 94 |
import warnings
from commands.abstract_command import AbstractCommand
from config import ConfigKeys, Config
from googleapiclient.discovery import build
| [
11748,
14601,
201,
198,
201,
198,
6738,
9729,
13,
397,
8709,
62,
21812,
1330,
27741,
21575,
201,
198,
6738,
4566,
1330,
17056,
40729,
11,
17056,
201,
198,
6738,
23645,
499,
291,
75,
1153,
13,
67,
40821,
1330,
1382,
201,
198,
201,
198
... | 3.809524 | 42 |
#!/usr/bin/python3
from flask import Flask
from flask import request
from flask import send_file
app = Flask(__name__)
#To suppress Flask's request logs on stdout
import logging
from config import *
from mpls import *
from utils import *
from encapsulator.userspace import *
#Configured with StubAPI's constructor
CLI... | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
6738,
42903,
1330,
46947,
198,
6738,
42903,
1330,
2581,
198,
6738,
42903,
1330,
3758,
62,
7753,
198,
1324,
796,
46947,
7,
834,
3672,
834,
8,
198,
198,
2,
2514,
18175,
46947,
338,
2581,
... | 2.87037 | 270 |
import itertools
from armor import pattern
from armor import objects4 as ob
outputFolder = '/media/TOSHIBA EXT/ARMOR/labLogs2/charts2_local_features_distribution/misc/'
thres = 35
a= pattern.a
a.load()
getXY(a, a.name, thres)
thres = 20
wrf = ob.kongreywrf2
wrf.fix()
#k = wrf[212].load()
ks = [v for v in wrf if ... | [
11748,
340,
861,
10141,
198,
6738,
8328,
1330,
3912,
198,
6738,
8328,
1330,
5563,
19,
355,
909,
198,
198,
22915,
41092,
796,
31051,
11431,
14,
51,
2640,
25374,
4339,
27489,
14,
33456,
1581,
14,
23912,
11187,
82,
17,
14,
354,
5889,
17,... | 2.111446 | 332 |
# -*- coding: utf-8 -*- | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12
] | 1.769231 | 13 |
import logging
from datetime import date, timedelta
from swpt_creditors import procedures as p
from swpt_creditors import models as m
D_ID = -1
C_ID = 4294967296
| [
11748,
18931,
198,
6738,
4818,
8079,
1330,
3128,
11,
28805,
12514,
198,
6738,
1509,
457,
62,
66,
445,
6742,
1330,
9021,
355,
279,
198,
6738,
1509,
457,
62,
66,
445,
6742,
1330,
4981,
355,
285,
198,
198,
35,
62,
2389,
796,
532,
16,
... | 3.036364 | 55 |
from flask import render_template
from pajbot.managers.db import DBManager
from pajbot.models.module import Module
from pajbot.models.playsound import Playsound
from pajbot.modules import PlaysoundModule
| [
6738,
42903,
1330,
8543,
62,
28243,
198,
198,
6738,
279,
1228,
13645,
13,
805,
10321,
13,
9945,
1330,
20137,
13511,
198,
6738,
279,
1228,
13645,
13,
27530,
13,
21412,
1330,
19937,
198,
6738,
279,
1228,
13645,
13,
27530,
13,
26024,
633,
... | 3.678571 | 56 |
from django.test import TestCase
from django.utils import timezone
from django.db import IntegrityError
from django.core.exceptions import MultipleObjectsReturned
from core.tests.mommy_utils import make_recipe, make_user
from timer.models import Timer
| [
6738,
42625,
14208,
13,
9288,
1330,
6208,
20448,
198,
6738,
42625,
14208,
13,
26791,
1330,
640,
11340,
198,
6738,
42625,
14208,
13,
9945,
1330,
39348,
12331,
198,
6738,
42625,
14208,
13,
7295,
13,
1069,
11755,
1330,
20401,
10267,
82,
1361... | 3.591549 | 71 |
"""
Cria uma classe trem que possui carros. O trem itervel e cada elemento
retornado pela iterao retorna um sring com o nmero do carro.
"""
| [
37811,
198,
34,
7496,
334,
2611,
537,
21612,
10023,
8358,
1184,
9019,
1097,
4951,
13,
440,
10023,
220,
11629,
626,
304,
269,
4763,
5002,
78,
198,
1186,
1211,
4533,
279,
10304,
11629,
5488,
1005,
1211,
64,
23781,
264,
1806,
401,
267,
2... | 2.784314 | 51 |
# Generated by Django 3.2.4 on 2021-06-22 09:16
from django.db import migrations
| [
2,
2980,
515,
416,
37770,
513,
13,
17,
13,
19,
319,
33448,
12,
3312,
12,
1828,
7769,
25,
1433,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
628
] | 2.766667 | 30 |
# -*- coding: utf-8 -*-
"""
Created on Wed Oct 28 18:37:58 2020
@author: giamm
"""
# from tictoc import tic, toc
import numpy as np
import datareader #routine created to properly read the files needed in the following
from load_profiler import load_profiler as lp
##################################################... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
3300,
2556,
2579,
1248,
25,
2718,
25,
3365,
12131,
198,
198,
31,
9800,
25,
308,
1789,
76,
198,
37811,
198,
198,
2,
422,
256,
713,
420,
1330,
... | 2.612503 | 3,631 |
from admins import Admin, Privileges
eric = Admin('eric', 'matthes', 'e_mattches', 'e_mattches@example.com', 'alaska')
eric_privileges = [
'can reset passwords',
'can moderate discussions',
'can suspend accounts',
]
eric.privileges.privileges = eric_privileges
eric.privileges.show_privileges()
| [
6738,
44563,
1330,
32053,
11,
9243,
576,
3212,
198,
198,
35626,
796,
32053,
10786,
35626,
3256,
705,
76,
1078,
956,
3256,
705,
68,
62,
76,
1078,
2052,
3256,
705,
68,
62,
76,
1078,
2052,
31,
20688,
13,
785,
3256,
705,
282,
8480,
1153... | 2.758929 | 112 |
import numpy as np
import os
import json
import matplotlib
matplotlib.use('Agg')
from matplotlib import pyplot as plt
os.makedirs("data",exist_ok=True)
np.random.seed(10)
filename="config_base.json"
o=json.load(open(filename))
print(o)
for j in range(10):
i=j+1
o['data_train_npy']='data/data_train.n'+str(i)+'... | [
11748,
299,
32152,
355,
45941,
198,
11748,
28686,
198,
11748,
33918,
198,
11748,
2603,
29487,
8019,
198,
6759,
29487,
8019,
13,
1904,
10786,
46384,
11537,
198,
6738,
2603,
29487,
8019,
1330,
12972,
29487,
355,
458,
83,
198,
198,
418,
13,
... | 2.156194 | 557 |
from __future__ import absolute_import, print_function
from plot_bokeh.plot_bokeh import *
| [
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
11,
3601,
62,
8818,
198,
198,
6738,
7110,
62,
65,
2088,
71,
13,
29487,
62,
65,
2088,
71,
1330,
1635,
198
] | 3.172414 | 29 |
"""Model functions sensitivity analysis clinic at CSDMS 2019.
Written by Nathan Lyons, May 2019
"""
from os.path import join
from landlab import RasterModelGrid
from landlab.components import FastscapeEroder, FlowAccumulator, LinearDiffuser
from landlab.io import write_esri_ascii
import numpy as np
import experiment... | [
37811,
17633,
5499,
14233,
3781,
15760,
379,
9429,
35,
5653,
13130,
13,
198,
198,
25354,
416,
18106,
43728,
11,
1737,
13130,
198,
37811,
198,
6738,
28686,
13,
6978,
1330,
4654,
198,
198,
6738,
1956,
23912,
1330,
371,
1603,
17633,
41339,
... | 2.222571 | 1,914 |
import os
import pandas as pd
import pickle as pkl
import numpy as np
import argparse
import yaml
import librosa
import scipy
from scipy.io import wavfile
import multiprocessing
import time
import datetime
import socket
def resample_wav_data(wav_data, orig_sr, target_sr):
""" Resample wav_data from sampling rate ... | [
11748,
28686,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
2298,
293,
355,
279,
41582,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
1822,
29572,
198,
11748,
331,
43695,
198,
198,
11748,
9195,
4951,
64,
198,
11748,
629,
541,
88,
... | 2.701872 | 748 |
from ..utils import TranspileTestCase, BuiltinFunctionTestCase
| [
6738,
11485,
26791,
1330,
3602,
79,
576,
14402,
20448,
11,
28477,
259,
22203,
14402,
20448,
628,
628
] | 3.882353 | 17 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
...........................................................................
..............................................................
........................................................
....................................................
..................... | [
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,
628,
198,
23193,
2109,
986,
198,
8864,
27754,
16317,
198,
8864,
27754,
198,
8864,
4181,
1106,
198,
8864,
49... | 4.23716 | 662 |
import datetime
import numpy as np
from pynwb import NWBHDF5IO, NWBFile
from pynwb.core import DynamicTableRegion
from pynwb.device import Device
from pynwb.ecephys import ElectrodeGroup
from pynwb.file import ElectrodeTable as get_electrode_table
from pynwb.testing import TestCase, remove_test_file, AcquisitionH5IOMi... | [
11748,
4818,
8079,
198,
11748,
299,
32152,
355,
45941,
198,
198,
6738,
279,
2047,
39346,
1330,
21966,
33,
39,
8068,
20,
9399,
11,
21966,
33,
8979,
198,
6738,
279,
2047,
39346,
13,
7295,
1330,
26977,
10962,
47371,
198,
6738,
279,
2047,
... | 3.112903 | 124 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Views for CCDC file documetnation pages.
"""
# Django tricks
from django.apps import apps
from django.http import Http404
from django.urls import reverse
from calaccess_website.templatetags.calaccess_website_tags import slugify
# Models
from calaccess_processed.models ... | [
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,
7680,
82,
329,
327,
47667,
2393,
2205,
388,
316,
25729,
5468,
13,
198,
37811,
198,
2,
37770,
15910,
198,
... | 2.914063 | 384 |
from enum import IntEnum, unique
from django.contrib.auth import get_user_model
from django.db import models
from django.db.models.signals import post_delete, post_save
from django.dispatch import receiver
from django.utils import timezone
from comment.models import Comment
from comment.managers import ReactionManage... | [
6738,
33829,
1330,
2558,
4834,
388,
11,
3748,
198,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
1330,
651,
62,
7220,
62,
19849,
198,
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
42625,
14208,
13,
9945,
13,
27530,
13,
126... | 3.784946 | 93 |
from gorp.readfiles import *
from gorp.test.test_ku_options import setup_tempdir
import itertools
import unittest
og_dirname = os.getcwd()
if __name__ == "__main__":
unittest.main()
| [
6738,
308,
16300,
13,
961,
16624,
1330,
1635,
198,
6738,
308,
16300,
13,
9288,
13,
9288,
62,
23063,
62,
25811,
1330,
9058,
62,
29510,
15908,
198,
11748,
340,
861,
10141,
198,
11748,
555,
715,
395,
198,
198,
519,
62,
15908,
3672,
796,
... | 2.652778 | 72 |
"""
Implement a REST-ful API interface.
"""
| [
37811,
198,
3546,
26908,
257,
30617,
12,
913,
7824,
7071,
13,
198,
198,
37811,
198
] | 3 | 15 |
"""
stanCode Breakout Project
Adapted from Eric Roberts's Breakout by
Sonja Johnson-Yu, Kylie Jue, Nick Bowman,
and Jerry Liao
YOUR DESCRIPTION HERE
"""
from campy.graphics.gwindow import GWindow
from campy.graphics.gobjects import GOval, GRect, GLabel
from campy.gui.events.mouse import onmouseclicked, onmousemoved
im... | [
37811,
198,
14192,
10669,
12243,
448,
4935,
198,
48003,
276,
422,
7651,
10918,
338,
12243,
448,
416,
198,
31056,
6592,
5030,
12,
40728,
11,
39859,
494,
449,
518,
11,
8047,
38774,
11,
198,
392,
13075,
406,
13481,
198,
198,
56,
11698,
2... | 2.960094 | 426 |
n = int(input())
s = set(map(int, input().split()))
N = int(input())
for i in range(N):
cmd = input()
B = set(map(int, input().split()))
if "symmetric_difference_update" in cmd:
s.symmetric_difference_update(B)
elif "intersection_update" in cmd:
s.intersection_update(B)
elif "diffe... | [
77,
796,
493,
7,
15414,
28955,
198,
82,
796,
900,
7,
8899,
7,
600,
11,
5128,
22446,
35312,
3419,
4008,
198,
198,
45,
796,
493,
7,
15414,
28955,
198,
198,
1640,
1312,
287,
2837,
7,
45,
2599,
198,
220,
220,
220,
23991,
796,
5128,
... | 2.17 | 200 |
import time
from pathlib import Path
from Procedures.ProcessProcedure import ProcessProcedure
from Controllers.ROS.IROSController import IROSController
from Procedures.OutputProcedure import OutputProcedure as output
### =========================================================
### | ... | [
11748,
640,
198,
6738,
3108,
8019,
1330,
10644,
198,
6738,
43698,
13,
18709,
2964,
771,
495,
1330,
10854,
2964,
771,
495,
198,
6738,
2345,
36667,
13,
49,
2640,
13,
4663,
2640,
22130,
1330,
14826,
2640,
22130,
198,
6738,
43698,
13,
26410... | 1.964228 | 615 |
import io, json, random
import matplotlib.pyplot as plt
from sklearn.metrics.pairwise import pairwise_distances
from matplotlib.backends.backend_pdf import PdfPages
if __name__ == "__main__":
main()
| [
11748,
33245,
11,
33918,
11,
4738,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
6738,
1341,
35720,
13,
4164,
10466,
13,
24874,
3083,
1330,
5166,
3083,
62,
17080,
1817,
198,
6738,
2603,
29487,
8019,
13,
1891,
2412,
... | 2.626506 | 83 |
import os
try:
from importlib.metadata import metadata # Python 3.8
except ImportError:
from importlib_metadata import metadata # Python < 3.8
COBU_DIR = os.path.dirname(os.path.abspath(__file__))
BASE_DIR = os.path.dirname(COBU_DIR)
DATA_DIR = os.path.join(BASE_DIR, 'data')
# package metadata
_META = metad... | [
11748,
28686,
198,
28311,
25,
198,
220,
220,
220,
422,
1330,
8019,
13,
38993,
1330,
20150,
220,
1303,
11361,
513,
13,
23,
198,
16341,
17267,
12331,
25,
198,
220,
220,
220,
422,
1330,
8019,
62,
38993,
1330,
20150,
220,
1303,
11361,
127... | 2.573333 | 225 |
#!/usr/bin/env python
# encoding: utf-8
from __future__ import print_function
"""
wandroid devices
"""
import pkg_resources
import wandroid.adbw as adbw
import unittest
if __name__ == "__main__":
import sys
sys.exit(main())
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
21004,
25,
3384,
69,
12,
23,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
37811,
198,
86,
19411,
4410,
198,
37811,
198,
11748,
279,
10025,
62,
37540,
198,
11748,
11569,
... | 2.715909 | 88 |
# coding=utf-8
#
# created by kpe on 10.08.2019 at 12:39 AM
#
from __future__ import division, absolute_import, print_function
import math
from tensorflow import keras
| [
2,
19617,
28,
40477,
12,
23,
198,
2,
198,
2,
2727,
416,
479,
431,
319,
838,
13,
2919,
13,
23344,
379,
1105,
25,
2670,
3001,
198,
2,
198,
198,
6738,
11593,
37443,
834,
1330,
7297,
11,
4112,
62,
11748,
11,
3601,
62,
8818,
198,
198... | 3.017544 | 57 |
from django.views.generic.base import TemplateView
from django.conf.urls import patterns, url
from .views import index_view, signup_view, about_view, search_view, \
home_view, contact_view
urlpatterns = [
url(r'^$', index_view, name="index"),
url(r'^search$', search_view, name="search"),
url(r'^contact$'... | [
6738,
42625,
14208,
13,
33571,
13,
41357,
13,
8692,
1330,
37350,
7680,
198,
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
7572,
11,
19016,
198,
6738,
764,
33571,
1330,
6376,
62,
1177,
11,
1051,
929,
62,
1177,
11,
546,
62,
1177,
... | 2.680723 | 166 |
import socket
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect(('localhost', 7777))
sock.send('Hello, server! :)'.encode('utf-8'))
d = sock.recv(1024)
print(d.decode('utf-8'))
sock.close() | [
11748,
17802,
198,
198,
82,
735,
796,
17802,
13,
44971,
7,
44971,
13,
8579,
62,
1268,
2767,
11,
17802,
13,
50,
11290,
62,
2257,
32235,
8,
198,
82,
735,
13,
8443,
7,
10786,
36750,
3256,
767,
29331,
4008,
198,
82,
735,
13,
21280,
10... | 2.382022 | 89 |
# MIT License
# Copyright (c) 2020 Eduardo Pignatelli
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, me... | [
2,
17168,
13789,
198,
198,
2,
15069,
357,
66,
8,
12131,
40766,
13109,
350,
570,
7528,
72,
198,
198,
2,
2448,
3411,
318,
29376,
7520,
11,
1479,
286,
3877,
11,
284,
597,
1048,
16727,
257,
4866,
198,
2,
286,
428,
3788,
290,
3917,
103... | 2.78774 | 1,093 |
import asyncio
import json
import websockets
from merkato.merkato_config import get_config
from merkato.parser import parse
from merkato.utils.database_utils import no_merkatos_table_exists, create_merkatos_table, drop_merkatos_table, \
no_exchanges_table_exists, create_exchanges_table, drop_exchanges_table
impor... | [
11748,
30351,
952,
198,
11748,
33918,
198,
11748,
2639,
11603,
198,
198,
6738,
4017,
74,
5549,
13,
647,
74,
5549,
62,
11250,
1330,
651,
62,
11250,
198,
6738,
4017,
74,
5549,
13,
48610,
1330,
21136,
198,
6738,
4017,
74,
5549,
13,
26791... | 3.311203 | 241 |
import re
| [
11748,
302,
628,
628
] | 3.25 | 4 |
import binaryninja
from .golang_symbol_restore import restore_golang_symbols
binaryninja.plugin.PluginCommand.register("Restore Golang Symbols",
"Fill region with breakpoint instructions.",
restore_golang_symbols)
| [
11748,
13934,
35073,
6592,
198,
6738,
764,
70,
349,
648,
62,
1837,
23650,
62,
2118,
382,
1330,
11169,
62,
70,
349,
648,
62,
1837,
2022,
10220,
198,
198,
39491,
35073,
6592,
13,
33803,
13,
37233,
21575,
13,
30238,
7203,
19452,
382,
268... | 2.006711 | 149 |
import torch
import torch.utils.data as data
from torchsummary import summary
from datasets import get_dataset, HyperX,sHyperX
from models import get_model, train,test
from utils import sample_gt,get_device,metrics,compute_imf_weights
import visdom
import argparse
import numpy as np
import cv2
from models_liu import t... | [
198,
11748,
28034,
198,
11748,
28034,
13,
26791,
13,
7890,
355,
1366,
198,
6738,
28034,
49736,
1330,
10638,
198,
6738,
40522,
1330,
651,
62,
19608,
292,
316,
11,
15079,
55,
11,
82,
38197,
55,
198,
6738,
4981,
1330,
651,
62,
19849,
11,... | 2.128468 | 5,371 |
import torch
import matplotlib.pyplot as plt
import numpy as np
import time
from torch import optim, nn
from torch.autograd import Variable
from torch.utils.data import DataLoader
from tensorboardX import SummaryWriter
from models.DecomposableAttention import DecomposableAttention
from models.BiLSTMMaxPooling import ... | [
11748,
28034,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
640,
198,
198,
6738,
28034,
1330,
6436,
11,
299,
77,
198,
6738,
28034,
13,
2306,
519,
6335,
1330,
35748,
198,
... | 3.550847 | 118 |
import scrapy
| [
11748,
15881,
88,
198
] | 3.5 | 4 |
from django import forms
from django.forms.models import inlineformset_factory
from django.contrib.auth.models import User
from django.core.exceptions import ValidationError
from schedule.models import *
OtherCommitmentFormset = inlineformset_factory(Person,
OtherCommitment,
extra=2,
fields=['... | [
6738,
42625,
14208,
1330,
5107,
198,
6738,
42625,
14208,
13,
23914,
13,
27530,
1330,
26098,
687,
2617,
62,
69,
9548,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27530,
1330,
11787,
198,
6738,
42625,
14208,
13,
7295,
13,
1069,... | 2.907563 | 119 |
# noinspection PyPep8
# noinspection PyArgumentList
"""
AUTO-GENERATED BY `scripts/generate_protocol.py` using `data/browser_protocol.json`
and `data/js_protocol.json` as inputs! Please do not modify this file.
"""
import logging
from typing import Any, Optional, Union
from chromewhip.helpers import PayloadMixin, Ba... | [
2,
645,
1040,
14978,
9485,
47,
538,
23,
198,
2,
645,
1040,
14978,
9485,
28100,
1713,
8053,
198,
198,
37811,
198,
39371,
46,
12,
35353,
1137,
11617,
11050,
4600,
46521,
14,
8612,
378,
62,
11235,
4668,
13,
9078,
63,
1262,
4600,
7890,
... | 3.086667 | 150 |
import argparse
import csv
import dataset
engine_kwargs = {"pool_recycle": 3600, "connect_args": {'timeout': 300, "check_same_thread": False}}
# TODO: Setup initiall for
parser = argparse.ArgumentParser(
description='Randomly sample from the database stories')
parser.add_argument('--database', required=True, ... | [
11748,
1822,
29572,
198,
11748,
269,
21370,
198,
198,
11748,
27039,
198,
198,
18392,
62,
46265,
22046,
796,
19779,
7742,
62,
260,
13696,
1298,
4570,
405,
11,
366,
8443,
62,
22046,
1298,
1391,
6,
48678,
10354,
5867,
11,
366,
9122,
62,
... | 3.195652 | 276 |
"""pdjn - the CLI tool of Pidjn"""
from setuptools import setup
setup(
name='pdjn',
version='0.1',
description="CLI tool for managing Pydjn sites",
url='https://github.com/hipikat/hpk.io/tree/master/src/cli',
license='ISC',
author='Ada Wright',
author_email='ada@hpk.io',
py_modules=['... | [
37811,
79,
28241,
77,
532,
262,
43749,
2891,
286,
350,
312,
73,
77,
37811,
198,
198,
6738,
900,
37623,
10141,
1330,
9058,
628,
198,
40406,
7,
198,
220,
220,
220,
1438,
11639,
79,
28241,
77,
3256,
198,
220,
220,
220,
2196,
11639,
15,... | 2.448101 | 395 |
#!/usr/bin/env python
import sys
import linktap
import time
import logging
try:
import polyinterface
CLOUD = False
except ImportError:
import pgc_interface as polyinterface
CLOUD = True
LOGGER = polyinterface.LOGGER
logging.getLogger('urllib3').setLevel(logging.INFO)
if __name__ == "__main__":
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
25064,
198,
11748,
2792,
44335,
198,
11748,
640,
198,
11748,
18931,
198,
198,
28311,
25,
198,
220,
220,
220,
1330,
7514,
39994,
198,
220,
220,
220,
7852,
2606,
35,
796,
103... | 2.431818 | 264 |
#!/usr/bin/env python
# encoding: utf-8
"""Note passing from Python"""
from __future__ import absolute_import
from __future__ import print_function
from mpi4py import MPI
import numpy
comm = MPI.COMM_WORLD
rank = comm.Get_rank()
size = comm.Get_size()
tag = 42
N = 10
if rank == 0:
data = numpy.arange(N, dtype... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
21004,
25,
3384,
69,
12,
23,
198,
198,
37811,
6425,
6427,
422,
11361,
37811,
198,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
... | 2.501377 | 363 |
from metanic.settings.defaults import INSTALLED_APPS
from metanic.settings.defaults import MIDDLEWARE
from metanic.settings.defaults import REST_FRAMEWORK
from metanic.settings.defaults import cache_url
from metanic.settings.defaults import env_value
from metanic.settings.defaults import project_path
# We specificall... | [
6738,
1138,
26277,
13,
33692,
13,
12286,
82,
1330,
40589,
7036,
1961,
62,
2969,
3705,
198,
6738,
1138,
26277,
13,
33692,
13,
12286,
82,
1330,
25269,
35,
2538,
33746,
198,
6738,
1138,
26277,
13,
33692,
13,
12286,
82,
1330,
30617,
62,
1... | 2.310101 | 990 |
from sensor.models import Sensors
from sensor.serializers import TempSerializer
from rest_framework import generics
from django.shortcuts import render
from django.http import JsonResponse
# Create your views here.
# htmlgps
| [
6738,
12694,
13,
27530,
1330,
14173,
669,
201,
198,
6738,
12694,
13,
46911,
11341,
1330,
24189,
32634,
7509,
201,
198,
6738,
1334,
62,
30604,
1330,
1152,
873,
201,
198,
201,
198,
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
201,
19... | 3.210526 | 76 |
"""
Make sure to run with `python -m pytest` instead of `pytest`. That
way the root project directory is added to sys.path.
"""
import pytest
from encase import Encase
| [
37811,
198,
12050,
1654,
284,
1057,
351,
4600,
29412,
532,
76,
12972,
9288,
63,
2427,
286,
4600,
9078,
9288,
44646,
1320,
198,
1014,
262,
6808,
1628,
8619,
318,
2087,
284,
25064,
13,
6978,
13,
198,
37811,
198,
198,
11748,
12972,
9288,
... | 3.320755 | 53 |
from functools import wraps
# Easy inteceptor for tracing
# Error handlers
| [
6738,
1257,
310,
10141,
1330,
27521,
198,
198,
2,
16789,
493,
68,
49492,
329,
35328,
198,
198,
2,
13047,
32847,
628
] | 3.714286 | 21 |
# Copyright (c) 2018 Copyright holder of the paper Generative Adversarial Model Learning
# submitted to NeurIPS 2019 for review
# All rights reserved.
| [
2,
15069,
357,
66,
8,
2864,
15069,
15762,
286,
262,
3348,
2980,
876,
1215,
690,
36098,
9104,
18252,
198,
2,
8948,
284,
3169,
333,
47643,
13130,
329,
2423,
198,
2,
1439,
2489,
10395,
13,
198
] | 4.314286 | 35 |
from engagement.engager import Engager
from engagement.engagement_exception import EngagementException
from entities.acurerate_attributes import P, C
from utils.acurerate_utils import AcureRateUtils
import clearbit
| [
6738,
12352,
13,
1516,
3536,
1330,
1985,
3536,
198,
6738,
12352,
13,
1516,
5082,
62,
1069,
4516,
1330,
1985,
5082,
16922,
198,
198,
6738,
12066,
13,
330,
495,
4873,
62,
1078,
7657,
1330,
350,
11,
327,
198,
6738,
3384,
4487,
13,
330,
... | 3.807018 | 57 |
from knapsack import Knapsack
| [
6738,
638,
1686,
441,
1330,
6102,
1686,
441,
628
] | 3.444444 | 9 |
constants.physical_constants["nuclear magneton in inverse meters per tesla"] | [
9979,
1187,
13,
42854,
62,
9979,
1187,
14692,
43131,
19972,
261,
287,
34062,
10700,
583,
256,
274,
5031,
8973
] | 4 | 19 |
import logging
from hdx.location.country import Country
from hdx.scraper.base_scraper import BaseScraper
logger = logging.getLogger(__name__)
| [
11748,
18931,
198,
198,
6738,
289,
34350,
13,
24886,
13,
19315,
1330,
12946,
198,
6738,
289,
34350,
13,
1416,
38545,
13,
8692,
62,
1416,
38545,
1330,
7308,
3351,
38545,
198,
198,
6404,
1362,
796,
18931,
13,
1136,
11187,
1362,
7,
834,
... | 3.222222 | 45 |
from os.path import join
import torch
import config
from models.attention_model import ZReader as ZReader_attn
from models.fnet_model import ZReader as ZReader_fnet
if __name__ == "__main__":
str_true = "thehighwayroundsacurveandtransitionstondstreetrunningeastwardthroughmorefarmlandasthetrunklineappro" \
... | [
6738,
28686,
13,
6978,
1330,
4654,
198,
198,
11748,
28034,
198,
198,
11748,
4566,
198,
6738,
4981,
13,
1078,
1463,
62,
19849,
1330,
1168,
33634,
355,
1168,
33634,
62,
1078,
77,
198,
6738,
4981,
13,
69,
3262,
62,
19849,
1330,
1168,
336... | 2.227099 | 524 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim: sw=4:ts=4:expandtab
"""
meza
~~~~
Provides methods for reading and processing data from tabular formatted files
Attributes:
CURRENCIES [tuple(unicode)]: Currency symbols to remove from decimal
strings.
ENCODING (str): Default file encoding.
DEF... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
43907,
25,
1509,
28,
19,
25,
912,
28,
19,
25,
11201,
392,
8658,
198,
198,
37811,
198,
1326,
4496,
198,
8728,
198... | 2.608069 | 347 |
from functional_groups import SMARTS_ATOM_MAP
from typing import List, Tuple
import numpy as np
#typedef
xyzcoord = Tuple[float, float, float] | [
6738,
10345,
62,
24432,
1330,
9447,
1503,
4694,
62,
1404,
2662,
62,
33767,
198,
6738,
19720,
1330,
7343,
11,
309,
29291,
198,
198,
11748,
299,
32152,
355,
45941,
198,
198,
2,
774,
9124,
891,
198,
5431,
89,
37652,
796,
309,
29291,
58,
... | 3 | 48 |
# -*- coding: utf-8 -*-
"""
Created on Mon Nov 11 13:35:09 2019
@author: Petronium
"""
# Import system modules
import rasterio
from rasterio.plot import show
fp1 = r'Bathymetry_Clip.tif'
fp2 = r'Shipping_Clip.tif'
fp3 = r'WindMap_Clip.tif'
bathymetry = rasterio.open(fp1)
shipping = rasterio.open(fp2)
windspeed = ra... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
2892,
5267,
1367,
1511,
25,
2327,
25,
2931,
13130,
198,
198,
31,
9800,
25,
4767,
1313,
1505,
198,
37811,
198,
198,
2,
17267,
1080,
13103,
198,
... | 2.22688 | 811 |
#!/usr/bin/env python
# encoding: utf-8
"""
@version: ??
@author: liangliangyy
@license: MIT Licence
@contact: liangliangyy@gmail.com
@site: https://www.lylinux.net/
@software: PyCharm
@file: viewmodels.py
@time: 2018/6/9 1:28
"""
from rest_framework import serializers
from accounts.models import UserModel, WxUserMo... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
21004,
25,
3384,
69,
12,
23,
628,
198,
37811,
198,
31,
9641,
25,
19153,
198,
31,
9800,
25,
7649,
648,
4528,
648,
22556,
198,
31,
43085,
25,
17168,
10483,
594,
220,
198,
31,
3205... | 3.029126 | 206 |
#!/usr/bin/env python
import requests
from PIL import Image
from .image_utils import image_to_base64
from .results import ClassificationResult
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
11748,
7007,
198,
6738,
350,
4146,
1330,
7412,
198,
198,
6738,
764,
9060,
62,
26791,
1330,
2939,
62,
1462,
62,
8692,
2414,
198,
6738,
764,
43420,
1330,
40984,
23004,
628
] | 3.717949 | 39 |
# 2678 - Discagem por Voz
# https://www.urionlinejudge.com.br/judge/pt/problems/view/2678
if __name__ == "__main__":
main()
| [
2,
2608,
3695,
532,
8444,
363,
368,
16964,
569,
8590,
198,
2,
3740,
1378,
2503,
13,
40956,
1370,
10456,
469,
13,
785,
13,
1671,
14,
10456,
469,
14,
457,
14,
1676,
22143,
14,
1177,
14,
2075,
3695,
628,
628,
198,
361,
11593,
3672,
8... | 2.315789 | 57 |
import json
from .base_test import BaseTestCase
| [
11748,
33918,
198,
6738,
764,
8692,
62,
9288,
1330,
7308,
14402,
20448,
628
] | 3.769231 | 13 |
import setuptools
import pyside2_style_test as testkit
with open("README.md", "r") as fh:
long_description = fh.read()
with open("requirements.txt", "r") as req:
dependencies = req.read()
setuptools.setup(
name="m3-pyside2-style-test",
version=testkit.__version__,
author=testkit.__author__,
auth... | [
11748,
900,
37623,
10141,
198,
11748,
279,
893,
485,
17,
62,
7635,
62,
9288,
355,
1332,
15813,
198,
198,
4480,
1280,
7203,
15675,
11682,
13,
9132,
1600,
366,
81,
4943,
355,
277,
71,
25,
198,
220,
220,
220,
890,
62,
11213,
796,
277,
... | 2.612536 | 351 |
from presidio_anonymizer.entities import AnonymizerResult
from presidio_anonymizer.entities.anonymized_entity import AnonymizedEntity
| [
6738,
906,
312,
952,
62,
272,
5177,
7509,
13,
298,
871,
1330,
1052,
5177,
7509,
23004,
198,
6738,
906,
312,
952,
62,
272,
5177,
7509,
13,
298,
871,
13,
272,
5177,
1143,
62,
26858,
1330,
1052,
5177,
1143,
32398,
628,
628,
628,
628
] | 3.27907 | 43 |
import time
import torch
# Project imports
from utils import *
from options import TrainOptions
from data_loaders import create_dataloader
from methods import create_method
if __name__ == '__main__':
main()
print("YOU ARE TERMINATED!")
| [
11748,
640,
198,
11748,
28034,
198,
198,
2,
4935,
17944,
198,
6738,
3384,
4487,
1330,
1635,
198,
6738,
3689,
1330,
16835,
29046,
198,
6738,
1366,
62,
2220,
364,
1330,
2251,
62,
67,
10254,
1170,
263,
198,
6738,
5050,
1330,
2251,
62,
24... | 3.32 | 75 |
import numpy as np
import cv2
# -------- Aufgabe3.4 -------- #
# Vector um Grenz- und Breitenwert zu speichern
vec = np.zeros((5, 2))
crop = ["crop1", "crop2", "crop3", "crop4", "crop5"]
# Bild einlesen und in Schwarz - Wei umwandeln
image = cv2.imread('data/korrigiertes_bild2.png', cv2.IMREAD_GRAYSCALE)
# Grenz- u... | [
11748,
299,
32152,
355,
45941,
198,
11748,
269,
85,
17,
198,
198,
2,
24200,
317,
3046,
70,
11231,
18,
13,
19,
24200,
1303,
198,
198,
2,
20650,
23781,
19674,
89,
12,
3318,
3719,
270,
268,
86,
861,
1976,
84,
693,
291,
2881,
198,
351... | 2.177281 | 581 |
# NO_TEEN_SUM
| [
2,
8005,
62,
9328,
1677,
62,
50,
5883,
201
] | 1.555556 | 9 |