content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
print("Hello world from my VM")
| [
4798,
7203,
15496,
995,
422,
616,
16990,
4943,
198
] | 3.555556 | 9 |
from random import choice
aluno1 = input("Primeiro aluno: ")
aluno2 = input("Segundo aluno: ")
aluno3 = input("Terceiro aluno: ")
aluno4 = input("Quarto aluno: ")
alunos = [aluno1, aluno2, aluno3, aluno4]
print(f"O aluno escolhido foi {choice(alunos)}.")
| [
6738,
4738,
1330,
3572,
198,
282,
36909,
16,
796,
5128,
7203,
26405,
7058,
435,
36909,
25,
366,
8,
198,
282,
36909,
17,
796,
5128,
7203,
41030,
41204,
435,
36909,
25,
366,
8,
198,
282,
36909,
18,
796,
5128,
7203,
15156,
344,
7058,
4... | 2.383178 | 107 |
#!/usr/bin/env python3
import os
import time
import torch
import torch.nn as nn
import torch.nn.parallel
import torch.backends.cudnn as cudnn
from torch.nn.modules.loss import _Loss
from torch.autograd import Variable
import concurrent.futures
import numpy as np
import pickle as pkl
from common import Config
from lib.u... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
11748,
28686,
198,
11748,
640,
198,
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
28034,
13,
20471,
13,
1845,
29363,
198,
11748,
28034,
13,
1891,
2412,
13,
... | 2.767544 | 228 |
# proxy module
from codetools.util.tree import *
| [
2,
15741,
8265,
198,
6738,
14873,
316,
10141,
13,
22602,
13,
21048,
1330,
1635,
198
] | 3.266667 | 15 |
#!/usr/bin/env python3
import queue
import threading
import time
from modules import device_tray as DC
class PollingClient:
"""
Launch the main part of the GUI and the worker thread. periodicCall and
endApplication could reside in the GUI part, but putting them here
means that you have all the thread ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
11748,
16834,
198,
11748,
4704,
278,
198,
11748,
640,
198,
6738,
13103,
1330,
3335,
62,
2213,
323,
355,
6257,
198,
198,
4871,
12868,
278,
11792,
25,
198,
220,
220,
220,
37227,... | 2.606667 | 900 |
import bpy
from .. data_structures import Mesh
from .. base_types import AnimationNodeSocket, PythonListSocket
| [
11748,
275,
9078,
198,
6738,
11485,
1366,
62,
7249,
942,
1330,
47529,
198,
6738,
11485,
2779,
62,
19199,
1330,
23535,
19667,
39105,
11,
11361,
8053,
39105,
628
] | 4.148148 | 27 |
import pathlib
import logging
from logging import Logger
from logging.handlers import RotatingFileHandler
from photon.common.config_context_common import ConfigContextCommon
class LoggingCommon:
"""
Helper class for logging.
"""
def __init__(self, config: ConfigContextCommon) -> None:
"""
... | [
11748,
3108,
8019,
198,
11748,
18931,
198,
6738,
18931,
1330,
5972,
1362,
198,
6738,
18931,
13,
4993,
8116,
1330,
18481,
803,
8979,
25060,
198,
198,
6738,
48190,
13,
11321,
13,
11250,
62,
22866,
62,
11321,
1330,
17056,
21947,
17227,
628,
... | 2.328537 | 417 |
# IMPORTING LIBRARIES
import numpy as np
import cv2
import math
#LOADING HAND CASCADE
hand_cascade = cv2.CascadeClassifier('Hand_haar_cascade.xml')
# VIDEO CAPTURE
cap = cv2.VideoCapture(0)
while True:
ret, img = cap.read()
blur = cv2.GaussianBlur(img,(5,5),0) # BLURRING IMAGE TO SMOOTHEN EDGES
gray = cv2.cvtColo... | [
2,
30023,
9863,
2751,
45651,
49,
1503,
11015,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
269,
85,
17,
198,
11748,
10688,
198,
198,
2,
35613,
2751,
367,
6981,
35106,
34,
19266,
198,
4993,
62,
66,
28966,
796,
269,
85,
17,
13,
34,... | 2.071373 | 1,289 |
# nyokaUtilities.py
import numpy as np
from random import choice
from string import ascii_uppercase
import copy,json
import ast,pathlib
import traceback
from nyoka import PMML43Ext as ny
global MEMORY_DICT_ARCHITECTURE,MEMORY_OF_LAYERS
settingFilePath='./settingFiles/'
savedModels='./SavedModels/'
MEMORY_OF_LAYERS={}
... | [
2,
299,
88,
17411,
18274,
2410,
13,
9078,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
4738,
1330,
3572,
198,
6738,
4731,
1330,
355,
979,
72,
62,
7211,
2798,
589,
198,
11748,
4866,
11,
17752,
198,
11748,
6468,
11,
6978,
8019,
198,
... | 3.046875 | 256 |
from djangobench.utils import run_benchmark
from query_update.models import Book
run_benchmark(
benchmark,
meta = {
'description': 'A simple QuerySet.update().',
}
)
| [
6738,
42625,
648,
672,
24421,
13,
26791,
1330,
1057,
62,
26968,
4102,
198,
6738,
12405,
62,
19119,
13,
27530,
1330,
4897,
198,
198,
5143,
62,
26968,
4102,
7,
198,
220,
220,
220,
18335,
11,
198,
220,
220,
220,
13634,
796,
1391,
198,
... | 2.710145 | 69 |
import sys
import io
import re
import os
from pathlib import Path
from contextlib import contextmanager
from invoke import task
import requests
"""Tasks for cellpy development.
You need to have invoke installed in your
python environment for this to work.
Examples:
# build and upload to pypi:
> invoke bui... | [
11748,
25064,
198,
11748,
33245,
198,
11748,
302,
198,
11748,
28686,
198,
6738,
3108,
8019,
1330,
10644,
198,
6738,
4732,
8019,
1330,
4732,
37153,
198,
198,
6738,
26342,
1330,
4876,
198,
11748,
7007,
628,
198,
37811,
51,
6791,
329,
2685,
... | 2.395298 | 2,722 |
# Discord
import discord
from discord.ext import commands
from cogs.utils.dataIO import dataIO
from .utils import checks
from __main__ import send_cmd_help
# Others
import os
from copy import deepcopy, copy
import datetime
import time
import math
import random
try:
import validators
validatorsAvail = True
excep... | [
2,
39462,
198,
11748,
36446,
198,
6738,
36446,
13,
2302,
1330,
9729,
198,
6738,
269,
18463,
13,
26791,
13,
7890,
9399,
1330,
1366,
9399,
198,
6738,
764,
26791,
1330,
8794,
198,
6738,
11593,
12417,
834,
1330,
3758,
62,
28758,
62,
16794,
... | 2.395477 | 3,626 |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# __file__: edge
# 图像边缘检测
import numpy as np
import cv2
if __name__ == '__main__':
path = './res/river_color_bg.png'
edge(pic_path=path)
| [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
11593,
7753,
834,
25,
5743,
198,
2,
10263,
249,
122,
161,
225,
237,
164,
122,
117,
163,
120,
246,
162,
96,
2... | 1.875 | 104 |
#!/usr/bin/env python
"""
computes cost of storing camera data
"""
from __future__ import division
# %%
print("quantities are for full data rate")
Zyla = Cam(2560 * 2160, 100, 4, 1500)
print("\n--------------------------")
print("Zyla")
print(f"MB/sec: {Zyla.bytesec/1e6:.1f} GB/hour: {Zyla.bytehour/1e9:.0f}")
pr... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
37811,
198,
5589,
1769,
1575,
286,
23069,
4676,
1366,
198,
37811,
198,
6738,
11593,
37443,
834,
1330,
7297,
628,
198,
198,
2,
43313,
198,
4798,
7203,
40972,
871,
389,
329,
1336,
1366,
... | 2.235808 | 687 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
| [
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,
4981,
11,
15720,
602,
628
] | 2.891892 | 37 |
import alsaaudio
import sys
m = alsaaudio.Mixer()
vol = m.getvolume()
if len(sys.argv) == 1 or sys.argv[1] == "g":
print "Current volume is " + str(getVolume()) + " percent"
if len(sys.argv)>=3:
if sys.argv[1] == "i":
try:
i = int(sys.argv[2])
increase(i)
except ValueError:
print "Pleas... | [
11748,
435,
11400,
24051,
201,
198,
11748,
25064,
201,
198,
201,
198,
76,
796,
435,
11400,
24051,
13,
35608,
263,
3419,
201,
198,
10396,
796,
285,
13,
1136,
29048,
3419,
201,
198,
201,
198,
361,
18896,
7,
17597,
13,
853,
85,
8,
6624... | 2.196774 | 310 |
#!/usr/bin/env python
###############################################################################
##
## Copyright (C) 2014-2016, New York University.
## Copyright (C) 2011-2014, NYU-Poly.
## Copyright (C) 2006-2011, University of Utah.
## All rights reserved.
## Contact: contact@vistrails.org
##
## This file is par... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
29113,
29113,
7804,
4242,
21017,
198,
2235,
198,
2235,
15069,
357,
34,
8,
1946,
12,
5304,
11,
968,
1971,
2059,
13,
198,
2235,
15069,
357,
34,
8,
2813,
12,
4967,
11,
48166,
12,
34220,... | 2.922414 | 1,044 |
from channels.routing import ProtocolTypeRouter, URLRouter
from channels.auth import AuthMiddlewareStack
from django.urls import re_path
from . import consumers
websocket_urlpatterns = [
re_path(r'ws/game/(?P<room_name>\w+)/$', consumers.ChatConsumer),
]
application = ProtocolTypeRouter({
# Empty for now (ht... | [
6738,
9619,
13,
81,
13660,
1330,
20497,
6030,
49,
39605,
11,
10289,
49,
39605,
198,
6738,
9619,
13,
18439,
1330,
26828,
34621,
1574,
25896,
198,
6738,
42625,
14208,
13,
6371,
82,
1330,
302,
62,
6978,
198,
6738,
764,
1330,
7008,
198,
1... | 2.653631 | 179 |
import unittest
from nltk_api.tag.sentence import tag_sentences
| [
11748,
555,
715,
395,
198,
198,
6738,
299,
2528,
74,
62,
15042,
13,
12985,
13,
34086,
594,
1330,
7621,
62,
34086,
3007,
628
] | 2.869565 | 23 |
#!/usr/bin/python
"""
Purpose:
"""
from django.core.management.base import BaseCommand
import os
import csv
from IPLcricket import settings
from matches.models import MatchesPlayed, Deliveries
from datetime import datetime
from django.db.utils import DataError
import pandas as pd
| [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
37811,
198,
30026,
3455,
25,
198,
37811,
198,
6738,
42625,
14208,
13,
7295,
13,
27604,
13,
8692,
1330,
7308,
21575,
198,
11748,
28686,
198,
11748,
269,
21370,
198,
6738,
6101,
43,
66,
5557,
3... | 3.380952 | 84 |
# Copyright 2013 - Noorul Islam K M
#
# 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 w... | [
2,
15069,
2211,
532,
1400,
273,
377,
3449,
509,
337,
198,
2,
198,
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... | 2.212377 | 711 |
import torch
def BoxRelationalEmbedding(f_g, dim_g=64, wave_len=1000, trignometric_embedding=True):
"""
Given a tensor with bbox coordinates for detected objects on each batch image,
this function computes a matrix for each image
with entry (i,j) given by a vector representation of the
displaceme... | [
11748,
28034,
628,
198,
4299,
8315,
6892,
864,
31567,
6048,
278,
7,
69,
62,
70,
11,
5391,
62,
70,
28,
2414,
11,
6769,
62,
11925,
28,
12825,
11,
491,
570,
16996,
62,
20521,
12083,
28,
17821,
2599,
198,
220,
220,
220,
37227,
198,
22... | 2.252669 | 1,124 |
import yaml
import logging
import logging.config
from utils.executable import get_destination
| [
11748,
331,
43695,
198,
11748,
18931,
198,
11748,
18931,
13,
11250,
198,
198,
6738,
3384,
4487,
13,
18558,
18187,
1330,
651,
62,
16520,
1883,
628
] | 3.84 | 25 |
__version__ = '1.7.1.2'
| [
834,
9641,
834,
796,
705,
16,
13,
22,
13,
16,
13,
17,
6,
198
] | 1.714286 | 14 |
#!/usr/bin/env python3
import sys
import numpy
#import matplotlib
#matplotlib.use("SVG")
import pylab
pylab.rcParams["font.size"]=8
pylab.rcParams["legend.fontsize"]=8
#pylab.rcParams["lines.linewidth"]=1
#pylab.rcParams["axes.linewidth"]=2
#pylab.rcParams["axes.labelsize"]="large"
#pylab.rcParams["axes.labelweight"]... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
11748,
25064,
198,
11748,
299,
32152,
198,
2,
11748,
2603,
29487,
8019,
198,
2,
6759,
29487,
8019,
13,
1904,
7203,
50,
43490,
4943,
198,
11748,
279,
2645,
397,
198,
198,
79,
... | 1.99173 | 1,572 |
import datetime
now = datetime.datetime.now()
print(now)
print(now.replace(1999, 12, 31))
print(now)
# インスタンスの操作ではなく、新しいインスタンスを返すらしい。インスタンスメソッドなのに。これはわかりづらい。
| [
11748,
4818,
8079,
198,
2197,
796,
4818,
8079,
13,
19608,
8079,
13,
2197,
3419,
198,
4798,
7,
2197,
8,
198,
4798,
7,
2197,
13,
33491,
7,
18946,
11,
1105,
11,
3261,
4008,
198,
4798,
7,
2197,
8,
198,
2,
220,
11482,
6527,
8943,
23376... | 1.59596 | 99 |
# strassens_algorithm.py
# A demonstration of Strassen's subcubic runtime matrix multiplication
# algorithm on square matrices using the divide and conquer model.
import numpy as np
if __name__ == "__main__":
main() | [
2,
965,
562,
641,
62,
282,
42289,
13,
9078,
201,
198,
201,
198,
2,
317,
13646,
286,
4285,
562,
268,
338,
850,
66,
549,
291,
19124,
17593,
48473,
220,
201,
198,
2,
11862,
319,
6616,
2603,
45977,
1262,
262,
14083,
290,
23875,
2746,
... | 3.121622 | 74 |
#!/usr/bin/python
""" webserver.py - Flask based web server to handle all legal requests.
Copyright (C) 2019 Basler AG
All rights reserved.
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
"""
import http
def set_led(red... | [
2,
48443,
14629,
14,
8800,
14,
29412,
201,
198,
37811,
2639,
18497,
13,
9078,
532,
46947,
1912,
3992,
4382,
284,
5412,
477,
2742,
7007,
13,
201,
198,
201,
198,
220,
220,
220,
15069,
357,
34,
8,
13130,
6455,
1754,
13077,
201,
198,
22... | 2.420173 | 1,854 |
# Copyright 2019 Novartis Institutes for BioMedical Research Inc. Licensed
# under the Apache License, Version 2.0 (the "License"); you may not use
# this file except in compliance with the License. You may obtain a copy
# of the License at http://www.apache.org/licenses/LICENSE-2.0. Unless
# required by applicable law... | [
2,
15069,
13130,
5267,
433,
271,
33656,
329,
16024,
37158,
4992,
3457,
13,
49962,
198,
2,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
345,
743,
407,
779,
198,
2,
428,
2393,
2845,
287,
11846,
351,
26... | 2.741379 | 638 |
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: flat
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
| [
2,
6338,
7560,
416,
262,
21939,
36474,
364,
17050,
11,
466,
407,
13096,
198,
198,
2,
25745,
25,
6228,
198,
198,
11748,
6228,
36873,
364,
198,
6738,
6228,
36873,
364,
13,
5589,
265,
1330,
1330,
62,
77,
32152,
198,
37659,
796,
1330,
6... | 3.21875 | 64 |
#!/usr/bin/env python3
import aiohttp
import asyncio
import concurrent
import datetime
import jinja2
import logging
import os
# This is our native database module
import blabber_database
from aiohttp import web
logger = logging.getLogger(__name__)
DEV = True
ROOT_DIRECTORY = os.path.dirname(os.path.realpath(__file... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
11748,
257,
952,
4023,
198,
11748,
30351,
952,
198,
11748,
24580,
198,
11748,
4818,
8079,
198,
11748,
474,
259,
6592,
17,
198,
11748,
18931,
198,
11748,
28686,
198,
198,
2,
77... | 3.235294 | 357 |
"""
Script goal,
Test out the google earth engine to see what i can do
- find a landsat collection for a single point
"""
#==============================================================================
__title__ = "GEE Movie Maker"
__author__ = "Arden Burrell"
__version__ = "v1.0(04.04.2019)"
__email__ = "arden.b... | [
37811,
198,
7391,
3061,
11,
220,
198,
198,
14402,
503,
262,
23645,
4534,
3113,
284,
766,
644,
1312,
460,
466,
198,
197,
12,
1064,
257,
8604,
265,
4947,
329,
257,
2060,
966,
220,
198,
198,
37811,
198,
2,
23926,
25609,
855,
198,
198,
... | 2.492777 | 7,338 |
"""
Problem Description:
Draw the pattern specified using loops.
Input:
Output:
The pattern as shown in sample output.
First line contain 4 space and 1 star, next line contains 3 space and 3 stars and so on..
Constraints:
Try not to hardcode the output.
Sample Input:
Sample Output:
*
***
*****
*******
**... | [
37811,
198,
40781,
12489,
25,
198,
25302,
262,
3912,
7368,
1262,
23607,
13,
198,
198,
20560,
25,
198,
198,
26410,
25,
198,
464,
3912,
355,
3402,
287,
6291,
5072,
13,
198,
5962,
1627,
3994,
604,
2272,
290,
352,
3491,
11,
1306,
1627,
... | 2.943662 | 142 |
# Generated by Django 3.0.2 on 2020-01-20 14:15
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
| [
2,
2980,
515,
416,
37770,
513,
13,
15,
13,
17,
319,
12131,
12,
486,
12,
1238,
1478,
25,
1314,
198,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
142... | 3.019231 | 52 |
# (c) Copyright 2014 Hewlett-Packard Development Company, L.P.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses... | [
2,
220,
220,
220,
357,
66,
8,
15069,
1946,
30446,
15503,
12,
11869,
446,
7712,
5834,
11,
406,
13,
47,
13,
198,
2,
220,
220,
220,
1439,
6923,
33876,
13,
198,
2,
198,
2,
220,
220,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362... | 3.356725 | 342 |
from collections import Counter
# import matplotlib.pyplot as plt
import os
import scipy.stats
from sklearn.metrics import make_scorer
from sklearn.model_selection import cross_val_score
from sklearn.model_selection import RandomizedSearchCV
from sklearn_crfsuite import CRF
from sklearn_crfsuite import scorers
from skl... | [
6738,
17268,
1330,
15034,
198,
2,
1330,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
28686,
198,
11748,
629,
541,
88,
13,
34242,
198,
6738,
1341,
35720,
13,
4164,
10466,
1330,
787,
62,
1416,
11934,
198,
6738,
1341,
35... | 3.455446 | 101 |
#!/usr/bin/python
# -*- encoding: utf-8 -*-
import Queue
import threading
from translators.google import Google
from translators.ut import UT
from translators.tilde import Tilde
| [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
220,
532,
9,
12,
21004,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
4670,
518,
198,
11748,
4704,
278,
198,
198,
6738,
4779,
2024,
13,
13297,
1330,
3012,
198,
6738,
4779,
2024,
... | 3.05 | 60 |
'''
Specialized Instructions.
Copyright (c) 2019-2020 Mit authors
The package is distributed under the MIT/X11 License.
THIS PROGRAM IS PROVIDED AS IS, WITH NO WARRANTY. USE IS AT THE USER’S
RISK.
'''
from dataclasses import dataclass
from code_util import Code
from action import Action, ActionEnum
from spec impor... | [
7061,
6,
198,
13409,
1143,
27759,
13,
198,
198,
15269,
357,
66,
8,
13130,
12,
42334,
11707,
7035,
198,
198,
464,
5301,
318,
9387,
739,
262,
17168,
14,
55,
1157,
13789,
13,
198,
198,
43559,
46805,
3180,
36592,
2389,
1961,
7054,
3180,
... | 2.971671 | 706 |
"""
apps_endpoints.py
CLI integration tests for "apps-*" cli commands.
"""
import json
import os
from flask import jsonify, request
from flask_restful import Resource
from .response_templates import response_template_to_json
# Sample response for "apps-list" cli command.
apps_list_response = response_template_to... | [
37811,
198,
220,
220,
220,
6725,
62,
437,
13033,
13,
9078,
198,
198,
5097,
40,
11812,
5254,
329,
366,
18211,
12,
9,
1,
537,
72,
9729,
13,
198,
37811,
198,
11748,
33918,
198,
11748,
28686,
198,
6738,
42903,
1330,
33918,
1958,
11,
258... | 2.780576 | 278 |
from .classifier import DL85Classifier
| [
6738,
764,
4871,
7483,
1330,
23641,
5332,
9487,
7483,
198
] | 3.9 | 10 |
# -*- coding: utf-8 -*-
"""
ModelLink
=========
Provides the definition of the :class:`~ModelLink` abstract base class.
"""
# %% IMPORTS
# Built-in imports
import abc
from glob import glob
from os import path
from tempfile import mktemp
import warnings
# Package imports
import e13tools as e13
import h5py
import hi... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
198,
17633,
11280,
198,
2559,
28,
198,
15946,
1460,
262,
6770,
286,
262,
1058,
4871,
25,
63,
93,
17633,
11280,
63,
12531,
2779,
1398,
13,
198,
198,
37811,
... | 2.377373 | 20,330 |
import numpy as np
from pysabr import Hagan2002NormalSABR
import logging
| [
11748,
299,
32152,
355,
45941,
198,
6738,
279,
893,
397,
81,
1330,
367,
7329,
16942,
26447,
4090,
11473,
198,
11748,
18931,
628
] | 3.363636 | 22 |
"""The search command."""
import requests, json
from termcolor import colored
from unidecode import unidecode
from newsapi.user_settings import UserSettings
from .base import Base
| [
37811,
464,
2989,
3141,
526,
15931,
198,
198,
11748,
7007,
11,
33918,
198,
6738,
3381,
8043,
1330,
16396,
198,
6738,
555,
485,
8189,
1330,
555,
485,
8189,
198,
6738,
1705,
15042,
13,
7220,
62,
33692,
1330,
11787,
26232,
198,
6738,
764,
... | 3.509091 | 55 |
import unittest
from metatron import Metatron, add_schema_spec
from metatron.schemas import SCHEMAS
if __name__ == '__main__':
unittest.main()
| [
11748,
555,
715,
395,
198,
6738,
1138,
23484,
1330,
38894,
11,
751,
62,
15952,
2611,
62,
16684,
198,
6738,
1138,
23484,
13,
1416,
4411,
292,
1330,
22374,
3620,
1921,
628,
628,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10... | 2.849057 | 53 |
import taskloaf as tsk
import logging
logger = logging.getLogger(__name__)
# An example of a taskloaf "daemon"? Could be cool!
| [
11748,
4876,
5439,
1878,
355,
256,
8135,
198,
198,
11748,
18931,
198,
198,
6404,
1362,
796,
18931,
13,
1136,
11187,
1362,
7,
834,
3672,
834,
8,
198,
198,
2,
1052,
1672,
286,
257,
4876,
5439,
1878,
366,
6814,
7966,
13984,
10347,
307,
... | 2.891304 | 46 |
#
# PySNMP MIB module BIANCA-BRICK-CAPI-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/BIANCA-BRICK-CAPI-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 17:21:03 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (def... | [
2,
198,
2,
9485,
15571,
7378,
337,
9865,
8265,
347,
16868,
8141,
12,
11473,
11860,
12,
34,
17614,
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,
1... | 2.538787 | 8,740 |
"""Current-flow betweenness centrality measures."""
import networkx as nx
from networkx.algorithms.centrality.flow_matrix import (
CGInverseLaplacian,
flow_matrix_row,
FullInverseLaplacian,
SuperLUInverseLaplacian,
)
from networkx.utils import (
not_implemented_for,
reverse_cuthill_mckee_orderin... | [
37811,
11297,
12,
11125,
1022,
1108,
4318,
414,
5260,
526,
15931,
198,
11748,
3127,
87,
355,
299,
87,
198,
6738,
3127,
87,
13,
282,
7727,
907,
13,
31463,
414,
13,
11125,
62,
6759,
8609,
1330,
357,
198,
220,
220,
220,
29925,
818,
439... | 2.581299 | 4,588 |
# from requests_html import HTMLSession
# import re
# from multiprocessing import Pool, Manager, Process
# import pandas as pd
# from functools import partial
import json
import sys
# records = {} # index -> data
# count = 0
if __name__ == '__main__':
if len(sys.argv) != 2:
print("python3 read.py <... | [
2,
422,
7007,
62,
6494,
1330,
11532,
36044,
198,
2,
1330,
302,
198,
2,
422,
18540,
305,
919,
278,
1330,
19850,
11,
9142,
11,
10854,
198,
2,
1330,
19798,
292,
355,
279,
67,
198,
2,
422,
1257,
310,
10141,
1330,
13027,
198,
11748,
33... | 2.554913 | 173 |
#===============================================================================
# This file is part of Jwalk.
#
# Jwalk - A tool to calculate the solvent accessible surface distance (SASD)
# between crosslinked residues.
#
# Copyright 2016 Jwalk Inventor and Birkbeck College University of Lo... | [
2,
23926,
25609,
18604,
198,
2,
220,
220,
220,
220,
770,
2393,
318,
636,
286,
449,
11152,
13,
198,
2,
220,
220,
220,
220,
220,
198,
2,
220,
220,
220,
220,
449,
11152,
532,
317,
2891,
284,
15284,
262,
43209,
9857,
4417,
5253,
357,
... | 1.897002 | 3,903 |
import riemann
from riemann import utils
from riemann.tx import shared
from riemann.script import serialization
from riemann.tx.shared import ByteData, VarInt
from typing import List, Optional, overload, Sequence, Tuple
class Outpoint(ByteData):
'''
An outpoint. A pointer to the previous output being consume... | [
11748,
374,
26597,
1236,
198,
6738,
374,
26597,
1236,
1330,
3384,
4487,
198,
6738,
374,
26597,
1236,
13,
17602,
1330,
4888,
198,
6738,
374,
26597,
1236,
13,
12048,
1330,
11389,
1634,
198,
6738,
374,
26597,
1236,
13,
17602,
13,
28710,
13... | 2.285172 | 16,320 |
#!/usr/bin/python3
import argparse
import paho.mqtt.client as mqtt
import datetime
from time import sleep
from binascii import unhexlify
from random import randint
from pycomfoconnect import *
import getopt
## Configuration ###############################################################################################... | [
2,
48443,
14629,
14,
8800,
14,
29412,
18,
198,
11748,
1822,
29572,
198,
11748,
279,
17108,
13,
76,
80,
926,
13,
16366,
355,
285,
80,
926,
198,
11748,
4818,
8079,
198,
6738,
640,
1330,
3993,
198,
6738,
9874,
292,
979,
72,
1330,
555,
... | 3.040208 | 771 |
from datetime import datetime
from datetime import timedelta
from datetime import timezone
from typing import Union
def now() -> datetime:
"""Return now as a UTC timestamp"""
return datetime.now(timezone.utc)
class TimeStamp:
"""Representation of a timestamp with an integer number of seconds"""
# A... | [
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
4818,
8079,
1330,
28805,
12514,
198,
6738,
4818,
8079,
1330,
640,
11340,
198,
6738,
19720,
1330,
4479,
628,
198,
4299,
783,
3419,
4613,
4818,
8079,
25,
198,
220,
220,
220,
37227,
13615,
783... | 2.879668 | 241 |
# -*- coding: utf-8 -*-
"""
This code is auto generated from troposphere_mate.code_generator.__init__.py scripts.
"""
import sys
if sys.version_info.major >= 3 and sys.version_info.minor >= 5: # pragma: no cover
from typing import Union, List, Any
import troposphere.opsworks
from troposphere.opsworks import (
... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
198,
1212,
2438,
318,
8295,
7560,
422,
14673,
22829,
62,
9830,
13,
8189,
62,
8612,
1352,
13,
834,
15003,
834,
13,
9078,
14750,
13,
198,
37811,
198,
198,
11... | 3.093677 | 427 |
#!/usr/bin/python
import argparse
from . import *
if __name__ == "__main__":
arg_parser = argparse.ArgumentParser(
description="A simple usage of the Telegram Bot API.", allow_abbrev=True
)
arg_parser.add_argument("--chat_id", type=str, help="sets the chat_id in settings")
arg_parser.add_argum... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
198,
11748,
1822,
29572,
198,
6738,
764,
1330,
1635,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
1822,
62,
48610,
796,
1822,
29572,
13,
28100,
1713,... | 2.642077 | 366 |
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | [
2,
220,
220,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
345,
743,
198,
2,
220,
220,
220,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
921,
743,
7330,
198,
2,
220,
220,
... | 2.297283 | 1,951 |
import os.path as osp
import numpy as np
from scipy.io import loadmat
from .base import BaseDataset
| [
11748,
28686,
13,
6978,
355,
267,
2777,
201,
198,
201,
198,
11748,
299,
32152,
355,
45941,
201,
198,
6738,
629,
541,
88,
13,
952,
1330,
3440,
6759,
201,
198,
201,
198,
6738,
764,
8692,
1330,
7308,
27354,
292,
316,
201,
198,
201,
198... | 2.55814 | 43 |
from unittest import TestCase
from DeckofCards import Deck
| [
6738,
555,
715,
395,
1330,
6208,
20448,
198,
6738,
20961,
1659,
34,
1371,
1330,
20961,
628
] | 3.75 | 16 |
##############################################################################
#
# Copyright (c) 2003 Zope Foundation and Contributors.
# All Rights Reserved.
#
# 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 SOF... | [
29113,
29113,
7804,
4242,
2235,
198,
2,
198,
2,
15069,
357,
66,
8,
5816,
1168,
3008,
5693,
290,
25767,
669,
13,
198,
2,
1439,
6923,
33876,
13,
198,
2,
198,
2,
770,
3788,
318,
2426,
284,
262,
8617,
286,
262,
1168,
3008,
5094,
13789... | 2.975866 | 953 |
import unittest
import math
import numpy as np
from serializer import Serializer
if __name__ == '__main__':
unittest.main() | [
11748,
555,
715,
395,
198,
11748,
10688,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
11389,
7509,
1330,
23283,
7509,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
555,
715,
395,
13,
12417,
... | 3.047619 | 42 |
import pytest
from tornado import gen
@pytest.mark.gen_test
@pytest.mark.gen_test(run_sync=False)
| [
11748,
12972,
9288,
198,
6738,
33718,
1330,
2429,
628,
198,
31,
9078,
9288,
13,
4102,
13,
5235,
62,
9288,
628,
198,
31,
9078,
9288,
13,
4102,
13,
5235,
62,
9288,
7,
5143,
62,
27261,
28,
25101,
8,
198
] | 2.684211 | 38 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from otwstest.schema.tree_of_life.node_info import validate
from otwstest import all_api_versions, not_v2_version
@all_api_versions
@all_api_versions
@not_v2_version
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
267,
4246,
301,
395,
13,
15952,
2611,
13,
21048,
62,
1659,
62,
6042,
13,
17440,
62,
10951,
1330,
26571,
19... | 2.460674 | 89 |
"""
Defaults for config object which is used as a singleton object in project
"""
from yacs.config import CfgNode as CN
_C = CN()
_C.EXPERIMENT = CN()
_C.EXPERIMENT.OUTPUT_FOLDER = "./outputs"
_C.EXPERIMENT.TENSORBOARD_FOLDER = "./runs"
_C.EXPERIMENT.RESUME_TRAINING_ON_RESTART = True
_C.EXPERIMENT.NUM_DATALOADER_WOR... | [
37811,
198,
7469,
13185,
329,
4566,
2134,
543,
318,
973,
355,
257,
2060,
1122,
2134,
287,
1628,
198,
37811,
198,
198,
6738,
331,
16436,
13,
11250,
1330,
327,
40616,
19667,
355,
31171,
198,
198,
62,
34,
796,
31171,
3419,
198,
198,
62,
... | 1.926995 | 589 |
#!/usr/bin/env python
"""
FUSE-based client for Seafile
- written by Dongsu Park <dpark@posteo.net>
(inspired by copy-fuse <https://github.com/copy-app/copy-fuse>)
A simple client for seafile.com, implemented via FUSE.
This tool allows a Linux/MacOSX client to mount a seafile cloud drive on a
local files... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
37811,
198,
220,
376,
19108,
12,
3106,
5456,
329,
49967,
576,
198,
220,
220,
532,
3194,
416,
28831,
2385,
3250,
1279,
67,
20928,
31,
7353,
68,
78,
13,
3262,
29,
198,
220,
357,
... | 2.730019 | 1,026 |
#!/usr/bin/env python3
import rich.markup
from Crypto.PublicKey import RSA
import pwncat
from pwncat.facts import PrivateKey
from pwncat.modules import Status
from pwncat.platform.linux import Linux
from pwncat.modules.enumerate import Schedule, EnumerateModule
class Module(EnumerateModule):
"""
Search the ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
11748,
5527,
13,
4102,
929,
198,
6738,
36579,
13,
15202,
9218,
1330,
42319,
198,
198,
11748,
279,
675,
9246,
198,
6738,
279,
675,
9246,
13,
37473,
1330,
15348,
9218,
198,
6738... | 3.298913 | 184 |
import requests
from flask import make_response
from flask import render_template
from flask import Blueprint
from base.views.api.api_strain import get_isotypes, query_strains
from base.constants import DATASET_RELEASE, RELEASES
from base.models2 import strain_m
from base.utils.gcloud import list_release_files
from log... | [
11748,
7007,
198,
6738,
42903,
1330,
787,
62,
26209,
198,
6738,
42903,
1330,
8543,
62,
28243,
198,
6738,
42903,
1330,
39932,
198,
6738,
2779,
13,
33571,
13,
15042,
13,
15042,
62,
2536,
391,
1330,
651,
62,
271,
13567,
11,
12405,
62,
25... | 2.467828 | 746 |
# -*- coding: utf-8 -*-
import os
import platform
import site
if platform.system() == "Windows":
extlib_path = 'extlibs_windows'
if platform.system() == "Darwin":
extlib_path = 'extlibs_darwin'
if platform.system() == "Linux":
extlib_path = 'extlibs_linux'
site.addsitedir(os.path.abspath(os.path.join(os.p... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
28686,
198,
11748,
3859,
198,
11748,
2524,
198,
198,
361,
3859,
13,
10057,
3419,
6624,
366,
11209,
1298,
198,
220,
220,
220,
1070,
8019,
62,
6978,
796,
705,
2302,... | 2.679842 | 253 |
#!/usr/bin/env python
"""Sends configuration difference to Webex Teams, formerly Spark.
Compares the current running configuration and the saved running
configuration, creates diff and sends it to a Webex Teams room.
Should be invoked after every configuration change by EEM.
Copyright (c) 2018 Cisco and/or its affil... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
37811,
50,
2412,
8398,
3580,
284,
5313,
1069,
24690,
11,
15734,
17732,
13,
198,
198,
7293,
3565,
262,
1459,
2491,
8398,
290,
262,
7448,
2491,
198,
11250,
3924,
11,
8075,
814,
290,
1280... | 2.842169 | 1,641 |
import os
import pandas as pd
here = os.path.abspath(os.path.dirname(__file__))
zarr_cat_pangeo_cmip6 = 'https://storage.googleapis.com/cmip6/pangeo-cmip6.json'
cdf_cat_sample_cmip6 = os.path.join(here, 'sample-catalogs/cmip6-netcdf.json')
multi_variable_cat = os.path.join(here, 'sample-catalogs/multi-variable-catalo... | [
11748,
28686,
198,
198,
11748,
19798,
292,
355,
279,
67,
198,
198,
1456,
796,
28686,
13,
6978,
13,
397,
2777,
776,
7,
418,
13,
6978,
13,
15908,
3672,
7,
834,
7753,
834,
4008,
198,
89,
3258,
62,
9246,
62,
79,
858,
78,
62,
11215,
... | 2.014663 | 1,023 |
# we can use Segment Tree 24 and Segment Tree 31 and combine them.
if __name__ == '__main__':
n, m = [int(i) for i in input().split()]
STree1 = SegmentTree1(n)
STree2 = SegmentTree2(n, lambda a, b, x: a + b*x, lambda a, b: a+b, 0)
arr = [int(i) for i in input().split()]
for i in range(n):
... | [
2,
356,
460,
779,
1001,
5154,
12200,
1987,
290,
1001,
5154,
12200,
3261,
290,
12082,
606,
13,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
299,
11,
285,
796,
685,
600,
7,
72,
8,
329,... | 1.734774 | 509 |
summary = d = {}
d['lig0'] = {'atom_types': ['A', 'C', 'F', 'HD', 'N', 'NA', 'OA' ],
'rbonds':3,
'zero_charge' : [],
}
d['lig10'] = {'atom_types': ['A', 'C', 'F', 'HD', 'N', 'NA', 'OA' ],
'rbonds':3,
'zero_charge' : [],
}
d['lig11'] = {'atom_types': ['A', 'C', 'F', 'HD', 'N', 'NA', 'OA' ],
'rbonds'... | [
49736,
796,
288,
796,
23884,
198,
67,
17816,
4604,
15,
20520,
796,
1391,
6,
37696,
62,
19199,
10354,
37250,
32,
3256,
705,
34,
3256,
705,
37,
3256,
705,
10227,
3256,
705,
45,
3256,
705,
4535,
3256,
705,
23621,
6,
16589,
198,
197,
19... | 1.815114 | 71,379 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Snips Lights + Homeassistant
# -----------------------------------------------------------------------------
# Copyright 2019 Patrick Fial
# -------------------------------------------------... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
16529,
32501,
198,
2,
5489,
2419,
22661,
1343,
5995,
562,
10167,
198,
2,
16529,
32501,
198,
2,
15069,
131... | 4.71835 | 703 |
# Generated by Django 3.0.4 on 2020-04-21 21:32
from django.db import migrations
| [
2,
2980,
515,
416,
37770,
513,
13,
15,
13,
19,
319,
12131,
12,
3023,
12,
2481,
2310,
25,
2624,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
628
] | 2.766667 | 30 |
for _ in range(int(input())):
n = input()
if n in {'1', '4', '78'}:
print('+')
elif n.endswith('35'):
print('-')
elif n.startswith('9') and n.endswith('4'):
print('*')
else:
print('?')
| [
1640,
4808,
287,
2837,
7,
600,
7,
15414,
28955,
2599,
198,
220,
220,
220,
299,
796,
5128,
3419,
198,
220,
220,
220,
611,
299,
287,
1391,
6,
16,
3256,
705,
19,
3256,
705,
3695,
6,
38362,
198,
220,
220,
220,
220,
220,
220,
220,
36... | 1.823077 | 130 |
"""Tests the ``gdc_filtration_tools.tools.extract_oxoq`` module.
"""
import sqlite3
import tempfile
import unittest
import attr
from gdc_filtration_tools.tools.extract_oxoq import extract_oxoq_from_sqlite, get_oxoq
from tests.utils import captured_output, cleanup_files
@attr.s
def build_test_schema(conn):
"""... | [
37811,
51,
3558,
262,
7559,
70,
17896,
62,
69,
36055,
62,
31391,
13,
31391,
13,
2302,
974,
62,
1140,
78,
80,
15506,
8265,
13,
198,
37811,
198,
11748,
44161,
578,
18,
198,
11748,
20218,
7753,
198,
11748,
555,
715,
395,
198,
198,
1174... | 2.269841 | 315 |
"""
dialog module
"""
from time import sleep
from typing import Tuple
import matplotlib.pyplot as plt
# from matplotlib.image import AxesImage
from matplotlib.patches import Rectangle
import numpy as np
Point = Tuple[int, int]
i = 3 # type: int
i = '3'
class Ui(object):
"""
dialog
"""
def show_... | [
37811,
198,
38969,
519,
8265,
198,
37811,
198,
6738,
640,
1330,
3993,
198,
6738,
19720,
1330,
309,
29291,
198,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
2,
422,
2603,
29487,
8019,
13,
9060,
1330,
12176,
274,
5... | 1.921336 | 928 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Distributed under the terms of the MIT License.
"""
Module for plotting reaction-based functions.
Author: Andrew Tarzia
Date Created: 15 Sep 2018
"""
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.colors as colors
from matplotlib.ticker import ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
4307,
6169,
739,
262,
2846,
286,
262,
17168,
13789,
13,
198,
198,
37811,
198,
26796,
329,
29353,
6317,
12,
310... | 1.848088 | 6,879 |
#!/usr/local/Caskroom/miniconda/base/envs/music_venv/bin/pythonw
from pyo import *
s = Server().boot()
path = SNDS_PATH + "/transparent.aif"
# stereo playback with a slight shift between the two channels.
sf = SfPlayer(path, speed = [1, 0.995], loop = True, mul = 0.4).out()
s.gui(locals())
| [
2,
48443,
14629,
14,
12001,
14,
34,
2093,
3823,
14,
1084,
291,
13533,
14,
8692,
14,
268,
14259,
14,
28965,
62,
574,
85,
14,
8800,
14,
29412,
86,
198,
198,
6738,
279,
8226,
1330,
1635,
198,
198,
82,
796,
9652,
22446,
18769,
3419,
1... | 2.619469 | 113 |
import re
from termcolor import colored
# c = 'Objective: We investigated whether implantation of polylactic acid and epsilon-caprolactone copolymer (PLAC) cubes with or without basic fibroblast growth factor (b-FGF) released slowly from gelatin microspheres was able to induce fibrous tissue in the dead space remain... | [
198,
11748,
302,
198,
6738,
3381,
8043,
1330,
16396,
628,
198,
2,
269,
796,
705,
10267,
425,
25,
775,
12565,
1771,
29016,
341,
286,
7514,
75,
12009,
7408,
290,
304,
862,
33576,
12,
11128,
3225,
529,
505,
2243,
3366,
647,
357,
6489,
... | 3.771574 | 197 |
# GENERATED BY setup.py
commit = u"e508b6e4d"
| [
2,
24700,
1137,
11617,
11050,
9058,
13,
9078,
198,
41509,
796,
334,
1,
68,
33042,
65,
21,
68,
19,
67,
1,
198
] | 2.090909 | 22 |
# coding:utf-8
"""
_AddressParser is an implementation of a recursive descent parser for email
addresses and urls. While _AddressParser can be used directly it is not
recommended, use the the parse() method which is provided in the address
module for convenience.
The grammar supported by the parser (as well as other ... | [
2,
19617,
25,
40477,
12,
23,
198,
198,
37811,
198,
62,
20231,
46677,
318,
281,
7822,
286,
257,
45115,
18598,
30751,
329,
3053,
198,
2860,
16746,
290,
2956,
7278,
13,
2893,
4808,
20231,
46677,
460,
307,
973,
3264,
340,
318,
407,
198,
... | 2.265604 | 6,585 |
"""
Path parameters
---------------
Parameters to set the precomputations in order to facilitate the computation
model tasks
"""
pathdata_in = '/home/antonio/Desktop/MSc Thesis/code/Data/raw_data/Testing'
pathdata = '/home/antonio/Desktop/MSc Thesis/code/Data/Data/Cleaned/FirmsData'
pathfolder = '/home/antonio/Deskt... | [
198,
37811,
198,
15235,
10007,
198,
24305,
198,
48944,
284,
900,
262,
662,
785,
1996,
602,
287,
1502,
284,
15570,
262,
29964,
198,
19849,
8861,
198,
198,
37811,
198,
198,
6978,
7890,
62,
259,
796,
31051,
11195,
14,
23026,
952,
14,
368... | 3.04878 | 123 |
telegram_token = # your telegram token
yandex_token = # your yandex-translator token
| [
660,
30536,
62,
30001,
796,
1303,
534,
573,
30536,
11241,
198,
88,
392,
1069,
62,
30001,
796,
1303,
534,
331,
392,
1069,
12,
7645,
41880,
11241,
198
] | 3.148148 | 27 |
import torch
import time
import numpy as np
import hess
from torch import nn
import torch.nn.functional as F
from torch.autograd import Variable
from gpytorch.utils.lanczos import lanczos_tridiag, lanczos_tridiag_to_diag
################################################################################
# ... | [
11748,
28034,
198,
11748,
640,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
339,
824,
198,
6738,
28034,
1330,
299,
77,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
198,
6738,
28034,
13,
2306,
519,
6335,
1330,
35748,
198,
198,
... | 2.59156 | 1,327 |
# Description: Switch Case (SIMULATED in Python)
# Note
# 1. There is NO switch statement in python.
# 2. A dictionary can be used to simulate switch case in python.
# 3. This style is also called loop-and-a-half.
print(switch('b'))
| [
2,
12489,
25,
14645,
8913,
357,
48913,
6239,
11617,
287,
11361,
8,
198,
198,
2,
5740,
198,
2,
352,
13,
1318,
318,
8005,
5078,
2643,
287,
21015,
13,
198,
2,
362,
13,
317,
22155,
460,
307,
973,
284,
29308,
5078,
1339,
287,
21015,
13... | 3.309859 | 71 |
import csv
import json
import operator
import os
import sqlite3
import urllib.request
from raven import Client
from flask import Flask, request, session, g, redirect, make_response, url_for, abort, escape, render_template, flash, send_from_directory
from passwords import SENTRY_DSN
client = Client(SENTRY_DSN) #add de... | [
11748,
269,
21370,
198,
11748,
33918,
198,
11748,
10088,
198,
11748,
28686,
198,
11748,
44161,
578,
18,
198,
11748,
2956,
297,
571,
13,
25927,
198,
6738,
37735,
1330,
20985,
198,
198,
6738,
42903,
1330,
46947,
11,
2581,
11,
6246,
11,
30... | 2.337185 | 1,904 |
import os
import json
import pytest
import pipeline_tools.shared.submission.create_analysis_file as caf
from pathlib import Path
@pytest.fixture(scope='module')
@pytest.fixture
| [
11748,
28686,
198,
11748,
33918,
198,
11748,
12972,
9288,
198,
198,
11748,
11523,
62,
31391,
13,
28710,
13,
7266,
3411,
13,
17953,
62,
20930,
62,
7753,
355,
19945,
198,
6738,
3108,
8019,
1330,
10644,
628,
198,
31,
9078,
9288,
13,
69,
... | 3.22807 | 57 |
# The following comment should be removed at some point in the future.
# mypy: strict-optional=False
import os
import re
import sys
from typing import Optional
from pipenv.patched.notpip._internal.locations import site_packages, user_site
from pipenv.patched.notpip._internal.utils.virtualenv import (
running_unde... | [
2,
383,
1708,
2912,
815,
307,
4615,
379,
617,
966,
287,
262,
2003,
13,
198,
2,
616,
9078,
25,
7646,
12,
25968,
28,
25101,
198,
198,
11748,
28686,
198,
11748,
302,
198,
11748,
25064,
198,
6738,
19720,
1330,
32233,
198,
198,
6738,
734... | 2.54143 | 881 |
from django.contrib.auth import login, logout
from django.contrib.auth.decorators import login_required
from django.core.exceptions import NON_FIELD_ERRORS
from django.http import HttpResponseRedirect, Http404
from django.shortcuts import render, redirect
from users.forms import RegistrationForm, LoginForm, SettingsFo... | [
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
1330,
17594,
11,
2604,
448,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
12501,
273,
2024,
1330,
17594,
62,
35827,
198,
6738,
42625,
14208,
13,
7295,
13,
1069,
11755,
1330,
44521,
... | 3.534483 | 116 |
from django.apps import AppConfig
| [
6738,
42625,
14208,
13,
18211,
1330,
2034,
16934,
628
] | 3.888889 | 9 |
####################
# Import libraries #
####################
# standard numerical libraries
import numpy as np
import pandas as pd
# Plotting libraries
import seaborn as sns
import matplotlib.pyplot as plt
from matplotlib.colors import ListedColormap
# Sklearn model evaluation
from sklearn.metrics import accuracy_... | [
14468,
4242,
198,
2,
17267,
12782,
1303,
198,
14468,
4242,
198,
198,
2,
3210,
29052,
12782,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
198,
2,
28114,
889,
12782,
198,
11748,
384,
397,
1211,
355,
301... | 2.425046 | 4,863 |
#!/bin/env python
# used to update all local and remote references into this bin folder
import subprocess
GITHUB_SSH_BASE_URL = 'git@github.com:'
GITHUB_HTTPS_BASE_URL = 'https://github.com/'
if __name__ == "__main__":
UPDATE_QUEUE = [
intro_msg,
clone_go_buffer_repo,
]
for update_acti... | [
2,
48443,
8800,
14,
24330,
21015,
198,
198,
2,
973,
284,
4296,
477,
1957,
290,
6569,
10288,
656,
428,
9874,
9483,
198,
11748,
850,
14681,
198,
198,
38,
10554,
10526,
62,
5432,
39,
62,
33,
11159,
62,
21886,
796,
705,
18300,
31,
12567... | 2.321637 | 171 |
from __future__ import division
import torch
class PenaltyBuilder(object):
"""Returns the Length and Coverage Penalty function for Beam Search.
Args:
length_pen (str): option name of length pen
cov_pen (str): option name of cov pen
Attributes:
has_cov_pen (bool): Whether coverage... | [
6738,
11593,
37443,
834,
1330,
7297,
198,
11748,
28034,
628,
198,
4871,
41676,
32875,
7,
15252,
2599,
198,
220,
220,
220,
37227,
35561,
262,
22313,
290,
33998,
41676,
2163,
329,
25855,
11140,
13,
628,
220,
220,
220,
943,
14542,
25,
198,... | 2.51938 | 1,032 |
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import llnl.util.tty as tty
import spack.cmd
import spack.cmd.common.arguments as arguments
import spack.environment as e... | [
2,
15069,
2211,
12,
1238,
2481,
13914,
45036,
3549,
2351,
4765,
11,
11419,
290,
584,
198,
2,
1338,
441,
4935,
34152,
13,
4091,
262,
1353,
12,
5715,
27975,
38162,
9947,
2393,
329,
3307,
13,
198,
2,
198,
2,
30628,
55,
12,
34156,
12,
... | 3.393443 | 122 |
# Copyright (C) 2008-2011 Oracle Corporation
#
# This file is part of a free software library; you can redistribute
# it and/or modify it under the terms of the GNU Lesser General
# Public License version 2.1 as published by the Free Software
# Foundation and shipped in the "COPYING.LIB" file with this library.
# The l... | [
2,
15069,
357,
34,
8,
3648,
12,
9804,
18650,
10501,
198,
2,
198,
2,
770,
2393,
318,
636,
286,
257,
1479,
3788,
5888,
26,
345,
460,
17678,
4163,
198,
2,
340,
290,
14,
273,
13096,
340,
739,
262,
2846,
286,
262,
22961,
12892,
263,
... | 3.506211 | 322 |
# -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2016-12-25 15:16
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2980,
515,
416,
37770,
352,
13,
940,
13,
18,
319,
1584,
12,
1065,
12,
1495,
1315,
25,
1433,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
... | 2.73913 | 69 |
import os
import sys
import smtplib
import socket
import urllib2
import datetime
from email.mime.text import MIMEText
from email.mime.image import MIMEImage
from email.mime.multipart import MIMEMultipart
from alerta.common import log as logging
from alerta.common import config
LOG = logging.getLogger(__name__)
CONF... | [
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
895,
83,
489,
571,
198,
11748,
17802,
198,
11748,
2956,
297,
571,
17,
198,
11748,
4818,
8079,
198,
198,
6738,
3053,
13,
76,
524,
13,
5239,
1330,
337,
3955,
2767,
2302,
198,
6738,
3053,... | 3.026786 | 112 |
import numpy as np
import time
from hmsolver.meshgrid import Zone2d
from hmsolver.meshgrid import Mesh2d
from hmsolver.material import Material2d
from hmsolver.femcore import point_criteria
from hmsolver.femcore import segment_criteria
from hmsolver.femcore import boundary_cond2d as _bc_ # abbreviation
from hmsolver.... | [
11748,
299,
32152,
355,
45941,
198,
11748,
640,
198,
198,
6738,
289,
907,
14375,
13,
76,
5069,
25928,
1330,
13035,
17,
67,
198,
6738,
289,
907,
14375,
13,
76,
5069,
25928,
1330,
47529,
17,
67,
198,
6738,
289,
907,
14375,
13,
33665,
... | 2.120133 | 899 |
#
# PySNMP MIB module RUCKUS-ZD-WLAN-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/RUCKUS-ZD-WLAN-MIB
# Produced by pysmi-0.3.4 at Wed May 1 14:59:17 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, ... | [
2,
198,
2,
9485,
15571,
7378,
337,
9865,
8265,
371,
16696,
2937,
12,
57,
35,
12,
54,
25697,
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,
1... | 2.554804 | 37,999 |
""" General database functions.
Should work with DB API 2.0 cursors, tested with psycopg2.
https://www.python.org/dev/peps/pep-0249/
"""
def as_dicts(cursor):
""" Return a list of dictionaries from a result-set.
"""
fields = [k[0] for k in cursor.description]
result = []
rows = cursor.fet... | [
37811,
3611,
6831,
5499,
13,
628,
220,
220,
220,
10358,
670,
351,
20137,
7824,
362,
13,
15,
13882,
669,
11,
6789,
351,
17331,
22163,
70,
17,
13,
198,
220,
220,
220,
3740,
1378,
2503,
13,
29412,
13,
2398,
14,
7959,
14,
431,
862,
14... | 2.673861 | 417 |
#!/usr/bin/env python
"""
CGNX API -> list sites, example proof of concept.
**Author:** CloudGenix
**Copyright:** (c) 2017-2021 CloudGenix, Inc
**License:** MIT
"""
__author__ = "CloudGenix Developer Support <developers@cloudgenix.com>"
__email__ = "developers@cloudgenix.com"
__copyright__ = "Copyright (c) 2017-2021... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
37811,
198,
34,
16630,
55,
7824,
4613,
1351,
5043,
11,
1672,
6617,
286,
3721,
13,
198,
198,
1174,
13838,
25,
1174,
10130,
13746,
844,
198,
198,
1174,
15269,
25,
1174,
357,
66,
8,
217... | 3.18895 | 1,810 |