content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
s = "a)))KkFmQ*wFz)TixK*||"
flag = ''
for i in s:
flag += chr(ord(i) ^ 25)
print flag
| [
82,
796,
366,
64,
22305,
42,
74,
37,
76,
48,
9,
86,
37,
89,
8,
51,
844,
42,
9,
15886,
1,
198,
198,
32109,
796,
10148,
198,
1640,
1312,
287,
264,
25,
198,
220,
220,
220,
6056,
15853,
442,
81,
7,
585,
7,
72,
8,
10563,
1679,
... | 1.735849 | 53 |
# -*- coding: utf-8 -*-
"""Tests for Signals"""
from ELDAmwl.bases.factory import BaseOperation
from ELDAmwl.bases.factory import BaseOperationFactory
from ELDAmwl.component.registry import Registry
from unittest.mock import patch
import unittest
DB_DATA = [
('TestA', OperationA),
('TestB', OperationB),
]... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
51,
3558,
329,
5865,
874,
37811,
198,
6738,
17852,
5631,
76,
40989,
13,
65,
1386,
13,
69,
9548,
1330,
7308,
32180,
198,
6738,
17852,
5631,
76,
40989,
13,
65,
13... | 2.784483 | 116 |
#!/usr/bin/env python
# example label.py
import pygtk
pygtk.require('2.0')
import gtk
if __name__ == "__main__":
Labels()
main()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
2,
1672,
6167,
13,
9078,
198,
198,
11748,
12972,
13655,
74,
198,
9078,
13655,
74,
13,
46115,
10786,
17,
13,
15,
11537,
198,
11748,
308,
30488,
198,
198,
361,
11593,
3672,
834,
6... | 2.258065 | 62 |
# for10.py
# [입력변수 for 추출변수 in 대상 if 조건 ]
# a 에 1 ~ 10 까지 숫자
a = [ i for i in range(1,11) ]
print(a)
# b 에 1 ~ 10 까지 숫자
b = [ i+1 for i in range(10) ]
print(b)
print(id(a) == id(b))
| [
2,
329,
940,
13,
9078,
198,
198,
2,
685,
168,
252,
227,
167,
254,
98,
167,
111,
222,
168,
230,
246,
329,
23821,
114,
242,
168,
114,
250,
167,
111,
222,
168,
230,
246,
287,
31619,
234,
222,
168,
225,
223,
611,
23821,
94,
108,
1... | 1.253333 | 150 |
__author__ = 'BorisMirage'
# --- coding:utf-8 ---
'''
Create by BorisMirage
File Name: plot
Create Time: 2018-12-02 14:45
'''
from time import time
import numpy as np
import matplotlib.pyplot as plt
from sklearn.manifold import TSNE
if __name__ == '__main__':
pass
| [
834,
9800,
834,
796,
705,
33,
37279,
27453,
496,
6,
198,
2,
11420,
19617,
25,
40477,
12,
23,
11420,
198,
198,
7061,
6,
198,
16447,
416,
25026,
27453,
496,
198,
8979,
6530,
25,
7110,
198,
16447,
3862,
25,
2864,
12,
1065,
12,
2999,
... | 2.669903 | 103 |
import subprocess, os
print("Building Rust component...")
# "cargo build" the bridge project
root_dir = os.path.dirname(os.path.realpath(__file__))
bridge_dir = os.path.join(root_dir, "rust")
subprocess.check_output(["cargo", "build", "--release"], cwd=bridge_dir)
print("Done!")
| [
11748,
850,
14681,
11,
28686,
198,
198,
4798,
7203,
25954,
17103,
7515,
9313,
8,
198,
198,
2,
366,
66,
9448,
1382,
1,
262,
7696,
1628,
198,
15763,
62,
15908,
796,
28686,
13,
6978,
13,
15908,
3672,
7,
418,
13,
6978,
13,
5305,
6978,
... | 2.83 | 100 |
#!/usr/bin/env python3
# coding: utf-8
"""
@author: Ping Qiu qiuping1@genomics.cn
@last modified by: Ping Qiu
@file:__init__.py.py
@time:2021/03/05
"""
from .filter import filter_cells, filter_genes, filter_coordinates
from .normalize import Normalizer, normalize_total, normalize_zscore_disksmooth, quantile_norm
from ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
19617,
25,
3384,
69,
12,
23,
198,
37811,
198,
31,
9800,
25,
34263,
1195,
16115,
220,
10662,
72,
929,
278,
16,
31,
5235,
31994,
13,
31522,
198,
31,
12957,
9518,
416,
25,
3426... | 2.661417 | 127 |
# Copyright 2021-2022 Huawei Technologies Co., Ltd
#
# 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,
33448,
12,
1238,
1828,
43208,
21852,
1766,
1539,
12052,
201,
198,
2,
201,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
201,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
... | 2.221229 | 5,370 |
import tkinter as tk
from pandas import DataFrame
import matplotlib.pyplot as plt
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
data = {'Raman Shift': [-464, -460, -455, -450, -445],
'Intensity1': [745, 752, 746, 740, 750], 'Intensity2': [734, 745, 768, 763, 755]
} # 데이터 짤라온것 받아오기
... | [
11748,
256,
74,
3849,
355,
256,
74,
198,
6738,
19798,
292,
1330,
6060,
19778,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
6738,
2603,
29487,
8019,
13,
1891,
2412,
13,
1891,
437,
62,
30488,
9460,
1330,
11291,
609... | 1.409509 | 652 |
# encoding: utf-8
import json
import numpy as np
import matplotlib.pyplot as plt
import os
import queue
import _thread
import traceback
point_name = [
"Nose",
"Neck",
"RShoulder",
"RElbow",
"RWrist",
"LShoulder",
"LElbow",
"LWrist",
"MidHip",
"RHip",
"RKnee",
"RAnkle",
"LHip",
"LKnee",
"LAnkle",
"... | [
2,
21004,
25,
3384,
69,
12,
23,
198,
11748,
33918,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
28686,
198,
11748,
16834,
198,
11748,
4808,
16663,
198,
11748,
12854,
1891,... | 2.066225 | 302 |
#
# This script develops the script 'variabledNLsimulation_v1.py' (Yury Eidelman)
#
# Started at June 28, 2019
#
# The three laws to change the strengths 't' of all nonlinear lens are implemented.
# From initial value t_i to final value t_f during N stepsthese laws are follows.
# 1) Linear: for step number n
# ... | [
2,
220,
198,
2,
770,
4226,
21126,
262,
4226,
705,
25641,
4510,
32572,
14323,
1741,
62,
85,
16,
13,
9078,
6,
357,
56,
1601,
412,
5943,
805,
8,
198,
2,
198,
2,
220,
220,
220,
31026,
379,
2795,
2579,
11,
13130,
198,
2,
198,
2,
38... | 2.547256 | 1,968 |
import time
connect("127.0.0.1", "10039", "weblab")
#test_me("hello")
start_experiment()
send_file("script.py", "A script file")
response = send_command("Test Command")
print "The response is: %s" % response
msg_box("Test Message", "test")
time.sleep(2)
dispose()
disconnect()
| [
201,
198,
11748,
640,
201,
198,
201,
198,
8443,
7203,
16799,
13,
15,
13,
15,
13,
16,
1600,
366,
3064,
2670,
1600,
366,
732,
2436,
397,
4943,
201,
198,
201,
198,
2,
9288,
62,
1326,
7203,
31373,
4943,
201,
198,
201,
198,
9688,
62,
... | 2.338346 | 133 |
# Copyright 2014 Intel Corporation, 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 or ... | [
198,
2,
15069,
1946,
8180,
10501,
11,
1439,
6923,
33876,
13,
198,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
1,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
... | 3.728522 | 291 |
import arrow
import requests
from arrow import Arrow
from bs4 import BeautifulSoup
from collections import defaultdict
from icalendar import Calendar, Event, vText, vCalAddress
from hashlib import md5
import json
| [
11748,
15452,
198,
11748,
7007,
198,
6738,
15452,
1330,
19408,
198,
6738,
275,
82,
19,
1330,
23762,
50,
10486,
198,
6738,
17268,
1330,
4277,
11600,
198,
6738,
220,
605,
9239,
1330,
26506,
11,
8558,
11,
410,
8206,
11,
410,
9771,
20231,
... | 3.683333 | 60 |
import os
import sys
import pyproj
from pyproj import Proj
Proj(init="epsg:4269")
# Test pyproj_datadir.
if not os.path.isdir(pyproj.datadir.get_data_dir()):
sys.exit(1)
| [
11748,
28686,
198,
11748,
25064,
198,
198,
11748,
12972,
1676,
73,
198,
6738,
12972,
1676,
73,
1330,
1041,
73,
198,
198,
2964,
73,
7,
15003,
2625,
25386,
70,
25,
19,
26276,
4943,
628,
198,
2,
6208,
12972,
1676,
73,
62,
19608,
324,
3... | 2.225 | 80 |
"""Completers for pip."""
import contextlib
import os
import subprocess
from xonsh.built_ins import XSH
from xonsh.completers.tools import RichCompletion, contextual_command_completer
from xonsh.parsers.completion_context import CommandContext
def generate_completions_from_string(output: str):
"""Rich completio... | [
37811,
5377,
1154,
1010,
329,
7347,
526,
15931,
198,
11748,
4732,
8019,
198,
11748,
28686,
198,
11748,
850,
14681,
198,
198,
6738,
2124,
684,
71,
13,
18780,
62,
1040,
1330,
1395,
9693,
198,
6738,
2124,
684,
71,
13,
785,
1154,
1010,
13... | 2.769697 | 495 |
# -*- coding: utf-8 -*-
"""
Contains the definition of the ArgParser class.
"""
import logging
from argparse import ArgumentParser, ArgumentError, Namespace
import shlex
from enhterm.command import Command
from enhterm.command.error import ErrorCommand
from enhterm.command.noop import NoOpCommand
from enhterm.command.... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
4264,
1299,
262,
6770,
286,
262,
20559,
46677,
1398,
13,
198,
37811,
198,
11748,
18931,
198,
6738,
1822,
29572,
1330,
45751,
46677,
11,
45751,
12331,
11,
28531... | 2.422499 | 3,529 |
"""LinkNet
Paper: https://arxiv.org/pdf/1707.03718
Adapted from: https://github.com/qubvel/segmentation_models.pytorch/blob/master/segmentation_models_pytorch/linknet/model.py
Copyright 2021 | farabio
"""
from typing import List, Optional, Union, Any
import torch
import torch.nn as nn
import torch.nn.functional as F
... | [
37811,
11280,
7934,
198,
198,
42950,
25,
3740,
1378,
283,
87,
452,
13,
2398,
14,
12315,
14,
1558,
2998,
13,
15,
2718,
1507,
198,
48003,
276,
422,
25,
3740,
1378,
12567,
13,
785,
14,
421,
65,
626,
14,
325,
5154,
341,
62,
27530,
13,... | 2.545205 | 365 |
# Generated by Django 3.0.5 on 2020-06-13 19:56
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
15,
13,
20,
319,
12131,
12,
3312,
12,
1485,
678,
25,
3980,
201,
198,
201,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
201,
198,
201,
198
] | 2.567568 | 37 |
#!/usr/bin/env python3
# coding: utf-8
# Import built-in packages
# Import external packages | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
2,
17267,
3170,
12,
259,
10392,
198,
198,
2,
17267,
7097,
10392
] | 3.032258 | 31 |
import os
import glob
from chwall.utils import get_logger
import gettext
# Uncomment the following line during development.
# Please, be cautious to NOT commit the following line uncommented.
# gettext.bindtextdomain("chwall", "./locale")
gettext.textdomain("chwall")
_ = gettext.gettext
logger = get_logger(__name__)... | [
11748,
28686,
198,
11748,
15095,
198,
198,
6738,
442,
11930,
13,
26791,
1330,
651,
62,
6404,
1362,
198,
198,
11748,
651,
5239,
198,
2,
791,
23893,
262,
1708,
1627,
1141,
2478,
13,
198,
2,
4222,
11,
307,
21205,
284,
5626,
4589,
262,
... | 3.295918 | 98 |
#!/usr/bin/env python3
TOKEN = ""
TIMER = 30
__all__ = ["SimpleHTTPRequestHandler"]
import os
import posixpath
import http.server
import urllib.request, urllib.parse, urllib.error
import cgi
import shutil
import mimetypes
import re
from io import BytesIO
import time
from AWSRekognition import AWSRekognition
imp... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
220,
198,
198,
10468,
43959,
796,
13538,
198,
51,
3955,
1137,
796,
1542,
198,
198,
834,
439,
834,
796,
14631,
26437,
40717,
18453,
25060,
8973,
198,
220,
198,
11748,
28686,
198,
11... | 2.737589 | 141 |
import os
import numpy as np
from skmultiflow.data.generator.sea_generator import SEAGenerator
| [
11748,
28686,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
1341,
16680,
361,
9319,
13,
7890,
13,
8612,
1352,
13,
8583,
62,
8612,
1352,
1330,
7946,
4760,
877,
1352,
628
] | 3.2 | 30 |
import json
import flask
import os
app = flask.Flask(__name__)
@app.route("/")
if __name__ == "__main__":
begin()
| [
11748,
33918,
198,
11748,
42903,
198,
11748,
28686,
198,
198,
1324,
796,
42903,
13,
7414,
2093,
7,
834,
3672,
834,
8,
628,
198,
31,
1324,
13,
38629,
7203,
14,
4943,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
... | 2.469388 | 49 |
from flask import Flask
import os
basedir = os.path.abspath(os.path.dirname(__file__))
# `flask run` - runs application on local server
app = Flask(__name__, static_url_path='', static_folder='static',
instance_relative_config=True)
DATABASE_URL = os.environ.get('DATABASE_URL')
if os.environ.get('TEST... | [
6738,
42903,
1330,
46947,
198,
11748,
28686,
628,
198,
3106,
343,
796,
28686,
13,
6978,
13,
397,
2777,
776,
7,
418,
13,
6978,
13,
15908,
3672,
7,
834,
7753,
834,
4008,
628,
198,
2,
4600,
2704,
2093,
1057,
63,
532,
4539,
3586,
319,
... | 2.426829 | 246 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author: gexiao
# Created on 2018-05-07 22:04
import logging
import requests
import base64
SERVER_HOST = 'https://v2-api.jsdama.com/upload'
SOFTWARE_ID = 9487
SOFTWARE_SECRET = 'nb4GHmdsPxzbcB7iIrU36JPI73HOjUyUEnq3pkob'
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
6434,
25,
308,
1069,
13481,
198,
2,
15622,
319,
2864,
12,
2713,
12,
2998,
2534,
25,
3023,
198,
198,
11748,
18931,
... | 2.195122 | 123 |
from __future__ import print_function
PLEVEL = 0
def parity4(data):
'''
Thanks to http://www.dalkescientific.com/writings/diary/archive/2016/08/15/fragment_parity_calculation.html
'''
if data[0] < data[1]:
if data[2] < data[3]:
if data[0] < data[2]:
if data[1] < dat... | [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
198,
16437,
18697,
796,
657,
198,
198,
4299,
34383,
19,
7,
7890,
2599,
198,
220,
220,
220,
705,
7061,
198,
220,
220,
220,
6930,
284,
2638,
1378,
2503,
13,
67,
971,
274,
3456,
811,
... | 1.403746 | 1,922 |
from sort import *
import time
import random
n1 = int(input("Size\nFrom: "))
n2 = int(input("To: "))
h = int(input("Step:"))
if n1 > n2 or n2 == n1 or h == 0:
print("Wrong input")
exit()
else:
result = measure_time(get_best_array, get_best_array, mysort_quick_middle, n1, n2 + 1, h, 100)
... | [
6738,
3297,
1330,
1635,
201,
198,
11748,
640,
201,
198,
11748,
4738,
201,
198,
201,
198,
77,
16,
796,
493,
7,
15414,
7203,
10699,
59,
77,
4863,
25,
366,
4008,
201,
198,
77,
17,
796,
493,
7,
15414,
7203,
2514,
25,
366,
4008,
201,
... | 2.214286 | 280 |
# Copyright ClusterHQ Inc. See LICENSE file for details.
"""
Era information for Flocker nodes.
Every time a node reboots it gets a new, globally unique era.
"""
import sys
from uuid import UUID
from zope.interface import implementer
from twisted.internet.defer import succeed
from twisted.python.filepath import F... | [
2,
15069,
38279,
41275,
3457,
13,
220,
4091,
38559,
24290,
2393,
329,
3307,
13,
198,
198,
37811,
198,
36,
430,
1321,
329,
1610,
12721,
13760,
13,
198,
198,
6109,
640,
257,
10139,
3405,
13880,
340,
3011,
257,
649,
11,
18309,
3748,
6980... | 2.891566 | 498 |
# Distributions in Pandas
import pandas as pd
import numpy as np
np.random.binomial(1, 0.5)
np.random.binomial(1000, 0.5)/1000
chance_of_tornado = 0.01/100
np.random.binomial(100000, chance_of_tornado)
chance_of_tornado = 0.01
tornado_events = np.random.binomial(1, chance_of_tornado, 1000000)
two_days_in_a_r... | [
2,
46567,
507,
287,
16492,
292,
198,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
198,
37659,
13,
25120,
13,
8800,
49070,
7,
16,
11,
657,
13,
20,
8,
198,
198,
37659,
13,
25120,
13,
8800,
49070,
7,... | 2.379128 | 757 |
from jarbas.settings import *
MIGRATION_MODULES = DisableMigrations()
| [
6738,
17379,
12093,
13,
33692,
1330,
1635,
628,
198,
198,
44,
3528,
49,
6234,
62,
33365,
6239,
1546,
796,
31529,
44,
3692,
602,
3419,
198
] | 2.92 | 25 |
# coding: utf-8
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
2,
16529,
45537,
198,
2,
15069,
357,
66,
8,
5413,
10501,
13,
1439,
2489,
10395,
13,
198,
2,
49962,
739,
262,
17168,
13789,
13,
4091,
13789,
13,
14116,
287,
262,
1628,
6808,
329,
198,
2,
... | 3.828 | 250 |
'''
Created on 1 Dec 2012
@author: Jeremy
'''
import serial
import sys
import rt
import time
s = serial.Serial(sys.argv[1],115200,timeout=15)
t = time.time()
c = 0
RT = rt.RaceTech(s)
RT.run(decode)
| [
7061,
6,
201,
198,
41972,
319,
352,
4280,
2321,
201,
198,
201,
198,
31,
9800,
25,
11753,
201,
198,
7061,
6,
201,
198,
201,
198,
11748,
11389,
201,
198,
11748,
25064,
201,
198,
11748,
374,
83,
201,
198,
11748,
640,
201,
198,
201,
1... | 2.156863 | 102 |
from django.contrib import admin
from django.urls import path, include
from django.conf import settings
from django.conf.urls.static import static
from pages import views
urlpatterns = [
path('admin/', admin.site.urls),
path('accounts/', include('allauth.urls')), # allauth
... | [
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
11,
2291,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
13,
12708,
1330,
9037,
198,
... | 2.401434 | 279 |
#!/usr/bin/python
import numpy as np
import pandas as pd
import sys
df = pd.read_csv('https://raw.githubusercontent.com/ChrisFodor333/early_warning/main/assets/machine.csv',header = 0);
df = df.dropna();
#df.head(20);
from sklearn.model_selection import train_test_split
data = df
X = data[['altman', 'in05', 'quick... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
25064,
628,
198,
7568,
796,
279,
67,
13,
961,
62,
40664,
10786,
5450,
1378,
1831,
13,
12567,
43667,
13,
... | 2.508523 | 1,056 |
#!/usr/bin/python
"""Sample program."""
def hello_world():
"""Print a message to stdout."""
print("Hello, world!")
def return_true():
"""You can rent this space for only $5 a week."""
return True
| [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
37811,
36674,
1430,
526,
15931,
198,
198,
4299,
23748,
62,
6894,
33529,
198,
220,
220,
220,
37227,
18557,
257,
3275,
284,
14367,
448,
526,
15931,
198,
220,
220,
220,
3601,
7203,
15496,
11,
99... | 2.828947 | 76 |
from django.contrib.auth import authenticate
from .base import AllAccessTestCase
class AuthBackendTestCase(AllAccessTestCase):
"Custom contrib.auth backend tests."
def test_successful_authenticate(self):
"User successfully authenticated."
provider = self.access.provider
identifier = self.access.identifier
use... | [
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
1330,
8323,
5344,
198,
6738,
764,
8692,
1330,
1439,
15457,
14402,
20448,
198,
4871,
26828,
7282,
437,
14402,
20448,
7,
3237,
15457,
14402,
20448,
2599,
198,
197,
1,
15022,
542,
822,
13,
1843... | 3.194093 | 474 |
from _stories.mounted import ClassMountedStory
| [
6738,
4808,
50164,
13,
29728,
1330,
5016,
35452,
276,
11605,
628,
198
] | 4.083333 | 12 |
from os import system, name
system('cls' if name == 'nt' else 'clear')
dsc = ('''DESAFIO 017:
Faça um programa que leia o comprimento do cateto oposto e do cateto adjacente de um
triângulo retângulo, calcule e mostre o comprimento da hipotenusa.
''')
from math import hypot
n1 = float(input('Cateto oposto: '))
n2 = f... | [
6738,
28686,
1330,
1080,
11,
1438,
198,
10057,
10786,
565,
82,
6,
611,
1438,
6624,
705,
429,
6,
2073,
705,
20063,
11537,
198,
198,
67,
1416,
796,
357,
7061,
6,
30910,
8579,
9399,
5534,
22,
25,
198,
50110,
50041,
23781,
1430,
64,
835... | 2.574586 | 181 |
from __future__ import unicode_literals
import biplist
import os.path
app = defines.get('app', './dmg/JoyfulPlayer.app')
appname = os.path.basename(app)
# Basics
format = defines.get('format', 'UDZO')
size = defines.get('size', None)
files = [ app ]
icon_locations = {
appname: (160, 160),
}
# Window co... | [
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
198,
11748,
3182,
489,
396,
198,
11748,
28686,
13,
6978,
198,
198,
1324,
796,
15738,
13,
1136,
10786,
1324,
3256,
705,
19571,
67,
11296,
14,
41338,
913,
14140,
13,
1324,
... | 2.636364 | 264 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @Filename: mf_lqr.py
# @Date: 2019-06-16-18-38
# @Author: Hany Abdulsamad
# @Contact: hany@robot-learning.de
import gym
from trajopt.gps import MFGPS
# lqr task
env = gym.make('LQR-TO-v0')
env._max_episode_steps = 100
alg = MFGPS(env, nb_steps=100,
kl_bo... | [
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,
2488,
35063,
25,
285,
69,
62,
75,
80,
81,
13,
9078,
198,
2,
2488,
10430,
25,
13130,
12,
3312,
12,
1433,
12... | 2.017621 | 454 |
import time
import sys
import uuid
import argparse
import ibmiotf.device
import wiotp.sdk.device
from configparser import ConfigParser
| [
11748,
640,
198,
11748,
25064,
198,
11748,
334,
27112,
198,
11748,
1822,
29572,
198,
11748,
24283,
76,
5151,
69,
13,
25202,
198,
11748,
266,
5151,
79,
13,
21282,
74,
13,
25202,
198,
6738,
4566,
48610,
1330,
17056,
46677,
628,
198
] | 3.425 | 40 |
from django.urls import path
from django.contrib.auth import views as auth_views
from . import editorviews
from . import userviews
urlpatterns = [
# editor paths
path("project", editorviews.render_all_projects, name="projects"),
path("project/create", editorviews.parse_new_project_request, name="new"),
... | [
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
1330,
5009,
355,
6284,
62,
33571,
198,
198,
6738,
764,
1330,
5464,
33571,
198,
6738,
764,
1330,
514,
712,
769,
82,
198,
198,
6371,
33279,... | 2.867872 | 719 |
from PyQt5 import QtWidgets
from .pages import IntroPage, EMPage, SimTypePage, IntegratorPage, \
NeighbourSearchPage, FreqControlPage, CoulombPage, \
VdWPage, EwaldPage, ThermostatPage, EndPage
| [
6738,
9485,
48,
83,
20,
1330,
33734,
54,
312,
11407,
198,
198,
6738,
764,
31126,
1330,
37219,
9876,
11,
38144,
496,
11,
3184,
6030,
9876,
11,
15995,
12392,
9876,
11,
3467,
198,
220,
220,
220,
22505,
6084,
18243,
9876,
11,
4848,
80,
... | 2.873239 | 71 |
# -*- coding: utf-8 -*-
"""
Utilities for transforming and validating data types
Given that many of the data transformations involve copying the data, they should
ideally happen in a lazy manner to avoid memory issues.
Created on Tue Nov 3 21:14:25 2015
@author: Suhas Somnath, Chris Smith
"""
from __future__ impor... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
18274,
2410,
329,
25449,
290,
4938,
803,
1366,
3858,
198,
198,
15056,
326,
867,
286,
262,
1366,
38226,
6211,
23345,
262,
1366,
11,
484,
815,
198,
485,
453,
... | 2.504848 | 5,776 |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
Module that contains functions related with Pixar USD usdview application
"""
from __future__ import print_function, division, absolute_import
__author__ = "Tomas Poveda"
__license__ = "MIT"
__maintainer__ = "Tomas Poveda"
__email__ = "tpovedatd@gmail.com"
import o... | [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
198,
26796,
326,
4909,
5499,
3519,
351,
46706,
11403,
514,
67,
1177,
3586,
198,
37811,
198,
198,
6738,
... | 2.206466 | 1,763 |
# Copyright (c) 2019-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
#TOFILL
if __name__ == '__main__':
param = [
(4,'aggayxysdfa','aggajxaaasdfa',),
(2,'55571659965107','39028665415... | [
2,
15069,
357,
66,
8,
13130,
12,
25579,
11,
3203,
11,
3457,
13,
198,
2,
1439,
2489,
10395,
13,
198,
2,
198,
2,
770,
2723,
2438,
318,
11971,
739,
262,
5964,
1043,
287,
262,
198,
2,
38559,
24290,
2393,
287,
262,
6808,
8619,
286,
4... | 2.236915 | 363 |
import numpy as np
import os
import copy
import torch
import torch.nn as nn
from torch.optim import Adam
import torch.nn.functional as FF
os.environ['CUDA_VISIBLE_DEVICES'] = '1'
USE_CUDA = torch.cuda.is_available()
FloatTensor = torch.cuda.FloatTensor if USE_CUDA else torch.FloatTensor
Device = torch.device("cuda" if... | [
11748,
299,
32152,
355,
45941,
198,
11748,
28686,
198,
11748,
4866,
198,
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
6738,
28034,
13,
40085,
1330,
7244,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
18402,
198,
198,
4... | 2.892562 | 121 |
from QuickPotato.database.queries import Crud
| [
6738,
12029,
25396,
5549,
13,
48806,
13,
421,
10640,
1330,
3864,
463,
628,
628
] | 3.5 | 14 |
#
# example from CHiLL manual page 13
#
# peel 4 statements from the END of innermost loop
#
from chill import *
source('peel9101112.c')
destination('peel12modified.c')
procedure('mm')
loop(0)
peel(1,2,-4) # statement 1, loop 2 (middle, for j), 4 statements from END
| [
2,
198,
2,
220,
1672,
422,
5870,
72,
3069,
10107,
2443,
1511,
198,
2,
198,
2,
220,
31738,
604,
6299,
422,
262,
23578,
286,
8434,
1712,
9052,
198,
2,
198,
198,
6738,
20493,
1330,
1635,
198,
198,
10459,
10786,
431,
417,
6420,
486,
1... | 2.732673 | 101 |
import scrapy
from opencc import OpenCC
import os
all = [[]]
del(all[0]) | [
11748,
15881,
88,
198,
6738,
1280,
535,
1330,
4946,
4093,
198,
11748,
28686,
198,
198,
439,
796,
16410,
11907,
198,
12381,
7,
439,
58,
15,
12962
] | 2.807692 | 26 |
from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'^$', 'example.app.views.home'),
url(r'^admin/', include(admin.site.urls)),
url(r'^signup-email/', 'example.app.views.signup_email'),
url(r'^email-sent/', 'example... | [
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
7572,
11,
2291,
11,
19016,
198,
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
628,
198,
28482,
13,
2306,
375,
29392,
3419,
198,
198,
6371,
33279,
82,
796,
7572,
10786,
3256,
198,
22... | 2.520913 | 263 |
if __name__ == "__main__":
main()
| [
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
1388,
3419,
198
] | 2.105263 | 19 |
from functools import wraps
from http import HTTPStatus
from django.utils.translation import gettext as _
from apps.api.errors import ApiException
def signature_exempt(view_func):
"""Mark a view function as being exempt from signature and apikey check."""
wrapped_view.signature_exempt = True
return wr... | [
6738,
1257,
310,
10141,
1330,
27521,
198,
6738,
2638,
1330,
14626,
19580,
198,
198,
6738,
42625,
14208,
13,
26791,
13,
41519,
1330,
651,
5239,
355,
4808,
198,
198,
6738,
6725,
13,
15042,
13,
48277,
1330,
5949,
72,
16922,
628,
628,
198,
... | 3.421569 | 102 |
from otree.api import Currency as c, currency_range
from ._builtin import Page, WaitPage
from .models import Constants
page_sequence = [
QV
]
| [
6738,
267,
21048,
13,
15042,
1330,
20113,
355,
269,
11,
7395,
62,
9521,
198,
6738,
47540,
18780,
259,
1330,
7873,
11,
16314,
9876,
198,
6738,
764,
27530,
1330,
4757,
1187,
628,
198,
198,
7700,
62,
43167,
796,
685,
198,
220,
220,
220,
... | 3.170213 | 47 |
#!/usr/bin/env python3
import os
import sys
import random
from pprint import pprint
import yaml
import raffle
# ------------------------
# Command-line interface
# ------------------------
USAGE = f"""
Usage: {os.path.basename(__file__)} config_file [random_seed]
config_file (required):
Raffle config... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
4738,
198,
6738,
279,
4798,
1330,
279,
4798,
198,
198,
11748,
331,
43695,
198,
198,
11748,
374,
30697,
198,
198,
2,
220,
22369,
19... | 2.898734 | 632 |
from django.contrib import admin
from .models import Comment
admin.site.register(Comment, CommentAdmin)
| [
6738,
42625,
14208,
13,
3642,
822,
1330,
13169,
198,
198,
6738,
764,
27530,
1330,
18957,
628,
198,
198,
28482,
13,
15654,
13,
30238,
7,
21357,
11,
18957,
46787,
8,
198
] | 3.6 | 30 |
#!/home/ssericksen/anaconda2/bin/python2.7
import pandas as pd
import numpy as np
# load Ching-Pei's compound scores for BGLF4 with PKIS1
df1 = pd.read_csv('bglf4_pkis1', sep=" ")
df1.set_index('fid', inplace=True)
df1.columns = ['BGLF4']
df1.index.rename('molid', inplace=True)
df1.index = df1.index.map(str)
# load ... | [
2,
48443,
11195,
14,
824,
263,
3378,
268,
14,
272,
330,
13533,
17,
14,
8800,
14,
29412,
17,
13,
22,
198,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
198,
2,
3440,
609,
278,
12,
6435,
72,
338,
1... | 2.29375 | 320 |
import pandas as pd
import numpy as np
| [
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
628,
628,
628,
628
] | 2.875 | 16 |
letters = 'abcdefghijklmnopqrstuvwxyz'
numbers = '0123456789'
"""Teste
Main criado para testar as funções.
"""
if __name__ == '__main__':
print(er_to_afd('[J-M1-9]abc'))
# er_to_afd('a(a|b)*a')
# er_to_afd('aa*(bb*aa*b)*')
| [
198,
198,
15653,
796,
705,
39305,
4299,
456,
2926,
41582,
10295,
404,
80,
81,
301,
14795,
86,
5431,
89,
6,
198,
77,
17024,
796,
705,
486,
1954,
2231,
3134,
4531,
6,
628,
198,
198,
37811,
14402,
68,
198,
13383,
269,
380,
4533,
31215,... | 1.825758 | 132 |
# MIT License
# Copyright (c) 2017 MassChallenge, Inc.
from datetime import datetime
from decimal import Decimal
from pytz import utc
import swapper
from django.conf import settings
from django.core.validators import (
RegexValidator,
MaxLengthValidator,
)
from django.db import models
from django.db.models im... | [
2,
17168,
13789,
198,
2,
15069,
357,
66,
8,
2177,
5674,
41812,
3540,
11,
3457,
13,
198,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
32465,
1330,
4280,
4402,
198,
6738,
12972,
22877,
1330,
3384,
66,
198,
198,
11748,
1509,
11463... | 2.530973 | 1,356 |
import re
import asyncio
import pexpect as px
import sys
from glulxe.interface import i7Game
from avatar import Avatar
GAME_FILE_NAME = "rooms.gblorb"
game = None
current_location = None
EXIT_COMMANDS = ["quit", "exit"]
ROOM_SELECTION_PATTERN = 'You entered (.*) room'
MESSAGE_PARAMS_PATTERN = '@([^\s]+) (.*)'
age... | [
11748,
302,
198,
11748,
30351,
952,
198,
11748,
613,
87,
806,
355,
279,
87,
198,
11748,
25064,
198,
6738,
1278,
377,
27705,
13,
39994,
1330,
1312,
22,
8777,
198,
198,
6738,
30919,
1330,
26703,
198,
198,
47109,
62,
25664,
62,
20608,
79... | 2.317597 | 233 |
from bricks_modeling.file_IO.model_writer import write_bricks_to_file_with_steps, write_model_to_file
from util.debugger import MyDebugger
from bricks_modeling.file_IO.model_reader import read_model_from_file, read_bricks_from_file
'''
We assume the following information is provided:
1) assembly order
2) grouping
3) d... | [
6738,
28902,
62,
4666,
10809,
13,
7753,
62,
9399,
13,
19849,
62,
16002,
1330,
3551,
62,
65,
23706,
62,
1462,
62,
7753,
62,
4480,
62,
20214,
11,
3551,
62,
19849,
62,
1462,
62,
7753,
198,
6738,
7736,
13,
24442,
1362,
1330,
2011,
27509... | 2.827103 | 214 |
from sweeper.cloud import resource_config_combinations
class CloudProvider:
"""
A CloudProvider object represents a Cloud Computing service
that sweeper can manage in order to execute a workflow in this
cloud base
"""
def __init__(self):
"""
Default constructor. You should over... | [
6738,
3490,
5723,
13,
17721,
1330,
8271,
62,
11250,
62,
24011,
7352,
628,
198,
4871,
10130,
29495,
25,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
317,
10130,
29495,
2134,
6870,
257,
10130,
38589,
2139,
198,
220,
220,
220,
326,
349... | 2.870968 | 713 |
import re
import glob
import os
path = r".\data\log"
os.chdir(path)
t = []
logs = glob.glob("log*.txt")
Nbrun = len(logs)
for log in logs:
l = open(log,'r')
m = re.findall("(?<=Elapsed: )(.*?)(?=s)",l.read())
if float(m[-1]) > 0:
t.append(float(m[-1]))
l.close()
if t:
... | [
11748,
302,
201,
198,
11748,
15095,
201,
198,
11748,
28686,
201,
198,
201,
198,
6978,
796,
374,
1911,
59,
7890,
59,
6404,
1,
201,
198,
418,
13,
354,
15908,
7,
6978,
8,
201,
198,
201,
198,
83,
796,
17635,
201,
198,
6404,
82,
796,
... | 1.975309 | 405 |
# -*- coding: utf-8 -*- #
# Copyright 2014 Google LLC. 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 requir... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
1303,
198,
2,
15069,
1946,
3012,
11419,
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.55325 | 5,061 |
from bq import create_client, read_sql, query
DATASET = 'ai2_replication'
client = create_client()
make_table('institutions')
make_table('paper_authors_w_countries')
make_table('language')
make_table('ai_papers_any_author')
make_table('paper_author_institution')
make_table('oecd_comparison')
| [
6738,
275,
80,
1330,
2251,
62,
16366,
11,
1100,
62,
25410,
11,
12405,
198,
198,
35,
1404,
1921,
2767,
796,
705,
1872,
17,
62,
35666,
3299,
6,
198,
16366,
796,
2251,
62,
16366,
3419,
628,
198,
198,
15883,
62,
11487,
10786,
8625,
270,... | 2.855769 | 104 |
from django.db import models
from datetime import datetime
# Create your models here.
| [
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
2,
13610,
534,
4981,
994,
13,
198
] | 3.909091 | 22 |
import os
import argparse
import logging
role = os.getenv('DMLC_ROLE').upper()
if role == 'WORKER':
role = 'Worker' # backward compatibility
rank = os.getenv('DMLC_{}_ID'.format(role.upper()))
logging.basicConfig(level=logging.INFO, format='%(asctime)s {0}[{1}] %(message)s'.format(role, rank))
from common import f... | [
11748,
28686,
198,
11748,
1822,
29572,
198,
11748,
18931,
198,
18090,
796,
28686,
13,
1136,
24330,
10786,
23127,
5639,
62,
13252,
2538,
27691,
45828,
3419,
198,
361,
2597,
6624,
705,
33249,
1137,
10354,
198,
220,
220,
220,
2597,
796,
705,... | 2.085366 | 820 |
#!/usr/bin/python2.5
# Copyright (C) 2007 Google 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 la... | [
2,
48443,
14629,
14,
8800,
14,
29412,
17,
13,
20,
198,
198,
2,
15069,
357,
34,
8,
4343,
3012,
3457,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
... | 3.626126 | 222 |
import pytest
from pytest_djangoapp import configure_djangoapp_plugin
pytest_plugins = configure_djangoapp_plugin(
extend_INSTALLED_APPS=[
'django.contrib.admin',
],
)
@pytest.fixture
def build_tree():
"""Builds a sitetree from dict definition.
Returns items indexed by urls.
Example:
... | [
11748,
12972,
9288,
198,
198,
6738,
12972,
9288,
62,
28241,
14208,
1324,
1330,
17425,
62,
28241,
14208,
1324,
62,
33803,
198,
198,
9078,
9288,
62,
37390,
796,
17425,
62,
28241,
14208,
1324,
62,
33803,
7,
198,
220,
220,
220,
9117,
62,
... | 2.138973 | 331 |
import numpy as np | [
11748,
299,
32152,
355,
45941
] | 3.6 | 5 |
import pandas as pd
from sklearn.metrics import mean_absolute_error
from sklearn.model_selection import train_test_split
from sklearn.tree import DecisionTreeRegressor
iowa_file_path = 'rain.csv'
home_data = pd.read_csv(iowa_file_path)
# Create target object and call it y
y = home_data.SalePrice
# Create X
features =... | [
11748,
19798,
292,
355,
279,
67,
198,
6738,
1341,
35720,
13,
4164,
10466,
1330,
1612,
62,
48546,
62,
18224,
198,
6738,
1341,
35720,
13,
19849,
62,
49283,
1330,
4512,
62,
9288,
62,
35312,
198,
6738,
1341,
35720,
13,
21048,
1330,
26423,
... | 2.621236 | 631 |
from turtle import *
# Fractals
if __name__ == '__main__':
draw_fractal(5, 90, 10, 'FX', 'X', 'X+YF+', 'Y', '-FX-Y')
| [
6738,
28699,
1330,
1635,
198,
198,
2,
40548,
874,
628,
220,
220,
220,
220,
220,
220,
220,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
3197,
62,
69,
974,
282,
7,
20,
11,
4101,
11,
838,
11,
7... | 1.955224 | 67 |
from .command_conversion import CommandConversion
| [
6738,
764,
21812,
62,
1102,
9641,
1330,
9455,
3103,
9641,
628
] | 4.636364 | 11 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2020/1/10 3:23 PM
# @Author : Slade
# @File : datamake.py
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import tensorflow as tf
import numpy as np
flags = tf.app.flags
flags.DEFINE... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2488,
7575,
220,
220,
220,
1058,
12131,
14,
16,
14,
940,
513,
25,
1954,
3122,
198,
2,
2488,
13838,
220,
1058,
34... | 2.326772 | 254 |
from math import sqrt
from pathlib import Path
import ase.io
import numpy as np
from numpy.linalg import norm
from numpy.testing import assert_equal as np_assert_equal
import pytest
from pytest import approx
import tests
from mofun import Atoms
from mofun.helpers import typekey
sqrt2_2 = sqrt(2) / 2
sqrt3_2 = sqrt(... | [
198,
6738,
10688,
1330,
19862,
17034,
198,
6738,
3108,
8019,
1330,
10644,
198,
198,
11748,
257,
325,
13,
952,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
299,
32152,
13,
75,
1292,
70,
1330,
2593,
198,
6738,
299,
32152,
13,
33407,
1... | 2.56701 | 194 |
"""
Created on 31 Dec 2016
@author: Bruno Beloff (bruno.beloff@southcoastscience.com)
A helper class for validating and preparing GPS module output strings.
https://www.nmea.org
https://en.wikipedia.org/wiki/NMEA_0183
"""
# -------------------------------------------------------------------------------------------... | [
37811,
198,
41972,
319,
3261,
4280,
1584,
198,
198,
31,
9800,
25,
31045,
3944,
2364,
357,
1671,
36909,
13,
6667,
2364,
31,
35782,
1073,
5773,
4234,
13,
785,
8,
198,
198,
32,
31904,
1398,
329,
4938,
803,
290,
10629,
15472,
8265,
5072,
... | 5.608696 | 230 |
# Generated by Django 2.2.16 on 2020-11-07 11:31
from django.db import migrations, models
import django.db.models.deletion
| [
2,
2980,
515,
416,
37770,
362,
13,
17,
13,
1433,
319,
12131,
12,
1157,
12,
2998,
1367,
25,
3132,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
14208,
13,
9945,
13,
27530,
13,
2934,
1616,
295,... | 2.840909 | 44 |
# -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/items.html
import scrapy
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
2896,
500,
994,
262,
4981,
329,
534,
15881,
276,
3709,
198,
2,
198,
2,
4091,
10314,
287,
25,
198,
2,
2638,
1378,
15390,
13,
1416,
2416,
88,
13,
2398,
14,
2... | 2.666667 | 63 |
from conftest import app
from model.User import User | [
6738,
369,
701,
395,
1330,
598,
198,
6738,
2746,
13,
12982,
1330,
11787
] | 4 | 13 |
import unittest
from busco import BuscoConfig
import shutil
import os
from unittest.mock import Mock
from unittest.mock import patch, call
| [
11748,
555,
715,
395,
198,
6738,
1323,
1073,
1330,
5869,
1073,
16934,
198,
11748,
4423,
346,
198,
11748,
28686,
198,
6738,
555,
715,
395,
13,
76,
735,
1330,
44123,
198,
6738,
555,
715,
395,
13,
76,
735,
1330,
8529,
11,
869,
628
] | 3.333333 | 42 |
"""Add driver switch activity status
Revision ID: 8fde055f9d29
Revises: 8fe63e4276dc
Create Date: 2020-02-15 16:46:48.890628
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "8fde055f9d29"
down_revision = "8fe63e4276dc"
branch_labels = None
depends_on = None
| [
37811,
4550,
4639,
5078,
3842,
3722,
198,
198,
18009,
1166,
4522,
25,
807,
69,
2934,
47838,
69,
24,
67,
1959,
198,
18009,
2696,
25,
807,
5036,
5066,
68,
19,
27988,
17896,
198,
16447,
7536,
25,
12131,
12,
2999,
12,
1314,
1467,
25,
35... | 2.572581 | 124 |
"""UWEC Language Tools manager module
Provides functions for defining and managing a corpus.
"""
# Python 3 forward compatability imports.
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from __future__ import unicode_literals
import sys
import os
impor... | [
37811,
52,
54,
2943,
15417,
20003,
4706,
8265,
628,
220,
220,
220,
47081,
5499,
329,
16215,
290,
11149,
257,
35789,
13,
198,
37811,
198,
2,
11361,
513,
2651,
8330,
1799,
17944,
13,
198,
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
1... | 2.320056 | 4,268 |
"""
.. class:: GalaxySpectrumVVDS
.. moduleauthor:: Johan Comparat <johan.comparat__at__gmail.com>
The class GalaxySpectrumVVDS is dedicated to handling VVDS spectra
"""
from os.path import join
import os
import numpy as n
import astropy.io.fits as fits
import glob
import matplotlib
matplotlib.use('pdf')
import matp... | [
37811,
198,
492,
1398,
3712,
9252,
49738,
6582,
53,
53,
5258,
198,
198,
492,
8265,
9800,
3712,
16053,
272,
22565,
265,
1279,
73,
22436,
13,
785,
1845,
265,
834,
265,
834,
14816,
13,
785,
29,
198,
198,
464,
1398,
9252,
49738,
6582,
5... | 2.081106 | 2,133 |
import setuptools
setuptools.setup(
name="RAscore", # Replace with your own username
version="2020.9",
author="Reymond Group/Molecular AI AstraZeneca",
author_email="amol.thakkar@dcb.unibe.ch",
license="MIT",
description="Computation of retrosynthetic accessibility from machine learening of CAS... | [
11748,
900,
37623,
10141,
198,
198,
2617,
37623,
10141,
13,
40406,
7,
198,
220,
220,
220,
1438,
2625,
3861,
26675,
1600,
1303,
40177,
351,
534,
898,
20579,
198,
220,
220,
220,
2196,
2625,
42334,
13,
24,
1600,
198,
220,
220,
220,
1772,... | 2.804878 | 164 |
# pylint: disable=missing-function-docstring, missing-module-docstring/
import numpy as np
import pytest
from numpy.random import rand, randint
import modules.complex_func as mod
from pyccel.epyccel import epyccel
@pytest.mark.parametrize("f", [ mod.create_complex_literal__int_int,
mod.cre... | [
2,
279,
2645,
600,
25,
15560,
28,
45688,
12,
8818,
12,
15390,
8841,
11,
4814,
12,
21412,
12,
15390,
8841,
14,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
12972,
9288,
198,
198,
6738,
299,
32152,
13,
25120,
1330,
43720,
11,
43720,
... | 1.953846 | 455 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
from sweeperbot._version import __version__
with open("README.rst") as readme_file:
readme = readme_file.read()
with open("HISTORY.rst") as history_file:
history = history_file.read()
setup(
name="sweeperbot",
... | [
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,
900,
37623,
10141,
1330,
9058,
11,
1064,
62,
43789,
198,
6738,
3490,
5723,
13645,
13557,
9641,
1330,
11593,
... | 2.379032 | 496 |
import requests
import os
from datetime import datetime
import json
from bs4 import BeautifulSoup as bs
import time
import random
import string
| [
11748,
7007,
201,
198,
11748,
28686,
201,
198,
6738,
4818,
8079,
1330,
4818,
8079,
201,
198,
11748,
33918,
201,
198,
6738,
275,
82,
19,
1330,
23762,
50,
10486,
355,
275,
82,
201,
198,
11748,
640,
201,
198,
11748,
4738,
201,
198,
11748... | 2.698413 | 63 |
# -*- coding: utf-8 -*-
"""
-------------------------------------------------
File Name: test1
Description : 多线程实现
Author : pengsheng
date: 2019-04-20
-------------------------------------------------
"""
import threading
new_thread = threading.Thread(target=worker, name='new_thread')
... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
47232,
12,
198,
220,
220,
9220,
6530,
171,
120,
248,
220,
220,
220,
220,
1332,
16,
198,
220,
220,
12489,
1058,
220,
36469,
248,
163,
118,
123,
163,
101,
... | 1.802419 | 248 |
# fix absolute imports on ST3
# TODO: remove
#import sys
#import os
#sys.path.insert(0, os.path.abspath(os.path.dirname(__file__)))
try:
from sublime_jedi import *
except ImportError:
from .sublime_jedi import *
| [
2,
4259,
4112,
17944,
319,
3563,
18,
198,
2,
16926,
46,
25,
4781,
198,
2,
11748,
25064,
198,
2,
11748,
28686,
198,
2,
17597,
13,
6978,
13,
28463,
7,
15,
11,
28686,
13,
6978,
13,
397,
2777,
776,
7,
418,
13,
6978,
13,
15908,
3672,... | 2.630952 | 84 |
__author__ = "Vanessa Sochat"
__copyright__ = "Copyright 2021, Vanessa Sochat"
__license__ = "MPL 2.0"
import os
import time
import tarfile
import tempfile
import time
from oras.logger import logger
import oras.utils as utils
import oras.defaults as defaults
from .const import TempFilePattern, AnnotationUnpack, Anno... | [
834,
9800,
834,
796,
366,
25298,
21411,
1406,
17006,
1,
198,
834,
22163,
4766,
834,
796,
366,
15269,
33448,
11,
42100,
1406,
17006,
1,
198,
834,
43085,
834,
796,
366,
44,
6489,
362,
13,
15,
1,
628,
198,
11748,
28686,
198,
11748,
640... | 2.289919 | 4,077 |
from tensorflow import keras
from tensorflow.keras import backend as K
| [
6738,
11192,
273,
11125,
1330,
41927,
292,
198,
6738,
11192,
273,
11125,
13,
6122,
292,
1330,
30203,
355,
509,
628
] | 3.6 | 20 |
import numpy as np
import torch
import torch.nn as nn
import time
from tqdm import tqdm
from .buffer import Buffer
from .algo.base import Expert
from .env import NormalizedEnv
def soft_update(target, source, tau):
"""Soft update for SAC"""
for t, s in zip(target.parameters(), source.parameters()... | [
11748,
299,
32152,
355,
45941,
201,
198,
11748,
28034,
201,
198,
11748,
28034,
13,
20471,
355,
299,
77,
201,
198,
11748,
640,
201,
198,
201,
198,
6738,
256,
80,
36020,
1330,
256,
80,
36020,
201,
198,
6738,
764,
22252,
1330,
47017,
201... | 2.197226 | 2,307 |
# Lint as: python3
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | [
2,
406,
600,
355,
25,
21015,
18,
198,
2,
15069,
12131,
3012,
11419,
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.364641 | 543 |
""" Extract charges obtained via HORTON and Bader.
Copyright 2019 Simulation Lab
University of Freiburg
Author: Lukas Elflein <elfleinl@cs.uni-freiburg.de>
"""
import os
import pandas as pd
def create_dir(path='./plotting'):
"""Create new folder for pictures if it does not exist yet."""
if os.path.isdir(path):... | [
37811,
29677,
4530,
6492,
2884,
367,
9863,
1340,
290,
347,
5067,
13,
198,
15269,
13130,
41798,
3498,
198,
21009,
286,
4848,
571,
3686,
198,
13838,
25,
28102,
292,
19067,
33663,
1279,
7046,
33663,
75,
31,
6359,
13,
35657,
12,
19503,
571,... | 2.173309 | 3,237 |
import os
import time
import json
import datetime
import subprocess
from pythonping import ping
from influxdb_client import InfluxDBClient
from influxdb_client.client.write_api import SYNCHRONOUS
from multiprocessing import Process
# InfluxDB Settings
NAMESPACE = os.getenv('NAMESPACE', 'None')
DB_URL = os.... | [
11748,
28686,
201,
198,
11748,
640,
201,
198,
11748,
33918,
201,
198,
11748,
4818,
8079,
201,
198,
11748,
850,
14681,
201,
198,
6738,
21015,
13886,
1330,
29400,
201,
198,
6738,
25065,
9945,
62,
16366,
1330,
4806,
22564,
11012,
11792,
201,... | 2.415517 | 580 |
""" This module contains the RA calculator """
from kivy.uix.gridlayout import GridLayout
from kivy.lang import Builder
from kivy.properties import StringProperty
from Moduler.customwidgets import MyLabel
from Moduler.customwidgets import MyTextInput
from Moduler.datasaving import SurfaceRaData
Builder.load_string(
... | [
37811,
770,
8265,
4909,
262,
17926,
28260,
37227,
198,
198,
6738,
479,
452,
88,
13,
84,
844,
13,
25928,
39786,
1330,
24846,
32517,
198,
6738,
479,
452,
88,
13,
17204,
1330,
35869,
198,
6738,
479,
452,
88,
13,
48310,
1330,
10903,
21746... | 1.890178 | 1,293 |
"""Top-level package for nhdpy."""
__author__ = """Jemma Stachelek"""
__email__ = 'stachel2@msu.edu'
__version__ = '0.1.0'
from .nhdpy import nhd_get
from .nhdpy import nhd_list
from .nhdpy import nhd_load
| [
37811,
9126,
12,
5715,
5301,
329,
299,
31298,
9078,
526,
15931,
198,
198,
834,
9800,
834,
796,
37227,
41,
368,
2611,
520,
4891,
293,
74,
37811,
198,
834,
12888,
834,
796,
705,
301,
9636,
17,
31,
907,
84,
13,
15532,
6,
198,
834,
96... | 2.375 | 88 |
# TODO merge naive and weighted loss.
import numpy as np
import torch
import torch.nn.functional as F
from ..bbox import bbox_overlaps
from ...ops import sigmoid_focal_loss
from ..bbox.transforms import delta2bbox
# added by Shengkai Wu
# implement iou_balanced cross entropy loss.
def iou_balanced_cross_entropy(pr... | [
2,
16926,
46,
20121,
24354,
290,
26356,
2994,
13,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28034,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
198,
198,
6738,
11485,
65,
3524,
1330,
275,
3524,
62,
2502,
75,
1686,
198,
673... | 2.372826 | 7,588 |