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 -*-
sayi1 = int(input("1. Say:"))
sayi2 = int(input("2. Say:"))
sayi3 = int(input("3. Say:"))
if (sayi1>=sayi2) and (sayi1>=sayi3):
enBuyuk = sayi1
elif(sayi2>=sayi1) and (sayi2>=sayi3):
enBuyuk = sayi2
else:
enBuyuk = sayi3
print("En Byk Say:",enBuyuk) | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
16706,
72,
16,
796,
493,
7,
15414,
7203,
16,
13,
13816,
11097,
4008,
198,
16706,
72,
17,
796,
493,
7,
15414,
7203,
17,
13,
13816,
11097,
4008,
198,
16706,
72,
1... | 1.87013 | 154 |
with open('input.txt') as f:
lines = f.readlines()
counter = 0
for line in lines:
right_part = line.split(" | ")[1]
for segment in right_part.strip().split(" "):
#print(segment, len(segment))
if len(segment) in [2,3,4,7]:
counter += 1
#e... | [
4480,
1280,
10786,
15414,
13,
14116,
11537,
355,
277,
25,
198,
220,
220,
220,
3951,
796,
277,
13,
961,
6615,
3419,
628,
220,
220,
220,
3753,
796,
657,
628,
220,
220,
220,
329,
1627,
287,
3951,
25,
198,
220,
220,
220,
220,
220,
220... | 1.975248 | 202 |
import Tkinter
import weighted_objects
import tkFileDialog
import time
import ttk
import numpy
import sys
while True:
# Ask user for file dialog.
Tkinter.Tk().withdraw()
osu_file_path = tkFileDialog.askopenfilename(title="Select an osu file", filetypes=(("osu files", "*.osu"),))
# Calcula... | [
11748,
309,
74,
3849,
201,
198,
11748,
26356,
62,
48205,
201,
198,
11748,
256,
74,
8979,
44204,
201,
198,
11748,
640,
201,
198,
11748,
256,
30488,
201,
198,
11748,
299,
32152,
201,
198,
11748,
25064,
201,
198,
201,
198,
4514,
6407,
25... | 2.165208 | 2,857 |
from .probe import ProbeTrainer
# train using embeddings
# train using images
# main training method | [
6738,
764,
1676,
1350,
1330,
42600,
2898,
10613,
198,
198,
2,
4512,
1262,
11525,
67,
654,
198,
198,
2,
4512,
1262,
4263,
198,
198,
2,
1388,
3047,
2446
] | 3.678571 | 28 |
#!/usr/bin/env python
"""REL_DB blobstore implementation."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from grr_response_server import blob_store
from grr_response_server import data_store
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
37811,
16448,
62,
11012,
44812,
8095,
7822,
526,
15931,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
6738,
11593,
37443,
834,
1330,
7297,
198,
6738,
11593,
37443,
834,
1330,
... | 3.676056 | 71 |
#pragma out
#pragma repy restrictions.loose
if callfunc == 'initialize':
ip = getmyip()
noopch = recvmess(ip,<messport>,noop)
recvmess(ip,<messport1>,foo)
sleep(.1)
sendmess(ip,<messport1>,'hi',ip,<messport>)
stopcomm(noopch)
| [
2,
1050,
363,
2611,
503,
198,
2,
1050,
363,
2611,
1128,
88,
8733,
13,
5439,
577,
198,
198,
361,
869,
20786,
6624,
705,
36733,
1096,
10354,
198,
220,
20966,
796,
651,
1820,
541,
3419,
198,
220,
645,
404,
354,
796,
664,
14761,
408,
... | 2.254717 | 106 |
"""
Startup checks
"""
import subprocess
import pyzfscmds.system.agnostic as zfssys
def is_root_on_zfs():
"""Check if running root on ZFS"""
system = zfssys.check_valid_system()
if system is None:
raise RuntimeError(f"System is not yet supported by pyzfscmds\n")
root_dataset = None
if z... | [
37811,
198,
10434,
929,
8794,
198,
37811,
198,
198,
11748,
850,
14681,
198,
198,
11748,
12972,
89,
69,
1416,
9132,
82,
13,
10057,
13,
4660,
15132,
355,
1976,
69,
824,
893,
628,
198,
4299,
318,
62,
15763,
62,
261,
62,
89,
9501,
33529... | 2.477273 | 220 |
import sys
sp="#####"
distinct_1(sys.argv[1])
distinct_2(sys.argv[1])
distinct_3(sys.argv[1]) | [
11748,
25064,
198,
198,
2777,
2625,
4242,
2,
1,
198,
198,
17080,
4612,
62,
16,
7,
17597,
13,
853,
85,
58,
16,
12962,
198,
17080,
4612,
62,
17,
7,
17597,
13,
853,
85,
58,
16,
12962,
198,
17080,
4612,
62,
18,
7,
17597,
13,
853,
... | 1.938776 | 49 |
"""
Calculate PDFs for polar vortex response
Notes
-----
Author : Zachary Labe
Date : 25 June 2019
"""
### Import modules
import numpy as np
import matplotlib.pyplot as plt
import datetime
import read_MonthlyData as MO
import calc_Utilities as UT
import cmocean
import scipy.stats as sts
### Define director... | [
37811,
198,
9771,
3129,
378,
12960,
82,
329,
13559,
42726,
2882,
198,
198,
16130,
198,
30934,
198,
220,
220,
220,
6434,
1058,
18825,
560,
3498,
68,
198,
220,
220,
220,
7536,
220,
220,
1058,
1679,
2795,
13130,
198,
37811,
198,
198,
210... | 2.493069 | 2,020 |
import pytest
from airtunnel.operators.sql import sql_helpers
TEST_SCRIPT = "ddl/test_schema/test_table.sql"
| [
11748,
12972,
9288,
198,
198,
6738,
1633,
28286,
4954,
13,
3575,
2024,
13,
25410,
1330,
44161,
62,
16794,
364,
198,
198,
51,
6465,
62,
6173,
46023,
796,
366,
1860,
75,
14,
9288,
62,
15952,
2611,
14,
9288,
62,
11487,
13,
25410,
1,
62... | 2.555556 | 45 |
import numpy as np
import matplotlib.pyplot as plt
## softmax: 0.1 600
## perceptron: 0.05 550
if __name__ == "__main__":
csvname = 'breast_cancer_data.csv'
x, y = readData(csvname)
w = np.ones([x.shape[0] + 1, 1])
x = np.insert(x, 0, values=np.ones([1, x.shape[1]]), axis=0)
xSoftList = [... | [
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
198,
2235,
2705,
9806,
25,
657,
13,
16,
10053,
198,
2235,
34953,
1313,
25,
657,
13,
2713,
25240,
628,
628,
628,
198,
361,
220,
11593,
... | 2.116737 | 711 |
height = float(input("Enter height of the square: "))
width = float(input("Enter width of the Square: "))
perimeter = (2 * height) + (2 * width)
area = height * height
print("The perimeter of the square is", perimeter)
print("The area of the square is", area)
close = input("Press X to exit")
#... | [
201,
198,
201,
198,
201,
198,
17015,
796,
12178,
7,
15414,
7203,
17469,
6001,
286,
262,
6616,
25,
366,
4008,
201,
198,
201,
198,
10394,
796,
12178,
7,
15414,
7203,
17469,
9647,
286,
262,
9276,
25,
366,
4008,
201,
198,
201,
198,
525,... | 3.104478 | 134 |
import numpy as np
from common.util import im2col
from collections import OrderedDict
from common.layers import *
from common.gradient import numerical_gradient
## 4 ##
x = np.random.rand(10, 1, 28, 28) # (m, c, h, w)
print(x.shape)
x[0].shape # data 1
x[0, 0] # data channel
x1 = np.random.rand(1, 3, 7, 7)
col1 =... | [
11748,
299,
32152,
355,
45941,
198,
6738,
2219,
13,
22602,
1330,
545,
17,
4033,
198,
6738,
17268,
1330,
14230,
1068,
35,
713,
198,
6738,
2219,
13,
75,
6962,
1330,
1635,
198,
6738,
2219,
13,
49607,
1330,
29052,
62,
49607,
198,
198,
223... | 1.752709 | 1,569 |
import datetime
import pytest
import requests
from datavault_api_client import crawler
from datavault_api_client.data_structures import DiscoveredFileInfo
| [
11748,
4818,
8079,
198,
198,
11748,
12972,
9288,
198,
11748,
7007,
198,
198,
6738,
4818,
615,
1721,
62,
15042,
62,
16366,
1330,
27784,
1754,
198,
6738,
4818,
615,
1721,
62,
15042,
62,
16366,
13,
7890,
62,
7249,
942,
1330,
8444,
2557,
... | 3.4375 | 48 |
#!/usr/bin/env python
__author__ = 'Michael Meisinger'
import gevent
import random
from pyon.datastore.datastore import DatastoreManager
from pyon.public import IonObject
import ooi.timer
"""
from prototype.couch.couch_concurrent import runcc
runcc(dict(num_obj=100000, num_read=2000, num_thread=3))
"""
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
834,
9800,
834,
796,
705,
13256,
2185,
1710,
263,
6,
198,
198,
11748,
4903,
1151,
198,
11748,
4738,
198,
198,
6738,
12972,
261,
13,
19608,
459,
382,
13,
19608,
459,
382,
1330,
1... | 2.87037 | 108 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Date : 2020-04-06 23:45:54
# @Author : Racter Liu (racterub) (racterub@gmail.com)
# @Link : https://racterub.me
# @License : MIT
from flask import Flask, render_template, request, url_for, redirect, session, send_from_directory, send_file, make_response
app = F... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2488,
10430,
220,
220,
220,
1058,
12131,
12,
3023,
12,
3312,
2242,
25,
2231,
25,
4051,
198,
2,
2488,
13838,
... | 2.548246 | 228 |
from sanic.response import json
from sanic import Blueprint
from service import ListService
from injector import inject, singleton
from logging import Logger
from sanic import Sanic
| [
6738,
5336,
291,
13,
26209,
1330,
33918,
198,
6738,
5336,
291,
1330,
39932,
198,
6738,
2139,
1330,
7343,
16177,
198,
6738,
8677,
273,
1330,
8677,
11,
2060,
1122,
198,
6738,
18931,
1330,
5972,
1362,
198,
6738,
5336,
291,
1330,
2986,
291,... | 3.711538 | 52 |
"""
Author: Darren
Date: 02/05/2021
Solving https://adventofcode.com/2015/day/24
We require three bags of equal weight.
Bag 1 in the passenger compartment, needs to have fewest packages.
Bags 2 and 3 to either side.
Solution:
Use subset sum function to work out which combinations of packages adds up to... | [
37811,
220,
198,
13838,
25,
26203,
198,
10430,
25,
7816,
14,
2713,
14,
1238,
2481,
198,
198,
50,
10890,
3740,
1378,
324,
1151,
1659,
8189,
13,
785,
14,
4626,
14,
820,
14,
1731,
198,
198,
1135,
2421,
1115,
11668,
286,
4961,
3463,
13,... | 2.90665 | 782 |
from .problem import Problem
from .algorithm import Algorithm
from .config import artap_root
import time
import numpy as np
import os
import sys
sys.path.append(artap_root + os.sep + "lib" + os.sep)
import bayesopt
from multiprocessing import Process, Pipe, Queue, Manager
# from multiprocessing.managers import Base... | [
6738,
764,
45573,
1330,
20647,
198,
6738,
764,
282,
42289,
1330,
978,
42289,
198,
6738,
764,
11250,
1330,
1242,
499,
62,
15763,
198,
198,
11748,
640,
198,
11748,
299,
32152,
355,
45941,
198,
198,
11748,
28686,
198,
198,
11748,
25064,
19... | 2.566604 | 533 |
def Short_Bubble_Sort(alist):
'''
Sorting alist using Short Bubble Sort
'''
passnum = len(alist) - 1
exchangesDone = True
while passnum > 0 and exchangesDone:
exchangesDone = False
for i in range(passnum):
if alist[i] > alist[i+1]:
exchangesDone = True... | [
4299,
10073,
62,
33,
549,
903,
62,
42758,
7,
49845,
2599,
198,
220,
220,
220,
705,
7061,
198,
220,
220,
220,
311,
24707,
435,
396,
1262,
10073,
33691,
33947,
198,
220,
220,
220,
705,
7061,
198,
220,
220,
220,
1208,
22510,
796,
18896... | 2.066351 | 211 |
# This file was created by a source code generator:
# genxml2wrap.py
# Do not modify. Change the definition and
# run the generator again!
#
# (c) 2010 Mathias Hoffmann, GFZ Potsdam
#
#
import datetime
#
#
# QualityControl::QCLog
# QualityControl::WaveformQuality
# QualityControl::Outage
# Inventory::StationRefe... | [
2,
770,
2393,
373,
2727,
416,
257,
2723,
2438,
17301,
25,
198,
2,
2429,
19875,
17,
37150,
13,
9078,
220,
198,
2,
2141,
407,
13096,
13,
9794,
262,
6770,
290,
198,
2,
1057,
262,
17301,
757,
0,
198,
2,
198,
2,
357,
66,
8,
3050,
1... | 3.220077 | 259 |
# coding: utf-8
"""
Mailchimp Marketing API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: 3.0.74
Contact: apihelp@mailchimp.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
37811,
198,
220,
220,
220,
11099,
354,
11011,
22137,
7824,
628,
220,
220,
220,
1400,
6764,
2810,
357,
27568,
416,
2451,
7928,
6127,
5235,
3740,
1378,
12567,
13,
785,
14,
2032,
7928,
12,
1504... | 2.579832 | 357 |
import time
import sys
| [
11748,
640,
198,
11748,
25064,
198
] | 3.833333 | 6 |
import os
from fastapi import FastAPI
from fastapi_sqlalchemy import DBSessionMiddleware
from fastapi_sqlalchemy import db
from dotenv import load_dotenv
from sqlalchemy import schema
from db import models as db_model
from schemas import models as schema
load_dotenv()
POSTGRES_USER = os.getenv('POSTGRES_USER')
POSTG... | [
11748,
28686,
198,
6738,
3049,
15042,
1330,
12549,
17614,
198,
6738,
3049,
15042,
62,
25410,
282,
26599,
1330,
360,
4462,
2521,
34621,
1574,
198,
6738,
3049,
15042,
62,
25410,
282,
26599,
1330,
20613,
198,
6738,
16605,
24330,
1330,
3440,
... | 2.620567 | 282 |
import bpy
__all__ = [
"delete_all_data",
]
def delete_all_data():
"""Delete all collections, mesh and curve objects, meshes, curves, materials."""
for collection in bpy.data.collections:
bpy.data.collections.remove(collection)
for obj in bpy.data.objects:
if obj.type == 'MESH':
... | [
11748,
275,
9078,
628,
198,
834,
439,
834,
796,
685,
198,
220,
220,
220,
366,
33678,
62,
439,
62,
7890,
1600,
198,
60,
628,
198,
4299,
12233,
62,
439,
62,
7890,
33529,
198,
220,
220,
220,
37227,
38727,
477,
17268,
11,
19609,
290,
... | 2.681115 | 323 |
##############
# team_to_tsv script
# Creates two tsv files for importing into domjudge
# Team info gets stored inside teams.tsv in the following format
# <team_id(int)> <external_id> <category_id> <team_name>
# Account info gets stored inside acccounts.tsv in the following format
# team <team-name> <use... | [
7804,
4242,
2235,
198,
2,
1074,
62,
1462,
62,
912,
85,
4226,
198,
2,
220,
7921,
274,
734,
256,
21370,
3696,
329,
33332,
656,
2401,
10456,
469,
198,
2,
220,
4816,
7508,
3011,
8574,
2641,
3466,
13,
912,
85,
287,
262,
1708,
5794,
198... | 2.3778 | 982 |
from __future__ import unicode_literals
import frappe
import filetype
"""
NEED IMPORT LOCAL LANG FROM FRAPPE
"""
| [
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
11748,
5306,
27768,
198,
11748,
2393,
4906,
198,
198,
37811,
198,
12161,
1961,
30023,
9863,
37347,
1847,
406,
15567,
16034,
8782,
2969,
11401,
198,
37811,
628
] | 3.108108 | 37 |
import hashlib
import json
import uuid
import requests
import aiohttp
from .exceptions import ApiResponseError
from .action import Action
| [
11748,
12234,
8019,
198,
11748,
33918,
198,
11748,
334,
27112,
198,
198,
11748,
7007,
198,
11748,
257,
952,
4023,
198,
198,
6738,
764,
1069,
11755,
1330,
5949,
72,
31077,
12331,
198,
6738,
764,
2673,
1330,
7561,
628,
628
] | 3.763158 | 38 |
from datetime import datetime as dt
from flask import render_template, redirect, request, url_for, abort
from flask_login import login_user, logout_user, login_required, current_user, login_url
from . import app, db, login_manager
from .models import Post, Tag, Author, tags as Post_Tag
from .forms import LoginForm, Pos... | [
6738,
4818,
8079,
1330,
4818,
8079,
355,
288,
83,
198,
6738,
42903,
1330,
8543,
62,
28243,
11,
18941,
11,
2581,
11,
19016,
62,
1640,
11,
15614,
198,
6738,
42903,
62,
38235,
1330,
17594,
62,
7220,
11,
2604,
448,
62,
7220,
11,
17594,
... | 3.466667 | 120 |
import string
import secrets
| [
11748,
4731,
201,
198,
11748,
13141,
201
] | 4.285714 | 7 |
from aiogram.dispatcher.filters.state import StatesGroup, State | [
6738,
257,
72,
21857,
13,
6381,
8071,
2044,
13,
10379,
1010,
13,
5219,
1330,
1829,
13247,
11,
1812
] | 3.5 | 18 |
from rest_framework.routers import DefaultRouter
from apps.user.views import AuthViewSet, UserViewSet
router = DefaultRouter()
router.register("", AuthViewSet, basename="auth")
router.register("", UserViewSet, basename="user")
urlpatterns = router.urls
| [
6738,
1334,
62,
30604,
13,
472,
1010,
1330,
15161,
49,
39605,
198,
198,
6738,
6725,
13,
7220,
13,
33571,
1330,
26828,
7680,
7248,
11,
11787,
7680,
7248,
198,
198,
472,
353,
796,
15161,
49,
39605,
3419,
198,
472,
353,
13,
30238,
7203,
... | 3.269231 | 78 |
import collections
import torch
import pprint
import string
remove_whitespace = str.maketrans('', '', string.whitespace)
def cfg_to_md(cfg, uuid):
''' Because tensorboard uses markdown'''
return uuid + "\n\n " + pprint.pformat((cfg)).replace("\n", " \n").replace("\n \'", "\n \'") + ""
def compute_... | [
11748,
17268,
198,
11748,
28034,
198,
11748,
279,
4798,
198,
11748,
4731,
198,
198,
28956,
62,
1929,
2737,
10223,
796,
965,
13,
76,
461,
21879,
504,
10786,
3256,
705,
3256,
4731,
13,
1929,
2737,
10223,
8,
198,
198,
4299,
30218,
70,
62... | 2.310241 | 332 |
#!/usr/bin/python
import unittest
import time
import usb.util
from g13gui.observer.observer import ObserverTestCase
from g13gui.model.prefs import Preferences
from g13gui.g13.manager import DeviceManager
from g13gui.g13.manager import LCD_BUFFER_SIZE
if __name__ == '__main__':
unittest.main()
| [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
198,
11748,
555,
715,
395,
198,
11748,
640,
198,
11748,
38551,
13,
22602,
198,
198,
6738,
308,
1485,
48317,
13,
672,
15388,
13,
672,
15388,
1330,
27058,
14402,
20448,
198,
6738,
308,
1485,
48... | 2.941748 | 103 |
import socket
import logging
log = logging.getLogger('mpikat.utils.unix_socket')
| [
11748,
17802,
198,
11748,
18931,
198,
198,
6404,
796,
18931,
13,
1136,
11187,
1362,
10786,
3149,
1134,
265,
13,
26791,
13,
403,
844,
62,
44971,
11537,
628
] | 3.074074 | 27 |
#1- Crie um programa que ler 3 nmeros inteiros A, B, C e exibe a mensagem se o resultado R=(A+B)/C maior que B ou no.
A, B, C = int(input()), int(input()), int(input())
R = (A + B)/C
print(Maior(R, B)) | [
2,
16,
12,
327,
5034,
23781,
1430,
64,
8358,
300,
263,
513,
299,
647,
418,
493,
20295,
4951,
317,
11,
347,
11,
327,
304,
409,
32438,
257,
285,
641,
363,
368,
384,
267,
1255,
4533,
371,
16193,
32,
10,
33,
20679,
34,
220,
17266,
1... | 2.193548 | 93 |
from django.core.files.storage import FileSystemStorage
from django.conf import settings
import os
| [
6738,
42625,
14208,
13,
7295,
13,
16624,
13,
35350,
1330,
9220,
11964,
31425,
201,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
201,
198,
11748,
28686,
201,
198
] | 3.642857 | 28 |
__author__ = 'sp'
| [
834,
9800,
834,
796,
705,
2777,
6,
628
] | 2.375 | 8 |
#!venv/bin/python
import os, re, json
from flask import Flask, request
from flask_restful import Resource, Api
from json import dumps
from flask_jsonpify import jsonify
from flask import render_template
from boxes import *
app = Flask(__name__)
api = Api(app)
api.add_resource(Syslog, '/syslog') # Route_1
if __name... | [
2,
0,
574,
85,
14,
8800,
14,
29412,
198,
198,
11748,
28686,
11,
302,
11,
33918,
198,
198,
6738,
42903,
1330,
46947,
11,
2581,
198,
6738,
42903,
62,
2118,
913,
1330,
20857,
11,
5949,
72,
198,
6738,
33918,
1330,
45514,
198,
6738,
4290... | 2.82963 | 135 |
#!/usr/bin/env python3
import boto.utils, json, requests
if detect_ec2():
print(gen_link())
else:
print("This is not an AWS instance. Please run on an AWS EC2 instance.")
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
11748,
275,
2069,
13,
26791,
11,
33918,
11,
7007,
628,
198,
361,
4886,
62,
721,
17,
33529,
198,
220,
220,
220,
3601,
7,
5235,
62,
8726,
28955,
198,
17772,
25,
198,
220,
220,
22... | 2.84375 | 64 |
#
# PySNMP MIB module FORCE10-MONITORING-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/FORCE10-MONITORING-MIB
# Produced by pysmi-0.3.4 at Wed May 1 13:14:24 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (d... | [
2,
198,
2,
9485,
15571,
7378,
337,
9865,
8265,
7473,
5222,
940,
12,
27857,
2043,
1581,
2751,
12,
8895,
33,
357,
4023,
1378,
16184,
76,
489,
8937,
13,
785,
14,
79,
893,
11632,
8,
198,
2,
7054,
45,
13,
16,
2723,
2393,
1378,
14,
14... | 2.771633 | 21,229 |
import numpy as np
from requests import session
from .core import CPUClient, GPUClient, HybridClient
from .temp import TempCPUWorker
from .errors import *
# Dump a client's attributes into a dictionary so that it can be used remotely.
# Load an existing client using its attributes. It's best to load using an existi... | [
11748,
299,
32152,
355,
45941,
198,
6738,
7007,
1330,
6246,
198,
198,
6738,
764,
7295,
1330,
9135,
11792,
11,
11362,
11792,
11,
29481,
11792,
198,
6738,
764,
29510,
1330,
24189,
36037,
12468,
263,
198,
6738,
764,
48277,
1330,
1635,
628,
... | 3.977778 | 90 |
import os
DB_LOCATION = os.getenv("DB_URI", "test.db")
# Debug flag to output more verbose logging
# - defaults to False
DEBUG = os.getenv("DEBUG", False)
# Configurable output directory for saving machine learning model pickles
# - defaults to ../output
OUTPUT_DIR = os.getenv("OUTPUT_DIR", "output")
# Port to make... | [
11748,
28686,
198,
198,
11012,
62,
29701,
6234,
796,
28686,
13,
1136,
24330,
7203,
11012,
62,
47269,
1600,
366,
9288,
13,
9945,
4943,
198,
198,
2,
31687,
6056,
284,
5072,
517,
15942,
577,
18931,
198,
2,
532,
26235,
284,
10352,
198,
30... | 2.932824 | 655 |
a = A()
a.ba<caret>
class B(object):
__slots__ = ['bar']
class C(B):
pass
C().ba<caret>
class D(object):
pass
class E(D):
__slots__ = ['bar']
E().ba<caret>
class F:
__slots__ = ['baz']
F().ba<caret> | [
198,
64,
796,
317,
3419,
198,
64,
13,
7012,
27,
6651,
83,
29,
628,
198,
4871,
347,
7,
15252,
2599,
198,
220,
220,
220,
11593,
6649,
1747,
834,
796,
37250,
5657,
20520,
198,
198,
4871,
327,
7,
33,
2599,
198,
220,
220,
220,
1208,
... | 1.916667 | 120 |
"""
Function :
Title :
Written by:
Email : aarc.88@gmail.com
Date :
Last edit :
Language : Python 3.8 or >
Aeronautical Institute of Technology - Airbus Brazil
Description:
-
Inputs:
-
Outputs:
-
TODO's:
-
"""
# =========================================================================... | [
37811,
198,
22203,
220,
1058,
198,
19160,
220,
220,
220,
220,
1058,
198,
25354,
416,
25,
220,
198,
15333,
220,
220,
220,
220,
1058,
257,
5605,
13,
3459,
31,
14816,
13,
785,
198,
10430,
220,
220,
220,
220,
220,
1058,
220,
198,
5956,
... | 2.795918 | 588 |
N = int(input())
X = list(map(int, input().split()))
W = list(map(int, input().split()))
print(weighted_mean(X, W))
| [
45,
796,
493,
7,
15414,
28955,
198,
198,
55,
796,
1351,
7,
8899,
7,
600,
11,
5128,
22446,
35312,
3419,
4008,
198,
198,
54,
796,
1351,
7,
8899,
7,
600,
11,
5128,
22446,
35312,
3419,
4008,
628,
198,
198,
4798,
7,
6551,
276,
62,
32... | 2.372549 | 51 |
# -*- coding: utf-8 -*-
import os
os_env = os.environ
# logging
LoggingConfig = {
"version": 1,
"disable_existing_loggers": False,
"formatters": {
"simple": {
"format": "%(asctime)s- %(module)s:%(lineno)d [%(levelname)1.1s] %(name)s: %(message)s",
'datefmt': '%Y/%m/%d %... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
28686,
198,
198,
418,
62,
24330,
796,
28686,
13,
268,
2268,
628,
628,
198,
2,
18931,
198,
11187,
2667,
16934,
796,
1391,
198,
220,
220,
220,
366,
9641,
129... | 1.834146 | 820 |
import os
os.environ["KMP_DUPLICATE_LIB_OK"]="TRUE"
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'Mock.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
#
# WARNING! All changes made in this file will be lost!
import sys
import subprocess
import application_backend as ab
from PyQt5 im... | [
11748,
28686,
198,
418,
13,
268,
2268,
14692,
42,
7378,
62,
35,
52,
31484,
6158,
62,
40347,
62,
11380,
8973,
2625,
5446,
8924,
1,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
5178,
7822,
7560,
422,
... | 2.714286 | 147 |
from locust import HttpUser, task, between
import re
import random
import json
import os
if __name__ == "__main__":
from locust.env import Environment
my_env = Environment(user_classes=[OdooUserCrmKanban])
OdooUserCrmKanban(my_env).run()
| [
6738,
1179,
436,
1330,
367,
29281,
12982,
11,
4876,
11,
1022,
198,
11748,
302,
198,
11748,
4738,
198,
11748,
33918,
198,
11748,
28686,
628,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
42... | 2.771739 | 92 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Jun 13 18:03:27 2017
@author: paul
"""
from SimulatorTLKT import Boat
from SimulatorTLKT import FIT_VELOCITY
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
from math import pi
matplotlib.rcParams.update({'font.size': 22})
pOfS=... | [
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,
30030,
7653,
1511,
1248,
25,
3070,
25,
1983,
2177,
198,
198,
31,
9800,
25,
279,
2518,
198... | 2.225118 | 422 |
from pprint import pformat
ds_obj_mcx_note = ('The MCX data returned back from \'dscl\' is a string nested in the attribute queried.\n'
'Settings can be filtered by using key filters.\n'
'Multiple values can be filtered for specific domains by comma seperating the values\n'
... | [
6738,
279,
4798,
1330,
279,
18982,
198,
198,
9310,
62,
26801,
62,
23209,
87,
62,
11295,
796,
19203,
464,
13122,
55,
1366,
4504,
736,
422,
34373,
9310,
565,
43054,
318,
257,
4731,
28376,
287,
262,
11688,
42517,
798,
13,
59,
77,
6,
19... | 1.615935 | 2,096 |
# DESCRIPTION
# Run dns check and store the results in the db
# monitor_source = host address
# DEPENDENCIES
# Install python
# Install mysql.connector "python -m pip install mysql-connector-python"
# Install dotenv "python -m pip install python-dotenv"
# Install nslookup "python -m pip install nslookup"
# HOW TO RUN... | [
2,
22196,
40165,
198,
2,
5660,
288,
5907,
2198,
290,
3650,
262,
2482,
287,
262,
20613,
198,
2,
5671,
62,
10459,
796,
2583,
2209,
198,
198,
2,
5550,
47,
10619,
24181,
11015,
198,
2,
15545,
21015,
198,
2,
15545,
48761,
13,
8443,
273,
... | 2.543162 | 1,031 |
import torch
import cv2
#data dir with train i validation picture
data_dir = '/home/pawel/Pulpit/picture_data'
#source video stream
camera_source = '/dev/video2'
#flag, false, not used
save = False
#input picture size (px)
input_size = (224,224)
size_pict = input_size[0]
#part of the data from the database intended f... | [
11748,
28034,
198,
11748,
269,
85,
17,
198,
198,
2,
7890,
26672,
351,
4512,
1312,
21201,
4286,
198,
7890,
62,
15908,
796,
31051,
11195,
14,
79,
707,
417,
14,
47,
377,
15544,
14,
34053,
62,
7890,
6,
198,
2,
10459,
2008,
4269,
198,
... | 2.996241 | 266 |
from .classifier import SpatialClassifier
| [
6738,
764,
4871,
7483,
1330,
1338,
34961,
9487,
7483,
628
] | 4.3 | 10 |
from datetime import datetime, timedelta
import requests
import pandas as pd
cleaner_data(get_data())
| [
6738,
4818,
8079,
1330,
4818,
8079,
11,
28805,
12514,
198,
11748,
7007,
198,
11748,
19798,
292,
355,
279,
67,
628,
628,
198,
27773,
263,
62,
7890,
7,
1136,
62,
7890,
28955,
198
] | 3.3125 | 32 |
#%%
# import libraries
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from datetime import datetime
import os
import time
%matplotlib inline
#%%
import pymysql
#%%
def colon_time(time_elements): # make time format as hh:mm:ss.ms
'''
PARAMETER => ['hh', 'mm', 'ss', 'ms']
'''
if... | [
2,
16626,
198,
2,
1330,
12782,
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,
6738,
4818,
8079,
1330,
4818,
8079,
198,
11748,
28686,
198,
11... | 2.071301 | 2,791 |
from pyconcepticon import Concepticon
from pynorare.dataset import get_dataset_cls
| [
6738,
12972,
43169,
4749,
1330,
26097,
4749,
198,
198,
6738,
279,
2047,
273,
533,
13,
19608,
292,
316,
1330,
651,
62,
19608,
292,
316,
62,
565,
82,
628,
198
] | 2.965517 | 29 |
# Copyright 2012 Jonathan Paugh
# See COPYING for license details
'''
Functions that deal with lang files or rulesets
'''
import ds
import comp as cpl
from .options import opt
from .util import fwarn, do_re, gettype
import os
langdir = os.path.join(os.path.dirname(__file__), 'lang')
if not os.path.isdir(langdir):
... | [
2,
15069,
2321,
11232,
350,
1567,
198,
2,
4091,
27975,
45761,
329,
5964,
3307,
198,
7061,
6,
198,
24629,
2733,
326,
1730,
351,
42392,
3696,
393,
3173,
1039,
198,
7061,
6,
198,
198,
11748,
288,
82,
198,
11748,
552,
355,
269,
489,
198... | 2.752995 | 1,085 |
n,m=map(int,input().split())
mid=n//2
if n==1 and m==1:
print("1")
elif mid<m:
print(m-1)
else:
print(m+1) | [
77,
11,
76,
28,
8899,
7,
600,
11,
15414,
22446,
35312,
28955,
198,
13602,
28,
77,
1003,
17,
198,
361,
299,
855,
16,
290,
285,
855,
16,
25,
198,
220,
220,
220,
3601,
7203,
16,
4943,
198,
417,
361,
3095,
27,
76,
25,
198,
220,
22... | 1.787879 | 66 |
#!/usr/bin/env python
#coding:utf-8
from toughlib import config as iconfig
import os
import requests | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
66,
7656,
25,
40477,
12,
23,
198,
6738,
5802,
8019,
1330,
4566,
355,
7196,
5647,
198,
11748,
28686,
198,
11748,
7007
] | 3.225806 | 31 |
from game.data.components.TestComponent import * | [
6738,
983,
13,
7890,
13,
5589,
3906,
13,
14402,
21950,
1330,
1635
] | 4 | 12 |
from .challenges import Challenge
from .solvers import Solver
from .agents import random_agent
from .exceptions import *
| [
6738,
764,
36747,
34120,
1330,
13879,
198,
6738,
764,
34453,
690,
1330,
4294,
332,
198,
6738,
764,
49638,
1330,
4738,
62,
25781,
198,
6738,
764,
1069,
11755,
1330,
1635,
198
] | 4.033333 | 30 |
# recovery (and error) vs noise for all algorithms
# recovery (and error) vs condB for all algorithms
# recovery vs (k,d) for all algorithms (heatmap)
# todo: also condD?
# Questions:
# - test two distributions for X: Gaussian, and decreasing
# - to choose lambda(s), we fix according to average best one from a set o... | [
2,
7628,
357,
392,
4049,
8,
3691,
7838,
329,
477,
16113,
198,
2,
7628,
357,
392,
4049,
8,
3691,
1779,
33,
329,
477,
16113,
198,
2,
7628,
3691,
357,
74,
11,
67,
8,
329,
477,
16113,
357,
25080,
8899,
8,
198,
198,
2,
284,
4598,
2... | 2.082583 | 5,219 |
from . import bb
| [
6738,
764,
1330,
275,
65,
198
] | 2.833333 | 6 |
import click
import pytest
from click.testing import CliRunner
def wrap_runner_func(runner, func):
return invoke
| [
11748,
3904,
198,
11748,
12972,
9288,
198,
6738,
3904,
13,
33407,
1330,
1012,
72,
49493,
628,
628,
198,
4299,
14441,
62,
16737,
62,
20786,
7,
16737,
11,
25439,
2599,
628,
220,
220,
220,
1441,
26342,
628,
628,
198
] | 3.315789 | 38 |
#!/usr/bin/env python3 -u
# -*- coding: utf-8 -*-
"""Tests for hierarchical aggregator."""
# copyright: sktime developers, BSD-3-Clause License (see LICENSE file)
__author__ = ["ciaran-g"]
import pytest
from sktime.transformations.hierarchical.aggregate import Aggregator
from sktime.utils._testing.hierarchical impor... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
532,
84,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
51,
3558,
329,
38958,
13262,
1352,
526,
15931,
198,
2,
6634,
25,
1341,
2435,
6505,
11,
347,
10305... | 2.743396 | 530 |
from flask.testing import FlaskClient
from doni.tests.unit import utils
| [
6738,
42903,
13,
33407,
1330,
46947,
11792,
198,
198,
6738,
836,
72,
13,
41989,
13,
20850,
1330,
3384,
4487,
628
] | 3.7 | 20 |
"""
serializers
Created by: Martin Sicho
On: 27-01-20, 17:00
"""
from rest_framework import serializers
from genui.utils.serializers import GenericModelSerializerMixIn
from genui.compounds.serializers import MolSetSerializer
from genui.projects.serializers import ProjectSerializer
from . import models
| [
37811,
198,
46911,
11341,
198,
198,
41972,
416,
25,
5780,
311,
38720,
198,
2202,
25,
2681,
12,
486,
12,
1238,
11,
1596,
25,
405,
198,
37811,
198,
6738,
1334,
62,
30604,
1330,
11389,
11341,
198,
198,
6738,
2429,
9019,
13,
26791,
13,
... | 3.569767 | 86 |
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import create_engine
from datetime import datetime, timedelta
from sqlalchemy import Table, Column, Integer, String, Date, ForeignKey, Boolean
from sqlalchemy.orm import relationship, backref
from sqlalchemy.orm import sessionmaker
from re import s... | [
6738,
44161,
282,
26599,
13,
2302,
13,
32446,
283,
876,
1330,
2377,
283,
876,
62,
8692,
198,
6738,
44161,
282,
26599,
1330,
2251,
62,
18392,
198,
6738,
4818,
8079,
1330,
4818,
8079,
11,
28805,
12514,
198,
6738,
44161,
282,
26599,
1330,
... | 2.202046 | 782 |
#!/usr/bin/python3
import math
test = Solution
triangle_arr = [0]
temp, box, curr_num = 0, 0, 0
for i in range(1, 1001):
while temp <= i:
box += 1
curr_num = (box * (box + 1)) / 2
temp = test.number_of_factor(curr_num)
triangle_arr.append(curr_num)
print(curr_num)
# number_test ... | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
11748,
10688,
628,
198,
198,
9288,
796,
28186,
198,
28461,
9248,
62,
3258,
796,
685,
15,
60,
198,
29510,
11,
3091,
11,
1090,
81,
62,
22510,
796,
657,
11,
657,
11,
657,
198,
198,
1640,... | 2.201794 | 223 |
import numpy as np
import pylab as plt
from scipy.integrate import simps
def plot_1d(
samples,
pois,
truth=None,
bins=100,
figsize=(15, 10),
color="k",
labels=None,
label_args={},
ncol=None,
subplots_kwargs={},
fig=None,
contours=True,
) -> None:
"""Make beautifu... | [
11748,
299,
32152,
355,
45941,
198,
11748,
279,
2645,
397,
355,
458,
83,
198,
6738,
629,
541,
88,
13,
18908,
4873,
1330,
985,
862,
628,
628,
198,
198,
4299,
7110,
62,
16,
67,
7,
198,
220,
220,
220,
8405,
11,
198,
220,
220,
220,
... | 1.830804 | 2,636 |
import os
from tabulate import tabulate
import requests
iniciar()
| [
11748,
28686,
198,
6738,
7400,
5039,
1330,
7400,
5039,
198,
11748,
7007,
628,
628,
628,
628,
198,
47277,
12571,
3419,
198
] | 3.52381 | 21 |
"""Depth-first traversing of a binary tree.
Call a function _f on every node of binary tree _bt, in depth-first infix order
Source: programming-idioms.org
"""
# Implementation author: TinyFawks
# Created on 2016-02-18T08:50:27.130406Z
# Last modified on 2016-02-18T09:16:52.625429Z
# Version 2
# Recursive DFS.
| [
37811,
48791,
12,
11085,
33038,
278,
286,
257,
13934,
5509,
13,
198,
198,
14134,
257,
2163,
4808,
69,
319,
790,
10139,
286,
13934,
5509,
4808,
18347,
11,
287,
6795,
12,
11085,
1167,
844,
1502,
198,
198,
7416,
25,
8300,
12,
19830,
3150... | 2.953271 | 107 |
# -*- coding: utf-8 -*-
from .equipment import lt_equipment
from .spell import lt_spell_lxy, lt_spell_zle, lt_spell_lyr, lt_spell_an
from .monster import lt_monster
from .zone import lt_zone
doc_data = dict(
lt_equipment=lt_equipment,
lt_spell_lxy=lt_spell_lxy,
lt_spell_zle=lt_spell_zle,
lt_spell_lyr=... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
764,
4853,
4667,
1330,
300,
83,
62,
4853,
4667,
198,
6738,
764,
46143,
1330,
300,
83,
62,
46143,
62,
75,
5431,
11,
300,
83,
62,
46143,
62,
89,
293,
11,
... | 2.029557 | 203 |
import matplotlib.pyplot as plt
import numpy.ma as ma
import numpy as np
import pyart.graph
import tempfile
import pyart.io
import boto
s3conn = boto.connect_s3("AKIAISFFH4JXWC2HYFSA","9Az+XWYP9cbL3Sh641z/tbMuC1CSpjPjQTFkHj8D")
bucket = s3conn.get_bucket('noaa-nexrad-level2')
s3key = bucket.get_key('2015/05/... | [
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
201,
198,
11748,
299,
32152,
13,
2611,
355,
17266,
201,
198,
11748,
299,
32152,
355,
45941,
201,
198,
11748,
12972,
433,
13,
34960,
201,
198,
11748,
20218,
7753,
201,
198,
11748,
... | 2.27646 | 1,096 |
import unittest
import requests
import json
import pytest
BASE_URL = "https://api.serverest.dev"
| [
11748,
555,
715,
395,
198,
11748,
7007,
198,
11748,
33918,
198,
11748,
12972,
9288,
198,
198,
33,
11159,
62,
21886,
796,
366,
5450,
1378,
15042,
13,
2655,
303,
2118,
13,
7959,
1,
628,
198
] | 2.941176 | 34 |
# Generated by Django 2.1.5 on 2022-03-21 19:27
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
362,
13,
16,
13,
20,
319,
33160,
12,
3070,
12,
2481,
678,
25,
1983,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
# -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-11-24 13:57
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,
24,
13,
16,
319,
1584,
12,
1157,
12,
1731,
1511,
25,
3553,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
1... | 2.719298 | 57 |
# -*- coding: utf-8 -*-
"""02-ppo.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1GXTVkhpJyQQsUWn6tGQAWPmstw9adAzj
# PPO for transformer models
> A Pytorch implementation of Proximal Policy Optimization for transfomer models.
This follows the l... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
2999,
12,
16634,
13,
541,
2047,
65,
198,
198,
38062,
4142,
7560,
416,
1623,
4820,
2870,
13,
198,
198,
20556,
2393,
318,
5140,
379,
198,
220,
220,
220,
3740,
137... | 3.189864 | 1,322 |
"""Rock Paper Scisssors game using OOP"""
import random
from tempfile import mkstemp
from shutil import move, copymode
from os import fdopen, remove
#If rating.txt does not exist, it get's created here
fill = open("rating.txt", "a", encoding="utf-8")
fill.close()
#creating instance of the RockPa... | [
37811,
19665,
14962,
1446,
747,
82,
669,
983,
1262,
440,
3185,
37811,
201,
198,
201,
198,
11748,
4738,
201,
198,
6738,
20218,
7753,
1330,
33480,
927,
79,
201,
198,
6738,
4423,
346,
1330,
1445,
11,
4866,
14171,
201,
198,
6738,
28686,
1... | 2.763889 | 144 |
from faker import Faker
from ..models import Client, UserProfile
from django.contrib.auth import get_user_model
from factory import django, SubFactory, fuzzy, Sequence, LazyAttribute
fake = Faker()
User = get_user_model()
| [
6738,
277,
3110,
1330,
376,
3110,
198,
6738,
11485,
27530,
1330,
20985,
11,
11787,
37046,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
1330,
651,
62,
7220,
62,
19849,
198,
6738,
8860,
1330,
42625,
14208,
11,
3834,
22810,
11,
34669... | 3.492308 | 65 |
"""Tests for Devcon."""
| [
37811,
51,
3558,
329,
6245,
1102,
526,
15931,
198
] | 2.666667 | 9 |
a = input()
i = 0
while i != len(a):
if a[i] in a[i+1:]:
break
print(str(i == len(a)).lower())
| [
64,
796,
5128,
3419,
198,
72,
796,
657,
198,
4514,
1312,
14512,
18896,
7,
64,
2599,
198,
197,
361,
257,
58,
72,
60,
287,
257,
58,
72,
10,
16,
25,
5974,
198,
197,
197,
9032,
198,
4798,
7,
2536,
7,
72,
6624,
18896,
7,
64,
29720,... | 2 | 49 |
# -*- coding: utf-8 -*-
# *******************************************************
# Copyright (c) VMware, Inc. 2020-2021. All Rights Reserved.
# SPDX-License-Identifier: MIT
# *******************************************************
# *
# * DISCLAIMER. THIS PROGRAM IS PROVIDED TO YOU "AS IS" WITHOUT
# * WARRANTIES OR C... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
41906,
8412,
2466,
8162,
198,
2,
15069,
357,
66,
8,
37754,
11,
3457,
13,
12131,
12,
1238,
2481,
13,
1439,
6923,
33876,
13,
198,
2,
30628,
55,
12,
34156,
12,
... | 2.252202 | 1,249 |
from elasticsearch import Elasticsearch
from flask import request, jsonify
from flask_restful import Resource
from db.manager import get_conn
import settings
conn = get_conn()
| [
6738,
27468,
12947,
1330,
48567,
12947,
198,
6738,
42903,
1330,
2581,
11,
33918,
1958,
198,
6738,
42903,
62,
2118,
913,
1330,
20857,
198,
198,
6738,
20613,
13,
37153,
1330,
651,
62,
37043,
198,
11748,
6460,
198,
198,
37043,
796,
651,
62... | 4 | 45 |
import sys
import unittest
from contextlib import contextmanager
try:
from io import StringIO
except ImportError:
from StringIO import StringIO
from vpk import cli
| [
11748,
25064,
198,
11748,
555,
715,
395,
198,
6738,
4732,
8019,
1330,
4732,
37153,
198,
198,
28311,
25,
198,
220,
220,
220,
422,
33245,
1330,
10903,
9399,
198,
16341,
17267,
12331,
25,
198,
220,
220,
220,
422,
10903,
9399,
1330,
10903,
... | 3.320755 | 53 |
from _LogLikelihood import LogLikelihood
from _LogPrior import LogPrior
#from _ScaleDependentLogLikelihoodGaussian import ScaleDependentLogLikelihoodGaussian
from _ScaleDependentLogPrior import ScaleDependentLogPrior
| [
6738,
4808,
11187,
7594,
11935,
1330,
5972,
7594,
11935,
198,
6738,
4808,
11187,
22442,
1330,
5972,
22442,
198,
2,
6738,
4808,
29990,
35,
8682,
11187,
7594,
11935,
35389,
31562,
1330,
21589,
35,
8682,
11187,
7594,
11935,
35389,
31562,
198,
... | 4.113208 | 53 |
# To pass env vars to Python scripts run by Publik in services which remove custom env vars:
# https://unix.stackexchange.com/questions/44370/how-to-make-unix-service-see-environment-variables
# So we hardcode the values in the file below when the container starts
import sys
sys.path.insert(0, "/home")
from pyenv impor... | [
2,
1675,
1208,
17365,
410,
945,
284,
11361,
14750,
1057,
416,
8525,
46965,
287,
2594,
543,
4781,
2183,
17365,
410,
945,
25,
198,
2,
3740,
1378,
403,
844,
13,
301,
330,
365,
87,
3803,
13,
785,
14,
6138,
507,
14,
2598,
20167,
14,
49... | 2.296104 | 770 |
import numpy
from torch.utils.data import DataLoader
from tqdm import tqdm
from loss.FocalLoss import FocalLossForSigmoid
import torch
from metrics.calculate_metrics import calculate_metrics
import shutil
from metrics.average_meter import AverageMeter
import torch.multiprocessing
from torch.nn.utils.clip_gra... | [
11748,
299,
32152,
201,
198,
6738,
28034,
13,
26791,
13,
7890,
1330,
6060,
17401,
201,
198,
201,
198,
6738,
256,
80,
36020,
1330,
256,
80,
36020,
201,
198,
6738,
2994,
13,
37,
4374,
43,
793,
1330,
376,
4374,
43,
793,
1890,
50,
17225... | 2.984848 | 198 |
import os
from PIL import Image
import numpy
from PIL import ImageChops
""" TESTED:
No duplicates in:
- within validation images first part (stopped because of training - took to much time)
"""
image_path="../../IR_images/combined_dataset/val_images/images"
# image_path="../../IR_images/combined_data... | [
198,
11748,
28686,
198,
6738,
350,
4146,
1330,
7412,
198,
11748,
299,
32152,
198,
198,
6738,
350,
4146,
1330,
7412,
1925,
2840,
198,
198,
37811,
43001,
1961,
25,
628,
220,
220,
220,
1400,
14184,
16856,
287,
25,
198,
220,
220,
220,
220... | 2.271868 | 423 |
import os, glob
from dateutil import parser
from bs4 import BeautifulSoup
ext = lambda line, cap: line.replace("\s", "").replace(cap, "").strip()
#------------------------------
# Main
#------------------------------
if __name__ == "__main__":
posts = 0
doc = []
for idx, line in enumerate(open("raw.txt... | [
11748,
28686,
11,
15095,
198,
6738,
3128,
22602,
1330,
30751,
198,
6738,
275,
82,
19,
1330,
23762,
50,
10486,
198,
198,
2302,
796,
37456,
1627,
11,
1451,
25,
1627,
13,
33491,
7203,
59,
82,
1600,
366,
11074,
33491,
7,
11128,
11,
366,
... | 2.603604 | 222 |
import numpy as np
from .layer import Layer | [
11748,
299,
32152,
355,
45941,
198,
6738,
764,
29289,
1330,
34398
] | 3.909091 | 11 |
# Functions for use in downloading files.
import logging, os, requests, json, hashlib, urllib
from requests_toolbelt.utils import dump
from retry import retry
logger = logging.getLogger(__name__)
| [
2,
40480,
329,
779,
287,
22023,
3696,
13,
198,
198,
11748,
18931,
11,
28686,
11,
7007,
11,
33918,
11,
12234,
8019,
11,
2956,
297,
571,
198,
6738,
7007,
62,
25981,
37976,
13,
26791,
1330,
10285,
198,
6738,
1005,
563,
1330,
1005,
563,
... | 3.40678 | 59 |
# coding: utf-8
import re
import datetime
from .feed import read_file
__author__ = "Rafa Karo <rafalkaron@gmail.com>"
def clipps_str_to_html_str(clipps_str):
"""Return a string that contains the converted \"Kindle Clippings.txt file\" to HTML."""
# ADD ELEMENTS (SVG favicon encoded with: https://yoksel.github... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
11748,
302,
198,
11748,
4818,
8079,
198,
6738,
764,
12363,
1330,
1100,
62,
7753,
198,
198,
834,
9800,
834,
796,
366,
49,
28485,
9375,
78,
1279,
32188,
971,
8045,
31,
14816,
13,
785,
24618,
198,
... | 2.303589 | 4,012 |
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
#from Domain import Domain
from future import standard_library
standard_library.install_aliases()
from .HelicopterHover import HelicopterHover, HelicopterHoverExtended
fro... | [
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
6738,
11593,
37443,
834,
1330,
7297,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
2,
6738,
20021,
1330,
20... | 2.874725 | 455 |
from construct import Adapter, Int32ub, Enum
| [
6738,
5678,
1330,
43721,
11,
2558,
2624,
549,
11,
2039,
388,
628
] | 3.833333 | 12 |
import vagrant
import os
from subprocess import CalledProcessError
from strider.common.instance_data import InstanceData, SshData
import strider.common.logger
| [
11748,
14334,
5250,
198,
11748,
28686,
198,
6738,
850,
14681,
1330,
34099,
18709,
12331,
198,
6738,
965,
1304,
13,
11321,
13,
39098,
62,
7890,
1330,
2262,
590,
6601,
11,
311,
1477,
6601,
198,
11748,
965,
1304,
13,
11321,
13,
6404,
1362,... | 3.809524 | 42 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
The Academy / ASC Common LUT Format Sample Implementations are provided by the
Academy under the following terms and conditions:
Copyright 2015 Academy of Motion Picture Arts and Sciences ("A.M.P.A.S.").
Portions contributed by others as indicated. All rights reserve... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
198,
464,
8581,
1220,
25400,
8070,
406,
3843,
18980,
27565,
48282,
602,
389,
2810,
416,
262,
198,
12832,
32... | 2.80355 | 1,690 |
##
# This software was developed and / or modified by Raytheon Company,
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
#
# U.S. EXPORT CONTROLLED TECHNICAL DATA
# This software product contains export-restricted data whose
# export/transfer/disclosure is restricted by U.S. law. Dissemination
# to non... | [
2235,
198,
2,
770,
3788,
373,
4166,
290,
1220,
393,
9518,
416,
7760,
1169,
261,
5834,
11,
198,
2,
12997,
284,
17453,
46133,
16945,
54,
12,
2713,
12,
34,
48,
12,
940,
3134,
351,
262,
1294,
5070,
13,
198,
2,
220,
198,
2,
471,
13,
... | 3.139881 | 336 |
from setuptools import setup, find_packages
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name="hubmap-sdk",
version="1.0.1",
author="Hubmap",
author_email="api-developers@hubmapconsortium.org",
description="Python Client Libary to use HuBMAP web services",
long_de... | [
6738,
900,
37623,
10141,
1330,
9058,
11,
1064,
62,
43789,
198,
198,
4480,
1280,
7203,
15675,
11682,
13,
9132,
1600,
366,
81,
4943,
355,
277,
71,
25,
198,
220,
220,
220,
890,
62,
11213,
796,
277,
71,
13,
961,
3419,
198,
198,
40406,
... | 2.244898 | 392 |