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/python
# -*- coding: utf-8 -*-
#####DONT CHANGE THIS########
######################
### Script By TRHACKNOnimous
### www.memanon.ml
### Don't Change This.!!!
######################
import os
import sys
os.system("clear")
os.system("mkdir TRHACKNOnimous")
os.system("mv TRHACKNOnimous/ /storage/emulated/0/")
o... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
4242,
2,
35,
35830,
5870,
27746,
12680,
7804,
198,
14468,
4242,
2235,
198,
21017,
12327,
2750,
7579,
39,
8120,
45,
2202,
320,
... | 2.710438 | 297 |
from django_filters import rest_framework as filters
from .models import Event
| [
6738,
42625,
14208,
62,
10379,
1010,
1330,
1334,
62,
30604,
355,
16628,
198,
198,
6738,
764,
27530,
1330,
8558,
628
] | 4.05 | 20 |
# coding=utf-8
# 实现主要思路
# 1. 获取网页教程的内容
# 2. 获取主页当中的ul-list
# 3. 根据获取的ul-list 当中的a 不断发送请求,获取数据,并写入
import os
import logging
import requests
import pickle
from weasyprint import HTML
from bs4 import BeautifulSoup
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import Des... | [
2,
19617,
28,
40477,
12,
23,
201,
198,
201,
198,
2,
10263,
106,
252,
163,
236,
108,
10310,
119,
17358,
223,
45250,
251,
164,
115,
107,
201,
198,
2,
352,
13,
5525,
236,
115,
20998,
244,
163,
121,
239,
165,
94,
113,
46763,
247,
16... | 1.579566 | 2,809 |
# -*- coding: utf-8 -*-
from django.conf.urls import url,patterns,include #antes: from django.conf.urls import url,patterns
from django.views.generic import TemplateView
from django.contrib import admin
from django.conf import settings
from . import views
from haystack.query import SearchQuerySet
from haystack.views... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
19016,
11,
33279,
82,
11,
17256,
1303,
39781,
25,
422,
42625,
14208,
13,
10414,
13,
6371,
82,
1330,
19016,
11,
... | 2.305567 | 4,922 |
from .base import (
BetaFromHits,
Categorical,
LogNormalFromInterval,
NormalFromInterval,
bernoulli,
beta,
beta_from_hits,
categorical,
flip,
halfnormal,
halfnormal_from_interval,
lognormal,
lognormal_from_interval,
normal,
normal_from_interval,
random_cho... | [
6738,
764,
8692,
1330,
357,
198,
220,
220,
220,
17993,
4863,
39,
896,
11,
198,
220,
220,
220,
327,
2397,
12409,
11,
198,
220,
220,
220,
5972,
26447,
4863,
9492,
2100,
11,
198,
220,
220,
220,
14435,
4863,
9492,
2100,
11,
198,
220,
... | 2.617647 | 204 |
#!/usr/bin/python
#
# -*- coding: utf-8 -*-
# Copyright 2020 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#############################################
# WARNING #
#############################################
#
# This file is ... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
15069,
12131,
2297,
10983,
198,
2,
22961,
3611,
5094,
13789,
410,
18,
13,
15,
10,
198,
2,
357,
3826,
27975,
457... | 2.009593 | 17,305 |
from django.dispatch import Signal
user_logged_in = Signal(providing_args=['instance', 'request'])
| [
6738,
42625,
14208,
13,
6381,
17147,
1330,
26484,
198,
7220,
62,
6404,
2004,
62,
259,
796,
26484,
7,
15234,
2530,
62,
22046,
28,
17816,
39098,
3256,
705,
25927,
6,
12962,
198
] | 3.193548 | 31 |
import demistomock as demisto # noqa
import ExpanseAggregateAttributionIP
INPUT = [
{"src": "1.1.1.1", "count": 2},
{"src_ip": "8.8.8.8"},
{"src": "8.8.8.8", "count": 10}
]
CURRENT = [
{"ip": "1.1.1.1", "sightings": 1, "internal": False}
]
RESULT = [
{"ip": "1.1.1.1", "sightings": 3, "internal... | [
11748,
1357,
396,
296,
735,
355,
1357,
396,
78,
220,
1303,
645,
20402,
198,
198,
11748,
5518,
40054,
46384,
49373,
8086,
3890,
4061,
628,
198,
1268,
30076,
796,
685,
198,
220,
220,
220,
19779,
10677,
1298,
366,
16,
13,
16,
13,
16,
1... | 2.319415 | 479 |
import tensorflow.keras as keras
import tensorflow as tf
| [
11748,
11192,
273,
11125,
13,
6122,
292,
355,
41927,
292,
198,
11748,
11192,
273,
11125,
355,
48700,
198
] | 3.166667 | 18 |
from .case_decorators import *
| [
6738,
764,
7442,
62,
12501,
273,
2024,
1330,
1635,
198
] | 3.1 | 10 |
#!/usr/bin/python
#
#
#
#
# Kim Brugger (21 Oct 2015), contact: kbr@brugger.dk
import sys
import os
import pprint
pp = pprint.PrettyPrinter(indent=4)
import re
FLANK = 500
NR_PRIMERS = 4
ALLOWED_MISMATCHES = 4
MAX_MAPPINGS = 5
MAX_PRODUCT_SIZE = 800
MIN_PRODUCT_SIZE = 120
s... | [
2,
48443,
14629,
14,
8800,
14,
29412,
220,
198,
2,
220,
198,
2,
220,
198,
2,
220,
198,
2,
220,
198,
2,
6502,
8274,
26679,
357,
2481,
2556,
1853,
828,
2800,
25,
479,
1671,
31,
65,
622,
26679,
13,
34388,
198,
198,
11748,
25064,
19... | 2.231707 | 410 |
"""Sensor platform for Kaleidescape integration."""
from __future__ import annotations
from dataclasses import dataclass
from typing import TYPE_CHECKING
from homeassistant.components.sensor import SensorEntity, SensorEntityDescription
from homeassistant.const import PERCENTAGE
from homeassistant.helpers.entity impo... | [
37811,
47864,
3859,
329,
509,
1000,
1460,
36435,
11812,
526,
15931,
198,
198,
6738,
11593,
37443,
834,
1330,
37647,
198,
198,
6738,
4818,
330,
28958,
1330,
4818,
330,
31172,
198,
6738,
19720,
1330,
41876,
62,
50084,
2751,
198,
198,
6738,
... | 2.559787 | 2,626 |
#!/usr/bin/env python3
# Copyright (C) 2017 - 2020 Alexandre Teyar
# 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 applic... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
2,
220,
220,
220,
15069,
357,
34,
8,
2177,
532,
12131,
21000,
260,
1665,
88,
283,
198,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
153... | 2.354677 | 3,186 |
#===========================================
# import modules, defs and variables
#===========================================
exec(open("./external.py").read())
exec(open("./defs.py").read())
exec(open("./config.py").read())
print('Finish modules, defs and variables import')
#========================================... | [
2,
10052,
2559,
18604,
198,
2,
1330,
13103,
11,
825,
82,
290,
9633,
198,
2,
10052,
2559,
18604,
198,
18558,
7,
9654,
7,
1911,
14,
22615,
13,
9078,
11074,
961,
28955,
198,
18558,
7,
9654,
7,
1911,
14,
4299,
82,
13,
9078,
11074,
961... | 2.676331 | 1,690 |
# coding: utf-8
""" Utility functions for Spectroscopy Made Hard """
__author__ = "Andy Casey <andy@astrowizici.st>"
# Standard library
import os
import logging
import platform
import string
import sys
import traceback
import tempfile
from six import string_types
from collections import Counter, OrderedDict
try:
... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
37811,
34030,
5499,
329,
13058,
45943,
11081,
14446,
6912,
37227,
198,
198,
834,
9800,
834,
796,
366,
35314,
21097,
1279,
10757,
31,
459,
808,
528,
44070,
13,
301,
24618,
198,
198,
2,
8997,
... | 2.041178 | 15,008 |
# -*- coding: utf-8 -*-
"""
Created on Sat May 18 16:04:58 2019
@author: Admin
"""
# -*- coding: utf-8 -*-
"""
Created on Mon July 8 17:30:45 2019
@author: Admin
"""
import pandas as pd
import numpy as np
# reading data
order_products_prior_df = pd.read_csv('order_products_prior.csv',... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
37811,
201,
198,
41972,
319,
7031,
1737,
1248,
1467,
25,
3023,
25,
3365,
13130,
201,
198,
201,
198,
31,
9800,
25,
32053,
201,
198,
37811,
201,
198,
201,
198,
2,
... | 2.196841 | 5,192 |
import copy
testfile = "day8_test_input.txt"
testdata = load_input_file(testfile)
todaylist = load_input_file("day8input.txt")
part1 = run_commands(todaylist)[0]
print("part1:", part1)
part2 = alter_commands(todaylist)
print("part2:", part2)
| [
11748,
4866,
198,
198,
9288,
7753,
796,
366,
820,
23,
62,
9288,
62,
15414,
13,
14116,
1,
628,
628,
198,
9288,
7890,
796,
3440,
62,
15414,
62,
7753,
7,
9288,
7753,
8,
628,
628,
628,
198,
40838,
4868,
796,
3440,
62,
15414,
62,
7753,... | 2.581633 | 98 |
Frutas_favoritas = ["Mangos", "Manzanas", "Bananas"]
if("Mangos" in Frutas_favoritas):
print("La neta si me gustan mucho los Manguitos")
if("Cocos" in Frutas_favoritas):
print("En verdad me agradan los cocos")
if("Manzanas" in Frutas_favoritas):
print("Me gustan mucho las manzanas")
if("Kiwis" in Frutas... | [
6732,
315,
292,
62,
69,
5570,
21416,
796,
14631,
44,
648,
418,
1600,
366,
5124,
15201,
292,
1600,
366,
30457,
15991,
8973,
198,
198,
361,
7203,
44,
648,
418,
1,
287,
1305,
315,
292,
62,
69,
5570,
21416,
2599,
198,
220,
220,
220,
3... | 2.329843 | 191 |
import sqlite3
import requests
import json
import time
"""
Input: doc from zhilian_doc.db
Aim:
get the entities/knowledges in the doc.
store them into entites.json/knowledges.json
entities.json:
{
'name+position':List(entities),
}
konwledges.json:
{
'entity':[
['relation', 'entity'],
..... | [
11748,
44161,
578,
18,
198,
11748,
7007,
198,
11748,
33918,
198,
11748,
640,
198,
37811,
198,
20560,
25,
2205,
422,
1976,
71,
35824,
62,
15390,
13,
9945,
198,
49945,
25,
198,
220,
220,
220,
651,
262,
12066,
14,
16275,
992,
3212,
287,
... | 2.361179 | 407 |
# Generated by Django 2.2.16 on 2021-04-16 19:46
from django.db import migrations
| [
2,
2980,
515,
416,
37770,
362,
13,
17,
13,
1433,
319,
33448,
12,
3023,
12,
1433,
678,
25,
3510,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
628,
198
] | 2.741935 | 31 |
"""
Tests for the Cudnn code.
"""
__author__ = "Francesco Visin"
__license__ = "3-clause BSD"
__credits__ = "Francesco Visin"
__maintainer__ = "Lisa Lab"
import theano
from theano import tensor
from theano.sandbox.cuda.dnn import dnn_available
from pylearn2.linear.conv2d import Conv2D
from pylearn2.linear.cudnn2d im... | [
37811,
198,
51,
3558,
329,
262,
327,
463,
20471,
2438,
13,
198,
37811,
198,
198,
834,
9800,
834,
796,
366,
6732,
1817,
1073,
6911,
259,
1,
198,
834,
43085,
834,
796,
366,
18,
12,
565,
682,
347,
10305,
1,
198,
834,
66,
20696,
834,
... | 2.047764 | 2,952 |
import http.client
import logging
import math
import os
from dataclasses import dataclass
from enum import Enum
from hashlib import md5
from urllib.parse import urlparse
MAX_PAGE_SIZE = 1000
MIN_PART_SIZE = 5 * 1024 * 1024
UPLOAD_BASE_URL = 'upload.jwplayer.com'
MAX_FILE_SIZE = 25 * 1000 * 1024 * 1024
class UploadTy... | [
11748,
2638,
13,
16366,
198,
11748,
18931,
198,
11748,
10688,
198,
11748,
28686,
198,
6738,
4818,
330,
28958,
1330,
4818,
330,
31172,
198,
6738,
33829,
1330,
2039,
388,
198,
6738,
12234,
8019,
1330,
45243,
20,
198,
6738,
2956,
297,
571,
... | 2.488643 | 1,717 |
# -*- coding:ascii -*-
from mako import runtime, filters, cache
UNDEFINED = runtime.UNDEFINED
__M_dict_builtin = dict
__M_locals_builtin = locals
_magic_number = 10
_modified_time = 1425177385.390867
_enable_loop = True
_template_filename = '/Users/Nate/chf_dmp/account/templates/users.html'
_template_uri = 'users.html... | [
2,
532,
9,
12,
19617,
25,
292,
979,
72,
532,
9,
12,
198,
6738,
285,
25496,
1330,
19124,
11,
16628,
11,
12940,
198,
198,
4944,
7206,
20032,
1961,
796,
19124,
13,
4944,
7206,
20032,
1961,
198,
834,
44,
62,
11600,
62,
18780,
259,
796... | 2.338323 | 334 |
from marshmallow import fields, Schema
from marshmallow_sqlalchemy import SQLAlchemyAutoSchema, ModelSchema
from models import Saved_Posts, Post_Likes, User_Following, User, Post_Info, Post, Post_Tags, Comment_Likes, Reply_Likes
from sqlalchemy import and_
from .utilities import cleanhtml
import re
from app import db
... | [
6738,
22397,
42725,
1330,
7032,
11,
10011,
2611,
198,
6738,
22397,
42725,
62,
25410,
282,
26599,
1330,
16363,
2348,
26599,
27722,
27054,
2611,
11,
9104,
27054,
2611,
198,
6738,
4981,
1330,
8858,
276,
62,
21496,
11,
2947,
62,
43,
7938,
1... | 3.392523 | 107 |
import paramiko
from time import sleep
import os
| [
11748,
5772,
12125,
198,
6738,
640,
1330,
3993,
198,
11748,
28686,
198,
220,
220,
220,
220,
220,
220,
220,
220
] | 2.85 | 20 |
'''This module manages all user endpoints(signup, login, logout etc)'''
from flask import jsonify, make_response
from flask_restful import Resource
from werkzeug.security import generate_password_hash
from .resources import Initialize
from ..models.user import User
from ..utils.users import Validation
class Signup(R... | [
7061,
6,
1212,
8265,
15314,
477,
2836,
886,
13033,
7,
12683,
929,
11,
17594,
11,
2604,
448,
3503,
8,
7061,
6,
198,
6738,
42903,
1330,
33918,
1958,
11,
787,
62,
26209,
198,
6738,
42903,
62,
2118,
913,
1330,
20857,
198,
6738,
266,
958... | 2.724409 | 381 |
import torch
import wandb
from Trainer import Trainer
MAX_SUMMARY_IMAGES = 4
DEVICE = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
assert torch.cuda.is_available()
# LR = 2e-4
EPOCHS = 100
# BATCH_SIZE = 64
NUM_WORKERS = 4
# LAMBDA_L1 = 100
sweep_config = {
'method': 'bayes', # grid, random
... | [
11748,
28034,
198,
11748,
11569,
65,
198,
198,
6738,
31924,
1330,
31924,
198,
198,
22921,
62,
50,
5883,
44,
13153,
62,
3955,
25552,
796,
604,
198,
198,
7206,
27389,
796,
28034,
13,
25202,
10786,
66,
15339,
6,
611,
28034,
13,
66,
15339... | 1.974811 | 397 |
# -*- test-case-name: twisted.test.test_persisted -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Different styles of persisted objects.
"""
# System Imports
import types
import copy_reg
import copy
import inspect
import sys
try:
import cStringIO as StringIO
except ImportError:
... | [
2,
532,
9,
12,
1332,
12,
7442,
12,
3672,
25,
19074,
13,
9288,
13,
9288,
62,
19276,
6347,
532,
9,
12,
198,
2,
15069,
357,
66,
8,
40006,
24936,
46779,
13,
198,
2,
4091,
38559,
24290,
329,
3307,
13,
628,
198,
198,
37811,
198,
40341... | 2.395916 | 3,281 |
from django.urls import path
from . import views
urlpatterns = [
path('example/', views.ExampleListView.as_view(), name='example_list'),
path('example/create', views.ExampleCreateView.as_view(), name='example_create'),
path('example/<int:pk>/update/', views.ExampleUpdateView.as_view(), name='example_updat... | [
6738,
42625,
14208,
13,
6371,
82,
1330,
3108,
198,
198,
6738,
764,
1330,
5009,
198,
198,
6371,
33279,
82,
796,
685,
198,
220,
220,
220,
3108,
10786,
20688,
14,
3256,
5009,
13,
16281,
8053,
7680,
13,
292,
62,
1177,
22784,
1438,
11639,
... | 2.958042 | 143 |
from threading import Thread
from selenium.webdriver import Remote
from selenium import webdriver
# start browser
"""
if __name__ == '__main__':
host_list = {'127.0.0.1:4444': 'internet explorer', '127.0.0.1:5555': 'chrome'}
threads = []
files = range(len(host_list))
for host_name, browser_name in h... | [
6738,
4704,
278,
1330,
14122,
198,
6738,
384,
11925,
1505,
13,
12384,
26230,
1330,
21520,
198,
6738,
384,
11925,
1505,
1330,
3992,
26230,
628,
198,
2,
923,
6444,
198,
198,
37811,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
... | 2.472868 | 258 |
import numpy as np
from lagom.transform import geometric_cumsum
from lagom.utils import numpify
def bootstrapped_returns(gamma, rewards, last_V, reach_terminal):
r"""Return (discounted) accumulated returns with bootstrapping for a
batch of episodic transitions.
Formally, suppose we have all rewar... | [
11748,
299,
32152,
355,
45941,
198,
198,
6738,
19470,
296,
13,
35636,
1330,
38445,
62,
66,
5700,
388,
198,
6738,
19470,
296,
13,
26791,
1330,
299,
931,
1958,
628,
198,
198,
4299,
6297,
12044,
1496,
62,
7783,
82,
7,
28483,
2611,
11,
... | 2.297814 | 366 |
from nintendo.dauth import LATEST_VERSION
username = None
password = None
with open("ConsoleData/8000000000000010", mode="rb") as file:
data = file.read()
username_bytes = bytearray(data[0x00064020:0x00064028])
username_bytes.reverse()
username = "0x" + username_bytes.hex().upper()
password = data[0x00064028:0x00... | [
6738,
299,
8773,
13,
6814,
1071,
1330,
42355,
6465,
62,
43717,
198,
198,
29460,
796,
6045,
198,
28712,
796,
6045,
198,
4480,
1280,
7203,
47581,
6601,
14,
23,
8269,
2388,
20943,
1600,
4235,
2625,
26145,
4943,
355,
2393,
25,
198,
197,
7... | 2.580524 | 267 |
"""
Deals with the world map, which submarines explore.
"""
import string
from functools import reduce
from ALTANTIS.utils.text import list_to_and_separated
from ALTANTIS.utils.direction import reverse_dir, directions
from ALTANTIS.utils.consts import X_LIMIT, Y_LIMIT
from ALTANTIS.world.validators import InValidator,... | [
37811,
198,
5005,
874,
351,
262,
995,
3975,
11,
543,
34031,
7301,
13,
198,
37811,
198,
11748,
4731,
198,
6738,
1257,
310,
10141,
1330,
4646,
198,
198,
6738,
8355,
51,
8643,
1797,
13,
26791,
13,
5239,
1330,
1351,
62,
1462,
62,
392,
6... | 2.616613 | 626 |
from flask import Flask, render_template, request
from wtforms import Form, TextAreaField, validators
import os
import pickle
app = Flask(__name__)
######## Preparing the Predictor
cur_dir = os.path.dirname(__file__)
clf = pickle.load(open(os.path.join(cur_dir,'pkl_objects/diabetes.pkl'), 'rb'))
@app.route('/')
@a... | [
6738,
42903,
1330,
46947,
11,
8543,
62,
28243,
11,
2581,
198,
6738,
266,
83,
23914,
1330,
5178,
11,
8255,
30547,
15878,
11,
4938,
2024,
198,
11748,
28686,
198,
11748,
2298,
293,
198,
198,
1324,
796,
46947,
7,
834,
3672,
834,
8,
198,
... | 2.463918 | 194 |
"""Module to test graph with maximum size that supports coloring algorithm."""
import sys
import os
from time import time
sys.path.append(os.getcwd())
from graph.graph_coloring import Graph
graph = Graph()
graph.create_graph_from_file('graph/graph_coloring_tests/max_size_graph.txt')
start = time()
colored_vertices... | [
37811,
26796,
284,
1332,
4823,
351,
5415,
2546,
326,
6971,
33988,
11862,
526,
15931,
198,
198,
11748,
25064,
198,
11748,
28686,
198,
6738,
640,
1330,
640,
198,
198,
17597,
13,
6978,
13,
33295,
7,
418,
13,
1136,
66,
16993,
28955,
198,
... | 3.108974 | 156 |
import sys
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.ticker import MultipleLocator
from matplotlib import gridspec
from mpl_toolkits.axes_grid.inset_locator import inset_axes
#majorLocatorX = MultipleLocator(2)
#minorLocatorX = MultipleLocator(1)
#majorLocatorY = MultipleLoca... | [
11748,
25064,
198,
11748,
2603,
29487,
8019,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
2603,
29487,
8019,
13,
83,
15799,
1330,
20401,
33711,
1352,
198,
6738,
2603,
29487,
... | 1.750894 | 5,592 |
r1 = float(input('Primeiro segmento: '))
r2 = float(input('segundo segmento: '))
r3 = float(input('terceiro segmento: '))
if r1 < r2 + r3 and r2 < r1 + r3 and r3 < r1 + r2:
print('É um triangulo:')
if r1 == r2 == r3:
print('Equilatero!')
elif r1 != r2 != r3 != r1:
print('Escaleno!')
els... | [
81,
16,
796,
12178,
7,
15414,
10786,
26405,
7058,
10618,
78,
25,
705,
4008,
198,
81,
17,
796,
12178,
7,
15414,
10786,
325,
70,
41204,
10618,
78,
25,
705,
4008,
198,
81,
18,
796,
12178,
7,
15414,
10786,
353,
344,
7058,
10618,
78,
2... | 2.042105 | 190 |
import numpy as np
def l2_regularization(W, reg_strength):
"""
Computes L2 regularization loss on weights and its gradient
Arguments:
W, np array - weights
reg_strength - float value
Returns:
loss, single value - l2 regularization loss
gradient, np.array same shape as W - gra... | [
11748,
299,
32152,
355,
45941,
628,
198,
4299,
300,
17,
62,
16338,
1634,
7,
54,
11,
842,
62,
41402,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
3082,
1769,
406,
17,
3218,
1634,
2994,
319,
19590,
290,
663,
31312,
628,
220,
... | 2.69871 | 853 |
import json
import os
import random
import string
import zipfile
from django.conf import settings
from django.http import Http404, JsonResponse, HttpResponseBadRequest
from django.http import HttpResponse
from django.shortcuts import render
from django.views.decorators.http import require_POST, require_GET
from django... | [
11748,
33918,
198,
11748,
28686,
198,
11748,
4738,
198,
11748,
4731,
198,
11748,
19974,
7753,
198,
198,
6738,
42625,
14208,
13,
10414,
1330,
6460,
198,
6738,
42625,
14208,
13,
4023,
1330,
367,
29281,
26429,
11,
449,
1559,
31077,
11,
367,
... | 1.980663 | 724 |
from . import database
import os.path as op
import shutil
from .freesurfer import parse_curv
import numpy as np
def import_subj(subject,
source_dir,
session=None,
sname=None):
"""Imports a subject from fmriprep-output.
See https://fmriprep.readthedocs.io/en/stabl... | [
6738,
764,
1330,
6831,
198,
11748,
28686,
13,
6978,
355,
1034,
198,
11748,
4423,
346,
198,
6738,
764,
69,
6037,
333,
2232,
1330,
21136,
62,
22019,
85,
198,
11748,
299,
32152,
355,
45941,
198,
198,
4299,
1330,
62,
7266,
73,
7,
32796,
... | 2.008511 | 1,645 |
try:
from ._radix import Radix as _Radix
except Exception as e:
from .radix import Radix as _Radix
__version__ = '1.0.0'
__all__ = ['Radix']
# This acts as an entrypoint to the underlying object (be it a C
# extension or pure python representation, pickle files will work)
| [
28311,
25,
198,
220,
220,
220,
422,
47540,
6335,
844,
1330,
5325,
844,
355,
4808,
15546,
844,
198,
16341,
35528,
355,
304,
25,
198,
220,
220,
220,
422,
764,
6335,
844,
1330,
5325,
844,
355,
4808,
15546,
844,
198,
198,
834,
9641,
834... | 3.053763 | 93 |
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | [
2,
220,
220,
15069,
357,
66,
8,
12131,
350,
37382,
47,
37382,
46665,
13,
1439,
6923,
33876,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
... | 2.710753 | 930 |
import torch
import torch.nn as nn
import numpy as np
#********************模型训练*******************************#
criterion = nn.CrossEntropyLoss()
optimizer = torch.optim.Adam(model.parameters(),lr=learning_rate)
device = 'cuda' if torch.cuda.is_available() else 'cpu'
model = model.to(device)
for epoch in range(trai... | [
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
220,
198,
11748,
299,
32152,
355,
45941,
628,
198,
2,
8412,
2466,
162,
101,
94,
161,
252,
233,
164,
106,
255,
163,
119,
225,
8412,
46068,
8162,
2,
198,
22213,
28019,
796,
299... | 1.914749 | 4,258 |
from os import getenv
from dotenv import load_dotenv
load_dotenv()
BOT_TOKEN = getenv("TELEGRAM_API_TOKEN")
GROUP_CHAT_ID = getenv("GROUP_CHAT_ID")
CHANNEL_NAME = getenv("CHANNEL_NAME")
SUPER_USER_ID = getenv("SUPER_USER_ID") # sudo :)
GOOGLE_API_KEY = getenv('GOOGLE_API_KEY')
CSE_ID = getenv('CSE_ID')
SENTRY_DSN... | [
6738,
28686,
1330,
651,
24330,
198,
6738,
16605,
24330,
1330,
3440,
62,
26518,
24330,
198,
198,
2220,
62,
26518,
24330,
3419,
198,
198,
33,
2394,
62,
10468,
43959,
796,
651,
24330,
7203,
9328,
2538,
10761,
2390,
62,
17614,
62,
10468,
43... | 2.24183 | 153 |
#!/usr/bin/env python
import rospy
import actionlib
from mycobot_320_moveit.msg import *
if __name__ == '__main__':
rospy.init_node('move_client')
result = move_client()
print(result) | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
686,
2777,
88,
198,
11748,
2223,
8019,
198,
6738,
616,
66,
672,
313,
62,
19504,
62,
21084,
270,
13,
19662,
1330,
1635,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12... | 2.255319 | 94 |
#!/bin/python
import os
import sys
import time
import numpy as np
import scipy as sp
from scipy.stats import norm as normal
from scipy.special import *
from scipy.linalg import block_diag
from scipy.sparse import csr_matrix
import scipy.linalg as linalg
from sklearn import metrics
import random
'''
This version deal... | [
2,
48443,
8800,
14,
29412,
628,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
640,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
629,
541,
88,
355,
599,
198,
6738,
629,
541,
88,
13,
34242,
1330,
2593,
355,
3487,
198,
6738,
629,
... | 2.962151 | 502 |
# 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.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | [
2,
19617,
28,
40477,
12,
23,
198,
2,
16529,
35937,
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,
5964,
1321... | 2.576623 | 770 |
import functools
from collections import Counter
import numpy as np
from numba import njit
from numba.typed import Dict
from tqdm import tqdm
from kernel.utils import memoize_id, normalize_kernel
TRANSLATION = {
"A": "T",
"T": "A",
"C": "G",
"G": "C"
}
@functools.lru_cache(None)
def complement(x:... | [
11748,
1257,
310,
10141,
198,
6738,
17268,
1330,
15034,
198,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
997,
7012,
1330,
299,
45051,
198,
6738,
997,
7012,
13,
774,
9124,
1330,
360,
713,
198,
198,
6738,
256,
80,
36020,
1330,
256,
8... | 2.434343 | 297 |
# Copyright (c) 2003-2019 by Mike Jarvis
#
# TreeCorr is free software: 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, this
# list of condi... | [
2,
15069,
357,
66,
8,
5816,
12,
23344,
416,
4995,
46595,
198,
2,
198,
2,
12200,
10606,
81,
318,
1479,
3788,
25,
41425,
290,
779,
287,
2723,
290,
13934,
5107,
11,
198,
2,
351,
393,
1231,
17613,
11,
389,
10431,
2810,
326,
262,
1708,... | 2.593039 | 2,155 |
from django.views.generic import TemplateView
from django.views.decorators.cache import never_cache
from rest_framework import viewsets
from .models import *
# Serve Vue Application
index_view = never_cache(TemplateView.as_view(template_name='index.html'))
class PostViewSet(viewsets.ModelViewSet):
"""
API к... | [
6738,
42625,
14208,
13,
33571,
13,
41357,
1330,
37350,
7680,
198,
6738,
42625,
14208,
13,
33571,
13,
12501,
273,
2024,
13,
23870,
1330,
1239,
62,
23870,
198,
6738,
1334,
62,
30604,
1330,
5009,
1039,
198,
198,
6738,
764,
27530,
1330,
163... | 2.251678 | 298 |
from socialite.helpers import get_config
from .base import BaseOAuth2
| [
6738,
1919,
578,
13,
16794,
364,
1330,
651,
62,
11250,
198,
6738,
764,
8692,
1330,
7308,
23621,
1071,
17,
628
] | 3.55 | 20 |
import sys
from pyswip import Prolog
helloworld(); | [
11748,
25064,
198,
6738,
279,
893,
86,
541,
1330,
1041,
6404,
198,
220,
220,
220,
220,
198,
12758,
322,
1764,
9783
] | 2.619048 | 21 |
import spacy
import ContactInfo
DIVIDER = "~" # CONSTANT which defines dividing str between card entries in a file
class BusinessCardParser:
""" Function getContactInfo
Input(s): document with text from one business card (string).
Output(s): A (ContactInfo) object that contains vital ... | [
11748,
599,
1590,
201,
198,
11748,
14039,
12360,
201,
198,
201,
198,
33569,
41237,
796,
366,
93,
1,
220,
1303,
7102,
2257,
8643,
543,
15738,
27241,
965,
1022,
2657,
12784,
287,
257,
2393,
201,
198,
201,
198,
201,
198,
4871,
7320,
1696... | 2.693309 | 538 |
"""Testsuite for vfgithook.pylint_check"""
from vfgithook import pylint_check
from . import util
# pylint: disable=protected-access
def test_is_python_file(gitrepo):
"""Test pylint_check.is_python_file"""
# Extension
file_a = util.write_file(gitrepo, 'a.py', '')
assert pylint_check._is_python_fil... | [
37811,
14402,
2385,
578,
329,
410,
40616,
342,
566,
13,
79,
2645,
600,
62,
9122,
37811,
198,
198,
6738,
410,
40616,
342,
566,
1330,
279,
2645,
600,
62,
9122,
198,
198,
6738,
764,
1330,
7736,
628,
198,
2,
279,
2645,
600,
25,
15560,
... | 2.358025 | 243 |
from django_p.tasks import Pipe
| [
6738,
42625,
14208,
62,
79,
13,
83,
6791,
1330,
36039,
198
] | 2.909091 | 11 |
from xlab.data.calc.interface import RecursiveInputs
from xlab.data.calc.interface import SourceInputs
from xlab.data.calc.interface import CalcInputs
from xlab.data.calc.interface import CalcTimeSpecs
from xlab.data.calc.interface import CalcProducer
from xlab.data.calc.interface import CalcProducerFactory
| [
6738,
2124,
23912,
13,
7890,
13,
9948,
66,
13,
39994,
1330,
3311,
30753,
20560,
82,
198,
6738,
2124,
23912,
13,
7890,
13,
9948,
66,
13,
39994,
1330,
8090,
20560,
82,
198,
6738,
2124,
23912,
13,
7890,
13,
9948,
66,
13,
39994,
1330,
2... | 3.185567 | 97 |
from django import forms
from .models import *
| [
6738,
42625,
14208,
1330,
5107,
201,
198,
6738,
764,
27530,
1330,
1635,
201,
198,
201,
198,
220,
220,
220,
220,
220,
220,
220,
220,
201
] | 2.4 | 25 |
# Copyright 2018 dhtech
#
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file
import lib
# vim: ts=4: sts=4: sw=4: expandtab
| [
2,
15069,
2864,
34590,
13670,
198,
2,
198,
2,
5765,
286,
428,
2723,
2438,
318,
21825,
416,
257,
347,
10305,
12,
7635,
198,
2,
5964,
326,
460,
307,
1043,
287,
262,
38559,
24290,
2393,
198,
11748,
9195,
628,
198,
2,
43907,
25,
40379,
... | 3.087719 | 57 |
import dash
from dash.dependencies import Input, Output
import dash_core_components as dcc # graphs etc
import dash_html_components as html # tags etc
app = dash.Dash() # dash can combine wth flask
app.layout = html.Div(children=[
dcc.Input(id = "Input", value = "Enter Something", type = "text"),
html.Div(... | [
11748,
14470,
201,
198,
6738,
14470,
13,
45841,
3976,
1330,
23412,
11,
25235,
201,
198,
11748,
14470,
62,
7295,
62,
5589,
3906,
355,
288,
535,
1303,
28770,
3503,
201,
198,
11748,
14470,
62,
6494,
62,
5589,
3906,
355,
27711,
1303,
15940,... | 2.859375 | 192 |
from cachetclient.client import Client # noqa
___version__ = '3.0.0'
| [
6738,
40428,
3202,
16366,
13,
16366,
1330,
20985,
220,
1303,
645,
20402,
198,
198,
17569,
9641,
834,
796,
705,
18,
13,
15,
13,
15,
6,
198
] | 2.730769 | 26 |
'''
Main processor for v2 of the collocation between CALIOP and Himawari-8.
'''
import os
import sys
import traceback
from datetime import datetime
from pyhdf.SD import SD, SDC
if __name__ == '__main__':
import argparse
parser = argparse.ArgumentParser()
parser.add_argument(
"-l",
"--lis... | [
7061,
6,
198,
13383,
12649,
329,
410,
17,
286,
262,
2927,
5040,
1022,
33290,
40,
3185,
290,
10978,
707,
2743,
12,
23,
13,
198,
7061,
6,
198,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
12854,
1891,
198,
6738,
4818,
8079,
1330,
... | 2.34413 | 494 |
# coding: utf-8
from enum import Enum
from six import string_types, iteritems
from bitmovin_api_sdk.common.poscheck import poscheck_model
from bitmovin_api_sdk.models.audio_mix_channel_type import AudioMixChannelType
import pprint
import six
| [
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
6738,
33829,
1330,
2039,
388,
198,
6738,
2237,
1330,
4731,
62,
19199,
11,
11629,
23814,
198,
6738,
1643,
76,
709,
259,
62,
15042,
62,
21282,
74,
13,
11321,
13,
1930,
9122,
1330,
1426,
9122,
... | 3.088608 | 79 |
'''
Integration Test Teardown case
@author: Youyk
'''
import zstacklib.utils.linux as linux
import zstacklib.utils.http as http
import zstackwoodpecker.setup_actions as setup_actions
import zstackwoodpecker.test_util as test_util
import zstackwoodpecker.clean_util as clean_util
import zstackwoodpecker.test_lib as te... | [
7061,
6,
198,
198,
34500,
1358,
6208,
1665,
446,
593,
1339,
198,
198,
31,
9800,
25,
921,
48361,
198,
7061,
6,
198,
198,
11748,
1976,
25558,
8019,
13,
26791,
13,
23289,
355,
32639,
198,
11748,
1976,
25558,
8019,
13,
26791,
13,
4023,
... | 3.236641 | 131 |
from setuptools import setup
import os
import re
VERSION_REGEX = re.compile("__version__ = \"(.*?)\"")
CONTENTS = readfile(
os.path.join(
os.path.dirname(os.path.abspath(__file__)),
"ringdown",
"__init__.py"
)
)
VERSION = VERSION_REGEX.findall(CONTENTS)[0]
setup(
name="ringdown",... | [
6738,
900,
37623,
10141,
1330,
9058,
198,
11748,
28686,
198,
11748,
302,
628,
198,
198,
43717,
62,
31553,
6369,
796,
302,
13,
5589,
576,
7203,
834,
9641,
834,
796,
3467,
18109,
15885,
10091,
7879,
4943,
198,
37815,
15365,
796,
1100,
775... | 2.344214 | 337 |
import argparse
import cv2
import numpy as np
import torch
from torch.autograd import Function
from torchvision import models, transforms
def deprocess_image(img):
""" see https://github.com/jacobgil/keras-grad-cam/blob/master/grad-cam.py#L65 """
img = img - np.mean(img)
img = img / (np.std(img) +... | [
11748,
1822,
29572,
198,
198,
11748,
269,
85,
17,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
28034,
198,
6738,
28034,
13,
2306,
519,
6335,
1330,
15553,
198,
6738,
28034,
10178,
1330,
4981,
11,
31408,
628,
628,
628,
628,
198,
198,
... | 2.477551 | 735 |
raio = int(input())
pi = 3.14159
volume = float(4.0 * pi * (raio* raio * raio) / 3)
print("VOLUME = %0.3f" %volume)
| [
430,
952,
796,
493,
7,
15414,
28955,
198,
14415,
796,
513,
13,
1415,
19707,
198,
29048,
796,
12178,
7,
19,
13,
15,
1635,
31028,
1635,
357,
430,
952,
9,
2179,
952,
1635,
2179,
952,
8,
1220,
513,
8,
198,
4798,
7203,
44558,
38340,
79... | 2.148148 | 54 |
import unittest
import matplotlib
import random
import time
import matplotlib.pyplot as plt
from timsort import Timsort
#test time sorting an array of n elements
#Checking the sorting of arrays in which there are less than 64 elements
#array sorting test greater than 64
... | [
11748,
555,
715,
395,
201,
198,
11748,
2603,
29487,
8019,
201,
198,
11748,
4738,
201,
198,
11748,
640,
201,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
201,
198,
6738,
4628,
30619,
1330,
5045,
30619,
201,
198,
201,
1... | 2.64539 | 141 |
import pandas as pd
import pytest
from pandas_profiling import ProfileReport
# Generating dummy data
dummy_bool_data = generate_cat_data_series(pd.Series({True: 82, False: 36}))
dummy_cat_data = generate_cat_data_series(
pd.Series(
{
"Amadeou_plus": 75,
"Beta_front": 50,
... | [
11748,
19798,
292,
355,
279,
67,
198,
11748,
12972,
9288,
198,
198,
6738,
19798,
292,
62,
5577,
4386,
1330,
13118,
19100,
628,
198,
2,
2980,
803,
31548,
1366,
628,
198,
67,
13513,
62,
30388,
62,
7890,
796,
7716,
62,
9246,
62,
7890,
... | 2.17193 | 570 |
# Code generated by `typeddictgen`. DO NOT EDIT.
"""V1SubjectAccessReviewStatusDict generated type."""
from typing import TypedDict
V1SubjectAccessReviewStatusDict = TypedDict(
"V1SubjectAccessReviewStatusDict",
{
"allowed": bool,
"denied": bool,
"evaluationError": str,
"reason"... | [
2,
6127,
7560,
416,
4600,
28004,
6048,
713,
5235,
44646,
8410,
5626,
48483,
13,
198,
37811,
53,
16,
19776,
15457,
14832,
19580,
35,
713,
7560,
2099,
526,
15931,
198,
6738,
19720,
1330,
17134,
276,
35,
713,
198,
198,
53,
16,
19776,
154... | 2.485915 | 142 |
from ROOT_AND_MAIN.widgets import Root_and_main
import ROOT_AND_MAIN.USER_WINDOW.setup as user_window
import ROOT_AND_MAIN.SCHEDULE_WINDOW.setup as schedule_window
import ROOT_AND_MAIN.SUBJECT_WINDOW.setup as subject_window | [
6738,
15107,
2394,
62,
6981,
62,
5673,
1268,
13,
28029,
11407,
1330,
20410,
62,
392,
62,
12417,
198,
198,
11748,
15107,
2394,
62,
6981,
62,
5673,
1268,
13,
29904,
62,
28929,
3913,
13,
40406,
355,
2836,
62,
17497,
198,
11748,
15107,
23... | 2.698795 | 83 |
from django.apps import AppConfig
| [
6738,
42625,
14208,
13,
18211,
1330,
2034,
16934,
628
] | 3.888889 | 9 |
"""
Copyright 2011 Dmitry Nikulin
This file is part of Captchure.
Captchure is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later ... | [
37811,
198,
220,
220,
220,
15069,
2813,
45181,
11271,
11599,
628,
220,
220,
220,
770,
2393,
318,
636,
286,
6790,
354,
495,
13,
628,
220,
220,
220,
6790,
354,
495,
318,
1479,
3788,
25,
345,
460,
17678,
4163,
340,
290,
14,
273,
13096,... | 3.455696 | 237 |
import canopen
network = canopen.Network()
network.connect(channel='can0', bustype='socketcan')
node = network.add_node(6, '') | [
11748,
460,
9654,
198,
198,
27349,
796,
460,
9654,
13,
26245,
3419,
198,
198,
27349,
13,
8443,
7,
17620,
11639,
5171,
15,
3256,
13076,
2981,
11639,
44971,
5171,
11537,
198,
17440,
796,
3127,
13,
2860,
62,
17440,
7,
21,
11,
10148,
8
] | 3.047619 | 42 |
#%%
import numpy as np
import sys
import pylab as plt
sys.path.append('../')
from fiber_nlse.fiber_nlse import *
# Physical units & constants
nm = 1e-9
ps = 1e-12
km = 1e3
mW = 1e-3
GHz = 1e9
Thz = 1e12
m = 1
W = 1
c = 3e8
# Simulation metrics
N_t = 2000
N_z = 1000
# Physical parameters
# Source
T = 500*ps
λ =... | [
2,
16626,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
25064,
198,
11748,
279,
2645,
397,
355,
458,
83,
198,
198,
17597,
13,
6978,
13,
33295,
10786,
40720,
11537,
198,
198,
6738,
13608,
62,
21283,
325,
13,
69,
1856,
62,
21283,
325,... | 2.094077 | 861 |
data = [
("orange", "a sweet, orange, citrus fruit"),
("apple", "good for making cider"),
("lemon", "a sour, yellow citrus fruit"),
("grape", "a small, sweet fruit growing in bunches"),
("melon", "sweet and juicy"),
]
# Convert to ASCII chars
# print(ord("a"))
# print(ord("b"))
# print(ord("z"))
... | [
7890,
796,
685,
198,
220,
220,
220,
5855,
43745,
1600,
366,
64,
6029,
11,
10912,
11,
35405,
8234,
12340,
198,
220,
220,
220,
5855,
18040,
1600,
366,
11274,
329,
1642,
36930,
12340,
198,
220,
220,
220,
5855,
293,
2144,
1600,
366,
64,
... | 2.462651 | 415 |
import numpy as np
import pandas as pd
import os
import datetime
homedir = os.path.expanduser('~')
datadir = 'github/RIPS_kircheis/data/eia_form_714/processed/'
fulldir = homedir + '/' + datadir
# li = []
# for d1 in os.listdir('.'):
# for fn in os.listdir('./%s' % d1):
# li.append(fn)
# dir_u = pd.Seri... | [
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
28686,
198,
11748,
4818,
8079,
198,
198,
71,
12657,
343,
796,
28686,
13,
6978,
13,
11201,
392,
7220,
10786,
93,
11537,
198,
19608,
324,
343,
796,
705,
12... | 1.91709 | 99,988 |
print (is_power(16, 2))
print (is_power(17, 2))
print (is_power(1, 1))
print (is_power(0, 0))
print (is_power(-8 , -2))
print (is_power(-27, -3))
| [
198,
4798,
357,
271,
62,
6477,
7,
1433,
11,
362,
4008,
198,
4798,
357,
271,
62,
6477,
7,
1558,
11,
362,
4008,
198,
4798,
357,
271,
62,
6477,
7,
16,
11,
352,
4008,
198,
4798,
357,
271,
62,
6477,
7,
15,
11,
657,
4008,
198,
4798,... | 2.144928 | 69 |
#!/usr/bin/env python
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""This script runs an automated Cronet performance benchmark.
This script:
1. Sets up "USB reverse tethering" which allow network tra... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
15069,
1853,
383,
18255,
1505,
46665,
13,
1439,
2489,
10395,
13,
198,
2,
5765,
286,
428,
2723,
2438,
318,
21825,
416,
257,
347,
10305,
12,
7635,
5964,
326,
460,
307,
198,
2,
1043,... | 3.19893 | 935 |
# -*- coding: utf-8 -*-
import requests
import os
from threading import Thread
import website
import ai_request
import speech_recognition
import json
recognizer = speech_recognition.Recognizer()
with speech_recognition.Microphone() as source1:
recognizer.adjust_for_ambient_noise(source1)
websiteThread = Th... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
7007,
198,
11748,
28686,
198,
6738,
4704,
278,
1330,
14122,
198,
11748,
3052,
198,
11748,
257,
72,
62,
25927,
198,
11748,
4046,
62,
26243,
653,
198,
11748,
3... | 3.10687 | 131 |
from six.moves import http_client
from cloudframe.common import job
import logging
import time
LOG = logging.getLogger(__name__)
| [
198,
6738,
2237,
13,
76,
5241,
1330,
2638,
62,
16366,
198,
6738,
6279,
14535,
13,
11321,
1330,
1693,
198,
11748,
18931,
198,
11748,
640,
198,
198,
25294,
796,
18931,
13,
1136,
11187,
1362,
7,
834,
3672,
834,
8,
628,
628,
628
] | 3.317073 | 41 |
import csv
import os
import re
import subprocess
from mlperf.clustering.tools import dumpDataOnCleanCsv
from mlperf.tools.config import MATLAB_EXE, TEMPFOLDER, JAVA_EXE, R_BIN
from mlperf.tools.static import datasetOutFile, MATLAB_ALGO, matlabRedirectTempFolder, WEKA_ALGO, JAVA_CLASSPATH, \
SKLEARN_ALGO, R_ALGO, S... | [
11748,
269,
21370,
198,
11748,
28686,
198,
11748,
302,
198,
11748,
850,
14681,
198,
198,
6738,
25962,
525,
69,
13,
565,
436,
1586,
13,
31391,
1330,
10285,
6601,
2202,
32657,
34,
21370,
198,
6738,
25962,
525,
69,
13,
31391,
13,
11250,
... | 2.507576 | 132 |
import array
import hashlib
import json
import os.path
import ctypes
from ctypes import *
import utils
logger = utils.get_logger('test_02_utils')
my_lib = load_shared_library()
| [
11748,
7177,
198,
11748,
12234,
8019,
198,
11748,
33918,
198,
11748,
28686,
13,
6978,
198,
11748,
269,
19199,
198,
6738,
269,
19199,
1330,
1635,
198,
11748,
3384,
4487,
198,
198,
6404,
1362,
796,
3384,
4487,
13,
1136,
62,
6404,
1362,
10... | 2.983333 | 60 |
#!/usr/bin/python
# -----------------------------------------------------------------------------
# Name: VHDL instantiation script
# Purpose: Using with VIM
#
# Author: BooZe
#
# Created: 25.03.2013
# Copyright: (c) BooZe 2013
# Licence: BSD
# ----------------------------------------------------... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
2,
16529,
32501,
198,
2,
6530,
25,
220,
220,
220,
220,
220,
220,
220,
569,
10227,
43,
9113,
3920,
4226,
198,
2,
32039,
25,
220,
8554,
351,
569,
3955,
198,
2,
198,
2,
6434,
25,
220,
220,... | 3.345865 | 133 |
from qtpy.QtCore import QPoint, Qt
from qtpy.QtGui import QCursor
from qtpy.QtWidgets import QApplication, QDialog, QHBoxLayout, QLayout, QWidget
from . import helpers as hp
class QtDialog(QDialog):
"""Dialog base class"""
_icons = None
_main_layout = None
def on_close(self):
"""Close windo... | [
6738,
10662,
83,
9078,
13,
48,
83,
14055,
1330,
1195,
12727,
11,
33734,
198,
6738,
10662,
83,
9078,
13,
48,
83,
8205,
72,
1330,
36070,
21471,
198,
6738,
10662,
83,
9078,
13,
48,
83,
54,
312,
11407,
1330,
1195,
23416,
11,
1195,
44204... | 2.275695 | 2,481 |
x = 2
y = 2
n = 2
# ar = []
# p = 0
# for i in range ( x + 1 ) :
# for j in range( y + 1):
# if i+j != n:
# ar.append([])
# ar[p] = [ i , j ]
# p+=1
# print(ar)
x = 2
y = 2
z = 2
n = 2
lst = [[i, j, k] for i in range(x + 1) for j in range(y + 1) for k in ran... | [
87,
796,
362,
220,
198,
88,
796,
362,
198,
77,
796,
362,
628,
198,
2,
610,
796,
17635,
220,
198,
2,
279,
796,
657,
220,
198,
2,
329,
1312,
287,
2837,
357,
2124,
1343,
352,
1267,
1058,
220,
198,
2,
220,
220,
220,
220,
329,
474,... | 1.682243 | 214 |
from typing import Dict, List, Optional
from django.http import HttpRequest, HttpResponse
from zerver.lib.bot_storage import (
StateError,
get_bot_storage,
get_keys_in_bot_storage,
remove_bot_storage,
set_bot_storage,
)
from zerver.lib.exceptions import JsonableError
from zerver.lib.request import... | [
6738,
19720,
1330,
360,
713,
11,
7343,
11,
32233,
198,
198,
6738,
42625,
14208,
13,
4023,
1330,
367,
29281,
18453,
11,
367,
29281,
31077,
198,
198,
6738,
1976,
18497,
13,
8019,
13,
13645,
62,
35350,
1330,
357,
198,
220,
220,
220,
1812... | 3 | 192 |
# Copyright 2020 Adap GmbH. 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 ag... | [
2,
15069,
12131,
1215,
499,
402,
2022,
39,
13,
1439,
6923,
33876,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
35... | 2.817368 | 1,117 |
# Tabela do Brasileirão
times = ('Internacional', 'São Paulo', 'Flamengo', 'Atlético-MG', 'Palmeiras', 'Grêmio', 'Fluminense', 'Ceará',
'Santos', 'Corinthians', 'Bragantino', 'Athletico', 'Atlético-GO', 'Sport', 'Vasco', 'Fortaleza', 'Bahia',
'Goiás', 'Coritiba', 'Botafogo')
while True:
pri... | [
2,
309,
9608,
64,
466,
39452,
576,
343,
28749,
201,
198,
22355,
796,
19203,
15865,
330,
1538,
3256,
705,
50,
28749,
34410,
3256,
705,
37,
2543,
1516,
78,
3256,
705,
25255,
25125,
3713,
12,
20474,
3256,
705,
11531,
1326,
343,
292,
3256... | 2.065068 | 292 |
from __future__ import absolute_import
import os.path as osp
import appdirs
from blazeutils.helpers import tolist
import flask
from pathlib import PurePath
import six
from werkzeug.utils import (
import_string,
ImportStringError
)
from keg.utils import app_environ_get, pymodule_fpaths_to_objects
substitu... | [
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
198,
11748,
28686,
13,
6978,
355,
267,
2777,
198,
198,
11748,
598,
15908,
82,
198,
6738,
31259,
26791,
13,
16794,
364,
1330,
284,
4868,
198,
11748,
42903,
198,
6738,
3108,
8019,
1330,... | 3.368852 | 122 |
import tensorflow as tf
import numpy as np
from tensorflow.keras import Model
from tensorflow.keras.layers import Input, LeakyReLU
from rdcnet.layers.nd_layers import get_nd_conv, get_nd_spatial_dropout, get_nd_conv_transposed
from rdcnet.layers.padding import DynamicPaddingLayer, DynamicTrimmingLayer
from rdcnet.lay... | [
11748,
11192,
273,
11125,
355,
48700,
198,
11748,
299,
32152,
355,
45941,
198,
198,
6738,
11192,
273,
11125,
13,
6122,
292,
1330,
9104,
198,
6738,
11192,
273,
11125,
13,
6122,
292,
13,
75,
6962,
1330,
23412,
11,
1004,
15492,
3041,
41596... | 2.0453 | 2,053 |
from googleplaces import GooglePlaces, types, lang
import googlemaps
import csv
from time import sleep
import requests
import sys
import re
from send_mail import *
if __name__ == '__main__':
scrape()
| [
6738,
23645,
23625,
1330,
3012,
3646,
2114,
11,
3858,
11,
42392,
198,
11748,
23645,
31803,
198,
11748,
269,
21370,
198,
6738,
640,
1330,
3993,
198,
11748,
7007,
198,
11748,
25064,
198,
11748,
302,
198,
6738,
3758,
62,
4529,
1330,
1635,
... | 3.419355 | 62 |
""" XVM (c) www.modxvm.com 2013-2017 """
#####################################################################
# constants
# Shared commands
# Markers only commands
# Battle events
# Invalidation targets
# Spotted statuses
| [
37811,
1395,
15996,
357,
66,
8,
7324,
13,
4666,
87,
14761,
13,
785,
2211,
12,
5539,
37227,
198,
198,
29113,
29113,
4242,
2,
198,
2,
38491,
198,
198,
2,
39403,
9729,
198,
198,
2,
2940,
364,
691,
9729,
198,
198,
2,
5838,
2995,
198,
... | 4.017544 | 57 |
from onto.attrs import attribute
from onto.models.base import Serializable
from collections import namedtuple
graph_schema = namedtuple('graph_schema', ['op_type', 'name', 'graphql_object_type'])
| [
6738,
4291,
13,
1078,
3808,
1330,
11688,
198,
198,
6738,
4291,
13,
27530,
13,
8692,
1330,
23283,
13821,
628,
198,
198,
6738,
17268,
1330,
3706,
83,
29291,
198,
198,
34960,
62,
15952,
2611,
796,
3706,
83,
29291,
10786,
34960,
62,
15952,
... | 3.311475 | 61 |
#!/usr/bin/env python
import sys
import os
import argparse
from encode_lib_common import (
assert_file_not_empty, get_num_lines, log, ls_l, mkdir_p, rm_f,
run_shell_cmd, strip_ext_ta)
from encode_lib_genomic import (
subsample_ta_pe, subsample_ta_se)
if __name__ == '__main__':
main()
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
11748,
25064,
198,
11748,
28686,
198,
11748,
1822,
29572,
198,
6738,
37773,
62,
8019,
62,
11321,
1330,
357,
198,
220,
220,
220,
6818,
62,
7753,
62,
1662,
62,
28920,
11,
651,
62,
22510,... | 2.451613 | 124 |
#!/usr/bin/env python3
import re
import yaml
from collections import namedtuple, defaultdict
from ipaddress import IPv4Network
from itertools import repeat, combinations
from functools import update_wrapper
import click
BoundIface = namedtuple('BoundIface', 'host if_no')
NetedIface = namedtuple('NetedIface', 'host i... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
11748,
302,
198,
11748,
331,
43695,
198,
6738,
17268,
1330,
3706,
83,
29291,
11,
4277,
11600,
198,
6738,
20966,
21975,
1330,
25961,
19,
26245,
198,
6738,
340,
861,
10141,
1330,
9585,... | 2.570681 | 382 |
#! /usr/bin/env python
import sys
# preferrence for the included libs
sys.path.insert(0, 'libs')
from editor import main
main.main()
| [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
25064,
198,
2,
4702,
6784,
329,
262,
3017,
9195,
82,
198,
17597,
13,
6978,
13,
28463,
7,
15,
11,
705,
8019,
82,
11537,
198,
198,
6738,
5464,
1330,
1388,
198,
12417,
1... | 2.87234 | 47 |
from __future__ import absolute_import
import abc
from typing import TYPE_CHECKING, Union
if TYPE_CHECKING:
from qrcode.image.base import BaseImage
from qrcode.main import ActiveWithNeighbors
class QRModuleDrawer(abc.ABC):
"""
QRModuleDrawer exists to draw the modules of the QR Code onto images.
... | [
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
198,
11748,
450,
66,
198,
6738,
19720,
1330,
41876,
62,
50084,
2751,
11,
4479,
198,
198,
361,
41876,
62,
50084,
2751,
25,
198,
220,
220,
220,
422,
10662,
6015,
1098,
13,
9060,
13,
... | 3.302817 | 284 |
"""Desafio 80. Ler cinco valores númericos e ir colocando eles na lista de modo ordenado sem usar o método sort"""
numeros = list()
for cont in range(0, 5):
num = int(input("Escreva um número: "))
if cont == 0:
numeros.append(num)
elif cont == 1:
if num >= numeros[0]:
numeros.ap... | [
37811,
5960,
1878,
952,
4019,
13,
31831,
269,
259,
1073,
1188,
2850,
299,
21356,
946,
418,
304,
4173,
951,
420,
25440,
304,
829,
12385,
1351,
64,
390,
953,
78,
2760,
268,
4533,
5026,
514,
283,
267,
285,
25125,
24313,
3297,
37811,
198,... | 1.873512 | 672 |
import home
from ws.handler.event.enum import Handler as Parent
| [
11748,
1363,
198,
198,
6738,
266,
82,
13,
30281,
13,
15596,
13,
44709,
1330,
32412,
355,
16774,
628
] | 3.666667 | 18 |
i = 3
shit_indicator = 0
simple_nums = [2]
while len(simple_nums) < 10001:
for k in range(2, i):
if i % k == 0:
shit_indicator = 1
break
if shit_indicator == 1:
pass
else:
simple_nums.append(i)
i += 1
shit_indicator = 0
print(simple_nums[... | [
72,
796,
513,
201,
198,
16211,
62,
521,
26407,
796,
657,
201,
198,
36439,
62,
77,
5700,
796,
685,
17,
60,
201,
198,
4514,
18896,
7,
36439,
62,
77,
5700,
8,
1279,
1802,
486,
25,
201,
198,
220,
220,
220,
329,
479,
287,
2837,
7,
... | 1.830508 | 177 |