content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
import os
import json
import torch
import ast
from argparse import ArgumentParser
from mlflow.deployments import get_deploy_client
if __name__ == "__main__":
parser = ArgumentParser(description="Iris Classifiation Model")
parser.add_argument(
"--target",
type=str,
default="torchser... | [
11748,
28686,
198,
11748,
33918,
198,
11748,
28034,
198,
11748,
6468,
198,
6738,
1822,
29572,
1330,
45751,
46677,
198,
198,
6738,
285,
1652,
9319,
13,
2934,
1420,
902,
1330,
651,
62,
2934,
1420,
62,
16366,
628,
628,
198,
361,
11593,
367... | 2.381313 | 396 |
import torch
from predictor import COCODemo
from maskrcnn_benchmark.config import cfg
COCO_PERSON_INDEX = 1
if __name__ == '__main__':
import cv2
# import numpy as np
maskrcnn = MaskRCNN()
img_path = '/home/dh/Pictures/studio8-30Nov18/DSC03887.JPG'
img = cv2.imread(img_path)
# masks, bboxes =... | [
11748,
28034,
198,
6738,
41568,
1330,
327,
4503,
3727,
41903,
198,
6738,
9335,
6015,
20471,
62,
26968,
4102,
13,
11250,
1330,
30218,
70,
198,
198,
34,
4503,
46,
62,
47,
29086,
62,
12115,
6369,
796,
352,
198,
198,
361,
11593,
3672,
834... | 2.189516 | 248 |
#*****************************************************************************#
#* Copyright (c) 2004-2008, SRI International. *#
#* All rights reserved. *#
#* ... | [
2,
17174,
17174,
4557,
35625,
2,
201,
198,
2,
9,
15069,
357,
66,
8,
5472,
12,
11528,
11,
311,
7112,
4037,
13,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2... | 2.958911 | 1,947 |
#!/usr/bin/env python
# I read s [slab thickness], a [<sig^2>/<sig^2>], and lamcsig [log-normal lamc],
# generate the real log-normal covariance function, and curve fit an exponential
# to that data, yielding lamcw [Gaussian lamcw]. This allows use of exponential
# covariance with fitted correlation length with only m... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
314,
1100,
264,
685,
6649,
397,
20735,
4357,
257,
685,
27,
82,
328,
61,
17,
29,
14,
27,
82,
328,
61,
17,
29,
4357,
290,
30592,
6359,
328,
685,
6404,
12,
11265,
30592,
66,
4357... | 2.739837 | 246 |
"""
This module contains the helpers functions for reading genetic code table
information from json file.
"""
import json
# Read the list of genetic codes and associated files in a dictionary.
with open("gc_files/gc_file_associations.json") as gc_directory:
gc_file_associations = json.load(gc_directory)
def cod... | [
37811,
198,
1212,
8265,
4909,
262,
49385,
5499,
329,
3555,
8513,
2438,
3084,
198,
17018,
422,
33918,
2393,
13,
198,
37811,
198,
198,
11748,
33918,
198,
198,
2,
4149,
262,
1351,
286,
8513,
12416,
290,
3917,
3696,
287,
257,
22155,
13,
1... | 2.22527 | 2,406 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# @Author: grantmcgovern
# @Date: 2015-07-12 15:42:46
# @Email: me@grantmcgovern.com
# @Web: http://grantmcgovern.com
#
# @Last Modified by: grantmcgovern
# @Last Modified time: 2015-07-12 21:20:40
from django.contrib import admin
from models import WorkExperi... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
198,
2,
2488,
13838,
25,
7264,
23209,
47866,
198,
2,
2488,
10430,
25,
220,
220,
1853,
12,
2998,
12,
1065,
1... | 2.751592 | 157 |
#!/usr/bin/env python
#-*-coding:utf-8*-
# 程序实现的功能:计算分数
student_num = int(input('请输入学生数量: '))
student_name, physics_score, maths_score, history_score = '', 0, 0, 0
all_scores = []
for i in range(student_num):
student_name = input('请输入第 {} 个学生的姓名: '.format(i+1))
physics_score = float(input('请输入 {} 的物理成绩: '.format(st... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
12,
9,
12,
66,
7656,
25,
40477,
12,
23,
9,
12,
198,
2,
13328,
101,
233,
41753,
237,
22522,
252,
163,
236,
108,
21410,
27950,
253,
47797,
121,
171,
120,
248,
164,
106,
94,
163,... | 1.963899 | 554 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Description: run job
# ChangeLog
#
# ChangeLog 2015-02-12
# submit individual sequences to the workflow, so that the result of each
# sequence can be cached and the progress can be shown for a job with many
# sequences
# ChangeLog 2015-03-26
# the tmpdir is rem... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
12489,
25,
1057,
1693,
198,
198,
2,
9794,
11187,
220,
198,
2,
198,
2,
9794,
11187,
1853,
12,
2999,
12,
1065,
220... | 2.456826 | 1,714 |
# Purpose: math and construction tools
# Created: 27.03.2010, 2018 integrated into ezdxf
# Copyright (c) 2010-2020, Manfred Moitzi
# License: MIT License
from .vector import Vector, Vec2, X_AXIS, Y_AXIS, Z_AXIS, NULLVEC
from .construct2d import (
is_close_points, closest_point, convex_hull_2d, intersection_line_lin... | [
2,
32039,
25,
10688,
290,
5103,
4899,
198,
2,
15622,
25,
2681,
13,
3070,
13,
10333,
11,
2864,
11521,
656,
304,
89,
67,
26152,
198,
2,
15069,
357,
66,
8,
3050,
12,
42334,
11,
1869,
39193,
4270,
4224,
72,
198,
2,
13789,
25,
17168,
... | 2.696589 | 1,114 |
main()
| [
220,
220,
220,
220,
198,
12417,
3419,
628
] | 1.625 | 8 |
"""
1309. Decrypt String from Alphabet to Integer Mapping
Given a string s formed by digits ('0' - '9') and '#' . We want to map s to English lowercase characters as follows:
Characters ('a' to 'i') are represented by ('1' to '9') respectively.
Characters ('j' to 'z') are represented by ('10#' to '26#') respectively. ... | [
37811,
198,
12952,
24,
13,
4280,
6012,
10903,
422,
45695,
284,
34142,
337,
5912,
198,
15056,
257,
4731,
264,
7042,
416,
19561,
19203,
15,
6,
532,
705,
24,
11537,
290,
705,
2,
6,
764,
775,
765,
284,
3975,
264,
284,
3594,
2793,
7442,
... | 2.644509 | 346 |
from Section05_Singleton.SingletonTestability.Singleton import Singleton
| [
6738,
7275,
2713,
62,
29974,
10565,
13,
29974,
10565,
14402,
1799,
13,
29974,
10565,
1330,
5573,
10565,
628
] | 4.111111 | 18 |
# to get instagram dms and reply to them
from social_media.instagram.base import InstagramEngine
i = InstagramEngine()
i.login()
profile = i.get_profile('a_the_rva', hard=True)
profile.mount()
messages = profile.get_messages()
for message in messages:
message.reply("I love you!") | [
2,
284,
651,
916,
6713,
288,
907,
290,
10971,
284,
606,
198,
6738,
1919,
62,
11431,
13,
8625,
6713,
13,
8692,
1330,
10767,
13798,
198,
72,
796,
10767,
13798,
3419,
198,
72,
13,
38235,
3419,
198,
198,
13317,
796,
1312,
13,
1136,
62,
... | 3.108696 | 92 |
import numpy as np
from keras.models import Sequential
from keras.layers import Dense
from transient_keras.transient_keras_classifier import TransientKerasClassifier
from test_tools import getTrainDict, getTestSequence
def testKerasSequenceClassifier():
'''
Use randomly generated vector sequences to evaluate... | [
11748,
299,
32152,
355,
45941,
198,
6738,
41927,
292,
13,
27530,
1330,
24604,
1843,
198,
6738,
41927,
292,
13,
75,
6962,
1330,
360,
1072,
198,
198,
6738,
32361,
62,
6122,
292,
13,
7645,
1153,
62,
6122,
292,
62,
4871,
7483,
1330,
3602,... | 2.587859 | 626 |
import warnings
from django.conf import settings
# Avoid shadowing the login() and logout() views below.
from django.contrib import messages
from django.contrib.auth import (
get_user_model, update_session_auth_hash
)
from django.contrib.auth.forms import (
PasswordResetForm, SetPasswordForm, PasswordChangeFor... | [
11748,
14601,
198,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
2,
24390,
9082,
278,
262,
17594,
3419,
290,
2604,
448,
3419,
5009,
2174,
13,
198,
6738,
42625,
14208,
13,
3642,
822,
1330,
6218,
198,
6738,
42625,
14208,
13,
3642,
... | 2.68932 | 1,339 |
"""
This module contains code that dynamically scans for available apps
at module load time. For all apps found, a loader is generated which,
when called, imports the particular app and behaves like the app
class itself. The loaders are made available as module attributes
under the same name the corresponding app class... | [
37811,
198,
1212,
8265,
4909,
2438,
326,
32366,
23824,
329,
1695,
6725,
198,
265,
8265,
3440,
640,
13,
1114,
477,
6725,
1043,
11,
257,
40213,
318,
7560,
543,
11,
198,
12518,
1444,
11,
17944,
262,
1948,
598,
290,
39341,
588,
262,
598,
... | 2.883621 | 464 |
"""Implement pygmo optimizers."""
import warnings
import numpy as np
from estimagic import batch_evaluators
from estimagic.config import IS_PYGMO_INSTALLED
from estimagic.decorators import mark_minimizer
from estimagic.exceptions import NotInstalledError
from estimagic.optimization.algo_options import CONVERGENCE_RELA... | [
37811,
3546,
26908,
12972,
70,
5908,
6436,
11341,
526,
15931,
198,
11748,
14601,
198,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
3959,
9083,
1330,
15458,
62,
18206,
84,
2024,
198,
6738,
3959,
9083,
13,
11250,
1330,
3180,
62,
47,
56,... | 2.17869 | 17,494 |
import PySimpleGUI as sg
| [
11748,
9485,
26437,
40156,
355,
264,
70,
628
] | 3.25 | 8 |
#! /usr/bin/env python
# Copyright (c) 2015, Xerox Corporation (Xerox) and Palo Alto Research Center, Inc (PARC)
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source cod... | [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
15069,
357,
66,
8,
1853,
11,
44264,
1140,
10501,
357,
55,
263,
1140,
8,
290,
44878,
34317,
4992,
3337,
11,
3457,
357,
47,
25793,
8,
198,
2,
1439,
2489,
10395,
13,
198,
2,
19... | 3.539497 | 1,114 |
while True:
num = float(input("Please enter a number: "))
if num > 10:
print(f"\nYour number, {num}, is more than 10!")
elif num < 10:
print(f"\nYour number, {num}, is less than 10!")
else:
print("\nYour number is equal to 10!")
| [
4514,
6407,
25,
201,
198,
220,
220,
220,
997,
796,
12178,
7,
15414,
7203,
5492,
3802,
257,
1271,
25,
366,
4008,
201,
198,
201,
198,
220,
220,
220,
611,
997,
1875,
838,
25,
201,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
7,
69... | 2.143939 | 132 |
# Generated by Django 2.2 on 2019-08-30 01:26
from django.db import migrations, models
import django.db.models.deletion
| [
2,
2980,
515,
416,
37770,
362,
13,
17,
319,
13130,
12,
2919,
12,
1270,
5534,
25,
2075,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
14208,
13,
9945,
13,
27530,
13,
2934,
1616,
295,
628
] | 2.904762 | 42 |
# @Title: 丑数 (丑数 LCOF)
# @Author: 18015528893
# @Date: 2021-01-26 17:11:46
# @Runtime: 140 ms
# @Memory: 14.9 MB
if __name__ == '__main__':
s = Solution()
s.nthUglyNumber(10)
| [
198,
2,
2488,
19160,
25,
220,
10310,
239,
46763,
108,
357,
10310,
239,
46763,
108,
406,
8220,
37,
8,
198,
2,
2488,
13838,
25,
1248,
486,
2816,
2078,
49682,
198,
2,
2488,
10430,
25,
33448,
12,
486,
12,
2075,
1596,
25,
1157,
25,
351... | 1.947917 | 96 |
from django.apps import AppConfig
| [
6738,
42625,
14208,
13,
18211,
1330,
2034,
16934,
628
] | 3.888889 | 9 |
# class Bar:
# x = 1
#
# print(Bar.x)
(___,) = (1,)
print _.x
(Bar,) = (_,)
| [
2,
220,
1398,
2409,
25,
198,
2,
220,
220,
220,
220,
220,
2124,
796,
352,
198,
2,
198,
2,
220,
3601,
7,
10374,
13,
87,
8,
198,
198,
7,
17569,
35751,
796,
357,
16,
35751,
198,
198,
4798,
4808,
13,
87,
198,
7,
10374,
35751,
796,
... | 1.734694 | 49 |
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
import requests
import csv
import sys
from datetime import datetime
from geopy.distance import vincenty
import json
def write_csv(file_name, content):
"""write csv"""
with open(file_name, 'w') as output_file:
writer = csv.writer(output_file)
writ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
17,
13,
22,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
7007,
198,
11748,
269,
21370,
198,
11748,
25064,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,... | 2.047187 | 1,653 |
import re
import os
import shutil
import scrapy
from sohu.items import BBSItem
bbs_city_url_list = [
"https://bbs.focus.cn/anshan/",
"https://bbs.focus.cn/ankang/",
"https://bbs.focus.cn/anqing/",
"https://bbs.focus.cn/anshun/",
"https://bbs.focus.cn/anyang/",
"https://bbs.focus.cn/aomen/",
... | [
11748,
302,
198,
11748,
28686,
198,
11748,
4423,
346,
198,
11748,
15881,
88,
198,
6738,
523,
13415,
13,
23814,
1330,
347,
4462,
7449,
198,
198,
65,
1443,
62,
19205,
62,
6371,
62,
4868,
796,
685,
198,
220,
220,
220,
366,
5450,
1378,
... | 1.933858 | 5,337 |
import luigi
from tifffile import imread
from faim_sl.MultiFileTask import MultiFileTask
| [
11748,
300,
84,
25754,
198,
6738,
256,
361,
487,
576,
1330,
545,
961,
198,
198,
6738,
277,
1385,
62,
6649,
13,
29800,
8979,
25714,
1330,
15237,
8979,
25714,
628
] | 3.137931 | 29 |
import sys
ifunc, g = lambda: [*map(int, sys.stdin.readline().rstrip().split())], range
n = ifunc()[0]
iList = ifunc()
m = ifunc()[0]
dp = [[-1]*3 for _ in g(n)]
pSum = [0]
aSum = 0
for item in iList:
aSum += item
pSum.append(aSum)
for idx in g(n-1, -1, -1):
for cnt in g(3):
aVal = -1
b... | [
11748,
25064,
198,
198,
361,
19524,
11,
308,
796,
37456,
25,
30138,
8899,
7,
600,
11,
25064,
13,
19282,
259,
13,
961,
1370,
22446,
81,
36311,
22446,
35312,
28955,
4357,
2837,
198,
198,
77,
796,
611,
19524,
3419,
58,
15,
60,
198,
72,... | 1.668407 | 383 |
"""Functions for caching per-user context."""
import hashlib
from django.core.cache import cache
from . import IPFabricConfig
def _get_cache_key(user: str) -> str:
"""Key generator for the cache, adding the plugin prefix name."""
key_string = "-".join([IPFabricConfig.name, user])
return hashlib.md5(key_st... | [
37811,
24629,
2733,
329,
40918,
583,
12,
7220,
4732,
526,
15931,
198,
11748,
12234,
8019,
198,
6738,
42625,
14208,
13,
7295,
13,
23870,
1330,
12940,
198,
6738,
764,
1330,
6101,
43957,
1173,
16934,
628,
198,
4299,
4808,
1136,
62,
23870,
... | 2.936975 | 238 |
#!/usr/bin/env python
from .giant import giant | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
6738,
764,
70,
3014,
1330,
6175
] | 2.9375 | 16 |
import random
from matplotlib import pyplot as plt
plt.style.use("ggplot")
| [
11748,
4738,
198,
198,
6738,
2603,
29487,
8019,
1330,
12972,
29487,
355,
458,
83,
198,
198,
489,
83,
13,
7635,
13,
1904,
7203,
1130,
29487,
4943,
628
] | 2.888889 | 27 |
#!/usr/bin/python3
from distutils.core import setup
#from setuptools import setup
from setuptools.command.install import install
import os
setup(
name = "Bing Translate",
version = "1.0",
author = "poemdistance",
author_email = "poemdistance@gmail.com",
url = "",
packages = ['bing'],
cmdcl... | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
198,
6738,
1233,
26791,
13,
7295,
1330,
9058,
198,
2,
6738,
900,
37623,
10141,
1330,
9058,
198,
6738,
900,
37623,
10141,
13,
21812,
13,
17350,
1330,
2721,
198,
11748,
28686,
198,
198,
404... | 2.724409 | 127 |
# Copyright (c) 2015 Yubico AB
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or
# without modification, are permitted provided that the following
# conditions are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditi... | [
2,
15069,
357,
66,
8,
1853,
575,
549,
3713,
9564,
198,
2,
1439,
2489,
10395,
13,
198,
2,
198,
2,
220,
220,
2297,
396,
3890,
290,
779,
287,
2723,
290,
13934,
5107,
11,
351,
393,
198,
2,
220,
220,
1231,
17613,
11,
389,
10431,
2810... | 3.149565 | 575 |
# Now make a simple example using the custom projection.
import pdb
import sys
import os
import pkg_resources
pkg_resources.require('matplotlib==1.4.0')
import datetime
from dateutil.relativedelta import relativedelta
import re
import math
from matplotlib.ticker import ScalarFormatter, MultipleLocator
from matplotlib... | [
2,
2735,
787,
257,
2829,
1672,
1262,
262,
2183,
20128,
13,
198,
11748,
279,
9945,
198,
198,
11748,
25064,
198,
11748,
28686,
198,
11748,
279,
10025,
62,
37540,
198,
35339,
62,
37540,
13,
46115,
10786,
6759,
29487,
8019,
855,
16,
13,
1... | 1.614691 | 10,088 |
#################################################################################
# Copyright (c) 2018-2021, Texas Instruments Incorporated - http://www.ti.com
# All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditio... | [
29113,
29113,
14468,
2,
198,
2,
15069,
357,
66,
8,
2864,
12,
1238,
2481,
11,
3936,
43953,
3457,
40132,
532,
2638,
1378,
2503,
13,
20259,
13,
785,
198,
2,
1439,
6923,
33876,
13,
198,
2,
198,
2,
2297,
396,
3890,
290,
779,
287,
2723,... | 3.889868 | 454 |
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
# Visualising the results
"""## Get Wine Dataset"""
from sklearn.datasets import load_wine
data = load_wine()
data.keys()
X = data.data
y = data.target
from sklearn.model_selection import KFold
kf = KFold(n_splits=4)
kf.get_n_splits(X)
print(... | [
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
19798,
292,
355,
279,
67,
198,
198,
2,
15612,
1710,
262,
2482,
198,
198,
37811,
2235,
3497,
20447,
16092,
292,
316,
37811,
1... | 2.359793 | 1,159 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"Main Class to communicate with gs108e and gs105e netgear switches"
import time
import binascii
import pprint
import random
import struct
import socket
import fcntl
import psl_typ
import inspect
import errno
def get_hw_addr(ifname):
"gives the hardware (mac) address of a... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
1,
13383,
5016,
284,
10996,
351,
308,
82,
15711,
68,
290,
308,
82,
13348,
68,
2010,
31763,
18225,
1,
198,
11748,
640,
... | 1.918409 | 8,898 |
import unittest
from cpptypeinfo import (
TypeParser,
Float,
Double,
Bool,
Void,
Int8,
Int16,
Int32,
Int64,
UInt8,
UInt16,
UInt32,
UInt64,
)
from cpptypeinfo.usertype import (Pointer, Array, Field, Struct, Param,
Func... | [
11748,
555,
715,
395,
201,
198,
6738,
269,
381,
4906,
10951,
1330,
357,
201,
198,
220,
220,
220,
5994,
46677,
11,
201,
198,
220,
220,
220,
48436,
11,
201,
198,
220,
220,
220,
11198,
11,
201,
198,
220,
220,
220,
347,
970,
11,
201,
... | 1.801887 | 212 |
# import sys
# sys.path.append("/home/ruhil/Dropbox/projects/python3-SmartSchema/SmartSchema/SmartSchema")
from SmartSchema import SmartSchema
if __name__ == "__main__":
InvoiceSchema = {
"type": "object",
"required": [
"reciver",
"issuer",
"inv_date"
... | [
198,
2,
1330,
25064,
198,
2,
25064,
13,
6978,
13,
33295,
7203,
14,
11195,
14,
622,
71,
346,
14,
26932,
3524,
14,
42068,
14,
29412,
18,
12,
25610,
27054,
2611,
14,
25610,
27054,
2611,
14,
25610,
27054,
2611,
4943,
198,
198,
6738,
108... | 1.648666 | 1,537 |
#
# Copyright (c) 2008-2016 Citrix Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | [
2,
198,
2,
15069,
357,
66,
8,
3648,
12,
5304,
15792,
8609,
11998,
11,
3457,
13,
198,
2,
198,
2,
220,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
4943,
198,
2,
220,
220,
345,
743,
407,
779,
... | 3.241692 | 4,845 |
from django_test_deploy.settings import *
INSTALLED_APPS += ('bdd_tests',)
TEST_RUNNER = 'django_behave.runner.DjangoBehaveTestSuiteRunner'
#'django_behave.runner.DjangoBehaveTestSuiteRunner'
#'django_behave.runner.DjangoBehaveOnlyTestSuiteRunner'
| [
6738,
42625,
14208,
62,
9288,
62,
2934,
1420,
13,
33692,
1330,
1635,
198,
198,
38604,
7036,
1961,
62,
2969,
3705,
15853,
19203,
65,
1860,
62,
41989,
3256,
8,
198,
51,
6465,
62,
49,
4944,
21479,
796,
705,
28241,
14208,
62,
1350,
14150,... | 2.515152 | 99 |
from datetime import datetime
import worker
import configparser
import os
import sys
import const
cfgpath = os.path.join(const.ROOT_PATH, './config.ini')
conf = configparser.ConfigParser()
conf.read(cfgpath, encoding="utf-8")
tasks = conf.get('main', 'task').split(',')
for code in tasks:
token = co... | [
6738,
4818,
8079,
1330,
4818,
8079,
201,
198,
11748,
8383,
201,
198,
11748,
4566,
48610,
201,
198,
11748,
28686,
201,
198,
11748,
25064,
201,
198,
11748,
1500,
201,
198,
201,
198,
37581,
6978,
796,
28686,
13,
6978,
13,
22179,
7,
9979,
... | 2.645349 | 172 |
#!/usr/bin/env python
# coding: utf-8
"""
create at 2017/11/19 by allen
"""
from datetime import datetime
from app.lib.database import db, Column
user_role = db.Table('user_role',
Column('user_id', db.Integer, db.ForeignKey('user.id')),
Column('role_id', db.Integer, db.F... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
37811,
198,
220,
220,
220,
2251,
379,
2177,
14,
1157,
14,
1129,
416,
477,
268,
198,
37811,
198,
198,
6738,
4818,
8079,
1330,
4818,
8079,
1... | 1.776291 | 523 |
# -*- coding: utf-8 -*-
# python-holidays
# ---------------
# A fast, efficient Python library for generating country, province and state
# specific sets of holidays on the fly. It aims to make determining whether a
# specific date is a holiday as fast and flexible as possible.
#
# Author: ryanss <ryanssdev@icl... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
220,
21015,
12,
3937,
13842,
198,
2,
220,
220,
24305,
198,
2,
220,
317,
3049,
11,
6942,
11361,
5888,
329,
15453,
1499,
11,
8473,
290,
1181,
198,
2,
220,
2176... | 3.038023 | 263 |
import time
print('Bem vindo!! eu sou Priscila, a assistente A.I..')
time.sleep(2)
print("Por favor...qual o seu nome?")
seu_nome = input()
time.sleep(3)
print(f"{seu_nome},Você acha que o Júlio é baitola?")
baitola = input(f"Responda 'S' ou 'N'..." )
nao_baitola = (baitola)
print("Calculando......")
time.sleep(3)
pri... | [
11748,
640,
198,
198,
4798,
10786,
33,
368,
29178,
78,
3228,
304,
84,
24049,
1736,
2304,
10102,
11,
257,
3342,
21872,
317,
13,
40,
492,
11537,
198,
2435,
13,
42832,
7,
17,
8,
198,
4798,
7203,
47,
273,
2661,
986,
13255,
267,
384,
8... | 2.36 | 325 |
import unittest
import pymongo
import logging
logging.basicConfig(level=logging.DEBUG)
from mongomodels import connections, MongoModel, String, Integer, \
Column, or_, ValidationError, Boolean, belongs_to
if __name__ == '__main__':
unittest.main() | [
11748,
555,
715,
395,
198,
11748,
279,
4948,
25162,
198,
11748,
18931,
198,
6404,
2667,
13,
35487,
16934,
7,
5715,
28,
6404,
2667,
13,
30531,
8,
198,
198,
6738,
285,
506,
296,
375,
1424,
1330,
8787,
11,
42591,
17633,
11,
10903,
11,
... | 3.023529 | 85 |
"""
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
Ontology Engineering Group
http://www.oeg-upm.net/
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
Copyright (C) 2016 Ontology Engineering Group.
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-... | [
37811,
198,
2,
12,
46402,
46402,
46402,
46402,
27584,
46249,
198,
220,
9463,
1435,
14044,
4912,
198,
220,
220,
220,
220,
220,
220,
220,
2638,
1378,
2503,
13,
78,
1533,
12,
929,
76,
13,
3262,
14,
198,
2,
12,
46402,
46402,
46402,
4640... | 3.403087 | 583 |
# -*- coding: utf-8 -*-
"""
Operations on Strings
"""
import re
from mathics.version import __version__ # noqa used in loading to check consistency.
from mathics.builtin.base import (
BinaryOperator,
Builtin,
)
from mathics.core.expression import (
Expression,
Integer,
Integer1,
String,
... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
198,
18843,
602,
319,
4285,
654,
198,
37811,
198,
198,
11748,
302,
198,
198,
6738,
10688,
873,
13,
9641,
1330,
11593,
9641,
834,
220,
1303,
645,
20402,
973,
... | 2.207 | 15,000 |
from shapely.geometry import Polygon
import math
import numpy as np
import random
from shapely.geometry import Point
# from shapely.geometry import Polygon
| [
198,
6738,
5485,
306,
13,
469,
15748,
1330,
12280,
14520,
198,
11748,
10688,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
4738,
198,
6738,
5485,
306,
13,
469,
15748,
1330,
6252,
198,
2,
422,
5485,
306,
13,
469,
15748,
1330,
12280,
... | 3.613636 | 44 |
# return True if the given tree is a BST, else return False
from collections import deque
# Tree Node
# Function to Build Tree
if __name__=="__main__":
t=int(input())
for _ in range(0,t):
s=input()
root=buildTree(s)
if isBST(root):
print(1)
el... | [
198,
220,
220,
220,
220,
198,
198,
2,
1441,
6407,
611,
262,
1813,
5509,
318,
257,
44992,
11,
2073,
1441,
10352,
628,
198,
198,
6738,
17268,
1330,
390,
4188,
198,
2,
12200,
19081,
198,
198,
2,
15553,
284,
10934,
12200,
220,
220,
220,... | 1.99422 | 173 |
import googleapiclient.discovery
from library.gcloud_accessor.rest_library.gcloud_rest_library import GcloudRestLib
| [
11748,
23645,
499,
291,
75,
1153,
13,
67,
40821,
198,
198,
6738,
5888,
13,
70,
17721,
62,
15526,
273,
13,
2118,
62,
32016,
13,
70,
17721,
62,
2118,
62,
32016,
1330,
402,
17721,
19452,
25835,
628
] | 3.277778 | 36 |
from tifa.globals import db
from tifa.db.dal import Dal
from tifa.models.system import Staff
dal = Dal(db.session)
dal.add(
Staff,
name="hey tea",
)
dal.commit()
| [
6738,
256,
19215,
13,
4743,
672,
874,
1330,
20613,
198,
6738,
256,
19215,
13,
9945,
13,
31748,
1330,
12348,
198,
6738,
256,
19215,
13,
27530,
13,
10057,
1330,
9983,
198,
198,
31748,
796,
12348,
7,
9945,
13,
29891,
8,
198,
31748,
13,
... | 2.552239 | 67 |
import os, sys, re, myIO
# Needs to determine functionality for symbols within commands
runShell()
| [
11748,
28686,
11,
25064,
11,
302,
11,
616,
9399,
198,
198,
2,
36557,
284,
5004,
11244,
329,
14354,
1626,
9729,
628,
198,
5143,
23248,
3419,
198
] | 3.923077 | 26 |
from base64 import b64decode
from base64 import b64encode
import hashlib
from Crypto.Cipher import AES
from Crypto.Random import get_random_bytes
from Crypto.Util.Padding import pad, unpad
| [
6738,
2779,
2414,
1330,
275,
2414,
12501,
1098,
198,
6738,
2779,
2414,
1330,
275,
2414,
268,
8189,
198,
11748,
12234,
8019,
198,
198,
6738,
36579,
13,
34,
10803,
1330,
34329,
198,
6738,
36579,
13,
29531,
1330,
651,
62,
25120,
62,
33661,... | 3.392857 | 56 |
# -*- coding: utf-8 -*-
import os, sys
import random
import time
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "bazar.settings")
import django
django.setup()
from core.models import Cadastro
for i in range(1, 1000 ):
cad = Cadastro()
cad.senha = i
cad.cpf = generate_cpf()
cad.nome = 'Teste {}'.form... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
28686,
11,
25064,
198,
11748,
4738,
198,
11748,
640,
198,
198,
418,
13,
268,
2268,
13,
2617,
12286,
7203,
35028,
1565,
11230,
62,
28480,
51,
20754,
62,
33365,
242... | 2.331325 | 166 |
from .binding import HostGuestBindingAffinity
from .density import Density, ExcessMolarVolume
from .dielectric import DielectricConstant
from .enthalpy import EnthalpyOfMixing, EnthalpyOfVaporization
from .solvation import SolvationFreeEnergy
__all__ = [
HostGuestBindingAffinity,
Density,
ExcessMolarVolume... | [
6738,
764,
30786,
1330,
14504,
42481,
33,
6020,
35191,
6269,
198,
6738,
764,
43337,
1330,
360,
6377,
11,
1475,
919,
44,
6192,
31715,
198,
6738,
764,
11979,
801,
1173,
1330,
6733,
801,
1173,
3103,
18797,
198,
6738,
764,
34728,
9078,
1330... | 2.917241 | 145 |
import random
# import Dataset as ds
from flaskblog import poolData
from flaskblog import DoctorData as doctor
FILTER_THRESHOLD_PERC = 30
POOL_BUFFER_SIZE = 10
POOL_SIZE = 5
# if __name__ == '__main__':
# # add_to_dataset("Powai", 80)
# main()
| [
11748,
4738,
201,
198,
2,
1330,
16092,
292,
316,
355,
288,
82,
201,
198,
6738,
42903,
14036,
1330,
5933,
6601,
201,
198,
6738,
42903,
14036,
1330,
9356,
6601,
355,
6253,
220,
201,
198,
201,
198,
46700,
5781,
62,
4221,
19535,
39,
15173... | 2.214286 | 126 |
import re
from django import template
from home.models import CommissionerPage
from django.db.models import Q
register = template.Library()
@register.inclusion_tag('partials/current-commissioners.html')
| [
11748,
302,
198,
198,
6738,
42625,
14208,
1330,
11055,
198,
6738,
1363,
13,
27530,
1330,
13270,
9876,
198,
6738,
42625,
14208,
13,
9945,
13,
27530,
1330,
1195,
198,
198,
30238,
796,
11055,
13,
23377,
3419,
198,
198,
31,
30238,
13,
259,
... | 3.614035 | 57 |
import pandas as pd
import attr
from visions.core.model import TypeRelation
@attr.s(frozen=True)
@attr.s(frozen=True)
| [
11748,
19798,
292,
355,
279,
67,
198,
11748,
708,
81,
198,
198,
6738,
26096,
13,
7295,
13,
19849,
1330,
5994,
6892,
341,
628,
198,
198,
31,
35226,
13,
82,
7,
69,
42005,
28,
17821,
8,
628,
198,
31,
35226,
13,
82,
7,
69,
42005,
28... | 2.583333 | 48 |
import torch
import os
import numpy as np
import math
from einops import rearrange
import logging
logger = logging.getLogger(__name__)
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
_GCONST_ = -0.9189385332046727 # ln(sqrt(2*pi))
def positionalencoding2d(D, H, W):
"""
:param D: dimens... | [
11748,
28034,
198,
11748,
28686,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
10688,
198,
6738,
304,
259,
2840,
1330,
37825,
858,
198,
11748,
18931,
198,
6404,
1362,
796,
18931,
13,
1136,
11187,
1362,
7,
834,
3672,
834,
8,
198,
198,
... | 2.042881 | 4,734 |
# # Copyright Clayton Brown 2019. See LICENSE file.
# import numpy
# from types import FunctionType
# from csaps import UnivariateCubicSmoothingSpline
# class ProbabilityDistribution:
# '''
# Function to handle probability distributions.
# Parameters
# ----------
# distributionFun... | [
2,
1303,
15069,
32108,
4373,
13130,
13,
4091,
38559,
24290,
2393,
13,
201,
198,
201,
198,
2,
1330,
299,
32152,
201,
198,
201,
198,
2,
422,
3858,
1330,
15553,
6030,
201,
198,
2,
422,
50115,
1686,
1330,
791,
42524,
43632,
291,
7556,
1... | 2.521454 | 1,981 |
"""
API core
"""
from functools import wraps
from flask import jsonify
from ..common import core
def create_app():
""" Returns API application instance """
app = core.create_app(__name__, __path__)
# Custom error handlers
# app.errorhandler(ExampleError)(on_example_error)
app.errorhandler(40... | [
37811,
198,
220,
220,
220,
7824,
4755,
198,
37811,
198,
6738,
1257,
310,
10141,
1330,
27521,
198,
6738,
42903,
1330,
33918,
1958,
198,
198,
6738,
11485,
11321,
1330,
4755,
198,
198,
4299,
2251,
62,
1324,
33529,
198,
220,
220,
220,
37227... | 3.008621 | 116 |
import torch
import torch.nn as nn
class Coder(nn.Module):
"""
Base class for implementing encoders and decoders. All new encoders and
decoders should derive from this class.
"""
def __init__(self, num_in, num_out, in_dim):
"""
Parameters
----------
num_in: int... | [
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
628,
198,
4871,
327,
12342,
7,
20471,
13,
26796,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
7308,
1398,
329,
15427,
2207,
375,
364,
290,
875,
375,
364,
13,
1439,
64... | 2.116114 | 422 |
import abc
from abc import abstractmethod
from dataclasses import dataclass
from typing import List, Optional, Type, Union
from nuplan.common.actor_state.state_representation import StateSE2
from nuplan.common.maps.abstract_map import AbstractMap
from nuplan.common.maps.maps_datatypes import TrafficLightStatusData
fro... | [
11748,
450,
66,
198,
6738,
450,
66,
1330,
12531,
24396,
198,
6738,
4818,
330,
28958,
1330,
4818,
330,
31172,
198,
6738,
19720,
1330,
7343,
11,
32233,
11,
5994,
11,
4479,
198,
198,
6738,
14364,
11578,
13,
11321,
13,
11218,
62,
5219,
13... | 3.08042 | 2,002 |
from tworaven_apps.solver_interfaces.util_search import (
SearchAutoSklearn,
SearchCaret,
SearchH2O,
SearchTPOT,
SearchLudwig,
SearchMLJarSupervised,
SearchMLBox,
SearchTwoRavens)
| [
6738,
665,
273,
4005,
62,
18211,
13,
82,
14375,
62,
3849,
32186,
13,
22602,
62,
12947,
1330,
357,
198,
220,
220,
220,
11140,
27722,
15739,
35720,
11,
198,
220,
220,
220,
11140,
34,
8984,
11,
198,
220,
220,
220,
11140,
39,
17,
46,
... | 2.377778 | 90 |
# contains utility functions relevant for image and coordinate transformation
from __future__ import division
from itertools import combinations
import json
import numpy as np
import cv2
def get_best_transform(x,y):
"""
given a set of N points in both x and y space, finds the best (lowest avg error)
... | [
2,
4909,
10361,
5499,
5981,
329,
2939,
290,
20435,
13389,
198,
198,
6738,
11593,
37443,
834,
1330,
7297,
198,
6738,
340,
861,
10141,
1330,
17790,
198,
11748,
33918,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
269,
85,
17,
220,
628,
... | 2.002019 | 2,477 |
# -*- coding: utf-8 -*-
# SPDX-License-Identifier: MIT
# Copyright © 2019 André Santos
###############################################################################
# Imports
###############################################################################
from builtins import map
from builtins import object
from bu... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
30628,
55,
12,
34156,
12,
33234,
7483,
25,
17168,
198,
2,
15069,
10673,
13130,
843,
29350,
28458,
198,
198,
29113,
29113,
7804,
4242,
21017,
198,
2,
1846,
3742,
... | 6.327586 | 116 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Sep 1 11:46:37 2021
@author: colin
"""
import json
import argparse
import os
parser = argparse.ArgumentParser(description="compare two amino alphabet clusterings")
parser.add_argument('-f', '--files', type=is_file, nargs=2, default=None,
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
3300,
8621,
220,
352,
1367,
25,
3510,
25,
2718,
33448,
198,
198,
31,
9800,
25,
951,
259,
... | 2.335385 | 325 |
config_fingerprint = None
config = None
log_writer = None
isTrain = True | [
11250,
62,
35461,
4798,
796,
6045,
198,
11250,
796,
6045,
198,
6404,
62,
16002,
796,
6045,
198,
271,
44077,
796,
6407
] | 3.428571 | 21 |
# Based on:
# https://github.com/meliketoy/wide-resnet.pytorch/blob/master/networks/wide_resnet.py
import torch
import torch.nn as nn
import torch.nn.functional as F
| [
2,
13403,
319,
25,
198,
2,
3740,
1378,
12567,
13,
785,
14,
17694,
1134,
316,
726,
14,
4421,
12,
411,
3262,
13,
9078,
13165,
354,
14,
2436,
672,
14,
9866,
14,
3262,
5225,
14,
4421,
62,
411,
3262,
13,
9078,
198,
198,
11748,
28034,
... | 2.698413 | 63 |
import os
from flask import Flask, request, jsonify, make_response
from transformation.generator_handler import GeneratorHandler
from transformation.generators.documents_output_generator import DocumentsOutputGenerator
from transformation.generators.generator_register import GeneratorRegister
from metamodel.model imp... | [
11748,
28686,
198,
198,
6738,
42903,
1330,
46947,
11,
2581,
11,
33918,
1958,
11,
787,
62,
26209,
198,
6738,
13389,
13,
8612,
1352,
62,
30281,
1330,
35986,
25060,
198,
6738,
13389,
13,
8612,
2024,
13,
15390,
2886,
62,
22915,
62,
8612,
... | 3.546875 | 192 |
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
def date_process(data):
"""
:param data: original data
:return: groups: dict type: key is date and the corresponding intraday volumn size
"""
data_filter = data[data.isna().any(axis=1)]
data_filter["reshape_time"] = pd.to_d... | [
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
628,
198,
4299,
3128,
62,
14681,
7,
7890,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1058,
... | 2.35608 | 1,143 |
from threading import Thread
from globalFile import GlobalData
import pyaudio
import base64
| [
6738,
4704,
278,
1330,
14122,
198,
6738,
3298,
8979,
1330,
8060,
6601,
198,
11748,
12972,
24051,
198,
11748,
2779,
2414,
628
] | 4.428571 | 21 |
# Copyright (C) 2019 by eHealth Africa : http://www.eHealthAfrica.org
#
# See the NOTICE file distributed with this work for additional information
# regarding copyright ownership.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with
# the License. Y... | [
2,
15069,
357,
34,
8,
13130,
416,
304,
18081,
5478,
1058,
2638,
1378,
2503,
13,
68,
18081,
17584,
30997,
13,
2398,
198,
2,
198,
2,
4091,
262,
28536,
2393,
9387,
351,
428,
670,
329,
3224,
1321,
198,
2,
5115,
6634,
9238,
13,
198,
2,... | 3.095989 | 698 |
import numpy as np
import matplotlib
matplotlib.use('TkAgg')
from matplotlib import pyplot as plt
import csv
from scipy.optimize import curve_fit
frameDeltas = []
physicsDeltas = []
openGLDeltas = []
drawCallDeltas = []
particleCounts = []
rowCount = 5120
fifth = 1024
with open('analysisResultSpaceOpenCL.csv', newl... | [
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
198,
6759,
29487,
8019,
13,
1904,
10786,
51,
74,
46384,
11537,
198,
6738,
2603,
29487,
8019,
1330,
12972,
29487,
355,
458,
83,
198,
11748,
269,
21370,
198,
6738,
629,
541,
88... | 2.376398 | 1,788 |
import os
import unittest
import collections
from wordpress_xmlrpc import Client
from wordpress_xmlrpc.compat import ConfigParser
| [
11748,
28686,
201,
198,
11748,
555,
715,
395,
201,
198,
11748,
17268,
201,
198,
201,
198,
6738,
1573,
8439,
62,
19875,
81,
14751,
1330,
20985,
201,
198,
6738,
1573,
8439,
62,
19875,
81,
14751,
13,
5589,
265,
1330,
17056,
46677,
201,
1... | 3.159091 | 44 |
import pytest
import cptac
import sys
# TODO: figure out what cwd of pytest is
sys.path.insert(0, "cptac/tests/")
from tests.cancer import Cancer
import curses
# Setting autouse=True here makes it so that this method always runs before any tests
@pytest.fixture(scope="session", autouse=True)
def get_datasets_lists():... | [
11748,
12972,
9288,
198,
11748,
269,
457,
330,
198,
11748,
25064,
198,
2,
16926,
46,
25,
3785,
503,
644,
269,
16993,
286,
12972,
9288,
318,
198,
17597,
13,
6978,
13,
28463,
7,
15,
11,
366,
66,
457,
330,
14,
41989,
14,
4943,
198,
6... | 2.486903 | 649 |
import cv2
import numpy as np
filename = '33-1.jpg'
img = cv2.imread(filename) # read image
img = cv2.resize(img, (640, 480)) # resize it
img = cv2.blur(img, (3, 3)) # blur to remove noise
hsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV) # BGR to HSV
cv2.namedWindow('Result Image (BGR)') # window to display image
... | [
11748,
269,
85,
17,
198,
11748,
299,
32152,
355,
45941,
628,
198,
198,
34345,
796,
705,
2091,
12,
16,
13,
9479,
6,
198,
198,
9600,
796,
269,
85,
17,
13,
320,
961,
7,
34345,
8,
220,
1303,
1100,
2939,
198,
9600,
796,
269,
85,
17,
... | 2.353075 | 878 |
"""Core of the PDFfitx."""
from typing import Dict, Union
from diffpy.srfit.equation.builder import EquationFactory
from diffpy.srfit.fitbase import FitRecipe, FitContribution
from diffpy.srfit.fitbase import FitResults
from diffpy.srfit.pdf import PDFGenerator, DebyePDFGenerator
class MyContribution(FitContribution... | [
37811,
14055,
286,
262,
12960,
11147,
87,
526,
15931,
198,
6738,
19720,
1330,
360,
713,
11,
4479,
198,
198,
6738,
814,
9078,
13,
27891,
11147,
13,
4853,
341,
13,
38272,
1330,
7889,
341,
22810,
198,
6738,
814,
9078,
13,
27891,
11147,
1... | 3.284974 | 193 |
#!/usr/bin/env python
"""
Class :py:class:`SegGeometryEpixHR2x2V1` describes the EpixHR2x2V1 sensor geometry
===================================================================================
In this class we use natural matrix notations like in data array
\n We assume that
\n * sensor consists of 2x2 ASICs has 288 r... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
37811,
198,
9487,
1058,
9078,
25,
4871,
25,
63,
41030,
10082,
15748,
13807,
844,
17184,
17,
87,
17,
53,
16,
63,
8477,
262,
4551,
844,
17184,
17,
87,
17,
53,
16,
12694,
22939,
198,
... | 2.061996 | 1,984 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2013-2020 European Commission (JRC);
# Licensed under the EUPL (the 'Licence');
# You may not use this work except in compliance with the Licence.
# You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl
"""
wltp: generate WLTC gear-shifts bas... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
198,
2,
15069,
2211,
12,
42334,
3427,
4513,
357,
41,
7397,
1776,
198,
2,
49962,
739,
262,
4576,
6489,
357,
1169,
... | 2.884058 | 207 |
""" Contains conversion logic between Mongoengine Fields and Graphene Types """
from singledispatch import singledispatch
from graphene import (
String, Boolean, Int, Float, List,
ID, Dynamic, Field
)
from graphene.types.json import JSONString
from graphene.types.datetime import DateTime
from mongoengine.fi... | [
37811,
49850,
11315,
9156,
1022,
42591,
18392,
23948,
290,
402,
2416,
29473,
24897,
37227,
198,
198,
6738,
31958,
8802,
963,
1330,
31958,
8802,
963,
198,
198,
6738,
42463,
1330,
357,
198,
220,
220,
220,
10903,
11,
41146,
11,
2558,
11,
4... | 2.955576 | 2,161 |
# -*- coding: utf-8 -*-
"""Updates the Synology (music) index whenever the beets library is changed.
This assumes beets is being run on Synology DiskStation Manager so synoindex is
available. Besides enabling the plugin no configuration is needed.
"""
from subprocess import run
from beets.plugins import BeetsPlugi... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
4933,
19581,
262,
16065,
1435,
357,
28965,
8,
6376,
8797,
262,
307,
1039,
5888,
318,
3421,
13,
198,
198,
1212,
18533,
307,
1039,
318,
852,
1057,
319,
16065,
... | 3.712644 | 87 |
from django.conf.urls import url
from .views import (
app_view,
skipped_app_view,
view_with_decorator_with_wraps,
view_with_decorator_without_wraps
)
url_patterns_with_decorator_with_wraps = [
url(
r'^decorator-with-wraps/$', view_with_decorator_with_wraps,
name='decorator_with_wr... | [
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
19016,
198,
198,
6738,
764,
33571,
1330,
357,
198,
220,
220,
220,
598,
62,
1177,
11,
198,
220,
220,
220,
26684,
62,
1324,
62,
1177,
11,
198,
220,
220,
220,
1570,
62,
4480,
62,
125... | 2.323308 | 399 |
from django import forms
from ckeditor.widgets import CKEditorWidget
from .models import Track
class TrackForm(forms.ModelForm):
"""Form for ``TrackAdmin`` class."""
| [
6738,
42625,
14208,
1330,
5107,
198,
198,
6738,
269,
9091,
2072,
13,
28029,
11407,
1330,
327,
7336,
67,
2072,
38300,
198,
198,
6738,
764,
27530,
1330,
17762,
628,
198,
4871,
17762,
8479,
7,
23914,
13,
17633,
8479,
2599,
198,
220,
220,
... | 3.283019 | 53 |
import datetime
from intake.catalog.local import YAMLFilesCatalog
from intake.source.base import Schema
from intake_xarray.base import DataSourceMixin
from intake_informaticslab import __version__
from .dataset import MODataset
from .utils import datetime_to_iso_str
DATA_DELAY = 24 + 6 # num hours from current tim... | [
11748,
4818,
8079,
198,
198,
6738,
10337,
13,
9246,
11794,
13,
12001,
1330,
575,
2390,
43,
25876,
49015,
198,
6738,
10337,
13,
10459,
13,
8692,
1330,
10011,
2611,
198,
6738,
10337,
62,
87,
18747,
13,
8692,
1330,
6060,
7416,
35608,
259,
... | 3.378641 | 103 |
#!/usr/bin/python
from PyQt4 import QtCore, QtGui
'''
Created on 06/11/2009
@author: iAlex
'''
class TumblrTextEdit(QtGui.QVBoxLayout):
'''
Especial Text Editor for Tumblr it allow to create bold,italic,strike text as well
insert links and image it includes a preview
'''
pariente = None
... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
6738,
9485,
48,
83,
19,
1330,
33734,
14055,
11,
33734,
8205,
72,
198,
7061,
6,
198,
41972,
319,
9130,
14,
1157,
14,
10531,
198,
198,
31,
9800,
25,
1312,
15309,
198,
7061,
6,
198,
198,
487... | 2.306667 | 150 |
#!/usr/bin/env python3
# _*_ coding: utf-8 _*_
"""Skip image element when imagedata r:id cannot be found.
:author: Shay Hill
:created: 11/15/2020
User forky2 sent a docx file with an empty imagedata element:
`<v:imagedata croptop="-65520f" cropbottom="65520f"/>`
Docx2python expects to encounter
`<v:imagedata r:id=... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
4808,
9,
62,
19617,
25,
3384,
69,
12,
23,
4808,
9,
62,
198,
37811,
50232,
2939,
5002,
618,
545,
1886,
1045,
374,
25,
312,
2314,
307,
1043,
13,
198,
198,
25,
9800,
25,
3476... | 2.516667 | 840 |
from django.db import models
from lino.api import dd, _
from lino_book.projects.chooser.food import year_in_school, food_choices, food
| [
198,
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
300,
2879,
13,
15042,
1330,
49427,
11,
4808,
198,
198,
6738,
300,
2879,
62,
2070,
13,
42068,
13,
6679,
13416,
13,
19425,
1330,
614,
62,
259,
62,
14347,
11,
2057,
62,
6679,
10... | 2.901961 | 51 |
if __name__ == "__main__":
tamanio = int(input("Ingresa el numero de escalones: "))
staircase(tamanio) | [
220,
220,
220,
220,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
220,
198,
220,
220,
220,
256,
10546,
952,
796,
493,
7,
15414,
7203,
27682,
14625,
1288,
997,
3529,
390,
12221,
1952,
25,
366,
4008,
198,
220,
220,
220... | 2.367347 | 49 |
from __future__ import print_function
import fibra
if __name__ == "__main__":
test()
| [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
198,
11748,
12900,
430,
628,
198,
220,
220,
220,
220,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
1332,
3419,
198
] | 2.605263 | 38 |
__author__ = 'anton'
| [
834,
9800,
834,
796,
705,
23026,
6,
198
] | 2.625 | 8 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
import math
""" \brief Calcula tantos primos como se indique y los guarda en un
vector
\param primos Un vector de primos
\param hasta El mayor número que queremos comprobar si es primo. Si
hasta es primo, se añadirá al vector
"""
##############################################... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
10688,
198,
37811,
3467,
65,
3796,
27131,
64,
24246,
418,
2684,
418,
401,
78,
384,
773,
2350,
331,
22346,
4860,
... | 3.244253 | 696 |
# -*- coding: utf-8 -*-
from tccli.services.postgres.postgres_client import register_arg
from tccli.services.postgres.postgres_client import get_actions_info
from tccli.services.postgres.postgres_client import AVAILABLE_VERSION_LIST
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
256,
535,
4528,
13,
30416,
13,
7353,
34239,
13,
7353,
34239,
62,
16366,
1330,
7881,
62,
853,
198,
6738,
256,
535,
4528,
13,
30416,
13,
7353,
34239,
13,
7353,
342... | 2.987179 | 78 |
import bpy
#class ListIndex(bpy.types.IntProperty):
#list_index: bpy.props.IntProperty(name = "Index for my_list", default = 0)
# bpy.types.Scene.list_index = IntProperty(name = "Index for my_list", default = 0)
#class MyBoneMapIndex(bpy.types.PropertyGroup):
# use an annotation
#bone_index : bp... | [
11748,
275,
9078,
198,
2,
4871,
7343,
15732,
7,
65,
9078,
13,
19199,
13,
5317,
21746,
2599,
198,
220,
220,
220,
220,
220,
1303,
4868,
62,
9630,
25,
275,
9078,
13,
1676,
862,
13,
5317,
21746,
7,
3672,
796,
366,
15732,
329,
616,
62,... | 2.616915 | 201 |
from django.shortcuts import render,redirect, get_object_or_404
from .forms import User_Form, Profile_Form
from django.contrib import messages
from django.urls import reverse
from django.contrib.auth.models import User
from django.core.mail import send_mass_mail, send_mail
from Shop_platform.settings import EMAIL_HOST_... | [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
11,
445,
1060,
11,
651,
62,
15252,
62,
273,
62,
26429,
198,
6738,
764,
23914,
1330,
11787,
62,
8479,
11,
13118,
62,
8479,
198,
6738,
42625,
14208,
13,
3642,
822,
1330,
6218,
198,
6738,... | 3.36129 | 155 |
import unittest
from app import create_app
from app.questionnaire.location import Location
| [
11748,
555,
715,
395,
198,
198,
6738,
598,
1330,
2251,
62,
1324,
198,
6738,
598,
13,
25652,
24042,
13,
24886,
1330,
13397,
628
] | 4.043478 | 23 |
from GO import * | [
6738,
10351,
1330,
1635
] | 4 | 4 |
# -*- coding: utf-8 -*-
"""
Subscription implementations.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys
import time
from zope import component
from zope.event import notify
from zope.interface import Interface
from zope.interface import im... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
7004,
33584,
25504,
13,
198,
198,
37811,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
6738,
11593,
37443,
834,
1330,
7297,
198,
6738,
11593,
37443... | 3.049832 | 2,970 |
from typing import List | [
6738,
19720,
1330,
7343
] | 5.75 | 4 |