content stringlengths 1 1.05M | input_ids listlengths 1 883k | ratio_char_token float64 1 22.9 | token_count int64 1 883k |
|---|---|---|---|
from pydantic import BaseModel | [
6738,
279,
5173,
5109,
1330,
7308,
17633
] | 4.285714 | 7 |
from unittest import TestCase, main
from unittest.mock import patch, MagicMock, call
from monolith_filemanager.adapters.s3_processes import S3ProcessesAdapter, S3ProcessesAdapterError
if __name__ == "__main__":
main()
| [
6738,
555,
715,
395,
1330,
6208,
20448,
11,
1388,
198,
6738,
555,
715,
395,
13,
76,
735,
1330,
8529,
11,
6139,
44,
735,
11,
869,
198,
6738,
937,
21446,
62,
7753,
37153,
13,
324,
12126,
13,
82,
18,
62,
14681,
274,
1330,
311,
18,
... | 3.040541 | 74 |
from sklearn import tree
#[height, weight, shoe size]
X = [[181,80,44], [177,70, 43],[160, 60,38],[154, 54, 37], [166,65,40], [190, 90, 47], [175, 64, 39], [177, 70, 40],[159, 55, 45],[171, 75, 42], [181, 85, 43] ]
Y = ['male', 'female', 'female', 'female', 'male','male', 'male', 'female', 'male', 'female', 'male']
... | [
6738,
1341,
35720,
1330,
5509,
198,
198,
2,
58,
17015,
11,
3463,
11,
17292,
2546,
60,
198,
198,
55,
796,
16410,
27057,
11,
1795,
11,
2598,
4357,
685,
22413,
11,
2154,
11,
5946,
38430,
14198,
11,
3126,
11,
2548,
38430,
21526,
11,
717... | 2.428571 | 189 |
#!/usr/bin/env python
from Asap.Setup.Lattice.FCCOrtho import *
from Asap.Setup.Dislocation import Dislocation
from ASE.ChemicalElements import Element
from Asap import *
from Asap.Trajectories import NetCDFTrajectory
from ASE.Visualization.PrimiPlotter import *
from Numeric import *
splitting = 5
size = (25, 35, 10)... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
6738,
1081,
499,
13,
40786,
13,
43,
1078,
501,
13,
37,
4093,
5574,
400,
78,
1330,
1635,
198,
6738,
1081,
499,
13,
40786,
13,
35,
3044,
5040,
1330,
360,
3044,
5040,
198,
6738,
... | 2.462821 | 780 |
import time
from collections import defaultdict
from .. import exceptions, utils
| [
11748,
640,
198,
6738,
17268,
1330,
4277,
11600,
198,
198,
6738,
11485,
1330,
13269,
11,
3384,
4487,
628
] | 4.611111 | 18 |
from utils import read_cfg
from falling_objects_env import FallingObjects, PLAYER_KEYS, ACTIONS
from argparse import ArgumentParser
from demo_agent import DemoAgent
from dqn_agent import DDQNAgent
import importlib
import numpy as np
import cv2 as cv2
BATCH_SIZE = 32
if __name__ == "__main__":
arg_parser = Argumen... | [
6738,
3384,
4487,
1330,
1100,
62,
37581,
198,
6738,
7463,
62,
48205,
62,
24330,
1330,
42914,
10267,
82,
11,
28180,
1137,
62,
7336,
16309,
11,
23054,
198,
6738,
1822,
29572,
1330,
45751,
46677,
198,
6738,
13605,
62,
25781,
1330,
34588,
3... | 2.535928 | 1,002 |
"""
The Self-Taught Programmer - Chapter 4 Challenges
Author: Dante Valentine
Date: 22 May, 2021
"""
""" CHALLENGE 1 """
to_square = 12
resp = square_func(to_square)
#print("The square of", to_square, "is", str(resp) + ".")
""" CHALLENGE 2 """
to_print = 1.0056
#print("Next I will print a string...... | [
37811,
201,
198,
464,
12189,
12,
51,
3413,
6118,
647,
532,
7006,
604,
44495,
201,
198,
13838,
25,
34898,
23078,
201,
198,
10430,
25,
2534,
1737,
11,
33448,
201,
198,
37811,
201,
198,
201,
198,
37811,
5870,
7036,
1677,
8264,
352,
37227... | 2.257979 | 376 |
import cv2
import numpy as np
import argparse
if __name__ == "__main__":
ap = argparse.ArgumentParser()
ap.add_argument("-i",
help="Intensity (scalar more or less around 1.0)",
type=float,
default=1.)
ap.add_argument("-m",
he... | [
11748,
269,
85,
17,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
1822,
29572,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
2471,
796,
1822,
29572,
13,
28100,
1713,
46677,
3419,
198,
22... | 1.770701 | 942 |
from .bit_arr import *
from .ecc import *
from .int import *
| [
6738,
764,
2545,
62,
3258,
1330,
1635,
198,
6738,
764,
68,
535,
1330,
1635,
198,
6738,
764,
600,
1330,
1635,
198
] | 2.904762 | 21 |
#!/usr/bin/env python3
import numpy as np
# from rrc_example_package.code.training_env import make_training_env
from rrc_example_package.code.training_env.env import ActionType
import rrc_example_package.move_cube
import rrc_example_package.cube_env
# env = make_training_env(visualization=False, **eval_config)
# env.... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
11748,
299,
32152,
355,
45941,
198,
2,
422,
374,
6015,
62,
20688,
62,
26495,
13,
8189,
13,
34409,
62,
24330,
1330,
787,
62,
34409,
62,
24330,
198,
6738,
374,
6015,
62,
20688... | 2.417047 | 657 |
import random
| [
11748,
4738,
628
] | 5 | 3 |
import pygame
from . import assets
from .vector import *
global registered_sprites
registered_sprites = {}
| [
11748,
12972,
6057,
198,
6738,
764,
1330,
6798,
198,
6738,
764,
31364,
1330,
1635,
198,
198,
20541,
6823,
62,
2777,
23156,
198,
33736,
62,
2777,
23156,
796,
23884,
628
] | 3.758621 | 29 |
###########################
# 6.00.2x Problem Set 1: Space Cows
from ps1_partition import get_partitions
import time
#================================
# Part A: Transporting Space Cows
#================================
def load_cows(filename):
"""
Read the contents of the given file. Assumes th... | [
14468,
7804,
21017,
201,
198,
2,
718,
13,
405,
13,
17,
87,
20647,
5345,
352,
25,
4687,
327,
1666,
220,
201,
198,
201,
198,
6738,
26692,
16,
62,
3911,
653,
1330,
651,
62,
3911,
1756,
201,
198,
11748,
640,
201,
198,
201,
198,
2,
1... | 2.414707 | 2,339 |
# Copyright (c) 2020 - for information on the respective copyright owner
# see the NOTICE file and/or the repository https://github.com/boschresearch/blackboxopt
#
# SPDX-License-Identifier: Apache-2.0
import logging
import time
from typing import Callable, List, Set, Union
try:
import dask.distributed as dd
exce... | [
2,
15069,
357,
66,
8,
12131,
532,
329,
1321,
319,
262,
11756,
6634,
4870,
198,
2,
766,
262,
28536,
2393,
290,
14,
273,
262,
16099,
3740,
1378,
12567,
13,
785,
14,
39565,
354,
34033,
14,
13424,
3524,
8738,
198,
2,
198,
2,
30628,
55... | 2.752717 | 1,472 |
#! /usr/bin/env casarun
#
#
# you can either use the "import" method from within casapy
# or use the casarun shortcut to run this from a unix shell
# with the argument being the casa image file to be processed
#
# Typical test usage:
# ./test_ingest.py test123.fits [dummy]
# This will produce admit.... | [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
6124,
283,
403,
198,
2,
220,
198,
2,
198,
2,
220,
220,
345,
460,
2035,
779,
262,
366,
11748,
1,
2446,
422,
1626,
6124,
12826,
198,
2,
220,
220,
393,
779,
262,
6124,
283,
403,
29401,
284,
... | 2.192392 | 1,367 |
"""
Authors: Fernando (UPDATE HIS INFO)
License: GPL 3.0
Description: This file contains functions that allows the user to
change the pitch of a .wav
Comments: None.
"""
import subprocess
import os
from sys import platform as _platform
from lib import pydub
def changeDuration(filename,percent):
"""
Input: file... | [
37811,
220,
198,
30515,
669,
25,
31063,
357,
16977,
33700,
24890,
8,
198,
34156,
25,
38644,
513,
13,
15,
198,
11828,
25,
770,
2393,
4909,
5499,
326,
3578,
262,
2836,
284,
220,
198,
3803,
262,
7078,
286,
257,
764,
45137,
220,
198,
23... | 3.071225 | 702 |
from Queue import Empty, Queue
import collections
import ipaddress
import netifaces
import pwd
import signal
import socket
from subprocess import Popen
from threading import Thread
################################################################################
#### String utils
##################################... | [
6738,
4670,
518,
1330,
33523,
11,
4670,
518,
198,
11748,
17268,
198,
11748,
20966,
21975,
198,
11748,
2010,
361,
2114,
198,
11748,
279,
16993,
198,
11748,
6737,
198,
11748,
17802,
198,
6738,
850,
14681,
1330,
8099,
268,
198,
6738,
4704,
... | 2.640988 | 2,025 |
# DBPLoadController.py
# 1) Run Validate on the files to process
# 2) Move any Fileset that is accepted to uploading
# 3) Perform upload
# 4) Move any fully uploaded fileset to database
# 5) Update fileset related tables
# 6) Move updated fileset to complete
import os
from Config import *
from RunStatus import *
fro... | [
2,
20137,
6489,
1170,
22130,
13,
9078,
198,
198,
2,
352,
8,
5660,
3254,
20540,
319,
262,
3696,
284,
1429,
198,
2,
362,
8,
10028,
597,
13283,
316,
326,
318,
6292,
284,
33794,
198,
2,
513,
8,
35006,
9516,
198,
2,
604,
8,
10028,
59... | 2.462992 | 2,594 |
#!/usr/bin/env python
'''
This example shows how to use the call_in_background macro
'''
from pyscf import lib
import time
print('type 1')
w0 = time.time()
with lib.call_in_background(fa) as afa, lib.call_in_background(fb) as afb:
for i in range(3):
afa()
afb()
print('total time = %.1f s = [fb]0... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
7061,
6,
198,
1212,
1672,
2523,
703,
284,
779,
262,
869,
62,
259,
62,
25249,
15021,
198,
7061,
6,
198,
198,
6738,
279,
893,
12993,
1330,
9195,
198,
11748,
640,
198,
198,
4798,
... | 2.201521 | 263 |
from abc import ABCMeta, abstractmethod
| [
6738,
450,
66,
1330,
9738,
48526,
11,
12531,
24396,
201,
198
] | 3.727273 | 11 |
import autofront
from simple_functions import foo
autofront.add(foo)
autofront.run()
| [
11748,
1960,
1659,
4298,
198,
6738,
2829,
62,
12543,
2733,
1330,
22944,
198,
198,
2306,
1659,
4298,
13,
2860,
7,
21943,
8,
198,
2306,
1659,
4298,
13,
5143,
3419,
198
] | 2.866667 | 30 |
from .imagenet_dataset import ImageNetDataset # noqa
| [
6738,
764,
320,
11286,
316,
62,
19608,
292,
316,
1330,
7412,
7934,
27354,
292,
316,
1303,
645,
20402,
201,
198
] | 2.7 | 20 |
# The difficulty in this problem lies in O(1) space, and many solution using O(n) space can also be accepted by OJ.
# The solution is applying bi-search in the range[1, n] by counting the element which falls in sub range(n/2, n].
# If the number is bigger than capacity of that sub range, it means the duplicated intege... | [
198,
2,
383,
8722,
287,
428,
1917,
7363,
287,
440,
7,
16,
8,
2272,
11,
290,
867,
4610,
1262,
440,
7,
77,
8,
2272,
460,
635,
307,
6292,
416,
440,
41,
13,
198,
2,
383,
4610,
318,
11524,
3182,
12,
12947,
287,
262,
2837,
58,
16,
... | 3.851852 | 108 |
def subset_x_y(target, features, start_index:int, end_index:int):
'''
'''
return features[start_index:end_index], target[start_index:end_index]
def split_sets_by_time(df, target_col, test_ratio=0.2):
'''
'''
df_copy = df.copy()
target = df_copy.pop(target_col)
cutoff = int(len(target)/... | [
4299,
24637,
62,
87,
62,
88,
7,
16793,
11,
3033,
11,
923,
62,
9630,
25,
600,
11,
886,
62,
9630,
25,
600,
2599,
628,
220,
220,
220,
705,
7061,
198,
220,
220,
220,
705,
7061,
198,
220,
220,
220,
1441,
3033,
58,
9688,
62,
9630,
2... | 2.288221 | 798 |
# Works
"""
Given a quantity of money and a list of coins, return the minimum number of coins.
"""
if __name__ == "__main__":
money = 16807
coins = [18,17,16,7,6,5,3,1]
print(DPChange(money, coins))
| [
2,
10933,
198,
198,
37811,
198,
15056,
257,
12040,
286,
1637,
290,
257,
1351,
286,
10796,
11,
1441,
262,
5288,
1271,
286,
10796,
13,
198,
37811,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
... | 2.552941 | 85 |
# -*- coding: utf-8 -*-
'''
feedgen.entry
~~~~~~~~~~~~~
:copyright: 2013-2020, Lars Kiesow <lkiesow@uos.de>
:license: FreeBSD and LGPL, see license.* for more details.
'''
from datetime import datetime
import dateutil.parser
import dateutil.tz
import warnings
from lxml.etree import CDATA # nosec -... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
7061,
6,
198,
220,
220,
220,
3745,
5235,
13,
13000,
198,
220,
220,
220,
220,
15116,
8728,
93,
628,
220,
220,
220,
1058,
22163,
4766,
25,
2211,
12,
42334,
11,
31239,
... | 2.256837 | 841 |
#!/usr/bin/python
#coding:utf8
import mybaselib
import logging
import jieba
import jieba.analyse
import numpy as np
import csv
import sys
import stat
import os
reload(sys)
sys.setdefaultencoding('utf-8')
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
if __name__ == '__main__':
fname = sys.argv[... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
66,
7656,
25,
40477,
23,
198,
11748,
616,
12093,
417,
571,
198,
11748,
18931,
198,
11748,
474,
494,
7012,
198,
11748,
474,
494,
7012,
13,
38200,
325,
198,
11748,
299,
32152,
355,
45941,
... | 2.670103 | 194 |
#!/usr/bin/env python
# coding: utf-8
DESCRIPTION="This script reduce dimensionality of input data."
#from memory_profiler import profile
import numpy as np
import argparse
from sklearn.decomposition import PCA
from sklearn.decomposition import NMF
import logging
import sys
from os.path import dirname
sys.path.append... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
30910,
40165,
2625,
1212,
4226,
4646,
15793,
1483,
286,
5128,
1366,
526,
198,
2,
6738,
4088,
62,
5577,
5329,
1330,
7034,
198,
11748,
299,
32... | 2.344978 | 916 |
from __future__ import print_function, unicode_literals, division
arp_table = [('10.220.88.1', '0062.ec29.70fe'),
('10.220.88.20', 'c89c.1dea.0eb6'),
('10.220.88.21', '1c6a.7aaf.576c'),
('10.220.88.28', '5254.aba8.9aea'),
('10.220.88.29', '5254.abbe.5b7b'),
... | [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
11,
28000,
1098,
62,
17201,
874,
11,
7297,
198,
198,
5117,
62,
11487,
796,
685,
10786,
940,
13,
17572,
13,
3459,
13,
16,
3256,
705,
405,
5237,
13,
721,
1959,
13,
2154,
5036,
33809,
198,... | 1.712042 | 573 |
from django.test import TestCase
from django.urls import reverse
| [
6738,
42625,
14208,
13,
9288,
1330,
6208,
20448,
198,
6738,
42625,
14208,
13,
6371,
82,
1330,
9575,
628
] | 3.666667 | 18 |
import discord, os
from discord.ext import commands
from utils import checks, output
from aiohttp import ClientSession
import urllib.request
import json
| [
11748,
36446,
11,
28686,
198,
6738,
36446,
13,
2302,
1330,
9729,
198,
6738,
3384,
4487,
1330,
8794,
11,
5072,
198,
6738,
257,
952,
4023,
1330,
20985,
36044,
198,
11748,
2956,
297,
571,
13,
25927,
198,
11748,
33918,
628
] | 4.052632 | 38 |
from requests import Session
from .__about__ import __title__, __version__
from .models import Version
| [
201,
198,
6738,
7007,
1330,
23575,
201,
198,
201,
198,
6738,
764,
834,
10755,
834,
1330,
11593,
7839,
834,
11,
11593,
9641,
834,
201,
198,
6738,
764,
27530,
1330,
10628,
201,
198,
201,
198
] | 3.294118 | 34 |
from DeepChecker.Checkers import *
| [
6738,
10766,
9787,
263,
13,
9787,
364,
1330,
1635,
198
] | 3.5 | 10 |
# -*- coding: utf-8 -*-
"""Unit tests for CMGroup class."""
import os
import shutil
from itertools import islice
from commongroups.env import CommonEnv
from commongroups import cmgroup as cmg
# Locate the test params to use.
_CUR_PATH = os.path.abspath(os.path.dirname(__file__))
PARAMS_JSON = os.path.join(_CUR_PATH,... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
26453,
5254,
329,
16477,
13247,
1398,
526,
15931,
198,
198,
11748,
28686,
198,
11748,
4423,
346,
198,
6738,
340,
861,
10141,
1330,
318,
75,
501,
198,
198,
6738,
7... | 2.526012 | 1,384 |
#!/usr/bin/env python
# -*- Coding: utf-8 -*-
from argparse import ArgumentParser
from os import environ, makedirs
from datetime import datetime
from os.path import abspath, join, dirname, exists, splitext
from time import time
from dotenv import load_dotenv
import slack
DIR = dirname(dirname(abspath(__file__)))
l... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
327,
7656,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
1822,
29572,
1330,
220,
45751,
46677,
198,
6738,
28686,
1330,
551,
2268,
11,
285,
4335,
17062,
198,
6738... | 2.194477 | 2,535 |
import tensorflow as tf
# Create TensorFlow object called tensor
hello_constant = tf.constant('Hello World!')
with tf.Session() as sess:
# Run the tf.constant operation in the session
output = sess.run(hello_constant)
print(output.decode())# bytestring decode to string.
| [
201,
198,
11748,
11192,
273,
11125,
355,
48700,
201,
198,
2,
13610,
309,
22854,
37535,
2134,
1444,
11192,
273,
201,
198,
31373,
62,
9979,
415,
796,
48700,
13,
9979,
415,
10786,
15496,
2159,
0,
11537,
201,
198,
201,
198,
4480,
48700,
1... | 2.854369 | 103 |
# encoding: utf-8
# module PySide.QtGui
# from C:\Python27\lib\site-packages\PySide\QtGui.pyd
# by generator 1.147
# no doc
# imports
import PySide.QtCore as __PySide_QtCore
import Shiboken as __Shiboken
| [
2,
21004,
25,
3384,
69,
12,
23,
198,
2,
8265,
9485,
24819,
13,
48,
83,
8205,
72,
198,
2,
422,
327,
7479,
37906,
1983,
59,
8019,
59,
15654,
12,
43789,
59,
20519,
24819,
59,
48,
83,
8205,
72,
13,
79,
5173,
198,
2,
416,
17301,
35... | 2.506024 | 83 |
# coding: utf-8
# 2021/03/12 @ zhaoguanhao
| [
2,
19617,
25,
3384,
69,
12,
23,
198,
2,
33448,
14,
3070,
14,
1065,
2488,
1976,
3099,
519,
7258,
23778,
198
] | 2.047619 | 21 |
#!/usr/bin/env python3
import os
import logging
import time
from datetime import datetime
import subprocess as sp
import json
from flask import Flask, request, jsonify, send_from_directory
LOG_LEVEL = 'INFO'
LOG_PATH = 'dwg2dxf.log'
LOG_DIR = 'log'
PORT=8001
try:
from local_config import *
except:
pass
fmt =... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
11748,
28686,
198,
11748,
18931,
198,
11748,
640,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
11748,
850,
14681,
355,
599,
198,
11748,
33918,
198,
6738,
42903,
1330,
46947,
11,
258... | 2.269767 | 430 |
import kivy
from kivy.app import App
from kivy.uix.label import Label
from kivy.uix.gridlayout import GridLayout
from kivy.uix.textinput import TextInput
from kivy.uix.button import Button
from kivy.uix.screenmanager import ScreenManager, Screen
from kivy.clock import Clock
from kivy.core.window import Window
... | [
11748,
479,
452,
88,
201,
198,
6738,
479,
452,
88,
13,
1324,
1330,
2034,
201,
198,
6738,
479,
452,
88,
13,
84,
844,
13,
18242,
1330,
36052,
201,
198,
6738,
479,
452,
88,
13,
84,
844,
13,
25928,
39786,
1330,
24846,
32517,
201,
198,... | 2.614173 | 254 |
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from parlai.core.agents import Agent
from parlai.core.utils import warn_once
from parlai.core.utils import padded_3d
from parlai.core.torch_gene... | [
2,
15069,
357,
66,
8,
3203,
11,
3457,
13,
290,
663,
29116,
13,
198,
2,
770,
2723,
2438,
318,
11971,
739,
262,
17168,
5964,
1043,
287,
262,
198,
2,
38559,
24290,
2393,
287,
262,
6808,
8619,
286,
428,
2723,
5509,
13,
198,
198,
6738,... | 3.547264 | 201 |
import sys
from pathlib import Path
import cv2
import numpy as np
import pandas as pd
import torch
from torch.utils.data import Dataset
import torchvision
from torchvision import transforms
import torchvision.transforms.functional as F
from skimage.util import random_noise
from dataloading.camera import Camera
... | [
11748,
25064,
198,
6738,
3108,
8019,
1330,
10644,
198,
198,
11748,
269,
85,
17,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
28034,
198,
198,
6738,
28034,
13,
26791,
13,
7890,
1330,
16092,
292,
... | 3.554348 | 92 |
from ilexconf.console.application import Application
| [
6738,
220,
576,
87,
10414,
13,
41947,
13,
31438,
1330,
15678,
628
] | 4.5 | 12 |
# Copyright (C) [2013] [The FURTHeR Project]
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | [
2,
15069,
357,
34,
8,
685,
6390,
60,
685,
464,
376,
4261,
51,
1544,
49,
4935,
60,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
... | 2.435294 | 2,720 |
from django.contrib.auth.views import LoginView
from django.contrib.auth.forms import AuthenticationForm
| [
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
33571,
1330,
23093,
7680,
201,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
23914,
1330,
48191,
8479,
201,
198,
201,
198
] | 3.40625 | 32 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_django-excel-to-model
------------
Tests for `django-excel-to-model` models module.
"""
from django.test import TestCase
# from unittest import TestCase
from django_excel_to_model.openpyxl_reader import OpenpyxlExcelFile
from sap_asset_master_data20191224.model... | [
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,
198,
9288,
62,
28241,
14208,
12,
1069,
5276,
12,
1462,
12,
19849,
198,
10541,
198,
198,
51,
3558,
329,
46... | 2.725806 | 124 |
from flask import Flask, render_template, jsonify
from mongo import mongo
import json
# from persona import persona
import time
app = Flask(__name__, static_url_path='/static')
cliente=mongo()
peoples=cliente['mydb']['people'].find()
x=getPeoplesFromDB(peoples)
if __name__ == "__main__":
app.run(h... | [
6738,
42903,
1330,
46947,
11,
8543,
62,
28243,
11,
33918,
1958,
201,
198,
6738,
285,
25162,
1330,
285,
25162,
201,
198,
11748,
33918,
201,
198,
2,
422,
27822,
1330,
27822,
201,
198,
11748,
640,
201,
198,
1324,
796,
46947,
7,
834,
3672... | 2.536765 | 136 |
# -*- coding: utf-8 -*-
# Attempt to convert audio to video by visualizing audio
import argparse
from lib.audio_utils import *
from lib.collection_utils import *
from lib.io_utils import *
from lib.math_utils import *
import librosa
import os
import numpy as np
from pprint import pprint
import sys
# input
parser = a... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
25770,
284,
10385,
6597,
284,
2008,
416,
5874,
2890,
6597,
198,
198,
11748,
1822,
29572,
198,
6738,
9195,
13,
24051,
62,
26791,
1330,
1635,
198,
6738,
9195,
13,
... | 3.140039 | 507 |
from flask import jsonify, abort
from flask_restful import reqparse, Resource
from config import db
from data.user import UserData
from datetime import datetime, timedelta
from data.user_session import UserSessionData
parser = reqparse.RequestParser()
parser.add_argument('username')
parser.add_argument('password')
| [
6738,
42903,
1330,
33918,
1958,
11,
15614,
198,
6738,
42903,
62,
2118,
913,
1330,
43089,
29572,
11,
20857,
198,
6738,
4566,
1330,
20613,
198,
6738,
1366,
13,
7220,
1330,
11787,
6601,
198,
6738,
4818,
8079,
1330,
4818,
8079,
11,
28805,
1... | 3.925926 | 81 |
# -*- coding: utf-8 -*-
# The MIT License (MIT)
#
# Copyright (c) 2021 OpenALTO Community
#
# 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 t... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
383,
17168,
13789,
357,
36393,
8,
198,
2,
198,
2,
15069,
357,
66,
8,
33448,
4946,
1847,
10468,
8108,
198,
2,
198,
2,
2448,
3411,
318,
29376,
7520,
11,
1479,
286,
... | 3.152753 | 563 |
import re
import requests
import json
# php
# insert
#
# ,0
if __name__ == '__main__':
date_get = trade_date(2021, 11, 1, 2022, 1, 28)
print(date_get)
| [
11748,
302,
201,
198,
201,
198,
11748,
7007,
201,
198,
11748,
33918,
201,
198,
201,
198,
201,
198,
2,
39347,
201,
198,
201,
198,
201,
198,
2,
7550,
201,
198,
201,
198,
201,
198,
2,
220,
201,
198,
201,
198,
201,
198,
2,
837,
15,
... | 1.836364 | 110 |
from yacs.config import CfgNode as CN
from lib.classes.dataset_classes.SubjectDataset import SubjectDataset
from config.model_helper import get_size_input
_C = CN()
_C.framework = "Keras"
_C.model_type = "ConvAutoencoder"
_C.build_type = "subclass"
# Define encoder parameters
_C.Encoder = CN()
_C.Encoder.n_filters... | [
198,
6738,
331,
16436,
13,
11250,
1330,
327,
40616,
19667,
355,
31171,
198,
198,
6738,
9195,
13,
37724,
13,
19608,
292,
316,
62,
37724,
13,
19776,
27354,
292,
316,
1330,
15540,
27354,
292,
316,
198,
6738,
4566,
13,
19849,
62,
2978,
52... | 2.357877 | 584 |
import pydot
callgraph = pydot.Dot(graph_type='digraph', fontname="Verdana", compound='true')
cluster_foo = pydot.Cluster('foo', label='foo')
callgraph.add_subgraph(cluster_foo)
node_foo = pydot.Node('foo_method_1', label='method_1')
cluster_foo.add_node(node_foo)
cluster_bar = pydot.Cluster('bar', label='Component... | [
11748,
279,
5173,
313,
198,
198,
13345,
34960,
796,
279,
5173,
313,
13,
35,
313,
7,
34960,
62,
4906,
11639,
12894,
1470,
3256,
10369,
3672,
2625,
13414,
67,
2271,
1600,
13061,
11639,
7942,
11537,
198,
198,
565,
5819,
62,
21943,
796,
2... | 2.434599 | 237 |
import networkx as nx
import os
from diagram import Diagram
from spf import spf
| [
11748,
3127,
87,
355,
299,
87,
198,
11748,
28686,
198,
6738,
16362,
1330,
6031,
6713,
198,
6738,
599,
69,
1330,
599,
69,
628
] | 3.521739 | 23 |
from typing import Any, Dict, List, Type, TypeVar, Union
import attr
from ..models.claim_format import ClaimFormat
from ..models.input_descriptors import InputDescriptors
from ..models.submission_requirements import SubmissionRequirements
from ..types import UNSET, Unset
T = TypeVar("T", bound="PresentationDefinitio... | [
6738,
19720,
1330,
4377,
11,
360,
713,
11,
7343,
11,
5994,
11,
5994,
19852,
11,
4479,
198,
198,
11748,
708,
81,
198,
198,
6738,
11485,
27530,
13,
6604,
62,
18982,
1330,
22070,
26227,
198,
6738,
11485,
27530,
13,
15414,
62,
20147,
1968... | 3.735632 | 87 |
"""
Launch a proxy for tranforming `/paths/like/these` to PostgREST filters.
Usage:
aiodata -h | --help
aiodata <file> [--host=<str>] [--port=<int>] [--query=<str>] [--state=<str>]
aiodata [--db-uri=<uri>] [--pr-uri=<uri>] [--host=<str>] [--port=<int>] [--schema=<str>] [--secret=<str>] [--query=<str>] [--... | [
198,
37811,
198,
38296,
257,
15741,
329,
491,
272,
15464,
4600,
14,
6978,
82,
14,
2339,
14,
27218,
63,
284,
2947,
70,
49,
6465,
16628,
13,
198,
198,
28350,
25,
198,
220,
220,
220,
257,
2101,
1045,
532,
71,
930,
1377,
16794,
198,
2... | 2.260254 | 2,048 |
LB_media = {
"EX_ni2_e": -1000,
"EX_dcyt_e": -1000,
"EX_hg2_e": -1000,
"EX_ins_e": -1000,
"EX_cd2_e": -1000,
"EX_so4_e": -1000,
"EX_uri_e": -1000,
"EX_tungs_e": -1000,
"EX_glu__L_e": -1000,
"EX_slnt_e": -1000,
"EX_trp__L_e": -1000,
"EX_dad__2_e": -1000,
"EX_mobd_e": -... | [
30501,
62,
11431,
796,
1391,
198,
220,
220,
220,
366,
6369,
62,
8461,
17,
62,
68,
1298,
532,
12825,
11,
198,
220,
220,
220,
366,
6369,
62,
67,
948,
83,
62,
68,
1298,
532,
12825,
11,
198,
220,
220,
220,
366,
6369,
62,
71,
70,
1... | 1.605718 | 1,679 |
# coding:utf-8
import codecs | [
2,
19617,
25,
40477,
12,
23,
198,
11748,
40481,
82
] | 2.8 | 10 |
# -*- coding: utf-8 -*-
"""Validates htsget response matches JSON schema"""
import inspect
import json
import os
from jsonschema import validate
from jsonschema import RefResolver
from jsonschema.exceptions import ValidationError
from ga4gh.htsget.compliance.config import constants as c
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
7762,
37051,
289,
912,
1136,
2882,
7466,
19449,
32815,
37811,
198,
198,
11748,
10104,
198,
11748,
33918,
198,
11748,
28686,
198,
6738,
44804,
684,
2395,
2611,
1330,
... | 3.440476 | 84 |
import xmlrpc.client
proxy = xmlrpc.client.ServerProxy("http://localhost:6789/")
num = 7
result = proxy.double(num)
print("Dwukrotno liczby %s jest rwna %s" % (num, result))
| [
11748,
35555,
81,
14751,
13,
16366,
198,
198,
36436,
796,
35555,
81,
14751,
13,
16366,
13,
10697,
44148,
7203,
4023,
1378,
36750,
25,
3134,
4531,
14,
4943,
198,
22510,
796,
767,
198,
20274,
796,
15741,
13,
23352,
7,
22510,
8,
198,
479... | 2.573529 | 68 |
import begin
from sails.server import Server
| [
11748,
2221,
198,
198,
6738,
48370,
13,
15388,
1330,
9652,
628
] | 4.272727 | 11 |
from .AND import *
from .COMP import *
from .NAND import *
from .NOR import *
from .NOT import *
from .OR import *
from .PAR import *
from .XNOR import *
from .XOR import *
| [
6738,
764,
6981,
1330,
1635,
198,
6738,
764,
9858,
47,
1330,
1635,
198,
6738,
764,
45,
6981,
1330,
1635,
198,
6738,
764,
35510,
1330,
1635,
198,
6738,
764,
11929,
1330,
1635,
198,
6738,
764,
1581,
1330,
1635,
198,
6738,
764,
27082,
13... | 2.982759 | 58 |
"""Test classes defined within pbtranscript.CombineUtils."""
import unittest
import os.path as op
from pbcore.io import FastaReader, FastqReader
from pbtranscript.Utils import rmpath, mkdir
from pbtranscript.ClusterOptions import IceQuiverHQLQOptions
from pbtranscript.CombineUtils import CombineRunner
from test_setpa... | [
37811,
14402,
6097,
5447,
1626,
279,
65,
7645,
6519,
13,
20575,
500,
18274,
4487,
526,
15931,
198,
198,
11748,
555,
715,
395,
198,
11748,
28686,
13,
6978,
355,
1034,
198,
198,
6738,
279,
65,
7295,
13,
952,
1330,
12549,
64,
33634,
11,
... | 3.137931 | 116 |
import config
from gmusicapi import Mobileclient
import logging
from gi.repository import Gst, GLib
from collections import deque
from gevent import Greenlet
import gevent
| [
11748,
4566,
198,
6738,
308,
28965,
15042,
1330,
12173,
16366,
198,
11748,
18931,
198,
6738,
308,
72,
13,
260,
1930,
37765,
1330,
402,
301,
11,
10188,
571,
198,
6738,
17268,
1330,
390,
4188,
198,
6738,
4903,
1151,
1330,
3469,
1616,
198,... | 3.729167 | 48 |
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 25 18:17:13 2021
@author: AndyWang
"""
from bs4 import BeautifulSoup
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from datetime import datetime
from time import sleep
import pandas as pd
import numpy as np
import os
... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
37811,
201,
198,
41972,
319,
26223,
1526,
1679,
1248,
25,
1558,
25,
1485,
33448,
201,
198,
201,
198,
31,
9800,
25,
12382,
54,
648,
201,
198,
37811,
201,
198,
201,... | 2.240638 | 2,697 |
import random, time, os
m() | [
11748,
4738,
11,
640,
11,
28686,
198,
76,
3419,
220
] | 2.8 | 10 |
# -*- coding: utf-8 -*-
def rename_function(ss, oldname, newname):
"""Replaces all occurences of a name by a new name
"""
#return ss.replace("conjugate","numpy.conj")
return ss.replace(oldname, newname)
def fce2array(sr, pat):
"""Converts functions into arrays
"""
se = "".joi... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
4299,
36265,
62,
8818,
7,
824,
11,
1468,
3672,
11,
649,
3672,
2599,
198,
220,
220,
220,
37227,
3041,
23625,
477,
1609,
495,
3179,
286,
257,
1438,
416,
257,
649,
1438,
... | 2.012804 | 781 |
test_case_1 = """
5 # N
4 1 5 2 3
5 # M
1 3 7 9 5
"""
'''
result
1
1
0
0
1
'''
N = int(input())
A = list(map(int, input().split()))
A_set = set(A) # Set in ...
M = int(input())
B = list(map(int, input().split()))
for i in range(0, M):
if B[i] in A_set:
print(1)
else:
... | [
9288,
62,
7442,
62,
16,
796,
37227,
198,
20,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
399,
198,
19,
352,
642,
362,
513,
198,
20,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1303,
337,
198,
16,
51... | 1.75 | 192 |
import argparse
import os
import numpy as np
import matplotlib.pyplot as plt
import torch
import yaml
import cv2
from PIL import Image, ImageFilter
from base64 import b64decode, b64encode
import io
from predictors.predictor import Predictor
from src.models.modnet import MODNet
import torch
import torch.nn as nn
im... | [
11748,
1822,
29572,
198,
11748,
28686,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
198,
11748,
28034,
198,
11748,
331,
43695,
198,
198,
11748,
269,
85,
17,
198,
198,
6738,
350,
... | 2.958955 | 268 |
import re
from HTMLParser import HTMLParser
whitespace = re.compile('\s+')
| [
11748,
302,
198,
6738,
11532,
46677,
1330,
11532,
46677,
628,
198,
198,
1929,
2737,
10223,
796,
302,
13,
5589,
576,
10786,
59,
82,
10,
11537,
628
] | 3.038462 | 26 |
import databases
from database_handler import load_session, func
from flask_login import LoginManager, UserMixin
| [
11748,
20083,
198,
6738,
6831,
62,
30281,
1330,
3440,
62,
29891,
11,
25439,
198,
6738,
42903,
62,
38235,
1330,
23093,
13511,
11,
11787,
35608,
259,
198
] | 4.346154 | 26 |
# @lc app=leetcode id=75 lang=python3
#
# [75] Sort Colors
#
# https://leetcode.com/problems/sort-colors/description/
#
# algorithms
# Medium (49.90%)
# Likes: 5201
# Dislikes: 298
# Total Accepted: 663.5K
# Total Submissions: 1.3M
# Testcase Example: '[2,0,2,1,1,0]'
#
# Given an array nums with n objects colore... | [
2,
2488,
44601,
598,
28,
293,
316,
8189,
4686,
28,
2425,
42392,
28,
29412,
18,
198,
2,
198,
2,
685,
2425,
60,
33947,
29792,
198,
2,
198,
2,
3740,
1378,
293,
316,
8189,
13,
785,
14,
1676,
22143,
14,
30619,
12,
4033,
669,
14,
1121... | 2.255717 | 962 |
# Copyright (c) OpenMMLab. All rights reserved.
import torch
from mmcv.cnn import ConvModule
from mmcv.runner import BaseModule, force_fp32
from torch import nn as nn
| [
2,
15069,
357,
66,
8,
4946,
44,
5805,
397,
13,
1439,
2489,
10395,
13,
198,
11748,
28034,
198,
6738,
8085,
33967,
13,
66,
20471,
1330,
34872,
26796,
198,
6738,
8085,
33967,
13,
16737,
1330,
7308,
26796,
11,
2700,
62,
46428,
2624,
198,
... | 3.294118 | 51 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from subprocess import call
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
850,
14681,
1330,
869,
628
] | 2.586207 | 29 |
#!/usr/bin/env python
'''
dir_monch: a utility to help shorten paths.
'''
from __future__ import print_function
from os.path import expanduser
from os import sep as os_sep
from sys import exit
import sys
if __name__ == '__main__':
print(dir_monch(sys.argv[1]))
exit(0)
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
7061,
6,
198,
15908,
62,
2144,
354,
25,
257,
10361,
284,
1037,
45381,
13532,
13,
198,
7061,
6,
198,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
198,
6738,
28686,
13,
697... | 2.692308 | 104 |
# -*- coding: utf-8 -*-
# Licensed under the MIT license
# http://opensource.org/licenses/mit-license.php
# based on: http://code.activestate.com/recipes/573463/
# Modified by Philippe Normand
# Copyright 2008, Frank Scholz <coherence@beebits.net>
from coherence.extern.et import ET as ElementTree, indent, parse_xml... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
49962,
739,
262,
17168,
5964,
198,
2,
2638,
1378,
44813,
1668,
13,
2398,
14,
677,
4541,
14,
2781,
12,
43085,
13,
10121,
198,
198,
2,
1912,
319,
25,
2638,
137... | 2.108778 | 1,857 |
import casadi as ca
import casadi.tools as cat
__author__ = 'belousov'
| [
11748,
6124,
9189,
355,
1275,
198,
11748,
6124,
9189,
13,
31391,
355,
3797,
198,
198,
834,
9800,
834,
796,
705,
6667,
516,
709,
6,
628,
628,
628,
628,
628,
628,
628,
628,
628,
628,
628
] | 2.657143 | 35 |
# Copyright 2019 Arie Bregman
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | [
2,
15069,
13130,
317,
5034,
347,
2301,
805,
198,
2,
198,
2,
220,
220,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
345,
743,
198,
2,
220,
220,
220,
407,
779,
428,
2393,
2845,
287,
11846... | 3.466942 | 242 |
# Import shawk
from shawk import Contact
# Prepare contacts used throughout tests
mini_contact = Contact(12345678, 'Verizon')
name_contact = Contact(12345678, 'Verizon', 'Somebody')
| [
198,
2,
17267,
427,
19301,
198,
6738,
427,
19301,
1330,
14039,
198,
198,
2,
43426,
13961,
973,
3690,
5254,
198,
45313,
62,
32057,
796,
14039,
7,
10163,
2231,
30924,
11,
705,
13414,
8637,
11537,
198,
3672,
62,
32057,
796,
14039,
7,
101... | 3.407407 | 54 |
#coding=utf-8
# coding=utf-8
'''
Created on 2014-1-5
@author: ETHAN
'''
from rest_framework import generics
from doraemon.api.ci.serializer import ci_serializer
from rest_framework.permissions import AllowAny
from doraemon.ci.mongo_models import CITaskParameterGroup
from business.ci.ci_task_parameter_service import CI... | [
2,
66,
7656,
28,
40477,
12,
23,
198,
2,
19617,
28,
40477,
12,
23,
198,
7061,
6,
198,
41972,
319,
1946,
12,
16,
12,
20,
198,
198,
31,
9800,
25,
35920,
1565,
198,
7061,
6,
198,
6738,
1334,
62,
30604,
1330,
1152,
873,
198,
6738,
... | 2.933333 | 120 |
# @l2g 106 python3
# [106] Construct Binary Tree from Inorder and Postorder Traversal
# Difficulty: Medium
# https://leetcode.com/problems/construct-binary-tree-from-inorder-and-postorder-traversal
#
# Given two integer arrays inorder and postorder where inorder is the inorder traversal of a binary tree and postorder i... | [
2,
2488,
75,
17,
70,
15696,
21015,
18,
198,
2,
685,
15801,
60,
28407,
45755,
12200,
422,
554,
2875,
290,
2947,
2875,
4759,
690,
282,
198,
2,
27419,
25,
13398,
198,
2,
3740,
1378,
293,
316,
8189,
13,
785,
14,
1676,
22143,
14,
41571... | 2.825431 | 464 |
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None | [
2,
30396,
329,
257,
13934,
5509,
10139,
13,
198,
2,
1398,
12200,
19667,
25,
198,
2,
220,
220,
220,
220,
825,
11593,
15003,
834,
7,
944,
11,
2124,
2599,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
2116,
13,
2100,
796,
2124,
1... | 2.175676 | 74 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
from conf.dbconfig import TB_SESSION
from core.err_code import DB_ERR, OCT_SUCCESS
from core.log import WARNING,DEBUG
from utils.commonUtil import getUuid, transToStr, transToObj
from utils.timeUtil import get_current_time, getStrTime
SESSION_EXPIRE_TIME = 86400 * 30... | [
2,
48443,
14629,
14,
8800,
14,
29412,
201,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
201,
198,
6738,
1013,
13,
9945,
11250,
1330,
23799,
62,
50,
47621,
201,
198,
6738,
4755,
13,
8056,
62,
8189,
1330,... | 2.586466 | 133 |
import sys
n, *a = map(int, sys.stdin.read().split())
if __name__ == "__main__":
ans = main()
print(ans)
| [
11748,
25064,
201,
198,
201,
198,
77,
11,
1635,
64,
796,
3975,
7,
600,
11,
25064,
13,
19282,
259,
13,
961,
22446,
35312,
28955,
201,
198,
201,
198,
201,
198,
201,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
201,
... | 2.032258 | 62 |
# -*- coding: utf-8 -*-
broker_url = 'redis://192.168.33.10/0'
result_backend = 'redis://192.168.33.10/1'
imports = ('learn_celery.tasks',)
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
7957,
6122,
62,
6371,
796,
705,
445,
271,
1378,
17477,
13,
14656,
13,
2091,
13,
940,
14,
15,
6,
198,
198,
20274,
62,
1891,
437,
796,
705,
445,
271,
1378,
17477,... | 2.014085 | 71 |
from typing import Union
from seqwise_cont_skillspace.networks.rnn_vae_classifier import \
RnnVaeClassifierContSkills
| [
6738,
19720,
1330,
4479,
198,
198,
6738,
33756,
3083,
62,
3642,
62,
8135,
2171,
10223,
13,
3262,
5225,
13,
81,
20471,
62,
33353,
62,
4871,
7483,
1330,
3467,
198,
220,
220,
220,
371,
20471,
53,
3609,
9487,
7483,
4264,
15739,
2171,
628
... | 2.952381 | 42 |
#!/usr/bin/env python2
import os
import nltk
import cfg_parser as parser
import pdb, traceback, sys, code
if __name__ == '__main__':
try:
main()
except:
type, value, tb = sys.exc_info()
traceback.print_exc()
pdb.post_mortem(tb)
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
17,
198,
198,
11748,
28686,
198,
198,
11748,
299,
2528,
74,
198,
198,
11748,
30218,
70,
62,
48610,
355,
30751,
628,
198,
198,
11748,
279,
9945,
11,
12854,
1891,
11,
25064,
11,
2438,
198,
... | 2.115385 | 130 |
import balanced
balanced.configure('ak-test-2eKlj1ZDfAcZSARMf3NMhBHywDej0avSY')
settlement = balanced.Settlement.fetch('/settlements/ST6HmBuLJSEa82oUwId1AShW') | [
11748,
12974,
198,
198,
27753,
13,
11250,
495,
10786,
461,
12,
9288,
12,
17,
68,
42,
75,
73,
16,
57,
35,
69,
12832,
57,
50,
33456,
69,
18,
32755,
71,
33,
21217,
86,
5005,
73,
15,
615,
23060,
11537,
198,
198,
17744,
1732,
796,
12... | 2.146667 | 75 |
import typing
import numpy as np
import trade_environment
def detect_turning_points(values: np.ndarray, gap: int) -> typing.Tuple[np.ndarray, np.ndarray]:
""".
Args:
values: .
gap: .
Returns:
(, ) .
"""
indices = []
stalkers = np.empty((len(values),), dtype=np.int32)
last_value = int(values[0])
stalke... | [
11748,
19720,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
3292,
62,
38986,
628,
198,
4299,
4886,
62,
15344,
278,
62,
13033,
7,
27160,
25,
45941,
13,
358,
18747,
11,
7625,
25,
493,
8,
4613,
19720,
13,
51,
29291,
58,
37659,
13,
35... | 2.254945 | 455 |
from models.EstadoSolicitud import EstadoSolicitud
"""
De Pendiente puede pasar a: controlado, retenido.
De controlado puede pasar a: retenido, evaluado, numerado.
De Retenido puede pasar a:controlado, evaluado
De Evaluado puedo pasar a: numerado
"""
| [
6738,
4981,
13,
22362,
4533,
36949,
3628,
463,
1330,
10062,
4533,
36949,
3628,
463,
198,
37811,
198,
5005,
36865,
1153,
68,
279,
1739,
68,
38836,
283,
257,
25,
1630,
4533,
11,
1005,
268,
17305,
13,
198,
5005,
1630,
4533,
279,
1739,
68... | 2.73913 | 92 |
# Class: CSC-648-848 Fall 2021
# Author: Manali Seth
# Description: Contains columns and datatypes of Messaging Table of database
from wtforms import * | [
2,
5016,
25,
327,
6173,
12,
34287,
12,
23,
2780,
7218,
33448,
198,
2,
6434,
25,
1869,
7344,
20194,
198,
2,
12489,
25,
49850,
15180,
290,
4818,
265,
9497,
286,
10626,
3039,
8655,
286,
6831,
198,
198,
6738,
266,
83,
23914,
1330,
1635
... | 3.534884 | 43 |
import sys
import socket
from mesylib import send_cmd
try:
addr = sys.argv[1]
rate = int(sys.argv[2])
except (ValueError, IndexError):
print('usage: mesyparams.py ipaddr rate')
sys.exit(1)
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
send_cmd(sock, addr, 0xF1F0, 'IH', rate, 0)
print('confi... | [
11748,
25064,
198,
11748,
17802,
198,
198,
6738,
18842,
2645,
571,
1330,
3758,
62,
28758,
198,
198,
28311,
25,
198,
220,
220,
220,
37817,
796,
25064,
13,
853,
85,
58,
16,
60,
198,
220,
220,
220,
2494,
796,
493,
7,
17597,
13,
853,
... | 2.340426 | 141 |
# from bin.x64.iFinDPy import *
import urllib.request
import json
from abc import ABC
import matplotlib.pyplot as plt
import pandas as pd
import os
from bs4 import BeautifulSoup
import requests
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from datetime import datetime
import t... | [
2,
422,
9874,
13,
87,
2414,
13,
72,
18467,
6322,
88,
1330,
1635,
198,
11748,
2956,
297,
571,
13,
25927,
198,
11748,
33918,
198,
6738,
450,
66,
1330,
9738,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
197... | 3.302703 | 185 |
from PyPDF2 import PdfFileWriter, PdfFileReader
import daily_learn
book1=read_book("korban.pdf")
book2=read_book("har_habait.pdf")
book3=read_book("RIF.pdf")
my_book1=daily_learn.Mybook(book1,2,5,17)
my_book2=daily_learn.Mybook(book2,1,5,0,2)
my_book3=daily_learn.Mybook(book3,2,7,205)
my_file = daily_learn.books_into_... | [
6738,
9485,
20456,
17,
1330,
350,
7568,
8979,
34379,
11,
350,
7568,
8979,
33634,
198,
11748,
4445,
62,
35720,
198,
198,
2070,
16,
28,
961,
62,
2070,
7203,
74,
273,
3820,
13,
12315,
4943,
198,
2070,
17,
28,
961,
62,
2070,
7203,
9869,... | 2.220994 | 181 |
import numpy as np
from matplotlib import pyplot as plt
a = np.arange(256)
z = np.polyfit(a, function_to_approximate(a), 4)
p = np.poly1d(z)
z = quantize(z, 18)
q = np.poly1d(z)
print(z * 2**18)
plt.plot(function_to_approximate(a))
plt.plot(p(a))
plt.plot(q(a))
plt.plot(calculate_poly(z, a))
plt.show()
| [
11748,
299,
32152,
355,
45941,
198,
6738,
2603,
29487,
8019,
1330,
12972,
29487,
355,
458,
83,
198,
198,
64,
796,
45941,
13,
283,
858,
7,
11645,
8,
198,
198,
89,
796,
45941,
13,
35428,
11147,
7,
64,
11,
2163,
62,
1462,
62,
1324,
1... | 2.039474 | 152 |
from django.conf import settings
from enum import Enum
from selenium.webdriver.common.by import By
TESTCLIENT_BUNDLE_LABEL_FMT = "Response (Bundle of {}), API version: {}"
TESTCLIENT_RESOURCE_LABEL_FMT = "Response ({}), API version: {}"
MESSAGE_NO_PERMISSION = "You do not have permission to perform this acti... | [
6738,
42625,
14208,
13,
10414,
1330,
6460,
201,
198,
6738,
33829,
1330,
2039,
388,
201,
198,
6738,
384,
11925,
1505,
13,
12384,
26230,
13,
11321,
13,
1525,
1330,
2750,
201,
198,
201,
198,
201,
198,
201,
198,
51,
1546,
4825,
43,
28495,... | 1.966331 | 5,851 |
#!/usr/bin/env python
# encoding: utf-8
"""
@version: 1.0
@author: lizheming
@contact: nkdudu@126.com
@site: lizheming.top
@file: Zhuanlan.py
"""
from zhihu import headers, clear, error, session
from bs4 import BeautifulSoup
import re
import webbrowser
import termcolor
import requests
import json
import sys
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
21004,
25,
3384,
69,
12,
23,
198,
198,
37811,
198,
31,
9641,
25,
352,
13,
15,
198,
31,
9800,
25,
300,
528,
258,
2229,
198,
31,
32057,
25,
299,
74,
67,
463,
84,
31,
19420,
13... | 2.776786 | 112 |
import manga109api
import argparse
import os
import glob
from PIL import Image
def args_parser():
"""
:return: This function returns the manual input of book, annotation_type, and page count.
"""
parser = argparse.ArgumentParser()
parser.add_argument('--book', type=str, help='Name of b... | [
11748,
15911,
14454,
15042,
201,
198,
11748,
1822,
29572,
201,
198,
11748,
28686,
201,
198,
11748,
15095,
201,
198,
6738,
350,
4146,
1330,
7412,
201,
198,
201,
198,
201,
198,
4299,
26498,
62,
48610,
33529,
201,
198,
220,
220,
220,
37227... | 2.288981 | 962 |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from uuid import UUID
from typing import List
from botframework.streaming.transport import TransportConstants
from .models import Header
_CHAR_TO_BINARY_INT = {val.decode(): list(val)[0] for val in [b".", b"\n", b"1", b"0"... | [
2,
15069,
357,
66,
8,
5413,
10501,
13,
1439,
2489,
10395,
13,
198,
2,
49962,
739,
262,
17168,
13789,
13,
198,
198,
6738,
334,
27112,
1330,
471,
27586,
198,
6738,
19720,
1330,
7343,
198,
198,
6738,
10214,
30604,
13,
5532,
278,
13,
76... | 3.385246 | 122 |
#!/usr/bin/env python3
###############################################################################
# Copyright 2020 The Apollo 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... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
29113,
29113,
7804,
4242,
21017,
198,
2,
15069,
12131,
383,
17508,
46665,
13,
1439,
6923,
33876,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
3... | 3.385289 | 571 |