content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
import logging
from pprint import pprint
import ldclient
from ldclient import Config
mylogger = logging.getLogger()
| [
11748,
18931,
198,
6738,
279,
4798,
1330,
279,
4798,
198,
11748,
300,
67,
16366,
198,
6738,
300,
67,
16366,
1330,
17056,
198,
198,
1820,
6404,
1362,
796,
18931,
13,
1136,
11187,
1362,
3419,
628,
198
] | 3.4 | 35 |
import github3
import redminelib
from redminelib import Redmine
import time
import json, ast
import os
import re
if __name__ == '__main__':
redmine_token = "redmine"
redmine_url = "url to redmine website (without ending /)"
redmine_project = "redmine project name"
gitlab_token = "github access token"... | [
11748,
33084,
18,
198,
11748,
2266,
1084,
417,
571,
198,
6738,
2266,
1084,
417,
571,
1330,
2297,
3810,
198,
11748,
640,
198,
11748,
33918,
11,
6468,
198,
11748,
28686,
198,
11748,
302,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
... | 2.661342 | 313 |
# y
# n
# f
# s
# +
# -
# c
# b
# a
# _step | [
198,
220,
1303,
331,
628,
220,
1303,
299,
628,
220,
1303,
277,
628,
220,
1303,
264,
628,
220,
1303,
1343,
628,
220,
1303,
532,
628,
220,
1303,
269,
628,
220,
1303,
275,
628,
220,
1303,
257,
628,
220,
1303,
4808,
9662
] | 1.780488 | 41 |
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 02 14:05:46 2017
Data modification functions
@author: Owner
"""
import pandas as pd
import numpy as np
from bs4 import BeautifulSoup
import re
def splitdatetime(dataframe,attrlist,inplace=True):
"""Scan through dataframe to find items in attrlist to be spl... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
37811,
201,
198,
41972,
319,
26223,
1526,
7816,
1478,
25,
2713,
25,
3510,
2177,
201,
198,
6601,
17613,
5499,
201,
198,
31,
9800,
25,
23853,
201,
198,
37811,
201,
... | 2.036585 | 4,346 |
#!/usr/bin/env python
#
# Copyright AlertAvert.com (c) 2013. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless req... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
198,
2,
15069,
23276,
32,
1851,
13,
785,
357,
66,
8,
2211,
13,
1439,
2489,
10395,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34... | 3.572727 | 220 |
from __future__ import print_function
import sys
import time
import warnings
import Pyro4
warnings.filterwarnings("ignore")
# Pyro4.config.COMMTIMEOUT=2
print("Enter the server's uri that was printed:")
if sys.version_info < (3, 0):
uri = raw_input()
else:
uri = input()
uri = uri.strip()
... | [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
201,
198,
11748,
25064,
201,
198,
11748,
640,
201,
198,
11748,
14601,
201,
198,
201,
198,
11748,
44954,
19,
201,
198,
201,
198,
201,
198,
40539,
654,
13,
24455,
40539,
654,
7203,
46430,
4... | 2.4 | 260 |
from typing import List
from pyspark.sql import SparkSession
from databricksbundle.spark.SparkSessionLazy import SparkSessionLazy
from databricksbundle.spark.config.ConfiguratorInterface import ConfiguratorInterface
| [
6738,
19720,
1330,
7343,
198,
6738,
279,
893,
20928,
13,
25410,
1330,
17732,
36044,
198,
6738,
4818,
397,
23706,
65,
31249,
13,
2777,
668,
13,
4561,
668,
36044,
43,
12582,
1330,
17732,
36044,
43,
12582,
198,
6738,
4818,
397,
23706,
65,
... | 3.724138 | 58 |
#!/usr/bin/env python
# encoding: utf-8
#
# Copyright (c) 2010 Doug Hellmann. All rights reserved.
#
"""Raise e to a power.
"""
#end_pymotw_header
import math
x = 2
fmt = '%.20f'
print fmt % (math.e ** 2)
print fmt % math.pow(math.e, 2)
print fmt % math.exp(2)
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
21004,
25,
3384,
69,
12,
23,
198,
2,
198,
2,
15069,
357,
66,
8,
3050,
15115,
5783,
9038,
13,
220,
1439,
2489,
10395,
13,
198,
2,
198,
37811,
21762,
786,
304,
284,
257,
1176,
1... | 2.345133 | 113 |
from seagulls.cli import (
CliRequest,
CliRequestRegistrationEvent,
RequestEnvironment
)
| [
6738,
384,
363,
724,
82,
13,
44506,
1330,
357,
198,
220,
220,
220,
1012,
72,
18453,
11,
198,
220,
220,
220,
1012,
72,
18453,
47133,
9237,
11,
198,
220,
220,
220,
19390,
31441,
198,
8,
628,
628
] | 2.810811 | 37 |
from PIL import Image, ImageDraw
| [
6738,
350,
4146,
1330,
7412,
11,
7412,
25302,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
198
] | 2.142857 | 21 |
import difflib
# 其中的str1,str2并未分词,是两组字符串
str1 = '兆丰世贸大楼'
str2 = '兆疯世贸大厦'
diff_result = difflib.SequenceMatcher(None, str1, str2).ratio()
print(diff_result)
| [
11748,
814,
8019,
198,
198,
2,
10263,
227,
114,
40792,
21410,
2536,
16,
171,
120,
234,
2536,
17,
33176,
114,
17312,
103,
26344,
228,
46237,
235,
171,
120,
234,
42468,
10310,
97,
163,
119,
226,
27764,
245,
163,
105,
99,
10310,
110,
1... | 1.39823 | 113 |
import os
lr = 1e-3*2
k = 0
while(k<9):
lr = lr/2
os.system('python fine_tune.py ' + '--lrC='+str(lr))
k += 1
| [
11748,
28686,
198,
198,
14050,
796,
352,
68,
12,
18,
9,
17,
198,
74,
796,
657,
198,
4514,
7,
74,
27,
24,
2599,
198,
220,
220,
220,
300,
81,
796,
300,
81,
14,
17,
198,
220,
220,
220,
28686,
13,
10057,
10786,
29412,
3734,
62,
83... | 1.701299 | 77 |
# -*- coding: utf-8 -*-
def run_prime_factorization(max_number: int) -> dict:
'''Run prime factorization.
Args:
max_number: Int of number (greater than 1).
Returns:
A dictionary's items ((base, exponent) pairs).
Landau notation: O(log n)
'''
from math import sqrt
... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
201,
198,
201,
198,
4299,
1057,
62,
35505,
62,
31412,
1634,
7,
9806,
62,
17618,
25,
493,
8,
4613,
8633,
25,
201,
198,
220,
220,
220,
705,
7061,
10987,
6994,
576... | 2.021563 | 371 |
# -*- coding: utf-8 -*-
""" Kudryavtsev model by Anisimov et al. (1997).
Anisimov, O. A., Shiklomanov, N. I., & Nelson, F. E. (1997).
Global warming and active-layer thickness: results from transient general circulation models.
Global and Planetary Change, 15(3-4), 61-77. DOI:10.1016/S0921-8181(97)00009-X
*The MIT... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
220,
509,
463,
563,
615,
83,
325,
85,
2746,
416,
1052,
271,
44273,
2123,
435,
13,
357,
21498,
737,
220,
198,
198,
2025,
271,
44273,
11,
440,
13,
317,
1539,
91... | 1.998622 | 5,079 |
# Generated by Django 3.1.1 on 2021-01-22 19:28
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
16,
13,
16,
319,
33448,
12,
486,
12,
1828,
678,
25,
2078,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import unittest
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
import tensorflow as tf
import tensorlayer as tl
if __name__ == '__main__':
tf.logging.set_verbosity(tf.logging.DEBUG)
tl.logging.set_verbosity(tl.logging.DEBUG)
unittest.main()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
28686,
198,
11748,
555,
715,
395,
198,
198,
418,
13,
268,
2268,
17816,
10234,
62,
8697,
47,
62,
23678,
62... | 2.270073 | 137 |
# -*- coding:utf-8 -*-
import os
import torch
import yolov1
import matplotlib.pyplot as plt
import numpy as np
from torchvision import transforms
from torchsummary.torchsummary import summary
from PIL import Image, ImageDraw
np.set_printoptions(precision=4, suppress=True)
| [
2,
532,
9,
12,
19617,
25,
40477,
12,
23,
532,
9,
12,
198,
198,
11748,
28686,
198,
11748,
28034,
198,
11748,
331,
349,
709,
16,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
299,
32152,
355,
45941,
198,
... | 3.183908 | 87 |
from pathlib import Path
from setuptools import find_packages, setup
__package = Path().cwd()
__package_name = __package.name
__read_me = __package / "README.md"
__metadata = (__package / __package_name) / "__init__.py"
__package_info = dict({"version": "", "description": "", "readme": ""})
read_metadata_info()
... | [
6738,
3108,
8019,
1330,
10644,
198,
198,
6738,
900,
37623,
10141,
1330,
1064,
62,
43789,
11,
9058,
198,
198,
834,
26495,
796,
10644,
22446,
66,
16993,
3419,
198,
834,
26495,
62,
3672,
796,
11593,
26495,
13,
3672,
198,
198,
834,
961,
6... | 2.623786 | 412 |
from selenium import webdriver
import time
# O time.sleep(n) espera 'n' segundos para executar o próximo comando
navegador = webdriver.Chrome() # Abre o navegador; requer cuidados - vide README.md
time.sleep(3)
navegador.get("https://nsa.cps.sp.gov.br") # Abre o NSA
time.sleep(2)
navegador.find_element_by_xpath('//... | [
6738,
384,
11925,
1505,
1330,
3992,
26230,
198,
11748,
640,
198,
198,
2,
440,
640,
13,
42832,
7,
77,
8,
1658,
525,
64,
705,
77,
6,
384,
70,
917,
418,
31215,
3121,
283,
267,
778,
10205,
87,
25147,
401,
25440,
198,
198,
77,
1015,
... | 2.321212 | 330 |
import random
print(random_number(100))
| [
11748,
4738,
201,
198,
220,
201,
198,
4798,
7,
25120,
62,
17618,
7,
3064,
4008,
201,
198
] | 2.647059 | 17 |
from django.shortcuts import render, reverse, HttpResponse, get_object_or_404
from .forms import OrderForm, PaymentForm
from django.contrib.auth.decorators import login_required
from django.contrib import messages
from django.utils import timezone
from .models import Charge
#import settings so that we can access the p... | [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
11,
9575,
11,
367,
29281,
31077,
11,
651,
62,
15252,
62,
273,
62,
26429,
198,
6738,
764,
23914,
1330,
8284,
8479,
11,
28784,
8479,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13... | 3.805714 | 175 |
from seabreeze.pyseabreeze.features._base import SeaBreezeFeature
# Definition
# ==========
#
# TODO: This feature needs to be implemented for pyseabreeze
#
| [
6738,
384,
397,
631,
2736,
13,
9078,
325,
397,
631,
2736,
13,
40890,
13557,
8692,
1330,
6896,
33,
631,
2736,
38816,
628,
198,
2,
30396,
198,
2,
796,
2559,
28,
198,
2,
220,
198,
2,
16926,
46,
25,
770,
3895,
2476,
284,
307,
9177,
... | 3.018868 | 53 |
import numpy as np
import plotly.graph_objects as go
import argparse
import pdb
import copy
# parser = argparse.ArgumentParser(description="options")
# parser.add_argument("--path", required=True, action="store",
# help="main folder absolute path, something like /media/jeremy/Data/local/Data_ma... | [
11748,
299,
32152,
355,
45941,
198,
11748,
7110,
306,
13,
34960,
62,
48205,
355,
467,
198,
11748,
1822,
29572,
198,
11748,
279,
9945,
198,
11748,
4866,
198,
198,
2,
30751,
796,
1822,
29572,
13,
28100,
1713,
46677,
7,
11213,
2625,
25811,... | 2.14095 | 4,569 |
"""
# @Time : 2020/12/11
# @Author : Jimou Chen
"""
import json
# 得到下一个状态,返回(statues, move)格式
# 切分每一步
if __name__ == '__main__':
with open('chess.json') as f:
json_file = f.read()
init_list, move_list = handle_json(json_file)
final_res = []
# 切分步数
for i in range(len(init_list))... | [
37811,
198,
2,
2488,
7575,
220,
220,
220,
1058,
220,
12131,
14,
1065,
14,
1157,
198,
2,
2488,
13838,
220,
1058,
220,
5395,
280,
12555,
198,
37811,
198,
11748,
33918,
628,
198,
198,
2,
10263,
122,
245,
26344,
108,
10310,
233,
31660,
... | 1.95302 | 894 |
from dceu2019.apps.pretalx_utils.models import TalkExtraProperties
from django.core.mail.message import EmailMultiAlternatives
from django.core.management.base import BaseCommand
from django.template import loader
| [
6738,
288,
344,
84,
23344,
13,
18211,
13,
5310,
282,
87,
62,
26791,
13,
27530,
1330,
12167,
27726,
2964,
18200,
198,
6738,
42625,
14208,
13,
7295,
13,
4529,
13,
20500,
1330,
9570,
29800,
23081,
2929,
198,
6738,
42625,
14208,
13,
7295,
... | 3.77193 | 57 |
from __future__ import absolute_import, division
from typing import Tuple
import torch
import torch.nn as nn
import numpy as np
import math
import torch.nn.functional as F
from ac import utils
import config
domain_sym = config.AUGMENTED_TRANS_SET[0]
"""
Extended AC: derived class from ac_conv
""" | [
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
11,
7297,
198,
6738,
19720,
1330,
309,
29291,
198,
198,
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
10688,
198,
11748,
28034,
... | 3.304348 | 92 |
import random
x = random.randint(0 , 100000)
random_num = random.randint(x , x + 20)
ask = input("Are you Ready to Play? (y/n) ").lower()
if ask == "y":
print("Rules of the Game: \n")
print("You got 5 attempts to guess the and you have 3 hints to use. You can type end anytime to end the game \n")
prev = -1
chan... | [
11748,
4738,
198,
87,
796,
4738,
13,
25192,
600,
7,
15,
837,
1802,
830,
8,
198,
25120,
62,
22510,
796,
4738,
13,
25192,
600,
7,
87,
837,
2124,
1343,
1160,
8,
198,
2093,
796,
5128,
7203,
8491,
345,
23432,
284,
3811,
30,
357,
88,
... | 2.251192 | 629 |
# -*- coding: utf-8 -*-
from django import forms
from .models import restaurants
# Para campos individuales:
'''
#for mongoengine
class RestaurantesForm(ModelForm):
class Meta:
model = restaurants
fields = ['name', 'cuisine', 'address.street', 'borough', 'image']
'''
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
42625,
14208,
1330,
5107,
198,
198,
6738,
764,
27530,
1330,
10808,
628,
198,
2,
2547,
64,
1413,
418,
1981,
274,
25,
198,
198,
7061,
6,
198,
2,
1640,
285,
25162,
... | 2.928571 | 98 |
from youtube_api.youtube_api import YouTubeDataAPI
import youtube_api.parsers as P
import youtube_api.youtube_api_utils as youtube_api_utils
__version__ = '0.0.21'
| [
6738,
35116,
62,
15042,
13,
11604,
62,
15042,
1330,
7444,
6601,
17614,
198,
11748,
35116,
62,
15042,
13,
79,
945,
364,
355,
350,
198,
11748,
35116,
62,
15042,
13,
11604,
62,
15042,
62,
26791,
355,
35116,
62,
15042,
62,
26791,
198,
198... | 3.055556 | 54 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Apr 11 02:41:39 2020
@author: nagaraj
"""
import cv2
import numpy as np
from time import sleep
refPt = []
num_points = int(input('Enter the number of points to track: '))
landmarks = np.zeros((num_points,2),dtype='float32')
cap = cv2.VideoCapture(0)
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
7031,
2758,
1367,
7816,
25,
3901,
25,
2670,
12131,
198,
198,
31,
9800,
25,
299,
32452,
12... | 1.94246 | 1,008 |
from logging import getLogger
from PyQt5.QtSql import QSqlQuery
from numpy import (
array,
)
from .backend import Table_with_files, NumpyTable
from .utils import (
find_subject_id,
get_dtypes,
out_datetime,
list_channels_electrodes,
recording_attach,
recording_get,
sort_starttime,
... | [
6738,
18931,
1330,
651,
11187,
1362,
198,
6738,
9485,
48,
83,
20,
13,
48,
83,
50,
13976,
1330,
1195,
50,
13976,
20746,
198,
6738,
299,
32152,
1330,
357,
198,
220,
220,
220,
7177,
11,
198,
220,
220,
220,
1267,
198,
198,
6738,
764,
... | 2.6 | 515 |
# -*- coding: UTF-8 -*-
''' Metadata, Copyright, License:
Replace fields enclosed by brackets "[]" with appropriate identifying information, but do not include the brackes. Delete this line also.
----------------------------------------------------------------------------------------------------
Name: FileName.py... | [
2,
532,
9,
12,
19617,
25,
41002,
12,
23,
532,
9,
12,
198,
7061,
6,
3395,
14706,
11,
15069,
11,
13789,
25,
198,
3041,
5372,
7032,
28543,
416,
28103,
12878,
30866,
351,
5035,
13720,
1321,
11,
475,
466,
407,
2291,
262,
865,
441,
274,... | 3.194085 | 541 |
# Generated by Django 2.1.1 on 2018-10-24 10:31
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
362,
13,
16,
13,
16,
319,
2864,
12,
940,
12,
1731,
838,
25,
3132,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
import logging
from common.pycats_facade import PyCatsFacade
| [
11748,
18931,
198,
198,
6738,
2219,
13,
9078,
24619,
62,
38942,
671,
1330,
9485,
34,
1381,
47522,
671,
628,
198
] | 3.2 | 20 |
from dataclasses import dataclass
import re
from typing import Iterable, List, Tuple
@dataclass
if __name__ == "__main__":
main()
| [
6738,
4818,
330,
28958,
1330,
4818,
330,
31172,
198,
11748,
302,
198,
6738,
19720,
1330,
40806,
540,
11,
7343,
11,
309,
29291,
628,
198,
31,
19608,
330,
31172,
628,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
129... | 2.877551 | 49 |
import os
import cv2
import random
import argparse
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torch.utils.data import DataLoader, Dataset
from torchvision import transforms
os.environ['CUDA_VISIBLE_DEVICES'] = '0,1'
operation_canditates = {
... | [
11748,
28686,
198,
11748,
269,
85,
17,
198,
11748,
4738,
198,
11748,
1822,
29572,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
198,... | 2.924686 | 239 |
# coding=utf-8
from pymongo import MongoClient
from gensim import corpora
from gensim.models.ldamodel import LdaModel
from bson.objectid import ObjectId
table="morph"
client = MongoClient('mongodb://localhost:27017/')
db = client.shuron
cdict = {}
total_word = 0
# 単語のリストを作成する
for qa in db[table].find():
for w ... | [
2,
19617,
28,
40477,
12,
23,
198,
198,
6738,
279,
4948,
25162,
1330,
42591,
11792,
198,
6738,
308,
641,
320,
1330,
3990,
64,
198,
6738,
308,
641,
320,
13,
27530,
13,
335,
321,
375,
417,
1330,
406,
6814,
17633,
198,
6738,
275,
1559,
... | 1.985673 | 349 |
from Tkinter import PhotoImage
| [
6738,
309,
74,
3849,
1330,
5555,
5159,
201
] | 3.875 | 8 |
# coding: utf-8
import redis
from servicecrack.service.Base import BaseCrack
from servicecrack.utils.logg import Logging
logging = Logging("redis")
service_name = "redis"
if __name__ == '__main__':
host = "10.0.81.85"
port = "3306"
usernames = ["root", "admin"]
passwords = ["root", "admin", "12345... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
11748,
2266,
271,
198,
198,
6738,
2139,
6098,
441,
13,
15271,
13,
14881,
1330,
7308,
13916,
441,
198,
6738,
2139,
6098,
441,
13,
26791,
13,
6404,
70,
1330,
5972,
2667,
198,
198,
6404,
2667,
796,
... | 2.524691 | 162 |
import utils as u
from plot import plot_history
n_rebase = 5*3*365 # number of rebases to simulate; 3 rebases per day
# Parameters
BCV = 100
REWARD_RATE = 0.006 # reward rate per rebase, fraction of 1
VEST_SUPPLY_FRAC = 0.09
# Initial conditions
ohm_supply_init = 1 # start the simulation at 1 OHM == 1 USD
bonds_... | [
11748,
3384,
4487,
355,
334,
198,
6738,
7110,
1330,
7110,
62,
23569,
628,
198,
77,
62,
260,
8692,
796,
642,
9,
18,
9,
24760,
220,
1303,
1271,
286,
3405,
1386,
284,
29308,
26,
513,
3405,
1386,
583,
1110,
198,
198,
2,
40117,
198,
27... | 2.096952 | 2,001 |
from __future__ import print_function, absolute_import, division #makes KratosMultiphysics backward compatible with python 2.6 and 2.7
| [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
11,
4112,
62,
11748,
11,
7297,
1303,
49123,
509,
10366,
418,
15205,
13323,
23154,
19528,
11670,
351,
21015,
362,
13,
21,
290,
362,
13,
22,
198
] | 3.970588 | 34 |
#dependencies
import matplotlib.pyplot as plt
from datetime import datetime
import yfinance as yf
import pandas as pd
import numpy as np
import math as math
from time import sleep
from art import tprint
from scipy.optimize import curve_fit
from scipy.odr import ODR, Model, Data, RealData
from gekko import GEKKO
from nu... | [
2,
45841,
3976,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
11748,
331,
69,
14149,
355,
331,
69,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,... | 3.267045 | 176 |
BREAK_BUILD=False
# BREAK_BUILD=True
# intentionally break by skipping last log_txn call
import os
import time
import boto3
from botocore.exceptions import ClientError
import psycopg2
import json
import yaml
#import decimal
from decimal import Decimal
# from xml.etree.ElementTree import fromstring, ParseError
tr... | [
40438,
10206,
62,
19499,
26761,
28,
25101,
198,
2,
29377,
10206,
62,
19499,
26761,
28,
17821,
198,
2,
16464,
2270,
416,
31017,
938,
2604,
62,
17602,
77,
869,
628,
198,
11748,
28686,
198,
11748,
640,
198,
11748,
275,
2069,
18,
198,
673... | 2.315095 | 2,577 |
import pandas as pd
data = pd.read_csv('api.csv', header=2)
data = data.rename(data.loc[data.index]['Country Name'])
data = data.drop(data.columns[:4], 1)
data.dropna(axis='columns', how='all', inplace=True)
data.dropna(axis='rows', how='all', inplace=True)
print(data)
#Первый график
data.sum(axis='rows', num... | [
11748,
19798,
292,
355,
279,
67,
201,
198,
201,
198,
7890,
796,
279,
67,
13,
961,
62,
40664,
10786,
15042,
13,
40664,
3256,
13639,
28,
17,
8,
201,
198,
7890,
796,
1366,
13,
918,
480,
7,
7890,
13,
17946,
58,
7890,
13,
9630,
7131,
... | 2.120301 | 266 |
from typing import Optional
import torch
class AutoDevice:
'''自動的に最適なデバイスを判断して選択するクラス
'''
def __init__(self, disable_cuda: bool = False):
'''
Args:
disable_cuda: CUDAを無効化するかどうか
Todo:
* 他の尺度も実装する
現在は最大メモリ容量を基準に優先順位を決定している。
'''
s... | [
6738,
19720,
1330,
32233,
198,
198,
11748,
28034,
628,
198,
4871,
11160,
24728,
25,
198,
220,
220,
220,
705,
7061,
164,
229,
103,
47947,
243,
21410,
28618,
17312,
222,
34402,
102,
26945,
21959,
29659,
11482,
8943,
31758,
26344,
97,
23877,... | 1.515182 | 988 |
"""Defines WebotsRoadDisturbance Class
----------------------------------------------------------------------------------------------------------
This file is part of Sim-ATAV project and licensed under MIT license.
Copyright (c) 2018 Cumhur Erkan Tuncali, Georgios Fainekos, Danil Prokhorov, Hisahiro Ito, James Kapinsk... | [
37811,
7469,
1127,
5313,
1747,
29197,
20344,
5945,
590,
5016,
198,
10097,
3880,
35937,
198,
1212,
2393,
318,
636,
286,
3184,
12,
1404,
10116,
1628,
290,
11971,
739,
17168,
5964,
13,
198,
15269,
357,
66,
8,
2864,
27843,
48349,
5256,
2754... | 3.699507 | 203 |
# Generated by Django 4.0.1 on 2022-01-07 22:40
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
604,
13,
15,
13,
16,
319,
33160,
12,
486,
12,
2998,
2534,
25,
1821,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# urls.py
#
from django.urls import path
from filebrowser import views
app_name = 'filebrowser'
urlpatterns = [
path(r'option', views.option, name='option'),
path(r'upload_resource', views.upload_resource, name='upload_resource'),
path(r'download/env/<s... | [
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,
198,
2,
220,
2956,
7278,
13,
9078,
198,
2,
198,
198,
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
198,
198,... | 2.44 | 175 |
# Copyright ClusterHQ Inc. See LICENSE file for details.
"""
A library for implementing state changes on external systems in an isolated
way.
The basic unit of an external system change provided is an ``IStateChange``
provider.
More complex changes can be composed from individual ``IStateChange``
providers.
``run_... | [
2,
15069,
38279,
41275,
3457,
13,
220,
4091,
38559,
24290,
2393,
329,
3307,
13,
198,
198,
37811,
198,
32,
5888,
329,
15427,
1181,
2458,
319,
7097,
3341,
287,
281,
11557,
198,
1014,
13,
198,
198,
464,
4096,
4326,
286,
281,
7097,
1080,
... | 2.885019 | 1,809 |
import csv
import os
import sqlite3
import time
import discord
from discord.ext import commands
from TypeRacerStats.config import BOT_OWNER_IDS, HELP_BLACK
from TypeRacerStats.file_paths import DATABASE_PATH
from TypeRacerStats.Core.Common.accounts import check_banned_status
from TypeRacerStats.Core.Common.formatting i... | [
11748,
269,
21370,
198,
11748,
28686,
198,
11748,
44161,
578,
18,
198,
11748,
640,
198,
11748,
36446,
198,
6738,
36446,
13,
2302,
1330,
9729,
198,
6738,
5994,
49,
11736,
29668,
13,
11250,
1330,
347,
2394,
62,
14165,
1137,
62,
14255,
11,... | 3.422414 | 116 |
import os
import unittest
from woidb.db import connect, Session
from woidb.importers.woi import import_csv
from woidb.models import Base, Team
| [
11748,
28686,
198,
11748,
555,
715,
395,
198,
198,
6738,
266,
1868,
65,
13,
9945,
1330,
2018,
11,
23575,
198,
6738,
266,
1868,
65,
13,
320,
1819,
1010,
13,
21638,
72,
1330,
1330,
62,
40664,
198,
6738,
266,
1868,
65,
13,
27530,
1330,... | 3.085106 | 47 |
# encoding: utf-8
# from .defaults import _C as cfg
| [
2,
21004,
25,
3384,
69,
12,
23,
198,
2,
422,
764,
12286,
82,
1330,
4808,
34,
355,
30218,
70,
198
] | 2.6 | 20 |
"""
@Author = Alex Wallar
"""
from javax.swing import *
from java.lang import *
from java.awt import *
from math import ceil, log
from random import choice, randint
frame = JFrame('Encryption & Decryption')
frame.setLayout(GridLayout(1, 2))
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE)
userChoicePanel = JPanel(... | [
37811,
198,
31,
13838,
796,
4422,
5007,
283,
198,
37811,
198,
6738,
474,
615,
897,
13,
46737,
1330,
1635,
198,
6738,
20129,
13,
17204,
1330,
1635,
198,
6738,
20129,
13,
707,
83,
1330,
1635,
198,
6738,
10688,
1330,
2906,
346,
11,
2604,... | 2.797139 | 769 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Nov 21 12:52:49 2018
@author: shenwanxiang
Multi process Run
"""
import time
import pandas as pd
from tqdm import tqdm
from concurrent.futures import ProcessPoolExecutor, wait, as_completed
from multiprocessing import Pool,cpu_count,current_process
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
3300,
5267,
2310,
1105,
25,
4309,
25,
2920,
2864,
198,
198,
31,
9800,
25,
673,
77,
8149,
... | 2.005928 | 2,193 |
# Copyright (c) 2016 Shotgun Software Inc.
#
# CONFIDENTIAL AND PROPRIETARY
#
# This work is provided "AS IS" and subject to the Shotgun Pipeline Toolkit
# Source Code License included in this distribution package. See LICENSE.
# By accessing, using, copying or modifying this work you indicate your
# agreement to t... | [
2,
15069,
357,
66,
8,
1584,
34198,
10442,
3457,
13,
198,
2,
220,
198,
2,
7102,
37,
25256,
12576,
5357,
4810,
3185,
7112,
2767,
13153,
198,
2,
220,
198,
2,
770,
670,
318,
2810,
366,
1921,
3180,
1,
290,
2426,
284,
262,
34198,
37709,... | 2.712046 | 3,827 |
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
| [
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
628,
628
] | 2.96 | 25 |
VERSION = ('0', '2', '2dev')
__version__ = get_version()
| [
43717,
796,
19203,
15,
3256,
705,
17,
3256,
705,
17,
7959,
11537,
628,
198,
834,
9641,
834,
796,
651,
62,
9641,
3419,
198
] | 2.565217 | 23 |
import re
from datetime import date
from pathlib import Path
from textwrap import dedent
from typing import Optional
import pandas as pd
import typer
from cgr_gwas_qc.config import config_to_yaml
from cgr_gwas_qc.models.config import Config, GenomeBuild, Idat, ReferenceFiles, UserFiles
from cgr_gwas_qc.models.config.... | [
11748,
302,
198,
6738,
4818,
8079,
1330,
3128,
198,
6738,
3108,
8019,
1330,
10644,
198,
6738,
2420,
37150,
1330,
4648,
298,
198,
6738,
19720,
1330,
32233,
198,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
1259,
525,
198,
198,
6738,... | 2.486353 | 2,638 |
# Copyright © 2019 Province of British Columbia
#
# 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 agr... | [
2,
15069,
10673,
13130,
22783,
286,
3517,
9309,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
... | 3.041215 | 461 |
import json
from django.contrib.auth.decorators import login_required
from django.contrib.auth.mixins import LoginRequiredMixin
from django.contrib.sites.shortcuts import get_current_site
from django.core.mail import EmailMessage
from django.db.models import Q
from django.http import JsonResponse
from django.shortcuts ... | [
11748,
33918,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
12501,
273,
2024,
1330,
17594,
62,
35827,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
19816,
1040,
1330,
23093,
37374,
35608,
259,
198,
6738,
42625,
14208,
... | 3.463807 | 373 |
import datetime
import json
import os
import re
from operator import itemgetter
from collections import namedtuple
from csp.decorators import csp_exempt
from django.conf import settings
from django.contrib import messages
from django.contrib.auth import logout
from django.contrib.admin.views.decorators import staff_me... | [
11748,
4818,
8079,
198,
11748,
33918,
198,
11748,
28686,
198,
11748,
302,
198,
6738,
10088,
1330,
2378,
1136,
353,
198,
6738,
17268,
1330,
3706,
83,
29291,
198,
198,
6738,
269,
2777,
13,
12501,
273,
2024,
1330,
269,
2777,
62,
42679,
198... | 2.55278 | 8,005 |
from kivymd.app import MDApp
from kivy.lang import Builder
import kivymd_extensions.akivymd
from helper import KV
vipin().run()
| [
6738,
479,
452,
4948,
67,
13,
1324,
1330,
10670,
4677,
198,
6738,
479,
452,
88,
13,
17204,
1330,
35869,
198,
11748,
479,
452,
4948,
67,
62,
2302,
5736,
13,
461,
452,
4948,
67,
198,
6738,
31904,
1330,
509,
53,
198,
198,
85,
541,
25... | 2.6875 | 48 |
from config.api1_1_config import *
from config.amqp import *
from modules.logger import Log
from on_http_api1_1 import NodesApi as Nodes
from proboscis.asserts import assert_equal
from proboscis.asserts import assert_not_equal
from proboscis.asserts import assert_is_not_none
from proboscis import test
from json import ... | [
6738,
4566,
13,
15042,
16,
62,
16,
62,
11250,
1330,
1635,
198,
6738,
4566,
13,
321,
80,
79,
1330,
1635,
198,
6738,
13103,
13,
6404,
1362,
1330,
5972,
198,
6738,
319,
62,
4023,
62,
15042,
16,
62,
16,
1330,
399,
4147,
32,
14415,
355... | 2.989474 | 190 |
#! /usr/bin/jython
# -*- coding: utf-8 -*-
#
# cassandra_create.py
# Sep/06/2013
#
# ----------------------------------------------------------------
#
import sys
from java.lang import System
#
import java
from java.sql import DriverManager
#
sys.path.append ('/var/www/data_base/common/python_common')
from text_man... | [
2,
0,
1220,
14629,
14,
8800,
14,
73,
7535,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
198,
2,
197,
66,
562,
15918,
62,
17953,
13,
9078,
198,
2,
197,
197,
197,
197,
197,
19117,
14,
3312,
14,
6390,
... | 3.368794 | 282 |
import json
from datetime import datetime, timedelta
from django.http import HttpResponse
from MedWeb.clinical_database.clinical_database import medications
from MedWeb.concentrator_interface.entities import Schedule, from_dict, ScheduledDose
from MedWeb.concentrator_interface.interface import schedules, send_to_conc... | [
11748,
33918,
198,
6738,
4818,
8079,
1330,
4818,
8079,
11,
28805,
12514,
198,
198,
6738,
42625,
14208,
13,
4023,
1330,
367,
29281,
31077,
198,
198,
6738,
2019,
13908,
13,
47367,
62,
48806,
13,
47367,
62,
48806,
1330,
17638,
198,
6738,
2... | 2.736612 | 915 |
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | [
2,
220,
220,
15069,
357,
66,
8,
2864,
350,
37382,
47,
37382,
46665,
13,
1439,
6923,
33876,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
... | 2.002309 | 1,299 |
from botsdk.util.BotPlugin import BotPlugin
class plugin(BotPlugin):
"/format key=word;key=word..."
async def setFormat(self, request):
"format [key=word]"
data = request.getFirstTextSplit()
if len(data) < 2:
await request.sendMessage(self.setFormat.__doc__)
r... | [
6738,
29641,
34388,
13,
22602,
13,
20630,
37233,
1330,
18579,
37233,
628,
198,
198,
4871,
13877,
7,
20630,
37233,
2599,
198,
220,
220,
220,
12813,
18982,
1994,
28,
4775,
26,
2539,
28,
4775,
9313,
628,
220,
220,
220,
30351,
825,
900,
2... | 1.865931 | 634 |
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from django import template
from ..models import Resource
from ..render import render_resource
register = template.Library()
@register.simple_tag(takes_context=True)
def inline_resource(context, pk_or_path, not_found='Resource `{}` not found'):
"""
... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
6738,
42625,
14208,
1330,
11055,
198,
6738,
11485,
27530,
1330,
20857,
198,
6738,
11485,
13287,
1330,
8543,
62,
31092,
... | 2.669492 | 472 |
from ranges import expand, compress
| [
6738,
16069,
1330,
4292,
11,
27413,
198
] | 5.142857 | 7 |
import subprocess
import os
# Some commands to install OpenVPN on Linux
'''
bashCommand = "sudo apt-get install openvpn; sudo openvpn --config ./config.ovpn"
process = subprocess.Popen(bashCommand.split(), stdout=subprocess.PIPE, shell=True)
output, error = process.communicate()
subprocess.call(["sudo", "apt-get", "in... | [
11748,
850,
14681,
198,
11748,
28686,
198,
2,
2773,
9729,
284,
2721,
4946,
33883,
319,
7020,
198,
7061,
6,
198,
41757,
21575,
796,
366,
24032,
15409,
12,
1136,
2721,
1280,
85,
21999,
26,
21061,
1280,
85,
21999,
1377,
11250,
24457,
11250... | 3.002882 | 347 |
""" HDMI Control - HDMI/CEC Related Automations
Projector Switch:
- Turn receiver on if projector switch is turned on (ties the two together)
Roku Power Control:
- Turn projector on if Roku channel changes from home/idle
Receiver Volume:
- Update the volume slider when the volume sensor updates (slider is decoupled ... | [
37811,
25499,
6779,
532,
25499,
14,
34,
2943,
19809,
17406,
602,
198,
198,
16775,
273,
14645,
25,
198,
12,
6756,
9733,
319,
611,
43396,
5078,
318,
2900,
319,
357,
4278,
262,
734,
1978,
8,
198,
198,
49,
11601,
4333,
6779,
25,
198,
12... | 3.803571 | 112 |
#!/bin/python3
""" Little example script of a cmdline interface.
Author: Julien Delplanque
"""
import argparse
import getpass
import traceback
from raspi_rest_client import *
ERROR_FILE = "error.log"
def main():
""" Main function of this program.
"""
# Arguments parsing
parser = argparse.Argument... | [
2,
48443,
8800,
14,
29412,
18,
198,
37811,
7703,
1672,
4226,
286,
257,
23991,
1370,
7071,
13,
628,
220,
220,
220,
6434,
25,
5979,
2013,
4216,
11578,
4188,
198,
37811,
198,
11748,
1822,
29572,
198,
11748,
651,
6603,
198,
11748,
12854,
... | 2.2616 | 1,250 |
"""
Module with utility functions for the django_chat project.
"""
import ast
import os
from typing import Any
def env2bool(env_var_name: str, default_var_value: Any) -> bool:
"""
Evals env var strings as booleans. Accepts a default value.
"""
env_var = os.getenv(env_var_name)
if env_var is None:... | [
37811,
198,
26796,
351,
10361,
5499,
329,
262,
42625,
14208,
62,
17006,
1628,
13,
198,
37811,
198,
11748,
6468,
198,
11748,
28686,
198,
6738,
19720,
1330,
4377,
628,
198,
4299,
17365,
17,
30388,
7,
24330,
62,
7785,
62,
3672,
25,
965,
... | 2.722222 | 144 |
import os
from os import listdir
from dotenv import load_dotenv
import telegram
import time
if __name__ == "__main__":
directory = input("Введите название папки, из которой будут отпраляться фото ")
load_dotenv()
chat_id = os.getenv("CHAT_ID")
tgbot_api_key = os.getenv("TGBOT_API_KEY")
bot = tele... | [
11748,
28686,
198,
6738,
28686,
1330,
1351,
15908,
198,
6738,
16605,
24330,
1330,
3440,
62,
26518,
24330,
198,
11748,
573,
30536,
198,
11748,
640,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
22... | 1.985366 | 205 |
#!/usr/bin/env python3
import numpy as np
import tensorflow as tf
from orakl.attr import RandomSamplingPool
from ...helpers.utils import BaseTest
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
198,
6738,
393,
461,
75,
13,
35226,
1330,
14534,
16305,
11347,
27201,
198,
198,
6738,
2644,
16794,
364,... | 3.170213 | 47 |
import re
from glob import glob
from os import stat
from random import shuffle
import torch
from ggdtrack.duke_dataset import Duke
from ggdtrack.eval import eval_prepped_tracks, prep_eval_tracks
from ggdtrack.model import NNModelGraphresPerConnection
from ggdtrack.utils import save_pickle, save_json
dataset = Duke("... | [
11748,
302,
198,
6738,
15095,
1330,
15095,
198,
6738,
28686,
1330,
1185,
198,
6738,
4738,
1330,
36273,
198,
198,
11748,
28034,
198,
198,
6738,
308,
21287,
11659,
13,
646,
365,
62,
19608,
292,
316,
1330,
11083,
198,
6738,
308,
21287,
116... | 2.606452 | 310 |
import json
from typing import Union
from flask import Blueprint, request
from parse import parse
from anubis.models import AssignmentTest, Submission, SubmissionTestResult, db
from anubis.utils.http import success_response
from anubis.utils.data import MYSQL_TEXT_MAX_LENGTH
from anubis.utils.http.decorators import j... | [
11748,
33918,
198,
6738,
19720,
1330,
4479,
198,
198,
6738,
42903,
1330,
39932,
11,
2581,
198,
6738,
21136,
1330,
21136,
198,
198,
6738,
281,
46676,
13,
27530,
1330,
50144,
14402,
11,
42641,
11,
42641,
14402,
23004,
11,
20613,
198,
6738,
... | 2.668752 | 3,037 |
from . import solar_usage
solar_usage.main()
| [
6738,
764,
1330,
6591,
62,
26060,
198,
82,
6192,
62,
26060,
13,
12417,
3419,
198
] | 3 | 15 |
from bsbolt.CallMethylation.CallValues import CallMethylationValues
from bsbolt.CallMethylation.CallVector import CallMethylationVector
from bsbolt.CallMethylation.ProcessMethylationContigs import ProcessContigs
| [
6738,
275,
82,
25593,
13,
14134,
44,
21610,
341,
13,
14134,
40161,
1330,
4889,
44,
21610,
341,
40161,
198,
6738,
275,
82,
25593,
13,
14134,
44,
21610,
341,
13,
14134,
38469,
1330,
4889,
44,
21610,
341,
38469,
198,
6738,
275,
82,
25593... | 3.59322 | 59 |
"""
==================================================
SlowlorisPythonBasic By KyaEH
V0.0.1
Repo: https://github.com/kyaEH/SlowlorisPythonBasic
==================================================
"""
import os,sys,time,socket,random
if __name__=="__main__":
try:
target=input("target: ")
port=int(input("port:... | [
37811,
198,
10052,
4770,
855,
198,
19054,
4685,
271,
37906,
26416,
2750,
509,
3972,
42413,
198,
569,
15,
13,
15,
13,
16,
198,
1432,
78,
25,
3740,
1378,
12567,
13,
785,
14,
2584,
64,
42413,
14,
36423,
4685,
271,
37906,
26416,
198,
10... | 2.886792 | 159 |
import codecs
import sys
import re
import writenumbers
## Global vars
normdict = {".": "",
",": "",
":": "",
";": "",
"?": "",
"\\": " ",
"\t": " "
}
t_table = str.maketrans(normdict)
## Main
numtable = writenumbers.loadNumTable(... | [
11748,
40481,
82,
198,
11748,
25064,
198,
11748,
302,
198,
11748,
1991,
268,
17024,
628,
198,
2235,
8060,
410,
945,
198,
198,
27237,
11600,
796,
19779,
526,
25,
366,
1600,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
... | 2.071642 | 335 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import logging
import os
import sys
import numpy as np
from sklearn.pipeline import Pipeline
from .aligners import FFTAligner, MaxScoreAligner
from .speech_transformers import (
SubtitleSpeechTransformer,
VideoSpeechTransformer,
Des... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
11748,
1822,
29572,
198,
11748,
18931,
198,
11748,
28686,
198,
11748,
25064,
198,
198,
11748,
299,
32152,
355,
45941,
198... | 2.473684 | 342 |
"""Test suite for the bb package."""
| [
37811,
14402,
18389,
329,
262,
275,
65,
5301,
526,
15931,
198
] | 3.363636 | 11 |
#!/usr/bin/env python
from setuptools import find_packages, setup
setup(
packages=find_packages(exclude=['tests.*', 'tests']),
entry_points={"pytest11": ["sosu = pytest_sosu.plugin"]},
)
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
6738,
900,
37623,
10141,
1330,
1064,
62,
43789,
11,
9058,
198,
198,
40406,
7,
198,
220,
220,
220,
10392,
28,
19796,
62,
43789,
7,
1069,
9152,
28,
17816,
41989,
15885,
3256,
705,
41989,... | 2.613333 | 75 |
from mod import MOD
from loaders.gene_loader import GeneLoader
from loaders.disease_loader import DiseaseLoader
import gzip
import csv
from files import * | [
6738,
953,
1330,
19164,
198,
6738,
3440,
364,
13,
70,
1734,
62,
29356,
1330,
13005,
17401,
198,
6738,
3440,
364,
13,
67,
786,
589,
62,
29356,
1330,
17344,
17401,
198,
11748,
308,
13344,
198,
11748,
269,
21370,
198,
6738,
3696,
1330,
1... | 3.666667 | 42 |
#!/usr/bin/env python
import PySimpleGUI as sg
'''
App that shows "how fonts work in PySimpleGUI".
'''
layout = [[sg.Text('This is my sample text', size=(20, 1), key='-text-')],
[sg.CB('Bold', key='-bold-', change_submits=True),
sg.CB('Italics', key='-italics-', change_submits=True),
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
11748,
9485,
26437,
40156,
355,
264,
70,
198,
198,
7061,
6,
198,
220,
220,
220,
2034,
326,
2523,
366,
4919,
26806,
670,
287,
9485,
26437,
40156,
1911,
198,
7061,
6,
198,
198,
39786,
... | 2.253497 | 572 |
from django.shortcuts import render, redirect
from .models import *
from django.contrib.auth.decorators import login_required
from .forms import *
from django.http import Http404,HttpResponseRedirect
from .serializer import *
from rest_framework.response import Response
from rest_framework.views import APIView
from res... | [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
11,
18941,
198,
6738,
764,
27530,
1330,
1635,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
12501,
273,
2024,
1330,
17594,
62,
35827,
198,
6738,
764,
23914,
1330,
1635,
198,
673... | 3.690476 | 126 |
#!/usr/bin/env python
import device_list
from napalm_base import get_network_driver
from pprint import pprint
if __name__ == "__main__":
main()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
11748,
3335,
62,
4868,
198,
6738,
25422,
38182,
62,
8692,
1330,
651,
62,
27349,
62,
26230,
198,
6738,
279,
4798,
1330,
279,
4798,
628,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
... | 2.886792 | 53 |
# Copyright 2017 Priscilla Boyd. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | [
2,
15069,
2177,
1736,
2304,
5049,
29897,
13,
1439,
6923,
33876,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
... | 3.014505 | 1,172 |
# This file is MACHINE GENERATED! Do not edit.
# Generated by: tensorflow/python/tools/api/generator/create_python_api.py script.
"""Public API for tf.keras.experimental namespace.
"""
from __future__ import print_function as _print_function
from tensorflow.python.feature_column.feature_column_lib import SequenceFeat... | [
2,
770,
2393,
318,
337,
16219,
8881,
24700,
1137,
11617,
0,
2141,
407,
4370,
13,
198,
2,
2980,
515,
416,
25,
11192,
273,
11125,
14,
29412,
14,
31391,
14,
15042,
14,
8612,
1352,
14,
17953,
62,
29412,
62,
15042,
13,
9078,
4226,
13,
... | 3.091127 | 417 |
import ila
###### MICRO INST EQ Check #######
if __name__ == '__main__':
test()
test2()
test3()
test4()
| [
11748,
4229,
64,
198,
198,
4242,
2235,
35878,
13252,
40589,
36529,
6822,
46424,
2235,
628,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
1332,
3419,
198,
220,
220,
220,
1332,
17,
3419,
19... | 2.25 | 56 |
from neural_network.actor_nn import Actor
from neural_network.critic_nn import Critic
from torch.autograd import Variable
import torch
import numpy as np
import copy
import os
def init_nn(env, terrain, hidden_layers = [400,300,200], conv_layers = [], kernel_sizes = [150,100,50], action_features_out = 5, init_w=3e-3, o... | [
6738,
17019,
62,
27349,
13,
11218,
62,
20471,
1330,
27274,
198,
6738,
17019,
62,
27349,
13,
22213,
291,
62,
20471,
1330,
10056,
291,
198,
6738,
28034,
13,
2306,
519,
6335,
1330,
35748,
198,
11748,
28034,
198,
11748,
299,
32152,
355,
459... | 2.349012 | 1,467 |
# -*- coding: utf-8 -*-
from bitbucket.tests.public import *
if __name__ == "__main__":
unittest.main()
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
1643,
27041,
316,
13,
41989,
13,
11377,
1330,
1635,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
555,
715,
395,
13,
124... | 2.319149 | 47 |
"""
MIT LICENSE
https://github.com/gtalarico/ironpython-stubs
Gui Talarico
-----------------------------------------------------------------
This file is intended to be executed from within Civil 3D.
Takes about 3 min
"""
import clr
import sys
sys.path.append(r'C:\Program Files (x86)\IronPython 2.7\Lib')
import os
... | [
37811,
198,
36393,
38559,
24290,
198,
5450,
1378,
12567,
13,
785,
14,
13655,
282,
283,
3713,
14,
1934,
29412,
12,
301,
23161,
198,
8205,
72,
7193,
283,
3713,
198,
198,
10097,
12,
198,
198,
1212,
2393,
318,
5292,
284,
307,
10945,
422,
... | 2.381992 | 733 |
from verbs.baseforms import forms
| [
6738,
41781,
13,
8692,
23914,
1330,
5107,
628
] | 4.375 | 8 |
#How to draw shapes in Turtle
#Square
#First you need to import turtle
import turtle
#Next if you want you can change the 'turtle.Turtle()' to pen or anything as it is a shorter way of putting 'turtle.Turtle()'
pen = turtle.Turtle()
#Now you need to say what you want it to do like draw a square
for i in range(... | [
2,
2437,
284,
3197,
15268,
287,
33137,
628,
198,
198,
2,
48011,
628,
198,
2,
5962,
345,
761,
284,
1330,
28699,
198,
11748,
28699,
628,
198,
2,
10019,
611,
345,
765,
345,
460,
1487,
262,
705,
83,
17964,
13,
51,
17964,
3419,
6,
284,... | 2.786982 | 169 |
from django.shortcuts import render
| [
6738,
42625,
14208,
13,
19509,
23779,
1330,
8543,
628,
628,
198
] | 3.636364 | 11 |
import unittest
if __name__ == '__main__':
unittest.main()
| [
198,
11748,
555,
715,
395,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
555,
715,
395,
13,
12417,
3419,
198
] | 2.321429 | 28 |
import json
from hashlib import sha1
from cloudinary.cache.adapter.cache_adapter import CacheAdapter
from cloudinary.cache.storage.key_value_storage import KeyValueStorage
from cloudinary.utils import check_property_enabled
class KeyValueCacheAdapter(CacheAdapter):
"""
A cache adapter for a key-value storage... | [
11748,
33918,
198,
6738,
12234,
8019,
1330,
427,
64,
16,
198,
198,
6738,
6279,
3219,
13,
23870,
13,
324,
3429,
13,
23870,
62,
324,
3429,
1330,
34088,
47307,
198,
6738,
6279,
3219,
13,
23870,
13,
35350,
13,
2539,
62,
8367,
62,
35350,
... | 2.858 | 500 |
from __future__ import absolute_import, division, print_function
import pickle
import numpy as np
with open('mesh/model/hand.pkl', 'rb') as f:
mesh = pickle.load(f, encoding='latin1')
mesh['bones'] = delete_palm_bones(mesh['bones'])
mesh['bones'] = add_keypoint(mesh['bones'])
vertices = []
for bone in mesh['b... | [
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
11,
7297,
11,
3601,
62,
8818,
198,
11748,
2298,
293,
198,
11748,
299,
32152,
355,
45941,
628,
198,
198,
4480,
1280,
10786,
76,
5069,
14,
19849,
14,
4993,
13,
79,
41582,
3256,
705,
26145,... | 2.517073 | 205 |