content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
# ------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
# -------------------------------------------------------------------... | [
2,
220,
16529,
22369,
438,
198,
2,
220,
15069,
357,
66,
8,
5413,
10501,
13,
1439,
2489,
10395,
13,
198,
2,
220,
49962,
739,
262,
17168,
13789,
357,
36393,
737,
4091,
38559,
24290,
287,
262,
29924,
6808,
329,
5964,
1321,
13,
198,
2,
... | 2.707134 | 1,598 |
import time
from threading import Thread
from srunner.scenariomanager.carla_data_provider import CarlaDataProvider
import scene_layout as scene_layout_parser # This should come from CARLA path
class ObjectFinder(object):
"""
Pseudo sensor that gives you the position of all the other dynamic objects and... | [
198,
11748,
640,
198,
198,
6738,
4704,
278,
1330,
14122,
198,
6738,
264,
16737,
13,
1416,
268,
2743,
5185,
3536,
13,
7718,
5031,
62,
7890,
62,
15234,
1304,
1330,
1879,
5031,
6601,
29495,
198,
11748,
3715,
62,
39786,
355,
3715,
62,
397... | 2.775744 | 437 |
#!/usr/bin/env python3
# coding: utf-8
import numpy as np
class VertWellMaker(object):
"""
vertical well bound points and segments maker
"""
def make(self, well, nw):
"""
"""
x = well.track[0].x
y = well.track[0].y
rw = well.radius
pts, seg = self.__ci... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
11748,
299,
32152,
355,
45941,
628,
198,
4871,
24417,
5779,
48890,
7,
15252,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
11723,... | 2.054945 | 182 |
# File containing helper functions for computing similarity and clustering PDB active sites
import numpy as np
import random
import matplotlib.pyplot as plt
def output_aa_string(residues):
"""
Convert 3 letter amino acid code to single letter amino acids
Input: list of residues in three letter codes
... | [
2,
9220,
7268,
31904,
5499,
329,
14492,
26789,
290,
32966,
1586,
350,
11012,
4075,
5043,
198,
198,
11748,
299,
32152,
355,
45941,
220,
198,
11748,
4738,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
198,
4299,
5072,... | 2.330855 | 1,883 |
# -*- coding: utf-8 -*-
#
# This file is part of REANA.
# Copyright (C) 2020, 2021 CERN.
#
# REANA is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Pytest configuration for REANA-DB."""
from datetime import datetime, timedelta
from... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
198,
2,
770,
2393,
318,
636,
286,
4526,
31574,
13,
198,
2,
15069,
357,
34,
8,
12131,
11,
33448,
327,
28778,
13,
198,
2,
198,
2,
4526,
31574,
318,
1479,
3788,
26... | 2.344114 | 773 |
import os
import re
from shutil import copyfile, rmtree
import src.ffmpeg_helper as ffmpeg
from src.__MACRO__ import LOG, INFO, ERROR
from src.video_inference import process_frames, open_session
def frames_name_comparer(name):
'''Compares two filenames and returns a tuple indicating
their correct relative orde... | [
11748,
28686,
198,
11748,
302,
198,
6738,
4423,
346,
1330,
4866,
7753,
11,
374,
16762,
631,
198,
11748,
12351,
13,
487,
43913,
62,
2978,
525,
355,
31246,
43913,
198,
6738,
12351,
13,
834,
44721,
13252,
834,
1330,
41605,
11,
24890,
11,
... | 2.439616 | 2,186 |
"""
Crafting - Griatch 2020
This is a general crafting engine. The basic functionality of crafting is to
combine any number of of items or tools in a 'recipe' to produce a new result.
item + item + item + tool + tool -> recipe -> new result
This is useful not only for traditional crafting but the engine is flex... | [
37811,
198,
14467,
278,
532,
20914,
963,
12131,
198,
198,
1212,
318,
257,
2276,
21671,
3113,
13,
383,
4096,
11244,
286,
21671,
318,
284,
198,
24011,
500,
597,
1271,
286,
286,
3709,
393,
4899,
287,
257,
705,
29102,
431,
6,
284,
4439,
... | 2.490637 | 15,967 |
from random import randint, random
scss_files = ["purple.css"]
| [
6738,
4738,
1330,
43720,
600,
11,
4738,
198,
198,
1416,
824,
62,
16624,
796,
14631,
14225,
1154,
13,
25471,
8973,
628
] | 3.095238 | 21 |
import torch
from torchvision import datasets,transforms
import numpy as np
from torch.utils.data.sampler import SubsetRandomSampler
def get_test_loader_cifar(
batch_size,
dataset="cifar10",
output_height = 32,
output_width = 32,
... | [
11748,
28034,
198,
6738,
28034,
10178,
1330,
40522,
11,
7645,
23914,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
28034,
13,
26791,
13,
7890,
13,
37687,
20053,
1330,
3834,
2617,
29531,
16305,
20053,
628,
198,
198,
4299,
651,
62,
9288,
... | 2.212831 | 982 |
from flask import current_app, request, abort, jsonify
from datetime import datetime
from . import forecast as forecast_
from .autocomplete import autocomplete as autocomplete_
@current_app.route('/forecast')
@current_app.route('/autocomplete') | [
6738,
42903,
1330,
1459,
62,
1324,
11,
2581,
11,
15614,
11,
33918,
1958,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
764,
1330,
11092,
355,
11092,
62,
198,
6738,
764,
2306,
42829,
6677,
1330,
1960,
42829,
6677,
355,
1960,
42829,... | 3.514286 | 70 |
#!/usr/bin/env python2
"""
This module includes the out-of-process support code for codeintel2
Reference: http://bugs.activestate.com/show_bug.cgi?id=93455
"""
from .driver import Driver
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
17,
198,
198,
37811,
198,
1212,
8265,
3407,
262,
503,
12,
1659,
12,
14681,
1104,
2438,
329,
2438,
48779,
17,
198,
198,
26687,
25,
2638,
1378,
32965,
13,
15791,
44146,
13,
785,
14,
12860,
... | 3.114754 | 61 |
from __future__ import print_function
import numpy as np
class ClassifierTrainer(object):
""" The trainer class performs SGD with momentum on a cost function """
def train(self, X, y,
model, learning_rate_decay=0.95, sample_batches=True,
num_epochs=30, batch_size=100, acc_frequenc... | [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
11748,
299,
32152,
355,
45941,
628,
198,
4871,
5016,
7483,
2898,
10613,
7,
15252,
2599,
198,
220,
220,
220,
37227,
383,
21997,
1398,
17706,
26147,
35,
351,
12858,
319,
257,
1575,
2163,... | 2.1546 | 1,837 |
"""
Basic and Monitor-Curve Exponent Transfer Functions
===================================================
Defines the exponent transfer functions:
- :func:`colour.models.exponent_function_basic`
- :func:`colour.models.exponent_function_monitor_curve`
References
----------
- :cite: `TheAcademyofMotionPictureA... | [
37811,
198,
26416,
290,
18289,
12,
26628,
303,
5518,
3471,
20558,
40480,
198,
10052,
4770,
18604,
198,
198,
7469,
1127,
262,
28622,
4351,
5499,
25,
198,
198,
12,
220,
220,
1058,
20786,
25,
63,
49903,
13,
27530,
13,
11201,
3471,
62,
88... | 2.349466 | 4,773 |
import unittest
import logging
import redique, time
import threading
logging.basicConfig(level=logging.DEBUG) | [
11748,
555,
715,
395,
198,
11748,
18931,
198,
11748,
2266,
2350,
11,
640,
198,
11748,
4704,
278,
198,
6404,
2667,
13,
35487,
16934,
7,
5715,
28,
6404,
2667,
13,
30531,
8
] | 3.516129 | 31 |
from typing import Union
class SnowflakeID(int):
"""
Represents a Discord Snowflake ID.
"""
pass
MIdentifier = Union[SnowflakeID, str]
| [
6738,
19720,
1330,
4479,
628,
198,
4871,
7967,
47597,
2389,
7,
600,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1432,
6629,
257,
39462,
7967,
47597,
4522,
13,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1208,
628,
198,
4... | 2.818182 | 55 |
#progetto eseguito da Leonardo Fiore(322767) e Federico Putamorsi(320041)
import g2d
from x7_BubbleBobbleGame import BubbleBobbleGame
gui = BubbleBobbleGUI() | [
2,
1676,
1136,
1462,
1658,
1533,
5013,
78,
12379,
38083,
23238,
382,
7,
18,
24403,
3134,
8,
304,
35089,
3713,
5930,
321,
35255,
7,
18,
2167,
3901,
8,
198,
198,
11748,
308,
17,
67,
198,
6738,
2124,
22,
62,
33,
549,
903,
18861,
903,... | 2.639344 | 61 |
import math
import numpy as np
from numba import cuda
from numba.types import float32
from replay_trajectory_classification.bins import atleast_2d
# Precompute this constant as a float32. Numba will inline it at compile time.
SQRT_2PI = np.float32((2 * math.pi)**0.5)
EPS = np.finfo(np.float32).eps
@cuda.jit(device... | [
11748,
10688,
198,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
997,
7012,
1330,
269,
15339,
198,
6738,
997,
7012,
13,
19199,
1330,
12178,
2624,
198,
6738,
24788,
62,
9535,
752,
652,
62,
4871,
2649,
13,
65,
1040,
1330,
379,
293,
459... | 1.987469 | 5,985 |
import pandas as pd
import numpy as np
from sklearn.ensemble import GradientBoostingRegressor
from sklearn.metrics import r2_score
import pickle
def train_model(
xtrain_df, ytrain_df, xtest_df, ytest_df, num_params=500, max_dp=6,
min_samp_splt=2, lrn_rt=0.01, losss='ls', feat_filename=None
):
"""
This... | [
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
1341,
35720,
13,
1072,
11306,
1330,
17701,
1153,
45686,
278,
8081,
44292,
198,
6738,
1341,
35720,
13,
4164,
10466,
1330,
374,
17,
62,
26675,
198,
11748,
229... | 2.631579 | 1,083 |
import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README.txt')) as f:
README = f.read()
setup(name='f5_aws',
version='1.0.5',
description='Code to deploy BIG-IP, network, and applications in AWS VPC',
long_descr... | [
11748,
28686,
198,
198,
6738,
900,
37623,
10141,
1330,
9058,
11,
1064,
62,
43789,
198,
198,
1456,
796,
28686,
13,
6978,
13,
397,
2777,
776,
7,
418,
13,
6978,
13,
15908,
3672,
7,
834,
7753,
834,
4008,
198,
4480,
1280,
7,
418,
13,
6... | 2.368613 | 274 |
from typing import Optional, Dict, Text, Any, List, Union
from rasa.core.channels import OutputChannel, UserMessage
from kairon import Utility
from kairon.chat.agent_processor import AgentProcessor
from kairon.chat.handlers.channels.clients.whatsapp import WhatsappClient
from kairon.chat.handlers.channels.messenger i... | [
6738,
19720,
1330,
32233,
11,
360,
713,
11,
8255,
11,
4377,
11,
7343,
11,
4479,
198,
198,
6738,
374,
15462,
13,
7295,
13,
354,
8961,
1330,
25235,
29239,
11,
11787,
12837,
198,
198,
6738,
479,
958,
261,
1330,
34030,
198,
6738,
479,
9... | 2.607653 | 1,751 |
import copy
import json
from decimal import Decimal
from typing import Optional
from enum import Enum
import boto3
from boto3.dynamodb.types import TypeSerializer, TypeDeserializer
from botocore import exceptions
| [
11748,
4866,
198,
11748,
33918,
198,
6738,
32465,
1330,
4280,
4402,
198,
6738,
19720,
1330,
32233,
198,
6738,
33829,
1330,
2039,
388,
198,
198,
11748,
275,
2069,
18,
198,
6738,
275,
2069,
18,
13,
67,
4989,
375,
65,
13,
19199,
1330,
59... | 3.666667 | 60 |
# -*- coding: utf-8 -*-
"""
Script to run zope.testrunner in a gevent monkey-patched environment.
Using ``python -m gevent.monkey zope-testrunner ...`` is insufficient.
This is because up through 1.5a2 there is a serious bug in the way the
monkey-patcher patches the spawned process. The net effect is that the gevent
... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
7391,
284,
1057,
1976,
3008,
13,
9288,
16737,
287,
257,
4903,
1151,
21657,
12,
8071,
1740,
2858,
13,
198,
198,
12814,
7559,
29412,
532,
76,
4903,
1151,
13,
... | 2.975904 | 249 |
_base_ = [
'../_base_/models/mask_rcnn_r50_fpn_HULA_compartment.py',
'../_base_/datasets/HULA_compartment_instance.py',
'../_base_/schedules/schedule_1x_HULA_maskrcnn.py',
'../_base_/default_runtime.py'
]
work_dir = "/data/syed/mmdet/run15_maskrcnn_customaug/"
gpu_ids = range(0, 1)
seed = 0
| [
62,
8692,
62,
796,
685,
198,
220,
220,
220,
705,
40720,
62,
8692,
62,
14,
27530,
14,
27932,
62,
6015,
20471,
62,
81,
1120,
62,
69,
21999,
62,
39,
6239,
32,
62,
5589,
1823,
13,
9078,
3256,
198,
220,
220,
220,
705,
40720,
62,
8692... | 2.053333 | 150 |
"""
# Definition for a Node.
class Node:
def __init__(self, val: int = 0, left: 'Node' = None, right: 'Node' = None, next: 'Node' = None):
self.val = val
self.left = left
self.right = right
self.next = next
"""
| [
37811,
198,
2,
30396,
329,
257,
19081,
13,
198,
4871,
19081,
25,
198,
220,
220,
220,
825,
11593,
15003,
834,
7,
944,
11,
1188,
25,
493,
796,
657,
11,
1364,
25,
705,
19667,
6,
796,
6045,
11,
826,
25,
705,
19667,
6,
796,
6045,
11,... | 2.296296 | 108 |
#
# Author: Salo Shp <SaloShp@Gmail.Com>
#
from __future__ import absolute_import
VERSION = (1, 0, 0, 0)
__version__ = VERSION
__versionstr__ = '.'.join(map(str, VERSION))
import platform
import sys
import subprocess
from .utils import *
args = parse_cli_args()
logger = init_logging()
cfg = init_config(args)
hwuui... | [
2,
198,
2,
6434,
25,
4849,
78,
911,
79,
1279,
50,
7335,
2484,
79,
31,
38,
4529,
13,
5377,
29,
198,
2,
198,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
198,
43717,
796,
357,
16,
11,
657,
11,
657,
11,
657,
8,
198,
... | 2.915601 | 391 |
from discord import Message, Embed, Color, TextChannel, Role, utils
from discord.ext import commands
from discord.ext.commands import Context as CommandContext
from peewee import ModelSelect
import checks
from awaiter import AdvancedAwaiter, AwaitCanceled, AwaitTimedOut
from database import *
| [
6738,
36446,
1330,
16000,
11,
13302,
276,
11,
5315,
11,
8255,
29239,
11,
20934,
11,
3384,
4487,
201,
198,
6738,
36446,
13,
2302,
1330,
9729,
201,
198,
6738,
36446,
13,
2302,
13,
9503,
1746,
1330,
30532,
355,
9455,
21947,
201,
198,
673... | 3.517241 | 87 |
import shapefile
import gmsh
import sys
import meshio
# A class with the intersected point coordinates between two atrributes is created
# A Data base class is defined in order to characterized imported geometry(shapefile)
| [
11748,
5485,
7753,
220,
220,
220,
220,
198,
11748,
308,
907,
71,
198,
11748,
25064,
198,
11748,
19609,
952,
198,
220,
220,
220,
220,
628,
198,
2,
317,
1398,
351,
262,
36177,
276,
966,
22715,
1022,
734,
379,
81,
7657,
318,
2727,
220,... | 3.746032 | 63 |
#!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='lr2irscraper',
version='2.2',
description='LR2 Internet Ranking Scraper Library',
author='nakt',
author_email='nakt_azdim@walkure.net',
install_requires=['pandas>=0.21', 'requests', 'lxml'],
python_requires='>=3.... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
6738,
900,
37623,
10141,
1330,
9058,
11,
1064,
62,
43789,
198,
198,
40406,
7,
198,
220,
220,
220,
1438,
11639,
14050,
17,
343,
1416,
38545,
3256,
198,
220,
220,
220,
2196,
11639,
17,
... | 2.463415 | 164 |
# Libraries
from selenium import webdriver
import json
import codecs
from time import sleep
# Import keys
with codecs.open("scraper_siglas-uc/files/docs.json", "rU", "utf-8") as js:
data = json.load(js)[0]
# Url generator
base_url = lambda ID: f"https://buscacursos.uc.cl/?cxml_semestre=2022-1&cxml_sigla=&cxml_... | [
2,
46267,
198,
198,
6738,
384,
11925,
1505,
1330,
3992,
26230,
198,
11748,
33918,
198,
11748,
40481,
82,
198,
6738,
640,
1330,
3993,
198,
198,
2,
17267,
8251,
198,
198,
4480,
40481,
82,
13,
9654,
7203,
1416,
38545,
62,
82,
328,
21921,... | 2.317164 | 536 |
#! /usr/bin/env python
# -*- coding: utf-8
"""
Python implementation of Non-Stationary Gabor Transform (NSGT)
derived from MATLAB code by NUHAG, University of Vienna, Austria
Thomas Grill, 2011-2015
http://grrrr.org/nsgt
"""
import numpy as np
from nsgt import NSGT,LogScale,LinScale,MelScale,OctScale
from scikits.a... | [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
21015,
220,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
198,
198,
37811,
198,
37906,
7822,
286,
8504,
12,
12367,
560,
402,
4820,
26981,
357,
8035,
19555,
8,
198,
34631,
422,
36775,
4878... | 2.578544 | 1,305 |
from pathlib import Path
from musicscore.musicstream.streamvoice import SimpleFormat
from musicscore.musictree.treescoretimewise import TreeScoreTimewise
from musicxmlunittest import XMLTestCase
path = Path(__file__)
| [
6738,
3108,
8019,
1330,
10644,
198,
198,
6738,
1928,
873,
7295,
13,
28965,
5532,
13,
5532,
38888,
1330,
17427,
26227,
198,
6738,
1928,
873,
7295,
13,
14664,
713,
631,
13,
33945,
3798,
9997,
320,
413,
786,
1330,
12200,
26595,
14967,
413,... | 3.4 | 65 |
"""
Import the local file cars.csv and split the data set equally into test set
and training set.
"""
import pandas as pd
#version 01
# Importing the dataset
dataset = pd.read_csv('cars.csv')
# Splitting the dataset into the Training set and Test set
from sklearn.model_selection import train_test_split
datas... | [
37811,
198,
20939,
262,
1957,
2393,
5006,
13,
40664,
290,
6626,
262,
1366,
900,
8603,
656,
1332,
900,
220,
198,
392,
3047,
900,
13,
220,
628,
198,
37811,
628,
198,
11748,
19798,
292,
355,
279,
67,
628,
198,
2,
9641,
5534,
198,
2,
... | 2.963636 | 330 |
# Generated by Django 2.0 on 2018-01-29 22:37
from django.db import migrations, models
import django.db.models.deletion
| [
2,
2980,
515,
416,
37770,
362,
13,
15,
319,
2864,
12,
486,
12,
1959,
2534,
25,
2718,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
14208,
13,
9945,
13,
27530,
13,
2934,
1616,
295,
628
] | 2.904762 | 42 |
# -*- coding: utf-8 -*-
"""
Copyright (c) 2019 Giuliano França
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, cop... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
15269,
357,
66,
8,
13130,
35267,
10115,
40178,
64,
198,
198,
36393,
13789,
198,
198,
5990,
3411,
318,
29376,
7520,
11,
1479,
286,
3877,
11,
284,
597,
1048,
... | 2.721897 | 1,877 |
"""Stack with a linked list"""
class Node:
"""Node: LinkedList"""
def __init__(self, item, next) -> None:
"""Set initial item and next of a linked list"""
self.item = item
self.next = next
class Stack:
"""Last in first out"""
def __init__(self) -> None:
"""Set an initia... | [
37811,
25896,
351,
257,
6692,
1351,
37811,
198,
198,
4871,
19081,
25,
198,
220,
220,
220,
37227,
19667,
25,
7502,
276,
8053,
37811,
198,
220,
220,
220,
825,
11593,
15003,
834,
7,
944,
11,
2378,
11,
1306,
8,
4613,
6045,
25,
198,
220,... | 2.373541 | 257 |
import os
for i in range(10):
#cmd = 'python mainpro_CK+.py --model VGG19 --bs 32 --lr 0.01 --fold %d' %(i+1)
#cmd = 'python mainpro_CK+.py --model VGG19 --bs 64 --lr 0.01 --fold %d' %(i+1)
#cmd = 'python mainpro_CK+.py --model Resnet18 --bs 64 --lr 0.01 --fold %d' %(i+1)
cmd = 'python mainpro_CK+.py -... | [
11748,
28686,
198,
198,
1640,
1312,
287,
2837,
7,
940,
2599,
198,
220,
220,
220,
1303,
28758,
796,
705,
29412,
1388,
1676,
62,
34,
42,
27613,
9078,
1377,
19849,
569,
11190,
1129,
1377,
1443,
3933,
1377,
14050,
657,
13,
486,
1377,
1137... | 2.183246 | 191 |
from typing import List
| [
6738,
19720,
1330,
7343,
628,
198
] | 4.333333 | 6 |
import sympy
import itertools
def functionstr(var, expr):
"""
Return a string that defines a function ``D`` that can evaluate `expr` and
its first two derivatives with respect to `var`.
The returned definition uses common subexpression elimination (CSE).
Parameters
----------
var : `symp... | [
11748,
10558,
88,
198,
198,
11748,
340,
861,
10141,
198,
198,
4299,
2163,
2536,
7,
7785,
11,
44052,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
8229,
257,
4731,
326,
15738,
257,
2163,
7559,
35,
15506,
326,
460,
13446,
4600,
... | 2.444924 | 926 |
import os
from functools import partial
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.button import Button
from kivy.uix.popup import Popup
from kivy.uix.listview import ListView, ListItemButton
from kivy.properties import ObjectProperty, NumericProperty
from kivy.adapters.listadapter import ListAdapter
from... | [
11748,
28686,
198,
6738,
1257,
310,
10141,
1330,
13027,
198,
198,
6738,
479,
452,
88,
13,
84,
844,
13,
3524,
39786,
1330,
8315,
32517,
198,
6738,
479,
452,
88,
13,
84,
844,
13,
16539,
1330,
20969,
198,
6738,
479,
452,
88,
13,
84,
... | 2.252129 | 1,761 |
# pylint: disable=C0111,R0902,R0904,R0912,R0913,R0915,E1101
# Smartsheet Python SDK.
#
# Copyright 2017 Smartsheet.com, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"): you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.... | [
2,
279,
2645,
600,
25,
15560,
28,
34,
486,
1157,
11,
49,
2931,
2999,
11,
49,
2931,
3023,
11,
49,
2931,
1065,
11,
49,
2931,
1485,
11,
49,
2931,
1314,
11,
36,
1157,
486,
198,
2,
2439,
5889,
25473,
11361,
26144,
13,
198,
2,
198,
... | 3.086735 | 392 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2018-2019 Fetch.AI Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You m... | [
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,
2,
16529,
26171,
198,
2,
198,
2,
220,
220,
15069,
2864,
12,
23344,
376,
7569,
13,
20185,
15302,
198,
2,
19... | 2.457143 | 1,610 |
from fixtures.builder import FixtureBuilder
| [
6738,
34609,
13,
38272,
1330,
376,
9602,
32875,
628
] | 5 | 9 |
import os
import numpy as np
import tifffile as tiff
import matplotlib.pyplot as plt
image_id = '6120_2_2'
m = M(image_id)
img = np.zeros((837, 851, 3))
img[:, :, 0] = m[:, :, 4] # red
img[:, :, 1] = m[:, :, 2] # green
img[:, :, 2] = m[:, :, 1] # blue
fig, axes = plt.subplots(ncols=1, nrows=1, figsize=(8, 8))
... | [
11748,
28686,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
256,
361,
487,
576,
355,
256,
733,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
628,
628,
198,
9060,
62,
312,
796,
705,
21,
10232,
62,
17,
62,
17,
6,
1... | 2.030303 | 198 |
from datetime import datetime
from itertools import count
from therminator import db
from therminator.models import *
GENERATORS = {
'user.name': map(lambda n: 'User %d' % n, count()),
'user.name': map(lambda n: "User %d" % n, count()),
'user.email': map(lambda n: "user%d@example.com" % n, count()),
'h... | [
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
340,
861,
10141,
1330,
954,
198,
6738,
10811,
1084,
1352,
1330,
20613,
198,
6738,
10811,
1084,
1352,
13,
27530,
1330,
1635,
198,
198,
35353,
1137,
1404,
20673,
796,
1391,
198,
220,
220,
220... | 2.541176 | 170 |
from django.contrib import admin
from django.urls import path
from . import views
urlpatterns = [
path('', views.view_definitionssoftware, name='view_definitionssoftware'),
path('create/', views.term_create, name='term_create'),
path('update/<pk>/', views.term_update, name='term_update'),
path('delete/... | [
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
198,
6738,
764,
1330,
5009,
198,
198,
6371,
33279,
82,
796,
685,
198,
220,
220,
220,
3108,
10786,
3256,
5009,
13,
1177,
62,
4299,
50101... | 2.875969 | 129 |
'''
Here we sort the arrays to ascending order;
descending order can be done similarly.
The idea behind bubble sort is
Keep iterating thru the array and swapping neighboring elements
until an iteration in which no swap takes place, then we know
the array is sorted.
Author: phunc20
'''
import time
print... | [
7061,
6,
198,
4342,
356,
3297,
262,
26515,
284,
41988,
1502,
26,
198,
20147,
1571,
1502,
460,
307,
1760,
12470,
13,
198,
198,
464,
2126,
2157,
14310,
3297,
318,
198,
220,
220,
220,
9175,
11629,
803,
33834,
262,
7177,
290,
38869,
19651... | 1.826122 | 1,248 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# C++ version Copyright (c) 2006-2007 Erin Catto http://www.box2d.org
# Python version by Ken Lauer / sirkne at gmail dot com
#
# This software is provided 'as-is', without any express or implied
# warranty. In no event will the authors be held liable for any damages
# a... | [
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,
327,
4880,
2196,
15069,
357,
66,
8,
4793,
12,
12726,
28894,
327,
45807,
2638,
1378,
2503,
13,
3524,
17,
... | 2.16701 | 7,772 |
"""Builds network used in brain of learning agents.
Author: Yoshinari Motokawa <yoshinari.moto@fuji.waseda.jp>
"""
from typing import List
from core.utils.logging import initialize_logging
from omegaconf import DictConfig
from torch import nn
from .customs.categorical_dqn import CategoricalDQN
from .customs.conv_ml... | [
37811,
15580,
82,
3127,
973,
287,
3632,
286,
4673,
6554,
13,
198,
198,
13838,
25,
28563,
259,
2743,
6543,
482,
6909,
1279,
88,
3768,
259,
2743,
13,
76,
2069,
31,
20942,
7285,
13,
86,
839,
64,
13,
34523,
29,
198,
37811,
198,
198,
6... | 2.78 | 200 |
from layers import ShuffleNetv2, CEM, RPN, SAM, CEM_FILTER
from tensorflow.keras.models import Model
import tensorflow.keras.backend as K
import tensorflow.keras as keras
import tensorflow as tf
import numpy as np
class ThunderNet_bb(Model):
""" thundernet without roi part"""
@tf.function
# def compute_o... | [
6738,
11685,
1330,
911,
18137,
7934,
85,
17,
11,
327,
3620,
11,
371,
13137,
11,
28844,
11,
327,
3620,
62,
46700,
5781,
198,
6738,
11192,
273,
11125,
13,
6122,
292,
13,
27530,
1330,
9104,
198,
11748,
11192,
273,
11125,
13,
6122,
292,
... | 2.425968 | 439 |
for key in IMG_PATHS.keys():
start_time = time.time()
print"importing {0}".format(key)
LEAF_COLLECTION.load_leaves_folder(IMG_PATHS[key], num_sections=SECTIONS)
print """done importing and measuring all {0} with
{1} sections per leaf in {2} seconds""".format(key,
... | [
1640,
1994,
287,
8959,
38,
62,
47,
1404,
7998,
13,
13083,
33529,
198,
220,
220,
220,
220,
220,
220,
220,
923,
62,
2435,
796,
640,
13,
2435,
3419,
198,
220,
220,
220,
220,
220,
220,
220,
3601,
1,
11748,
278,
1391,
15,
92,
1911,
1... | 1.842553 | 235 |
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
pd.plotting.register_matplotlib_converters()
df = pd.read_csv("DATASET.csv")
df.set_index("Date", inplace=True)
df.index = pd.to_datetime(df.index, format="%d/%m/%y")
df.Transakce = df['Demand'].astype(float)
df.plot()
len(df)
train_len = len(df)-... | [
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
30094,
13,
29487,
889,
13,
30238,
62,
6759,
29487,
8019,
62,
1102,
332,
1010,
3419,
198,
198,
7568... | 2.649438 | 890 |
import os
import re
import os
import json
DB_PATH = "%s/%s" % (
os.getenv("XRAY_DATABASE_DIR"), os.getenv("XRAY_DATABASE"))
(ROI_X1, ROI_X2), (ROI_Y1, ROI_Y2) = roi_xy()
def slice_xy():
'''Return (X1, X2), (Y1, Y2) from XRAY_ROI, exclusive end (for xrange)'''
# SLICE_X12Y100:SLICE_X27Y149
# Note X... | [
11748,
28686,
198,
11748,
302,
198,
11748,
28686,
198,
11748,
33918,
198,
198,
11012,
62,
34219,
796,
36521,
82,
14,
4,
82,
1,
4064,
357,
198,
220,
220,
220,
28686,
13,
1136,
24330,
7203,
55,
30631,
62,
35,
1404,
6242,
11159,
62,
34... | 2.134161 | 805 |
from flask import Flask, render_template, url_for, redirect, request, flash, jsonify, session
from modules.graphs import create_figures
from modules.video import *
import os
from modules.tools import GetUniqueID
import json
app = Flask(__name__)
app.secret_key = '1234567890abcde'
widgetfile = open('data/about_the_wid... | [
6738,
42903,
1330,
46947,
11,
8543,
62,
28243,
11,
19016,
62,
1640,
11,
18941,
11,
2581,
11,
7644,
11,
33918,
1958,
11,
6246,
198,
6738,
13103,
13,
34960,
82,
1330,
2251,
62,
5647,
942,
198,
6738,
13103,
13,
15588,
1330,
1635,
198,
... | 2.869919 | 246 |
import json
with open('moves_type.json') as poke_data:
move_list = []
type_list = []
d = json.load(poke_data)
for i in d :
move = i['move_name']
type = i['type']
move_list.append('move('+move.lower()+').')
type_list.append('have_type('+move.lower()+','+type.lower()+').')
... | [
11748,
33918,
198,
4480,
1280,
10786,
76,
5241,
62,
4906,
13,
17752,
11537,
355,
22620,
62,
7890,
25,
198,
220,
220,
220,
1445,
62,
4868,
796,
17635,
198,
220,
220,
220,
2099,
62,
4868,
796,
17635,
198,
220,
220,
220,
288,
796,
3391... | 2.070175 | 228 |
import time
from multiprocessing import Process
if __name__ == '__main__':
main()
| [
11748,
640,
198,
6738,
18540,
305,
919,
278,
1330,
10854,
628,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
1388,
3419,
198
] | 2.935484 | 31 |
import sys
from plot.table import TabularStats
from crawlstats import CST, MonthlyCrawl
if __name__ == '__main__':
plot_crawls = sys.argv[1:]
plot_name = 'charsets'
column_header = 'charset'
if len(plot_crawls) == 0:
plot_crawls = MonthlyCrawl.get_latest(3)
print(plot_crawls)
els... | [
11748,
25064,
198,
198,
6738,
7110,
13,
11487,
1330,
16904,
934,
29668,
198,
6738,
27318,
34242,
1330,
46429,
11,
27573,
34,
13132,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
7110,
62,
... | 2.10241 | 332 |
# -*- coding: utf-8 -*-
"""
Created on Mon Feb 25 23:10:08 2019
@author: Ham
HackerRanch Challenge: Validating UID
Task
ABCXYZ company has up to 100 employees.
The company decides to create a unique identification number (UID)
for each of its employees.
The company has assigned you the task of validati... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
37811,
201,
198,
41972,
319,
2892,
3158,
1679,
2242,
25,
940,
25,
2919,
13130,
201,
198,
201,
198,
31,
9800,
25,
4345,
201,
198,
201,
198,
39,
10735,
49,
3702,
... | 2.439206 | 806 |
from .general import *
from .text_classification import *
from .sequence_labeling import *
from .summarization import *
from .text_matching import *
from .kg_link_prediction import * | [
6738,
764,
24622,
1330,
1635,
198,
6738,
764,
5239,
62,
4871,
2649,
1330,
1635,
198,
6738,
764,
43167,
62,
18242,
278,
1330,
1635,
198,
6738,
764,
16345,
3876,
1634,
1330,
1635,
198,
6738,
764,
5239,
62,
15699,
278,
1330,
1635,
198,
6... | 3.568627 | 51 |
# sweetscomplete.entity.customer.Customer read/add/edit/delete
# tell python where to find module source code
import os,sys
sys.path.append(os.path.realpath("src"))
import pprint
import db.mongodb.connection
from datetime import date
from sweetscomplete.entity.customer import Customer
from sweetscomplete.domain.cust... | [
2,
42402,
20751,
13,
26858,
13,
23144,
263,
13,
44939,
1100,
14,
2860,
14,
19312,
14,
33678,
198,
198,
2,
1560,
21015,
810,
284,
1064,
8265,
2723,
2438,
198,
11748,
28686,
11,
17597,
198,
17597,
13,
6978,
13,
33295,
7,
418,
13,
6978... | 2.343394 | 1,491 |
import envi
import envi.bits as e_bits
import struct
# from disasm import H8ImmOper, H8RegDirOper, H8RegIndirOper, H8AbsAddrOper, H8PcOffsetOper, H8RegMultiOper, H8MemIndirOper
import envi.archs.h8.regs as e_regs
import envi.archs.h8.const as e_const
import envi.archs.h8.operands as h8_operands
bcc = [
('bra... | [
11748,
551,
8903,
198,
11748,
551,
8903,
13,
9895,
355,
304,
62,
9895,
198,
11748,
2878,
198,
198,
2,
422,
595,
8597,
1330,
367,
23,
24675,
18843,
11,
367,
23,
8081,
35277,
18843,
11,
367,
23,
8081,
5497,
343,
18843,
11,
367,
23,
... | 1.75 | 6,004 |
# /usr/bin/env python
# -*- coding: utf-8 -*-
import os
from setuptools import find_packages, setup
ROOT_DIR = os.path.dirname(__file__)
SOURCE_DIR = os.path.join(ROOT_DIR)
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setup(
name="django-zurb-foundation-6",
version="... | [
2,
1220,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
28686,
198,
198,
6738,
900,
37623,
10141,
1330,
1064,
62,
43789,
11,
9058,
198,
198,
13252,
2394,
62,
34720,
796,... | 2.549234 | 457 |
if __name__ == "__main__":
import sys; sys.path.insert(0, '..')
from pprint import pprint
from collections import Counter, defaultdict
from copy import copy
from contextlib import contextmanager
from os.path import join
import json
from extensible_provn.prov_magics import ProvMagic
STATS_VIEW = True
NAMES = Cou... | [
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
1330,
25064,
26,
25064,
13,
6978,
13,
28463,
7,
15,
11,
705,
492,
11537,
198,
198,
6738,
279,
4798,
1330,
279,
4798,
198,
6738,
17268,
1330,
15034,
11,
427... | 2.958904 | 219 |
################################################################################
# Module: template.__init__.py
# Description: Template module for everything UMI template.
# License: MIT, see full license in LICENSE.txt
# Web: https://github.com/samuelduchesne/archetypal
################################################... | [
29113,
29113,
14468,
198,
2,
19937,
25,
11055,
13,
834,
15003,
834,
13,
9078,
198,
2,
12489,
25,
37350,
8265,
329,
2279,
471,
8895,
11055,
13,
198,
2,
13789,
25,
17168,
11,
766,
1336,
5964,
287,
38559,
24290,
13,
14116,
198,
2,
5313... | 4.134409 | 186 |
import mechanize
import urllib2
from tqdm import tqdm
import sys
MechBrowser = mechanize.Browser()
MechBrowser.set_handle_equiv(True)
MechBrowser.set_handle_redirect(True)
MechBrowser.set_handle_referer(True)
MechBrowser.set_handle_robots(False)
print "\n#####################################"
print "# => Brute Force ... | [
11748,
3962,
1096,
198,
11748,
2956,
297,
571,
17,
198,
6738,
256,
80,
36020,
1330,
256,
80,
36020,
198,
11748,
25064,
198,
198,
28452,
46532,
796,
3962,
1096,
13,
46532,
3419,
198,
28452,
46532,
13,
2617,
62,
28144,
62,
4853,
452,
7,... | 2.709812 | 479 |
from webdnn.graph.operators.elementwise import Elementwise
class Greater(Elementwise):
"""Greater(name)
return 1 if x0 is greater than x1 elementwisely
.. math::
f(x) = x0 > x1 ? 1 : 0;
Signature
.. code::
y, = op(x0, x1)
- **x0, x1** - Input variables.
... | [
6738,
3992,
67,
20471,
13,
34960,
13,
3575,
2024,
13,
30854,
3083,
1330,
11703,
3083,
628,
198,
4871,
18169,
7,
20180,
3083,
2599,
198,
220,
220,
220,
37227,
13681,
263,
7,
3672,
8,
628,
220,
220,
220,
1441,
352,
611,
2124,
15,
318,... | 2.204819 | 166 |
# coding=utf-8
#
# This file is part of Hypothesis (https://github.com/DRMacIver/hypothesis)
#
# Most of this work is copyright (C) 2013-2015 David R. MacIver
# (david@drmaciver.com), but it contains contributions by others. See
# https://github.com/DRMacIver/hypothesis/blob/master/CONTRIBUTING.rst for a
# full list of... | [
2,
19617,
28,
40477,
12,
23,
198,
2,
198,
2,
770,
2393,
318,
636,
286,
21209,
313,
8497,
357,
5450,
1378,
12567,
13,
785,
14,
7707,
14155,
40,
332,
14,
36362,
313,
8497,
8,
198,
2,
198,
2,
4042,
286,
428,
670,
318,
6634,
357,
... | 3.162328 | 653 |
import typing as t
import uuid
from ..filter import Column as _Column, ValueType
if t.TYPE_CHECKING:
from .database import Database
from .model import Model
T_Model = t.TypeVar('T_Model', bound='Model')
class Column(_Column):
"""
Use this class to declare a column on the class-level of a #Model subclass. ... | [
198,
11748,
19720,
355,
256,
198,
11748,
334,
27112,
198,
198,
6738,
11485,
24455,
1330,
29201,
355,
4808,
39470,
11,
11052,
6030,
198,
198,
361,
256,
13,
25216,
62,
50084,
2751,
25,
198,
220,
422,
764,
48806,
1330,
24047,
198,
220,
4... | 3.245473 | 994 |
# -*- coding: utf-8 -*-
import pymongo
from pymongo.errors import ConnectionFailure
import CPUtimer
import os
import csv
import codecs
if __name__ == '__main__':
main()
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
279,
4948,
25162,
198,
6738,
279,
4948,
25162,
13,
48277,
1330,
26923,
50015,
198,
11748,
9135,
45016,
198,
11748,
28686,
198,
11748,
269,
21370,
198,
11748,
40481,
... | 2.806452 | 62 |
# -*- coding: utf-8 -*-
# import logging
from os.path import join
from gensim.models import Word2Vec
import numpy as np
import random
from utils.cache import LMDBClient
from utils import data_utils
from utils.data_utils import Singleton
from utils import settings
import gensim
# logging.basicConfig(format='%(asctime)... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
1330,
18931,
198,
6738,
28686,
13,
6978,
1330,
4654,
198,
6738,
308,
641,
320,
13,
27530,
1330,
9678,
17,
53,
721,
198,
11748,
299,
32152,
355,
45941,
198,
117... | 2.334262 | 359 |
# creating the tables for database
import sqlite3
conn = sqlite3.connect('Database/final.db')
cursor = conn.cursor()
cursor.execute(""" CREATE TABLE IF NOT EXISTS cust_image_master (Customer_ID VARCHAR(10) PRIMARY KEY, Image BLOB, Counter INTEGER) """)
cursor.execute(""" CREATE TABLE IF NOT EXISTS location_master (Lo... | [
2,
4441,
262,
8893,
329,
6831,
198,
11748,
44161,
578,
18,
198,
198,
37043,
796,
44161,
578,
18,
13,
8443,
10786,
38105,
14,
20311,
13,
9945,
11537,
198,
66,
21471,
796,
48260,
13,
66,
21471,
3419,
198,
198,
66,
21471,
13,
41049,
72... | 3.032129 | 249 |
import base64
from unittest import TestCase
from osbot_aws.helpers.Lambda_Package import Lambda_Package
from osbot_utils.utils.Dev import Dev
from osbot_jupyter.api.CodeBuild_Jupyter import CodeBuild_Jupyter
| [
11748,
2779,
2414,
198,
6738,
555,
715,
395,
1330,
6208,
20448,
198,
198,
6738,
28686,
13645,
62,
8356,
13,
16794,
364,
13,
43,
4131,
6814,
62,
27813,
1330,
21114,
6814,
62,
27813,
198,
6738,
28686,
13645,
62,
26791,
13,
26791,
13,
13... | 2.864865 | 74 |
fun1(1)
fun1(5)
fun1(6)
fun1(7)
fun2("Laurence","Svekis")
fun2("Linda","Jones")
fun2("Mike","Smith")
myName = fun2("Laurence","Svekis")
print(myName)
num1 = fun3(6,7)
num2 = fun3(126,2317)
print(num1, num2) | [
198,
12543,
16,
7,
16,
8,
198,
12543,
16,
7,
20,
8,
198,
12543,
16,
7,
21,
8,
198,
12543,
16,
7,
22,
8,
198,
198,
12543,
17,
7203,
14772,
495,
1198,
2430,
50,
303,
74,
271,
4943,
198,
12543,
17,
7203,
43,
22261,
2430,
25784,
... | 1.9 | 110 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Setup script for gdal-utils.
from glob import glob
# from importlib.metadata import entry_points
from pathlib import Path
from setuptools import setup, find_packages
from osgeo_utils import (
__package_name__,
__version__,
__author__,
__author_email__,
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
31122,
4226,
329,
308,
31748,
12,
26791,
13,
198,
6738,
15095,
1330,
15095,
198,
2,
422,
1330,
8019,
13,
38993,
13... | 2.638298 | 940 |
import enum
from dataclasses import dataclass, field
from heapq import heappop, heappush
from fileinput import FileInput
from math import inf
from typing import Iterable, NamedTuple, Optional
HALLWAY_LENGTH = 7
ROOMS = 4
ROOM_SIZE = 2
# Memory layout of the Burrow implementation
#
# Hn == hallway[n] - represents a... | [
11748,
33829,
198,
6738,
4818,
330,
28958,
1330,
4818,
330,
31172,
11,
2214,
198,
6738,
24575,
80,
1330,
339,
1324,
404,
11,
339,
1324,
1530,
198,
6738,
2393,
15414,
1330,
9220,
20560,
198,
6738,
10688,
1330,
1167,
198,
6738,
19720,
133... | 2.295487 | 2,792 |
from setuptools import setup, find_packages
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='Classifying Personality of a Person Based On Users Twitter Data',
ve... | [
6738,
900,
37623,
10141,
1330,
9058,
11,
1064,
62,
43789,
198,
6738,
40481,
82,
1330,
1280,
198,
6738,
28686,
1330,
3108,
198,
198,
1456,
796,
3108,
13,
397,
2777,
776,
7,
6978,
13,
15908,
3672,
7,
834,
7753,
834,
4008,
198,
198,
44... | 2.463333 | 600 |
#!/usr/bin/env python3
import argparse
import logging
import sys
from typing import Tuple
from .base import (
DEFAULT_HTTP_PORT,
DEFAULT_LOG_LEVEL,
DEFAULT_PORT,
LOG_LEVELS,
ProtocolType,
)
from .config import OptionType, config
from .proxy import ProxyServer
from .tunnel_client import TunnelClient... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
11748,
1822,
29572,
198,
11748,
18931,
198,
11748,
25064,
198,
6738,
19720,
1330,
309,
29291,
198,
198,
6738,
764,
8692,
1330,
357,
198,
220,
220,
220,
5550,
38865,
62,
40717,
62,
... | 2.829412 | 170 |
from fastlmmhpc.util.runner import *
import logging
import unittest
import cStringIO
class DistributableTest(object) : #implements IDistributable
'''
This is a class for distributing any testing. It shouldn't be confused with TestDistributable which is a class for
testing the distributable classes.
'''... | [
6738,
3049,
75,
3020,
71,
14751,
13,
22602,
13,
16737,
1330,
1635,
198,
11748,
18931,
198,
11748,
555,
715,
395,
198,
11748,
269,
10100,
9399,
198,
198,
4871,
46567,
540,
14402,
7,
15252,
8,
1058,
1303,
320,
1154,
902,
4522,
396,
2455... | 3.775148 | 169 |
# Copyright (c) 2015 SONATA-NFV, 5GTANGO, UBIWHERE, Paderborn University
# 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,
220,
15069,
357,
66,
8,
1853,
311,
1340,
13563,
12,
21870,
53,
11,
642,
19555,
1565,
11230,
11,
471,
3483,
47357,
11,
350,
5067,
6286,
2059,
198,
2,
11096,
371,
34874,
15731,
1137,
53,
1961,
13,
198,
2,
198,
2,
49962,
739,
262,... | 3.644444 | 495 |
import sqlite3 as sql
| [
11748,
44161,
578,
18,
355,
44161,
628
] | 3.285714 | 7 |
__author__ = 'renhao.cui' | [
834,
9800,
834,
796,
705,
918,
23778,
13,
66,
9019,
6
] | 2.272727 | 11 |
#-------------------------------------------------------------------------------------------------------------------------------
# HUMAN VS BOT DIFFERENTIATION
# FILE NAME: test.py
# DEVELOPED BY: Vigneshwar Ravichandar, Moulishankar M R
# TOPICS: Multiclass Classification, Machine Learning, TensorFlow
#----------... | [
2,
10097,
47232,
24305,
198,
198,
2,
45850,
1565,
22269,
347,
2394,
360,
5064,
24302,
3525,
40,
6234,
198,
198,
2,
45811,
36751,
25,
1332,
13,
9078,
198,
198,
2,
5550,
18697,
3185,
1961,
11050,
25,
569,
570,
5069,
5767,
28146,
488,
... | 3.282322 | 379 |
from tkinter import *
import smtplib
#Main Screen Init
master = Tk()
master.title = 'Email App'
#Functions
#Labels
Label(master, text="Email App", font=('Calibri',15)).grid(row=0, sticky=N)
Label(master, text="Please use the form below to send an email", font=('Calibri',11)).grid(row=1, sticky=W, ... | [
6738,
256,
74,
3849,
1330,
1635,
201,
198,
11748,
895,
83,
489,
571,
201,
198,
201,
198,
2,
13383,
15216,
44707,
201,
198,
9866,
220,
220,
220,
220,
220,
220,
796,
309,
74,
3419,
201,
198,
9866,
13,
7839,
796,
705,
15333,
2034,
6,... | 2.494169 | 686 |
import logging
import celery
from django.apps import apps
from django.conf import settings
from elasticsearch import Elasticsearch
from elasticsearch import helpers
logger = logging.getLogger(__name__)
@celery.shared_task(bind=True)
| [
11748,
18931,
198,
198,
11748,
18725,
1924,
198,
198,
6738,
42625,
14208,
13,
18211,
1330,
6725,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
198,
6738,
27468,
12947,
1330,
48567,
12947,
198,
6738,
27468,
12947,
1330,
49385,
628,
... | 3.507246 | 69 |
from collections import OrderedDict
from cornflake.exceptions import ValidationError
| [
6738,
17268,
1330,
14230,
1068,
35,
713,
198,
198,
6738,
11676,
47597,
13,
1069,
11755,
1330,
3254,
24765,
12331,
628,
628,
628,
628,
628,
628,
628,
198
] | 3.703704 | 27 |
# VERSION should be PEP386 compatible (http://www.python.org/dev/peps/pep-0386)
VERSION = '0.1.0.dev'
# Indicates if this version is a release version
RELEASE = 'dev' not in VERSION
| [
2,
44156,
2849,
815,
307,
350,
8905,
21734,
11670,
357,
4023,
1378,
2503,
13,
29412,
13,
2398,
14,
7959,
14,
431,
862,
14,
431,
79,
12,
15,
21734,
8,
198,
43717,
796,
705,
15,
13,
16,
13,
15,
13,
7959,
6,
198,
198,
2,
1423,
16... | 2.815385 | 65 |
"""
Python has a function int(s), which parses an integer value out of a given string s. For example, the following program..
s = "12" + "3" # s == "123"
n = int(s) # value of n is 123
n = n + 10 # int value can be used in arithmetic expression
print (n) # Output 133
...would output 123. In program below, the va... | [
37811,
198,
37906,
468,
257,
2163,
493,
7,
82,
828,
543,
13544,
274,
281,
18253,
1988,
503,
286,
257,
1813,
4731,
264,
13,
1114,
1672,
11,
262,
1708,
1430,
492,
198,
220,
198,
82,
796,
366,
1065,
1,
1343,
366,
18,
1,
1303,
264,
... | 3.215976 | 338 |
# ======================================================================================================================
# File: GUI/TabWaters.py
# Project: AlphaBrew
# Description: Extensions and functionality for the main GUI window.
# Author: Jared Julien <jaredjulien@gmail.com>
# Copyrigh... | [
2,
38093,
10052,
4770,
1421,
28,
201,
198,
2,
220,
220,
220,
220,
220,
220,
220,
9220,
25,
220,
25757,
14,
33349,
54,
8605,
13,
9078,
201,
198,
2,
220,
220,
220,
220,
4935,
25,
220,
12995,
44029,
201,
198,
2,
12489,
25,
220,
497... | 3.078307 | 3,780 |
import argparse
import numpy as np
import os
import json
import torch
from models import *
from run_manager import RunManager
from utils import *
parser = argparse.ArgumentParser()
parser.add_argument('--path', type=str, default='Exp/test')
parser.add_argument('--gpu', help='gpu available', default='0')
parser.add_ar... | [
11748,
1822,
29572,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28686,
198,
11748,
33918,
198,
11748,
28034,
198,
198,
6738,
4981,
1330,
1635,
198,
6738,
1057,
62,
37153,
1330,
5660,
13511,
198,
6738,
3384,
4487,
1330,
1635,
198,
198,... | 2.356589 | 1,161 |
# Test using 'pytest tests/'
# Or with coverage 'coverage run -m pytest tests/' use 'coverage report' after.
from tests import _INPUT_FILE_PATH, _N_TRAIN
import torch
import numpy as np
from src.data.dataset import Dataset
from transformers import DistilBertTokenizer
# Test training data
device = torch.device("cpu")
t... | [
2,
6208,
1262,
705,
9078,
9288,
5254,
14,
6,
198,
2,
1471,
351,
5197,
705,
1073,
1857,
1057,
532,
76,
12972,
9288,
5254,
14,
6,
779,
705,
1073,
1857,
989,
6,
706,
13,
198,
6738,
5254,
1330,
4808,
1268,
30076,
62,
25664,
62,
34219,... | 3.132565 | 347 |
# Copyright 2021 The TensorFlow 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 applica... | [
2,
15069,
33448,
383,
309,
22854,
37535,
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,... | 2.856669 | 1,507 |
# -*- coding: utf-8 -*-
"""
This is a user configuration file.
"""
botSummary = u" หากผิดพลาดโปรดแจ้ง[[User talk:Nullzero|ที่นี่]]"
sandboxPages = [u"วิกิพีเดีย:ทดลองเขียน",
u"วิกิพีเดีย:สอนการใช้งาน_(จัดรูปแบบ)/กระดาษทด",
u"วิกิพีเดีย:สอนการใช้งาน_(แหล่งข้อมูลอื่น)/กระดาษทด",
... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
220,
532,
9,
12,
198,
37811,
198,
1212,
318,
257,
2836,
8398,
2393,
13,
198,
37811,
198,
198,
13645,
22093,
796,
334,
1,
220,
19567,
104,
19567,
110,
19567,
223,
19567,
250,
19567,
112,
... | 0.906412 | 577 |
import numpy as np
| [
11748,
299,
32152,
355,
45941,
198
] | 3.166667 | 6 |
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
# Ne pas oublier d'installer seaborn et matplotlib sur la VM d'Airflow
import seaborn as sns
# Ne pas oublier d'installer mlflow sur la VM d'Airflow
import mlflow
import mlflow.sklearn
# Authentification à Google Cloud avec la clé correspondant au... | [
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
2,
3169,
38836,
267,
549,
2505,
288,
6,
17350,
263,
384,
397,
1211,
2123,
2603,
29487,
8019,
969,
... | 2.38111 | 1,207 |
# Рекурсивные функции - это те функции, которые вызывают сами себя, но с разными параметрами
# factorial
print(fact(10))
# сделаем то же самое с цикле (для сравнения)
factorial = 1
for i in range(1,11):
factorial = factorial * i # можно сократить так: factorial*=i
print(factorial)
# напишем функцию... | [
220,
220,
220,
1303,
12466,
254,
16843,
31583,
35072,
21169,
21727,
18849,
38857,
22177,
45035,
16843,
220,
141,
226,
35072,
22177,
31583,
141,
228,
18849,
18849,
532,
220,
141,
235,
20375,
15166,
220,
20375,
16843,
220,
141,
226,
35072,
... | 1.30137 | 365 |
#!/usr/bin/python3
import nmap
scanner = nmap.PortScanner()
print("Welcome, this is a simple Nmap automation tool")
print("<--------------------------------------------------->")
ip_addr = input("Please enter the IP address you want to scan : ")
print(f"You entered the IP address : {ip_addr}")
type(ip_addr)
resp... | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
198,
11748,
299,
8899,
198,
198,
35836,
1008,
796,
299,
8899,
13,
13924,
33351,
1008,
3419,
198,
198,
4798,
7203,
14618,
11,
428,
318,
257,
2829,
399,
8899,
22771,
2891,
4943,
198,
4798,
... | 2.483766 | 616 |
"""Module contains Resource model."""
from enum import Enum
import os
import posixpath
from typing import Any, Dict, List, Union # noqa: F401
from requests.models import Response # noqa: F401 pylint: disable=unused-import
from crux._utils import DEFAULT_CHUNK_SIZE, Headers
from crux.models.model import CruxModel
f... | [
37811,
26796,
4909,
20857,
2746,
526,
15931,
198,
198,
6738,
33829,
1330,
2039,
388,
198,
11748,
28686,
198,
11748,
1426,
844,
6978,
198,
6738,
19720,
1330,
4377,
11,
360,
713,
11,
7343,
11,
4479,
220,
1303,
645,
20402,
25,
376,
21844,
... | 2.144783 | 8,012 |
from wq.db import rest
from .models import GeometryModel, PointModel
from django.conf import settings
if settings.WITH_GIS:
rest.router.register_model(
GeometryModel,
fields="__all__",
)
rest.router.register_model(
PointModel,
fields="__all__",
)
| [
6738,
266,
80,
13,
9945,
1330,
1334,
198,
6738,
764,
27530,
1330,
2269,
15748,
17633,
11,
6252,
17633,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
198,
361,
6460,
13,
54,
10554,
62,
38,
1797,
25,
198,
220,
220,
220,
1334,
1... | 2.368 | 125 |
import sys, os
sys.path.append(os.path.abspath(os.getcwd()))
from Visualize import Visualizer
from ZF3D.Camera import Camera
import glob
import os
import cv2
import numpy as np
import pandas as pd
def genSplitViewImages(image_dir):
"""
Create image folder and generate split-view images
"""
imgF_... | [
198,
11748,
25064,
11,
28686,
198,
17597,
13,
6978,
13,
33295,
7,
418,
13,
6978,
13,
397,
2777,
776,
7,
418,
13,
1136,
66,
16993,
3419,
4008,
198,
6738,
15612,
1096,
1330,
15612,
7509,
198,
6738,
1168,
37,
18,
35,
13,
35632,
1330,
... | 2.065789 | 532 |
# Author
# Peter Svenningsson
# Email
# peter.o.svenningsson@gmail.com
###########
# IMPORTS #
###########
# Standard
import time
import csv
import json
# 3rd party
import numpy as np
import matplotlib.pyplot as plt
# Local
from dataset.dataset_QSNMC import QSNMCDataset
from models.izencovich_neuron import SimpleIzenco... | [
2,
6434,
198,
2,
5613,
44611,
23400,
1559,
198,
2,
9570,
198,
2,
279,
2357,
13,
78,
13,
82,
574,
23400,
1559,
31,
14816,
13,
785,
198,
7804,
21017,
198,
2,
30023,
33002,
1303,
198,
7804,
21017,
198,
2,
8997,
198,
11748,
640,
198,
... | 2.407423 | 2,425 |
import config as cf
from app.base_app import BaseApp
from app.inference_app import InferenceApp
from app.inference_cascade_app import InferenceCascadeApp
from data.db.file_list_loader import FileListLoader
from utils import log
from utils.cpu_gpu_switcher import CpuGpuSwitcher
class EvaluateRuntimeApp(BaseApp):
"... | [
11748,
4566,
355,
30218,
198,
6738,
598,
13,
8692,
62,
1324,
1330,
7308,
4677,
198,
6738,
598,
13,
259,
4288,
62,
1324,
1330,
554,
4288,
4677,
198,
6738,
598,
13,
259,
4288,
62,
66,
28966,
62,
1324,
1330,
554,
4288,
34,
28966,
4677,... | 2.889942 | 1,372 |