content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
#!/usr/bin/env python
# -*- coding:utf-8 -*-
import urllib
import requests
from bs4 import BeautifulSoup
"""
https://wenku.baidu.com/browse/getrequest?doc_id=a1eec6289b6648d7c1c7468f&pn=22&rn=1&type=ppt&callback=bd__cbs__s5lw72
https://wenku.baidu.com/browse/getrequest?doc_id=a1eec6289b6648d7c1c7468f&pn=23&rn=1&type... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
40477,
12,
23,
532,
9,
12,
198,
198,
11748,
2956,
297,
571,
198,
11748,
7007,
198,
6738,
275,
82,
19,
1330,
23762,
50,
10486,
628,
198,
37811,
198,
5450,
... | 1.615472 | 879 |
from header_common import *
from header_presentations import *
from header_mission_templates import *
from ID_meshes import *
from header_operations import *
from header_triggers import *
from module_constants import *
#import string
from xgm_mod_options_header import *
###############################################... | [
6738,
13639,
62,
11321,
1330,
1635,
198,
6738,
13639,
62,
25579,
602,
1330,
1635,
198,
6738,
13639,
62,
3411,
62,
11498,
17041,
1330,
1635,
198,
6738,
4522,
62,
6880,
956,
1330,
1635,
198,
6738,
13639,
62,
3575,
602,
1330,
1635,
198,
... | 2.016123 | 8,497 |
import torch
import numpy as np
import scipy.io
import h5py
import torch.nn as nn
#################################################
#
# Utilities
#
#################################################
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
# reading data
# normalization, pointwise gaussi... | [
11748,
28034,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
629,
541,
88,
13,
952,
198,
11748,
289,
20,
9078,
198,
11748,
28034,
13,
20471,
355,
299,
77,
628,
198,
29113,
14468,
2,
198,
2,
198,
2,
41086,
198,
2,
198,
29113,
14468,... | 3.786885 | 122 |
from io import StringIO
import re
from pathlib import Path
import logging
from django.db import models
from django.conf import settings
from bs4 import BeautifulSoup
from tika import parser
logger = logging.getLogger(__name__)
class TikaParseError(RuntimeError):
"""Raised when the conversion of a document into ... | [
6738,
33245,
1330,
10903,
9399,
198,
11748,
302,
198,
6738,
3108,
8019,
1330,
10644,
198,
11748,
18931,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
275,
82,
19,
1330,
23... | 2.584641 | 1,784 |
from typing import List, Tuple, Type
from .tensor import Tensor
from .device import Device
from .allocator import Allocator
from cpm_kernels.library import cudart
import numpy as np
import logging
logger = logging.getLogger(__name__) | [
6738,
19720,
1330,
7343,
11,
309,
29291,
11,
5994,
198,
6738,
764,
83,
22854,
1330,
309,
22854,
198,
6738,
764,
25202,
1330,
16232,
198,
6738,
764,
32332,
1352,
1330,
1439,
420,
1352,
198,
6738,
269,
4426,
62,
74,
44930,
13,
32016,
13... | 3.426471 | 68 |
if __name__ == "__main__":
dlinkedList = DoublyLinkedList(10)
dlinkedList.append(20)
dlinkedList.append(30)
dlinkedList.prepend(-5)
dlinkedList.prepend(-8)
dlinkedList.insert(value=12, index=2)
dlinkedList.print_list()
dlinkedList.remove(index=5)
dlinkedList.insert(val... | [
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
288,
25614,
8053,
796,
5728,
36874,
11280,
276,
8053,
7,
940,
8,
628,
220,
220,
220,
288,
25614,
8053,
13,
33295,
7,
1238,
8,
198,
220,
220,
22... | 2.271357 | 199 |
import setuptools
import os
with open("README.md", "r") as fh:
long_description = fh.read()
if os.environ.get('CI_COMMIT_TAG'):
version = os.environ['CI_COMMIT_TAG']
else:
version = "0.0.4"
setuptools.setup(
name="abbreviator",
version=version,
author="Stephanie Wagenaar",
author_email="s... | [
11748,
900,
37623,
10141,
198,
11748,
28686,
198,
198,
4480,
1280,
7203,
15675,
11682,
13,
9132,
1600,
366,
81,
4943,
355,
277,
71,
25,
198,
220,
220,
220,
890,
62,
11213,
796,
277,
71,
13,
961,
3419,
198,
198,
361,
28686,
13,
268,
... | 2.494083 | 338 |
'''
QUESTION:
561. Array Partition I
Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2), ..., (an, bn) which makes sum of min(ai, bi) for all i from 1 to n as large as possible.
Example 1:
Input: [1,4,3,2]
Output: 4
Explanation: n is 2, and the maximum... | [
7061,
6,
198,
35780,
2849,
25,
198,
198,
47915,
13,
15690,
2142,
653,
314,
198,
15056,
281,
7177,
286,
362,
77,
37014,
11,
534,
4876,
318,
284,
1448,
777,
37014,
656,
299,
14729,
286,
18253,
11,
910,
357,
64,
16,
11,
275,
16,
828,... | 2.818182 | 198 |
from . import account_payment
| [
6738,
764,
1330,
1848,
62,
37301,
198
] | 4.285714 | 7 |
from time import sleep
import csv
from datetime import datetime
import mac_vendor_lookup
import cisco_service
if __name__ == "__main__":
# Cool banner ofc
print("""
╔═╗╦╔═╗╔═╗╔═╗ ╔╦╗╔╗╔╔═╗╔═╗ ╔╦╗╔═╗╔═╗ ╦ ╔═╗╔═╗╦╔═╦ ╦╔═╗
║ ║╚═╗║ ║ ║ ║║║║║╠═╣║ ║║║╠═╣║ ... | [
6738,
640,
1330,
3993,
198,
11748,
269,
21370,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
11748,
8352,
62,
85,
18738,
62,
5460,
929,
198,
11748,
269,
4861,
62,
15271,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
129... | 1.435154 | 2,105 |
from SCons.Script import *
| [
6738,
6374,
684,
13,
7391,
1330,
1635,
198
] | 3.375 | 8 |
power = {'BUSES': {'Area': 1.08752,
'Bus/Area': 1.08752,
'Bus/Gate Leakage': 0.00541455,
'Bus/Peak Dynamic': 0.0,
'Bus/Runtime Dynamic': 0.0,
'Bus/Subthreshold Leakage': 0.0564625,
'Bus/Subthreshold Leakage with power gating': 0.0211734,
'Gate... | [
6477,
796,
1391,
6,
45346,
1546,
10354,
1391,
6,
30547,
10354,
352,
13,
2919,
43665,
11,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
705,
16286,
14,
30547,
10354,
352,
13,
2919,
43665,
11,
198,
220,
220,
220,
220,
220,
... | 2.319168 | 15,296 |
#!/usr/bin/env python
#########
#LICENSE#
#########
'''
MIT License
Copyright (c) 2021 ItsMeAlfie0
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitat... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
7804,
2,
198,
2,
43,
2149,
24290,
2,
198,
7804,
2,
198,
198,
7061,
6,
198,
36393,
13789,
198,
198,
15269,
357,
66,
8,
33448,
6363,
5308,
32,
1652,
494,
15,
198,
198,
5990,
3... | 2.816692 | 671 |
from pygame import *
#создай окно игры
window = display.set_mode((1000, 700))
display.set_caption('догонялки')
#задай фон сцены
background = transform.scale(image.load('ping.jpg'), (1000, 700))
#создай 2 спрайта и размести их на сцене
x1 = 0
y1 = 300
x2 = 900
y2 = 300
sprite1 = transform.scale(image.lo... | [
6738,
12972,
6057,
1330,
1635,
201,
198,
201,
198,
2,
21727,
25443,
115,
43666,
16142,
140,
117,
12466,
122,
31583,
22177,
15166,
12466,
116,
140,
111,
21169,
45035,
201,
198,
17497,
796,
3359,
13,
2617,
62,
14171,
19510,
12825,
11,
130... | 1.784148 | 593 |
import csv
import datetime
import matplotlib.pyplot as plt
import pandas as pd
import requests
import seaborn as sns
def measure_response_time(url, criteria, write=True):
'''
Measures and saves an API request's response time to a CSV file
:param url: The URL for API request
:param criteria: The crit... | [
11748,
269,
21370,
198,
11748,
4818,
8079,
198,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
7007,
198,
11748,
384,
397,
1211,
355,
3013,
82,
628,
198,
4299,
3953,
62,... | 2.716606 | 1,108 |
api_key = "AIzaSyAedPSTmyoW1ejPtwG_cSu7fEjLxOOUrXg"
# Uses the Geocode API
import requests
from urllib.parse import urlencode
#Input address here!
lat, lng = extract_lat_lng("1600 Amphitheatre Parkway, Mountain View, CA")
places_endpoint_2 = "https://maps.googleapis.com/maps/api/place/nearbysearch/json"
params_2 = {... | [
15042,
62,
2539,
796,
366,
20185,
4496,
13940,
32,
276,
47,
2257,
1820,
78,
54,
16,
68,
73,
47,
4246,
38,
62,
66,
5606,
22,
69,
36,
73,
43,
87,
46,
2606,
81,
55,
70,
1,
198,
2,
36965,
262,
2269,
420,
1098,
7824,
198,
11748,
... | 2.39693 | 456 |
# Generated by Django 2.0.1 on 2018-01-28 19:30
from django.db import migrations
| [
2,
2980,
515,
416,
37770,
362,
13,
15,
13,
16,
319,
2864,
12,
486,
12,
2078,
678,
25,
1270,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
628,
628
] | 2.741935 | 31 |
from ._interfaces import EventCallbackType, EventType, IDispatchEvents
__all__ = [
"IDispatchEvents",
"EventType",
"EventCallbackType",
]
| [
6738,
47540,
3849,
32186,
1330,
8558,
47258,
6030,
11,
8558,
6030,
11,
4522,
8802,
963,
37103,
198,
198,
834,
439,
834,
796,
685,
198,
220,
220,
220,
366,
2389,
8802,
963,
37103,
1600,
198,
220,
220,
220,
366,
9237,
6030,
1600,
198,
... | 2.849057 | 53 |
# user defined exception
"""
Exceptions
|
--------------------------------------------
| |
Build-in Exceptions User defined Exceptions
"""
#
# >>> class CustomE... | [
2,
2836,
5447,
6631,
198,
198,
37811,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
1475,
11755,
198,
220,
220,
220,
220,
22... | 2.492228 | 579 |
# APROVANDO EMPRÉSTIMO — Escreva um programa para aprovar o empréstimo bancário para a compra de uma casa.
# O programa vai perguntar o valor da casa, o salário do comprador e em quantos anos ele vai pagar.
#
# Calcule o valor da prestação mensal, sabendo que ela não pode
# exceder 30% do salário ou então o empréstimo ... | [
2,
40410,
8874,
6981,
46,
17228,
4805,
38351,
2257,
3955,
46,
851,
16319,
260,
6862,
23781,
1430,
64,
31215,
257,
1676,
7785,
267,
795,
1050,
2634,
301,
25147,
275,
1192,
6557,
27250,
31215,
257,
552,
430,
390,
334,
2611,
6124,
64,
13... | 2.29878 | 328 |
import pytest
from elmo.settings.exceptions import ValidationError
from elmo.settings.validators import is_https_url, not_null
def test_not_null_boolean():
"""Should succeed with a not None value"""
assert not_null(True) is True
assert not_null(False) is True
def test_not_null_with_string():
"""Sho... | [
11748,
12972,
9288,
198,
198,
6738,
1288,
5908,
13,
33692,
13,
1069,
11755,
1330,
3254,
24765,
12331,
198,
6738,
1288,
5908,
13,
33692,
13,
12102,
2024,
1330,
318,
62,
5450,
62,
6371,
11,
407,
62,
8423,
628,
198,
4299,
1332,
62,
1662,... | 2.795009 | 561 |
from pure_fb_openmetrics_exporter.flashblade_collector import collector
| [
6738,
5899,
62,
21855,
62,
9654,
4164,
10466,
62,
1069,
26634,
13,
34167,
22500,
62,
33327,
273,
1330,
22967,
198
] | 3.6 | 20 |
from django.urls import include, re_path
from oauth import views as oauth_views
urlpatterns = [
re_path(r"^$", oauth_views.index, name="evernote_index"),
re_path(r"^auth/$", oauth_views.auth, name="evernote_auth"),
re_path(r"^callback/$", oauth_views.callback, name="evernote_callback"),
re_path(r"^rese... | [
6738,
42625,
14208,
13,
6371,
82,
1330,
2291,
11,
302,
62,
6978,
198,
6738,
267,
18439,
1330,
5009,
355,
267,
18439,
62,
33571,
198,
198,
6371,
33279,
82,
796,
685,
198,
220,
220,
220,
302,
62,
6978,
7,
81,
1,
61,
3,
1600,
267,
... | 2.516779 | 149 |
# __all__ = ["DAQ_Move", "DAQ_Navigation_Visu", "DAQ_Utils","DAQ_1DViewer"]
# from .DAQ_move import *
# from .DAQ_Navigation_Visu import *
# from .DAQ_Utils import *
from .DAQ_Utils.plotting.QLED import QLED
| [
2,
11593,
439,
834,
796,
14631,
46640,
62,
21774,
1600,
366,
46640,
62,
30575,
7065,
62,
15854,
84,
1600,
366,
46640,
62,
18274,
4487,
2430,
46640,
62,
16,
35,
7680,
263,
8973,
198,
2,
422,
764,
46640,
62,
21084,
1330,
1635,
198,
2,... | 2.535714 | 84 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
sys.path.append("/home/jacobsin/Development/python/rifflib")
import riff
# contract = riff.make_contract("contract.yml")
riff.endpoint.walker(
[
{
"userId": 1,
"id": 1,
"title": "sunt aut facere repellat provid... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
25064,
198,
198,
17597,
13,
6978,
13,
33295,
7203,
14,
11195,
14,
30482,
8158,
259,
14,
41206,
14,
29... | 1.803371 | 356 |
import FWCore.ParameterSet.Config as cms
from HLTriggerOffline.SMP.hltSMPValidator_cfi import *
SMPValidationSequence = cms.Sequence(
hltSMPValidator
)
| [
11748,
48849,
14055,
13,
36301,
7248,
13,
16934,
355,
269,
907,
198,
198,
6738,
38312,
48344,
28657,
13,
50,
7378,
13,
71,
2528,
50,
7378,
47139,
1352,
62,
66,
12463,
1330,
1635,
198,
198,
50,
7378,
7762,
24765,
44015,
594,
796,
269,
... | 2.587302 | 63 |
#!/usr/bin/env python
import sys
from os import path
import django
from django.conf import settings, global_settings
from django.core.management import execute_from_command_line
MIDDLEWARE = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.mi... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
25064,
198,
6738,
28686,
1330,
3108,
198,
198,
11748,
42625,
14208,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
11,
3298,
62,
33692,
198,
6738,
42625,
14208,
13,
7295,
13... | 1.963014 | 730 |
# coding: utf-8
# In[1]:
from __future__ import absolute_import, division
import os
import time
import numpy as np
import pandas as pd
import gensim
from tqdm import tqdm
from nltk.stem import PorterStemmer
ps = PorterStemmer()
from nltk.stem.lancaster import LancasterStemmer
lc = LancasterStemmer()
from nltk.stem... | [
198,
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
2,
554,
58,
16,
5974,
628,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
11,
7297,
198,
198,
11748,
28686,
198,
11748,
640,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,... | 2.505736 | 1,046 |
# ---
# jupyter:
# jupytext:
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.3'
# jupytext_version: 0.8.6
# kernelspec:
# display_name: Python [conda env:DL-wpython3]
# language: python
# name: conda-env-DL-wpython3-py
# ---
import time
impo... | [
2,
11420,
198,
2,
474,
929,
88,
353,
25,
198,
2,
220,
220,
474,
929,
88,
5239,
25,
198,
2,
220,
220,
220,
220,
2420,
62,
15603,
341,
25,
198,
2,
220,
220,
220,
220,
220,
220,
7552,
25,
764,
9078,
198,
2,
220,
220,
220,
220,
... | 2.508503 | 1,176 |
from datetime import datetime, timedelta
from os import listdir, system
import aiohttp
import discord
import json
from discord.ext import commands
from pretty_help import PrettyHelp
with open('./data.json') as f:
d1 = json.load(f)
with open('./market.json') as f:
d2 = json.load(f)
TOKEN = d1['token']
bot = Ech... | [
6738,
4818,
8079,
1330,
4818,
8079,
11,
28805,
12514,
198,
6738,
28686,
1330,
1351,
15908,
11,
1080,
198,
198,
11748,
257,
952,
4023,
198,
11748,
36446,
198,
11748,
33918,
198,
198,
6738,
36446,
13,
2302,
1330,
9729,
198,
6738,
2495,
62... | 2.601563 | 256 |
# -*- coding: utf-8 -*-
"""
Created on Sat Apr 18 13:02:47 2020
@author: user
"""
# python David_4_7_2_index_features.py --dataset output/data/training --features-db output/training_features.hdf5
# python David_4_7_2_index_features.py
# import the necessary packages
from __future__ import print_function
from pyimage... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
41972,
319,
7031,
2758,
1248,
1511,
25,
2999,
25,
2857,
12131,
198,
198,
31,
9800,
25,
2836,
198,
37811,
198,
198,
2,
21015,
3271,
62,
19,
62,
22,
62,
17... | 3.108205 | 841 |
""" Basic template file that you should fill in for Problem Set 3. Some util
functions are provided from the NAND notebooks online that implement some
of the NAND essentials. """
from util import EVAL
from util import TRUTH
from util import NANDProgram
# TODO: Implement this function and return a string represe... | [
37811,
14392,
11055,
2393,
326,
345,
815,
6070,
287,
329,
20647,
5345,
513,
13,
2773,
7736,
201,
198,
12543,
2733,
389,
2810,
422,
262,
399,
6981,
43935,
2691,
326,
3494,
617,
201,
198,
1659,
262,
399,
6981,
41954,
13,
37227,
201,
198... | 2.679043 | 1,212 |
# Generated by Django 2.1.1 on 2018-09-16 08:39
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
362,
13,
16,
13,
16,
319,
2864,
12,
2931,
12,
1433,
8487,
25,
2670,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
# save snapshot
from evdev import UInput, ecodes
cfg = globals()["config"]
drv = globals()["drivers"]["keybd1"]
drv.press_keys(ecodes.KEY_LEFTALT, ecodes.KEY_S)
| [
2,
3613,
27479,
198,
6738,
819,
7959,
1330,
471,
20560,
11,
9940,
4147,
198,
198,
37581,
796,
15095,
874,
3419,
14692,
11250,
8973,
198,
7109,
85,
796,
15095,
874,
3419,
14692,
36702,
1,
7131,
1,
2539,
17457,
16,
8973,
198,
198,
7109,... | 2.5 | 66 |
# Copyright 2009-2013 Nokia Siemens Networks Oyj
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | [
2,
15069,
3717,
12,
6390,
26182,
45196,
641,
27862,
39447,
73,
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,
... | 3.738636 | 176 |
import pytest
import sys
sys.path.append('../')
from search import *
| [
11748,
12972,
9288,
198,
11748,
25064,
198,
17597,
13,
6978,
13,
33295,
10786,
40720,
11537,
198,
6738,
2989,
1330,
1635,
198,
220,
220,
220,
220,
198,
220,
220
] | 2.714286 | 28 |
#!/usr/bin/env python
from ..exrpc.rpclib import *
from ..exrpc.server import *
from ..mllib.model_util import ModelID
class df_to_sparse_info:
'''A python container for holding information related to dataframe to sparse conversion'''
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
6738,
11485,
1069,
81,
14751,
13,
81,
79,
565,
571,
1330,
1635,
198,
6738,
11485,
1069,
81,
14751,
13,
15388,
1330,
1635,
198,
6738,
11485,
76,
297,
571,
13,
19849,
62,
22602,
1... | 2.987805 | 82 |
# Generated by Django 3.1.1 on 2020-09-12 19:06
from django.db import migrations
import multiselectfield.db.fields
| [
2,
2980,
515,
416,
37770,
513,
13,
16,
13,
16,
319,
12131,
12,
2931,
12,
1065,
678,
25,
3312,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
198,
11748,
1963,
786,
801,
3245,
13,
9945,
13,
25747,
628
] | 2.925 | 40 |
import re
from ipaddress import ip_address
import pytest
from harness.runtime._validate import validate, ValidationError
@pytest.fixture()
@pytest.fixture()
@pytest.fixture()
@pytest.fixture()
def test_disabled(message_type):
"""
message Message {
message Inner {
option (validate... | [
11748,
302,
198,
6738,
20966,
21975,
1330,
20966,
62,
21975,
198,
198,
11748,
12972,
9288,
198,
198,
6738,
19356,
13,
43282,
13557,
12102,
378,
1330,
26571,
11,
3254,
24765,
12331,
628,
198,
31,
9078,
9288,
13,
69,
9602,
3419,
628,
198,... | 2.456328 | 5,610 |
"""
StateIO
Container to store state object.
Several useful functions are implemented in this class:
1. Saving intermediate results to files.
2. Recover workspace at any iteration (label set and unlabel set).
3. Recover workspace from the intermediate result file in case the program exits unexpectedly.
4. Gathering and... | [
37811,
198,
9012,
9399,
198,
29869,
284,
3650,
1181,
2134,
13,
198,
14945,
4465,
5499,
389,
9177,
287,
428,
1398,
25,
198,
16,
13,
34689,
19898,
2482,
284,
3696,
13,
198,
17,
13,
49107,
44573,
379,
597,
24415,
357,
18242,
900,
290,
... | 2.314179 | 5,360 |
#!/usr/bin/env python3
import re
import os
import torch
import torch.nn.functional as F
import struct
import glob
from PIL import Image
import torchvision.transforms.functional as TF
from shutil import copyfile
root_dir = ''
ori_dir = ''
if __name__ == '__main__':
sub_dir = [os.path.join(root_dir, name) for name in... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
11748,
302,
198,
11748,
28686,
198,
11748,
28034,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
198,
11748,
2878,
198,
11748,
15095,
198,
6738,
350,
4146,
1330,
7412,
198,
... | 2.374101 | 278 |
import torch
from vap_turn_taking.utils import find_island_idx_len
from vap_turn_taking.hold_shifts import get_dialog_states, get_last_speaker
def find_isolated_within(vad, prefix_frames, max_duration_frames, suffix_frames):
"""
... <= prefix_frames (silence) | <= max_duration_frames (active) | <= suffix_fram... | [
11748,
28034,
198,
6738,
38187,
62,
15344,
62,
26103,
13,
26791,
1330,
1064,
62,
271,
1044,
62,
312,
87,
62,
11925,
198,
6738,
38187,
62,
15344,
62,
26103,
13,
2946,
62,
1477,
19265,
1330,
651,
62,
38969,
519,
62,
27219,
11,
651,
62... | 1.960217 | 1,106 |
import datetime as dt
from flask_login import UserMixin
from SUIBE_DID_Data_Manager.database import (
Column,
Model,
SurrogatePK,
db,
reference_col,
relationship,
) | [
11748,
4818,
8079,
355,
288,
83,
198,
198,
6738,
42903,
62,
38235,
1330,
11787,
35608,
259,
198,
198,
6738,
13558,
9865,
36,
62,
35,
2389,
62,
6601,
62,
13511,
13,
48806,
1330,
357,
198,
220,
220,
220,
29201,
11,
198,
220,
220,
220,... | 2.5 | 76 |
import argparse
import signal
import time
import sys
import os
import logging
| [
11748,
1822,
29572,
198,
11748,
6737,
198,
11748,
640,
198,
11748,
25064,
198,
11748,
28686,
198,
11748,
18931,
628
] | 4.157895 | 19 |
A = [4, 5, 6, 7, 0, 1, 2, 3]
A = [0,1,2,3,4,5,6,7]
B = 4
A = [ 101, 103, 106, 109, 158, 164, 182, 187, 202, 205, 2, 3, 32, 57, 69, 74, 81, 99, 100 ]
B = 202
a = Rotated_Search()
print(a.search(A, B))
| [
198,
198,
32,
796,
685,
19,
11,
642,
11,
718,
11,
767,
11,
657,
11,
352,
11,
362,
11,
513,
60,
198,
32,
796,
685,
15,
11,
16,
11,
17,
11,
18,
11,
19,
11,
20,
11,
21,
11,
22,
60,
198,
198,
33,
796,
604,
198,
198,
32,
79... | 1.80531 | 113 |
import numpy as np
from collections.abc import Mapping
from mesohops.util.exceptions import AuxError
from scipy.special import binom
__title__ = "AuxiliaryVector Class"
__author__ = "D. I. G. Bennett"
__version__ = "1.0"
class AuxiliaryVector(Mapping):
"""
This is a class that encodes a sparse representation... | [
11748,
299,
32152,
355,
45941,
198,
6738,
17268,
13,
39305,
1330,
337,
5912,
198,
6738,
18842,
1219,
2840,
13,
22602,
13,
1069,
11755,
1330,
47105,
12331,
198,
6738,
629,
541,
88,
13,
20887,
1330,
9874,
296,
198,
198,
834,
7839,
834,
... | 2.090631 | 7,525 |
import os
from app import create_app, db, cli
from flask import current_app
from flask_security import Security, SQLAlchemyUserDatastore, current_user
from flask_security.utils import encrypt_password
from app.auth.models import Role, User
# Setup Flask-Security
app = create_app()
with app.app_context():
user_datas... | [
11748,
28686,
198,
6738,
598,
1330,
2251,
62,
1324,
11,
20613,
11,
537,
72,
198,
6738,
42903,
1330,
1459,
62,
1324,
198,
6738,
42903,
62,
12961,
1330,
4765,
11,
16363,
2348,
26599,
12982,
27354,
459,
382,
11,
1459,
62,
7220,
198,
6738... | 3.094675 | 169 |
import pytest
import numpy as np
from bionumpy.position_weight_matrix import PositionWeightMatrix
@pytest.fixture
@pytest.fixture
@pytest.fixture
| [
11748,
12972,
9288,
198,
11748,
299,
32152,
355,
45941,
198,
198,
6738,
275,
295,
32152,
13,
9150,
62,
6551,
62,
6759,
8609,
1330,
23158,
25844,
46912,
628,
198,
31,
9078,
9288,
13,
69,
9602,
628,
198,
31,
9078,
9288,
13,
69,
9602,
... | 2.980769 | 52 |
import argparse
from track import *
parser = argparse.ArgumentParser()
parser.add_argument('-mp','--model_path',help='path to model',type=str)
parser.add_argument('-vp','--video_path',help='path to the video',type=str)
parser.add_argument('-od','--output_dir',help='path to save the video',type=str)
if __name__=='_... | [
11748,
1822,
29572,
198,
6738,
2610,
1330,
1635,
198,
198,
48610,
796,
1822,
29572,
13,
28100,
1713,
46677,
3419,
198,
48610,
13,
2860,
62,
49140,
10786,
12,
3149,
41707,
438,
19849,
62,
6978,
3256,
16794,
11639,
6978,
284,
2746,
3256,
... | 2.603774 | 265 |
import numpy as np
from pyriemann.clustering import Kmeans,KmeansPerClassTransform
def generate_cov(Nt,Ne):
"""Generate a set of cavariances matrices for test purpose"""
diags = 1.0+0.1*np.random.randn(Nt,Ne)
covmats = np.empty((Nt,Ne,Ne))
for i in range(Nt):
covmats[i] = np.diag(diags[i])
... | [
11748,
299,
32152,
355,
45941,
198,
6738,
12972,
380,
368,
1236,
13,
565,
436,
1586,
1330,
509,
1326,
504,
11,
42,
1326,
504,
5990,
9487,
41762,
198,
198,
4299,
7716,
62,
66,
709,
7,
45,
83,
11,
8199,
2599,
198,
220,
220,
220,
372... | 2.110989 | 910 |
# encoding= utf-8
from __future__ import division, absolute_import, with_statement, print_function
import requests
def download_file(url, file_path, params=None, proxies=None, request_session=None, cookies=None):
"""
proxies = {
"http": "http://10.10.1.10:3128",
"https": "http://10.10.1.10:1080",
... | [
2,
21004,
28,
3384,
69,
12,
23,
198,
6738,
11593,
37443,
834,
1330,
7297,
11,
4112,
62,
11748,
11,
351,
62,
26090,
11,
3601,
62,
8818,
198,
11748,
7007,
628,
198,
4299,
4321,
62,
7753,
7,
6371,
11,
2393,
62,
6978,
11,
42287,
28,
... | 2.353357 | 283 |
from twisted_fate import __version__
| [
6738,
19074,
62,
69,
378,
1330,
11593,
9641,
834,
628
] | 3.8 | 10 |
import os
from wyriwyd.executor import ShellExecutor
| [
11748,
28686,
198,
6738,
266,
88,
380,
86,
5173,
13,
18558,
38409,
1330,
17537,
23002,
38409,
628,
198
] | 3.055556 | 18 |
import os
curdir = os.path.dirname(__file__)
datadir = os.path.join(curdir, 'data')
def load_telescope_parameters(version, **kwargs):
"""
Utility script to load the telescope parameters
version = 0: Pre-design version (to compare with Rick's stuff)
version = 1: 210 mm design
version = 2: 300 mm... | [
11748,
28686,
628,
198,
66,
2799,
343,
796,
28686,
13,
6978,
13,
15908,
3672,
7,
834,
7753,
834,
8,
198,
19608,
324,
343,
796,
28686,
13,
6978,
13,
22179,
7,
66,
2799,
343,
11,
705,
7890,
11537,
628,
198,
4299,
3440,
62,
37524,
37... | 2.115247 | 5,293 |
from collada_wt.collada_wt import create_turbine | [
6738,
2927,
4763,
62,
46569,
13,
26000,
4763,
62,
46569,
1330,
2251,
62,
83,
5945,
500
] | 3 | 16 |
from typing import Dict
import tensorflow as tf
from model.position_encoding import build_position_encoding
| [
6738,
19720,
1330,
360,
713,
201,
198,
11748,
11192,
273,
11125,
355,
48700,
201,
198,
201,
198,
6738,
2746,
13,
9150,
62,
12685,
7656,
1330,
1382,
62,
9150,
62,
12685,
7656,
201,
198,
201,
198,
201,
198,
201,
198,
201
] | 3 | 40 |
from django.urls import re_path
from . import views
urlpatterns = [
re_path(r'^$', views.Home.as_view(), name='geopost_home'),
re_path(r'^entry/$', views.Entry.as_view(), name='geopost_entry'),
re_path(r'^photo/(?P<entry_uuid>[0-9A-Fa-f-]+)$',
views.photo,
name="geopost_... | [
6738,
42625,
14208,
13,
6371,
82,
1330,
302,
62,
6978,
198,
6738,
764,
1330,
5009,
198,
198,
6371,
33279,
82,
796,
685,
198,
220,
220,
220,
220,
220,
220,
220,
302,
62,
6978,
7,
81,
6,
61,
3,
3256,
5009,
13,
16060,
13,
292,
62,
... | 2.034483 | 232 |
from depto import departamento
import psycopg2
#except ValueError:
# print('Valor não encontrado.')
#except psycopg2.Error as e:
# print(e.pgerror)
| [
6738,
390,
457,
78,
1330,
6313,
3263,
78,
198,
11748,
17331,
22163,
70,
17,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
16341,
11052,
12331,
25,
198,
220,
220,
220,
220,
220,
220,
220,
1303,
220,
220,
220,
3601,
10786,
7762,
273,
... | 2.043956 | 91 |
__version__ = "0.51.1"
__version_info__ = tuple(__version__.split("."))
| [
834,
9641,
834,
796,
366,
15,
13,
4349,
13,
16,
1,
198,
834,
9641,
62,
10951,
834,
796,
46545,
7,
834,
9641,
834,
13,
35312,
7203,
526,
4008,
198
] | 2.482759 | 29 |
#!/usr/bin/env python
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
628,
628,
628,
198
] | 2.333333 | 12 |
from setuptools import setup
import fabrant
version = fabrant.__version__
setup(
name='fabrant',
version=version,
description="Easy handling of vagrant hosts within fabric",
long_description=open("README.rst").read(),
author='Fabian Schindler',
author_email='fabian.schindler@eox.at',
lic... | [
6738,
900,
37623,
10141,
1330,
9058,
198,
198,
11748,
7843,
5250,
198,
198,
9641,
796,
7843,
5250,
13,
834,
9641,
834,
628,
198,
40406,
7,
198,
220,
220,
220,
1438,
11639,
36434,
5250,
3256,
198,
220,
220,
220,
2196,
28,
9641,
11,
1... | 2.716475 | 261 |
# tests for lab06, UCSB, CMPSC 8, Summer 2017
# Instructor: P. Conrad
# Student(s): (insert name here)
# @@@ This next function has an error. Can you fix it?
# @@@ Hint: you might need to use the "and" or "or" keywords of python
# @@@ and modify the if test.
def notStringContainingE(word):
"""
return True when... | [
2,
5254,
329,
2248,
3312,
11,
49553,
33,
11,
16477,
3705,
34,
807,
11,
10216,
2177,
198,
2,
47839,
25,
350,
13,
39708,
198,
2,
13613,
7,
82,
2599,
357,
28463,
1438,
994,
8,
198,
198,
2,
2488,
12404,
770,
1306,
2163,
468,
281,
40... | 3.226859 | 1,869 |
from functools import partial
import json
from unittest import TestCase
from requests import HTTPError
import responses
from tamr_unify_client import Client
from tamr_unify_client.auth import UsernamePasswordAuth
from tamr_unify_client.categorization.category.collection import CategoryCollection
from tamr_unify_clien... | [
6738,
1257,
310,
10141,
1330,
13027,
198,
11748,
33918,
198,
6738,
555,
715,
395,
1330,
6208,
20448,
198,
198,
6738,
7007,
1330,
14626,
12331,
198,
11748,
9109,
198,
198,
6738,
21885,
81,
62,
403,
1958,
62,
16366,
1330,
20985,
198,
6738... | 3.847328 | 131 |
#==========================================================================
#
# Copyright Insight Software Consortium
#
# 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... | [
2,
23926,
2559,
855,
198,
2,
198,
2,
220,
220,
15069,
39917,
10442,
42727,
198,
2,
198,
2,
220,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
220,
220,
345,
743,
407,
779,
428,
... | 2.911871 | 556 |
x = int(input())
y = int(input())
if x > y:
x, y = y, x
soma = 0
for i in range(x+1, y, 1):
if i%2 != 0:
soma += i
print(soma) | [
87,
796,
493,
7,
15414,
28955,
198,
88,
796,
493,
7,
15414,
28955,
198,
198,
361,
2124,
1875,
331,
25,
198,
220,
220,
220,
2124,
11,
331,
796,
331,
11,
2124,
198,
198,
82,
6086,
796,
657,
198,
1640,
1312,
287,
2837,
7,
87,
10,
... | 1.790123 | 81 |
from django.db import models
from cloudinary.models import CloudinaryField
from django.contrib.auth.models import User
# Create your models here.
| [
6738,
42625,
14208,
13,
9945,
1330,
4981,
198,
6738,
6279,
3219,
13,
27530,
1330,
10130,
3219,
15878,
198,
6738,
42625,
14208,
13,
3642,
822,
13,
18439,
13,
27530,
1330,
11787,
198,
198,
2,
13610,
534,
4981,
994,
13,
628,
220,
220,
22... | 3.477273 | 44 |
from fastapi import FastAPI
from fastapi.responses import FileResponse
app = FastAPI()
@app.get("/") | [
6738,
3049,
15042,
1330,
12549,
17614,
198,
6738,
3049,
15042,
13,
16733,
274,
1330,
9220,
31077,
198,
198,
1324,
796,
12549,
17614,
3419,
628,
198,
31,
1324,
13,
1136,
7203,
14,
4943
] | 3.21875 | 32 |
from rest_framework.serializers import ModelSerializer
from article_comment.models import ArticleComment
from myuser.serializers import TempUserListSerializer
| [
6738,
1334,
62,
30604,
13,
46911,
11341,
1330,
9104,
32634,
7509,
198,
198,
6738,
2708,
62,
23893,
13,
27530,
1330,
10172,
21357,
198,
6738,
616,
7220,
13,
46911,
11341,
1330,
24189,
12982,
8053,
32634,
7509,
628,
628
] | 4.405405 | 37 |
'''
promt translate for free as in beer
'''
from typing import Any, Callable, Dict, Tuple
import sys
import logging
import json
from time import time
from random import randint
import pytest # type: ignore
# import mock
import urllib3
from ratelimit import limits, sleep_and_retry # type: ignore
import requests
fro... | [
7061,
6,
198,
16963,
83,
15772,
329,
1479,
355,
287,
6099,
198,
7061,
6,
198,
198,
6738,
19720,
1330,
4377,
11,
4889,
540,
11,
360,
713,
11,
309,
29291,
198,
198,
11748,
25064,
198,
11748,
18931,
198,
11748,
33918,
198,
6738,
640,
1... | 2.186776 | 2,934 |
import argparse
import json
from collections import defaultdict
from typing import Dict, List
if __name__ == "__main__":
main()
| [
11748,
1822,
29572,
198,
11748,
33918,
198,
6738,
17268,
1330,
4277,
11600,
198,
6738,
19720,
1330,
360,
713,
11,
7343,
628,
628,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
1388,
3419,
198
] | 3.4 | 40 |
from os import path,makedirs
from urllib.request import urlretrieve
def static_download(model):
'''
Download static gravity modle from icgem.gfz-potsdam.de; if the file to be downloaded is already included in the download directory, the download is automatically skipped.
Usage:
static_download('... | [
6738,
28686,
1330,
3108,
11,
76,
4335,
17062,
198,
6738,
2956,
297,
571,
13,
25927,
1330,
19016,
1186,
30227,
198,
198,
4299,
9037,
62,
15002,
7,
19849,
2599,
220,
198,
220,
220,
220,
705,
7061,
198,
220,
220,
220,
10472,
9037,
13522,... | 2.254213 | 712 |
# -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2017-01-31 04:19
from __future__ import unicode_literals
from django.db import migrations
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2980,
515,
416,
37770,
352,
13,
940,
13,
19,
319,
2177,
12,
486,
12,
3132,
8702,
25,
1129,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
1... | 2.690909 | 55 |
__author__ = 'justinarmstrong'
| [
834,
9800,
834,
796,
705,
3137,
259,
1670,
11576,
6,
198
] | 2.818182 | 11 |
from agent import Agent
| [
6738,
5797,
1330,
15906,
628
] | 5 | 5 |
import sys
sys.path.append('/home/pavlis/src/mspass/python')
from mspasspy.ccore import CoreSeismogram
d=CoreSeismogram(200)
d.put_double('delta',1.0)
d.put_double('dt',1.0)
d.put('npts',200)
d.ns=200
d.t0=100.0
d.live=True
from mspasspy.ccore import Seismogram
d2=Seismogram(d,'invalid')
import pickle
x=pickle.dumps(d2... | [
11748,
25064,
198,
17597,
13,
6978,
13,
33295,
10786,
14,
11195,
14,
79,
615,
27999,
14,
10677,
14,
907,
6603,
14,
29412,
11537,
198,
6738,
285,
2777,
562,
9078,
13,
535,
382,
1330,
7231,
4653,
1042,
21857,
198,
67,
28,
14055,
4653,
... | 2.453883 | 412 |
from __future__ import division
#from sys import path
#path.append('modules/')
import os.path
import click
import h5py
from argparse import ArgumentParser
from math import pi, log10
import sys
from scidata.utils import locate
import scidata.carpet.hdf5 as h5
from scidata.carpet.interp import Interpolator
import numpy a... | [
6738,
11593,
37443,
834,
1330,
7297,
198,
2,
6738,
25064,
1330,
3108,
198,
2,
6978,
13,
33295,
10786,
18170,
14,
11537,
198,
11748,
28686,
13,
6978,
198,
11748,
3904,
198,
11748,
289,
20,
9078,
198,
6738,
1822,
29572,
1330,
45751,
46677... | 2.319457 | 3,387 |
import numpy as np
import tensorflow as tf
import matplotlib.pyplot as plt
from torch import nn
import torch
| [
11748,
299,
32152,
355,
45941,
198,
11748,
11192,
273,
11125,
355,
48700,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
198,
6738,
28034,
1330,
299,
77,
198,
11748,
28034,
198
] | 3.235294 | 34 |
from .exipicrename import *
| [
6738,
764,
1069,
541,
291,
918,
480,
1330,
1635,
198
] | 2.8 | 10 |
from Algorithims import Algorithms
import time
import threading
| [
6738,
978,
7727,
12078,
1330,
978,
7727,
907,
198,
11748,
640,
198,
11748,
4704,
278,
628
] | 4.0625 | 16 |
#extract_ml_features.py
import emoji, re, os, time, sys
from gensim.models import LdaModel
from gensim.corpora import MmCorpus, Dictionary
from isc_tokenizer import Tokenizer
from isc_tagger import Tagger
from tqdm import tqdm
import vocab_helpers as helper
import utils
import pre_processing as dproc
from nltk import n... | [
2,
2302,
974,
62,
4029,
62,
40890,
13,
9078,
198,
11748,
44805,
11,
302,
11,
28686,
11,
640,
11,
25064,
198,
6738,
308,
641,
320,
13,
27530,
1330,
406,
6814,
17633,
198,
6738,
308,
641,
320,
13,
10215,
38851,
1330,
337,
76,
45680,
... | 1.867227 | 595 |
from flask import Flask
| [
6738,
42903,
1330,
46947,
628
] | 5 | 5 |
# Chunk
# Write to chunk
# Add constant to chunk | [
2,
609,
2954,
198,
198,
2,
19430,
284,
16058,
198,
198,
2,
3060,
6937,
284,
16058
] | 3.125 | 16 |
#
# Copyright 2018-2022 Elyra Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | [
2,
198,
2,
15069,
2864,
12,
1238,
1828,
45913,
430,
46665,
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,
137... | 3.537778 | 225 |
import os
import pandas as pd
from collections import OrderedDict
import cv2
import numpy as np
import json
gt_data_path = "/home/priv-lab1/workspace/zxh/end2/csv/anno_box_train.csv"
hoi_list_path = "/home/priv-lab1/workspace/zxh/end2/origin_lists/hico_list_hoi.txt"
img_path = '/home/priv-lab1/workspace/zxh/My_Databas... | [
11748,
28686,
198,
11748,
19798,
292,
355,
279,
67,
198,
6738,
17268,
1330,
14230,
1068,
35,
713,
198,
11748,
269,
85,
17,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
33918,
198,
13655,
62,
7890,
62,
6978,
796,
220,
12813,
11195,
... | 2.179936 | 1,256 |
from multiprocessing import cpu_count
from multiprocessing.pool import Pool
from tqdm import tqdm
def pool_process(func, iterable, cpus=cpu_count(), return_vals=False, cpu_reduction=0, progress_bar=False):
"""
Multiprocessing helper function for performing looped operation using multiple processors.
:par... | [
6738,
18540,
305,
919,
278,
1330,
42804,
62,
9127,
198,
6738,
18540,
305,
919,
278,
13,
7742,
1330,
19850,
198,
6738,
256,
80,
36020,
1330,
256,
80,
36020,
628,
198,
4299,
5933,
62,
14681,
7,
20786,
11,
11629,
540,
11,
31396,
385,
2... | 2.459108 | 538 |
import numpy as np
from laplace import laplace_mech
def noisy_max(answers: np.ndarray, epsilon: float, sensitivity: float):
""" Implementation of the noisy max mechanism with gap using Laplace noise
Given a set of queries, this mechanism will return the **index**, not the
value, of the query that is prob... | [
11748,
299,
32152,
355,
45941,
198,
6738,
8591,
5372,
1330,
8591,
5372,
62,
1326,
354,
628,
198,
4299,
31210,
62,
9806,
7,
504,
86,
364,
25,
45941,
13,
358,
18747,
11,
304,
862,
33576,
25,
12178,
11,
14233,
25,
12178,
2599,
198,
220... | 3.100503 | 199 |
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
import unittest
from dynamic_atss_core.utils.metric_logger import MetricLogger
if __name__ == "__main__":
unittest.main()
| [
2,
15069,
357,
66,
8,
3203,
11,
3457,
13,
290,
663,
29116,
13,
1439,
6923,
33876,
13,
198,
11748,
555,
715,
395,
198,
198,
6738,
8925,
62,
265,
824,
62,
7295,
13,
26791,
13,
4164,
1173,
62,
6404,
1362,
1330,
3395,
1173,
11187,
136... | 2.970588 | 68 |
import argparse
import pygame
import sys
from nes import Controller
from screen import Screen
from fps import FPS
from tas import TAS
from emulator import Emulator
if __name__ == "__main__":
parser = argparse.ArgumentParser(
description = 'Dumps NES header information')
parser.add_argument('pathna... | [
198,
11748,
1822,
29572,
198,
11748,
12972,
6057,
198,
11748,
25064,
198,
6738,
299,
274,
1330,
22741,
198,
6738,
3159,
1330,
15216,
198,
6738,
32977,
1330,
22082,
198,
6738,
256,
292,
1330,
309,
1921,
198,
6738,
38274,
1330,
2295,
8927,
... | 2 | 1,112 |
# Copyright (C) 2016 MediaMath <http://www.mediamath.com>
#
# 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,
357,
34,
8,
1584,
6343,
37372,
1279,
4023,
1378,
2503,
13,
1150,
1789,
776,
13,
785,
29,
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,
... | 3.809249 | 173 |
# -*- coding: UTF-8 -*-
from pyramid.i18n import get_localizer, TranslationStringFactory
from pyramid.view import view_config
from pyramid.response import Response
from c2cgeoportal_commons.models import DBSessions, DBSession
import logging
import owncloud
import shutil
import os
import smtplib
import urllib.request
f... | [
171,
119,
123,
2,
532,
9,
12,
19617,
25,
41002,
12,
23,
532,
9,
12,
198,
6738,
27944,
13,
72,
1507,
77,
1330,
651,
62,
12001,
7509,
11,
33322,
10100,
22810,
198,
6738,
27944,
13,
1177,
1330,
1570,
62,
11250,
198,
6738,
27944,
13,
... | 3.222222 | 153 |
from urlScanner import UrlScanner | [
6738,
19016,
33351,
1008,
1330,
8799,
75,
33351,
1008
] | 3.666667 | 9 |
"""
Custom exceptions for the License Manager Agent.
"""
from buzz import Buzz
class LicenseManagerAuthTokenError(Buzz):
"""Exception for backend connection issues."""
class LicenseManagerBackendConnectionError(Buzz):
"""Exception for backend connection issues."""
class LicenseManagerBackendVersionError(... | [
37811,
198,
15022,
13269,
329,
262,
13789,
9142,
15906,
13,
198,
37811,
198,
198,
6738,
14713,
1330,
15753,
628,
198,
4871,
13789,
13511,
30515,
30642,
12331,
7,
48230,
2599,
198,
220,
220,
220,
37227,
16922,
329,
30203,
4637,
2428,
526,
... | 4.150289 | 173 |
import dask as da
from raptor.momentum import (
KAMAIndicator,
ROCIndicator,
RSIIndicator,
StochasticOscillator,
StochRSIIndicator,
)
from raptor.trend import (
MACD,
ADXIndicator,
AroonIndicator,
EMAIndicator,
SMAIndicator,
TRIXIndicat... | [
11748,
288,
2093,
355,
12379,
198,
198,
6738,
38404,
273,
13,
32542,
298,
388,
1330,
357,
198,
220,
220,
220,
220,
198,
220,
220,
220,
509,
25087,
5497,
26407,
11,
198,
220,
220,
220,
220,
198,
220,
220,
220,
371,
4503,
5497,
26407,... | 2.072519 | 262 |
# %% [209. Minimum Size Subarray Sum](https://leetcode.com/problems/minimum-size-subarray-sum/)
| [
2,
43313,
685,
22567,
13,
26265,
12849,
3834,
18747,
5060,
16151,
5450,
1378,
293,
316,
8189,
13,
785,
14,
1676,
22143,
14,
39504,
12,
7857,
12,
7266,
18747,
12,
16345,
34729,
198
] | 3 | 32 |
import argparse
import datetime
import glob
import os
from pathlib import Path
from test import repeat_eval_ckpt
import tqdm
import torch
import torch.distributed as dist
import torch.nn as nn
from tensorboardX import SummaryWriter
from pcdet.config import cfg, cfg_from_list, cfg_from_yaml_file, log_config_to_file
fr... | [
11748,
1822,
29572,
198,
11748,
4818,
8079,
198,
11748,
15095,
198,
11748,
28686,
198,
6738,
3108,
8019,
1330,
10644,
198,
6738,
1332,
1330,
9585,
62,
18206,
62,
694,
457,
198,
198,
11748,
256,
80,
36020,
198,
11748,
28034,
198,
11748,
... | 3.015464 | 194 |
# -*-coding:utf-8 -*
# Copyright (c) 2011-2015, Intel Corporation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, thi... | [
2,
532,
9,
12,
66,
7656,
25,
40477,
12,
23,
532,
9,
198,
198,
2,
15069,
357,
66,
8,
2813,
12,
4626,
11,
8180,
10501,
198,
2,
1439,
2489,
10395,
13,
198,
2,
198,
2,
2297,
396,
3890,
290,
779,
287,
2723,
290,
13934,
5107,
11,
... | 3.536437 | 494 |
import sys
import math
import numpy as np
if __name__ == "__main__":
# We're using 70% of the data for training
TRAIN_SPLIT = 0.8
GENDER_MALE = 1
GENDER_FEMALE = 0
alpha = 0.54
X_train = None
Y_train = None
X_validation = None
Y_validation = None
X_test = None
Y_tes... | [
11748,
25064,
198,
11748,
10688,
198,
11748,
299,
32152,
355,
45941,
628,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
1303,
775,
821,
1262,
4317,
4,
286,
262,
1366,
329,
3047,
198,
220,
... | 2.165625 | 640 |
# Generated by Django 3.1.6 on 2021-02-15 14:56
from django.db import migrations, models
| [
2,
2980,
515,
416,
37770,
513,
13,
16,
13,
21,
319,
33448,
12,
2999,
12,
1314,
1478,
25,
3980,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
628
] | 2.84375 | 32 |
import jinja2
import aiohttp_jinja2
import urllib.parse as up
import asyncpg
from aiohttp import web
from .routes import setup_routes
from .config import config_obj as config
| [
11748,
474,
259,
6592,
17,
198,
11748,
257,
952,
4023,
62,
18594,
6592,
17,
198,
11748,
2956,
297,
571,
13,
29572,
355,
510,
198,
11748,
30351,
6024,
198,
198,
6738,
257,
952,
4023,
1330,
3992,
198,
198,
6738,
764,
81,
448,
274,
133... | 3 | 60 |
"""
This file has been auto-generated by pydantic.
TODO: Maybe some fields should be renamed or the architecture should be changed a bit
"""
from __future__ import annotations
from typing import List, Optional
from pydantic import BaseModel, Field
| [
37811,
198,
1212,
2393,
468,
587,
8295,
12,
27568,
416,
279,
5173,
5109,
13,
198,
51,
3727,
46,
25,
6674,
617,
7032,
815,
307,
25121,
393,
262,
10959,
815,
307,
3421,
257,
1643,
198,
37811,
198,
198,
6738,
11593,
37443,
834,
1330,
3... | 3.760563 | 71 |