content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
import os
import argparse
import torch
import onnx
from metro.modeling.bert import BertConfig, METRO
from metro.modeling._smpl import SMPL, Mesh
from metro.modeling.hrnet.hrnet_cls_net_featmaps import get_cls_net
from metro.modeling.hrnet.config import config as hrnet_config
from metro.modeling.hrnet.config import upda... | [
11748,
28686,
198,
11748,
1822,
29572,
198,
11748,
28034,
198,
11748,
319,
77,
87,
198,
6738,
24536,
13,
4666,
10809,
13,
4835,
1330,
22108,
16934,
11,
31243,
13252,
198,
6738,
24536,
13,
4666,
10809,
13557,
5796,
489,
1330,
9447,
6489,
... | 3.285106 | 235 |
from random import randint
print(' === Vamos jogar par ou ímpar? === \n\n')
venceu = 0
jog = 0
while True:
num = int(input('\n\nDigite um número para jogar: '))
jog += 1
escolha = str(input('\n\nDigite P ou I para Par ou Ímpar: ')).upper().strip()[0]
compu = randint(0, 10)
if escolha == 'P':
... | [
6738,
4738,
1330,
43720,
600,
198,
4798,
10786,
24844,
569,
321,
418,
48342,
283,
1582,
267,
84,
6184,
255,
76,
1845,
30,
24844,
3467,
77,
59,
77,
11537,
198,
574,
344,
84,
796,
657,
198,
73,
519,
796,
657,
198,
4514,
6407,
25,
19... | 1.905138 | 506 |
#!/usr/bin/python3
import argparse
import collections
import pandas as pd
import numpy as np
if __name__ == "__main__":
parser = argparse.ArgumentParser(
description="Generate the results table of the social instances")
parser.add_argument("csv", help="The CSV input file")
parser.add_argument("gur... | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
198,
11748,
1822,
29572,
198,
11748,
17268,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
19... | 2.106287 | 1,336 |
#!/usr/bin/env python
# a bar plot with errorbars
import matplotlib.pyplot as plt
import numpy as np
import string
graph_dir = "charts/"
N = 1
width = 0.01 # the width of the bars
ind = np.arange(N) # the x locations for the groups
fig, ax = plt.subplots()
# initial run
(tdbMeans, tdbStd) = readFile("scaling_t... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
257,
2318,
7110,
351,
4049,
34046,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
4731,
198,
198,
34960,
62,
15908,
79... | 2.371469 | 708 |
# -*- coding: utf-8 -*-
"""
Description:
EPython's custom exceptions
Author:
Ray Gomez
Date:
3/20/21
"""
from epython.errors import filters, poke, network, ssh, util
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
11828,
25,
198,
220,
220,
220,
14724,
7535,
338,
2183,
13269,
198,
198,
13838,
25,
198,
220,
220,
220,
7760,
33231,
198,
198,
10430,
25,
198,
220,
220,
220... | 2.585714 | 70 |
from detectron2.config import LazyCall as L
from detectron2.layers import ShapeSpec
from detectron2.modeling.poolers import ROIPooler
from detectron2.modeling.roi_heads import KRCNNConvDeconvUpsampleHead
from .mask_rcnn_fpn import model
[model.roi_heads.pop(x) for x in ["mask_in_features", "mask_pooler", "mask_head"]... | [
6738,
4886,
1313,
17,
13,
11250,
1330,
406,
12582,
14134,
355,
406,
198,
6738,
4886,
1313,
17,
13,
75,
6962,
1330,
25959,
22882,
198,
6738,
4886,
1313,
17,
13,
4666,
10809,
13,
7742,
364,
1330,
15107,
4061,
970,
263,
198,
6738,
4886,
... | 2.389452 | 493 |
import chainer
from chainer import functions
import numpy as cp
# import cupy as cp
import json
'''
whole framework: a->(p->A->s)
'''
if __name__ == '__main__':
import chainer
from chainer import serializers
from chainer.iterators import SerialIterator
from chainer_chemistry.dataset.convert... | [
11748,
6333,
263,
198,
6738,
6333,
263,
1330,
5499,
198,
198,
11748,
299,
32152,
355,
31396,
198,
2,
1330,
6508,
88,
355,
31396,
198,
198,
11748,
33918,
628,
198,
198,
7061,
6,
198,
1929,
2305,
9355,
25,
257,
3784,
7,
79,
3784,
32,
... | 2.053458 | 2,039 |
input_file = open("D:/My Files/Projects/Python Programming/coursera_course_2/files/project_twitter_data.csv","r")
output_file = open("D:/My Files/Projects/Python Programming/coursera_course_2/files/resulting_data.csv","w")
punctuation_chars = ["'", '"', ",", ".", "!", ":", ";", '#', '@']
# lists of words to use
p... | [
15414,
62,
7753,
796,
1280,
7203,
35,
14079,
3666,
13283,
14,
16775,
82,
14,
37906,
30297,
14,
43220,
2655,
64,
62,
17319,
62,
17,
14,
16624,
14,
16302,
62,
6956,
62,
7890,
13,
40664,
2430,
81,
4943,
201,
198,
22915,
62,
7753,
796,
... | 2.378016 | 373 |
import os
import time
import math
import random
import numpy as np
import argparse
import torch
import torch.nn as nn
from yaml import parse
from gnn_data import GNN_DATA
from gnn_model import GIN_Net2, GIN_Net3
from utils import Metrictor_PPI, print_file
from tensorboardX import SummaryWriter
np.random.seed(1)
torc... | [
11748,
28686,
198,
11748,
640,
198,
11748,
10688,
198,
11748,
4738,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
1822,
29572,
198,
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
6738,
331,
43695,
1330,
21136,
198,
198,
... | 2.47875 | 800 |
import random
import sys
textfile = "wordlist.txt"
userinput = True
wordcounts = dict()
words = dict()
#Print an error and exit gracefully if wordlist is not found
try:
open(textfile)
except FileNotFoundError:
print(textfile + " not find. Please make sure it exists in current directory.")
sys.exit()
#Ope... | [
11748,
4738,
198,
11748,
25064,
198,
198,
5239,
7753,
796,
366,
4775,
4868,
13,
14116,
1,
198,
7220,
15414,
796,
6407,
198,
4775,
9127,
82,
796,
8633,
3419,
198,
10879,
796,
8633,
3419,
198,
198,
2,
18557,
281,
4049,
290,
8420,
11542,... | 2.51405 | 1,210 |
from Monument import Monument, Dataset
import importer_utils as utils
import importer as importer
if __name__ == "__main__":
"""Command line entry point for importer."""
args = importer.handle_args()
dataset = Dataset("se-ship", "sv", SeShipSv)
dataset.data_files = {
"functions": "se-ship_(sv... | [
6738,
33075,
1330,
33075,
11,
16092,
292,
316,
198,
11748,
848,
4337,
62,
26791,
355,
3384,
4487,
198,
11748,
848,
4337,
355,
848,
4337,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
37227... | 2.735294 | 136 |
from tensorflow.keras import backend as K
abs_definitions = [
{'name': 'add_class',
'nargs': '+',
'type': int,
'help': 'flag to add abstention (per task)'},
{'name': 'alpha',
'nargs': '+',
'type': float,
'help': 'abstention penalty coefficient (per task)'},
{'name': 'min_acc',... | [
6738,
11192,
273,
11125,
13,
6122,
292,
1330,
30203,
355,
509,
198,
198,
8937,
62,
4299,
50101,
796,
685,
198,
220,
220,
220,
1391,
6,
3672,
10354,
705,
2860,
62,
4871,
3256,
198,
220,
220,
220,
220,
705,
77,
22046,
10354,
705,
10,
... | 2.371383 | 622 |
# -*- coding: utf-8 -*-
'''
Authored by: Tim Keefer
Licensed under CDDL 1.0
'''
from datetime import datetime, timedelta
from ebaysdk.trading import Connection as Trading
from ebaysdk.poller import parse_args, file_lock
from ebaysdk import log
if __name__ == '__main__':
(opts, args) = parse_args("usage: pyth... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
7061,
6,
198,
30515,
1850,
416,
25,
5045,
3873,
41027,
198,
26656,
15385,
739,
6458,
19260,
352,
13,
15,
198,
7061,
6,
198,
198,
6738,
4818,
8079,
1330,
4818,
807... | 2.694805 | 154 |
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | [
2,
220,
220,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
345,
743,
198,
2,
220,
220,
220,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
921,
743,
7330,
198,
2,
220,
220,
... | 3.418605 | 215 |
from collections import Counter, deque
from random import choice, randint, shuffle
from typing import Dict, Iterable, List, Tuple
import numpy as np
from utils import helper_functions
import pathfinding
import cProfile
import functools
import pstats
import tempfile
| [
6738,
17268,
1330,
15034,
11,
390,
4188,
201,
198,
6738,
4738,
1330,
3572,
11,
43720,
600,
11,
36273,
201,
198,
6738,
19720,
1330,
360,
713,
11,
40806,
540,
11,
7343,
11,
309,
29291,
201,
198,
201,
198,
11748,
299,
32152,
355,
45941,
... | 3.25 | 88 |
import open3d as o3d
import numpy as np
# def draw_geometries(pcds):
# """
# Draw Geometries
# Args:
# - pcds (): [pcd1,pcd2,...]
# """
# o3d.visualization.draw_geometries(pcds)
# def get_o3d_FOR(origin=[0, 0, 0], size=10):
# """
# Create a FOR that can be added to the open3d po... | [
11748,
1280,
18,
67,
355,
267,
18,
67,
198,
11748,
299,
32152,
355,
45941,
628,
198,
2,
825,
3197,
62,
469,
908,
1678,
7,
14751,
9310,
2599,
198,
2,
220,
220,
220,
220,
37227,
198,
2,
220,
220,
220,
220,
15315,
2269,
908,
1678,
... | 2.263261 | 1,527 |
"""
Modules that can consolidate inputs from different sources
and produce combined output file (typically JSON).
"""
import os
import json
from pyveg.src.file_utils import save_json, get_tag
from pyveg.src.date_utils import get_date_strings_for_time_period
from pyveg.src.pyveg_pipeline import BaseModule, logger
cl... | [
37811,
198,
5841,
5028,
326,
460,
38562,
17311,
422,
1180,
4237,
198,
392,
4439,
5929,
5072,
2393,
357,
48126,
19449,
737,
198,
37811,
198,
11748,
28686,
198,
11748,
33918,
198,
198,
6738,
12972,
303,
70,
13,
10677,
13,
7753,
62,
26791,... | 2.063534 | 4,596 |
power = {'BUSES': {'Area': 1.33155,
'Bus/Area': 1.33155,
'Bus/Gate Leakage': 0.00662954,
'Bus/Peak Dynamic': 0.0,
'Bus/Runtime Dynamic': 0.0,
'Bus/Subthreshold Leakage': 0.0691322,
'Bus/Subthreshold Leakage with power gating': 0.0259246,
'Gate... | [
6477,
796,
1391,
6,
45346,
1546,
10354,
1391,
6,
30547,
10354,
352,
13,
2091,
18742,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
16286,
14,
30547,
10354,
352,
13,
2091,
18742,
11,
198,
220,
220,
220,
220,
220,
... | 2.341135 | 29,311 |
from setuptools import setup
setup(name='imgTransformer',
version='0.1',
description='Apply Affine transformations to images and to their corresponding box annotations(optional).',
url='https://bitbucket.org/aganitha/image-transformer',
author='Daksh Varshneya',
author_email='daksh@aganit... | [
6738,
900,
37623,
10141,
1330,
9058,
198,
198,
40406,
7,
3672,
11639,
9600,
8291,
16354,
3256,
198,
220,
220,
220,
220,
220,
2196,
11639,
15,
13,
16,
3256,
198,
220,
220,
220,
220,
220,
6764,
11639,
44836,
6708,
500,
38226,
284,
4263,... | 2.718121 | 149 |
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
from genomon_post_analysis import __version__
setup(name='genomon_post_analysis',
version=__version__,
description="parser result files created by genomon",
long_description="""\n
parser result files created by genomon (SV, mutaion-... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
900,
37623,
10141,
1330,
9058,
11,
1064,
62,
43789,
198,
6738,
2429,
16698,
62,
7353,
62,
20930,
1330,
11593,
9641,
834,
198,
198,
40406,
7,
3672,
11639,
5235... | 2.493827 | 405 |
import random
with open('in', 'w') as f:
for _ in xrange(1000):
x = random.randint(1, 100)
f.write(str(random.randint(1, 10**x)) + '\n')
| [
11748,
4738,
198,
198,
4480,
1280,
10786,
259,
3256,
705,
86,
11537,
355,
277,
25,
198,
220,
220,
220,
329,
4808,
287,
2124,
9521,
7,
12825,
2599,
198,
220,
220,
220,
220,
220,
220,
220,
2124,
796,
4738,
13,
25192,
600,
7,
16,
11,... | 2.051948 | 77 |
"""
drain.types.py
~~~~~~~~~~~~~~
Contains custom types definitions and utilities
"""
from .record import Record
from typing import (
Awaitable,
AsyncIterable,
Callable,
Union,
TypeVar,
)
RecordT = TypeVar("RecordT", bound=Record)
Source = AsyncIterable[RecordT]
Processor = Union[
Callable[[R... | [
37811,
198,
67,
3201,
13,
19199,
13,
9078,
198,
15116,
8728,
4907,
198,
198,
4264,
1299,
2183,
3858,
17336,
290,
20081,
198,
37811,
198,
6738,
764,
22105,
1330,
13266,
198,
6738,
19720,
1330,
357,
198,
220,
220,
220,
5851,
4548,
540,
... | 2.85034 | 147 |
"""
Functions for evaluating the performance of the model on the
squad dataset
Modified the official squad dataset evaluation script
"""
import string
import re
from collections import Counter
def normalize_answer(s):
"""Lower text and remove punctuation, articles, and extra whitespace."""
return white_space_fi... | [
37811,
198,
24629,
2733,
329,
22232,
262,
2854,
286,
262,
2746,
319,
262,
220,
198,
16485,
324,
27039,
198,
198,
5841,
1431,
262,
1743,
8244,
27039,
12660,
4226,
198,
37811,
198,
11748,
4731,
198,
11748,
302,
198,
6738,
17268,
1330,
150... | 3.530086 | 349 |
"""Policies
This script provides policies for RL algorithms.
Class:
* Model - (arbitrary) neural network architecture
* BetaActor - actor with beta policy
* GaussianActor - actor with gaussian policy
* Critic - state value function
* ActorCritic - actor and critic combined
"""
import torch
import ... | [
37811,
47,
4160,
444,
198,
198,
1212,
4226,
3769,
4788,
329,
45715,
16113,
13,
198,
198,
9487,
25,
198,
220,
220,
220,
1635,
9104,
532,
357,
283,
2545,
11619,
8,
17019,
3127,
10959,
198,
220,
220,
220,
1635,
17993,
40277,
532,
8674,
... | 3.527559 | 127 |
from django.db import models
from django.contrib.auth.models import User
from django_countries.fields import CountryField
# Imports so it can receive data from signals.py
from django.db.models.signals import post_save
from django.dispatch import receiver
# Create or update user profile
@receiver(post_save, sender=U... | [
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27530,
1330,
11787,
198,
6738,
42625,
14208,
62,
9127,
1678,
13,
25747,
1330,
12946,
15878,
198,
198,
2,
1846,
3742,
523,
340,
460,
3328,
... | 3.494624 | 93 |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'qrvt_dialog_about.ui'
#
# Created by: PyQt5 UI code generator 5.15.1
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import Qt... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
5178,
7822,
7560,
422,
3555,
334,
72,
2393,
705,
80,
81,
36540,
62,
38969,
519,
62,
10755,
13,
9019,
6,
198,
2,
198,
2,
15622,
416,
25,
9485,
48,
83,
20,
... | 2.965517 | 116 |
# Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Tests usage of i2c interface for beaglebone devices."""
import mox
import unittest
import bbi2c
DEFAULT_BUS_NUM = 3
SLAVE_ADDRESS = 0x20
DATA_ADDR... | [
2,
15069,
357,
66,
8,
2211,
383,
18255,
1505,
7294,
46665,
13,
1439,
2489,
10395,
13,
198,
2,
5765,
286,
428,
2723,
2438,
318,
21825,
416,
257,
347,
10305,
12,
7635,
5964,
326,
460,
307,
198,
2,
1043,
287,
262,
38559,
24290,
2393,
... | 2.885496 | 131 |
#!/usr/bin/python
# Copyright (c) Microsoft Corporation
# All rights reserved.
#
# 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 limitatio... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
15069,
357,
66,
8,
5413,
10501,
198,
2,
1439,
2489,
10395,
13,
198,
2,
198,
2,
17168,
13789,
198,
2,
198,
2,
2448,
3411,
318,
29376,
7520,
11,
1479,
286,
3877,
11,
284,
597,
1048,
16... | 2.187755 | 4,410 |
from __future__ import absolute_import
import unittest
import six
import dicttools
| [
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
198,
11748,
555,
715,
395,
198,
198,
11748,
2237,
198,
198,
11748,
8633,
31391,
628,
628
] | 3.56 | 25 |
# Inheritance
class Checking( Account ): # We pass the base class as an argument for Checking class to inherit
"""This class generates checking account objects""" # doc strings to describe a class
type = "checking" # is a class variable. declared outside the methods of a class. shared by all instan... | [
198,
2,
47025,
42942,
220,
198,
4871,
39432,
7,
10781,
15179,
220,
220,
220,
220,
220,
1303,
775,
1208,
262,
2779,
1398,
355,
281,
4578,
329,
39432,
1398,
284,
16955,
198,
220,
220,
220,
37227,
1212,
1398,
18616,
10627,
1848,
5563,
37... | 3.39213 | 737 |
import socket
from struct import pack
ip='192.168.8.211'
port='9999'
commands = {'on' : '{"system":{"set_relay_state":{"state":1}}}',
'off' : '{"system":{"set_relay_state":{"state":0}}}',
'info' : '{"system":{"get_sysinfo":{}}}'}
| [
11748,
17802,
198,
6738,
2878,
1330,
2353,
198,
198,
541,
11639,
17477,
13,
14656,
13,
23,
13,
21895,
6,
198,
634,
11639,
24214,
6,
198,
198,
9503,
1746,
796,
1391,
6,
261,
6,
220,
220,
220,
220,
220,
220,
1058,
705,
4895,
10057,
... | 2.133858 | 127 |
# Copyright 2018 JanusGraph Python Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | [
2,
15069,
2864,
2365,
385,
37065,
11361,
46665,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
... | 3.582633 | 357 |
"""Note: this code was modified from:
https://github.com/lpigou/Theano-3D-ConvNet/blob/master/LICENSE
by @lpigou and collaborators
"""
import numpy as np
import theano.tensor as T
import keras.backend as K
from keras.layers.core import Layer
class NormLayer(Layer):
""" Normalization layer """
def __init__(s... | [
37811,
6425,
25,
428,
2438,
373,
9518,
422,
25,
198,
198,
5450,
1378,
12567,
13,
785,
14,
34431,
328,
280,
14,
464,
5733,
12,
18,
35,
12,
3103,
85,
7934,
14,
2436,
672,
14,
9866,
14,
43,
2149,
24290,
198,
1525,
2488,
34431,
328,
... | 2.021386 | 1,169 |
import copy
import datetime
import logging
from dateutil import rrule
from datetime import timedelta, datetime
from spaceone.core.service import *
from spaceone.core import utils, config
from spaceone.cost_analysis.error import *
from spaceone.cost_analysis.model.job_task_model import JobTask
from spaceone.cost_analys... | [
11748,
4866,
198,
11748,
4818,
8079,
198,
11748,
18931,
198,
6738,
3128,
22602,
1330,
374,
25135,
198,
6738,
4818,
8079,
1330,
28805,
12514,
11,
4818,
8079,
198,
198,
6738,
2272,
505,
13,
7295,
13,
15271,
1330,
1635,
198,
6738,
2272,
50... | 3.768519 | 324 |
# TODO: временный файл - удалить
s = "программа"
s2 = 'продукт'
print(s)
print(s2)
# Использование служебных спецсимволов.
print("Программа 1\nПрограмма 2\nПрограмма 3\n\tЧасть 1\n\tЧасть 2")
print(len("12345\n"))
print("""Программа 1
Программа 2
Программа 3
Часть 1
Часть 2""")
print(r"Программа 1... | [
2,
16926,
46,
25,
12466,
110,
21169,
16843,
43108,
16843,
22177,
22177,
45035,
140,
117,
220,
141,
226,
16142,
140,
117,
30143,
532,
220,
35072,
43666,
16142,
30143,
18849,
20375,
45367,
198,
82,
796,
366,
140,
123,
21169,
25443,
111,
2... | 1.127946 | 297 |
# 2. (Função sem retorno sem parâmetro) Faça uma função/método que leia dois valores positivos e apresente a soma dos N números existentes entre eles (inclusive).
main()
| [
2,
362,
13,
357,
24629,
16175,
28749,
5026,
1005,
46447,
5026,
1582,
22940,
4164,
305,
8,
18350,
50041,
334,
2611,
1257,
16175,
28749,
14,
76,
25125,
24313,
8358,
443,
544,
466,
271,
1188,
2850,
46436,
452,
418,
304,
2471,
2028,
68,
2... | 2.514286 | 70 |
import os
from gym import spaces
import numpy as np
import gym
class Point(gym.Env):
"""Superclass for all MuJoCo environments.
"""
@property
@property
| [
11748,
28686,
198,
6738,
11550,
1330,
9029,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
11550,
628,
198,
4871,
6252,
7,
1360,
76,
13,
4834,
85,
2599,
198,
220,
220,
220,
37227,
12442,
4871,
329,
477,
8252,
9908,
7222,
12493,
13,
1... | 2.915254 | 59 |
# -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2019-01-31 18:13
from __future__ import unicode_literals
from django.db import migrations, models
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2980,
515,
416,
37770,
352,
13,
940,
13,
22,
319,
13130,
12,
486,
12,
3132,
1248,
25,
1485,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
... | 2.736842 | 57 |
# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.model.utils import get_fetch_values
from frappe.model.mapper import get_mapped_doc
from frappe.utils imp... | [
2,
15069,
357,
66,
8,
2177,
11,
39313,
27768,
21852,
18367,
83,
13,
12052,
13,
290,
25767,
669,
198,
2,
13789,
25,
22961,
3611,
5094,
13789,
410,
18,
13,
4091,
5964,
13,
14116,
198,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
6... | 2.785714 | 406 |
import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="HC-05-ConfigTool",
version="0.1.1",
author="Joseph Lam",
author_email="mhlamaf@connect.ust.hk",
description="A terminal tool for configuring HC-05 with AT mode.",
long_description=long... | [
11748,
900,
37623,
10141,
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,
2617,
37623,
10141,
13,
40406,
7,
198,
... | 2.576923 | 442 |
"""Tests for backref schemas processing."""
import pytest
from open_alchemy.schemas import helpers
@pytest.mark.parametrize(
"schema, schemas, expected_backref",
[
pytest.param({}, {}, None, id="no items, allOf nor $ref"),
pytest.param(
{"$ref": "#/components/schemas/RefSchema"},... | [
37811,
51,
3558,
329,
736,
5420,
3897,
5356,
7587,
526,
15931,
198,
198,
11748,
12972,
9288,
198,
198,
6738,
1280,
62,
282,
26599,
13,
1416,
4411,
292,
1330,
49385,
628,
198,
31,
9078,
9288,
13,
4102,
13,
17143,
316,
380,
2736,
7,
1... | 1.833498 | 3,045 |
# -*- coding: utf-8 -*-
from django.db import models
from django.contrib.auth.models import User
from wechat_client import weclient
import os
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27530,
1330,
11787,
198,
6738,
356,
17006,
62,
16366,
1330,
356,
16366,
... | 3 | 48 |
# ---
# jupyter:
# jupytext:
# text_representation:
# extension: .py
# format_name: percent
# format_version: '1.3'
# jupytext_version: 1.12.0
# kernelspec:
# display_name: 'Python 3.7.7 64-bit (''.venv'': poetry)'
# name: python3
# ---
# %% [markdown]
# # Interactive plots to e... | [
2,
11420,
198,
2,
474,
929,
88,
353,
25,
198,
2,
220,
220,
474,
929,
88,
5239,
25,
198,
2,
220,
220,
220,
220,
2420,
62,
15603,
341,
25,
198,
2,
220,
220,
220,
220,
220,
220,
7552,
25,
764,
9078,
198,
2,
220,
220,
220,
220,
... | 2.36509 | 1,501 |
import os
from pickle import dump
from time import time
from keras.applications.inception_v3 import InceptionV3
from keras.models import Model
from src.lib.libic import init, set_opener
from src.lib.model_lib import feature_extractor
if __name__ == '__main__':
parameters = initialize()
total, start = proc... | [
11748,
28686,
198,
6738,
2298,
293,
1330,
10285,
198,
6738,
640,
1330,
640,
198,
6738,
41927,
292,
13,
1324,
677,
602,
13,
924,
1159,
62,
85,
18,
1330,
554,
4516,
53,
18,
198,
6738,
41927,
292,
13,
27530,
1330,
9104,
198,
198,
6738,... | 3.040268 | 149 |
# -*- coding: utf-8 -*-
"""
Written by Daniel M. Aukes and CONTRIBUTORS
Email: danaukes<at>asu.edu.
Please see LICENSE for full license.
"""
import popupcad
import numpy
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
25354,
416,
7806,
337,
13,
317,
31469,
290,
27342,
9865,
3843,
20673,
198,
15333,
25,
46078,
559,
5209,
27,
265,
29,
27345,
13,
15532,
13,
198,
5492,
766,
... | 2.714286 | 63 |
import dgl
import numpy as np
from pathlib import Path
import torch
from deepstochlog.term import Term, List
from deepstochlog.context import ContextualizedTerm, Context
from deepstochlog.dataset import ContextualizedTermDataset
root_path = Path(__file__).parent
dataset = dgl.data.CiteseerGraphDataset()
g = dataset... | [
11748,
288,
4743,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
3108,
8019,
1330,
10644,
198,
11748,
28034,
198,
6738,
2769,
301,
5374,
6404,
13,
4354,
1330,
35118,
11,
7343,
198,
6738,
2769,
301,
5374,
6404,
13,
22866,
1330,
30532,
72... | 2.568047 | 507 |
import numpy as np
import matplotlib.pyplot as plt
from sklearn.cluster import AgglomerativeClustering
from sklearn.datasets import make_blobs
n_samples = 200
random_state = 10
X, y = make_blobs(n_samples=n_samples, random_state=random_state)
y_predicted = AgglomerativeClustering(n_clusters=3).fit_predict(X)... | [
11748,
299,
32152,
355,
45941,
201,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
201,
198,
6738,
1341,
35720,
13,
565,
5819,
1330,
19015,
75,
12057,
876,
2601,
436,
1586,
201,
198,
6738,
1341,
35720,
13,
19608,
292,
1... | 2.21466 | 573 |
import arrow
from test.base import BaseTest
from test.functional.base_functional import BaseServerRestApi
| [
11748,
15452,
198,
198,
6738,
1332,
13,
8692,
1330,
7308,
14402,
198,
6738,
1332,
13,
45124,
13,
8692,
62,
45124,
1330,
7308,
10697,
19452,
32,
14415,
628
] | 4 | 27 |
'''Models: base class definitions.'''
###############################################################################
## For reference:
## Throughout this library, we work with the tacit assumption
## that the "parameters" (i.e., values of "paras" dicts) are
## such that paras[key].ndim >= 2, even if they are in es... | [
7061,
6,
5841,
1424,
25,
2779,
1398,
17336,
2637,
7061,
628,
198,
29113,
29113,
7804,
4242,
21017,
628,
198,
2235,
1114,
4941,
25,
198,
2235,
24581,
428,
5888,
11,
356,
670,
351,
262,
40787,
13196,
198,
2235,
326,
262,
366,
17143,
730... | 2.604714 | 1,103 |
#/usr/bin/python3
import os
| [
2,
14,
14629,
14,
8800,
14,
29412,
18,
198,
11748,
28686,
198
] | 2.333333 | 12 |
# This code fills superpixels by scribbling over the image with a given labeled color.
# It requires all jpg faces storaged in the same folder and the .dat super-pixels in the same LFW format.
# R. Redondo, Eurecat 2019 (c).
import numpy as np
import operator
import cv2
import os
import sys
resize = 3
pointer = (-1,-... | [
2,
770,
2438,
23816,
2208,
79,
14810,
416,
44661,
11108,
625,
262,
2939,
351,
257,
1813,
15494,
3124,
13,
198,
2,
632,
4433,
477,
474,
6024,
6698,
336,
273,
1886,
287,
262,
976,
9483,
290,
262,
764,
19608,
2208,
12,
79,
14810,
287,
... | 2.185922 | 2,614 |
import numpy as np
from benchmark.analyzer.analyzer import Analyzer
from pymoo.indicators.igd import IGD
from pymoo.util.misc import from_dict
| [
11748,
299,
32152,
355,
45941,
198,
198,
6738,
18335,
13,
38200,
9107,
13,
38200,
9107,
1330,
16213,
9107,
198,
6738,
279,
4948,
2238,
13,
521,
44549,
13,
328,
67,
1330,
35336,
35,
198,
6738,
279,
4948,
2238,
13,
22602,
13,
44374,
133... | 3.104167 | 48 |
import datetime
from .base import BaseReader
| [
11748,
4818,
8079,
198,
198,
6738,
764,
8692,
1330,
7308,
33634,
628
] | 3.916667 | 12 |
import json
import os
import constants
import accounts
| [
11748,
33918,
198,
11748,
28686,
198,
11748,
38491,
198,
11748,
5504,
628
] | 4.666667 | 12 |
from __future__ import print_function, division
import numpy as np
from numpy import diff, concatenate
import gc
from .goodsectionsresults import GoodSectionsResults
from ..timeframe import TimeFrame
from ..utils import timedelta64_to_secs
from ..node import Node
from ..timeframe import list_of_timeframes_from_list_of_... | [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
11,
7297,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
299,
32152,
1330,
814,
11,
1673,
36686,
378,
198,
11748,
308,
66,
198,
6738,
764,
11274,
23946,
43420,
1330,
4599,
50,
478,
507,
2... | 2.479695 | 2,364 |
from core import colors
version = "pre-1.0"
apiversion = "pre-1.0"
update_date = "2021-07-11"
codename = "phoenix"
about = ("Hakku Framework "+version+" "+codename+
"\nauthor: Noa-Emil Nissinen (4shadoww)"
"\nemail: 4shadoww0@gmail.com"
"\ngithub: 4shadoww")
| [
6738,
4755,
1330,
7577,
198,
198,
9641,
796,
366,
3866,
12,
16,
13,
15,
1,
198,
499,
1191,
295,
796,
366,
3866,
12,
16,
13,
15,
1,
198,
19119,
62,
4475,
796,
366,
1238,
2481,
12,
2998,
12,
1157,
1,
198,
19815,
12453,
796,
366,
... | 2.372727 | 110 |
# -*- coding:utf-8 -*-
import pandas as pd
import numpy as np
import math as math
import os
import time
from sklearn.svm import SVC
from models.cpuutils import *
from sklearn.externals import joblib
import tensorflow as tf
import time
| [
2,
532,
9,
12,
19617,
25,
40477,
12,
23,
532,
9,
12,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
10688,
355,
10688,
198,
11748,
28686,
198,
11748,
640,
198,
6738,
1341,
35720,
13,
82,
14761,... | 3.105263 | 76 |
# -*- coding: utf-8 -*-
# standard library
from enum import Enum
from typing import Dict, Optional
# scip plugin
from eureka.client.app_info.lease_info import LeaseInfo
from eureka.utils.timestamp import current_timestamp
__author__ = "Haribo (haribo1558599@gmail.com)"
__license__ = "Apache 2.0"
class InstanceInfo... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
3210,
5888,
198,
6738,
33829,
1330,
2039,
388,
198,
6738,
19720,
1330,
360,
713,
11,
32233,
198,
198,
2,
629,
541,
13877,
198,
6738,
304,
495,
4914,
13,
16366,... | 2.46547 | 3,678 |
import functools
import torch.nn as nn
import torch
import numpy as np
from edflow.util import retrieve
_norm_options = {
"in": nn.InstanceNorm2d,
"bn": nn.BatchNorm2d,
"an": ActNorm}
| [
11748,
1257,
310,
10141,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
28034,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
1225,
11125,
13,
22602,
1330,
19818,
628,
198,
198,
62,
27237,
62,
25811,
796,
1391,
198,
220,
220,
... | 2.291667 | 96 |
# -*- coding: utf-8 -*-
"""
Created on Sun May 1 15:02:38 2016
@author: eman
"""
from sklearn.discriminant_analysis import LinearDiscriminantAnalysis as LDA
from sklearn.metrics import accuracy_score, precision_score, f1_score, \
fbeta_score, recall_score
from skll.metrics import kappa
imp... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
3825,
1737,
220,
352,
1315,
25,
2999,
25,
2548,
1584,
198,
198,
31,
9800,
25,
31184,
198,
37811,
198,
6738,
1341,
35720,
13,
15410,
3036,
42483,
... | 2.505691 | 615 |
# Generated by Django 3.2.7 on 2021-10-31 22:24
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
17,
13,
22,
319,
33448,
12,
940,
12,
3132,
2534,
25,
1731,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
import numpy as np
from time import time
| [
11748,
299,
32152,
355,
45941,
198,
6738,
640,
1330,
640,
628
] | 3.818182 | 11 |
"""
`dumpdbfields` demonstrates how to enumerate tables and records.
"""
import os
import os.path
from Database import Database
if __name__ == "__main__":
main()
| [
37811,
198,
63,
39455,
9945,
25747,
63,
15687,
703,
284,
27056,
378,
8893,
290,
4406,
13,
198,
37811,
198,
11748,
28686,
198,
11748,
28686,
13,
6978,
198,
6738,
24047,
1330,
24047,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
... | 3.313725 | 51 |
"""Support for winrm commands to turn a switch on/off."""
import logging
import winrm
import voluptuous as vol
from homeassistant.components.switch import (
ENTITY_ID_FORMAT,
PLATFORM_SCHEMA,
SwitchDevice,
)
from homeassistant.const import (
CONF_COMMAND_OFF,
CONF_COMMAND_ON,
CONF_COMMAND_STA... | [
37811,
15514,
329,
1592,
26224,
9729,
284,
1210,
257,
5078,
319,
14,
2364,
526,
15931,
198,
11748,
18931,
198,
198,
11748,
1592,
26224,
198,
198,
11748,
2322,
37623,
5623,
355,
2322,
198,
198,
6738,
1363,
562,
10167,
13,
5589,
3906,
13,... | 2.201214 | 3,131 |
import toolz as tz
from call_map.core import UserScopeSettings, ScopeSettings, OrganizerNode
from call_map.jedi_dump import make_scope_settings
from call_map import project_settings_module
from call_map.project_settings_module import Project
from pathlib import Path
from sys import path as runtime_sys_path
test_modul... | [
11748,
2891,
89,
355,
256,
89,
198,
198,
6738,
869,
62,
8899,
13,
7295,
1330,
11787,
43642,
26232,
11,
41063,
26232,
11,
7221,
7509,
19667,
198,
6738,
869,
62,
8899,
13,
73,
13740,
62,
39455,
1330,
787,
62,
29982,
62,
33692,
198,
67... | 2.543561 | 528 |
# Copyright 2020 Aeris Communications 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | [
2,
15069,
12131,
15781,
271,
14620,
3457,
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,
351,
262,
13789,
13,
198,
... | 3.875 | 160 |
# Exercício 031 - Custo da Viagem
km = float(input('Qual é a distância da sua viagem? '))
if km <= 200:
preco = 0.50 * km
else:
preco = 0.45 * km
print(f'Você está prestes a começar uma viagem de {km:.1f}Km.')
print(f'E o preço da sua passagem será de R${preco:.2f}')
| [
2,
1475,
2798,
8836,
66,
952,
657,
3132,
532,
40619,
78,
12379,
16049,
363,
368,
198,
198,
13276,
796,
12178,
7,
15414,
10786,
46181,
38251,
257,
1233,
22940,
10782,
544,
12379,
424,
64,
25357,
363,
368,
30,
705,
4008,
198,
198,
361,
... | 2.036496 | 137 |
# File: ds_abstract_service.py
#
# Licensed under Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt)
#
from abc import ABCMeta
from ..httplib2 import Http, ProxyInfo, socks, proxy_info_from_environment
from dsapi.config.ds_proxy_config import DSProxyConfig
class DSAbstractService(object, metaclass=ABCMeta... | [
2,
9220,
25,
288,
82,
62,
397,
8709,
62,
15271,
13,
9078,
198,
2,
198,
2,
49962,
739,
24843,
362,
13,
15,
357,
5450,
1378,
2503,
13,
43073,
13,
2398,
14,
677,
4541,
14,
43,
2149,
24290,
12,
17,
13,
15,
13,
14116,
8,
198,
2,
... | 2.404088 | 636 |
import re
texto = 'Testando, grupos especias!'
texto2 = 'supermercado superacao hiperMERCADO'
# lookahead
print(re.findall(r'\w+(?=,|!)', texto))
# lookbehind
# positive
print(re.findall(r'(?<=super)\w+', texto2))
# negative
print(re.findall(r'(?<!super)mercado', texto2, re.IGNORECASE))
| [
11748,
302,
198,
198,
5239,
78,
796,
705,
14402,
25440,
11,
22848,
1930,
1658,
431,
979,
292,
13679,
198,
198,
5239,
78,
17,
796,
705,
16668,
647,
66,
4533,
2208,
330,
5488,
289,
9346,
29296,
34,
2885,
46,
6,
198,
198,
2,
804,
382... | 2.212121 | 132 |
import pytest
import os
SERVICE_CONFIG_NAME = "service_manifest.yml"
TEMP_SERVICE_CONFIG_PATH = os.path.join("/tmp", SERVICE_CONFIG_NAME)
@pytest.fixture
@pytest.fixture
@pytest.fixture
| [
11748,
12972,
9288,
198,
11748,
28686,
198,
198,
35009,
27389,
62,
10943,
16254,
62,
20608,
796,
366,
15271,
62,
805,
8409,
13,
88,
4029,
1,
198,
51,
39494,
62,
35009,
27389,
62,
10943,
16254,
62,
34219,
796,
28686,
13,
6978,
13,
2217... | 2.457831 | 83 |
import os
import env
import tweepy
from tweepy import OAuthHandler
### Twitter Authentication
CONSUMER_KEY = os.environ.get("CONSUMER_KEY")
CONSUMER_SECRET = os.environ.get("CONSUMER_SECRET")
OAUTH_TOKEN = os.environ.get("OAUTH_TOKEN")
OAUTH_TOKEN_SECRET = os.environ.get("OAUTH_TOKEN_SECRET")
auth = OAuthHandler(CON... | [
11748,
28686,
198,
11748,
17365,
198,
11748,
4184,
538,
88,
198,
6738,
4184,
538,
88,
1330,
440,
30515,
25060,
198,
198,
21017,
3009,
48191,
198,
198,
10943,
50,
5883,
1137,
62,
20373,
796,
28686,
13,
268,
2268,
13,
1136,
7203,
10943,
... | 2.430168 | 179 |
# coding=utf-8
import collections
import pandas as pd
import tensorflow as tf
import _pickle as pickle
from absl import logging
from transformers import BertTokenizer
LABELS = []
if __name__ == "__main__":
main()
| [
2,
19617,
28,
40477,
12,
23,
198,
198,
11748,
17268,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
11748,
4808,
27729,
293,
355,
2298,
293,
198,
6738,
2352,
75,
1330,
18931,
198,
6738,
6121,
364... | 3.066667 | 75 |
from __future__ import annotations
import datetime
import math
import enum
import time
from abc import abstractmethod
DAYS_CCSDS_TO_UNIX = -4383
SECONDS_PER_DAY = 86400
UNIX_EPOCH = datetime.datetime.utcfromtimestamp(0)
def convert_unix_days_to_ccsds_days(unix_days: int) -> int:
"""Convert Unix days to CCSDS da... | [
6738,
11593,
37443,
834,
1330,
37647,
198,
11748,
4818,
8079,
198,
11748,
10688,
198,
11748,
33829,
198,
11748,
640,
198,
6738,
450,
66,
1330,
12531,
24396,
198,
198,
26442,
50,
62,
4093,
50,
5258,
62,
10468,
62,
4944,
10426,
796,
532,
... | 2.463989 | 722 |
# File: exp.py
# Author: raycp
# Date: 2019-06-06
# Description: exp for three, uaf to brute force to overwrite stdout to leak libc
from pwn_debug import *
pdbg=pwn_debug("./three")
pdbg.context.terminal=['tmux', 'splitw', '-h']
#pdbg.local()
pdbg.debug("2.27")
#pdbg.remote('127.0.0.1', 22)
#p=pdbg.run("local")
#p... | [
2,
9220,
25,
1033,
13,
9078,
198,
2,
6434,
25,
26842,
13155,
198,
2,
7536,
25,
13130,
12,
3312,
12,
3312,
198,
2,
12489,
25,
1033,
329,
1115,
11,
334,
1878,
284,
33908,
2700,
284,
49312,
14367,
448,
284,
13044,
9195,
66,
198,
198,... | 2.106299 | 254 |
#!/usr/bin/env python
# encoding: utf-8
import eventlet
import pytun
import os
import sys
eventlet.monkey_patch(all=True)
tap = pytun.open('tap')
os.system("ip link set %s up" % tap.name)
os.system("ip link set dev %s mtu 520" % tap.name)
os.system("ip addr add 192.167.100.1/24 dev %s" % tap.name)
eventlet.spawn_n... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
21004,
25,
3384,
69,
12,
23,
198,
198,
11748,
1785,
1616,
198,
11748,
12972,
28286,
198,
11748,
28686,
198,
11748,
25064,
198,
198,
15596,
1616,
13,
49572,
62,
17147,
7,
439,
28,
... | 2.358333 | 240 |
import sys;
import abc;
import math;
import multiprocessing;
import psutil;
import numpy as np;
from scipy.stats import t, f;
import DataHelper;
'''
d
f(x) = Σ βj * x^d
j=0
degree of freedom = d + 1
'''
'''
K
f(x) = β0 + Σβk * I(Ck < x <= Ck+1)
k=1
degree of freedom = K + 1
... | [
11748,
25064,
26,
198,
11748,
450,
66,
26,
198,
11748,
10688,
26,
198,
11748,
18540,
305,
919,
278,
26,
198,
11748,
26692,
22602,
26,
198,
11748,
299,
32152,
355,
45941,
26,
198,
6738,
629,
541,
88,
13,
34242,
1330,
256,
11,
277,
26... | 1.646465 | 495 |
# -*- coding: utf-8 -*-
#
# Django components
#
# :copyright: 2020 Sonu Kumar
# :license: BSD-3-Clause
#
from .utils import DefaultDjangoContextBuilder, DjangoNotification, DefaultDjangoViewPermission
from .settings import *
from .utils import DjangoNotification, DefaultDjangoContextBuilder
from error_track... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
198,
2,
220,
220,
220,
37770,
6805,
198,
2,
198,
2,
220,
220,
220,
1058,
22163,
4766,
25,
12131,
6295,
84,
26105,
198,
2,
220,
220,
220,
1058,
43085,
25,
347,
1... | 2.553041 | 707 |
sandwich('Jamon','Queso','Lechuga','Toamte')
sandwich('Queso','Mantequilla')
sandwich('Tocino','Carne','Salsa BBQ') | [
198,
38142,
11451,
10786,
41,
16487,
41707,
48,
947,
78,
41707,
43,
3055,
30302,
41707,
2514,
321,
660,
11537,
198,
38142,
11451,
10786,
48,
947,
78,
41707,
44,
415,
4853,
5049,
11537,
198,
38142,
11451,
10786,
51,
420,
2879,
41707,
991... | 2.468085 | 47 |
"""
@Time : 2021/6/23 17:08
@File : convnet.py
@Software: PyCharm
@Desc :
"""
from typing import Union, List
import torch.nn as nn
class ResidualBlock1D(nn.Module):
"""
The basic block of the 1d residual convolutional network
"""
def __init__(self, in_channel, out_channel, kernel_size=7, s... | [
37811,
198,
31,
7575,
220,
220,
220,
1058,
33448,
14,
21,
14,
1954,
1596,
25,
2919,
198,
31,
8979,
220,
220,
220,
1058,
3063,
3262,
13,
9078,
198,
31,
25423,
25,
9485,
1925,
1670,
198,
31,
24564,
220,
220,
220,
1058,
220,
198,
378... | 1.995789 | 950 |
from os.path import basename
from enum import IntEnum
from re import search
from dataclasses import dataclass
from cw_map import Map
SECTION_REGEX = r"^\s*.section\s+(?P<Name>.[a-zA-Z0-9_$]+)"
@dataclass
@dataclass | [
6738,
28686,
13,
6978,
1330,
1615,
12453,
198,
6738,
33829,
1330,
2558,
4834,
388,
198,
6738,
302,
1330,
2989,
198,
6738,
4818,
330,
28958,
1330,
4818,
330,
31172,
198,
6738,
269,
86,
62,
8899,
1330,
9347,
198,
198,
50,
24565,
62,
315... | 2.552941 | 85 |
from .helper import *
| [
6738,
764,
2978,
525,
1330,
1635,
628
] | 3.285714 | 7 |
import moeda
p = float(input("Digite um preço: R$"))
aum = int(input("Aumento de quantos %: "))
red = int(input('Reduzindo de quantos %: '))
moeda.resumo(p, aum, red)
| [
11748,
6941,
18082,
198,
198,
79,
796,
12178,
7,
15414,
7203,
19511,
578,
23781,
662,
16175,
78,
25,
371,
3,
48774,
198,
26043,
796,
493,
7,
15414,
7203,
32,
1713,
78,
390,
5554,
418,
4064,
25,
366,
4008,
198,
445,
796,
493,
7,
15... | 2.366197 | 71 |
from . import compat
have_greenlet = False
if compat.py3k:
try:
import greenlet # noqa F401
except ImportError:
pass
else:
have_greenlet = True
from ._concurrency_py3k import await_only
from ._concurrency_py3k import await_fallback
from ._concurrency_py3k i... | [
6738,
764,
1330,
8330,
198,
198,
14150,
62,
14809,
1616,
796,
10352,
198,
198,
361,
8330,
13,
9078,
18,
74,
25,
198,
220,
220,
220,
1949,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1330,
4077,
1616,
220,
1303,
645,
20402,
376,
21... | 2.315341 | 352 |
from tkPDFViewer import tkPDFViewer as pdf
from tkinter import *
from PySide2 import QtCore
from PySide2.QtCore import *
from PySide2.QtGui import *
from PySide2.QtWidgets import *
from PySide2.QtWebEngineWidgets import *
from PySide2 import QtCore
from functools import partial
import json
import validators
import sys
... | [
6738,
256,
74,
20456,
7680,
263,
1330,
256,
74,
20456,
7680,
263,
355,
37124,
198,
6738,
256,
74,
3849,
1330,
1635,
198,
6738,
9485,
24819,
17,
1330,
33734,
14055,
198,
6738,
9485,
24819,
17,
13,
48,
83,
14055,
1330,
1635,
198,
6738,
... | 2.72545 | 1,446 |
#!/usr/bin/env python3
import click
import os
import sys
import toml
lu = { 'text': 'TEXT', 'real': 'DOUBLE PRECISION', 'time': 'TIMESTAMPTZ NOT NULL' }
@click.command()
@click.option('--no-geo-join', default=False, is_flag=True, show_default=True,
help="Don't produce the joined view to lat/lon, for example if th... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
11748,
3904,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
284,
4029,
198,
198,
2290,
796,
1391,
705,
5239,
10354,
705,
32541,
3256,
705,
5305,
10354,
705,
35,
2606,
19146,
22814... | 2.690476 | 168 |
"""Features to allow run restart from a given step."""
from argparse import ArgumentTypeError
from functools import partial
from haddock.libs.libutil import non_negative_int, remove_folder
_help_cli = """Restart the run from a given step. Previous folders from
the selected step onward will be deleted."""
_arg_non_... | [
37811,
23595,
284,
1249,
1057,
15765,
422,
257,
1813,
2239,
526,
15931,
198,
6738,
1822,
29572,
1330,
45751,
6030,
12331,
198,
6738,
1257,
310,
10141,
1330,
13027,
198,
198,
6738,
550,
67,
735,
13,
8019,
82,
13,
8019,
22602,
1330,
1729,... | 2.571936 | 563 |
# -*- coding: utf-8 -*-
"""Parses for MacOS Wifi log (wifi.log) files."""
import re
import pyparsing
from dfdatetime import time_elements as dfdatetime_time_elements
from plaso.containers import events
from plaso.containers import time_events
from plaso.lib import errors
from plaso.lib import definitions
from plaso... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
47,
945,
274,
329,
4100,
2640,
370,
22238,
2604,
357,
86,
22238,
13,
6404,
8,
3696,
526,
15931,
198,
198,
11748,
302,
198,
198,
11748,
279,
4464,
945,
278,
198,... | 2.496782 | 4,195 |
MAX_NUM_PROCESSES = 4
REPO_URL = 'https://api.github.com/repos/srp33/WishBuilder/'
WB_DIRECTORY = '/app/'
SQLITE_FILE = WB_DIRECTORY + 'WishBuilderCI/history.sql'
TESTING_LOCATION = WB_DIRECTORY + 'WishBuilderCI/testing/'
RAW_DATA_STORAGE = WB_DIRECTORY + 'RawDatasets/'
GENEY_DATA_LOCATION = WB_DIRECTORY + 'GeneyDatase... | [
22921,
62,
41359,
62,
4805,
4503,
7597,
1546,
796,
604,
198,
2200,
16402,
62,
21886,
796,
705,
5450,
1378,
15042,
13,
12567,
13,
785,
14,
260,
1930,
14,
27891,
79,
2091,
14,
54,
680,
32875,
14,
6,
198,
45607,
62,
17931,
23988,
15513... | 2.422259 | 611 |
import subprocess
| [
11748,
850,
14681,
628,
628
] | 4.2 | 5 |
import numpy as np
from rlkit.data_management.obs_dict_replay_buffer import \
ObsDictRelabelingBuffer
from rlkit.samplers.rollout_functions import (
create_rollout_function,
multitask_rollout,
)
from rlkit.torch.her.her import HER
from rlkit.torch.sac.sac import TwinSAC
| [
11748,
299,
32152,
355,
45941,
198,
6738,
374,
75,
15813,
13,
7890,
62,
27604,
13,
8158,
62,
11600,
62,
260,
1759,
62,
22252,
1330,
3467,
198,
220,
220,
220,
11086,
35,
713,
6892,
9608,
278,
28632,
198,
6738,
374,
75,
15813,
13,
376... | 2.654206 | 107 |
from pyqode.core import modes
from qtpy import QtGui
| [
6738,
12972,
80,
1098,
13,
7295,
1330,
12881,
198,
6738,
10662,
83,
9078,
1330,
33734,
8205,
72,
628,
628,
198
] | 2.85 | 20 |
import numpy as np
from sklearn import metrics
def reformat_train_ratings(train_data):
"""
@param train_data: data ratings for train
"""
train_data = train_data.tolist()
train_data = sorted(train_data, key=lambda key: key[1], reverse=False)
return np.array(train_data)
| [
11748,
299,
32152,
355,
45941,
198,
6738,
1341,
35720,
1330,
20731,
628,
198,
198,
4299,
4975,
265,
62,
27432,
62,
10366,
654,
7,
27432,
62,
7890,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
220,
220,
220,
220,
2488,
17143,
... | 2.672566 | 113 |
from .config import configure
| [
6738,
764,
11250,
1330,
17425,
628
] | 5.166667 | 6 |
<warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6 do not have type long. Use int instead.">long("abc")</warning> | [
27,
43917,
1715,
81,
2625,
37906,
2196,
513,
13,
15,
11,
513,
13,
16,
11,
513,
13,
17,
11,
513,
13,
18,
11,
513,
13,
19,
11,
513,
13,
20,
11,
513,
13,
21,
466,
407,
423,
2099,
890,
13,
5765,
493,
2427,
526,
29,
6511,
7203,
... | 2.442308 | 52 |
# For testing that invalid plugin raising error doesn't break the app
raise BaseException('Must be caught in plugin module')
| [
2,
1114,
4856,
326,
12515,
13877,
8620,
4049,
1595,
470,
2270,
262,
598,
198,
40225,
7308,
16922,
10786,
34320,
307,
4978,
287,
13877,
8265,
11537,
198
] | 4.807692 | 26 |
from django.conf.urls import url
from django.views.decorators.csrf import csrf_exempt
from .views import SearchPriceView, SearchPlacesView, ContactView, FavouriteView
urlpatterns = [
url(r'prices/(?P<type>1|2)/$', SearchPriceView.as_view(), name='search_prices'),
url(r'places/(?P<name>\w+)/$', SearchPlacesVie... | [
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
19016,
198,
6738,
42625,
14208,
13,
33571,
13,
12501,
273,
2024,
13,
6359,
41871,
1330,
269,
27891,
69,
62,
42679,
198,
198,
6738,
764,
33571,
1330,
11140,
18124,
7680,
11,
11140,
3646,... | 2.482759 | 232 |
from sims4.tuning.tunable import HasTunableFactory, AutoFactoryInit, Tunable, TunableTuple, TunableVariant
| [
6738,
985,
82,
19,
13,
28286,
278,
13,
28286,
540,
1330,
7875,
51,
403,
540,
22810,
11,
11160,
22810,
31768,
11,
13932,
540,
11,
13932,
540,
51,
29291,
11,
13932,
540,
23907,
415,
198
] | 3.147059 | 34 |
import setuptools
setuptools.setup(
name="vrpy",
version="0.5.0",
description="A python framework for solving vehicle routing problems",
license="MIT",
author="Romain Montagne, David Torres",
author_email="r.montagne@hotmail.fr",
keywords=["vehicle routing problem", "vrp", "column generatio... | [
11748,
900,
37623,
10141,
198,
198,
2617,
37623,
10141,
13,
40406,
7,
198,
220,
220,
220,
1438,
2625,
37020,
9078,
1600,
198,
220,
220,
220,
2196,
2625,
15,
13,
20,
13,
15,
1600,
198,
220,
220,
220,
6764,
2625,
32,
21015,
9355,
329,... | 2.683706 | 313 |
from auxiliaries import datetime_from_epoch
from auxiliaries import set_verbosity
from globalvalues import ANSI_RESET, ANSI_YEL, ANSI_GR, ANSI_RED
from globalvalues import NETWORK_LED_BLINK_PERIOD_S
from globalvalues import DEFAULT_DATA_BACKLOG_FILE
from globalvalues import CPM_DISPLAY_TEXT
from globalvalues import str... | [
6738,
27506,
2403,
3166,
1330,
4818,
8079,
62,
6738,
62,
538,
5374,
198,
6738,
27506,
2403,
3166,
1330,
900,
62,
19011,
16579,
198,
6738,
3298,
27160,
1330,
3537,
11584,
62,
19535,
2767,
11,
3537,
11584,
62,
56,
3698,
11,
3537,
11584,
... | 1.77783 | 4,276 |
from typing import Type
from linum.excel_renderer.base.date_cell import DateCell
from linum.excel_renderer.base.date_row import DateRow
from linum.excel_renderer.calendar.space.space_cell import SpaceCell
| [
6738,
19720,
1330,
5994,
198,
198,
6738,
9493,
388,
13,
1069,
5276,
62,
10920,
11882,
13,
8692,
13,
4475,
62,
3846,
1330,
7536,
28780,
198,
6738,
9493,
388,
13,
1069,
5276,
62,
10920,
11882,
13,
8692,
13,
4475,
62,
808,
1330,
7536,
... | 3.136364 | 66 |