content stringlengths 1 1.05M | input_ids listlengths 1 883k | ratio_char_token float64 1 22.9 | token_count int64 1 883k |
|---|---|---|---|
from abc import abstractmethod
from jaxvi.abstract import ABCMeta, abstract_attribute
import jax.numpy as jnp
from jax.scipy.stats import norm, gamma
| [
6738,
450,
66,
1330,
12531,
24396,
198,
6738,
474,
897,
8903,
13,
397,
8709,
1330,
9738,
48526,
11,
12531,
62,
42348,
198,
11748,
474,
897,
13,
77,
32152,
355,
474,
37659,
198,
6738,
474,
897,
13,
1416,
541,
88,
13,
34242,
1330,
259... | 3.234043 | 47 |
# -*- coding: utf-8 -*-
"""
Created on Sat Jul 21 22:59:41 2018
@author: user
"""
import chainer
import numpy as np
import chainer.functions as F
x = np.arange(1, 37).reshape(1, 1, 6, 6).astype(np.float32)
x = chainer.Variable(x)
print(x)
pooled_x, indexes = F.max_pooling_2d(x, ksize=2, stride=2, return_indices=Tru... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
7031,
5979,
2310,
2534,
25,
3270,
25,
3901,
2864,
198,
198,
31,
9800,
25,
2836,
198,
37811,
198,
198,
11748,
6333,
263,
198,
11748,
299,
32152,
... | 2.254125 | 303 |
var = "James Bond"
print(var[2::-1]) | [
7785,
796,
366,
14731,
12812,
1,
198,
4798,
7,
7785,
58,
17,
3712,
12,
16,
12962
] | 2.25 | 16 |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/templates/wizard_depend_depend_version.ui'
#
# Created by: PyQt5 UI code generator 5.5.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
5178,
7822,
7560,
422,
3555,
334,
72,
2393,
705,
37540,
14,
11498,
17041,
14,
86,
8669,
62,
45841,
62,
45841,
62,
9641,
13,
9019,
6,
198,
2,
198,
2,
15622,
... | 2.916667 | 96 |
from django.db import models
| [
6738,
42625,
14208,
13,
9945,
1330,
4981,
628
] | 3.75 | 8 |
from setuptools import setup
setup(
version=open("rpyc_mem/_version.py").readlines()[-1].split()[-1].strip("\"'")
)
| [
6738,
900,
37623,
10141,
1330,
9058,
198,
198,
40406,
7,
198,
220,
220,
220,
2196,
28,
9654,
7203,
81,
9078,
66,
62,
11883,
47835,
9641,
13,
9078,
11074,
961,
6615,
3419,
58,
12,
16,
4083,
35312,
3419,
58,
12,
16,
4083,
36311,
7203,... | 2.469388 | 49 |
# Generated by Django 3.2.2 on 2021-05-10 06:15
from django.db import migrations, models
import django.utils.timezone
| [
2,
2980,
515,
416,
37770,
513,
13,
17,
13,
17,
319,
33448,
12,
2713,
12,
940,
9130,
25,
1314,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
14208,
13,
26791,
13,
2435,
11340,
628
] | 2.926829 | 41 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import logging
from ..action import ContainerUtilAction
from ..input import ItemType
log = logging.getLogger(__name__)
| [
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,
11748,
18931,
198,
198,
6738,
11485,
2673,
1330,
43101,
18274,
346,
12502,
198,
6738,
11485,
15414,
1... | 3.116667 | 60 |
# -*- coding: utf-8 -*-
import codecs
from senapy.parsing.question_search_result_parser import parse_question_search_result
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
40481,
82,
198,
198,
6738,
3308,
12826,
13,
79,
945,
278,
13,
25652,
62,
12947,
62,
20274,
62,
48610,
1330,
21136,
62,
25652,
62,
12947,
62,
20274,
628
] | 2.886364 | 44 |
import signal
import numpy as np
from PIL import ImageGrab
import cv2
import time
import sys
import os
flips_time_mins = 30
interval = 5 # seconds
num_frames = flips_time_mins*60/interval
num_frames = int(num_frames)
year = -1
month = -1
day = -1
out_fps = 24
cammode = 0
shutdown_msg = False
capture = cv2.VideoCapt... | [
11748,
6737,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
350,
4146,
1330,
7412,
48400,
198,
11748,
269,
85,
17,
198,
11748,
640,
198,
11748,
25064,
198,
11748,
28686,
198,
198,
2704,
2419,
62,
2435,
62,
42951,
796,
1542,
198,
3849,
... | 2.233632 | 1,451 |
import unittest
import spacy
from spacy.language import Language
try:
from src.MordinezNLP.tokenizers import spacy_tokenizer
except:
from MordinezNLP.tokenizers import spacy_tokenizer
if __name__ == '__main__':
unittest.main()
| [
11748,
555,
715,
395,
198,
198,
11748,
599,
1590,
198,
6738,
599,
1590,
13,
16129,
1330,
15417,
198,
198,
28311,
25,
198,
220,
220,
220,
422,
12351,
13,
44,
585,
18885,
45,
19930,
13,
30001,
11341,
1330,
599,
1590,
62,
30001,
7509,
... | 2.825581 | 86 |
import random
import requests
import tempfile
from io import BytesIO
from PIL import Image, ImageDraw, ImageFont
FONTS = [
'https://cdn.statically.io/gh/google/fonts/main/ofl/neucha/Neucha.ttf',
# 'https://cdn.statically.io/gh/google/fonts/main/ofl/catamaran/Catamaran%5Bwght%5D.ttf',
# font_base_url + 'lob... | [
11748,
4738,
198,
11748,
7007,
198,
11748,
20218,
7753,
198,
6738,
33245,
1330,
2750,
4879,
9399,
198,
6738,
350,
4146,
1330,
7412,
11,
7412,
25302,
11,
7412,
23252,
198,
198,
37,
1340,
4694,
796,
685,
198,
220,
220,
220,
705,
5450,
1... | 1.954751 | 884 |
from django.contrib.auth.models import User
from rest_framework import generics
from .serializers import UserSerializer
| [
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27530,
1330,
11787,
198,
6738,
1334,
62,
30604,
1330,
1152,
873,
198,
198,
6738,
764,
46911,
11341,
1330,
11787,
32634,
7509,
628
] | 3.84375 | 32 |
# Copyright 2017 Pavlo Penenko
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | [
2,
15069,
2177,
24081,
5439,
7507,
32720,
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,
351,
262,
13789,
13,
198,
2,
9... | 3.251553 | 322 |
#!/usr/bin/python2.6
import os
import sys
import time
from optparse import OptionParser
from google.refine import refine
from clean_ads_affiliations import clean_ads_affs
assert sys.hexversion >= 0x02060000
SERVER = 'http://adsx.cfa.harvard.edu:3333'
def create_refine_project(path, name, pretend=False, verbose=0):... | [
2,
48443,
14629,
14,
8800,
14,
29412,
17,
13,
21,
198,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
640,
198,
6738,
2172,
29572,
1330,
16018,
46677,
198,
6738,
23645,
13,
5420,
500,
1330,
35139,
198,
198,
6738,
3424,
62,
5643,
62... | 2.276206 | 601 |
from django.http import JsonResponse, Http404
from django.views.decorators.csrf import csrf_exempt
from exponent_server_sdk import PushClient, PushMessage, DeviceNotRegisteredError
from .models import Group, User, Event
import hashlib, uuid
# Create your views here. | [
6738,
42625,
14208,
13,
4023,
1330,
449,
1559,
31077,
11,
367,
29281,
26429,
198,
6738,
42625,
14208,
13,
33571,
13,
12501,
273,
2024,
13,
6359,
41871,
1330,
269,
27891,
69,
62,
42679,
198,
6738,
28622,
62,
15388,
62,
21282,
74,
1330,
... | 3.513158 | 76 |
"""Implement this function across different project.
----ZY.2020.Oct.
"""
import os
from easydict import EasyDict
from torchvision.utils import save_image
from logging import Logger
from subprocess import call
def create_save_folders(root_folder, folder_list: list):
"""Create folders to save visualization image.
... | [
37811,
3546,
26908,
428,
2163,
1973,
1180,
1628,
13,
198,
650,
57,
56,
13,
42334,
13,
12349,
13,
198,
37811,
198,
11748,
28686,
198,
6738,
2562,
11600,
1330,
16789,
35,
713,
198,
6738,
28034,
10178,
13,
26791,
1330,
3613,
62,
9060,
19... | 2.444901 | 1,461 |
from nose.tools import assert_equals, assert_true
from wikimetrics.metrics import metric_classes
from wikimetrics.models import (
MetricReport
)
from ..fixtures import DatabaseTest
| [
6738,
9686,
13,
31391,
1330,
6818,
62,
4853,
874,
11,
6818,
62,
7942,
198,
6738,
47145,
38813,
10466,
13,
4164,
10466,
1330,
18663,
62,
37724,
198,
6738,
47145,
38813,
10466,
13,
27530,
1330,
357,
198,
220,
220,
220,
3395,
1173,
19100,
... | 3.576923 | 52 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from setuptools import setup
setup(
name="clut2dtstyle",
license="Unlicense",
version="0.1",
author="Manu Mannattil",
author_email="manu.mannattil@gmail.com",
description="Script to convert Hald CLUTs to darktable styles",
py_modules=["clut2dt... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
900,
37623,
10141,
1330,
9058,
198,
198,
40406,
7,
198,
220,
220,
220,
1438,
2625,
565,
315,
17,
28664... | 2.374517 | 259 |
import meshzoo
import numpy as np
import xarray as xr
import xugrid
def transform(vertices, minx, maxx, miny):
"""
Transform vertices to fit within minx to maxx.
Maintains x:y aspect ratio.
"""
x, y = vertices.T
xmin = x.min()
xmax = x.max()
ymin = y.min()
ymax = y.max()
dx = ... | [
11748,
19609,
89,
2238,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2124,
18747,
355,
2124,
81,
198,
198,
11748,
2124,
1018,
6058,
628,
198,
4299,
6121,
7,
1851,
1063,
11,
949,
87,
11,
3509,
87,
11,
949,
88,
2599,
198,
220,
220,... | 2.156379 | 243 |
# Generated by Django 3.2.5 on 2021-07-19 20:22
from django.db import migrations, models
import django.db.models.deletion
| [
2,
2980,
515,
416,
37770,
513,
13,
17,
13,
20,
319,
33448,
12,
2998,
12,
1129,
1160,
25,
1828,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
14208,
13,
9945,
13,
27530,
13,
2934,
1616,
295,
... | 2.818182 | 44 |
import ckan.plugins as plugins
import ckan.model as model
import ckan.logic as logic
import ckan.plugins.toolkit as toolkit
import ckan.lib.plugins as plugs
from pylons import c
NotFound = logic.NotFound
get_action = logic.get_action
| [
198,
11748,
269,
27541,
13,
37390,
355,
20652,
198,
11748,
269,
27541,
13,
19849,
355,
2746,
198,
11748,
269,
27541,
13,
6404,
291,
355,
9156,
198,
11748,
269,
27541,
13,
37390,
13,
25981,
15813,
355,
2891,
15813,
198,
11748,
269,
27541... | 3.202703 | 74 |
##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | [
29113,
29113,
7804,
4242,
2235,
198,
2,
15069,
357,
66,
8,
2211,
12,
7908,
11,
13914,
45036,
3549,
2351,
4765,
11,
11419,
13,
198,
2,
21522,
771,
379,
262,
13914,
45036,
3549,
2351,
18643,
13,
198,
2,
198,
2,
770,
2393,
318,
636,
... | 4.077922 | 308 |
#Name: s2_convert.py
#Purpose: Convert PDFs to TXT format
#Invocation: python3 s2_convert.py <projName> <lng> <clss>
import codecs
import os
import re
import sys
#Name: valid_arguments
#Purpose: Check whether the command-line arguments are valid
#Parameters: sys.argv (globally defin... | [
2,
5376,
25,
220,
220,
220,
220,
220,
220,
220,
264,
17,
62,
1102,
1851,
13,
9078,
201,
198,
2,
30026,
3455,
25,
220,
220,
220,
220,
38240,
12960,
82,
284,
15326,
51,
5794,
201,
198,
2,
19904,
5040,
25,
220,
21015,
18,
264,
17,
... | 2.557569 | 938 |
# -*-coding: utf-8-*-
from sdata.experiments import Test | [
2,
532,
9,
12,
66,
7656,
25,
3384,
69,
12,
23,
12,
9,
12,
198,
6738,
264,
7890,
13,
23100,
6800,
1330,
6208
] | 2.434783 | 23 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""The code implementation of SharedGradNet.
main0.py is for neural networks without hidden layer.
Some part from: https://jhui.github.io/2018/02/09/PyTorch-Variables-functionals-and-Autograd/
2019/06/17: Update with hyper-parameter tuning script.
2019/06/25: Committed mai... | [
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,
464,
2438,
7822,
286,
39403,
42731,
7934,
13,
198,
12417,
15,
13,
9078,
318,
329,
17019,
7686,
1231,
7104,
... | 2.339365 | 2,487 |
# -*- coding: utf-8 -*-
###########################################################################
## Python code generated with wxFormBuilder (version Aug 8 2018)
## http://www.wxformbuilder.org/
##
## PLEASE DO *NOT* EDIT THIS FILE!
###########################################################################
impor... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
29113,
29113,
7804,
21017,
198,
2235,
11361,
2438,
7560,
351,
266,
87,
8479,
32875,
357,
9641,
2447,
220,
807,
2864,
8,
198,
2235,
2638,
1378,
2503,
13,
49345,
687,... | 5.058252 | 103 |
print("Hello World")
print(5+4)
print(5,"+",4,"=",5+4)
| [
4798,
7203,
15496,
2159,
4943,
198,
4798,
7,
20,
10,
19,
8,
198,
4798,
7,
20,
553,
10,
1600,
19,
553,
28,
1600,
20,
10,
19,
8,
198
] | 1.964286 | 28 |
from django.core.management.base import BaseCommand, CommandError
import time
from hud_api_replace.models import CachedGeodata
| [
6738,
42625,
14208,
13,
7295,
13,
27604,
13,
8692,
1330,
7308,
21575,
11,
9455,
12331,
198,
11748,
640,
198,
198,
6738,
289,
463,
62,
15042,
62,
33491,
13,
27530,
1330,
327,
2317,
10082,
375,
1045,
628
] | 3.583333 | 36 |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
import utils
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
11,
7297,
11,
3601,
62,
8818,
11,
28000,
1098,
62,
17201,
874,
198,
11748,
3384,
4487,
628,
198,
220,
220,
220,
220,
22... | 2.708333 | 48 |
import numpy as np
from scipy.special import logsumexp
from scipy.optimize import minimize
from functools import partial
from dataclasses import dataclass, field
import matplotlib.pyplot as plt
def exponential_mixture_log_likelihood_components(
amplitudes, lifetimes, t, min_observation_time, max_observation_tim... | [
11748,
299,
32152,
355,
45941,
198,
6738,
629,
541,
88,
13,
20887,
1330,
2604,
16345,
11201,
198,
6738,
629,
541,
88,
13,
40085,
1096,
1330,
17775,
198,
6738,
1257,
310,
10141,
1330,
13027,
198,
6738,
4818,
330,
28958,
1330,
4818,
330,
... | 2.711957 | 1,840 |
largura=float(input('digite qual a largura da sua parede:'))
comprimento=float(input('digite qual o comprimento da sua parede:'))
quantidade=((largura*comprimento)/2)
print('A area da sua parede de',(largura*comprimento),'para pintar sua parede ser necessario {} litros de tinta'.format(quantidade)) | [
15521,
5330,
28,
22468,
7,
15414,
10786,
12894,
578,
4140,
257,
2552,
5330,
12379,
424,
64,
279,
1144,
68,
32105,
4008,
198,
785,
1050,
3681,
78,
28,
22468,
7,
15414,
10786,
12894,
578,
4140,
267,
552,
3036,
50217,
12379,
424,
64,
279... | 2.702703 | 111 |
#!/usr/bin/env python
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import absolute_import, division, print_function, unicode_literals
import... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
2,
15069,
357,
66,
8,
3203,
11,
3457,
13,
290,
663,
29116,
13,
198,
2,
1439,
2489,
10395,
13,
198,
2,
198,
2,
770,
2723,
2438,
318,
11971,
739,
262,
347,
10305,
12,
7635,
59... | 3.239583 | 384 |
#!/usr/bin/env python
# coding: utf-8
"""
Em
--
Em is a terminal tool that prints FILE(s), or standard input to standard
output and highlights the expressions that are matched the PATTERN.
The expression will be highlighted iff the terminal is ANSI-compatible.
Em is Cool
``````````
.. code:: bash
$ tail -f /p... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
19617,
25,
3384,
69,
12,
23,
198,
37811,
198,
10161,
198,
438,
198,
198,
10161,
318,
257,
12094,
2891,
326,
20842,
45811,
7,
82,
828,
393,
3210,
5128,
284,
3210,
198,
22915,
290,
... | 2.602195 | 729 |
import json
import os
import random
import string
import requests
from keep_alive import keep_alive
from nltk.sentiment.vader import SentimentIntensityAnalyzer
import discord
client = discord.Client()
starter_motivator = [
"Cheer Up!",
"Always remember, I am here for you!",
"You are a great person. Reme... | [
11748,
33918,
198,
11748,
28686,
198,
11748,
4738,
198,
11748,
4731,
198,
198,
11748,
7007,
198,
6738,
1394,
62,
282,
425,
1330,
1394,
62,
282,
425,
198,
6738,
299,
2528,
74,
13,
34086,
3681,
13,
85,
5067,
1330,
11352,
3681,
5317,
637... | 3.149068 | 161 |
import cv2, os
import numpy as np
import csv
import glob
label = "Parasitized"
dirList = glob.glob("cell_images/" + label + "/*.png")
file = open("csv/dataset.csv", "a")
for img_path in dirList:
im = cv2.imread(img_path)
im = cv2.GaussianBlur(im, (5, 5), 2)
im_gray = cv2.cvtColor(im, cv2.COLOR_BGR2GRAY... | [
11748,
269,
85,
17,
11,
28686,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
269,
21370,
198,
11748,
15095,
198,
198,
18242,
796,
366,
10044,
292,
36951,
1,
198,
15908,
8053,
796,
15095,
13,
4743,
672,
7203,
3846,
62,
17566,
30487,
... | 1.982036 | 835 |
import os
import numpy as np | [
11748,
28686,
198,
11748,
299,
32152,
355,
45941
] | 3.5 | 8 |
from __future__ import unicode_literals
from django.shortcuts import render
from django.http import HttpResponse
| [
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
198,
6738,
42625,
14208,
13,
4023,
1330,
367,
29281,
31077,
198
] | 3.766667 | 30 |
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sn
from utils import convert, iou
if __name__ == '__main__':
import os
import sys
survey_dir = sys.argv[1]
paths = [os.path.join(survey_dir,path) for path in os.listdir(survey_dir)]
surveys = [convert.xml2df... | [
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
384,
397,
1211,
355,
3013,
198,
198,
6738,
3384,
4487,
1330,
10385,
11,
1312,
280,
628,
198... | 2.38 | 600 |
from unittest import TestCase
| [
6738,
555,
715,
395,
1330,
6208,
20448,
198
] | 3.75 | 8 |
"""
Compares spectrogram computations with TensorFlow and Vesper.
As of 2018-11-09, Vesper is a little more than three times faster than
TensorFlow at computing spectrograms with a DFT size of 128.
"""
import functools
import time
import numpy as np
import tensorflow as tf
import vesper.util.data_windows as data_w... | [
37811,
198,
7293,
3565,
5444,
39529,
2653,
602,
351,
309,
22854,
37535,
290,
36448,
525,
13,
198,
198,
1722,
286,
2864,
12,
1157,
12,
2931,
11,
36448,
525,
318,
257,
1310,
517,
621,
1115,
1661,
5443,
621,
198,
51,
22854,
37535,
379,
... | 2.53268 | 306 |
import time
| [
11748,
640,
198
] | 4 | 3 |
import os
from django.conf import settings
import django
| [
11748,
28686,
198,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
11748,
42625,
14208,
628
] | 3.6875 | 16 |
from opentrons import protocol_api
import json
import os
import math
# metadata
metadata = {
'protocolName': 'V1 S14 Station A MagMax',
'author': 'Nick <protocols@opentrons.com>',
'source': 'Custom Protocol Request',
'apiLevel': '2.4'
}
NUM_SAMPLES = 64
SAMPLE_VOLUME = 100
TIP_TRACK = False
| [
6738,
1034,
298,
12212,
1330,
8435,
62,
15042,
198,
11748,
33918,
198,
11748,
28686,
198,
11748,
10688,
198,
198,
2,
20150,
198,
38993,
796,
1391,
198,
220,
220,
220,
705,
11235,
4668,
5376,
10354,
705,
53,
16,
311,
1415,
9327,
317,
2... | 2.635593 | 118 |
import logging
import numpy as np
from .efish_ephys_repro import EfishEphys
| [
11748,
18931,
198,
11748,
299,
32152,
355,
45941,
198,
198,
6738,
764,
891,
680,
62,
27446,
893,
62,
260,
1676,
1330,
412,
11084,
36,
34411,
628
] | 3 | 26 |
# Generated by Django 3.2.3 on 2021-05-17 15:31
from django.db import migrations, models
import django.db.models.deletion
| [
2,
2980,
515,
416,
37770,
513,
13,
17,
13,
18,
319,
33448,
12,
2713,
12,
1558,
1315,
25,
3132,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
14208,
13,
9945,
13,
27530,
13,
2934,
1616,
295,
... | 2.818182 | 44 |
# Reuters-21578 dataset downloader and parser
#
# Author: Eustache Diemert <eustache@diemert.fr>
# http://scikit-learn.org/stable/auto_examples/applications/plot_out_of_core_classification.html
#
# Modified by @herrfz, get pandas DataFrame from the orig SGML
# License: BSD 3 clause
from __future__ import print_funct... | [
2,
8428,
12,
23349,
3695,
27039,
4321,
263,
290,
30751,
198,
2,
198,
2,
6434,
25,
220,
412,
436,
4891,
6031,
368,
861,
1279,
68,
436,
4891,
31,
10989,
368,
861,
13,
8310,
29,
220,
198,
2,
2638,
1378,
36216,
15813,
12,
35720,
13,
... | 3.075419 | 358 |
import numpy as np
import pandas as pd
from scipy.stats import expon, uniform
import sys
sys.path.append('../../well_mixed')
from well_mixed_death_clock import (WellMixedSimulator,
WellMixedSimulationData, exponential_ccm, uniform_ccm,
base_rate_death_signal)
# Exponential cell cycle model
tG1 = 50
tG2 = 50
... | [
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
6738,
629,
541,
88,
13,
34242,
1330,
1033,
261,
11,
8187,
198,
198,
11748,
25064,
198,
17597,
13,
6978,
13,
33295,
10786,
40720,
40720,
4053,
62,
76,
2966,
1153... | 2.23417 | 2,669 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# SQLite:
import sqlite3
# SQLite
# test.db
# :
conn = sqlite3.connect('hello.db')
# Cursor:
cursor = conn.cursor()
cursor.execute('drop table user')
# SQLuser:
cursor.execute('create table user (id varchar(20) primary key, name varchar(20))')
# SQL:
cursor.execute('insert... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
16363,
578,
25,
198,
11748,
44161,
578,
18,
198,
2,
16363,
578,
198,
2,
1332,
13,
9945,
198,
2,
1058,
198,
... | 2.696296 | 270 |
# imports
import requests, json
# beautifulsoup4
from bs4 import BeautifulSoup
| [
2,
17944,
201,
198,
11748,
7007,
11,
33918,
201,
198,
2,
4950,
82,
10486,
19,
201,
198,
6738,
275,
82,
19,
1330,
23762,
50,
10486,
201,
198,
201,
198
] | 2.931034 | 29 |
# Copyright 2020 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | [
2,
15069,
12131,
3012,
11419,
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,
351,
262,
13789,
13,
198,
2,
921,
743,
733... | 3.199377 | 321 |
# Generated by Django 2.2.5 on 2019-09-25 14:30
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
362,
13,
17,
13,
20,
319,
13130,
12,
2931,
12,
1495,
1478,
25,
1270,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
# Do not edit this file directly.
# It was auto-generated by: code/programs/reflexivity/reflexive_refresh
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
| [
2,
2141,
407,
4370,
428,
2393,
3264,
13,
198,
2,
632,
373,
8295,
12,
27568,
416,
25,
2438,
14,
23065,
82,
14,
5420,
2588,
3458,
14,
5420,
2588,
425,
62,
5420,
3447,
628,
198,
2220,
7203,
31,
65,
41319,
62,
31391,
1003,
31391,
14,
... | 2.809524 | 63 |
# shouldn't apparently need this file, but here we are
from . import atommapping
from . import echo | [
2,
6584,
470,
5729,
761,
428,
2393,
11,
475,
994,
356,
389,
198,
6738,
764,
1330,
379,
2002,
5912,
198,
6738,
764,
1330,
9809
] | 4.125 | 24 |
import os
import re
import pymongo
import pandas as pd
import numpy as np
import streamlit as st
from bokeh.plotting import figure
from bokeh.palettes import Set1_9, Set3_12, Inferno256
def caudales():
"""Get the rivers basin flows and process this data.
Returns:
Figure: Bokeh plotting figure.
... | [
11748,
28686,
198,
11748,
302,
198,
11748,
279,
4948,
25162,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
4269,
18250,
355,
336,
198,
6738,
1489,
365,
71,
13,
29487,
889,
1330,
3785,
198,
6738,
... | 1.953171 | 9,823 |
#!/usr/bin/env python3
"""Generator of the function to prohibit certain vowel sequences.
It creates ``_hb_preprocess_text_vowel_constraints``, which inserts dotted
circles into sequences prohibited by the USE script development spec.
This function should be used as the ``preprocess_text`` of an
``hb_ot_complex_shaper... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
37811,
8645,
1352,
286,
262,
2163,
284,
20767,
1728,
48617,
16311,
13,
198,
198,
1026,
8075,
7559,
62,
71,
65,
62,
3866,
14681,
62,
5239,
62,
85,
322,
417,
62,
1102,
2536,
... | 2.501064 | 940 |
from datetime import datetime, timedelta
import pytz
ALLOWED_AGE_PER_STATUS = {
"default": 5 * 60,
# LMS instruments can take a very long time to generate when the SPS is not cached
"started": 35 * 60,
"nifi_notified": 30 * 60,
}
COMPLETE_STATES = ["inactive", "in_arc"]
| [
6738,
4818,
8079,
1330,
4818,
8079,
11,
28805,
12514,
198,
198,
11748,
12972,
22877,
198,
198,
7036,
3913,
1961,
62,
11879,
62,
18973,
62,
35744,
2937,
796,
1391,
198,
220,
220,
220,
366,
12286,
1298,
642,
1635,
3126,
11,
198,
220,
22... | 2.666667 | 111 |
import socket
import select
fd_to_socket = {}
READ_ONLY = ( select.POLLIN | select.POLLPRI | select.POLLHUP | select.POLLERR)
READ_WRITE = (READ_ONLY|select.POLLOUT)
poller = select.poll()
server = None
IP = '127.0.0.1'
Port = 7002 | [
11748,
17802,
198,
11748,
2922,
198,
16344,
62,
1462,
62,
44971,
796,
23884,
198,
15675,
62,
1340,
11319,
796,
357,
2922,
13,
16402,
3069,
1268,
930,
2922,
13,
16402,
3069,
4805,
40,
930,
2922,
13,
16402,
3069,
39,
8577,
930,
2922,
13... | 2.457447 | 94 |
#
# PySNMP MIB module A3COM-HUAWEI-SNA-DLSW-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/A3COM-HUAWEI-SNA-DLSW-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 16:52:16 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.... | [
2,
198,
2,
9485,
15571,
7378,
337,
9865,
8265,
317,
18,
9858,
12,
39,
34970,
8845,
40,
12,
50,
4535,
12,
35,
6561,
54,
12,
8895,
33,
357,
4023,
1378,
16184,
76,
489,
8937,
13,
785,
14,
79,
893,
11632,
8,
198,
2,
7054,
45,
13,
... | 2.445026 | 15,471 |
# Leetcode 98. Validate Binary Search Tree
#
# Link: https://leetcode.com/problems/validate-binary-search-tree/
# Difficulty: Medium
# Complexity:
# O(N) time | where N represent the number of elements in the input tree
# O(N) space | where N represent the number of elements in the input tree
# Definition for a bi... | [
2,
1004,
316,
8189,
9661,
13,
3254,
20540,
45755,
11140,
12200,
198,
2,
198,
2,
7502,
25,
3740,
1378,
293,
316,
8189,
13,
785,
14,
1676,
22143,
14,
12102,
378,
12,
39491,
12,
12947,
12,
21048,
14,
198,
2,
27419,
25,
13398,
198,
2,... | 2.789773 | 176 |
from setuptools import setup
version = open("ccb/__version__.py").read().strip('"\n')
setup_args = {
"name": "ccb",
"version": version,
"url": "https://github.com/earth-chris/ccb",
"license": "MIT",
"author": "Christopher Anderson",
"author_email": "cbanders@stanford.edu",
"description": "... | [
6738,
900,
37623,
10141,
1330,
9058,
198,
198,
9641,
796,
1280,
7203,
535,
65,
14,
834,
9641,
834,
13,
9078,
11074,
961,
22446,
36311,
10786,
1,
59,
77,
11537,
198,
198,
40406,
62,
22046,
796,
1391,
198,
220,
220,
220,
366,
3672,
12... | 2.543333 | 300 |
# import time
#
# def reader():
# """A generator that fakes a read from a file, socket, etc."""
# for i in range(101):
# yield '<< %s' % i
#
# def consumer():
# r = ''
# while True:
# #Pythonyield
# #n
# n = yield from reader()
# print("===",n)
# if ... | [
198,
2,
1330,
220,
640,
198,
2,
198,
2,
825,
9173,
33529,
198,
2,
220,
220,
220,
220,
220,
37227,
32,
17301,
326,
277,
1124,
257,
1100,
422,
257,
2393,
11,
17802,
11,
3503,
526,
15931,
198,
2,
220,
220,
220,
220,
220,
329,
1312,... | 1.861592 | 578 |
import maya.cmds as mc
import maya.OpenMaya as OpenMaya
import glTools.utils.base
def transferComponentSelection(sourceSelection,targetMesh,threshold=0.0001):
'''
'''
# Check selection target mesh
if not mc.objExists(targetMesh):
raise Exception('Target mesh "'+targetMesh+'" does not exist!')
# Flatten selec... | [
11748,
743,
64,
13,
28758,
82,
355,
36650,
198,
11748,
743,
64,
13,
11505,
6747,
64,
355,
4946,
6747,
64,
198,
198,
11748,
1278,
33637,
13,
26791,
13,
8692,
198,
198,
4299,
4351,
21950,
4653,
1564,
7,
10459,
4653,
1564,
11,
16793,
3... | 2.586345 | 498 |
"""
A Python package for recipe parsing and management.
"""
import yaml
try:
from cStringIO import StringIO
except ImportError:
from io import StringIO
from .exceptions import LoadError, ParseError, PyprikaError, FieldError # noqa
from .ingredient import Ingredient # noqa
from .quantity import Quantity # n... | [
37811,
198,
32,
11361,
5301,
329,
8364,
32096,
290,
4542,
13,
198,
37811,
198,
198,
11748,
331,
43695,
198,
28311,
25,
198,
220,
220,
220,
422,
269,
10100,
9399,
1330,
10903,
9399,
198,
16341,
17267,
12331,
25,
198,
220,
220,
220,
422... | 2.6249 | 1,253 |
def test_get_bond_infos(case_data):
"""
Test :meth:`.ConstructedMolecule.get_bond_infos`.
Parameters
----------
case_data : :class:`.CaseData`
A test case. Holds the constructed molecule to test and the
correct number of new bonds.
Returns
-------
None : :class:`NoneTyp... | [
4299,
1332,
62,
1136,
62,
65,
623,
62,
10745,
418,
7,
7442,
62,
7890,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
6208,
1058,
76,
2788,
25,
44646,
25207,
44,
2305,
23172,
13,
1136,
62,
65,
623,
62,
10745,
418,
44646,
628,... | 2.338521 | 514 |
from django.apps import AppConfig
| [
6738,
42625,
14208,
13,
18211,
1330,
2034,
16934,
628
] | 3.888889 | 9 |
import json
import praw
reddit = praw.Reddit("dwight-schrute-bot")
for submission in reddit.subreddit('all').rising(limit=15):
submission.comments.replace_more(limit=None)
print(submission.subreddit.display_name)
if not submission.over_18:
for comment in submission.comments.list():
pri... | [
11748,
33918,
198,
11748,
279,
1831,
198,
198,
10748,
796,
279,
1831,
13,
22367,
7203,
67,
86,
432,
12,
20601,
81,
1133,
12,
13645,
4943,
198,
198,
1640,
14498,
287,
18374,
13,
7266,
10748,
10786,
439,
27691,
22610,
7,
32374,
28,
1314... | 2.745763 | 118 |
from pymavlink import mavutil
import time
# Create the connection
master = mavutil.mavlink_connection('udpin:0.0.0.0:14550')
# Wait a heartbeat before sending commands
master.wait_heartbeat()
# Send a positive x value, negative y, negative z,
# positive rotation and no button.
# http://mavlink.org/messages/common#MAN... | [
6738,
279,
4948,
615,
8726,
1330,
285,
615,
22602,
198,
11748,
640,
198,
198,
2,
13610,
262,
4637,
198,
9866,
796,
285,
615,
22602,
13,
76,
615,
8726,
62,
38659,
10786,
463,
11635,
25,
15,
13,
15,
13,
15,
13,
15,
25,
18781,
1120,
... | 2.686475 | 488 |
# -*- coding: utf-8 -*-
#############################################################
# IMPORTS #
#############################################################
import os
from PIL import Image
import pyheif
#####################################################... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
201,
198,
29113,
14468,
7804,
4242,
2,
201,
198,
2,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
2... | 2.189394 | 792 |
import functools
import os
import ssl
import uuid
from typing import Any, Dict, List, Literal, Optional, Tuple
import jinja2
import pydantic
import yaml
from .exceptions import TplBuildException, TplBuildTemplateException
RESERVED_PROFILE_KEYS = {
"begin_stage",
"platform",
}
def _normalize_rel_path(path: ... | [
11748,
1257,
310,
10141,
198,
11748,
28686,
198,
11748,
264,
6649,
198,
11748,
334,
27112,
198,
6738,
19720,
1330,
4377,
11,
360,
713,
11,
7343,
11,
25659,
1691,
11,
32233,
11,
309,
29291,
198,
198,
11748,
474,
259,
6592,
17,
198,
117... | 2.747967 | 246 |
#!/usr/bin/env python
from setuptools import setup
from distutils.command.build import build
from setuptools.command.develop import develop
setup(
name="peppercompiler",
version="0.1.3",
packages=['peppercompiler', 'peppercompiler.design'],
install_requires=["pyparsing", "six"],
include_package... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
6738,
900,
37623,
10141,
1330,
9058,
198,
6738,
1233,
26791,
13,
21812,
13,
11249,
1330,
1382,
198,
6738,
900,
37623,
10141,
13,
21812,
13,
16244,
1330,
1205,
628,
628,
198,
40406,
... | 2.454333 | 427 |
import sys
sys.path.append("/Library/Frameworks/GStreamer.framework/Versions/0.10/lib/python2.7/site-packages/")
import gobject
gobject.threads_init()
import pygst
pygst.require("0.10")
import gst
client = Client()
client.start()
loop = gobject.MainLoop()
loop.run()
| [
11748,
25064,
198,
17597,
13,
6978,
13,
33295,
7203,
14,
23377,
14,
42026,
14,
38,
28696,
13,
30604,
14,
45150,
14,
15,
13,
940,
14,
8019,
14,
29412,
17,
13,
22,
14,
15654,
12,
43789,
14,
4943,
198,
11748,
48484,
752,
198,
70,
152... | 2.802083 | 96 |
from django.contrib.auth.models import User
from django.core import mail
from django.shortcuts import resolve_url
from django.test import TestCase
from InternetSemLimites.core.forms import ProviderForm
from InternetSemLimites.core.models import Provider, State
| [
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27530,
1330,
11787,
198,
6738,
42625,
14208,
13,
7295,
1330,
6920,
198,
6738,
42625,
14208,
13,
19509,
23779,
1330,
10568,
62,
6371,
198,
6738,
42625,
14208,
13,
9288,
1330,
6208,
20448,
... | 3.811594 | 69 |
from z3 import *
CONNECTIVE_OPS = [Z3_OP_NOT,Z3_OP_AND,Z3_OP_OR,Z3_OP_IMPLIES,Z3_OP_IFF,Z3_OP_ITE]
REL_OPS = [Z3_OP_EQ,Z3_OP_LE,Z3_OP_LT,Z3_OP_GE,Z3_OP_GT]
OPERATORS = CONNECTIVE_OPS + REL_OPS
# var is tuple (type, name)
# creates a constraint which allow only key variable to change
# Returns root of constructed tr... | [
6738,
1976,
18,
1330,
1635,
198,
198,
10943,
48842,
9306,
62,
30737,
796,
685,
57,
18,
62,
3185,
62,
11929,
11,
57,
18,
62,
3185,
62,
6981,
11,
57,
18,
62,
3185,
62,
1581,
11,
57,
18,
62,
3185,
62,
3955,
6489,
11015,
11,
57,
1... | 2.352751 | 309 |
import random
data_list = random.sample(range(100), 50)
print(selectionSort(data_list))
| [
11748,
4738,
198,
198,
7890,
62,
4868,
796,
4738,
13,
39873,
7,
9521,
7,
3064,
828,
2026,
8,
198,
198,
4798,
7,
49283,
42758,
7,
7890,
62,
4868,
4008,
628,
220,
220,
220,
220,
220,
220,
628
] | 2.675676 | 37 |
import logging
from typing import Any, Mapping
import redis
import conf
import ocular
import workers
from constants.experiment_jobs import get_experiment_job_uuid
from db.redis.containers import RedisJobContainers
from db.redis.statuses import RedisStatuses
from lifecycles.jobs import JobLifeCycle
from options.regi... | [
11748,
18931,
198,
198,
6738,
19720,
1330,
4377,
11,
337,
5912,
198,
198,
11748,
2266,
271,
198,
198,
11748,
1013,
198,
11748,
267,
10440,
198,
11748,
3259,
198,
198,
6738,
38491,
13,
23100,
3681,
62,
43863,
1330,
651,
62,
23100,
3681,
... | 2.493404 | 379 |
import sys
import json
import numpy as np
import matplotlib.pyplot as plt
if __name__=="__main__":
# Read in input
input_file = sys.argv[-1]
with open(input_file, 'r') as input_handle:
input_dict = json.load(input_handle)
# Initialize wing
wing_dict = input_dict["wing"]
washout_dic... | [
11748,
25064,
198,
11748,
33918,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
628,
198,
198,
361,
11593,
3672,
834,
855,
1,
834,
12417,
834,
1298,
628,
220,
220,
220,
1303,
414... | 2.027244 | 1,872 |
from django.db import models
| [
6738,
42625,
14208,
13,
9945,
1330,
4981,
198
] | 3.625 | 8 |
if __name__ == '__main__':
elevate()
main() | [
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
36830,
3419,
198,
220,
220,
220,
1388,
3419
] | 2.26087 | 23 |
from django.urls import path
from django.conf import settings
from django.conf.urls.static import static
from . import views
app_name = 'etikihead'
urlpatterns = [
path('', views.entry_mask, name='entrymask'),
path('contact/', views.contact, name='contact'),
path('privacy/', views.privacy, name='privac... | [
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
13,
12708,
1330,
9037,
198,
198,
6738,
764,
1330,
5009,
198,
198,
1324,
62,
3672,
796,
705... | 2.734783 | 230 |
# TC002 test case - Login in with new user data - exit
import data.data_tcA002 as da02
import func.func_01 as fu01
from selenium import webdriver
from selenium.webdriver.common.by import By
import time
from selenium.webdriver.chrome.options import Options
from webdriver_manager.chrome import ChromeDriverManager
opti... | [
2,
17283,
21601,
1332,
1339,
532,
23093,
287,
351,
649,
2836,
1366,
532,
8420,
198,
198,
11748,
1366,
13,
7890,
62,
23047,
32,
21601,
355,
12379,
2999,
198,
11748,
25439,
13,
20786,
62,
486,
355,
14035,
486,
198,
198,
6738,
384,
11925... | 3.132616 | 279 |
"""Tests for the data utilities from lisc."""
from lisc.data.utils import *
###################################################################################################
###################################################################################################
| [
37811,
51,
3558,
329,
262,
1366,
20081,
422,
300,
2304,
526,
15931,
198,
198,
6738,
300,
2304,
13,
7890,
13,
26791,
1330,
1635,
198,
198,
29113,
29113,
29113,
21017,
198,
29113,
29113,
29113,
21017,
198
] | 7.942857 | 35 |
from leapp import reporting
from leapp.actors import Actor
from leapp.models import FirewalldGlobalConfig, FirewallsFacts
from leapp.reporting import create_report, Report
from leapp.tags import ChecksPhaseTag, IPUWorkflowTag
| [
6738,
443,
1324,
1330,
6447,
198,
6738,
443,
1324,
13,
529,
669,
1330,
27274,
198,
6738,
443,
1324,
13,
27530,
1330,
3764,
16783,
335,
22289,
16934,
11,
3764,
86,
5691,
37,
8656,
198,
6738,
443,
1324,
13,
49914,
1330,
2251,
62,
13116,... | 3.721311 | 61 |
import os
def run(path: str, return_full_path: bool = False):
"""Gets all files and folders from a path and stores them into $file_list
Arguments:
path {str} -- The path to get files and folders from
Keyword Arguments:
return_full_path {bool} -- True to return the full path of th... | [
11748,
28686,
628,
198,
4299,
1057,
7,
6978,
25,
965,
11,
1441,
62,
12853,
62,
6978,
25,
20512,
796,
10352,
2599,
198,
220,
220,
220,
37227,
38,
1039,
477,
3696,
290,
24512,
422,
257,
3108,
290,
7000,
606,
656,
720,
7753,
62,
4868,
... | 2.557692 | 260 |
"""
Test for workspaces API
"""
# TODO: tests for authorization codes
import random
from collections.abc import Generator
from concurrent.futures import ThreadPoolExecutor
from contextlib import contextmanager
from wxc_sdk.rest import RestError
from wxc_sdk.all_types import *
from .base import TestCaseWithLog
TEST_WO... | [
37811,
198,
14402,
329,
2499,
43076,
7824,
198,
37811,
198,
2,
16926,
46,
25,
5254,
329,
19601,
12416,
198,
11748,
4738,
198,
6738,
17268,
13,
39305,
1330,
35986,
198,
6738,
24580,
13,
69,
315,
942,
1330,
14122,
27201,
23002,
38409,
198... | 3.471154 | 104 |
import tensorflow as tf
import glob
from configuration import OpenPoseCfg as cfg
from openpose.data.augmentation import Transformer
| [
11748,
11192,
273,
11125,
355,
48700,
198,
11748,
15095,
198,
198,
6738,
8398,
1330,
4946,
47,
577,
34,
40616,
355,
30218,
70,
198,
6738,
1280,
3455,
13,
7890,
13,
559,
5154,
341,
1330,
3602,
16354,
628,
628,
198
] | 3.605263 | 38 |
dia = int(input('Quantos dias alugados? '))
km = float(input('Quantos KM rodados? '))
print('Como voc ficou {} dias com ele e rodou {:.2f}KM, sua conta ficou em {:.2f}R$'.format(dia, km, (60*dia)+(0.15*km)))
| [
67,
544,
796,
493,
7,
15414,
10786,
24915,
418,
2566,
292,
435,
1018,
22484,
30,
705,
4008,
198,
13276,
796,
12178,
7,
15414,
10786,
24915,
418,
46646,
15299,
22484,
30,
705,
4008,
198,
4798,
10786,
5377,
78,
12776,
277,
291,
280,
238... | 2.212766 | 94 |
""" Ip Info """
| [
37811,
314,
79,
14151,
37227,
628,
198
] | 2.571429 | 7 |
from django.shortcuts import render, redirect, HttpResponseRedirect
from django.contrib import messages
from django.contrib.auth import authenticate, login, logout
from django.contrib.auth.decorators import login_required
from django.contrib.auth.forms import UserCreationForm
from django.urls import reverse
# Create... | [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
11,
18941,
11,
367,
29281,
31077,
7738,
1060,
198,
6738,
42625,
14208,
13,
3642,
822,
1330,
6218,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
1330,
8323,
5344,
11,
17594,
11,
2604... | 2.931373 | 204 |
from gbdxtools.images.worldview import WorldViewImage
from gbdxtools.images.geoeye01 import GeoEyeDriver
from gbdxtools.images.util import vector_services_query
band_types = {
'MS': 'BGRN',
'Panchromatic': 'PAN',
'Pan': 'PAN',
'pan': 'PAN'
}
| [
6738,
308,
17457,
742,
10141,
13,
17566,
13,
6894,
1177,
1330,
2159,
7680,
5159,
198,
6738,
308,
17457,
742,
10141,
13,
17566,
13,
469,
2577,
5948,
486,
1330,
32960,
24876,
32103,
198,
6738,
308,
17457,
742,
10141,
13,
17566,
13,
22602,... | 2.466667 | 105 |
from meld import logger | [
6738,
502,
335,
1330,
49706
] | 4.6 | 5 |
import tensorflow as tf
| [
11748,
11192,
273,
11125,
355,
48700,
628
] | 3.571429 | 7 |
#!/usr/bin/env python3
#-------------------------------------------------------------------------------
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
#---------------------------------------------------... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
2,
10097,
24305,
198,
2,
30396,
329,
257,
13934,
5509,
10139,
13,
198,
2,
1398,
12200,
19667,
25,
198,
2,
220,
220,
220,
220,
825,
11593,
15003,
834,
7,
944,
11,
2124,
259... | 3.663265 | 98 |
# Generated by Django 3.2.6 on 2021-08-14 19:48
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
17,
13,
21,
319,
33448,
12,
2919,
12,
1415,
678,
25,
2780,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
import numpy as np
import xobjects as xo
import xpart as xp
| [
11748,
299,
32152,
355,
45941,
198,
198,
11748,
2124,
48205,
355,
2124,
78,
198,
11748,
2124,
3911,
355,
36470,
198
] | 3.05 | 20 |
from utils.loader import Loader
from utils.model import DeepSNN
import torch
import os
# %%
Caltech = { "name" : "Caltech",
"epochs_l1" : 20,
"epochs_l2" : 100,
"weight_mean" : 0.8,
"weight_std" : 0.05,
"lr" : (0.005, -0.0025),
"... | [
6738,
3384,
4487,
13,
29356,
1330,
8778,
263,
201,
198,
6738,
3384,
4487,
13,
19849,
1330,
10766,
50,
6144,
201,
198,
11748,
28034,
201,
198,
11748,
28686,
201,
198,
201,
198,
2,
43313,
201,
198,
9771,
13670,
796,
1391,
366,
3672,
1,
... | 1.848889 | 1,125 |
"""
[]
https://tech.nkhn37.net/python-set-comprehension/#i
[]
https://tech.nkhn37.net/python-comprehension/
"""
data = [10, 15, 20, 25, 30, 35, 40, 45, 50, 10, 15, 20, 25, 30]
#
data_set = {dt for dt in data if dt % 2 == 0}
print(f'data_set : {data_set}')
| [
37811,
628,
198,
21737,
198,
5450,
1378,
13670,
13,
77,
14636,
77,
2718,
13,
3262,
14,
29412,
12,
2617,
12,
785,
3866,
5135,
295,
31113,
72,
198,
198,
21737,
198,
5450,
1378,
13670,
13,
77,
14636,
77,
2718,
13,
3262,
14,
29412,
12,
... | 2.139344 | 122 |
#!/usr/bin/env python
# * coding: utf8 *
'''
worker_bee.py
A module that contains logic for building traditional image-based caches.
'''
import os
import socket
import time
from os.path import join, dirname, realpath
from shutil import rmtree
import pygsheets
from datetime import date
import arcpy
from . import con... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
1635,
19617,
25,
3384,
69,
23,
1635,
198,
7061,
6,
198,
28816,
62,
20963,
13,
9078,
198,
198,
32,
8265,
326,
4909,
9156,
329,
2615,
4569,
2939,
12,
3106,
50177,
13,
198,
7061,
6... | 3.371728 | 191 |
import taichi as ti
PI = 3.1415926
# http://www.glowinggoo.com/sph/bin/kelager.06.pdf
if __name__ == '__main__':
ti.init(arch=ti.cpu, debug=True)
test()
| [
11748,
20486,
16590,
355,
46668,
198,
198,
11901,
796,
513,
13,
1415,
19707,
2075,
198,
198,
2,
2638,
1378,
2503,
13,
4743,
7855,
42469,
13,
785,
14,
82,
746,
14,
8800,
14,
7750,
3536,
13,
3312,
13,
12315,
628,
628,
198,
361,
11593,... | 2.194805 | 77 |
import requests
import json
url_sehir = "https://ezanvakti.herokuapp.com/sehirler/2"
r = requests.get(url_sehir)
j = r.json()
sehir_adi = input("ehir:")
ilce_adi = input("le:")
for sehir in j:
if sehir_adi == sehir["SehirAdi"]:
ID = sehir["SehirID"]
print(ID)
url_ilce = "https://ezanvakti... | [
11748,
7007,
201,
198,
11748,
33918,
201,
198,
6371,
62,
325,
71,
343,
796,
366,
5450,
1378,
8471,
272,
85,
461,
20259,
13,
11718,
23063,
1324,
13,
785,
14,
325,
71,
343,
1754,
14,
17,
1,
201,
198,
81,
796,
7007,
13,
1136,
7,
63... | 1.917098 | 386 |