content stringlengths 1 1.05M | input_ids listlengths 1 883k | ratio_char_token float64 1 22.9 | token_count int64 1 883k |
|---|---|---|---|
""" Training of a network """
import torch
import sys
import torch_optimizer as optim_all
import numpy as np
from .modules import rk4th_onestep_SparseId, rk4th_onestep_SparseId_parameter
def learning_sparse_model(dictionary, Coeffs, dataloaders, Params,lr_reduction = 10, quite = False):
'''
Parameters
... | [
37811,
13614,
286,
257,
3127,
37227,
198,
11748,
28034,
198,
11748,
25064,
198,
11748,
28034,
62,
40085,
7509,
355,
6436,
62,
439,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
764,
18170,
1330,
374,
74,
19,
400,
62,
19129,
538,
62,
... | 2.12023 | 6,080 |
cp ./* ~/server/uniquemachine/
| [
13155,
764,
15211,
47795,
15388,
14,
403,
1557,
368,
20480,
14,
198
] | 2.583333 | 12 |
from urllib import request
from os import path, system
from platform import system as osInfo
from time import sleep
from urllib import request
if __name__ == '__main__': repairFileMain()
sleep(7) | [
6738,
2956,
297,
571,
1330,
2581,
201,
198,
6738,
28686,
1330,
3108,
11,
1080,
201,
198,
6738,
3859,
1330,
1080,
355,
28686,
12360,
201,
198,
6738,
640,
1330,
3993,
201,
198,
6738,
2956,
297,
571,
1330,
2581,
201,
198,
201,
198,
361,
... | 3.327869 | 61 |
import os
import argparse
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("-port")
parser.add_argument("-programmer")
parser.add_argument("-binary")
args = parser.parse_args()
port_norm = args.port
port_bootloader = f"{port_norm[0:3]}{int(port_norm[-1])+1... | [
11748,
28686,
198,
11748,
1822,
29572,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
628,
220,
220,
220,
30751,
796,
1822,
29572,
13,
28100,
1713,
46677,
3419,
198,
220,
220,
220,
30751,
13,
2860,
62,
49140,
7203,
... | 2.482906 | 234 |
# None
a=[None] * 20
a[0]=a[1]=100
a[2]=200
for i in range(3,20):
a[i] = a[i-1] + a[i-2] + a[i-3]
print(a[19])
| [
2,
6045,
198,
64,
41888,
14202,
60,
1635,
1160,
198,
64,
58,
15,
22241,
64,
58,
16,
22241,
3064,
198,
64,
58,
17,
22241,
2167,
198,
1640,
1312,
287,
2837,
7,
18,
11,
1238,
2599,
198,
197,
64,
58,
72,
60,
796,
257,
58,
72,
12,
... | 1.6 | 70 |
"""Test the basic functionality of the base and core data types."""
from datetime import date, time, datetime
from typing import NoReturn
from ontic import OnticType
from ontic import property
from ontic import type as o_type
from ontic.meta import Meta
from ontic.property import OnticProperty
from ontic.schema import... | [
37811,
14402,
262,
4096,
11244,
286,
262,
2779,
290,
4755,
1366,
3858,
526,
15931,
198,
6738,
4818,
8079,
1330,
3128,
11,
640,
11,
4818,
8079,
198,
6738,
19720,
1330,
1400,
13615,
198,
198,
6738,
319,
13370,
1330,
9463,
291,
6030,
198,
... | 3.556338 | 142 |
# -*- coding: utf-8 -*-
# Resource object code
#
# Created by: The Resource Compiler for PyQt5 (Qt v5.9.7)
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore
qt_resource_data = b"\
\x00\x00\x2a\xae\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
\x00\x01\xd0\x0... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
20857,
2134,
2438,
198,
2,
198,
2,
15622,
416,
25,
383,
20857,
3082,
5329,
329,
9485,
48,
83,
20,
357,
48,
83,
410,
20,
13,
24,
13,
22,
8,
198,
2,
198,
... | 1.241973 | 37,467 |
import json
import logging
import os
import pdb
import re
from helpers.app_helpers import *
from helpers.page_helpers import *
from helpers.jinja2_helpers import *
from helpers.telegram_helpers import *
#from main import *
#from flask import request
#####################################################################... | [
11748,
33918,
198,
11748,
18931,
198,
11748,
28686,
198,
11748,
279,
9945,
198,
11748,
302,
198,
6738,
49385,
13,
1324,
62,
16794,
364,
1330,
1635,
198,
6738,
49385,
13,
7700,
62,
16794,
364,
1330,
1635,
198,
6738,
49385,
13,
18594,
659... | 5.952381 | 105 |
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setup(26, GPIO.OUT)
GPIO.output(26, GPIO.HIGH)
| [
11748,
25812,
72,
13,
16960,
9399,
355,
50143,
198,
198,
16960,
9399,
13,
2617,
14171,
7,
16960,
9399,
13,
2749,
44,
8,
198,
198,
16960,
9399,
13,
40406,
7,
2075,
11,
50143,
13,
12425,
8,
198,
198,
16960,
9399,
13,
22915,
7,
2075,
... | 2.04 | 50 |
import os
import sys
import DIRECT
import json
import numpy as np
from hpolib.benchmarks.ml.surrogate_svm import SurrogateSVM
from hpolib.benchmarks.ml.surrogate_cnn import SurrogateCNN
from hpolib.benchmarks.ml.surrogate_fcnet import SurrogateFCNet
run_id = int(sys.argv[1])
benchmark = sys.argv[2]
n_iters = 50
n_i... | [
11748,
28686,
198,
11748,
25064,
198,
11748,
42242,
198,
11748,
33918,
198,
11748,
299,
32152,
355,
45941,
198,
198,
6738,
289,
16104,
571,
13,
26968,
14306,
13,
4029,
13,
11793,
3828,
378,
62,
82,
14761,
1330,
4198,
3828,
378,
50,
1599... | 2.336694 | 992 |
# *** Delete Call Feedback Summary ***
# Code based on https://www.twilio.com/docs/voice/api/call-quality-feedback
# Download Python 3 from https://www.python.org/downloads/
# Download the Twilio helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client
# from datetime impo... | [
2,
17202,
23520,
4889,
37774,
21293,
17202,
198,
2,
6127,
1912,
319,
3740,
1378,
2503,
13,
4246,
346,
952,
13,
785,
14,
31628,
14,
38888,
14,
15042,
14,
13345,
12,
13237,
12,
12363,
1891,
198,
2,
10472,
11361,
513,
422,
3740,
1378,
... | 2.751724 | 435 |
# coding:utf-8
import _env
from os.path import join, dirname, abspath, exists, splitext
from os import walk, mkdir, remove, makedirs
from collections import defaultdict
from hashlib import md5
from glob import glob
from base64 import urlsafe_b64encode
import envoy
import os
from tempfile import mktemp
from json import... | [
2,
19617,
25,
40477,
12,
23,
198,
198,
11748,
4808,
24330,
198,
6738,
28686,
13,
6978,
1330,
4654,
11,
26672,
3672,
11,
2352,
6978,
11,
7160,
11,
4328,
578,
742,
198,
6738,
28686,
1330,
2513,
11,
33480,
15908,
11,
4781,
11,
285,
433... | 2.082545 | 1,163 |
from flask import Blueprint, Flask, render_template, request, redirect
from models.transaction import Transaction
import repositories.transaction_repository as transaction_repo
import repositories.merchant_repository as merchant_repo
import repositories.tag_repository as tag_repo
transactions_blueprint = Blueprint("t... | [
6738,
42903,
1330,
39932,
11,
46947,
11,
8543,
62,
28243,
11,
2581,
11,
18941,
198,
198,
6738,
4981,
13,
7645,
2673,
1330,
45389,
198,
11748,
38072,
13,
7645,
2673,
62,
260,
1930,
37765,
355,
8611,
62,
260,
7501,
198,
11748,
38072,
13... | 4.083333 | 84 |
import asyncio
import copy
import csv
import io
import math
from math import inf
import os
import sys
import time
import traceback
import logging
from importlib import reload
from datetime import datetime
import logging
import aiohttp
import discord
import requests
import json
import ujson
from discord.ext import comm... | [
11748,
30351,
952,
198,
11748,
4866,
198,
11748,
269,
21370,
198,
11748,
33245,
198,
11748,
10688,
198,
6738,
10688,
1330,
1167,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
640,
198,
11748,
12854,
1891,
198,
11748,
18931,
198,
6738,
... | 1.985944 | 1,992 |
import pytest
from evalml.data_checks import DataCheckActionCode
from evalml.data_checks.utils import handle_data_check_action_code
from evalml.problem_types import ProblemTypes
| [
11748,
12972,
9288,
198,
198,
6738,
5418,
4029,
13,
7890,
62,
42116,
1330,
6060,
9787,
31573,
198,
6738,
5418,
4029,
13,
7890,
62,
42116,
13,
26791,
1330,
5412,
62,
7890,
62,
9122,
62,
2673,
62,
8189,
198,
6738,
5418,
4029,
13,
45573,... | 3.693878 | 49 |
from astropy.io import fits
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
sns.set_style('ticks')
sns.set_context('paper', font_scale=1.7)
from plot_fits import get_wavelength, dopplerShift
from scipy.interpolate import interp1d
plt.rcParams['xtick.direction'] = 'in'
"""
Compare the spectrum ... | [
6738,
6468,
28338,
13,
952,
1330,
11414,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
384,
397,
1211,
355,
3013,
82,
198,
82,
5907,
13,
2617,
62,
7635,
10786,
83,
3378,
... | 1.819237 | 1,809 |
from statistical_hypothesis_testing.plots import plots_z_test
from statistical_hypothesis_testing.tails import Tail
#plots_z_test.create_critical_region_plot(alphas=[0.1, 0.05, 0.01], tails=Tail.RIGHT_TAILED)
plots_z_test.create_p_value_plot(0.5109,alpha=0.05,lang='cs', tails=Tail.RIGHT_TAILED)
| [
6738,
13905,
62,
36362,
313,
8497,
62,
33407,
13,
489,
1747,
1330,
21528,
62,
89,
62,
9288,
198,
6738,
13905,
62,
36362,
313,
8497,
62,
33407,
13,
26404,
1330,
21759,
628,
198,
2,
489,
1747,
62,
89,
62,
9288,
13,
17953,
62,
34666,
... | 2.504202 | 119 |
# -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2017-07-21 04:59
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import django.db.models.manager
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2980,
515,
416,
37770,
352,
13,
940,
319,
2177,
12,
2998,
12,
2481,
8702,
25,
3270,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
198,
6738,... | 2.844156 | 77 |
# -*- coding: utf-8 -*-
"""
@author: satohara
"""
import sys
sys.path.append('../')
import codecs
import numpy as np
import pandas as pd
from EnumerateLinearModel import EnumLasso
# data - x
fn = './data/call_method_32.b'
df = pd.read_csv(fn, sep=',', header=None)
data_id_x = np.array([int(v) for v in df.ix[1, 2:]])... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
31,
9800,
25,
3332,
1219,
3301,
198,
37811,
198,
198,
11748,
25064,
198,
17597,
13,
6978,
13,
33295,
10786,
40720,
11537,
198,
198,
11748,
40481,
82,
198,
11... | 2.09206 | 869 |
# coding: utf-8
"""
Couchbase Backup Service API
This is REST API allows users to remotely schedule and run backups, restores and merges as well as to explore various archives for all there Couchbase Clusters. # noqa: E501
OpenAPI spec version: 0.1.0
Generated by: https://github.com/swagger-api... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
37811,
198,
220,
220,
220,
48225,
8692,
35071,
4809,
7824,
628,
220,
220,
220,
770,
318,
30617,
7824,
3578,
2985,
284,
19863,
7269,
290,
1057,
35872,
11,
45815,
290,
4017,
3212,
355,
880,
35... | 2.68 | 350 |
from flask import Flask, jsonify, request
from db import db_session, init_db
from model import Funcion
app = Flask(__name__)
app.config["JSONIFY_PRETTYPRINT_REGULAR"] = False
init_db()
if __name__ == "__main__":
app.run(host="0.0.0.0", debug=True)
| [
6738,
42903,
1330,
46947,
11,
33918,
1958,
11,
2581,
198,
198,
6738,
20613,
1330,
20613,
62,
29891,
11,
2315,
62,
9945,
198,
6738,
2746,
1330,
11138,
66,
295,
198,
198,
1324,
796,
46947,
7,
834,
3672,
834,
8,
198,
1324,
13,
11250,
1... | 2.578431 | 102 |
import onnx
# Load the ONNX model
model = onnx.load("./mobilenetv2_new.onnx")
# model = onnx.load("../FaceAnti-Spoofing.onnx")
# Check that the IR is well formed
onnx.checker.check_model(model)
# Print a human readable representation of the graph
onnx.helper.printable_graph(model.graph)
print(model.graph)
| [
11748,
319,
77,
87,
198,
198,
2,
8778,
262,
440,
6144,
55,
2746,
198,
19849,
796,
319,
77,
87,
13,
2220,
7,
1911,
14,
76,
25898,
268,
316,
85,
17,
62,
3605,
13,
261,
77,
87,
4943,
198,
2,
2746,
796,
319,
77,
87,
13,
2220,
72... | 2.618644 | 118 |
import re
wires = {}
for i in open('day7.txt'):
set = re.match(r'([a-z0-9]+) -> ([a-z]+)',i)
if set:
wires[set.group(2)] = set.group(1)
op1 = re.match(r'(NOT) ([a-z0-9]+) -> ([a-z]+)',i)
if op1:
wires[op1.group(3)] = [op1.group(1), op1.group(2)]
op2 = re.match(r'([a-z0-9]+) (AND|OR|LSHIFT|RSHIFT) ([a-z0-9]+) ... | [
11748,
302,
198,
86,
2387,
796,
23884,
198,
1640,
1312,
287,
1280,
10786,
820,
22,
13,
14116,
6,
2599,
198,
900,
796,
302,
13,
15699,
7,
81,
6,
26933,
64,
12,
89,
15,
12,
24,
60,
28988,
4613,
29565,
64,
12,
89,
60,
28988,
3256,
... | 1.869565 | 253 |
import matplotlib.patches as mpatches
import matplotlib.pyplot as plt
import networkx as nx
import numpy as np
import pandas as pd
from math import cos, radians
def shift_position(pos, x_shift, y_shift) -> dict:
"""
Moves nodes' position by (x_shift, y_shift)
"""
return {n: (x + x_shift, y + y_shift)... | [
11748,
2603,
29487,
8019,
13,
8071,
2052,
355,
285,
8071,
2052,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
3127,
87,
355,
299,
87,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
19798,
292,
355,
279,
67... | 2.268123 | 3,159 |
"""my_project URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.10/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class... | [
37811,
1820,
62,
16302,
10289,
28373,
198,
198,
464,
4600,
6371,
33279,
82,
63,
1351,
11926,
32336,
284,
5009,
13,
1114,
517,
1321,
3387,
766,
25,
198,
220,
220,
220,
3740,
1378,
31628,
13,
28241,
648,
404,
305,
752,
13,
785,
14,
26... | 2.768212 | 453 |
#!/bin/env python3
from osgeo import ogr
import os
import csv
import settings
if __name__ == '__main__':
PlacesIntersector().run()
print("DONE")
| [
2,
48443,
8800,
14,
24330,
21015,
18,
198,
198,
6738,
28686,
469,
78,
1330,
267,
2164,
198,
11748,
28686,
198,
11748,
269,
21370,
198,
198,
11748,
6460,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220... | 2.633333 | 60 |
# scrapes both regular and shopping ads (top, right blocks)
from serpapi import GoogleSearch
import json, os
params = {
"api_key": os.getenv("API_KEY"),
"engine": "google",
"q": "buy coffee",
"gl": "us",
"hl": "en"
}
search = GoogleSearch(params)
results = search.get_dict()
if results.get("ads",... | [
2,
15881,
274,
1111,
3218,
290,
9735,
9011,
357,
4852,
11,
826,
7021,
8,
198,
198,
6738,
1055,
79,
15042,
1330,
3012,
18243,
198,
11748,
33918,
11,
28686,
198,
198,
37266,
796,
1391,
198,
220,
220,
220,
366,
15042,
62,
2539,
1298,
2... | 2.566372 | 226 |
import click
from tomomibot.cli import pass_context
from tomomibot.runtime import Runtime
from tomomibot.utils import check_valid_voice, check_valid_model
from tomomibot.const import (INTERVAL_SEC, INPUT_DEVICE, OUTPUT_CHANNEL,
INPUT_CHANNEL, OUTPUT_DEVICE, SAMPLE_RATE,
... | [
11748,
3904,
198,
198,
6738,
16667,
296,
571,
313,
13,
44506,
1330,
1208,
62,
22866,
198,
6738,
16667,
296,
571,
313,
13,
43282,
1330,
43160,
198,
6738,
16667,
296,
571,
313,
13,
26791,
1330,
2198,
62,
12102,
62,
38888,
11,
2198,
62,
... | 1.894531 | 256 |
"""
MIT License
Copyrights 2020, Philippe-Henri Gosselin.
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 limitation the rights to
use, copy, modify, merg... | [
37811,
198,
36393,
13789,
198,
198,
13379,
49158,
220,
12131,
11,
39393,
12,
26055,
380,
30007,
741,
259,
13,
198,
198,
5990,
3411,
318,
29376,
7520,
11,
1479,
286,
3877,
11,
284,
597,
1048,
16727,
257,
4866,
286,
220,
198,
5661,
3788... | 3.219336 | 693 |
import fbchat
import random as rd
from .logger import logger
from ..bot_actions import BotActions
from ..sql import handling_group_sql
BOT_WELCOME_MESSAGE = """ Witajcie, jestem botem
Jeli chcesz zobaczy moje komendy napisz !help"""
| [
11748,
277,
65,
17006,
198,
11748,
4738,
355,
374,
67,
198,
198,
6738,
764,
6404,
1362,
1330,
49706,
198,
6738,
11485,
13645,
62,
4658,
1330,
18579,
32,
2733,
198,
6738,
11485,
25410,
1330,
9041,
62,
8094,
62,
25410,
628,
198,
33,
239... | 2.707865 | 89 |
import os
import xml.etree.ElementTree as ET
| [
11748,
28686,
198,
11748,
35555,
13,
316,
631,
13,
20180,
27660,
355,
12152,
628,
198
] | 3.133333 | 15 |
import os
import time
import shutil
import pickle
import torch
import torch.nn.functional as F
from tqdm import tqdm
from torch.optim.lr_scheduler import ReduceLROnPlateau
from tensorboard_logger import configure, log_value
import pandas as pd
from model import RecurrentAttention
from stop_model import StopRecurren... | [
11748,
28686,
198,
11748,
640,
198,
11748,
4423,
346,
198,
11748,
2298,
293,
198,
198,
11748,
28034,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
198,
198,
6738,
256,
80,
36020,
1330,
256,
80,
36020,
198,
6738,
28034,
13,
40085,
... | 2.00714 | 7,003 |
from rest_framework import serializers
from .models import ShopItem
| [
6738,
1334,
62,
30604,
1330,
11389,
11341,
198,
198,
6738,
764,
27530,
1330,
13705,
7449,
628
] | 4.375 | 16 |
from flask import Flask, request
import telegram
from moneyGooseBot.master_mind import mainCommandHandler
from moneyGooseBot.credentials import URL, reset_key, bot_token, bot_user_name
from web_server import create_app
# https://api.telegram.org/bot1359229669:AAEm8MG26qbA9XjJyojVKvPI7jAdMVqAkc8/getMe
bot = telegram... | [
6738,
42903,
1330,
46947,
11,
2581,
198,
11748,
573,
30536,
198,
6738,
1637,
5247,
577,
20630,
13,
9866,
62,
10155,
1330,
1388,
21575,
25060,
198,
6738,
1637,
5247,
577,
20630,
13,
66,
445,
14817,
1330,
10289,
11,
13259,
62,
2539,
11,
... | 2.797814 | 183 |
import yaml
from collections import OrderedDict
yaml.add_constructor(u'tag:yaml.org,2002:omap', construct_odict)
def repr_pairs(dump, tag, sequence, flow_style=None):
"""This is the same code as BaseRepresenter.represent_sequence(),
but the value passed to dump.represent_data() in the loop is a
dictionar... | [
11748,
331,
43695,
198,
6738,
17268,
1330,
14230,
1068,
35,
713,
198,
220,
198,
88,
43695,
13,
2860,
62,
41571,
273,
7,
84,
470,
363,
25,
88,
43695,
13,
2398,
11,
16942,
25,
296,
499,
3256,
5678,
62,
375,
713,
8,
198,
198,
4299,
... | 2.385135 | 592 |
#!/usr/bin/env python
import json
from mimetypes import guess_type
import urllib
import envoy
from flask import Flask, Markup, abort, render_template, redirect, Response
import app_config
from models import Joke, Episode, EpisodeJoke, JokeConnection
from render_utils import flatten_app_config, make_context
app = Fl... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
33918,
198,
6738,
17007,
2963,
12272,
1330,
4724,
62,
4906,
198,
11748,
2956,
297,
571,
198,
198,
11748,
39137,
198,
6738,
42903,
1330,
46947,
11,
2940,
929,
11,
15614,
11,
... | 3.225806 | 186 |
# MIT License
#
# Copyright (c) 2020 Oleksii Petrenko
#
# 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 limitation the rights
# to use, copy... | [
2,
220,
220,
17168,
13789,
198,
2,
198,
2,
220,
220,
15069,
357,
66,
8,
12131,
30093,
591,
4178,
4767,
918,
7204,
198,
2,
198,
2,
220,
220,
2448,
3411,
318,
29376,
7520,
11,
1479,
286,
3877,
11,
284,
597,
1048,
16727,
257,
4866,
... | 2.441425 | 4,968 |
import traffic_tests
from vn_test import *
from vm_test import *
from floating_ip import *
from policy_test import *
from compute_node_test import ComputeNodeFixture
from user_test import UserFixture
from multiple_vn_vm_test import *
from tcutils.wrappers import preposttest_wrapper
sys.path.append(os.path.realpath('tcu... | [
11748,
4979,
62,
41989,
198,
6738,
410,
77,
62,
9288,
1330,
1635,
198,
6738,
45887,
62,
9288,
1330,
1635,
198,
6738,
12462,
62,
541,
1330,
1635,
198,
6738,
2450,
62,
9288,
1330,
1635,
198,
6738,
24061,
62,
17440,
62,
9288,
1330,
3082,... | 3.244275 | 262 |
# -*- coding: utf-8 -*-
import json
import base64
import decimal
from unittest import TestCase
import requests
import responses
from odata.tests import Service, Product, DemoUnboundAction
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
11748,
33918,
198,
11748,
2779,
2414,
198,
11748,
32465,
198,
6738,
555,
715,
395,
1330,
6208,
20448,
198,
198,
11748,
7007,
198,
11748,
9109,
198,
198,
6738,
267,
... | 3.428571 | 56 |
import torch | [
11748,
28034
] | 6 | 2 |
from ef.external_field import ExternalField
| [
6738,
304,
69,
13,
22615,
62,
3245,
1330,
34579,
15878,
628
] | 4.090909 | 11 |
import logging
import re
import json
import jsonlines
from urllib import parse
logger = logging.getLogger(__name__)
# EFO
# The current implementation is based on the conversion from owl format to json lines format using Apache RIOT
# The structure disease_obsolete stores the obsolete terms and it is used to retriev... | [
11748,
18931,
198,
11748,
302,
198,
11748,
33918,
198,
11748,
33918,
6615,
198,
6738,
2956,
297,
571,
1330,
21136,
198,
198,
6404,
1362,
796,
18931,
13,
1136,
11187,
1362,
7,
834,
3672,
834,
8,
628,
198,
2,
412,
6080,
198,
2,
383,
1... | 4.298246 | 114 |
import numpy as np
from interaction3 import abstract
from interaction3.arrays import matrix
from interaction3.mfield.solvers.transmit_receive_beamplot_2 import TransmitReceiveBeamplot2
array = matrix.create(nelem=[2, 2])
simulation = abstract.MfieldSimulation(sampling_frequency=100e6,
... | [
198,
11748,
299,
32152,
355,
45941,
198,
198,
6738,
10375,
18,
1330,
12531,
198,
6738,
10375,
18,
13,
3258,
592,
1330,
17593,
198,
6738,
10375,
18,
13,
76,
3245,
13,
34453,
690,
13,
7645,
2781,
62,
260,
15164,
62,
40045,
29487,
62,
... | 1.717391 | 552 |
#!/usr/bin/env python2
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __fu... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
17,
198,
198,
2,
15069,
357,
66,
8,
3203,
11,
3457,
13,
290,
663,
29116,
13,
198,
2,
198,
2,
770,
2723,
2438,
318,
11971,
739,
262,
17168,
5964,
1043,
287,
262,
198,
2,
38559,
24290,
... | 2.229651 | 688 |
# -*- coding: utf-8 -*-
'''
* finance4py
* Based on Python Data Analysis Library.
* 2016/03/22 by Sheg-Huai Wang <m10215059@csie.ntust.edu.tw>
* Copyright (c) 2016, finance4py team
* All rights reserved.
* Redistribution and use in source and binary forms, with or without modification,
are permitted ... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
7061,
6,
198,
1635,
9604,
19,
9078,
198,
1635,
13403,
319,
11361,
6060,
14691,
10074,
13,
198,
1635,
1584,
14,
3070,
14,
1828,
416,
1375,
70,
12,
38202,
1872,
15233,
1... | 2.965007 | 743 |
# coding: utf-8
# flake8: noqa
"""
ASR documentation
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: 1.0.dev
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import ab... | [
2,
19617,
25,
3384,
69,
12,
23,
198,
198,
2,
781,
539,
23,
25,
645,
20402,
198,
198,
37811,
198,
220,
220,
220,
7054,
49,
10314,
628,
220,
220,
220,
1400,
6764,
2810,
357,
27568,
416,
2451,
7928,
6127,
5235,
3740,
1378,
12567,
13,... | 3.317164 | 536 |
# -*- coding: utf-8 -*-
# Copyright (c) T. H.
import urllib.request
import re
import urllib.parse
import codecs
import filecmp
import os.path
import os
from bs4 import BeautifulSoup
from slacker import Slacker
from datetime import datetime
if __name__ == '__main__':
slack = Slack('...')
print(slack.get_chan... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
15069,
357,
66,
8,
309,
13,
367,
13,
198,
198,
11748,
2956,
297,
571,
13,
25927,
198,
11748,
302,
198,
11748,
2956,
297,
571,
13,
29572,
198,
11748,
40481,
82,
19... | 2.122072 | 811 |
import numpy as _np
from minitf.kernel.core import notrace_primitive
from minitf.kernel.core import primitive
# ----- Differentiable functions -----
add = primitive(_np.add)
subtract = primitive(_np.subtract)
multiply = primitive(_np.multiply)
divide = primitive(_np.divide)
dot = primitive(_np.dot)
square = primitive... | [
11748,
299,
32152,
355,
4808,
37659,
198,
198,
6738,
949,
270,
69,
13,
33885,
13,
7295,
1330,
407,
16740,
62,
19795,
1800,
198,
6738,
949,
270,
69,
13,
33885,
13,
7295,
1330,
20049,
198,
198,
2,
37404,
20615,
3379,
5499,
37404,
198,
... | 3.197802 | 182 |
# -*- coding: utf-8 -*-
# Generated by Django 1.9.2 on 2017-01-10 20:41
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2980,
515,
416,
37770,
352,
13,
24,
13,
17,
319,
2177,
12,
486,
12,
940,
1160,
25,
3901,
198,
6738,
11593,
37443,
834,
1330,
28000,
1098,
62,
17201,
874,
198,
198... | 2.87013 | 77 |
# uncompyle6 version 3.7.4
# Python bytecode 3.7 (3394)
# Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)]
# Embedded file name: T:\InGame\Gameplay\Scripts\Server\gsi_handlers\object_lost_and_found_service_handlers.py
# Compiled at: 2018-10-26 00:20:22
# Size of ... | [
2,
34318,
2349,
21,
2196,
513,
13,
22,
13,
19,
198,
2,
11361,
18022,
8189,
513,
13,
22,
357,
2091,
5824,
8,
198,
2,
4280,
3361,
3902,
422,
25,
11361,
513,
13,
22,
13,
24,
357,
31499,
14,
85,
18,
13,
22,
13,
24,
25,
1485,
66,... | 2.745192 | 416 |
#Importing OpenAI gym package and MuJoCo engine
import gym
import numpy as np
import mujoco_py
import matplotlib.pyplot as plt
import env
#Setting MountainCar-v0 as the environment
env = gym.make('InvertedPendulum-down')
#Sets an initial state
env.reset()
print (env.action_space)
# Rendering our instance 300 times
i =... | [
2,
20939,
278,
4946,
20185,
11550,
5301,
290,
8252,
9908,
7222,
3113,
198,
11748,
11550,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
285,
23577,
25634,
62,
9078,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
117... | 3.004386 | 228 |
import matplotlib.pyplot as plt
import numpy as np
from scipy.special import logit
import pandas as pd
from matplotlib.axes import Axes, Subplot
from matplotlib.collections import LineCollection
from matplotlib.colors import ListedColormap, BoundaryNorm
SMALL = 14
SIZE = 16
plt.rc('font', size=SIZE) # controls defaul... | [
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
629,
541,
88,
13,
20887,
1330,
2604,
270,
198,
11748,
19798,
292,
355,
279,
67,
198,
6738,
2603,
29487,
8019,
13,
897,
274,
1330,
... | 2.787234 | 376 |
#!/usr/bin/env python3
import numpy as np
import math
import random
import time
import scipy.misc
import scipy.signal
import multiprocessing
import json
import itertools
import os
import pprint
from collections import namedtuple
from fractions import gcd
from optimized import get_distance
OBSTACLE = -1
MAX = 21474836... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
10688,
198,
11748,
4738,
198,
11748,
640,
198,
11748,
629,
541,
88,
13,
44374,
198,
11748,
629,
541,
88,
13,
12683,
282,
198,
11748,... | 2.470226 | 4,870 |
from __future__ import annotations
from typing import Union
from luxor.core.events import Event
from luxor.controllers.expressions import Var
Number = Union[int, float, Int]
| [
6738,
11593,
37443,
834,
1330,
37647,
198,
6738,
19720,
1330,
4479,
198,
6738,
10632,
273,
13,
7295,
13,
31534,
1330,
8558,
198,
6738,
10632,
273,
13,
3642,
36667,
13,
42712,
507,
1330,
12372,
628,
198,
198,
15057,
796,
4479,
58,
600,
... | 3.765957 | 47 |
5 5 integer
5.0 5.0 float
5 % 2 1 int
5 > 1 True boolean
'5' '5' String
5 * 2 10 int
'5' * 2 '55' String
'5' + '2' '52' String
5 / 2 2.5 float
5 // 2 ... | [
20,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
642,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
18253,
198,
20,
13,
15,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
642,
13,
15,
... | 1.35082 | 305 |
import argparse
import arrow
import json
import config
from . import EdgecastReportReader
from media_type import PLATFORM
| [
11748,
1822,
29572,
198,
11748,
15452,
198,
11748,
33918,
198,
11748,
4566,
198,
6738,
764,
1330,
13113,
2701,
19100,
33634,
198,
6738,
2056,
62,
4906,
1330,
9297,
1404,
21389,
628
] | 4.1 | 30 |
#!/usr/bin/python
"""
ZetCode wxPython tutorial
This program creates a browser UI.
author: Jan Bodnar
website: zetcode.com
last edited: May 2018
"""
import wx
from wx.lib.buttons import GenBitmapTextButton
if __name__ == '__main__':
main()
| [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
198,
37811,
198,
57,
316,
10669,
266,
87,
37906,
11808,
198,
198,
1212,
1430,
8075,
257,
6444,
12454,
13,
198,
198,
9800,
25,
2365,
26285,
23955,
198,
732,
12485,
25,
1976,
316,
8189,
13,
7... | 2.758242 | 91 |
import torch
import torch.nn as nn
if __name__ == "__main__":
model = TDSBlock(15, 10, 80, 0.1, 1)
x = torch.rand(8, 15, 80, 400)
import time
start = time.perf_counter()
model(x)
end = time.perf_counter()
print(f"Time taken: {(end-start)*1000:.3f}ms")
| [
11748,
28034,
198,
11748,
28034,
13,
20471,
355,
299,
77,
628,
198,
198,
361,
11593,
3672,
834,
6624,
366,
834,
12417,
834,
1298,
198,
220,
220,
220,
2746,
796,
309,
5258,
12235,
7,
1314,
11,
838,
11,
4019,
11,
657,
13,
16,
11,
35... | 2.193798 | 129 |
from ._base import Endpoint
from ..util._six import Path
import bottle
from ..util import gitHttpBackend
def git_repo(route, repo_root, **serve_params):
""" Defines Git repo endpoint on given route with given root.
Endpoint() objects will be created for GET and POST.
Rest of parameters will be passed through to un... | [
6738,
47540,
8692,
1330,
5268,
4122,
198,
6738,
11485,
22602,
13557,
19412,
1330,
10644,
198,
11748,
9294,
198,
6738,
11485,
22602,
1330,
17606,
43481,
7282,
437,
198,
198,
4299,
17606,
62,
260,
7501,
7,
38629,
11,
29924,
62,
15763,
11,
... | 3.255708 | 219 |
# Copyright (C) 2020 NVIDIA Corporation. All rights reserved.
#
# This work is made available under the Nvidia Source Code License-NC.
# To view a copy of this license, check out LICENSE.md
import torch
import torch.nn as nn
from imaginaire.layers import Conv2dBlock
from imaginaire.layers.misc import ApplyNoise... | [
2,
15069,
357,
34,
8,
12131,
15127,
10501,
13,
220,
1439,
2489,
10395,
13,
201,
198,
2,
201,
198,
2,
770,
670,
318,
925,
1695,
739,
262,
27699,
8090,
6127,
13789,
12,
7792,
13,
201,
198,
2,
1675,
1570,
257,
4866,
286,
428,
5964,
... | 2.678112 | 233 |
import sqlite3
| [
11748,
44161,
578,
18,
628
] | 3.2 | 5 |
# -*- coding: utf-8 -*-
"""Non user friendly script.
"""
from mss.core.class_filesystem import Filesystem
def update_by_condition(root_path: str, theme: str):
"""Change records by condition."""
fs = Filesystem()
path = fs.join(root_path, theme, 'metainfo')
for folder, filename, name, ext in fs.iter_... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
15419,
2836,
8030,
4226,
13,
198,
37811,
198,
6738,
285,
824,
13,
7295,
13,
4871,
62,
16624,
6781,
1330,
13283,
6781,
628,
198,
4299,
4296,
62,
1525,
62,
3... | 2.228029 | 421 |
from environment import *
import random | [
6738,
2858,
1330,
1635,
198,
11748,
4738
] | 5.571429 | 7 |
from enum import Enum
from math import *
from scipy import integrate
import matplotlib.pyplot as plt
from libcellml import *
import lxml.etree as ET
__version__ = "0.1.0"
LIBCELLML_VERSION = "0.2.0"
STATE_COUNT = 1
VARIABLE_COUNT = 29
VOI_INFO = {"name": "time", "units": "second", "component": "environment"}
STAT... | [
6738,
33829,
1330,
2039,
388,
198,
6738,
10688,
1330,
1635,
198,
6738,
629,
541,
88,
1330,
19386,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
6738,
9195,
3846,
4029,
1330,
1635,
198,
11748,
300,
19875,
13,
316,
... | 2.403838 | 2,293 |
# AUTOGENERATED! DO NOT EDIT! File to edit: image.ipynb (unless otherwise specified).
__all__ = ['Img', 'FileImg', 'File16bitImg', 'ArrayImg']
# Cell
import warnings
import numpy as np
import torch
from PIL import Image
from .utils import *
# Cell
# Cell
# Cell
# Cell | [
2,
47044,
7730,
1677,
1137,
11617,
0,
8410,
5626,
48483,
0,
9220,
284,
4370,
25,
2939,
13,
541,
2047,
65,
357,
25252,
4306,
7368,
737,
198,
198,
834,
439,
834,
796,
37250,
3546,
70,
3256,
705,
8979,
3546,
70,
3256,
705,
8979,
1433,
... | 2.816327 | 98 |
# coding=utf-8
# Copyright 2021 DeepMind Technologies Limited.
#
# 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,
19617,
28,
40477,
12,
23,
198,
2,
15069,
33448,
10766,
28478,
21852,
15302,
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,
2... | 3.219239 | 447 |
import socket
from IPy import IP
print("""
You are using the DOOM Port scanner.
This tool is for educational purpose ONLY!!!!
1. You can change the range of the ports you want to scan.
2. You can change the speedof the scan
3. you can scan a list of targets by using ', ' after each target
4. You can sc... | [
11748,
17802,
220,
201,
198,
6738,
6101,
88,
1330,
6101,
201,
198,
201,
198,
201,
198,
4798,
7203,
15931,
201,
198,
1639,
389,
1262,
262,
8410,
2662,
4347,
27474,
13,
201,
198,
201,
198,
1212,
2891,
318,
329,
9856,
4007,
22224,
13896,... | 2.656836 | 373 |
from __future__ import print_function
import logging
import numpy as np
from optparse import OptionParser
import sys
from time import time
import matplotlib.pyplot as plt
from sklearn.feature_extraction.text import TfidfVectorizer, CountVectorizer
from sklearn.feature_extraction.text import HashingVectorizer
from skl... | [
6738,
11593,
37443,
834,
1330,
3601,
62,
8818,
198,
198,
11748,
18931,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
2172,
29572,
1330,
16018,
46677,
198,
11748,
25064,
198,
6738,
640,
1330,
640,
198,
11748,
2603,
29487,
8019,
13,
9078,
... | 2.609605 | 2,915 |
# Copyright 2018 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... | [
2,
15069,
2864,
2297,
10983,
11,
3457,
13,
198,
2,
198,
2,
220,
220,
220,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
345,
743,
198,
2,
220,
220,
220,
407,
779,
428,
2393,
2845,
287,
11846,... | 3.526012 | 346 |
from pdfminer.pdfinterp import PDFResourceManager, process_pdf
from pdfminer.converter import TextConverter
from pdfminer.layout import LAParams
from cStringIO import StringIO
with open('C:\\Users\\ashis\\Desktop\\CIVIL ENGINEERING.txt', 'w') as to_write:
to_write.write(convert_pdf('C:\\Users\\ashis\\Desktop\\CIV... | [
6738,
37124,
1084,
263,
13,
12315,
3849,
79,
1330,
12960,
26198,
13511,
11,
1429,
62,
12315,
198,
6738,
37124,
1084,
263,
13,
1102,
332,
353,
1330,
8255,
3103,
332,
353,
198,
6738,
37124,
1084,
263,
13,
39786,
1330,
406,
2969,
283,
41... | 2.85 | 120 |
from ..utility import *
| [
6738,
11485,
315,
879,
1330,
1635,
198
] | 3.428571 | 7 |
""" Unit Tests for Py-ART's io/mdv_radar.py module. """
import numpy as np
from numpy.testing import assert_almost_equal
from numpy.ma.core import MaskedArray
import pyart
############################################
# read_mdv tests (verify radar attributes) #
############################################
# read in... | [
37811,
11801,
30307,
329,
9485,
12,
7227,
338,
33245,
14,
9132,
85,
62,
6335,
283,
13,
9078,
8265,
13,
37227,
198,
198,
11748,
299,
32152,
355,
45941,
198,
6738,
299,
32152,
13,
33407,
1330,
6818,
62,
28177,
62,
40496,
198,
6738,
299,... | 3.265957 | 564 |
import uuid, json, os, pymongo
from models import User
| [
11748,
334,
27112,
11,
33918,
11,
28686,
11,
279,
4948,
25162,
198,
198,
6738,
4981,
1330,
11787,
628,
628
] | 3.105263 | 19 |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
from enum import Enum
__all__ = [
'DiskType',
]
| [
2,
19617,
28,
40477,
12,
23,
198,
2,
17202,
39410,
25,
428,
2393,
373,
7560,
416,
262,
21624,
12994,
26144,
35986,
13,
17202,
198,
2,
17202,
2141,
407,
4370,
416,
1021,
4556,
345,
821,
1728,
345,
760,
644,
345,
389,
1804,
0,
17202,
... | 3.279412 | 68 |
#!/usr/bin/env python3
"""Importing"""
# Importing Common Files
from botModule.importCommon import *
"""Start Handler"""
"""Help Handler"""
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
628,
198,
37811,
20939,
278,
37811,
198,
2,
17267,
278,
8070,
13283,
198,
6738,
10214,
26796,
13,
11748,
17227,
1330,
1635,
628,
198,
37811,
10434,
32412,
37811,
628,
198,
37811,
22087,
3... | 3.418605 | 43 |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
from flask import Blueprint
filter_blueprint = Blueprint('filters', __name__)
# Register all the filter.
from . import time_process, text_process, user_manage | [
2,
0,
1220,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
42903,
1330,
39932,
198,
24455,
62,
17585,
4798,
796,
39932,
10786,
10379,
1010,
3256,
11593,
3672,
834,
8,
198... | 3.074627 | 67 |
import numpy as np
import scipy as sp
import pandas as pd
import ast
import itertools
from itertools import product
from collections import Counter
import networkx as nx
import network_utils as nu
import hicode as hc
import matplotlib.pyplot as plt
import matplotlib.cm as cm
plt.style.use('classic')
# ------------... | [
11748,
299,
32152,
355,
45941,
198,
11748,
629,
541,
88,
355,
599,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
6468,
198,
11748,
340,
861,
10141,
198,
6738,
340,
861,
10141,
1330,
1720,
198,
6738,
17268,
1330,
15034,
198,
198,
1... | 2.711916 | 1,326 |
from ..bs_node.iterable import BSNodeIterable
from ..bs_reference.iter import BSReferenceIter
| [
6738,
11485,
1443,
62,
17440,
13,
2676,
540,
1330,
347,
15571,
1098,
29993,
540,
198,
6738,
11485,
1443,
62,
35790,
13,
2676,
1330,
24218,
26687,
29993,
198
] | 3.481481 | 27 |
'''
pca_utils.py
Module containing functions to run PCAs, and generate diagnostic plots
'''
from sklearn.decomposition import PCA
import matplotlib.pyplot as plt
import numpy as np
def run_PCA(parameters, observables, n_components):
'''
Runs a principal component analysis to reduce dimensionality of
o... | [
7061,
6,
198,
79,
6888,
62,
26791,
13,
9078,
198,
198,
26796,
7268,
5499,
284,
1057,
4217,
1722,
11,
290,
7716,
23584,
21528,
198,
7061,
6,
198,
198,
6738,
1341,
35720,
13,
12501,
296,
9150,
1330,
4217,
32,
198,
198,
11748,
2603,
29... | 2.878804 | 1,906 |
# Copyright 2022 Google.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, soft... | [
2,
15069,
33160,
3012,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
13,
198,
2,
921,
743,
7330,
... | 2.215564 | 7,877 |
from django_rq.decorators import job
from src.core.core import runtime_calculate
from src.jobs.models import JobStatuses
from src.jobs.ws_publisher import publish
from src.logs.models import Log
from src.utils.file_service import get_log
| [
6738,
42625,
14208,
62,
81,
80,
13,
12501,
273,
2024,
1330,
1693,
198,
198,
6738,
12351,
13,
7295,
13,
7295,
1330,
19124,
62,
9948,
3129,
378,
198,
6738,
12351,
13,
43863,
13,
27530,
1330,
15768,
17126,
2664,
198,
6738,
12351,
13,
438... | 3.287671 | 73 |
default_app_config = 'django_models_from_csv.apps.DjangoDynamicModelsConfig'
__version__ = "1.1.0"
| [
12286,
62,
1324,
62,
11250,
796,
705,
28241,
14208,
62,
27530,
62,
6738,
62,
40664,
13,
18211,
13,
35,
73,
14208,
44090,
5841,
1424,
16934,
6,
198,
834,
9641,
834,
796,
366,
16,
13,
16,
13,
15,
1,
198
] | 2.538462 | 39 |
from .legacy import uTensorLegacyCodeGenerator
from .rearch import uTensorRearchCodeGenerator | [
6738,
764,
1455,
1590,
1330,
334,
51,
22854,
11484,
1590,
10669,
8645,
1352,
198,
6738,
764,
260,
998,
1330,
334,
51,
22854,
49,
3679,
10669,
8645,
1352
] | 3.444444 | 27 |
from collections import UserString
from typing import List
| [
6738,
17268,
1330,
11787,
10100,
198,
6738,
19720,
1330,
7343,
198
] | 5.363636 | 11 |
import os
import time
import math
import logging.config
from datetime import datetime
from subprocess import run
from urllib.request import urlopen, urlretrieve
from urllib.parse import urlparse, urljoin
import smtplib, ssl
from os.path import basename
from email.mime.application import MIMEApplication
from email.mime... | [
11748,
28686,
198,
11748,
640,
198,
11748,
10688,
198,
11748,
18931,
13,
11250,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
6738,
850,
14681,
1330,
1057,
198,
6738,
2956,
297,
571,
13,
25927,
1330,
19016,
9654,
11,
19016,
1186,
30227,
... | 3.012821 | 234 |
# -*- coding: utf-8 -*-
###############################################################################
# Copyright (c), Forschungszentrum Jlich GmbH, IAS-1/PGI-1, Germany. #
# All rights reserved. #
# This file is part of the AiiDA-FLEUR package. ... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
29113,
29113,
7804,
4242,
21017,
198,
2,
15069,
357,
66,
828,
27325,
354,
2150,
82,
89,
298,
6582,
449,
33467,
402,
2022,
39,
11,
314,
1921,
12,
16,
14,
6968,
40,
12... | 2.636225 | 657 |
from .utils import ShellParser
| [
6738,
764,
26791,
1330,
17537,
46677,
628
] | 4.571429 | 7 |
#!/usr/bin/env python
from __future__ import absolute_import
from create_multi_langs.creater.go import CreaterGo
from create_multi_langs.creater.python import CreaterPython
from create_multi_langs.creater.python_typing import CreaterPythonTyping
from create_multi_langs.creater.typescript_backend import CreaterTypeScrip... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
198,
6738,
2251,
62,
41684,
62,
17204,
82,
13,
20123,
263,
13,
2188,
1330,
7921,
263,
5247,
198,
6738,
2251,
62,
41684,
62,
17204,
82,
... | 3.091603 | 262 |
__author__ = 'Justus Adam'
__version__ = '0.1'
if __name__ == '__main__':
main()
else:
del main | [
834,
9800,
834,
796,
705,
5703,
385,
7244,
6,
198,
834,
9641,
834,
796,
705,
15,
13,
16,
6,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
1388,
3419,
198,
17772,
25,
198,
220,
220,
... | 2.255319 | 47 |
import re
#parse_to_latex()
#get_averages()
#revert()
get_averages_reverted()
| [
11748,
302,
198,
198,
2,
29572,
62,
1462,
62,
17660,
87,
3419,
628,
198,
2,
1136,
62,
8770,
1095,
3419,
198,
198,
2,
260,
1851,
3419,
628,
628,
198,
1136,
62,
8770,
1095,
62,
260,
13658,
3419,
628,
628,
628,
628,
628,
628,
628,
... | 2.222222 | 45 |
import matplotlib
matplotlib.use('Agg')
# coding: utf-8
#
# Ice drift retrieval algorithm based on [1] from a pair of SAR images
# [1] J. P. Lewis, "Fast Normalized Cross-Correlation", Industrial Light and Magic.
#
##################################################
# Last modification: 22 July, 2019
# TODO:
# 1) Pyrami... | [
11748,
2603,
29487,
8019,
198,
6759,
29487,
8019,
13,
1904,
10786,
46384,
11537,
198,
2,
19617,
25,
3384,
69,
12,
23,
198,
2,
198,
2,
6663,
24260,
45069,
11862,
1912,
319,
685,
16,
60,
422,
257,
5166,
286,
47341,
4263,
198,
2,
685,
... | 2.054736 | 18,909 |
from betterproto import __version__
from pathlib import Path
import tomlkit
PROJECT_TOML = Path(__file__).joinpath("..", "..", "pyproject.toml").resolve()
| [
6738,
1365,
1676,
1462,
1330,
11593,
9641,
834,
198,
6738,
3108,
8019,
1330,
10644,
198,
11748,
284,
4029,
15813,
198,
198,
31190,
23680,
62,
51,
2662,
43,
796,
10644,
7,
834,
7753,
834,
737,
22179,
6978,
7203,
492,
1600,
366,
492,
16... | 2.962264 | 53 |
'''Faa um programa que calcule a soma entre todos os nmeros impares que so mltiplos de trs e que se encontram
no intervalo de 1 at 500. '''
cont = 0
total = 0
for soma in range(1, 501, 2):
if soma % 3 == 0:
cont += 1
total += soma
print(f'Foram encontrados {cont} valores coma as caractersticas espe... | [
7061,
6,
37,
7252,
23781,
1430,
64,
8358,
2386,
23172,
257,
3870,
64,
920,
260,
284,
37427,
28686,
299,
647,
418,
848,
3565,
8358,
523,
285,
2528,
24705,
418,
390,
491,
82,
304,
8358,
384,
2207,
756,
859,
198,
3919,
16654,
78,
390,
... | 2.435065 | 154 |
"""classes and methods for different model architectures
"""
#python packages
import numpy as np
# Machine Learning from Scratch packages
from Layers import FullyConnected
from utils.optimizers import *
| [
37811,
37724,
290,
5050,
329,
1180,
2746,
45619,
198,
37811,
198,
2,
29412,
10392,
198,
11748,
299,
32152,
355,
45941,
198,
198,
2,
10850,
18252,
422,
1446,
36722,
10392,
198,
6738,
406,
6962,
1330,
40234,
13313,
276,
198,
6738,
3384,
4... | 4.340426 | 47 |
input = """
a(S,T,Z) :- #count{X: r(T,X)} = Z, #count{W: q(W,S)} = T, #count{K: p(K,Y)} = S.
q(1,1).
q(2,2).
r(1,1).
r(1,2).
r(1,3).
r(2,2).
r(3,3).
p(1,1).
p(2,2).
%out{ a(2,1,3) }
%repository error
"""
output = """
a(S,T,Z) :- #count{X: r(T,X)} = Z, #count{W: q(W,S)} = T, #count{K: p(K,Y)} = S.
q(1,1).
q(2,2)... | [
15414,
796,
37227,
198,
198,
64,
7,
50,
11,
51,
11,
57,
8,
1058,
12,
1303,
9127,
90,
55,
25,
374,
7,
51,
11,
55,
38165,
796,
1168,
11,
1303,
9127,
90,
54,
25,
10662,
7,
54,
11,
50,
38165,
796,
309,
11,
1303,
9127,
90,
42,
... | 1.431973 | 294 |
import argparse
import logging
import os
import requests
import urllib3
from dotenv import load_dotenv
logger = logging.getLogger("__name__")
logging.basicConfig(
format="%(asctime)s [%(levelname)8s] [%(name)s:%(lineno)s:%(funcName)20s()] --- %(message)s",
level=logging.INFO,
)
logging.getLogger("... | [
11748,
1822,
29572,
198,
11748,
18931,
198,
11748,
28686,
198,
198,
11748,
7007,
198,
11748,
2956,
297,
571,
18,
198,
6738,
16605,
24330,
1330,
3440,
62,
26518,
24330,
198,
198,
6404,
1362,
796,
18931,
13,
1136,
11187,
1362,
7203,
834,
... | 2.548463 | 423 |
"""Stuff to do with processing images and loading icons"""
import importlib.resources as res
import cv2
import PySimpleGUI as sg
def get_application_icon():
"""Get the PyHSI icon for this OS (.ico for Windows, .png otherwise)"""
return res.read_binary("pyhsi.gui.icons", "pyhsi.png")
def get_icon(icon_name... | [
37811,
1273,
1648,
284,
466,
351,
7587,
4263,
290,
11046,
17149,
37811,
198,
198,
11748,
1330,
8019,
13,
37540,
355,
581,
198,
198,
11748,
269,
85,
17,
198,
11748,
9485,
26437,
40156,
355,
264,
70,
628,
198,
4299,
651,
62,
31438,
62,
... | 2.40367 | 654 |
lr = 0.001
model_path = 'model/IC_models/densenet169_lr_0.001/'
crop_size = 32
log_step = 10
save_step = 500
num_epochs = 400
batch_size = 256
num_workers = 8
loading = False
# lr
# Model parameters
model = dict(
net='densenet169',
embed_size=256,
hidden_size=512,
num_layers=1,
resnet=101
)
| [
14050,
796,
657,
13,
8298,
198,
19849,
62,
6978,
796,
705,
19849,
14,
2149,
62,
27530,
14,
67,
18756,
316,
22172,
62,
14050,
62,
15,
13,
8298,
14,
6,
198,
31476,
62,
7857,
796,
3933,
198,
6404,
62,
9662,
796,
838,
198,
21928,
62,
... | 2.25 | 140 |
'''
Implements the computation of the time derivatives and associated Jacobian
corresponding to the approximated equations in a metapopulation. Added kwargs in
every function so that we may reuse the parameter dictionary used in the models,
even if some of the parameters it contains are not used in these functions.
'''... | [
7061,
6,
198,
3546,
1154,
902,
262,
29964,
286,
262,
640,
28486,
290,
3917,
12806,
666,
198,
10215,
5546,
278,
284,
262,
5561,
15655,
27490,
287,
257,
1138,
499,
404,
1741,
13,
10687,
479,
86,
22046,
287,
198,
16833,
2163,
523,
326,
... | 1.718607 | 2,182 |
import pygame
from settings import Settings
from vector import Vector
import utils
| [
11748,
12972,
6057,
198,
198,
6738,
6460,
1330,
16163,
198,
6738,
15879,
1330,
20650,
198,
11748,
3384,
4487,
628,
628
] | 4.35 | 20 |