content stringlengths 1 1.05M | input_ids listlengths 1 883k | ratio_char_token float64 1 22.9 | token_count int64 1 883k |
|---|---|---|---|
# -*- coding: utf-8 -*-
import codecs
import os
from setuptools import setup
setup(
name='django-basic-models-behaviors',
version=__import__('basic_models_behaviors').__version__,
description='Tiny app to provide basic behaviors for django models.',
long_description=read('README.rst'),
author='N... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
40481,
82,
198,
11748,
28686,
198,
198,
6738,
900,
37623,
10141,
1330,
9058,
628,
198,
40406,
7,
198,
220,
220,
220,
1438,
11639,
28241,
14208,
12,
35487,
12... | 2.621795 | 468 |
import logging
from uuid import UUID
from biplist import Data, Uid
from plistutils.utils import parse_mac_absolute_time
logger = logging.getLogger(__name__)
| [
11748,
18931,
198,
6738,
334,
27112,
1330,
471,
27586,
628,
198,
6738,
3182,
489,
396,
1330,
6060,
11,
471,
312,
628,
198,
6738,
458,
396,
26791,
13,
26791,
1330,
21136,
62,
20285,
62,
48546,
62,
2435,
628,
198,
6404,
1362,
796,
18931... | 3.113208 | 53 |
from . import default # noqa
from . import types # noqa
from . import standard # noqa
| [
6738,
764,
1330,
4277,
220,
1303,
645,
20402,
198,
6738,
764,
1330,
3858,
220,
1303,
645,
20402,
198,
6738,
764,
1330,
3210,
220,
1303,
645,
20402,
198
] | 3.296296 | 27 |
import random
_TRANSF_FN = {1: scale,
2: translate,
3: skew_x,
4: skew_y,
5: rotate,
}
_SCALE_TRANS = {1: (1, 1)}
| [
11748,
4738,
628,
628,
198,
198,
62,
5446,
15037,
37,
62,
43221,
796,
1391,
16,
25,
5046,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
362,
25,
15772,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,... | 1.523077 | 130 |
#!/usr/bin/python3
#
# Project: build
# Description: this is a very simple build tool which imitates from Bazel
#
import subprocess
import argparse
import shutil
import glob
import sys
import os
from core import *
from languages import *
from plugins import *
def parse():
parser = argparse.ArgumentParser()
... | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
2,
198,
2,
4935,
25,
1382,
198,
2,
12489,
25,
428,
318,
257,
845,
2829,
1382,
2891,
543,
545,
38654,
422,
347,
41319,
198,
2,
198,
198,
11748,
850,
14681,
198,
11748,
1822,
29572,
198... | 2.21016 | 1,437 |
import cv2
import sys
import numpy as np
from scipy.io import loadmat
if __name__ == '__main__':
convert()
| [
11748,
269,
85,
17,
198,
11748,
25064,
198,
11748,
299,
32152,
355,
45941,
198,
198,
6738,
629,
541,
88,
13,
952,
1330,
3440,
6759,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
10385,
3419,
... | 2.627907 | 43 |
import yaml
| [
11748,
331,
43695,
628
] | 3.25 | 4 |
# https://leetcode.com/problems/single-number-ii/
#
# Given an array of integers, every element appears three times except for one. Find that single one.
#
# Note:
# Your algorithm should have a linear runtime complexity. Could you implement it without using extra memory?
| [
2,
3740,
1378,
293,
316,
8189,
13,
785,
14,
1676,
22143,
14,
29762,
12,
17618,
12,
4178,
14,
198,
2,
198,
2,
11259,
281,
7177,
286,
37014,
11,
790,
5002,
3568,
1115,
1661,
2845,
329,
530,
13,
9938,
326,
2060,
530,
13,
198,
2,
19... | 3.956522 | 69 |
import os
import uuid
from datetime import datetime
import mock
import pytz
from django.conf import settings
from django.contrib.auth.models import User
from django.test import TestCase
from django.urls import reverse
from utils.widget import quill
from wiki.models import wikipage, wikisection
from wiki.models.wikipag... | [
11748,
28686,
198,
11748,
334,
27112,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
198,
11748,
15290,
198,
11748,
12972,
22877,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27530,... | 3.609091 | 110 |
# Generated by Django 2.2.17 on 2021-01-27 14:27
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
362,
13,
17,
13,
1558,
319,
33448,
12,
486,
12,
1983,
1478,
25,
1983,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.875 | 32 |
# -*- coding: utf-8 -*-
"""
Created on Thu Jun 20 13:26:46 2019
@author: LENOVO
"""
import pandas as pd
filename = r"C:\Users\LENOVO\Downloads\Tweets.csv"
df = pd.read_csv(filename,encoding="unicode_escape")
all_data = df.drop_duplicates(keep='first', inplace=False)
cleaned_data = all_data.dro... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
37811,
201,
198,
41972,
319,
26223,
7653,
1160,
1511,
25,
2075,
25,
3510,
13130,
201,
198,
201,
198,
31,
9800,
25,
406,
1677,
8874,
46,
201,
198,
37811,
201,
198,... | 2.604859 | 782 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
628,
198
] | 2.777778 | 36 |
"""
The list of ingredient choices is quite large, so this module provides lazy loaded widgets which help
reducing loading times.
"""
from django import forms
| [
37811,
198,
464,
1351,
286,
18734,
7747,
318,
2407,
1588,
11,
523,
428,
8265,
3769,
16931,
9639,
40803,
543,
1037,
220,
198,
445,
25648,
11046,
1661,
13,
198,
37811,
198,
198,
6738,
42625,
14208,
1330,
5107,
198
] | 4.351351 | 37 |
import struct
import subprocess
from abc import ABCMeta
from functools import lru_cache
from typing import Union, Tuple, Optional
from .base import Header, Protocol
from .constants import *
ETH_TYPE_IP = 0x0800
ETH_TYPE_ARP = 0x0806
ETH_TYPE_RARP = 0x8035
ETH_TYPE_SNMP = 0x814c
ETH_TYPE_IPV6 = 0x086dd
ETH_TYPE_MPLS_U... | [
11748,
2878,
198,
11748,
850,
14681,
198,
6738,
450,
66,
1330,
9738,
48526,
198,
6738,
1257,
310,
10141,
1330,
300,
622,
62,
23870,
198,
6738,
19720,
1330,
4479,
11,
309,
29291,
11,
32233,
198,
198,
6738,
764,
8692,
1330,
48900,
11,
2... | 2.290559 | 1,091 |
for i in range(10):
pass
j = 0
while j < 10:
j += 1 | [
1640,
1312,
287,
2837,
7,
940,
2599,
198,
220,
220,
220,
1208,
198,
198,
73,
796,
657,
198,
4514,
474,
1279,
838,
25,
198,
220,
220,
220,
474,
15853,
352
] | 2 | 30 |
from utils.conf import args | [
6738,
3384,
4487,
13,
10414,
1330,
26498
] | 3.857143 | 7 |
from datetime import datetime, date
from isodate import datetime_isoformat
from bson import ObjectId
from json import JSONEncoder
| [
6738,
4818,
8079,
1330,
4818,
8079,
11,
3128,
198,
6738,
318,
375,
378,
1330,
4818,
8079,
62,
26786,
18982,
198,
6738,
275,
1559,
1330,
9515,
7390,
198,
6738,
33918,
1330,
19449,
27195,
12342,
628
] | 3.852941 | 34 |
from flask import Flask, render_template
import random, datetime as dt, requests
app = Flask(__name__)
# Jinja = templating language
if __name__ == '__main__':
app.run(debug=True) | [
6738,
42903,
1330,
46947,
11,
8543,
62,
28243,
198,
11748,
4738,
11,
4818,
8079,
355,
288,
83,
11,
7007,
220,
198,
198,
1324,
796,
46947,
7,
834,
3672,
834,
8,
198,
198,
2,
17297,
6592,
796,
2169,
489,
803,
3303,
198,
198,
361,
11... | 2.921875 | 64 |
import pygame
import random
import time
import numpy as np
WHITE = 255, 255, 255
BLACK = 0, 0, 0
size = width, height = 480, 320
row = 32
col = 48
cell_width = (width//col)
cell_height = (height//row)
font_size = 60
FPS = 30
LIVE_P_MAX = 0.5;
LIVE_P_MIN = 0.01;
_grid = np.full((row, col), None)
screen = None
refr... | [
11748,
12972,
6057,
198,
11748,
4738,
198,
11748,
640,
198,
11748,
299,
32152,
355,
45941,
198,
198,
12418,
12709,
796,
14280,
11,
14280,
11,
14280,
198,
9148,
8120,
796,
657,
11,
657,
11,
657,
198,
7857,
796,
9647,
11,
6001,
796,
234... | 2.098299 | 529 |
# coding=utf-8
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -----------------------------------------------------... | [
2,
19617,
28,
40477,
12,
23,
198,
2,
16529,
1783,
10541,
198,
2,
15069,
357,
66,
8,
5413,
10501,
13,
1439,
2489,
10395,
13,
198,
2,
49962,
739,
262,
17168,
13789,
13,
4091,
13789,
13,
14116,
287,
262,
1628,
6808,
329,
5964,
1321,
... | 7.22 | 50 |
"""Python implementation of the 2DM card parser."""
from typing import IO, List, Optional, Tuple, Union
from ..errors import CardError, FormatError, ReadError
_MetadataArgs = Tuple[
int, # num_nodes
int, # num_elements
int, # num_node_strings
Optional[str], # name
Optional[int], # num_materi... | [
37811,
37906,
7822,
286,
262,
362,
23127,
2657,
30751,
526,
15931,
198,
198,
6738,
19720,
1330,
24418,
11,
7343,
11,
32233,
11,
309,
29291,
11,
4479,
198,
198,
6738,
11485,
48277,
1330,
5172,
12331,
11,
18980,
12331,
11,
4149,
12331,
19... | 2.266362 | 2,185 |
import sublime, sublime_plugin
from ...libs import util | [
11748,
41674,
11,
41674,
62,
33803,
198,
6738,
2644,
8019,
82,
1330,
7736
] | 4.230769 | 13 |
import re
instruction_regex = re.compile(r'(nop|acc|jmp) ([+-][0-9]+)')
program = []
try:
while True:
name, arg = instruction_regex.match(input()).groups()
program.append([name, arg, 0])
except EOFError:
pass
pc = 0
accu = 0
while program[pc][2] == 0:
program[pc][2] = 1
if program[p... | [
11748,
302,
198,
198,
8625,
2762,
62,
260,
25636,
796,
302,
13,
5589,
576,
7,
81,
6,
7,
77,
404,
91,
4134,
91,
73,
3149,
8,
29565,
10,
12,
7131,
15,
12,
24,
60,
28988,
11537,
198,
23065,
796,
17635,
198,
198,
28311,
25,
198,
2... | 2.074733 | 281 |
# Generated by Django 4.0 on 2022-01-14 13:45
import datetime
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
604,
13,
15,
319,
33160,
12,
486,
12,
1415,
1511,
25,
2231,
198,
198,
11748,
4818,
8079,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 3.088235 | 34 |
'''
A LeNet-5 in PyTorch.
Reference:
Yann LeCun et al, 1998.
Gradient-Based Learning Applied to Document Recognition.
[Paper] Available at: <http://yann.lecun.com/exdb/publis/pdf/lecun-01a.pdf>
[Accessed 26 December 2021].
'''
import torch.nn as nn
import torch.nn.functional as F
# Defining the Network (LeNet-5)
| [
7061,
6,
198,
32,
1004,
7934,
12,
20,
287,
9485,
15884,
354,
13,
198,
198,
26687,
25,
198,
56,
1236,
1004,
34,
403,
2123,
435,
11,
7795,
13,
198,
42731,
1153,
12,
15001,
18252,
27684,
284,
16854,
31517,
653,
13,
198,
58,
42950,
60... | 2.658333 | 120 |
import sys
sys.path.insert(0, '..')
import numpy as np
import pandas as pd
from itertools import combinations
from scipy.stats import binom
import scipy.special
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
from IPython.display import display, HTML
#sys.path.append("../")
from FrameBuilder.eige... | [
11748,
25064,
198,
17597,
13,
6978,
13,
28463,
7,
15,
11,
705,
492,
11537,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
6738,
340,
861,
10141,
1330,
17790,
198,
6738,
629,
541,
88,
13,
34242,
1330,
... | 3.309677 | 155 |
from person import Person
| [
6738,
1048,
1330,
7755,
198
] | 5.2 | 5 |
if __name__ == "__main__":
# export GOOGLE_APPLICATION_CREDENTIALS="trentiemeciel.json"
# get the token using postman
from dotenv import load_dotenv
load_dotenv()
import main
freshdesk_token = main.convert_auth0_token_to_freshdesk_token("gtxiNvJMjuDGec7GUziM2qSupsnCu74I")
print(f"freshdesk... | [
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
1303,
10784,
402,
6684,
38,
2538,
62,
2969,
31484,
6234,
62,
9419,
1961,
3525,
12576,
50,
2625,
83,
1156,
26597,
721,
8207,
13,
17752,
1,
198,
220,
22... | 2.304636 | 151 |
'''
Convolutional autoencoder on MNIST dataset using Keras functional API
'''
from keras.datasets import mnist
from keras.models import Model
from keras.layers import Activation, Input, BatchNormalization
from keras.layers import Conv2D, Conv2DTranspose
from keras.callbacks import TensorBoard
from keras.optimizers ... | [
7061,
6,
198,
198,
3103,
85,
2122,
282,
1960,
6571,
66,
12342,
319,
29060,
8808,
27039,
1262,
17337,
292,
10345,
7824,
198,
198,
7061,
6,
628,
198,
6738,
41927,
292,
13,
19608,
292,
1039,
1330,
285,
77,
396,
198,
6738,
41927,
292,
1... | 2.985714 | 210 |
from bfg9000.languages import Languages
known_langs = Languages()
with known_langs.make('c') as x:
x.vars(compiler='CC', flags='CFLAGS')
with known_langs.make('c++') as x:
x.vars(compiler='CXX', flags='CXXFLAGS')
| [
6738,
275,
40616,
24,
830,
13,
75,
33213,
1330,
42860,
198,
198,
4002,
62,
17204,
82,
796,
42860,
3419,
198,
4480,
1900,
62,
17204,
82,
13,
15883,
10786,
66,
11537,
355,
2124,
25,
198,
220,
220,
220,
2124,
13,
85,
945,
7,
5589,
53... | 2.434783 | 92 |
x = "X"
y = "Y"
z = "Z"
xx = "XX"
h = "H"
cnot = "CNOT"
s_phi = "S_phi"
identity = "Identity" | [
87,
796,
366,
55,
1,
198,
88,
796,
366,
56,
1,
198,
89,
796,
366,
57,
1,
198,
5324,
796,
366,
8051,
1,
198,
71,
796,
366,
39,
1,
198,
66,
1662,
796,
366,
34,
11929,
1,
198,
82,
62,
34846,
796,
366,
50,
62,
34846,
1,
198,
... | 1.690909 | 55 |
from unittest import TestCase
from flake8diff import flake8
| [
6738,
555,
715,
395,
1330,
6208,
20448,
198,
198,
6738,
781,
539,
23,
26069,
1330,
781,
539,
23,
628
] | 3.263158 | 19 |
# coding: utf-8
import matplotlib.pyplot as plt
import numpy as np
N = 200
X = np.linspace(0, 10, N * 2)
noise = np.random.normal(0, 0.5, X.shape)
Y = X * 0.5 + 3 + noise
Training_Times = 100
Learning_Rate = 0.002
loss = []
W_trace = [-1]
b_trace = [1]
gradientDescent(X, Y, W_trace[0], b_trace[0], learningrate=L... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
299,
32152,
355,
45941,
198,
198,
45,
796,
939,
198,
198,
55,
796,
45941,
13,
21602,
10223,
7,
15,
11,
838,
11,
399,
... | 2.371747 | 269 |
import os
import boto3
import email
import logging
import json
import re
import uuid
s3 = boto3.client("s3")
workmail_message_flow = boto3.client('workmailmessageflow')
logger = logging.getLogger()
| [
11748,
28686,
198,
11748,
275,
2069,
18,
198,
11748,
3053,
198,
11748,
18931,
198,
11748,
33918,
198,
11748,
302,
198,
11748,
334,
27112,
198,
82,
18,
796,
275,
2069,
18,
13,
16366,
7203,
82,
18,
4943,
198,
1818,
4529,
62,
20500,
62,
... | 3 | 66 |
#!/usr/bin/env python
import argparse
import sys
import os
import shutil
DBG = 1
__home = os.getcwd()
__fbench_home = '/home/pfernando/filebench' #binary
__empty = ''
__micro_rread = 'micro_rread'
__workload_l = []
__workload_l.append(__micro_rread)
parser = argparse.ArgumentParser(prog="runscript", description="... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
11748,
1822,
29572,
198,
11748,
25064,
198,
11748,
28686,
198,
11748,
4423,
346,
198,
198,
11012,
38,
796,
352,
198,
198,
834,
11195,
796,
28686,
13,
1136,
66,
16993,
3419,
198,
834,
6... | 2.359195 | 348 |
'''The dagster-airflow operators.'''
import ast
import datetime
import json
import logging
import os
from contextlib import contextmanager
from airflow.exceptions import AirflowException
from airflow.models import BaseOperator, SkipMixin
from airflow.operators.docker_operator import DockerOperator
from airflow.operat... | [
7061,
6,
464,
48924,
1706,
12,
958,
11125,
12879,
2637,
7061,
198,
11748,
6468,
198,
11748,
4818,
8079,
198,
11748,
33918,
198,
11748,
18931,
198,
11748,
28686,
198,
198,
6738,
4732,
8019,
1330,
4732,
37153,
198,
198,
6738,
45771,
13,
1... | 2.49499 | 998 |
import os
"""
This file contains configurations for receiver service.
The configurations can be over-ridden with Environment Variables during run time.
"""
OUTPUT_DIR = os.getenv("OUTPUT_DIR", "/usr/src/app-receiver/output")
DECRYPTION_KEY = os.getenv("DECRYPTION_KEY", "/tmp/decryption_key")
| [
11748,
28686,
198,
37811,
198,
1212,
2393,
4909,
25412,
329,
9733,
2139,
13,
198,
464,
25412,
460,
307,
625,
12,
40372,
351,
9344,
15965,
2977,
1141,
1057,
640,
13,
198,
37811,
198,
2606,
7250,
3843,
62,
34720,
796,
28686,
13,
1136,
2... | 3.255556 | 90 |
# Copyright 2021 The CGLB Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | [
2,
15069,
33448,
383,
327,
8763,
33,
46665,
13,
1439,
6923,
33876,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
3... | 3.152778 | 288 |
"""Collection of functions related to navigating directories
"""
##########
# Imports
##########
import os
from typing import Union
from pathlib import Path
from logger.select_chall import logging
import constants
from domains import problem_domains
from git import Repo
##########
# Subdomain dir_name
##########
... | [
37811,
36307,
286,
5499,
3519,
284,
35210,
29196,
198,
37811,
198,
198,
7804,
2235,
198,
2,
1846,
3742,
198,
7804,
2235,
198,
198,
11748,
28686,
198,
6738,
19720,
1330,
4479,
198,
6738,
3108,
8019,
1330,
10644,
198,
198,
6738,
49706,
13... | 2.461433 | 2,178 |
# NLP written by GAMS Convert at 04/21/18 13:51:45
#
# Equation counts
# Total E G L N X C B
# 2 2 0 0 0 0 0 0
#
# Variable counts
# x b i s1s s2s sc ... | [
2,
220,
399,
19930,
3194,
416,
402,
40834,
38240,
379,
8702,
14,
2481,
14,
1507,
1511,
25,
4349,
25,
2231,
198,
2,
220,
220,
198,
2,
220,
7889,
341,
9853,
198,
2,
220,
220,
220,
220,
220,
7472,
220,
220,
220,
220,
220,
220,
220,... | 1.451631 | 1,778 |
'''OpenGL extension NV.geometry_program4
The official definition of this extension is available here:
http://oss.sgi.com/projects/ogl-sample/registry/NV/geometry_program4.txt
Automatically generated by the get_gl_extensions script, do not edit!
'''
from OpenGL import platform, constants, constant, arrays
from OpenGL... | [
7061,
6,
11505,
8763,
7552,
23973,
13,
469,
15748,
62,
23065,
19,
198,
198,
464,
1743,
6770,
286,
428,
7552,
318,
1695,
994,
25,
198,
197,
4023,
1378,
793,
13,
82,
12397,
13,
785,
14,
42068,
14,
28678,
12,
39873,
14,
2301,
4592,
1... | 2.644801 | 1,433 |
from ..constant import Service as Service_Key
from .base import Service
import logging
| [
6738,
11485,
9979,
415,
1330,
4809,
355,
4809,
62,
9218,
198,
6738,
764,
8692,
1330,
4809,
198,
11748,
18931,
198
] | 4.35 | 20 |
import numpy as np
| [
11748,
299,
32152,
355,
45941,
198
] | 3.166667 | 6 |
"""Tests multi-database support"""
import contextlib
import io
import sys
from django.core.management import call_command
import django.test
import pgtrigger
import pgtrigger.tests.models as test_models
| [
37811,
51,
3558,
5021,
12,
48806,
1104,
37811,
198,
198,
11748,
4732,
8019,
198,
11748,
33245,
198,
11748,
25064,
198,
198,
6738,
42625,
14208,
13,
7295,
13,
27604,
1330,
869,
62,
21812,
198,
11748,
42625,
14208,
13,
9288,
198,
198,
117... | 3.666667 | 57 |
# Copyright (c) 2021, Anthony Emmanuel, github.com/mymi14ss and Contributors
# See license.txt
# import frappe
import unittest
| [
2,
15069,
357,
66,
8,
33448,
11,
9953,
32390,
11,
33084,
13,
785,
14,
1820,
11632,
1415,
824,
290,
25767,
669,
198,
2,
4091,
5964,
13,
14116,
198,
198,
2,
1330,
5306,
27768,
198,
11748,
555,
715,
395,
198
] | 3.282051 | 39 |
# Settings file for use with travis-ci
# Include all the default settings.
from settings import *
# Use the following lines to enable developer/debug mode.
DEBUG = False
TEMPLATES[0]['OPTIONS']['debug'] = DEBUG
# Set the external URL context here
FORCE_SCRIPT_NAME = '/'
USE_X_FORWARDED_HOST = True
ALLOWED_HOSTS = [... | [
2,
16163,
2393,
329,
779,
351,
1291,
4703,
12,
979,
198,
198,
2,
40348,
477,
262,
4277,
6460,
13,
198,
6738,
6460,
1330,
1635,
198,
198,
2,
5765,
262,
1708,
3951,
284,
7139,
8517,
14,
24442,
4235,
13,
198,
30531,
796,
10352,
198,
... | 2.846512 | 430 |
f1 = 'intentionally_not_thinking_about_upsetting_things'
f2 = 'substance_abuse'
f3 = 'denial_of_unhappiness'
f4 = 'excessive_rationality_and_control'
f5 = 'suppression_of_anger'
f6 = 'psychosomatic_symptoms'
f7 = 'denial_of_memories'
f8 = 'withdrawal_from_people'
f9 = 'avoidance_through_sleep_and_lack of energy'
f10 = ... | [
69,
16,
796,
705,
40867,
453,
62,
1662,
62,
28973,
62,
10755,
62,
4739,
35463,
62,
27971,
6,
198,
69,
17,
796,
705,
7266,
301,
590,
62,
47158,
6,
198,
69,
18,
796,
705,
6559,
498,
62,
1659,
62,
403,
71,
42661,
6,
198,
69,
19,
... | 1.845722 | 713 |
#!/usr/bin/env python3
# Copyright 2004-present Facebook. All Rights Reserved.
import numpy as np
from ...messages import Message
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
15069,
5472,
12,
25579,
3203,
13,
1439,
6923,
33876,
13,
198,
198,
11748,
299,
32152,
355,
45941,
198,
198,
6738,
2644,
37348,
1095,
1330,
16000,
628
] | 3.594595 | 37 |
# code to estimate world surface elevation and EKF yaw error from
# image direct pose informaation.
# - trianglulate image features (in 3d) based on camera poses
# - use essential/fundamental matrix + camera pose to estimate yaw error
# - use affine transformation + camera pose to estimate yaw error
import cv2
import... | [
2,
2438,
284,
8636,
995,
4417,
22910,
290,
412,
42,
37,
331,
707,
4049,
422,
198,
2,
2939,
1277,
12705,
4175,
64,
341,
13,
198,
198,
2,
532,
1333,
648,
75,
5039,
2939,
3033,
357,
259,
513,
67,
8,
1912,
319,
4676,
17313,
198,
2,
... | 3.7506 | 417 |
from django.urls import path
from notification import views
urlpatterns = [
path('notifications/<int:id>/', views.notification_view, name='notifications'),
] | [
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
198,
6738,
14483,
1330,
5009,
198,
198,
6371,
33279,
82,
796,
685,
198,
220,
220,
220,
3108,
10786,
1662,
6637,
14,
27,
600,
25,
312,
29,
14,
3256,
5009,
13,
1662,
2649,
62,
1177,
11,
... | 3.24 | 50 |
"""empty message
Revision ID: 4b1e5b7b69eb
Revises: 13d1c714823a
Create Date: 2017-01-19 12:36:55.339537
"""
# revision identifiers, used by Alembic.
revision = '4b1e5b7b69eb'
down_revision = '13d1c714823a'
import re
from alembic import op
import sqlalchemy as sa
from sqlalchemy.orm import sessionmaker
from porta... | [
37811,
28920,
3275,
198,
198,
18009,
1166,
4522,
25,
604,
65,
16,
68,
20,
65,
22,
65,
3388,
1765,
198,
18009,
2696,
25,
1511,
67,
16,
66,
22,
18294,
1954,
64,
198,
16447,
7536,
25,
2177,
12,
486,
12,
1129,
1105,
25,
2623,
25,
28... | 2.681818 | 154 |
from tadataka.visual_odometry import VisualOdometry
from tadataka.camera import CameraParameters
| [
6738,
36264,
48088,
13,
41464,
62,
375,
15748,
1330,
15612,
46,
67,
15748,
198,
6738,
36264,
48088,
13,
25695,
1330,
20432,
48944,
198
] | 4.217391 | 23 |
import datetime
import pandas as pd
import pandas.testing as tm
print(pd.__version__)
df = pd.DataFrame(
{
"A": ["X", "Y"],
"B": [
datetime.datetime(2005, 1, 1, 10, 30, 23, 540000),
datetime.datetime(3005, 1, 1, 10, 30, 23, 540000),
],
}
)
print(df)
print(df.... | [
11748,
4818,
8079,
198,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
19798,
292,
13,
33407,
355,
256,
76,
198,
198,
4798,
7,
30094,
13,
834,
9641,
834,
8,
628,
198,
7568,
796,
279,
67,
13,
6601,
19778,
7,
198,
220,
220,
220,
... | 2.009434 | 318 |
from django.conf.urls import url
from investment_report.views import utils
urlpatterns = [
url('preview/(?P<lang>[\w-]+)/(?P<market>[\w-]+)/(?P<sector>[\w-]+)/pdf',
utils.investment_report_pdf,
{'moderated': False},
name='preview_investment_report_pdf'),
url('current/(?P<lang>[\w-]+)/... | [
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
19016,
198,
198,
6738,
4896,
62,
13116,
13,
33571,
1330,
3384,
4487,
198,
198,
6371,
33279,
82,
796,
685,
198,
220,
220,
220,
19016,
10786,
3866,
1177,
29006,
30,
47,
27,
17204,
36937... | 2.080153 | 524 |
# coding=utf-8
from docc.exceptions import APIError
| [
2,
19617,
28,
40477,
12,
23,
198,
198,
6738,
2205,
66,
13,
1069,
11755,
1330,
7824,
12331,
198
] | 2.944444 | 18 |
#!/usr/bin/env python
import argparse
fwmap = {'tensorflow':1,'caffe':2,'sensetime':3,'ncnn':4,'other':5,'mxnet':6,'uls':7,'mace':8,'tflite':9}
if __name__ == "__main__":
parser = argparse.ArgumentParser(prog='modelxray')
parser.add_argument('filelist',
help = 'list of files to be processed, like a... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
11748,
1822,
29572,
198,
44482,
8899,
796,
1391,
6,
83,
22854,
11125,
10354,
16,
4032,
66,
21223,
10354,
17,
4032,
82,
641,
8079,
10354,
18,
4032,
10782,
20471,
10354,
19,
4032,
847,
1... | 2.362245 | 196 |
import os
import requests
| [
11748,
28686,
198,
11748,
7007,
198
] | 4.333333 | 6 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 4.0.1-9346c8cc45 (http://hl7.org/fhir/StructureDefinition/DocumentManifest) on 2020-02-03.
# 2020, SMART Health IT.
import sys
from dataclasses import dataclass, field
from typing import ClassVar, Optional, List
from .backboneelement import Backbo... | [
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,
220,
2980,
515,
422,
376,
39,
4663,
604,
13,
15,
13,
16,
12,
24,
30557,
66,
23,
535,
2231,
357,
4023,
... | 3.112426 | 169 |
""" test for lc
"""
import pytest
import numpy as np
from jaxsot.core.weight import comp_weight, comp_omega
from jaxsot.core.lc import gen_lightcurve
from jaxsot.io.earth import binarymap
if __name__=="__main__":
test_lc()
| [
37811,
1332,
329,
300,
66,
198,
198,
37811,
198,
198,
11748,
12972,
9288,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
474,
897,
82,
313,
13,
7295,
13,
6551,
1330,
552,
62,
6551,
11,
552,
62,
462,
4908,
198,
6738,
474,
897,
82,
... | 2.613636 | 88 |
from typing import Any, Dict
from squad.config import config
from squad.exceptions import FrozenError
| [
6738,
19720,
1330,
4377,
11,
360,
713,
198,
198,
6738,
8244,
13,
11250,
1330,
4566,
198,
6738,
8244,
13,
1069,
11755,
1330,
23673,
12331,
628
] | 4.16 | 25 |
# -*- coding: utf-8 -*-
# Copyright 2019 Licheng Xiao. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
15069,
13130,
10483,
31753,
28249,
13,
1439,
6923,
33876,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
1... | 3.286082 | 388 |
from message.models import Message, DeletedMessage, TextContent
from user.tests.utils import create_active_user
from conversation.tests.utils import create_private_chat
| [
6738,
3275,
13,
27530,
1330,
16000,
11,
1024,
33342,
12837,
11,
8255,
19746,
198,
198,
6738,
2836,
13,
41989,
13,
26791,
1330,
2251,
62,
5275,
62,
7220,
198,
6738,
5273,
13,
41989,
13,
26791,
1330,
2251,
62,
19734,
62,
17006,
628,
628... | 4.119048 | 42 |
"""
Replace the comment in the following code with a while loop.
numXs = int(input('How many times should I print the letter X? '))
toPrint = "
#concatenate X to toPrint numXs times
print(toPrint)
"""
numXs = int(input('How many times should I print the letter X? '))
toPrint = ""
while numXs > 0:
toPrint += "X"
... | [
37811,
198,
3041,
5372,
262,
2912,
287,
262,
1708,
2438,
351,
257,
981,
9052,
13,
198,
22510,
55,
82,
796,
493,
7,
15414,
10786,
2437,
867,
1661,
815,
314,
3601,
262,
3850,
1395,
30,
705,
4008,
198,
1462,
18557,
796,
366,
198,
2,
... | 2.777778 | 126 |
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: temperature_bands.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.pr... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2980,
515,
416,
262,
8435,
11876,
17050,
13,
220,
8410,
5626,
48483,
0,
198,
2,
2723,
25,
5951,
62,
21397,
13,
1676,
1462,
198,
198,
11748,
25064,
198,
62,
65,
28... | 2.444724 | 3,184 |
from . import exchange_controller
from . import exchange_client | [
6738,
764,
1330,
5163,
62,
36500,
198,
6738,
764,
1330,
5163,
62,
16366
] | 4.846154 | 13 |
from unittest import mock
from django.core.management import call_command
import pytest
from app1.models import TestModel
from datavalidation.models import Validator
from datavalidation.results import Status
from datavalidation.runners import ModelValidationRunner, ObjectValidationRunner
def test_model_runner_with_... | [
6738,
555,
715,
395,
1330,
15290,
198,
198,
6738,
42625,
14208,
13,
7295,
13,
27604,
1330,
869,
62,
21812,
198,
11748,
12972,
9288,
198,
198,
6738,
598,
16,
13,
27530,
1330,
6208,
17633,
198,
6738,
4818,
9226,
24765,
13,
27530,
1330,
... | 3.205387 | 297 |
#to create the flask page
#import flask
#flask library was installed in the command line/computer terminal first
#Source: PythonHow https://pythonhow.com/python-tutorial/flask/How-making-a-website-with-Python-works/
#Python assigns the name "__main__" to the script when the script is executed.
#The debug parameter... | [
2,
1462,
2251,
262,
42903,
2443,
201,
198,
2,
11748,
42903,
201,
198,
2,
2704,
2093,
5888,
373,
6589,
287,
262,
3141,
1627,
14,
33215,
12094,
717,
201,
198,
2,
7416,
25,
11361,
2437,
3740,
1378,
29412,
4919,
13,
785,
14,
29412,
12,
... | 3.23185 | 427 |
from settings import MOZDNS_BASE_URL
from gettext import gettext as _
from string import Template
| [
6738,
6460,
1330,
13070,
57,
35,
8035,
62,
33,
11159,
62,
21886,
198,
6738,
651,
5239,
1330,
651,
5239,
355,
4808,
198,
6738,
4731,
1330,
37350,
628,
628
] | 3.607143 | 28 |
from ibmcloudant.cloudant_v1 import CloudantV1, Document
from ibm_cloud_sdk_core.authenticators import IAMAuthenticator
CLOUDANT_URL="https://apikey-v2-1mfs4kqo2nmnc2sdtgp9ji8myznbgm6mivk0o93pfopt:f70c9a73c52d287d3271ddc3dba6a30a@dc1a5ff5-996b-475c-8b7e-da87f4bf33a3-bluemix.cloudantnosqldb.appdomain.cloud"
CLOUDANT_AP... | [
6738,
24283,
76,
17721,
415,
13,
17721,
415,
62,
85,
16,
1330,
10130,
415,
53,
16,
11,
16854,
198,
6738,
24283,
76,
62,
17721,
62,
21282,
74,
62,
7295,
13,
41299,
44549,
1330,
314,
2390,
47649,
26407,
198,
198,
5097,
2606,
35,
8643,... | 2.30117 | 1,026 |
# -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2017-04-23 18:36
from __future__ import unicode_literals
from django.db import migrations, models
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2980,
515,
416,
37770,
352,
13,
940,
13,
19,
319,
2177,
12,
3023,
12,
1954,
1248,
25,
2623,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
... | 2.736842 | 57 |
# GENERATED BY KOMAND SDK - DO NOT EDIT
from .create_feed.action import CreateFeed
from .get_feed_details.action import GetFeedDetails
from .get_report_document.action import GetReportDocument
from .list_all_feeds.action import ListAllFeeds
from .list_user_feeds.action import ListUserFeeds
from .search.action import Se... | [
2,
24700,
1137,
11617,
11050,
509,
2662,
6981,
26144,
532,
8410,
5626,
48483,
198,
6738,
764,
17953,
62,
12363,
13,
2673,
1330,
13610,
18332,
198,
6738,
764,
1136,
62,
12363,
62,
36604,
13,
2673,
1330,
3497,
18332,
24259,
198,
6738,
764... | 3.567164 | 134 |
import uuid
from urllib.parse import urljoin
from django.core.exceptions import FieldError
from multiselectfield import MultiSelectField
from rdkit import Chem
from django.db import models
from resolver import defaults
from inchi.identifier import InChIKey, InChI
| [
11748,
334,
27112,
198,
6738,
2956,
297,
571,
13,
29572,
1330,
19016,
22179,
198,
198,
6738,
42625,
14208,
13,
7295,
13,
1069,
11755,
1330,
7663,
12331,
198,
6738,
1963,
786,
801,
3245,
1330,
15237,
17563,
15878,
198,
6738,
374,
67,
158... | 3.455696 | 79 |
#
# ----------------------------------------------------------------------------------------------------
# DESCRIPTION
# ----------------------------------------------------------------------------------------------------
## @package content @brief [ PACKAGE ] - Content.
## @dir content ... | [
2,
198,
2,
16529,
3880,
650,
198,
2,
22196,
40165,
198,
2,
16529,
3880,
650,
198,
2235,
2488,
26495,
2695,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2488,
65,
3796,
685,
... | 2.972763 | 771 |
### IMPORTS
### ================================
from Combatant import Combatant
# Robot. Implementation of the Combatant class
| [
21017,
220,
220,
220,
220,
220,
220,
220,
30023,
33002,
198,
21017,
36658,
25609,
18604,
198,
6738,
14487,
415,
1330,
14487,
415,
628,
198,
2,
16071,
13,
46333,
286,
262,
14487,
415,
1398,
198
] | 4.029412 | 34 |
# -*- coding: utf-8 -*-
"""
Copyright 2018-2019 Sean Feng(sean@FantaBlade.com)
"""
import os
import re
from concurrent import futures
from multiprocessing import cpu_count
from urllib.parse import urlparse
import pafy
import requests
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
198,
15269,
2864,
12,
23344,
11465,
18164,
7,
325,
272,
31,
37,
4910,
47520,
13,
785,
8,
198,
37811,
198,
198,
11748,
28686,
198,
11748,
302,
198,
6738,
24... | 3.090909 | 77 |
# Generated by Django 3.1.6 on 2021-04-09 19:56
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
16,
13,
21,
319,
33448,
12,
3023,
12,
2931,
678,
25,
3980,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
# -*- coding: utf-8 -*-
"""
/***************************************************************************
MOPA
An independet project
Mtodo de Obteno da Posio de Atirador
-------------------
begin : 2018-12-21
git sha ... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
14,
17174,
17174,
4557,
8162,
198,
337,
43345,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2... | 2.288333 | 600 |
from pathlib import Path
import numpy as np
from PIL import Image, ImageSequence
import matplotlib.pyplot as plt
import tensorflow as tf
import tensorflow_io as tfio
from scipy.ndimage import rotate
from src.data.monuseg import get_dataset, tf_random_rotate, tf_random_crop
ds = get_dataset()
image, mask = next(ds... | [
6738,
3108,
8019,
1330,
10644,
198,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
350,
4146,
1330,
7412,
11,
7412,
44015,
594,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
11192,
273,
11125,
355,
48700,
198... | 2.88961 | 154 |
# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-05-08 05:45
from __future__ import unicode_literals
from django.db import migrations
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2980,
515,
416,
37770,
352,
13,
1157,
319,
2177,
12,
2713,
12,
2919,
8870,
25,
2231,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
198,
6738... | 2.754717 | 53 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import ckeditor_uploader.fields
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
269,
9091,
2072,
62,
25850,
2... | 2.957447 | 47 |
import click
from ocrd.decorators import ocrd_cli_options, ocrd_cli_wrap_processor
from align.aligner import Aligner
| [
11748,
3904,
198,
198,
6738,
267,
66,
4372,
13,
12501,
273,
2024,
1330,
267,
66,
4372,
62,
44506,
62,
25811,
11,
267,
66,
4372,
62,
44506,
62,
37150,
62,
41341,
198,
6738,
10548,
13,
31494,
263,
1330,
978,
570,
263,
198
] | 2.878049 | 41 |
import pytest
import numpy as np
from ..helpers import osipi_parametrize
from . import SI2Conc_data
from src.original.OG_MO_AUMC_ICR_RMH.ExtendedTofts.DCE import dce_to_r1eff
from src.original.OG_MO_AUMC_ICR_RMH.ExtendedTofts.DCE import r1eff_to_conc
# All tests will use the same arguments and same data...
arg_name... | [
11748,
12972,
9288,
198,
11748,
299,
32152,
355,
45941,
198,
198,
6738,
11485,
16794,
364,
1330,
28686,
541,
72,
62,
17143,
316,
380,
2736,
198,
6738,
764,
1330,
25861,
17,
3103,
66,
62,
7890,
198,
6738,
12351,
13,
14986,
13,
7730,
62... | 2.611354 | 229 |
# DO NOT EDIT: Autogenerated by src/docker_composer/_utils/generate_class.py
# for docker-compose version 1.25.0, build unknown
from typing import List, Optional
import attr
from docker_composer.base import DockerBaseRunner
| [
2,
8410,
5626,
48483,
25,
5231,
519,
877,
515,
416,
12351,
14,
45986,
62,
785,
1930,
263,
47835,
26791,
14,
8612,
378,
62,
4871,
13,
9078,
198,
2,
329,
36253,
12,
785,
3455,
2196,
352,
13,
1495,
13,
15,
11,
1382,
6439,
198,
198,
... | 3.257143 | 70 |
# Import from system libraries
from flask import Flask
from flask_bcrypt import Bcrypt
from flask_cors import CORS
from flask_jwt_extended import JWTManager
from flask_restful import Api
# Import from application modules
from errors import errors
from models.User import User
from models.db import initialize_db
from ro... | [
2,
17267,
422,
1080,
12782,
198,
6738,
42903,
1330,
46947,
198,
6738,
42903,
62,
15630,
6012,
1330,
347,
29609,
198,
6738,
42903,
62,
66,
669,
1330,
327,
20673,
198,
6738,
42903,
62,
73,
46569,
62,
2302,
1631,
1330,
449,
39386,
13511,
... | 3.445682 | 359 |
"""OpenAPI core validation util module"""
from yarl import URL
def get_operation_pattern(server_url, request_url_pattern):
"""Return an updated request URL pattern with the server URL removed."""
if server_url[-1] == "/":
# operations have to start with a slash, so do not remove it
server_url ... | [
37811,
11505,
17614,
4755,
21201,
7736,
8265,
37811,
198,
6738,
331,
7063,
1330,
10289,
628,
198,
4299,
651,
62,
27184,
62,
33279,
7,
15388,
62,
6371,
11,
2581,
62,
6371,
62,
33279,
2599,
198,
220,
220,
220,
37227,
13615,
281,
6153,
2... | 2.908571 | 175 |
"""Mostly helper functions to help with the driver."""
import json
import os
import pathlib
import sqlite3
import arrow # type: ignore
def sql_db():
"""Open a SQL connection and perform a query."""
db_path = pathlib.Path(os.getcwd())
db_path = pathlib.Path(db_path/'sql'/'portfolio.sqlite3')
con = sql... | [
37811,
6943,
306,
31904,
5499,
284,
1037,
351,
262,
4639,
526,
15931,
198,
11748,
33918,
198,
11748,
28686,
198,
11748,
3108,
8019,
198,
11748,
44161,
578,
18,
198,
11748,
15452,
220,
1303,
2099,
25,
8856,
628,
198,
4299,
44161,
62,
994... | 2.278328 | 909 |
import subprocess
import sys
import os
import math
# This code is meant to manage running multiple instances of my KMCLib codes at the same time,
# in the name of time efficiency
numLambda = 256
sysSize = 5
numVecs = 1
dataLocation = "exactSolns/thesisCorrections/low"
lambdaMin = 10.0**(-4)
lambdaMax = 10.0**(4)
rate... | [
11748,
850,
14681,
198,
11748,
25064,
198,
11748,
28686,
198,
11748,
10688,
198,
198,
2,
770,
2438,
318,
4001,
284,
6687,
2491,
3294,
10245,
286,
616,
46646,
5097,
571,
12416,
379,
262,
976,
640,
11,
198,
2,
287,
262,
1438,
286,
640,
... | 2.652393 | 397 |
from time import strftime, gmtime
| [
6738,
640,
1330,
965,
31387,
11,
308,
76,
2435,
198
] | 3.4 | 10 |
'''
'''
from typing import Dict, Optional
# classes
# -------
# overload methods
def __getitem__(self, key):
return self.bounds[key]
def __setitem__(self, key, value):
self.bounds[key] = value
# getters | [
7061,
6,
198,
7061,
6,
198,
6738,
19720,
1330,
360,
713,
11,
32233,
198,
198,
2,
6097,
198,
2,
35656,
628,
220,
220,
220,
1303,
31754,
5050,
198,
220,
220,
220,
825,
11593,
1136,
9186,
834,
7,
944,
11,
1994,
2599,
198,
220,
220,
... | 2.453608 | 97 |
import dash
from dash_google_charts import PieChart
app = dash.Dash()
app.layout = PieChart(
height="500px",
data=[
["Task", "Hours per Day"],
["Work", 11],
["Eat", 2],
["Commute", 2],
["Watch TV", 2],
["Sleep", 7],
],
options={"title": "My Daily Activit... | [
11748,
14470,
198,
6738,
14470,
62,
13297,
62,
354,
5889,
1330,
21690,
45488,
198,
198,
1324,
796,
14470,
13,
43041,
3419,
198,
198,
1324,
13,
39786,
796,
21690,
45488,
7,
198,
220,
220,
220,
6001,
2625,
4059,
8416,
1600,
198,
220,
22... | 2.197674 | 172 |
#!/usr/bin/env python3
# Written by mohlcyber v.0.1 (15.04.2020)
# Edited by filippostz v.0.2 (24.09.2021)
import random
import sys
import socket
import requests
import json
import re
import smtplib
from datetime import datetime
from urllib.parse import urljoin
from email.mime.text import MIMEText
from email.mime.mult... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
22503,
416,
285,
48988,
948,
527,
410,
13,
15,
13,
16,
357,
1314,
13,
3023,
13,
42334,
8,
198,
2,
34212,
416,
1226,
3974,
455,
89,
410,
13,
15,
13,
17,
357,
1731,
13,
29... | 2.777778 | 162 |
#parameters
accumulated_weight = 0.5
detector_u = 50
detector_b = 350
detector_r = 300
detector_l = 600
message_x = 10
message_y = 400
date_x = 0
date_y = 450
threshold_min=22
rate = 0.8
RGB_INT_MAX = 255
RGB_INT_MIN = 0
RGB_FLT_MAX = 255.0
RGB_FLT_MIN = 0.0
Blur_value = 7
text_color = (200,50,150)
rectangle_color = (0... | [
2,
17143,
7307,
198,
4134,
388,
4817,
62,
6551,
796,
657,
13,
20,
198,
15255,
9250,
62,
84,
796,
2026,
198,
15255,
9250,
62,
65,
796,
13803,
198,
15255,
9250,
62,
81,
796,
5867,
198,
15255,
9250,
62,
75,
796,
10053,
198,
20500,
62... | 2.3125 | 224 |
"""AyudaEnPython: https://www.facebook.com/groups/ayudapython
Genere una matriz de 25 x 40 con nmeros decimales al azar entre 0 y 1.
Mostrar los numeros del perimetro y calcularlo.
"""
from random import random
from prototools import show_matrix
def solver_a():
"""
>>> solver_a()
[1, 2, 3, 4, 5, 16, 17,... | [
37811,
42012,
15339,
4834,
37906,
25,
3740,
1378,
2503,
13,
19024,
13,
785,
14,
24432,
14,
323,
463,
499,
7535,
198,
198,
13746,
567,
555,
64,
2603,
47847,
390,
1679,
2124,
2319,
369,
299,
647,
418,
875,
320,
2040,
435,
35560,
283,
... | 2.086735 | 392 |
from django import forms
from django.contrib import admin
from django.contrib.auth.models import Group
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
from django.contrib.auth.forms import ReadOnlyPasswordHashField
from django.utils.translation import gettext_lazy as _
from .models import (
... | [
6738,
42625,
14208,
1330,
5107,
201,
198,
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
201,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27530,
1330,
4912,
201,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
28482,
... | 2.98 | 250 |
# import modules
import os
import re
import glob
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from wordcloud import WordCloud
| [
2,
1330,
13103,
198,
11748,
28686,
198,
11748,
302,
198,
11748,
15095,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
384,
397,
1211,
... | 3.365385 | 52 |
#!/usr/bin/python3
"""
rdp
Python implementation of the Ramer-Douglas-Peucker algorithm.
"""
import sys
import numpy as np
#from math import sqrt
#from functools import partial
from math import radians, cos, sin, asin, sqrt
if sys.version_info[0] >= 3:
xrange = range
def pl_dist(point, start, end):
"""
C... | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
37811,
198,
4372,
79,
198,
198,
37906,
7822,
286,
262,
371,
2382,
12,
40287,
14391,
12,
6435,
12603,
11862,
13,
198,
37811,
198,
11748,
25064,
198,
11748,
299,
32152,
355,
45941,
198,
2,
... | 2.347576 | 1,217 |
import unittest
import requests
from assertpy import assert_that
from requests.exceptions import Timeout
from unittest.mock import Mock, patch
from src.Api import Api
from src.todos import todos
if __name__ == '__main__':
unittest.main() | [
11748,
555,
715,
395,
198,
198,
11748,
7007,
198,
6738,
6818,
9078,
1330,
6818,
62,
5562,
198,
6738,
7007,
13,
1069,
11755,
1330,
3862,
448,
198,
6738,
555,
715,
395,
13,
76,
735,
1330,
44123,
11,
8529,
198,
198,
6738,
12351,
13,
32... | 3.075 | 80 |
from typing import List
from spark_auto_mapper_fhir.generator.fhir_xml_schema_parser import (
FhirXmlSchemaParser,
FhirCodeableType,
)
| [
6738,
19720,
1330,
7343,
198,
198,
6738,
9009,
62,
23736,
62,
76,
11463,
62,
69,
71,
343,
13,
8612,
1352,
13,
69,
71,
343,
62,
19875,
62,
15952,
2611,
62,
48610,
1330,
357,
198,
220,
220,
220,
376,
71,
343,
55,
4029,
27054,
2611,
... | 2.416667 | 60 |
#!/usr/bin/env python
# Lastfm loved tracks to Google Music All Access playlist. As noted in the comments you do need the All Access subscription thing otherwise it will always find 0 songs.
#
# Written by Tim Hutt, tdhutt@gmail.com, based on this script:
#
# https://gist.github.com/oquno/3664731
#
# Today is the 15th... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
2,
4586,
38353,
6151,
8339,
284,
3012,
7849,
1439,
8798,
33178,
13,
1081,
4367,
287,
262,
3651,
345,
466,
761,
262,
1439,
8798,
14569,
1517,
4306,
340,
481,
1464,
1064,
657,
7259,... | 2.946429 | 392 |
# Copyright 2021 Sony Corporation.
# Copyright 2021 Sony Group Corporation.
#
# 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 requi... | [
2,
15069,
33448,
10184,
10501,
13,
198,
2,
15069,
33448,
10184,
4912,
10501,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
... | 3.402062 | 291 |