content stringlengths 1 1.04M | input_ids listlengths 1 774k | ratio_char_token float64 0.38 22.9 | token_count int64 1 774k |
|---|---|---|---|
TOKEN = "1096828547:AAHD7G8ZMTQ3FsU_4cQj6HQG-rWVMsrzUrg"
DB_USER = 'user'
DB_PASSWORD = 'HFtkS5n0iB7yfvnr'
DB_NAME = 'bot' | [
10468,
43959,
796,
366,
14454,
3104,
26279,
2857,
25,
3838,
10227,
22,
38,
23,
57,
13752,
48,
18,
42388,
52,
62,
19,
66,
48,
73,
21,
41275,
38,
12,
81,
54,
53,
10128,
81,
89,
16692,
70,
1,
198,
11012,
62,
29904,
796,
705,
7220,
... | 1.605263 | 76 |
#
# Copyright (c) SAS Institute 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 agreed to in w... | [
2,
198,
2,
15069,
357,
66,
8,
35516,
5136,
3457,
13,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
10628,
362,
13,
15,
357,
1169,
366,
34156,
15341,
198,
2,
345,
743,
407,
779,
428,
2393,
2845,
287,
11846,
351,
262,
13789,
... | 2.716418 | 536 |
#!/usr/bin/python
'''
Example 4: Introducing Condition Groups
Note: Creating a rule to hunt for documents
rule doc_exe_with_macros
{
strings:
$EXE0 = "TVqQAAMAAAAEAAAA" wide ascii nocase
$EXE1 = "4d5a90000300000004000000ffff0000" wide ascii nocase
$EXE2 = "This program cannot be run in DOS mode" wide ascii no... | [
2,
48443,
14629,
14,
8800,
14,
29412,
198,
198,
7061,
6,
198,
16281,
604,
25,
11036,
2259,
24295,
27441,
198,
6425,
25,
30481,
257,
3896,
284,
12601,
329,
4963,
198,
198,
25135,
2205,
62,
13499,
62,
4480,
62,
20285,
4951,
198,
90,
6... | 2.56602 | 1,083 |
import json
import operator
import os
import shutil
from dataclasses import asdict
from dataclasses import dataclass
from dataclasses import field
from typing import Any
from typing import Iterator
from typing import Dict
from homecomp import errors
from homecomp.models import HousingDetail
from homecomp.models import... | [
11748,
33918,
198,
11748,
10088,
198,
11748,
28686,
198,
11748,
4423,
346,
198,
6738,
4818,
330,
28958,
1330,
355,
11600,
198,
6738,
4818,
330,
28958,
1330,
4818,
330,
31172,
198,
6738,
4818,
330,
28958,
1330,
2214,
198,
6738,
19720,
1330... | 4.045977 | 87 |
#!/usr/bin/python2
# -*- coding: utf-8 -*-
# $File: main.py
# $Date: Fri Jan 03 22:01:46 2014 +0800
# $Author: Xinyu Zhou <zxytim[at]gmail[dot]com>
from dataextractor import DataExtractor as DE
import matplotlib.pyplot as plt
from matplotlib import rcParams
rcParams.update({'figure.autolayout': True})
if __name__ ==... | [
2,
48443,
14629,
14,
8800,
14,
29412,
17,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
720,
8979,
25,
1388,
13,
9078,
198,
2,
720,
10430,
25,
19480,
2365,
7643,
2534,
25,
486,
25,
3510,
1946,
1343,
2919... | 2.517007 | 147 |
from ib_insync import *
from util import order_util
"""
A base model containing common IB functions.
For other models to extend and use.
"""
| [
6738,
24283,
62,
1040,
13361,
1330,
1635,
198,
6738,
7736,
1330,
1502,
62,
22602,
198,
198,
37811,
198,
32,
2779,
2746,
7268,
2219,
34782,
5499,
13,
220,
198,
198,
1890,
584,
4981,
284,
9117,
290,
779,
13,
198,
37811,
628
] | 3.625 | 40 |
from rlxp.envs import SquareWorld
from rlxp.rendering import render_env2d
env = SquareWorld()
env.enable_rendering()
for tt in range(10):
env.step(env.action_space.sample())
render_env2d(env)
| [
6738,
374,
75,
42372,
13,
268,
14259,
1330,
9276,
10603,
220,
198,
6738,
374,
75,
42372,
13,
13287,
278,
1330,
8543,
62,
24330,
17,
67,
198,
198,
24330,
796,
9276,
10603,
3419,
198,
24330,
13,
21633,
62,
13287,
278,
3419,
198,
1640,
... | 2.618421 | 76 |
import pyvisa
import sys
resurse = sys.argv[1]
cmd = sys.argv[2]
rm = pyvisa.ResourceManager()
#'USB0::0xF4ED::0xEE3A::NDG10GAQ3R0226::INSTR'
inst = rm.open_resource(resurse)
try:
inst.query(cmd)
except:
pass
#"*IDN?"
| [
11748,
12972,
4703,
64,
198,
11748,
25064,
198,
411,
12321,
796,
25064,
13,
853,
85,
58,
16,
60,
198,
28758,
796,
25064,
13,
853,
85,
58,
17,
60,
198,
26224,
796,
12972,
4703,
64,
13,
26198,
13511,
3419,
198,
2,
6,
27155,
15,
3712... | 2.054545 | 110 |
from itsdangerous import TimedJSONWebSignatureSerializer as Serializer
from apps.oauto.contents import OPENID_TOKEN_EXPIRES_TIME
from meiduo_mall02 import settings
import logging
logger = logging.getLogger('django')
# 13-itsdangerous的使用
#解密
#定义解密函数
| [
6738,
663,
38537,
516,
1330,
5045,
276,
40386,
13908,
11712,
1300,
32634,
7509,
355,
23283,
7509,
198,
198,
6738,
6725,
13,
78,
23736,
13,
3642,
658,
1330,
38303,
2389,
62,
10468,
43959,
62,
49864,
4663,
1546,
62,
34694,
198,
6738,
502,... | 2.490196 | 102 |
# Generated by Django 2.2.6 on 2019-10-21 09:08
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
| [
2,
2980,
515,
416,
37770,
362,
13,
17,
13,
21,
319,
13130,
12,
940,
12,
2481,
7769,
25,
2919,
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 os
import requests
import random
import time
banner()
print("""
[1]- Joiner [3]- Leaver
[2]- Spammer [4]- Checker
""")
while True:
all_proxies = requests.get('https://api.proxyscrape.com/?request=getproxies&proxytype=http&timeout=1000&country=all&ssl=all&anonymity=all').text
x = all_pro... | [
11748,
28686,
198,
11748,
7007,
198,
11748,
4738,
198,
11748,
640,
198,
220,
220,
220,
220,
198,
3820,
1008,
3419,
628,
198,
4798,
7203,
15931,
198,
58,
16,
45297,
5302,
7274,
220,
220,
220,
220,
685,
18,
45297,
1004,
8770,
198,
198,
... | 1.931143 | 1,583 |
from caffe2.python import brew, optimizer, core, model_helper, workspace
from os.path import join
from os import makedirs
import datetime
import numpy as np
import math
from caffe2.python.predictor import mobile_exporter, predictor_exporter as pe
from caffe2.proto import caffe2_pb2 as c2p2
from caffe2.python.modeling ... | [
6738,
21121,
17,
13,
29412,
1330,
9059,
11,
6436,
7509,
11,
4755,
11,
2746,
62,
2978,
525,
11,
44573,
198,
6738,
28686,
13,
6978,
1330,
4654,
198,
6738,
28686,
1330,
285,
4335,
17062,
198,
11748,
4818,
8079,
198,
11748,
299,
32152,
35... | 3.444444 | 117 |
import barcode
from barcode.writer import ImageWriter
from random import randint
import os
from PIL import Image, ImageFont ,ImageDraw
import pickle
#RANDOM NUMBERS GENERATOR
random_number_digits = lambda x : randint(10**(x-1),(10**x)-1)
#random number file
rand_list = sorted([random_number_digits(13) for x in range(5... | [
11748,
2318,
8189,
198,
6738,
2318,
8189,
13,
16002,
1330,
7412,
34379,
198,
6738,
4738,
1330,
43720,
600,
198,
11748,
28686,
198,
6738,
350,
4146,
1330,
7412,
11,
7412,
23252,
837,
5159,
25302,
198,
11748,
2298,
293,
198,
198,
2,
49,
... | 2.415468 | 1,112 |
# ============================================================================
#
# Copyright (C) 2007-2016 Conceptive Engineering bvba.
# www.conceptive.be / info@conceptive.be
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following condition... | [
2,
220,
38093,
2559,
18604,
198,
2,
198,
2,
220,
15069,
357,
34,
8,
4343,
12,
5304,
1482,
25867,
14044,
275,
85,
7012,
13,
198,
2,
220,
7324,
13,
1102,
25867,
13,
1350,
1220,
7508,
31,
1102,
25867,
13,
1350,
198,
2,
198,
2,
220,... | 3.493458 | 535 |
import codecs
import json
from keras.preprocessing import sequence
from keras_bert import Tokenizer, load_trained_model_from_checkpoint
from keras.models import load_model
from flask import request, Flask, jsonify
import tensorflow as tf
app = Flask(__name__)
global_()
@app.route("/sentiment_analysis_api", methods=['P... | [
11748,
40481,
82,
198,
11748,
33918,
198,
6738,
41927,
292,
13,
3866,
36948,
1330,
8379,
198,
6738,
41927,
292,
62,
4835,
1330,
29130,
7509,
11,
3440,
62,
35311,
62,
19849,
62,
6738,
62,
9122,
4122,
198,
6738,
41927,
292,
13,
27530,
1... | 3.201681 | 119 |
#
# PySNMP MIB module BLADETYPE2-ACL-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/BLADETYPE2-ACL-MIB
# Produced by pysmi-0.3.4 at Wed May 1 11:39:09 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, ... | [
2,
198,
2,
9485,
15571,
7378,
337,
9865,
8265,
9878,
2885,
2767,
56,
11401,
17,
12,
2246,
43,
12,
8895,
33,
357,
4023,
1378,
16184,
76,
489,
8937,
13,
785,
14,
79,
893,
11632,
8,
198,
2,
7054,
45,
13,
16,
2723,
2393,
1378,
14,
... | 2.677242 | 17,871 |
import string
import random
from mysql.connector import MySQLConnection, Error
import database_conf as cfg
import team
__select_ALL = "SELECT team_number, team_site, team_name, password, team_short_name, enabled, type, multi_login, team_full_name FROM TEAMS"
if __name__ == "__main__":
main() | [
11748,
4731,
198,
11748,
4738,
198,
6738,
48761,
13,
8443,
273,
1330,
33476,
32048,
11,
13047,
198,
11748,
6831,
62,
10414,
355,
30218,
70,
198,
11748,
1074,
198,
198,
834,
19738,
62,
7036,
796,
366,
46506,
1074,
62,
17618,
11,
1074,
... | 3.311111 | 90 |
from decimal import Decimal
from bank_account_app.choices import BankAccountActivityTypeChoices
from bank_account_app.utils import transfer_money
from credit_app.models import CreditContract
| [
6738,
32465,
1330,
4280,
4402,
198,
198,
6738,
3331,
62,
23317,
62,
1324,
13,
6679,
1063,
1330,
5018,
30116,
16516,
6030,
22164,
1063,
198,
6738,
3331,
62,
23317,
62,
1324,
13,
26791,
1330,
4351,
62,
26316,
198,
6738,
3884,
62,
1324,
... | 4.020408 | 49 |
from setuptools import setup, find_packages
setup(
name="NotebookArchaeology",
version="0.1",
#packages=find_packages(),
#scripts=['say_hello.py'],
# Project uses reStructuredText, so ensure that the docutils get
# installed or upgraded on the target machine
install_requires=[
'sqlalch... | [
6738,
900,
37623,
10141,
1330,
9058,
11,
1064,
62,
43789,
198,
40406,
7,
198,
220,
220,
220,
1438,
2625,
6425,
2070,
19895,
3609,
1435,
1600,
198,
220,
220,
220,
2196,
2625,
15,
13,
16,
1600,
198,
220,
220,
220,
1303,
43789,
28,
197... | 2.185567 | 388 |
import sys, os
sys.path.append(os.path.dirname(os.path.abspath(__file__))+"/../src")
from blackscholes.pde.Parabolic import Solver1d, Coef2d, Solver2d
from blackscholes.pde.Euro import Euro1d
from blackscholes.pde.American import Amer1d
from blackscholes.utils.Analytical import Analytical_Sol, GeometricAvg
from utils.D... | [
11748,
25064,
11,
28686,
198,
17597,
13,
6978,
13,
33295,
7,
418,
13,
6978,
13,
15908,
3672,
7,
418,
13,
6978,
13,
397,
2777,
776,
7,
834,
7753,
834,
4008,
10,
1,
14,
40720,
10677,
4943,
198,
6738,
15102,
354,
4316,
13,
79,
2934,
... | 2.841176 | 170 |
# implementation of our model:Weighted Residual Attention Network for Super Resolution
from model import common
import torch.nn as nn
import torch
# concatenated ResidualAttentionBlock
# intermediate ResidualAttentionBlock
# embedded ResidualAttentionBlock
# dense ResidualAttentionGroup
| [
2,
7822,
286,
674,
2746,
25,
25844,
276,
1874,
312,
723,
47406,
7311,
329,
3115,
22406,
198,
198,
6738,
2746,
1330,
2219,
198,
198,
11748,
28034,
13,
20471,
355,
299,
77,
198,
11748,
28034,
628,
628,
628,
198,
2,
1673,
36686,
515,
1... | 3.790123 | 81 |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import numpy as np
class Stats(object):
"""A class to collect episode rewards statistics"""
| [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
11593,
37443,
834,
1330,
4112,
62,
11748,
11,
7297,
11,
3601,
62,
8818,
198,
198,
11748,
299,
32152,
355,
45941,
628,
198,
4871,
20595,
7,
15252,
2599,
198,
220,
... | 3.357143 | 56 |
#!/usr/bin/env python
import os
import sys
import h5py
import argparse
import pandas as pd
import numpy as np
from tronn.util.scripts import setup_run_logs
BLACKLIST_MOTIFS = [
"SMARC",
"NANOG"]
def get_blacklist_indices(df):
"""search for blacklist substrings and return a list of indices
"""
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
11748,
28686,
198,
11748,
25064,
198,
11748,
289,
20,
9078,
198,
11748,
1822,
29572,
198,
198,
11748,
19798,
292,
355,
279,
67,
198,
11748,
299,
32152,
355,
45941,
198,
198,
6738,
... | 2.090765 | 2,523 |
import argparse
import sys
import yaml
from utils import str2bool, str2list
from hub import Hub
from mirror import Mirror
if __name__ == '__main__':
mirror = HubMirror()
mirror.run()
| [
11748,
1822,
29572,
198,
11748,
25064,
198,
11748,
331,
43695,
198,
198,
6738,
3384,
4487,
1330,
965,
17,
30388,
11,
965,
17,
4868,
198,
6738,
12575,
1330,
14699,
198,
6738,
10162,
1330,
17918,
628,
198,
198,
361,
11593,
3672,
834,
6624... | 3 | 65 |
# 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... | [
2,
220,
49962,
284,
262,
24843,
10442,
5693,
357,
1921,
37,
8,
739,
530,
198,
2,
220,
393,
517,
18920,
5964,
11704,
13,
220,
4091,
262,
28536,
2393,
198,
2,
220,
9387,
351,
428,
670,
329,
3224,
1321,
198,
2,
220,
5115,
6634,
9238,... | 2.708283 | 833 |
"""
Read file into texts and calls.
It's ok if you don't understand how to read files
"""
import csv
with open('texts.csv', 'r') as f:
texts = list(csv.reader(f))
with open('calls.csv', 'r') as f:
calls = list(csv.reader(f))
"""
TASK 2: Which telephone number spent the longest time on the phone
during the p... | [
37811,
198,
5569,
2393,
656,
13399,
290,
3848,
13,
198,
1026,
338,
12876,
611,
345,
836,
470,
1833,
703,
284,
1100,
3696,
198,
37811,
198,
198,
11748,
269,
21370,
198,
198,
4480,
1280,
10786,
5239,
82,
13,
40664,
3256,
705,
81,
11537,... | 2.92283 | 311 |
from tkinter import ttk, Frame, N, E, W, LEFT, X, VERTICAL, Y
import source.gui.widgets as widgets
import json
import os
import source.classes.constants as CONST
| [
6738,
256,
74,
3849,
1330,
256,
30488,
11,
25184,
11,
399,
11,
412,
11,
370,
11,
12509,
9792,
11,
1395,
11,
569,
17395,
20151,
11,
575,
198,
11748,
2723,
13,
48317,
13,
28029,
11407,
355,
40803,
198,
11748,
33918,
198,
11748,
28686,
... | 2.963636 | 55 |
from pathlib import Path
import matplotlib.pyplot as plt
from lib import (
sigma, sigma_t, sigmaRatio, sigmaArgmax,
powerAproximation, degreeContinuoutyIndex,
randomConnectedEdges,
randomConnectedGraph,
randomTree,
randomSigmaOptAprox,
maxSigmaRatio_annealing,
localBasicNeigh... | [
6738,
3108,
8019,
1330,
10644,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
198,
6738,
9195,
1330,
357,
198,
220,
220,
220,
264,
13495,
11,
264,
13495,
62,
83,
11,
264,
13495,
29665,
952,
11,
264,
13495,
28100,
... | 2.113725 | 510 |
# -*- coding: utf-8 -*-
"""
Created on Sun Mar 22 12:58:36 2020
@author: Edmund Lo
"""
try:
import sim
except:
print ('--------------------------------------------------------------')
print ('"sim.py" could not be imported. This means very probably that')
print ('either "sim.py" ... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
201,
198,
37811,
201,
198,
41972,
319,
3825,
1526,
2534,
1105,
25,
3365,
25,
2623,
12131,
201,
198,
201,
198,
31,
9800,
25,
35646,
6706,
201,
198,
37811,
201,
198,
201,
198... | 2.677435 | 2,074 |
import time
from pywps import Process, LiteralInput, LiteralOutput, UOM
from .process_defaults import process_defaults, LiteralInputD
| [
11748,
640,
198,
6738,
12972,
86,
862,
1330,
10854,
11,
25659,
1691,
20560,
11,
25659,
1691,
26410,
11,
471,
2662,
198,
6738,
764,
14681,
62,
12286,
82,
1330,
1429,
62,
12286,
82,
11,
25659,
1691,
20560,
35,
628
] | 3.552632 | 38 |
'''
Wrapper classes to implement independent Bayesian classifier combination (IBCC-VB)
using the Bayesian combination framework, along with variants of that model.
'''
from bayesian_combination.bayesian_combination import BC
| [
7061,
6,
198,
36918,
2848,
6097,
284,
3494,
4795,
4696,
35610,
1398,
7483,
6087,
357,
40,
2749,
34,
12,
44526,
8,
198,
3500,
262,
4696,
35610,
6087,
9355,
11,
1863,
351,
17670,
286,
326,
2746,
13,
198,
7061,
6,
198,
6738,
15489,
356... | 4.109091 | 55 |
import pymysql
from ..utils.to_do_exception import ToDoException
import os
| [
11748,
279,
4948,
893,
13976,
198,
6738,
11485,
26791,
13,
1462,
62,
4598,
62,
1069,
4516,
1330,
1675,
5211,
16922,
198,
11748,
28686,
628,
198
] | 3.08 | 25 |
import json
import shelve
from functools import wraps
from asyncio import iscoroutinefunction
def dump_args(args: tuple, kwargs: dict) -> str:
"""Util to make hashable function arguments."""
return json.dumps(args) + json.dumps(kwargs, sort_keys=True)
def shelvecache(shelvename="cache"):
"""
Decorat... | [
11748,
33918,
198,
11748,
7497,
303,
198,
6738,
1257,
310,
10141,
1330,
27521,
198,
6738,
30351,
952,
1330,
318,
10215,
28399,
8818,
628,
198,
4299,
10285,
62,
22046,
7,
22046,
25,
46545,
11,
479,
86,
22046,
25,
8633,
8,
4613,
965,
25... | 2.901869 | 214 |
from typing import Tuple, List
input = """420D598021E0084A07C98EC91DCAE0B880287912A925799429825980593D7DCD400820329480BF21003CC0086028910097520230C80813401D8CC00F601881805705003CC00E200E98400F50031801D160048E5AFEFD5E5C02B93F2F4C11CADBBB799CB294C5FDB8E12C40139B7C98AFA8B2600DCBAF4D3A4C27CB54EA6F5390B1004B93E2F40097CA2EC... | [
6738,
19720,
1330,
309,
29291,
11,
7343,
198,
198,
15414,
796,
37227,
27211,
35,
3270,
1795,
2481,
36,
405,
5705,
32,
2998,
34,
4089,
2943,
6420,
35,
8141,
36,
15,
33,
41655,
2078,
3720,
1065,
32,
24,
28676,
2079,
11785,
23,
25191,
... | 1.854345 | 817 |
import configparser
import click
import logist.setting as setting
import logist.libs.backlog_issues as backlog_issues
import logist.libs.todoist_tasks as todoist_tasks
from PyInquirer import style_from_dict, Token, prompt, Separator
| [
11748,
4566,
48610,
198,
11748,
3904,
198,
11748,
2604,
396,
13,
33990,
355,
4634,
198,
11748,
2604,
396,
13,
8019,
82,
13,
1891,
6404,
62,
37165,
355,
38780,
62,
37165,
198,
11748,
2604,
396,
13,
8019,
82,
13,
83,
24313,
396,
62,
8... | 3.219178 | 73 |
# -*- coding: utf-8 -*-
"""
/***************************************************************************
TerrainRelativeNavigation
A QGIS plugin
This plugin analyzes terrain for the purpose of automatic bearing-based robotic navigation
------------------... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
198,
14,
17174,
17174,
4557,
8162,
198,
3813,
3201,
6892,
876,
30575,
7065,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,... | 2.610526 | 380 |
import numpy as np
import matplotlib.pyplot as plt
import geom_fcns as geo
import render_fcns as ren
import os
import sys
##########################################################################################
# investigation #2 -- elliptical shape with crossed strips in the center
###############################... | [
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
11748,
4903,
296,
62,
16072,
5907,
355,
40087,
198,
11748,
8543,
62,
16072,
5907,
355,
8851,
198,
11748,
28686,
220,
198,
11748,
25064,
19... | 2.458114 | 2,853 |
"""Module for converting files into correct format"""
import json
import logging
import os
import platform
import re
import subprocess
class Converter:
"""Converts files into the correct format"""
def convert_file(self, dry_run=False, convert_video=False, convert_audio=True,
convert_su... | [
37811,
26796,
329,
23202,
3696,
656,
3376,
5794,
37811,
198,
198,
11748,
33918,
198,
11748,
18931,
198,
11748,
28686,
198,
11748,
3859,
198,
11748,
302,
198,
11748,
850,
14681,
628,
198,
4871,
35602,
353,
25,
628,
220,
220,
220,
37227,
... | 2.134162 | 5,307 |
# -*- coding: utf-8 -*-
# @Time : 2020-04-11 12:34
# @Author : speeding_moto
import numpy as np
import pandas as pd
from matplotlib import pyplot as plt
EUNITE_PATH = "dataset/eunite.xlsx"
PARSE_TABLE_NAME = "mainData"
def load_eunite_data():
"""
return the generated load data, include all the features... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
2,
2488,
7575,
220,
220,
220,
1058,
12131,
12,
3023,
12,
1157,
1105,
25,
2682,
198,
2,
2488,
13838,
220,
1058,
26347,
62,
76,
2069,
198,
198,
11748,
299,
32152,
355,
... | 2.450065 | 771 |
n = map(int, input().split())
l = list(map(int, input().split()))
ans = 1000
for i in range(1,len(l)-1):
li = l[:]
li.remove(l[i])
m = 0
for j in range(len(li)-1):
m = max(li[j+1] - li[j], m)
ans = min(m, ans)
print(ans)
| [
77,
796,
3975,
7,
600,
11,
5128,
22446,
35312,
28955,
198,
75,
796,
1351,
7,
8899,
7,
600,
11,
5128,
22446,
35312,
3419,
4008,
198,
504,
796,
8576,
198,
1640,
1312,
287,
2837,
7,
16,
11,
11925,
7,
75,
13219,
16,
2599,
198,
220,
... | 1.818792 | 149 |
#!/usr/bin/env python
#
# Copyright (c) 1996-2011, SR Research Ltd., All Rights Reserved
#
#
# For use by SR Research licencees only. Redistribution and use in source
# and binary forms, with or without modification, are NOT permitted.
#
#
#
# Redistributions in binary form must reproduce the above copyright
# notice, ... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
198,
2,
15069,
357,
66,
8,
8235,
12,
9804,
11,
16808,
4992,
12052,
1539,
1439,
6923,
33876,
198,
2,
198,
2,
198,
2,
1114,
779,
416,
16808,
4992,
17098,
274,
691,
13,
2297,
396,
... | 3.393873 | 457 |
"""
Kth Largest Element in an Array:
Find the kth largest element in an unsorted array. Note that it is the kth largest element in
the sorted order, not the kth distinct element.
Example 1:
Input: [3,2,1,5,6,4] and k = 2
Output: 5
Example 2:
Input: [3,2,3,1,2,4,5,5,6] and k = 4
Output: 4
Note:
You may assume k is a... | [
37811,
198,
42,
400,
406,
853,
395,
11703,
287,
281,
15690,
25,
198,
198,
16742,
262,
479,
400,
4387,
5002,
287,
281,
5576,
9741,
7177,
13,
5740,
326,
340,
318,
262,
479,
400,
4387,
5002,
287,
198,
1169,
23243,
1502,
11,
407,
262,
... | 2.558442 | 231 |
import unittest
import yoda
from click.testing import CliRunner
class TestSuggestDrink(unittest.TestCase):
"""
Test for the following commands:
| Module: food
| command: suggest_drinks
""" | [
11748,
555,
715,
395,
198,
11748,
331,
11329,
198,
6738,
3904,
13,
33407,
1330,
1012,
72,
49493,
628,
198,
4871,
6208,
43857,
6187,
676,
7,
403,
715,
395,
13,
14402,
20448,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
6208,
... | 2.772152 | 79 |
import requests
page = requests.get("http://dataquestio.github.io/web-scraping-pages/simple.html")
page
| [
11748,
7007,
198,
198,
7700,
796,
7007,
13,
1136,
7203,
4023,
1378,
7890,
6138,
952,
13,
12567,
13,
952,
14,
12384,
12,
1416,
2416,
278,
12,
31126,
14,
36439,
13,
6494,
4943,
198,
7700,
198
] | 3 | 35 |
import imutils
import cv2
from imutils.paths import list_images
import numpy as np
import matplotlib.pyplot as plt
from skimage import exposure as ex
import imageio
import sys
for imagePath in list_images("/Users/rohanbanerjee/Documents/SukShi19/dhe"):
img = cv2.imread(imagePath)
print(imagePath)
# img = ... | [
11748,
545,
26791,
198,
11748,
269,
85,
17,
198,
6738,
545,
26791,
13,
6978,
82,
1330,
1351,
62,
17566,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
2603,
29487,
8019,
13,
9078,
29487,
355,
458,
83,
198,
6738,
1341,
9060,
1330,
711... | 2.15427 | 363 |
# encoding: UTF-8
# Copyright 2016-2017 Cedric Mesnil <cedric.mesnil@ubinity.com>, Ubinity SAS
#
# 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,
21004,
25,
41002,
12,
23,
198,
198,
2,
15069,
1584,
12,
5539,
25789,
1173,
14937,
45991,
1279,
771,
1173,
13,
6880,
45991,
31,
549,
6269,
13,
785,
22330,
12021,
6269,
35516,
198,
2,
198,
2,
49962,
739,
262,
24843,
13789,
11,
1062... | 1.675289 | 29,962 |
#!/usr/bin/env python
def ordinal(value):
"""
Converts zero or a *postive* integer (or their string
representations) to an ordinal value.
>>> for i in range(1,13):
... ordinal(i)
...
u'1st'
u'2nd'
u'3rd'
u'4th'
u'5th'
u'6th'
u'7th'
u'8th'
u'9th'
... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
4299,
2760,
1292,
7,
8367,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
1482,
24040,
6632,
393,
257,
1635,
7353,
425,
9,
18253,
357,
273,
511,
4731,
220,
198,
220,
220,
... | 1.782986 | 576 |
"""This module implements a low-level wrapper over Python-CAN's CAN API specific to Babydriver."""
import time
import can
from message_defs import BABYDRIVER_DEVICE_ID, BABYDRIVER_CAN_MESSAGE_ID
# The default CAN channel to use for this module. Changed dynamically by cli_setup.
default_channel = "can0" # pylint: di... | [
37811,
1212,
8265,
23986,
257,
1877,
12,
5715,
29908,
625,
11361,
12,
44565,
338,
15628,
7824,
2176,
284,
14801,
26230,
526,
15931,
198,
198,
11748,
640,
198,
11748,
460,
198,
198,
6738,
3275,
62,
4299,
82,
1330,
347,
6242,
56,
7707,
... | 2.48795 | 2,863 |
#Author: Toms Bergmanis toms.bergmanis@gmail.com
#Usage example python3 get_stats.py 20-char-context-v1 test Latvian
import sys
from collections import defaultdict
model_name = sys.argv[1]
data_set = sys.argv[2] # either dev or test
for lang in sys.argv[3:]:
model=lang + "-" + model_name
train_inflections =... | [
2,
13838,
25,
309,
3150,
24626,
805,
271,
284,
907,
13,
3900,
805,
271,
31,
14816,
13,
785,
198,
2,
28350,
1672,
21015,
18,
651,
62,
34242,
13,
9078,
1160,
12,
10641,
12,
22866,
12,
85,
16,
1332,
5476,
85,
666,
220,
198,
11748,
... | 1.902059 | 1,797 |
import numpy as np
from ..Tools.Downloading._RebuildDataIndex import _RebuildDataIndex
from . import _Fields
def RebuildDataIndex(sc,Prod,L):
'''
Rebuilds the data index for a data product.
Inputs
======
sc : str
'a'|'b'|'c'|'d'|'e'
Prod: str
Product string (see below)
L : str or int
Level of data to do... | [
11748,
299,
32152,
355,
45941,
198,
6738,
11485,
33637,
13,
10002,
278,
13557,
28951,
3547,
6601,
15732,
1330,
4808,
28951,
3547,
6601,
15732,
198,
6738,
764,
1330,
4808,
15878,
82,
628,
198,
4299,
797,
11249,
6601,
15732,
7,
1416,
11,
... | 2.620253 | 316 |
# coding=utf-8
from pyramid.config import Configurator
from pyramid.security import remember
from pyramid_ldap3 import get_ldap_connector
from tracim_backend.config import CFG
from tracim_backend.extensions import hapic
from tracim_backend.lib.core.user import UserApi
from tracim_backend.lib.utils.request import Traci... | [
2,
19617,
28,
40477,
12,
23,
198,
6738,
27944,
13,
11250,
1330,
17056,
333,
1352,
198,
6738,
27944,
13,
12961,
1330,
3505,
198,
6738,
27944,
62,
335,
499,
18,
1330,
651,
62,
335,
499,
62,
8443,
273,
198,
198,
6738,
491,
330,
320,
... | 3.071186 | 295 |
# Copyright (c) 2012 OpenStack Foundation.
#
# 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... | [
2,
15069,
357,
66,
8,
2321,
4946,
25896,
5693,
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,
... | 3.380499 | 841 |
#!/usr/bin/env python3
############################################################
## Jose F. Sanchez, Marta Lopez & Lauro Sumoy ##
## Copyright (C) 2019-2021 Lauro Sumoy Lab, IGTP, Spain ##
############################################################
from HCGB.functions import aesthetics_functions
"""
T... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
18,
198,
29113,
14468,
7804,
4242,
198,
2235,
5264,
376,
13,
21909,
11,
3981,
64,
22593,
1222,
40014,
305,
5060,
726,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
22492,
19... | 3.864662 | 266 |
__author__ = 'Jonas Jaeger'
from os.path import join
import os
from datetime import datetime
import json
import shutil
import zipfile
import lost
import fsspec
import numpy as np
import cv2
import ast
from lost.logic.crypt import decrypt_fs_connection
#import ptvsd
DATA_ROOT_PATH = ""
MEDIA_ROOT_PATH = DATA_ROOT_PAT... | [
834,
9800,
834,
796,
705,
18219,
292,
34521,
1362,
6,
198,
198,
6738,
28686,
13,
6978,
1330,
4654,
198,
11748,
28686,
198,
6738,
4818,
8079,
1330,
4818,
8079,
198,
11748,
33918,
198,
11748,
4423,
346,
198,
11748,
19974,
7753,
198,
11748... | 2.348131 | 856 |
from __future__ import annotations
import asyncio
import logging
from typing import List, Optional, Union
import confluent_kafka
from confluent_avro import SchemaRegistry
from kafka_streamer.client import AsyncKafkaConsumer, AsyncKafkaProducer
from kafka_streamer.models import SchematicRecord, Serializable
from kafk... | [
6738,
11593,
37443,
834,
1330,
37647,
198,
198,
11748,
30351,
952,
198,
11748,
18931,
198,
6738,
19720,
1330,
7343,
11,
32233,
11,
4479,
198,
198,
11748,
1013,
28216,
62,
74,
1878,
4914,
198,
6738,
1013,
28216,
62,
615,
305,
1330,
10011... | 3.514286 | 105 |
# Generated by Django 2.0.13 on 2020-01-29 20:09
from django.db import migrations, models
import django.db.models.deletion
| [
2,
2980,
515,
416,
37770,
362,
13,
15,
13,
1485,
319,
12131,
12,
486,
12,
1959,
1160,
25,
2931,
198,
198,
6738,
42625,
14208,
13,
9945,
1330,
15720,
602,
11,
4981,
198,
11748,
42625,
14208,
13,
9945,
13,
27530,
13,
2934,
1616,
295,
... | 2.840909 | 44 |
"""Build, test, convert and upload a conda package.
For the upload step to work you have to log into your anaconda.org account
before you run the script. The steps for this are explained here:
https://conda.io/docs/user-guide/tutorials/build-pkgs.html
"""
from conda_build.api import build, convert
from os.path impor... | [
37811,
15580,
11,
1332,
11,
10385,
290,
9516,
257,
1779,
64,
5301,
13,
198,
198,
1890,
262,
9516,
2239,
284,
670,
345,
423,
284,
2604,
656,
534,
281,
330,
13533,
13,
2398,
1848,
198,
19052,
345,
1057,
262,
4226,
13,
383,
4831,
329,
... | 2.65368 | 462 |
from setuptools import (
setup,
find_packages,
)
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, "README.md")) as rdme:
with open(path.join(here, "CHANGELOG.md")) as chlog:
readme = rdme.read()
changes = chlog.read()
long_description = read... | [
6738,
900,
37623,
10141,
1330,
357,
198,
220,
220,
220,
9058,
11,
198,
220,
220,
220,
1064,
62,
43789,
11,
198,
8,
198,
6738,
28686,
1330,
3108,
198,
198,
1456,
796,
3108,
13,
397,
2777,
776,
7,
6978,
13,
15908,
3672,
7,
834,
7753... | 2.570565 | 496 |
# Copyright (c) 2021, Ethan Henderson
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and... | [
2,
15069,
357,
66,
8,
33448,
11,
28926,
22016,
198,
2,
1439,
2489,
10395,
13,
198,
2,
198,
2,
2297,
396,
3890,
290,
779,
287,
2723,
290,
13934,
5107,
11,
351,
393,
1231,
198,
2,
17613,
11,
389,
10431,
2810,
326,
262,
1708,
3403,
... | 3.524096 | 498 |
from datetime import datetime
import re
from typing import List
from openpyxl.workbook import Workbook
from openpyxl.worksheet.worksheet import Worksheet
from openpyxl.worksheet.page import PageMargins
from openpyxl.styles import Font, PatternFill, Alignment, Border, Side
from wrex.extraction.pub_extract import PubEx... | [
6738,
4818,
8079,
1330,
4818,
8079,
198,
11748,
302,
198,
6738,
19720,
1330,
7343,
198,
198,
6738,
1280,
9078,
87,
75,
13,
1818,
2070,
1330,
5521,
2070,
198,
6738,
1280,
9078,
87,
75,
13,
5225,
25473,
13,
5225,
25473,
1330,
10933,
254... | 3.491935 | 124 |
from django.db import models
class Hash(models.Model):
"""
Hash Model
:var field text: Text field
:var field hash: Char field
"""
text = models.TextField()
hash = models.CharField(max_length=64)
| [
6738,
42625,
14208,
13,
9945,
1330,
4981,
628,
198,
4871,
21059,
7,
27530,
13,
17633,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
21059,
9104,
628,
220,
220,
220,
1058,
7785,
2214,
2420,
25,
8255,
2214,
198,
220,
220,
220,
... | 2.73494 | 83 |
# Copyright (c) 2018-2020, Vanessa Sochat All rights reserved.
# See the LICENSE in the main repository at:
# https://www.github.com/openbases/openbases-python
from openbases.logger import bot
from openbases.utils import read_frontmatter
import os
import re
import sys
class Author:
'''an Author holds a name, o... | [
2,
15069,
357,
66,
8,
2864,
12,
42334,
11,
42100,
1406,
17006,
1439,
2489,
10395,
13,
198,
2,
4091,
262,
38559,
24290,
287,
262,
1388,
16099,
379,
25,
198,
2,
220,
220,
220,
3740,
1378,
2503,
13,
12567,
13,
785,
14,
9654,
65,
1386... | 3.231481 | 108 |
stack = Stack()
stack.push(4)
stack.push(6)
stack.push(2)
print(stack.get_min_value())
stack.push(1)
print(stack.get_min_value())
| [
198,
25558,
796,
23881,
3419,
198,
25558,
13,
14689,
7,
19,
8,
198,
25558,
13,
14689,
7,
21,
8,
198,
25558,
13,
14689,
7,
17,
8,
198,
4798,
7,
25558,
13,
1136,
62,
1084,
62,
8367,
28955,
198,
25558,
13,
14689,
7,
16,
8,
198,
4... | 2.339286 | 56 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests for `lui_gui` package."""
import os
import random
import pathlib
from unittest import TestCase
import mock
from luigi.mock import MockTarget
from luigi import LocalTarget
from luigi.contrib.opener import OpenerTarget, NoOpenerError
class LuigiTestExternalTasks(... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
37811,
51,
3558,
329,
4600,
2290,
72,
62,
48317,
63,
5301,
526,
15931,
198,
198,
11748,
28686,
198,
11748,
4738,
... | 2.255223 | 1,101 |
import rlp
from ethereum.utils import sha3, encode_hex
from ethereum import trie
def get_merkle_proof(db, root, value):
"""Get the merkle proof of a given value in trie
value must exist in trie or exception will be thrown
returns a list of nodes starting from root to leaf node
"""
assert db... | [
11748,
374,
34431,
198,
198,
6738,
304,
17733,
13,
26791,
1330,
427,
64,
18,
11,
37773,
62,
33095,
198,
6738,
304,
17733,
1330,
1333,
68,
628,
198,
4299,
651,
62,
647,
74,
293,
62,
13288,
7,
9945,
11,
6808,
11,
1988,
2599,
198,
22... | 2.325651 | 998 |
/usr/local/Cellar/opencv/2.4.12_2/lib/python2.7/site-packages/cv.py | [
14,
14629,
14,
12001,
14,
34,
14203,
14,
9654,
33967,
14,
17,
13,
19,
13,
1065,
62,
17,
14,
8019,
14,
29412,
17,
13,
22,
14,
15654,
12,
43789,
14,
33967,
13,
9078
] | 2.030303 | 33 |
"""Helper kytos-challenge functions."""
# System imports
from struct import *
# Local imports
from packet import *
def unpack_header(bytes):
"""Unpack packet header content."""
header = unpack('>BBHI', bytes)
return header[0], header[1], header[2], header[3]
def unpack_packet(packet_name):
"""Unpack... | [
37811,
47429,
479,
20760,
418,
12,
36747,
3540,
5499,
526,
15931,
198,
198,
2,
4482,
17944,
198,
6738,
2878,
1330,
1635,
198,
198,
2,
10714,
17944,
198,
6738,
19638,
1330,
1635,
198,
198,
4299,
555,
8002,
62,
25677,
7,
33661,
2599,
19... | 2.772487 | 189 |
"""empty message
Revision ID: 4727c742f8e5
Revises: 2923a924be67
Create Date: 2019-12-02 21:24:09.809578
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '4727c742f8e5'
down_revision = '2923a924be67'
branch_labels = None
depe... | [
37811,
28920,
3275,
198,
198,
18009,
1166,
4522,
25,
6298,
1983,
66,
22,
3682,
69,
23,
68,
20,
198,
18009,
2696,
25,
2808,
1954,
64,
24,
1731,
1350,
3134,
198,
16447,
7536,
25,
13130,
12,
1065,
12,
2999,
2310,
25,
1731,
25,
2931,
... | 2.526316 | 133 |
from sympy.combinatorics.graycode import (
GrayCode,
bin_to_gray,
random_bitstring,
get_subset_from_bitstring,
graycode_subsets,
gray_to_bin,
)
from sympy.testing.pytest import raises
| [
6738,
10558,
88,
13,
785,
8800,
1352,
873,
13,
44605,
8189,
1330,
357,
198,
220,
220,
220,
12723,
10669,
11,
198,
220,
220,
220,
9874,
62,
1462,
62,
44605,
11,
198,
220,
220,
220,
4738,
62,
2545,
8841,
11,
198,
220,
220,
220,
651,... | 2.386364 | 88 |
#!/usr/bin/env python
"""
Build and display orderbooks from a given pcap file
"""
import sys
import os.path
import gzip
import dpkt
import binascii
from mdp.secdef import SecDef
from mdp.orderbook import PacketProcessor
from mdp.orderbook import ConsolePrinter
from sbedecoder import MDPSchema
from sbedecoder impor... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
198,
37811,
198,
15580,
290,
3359,
1502,
12106,
422,
257,
1813,
279,
11128,
2393,
198,
37811,
198,
198,
11748,
25064,
198,
11748,
28686,
13,
6978,
198,
11748,
308,
13344,
198,
198,
11748... | 2.973333 | 150 |
# Overcommented for explanatory reasons
# Load the library that handles connecting to the internet
import requests
# Ask the user for the search term
query = input('What do you want to search?')
# Performing the search
searchres = requests.get('https://www.google.com/search?q='+ query)
# Make sure the request works... | [
2,
3827,
785,
12061,
329,
44742,
3840,
198,
2,
8778,
262,
5888,
326,
17105,
14320,
284,
262,
5230,
198,
11748,
7007,
198,
198,
2,
16981,
262,
2836,
329,
262,
2989,
3381,
220,
198,
22766,
796,
5128,
10786,
2061,
466,
345,
765,
284,
2... | 3.656566 | 99 |
"""
s_scatter3d
"""
| [
37811,
198,
82,
62,
1416,
1436,
18,
67,
198,
37811,
628
] | 1.909091 | 11 |
import sys
import os
simulator = sys.platform != "pyboard"
# to overwrite these settings create a config.py file
if simulator:
storage_root = "./fs"
try:
os.mkdir(storage_root)
except:
pass
else:
storage_root = ""
# pin that triggers QR code
# if command mode failed
QRSCANNER_TRIGGE... | [
11748,
25064,
198,
11748,
28686,
198,
198,
14323,
8927,
796,
25064,
13,
24254,
14512,
366,
9078,
3526,
1,
198,
198,
2,
284,
49312,
777,
6460,
2251,
257,
4566,
13,
9078,
2393,
198,
198,
361,
35375,
25,
198,
220,
220,
220,
6143,
62,
1... | 2.550388 | 129 |
import numpy
def principal_axis(alpha_carbons):
"""
Calculate principal inertia axis for the structure along with its geometrical center
---
Parameters:
alpha_carbons: alpha carbons of the structure
---
Return:
center: geometrical center of the structure
axis_direction: directio... | [
11748,
299,
32152,
628,
198,
4299,
10033,
62,
22704,
7,
26591,
62,
7718,
23461,
2599,
198,
220,
220,
220,
37227,
198,
220,
220,
220,
27131,
378,
10033,
48482,
16488,
329,
262,
4645,
1863,
351,
663,
4903,
908,
8143,
3641,
628,
220,
220... | 2.900302 | 331 |
"""empty message
Revision ID: e11c61ce67e7
Revises: 5db306adc6cc
Create Date: 2018-04-17 08:27:07.852716
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
# revision identifiers, used by Alembic.
revision = 'e11c61ce67e7'
down_revision = '5db306adc6cc'
branch_labels = None... | [
37811,
28920,
3275,
198,
198,
18009,
1166,
4522,
25,
304,
1157,
66,
5333,
344,
3134,
68,
22,
198,
18009,
2696,
25,
642,
9945,
20548,
324,
66,
21,
535,
198,
16447,
7536,
25,
2864,
12,
3023,
12,
1558,
8487,
25,
1983,
25,
2998,
13,
5... | 2.544776 | 134 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from starchart.ml import contexts, jobs
| [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
6738,
39515,
433,
13,
4029,
1330,
26307,
11,
3946,
198
] | 2.558824 | 34 |
# -*- coding: utf-8 -*-
#*************************************************************
# Copyright (c) 2003-2012, Emerging Threats
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
# following conditions are met:
#
# * ... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
198,
2,
17174,
8412,
4557,
35625,
198,
2,
220,
15069,
357,
66,
8,
5816,
12,
6999,
11,
48297,
25238,
82,
198,
2,
220,
1439,
2489,
10395,
13,
198,
2,
220,
220,
198,
... | 3.590164 | 488 |
"""Main interface to other modules
"""
import argparse
# multivariate
from mise.dl.dt_xgboost import dl_xgboost
from mise.dl.mlp_mul_ms import dl_mlp_mul_ms
from mise.dl.mlp_mul_ms_mccr import dl_mlp_mul_ms_mccr
from mise.dl.mlp_mul_transformer import dl_mlp_mul_transformer
from mise.dl.mlp_mul_transformer_mccr import... | [
37811,
13383,
7071,
284,
584,
13103,
198,
37811,
198,
11748,
1822,
29572,
198,
198,
2,
1963,
42524,
198,
6738,
285,
786,
13,
25404,
13,
28664,
62,
87,
70,
39521,
1330,
288,
75,
62,
87,
70,
39521,
198,
6738,
285,
786,
13,
25404,
13,
... | 2.296703 | 910 |
import requests
import unittest
from cmc_api.common.api import Api
if __name__ == '__main__':
unittest.main() | [
11748,
7007,
198,
11748,
555,
715,
395,
198,
6738,
12067,
66,
62,
15042,
13,
11321,
13,
15042,
1330,
5949,
72,
628,
198,
198,
361,
11593,
3672,
834,
6624,
705,
834,
12417,
834,
10354,
198,
220,
220,
220,
555,
715,
395,
13,
12417,
34... | 2.697674 | 43 |
import sys
import random
import os.path as osp
import time
import tqdm
import torch
import torch.nn.functional as F
from torch import tensor
from torch.optim import Adam
from sklearn.model_selection import StratifiedKFold
from torch_geometric.data import DataLoader, DenseDataLoader as DenseLoader
device = torch.devic... | [
11748,
25064,
198,
11748,
4738,
198,
11748,
28686,
13,
6978,
355,
267,
2777,
198,
11748,
640,
198,
198,
11748,
256,
80,
36020,
198,
11748,
28034,
198,
11748,
28034,
13,
20471,
13,
45124,
355,
376,
198,
6738,
28034,
1330,
11192,
273,
198... | 2.293149 | 1,518 |
from python.classes import Solution
solution = Solution('inputs/inputs_02.json', first_solution, second_solution)
| [
6738,
21015,
13,
37724,
1330,
28186,
628,
628,
198,
82,
2122,
796,
28186,
10786,
15414,
82,
14,
15414,
82,
62,
2999,
13,
17752,
3256,
717,
62,
82,
2122,
11,
1218,
62,
82,
2122,
8,
628
] | 3.4 | 35 |
from ecmwf.opendata import Client
| [
6738,
9940,
76,
86,
69,
13,
404,
437,
1045,
1330,
20985,
628
] | 2.916667 | 12 |
# 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.982238 | 563 |
# TC008 - My blog post delete
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.chrome.options import Options
import time
opt = Options()
opt.headless = False
driver = webdriver.Chrome(ChromeDriverManager().install(), options=opt)
driver.set_window_size(10... | [
2,
17283,
25257,
532,
2011,
4130,
1281,
12233,
198,
6738,
384,
11925,
1505,
1330,
3992,
26230,
198,
6738,
3992,
26230,
62,
37153,
13,
46659,
1330,
13282,
32103,
13511,
198,
6738,
384,
11925,
1505,
13,
12384,
26230,
13,
46659,
13,
25811,
... | 2.352075 | 747 |
from requests.utils import quote
urlString1 = "NIFTY 25"
urlString2 = 'NIFTY A\B\C\D'
urlString3 = '22/01/2014'
# Using urls library
print quote(urlString1, safe='')
print quote(urlString2, safe='')
print quote(urlString3, safe='')
| [
6738,
7007,
13,
26791,
1330,
9577,
198,
198,
6371,
10100,
16,
796,
366,
45,
5064,
9936,
1679,
1,
198,
6371,
10100,
17,
796,
705,
45,
5064,
9936,
317,
59,
33,
59,
34,
59,
35,
6,
198,
6371,
10100,
18,
796,
705,
1828,
14,
486,
14,
... | 2.571429 | 91 |
# Copyright (c) 2017, Brandon Jones.
#
# 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, merge, publish, dis... | [
2,
15069,
357,
66,
8,
2177,
11,
14328,
5437,
13,
198,
2,
198,
2,
2448,
3411,
318,
29376,
7520,
11,
1479,
286,
3877,
11,
284,
597,
1048,
16727,
257,
4866,
198,
2,
286,
428,
3788,
290,
3917,
10314,
3696,
357,
1169,
366,
25423,
12340... | 3.798762 | 323 |
from django.core.urlresolvers import reverse
from django.http import Http404, HttpResponseRedirect
from django.views.generic.base import TemplateView, View
from kolibri.content.models import ChannelMetadata, ContentNode
| [
6738,
42625,
14208,
13,
7295,
13,
6371,
411,
349,
690,
1330,
9575,
198,
6738,
42625,
14208,
13,
4023,
1330,
367,
29281,
26429,
11,
367,
29281,
31077,
7738,
1060,
198,
6738,
42625,
14208,
13,
33571,
13,
41357,
13,
8692,
1330,
37350,
7680... | 3.539683 | 63 |
import tensorflow as tf
cp_callback = tf.keras.callbacks.ModelCheckpoint(filepath=checkpoint_save_path,
save_weights_only=False,
save_best_only=False)
tensorboard = tf.keras.callbacks.Tenso... | [
198,
11748,
11192,
273,
11125,
355,
48700,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
198,
220,
220,
220,
31396,
62,
47423,
796,
48700,
13,
6122,
292,
13,
13345,
10146,
13,
17633,
9787,
4122,
7,
7753,
6978,
28,... | 1.569106 | 492 |
import psdaq.configdb.configdb as cdb
import sys
import IPython
import numpy as np
import argparse
from psdaq.configdb.opaltt_config_store import opaltt_cdict
# Copy values and shape from config dict into cdict
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='Update weights and/or calib p... | [
11748,
26692,
48539,
13,
11250,
9945,
13,
11250,
9945,
355,
269,
9945,
198,
11748,
25064,
198,
11748,
6101,
7535,
198,
11748,
299,
32152,
355,
45941,
198,
11748,
1822,
29572,
198,
6738,
26692,
48539,
13,
11250,
9945,
13,
33067,
926,
62,
... | 2.598921 | 1,112 |
from asyncio import sleep, get_event_loop
from contextvars import copy_context
from functools import wraps, partial
from itertools import count
from random import randint
from typing import Tuple, Callable, TypeVar, Awaitable
T = TypeVar("T")
__all__ = ["cached", "retry", "run_in_executor"]
| [
6738,
30351,
952,
1330,
3993,
11,
651,
62,
15596,
62,
26268,
198,
6738,
4732,
85,
945,
1330,
4866,
62,
22866,
198,
6738,
1257,
310,
10141,
1330,
27521,
11,
13027,
198,
6738,
340,
861,
10141,
1330,
954,
198,
6738,
4738,
1330,
43720,
60... | 3.23913 | 92 |
# -*- coding: utf-8 -*-
from path import path
PATH = path(__file__).dirname()
BIN = PATH / 'node_modules' / '.bin'
SRC = PATH / 'src'
COFFEE_SOURCES = list(SRC.walkfiles('*.coffee'))
JS_SOURCES = list(SRC.walkfiles('*.js'))
SOURCES = COFFEE_SOURCES + JS_SOURCES
COFFEE_TARGETS = [
(PATH / src.relpath(SRC)).repl... | [
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
6738,
3108,
1330,
3108,
198,
198,
34219,
796,
3108,
7,
834,
7753,
834,
737,
15908,
3672,
3419,
198,
33,
1268,
796,
46490,
1220,
705,
17440,
62,
18170,
6,
1220,
45302,
... | 1.901042 | 576 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This is a skeleton file that can serve as a starting point for a Python
console script. To run this script uncomment the following lines in the
[options.entry_points] section in setup.cfg:
console_scripts =
fibonacci = nlpia_bot.skeleton:run
Then run `pyt... | [
2,
48443,
14629,
14,
8800,
14,
24330,
21015,
198,
2,
532,
9,
12,
19617,
25,
3384,
69,
12,
23,
532,
9,
12,
198,
37811,
198,
1212,
318,
257,
18328,
2393,
326,
460,
4691,
355,
257,
3599,
966,
329,
257,
11361,
198,
41947,
4226,
13,
... | 2.511052 | 1,493 |
#
# Copyright (c) 2018-2019 One Identity
#
# 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, merge, publis... | [
2,
198,
2,
220,
220,
15069,
357,
66,
8,
2864,
12,
23344,
1881,
27207,
198,
2,
198,
2,
2448,
3411,
318,
29376,
7520,
11,
1479,
286,
3877,
11,
284,
597,
1048,
16727,
257,
4866,
198,
2,
286,
428,
3788,
290,
3917,
10314,
3696,
357,
... | 3.589681 | 407 |
from stataLogObject.Supports import ForestPlotInvalidAttributes, FOREST_DICT, methods_in_line
from stataLogObject.Configs import Table
from miscSupports import flip_list, write_markdown
from csvObject import write_csv
| [
6738,
336,
1045,
11187,
10267,
13,
15979,
2096,
1330,
9115,
43328,
44651,
29021,
11,
7473,
6465,
62,
35,
18379,
11,
5050,
62,
259,
62,
1370,
198,
6738,
336,
1045,
11187,
10267,
13,
16934,
82,
1330,
8655,
198,
198,
6738,
12747,
15979,
... | 3.606557 | 61 |
import numpy as onp
from sum_tree import SumTreef as SumTree
from .experience_buffer import ExperienceBuffer
class PriorityBuffer(ExperienceBuffer):
"""
Extension of ExperienceBuffer, enables proportional prioritization of transitions.
"""
def add_transitions(self,
observation_... | [
11748,
299,
32152,
355,
319,
79,
198,
6738,
2160,
62,
21048,
1330,
5060,
27660,
69,
355,
5060,
27660,
198,
6738,
764,
23100,
1240,
62,
22252,
1330,
16386,
28632,
198,
198,
4871,
34416,
28632,
7,
44901,
28632,
2599,
198,
220,
220,
220,
... | 2.337954 | 1,515 |
import plugin
import os
plugin_class="targz"
| [
11748,
13877,
198,
11748,
28686,
198,
198,
33803,
62,
4871,
2625,
83,
853,
89,
1,
198
] | 2.875 | 16 |
class AssetListEntry(object):
"""Convenience class to lighten up asset list complexity during
export operations.
Each AssetListEntry stands for a single asset (asset_path) and all
the corresponding asset instances (objects). Each instance entry
is stored as a 2-tuple of the objects name as a stri... | [
198,
198,
4871,
31433,
8053,
30150,
7,
15252,
2599,
198,
220,
220,
220,
37227,
3103,
574,
1240,
1398,
284,
1657,
268,
510,
11171,
1351,
13357,
1141,
198,
220,
220,
220,
10784,
4560,
13,
628,
220,
220,
220,
5501,
31433,
8053,
30150,
62... | 2.942197 | 519 |
# Assign the first element of the list to answer_1 on line 2
lst=[11, 100, 99, 1000, 999]
answer_1=lst[0]
print(answer_1)
#=====================================
#This time print the second element of the list directly on line 3. You should get 100.
lst=[11, 100, 101, 999, 1001]
print(lst[1])
#======================... | [
2,
2195,
570,
262,
717,
5002,
286,
262,
1351,
284,
3280,
62,
16,
319,
1627,
362,
198,
198,
75,
301,
41888,
1157,
11,
1802,
11,
7388,
11,
8576,
11,
36006,
60,
198,
41484,
62,
16,
28,
75,
301,
58,
15,
60,
198,
4798,
7,
41484,
62... | 2.87441 | 1,059 |
import torch
from copy import deepcopy
# from .visualization import plot_distributions_2d
from itertools import chain
| [
11748,
28034,
198,
6738,
4866,
1330,
2769,
30073,
198,
2,
422,
764,
41464,
1634,
1330,
7110,
62,
17080,
2455,
507,
62,
17,
67,
198,
6738,
340,
861,
10141,
1330,
6333,
198,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
220,
... | 3 | 44 |
# standard
import unittest
import tempfile
import typing
# external
from encyclopedia import Unindexed
class EAV(dict, Unindexed):
'''
Container for storing small-ish EAV "triples" (Entity-Atrribute-Value).
- Focus of class is providing convenient dictionary-like access rather than data analysis functional... | [
2,
3210,
198,
11748,
555,
715,
395,
198,
11748,
20218,
7753,
198,
11748,
19720,
198,
2,
7097,
198,
6738,
45352,
1330,
791,
9630,
276,
198,
198,
4871,
412,
10116,
7,
11600,
11,
791,
9630,
276,
2599,
198,
220,
220,
220,
705,
7061,
198... | 2.131538 | 2,600 |