content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'Stefan Jansen'
import numpy as np
np.random.seed(42)
def format_time(t):
"""Return a formatted time string 'HH:MM:SS
based on a numeric time() value"""
m, s = divmod(t, 60)
h, m = divmod(m, 60)
return f'{h:0>2.0f}:{m:0>2.0f}:{s:0>2.0f}'... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
834,
9800,
834,
796,
705,
7447,
24408,
449,
33807,
6,
198,
198,
11748,
299,
32152,
355,
45941,
198,
198,
37659,
13,
2... | 2.367925 | 212 |
from dagoba.entities import State, Gremlin, Args
Core.addPipetype('vertex', Core._vertex)
Core.addPipetype('in', Core._in)
Core.addPipetype('out', Core._out)
Core.addPipetype('property', Core._property)
Core.addPipetype('take', Core._take)
Core.addPipetype('filter', Core._filter)
Core.addPipetype('unique', Core._un... | [
6738,
48924,
19981,
13,
298,
871,
1330,
1812,
11,
402,
17244,
11,
943,
14542,
628,
628,
198,
14055,
13,
2860,
47,
541,
2963,
431,
10786,
332,
16886,
3256,
7231,
13557,
332,
16886,
8,
198,
14055,
13,
2860,
47,
541,
2963,
431,
10786,
... | 2.582734 | 139 |
import requests
import sys
s = requests.Session()
req1 = s.get('http://www.example.org/' ,headers={})
print(req1.text)
data={}
for part in req1.text.split('<input type="hidden"')[1:]:
print("part:")
print(part)
data[textBetween(part,'name="','"')] = textBetween(part,'value="','"')
print('data:',data)
req2 = s.post('... | [
11748,
7007,
198,
11748,
25064,
198,
82,
796,
7007,
13,
36044,
3419,
198,
42180,
16,
796,
264,
13,
1136,
10786,
4023,
1378,
2503,
13,
20688,
13,
2398,
14,
6,
837,
50145,
34758,
30072,
198,
4798,
7,
42180,
16,
13,
5239,
8,
198,
7890,... | 2.541528 | 301 |
#
# Copyright (c) Tobias Pfandzelter. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for details.
#
import numpy as np
import os
import typing
import matplotlib.pyplot as plt
import seaborn as sns
import placement
import config
# for each shell and slo, generate a placeme... | [
2,
198,
2,
15069,
357,
66,
8,
46675,
38477,
392,
17396,
353,
13,
1439,
2489,
10395,
13,
198,
2,
49962,
739,
262,
17168,
5964,
13,
4091,
38559,
24290,
2393,
287,
262,
1628,
6808,
329,
3307,
13,
198,
2,
198,
198,
11748,
299,
32152,
... | 2.119279 | 721 |
from mock import *
from gp_unittest import *
from gpconfig_modules.file_segment_guc import FileSegmentGuc
from gpconfig_modules.segment_guc import SegmentGuc
| [
6738,
15290,
1330,
1635,
198,
6738,
27809,
62,
403,
715,
395,
1330,
1635,
198,
6738,
27809,
11250,
62,
18170,
13,
7753,
62,
325,
5154,
62,
70,
1229,
1330,
9220,
41030,
434,
38,
1229,
198,
6738,
27809,
11250,
62,
18170,
13,
325,
5154,
... | 3.117647 | 51 |
import pysd
import amin
from pysd import load
from Input.input import keys_in_vensim_output
from Input.Loader import Loader
# lookups maps in the python model of vensim
lookups_data = {
"wheat_tjj_dd": [],
"tomato_tjj_dd": [],
"grain_maiz_tjj_dd": [],
"rapeseed_tjj_dd": [],
"rice_tjj_dd": [],
"... | [
11748,
279,
893,
67,
198,
11748,
716,
259,
198,
6738,
279,
893,
67,
1330,
3440,
198,
6738,
23412,
13,
15414,
1330,
8251,
62,
259,
62,
574,
14323,
62,
22915,
198,
6738,
23412,
13,
17401,
1330,
8778,
263,
198,
198,
2,
804,
4739,
8739,... | 2.104779 | 544 |
from functools import partial
import torch
import torch.nn.functional as F
from torch import optim
from torch.utils.data import DataLoader
from torch.utils.tensorboard import SummaryWriter
from synthesizer import audio
from synthesizer.hparams import hparams
from synthesizer.models.emo_models import MultispeakerEmoti... | [
6738,
1257,
310,
10141,
1330,
13027,
198,
198,
11748,
28034,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
198,
6738,
28034,
1330,
6436,
198,
6738,
28034,
13,
26791,
13,
7890,
1330,
6060,
17401,
198,
6738,
28034,
13,
26791,
13,
83,... | 2.37197 | 949 |
import random
class Mover(object):
""" A renderable object with a location, color, and movement method. """
class RandomMover(Mover):
""" A mover that moves randomly between adjacent nodes. """
| [
11748,
4738,
198,
198,
4871,
337,
2502,
7,
15252,
2599,
198,
220,
220,
220,
37227,
317,
8543,
540,
2134,
351,
257,
4067,
11,
3124,
11,
290,
3356,
2446,
13,
37227,
628,
198,
4871,
14534,
44,
2502,
7,
44,
2502,
2599,
198,
220,
220,
... | 3.596491 | 57 |
A, B = map(float, input().split())
print('{:.2f}%'.format((B/A-1)*100))
| [
32,
11,
347,
796,
3975,
7,
22468,
11,
5128,
22446,
35312,
28955,
198,
198,
4798,
10786,
90,
25,
13,
17,
69,
92,
4,
4458,
18982,
19510,
33,
14,
32,
12,
16,
27493,
3064,
4008,
198
] | 2.085714 | 35 |
'''
fork of https://github.com/bunnis/esa_sentinel
'''
# TODO rewrite it
import itertools
import logging
from pprint import pprint
from xml.etree.ElementTree import Element
import lxml
from lxml import etree
import os
import re
log = logging.getLogger()
supported_raw = [
r'S1[AB]_IW_RAW__0SSV',
r'S1[AB]_IW_... | [
7061,
6,
198,
32523,
286,
3740,
1378,
12567,
13,
785,
14,
65,
20935,
271,
14,
49183,
62,
34086,
20538,
198,
7061,
6,
198,
2,
16926,
46,
28183,
340,
198,
11748,
340,
861,
10141,
198,
11748,
18931,
198,
6738,
279,
4798,
1330,
279,
479... | 1.452967 | 1,382 |
import argparse
import collections
import csv
import contextlib
import dataclasses
import json
import sqlite3
import os
from datetime import datetime
from helpers import OptionalFloat, OptionalBalance
import symbol_values
import logging
logger = logging.getLogger()
@dataclasses.dataclass
@dataclasses.datacla... | [
11748,
1822,
29572,
198,
11748,
17268,
198,
11748,
269,
21370,
198,
11748,
4732,
8019,
198,
11748,
4818,
330,
28958,
198,
11748,
33918,
198,
11748,
44161,
578,
18,
198,
11748,
28686,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
198,
6738... | 2.380408 | 1,225 |
"""
pyPESTO
=======
Parameter Estimation TOolbox for python.
"""
from .version import __version__ # noqa: F401
from .objective import (ObjectiveOptions,
Objective,
AmiciObjective,
PetabImporter)
from .problem import Problem
from .result import ... | [
37811,
198,
9078,
47,
6465,
46,
198,
1421,
18604,
198,
198,
36301,
10062,
18991,
5390,
349,
3524,
329,
21015,
13,
198,
37811,
628,
198,
6738,
764,
9641,
1330,
11593,
9641,
834,
220,
1303,
645,
20402,
25,
376,
21844,
198,
6738,
764,
15... | 1.991925 | 743 |
from pathlib import Path
from VCFDataFrame import VCFDataFrame
import pytest
TEST_DATA_PATH = Path("tests/test_data")
| [
6738,
3108,
8019,
1330,
10644,
198,
198,
6738,
569,
22495,
6601,
19778,
1330,
569,
22495,
6601,
19778,
198,
198,
11748,
12972,
9288,
198,
198,
51,
6465,
62,
26947,
62,
34219,
796,
10644,
7203,
41989,
14,
9288,
62,
7890,
4943,
628,
628
] | 3.02439 | 41 |
import vbx
| [
11748,
410,
65,
87,
628
] | 2.4 | 5 |
# Copyright 2021 Hathor Labs
#
# 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, s... | [
2,
15069,
33448,
36556,
273,
23500,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
921,
74... | 2.462418 | 612 |
import networkx as nx
import sys
import numpy as np
nnodes = [1250,2500,5000,10000]
densities = [10,20,40,80]
p = 0.05
for n in nnodes:
print n
for j,d in enumerate(densities):
print d
for i in range(10):
print i
nn = nx.watts_strogatz_graph(n,d,p)
error_cou... | [
11748,
3127,
87,
355,
299,
87,
198,
11748,
25064,
198,
11748,
299,
32152,
355,
45941,
198,
198,
20471,
4147,
796,
685,
1065,
1120,
11,
44688,
11,
27641,
11,
49388,
60,
198,
67,
641,
871,
796,
685,
940,
11,
1238,
11,
1821,
11,
1795,
... | 1.801932 | 414 |
from email.policy import default
from typing_extensions import Required
from django.core import validators
import hashlib
from django.db import models
from roulette.models import Weapon
from django.contrib.auth.models import User
import datetime
from .validators import InRangeValidator, ListedValueValidator, SumValidat... | [
6738,
3053,
13,
30586,
1330,
4277,
198,
6738,
19720,
62,
2302,
5736,
1330,
20906,
198,
6738,
42625,
14208,
13,
7295,
1330,
4938,
2024,
198,
11748,
12234,
8019,
198,
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
13805,
21348,
13,
... | 3.530612 | 147 |
import boto3, json, logging, cerberus, uuid, configparser
from handlers.capture import Capture
from flask import Flask, request, Response
from logging.handlers import RotatingFileHandler
### ____ _____ _____ ____
### | _ \| ____| ___/ ___|
### | | | | _| | |_ \___ \
### | |_| | |___| _| ___) |
### |_... | [
11748,
275,
2069,
18,
11,
33918,
11,
18931,
11,
26074,
39192,
11,
334,
27112,
11,
4566,
48610,
198,
198,
6738,
32847,
13,
27144,
495,
1330,
31793,
198,
6738,
42903,
1330,
46947,
11,
2581,
11,
18261,
198,
6738,
18931,
13,
4993,
8116,
1... | 2.168317 | 606 |
from search import *
import heapq
class MapGraph(Graph):
"""This is an abstract class for graphs. It cannot be directly
instantiated. You should define a subclass of this class
(representing a particular problem) and implement the expected
methods."""
def is_goal(self, no... | [
6738,
2989,
1330,
1635,
201,
198,
11748,
24575,
80,
201,
198,
201,
198,
4871,
9347,
37065,
7,
37065,
2599,
201,
198,
220,
220,
220,
37227,
1212,
318,
281,
12531,
1398,
329,
28770,
13,
632,
2314,
307,
3264,
201,
198,
220,
220,
220,
9... | 2.234307 | 1,848 |
from abc import abstractmethod
| [
6738,
450,
66,
1330,
12531,
24396,
198
] | 4.428571 | 7 |
import os
from datetime import datetime
from gym import Env
from stable_baselines_model_based_rl.sb_training import get_sb_class_for_algo
from stable_baselines_model_based_rl.utils.configuration import Configuration
def train_stable_baselines_policy(config: Configuration, env: Env, output_dir: str = None,
... | [
11748,
28686,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
198,
6738,
11550,
1330,
2039,
85,
198,
198,
6738,
8245,
62,
12093,
20655,
62,
19849,
62,
3106,
62,
45895,
13,
36299,
62,
34409,
1330,
651,
62,
36299,
62,
4871,
62,
1640,
62,
... | 2.671897 | 701 |
from octopy import *
| [
6738,
19318,
11081,
1330,
1635,
198
] | 3.5 | 6 |
"""TODO: docstring"""
def pytest_addoption(parser):
"""TODO: docstring"""
parser.addoption("--token", action="store", default=None)
def pytest_generate_tests(metafunc):
"""
This is called for every test. Only get/set command line arguments
if the argument is specified in the list of test "fixtur... | [
37811,
51,
3727,
46,
25,
2205,
8841,
37811,
628,
198,
4299,
12972,
9288,
62,
2860,
18076,
7,
48610,
2599,
198,
220,
220,
220,
37227,
51,
3727,
46,
25,
2205,
8841,
37811,
198,
220,
220,
220,
30751,
13,
2860,
18076,
7203,
438,
30001,
... | 2.843575 | 179 |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | [
2,
49962,
284,
262,
24843,
10442,
5693,
357,
1921,
37,
8,
739,
530,
198,
2,
393,
517,
18920,
5964,
11704,
13,
220,
4091,
262,
28536,
2393,
198,
2,
9387,
351,
428,
670,
329,
3224,
1321,
198,
2,
5115,
6634,
9238,
13,
220,
383,
7054,... | 3.779851 | 268 |
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""Base I/O code for time series data in Kats
This is a base implementation to load datasets for test and evaluation/benchmarking
purposes. We ... | [
2,
15069,
357,
66,
8,
3203,
11,
3457,
13,
290,
663,
29116,
13,
198,
2,
770,
2723,
2438,
318,
11971,
739,
262,
17168,
5964,
1043,
287,
262,
198,
2,
38559,
24290,
2393,
287,
262,
6808,
8619,
286,
428,
2723,
5509,
13,
198,
198,
37811... | 3.684492 | 187 |
from .brawndo import IndicatorType, DoNotice, Document, bro_print
| [
6738,
764,
65,
1831,
358,
78,
1330,
1423,
26407,
6030,
11,
2141,
26396,
11,
16854,
11,
1379,
62,
4798,
198
] | 3.3 | 20 |
from django.shortcuts import render
from django.http import HttpResponse
| [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
198,
6738,
42625,
14208,
13,
4023,
1330,
367,
29281,
31077,
198
] | 3.842105 | 19 |
#!/usr/bin/python
print(convert_time(input())) | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
198,
4798,
7,
1102,
1851,
62,
2435,
7,
15414,
3419,
4008
] | 2.473684 | 19 |
import datetime
import json
import logging
import os
import requests
import time
import multiprocessing
from multiprocessing import pool
from multiprocessing.pool import ThreadPool
from typing import List
import boto3
from cache import cache
from CodePackage import CodePackage
| [
198,
11748,
4818,
8079,
198,
11748,
33918,
198,
11748,
18931,
198,
11748,
28686,
198,
11748,
7007,
198,
11748,
640,
198,
198,
11748,
18540,
305,
919,
278,
198,
6738,
18540,
305,
919,
278,
1330,
5933,
198,
6738,
18540,
305,
919,
278,
13,... | 4 | 71 |
#!/usr/bin/env python
import argparse
import os
import socket
import sys
import time
from hdb import client
from hdb import main
import json
from daemon import Daemon
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='HDB launch script')
parser.add_argument('instance_count', actio... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
1822,
29572,
198,
11748,
28686,
198,
11748,
17802,
198,
11748,
25064,
198,
11748,
640,
198,
198,
6738,
289,
9945,
1330,
5456,
198,
6738,
289,
9945,
1330,
1388,
198,
11748,
33... | 2.24957 | 581 |
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Updates buildbucket's swarming task templates.
To roll production template:
cd infradata/config/configs/cr-buildbucket
cit bbroll prod
To roll canary... | [
2,
15069,
2177,
383,
18255,
1505,
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,
13,
198,
37811,
493... | 2.51874 | 3,682 |
import matplotlib.pyplot as plt
import numpy as np
%matplotlib inline
# Ejercicio 1
n = 256
X = np.linspace(-np.pi, np.pi, n, endpoint=True)
Y = np.sin(2 * X)
plt.plot(X, Y + 1, color='blue', alpha=1.00)
plt.plot(X, Y - 1, color='blue', alpha=1.00)
plt.fill_between(X, Y + 1, 1, color = "blue", alpha=0.3)
plt.fill_bet... | [
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
299,
32152,
355,
45941,
198,
4,
6759,
29487,
8019,
26098,
198,
198,
2,
412,
73,
2798,
46441,
352,
198,
198,
77,
796,
17759,
198,
55,
796,
45941,
13,
21602,
10223,
... | 1.910878 | 763 |
from .utils import parse_text, get_text_position
import numpy as np
| [
6738,
764,
26791,
1330,
21136,
62,
5239,
11,
651,
62,
5239,
62,
9150,
198,
11748,
299,
32152,
355,
45941,
198
] | 3.4 | 20 |
import flask
import sqlalchemy
alleys = [1, 2, 3, 4, 5, 6]
def get_all_members():
"""Gets all current members (potential hassle participants)."""
query = sqlalchemy.text("""
SELECT user_id, name, graduation_year,
member_type, membership_desc, user_id IN (
SELECT user_id FROM hassle_participants
... | [
11748,
42903,
198,
11748,
44161,
282,
26599,
198,
198,
6765,
893,
796,
685,
16,
11,
362,
11,
513,
11,
604,
11,
642,
11,
718,
60,
198,
198,
4299,
651,
62,
439,
62,
30814,
33529,
198,
220,
37227,
38,
1039,
477,
1459,
1866,
357,
1305... | 2.754201 | 2,559 |
# coding: utf-8
from ConfigParser import ConfigParser
OPT_DJANGO_CONF_APP = '/opt/django/configs/apps/mapa_cidadao.conf'
def read_config_file():
'''
tenta ler arquivo de configuração
Return: objeto do tipo ConfigParser
'''
config = ConfigParser()
config_file = None
try:
config_fi... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
6738,
17056,
46677,
1330,
17056,
46677,
198,
198,
3185,
51,
62,
35028,
1565,
11230,
62,
10943,
37,
62,
24805,
796,
31051,
8738,
14,
28241,
14208,
14,
11250,
82,
14,
18211,
14,
8899,
64,
62,
66,
... | 2.344086 | 186 |
#!/usr/bin/python
# 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
# di... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
921,
743,
733... | 1.89538 | 1,883 |
n = int(input())
q = int(input())
v = []
for i in range(n):
v.append(int(input()))
v.sort(reverse=True)
h = v[q - 1:].count(v[q - 1]) - 1
print(q + h)
| [
77,
796,
493,
7,
15414,
28955,
198,
80,
796,
493,
7,
15414,
28955,
198,
85,
796,
17635,
198,
1640,
1312,
287,
2837,
7,
77,
2599,
198,
220,
220,
220,
410,
13,
33295,
7,
600,
7,
15414,
3419,
4008,
198,
85,
13,
30619,
7,
50188,
28,... | 2.066667 | 75 |
import sys
import zstandard
from Crypto.Cipher import AES
from Crypto.Util import Counter
import Fs.Nsp as Nsp
import Fs.Xci as Xci
import sq_tools
import Hex
from binascii import hexlify as hx, unhexlify as uhx
if len(sys.argv) < 3:
print('usage: decompress.py input.ncz output.nca')
| [
11748,
25064,
201,
198,
11748,
1976,
20307,
201,
198,
6738,
36579,
13,
34,
10803,
1330,
34329,
201,
198,
6738,
36579,
13,
18274,
346,
1330,
15034,
201,
198,
11748,
376,
82,
13,
45,
2777,
355,
399,
2777,
201,
198,
11748,
376,
82,
13,
... | 2.564103 | 117 |
# -*- coding: utf-8 -*-
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
628
] | 1.785714 | 14 |
# Copyright 2019 Fortinet, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the... | [
2,
15069,
13130,
6401,
42504,
11,
3457,
13,
198,
2,
198,
2,
770,
1430,
318,
1479,
3788,
25,
345,
460,
17678,
4163,
340,
290,
14,
273,
13096,
198,
2,
340,
739,
262,
2846,
286,
262,
22961,
3611,
5094,
13789,
355,
3199,
416,
198,
2,
... | 3.563253 | 332 |
# -*- coding: utf-8 -*-
# pylint: disable=invalid-name,wrong-import-position,wrong-import-order
"""
Extensions setup
================
Extensions provide access to common resources of the application.
Please, put new extension instantiations and initializations here.
"""
import uuid # NOQA
import json # NOQA
from da... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
279,
2645,
600,
25,
15560,
28,
259,
12102,
12,
3672,
11,
36460,
12,
11748,
12,
9150,
11,
36460,
12,
11748,
12,
2875,
198,
37811,
198,
11627,
5736,
9058,
198,
4770,
... | 3.222826 | 920 |
"""
Honeywell HPMA115C0 sensors
- passive mode messages are 16b long
- active mode messages are 32b long
"""
from dataclasses import dataclass, field
from .. import base
from . import hpma115s0
commands = hpma115s0.commands._replace(
passive_read=base.Cmd( # Read Particle Measuring Results
b"\x68\x01\x0... | [
37811,
198,
39,
1419,
4053,
6574,
5673,
15363,
34,
15,
15736,
198,
12,
14513,
4235,
6218,
389,
1467,
65,
890,
198,
12,
4075,
4235,
6218,
389,
3933,
65,
890,
198,
37811,
198,
198,
6738,
4818,
330,
28958,
1330,
4818,
330,
31172,
11,
2... | 2.367886 | 492 |
import numpy as np
import pickle
import os
from os.path import join
from chitti.nlp.download_pretrained_vectors import download
if __name__ == '__main__':
download_pretrained_vectors('GloVe.6B.50d')
# EMBEDDING_FILE = '/Users/rajamohanreddybollavaram/Downloads/glove.6B/glove.6B.50d.txt'
# download_pre... | [
11748,
220,
299,
32152,
355,
45941,
198,
11748,
2298,
293,
198,
11748,
28686,
198,
6738,
28686,
13,
6978,
1330,
4654,
628,
198,
6738,
442,
715,
72,
13,
21283,
79,
13,
15002,
62,
5310,
13363,
62,
303,
5217,
1330,
4321,
628,
198,
198,
... | 2.478873 | 142 |
from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _
| [
6738,
42625,
14208,
13,
18211,
1330,
2034,
16934,
198,
6738,
42625,
14208,
13,
26791,
13,
41519,
1330,
334,
1136,
5239,
62,
75,
12582,
355,
4808,
628
] | 3.5 | 26 |
from flask import Blueprint
from flask_restful import Api
from resources.Hello import Hello
from resources.Health import Health
api_bp = Blueprint('api', __name__)
api = Api(api_bp)
# Route
api.add_resource(Hello, '/')
api.add_resource(Health, '/health')
| [
6738,
42903,
1330,
39932,
198,
6738,
42903,
62,
2118,
913,
1330,
5949,
72,
198,
6738,
4133,
13,
15496,
1330,
18435,
198,
6738,
4133,
13,
18081,
1330,
3893,
198,
198,
15042,
62,
46583,
796,
39932,
10786,
15042,
3256,
11593,
3672,
834,
8,... | 3.265823 | 79 |
"""
.. codeauthor:: Kevin Kennedy <protonyx@users.noreply.github.com>
Limitations
-----------
This driver does not include any of the device programming functionality,
it is assumed that an automated program would be designed in a script that
uses this driver.
"""
import labtronyx
class d_620XXP(labtronyx.DriverBas... | [
37811,
198,
492,
2438,
9800,
3712,
7939,
10401,
1279,
1676,
1122,
28391,
31,
18417,
13,
77,
382,
2145,
13,
12567,
13,
785,
29,
198,
198,
19352,
20597,
198,
32284,
198,
198,
1212,
4639,
857,
407,
2291,
597,
286,
262,
3335,
8300,
11244,... | 1.98516 | 4,380 |
# _*_ coding: utf-8 _*_
import pytest
from psycopg2.extras import DictCursor
from ._utils import IS_TRAVIS
__author__ = "Md Nazrul Islam<email2nazrul@gmail.com>"
@pytest.mark.skipif(IS_TRAVIS, reason="ignore for travis environment")
| [
2,
4808,
9,
62,
19617,
25,
3384,
69,
12,
23,
4808,
9,
62,
198,
11748,
12972,
9288,
198,
6738,
17331,
22163,
70,
17,
13,
2302,
8847,
1330,
360,
713,
34,
21471,
198,
198,
6738,
47540,
26791,
1330,
3180,
62,
51,
3861,
29817,
628,
198... | 2.55914 | 93 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import gzip
import json
import os
import site
import sys
import time
import numpy as np
import pandas as pd
import torch
from collections import defaultdict, OrderedDict
from bert_score.utils import bert_cos_score_idf, cache_scibert, get_idf_dict, get_model, lang2model, mo... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
308,
13344,
198,
11748,
33918,
198,
11748,
28686,
198,
11748,
2524,
198,
11748,
25064,
198,
11748,
640,
198,
... | 3.200935 | 214 |
# -*- coding: utf-8 -*-
import click
import logging
from pathlib import Path
from dotenv import find_dotenv, load_dotenv
import os
import pandas as pd
from src.utilities.utilities import download_external
@click.command()
@click.argument('external_filepath', type=click.Path(exists=True))
@click.argument('raw_filepath... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
3904,
198,
11748,
18931,
198,
6738,
3108,
8019,
1330,
10644,
198,
6738,
16605,
24330,
1330,
1064,
62,
26518,
24330,
11,
3440,
62,
26518,
24330,
198,
11748,
28686,
1... | 2.713506 | 733 |
import context
import diablo
from unittest import TestCase
from mock_client import MockHttpClient
| [
11748,
4732,
198,
11748,
2566,
18817,
198,
6738,
555,
715,
395,
1330,
6208,
20448,
198,
6738,
15290,
62,
16366,
1330,
44123,
43481,
11792,
628,
198
] | 4 | 25 |
# Copyright 2016, 2017 California Institute of Technology
# Users must agree to abide by the restrictions listed in the
# file "LegalStuff.txt" in the PROPER library directory.
#
# PROPER developed at Jet Propulsion Laboratory/California Inst. Technology
# Original IDL version by John Krist
# Python transla... | [
2,
220,
220,
15069,
1584,
11,
2177,
3442,
5136,
286,
8987,
198,
2,
220,
220,
18987,
1276,
4236,
284,
27851,
416,
262,
8733,
5610,
287,
262,
198,
2,
220,
220,
2393,
366,
38263,
1273,
1648,
13,
14116,
1,
287,
262,
4810,
31054,
5888,
... | 2.139503 | 1,448 |
#import Library in module
from docx2pdf import convert
from tkinter import *
from tkinter import ttk
from tkinter import filedialog
import os
from random import randint
#Define class for creating os_window.
#define Function for Button1.
# define Function for Button2.
# define Function for ... | [
2,
11748,
10074,
287,
8265,
201,
198,
6738,
2205,
87,
17,
12315,
1330,
10385,
201,
198,
6738,
256,
74,
3849,
1330,
1635,
201,
198,
6738,
256,
74,
3849,
1330,
256,
30488,
201,
198,
6738,
256,
74,
3849,
1330,
5717,
498,
519,
201,
198,... | 2.929348 | 184 |
#!/usr/bin/python
import inkex
import inkscapeMadeEasy_Base as inkBase
import inkscapeMadeEasy_Draw as inkDraw
if __name__ == '__main__':
x = myExtension()
x.affect()
| [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
198,
11748,
287,
365,
87,
198,
11748,
287,
591,
36435,
24616,
28406,
62,
14881,
355,
16882,
14881,
198,
11748,
287,
591,
36435,
24616,
28406,
62,
25302,
355,
16882,
25302,
628,
198,
198,
361,
... | 2.557143 | 70 |
"""
Exercício 3
Faça um programa em Python que recebe um número inteiro e imprime seu dígito das dezenas. Observe o exemplo abaixo:
Exemplo 1:
Entrada de Dados:
Digite um número inteiro: 78615
Saída de Dados:
O dígito das dezenas é 1
Exemplo 2:
Entrada de Dados:
Digite um número inteiro: 2
Saí... | [
37811,
198,
3109,
2798,
8836,
66,
952,
513,
198,
198,
50110,
50041,
23781,
1430,
64,
795,
11361,
8358,
1407,
1350,
23781,
299,
21356,
647,
78,
493,
68,
7058,
304,
848,
81,
524,
384,
84,
288,
8836,
70,
10094,
288,
292,
390,
4801,
292... | 2.122449 | 490 |
#!/usr/bin/env python
# start up windows vm
# some script should start on bootup and try to connect back to this script (through some port)
# this script should send commands for building the tree and creating the exe
# could also have a simple file transfer mechanism so I can get the exe without having to muck around... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
2,
923,
510,
9168,
45887,
198,
2,
617,
4226,
815,
923,
319,
6297,
929,
290,
1949,
284,
2018,
736,
284,
428,
4226,
357,
9579,
617,
2493,
8,
198,
2,
428,
4226,
815,
3758,
9729,
... | 2.8327 | 789 |
##########################################
#Constants
c = 299792458
##########################################
'''Just some formulas of relativistic mechanics'''
#YuPie
| [
29113,
7804,
2235,
201,
198,
2,
34184,
1187,
201,
198,
201,
198,
66,
796,
31011,
3720,
1731,
3365,
201,
198,
29113,
7804,
2235,
201,
198,
201,
198,
201,
198,
7061,
6,
5703,
617,
32126,
286,
48993,
452,
2569,
12933,
7061,
6,
201,
198... | 2.472527 | 91 |
import os, sys, subprocess
from glob import glob
import multiprocessing as mp
#from tqdm import tqdm
#rawdataPath = "/afs/cern.ch/user/i/ideadr/cernbox/TB2021_H8/rawData"
#rawntuplePath = "/afs/cern.ch/user/i/ideadr/cernbox/TB2021_H8/rawNtupleSiPM"
rawdataPath = "/eos/user/i/ideadr/TB2021_Desy/rawDataSiPM"
rawntuple... | [
11748,
28686,
11,
25064,
11,
850,
14681,
198,
6738,
15095,
1330,
15095,
198,
11748,
18540,
305,
919,
278,
355,
29034,
198,
2,
6738,
256,
80,
36020,
1330,
256,
80,
36020,
628,
198,
2,
1831,
7890,
15235,
796,
12813,
1878,
82,
14,
30903,... | 2.300469 | 213 |
"""
flask_clova
~~~~~~~~~~~
:copyright: (c) 2018 by Wonyo Hwang. hollal0726@gmail.com
:license: MIT, see LICENSE for more details.
:All the structure and ideas were copied after seeing flask-ask
:flask-ask github: https://github.com/johnwheeler/flask-ask
"""
import os
import yaml
import inspec... | [
37811,
198,
220,
220,
220,
42903,
62,
565,
10071,
198,
220,
220,
220,
220,
15116,
4907,
93,
628,
220,
220,
220,
1058,
22163,
4766,
25,
357,
66,
8,
2864,
416,
370,
1647,
78,
367,
47562,
13,
289,
692,
282,
2998,
2075,
31,
14816,
13,... | 2.651207 | 4,226 |
import pandas as pd
from ..models import choices
from .item import (
DateTimeItem,
ChoiceItem,
ForeignKeyItem,
IntegerItem,
StringItem,
InvokeItem,
BooleanItem,
)
from ..loaders import ProgramRaceLoadMixin
from .template import Template
class BAC(Template, ProgramRaceLoadMixin):
"""
... | [
11748,
19798,
292,
355,
279,
67,
198,
198,
6738,
11485,
27530,
1330,
7747,
198,
6738,
764,
9186,
1330,
357,
198,
220,
220,
220,
7536,
7575,
7449,
11,
198,
220,
220,
220,
18502,
7449,
11,
198,
220,
220,
220,
8708,
9218,
7449,
11,
198... | 1.728936 | 2,077 |
from bughouse.BughouseEnv import BughouseState
from bughouse.BugHouseGame import BugHouseGame
from MCTS import MCTS
from bughouse.keras.NNet import NNetWrapper as nn
from utils import *
import numpy as np
import bughouse.constants as constants
import matplotlib.pyplot as plt
args = dotdict({
'tick_time': 0.05,
... | [
6738,
809,
456,
1076,
13,
33,
6724,
1076,
4834,
85,
1330,
347,
6724,
1076,
9012,
198,
6738,
809,
456,
1076,
13,
25624,
18102,
8777,
1330,
15217,
18102,
8777,
198,
6738,
337,
4177,
50,
1330,
337,
4177,
50,
198,
6738,
809,
456,
1076,
... | 2.082811 | 797 |
import requests
import xml.etree.ElementTree
def make_wordinfo_file(needed_word, file):
'''
Makes a API requests and writes given information to xml file
'''
parameters = { 'key': "84AD3BB0C4BF3809A9CF3CCA68FAF946", 'q': needed_word,\
'part': 'word', 'translated': 'y',\
'trans_... | [
11748,
7007,
198,
11748,
35555,
13,
316,
631,
13,
20180,
27660,
198,
198,
4299,
787,
62,
4775,
10951,
62,
7753,
7,
27938,
62,
4775,
11,
2393,
2599,
198,
220,
220,
220,
220,
705,
7061,
198,
220,
220,
220,
220,
27433,
257,
7824,
7007,... | 2.277056 | 231 |
# Copyright (c) ByteDance, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import torch
import torch.nn as nn
import utils
from utils import trunc_normal_
| [
2,
15069,
357,
66,
8,
30589,
35,
590,
11,
3457,
13,
290,
663,
29116,
13,
198,
2,
1439,
2489,
10395,
13,
198,
2,
198,
2,
770,
2723,
2438,
318,
11971,
739,
262,
5964,
1043,
287,
262,
198,
2,
38559,
24290,
2393,
287,
262,
6808,
861... | 3.623377 | 77 |
"""Upload file forms."""
from datetime import datetime
from flask_babel import lazy_gettext as _
from flask_wtf import FlaskForm
from flask_wtf.file import FileField, FileRequired
from wtforms import StringField, SelectField, SubmitField, DateField
from wtforms.validators import InputRequired, Length
from app.models i... | [
37811,
41592,
2393,
5107,
526,
15931,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
42903,
62,
65,
9608,
1330,
16931,
62,
1136,
5239,
355,
4808,
198,
6738,
42903,
62,
86,
27110,
1330,
46947,
8479,
198,
6738,
42903,
62,
86,
27110,
... | 2.811209 | 678 |
from .mono_baseline.net import Baseline
from .mono_autoencoder.net import autoencoder
from .mono_fm.net import mono_fm
from .mono_fm_joint.net import mono_fm_joint | [
6738,
764,
2144,
78,
62,
12093,
4470,
13,
3262,
1330,
6455,
4470,
198,
6738,
764,
2144,
78,
62,
2306,
6571,
66,
12342,
13,
3262,
1330,
1960,
6571,
66,
12342,
198,
6738,
764,
2144,
78,
62,
38353,
13,
3262,
1330,
33361,
62,
38353,
198... | 2.672131 | 61 |
# Copyright 2018, OpenCensus 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... | [
2,
15069,
2864,
11,
4946,
34,
7314,
46665,
201,
198,
2,
201,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
201,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
1378... | 2.709278 | 485 |
# Copyright 2020 The SODA 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 to in wri... | [
2,
15069,
12131,
383,
311,
3727,
32,
46665,
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... | 1.920095 | 3,379 |
import Image, numpy as np,math
import scipy as sp
from scipy.interpolate import interp1d
from pylab import *
from skimage import io, color
import cv2
#Source colour
R,G,B = (102.,0.,51.)
inten = 0.8
lower_left_end = 5
upper_left_end = 11
lower_right_end = 16
upper_right_end = 22
file = np.loadtxt('pointeyes... | [
11748,
7412,
11,
299,
32152,
355,
45941,
11,
11018,
198,
11748,
629,
541,
88,
355,
599,
198,
6738,
629,
541,
88,
13,
3849,
16104,
378,
1330,
987,
79,
16,
67,
198,
6738,
279,
2645,
397,
1330,
1635,
198,
6738,
1341,
9060,
1330,
33245,... | 2.058537 | 2,665 |
from twisted.application import service, internet
from twisted.cred import portal, checkers, credentials
from twisted.conch.ssh import factory, keys, common
from twisted.conch.interfaces import IConchUser
import twisted.protocols.ftp
from twisted.vfs.backends import inmem
from twisted.vfs.adapters import sftp, ftp... | [
198,
6738,
19074,
13,
31438,
1330,
2139,
11,
5230,
198,
198,
6738,
19074,
13,
66,
445,
1330,
17898,
11,
2198,
364,
11,
18031,
198,
198,
6738,
19074,
13,
1102,
354,
13,
45824,
1330,
8860,
11,
8251,
11,
2219,
198,
6738,
19074,
13,
110... | 3.415929 | 113 |
from django.dispatch import receiver
from django.dispatch import Signal
from django.utils.timezone import now
from django.contrib.auth.signals import user_logged_out
from django.db.models.signals import post_save, post_delete
from django.core.cache import cache
from axes.models import AccessLog, AccessAttempt
from axe... | [
6738,
42625,
14208,
13,
6381,
17147,
1330,
9733,
198,
6738,
42625,
14208,
13,
6381,
17147,
1330,
26484,
198,
6738,
42625,
14208,
13,
26791,
13,
2435,
11340,
1330,
783,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
12683,
874,
1... | 2.521127 | 426 |
import brownie
from brownie import config, network, SimpleArbitrage
from scripts.helper_scripts import get_account, toWei, fromWei, approve_erc20, FORKED_BLOCHCHAINS
from scripts.get_weth import get_weth
weth_token = config["networks"][network.show_active()]["weth-token"]
dai_token = config["networks"][network.show_... | [
11748,
7586,
494,
198,
6738,
7586,
494,
1330,
4566,
11,
3127,
11,
17427,
3163,
2545,
8394,
198,
6738,
14750,
13,
2978,
525,
62,
46521,
1330,
651,
62,
23317,
11,
284,
1135,
72,
11,
422,
1135,
72,
11,
14762,
62,
2798,
1238,
11,
7473,
... | 2.692308 | 195 |
from ..bases import BaseParser
from bs4 import BeautifulSoup
__all__ = ['DerivedModelParser']
| [
6738,
11485,
65,
1386,
1330,
7308,
46677,
198,
6738,
275,
82,
19,
1330,
23762,
50,
10486,
198,
198,
834,
439,
834,
796,
37250,
28532,
1572,
17633,
46677,
20520,
628
] | 3.310345 | 29 |
'''
Crie uma classe denominada Elevador para armazenar as informações de um elevador
dentro de um prédio. A classe deve armazenar o andar atual (térreo - 0), total de andares
no prédio, ecluibdo o térreo, capacidade do elevador, e quantas pessoas estão presentes
nele.
A classe deve também disponibilizar os seguintes m... | [
7061,
6,
198,
34,
5034,
334,
2611,
537,
21612,
31457,
4763,
37881,
7079,
31215,
3211,
1031,
268,
283,
355,
4175,
64,
16175,
127,
113,
274,
390,
23781,
7662,
7079,
198,
67,
298,
305,
390,
23781,
778,
2634,
67,
952,
13,
317,
537,
2161... | 2.411699 | 889 |
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin # import the default Django user admin
from django.utils.translation import gettext as _ # converting string in python to human readable text
# make it easier to do translations
from core import models
admin.site.... | [
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
28482,
1330,
11787,
46787,
355,
7308,
12982,
46787,
220,
1303,
1330,
262,
4277,
37770,
2836,
13169,
198,
6738,
42625,
14208,
13,
26791,... | 3.938144 | 97 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from django.conf import settings
import django.db.models.deletion
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
6738,
42625,
14208,
13,
10414,
1330,
... | 3.035088 | 57 |
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='textgrid_utils',
version='2.0.0',
description='utilities for wor... | [
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.356908 | 608 |
from pyramid.config import Configurator
from courts_of_chaos.resources import get_root
def main(global_config, **settings):
""" This function returns a WSGI application.
It is usually called by the PasteDeploy framework during
``paster serve``.
"""
settings = dict(settings)
settings.setd... | [
6738,
27944,
13,
11250,
1330,
17056,
333,
1352,
198,
6738,
8028,
62,
1659,
62,
354,
7495,
13,
37540,
1330,
651,
62,
15763,
628,
198,
4299,
1388,
7,
20541,
62,
11250,
11,
12429,
33692,
2599,
198,
220,
220,
220,
37227,
770,
2163,
5860,
... | 2.606667 | 300 |
from setuptools import setup
import landslide
setup(
name=landslide.__title__,
version=landslide.__version__,
description='HTML5 slideshow generator for Markdown, ReST, and Textile',
packages=['landslide'],
include_package_data=True,
zip_safe=False,
author=landslide.__author__,
author_... | [
6738,
900,
37623,
10141,
1330,
9058,
198,
198,
11748,
36348,
198,
198,
40406,
7,
198,
220,
220,
220,
1438,
28,
4447,
75,
485,
13,
834,
7839,
834,
11,
198,
220,
220,
220,
2196,
28,
4447,
75,
485,
13,
834,
9641,
834,
11,
198,
220,
... | 2.507716 | 648 |
#!/usr/bin/env python
# encoding:utf8
"""
xmlrpclib 部分功能的测试和Demo
"""
reference_1 = "https://docs.python.org/2/library/xmlrpclib.html"
reference_2 = "https://docs.python.org/2/library/simplexmlrpcserver.html#simplexmlrpcserver-example"
# 1. 实现所有demo √
# 2. 传递文本,字典数据 √
# 3. 实现身份认证/主机认证/HTTPS认证功能 X
# 4. 实现鉴权功能(?) X
# ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
21004,
25,
40477,
23,
198,
198,
37811,
198,
19875,
81,
79,
565,
571,
16268,
225,
101,
26344,
228,
27950,
253,
47797,
121,
21410,
38184,
233,
46237,
243,
161,
240,
234,
11522,
78,
... | 1.407407 | 243 |
from .components import Component, Hardware
| [
6738,
764,
5589,
3906,
1330,
35100,
11,
28715,
198
] | 4.888889 | 9 |
import random
import cv2
import numpy as np
import matplotlib.pyplot as plt
from skimage.transform import SimilarityTransform
from constants import TARGET_IMG_WIDTH, TARGET_IMG_HEIGHT
# -- Face extraction --
# Target transformation facial landmarks
# that are used for similarity transformation
#
# Reference point ... | [
11748,
4738,
198,
11748,
269,
85,
17,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
6738,
1341,
9060,
13,
35636,
1330,
11014,
414,
41762,
198,
6738,
38491,
1330,
309,
46095,
62,
... | 2.484979 | 466 |
# Copyright (c) 2014 Hewlett-Packard Development Company, L.P.
#
# 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,
357,
66,
8,
1946,
30446,
15503,
12,
11869,
446,
7712,
5834,
11,
406,
13,
47,
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,
239... | 3.285714 | 273 |
# -*- coding: utf-8 -*-
from .BasicModule import BasicModule
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
class CNN(BasicModule):
"""
the basic model
Zeng 2014 "Relation Classification via Convolutional Deep Neural Network"
"""
def init_model_weight(self)... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
764,
26416,
26796,
1330,
14392,
26796,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
28034,
13,... | 1.8583 | 494 |
import scrapy
from sleuth_crawler.scraper.scraper.spiders.parsers import generic_page_parser, reddit_parser
from scrapy.spiders import Rule, CrawlSpider
from scrapy.linkextractors import LinkExtractor
from sleuth_crawler.scraper.scraper.settings import PARENT_URLS
class BroadCrawler(CrawlSpider):
'''
Spider th... | [
11748,
15881,
88,
198,
6738,
3133,
1071,
62,
66,
39464,
13,
1416,
38545,
13,
1416,
38545,
13,
2777,
4157,
13,
79,
945,
364,
1330,
14276,
62,
7700,
62,
48610,
11,
18374,
62,
48610,
198,
6738,
15881,
88,
13,
2777,
4157,
1330,
14330,
1... | 2.34029 | 1,102 |
from .GradientDescent import GradientDescent
import numpy as np
class RMSprop(GradientDescent):
"""This algorithm follows the inuition about applying
an exponentially weighted average method to
the second moment of the gradients (df2)
Attributes:
name (string): name of the optmizer
f ... | [
6738,
764,
42731,
1153,
5960,
1087,
1330,
17701,
1153,
5960,
1087,
198,
11748,
299,
32152,
355,
45941,
628,
198,
4871,
371,
5653,
22930,
7,
42731,
1153,
5960,
1087,
2599,
198,
220,
220,
220,
37227,
1212,
11862,
5679,
262,
287,
84,
653,
... | 2.452465 | 1,136 |
from functions.functions import Pos
"""
Source Year Pawn Knight Bishop Rook Queen
H. S. M. Coxeter 1940 ??? 300 350 550 1000
Max Euwe and Hans Kramer1944 100 350 350 550 1000
Claude Shannon 1949 100 300 300 500 900
Alan Turing 1953 100 300 350 500 1000
Mac Hack 1967 100 325 350 500 975
Chess 4.5 1977 10... | [
6738,
5499,
13,
12543,
2733,
1330,
18574,
201,
198,
201,
198,
37811,
201,
198,
7416,
197,
197,
197,
17688,
197,
47,
3832,
197,
44242,
197,
33,
10124,
197,
49,
566,
197,
32466,
201,
198,
39,
13,
311,
13,
337,
13,
18014,
2357,
197,
... | 2.237593 | 3,889 |
"""Details about crypto currencies from CoinMarketCap."""
import os
import json
import requests
import tempfile
import requests_cache
from datetime import timedelta
import logging
from urllib.error import HTTPError
#from coinmarketcap import Market
import voluptuous as vol
from homeassistant.components.sensor import ... | [
37811,
24259,
546,
21473,
19247,
422,
16312,
27470,
15610,
526,
15931,
198,
11748,
28686,
198,
11748,
33918,
198,
11748,
7007,
198,
11748,
20218,
7753,
198,
11748,
7007,
62,
23870,
198,
6738,
4818,
8079,
1330,
28805,
12514,
198,
11748,
1893... | 2.292977 | 3,147 |
from conans import ConanFile, CMake, tools
import os
import re
import configparser
| [
6738,
369,
504,
1330,
31634,
8979,
11,
327,
12050,
11,
4899,
198,
11748,
28686,
198,
11748,
302,
198,
11748,
4566,
48610,
628
] | 3.818182 | 22 |
# -*- coding: utf-8 -*-
"""
Created on Wed Jan 24 16:35:03 2018
Script to run transport_func() many times!
@author: armitage
"""
from __future__ import print_function
#from fenics import *
#from mshr import *
import numpy as np
from flem import initialise, solve_flem
#import peakutils # https://zenodo.org/badge/late... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
3300,
2365,
1987,
1467,
25,
2327,
25,
3070,
2864,
198,
198,
7391,
284,
1057,
4839,
62,
20786,
3419,
867,
1661,
0,
198,
198,
31,
9800,
25,
610,
... | 2.129001 | 1,031 |
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
from typin... | [
2,
16529,
45537,
198,
2,
15069,
357,
66,
8,
5413,
10501,
13,
1439,
2489,
10395,
13,
198,
2,
49962,
739,
262,
17168,
13789,
13,
4091,
13789,
13,
14116,
287,
262,
1628,
6808,
329,
198,
2,
5964,
1321,
13,
198,
2,
16529,
35937,
198,
6... | 4.991071 | 112 |
from django.shortcuts import render, redirect
from .models import Post
from django.core.paginator import Paginator, EmptyPage, InvalidPage
from django.db.models import Q
from django.template.defaultfilters import slugify
from django.contrib.auth.decorators import login_required
from django.contrib.auth import authentic... | [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
11,
18941,
198,
6738,
764,
27530,
1330,
2947,
198,
6738,
42625,
14208,
13,
7295,
13,
79,
363,
20900,
1330,
31525,
20900,
11,
33523,
9876,
11,
17665,
9876,
198,
6738,
42625,
14208,
13,
99... | 3.425926 | 162 |
import sys
import os
import argparse
import time
import numpy as np
import dill as pickle
import pandas as pd
import tensorflow as tf
sys.path.append('keras-tcn')
from tcn import tcn
import h5py
from sklearn.model_selection import KFold
from sklearn.model_selection import train_test_split
from keras import backend as... | [
11748,
25064,
198,
11748,
28686,
198,
11748,
1822,
29572,
198,
11748,
640,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
288,
359,
355,
2298,
293,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
1... | 2.844311 | 835 |
#!/usr/bin/env python
#from flaskex import app
from cbalancer import app
app.run(debug = True, host = '0.0.0.0')
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
6738,
781,
292,
365,
87,
1330,
598,
198,
6738,
269,
6893,
8250,
1330,
598,
198,
1324,
13,
5143,
7,
24442,
796,
6407,
11,
2583,
796,
705,
15,
13,
15,
13,
15,
13,
15,
11537,
198... | 2.511111 | 45 |
import pandas as pd
| [
11748,
19798,
292,
355,
279,
67,
628,
628
] | 2.875 | 8 |
import shapefile
#-------------------------- JALAN DI KECAMATAN margahayu -----------------------------#
#-------------------- KANTOR DESA / KELURAHAN DI KECAMATAN margahayu --------------------#
#----------------------------- -------------------------- -----------------------------# | [
11748,
5485,
7753,
198,
198,
2,
22369,
438,
449,
1847,
1565,
14766,
509,
2943,
2390,
1404,
1565,
6145,
993,
323,
84,
34400,
32501,
2,
628,
220,
220,
220,
220,
198,
220,
220,
220,
220,
198,
220,
220,
220,
1303,
19351,
509,
8643,
1581... | 3.639535 | 86 |
import traci
from math import degrees, atan2
import numpy as np
| [
11748,
491,
32009,
198,
6738,
10688,
1330,
7370,
11,
379,
272,
17,
198,
11748,
299,
32152,
355,
45941,
628,
628,
198
] | 3.238095 | 21 |
# Generated by Django 3.2.5 on 2021-08-23 04:26
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
17,
13,
20,
319,
33448,
12,
2919,
12,
1954,
8702,
25,
2075,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
"""
Django settings for config project.
Generated by 'django-admin startproject' using Django 3.1.5.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
from pathlib ... | [
37811,
198,
35,
73,
14208,
6460,
329,
4566,
1628,
13,
198,
198,
8645,
515,
416,
705,
28241,
14208,
12,
28482,
923,
16302,
6,
1262,
37770,
513,
13,
16,
13,
20,
13,
198,
198,
1890,
517,
1321,
319,
428,
2393,
11,
766,
198,
5450,
1378... | 2.876004 | 2,242 |
#!/usr/bin/env python
"""Download and catalogue emails."""
import base64
import time
import hashlib
import json
import ssdeep
class Message():
"""holds message data."""
def append(self, mdata):
"""Add a new message data object."""
self._data.append(mdata)
def messages(self):
"""L... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
37811,
10002,
290,
34614,
7237,
526,
15931,
198,
198,
11748,
2779,
2414,
198,
11748,
640,
198,
11748,
12234,
8019,
198,
11748,
33918,
198,
11748,
37786,
22089,
198,
198,
4871,
16000,
33529... | 2.391781 | 1,460 |
# -*- coding: utf-8 -*-
# @Author: Kai Shen
# @Created Time: 2021/5/18 11:34
# @Organization: YQN
import torch
import torch.nn as nn
from models.backbone.position_encoding import PositionEncoding
from models.backbone.decode_layer import DecoderLayer
from models.backbone.mask_feature import get_attn_pad_mask,get_attn_su... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2488,
13838,
25,
22091,
22323,
198,
2,
2488,
41972,
3862,
25,
33448,
14,
20,
14,
1507,
1367,
25,
2682,
198,
2,
2488,
26121,
1634,
25,
575,
48,
45,
198,
11748,
280... | 2.964912 | 114 |
__all__ = ['histogram_match_image']
import math
from ..core import ants_image as iio
from .. import utils
def histogram_match_image(source_image, reference_image, number_of_histogram_bins=255, number_of_match_points=64, use_threshold_at_mean_intensity=False):
"""
Histogram match source image to reference i... | [
198,
834,
439,
834,
796,
37250,
10034,
21857,
62,
15699,
62,
9060,
20520,
198,
198,
11748,
10688,
198,
198,
6738,
11485,
7295,
1330,
27842,
62,
9060,
355,
1312,
952,
198,
6738,
11485,
1330,
3384,
4487,
628,
198,
4299,
1554,
21857,
62,
... | 2.688742 | 604 |