content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
# # USAGE
# # Start the server:
# # python run_keras_server.py
# # Submit a request via cURL:
# # curl -X POST -F image=@dog.jpg 'http://localhost:5000/predict'
# # Submita a request via Python:
# # python simple_request.py
#
# # import the necessary packages
# from flask_cors import CORS, cross_origin
# from keras.a... | [
2,
1303,
1294,
11879,
198,
2,
1303,
7253,
262,
4382,
25,
198,
2,
1303,
220,
197,
29412,
1057,
62,
6122,
292,
62,
15388,
13,
9078,
198,
2,
1303,
39900,
257,
2581,
2884,
269,
21886,
25,
198,
2,
1303,
220,
197,
66,
6371,
532,
55,
2... | 2.464432 | 2,924 |
#!/usr/bin/env python3
#
# Copyright 2021, by the California Institute of Technology.
# ALL RIGHTS RESERVED.
# United States Government sponsorship acknowledged.
# Any commercial use must be negotiated with the Office of Technology Transfer
# at the California Institute of Technology.
# This software may be subject to ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
198,
2,
15069,
33448,
11,
416,
262,
3442,
5136,
286,
8987,
13,
198,
2,
11096,
371,
34874,
15731,
1137,
53,
1961,
13,
198,
2,
1578,
1829,
5070,
27418,
10810,
13,
198,
2,
4377... | 2.334706 | 4,855 |
import sys
from typing import List, Callable, Protocol
import pandas as pd
import streamlit as st
import seaborn as sns
import sympy as sp
from sympy.abc import x as x_symbol
import matplotlib.pyplot as plt
import numpy as np
from numpy.polynomial import Polynomial
sys.path.append('')
sys.path.append('../../..')
fr... | [
11748,
25064,
198,
6738,
19720,
1330,
7343,
11,
4889,
540,
11,
20497,
198,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
4269,
18250,
355,
336,
198,
11748,
384,
397,
1211,
355,
3013,
82,
198,
11748,
10558,
88,
355,
599,
198,
6738,... | 2.233728 | 676 |
default_values = {
"ranksep": "0.4",
"nodesep": "0.4",
"font": "arial",
"bold_font": "arial bold",
"fontcolor": "grey15",
"edgecolor": "grey15",
"clear": "white"
}
digraph_template = """
digraph cfn_template {{
graph [
rankdir="TB";
fontname="{font}";
]
concentrate=true;
ra... | [
198,
12286,
62,
27160,
796,
1391,
198,
220,
220,
220,
366,
43027,
325,
79,
1298,
366,
15,
13,
19,
1600,
198,
220,
220,
220,
366,
77,
4147,
538,
1298,
366,
15,
13,
19,
1600,
198,
220,
220,
220,
366,
10331,
1298,
366,
36098,
1600,
... | 2.061523 | 1,024 |
#!/usr/bin/env python
# -*- coding:utf-8 -*-
# @Author: Niccolò Bonacchi
# @Date: Thursday, January 31st 2019, 4:12:19 pm
from iblrig.poop_count import poop
if __name__ == "__main__":
poop()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
40477,
12,
23,
532,
9,
12,
198,
2,
2488,
13838,
25,
8377,
4033,
127,
110,
7979,
330,
11072,
198,
2,
2488,
10430,
25,
3635,
11,
3269,
3261,
301,
13130,
1... | 2.402439 | 82 |
import numpy as np
import pandas as pd
if __name__ == "__main__":
d = pd.read_csv('your.txt')
dt = DecisionTree(d, 'ID3')
print(dt.tree)
| [
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
288,
796,
279,
67,
13,
961,
62,
40664,
10786,
14108,
13,
14116,
11537,
... | 2.202899 | 69 |
import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
import pickle
from whiten_norm import Whitening1d, whiten_tensor_svd
from decorrelated_batch_norm import DBN
# from norm_tests import get_corrcoef
file = "/Users/tiany/Downloads/input.pkl"
with open(file, 'rb') as f:
data = pickle... | [
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2298,
293,
198,
6738,
20542,
268,
62,
27237,
1330,
13183,
3101,
16,
67,
11,
2... | 2.114486 | 1,284 |
import webrtcvad, os, wave, contextlib, collections, argparse
if __name__=='__main__':
parser = argparse.ArgumentParser(description='training script')
parser.add_argument('--in_dir', type=str, help='type dataset for trimming')
parser.add_argument('--out_dir', type=str, help='type dataset for trimming')
... | [
11748,
356,
1671,
23047,
85,
324,
11,
28686,
11,
6769,
11,
4732,
8019,
11,
17268,
11,
1822,
29572,
628,
628,
198,
361,
11593,
3672,
834,
855,
6,
834,
12417,
834,
10354,
198,
220,
220,
220,
30751,
796,
1822,
29572,
13,
28100,
1713,
4... | 2.584362 | 243 |
#! /usr/bin/env python
"""SetAdmin launcher.
"""
import sys
import pkgloader
pkgloader.require('skytools', '3.0')
import pgq.cascade.admin
if __name__ == '__main__':
script = pgq.cascade.admin.CascadeAdmin('cascade_admin', 'node_db', sys.argv[1:], worker_setup = False)
script.start()
| [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
37811,
7248,
46787,
24008,
13,
198,
37811,
198,
198,
11748,
25064,
198,
198,
11748,
279,
10025,
29356,
198,
35339,
29356,
13,
46115,
10786,
15688,
31391,
3256,
705,
18,
13,
15,
... | 2.6 | 115 |
from rest_framework import authentication
from rest_framework import exceptions
from dataloaderinterface.models import SiteRegistration
| [
6738,
1334,
62,
30604,
1330,
18239,
198,
6738,
1334,
62,
30604,
1330,
13269,
198,
198,
6738,
4818,
282,
1170,
263,
39994,
13,
27530,
1330,
14413,
47133,
628
] | 5.111111 | 27 |
import logging
from pprint import pformat
from uuid import uuid4
from rdflib import Graph, parser, plugin, serializer
from rdflib.resource import Resource
from rdflib.namespace import RDF
from lakesuperior.model.ldpr import Ldpr
from lakesuperior.model.ldp_nr import LdpNr
from lakesuperior.model.ldp_rs import LdpRs,... | [
11748,
18931,
198,
198,
6738,
279,
4798,
1330,
279,
18982,
198,
6738,
334,
27112,
1330,
334,
27112,
19,
198,
198,
6738,
374,
67,
2704,
571,
1330,
29681,
11,
30751,
11,
13877,
11,
11389,
7509,
198,
6738,
374,
67,
2704,
571,
13,
31092,
... | 2.223074 | 3,129 |
__version__ = '2.0.2.1cb'
| [
834,
9641,
834,
796,
705,
17,
13,
15,
13,
17,
13,
16,
21101,
6,
198
] | 1.733333 | 15 |
ID = input("Enter your 11 digit account number:") # 04230647978
encry = "*" * 5
start_ID = ID[0:4]
end_ID = ID[9:]
final_ID = start_ID + encry + end_ID
print(final_ID)
| [
198,
2389,
796,
5128,
7203,
17469,
534,
1367,
16839,
1848,
1271,
25,
4943,
220,
1303,
657,
3682,
1270,
2414,
3720,
3695,
198,
198,
12685,
563,
796,
366,
9,
1,
1635,
642,
198,
9688,
62,
2389,
796,
4522,
58,
15,
25,
19,
60,
198,
437... | 2.310811 | 74 |
# to count the number of positive and negative numbers
invoke_function()
| [
2,
284,
954,
262,
1271,
286,
3967,
290,
4633,
3146,
628,
198,
198,
37669,
62,
8818,
3419,
198
] | 4.222222 | 18 |
import torch
import itertools
from pytorch_lightning.callbacks import ModelCheckpoint
from data_preparation import token_padding, characters_padding
| [
11748,
28034,
198,
11748,
340,
861,
10141,
198,
6738,
12972,
13165,
354,
62,
2971,
768,
13,
13345,
10146,
1330,
9104,
9787,
4122,
198,
198,
6738,
1366,
62,
3866,
1845,
341,
1330,
11241,
62,
39231,
11,
3435,
62,
39231,
628,
198
] | 3.8 | 40 |
# Generated by Django 2.2.10 on 2020-04-08 11:18
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
| [
2,
2980,
515,
416,
37770,
362,
13,
17,
13,
940,
319,
12131,
12,
3023,
12,
2919,
1367,
25,
1507,
198,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
1... | 3.065574 | 61 |
from sys import stdin
### Fasta Reading Functions ###############
#################################################################################################################
#################################################################################################################
| [
6738,
25064,
1330,
14367,
259,
198,
198,
21017,
12549,
64,
11725,
40480,
220,
220,
1303,
7804,
4242,
2235,
628,
198,
198,
29113,
29113,
29113,
14468,
2,
628,
198,
198,
29113,
29113,
29113,
14468,
2,
198
] | 8.657143 | 35 |
import nltk
from nltk import data
data.path.append(r'D:\NL2SQL\nltk_data')
#from nltk.book import *
tokenizer = nltk.data.load('tokenizers/punkt/english.pickle') | [
11748,
299,
2528,
74,
198,
6738,
299,
2528,
74,
1330,
1366,
198,
7890,
13,
6978,
13,
33295,
7,
81,
6,
35,
7479,
32572,
17,
17861,
59,
77,
2528,
74,
62,
7890,
11537,
198,
198,
2,
6738,
299,
2528,
74,
13,
2070,
1330,
1635,
628,
19... | 2.447761 | 67 |
# 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.
"""Tests for the GCC CompilerGym service."""
import gym
import pytest
import compiler_gym.envs.gcc # noqa register environments
from compiler... | [
2,
15069,
357,
66,
8,
3203,
11,
3457,
13,
290,
663,
29116,
13,
198,
2,
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,
... | 3.26506 | 166 |
import DataTranslate
if __name__ == "__main__":
main()
| [
11748,
6060,
8291,
17660,
201,
198,
201,
198,
201,
198,
201,
198,
201,
198,
201,
198,
201,
198,
201,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
201,
198,
220,
220,
220,
1388,
3419,
201,
198
] | 1.948718 | 39 |
#!/usr/bin/env python3
import logging
import sys
import cv2
import time
import os.path
from PIL import Image
import imageUtils
import videoUtils
import numpy
import requests
from mastodon import Mastodon
import config_mastodon as cf
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger()
dirname = os.p... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
11748,
18931,
198,
11748,
25064,
198,
11748,
269,
85,
17,
198,
11748,
640,
198,
11748,
28686,
13,
6978,
198,
198,
6738,
350,
4146,
1330,
7412,
198,
11748,
2939,
18274,
4487,
1... | 2.57085 | 494 |
import numpy as np
from keras import backend as K
from keras.models import Model, model_from_json
from keras.layers import Dense, Input, Lambda
from keras.optimizers import Adam
from sklearn.metrics import roc_auc_score
from utility.triplet import l2Norm, euclidean_distance, triplet_loss, accuracy
from utility.model ... | [
11748,
299,
32152,
355,
45941,
198,
6738,
41927,
292,
1330,
30203,
355,
509,
198,
6738,
41927,
292,
13,
27530,
1330,
9104,
11,
2746,
62,
6738,
62,
17752,
198,
6738,
41927,
292,
13,
75,
6962,
1330,
360,
1072,
11,
23412,
11,
21114,
6814... | 3.37 | 100 |
# -*- coding: utf-8 -*-
"""
Organization Registry - Controllers
"""
module = request.controller
resourcename = request.function
if not settings.has_module(module):
raise HTTP(404, body="Module disabled: %s" % module)
# -----------------------------------------------------------------------------
def index()... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
198,
220,
220,
220,
12275,
33432,
532,
2345,
36667,
198,
37811,
198,
198,
21412,
796,
2581,
13,
36500,
198,
411,
454,
66,
12453,
796,
2581,
13,
8818,
198,
... | 2.348387 | 4,650 |
# Copyright 2021 Northern.tech AS
#
# 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 ag... | [
2,
15069,
33448,
8342,
13,
13670,
7054,
198,
2,
198,
2,
220,
220,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
220,
220,
220,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
35... | 2.016461 | 972 |
import json
import os
import time
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']
).get_hosts('instance')
| [
11748,
33918,
198,
11748,
28686,
198,
11748,
640,
198,
198,
11748,
1332,
10745,
430,
13,
26791,
13,
504,
856,
62,
16737,
198,
198,
9288,
10745,
430,
62,
4774,
82,
796,
1332,
10745,
430,
13,
26791,
13,
504,
856,
62,
16737,
13,
2025,
... | 2.641026 | 78 |
import keyboard
import smtplib
from threading import Timer
from datetime import date, datetime
SEND_REPORT_EVERY = 60
EMAIL_ADDRESS = ''
EMAIL_PASSWORD = ''
if __name__=="__main__":
keylogger = keylogger(interval=SEND_REPORT_EVERY, report_method="file")
keylogger.start() | [
11748,
10586,
201,
198,
11748,
895,
83,
489,
571,
201,
198,
6738,
4704,
278,
1330,
5045,
263,
201,
198,
6738,
4818,
8079,
1330,
3128,
11,
4818,
8079,
201,
198,
201,
198,
50,
10619,
62,
2200,
15490,
62,
36,
5959,
56,
796,
3126,
201,
... | 2.453782 | 119 |
# The MIT License
#
# Copyright (C) 2008-2009 Floris Bruynooghe
#
# Copyright (C) 2008-2009 Abilisoft Ltd.
#
#
# 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... | [
2,
383,
17168,
13789,
198,
2,
198,
2,
15069,
357,
34,
8,
3648,
12,
10531,
4432,
271,
8274,
2047,
78,
519,
258,
198,
2,
198,
2,
15069,
357,
34,
8,
3648,
12,
10531,
2275,
346,
29719,
12052,
13,
198,
2,
198,
2,
198,
2,
2448,
3411... | 3.569343 | 411 |
import os
import tempfile
from contextlib import contextmanager
from typing import Generator, Optional
from unittest.mock import patch, Mock, call
import pytest # type: ignore
from click.testing import CliRunner, Result
import purgeraw.main
from purgeraw.index_extraction import indexer
| [
11748,
28686,
198,
11748,
20218,
7753,
198,
6738,
4732,
8019,
1330,
4732,
37153,
198,
6738,
19720,
1330,
35986,
11,
32233,
198,
6738,
555,
715,
395,
13,
76,
735,
1330,
8529,
11,
44123,
11,
869,
198,
198,
11748,
12972,
9288,
220,
1303,
... | 3.779221 | 77 |
import pytest
import json
import os
import logging
from importers.common.helpers import clean_html
log = logging.getLogger(__name__)
current_dir = os.path.dirname(os.path.realpath(__file__)) + '/'
@pytest.mark.unit
@pytest.mark.unit
@pytest.mark.unit
@pytest.mark.unit
@pytest.mark.unit
@pytest.mark.unit
... | [
11748,
12972,
9288,
198,
11748,
33918,
198,
11748,
28686,
198,
11748,
18931,
198,
6738,
848,
3816,
13,
11321,
13,
16794,
364,
1330,
3424,
62,
6494,
198,
198,
6404,
796,
18931,
13,
1136,
11187,
1362,
7,
834,
3672,
834,
8,
198,
14421,
6... | 2.487047 | 193 |
import setuptools
modules = [
'code_gen',
'coupling',
'graph',
'ir',
'mapping',
'sim',
'transformations',
]
setuptools.setup(name='pairs',
description="A code generator for particle simulations",
version="0.0.1",
long_description=readme(),
long_description_content_type="t... | [
11748,
900,
37623,
10141,
628,
198,
198,
18170,
796,
685,
198,
220,
220,
220,
705,
8189,
62,
5235,
3256,
198,
220,
220,
220,
705,
66,
280,
11347,
3256,
198,
220,
220,
220,
705,
34960,
3256,
198,
220,
220,
220,
705,
343,
3256,
198,
... | 2.423729 | 472 |
#THIS CODE IS AN EXAMPLE HOW TO COMPUTE VARIOUS PROPERTIES
import numpy as np
import wemrr
milestones = [2.45,2.7,3.5,4.5,5.5,7.0,9.0]
#==================================================
#Compute steady state K and mean first passage time
#===================================================
K,t,Nhit = wemrr.comput... | [
2,
43559,
42714,
3180,
3537,
7788,
2390,
16437,
29630,
5390,
24301,
37780,
569,
33604,
20958,
4810,
3185,
17395,
11015,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
356,
76,
21062,
220,
198,
198,
25433,
30637,
796,
685,
17,
13,
... | 2.725352 | 426 |
from classes.specializedRequesters import CMSReqMD5, CMSReqString, CMSReqRegex
| [
6738,
6097,
13,
20887,
1143,
16844,
8586,
1330,
40773,
3041,
80,
12740,
20,
11,
40773,
3041,
80,
10100,
11,
40773,
3041,
80,
3041,
25636,
628
] | 3.2 | 25 |
import requests
import pandas as pd
import numpy as np
from bs4 import BeautifulSoup
import csv
data = []
with open('you.csv') as csvfile:
reader = csv.reader(csvfile)
next(reader)
datum = {}
for idx, row in enumerate(reader):
mod = (idx % 6)
if mod < 5:
if mod == 0:
... | [
11748,
7007,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
275,
82,
19,
1330,
23762,
50,
10486,
198,
11748,
269,
21370,
198,
7890,
796,
17635,
198,
4480,
1280,
10786,
5832,
13,
40664,
11537,
355,
... | 1.814617 | 561 |
from social_core.backends.eveonline import EVEOnlineOAuth2
| [
6738,
1919,
62,
7295,
13,
1891,
2412,
13,
44655,
25119,
1330,
32356,
14439,
23621,
1071,
17,
198
] | 3.470588 | 17 |
"""rt (i.e. Radio Telescopes) module is for handling real telescope meta-data."""
import os
import glob
import pickle
import dreambeam.telescopes
class TelescopeBndStn(object):
"""Model of one station and one band of a telescope."""
feed_pat = None
def __init__(self, stnPos, stnRot):
"""Set the st... | [
37811,
17034,
357,
72,
13,
68,
13,
8829,
34495,
13920,
8,
8265,
318,
329,
9041,
1103,
24344,
13634,
12,
7890,
526,
15931,
198,
11748,
28686,
198,
11748,
15095,
198,
11748,
2298,
293,
198,
11748,
4320,
40045,
13,
37524,
3798,
13920,
628,... | 2.481336 | 509 |
import json
from dataclasses import field, dataclass
from typing import List, Dict, Generator
import requests
from gcp_pilot import exceptions
from gcp_pilot.base import GoogleCloudPilotAPI, DiscoveryMixin, ResourceType
@dataclass
@dataclass
__all__ = (
"Text",
"Section",
"Card",
"Chat... | [
11748,
33918,
198,
6738,
4818,
330,
28958,
1330,
2214,
11,
4818,
330,
31172,
198,
6738,
19720,
1330,
7343,
11,
360,
713,
11,
35986,
198,
198,
11748,
7007,
198,
198,
6738,
308,
13155,
62,
79,
23439,
1330,
13269,
198,
6738,
308,
13155,
... | 2.746032 | 126 |
"""Wrapping R.
This module contains all functionality related to the use of functions from R for testing purposes.
"""
import numpy as np
import rpy2.robjects.packages as rpackages
from rpy2 import robjects
from rpy2.robjects import numpy2ri
r_package_cond_mvnorm = rpackages.importr("condMVNorm")
def r_cond_mvn(me... | [
37811,
36918,
2105,
371,
13,
198,
198,
1212,
8265,
4909,
477,
11244,
3519,
284,
262,
779,
286,
5499,
422,
371,
329,
4856,
4959,
13,
198,
198,
37811,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
374,
9078,
17,
13,
22609,
752,
82,
... | 2.44686 | 414 |
"""izi/store.py.
A collecton of native stores which can be used with, among others, the session middleware.
Copyright (C) 2018 DiepDT-IZIGlobal
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 wi... | [
37811,
528,
72,
14,
8095,
13,
9078,
13,
198,
198,
32,
2824,
261,
286,
6868,
7000,
543,
460,
307,
973,
351,
11,
1871,
1854,
11,
262,
6246,
3504,
1574,
13,
198,
198,
15269,
357,
34,
8,
2864,
6733,
79,
24544,
12,
14887,
3528,
75,
2... | 3.239826 | 688 |
__doc__ = """Unit-testing the `.tools` package.
"""
__author__ = "Rui Campos"
import _cmd
import sys
del sys.argv[1]
import numpy as np
import unittest as ut
# Importing
from MontyCarlo.types import PySTATE
from MontyCarlo.particles.photons import python_hooks
Photon = python_hooks.Photon
class input_val:
... | [
834,
15390,
834,
796,
37227,
26453,
12,
33407,
262,
4600,
13,
31391,
63,
5301,
13,
198,
37811,
198,
198,
834,
9800,
834,
796,
366,
49,
9019,
5425,
418,
1,
628,
198,
198,
11748,
4808,
28758,
198,
11748,
25064,
198,
12381,
25064,
13,
... | 2.594521 | 730 |
import sys, os.path, logging, time, atexit, glob
logger = None
logfile = sys.stderr
logfile_handler = None
NUM_RECENT_LOGS = 5
try:
PipeError = BrokenPipeError
except NameError: # for py2
PipeError = IOError
class TimestampFilter(logging.Filter):
"""Adds a timestamp attribute to the LogRecord, if enabl... | [
11748,
25064,
11,
28686,
13,
6978,
11,
18931,
11,
640,
11,
379,
37023,
11,
15095,
198,
198,
6404,
1362,
796,
6045,
198,
6404,
7753,
796,
25064,
13,
301,
1082,
81,
198,
6404,
7753,
62,
30281,
796,
6045,
198,
198,
41359,
62,
38827,
35... | 2.897527 | 283 |
"""Functions to calculate two-point correlations.
"""
import numpy as np
import pandas as pd
from scipy.fftpack import fft, ifft
from scipy.linalg import toeplitz
try:
from progress import getLogger
except ImportError:
from logging import getLogger
from .helpers import is_number_like, is_string_like, get_nfft... | [
37811,
24629,
2733,
284,
15284,
734,
12,
4122,
35811,
13,
198,
37811,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
6738,
629,
541,
88,
13,
487,
83,
8002,
1330,
277,
701,
11,
611,
701,
198,
6738... | 2.06058 | 8,270 |
import cv2 as cv
N = 2
modelname = "parasaurolophus_6700"
scenename = "rs1_normals"
detector = cv.ppf_match_3d_PPF3DDetector(0.025, 0.05)
print('Loading model...')
pc = cv.ppf_match_3d.loadPLYSimple("data/%s.ply" % modelname, 1)
print('Training...')
detector.trainModel(pc)
print('Loading scene...')
pcTest = cv.pp... | [
11748,
269,
85,
17,
355,
269,
85,
198,
198,
45,
796,
362,
198,
19849,
3672,
796,
366,
1845,
292,
559,
3225,
2522,
385,
62,
3134,
405,
1,
198,
1416,
268,
12453,
796,
366,
3808,
16,
62,
27237,
874,
1,
198,
198,
15255,
9250,
796,
2... | 2.233333 | 420 |
"""
Write a function that finds the number of times a sub-string occurs in a given string and
also the position (index number) at which the sub-string is found.
Example:
main_string = 'Let it be, let it be, let it be'
sub_string = 'let it be'
Expected output:
number of times sub-string occurs = 2, position =[11, ... | [
37811,
198,
16594,
257,
2163,
326,
7228,
262,
1271,
286,
1661,
257,
850,
12,
8841,
8833,
287,
257,
1813,
4731,
290,
220,
198,
14508,
262,
2292,
357,
9630,
1271,
8,
379,
543,
262,
850,
12,
8841,
318,
1043,
13,
198,
198,
16281,
25,
... | 3.27 | 100 |
from flask import Flask, request, render_template, redirect
from flask_cors import CORS, cross_origin
from flask_restful import Resource, Api
from json import dumps
from flask_jsonpify import jsonify
import psycopg2
import jinja2
import json, ast
from sendgrid.helpers.mail import *
from flask_mail import Mail, Message
... | [
6738,
42903,
1330,
46947,
11,
2581,
11,
8543,
62,
28243,
11,
18941,
198,
6738,
42903,
62,
66,
669,
1330,
327,
20673,
11,
3272,
62,
47103,
198,
6738,
42903,
62,
2118,
913,
1330,
20857,
11,
5949,
72,
198,
6738,
33918,
1330,
45514,
198,
... | 2.791894 | 1,283 |
from django.contrib.auth.models import UserManager as BaseUserManager
from django.db.models.query import QuerySet
| [
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27530,
1330,
11787,
13511,
355,
7308,
12982,
13511,
198,
6738,
42625,
14208,
13,
9945,
13,
27530,
13,
22766,
1330,
43301,
7248,
628,
198
] | 3.625 | 32 |
# 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
# distributed under t... | [
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
345,
743,
198,
2,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
921,
743,
7330,
198,
2,
257,
4866,
286,
262,
13789,
379,
198,
2,... | 3.088889 | 270 |
from selenium import webdriver | [
6738,
384,
11925,
1505,
1330,
3992,
26230
] | 4.285714 | 7 |
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: github.com/TheThingsNetwork/api/router/router.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protob... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2980,
515,
416,
262,
8435,
11876,
17050,
13,
220,
8410,
5626,
48483,
0,
198,
2,
2723,
25,
33084,
13,
785,
14,
464,
22248,
26245,
14,
15042,
14,
472,
353,
14,
472,... | 2.436257 | 12,119 |
import os.path
import unittest
from io import StringIO
import numpy as np
from dectree.compiler import compile
from dectree.config import VECTORIZE_PROP
from dectree.transpiler import transpile
| [
11748,
28686,
13,
6978,
198,
11748,
555,
715,
395,
198,
6738,
33245,
1330,
10903,
9399,
198,
198,
11748,
299,
32152,
355,
45941,
198,
198,
6738,
390,
310,
631,
13,
5589,
5329,
1330,
17632,
198,
6738,
390,
310,
631,
13,
11250,
1330,
56... | 3.15873 | 63 |
# This file is part of 'NTLM Authorization Proxy Server'
# Copyright 2001 Dmitry A. Rozmanov <dima@xenon.spb.ru>
#
# NTLM APS 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 2 of the License, or... | [
2,
770,
2393,
318,
636,
286,
705,
11251,
31288,
35263,
38027,
9652,
6,
198,
2,
15069,
5878,
45181,
317,
13,
5564,
32054,
709,
1279,
67,
8083,
31,
87,
268,
261,
13,
2777,
65,
13,
622,
29,
198,
2,
198,
2,
399,
14990,
44,
3486,
50,... | 2.394925 | 3,783 |
from .language import Language
__all__ = ['Language']
| [
6738,
764,
16129,
1330,
15417,
628,
198,
834,
439,
834,
796,
37250,
32065,
20520,
198
] | 3.733333 | 15 |
from . import scraper
from .browser import Browser
| [
6738,
764,
1330,
19320,
525,
198,
6738,
764,
40259,
1330,
34270,
198
] | 4.25 | 12 |
import pygame as pg
import constants
from state import GameState
from tower import Tower
| [
11748,
12972,
6057,
355,
23241,
198,
198,
11748,
38491,
198,
6738,
1181,
1330,
3776,
9012,
198,
6738,
10580,
1330,
8765,
628
] | 4.333333 | 21 |
# -*- coding: utf-8 -*-
# @Date : 2019-10-01
# @Author : Xinyu Gong (xy_gong@tamu.edu)
# @Link : None
# @Version : 0.0
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import cfg
import models_search
import datasets
from functions import train, valida... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2488,
10430,
220,
220,
220,
1058,
13130,
12,
940,
12,
486,
198,
2,
2488,
13838,
220,
1058,
1395,
3541,
84,
47142,
357,
5431,
62,
70,
506,
31,
83,
321,
84,
13,
1... | 2.925 | 320 |
from keras.layers import Input, Dense
from keras.models import Model
# This returns a tensor
inputs = Input(shape=(784,))
# a layer instance is callable on a tensor, and returns a tensor
x = Dense(64, activation='relu')(inputs)
x = Dense(64, activation='relu')(x)
predictions = Dense(10, activation='softmax')(x)
# Th... | [
6738,
41927,
292,
13,
75,
6962,
1330,
23412,
11,
360,
1072,
198,
6738,
41927,
292,
13,
27530,
1330,
9104,
198,
198,
2,
770,
5860,
257,
11192,
273,
198,
15414,
82,
796,
23412,
7,
43358,
16193,
37688,
11,
4008,
198,
198,
2,
257,
7679,... | 2.827103 | 214 |
""" Ichimoku Indicator
"""
import math
import numpy
import pandas
from talib import abstract
from analyzers.utils import IndicatorUtils
from importlib import import_module
| [
37811,
26364,
320,
11601,
1423,
26407,
198,
37811,
198,
198,
11748,
10688,
198,
198,
11748,
299,
32152,
198,
11748,
19798,
292,
198,
6738,
3305,
571,
1330,
12531,
198,
198,
6738,
4284,
47031,
13,
26791,
1330,
1423,
26407,
18274,
4487,
198... | 3.666667 | 48 |
# -*- coding: UTF-8 -*-
#
# Copyright (c) 2008, Yung-Yu Chen <yyc@solvcon.net>
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# - Redistributions of source code must retain the above copyrigh... | [
2,
532,
9,
12,
19617,
25,
41002,
12,
23,
532,
9,
12,
198,
2,
198,
2,
15069,
357,
66,
8,
3648,
11,
575,
2150,
12,
40728,
12555,
1279,
22556,
66,
31,
34453,
85,
1102,
13,
3262,
29,
198,
2,
198,
2,
1439,
2489,
10395,
13,
198,
2... | 2.098989 | 10,587 |
symbol_lookup = {
'I': 1,
'V': 5,
'X': 10,
'L': 50,
'C': 100,
'D': 500,
'M': 1000
}
| [
1837,
23650,
62,
5460,
929,
796,
1391,
198,
220,
220,
220,
705,
40,
10354,
352,
11,
198,
220,
220,
220,
705,
53,
10354,
642,
11,
198,
220,
220,
220,
705,
55,
10354,
838,
11,
198,
220,
220,
220,
705,
43,
10354,
2026,
11,
198,
220... | 1.561644 | 73 |
import tkinter as tk
from tkinter import ttk
from thonny import get_workbench
from thonnycontrib.codelive.mqtt_connection import generate_topic, topic_exists
from thonnycontrib.codelive.views.hinttext import HintText
from thonnycontrib.codelive.views.textspin import TextSpin
from thonnycontrib.codelive.mqtt_connectio... | [
11748,
256,
74,
3849,
355,
256,
74,
198,
6738,
256,
74,
3849,
1330,
256,
30488,
198,
198,
6738,
294,
261,
3281,
1330,
651,
62,
1818,
26968,
198,
6738,
294,
261,
3281,
3642,
822,
13,
19815,
417,
425,
13,
76,
80,
926,
62,
38659,
133... | 2.636792 | 212 |
from PyQt5.QtWidgets import QPushButton,QApplication, QWidget, QMessageBox
from PyQt5 import QtCore, QtGui, QtWidgets, uic
from PyQt5.QtCore import QTimer
from PyQt5.QtGui import QImage, QPixmap
import cv2
import DTR2
import os, subprocess
import ctypes
import sqlite3
import PySimpleGUI as sg
from PySimpleGUI... | [
6738,
9485,
48,
83,
20,
13,
48,
83,
54,
312,
11407,
1330,
1195,
49222,
21864,
11,
48,
23416,
11,
1195,
38300,
11,
1195,
12837,
14253,
201,
198,
6738,
9485,
48,
83,
20,
1330,
33734,
14055,
11,
33734,
8205,
72,
11,
33734,
54,
312,
1... | 2.119266 | 327 |
# Beispielprogramm für das Buch "Python Challenge"
#
# Copyright 2020 by Michael Inden
import pytest
from ch04_strings.solutions.ex06_remove_duplicates import remove_duplicates
@pytest.mark.parametrize("input, expected",
[("bananas", "bans"),
("lalalamama", "lam"),... | [
2,
1355,
8802,
8207,
23065,
76,
277,
25151,
288,
292,
23670,
366,
37906,
13879,
1,
198,
2,
198,
2,
15069,
12131,
416,
3899,
1423,
268,
198,
198,
11748,
12972,
9288,
198,
198,
6738,
442,
3023,
62,
37336,
13,
82,
14191,
13,
1069,
3312... | 2.112994 | 177 |
##############################################################################
#
# Copyright (c) 2002 Zope Foundation and Contributors.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS I... | [
29113,
29113,
7804,
4242,
2235,
198,
2,
198,
2,
15069,
357,
66,
8,
6244,
1168,
3008,
5693,
290,
25767,
669,
13,
198,
2,
198,
2,
770,
3788,
318,
2426,
284,
262,
8617,
286,
262,
1168,
3008,
5094,
13789,
11,
198,
2,
10628,
362,
13,
... | 2.188571 | 7,175 |
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 21:26:53) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>> from exif import Image
>>> with open('C:\\Users\\oswal\\Pictures\\oswaldo.jpg', 'rb') as image_file:
... my_image = Image(image_file)
...
>>... | [
37906,
513,
13,
22,
13,
18,
357,
85,
18,
13,
22,
13,
18,
25,
891,
19,
721,
21,
276,
1065,
11,
1526,
1679,
13130,
11,
2310,
25,
2075,
25,
4310,
8,
685,
5653,
34,
410,
13,
1129,
1433,
3933,
1643,
357,
24123,
15437,
319,
1592,
26... | 2.667638 | 686 |
from yelp_client import get_yelp_client
if __name__ == '__main__':
client = get_yelp_client()
parser = get_parser()
args = parser.parse_args()
params = {
'lang': args.language
}
response = client.get_business(args.id, **params)
business = response.business
print("Review count... | [
6738,
331,
417,
79,
62,
16366,
1330,
651,
62,
88,
417,
79,
62,
16366,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
5456,
796,
651,
62,
88,
417,
79,
62,
16366,
3419,
198,
220,
220,
220,
... | 2.60452 | 177 |
#
# PySNMP MIB module ATTO-PRODUCTS-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ATTO-PRODUCTS-MIB
# Produced by pysmi-0.3.4 at Wed May 1 11:31:53 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Ma... | [
2,
198,
2,
9485,
15571,
7378,
337,
9865,
8265,
5161,
10468,
12,
4805,
28644,
50,
12,
8895,
33,
357,
4023,
1378,
16184,
76,
489,
8937,
13,
785,
14,
79,
893,
11632,
8,
198,
2,
7054,
45,
13,
16,
2723,
2393,
1378,
14,
14490,
14,
67,... | 2.69797 | 1,182 |
from distutils.core import setup
setup(
name='python-simple-usbrelay',
url='https://github.com/patrickjahns/simpleusbrelay',
version='0.1',
packages=['simpleusbarray'],
author='Patrick Jahns',
author_email='patrick.jahns@gmail.com',
license='MIT',
long_description=open('README.rst').rea... | [
6738,
1233,
26791,
13,
7295,
1330,
9058,
198,
198,
40406,
7,
198,
220,
220,
220,
1438,
11639,
29412,
12,
36439,
12,
43319,
2411,
323,
3256,
198,
220,
220,
220,
19016,
11639,
5450,
1378,
12567,
13,
785,
14,
29615,
31558,
5907,
14,
3643... | 2.608 | 125 |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'ConvertCoinUI.ui'
#
# Created by: PyQt5 UI code generator 5.15.4
#
# 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 QtCore... | [
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,
3103,
1851,
24387,
10080,
13,
9019,
6,
198,
2,
198,
2,
15622,
416,
25,
9485,
48,
83,
20,
12454,
2438,
17301,... | 2.98374 | 123 |
#!/usr/bin/env python3
# Copyright (c) 2019 The Bitcoin SV developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.mininode import *
from test_framework.test_framework import BitcoinTestFramework
from test_f... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
15069,
357,
66,
8,
13130,
383,
6185,
20546,
6505,
198,
2,
4307,
6169,
739,
262,
17168,
3788,
5964,
11,
766,
262,
19249,
198,
2,
2393,
27975,
45761,
393,
2638,
1378,
2503,
13,
... | 3.355705 | 298 |
import inference
import argparse
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument("cv", help = "Cross Validation")
args = parser.parse_args()
cv = args.cv
inference.main(cv)
| [
11748,
32278,
198,
11748,
1822,
29572,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
30751,
796,
1822,
29572,
13,
28100,
1713,
46677,
3419,
220,
220,
198,
220,
220,
220,
30751,
13,
2860,
62,
4... | 2.686047 | 86 |
import unittest
from subprocess import run, PIPE
from pybump.pybump import *
valid_helm_chart = {'apiVersion': 'v1',
'appVersion': '1.0',
'description': 'A Helm chart for Kubernetes',
'name': 'test',
'version': '0.1.0'}
invalid_helm_chart... | [
11748,
555,
715,
395,
198,
6738,
850,
14681,
1330,
1057,
11,
350,
4061,
36,
198,
198,
6738,
12972,
65,
931,
13,
9078,
65,
931,
1330,
1635,
198,
198,
12102,
62,
33485,
62,
40926,
796,
1391,
6,
15042,
14815,
10354,
705,
85,
16,
3256,
... | 2.096234 | 956 |
N = input()
for i in range(int(N)):
inp = input().split()
name = inp[0]
date1 = inp[1].split("/")
date2 = inp[2].split("/")
courses = int(inp[3])
if (int(date1[0]) >= 2010 or int(date2[0]) >= 1991):
eligible = "eligible"
elif courses > 40:
eligible = "ineligible"
else:
... | [
45,
796,
5128,
3419,
198,
1640,
1312,
287,
2837,
7,
600,
7,
45,
8,
2599,
198,
220,
220,
220,
287,
79,
796,
5128,
22446,
35312,
3419,
198,
220,
220,
220,
1438,
796,
287,
79,
58,
15,
60,
198,
220,
220,
220,
3128,
16,
796,
287,
7... | 2.159091 | 176 |
# -*- coding: utf-8 -*-
import json
import jsonschema
from jsonpath_rw import parse
from jsonselect import jsonselect
class JsonValidator(object):
"""
Библиотека для проверки json.
Основана на: JSONSchema, JSONPath, JSONSelect.
== Дополнительная информация ==
- [ http://json-schema.... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
201,
198,
11748,
33918,
201,
198,
11748,
44804,
684,
2395,
2611,
201,
198,
6738,
33918,
6978,
62,
31653,
1330,
21136,
201,
198,
6738,
33918,
19738,
1330,
33918,
19738... | 1.701407 | 8,031 |
'''Autogenerated by xml_generate script, do not edit!'''
from OpenGL import platform as _p, arrays
# Code generation uses this
from OpenGL.raw.GL import _types as _cs
# End users want this...
from OpenGL.raw.GL._types import *
from OpenGL.raw.GL import _errors
from OpenGL.constant import Constant as _C
import... | [
7061,
6,
16541,
519,
877,
515,
416,
35555,
62,
8612,
378,
4226,
11,
466,
407,
4370,
0,
7061,
6,
201,
198,
6738,
30672,
1330,
3859,
355,
4808,
79,
11,
26515,
201,
198,
2,
6127,
5270,
3544,
428,
201,
198,
6738,
30672,
13,
1831,
13,
... | 1.833235 | 1,697 |
# Given an array nums and a value val,
# remove all instances of that value in-place and return the new length.
# Do not allocate extra space for another array, you must do this by modifying
# the input array in-place with O(1) extra memory.
solution = Solution()
print(solution.removeElement([0, 1, 2, 2, 3, 0, 4, 2],... | [
2,
11259,
281,
7177,
997,
82,
290,
257,
1988,
1188,
11,
198,
2,
4781,
477,
10245,
286,
326,
1988,
287,
12,
5372,
290,
1441,
262,
649,
4129,
13,
198,
2,
2141,
407,
31935,
3131,
2272,
329,
1194,
7177,
11,
345,
1276,
466,
428,
416,
... | 3.385417 | 96 |
import inspect
import json
import logging
import os
import sqlite3
from pathlib import Path
from haiku_node.blockchain_helpers.accounts import (
AccountManager, make_default_accounts)
log = logging.getLogger('haiku_node')
demo_config = json.loads(Path('data/demo_config.json').read_text())
if __name__ == ... | [
11748,
10104,
198,
11748,
33918,
198,
11748,
18931,
198,
11748,
28686,
198,
11748,
44161,
578,
18,
198,
198,
6738,
3108,
8019,
1330,
10644,
198,
198,
6738,
387,
28643,
62,
17440,
13,
9967,
7983,
62,
16794,
364,
13,
23317,
82,
1330,
357,... | 2.936508 | 126 |
from spectral import Spectral
from kmeans import Kmeans
import kernel
| [
6738,
37410,
1330,
13058,
1373,
198,
6738,
479,
1326,
504,
1330,
509,
1326,
504,
198,
11748,
9720,
198
] | 3.888889 | 18 |
"""
Determine what paramaters create real-looking EPSCs.
What I concluded was that 30pA and 180ms tau looks good.
"""
import os
import sys
PATH_HERE = os.path.abspath(os.path.dirname(__file__))
PATH_DATA = os.path.abspath(PATH_HERE+"../../../data/abfs/")
PATH_SRC = os.path.abspath(PATH_HERE+"../../../src/")
sys.path.i... | [
37811,
198,
35,
2357,
3810,
644,
5772,
8605,
2251,
1103,
12,
11534,
47013,
32274,
13,
198,
2061,
314,
8391,
373,
326,
1542,
79,
32,
290,
11546,
907,
256,
559,
3073,
922,
13,
198,
37811,
198,
198,
11748,
28686,
198,
11748,
25064,
198,
... | 2.307937 | 315 |
## Adapted from https://github.com/kaituoxu/Speech-Transformer/blob/master/src/transformer/optimizer.py
import torch
class TransformerOptimizer(object):
"""A simple wrapper class for learning rate scheduling"""
| [
2235,
30019,
276,
422,
3740,
1378,
12567,
13,
785,
14,
74,
4548,
84,
1140,
84,
14,
5248,
3055,
12,
8291,
16354,
14,
2436,
672,
14,
9866,
14,
10677,
14,
7645,
16354,
14,
40085,
7509,
13,
9078,
198,
11748,
28034,
198,
198,
4871,
3602,... | 3.380952 | 63 |
# to install a program within colab use !pip install
import pandas as pd
# !pip show pandas
import requests
# !pip show requests
from bs4 import BeautifulSoup
# !pip show bs4
# !pip install tabulate
from tabulate import tabulate
# pip show tabulate
import csv
# pip show csv
import bs4
# pip3 install lxml
import lxml... | [
2,
284,
2721,
257,
1430,
1626,
951,
397,
779,
5145,
79,
541,
2721,
220,
198,
198,
11748,
19798,
292,
355,
279,
67,
198,
2,
5145,
79,
541,
905,
19798,
292,
198,
11748,
7007,
198,
2,
5145,
79,
541,
905,
7007,
198,
6738,
275,
82,
1... | 2.531049 | 934 |
from idl.lexer.Token import Token
from idl.parser.Parser import Parser
from idl.parser.ParserError import ParserError
from idl.parser.Desc import MethodDesc, MethodArgDesc
| [
6738,
4686,
75,
13,
2588,
263,
13,
30642,
1330,
29130,
198,
6738,
4686,
75,
13,
48610,
13,
46677,
1330,
23042,
263,
198,
6738,
4686,
75,
13,
48610,
13,
46677,
12331,
1330,
23042,
263,
12331,
198,
198,
6738,
4686,
75,
13,
48610,
13,
... | 3.411765 | 51 |
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-03-15 15:56
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,
20,
319,
2177,
12,
3070,
12,
1314,
1315,
25,
3980,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
... | 2.736842 | 57 |
import socket
import sys
#creating socket
#Bind socket to port
#Accept connections
main()
| [
11748,
17802,
198,
11748,
25064,
198,
198,
2,
20123,
278,
17802,
628,
198,
2,
36180,
17802,
284,
2493,
198,
198,
2,
38855,
8787,
628,
198,
12417,
3419,
198
] | 3.428571 | 28 |
#
# Copyright (c) 2017-2018, Helge Mathee. All rights reserved.
#
OVERPLOT_VERSION = '1.0.0'
| [
2,
198,
2,
15069,
357,
66,
8,
2177,
12,
7908,
11,
5053,
469,
6550,
21067,
13,
1439,
2489,
10395,
13,
198,
2,
198,
198,
41983,
6489,
2394,
62,
43717,
796,
705,
16,
13,
15,
13,
15,
6,
198
] | 2.473684 | 38 |
###
import numpy as np
###
print("part 1: {}".format(part1()))
print("part 2: {}".format(part2()))
| [
198,
21017,
198,
198,
11748,
299,
32152,
355,
45941,
628,
198,
21017,
628,
198,
198,
4798,
7203,
3911,
352,
25,
23884,
1911,
18982,
7,
3911,
16,
3419,
4008,
198,
4798,
7203,
3911,
362,
25,
23884,
1911,
18982,
7,
3911,
17,
3419,
4008,
... | 2.465116 | 43 |
# $ content split
# * title
# tm terminal
# td treads
# n note
# ! important
# alternative
#$ section 5 create functions
#* return
print(mean([1, 4, 6]))
#print(type(mean),type(sum))
#* print
mymean = mean([0, 3, 4])
print(mymean + 10)
#* conditional
#student_grade = {"Marry": 9.1, "Sim": 8.8, "John": 7.5} ... | [
198,
2,
720,
2695,
6626,
198,
2,
1635,
3670,
198,
2,
256,
76,
12094,
198,
2,
41560,
23153,
82,
198,
2,
299,
3465,
198,
2,
5145,
1593,
198,
2,
5559,
628,
198,
29953,
2665,
642,
2251,
5499,
198,
198,
2,
9,
1441,
198,
4798,
7,
32... | 2.476678 | 879 |
# Generated by Django 2.1.4 on 2019-03-24 19:19
import datetime
from django.db import migrations, models
import upload.storage
| [
2,
2980,
515,
416,
37770,
362,
13,
16,
13,
19,
319,
13130,
12,
3070,
12,
1731,
678,
25,
1129,
198,
198,
11748,
4818,
8079,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
9516,
13,
35350,
628
] | 3.146341 | 41 |
# (c) 2015, Andrew Gaffney <andrew@agaffney.org>
# (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
callba... | [
2,
357,
66,
8,
1853,
11,
6858,
402,
2001,
1681,
1279,
392,
1809,
31,
363,
2001,
1681,
13,
2398,
29,
198,
2,
357,
66,
8,
2177,
28038,
856,
4935,
198,
2,
22961,
3611,
5094,
13789,
410,
18,
13,
15,
10,
357,
3826,
27975,
45761,
393,... | 2.50306 | 817 |
import sys, collections, itertools, os.path, optparse
optParser = optparse.OptionParser(
usage = "python %prog [options] <in.gtf> <out.gff>",
description=
"Script to prepare annotation for DEXSeq." +
"This script takes an annotation file in Ensembl GTF format" +
"and outputs a 'flatten... | [
11748,
25064,
11,
17268,
11,
340,
861,
10141,
11,
28686,
13,
6978,
11,
2172,
29572,
198,
198,
8738,
46677,
796,
2172,
29572,
13,
19722,
46677,
7,
220,
198,
220,
220,
220,
198,
220,
220,
8748,
796,
366,
29412,
4064,
1676,
70,
685,
25... | 2.56169 | 2,391 |
import pytest
import logging
import pandas as pd
from cellpy import log
from cellpy.utils import helpers
from . import fdv
from cellpy.exceptions import NullData
log.setup_logging(default_level=logging.DEBUG)
@pytest.fixture
| [
11748,
12972,
9288,
198,
11748,
18931,
198,
11748,
19798,
292,
355,
279,
67,
198,
6738,
2685,
9078,
1330,
2604,
198,
6738,
2685,
9078,
13,
26791,
1330,
49385,
198,
6738,
764,
1330,
277,
67,
85,
198,
6738,
2685,
9078,
13,
1069,
11755,
... | 3.222222 | 72 |
from tensorclan.dataset import BaseDataset
from tensorclan.dataset.transform import BaseTransform
from torchvision import datasets
from torch.utils.data import Subset
| [
6738,
11192,
273,
565,
272,
13,
19608,
292,
316,
1330,
7308,
27354,
292,
316,
198,
6738,
11192,
273,
565,
272,
13,
19608,
292,
316,
13,
35636,
1330,
7308,
41762,
198,
198,
6738,
28034,
10178,
1330,
40522,
198,
6738,
28034,
13,
26791,
... | 3.541667 | 48 |
import demistomock as demisto
from CommonServerPython import *
from CommonServerUserPython import *
import requests
import json
import traceback
from datetime import datetime, timedelta
import time
# Disable insecure warnings
requests.packages.urllib3.disable_warnings() # pylint: disable=no-member
# flake8: noqa
'... | [
11748,
1357,
396,
296,
735,
355,
1357,
396,
78,
198,
6738,
8070,
10697,
37906,
1330,
1635,
198,
6738,
8070,
10697,
12982,
37906,
1330,
1635,
198,
198,
11748,
7007,
198,
11748,
33918,
198,
11748,
12854,
1891,
198,
6738,
4818,
8079,
1330,
... | 2.381857 | 1,896 |
import numpy as np
import torch
import torch.nn as nn
from torch.autograd import Variable
import torch.optim
import torch.nn.functional as F
import torch.optim.lr_scheduler as lr_scheduler
import time
import os
import glob
from itertools import combinations
import configs
import backbone
from data.datamgr import Simpl... | [
11748,
299,
32152,
355,
45941,
198,
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
6738,
28034,
13,
2306,
519,
6335,
1330,
35748,
198,
11748,
28034,
13,
40085,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
198,
1174... | 2.366197 | 1,917 |
# Crie um programa e faça-o jogar Jokenpô com você.
from random import randint
from time import sleep
itens = ('PEDRA', 'PAPEL', 'TESOURA')
pc = randint(0, 2)
print('''\033[1;4;7;30;47mOPÇÕES\033[m
[ 0 ] \033[1;31mPEDRA\033[m
[ 1 ] \033[1;31mPAPEL\033[m
[ 2 ] \033[1;31mTESOURA\033[m''')
jogador = int(input('Qual a su... | [
2,
327,
5034,
23781,
1430,
64,
304,
24685,
50041,
12,
78,
48342,
283,
449,
4233,
79,
27083,
401,
12776,
25792,
13,
198,
198,
6738,
4738,
1330,
43720,
600,
198,
6738,
640,
1330,
3993,
198,
198,
270,
641,
796,
19203,
47,
1961,
3861,
3... | 2.014363 | 557 |
#!/usr/bin/env python3
# coding: utf-8
# Copyright (c) Latona. All rights reserved.
# from StatusJsonPythonModule import StatusJsonRest
from datetime import datetime
import os
import sys
import wave
import pyaudio
import time
from threading import (Event, Thread)
from aion.logger import lprint
from .mysql import Mys... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
2,
15069,
357,
66,
8,
5476,
4450,
13,
1439,
2489,
10395,
13,
198,
198,
2,
422,
12678,
41,
1559,
37906,
26796,
1330,
12678,
41,
1559,
... | 2.918919 | 148 |
#!/usr/bin/env python
import sys
sys.dont_write_bytecode = True
import glob
import os
import sys
import logging
from plugin import Plugin
from util import dbg
# except:
# print "error loading plugin %s" % name
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
25064,
198,
17597,
13,
67,
756,
62,
13564,
62,
26327,
8189,
796,
6407,
198,
198,
11748,
15095,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
18931,
198,
198,
6738,
13877,... | 2.580645 | 93 |
from Bio.SeqIO.FastaIO import FastaIterator, FastaWriter
import argparse
import statistics
import sys
parser = argparse.ArgumentParser(epilog='''''',
description='This script runs the statistics of different fasta files',
formatter_class=argparse.Argume... | [
6738,
16024,
13,
4653,
80,
9399,
13,
22968,
64,
9399,
1330,
12549,
64,
37787,
11,
12549,
64,
34379,
198,
11748,
1822,
29572,
198,
11748,
7869,
198,
11748,
25064,
198,
198,
48610,
796,
1822,
29572,
13,
28100,
1713,
46677,
7,
538,
346,
... | 1.978017 | 2,411 |
from django import template
from django.core.exceptions import ImproperlyConfigured
register = template.Library()
@register.filter(name='currency')
def currency(price, currency):
"""
Returns price in currency format
"""
price = float(price)
price *= float(currency.exchange_rate)
try:
... | [
6738,
42625,
14208,
1330,
11055,
220,
198,
6738,
42625,
14208,
13,
7295,
13,
1069,
11755,
1330,
12205,
525,
306,
16934,
1522,
628,
198,
30238,
796,
11055,
13,
23377,
3419,
628,
198,
31,
30238,
13,
24455,
7,
3672,
11639,
34415,
11537,
19... | 3.126437 | 174 |
# coding=utf-8
from __future__ import division
from honeybee_radiance.modifier.material import Trans, Light, BSDF
from honeybee_radiance.lib.modifiers import generic_wall, generic_ceiling, \
black, generic_exterior_window, air_boundary, white_glow
import os
import json
# run all functions within the f... | [
2,
19617,
28,
40477,
12,
23,
198,
6738,
11593,
37443,
834,
1330,
7297,
198,
198,
6738,
12498,
20963,
62,
6335,
3610,
13,
4666,
7483,
13,
33665,
1330,
3602,
11,
4401,
11,
24218,
8068,
198,
198,
6738,
12498,
20963,
62,
6335,
3610,
13,
... | 3.045614 | 285 |
import os
from concurrent import futures
from contextlib import contextmanager
from datetime import date
from pathlib import Path
from unittest.mock import patch
import grpc
import pytest
from sqlalchemy.sql import or_, text
from couchers.config import config
from couchers.constants import GUIDELINES_VERSION, TOS_VER... | [
11748,
28686,
198,
6738,
24580,
1330,
25650,
198,
6738,
4732,
8019,
1330,
4732,
37153,
198,
6738,
4818,
8079,
1330,
3128,
198,
6738,
3108,
8019,
1330,
10644,
198,
6738,
555,
715,
395,
13,
76,
735,
1330,
8529,
198,
198,
11748,
1036,
1475... | 2.474792 | 6,605 |
from datetime import datetime
from flask import Flask, render_template, request
from flask_sqlalchemy import SQLAlchemy
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///relation_hello_v22.db'
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
db = SQLAlchemy(app)
student_identifier = db.Tabl... | [
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
42903,
1330,
46947,
11,
8543,
62,
28243,
11,
2581,
198,
6738,
42903,
62,
25410,
282,
26599,
1330,
16363,
2348,
26599,
198,
198,
1324,
796,
46947,
7,
834,
3672,
834,
8,
198,
1324,
13,
1125... | 2.69863 | 219 |