content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
# -*- coding: utf-8 -*- """ Created on Wed Nov 3 04:38:07 2021 @author: User """ import sqlite3 connexion = sqlite3.connect("dbM2IQL.db") curseur = connexion.cursor() curseur.execute("""SELECT e.Nom, c.note FROM Etudiant as e INNER JOIN CF as c ON e.id = c.fk_etudiant ORDER BY c.note DESC LIMIT ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 3300, 5267, 220, 513, 8702, 25, 2548, 25, 2998, 33448, 201, 198, 201, 198, 31, 9800, 25, 11787, 201, 198, 37811, 201, 198, 11748, 441...
2.179012
162
#!/usr/bin/env python3 # -*- coding:utf-8 -*- import utils import os import os.path import sys import subprocess import re import time filepath = os.path.dirname(os.path.realpath(__file__)) small_time_delay = 5 ##--> Use this to set up your small time delay. This time delay is in seconds. medium_time_delay = 20 ##--...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 198, 11748, 3384, 4487, 198, 11748, 28686, 198, 11748, 28686, 13, 6978, 198, 11748, 25064, 198, 11748, 850, 14681, 198, ...
3.138339
7,778
import numpy as np
[ 11748, 299, 32152, 355, 45941, 628 ]
3.333333
6
#coding:utf-8 ######################### #Copyright(c) 2014 dtysky #########################
[ 2, 66, 7656, 25, 40477, 12, 23, 198, 14468, 7804, 2, 198, 2, 15269, 7, 66, 8, 1946, 288, 774, 15688, 198, 14468, 7804, 2 ]
3.64
25
from random import randint ataque()
[ 6738, 4738, 1330, 43720, 600, 628, 198, 198, 1045, 4188, 3419, 198 ]
3.25
12
#!/usr/bin/env python3 """ Script to extract the gp bias features from microscopy images """ import sys import json import os import copy as cp import numpy as np import glob import matplotlib.pyplot as plt import matplotlib from numpy.polynomial import polynomial import offsets as GS from probability_dist import * imp...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 198, 7391, 284, 7925, 262, 27809, 10690, 3033, 422, 21145, 11081, 4263, 198, 37811, 198, 11748, 25064, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 4866, 355, 31396, 198, ...
2.258129
2,983
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ A website monitor. """ import sys import traceback import requests import re import json import datetime DEFAULT_CONFIG_FILE = 'config.json'
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 32, 3052, 5671, 13, 198, 37811, 198, 198, 11748, 25064, 198, 11748, 12854, 1891, 198, 11748, 7007,...
2.814286
70
#!/usr/bin/env python from __future__ import print_function import sys sys.path.insert(0, '.') from cloudmanager.board import MicropythonBoards for result in MicropythonBoards().execute("import os;print(os.uname())"): print(result.read().strip())
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 11748, 25064, 198, 17597, 13, 6978, 13, 28463, 7, 15, 11, 705, 2637, 8, 198, 6738, 6279, 37153, 13, 3526, 1330, 7631, 1773, 7535, ...
3.085366
82
""" Name : c3_27_datadotworld_1.py Book : Hands-on Data Science with Anaconda) Publisher: Packt Publishing Ltd. Author : Yuxing Yan and James Yan Date : 1/15/2018 email : yany@canisius.edu paulyxy@hotmail.com """ import datadotworld as dw dataset = 'jonloyens/an-intro-to-dat...
[ 37811, 198, 220, 6530, 220, 220, 220, 220, 1058, 269, 18, 62, 1983, 62, 19608, 324, 313, 6894, 62, 16, 13, 9078, 198, 220, 4897, 220, 220, 220, 220, 1058, 22237, 12, 261, 6060, 5800, 351, 1052, 330, 13533, 8, 198, 220, 28045, 25, ...
2.263736
182
import re import os import errno import string import subprocess import k3color listtype = (tuple, list) invisible_chars = ''.join(map(chr, list(range(0, 32)))) invisible_chars_re = re.compile('[%s]' % re.escape(invisible_chars)) def line_pad(linestr, padding=''): """ :param linestr: multiple line string ...
[ 11748, 302, 198, 11748, 28686, 198, 11748, 11454, 3919, 198, 11748, 4731, 198, 11748, 850, 14681, 198, 11748, 479, 18, 8043, 198, 198, 4868, 4906, 796, 357, 83, 29291, 11, 1351, 8, 198, 198, 259, 23504, 62, 354, 945, 796, 705, 4458, ...
2.047828
6,377
import logging import math import numpy as np import pyglet import udSDK logger = logging.getLogger(__name__) def get_view_vertices(self): """ Returns ------- the extents of the viewing volume projected onto 2d space """ #TODO make this correctly display the location of near and far plane...
[ 11748, 18931, 198, 11748, 10688, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 70, 1616, 198, 198, 11748, 334, 67, 10305, 42, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628, 220, 825, ...
2.487138
2,488
import sys
[ 11748, 25064, 198 ]
3.666667
3
""" Defines the parameter template for the specified data type. """ from .basicarray import BASICARRAY def template(): """Factory method for this parameter template class""" return ULONG64ARRAY('GPLong')
[ 37811, 198, 7469, 1127, 262, 11507, 11055, 329, 262, 7368, 1366, 2099, 13, 198, 37811, 198, 198, 6738, 764, 35487, 18747, 1330, 29809, 2149, 1503, 30631, 628, 198, 4299, 11055, 33529, 198, 220, 220, 220, 37227, 22810, 2446, 329, 428, 11...
3.583333
60
# -*- coding: utf-8 -*- """Full Executer WordShop.ipynb Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1kGSQWNtImJknauUN9L8ZRRwIzAdwbmo_ First, we load the pegasus paraphraser. """ # Commented out IPython magic to ensure Python compatibility. !git cl...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 13295, 8393, 11894, 9678, 29917, 13, 541, 2047, 65, 198, 198, 38062, 4142, 7560, 416, 1623, 4820, 2870, 13, 198, 198, 20556, 2393, 318, 5140, 379, 198, 220, 220, ...
2.858145
2,566
import torch import os from model.visualization import Visualization from panel.main import tensorboard_panel from torch.utils.data.dataset import Subset import random import numpy as np def split_subsets(dataset,train_percentage=0.8,all_captions=True): """ Performs the split of the dataset into Train and Test """ ...
[ 11748, 28034, 198, 11748, 28686, 198, 6738, 2746, 13, 41464, 1634, 1330, 15612, 1634, 198, 6738, 6103, 13, 12417, 1330, 11192, 273, 3526, 62, 35330, 198, 6738, 28034, 13, 26791, 13, 7890, 13, 19608, 292, 316, 1330, 3834, 2617, 198, 1174...
2.772226
1,361
from flask import jsonify from sqlalchemy import func from datetime import datetime, date from models.previsao import Previsao, db
[ 6738, 42903, 1330, 33918, 1958, 198, 6738, 44161, 282, 26599, 1330, 25439, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 3128, 198, 6738, 4981, 13, 3866, 4703, 5488, 1330, 3771, 4703, 5488, 11, 20613 ]
3.823529
34
import sys,os import utils as cu params = cu.loadParams('fullList positivesList output') full = [x for x in open(params['fullList'])] positives = [x for x in open(params['positivesList'])] out = open(params['output'],'w') for r in full: if r not in positives: out.write(r) out.close()
[ 11748, 25064, 11, 418, 198, 11748, 3384, 4487, 355, 18912, 198, 198, 37266, 796, 18912, 13, 2220, 10044, 4105, 10786, 12853, 8053, 38548, 8053, 5072, 11537, 198, 198, 12853, 796, 685, 87, 329, 2124, 287, 1280, 7, 37266, 17816, 12853, 80...
2.790476
105
import pytest from rollinghub.db import get_db
[ 11748, 12972, 9288, 198, 6738, 10708, 40140, 13, 9945, 1330, 651, 62, 9945, 628, 628, 198 ]
3.1875
16
# -*- coding: utf-8 -*- """Load camera from FBX.""" from pathlib import Path import unreal from unreal import EditorAssetLibrary from unreal import EditorLevelLibrary from unreal import EditorLevelUtils from openpype.pipeline import ( AVALON_CONTAINER_ID, legacy_io, ) from openpype.hosts.unreal.api import plu...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 8912, 4676, 422, 13186, 55, 526, 15931, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 22865, 198, 6738, 22865, 1330, 12058, 45869, 23377, 198, 6738, 22865, 1...
3.07874
127
#!/usr/bin/env python3 """ Main application file """ __author__ = "Armend Ukehaxhaj" __version__ = "1.0.0" __license__ = "MIT" from logzero import logger import numpy as np import pandas as pd import csv import pickle from word2vec import word2vec from preprocessor import preprocessor import json primary_data_filen...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 198, 13383, 3586, 2393, 198, 37811, 198, 198, 834, 9800, 834, 796, 366, 26560, 437, 471, 365, 71, 897, 71, 1228, 1, 198, 834, 9641, 834, 796, 366, 16, 13, 15, 13, 15, ...
2.854651
172
"""Tests for ML models."""
[ 37811, 51, 3558, 329, 10373, 4981, 526, 15931, 198 ]
3
9
from typing import Optional, List from pyspark.sql import Column, DataFrame from pyspark.sql.functions import coalesce, to_timestamp from spark_auto_mapper.data_types.column import AutoMapperDataTypeColumn from spark_auto_mapper.data_types.data_type_base import AutoMapperDataTypeBase from spark_auto_mapper.data_types...
[ 6738, 19720, 1330, 32233, 11, 7343, 198, 198, 6738, 279, 893, 20928, 13, 25410, 1330, 29201, 11, 6060, 19778, 198, 6738, 279, 893, 20928, 13, 25410, 13, 12543, 2733, 1330, 46064, 344, 11, 284, 62, 16514, 27823, 198, 198, 6738, 9009, 6...
3.383117
154
# Generated by Django 3.2.9 on 2022-01-05 12:36 from django.db import migrations, models import django.db.models.manager
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 24, 319, 33160, 12, 486, 12, 2713, 1105, 25, 2623, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 37153, 628 ]
2.928571
42
# Python implementation of DBS PayLah! # By ttwj - 2017 import base64 import random import string #remember to install pycryptodome! import datetime from Crypto.Cipher import AES, PKCS1_v1_5 from Crypto.PublicKey import RSA import lxml.etree, json from lxml import html from pprint import pprint from io import String...
[ 2, 11361, 7822, 286, 360, 4462, 7119, 43, 993, 0, 198, 2, 2750, 256, 4246, 73, 532, 2177, 198, 11748, 2779, 2414, 198, 11748, 4738, 198, 11748, 4731, 198, 198, 2, 38947, 284, 2721, 12972, 29609, 375, 462, 0, 198, 198, 11748, 4818, ...
2.94012
334
import streamlit as st import dill import pandas as pd import plotly.express as px from datetime import date import statsmodels with open('compiled-sentiment-history.pkd', 'rb') as f: df_compiled = dill.load(f) df_compiled.drop_duplicates(inplace=True) dates = list({idx[1] for idx in df_compiled.ind...
[ 11748, 4269, 18250, 355, 336, 201, 198, 11748, 288, 359, 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 11748, 7110, 306, 13, 42712, 355, 279, 87, 201, 198, 6738, 4818, 8079, 1330, 3128, 201, 198, 11748, 9756, 27530, 201, 198, ...
2.265419
5,772
# Generated by Django 3.1.7 on 2021-03-01 20:26 from django.db import migrations, models import django.utils.timezone
[ 2, 2980, 515, 416, 37770, 513, 13, 16, 13, 22, 319, 33448, 12, 3070, 12, 486, 1160, 25, 2075, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 26791, 13, 2435, 11340, 628 ]
2.926829
41
from __future__ import absolute_import, unicode_literals import logging from time import sleep from datetime import datetime from .settings import PULSE_DURATION from .io import pull, release logger = logging.getLogger(__name__) def sleep_until_next_minute(): """ Sleeps until the time is xx:xx:00 with good...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 28000, 1098, 62, 17201, 874, 198, 11748, 18931, 198, 6738, 640, 1330, 3993, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 6738, 764, 33692, 1330, 350, 6239, 5188, 62, 35, 4261, ...
3.074074
162
some_number: int some_number = 'test'
[ 11246, 62, 17618, 25, 493, 198, 11246, 62, 17618, 796, 705, 9288, 6, 198 ]
2.714286
14
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2017-04-02 13:58 from django.db import migrations def forwards_func(apps, schema_editor): """Grant permissions for TwitterAccount to admins and mods. Includes creating a new view permission. """ # We can't import the models directly as they may be...
[ 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, 3023, 12, 2999, 1511, 25, 3365, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 628, 198, 4299, 22052, 62, ...
2.908858
779
#!/usr/bin/env python # -*- coding: utf-8 -*- # flake8: noqa """ Morlet Wavelet in time and Fourier domain ========================================= This example shows how to generate a wavelet filter-bank. """ import symjax import symjax.tensor as T import matplotlib.pyplot as plt import numpy as np J = 5 Q = 4 s...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 781, 539, 23, 25, 645, 20402, 198, 37811, 198, 20044, 1616, 17084, 1616, 287, 640, 290, 34296, 5277, 7386, 198, 10...
2.354922
386
from kfdata.manage import main main()
[ 6738, 479, 69, 7890, 13, 805, 496, 1330, 1388, 198, 198, 12417, 3419, 198 ]
2.785714
14
import sys #sys.stderr.write('Stderr text\n'); #sys.stderr.flush() #sys.stdout.write('Stdout text\n'); #print(sys.argv[1]) #if len(sys.argv)>1: # print(float(sys.argv[1])*5); main(sys.argv[1]);
[ 11748, 25064, 198, 2, 17597, 13, 301, 1082, 81, 13, 13564, 10786, 1273, 1082, 81, 2420, 59, 77, 24036, 198, 2, 17597, 13, 301, 1082, 81, 13, 25925, 3419, 198, 2, 17597, 13, 19282, 448, 13, 13564, 10786, 1273, 67, 448, 2420, 59, 77...
1.99
100
# flake8: noqa from .form import FormHandler from .slash import SlashHandler from .manual import ManualHandler from .interactions import ActionHandler, MessageHandler
[ 2, 781, 539, 23, 25, 645, 20402, 198, 6738, 764, 687, 1330, 5178, 25060, 198, 6738, 764, 6649, 1077, 1330, 26616, 25060, 198, 6738, 764, 805, 723, 1330, 17969, 25060, 198, 6738, 764, 3849, 4658, 1330, 7561, 25060, 11, 16000, 25060, 19...
3.97619
42
#!/usr/bin/env python # encoding:utf-8 """ Author : Yuanqing Mei Date : 2021/4/8 Time: 15:42 File: RocMethod.py HomePage : http://github.com/yuanqingmei Email : dg1533019@smail.nju.edu.cn This script find out the cutoff of a metric value by maximizing the AUC value and ROCBPPMFMGM methods. References [1] Bender, R. ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 21004, 25, 40477, 12, 23, 198, 37811, 198, 13838, 1058, 34071, 80, 278, 42244, 198, 10430, 1058, 33448, 14, 19, 14, 23, 198, 7575, 25, 1315, 25, 3682, 198, 8979, 25, 13545, 17410,...
2.767263
391
from django.db import models from django.utils import timezone from django.contrib.auth.models import User
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198 ]
3.566667
30
"""empty message Revision ID: 3cbc86a0a9d7 Revises: 77894fcde804 Create Date: 2018-09-27 12:25:31.893545 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '3cbc86a0a9d7' down_revision = '77894fcde804' branch_labels = None depends_on = None
[ 37811, 28920, 3275, 198, 198, 18009, 1166, 4522, 25, 513, 66, 15630, 4521, 64, 15, 64, 24, 67, 22, 198, 18009, 2696, 25, 767, 3695, 5824, 16072, 2934, 36088, 198, 16447, 7536, 25, 2864, 12, 2931, 12, 1983, 1105, 25, 1495, 25, 3132, ...
2.430894
123
import random from .util import sign
[ 11748, 4738, 198, 198, 6738, 764, 22602, 1330, 1051, 198 ]
3.8
10
from .material_generic import * __all__ = [] __all__ += material_generic.__all__
[ 198, 198, 6738, 764, 33665, 62, 41357, 1330, 1635, 198, 198, 834, 439, 834, 796, 17635, 198, 834, 439, 834, 15853, 2587, 62, 41357, 13, 834, 439, 834 ]
2.964286
28
import os PROJECT_ROOT = os.path.dirname(__file__) # DEBUG # See: https://docs.djangoproject.com/en/dev/ref/settings/#debug DEBUG = False # See: https://docs.djangoproject.com/en/dev/ref/settings/#template-debug TEMPLATE_DEBUG = DEBUG # END DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS...
[ 11748, 28686, 198, 31190, 23680, 62, 13252, 2394, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 8, 198, 2, 16959, 198, 2, 4091, 25, 3740, 1378, 31628, 13, 28241, 648, 404, 305, 752, 13, 785, 14, 268, 14, 7959, 14, 5420...
2.710442
2,825
import re import sys from music21.interval import Interval from music21.key import Key def findKeysInRomanTextString(rntxt): """Get all the keys in a RomanText string. Receive a string with valid RomanText content. Output a list of all the key changes that happen throughout the content. """ ...
[ 11748, 302, 198, 11748, 25064, 198, 198, 6738, 2647, 2481, 13, 3849, 2100, 1330, 4225, 2100, 198, 6738, 2647, 2481, 13, 2539, 1330, 7383, 628, 198, 4299, 1064, 40729, 818, 32454, 8206, 10100, 7, 81, 429, 742, 2599, 198, 220, 220, 220,...
2.715306
980
import json import pytest import uuid from mock import AsyncMock, patch from db.errors import EntityDoesNotExist from models.domain.resource import Status from models.domain.workspace import Workspace from models.domain.resource import Deployment from resources import strings from service_bus.deployment_status_update...
[ 11748, 33918, 198, 11748, 12972, 9288, 198, 11748, 334, 27112, 198, 198, 6738, 15290, 1330, 1081, 13361, 44, 735, 11, 8529, 198, 198, 6738, 20613, 13, 48277, 1330, 20885, 13921, 3673, 3109, 396, 198, 6738, 4981, 13, 27830, 13, 31092, 13...
2.850467
214
import os import time import logging as log import numpy as np from scikit-learn.preprocessing import normalize # local modules import config
[ 11748, 28686, 198, 11748, 640, 198, 11748, 18931, 355, 2604, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 1134, 270, 12, 35720, 13, 3866, 36948, 1330, 3487, 1096, 198, 198, 2, 1957, 13103, 198, 11748, 4566 ]
3.837838
37
from datetime import date, datetime, timedelta import pytest from pydantic.error_wrappers import ValidationError from infobip_channels.sms.models.body.reschedule_sms_messages import ( RescheduleSMSMessagesMessageBody, ) from infobip_channels.sms.models.query_parameters.reschedule_messages import ( RescheduleS...
[ 6738, 4818, 8079, 1330, 3128, 11, 4818, 8079, 11, 28805, 12514, 198, 198, 11748, 12972, 9288, 198, 6738, 279, 5173, 5109, 13, 18224, 62, 29988, 11799, 1330, 3254, 24765, 12331, 198, 198, 6738, 1167, 672, 541, 62, 354, 8961, 13, 82, 90...
2.941667
120
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
[ 2, 49962, 284, 262, 24843, 10442, 5693, 357, 1921, 37, 8, 739, 530, 198, 2, 393, 517, 18920, 5964, 11704, 13, 220, 4091, 262, 28536, 2393, 198, 2, 9387, 351, 428, 670, 329, 3224, 1321, 198, 2, 5115, 6634, 9238, 13, 220, 383, 7054,...
2.734589
1,752
# ------------------------------------------------------------------------------ # Module Import # ------------------------------------------------------------------------------ import nuke, nukescripts import platform from Qt import QtWidgets, QtGui, QtCore #------------------------------------------------...
[ 628, 198, 198, 2, 16529, 26171, 198, 2, 19937, 17267, 198, 2, 16529, 26171, 628, 628, 198, 11748, 299, 4649, 11, 299, 2724, 3798, 1968, 82, 198, 11748, 3859, 198, 6738, 33734, 1330, 33734, 54, 312, 11407, 11, 33734, 8205, 72, 11, 33...
3.400705
851
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2016-11-10 21:35 from __future__ import unicode_literals from django.db import migrations, models
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 24, 13, 20, 319, 1584, 12, 1157, 12, 940, 2310, 25, 2327, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 19...
2.719298
57
import requests import os
[ 11748, 7007, 198, 11748, 28686, 628 ]
4.5
6
#!/usr/bin/python # Copyright (c) 2018 Red Hat # # This module 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 version. # # This software is di...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 2, 15069, 357, 66, 8, 2864, 2297, 10983, 198, 2, 198, 2, 770, 8265, 318, 1479, 3788, 25, 345, 460, 17678, 4163, 340, 290, 14, 273, 13096, 198, 2, 340, 739, 262, 2846, 286, 262, 229...
2.819505
687
""" authenticators: the server instance accepts an authenticator object, which is basically any callable (i.e., a function) that takes the newly connected socket and "authenticates" it. the authenticator should return a socket-like object with its associated credentials (a tuple), or raise AuthenticationError if it ...
[ 37811, 198, 41299, 44549, 25, 262, 4382, 4554, 18178, 281, 16425, 1352, 2134, 11, 198, 4758, 318, 6209, 597, 869, 540, 357, 72, 13, 68, 1539, 257, 2163, 8, 326, 2753, 262, 8308, 198, 15236, 17802, 290, 366, 41299, 16856, 1, 340, 13,...
2.879536
689
# Generated by Django 3.0.5 on 2020-09-21 06:44 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 20, 319, 12131, 12, 2931, 12, 2481, 9130, 25, 2598, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, ...
2.818182
44
# Generated by Django 2.0.3 on 2018-03-24 23:35 from django.db import migrations, models import django.db.models.deletion import django.utils.timezone
[ 2, 2980, 515, 416, 37770, 362, 13, 15, 13, 18, 319, 2864, 12, 3070, 12, 1731, 2242, 25, 2327, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14208, 13, 9945, 13, 27530, 13, 2934, 1616, 295, ...
2.886792
53
# import torch from transformers import BertTokenizer, BertForSequenceClassification torch.manual_seed(0) tokenizer = BertTokenizer.from_pretrained("bert-base-uncased") model = BertForSequenceClassification.from_pretrained("bert-base-uncased", problem_type="multi_label_classification", num_labels=2) inputs = tokeniz...
[ 2, 220, 198, 11748, 28034, 198, 6738, 6121, 364, 1330, 22108, 30642, 7509, 11, 22108, 1890, 44015, 594, 9487, 2649, 198, 198, 13165, 354, 13, 805, 723, 62, 28826, 7, 15, 8, 198, 30001, 7509, 796, 22108, 30642, 7509, 13, 6738, 62, 53...
2.989418
189
import time import numpy from amuse.lab import Huayno from amuse.lab import Hermite from amuse.lab import nbody_system from amuse.lab import new_king_model from matplotlib import pyplot if __name__ in ('__main__'): N = 1024 W0 = 7.0 t_end = 0.1 | nbody_system.time bodies = new_king_model(N, W0) ...
[ 11748, 640, 198, 11748, 299, 32152, 198, 6738, 26072, 13, 23912, 1330, 11256, 323, 3919, 198, 6738, 26072, 13, 23912, 1330, 18113, 578, 198, 6738, 26072, 13, 23912, 1330, 299, 2618, 62, 10057, 198, 6738, 26072, 13, 23912, 1330, 649, 62,...
2.333333
279
import requests import json
[ 11748, 7007, 198, 11748, 33918, 198, 220, 220, 220, 220, 220 ]
3
11
# import time # test = timer(test) # test() test() #@timer == test=timer(test)
[ 2, 198, 11748, 640, 198, 198, 2, 1332, 796, 19781, 7, 9288, 8, 198, 2, 1332, 3419, 198, 9288, 3419, 198, 198, 2, 31, 45016, 6624, 1332, 28, 45016, 7, 9288, 8 ]
2.5
32
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
[ 2, 28373, 2393, 329, 262, 45368, 28413, 10314, 27098, 13, 198, 2, 198, 2, 770, 2393, 691, 4909, 257, 6356, 286, 262, 749, 2219, 3689, 13, 1114, 257, 1336, 198, 2, 1351, 766, 262, 10314, 25, 198, 2, 3740, 1378, 2503, 13, 82, 746, ...
3.419118
952
import itertools import typing from typing import Any from PyQt5 import QtCore from PyQt5.QtCore import QModelIndex, pyqtSignal, QObject from PyQt5.QtGui import QColor from PyQt5.QtWidgets import QAbstractItemDelegate, QWidget, QStyleOptionViewItem, QSpinBox class CustomModelSignals(QObject): data_changed = pyq...
[ 11748, 340, 861, 10141, 198, 11748, 19720, 198, 6738, 19720, 1330, 4377, 198, 198, 6738, 9485, 48, 83, 20, 1330, 33734, 14055, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 14055, 1330, 1195, 17633, 15732, 11, 12972, 39568, 11712, 282, 11,...
2.922078
154
import multiprocessing as mp from pyrallel.map_reduce import MapReduce NUM_OF_PROCESSOR = max(2, int(mp.cpu_count() / 2))
[ 11748, 18540, 305, 919, 278, 355, 29034, 198, 198, 6738, 12972, 1373, 293, 75, 13, 8899, 62, 445, 7234, 1330, 9347, 7738, 7234, 628, 198, 41359, 62, 19238, 62, 4805, 4503, 7597, 1581, 796, 3509, 7, 17, 11, 493, 7, 3149, 13, 36166, ...
2.490196
51
import argparse import Evtx.Evtx as evtx import pandas as pd import xmltodict import re parser = argparse.ArgumentParser(description="Convert Windows EVTX event log file to DataFrame.") parser.add_argument("evtx", type=str, help="Path to the Windows EVTX event log file") args = parser.parse_args() with evtx.Evtx(args...
[ 11748, 1822, 29572, 198, 11748, 4319, 17602, 13, 15200, 17602, 355, 819, 17602, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 2124, 76, 2528, 375, 713, 198, 11748, 302, 198, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 7, ...
2.525
280
sandwich_meat={ 1:{'chicken':3}, 2:{'beef':5}, 3:{'pork':4}, 4:{'bacon':4}, 5:{'sausage':4}, 6:{'omelette':2}, 7:{'none':0} } sandwich_sauce=['mayonnaise','ketchup','yellowmustard','blackpeppersauce','cheese','none'] sandwich_vegetable=['lettuce','slicedtomatoes','slicedpickles','potat...
[ 198, 38142, 11451, 62, 41495, 34758, 198, 220, 220, 220, 352, 29164, 6, 354, 5973, 10354, 18, 5512, 198, 220, 220, 220, 362, 29164, 6, 1350, 891, 10354, 20, 5512, 198, 220, 220, 220, 513, 29164, 6, 79, 967, 10354, 19, 5512, 198, 2...
2.0369
271
import math import numpy as np from scipy import signal, fftpack
[ 11748, 10688, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 1330, 6737, 11, 277, 701, 8002, 628, 628, 628, 198 ]
3.086957
23
''' Unpack SEC EIS File is an example of a plug-in to the GUI menu that will save the unpacked contents of an SEC EIS File in a directory. (c) Copyright 2012 Mark V Systems Limited, All rights reserved. ''' __pluginInfo__ = { 'name': 'Unpack SEC EIS File', 'version': '0.9', 'description': "This plug-in u...
[ 7061, 6, 198, 3118, 8002, 10729, 412, 1797, 9220, 318, 281, 1672, 286, 257, 6107, 12, 259, 284, 262, 25757, 6859, 220, 198, 5562, 481, 3613, 262, 8593, 6021, 10154, 286, 281, 10729, 412, 1797, 9220, 287, 257, 8619, 13, 198, 198, 7, ...
2.990244
205
#!/usr/bin/env python # This file is part of pyacoustid. # Copyright 2012, Lukas Lalinsky. # # 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 limitati...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 770, 2393, 318, 636, 286, 12972, 330, 23968, 312, 13, 198, 2, 15069, 2321, 11, 28102, 292, 36683, 19870, 13, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 38...
3.976563
256
from app.views.dashboard.leadership.index import leaderships from app.views.dashboard.leadership.delete import leadership_delete from app.views.dashboard.leadership.activation import leadership_activated
[ 6738, 598, 13, 33571, 13, 42460, 3526, 13, 37553, 1056, 13, 9630, 1330, 5531, 82, 198, 6738, 598, 13, 33571, 13, 42460, 3526, 13, 37553, 1056, 13, 33678, 1330, 5531, 62, 33678, 198, 6738, 598, 13, 33571, 13, 42460, 3526, 13, 37553, ...
4.142857
49
# Button Groups in Python import PyQt5 from PyQt5.QtWidgets import QApplication, QHBoxLayout, QLabel, QButtonGroup, QMainWindow, QDialog, QPushButton, QVBoxLayout import sys from PyQt5 import QtGui from PyQt5.QtGui import QFont, QPixmap from PyQt5.QtCore import QSize if __name__ == "__main__": App =...
[ 2, 20969, 27441, 287, 11361, 201, 198, 11748, 9485, 48, 83, 20, 201, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 54, 312, 11407, 1330, 1195, 23416, 11, 1195, 39, 14253, 32517, 11, 1195, 33986, 11, 1195, 21864, 13247, 11, 1195, 13383, ...
2.387879
165
#!/usr/bin/env python3 # # MIT License # # (C) Copyright 2020-2022 Hewlett Packard Enterprise Development LP # # 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 w...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 198, 2, 17168, 13789, 198, 2, 198, 2, 357, 34, 8, 15069, 12131, 12, 1238, 1828, 30446, 15503, 6400, 446, 14973, 7712, 18470, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11...
2.554608
7,032
from decimal import Decimal from django.core.exceptions import ValidationError from django.db import models from app.utils import get_balances
[ 6738, 32465, 1330, 4280, 4402, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 3254, 24765, 12331, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 598, 13, 26791, 1330, 651, 62, 6893, 1817, 628, 198 ]
3.815789
38
# python-telegram-quiz # @author: Aleksandr Gordienko # @site: https://github.com/aleksandrgordienko/melissa-quiz from random import randint from sqlalchemy import Column, Integer, String from sqlalchemy.ext.declarative import declarative_base Base = declarative_base()
[ 2, 21015, 12, 660, 30536, 12, 421, 528, 198, 2, 2488, 9800, 25, 9300, 591, 46273, 39592, 2013, 7204, 198, 2, 2488, 15654, 25, 3740, 1378, 12567, 13, 785, 14, 1000, 591, 392, 41345, 585, 2013, 7204, 14, 17694, 13808, 12, 421, 528, ...
3.055556
90
import docx import time import os from os import system from pprint import pprint finished = False while finished == False: parseFile()
[ 11748, 2205, 87, 198, 11748, 640, 198, 11748, 28686, 198, 6738, 28686, 1330, 1080, 198, 6738, 279, 4798, 1330, 279, 4798, 198, 198, 43952, 796, 10352, 198, 198, 4514, 5201, 6624, 10352, 25, 198, 197, 197, 198, 197, 197, 198, 197, 2957...
3.244444
45
from .dataset import Dataset from .model import Model from .transform import Transform
[ 6738, 764, 19608, 292, 316, 1330, 16092, 292, 316, 198, 6738, 764, 19849, 1330, 9104, 198, 6738, 764, 35636, 1330, 26981, 198 ]
3.954545
22
import networkx as nx from py2neo import Graph, Node, Relationship import pandas as pd import random graph = Graph("bolt://localhost:7687", auth=("neo4j", "Password")) def importGexf(gexffilepath, depth = 0): ''' Reads gexf network file from hyphe, update or create all nodes and relationships in neo4j data...
[ 11748, 3127, 87, 355, 299, 87, 198, 6738, 12972, 17, 710, 78, 1330, 29681, 11, 19081, 11, 39771, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 4738, 628, 628, 198, 34960, 796, 29681, 7203, 25593, 1378, 36750, 25, 30610, 22, 1600, ...
2.145489
2,660
from code_base.excess_mortality.decode_loc_vars import * DECODE_DEMO_COL = { 'excess_mortality_by_sex_age_country': 'age,sex,unit,geo\\time', 'excess_mortality_by_sex_age_nuts3': 'unit,sex,age,geo\\time', 'europe_population_by_age_and_sex': 'freq;unit;sex;age;geo\TIME_PERIOD' } DECODE_DEMO_REPL = { 'e...
[ 6738, 2438, 62, 8692, 13, 1069, 919, 62, 76, 28337, 13, 12501, 1098, 62, 17946, 62, 85, 945, 1330, 1635, 198, 198, 41374, 16820, 62, 39429, 46, 62, 25154, 796, 1391, 198, 220, 220, 220, 705, 1069, 919, 62, 76, 28337, 62, 1525, 62,...
1.946299
2,067
""" The MIT License (MIT) Copyright (c) 2017-2018 Nariman Safiulin 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, modif...
[ 37811, 198, 464, 17168, 13789, 357, 36393, 8, 198, 198, 15269, 357, 66, 8, 2177, 12, 7908, 13596, 24086, 6895, 72, 11599, 198, 198, 5990, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 286, 198, 5...
3.916168
334
import os from pathlib import Path from typing import Any, Dict, Union import numpy as np def isdicom(path: Union[str, Path]) -> bool: """ Judge whether a given file is a valid dicom. Args: path: given file path. Returns: True if given path is a valid dicom, otherwise False. """ ...
[ 11748, 28686, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 11, 4479, 198, 11748, 299, 32152, 355, 45941, 628, 198, 4299, 318, 67, 291, 296, 7, 6978, 25, 4479, 58, 2536, 11, 10644, 12962, 4613, 20512,...
2.539095
243
import tensorflow as tf import numpy as np import os, datetime, itertools, shutil, gym, sys from tf_rl.common.visualise import plot_Q_values from tf_rl.common.wrappers import MyWrapper, CartPole_Pixel, wrap_deepmind, make_atari """ TF basic Utility functions """ def eager_setup(): """ it eables an eager ex...
[ 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 11, 4818, 8079, 11, 340, 861, 10141, 11, 4423, 346, 11, 11550, 11, 25064, 198, 6738, 48700, 62, 45895, 13, 11321, 13, 41464, 786, 1330, 7110, ...
2.268728
7,956
from collections import namedtuple, OrderedDict import json __author__ = 'kollad' def isnamedtuple(obj): """Heuristic check if an object is a namedtuple.""" return isinstance(obj, tuple) \ and hasattr(obj, "_fields") \ and hasattr(obj, "_asdict") \ and callable(obj._asdict) ...
[ 6738, 17268, 1330, 3706, 83, 29291, 11, 14230, 1068, 35, 713, 198, 11748, 33918, 198, 198, 834, 9800, 834, 796, 705, 74, 692, 324, 6, 628, 198, 4299, 2125, 2434, 83, 29291, 7, 26801, 2599, 198, 220, 220, 220, 37227, 1544, 27915, 219...
2.458015
131
import setuptools with open("README.md") as readmeFile: long_description = readmeFile.read() setuptools.setup( name="musketeer", version="0.0.1", author="Daniil Soloviev", author_email="dos23@cam.ac.uk", description="A tool for fitting data from titration experiments.", long_description=lo...
[ 11748, 900, 37623, 10141, 198, 198, 4480, 1280, 7203, 15675, 11682, 13, 9132, 4943, 355, 1100, 1326, 8979, 25, 198, 220, 220, 220, 890, 62, 11213, 796, 1100, 1326, 8979, 13, 961, 3419, 198, 198, 2617, 37623, 10141, 13, 40406, 7, 198, ...
2.446712
441
from django.test import TestCase # Create your tests here. from webapp.forms import contains_all_letters
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 198, 2, 13610, 534, 5254, 994, 13, 198, 6738, 3992, 1324, 13, 23914, 1330, 4909, 62, 439, 62, 15653, 628, 628 ]
3.633333
30
import copy import math import operator import random import sys from concurrent import futures import numpy as np import requests def main(): # Code for strategy of 1 individual # ee = EvolutiveStrategyOneIndividual(c=ce, is10=True) # ee.trainingLoop(10000) # Code for strategy with the best re...
[ 11748, 4866, 198, 11748, 10688, 198, 11748, 10088, 198, 11748, 4738, 198, 11748, 25064, 198, 6738, 24580, 1330, 25650, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 7007, 628, 628, 628, 198, 4299, 1388, 33529, 628, 220, 220, 220, ...
2.884615
182
from typing import Mapping, Any, List
[ 6738, 19720, 1330, 337, 5912, 11, 4377, 11, 7343, 628, 628 ]
3.727273
11
from rest_framework import status from rest_framework.response import Response from rest_framework.views import APIView from . import models, serializers from yoongram.notifications import views as notifications_views # class Based Viwes # function Based Views # views: path("<slug:username>/following/", view=...
[ 6738, 1334, 62, 30604, 1330, 3722, 198, 6738, 1334, 62, 30604, 13, 26209, 1330, 18261, 198, 6738, 1334, 62, 30604, 13, 33571, 1330, 3486, 3824, 769, 198, 198, 6738, 764, 1330, 4981, 11, 11389, 11341, 198, 6738, 27406, 506, 859, 13, 16...
3.01845
271
''' Basic Python tutorial neural network. Based on "A Neural Network in 11 Lines of Python" by i am trask https://iamtrask.github.io/2015/07/12/basic-python-network/ ''' import numpy as np # Training data: a 1 in the first column directly correlates with a 1 in the output # training features features = np.array([ ...
[ 7061, 6, 198, 26416, 11361, 11808, 17019, 3127, 13, 198, 198, 15001, 319, 366, 32, 47986, 7311, 287, 1367, 26299, 286, 11361, 1, 416, 1312, 716, 491, 2093, 198, 5450, 1378, 1789, 2213, 2093, 13, 12567, 13, 952, 14, 4626, 14, 2998, 1...
2.409736
493
import pytest from gaphor import UML from gaphor.core.modeling import Diagram from gaphor.core.modeling.modelinglanguage import ( CoreModelingLanguage, MockModelingLanguage, ) from gaphor.SysML.modelinglanguage import SysMLModelingLanguage from gaphor.UML.deployments.connector import ConnectorItem from gaphor....
[ 11748, 12972, 9288, 198, 198, 6738, 308, 6570, 273, 1330, 471, 5805, 198, 6738, 308, 6570, 273, 13, 7295, 13, 4666, 10809, 1330, 6031, 6713, 198, 6738, 308, 6570, 273, 13, 7295, 13, 4666, 10809, 13, 4666, 10809, 16129, 1330, 357, 198,...
3.00625
320
pozehug = [ 'https://media1.tenor.com/images/4d89d7f963b41a416ec8a55230dab31b/tenor.gif?itemid=5166500', 'https://media1.tenor.com/images/c7efda563983124a76d319813155bd8e/tenor.gif?itemid=15900664', 'https://media1.tenor.com/images/daffa3b7992a08767168614178cce7d6/tenor.gif?itemid=15249774', 'https://media1....
[ 7501, 2736, 71, 1018, 796, 685, 198, 220, 705, 5450, 1378, 11431, 16, 13, 1452, 273, 13, 785, 14, 17566, 14, 19, 67, 4531, 67, 22, 69, 4846, 18, 65, 3901, 64, 35218, 721, 23, 64, 2816, 19214, 67, 397, 3132, 65, 14, 1452, 273, ...
2.395243
5,928
import numpy as np from numba import jit
[ 11748, 299, 32152, 355, 45941, 198, 6738, 997, 7012, 1330, 474, 270, 628, 628, 628, 198 ]
2.9375
16
# Copyright (c) 2016 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. import json import os import netlog_viewer_project import webapp2 from webapp2 import Route
[ 2, 15069, 357, 66, 8, 1584, 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, 287, 262, 38559, 24290, 2393, 13, 1...
3.52
75
# -*- coding: utf-8 -*- import json import os from crontab import CronTab from flask import Flask, request from pathlib import Path from pretty_cron import prettify_cron app = Flask(__name__) if __name__ == '__main__': app.run()
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 33918, 198, 11748, 28686, 198, 6738, 1067, 756, 397, 1330, 31683, 33349, 198, 6738, 42903, 1330, 46947, 11, 2581, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 249...
2.843373
83
""" Examples to demonstrate ops level randomization Author: Chip Huyen Prepared for the class CS 20SI: "TensorFlow for Deep Learning Research" cs20si.stanford.edu """ import os os.environ['TF_CPP_MIN_LOG_LEVEL']='2' import tensorflow as tf # Example 1: session is the thing that keeps track of random state c = tf.rand...
[ 37811, 21066, 284, 10176, 39628, 1241, 4738, 1634, 198, 13838, 25, 17869, 367, 4669, 268, 198, 6719, 29190, 329, 262, 1398, 9429, 1160, 11584, 25, 366, 51, 22854, 37535, 329, 10766, 18252, 4992, 1, 198, 6359, 1238, 13396, 13, 14192, 384...
2.502092
478
# -*- coding: utf-8 -*- ''' ''' import time import MySQLdb import jieba import ast import random, sys # import requests sys.setrecursionlimit(1000000) # def getproxyip(ip_file): fo = open(ip_file, 'r', encoding='utf-8') proxys = fo.read().split('\n') proxy = ast.literal_eval(random.choice(proxys)) ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 7061, 6, 198, 198, 7061, 6, 198, 11748, 640, 198, 198, 11748, 33476, 9945, 198, 11748, 474, 494, 7012, 198, 11748, 6468, 198, 11748, 4738, 11, 25064, 198, 198, 2, 220,...
2.023659
634
#!/usr/bin/env python3 from numpy import* n, *a = map(int, open(0).read().split()) a = array(a) print(int(min(abs(cumsum(a)-(sum(a)/2)))*2))
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 6738, 299, 32152, 1330, 9, 198, 77, 11, 1635, 64, 796, 3975, 7, 600, 11, 1280, 7, 15, 737, 961, 22446, 35312, 28955, 198, 64, 796, 7177, 7, 64, 8, 198, 4798, 7, 600, 7, 108...
2.153846
65
import unittest try: from nose_parameterized import parameterized except: print("*** Please install 'nose_parameterized' to run these tests ***") exit(0) import oandapyV20.contrib.requests as req import oandapyV20.definitions.orders as OD import oandapyV20.types as types if __name__ == "__main__": ...
[ 11748, 555, 715, 395, 198, 198, 28311, 25, 198, 220, 220, 220, 422, 9686, 62, 17143, 2357, 1143, 1330, 11507, 1143, 198, 16341, 25, 198, 220, 220, 220, 3601, 7203, 8162, 4222, 2721, 705, 77, 577, 62, 17143, 2357, 1143, 6, 284, 1057,...
2.816667
120
from kvaut.automator.custom_automator import CustomAutomator
[ 6738, 479, 85, 2306, 13, 2306, 296, 1352, 13, 23144, 62, 2306, 296, 1352, 1330, 8562, 38062, 1352, 628 ]
3.263158
19
import torch import torch.nn as nn import torch.nn.functional as F __all__ = ['NonLocalBlock', 'GCA_Channel', 'GCA_Element', 'AGCB_Element', 'AGCB_Patch', 'CPM']
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 628, 198, 834, 439, 834, 796, 37250, 15419, 14565, 12235, 3256, 705, 38, 8141, 62, 29239, 3256, 705, 38, 8141, 62, 20180, 325...
2.741935
62
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import os import re import shutil from .builder import BuilderBase
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 15069, 357, 66, 8, 30277, 19193, 82, 11, 3457, 13, 290, 29116, 13, 198, 2, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 17168, 5964, 1043, 287, 262, 198, 2, 38559, 24290, ...
3.675676
74
from setuptools import setup, find_packages setup( name="GSimulator", packages=find_packages(exclude=['*test']), version="0.1.1", author="Eric Wong", description='This package allows user to \ simulate conductance of quantum wires', author_email='c.wing.wong.19@ucl.ac.uk', install_r...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 2625, 38, 8890, 8927, 1600, 198, 220, 220, 220, 10392, 28, 19796, 62, 43789, 7, 1069, 9152, 28, 17816, 9, 9288, 20520, 828, 198,...
2.439024
205
# coding: utf-8 # In[4]: from keras.layers import Activation, Dense, Dropout from keras.layers.advanced_activations import LeakyReLU, PReLU, ThresholdedReLU, ELU from keras import regularizers # In[5]: def get_activation_layer(activation): """ Returns the activation layer given its name """ if a...
[ 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 554, 58, 19, 5974, 628, 198, 6738, 41927, 292, 13, 75, 6962, 1330, 13144, 341, 11, 360, 1072, 11, 14258, 448, 198, 6738, 41927, 292, 13, 75, 6962, 13, 32225, 2903, 62, 15791, 602...
2.24957
581
from typing import Union, Sequence import event _actions = {} """_actions = { 'action_name': { 'event1event2': { 'event1': ..., 'event2': ... } } }""" __all__ = ( 'addaction', 'removeaction', 'haveaction', 'action...
[ 6738, 19720, 1330, 4479, 11, 45835, 198, 11748, 1785, 628, 198, 62, 4658, 796, 23884, 198, 37811, 62, 4658, 796, 1391, 198, 220, 220, 220, 705, 2673, 62, 3672, 10354, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 705, 15596, 16, 155...
1.987179
234
import os from os.path import join, getsize from PIL import Image from tqdm import tqdm import numpy as np import argparse parser = argparse.ArgumentParser() parser.add_argument('--dataset_dir', type=str, help='dataset directory') parser.add_argument('--model', type=str, default='abc_0000', help='subdirectory containi...
[ 11748, 28686, 198, 6738, 28686, 13, 6978, 1330, 4654, 11, 3011, 1096, 198, 6738, 350, 4146, 1330, 7412, 198, 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 1822, 29572, 198, 198, 48610, 796, ...
2.311239
694
from scan_the_code_classifier import ScanTheCodeClassifier
[ 6738, 9367, 62, 1169, 62, 8189, 62, 4871, 7483, 1330, 20937, 464, 10669, 9487, 7483, 198 ]
3.6875
16
#!/usr/bin/env python3 """ Author : patarajarina Date : 2019-02-25 Purpose: Rock the Casbah """ import argparse import sys import os # -------------------------------------------------- def get_args(): """get command-line arguments""" parser = argparse.ArgumentParser( description='Argparse Python sc...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 198, 13838, 1058, 1458, 283, 1228, 283, 1437, 198, 10430, 220, 220, 1058, 13130, 12, 2999, 12, 1495, 198, 30026, 3455, 25, 4631, 262, 11294, 47041, 198, 37811, 198, 198, 117...
2.080872
1,422