content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
import setuptools with open("README.md", "r", encoding="utf-8") as f: long_description = f.read() setuptools.setup( name="cause2e", version="0.2.0", author="Daniel Gruenbaum", author_email="daniel.gruenbaum@ams-osram.com", description="A package for end-to-end causal analysis", ...
[ 11748, 900, 37623, 10141, 201, 198, 201, 198, 201, 198, 4480, 1280, 7203, 15675, 11682, 13, 9132, 1600, 366, 81, 1600, 21004, 2625, 40477, 12, 23, 4943, 355, 277, 25, 201, 198, 220, 220, 220, 890, 62, 11213, 796, 277, 13, 961, 3419,...
2.251599
469
import cPickle model=cPickle.load(open('lstm_tanh_relu_[1468202263.38]_2_0.610.p')) cPickle.dump(model,open('model.bin.nlg','wb'))
[ 11748, 269, 31686, 293, 201, 198, 19849, 28, 66, 31686, 293, 13, 2220, 7, 9654, 10786, 75, 301, 76, 62, 38006, 71, 62, 260, 2290, 62, 58, 1415, 3104, 1238, 1828, 5066, 13, 2548, 60, 62, 17, 62, 15, 13, 39132, 13, 79, 6, 4008, ...
1.970149
67
#! /usr/bin/python3 from . import get_best from . import math_helper
[ 2, 0, 1220, 14629, 14, 8800, 14, 29412, 18, 198, 198, 6738, 764, 1330, 651, 62, 13466, 198, 6738, 764, 1330, 10688, 62, 2978, 525, 198 ]
2.692308
26
from pathlib import Path from typing import Callable, Optional import numpy as np import torch from torch_geometric.data import Data, InMemoryDataset, download_url class Twitch(InMemoryDataset): r"""The Twitch Gamer networks introduced in the `"Multi-scale Attributed Node Embedding" <https://arxiv.org/a...
[ 6738, 3108, 8019, 1330, 10644, 198, 6738, 19720, 1330, 4889, 540, 11, 32233, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 198, 6738, 28034, 62, 469, 16996, 13, 7890, 1330, 6060, 11, 554, 30871, 27354, 292, 316, 11, ...
2.779468
526
import json from enum import Enum, unique @unique video_mapper = {item.value: item for item in Video.__members__.values() if item.enable} video_mapper_json = [] for item in Video.__members__.values(): if not item.enable: continue video_mapper_json.append({ 'label': item.label, 'valu...
[ 11748, 33918, 198, 6738, 33829, 1330, 2039, 388, 11, 3748, 628, 198, 31, 34642, 628, 198, 15588, 62, 76, 11463, 796, 1391, 9186, 13, 8367, 25, 2378, 329, 2378, 287, 7623, 13, 834, 30814, 834, 13, 27160, 3419, 611, 2378, 13, 21633, 9...
2.555556
162
# -*- coding: utf-8 -*- # # Copyright 2018 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 1303, 198, 2, 15069, 2864, 3012, 3457, 13, 1439, 6923, 33876, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, ...
3.182994
541
""" Reading and writing JGF format graphs. """ ### IMPORTS import json ### CONSTANTS & DEFINES ### CODE ### # XXX: maybe look at a custom decoder/loader?
[ 37811, 198, 36120, 290, 3597, 449, 21713, 5794, 28770, 13, 198, 37811, 198, 198, 21017, 30023, 33002, 198, 198, 11748, 33918, 628, 198, 21017, 7102, 2257, 1565, 4694, 1222, 5550, 20032, 1546, 198, 198, 21017, 42714, 44386, 198, 220, 220, ...
3
54
#!/usr/bin/env python """ Test module for VOF with EV """ from __future__ import absolute_import from builtins import object from proteus.iproteus import * from proteus import Comm comm = Comm.get() Profiling.logLevel=2 Profiling.verbose=True import numpy as np import tables from . import thelper_vof from . import the...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 14402, 8265, 329, 569, 19238, 351, 8696, 198, 37811, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 6738, 3170, 1040, 1330, 2134, 198, 6738, 5915, 385, 13, ...
3.016807
119
# Copyright (c) 2020 Mobvoi Inc. (authors: Fangjun Kuang) # Xiaomi Corporation (authors: Haowen Qiu) # # See ../../../LICENSE for clarification regarding multiple authors import torch # noqa import _k2 # The FSA properties are a bit-field; these constants can be used # with '&' to deter...
[ 2, 15069, 357, 66, 8, 220, 12131, 220, 16540, 13038, 72, 3457, 13, 220, 220, 220, 220, 220, 220, 220, 357, 41617, 25, 24468, 29741, 12554, 648, 8, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220...
2.80789
583
# Database info MONGODB_DB_NAME = "NXS" MONGODB_MODELS_COLLECTION_NAME = "Models" MONGODB_PIPELINES_COLLECTION_NAME = "Pipelines" MONGODB_W4_MODEL_PROFILES_COLLECTION_NAME = "W4Profiles" # Storage info STORAGE_MODEL_PATH = "models" STORAGE_PREPROC_PATH = "preprocessing" STORAGE_POSTPROC_PATH = "postprocessing" STORAGE...
[ 2, 24047, 7508, 198, 44, 18494, 3727, 33, 62, 11012, 62, 20608, 796, 366, 45, 55, 50, 1, 198, 44, 18494, 3727, 33, 62, 33365, 37142, 62, 25154, 16779, 2849, 62, 20608, 796, 366, 5841, 1424, 1, 198, 44, 18494, 3727, 33, 62, 47, 4...
2.264822
253
# Copyright 2014 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. class NetworkController(object): """Control network settings and servers to simulate the Web. Network changes include forwarding device ports to host p...
[ 2, 15069, 1946, 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, 628, 198, 4871,...
2.786432
398
import OPEN_WEATHER_KEYS from requests import get, exceptions from datetime import datetime # ---------------------------------------------------------------------------- """ Use the datetime library to convert an integer unix timestamp and a unix timezone offset to calculate string formated time and date...
[ 11748, 38303, 62, 8845, 45226, 62, 7336, 16309, 198, 6738, 7007, 1330, 651, 11, 13269, 198, 6738, 4818, 8079, 1330, 4818, 8079, 628, 198, 2, 16529, 10541, 198, 37811, 198, 220, 220, 220, 5765, 262, 4818, 8079, 5888, 284, 10385, 281, 1...
2.290772
1,723
#!/usr/bin/env python############################################################################## #!/usr/bin/env python3 ############################################################################## # EVOLIFE http://evolife.telecom-paris.fr Jean-Louis Dessalles # # Telecom Paris 2021 ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 29113, 29113, 7804, 4242, 2235, 198, 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 29113, 29113, 7804, 4242, 2235, 198, 2, 8696, 3535, 29150, 220, 2638, 1378, 1990, 349, 901, 13, 46...
2.843316
5,042
#!//Users/tkirke/anaconda/bin/python # -*- coding: utf-8 -*- import re import sys,os import codecs from math import sqrt,log from scipy.io.wavfile import read,write from scipy import signal import numpy import matplotlib import pylab from lame import * # Remove chunks more -27 db down from peak to remove audio 'gaps' ...
[ 2, 0, 1003, 14490, 14, 30488, 343, 365, 14, 272, 330, 13533, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 302, 198, 11748, 25064, 11, 418, 198, 11748, 40481, 82, 198, 6738, 10688,...
1.941489
752
""" Bills routes """ from flask import Blueprint, render_template, redirect, request, url_for, flash from flask_login import login_required, current_user from application import db from .bill_forms import BillForm from ..models import Bill bills_bp = Blueprint('bills', __name__, url_prefix='/user', ...
[ 37811, 20209, 11926, 37227, 198, 198, 6738, 42903, 1330, 39932, 11, 8543, 62, 28243, 11, 18941, 11, 2581, 11, 19016, 62, 1640, 11, 7644, 198, 6738, 42903, 62, 38235, 1330, 17594, 62, 35827, 11, 1459, 62, 7220, 198, 6738, 3586, 1330, 2...
2.457786
1,066
# Licensed under the MIT license # http://opensource.org/licenses/mit-license.php # Copyright 2007 - Frank Scholz <coherence@beebits.net> from twisted.web import server, resource from twisted.python import failure from twisted.internet import defer from coherence import log, SERVER_ID from coherence.extern.et impor...
[ 2, 49962, 739, 262, 17168, 5964, 198, 2, 2638, 1378, 44813, 1668, 13, 2398, 14, 677, 4541, 14, 2781, 12, 43085, 13, 10121, 198, 198, 2, 15069, 4343, 532, 5278, 3059, 349, 89, 1279, 1073, 23545, 31, 1350, 1765, 896, 13, 3262, 29, 1...
2.224526
1,688
from setuptools import setup, find_packages VERSION = "0.0.5" setup( name="mkdocs-bulma", version=VERSION, url="https://github.com/rajasimon/mkdocs-bulma", license="MIT", description="Bulma for mkdocs", author="Raja Simon", author_email="rajasimon@icloud.com", packages=find_packages()...
[ 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 198, 43717, 796, 366, 15, 13, 15, 13, 20, 1, 628, 198, 40406, 7, 198, 220, 220, 220, 1438, 2625, 28015, 31628, 12, 15065, 2611, 1600, 198, 220, 220, 220, 2196, 28, 437...
2.477011
174
#! /usr/bin/env python3 # -*- coding: utf-8 -*- """GUI module generated by PAGE version 4.14. # In conjunction with Tcl version 8.6 # Jun 04, 2018 08:42:31 PM """ import base64 import sys from GaQueens import GaQueens try: from Tkinter import * except ImportError: from tkinter import * try: import ...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 220, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 40156, 8265, 7560, 416, 48488, 2196, 604, 13, 1415, 13, 198, 2, 554, 17856, 351, 309, 565, 2...
2.610818
758
from django.contrib import admin # Register your models here. from apps.medicamento.models import Medicamento #admin.site.register(Medicamento) @admin.register(Medicamento)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 2, 17296, 534, 4981, 994, 13, 198, 198, 6738, 6725, 13, 1150, 291, 3263, 78, 13, 27530, 1330, 5786, 3263, 78, 198, 2, 28482, 13, 15654, 13, 30238, 7, 39112, 3263, 78, 8, 19...
3.240741
54
# Generated by Django 2.2.4 on 2019-09-14 13:12 from django.db import migrations, models import django.db.models.deletion
[ 2, 2980, 515, 416, 37770, 362, 13, 17, 13, 19, 319, 13130, 12, 2931, 12, 1415, 1511, 25, 1065, 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
from Dealer import Dealer from Player import Player dealer = Dealer() player_name = input('Ingrese el nombre del jugador \n|>> ') player = Player(player_name) players = player.make_players() players.append(player) dealer.shuffle() dealer.deal_cards(players) for player in players: print(player) for card ...
[ 6738, 44480, 1330, 44480, 198, 6738, 7853, 1330, 7853, 198, 198, 31769, 263, 796, 44480, 3419, 198, 198, 7829, 62, 3672, 796, 5128, 10786, 27682, 260, 325, 1288, 299, 2381, 260, 1619, 45808, 7079, 3467, 77, 91, 4211, 705, 8, 198, 198,...
2.84375
128
from test_all_fixers import lib3to2FixerTestCase
[ 6738, 1332, 62, 439, 62, 13049, 364, 1330, 9195, 18, 1462, 17, 22743, 263, 14402, 20448, 628 ]
2.941176
17
#!/usr/bin/env python # 1. Run .omero files from /opt/omero/server/config/ # 2. Set omero config properties from CONFIG_ envvars # Variable names should replace "." with "_" and "_" with "__" # E.g. CONFIG_omero_web_public_enabled=false import os from subprocess import call from re import sub CONFIG_OMERO = '/...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 352, 13, 5660, 764, 296, 3529, 3696, 422, 1220, 8738, 14, 296, 3529, 14, 15388, 14, 11250, 14, 198, 2, 362, 13, 5345, 267, 647, 78, 4566, 6608, 422, 25626, 62, 17365, 85, 945, ...
2.304985
341
# # Copyright (c) 2021 The GPflux Contributors. # # 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 agr...
[ 2, 198, 2, 15069, 357, 66, 8, 33448, 383, 14714, 69, 22564, 25767, 669, 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, 1...
2.541112
2,177
import editdistance import re
[ 11748, 4370, 30246, 198, 11748, 302, 628, 628 ]
4.125
8
import os TEST_DATA_DIR = os.path.join(os.path.dirname(__file__), "data")
[ 11748, 28686, 198, 198, 51, 6465, 62, 26947, 62, 34720, 796, 28686, 13, 6978, 13, 22179, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 828, 366, 7890, 4943, 198 ]
2.34375
32
import numpy as np import pandas as pd import matplotlib.pyplot as plt np.random.seed(3) Data = pd.read_csv('AMZN.csv',header=0, usecols=['Date', 'Close'],parse_dates=True,index_col='Date') print(Data.info()) print(Data.head()) print(Data.describe()) plt.figure(figsize=(10,5)) plt.plot(Data) plt.show() DataPCh = D...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 37659, 13, 25120, 13, 28826, 7, 18, 8, 198, 198, 6601, 796, 279, 67, 13, 961, 62, 40664, ...
2.559302
860
from seq2annotation.trainer.train_model import train_model from seq2annotation.algorithms.BiLSTM_CRF_model import BilstmCrfModel from seq2annotation.algorithms.IDCNN_CRF_model import IdcnnCrfModel # train_model(data_dir='./data', result_dir='./result', model_fn=IdcnnCrfModel.model_fn, **IdcnnCrfModel.default_params()...
[ 6738, 33756, 17, 1236, 14221, 13, 2213, 10613, 13, 27432, 62, 19849, 1330, 4512, 62, 19849, 198, 6738, 33756, 17, 1236, 14221, 13, 282, 7727, 907, 13, 23286, 43, 2257, 44, 62, 9419, 37, 62, 19849, 1330, 347, 11750, 76, 13916, 69, 17...
2.19883
342
""" Your chance to explore Loops and Turtles! Authors: David Mutchler, Dave Fisher, Vibha Alangar, Amanda Stouder, their colleagues and Jasmine Scott """ ############################################################################### # COMPLETED: 1. # On Line 5 above, replace PUT_YOUR_NAME_HERE with your ...
[ 37811, 198, 7120, 2863, 284, 7301, 6706, 2840, 290, 44356, 0, 198, 198, 30515, 669, 25, 3271, 337, 7140, 1754, 11, 9935, 14388, 11, 569, 571, 3099, 978, 648, 283, 11, 23040, 520, 280, 1082, 11, 198, 220, 220, 220, 220, 220, 220, 2...
2.726303
844
import pandas as pd # Load dataset https://storage.googleapis.com/dqlab-dataset/LO4/global_air_quality_4000rows.csv gaq = pd.read_csv('https://storage.googleapis.com/dqlab-dataset/LO4/global_air_quality_4000rows.csv', parse_dates=True, index_col='timestamp') # Cetak 5 data teratas print(gaq.head()) # Cetak info dari da...
[ 11748, 19798, 292, 355, 279, 67, 198, 2, 8778, 27039, 3740, 1378, 35350, 13, 13297, 499, 271, 13, 785, 14, 67, 13976, 397, 12, 19608, 292, 316, 14, 21982, 19, 14, 20541, 62, 958, 62, 13237, 62, 27559, 8516, 13, 40664, 198, 4908, 8...
2.592857
140
# Copyright 2022 Garda Technologies, LLC. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
[ 2, 15069, 33160, 12790, 64, 21852, 11, 11419, 13, 1439, 2489, 10395, 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, ...
3.539394
330
#!/usr/bin/python import numpy as np from scipy import optimize from sympy import * import matplotlib.pyplot as plt import random import pdb import os # Symbolic function to evaluate shape functions shape_functions=lambda x,y: np.array([(1.-x)*(1.-y)/4.,(1.+x)*(1.-y)/4.,(1.+x)*(1.+y)/4.,(1.-x)*(1.+y)/4.]) grad_xi=la...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 1330, 27183, 198, 6738, 10558, 88, 1330, 1635, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 4738, 198...
1.891534
1,890
# pylint: disable=redefined-outer-name,no-member import json import os import shutil import subprocess import time import pytest from parse import parse from sqlalchemy import create_engine from alembic_utils.testbase import TEST_VERSIONS_ROOT, reset_event_listener_registry PYTEST_DB = "postgresql://alem_user:passw...
[ 2, 279, 2645, 600, 25, 15560, 28, 445, 18156, 12, 39605, 12, 3672, 11, 3919, 12, 19522, 198, 198, 11748, 33918, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 850, 14681, 198, 11748, 640, 198, 198, 11748, 12972, 9288, 198, 6738...
2.120846
1,324
# -*- coding: utf-8 -*- import sys import dotenv # 打印系统信息 print("Python %s on %s" % (sys.version, sys.platform)) sys.path.extend([WORKING_DIR_AND_PYTHON_PATHS]) # 导入环境变量 dotenv.load_dotenv(dotenv_path=PROJECT_ROOT + "/env/dc_dev.env")
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 25064, 198, 198, 11748, 16605, 24330, 198, 198, 2, 10545, 231, 241, 39355, 108, 163, 111, 119, 163, 119, 253, 46479, 94, 162, 223, 107, 198, 4798, 7203, 37906, ...
1.796992
133
#!/usr/bin/env python # # Copyright 2014 Tuenti Technologies S.L. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 15069, 1946, 16749, 298, 72, 21852, 311, 13, 43, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, ...
3.685714
175
from django.test import tag from test import cases as case from test import fixtures as data @tag('pool')
[ 6738, 42625, 14208, 13, 9288, 1330, 7621, 198, 198, 6738, 1332, 1330, 2663, 355, 1339, 198, 6738, 1332, 1330, 34609, 355, 1366, 628, 198, 31, 12985, 10786, 7742, 11537, 198 ]
3.633333
30
import os from time import sleep print('***********************') a = 1 pid = os.fork() if pid < 0: print("创建进程失败") elif pid == 0: print('这是新的进程') print("a =",a) a = 10000 else: sleep(1) print("这是原有进程") print("psarent a =",a) print("演示完毕")
[ 11748, 28686, 198, 6738, 640, 1330, 3993, 198, 198, 4798, 10786, 8412, 2466, 8162, 11537, 198, 64, 796, 352, 198, 198, 35317, 796, 28686, 13, 32523, 3419, 198, 198, 361, 46514, 1279, 657, 25, 198, 220, 220, 220, 3601, 7203, 26344, 249...
1.710692
159
import glob import os import unittest import sys if __name__ == "__main__": suite = build_test_suite() runner = unittest.TextTestRunner() result = runner.run(suite) sys.exit(not result.wasSuccessful())
[ 11748, 15095, 198, 11748, 28686, 198, 11748, 555, 715, 395, 198, 11748, 25064, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 18389, 796, 1382, 62, 9288, 62, 2385, 578, 3419, 198, 220, 220, 220,...
2.728395
81
# Copyright 2014-present PlatformIO <contact@platformio.org> # # 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 applicabl...
[ 2, 15069, 1946, 12, 25579, 19193, 9399, 1279, 32057, 31, 24254, 952, 13, 2398, 29, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 2...
2.333087
1,354
#!/usr/bin/python ##################################################################################################################################### # # # The purpose of this script is to collect data generated from parallel computation of parton level cross sections into one # # dat file. T...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 29113, 29113, 29113, 29113, 4242, 2, 198, 2, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, 220, 220, 220, 1303, 198, 2, 383, 4007, 286, 428, 4226, ...
2.899861
1,438
from django.db import models from django.utils import timezone
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 26791, 1330, 640, 11340, 198 ]
3.705882
17
import os from copy import deepcopy from abc import ABCMeta, abstractmethod, abstractproperty import numpy as np import pandas as pd from rdkit import Chem from rdkit.Chem.Descriptors import ExactMolWt from rdkit.Chem import AllChem from rdkit import DataStructs from scipy import sparse as sp from ..utils.tools impor...
[ 11748, 28686, 198, 6738, 4866, 1330, 2769, 30073, 198, 6738, 450, 66, 1330, 9738, 48526, 11, 12531, 24396, 11, 12531, 26745, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 6738, 374, 67, 15813, 1330,...
2.469697
792
import cv2 import numpy as np import matplotlib.pyplot as plt import pandas as pd import openpyxl #Get pixel/distance (using ImageJ software) to output actual diameters of circles dp = 1 accum_ratio = 1 min_dist = 5 p1 = 40 p2 = 30 minDiam = 1 maxDiam = 30 scalebar = 10 min_range = 0 max_range = 100 intervals = 10 ra...
[ 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 1280, 9078, 87, 75, 198, 198, 2, 3855, 17465, 14, 30246, 357, 35...
2.441624
197
import numpy as np import os, json, util if __name__ == "__main__": fit_whitepoint_matrices(util.find_data_directory())
[ 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 11, 33918, 11, 7736, 628, 198, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 4197, 62, 1929, 270, 538, 1563, 62, 6759, 45977, 7, 22602, 13, 19796, ...
2.645833
48
from django.db import models from django.conf import settings
[ 6738, 42625, 14208, 13, 9945, 1330, 4981, 201, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 201, 198, 220, 220, 220, 220 ]
3.090909
22
# Inital char for detecting incoming order's String. INITIALCHAR = '$' # Separates order string from device id. IDENTIFIERCHART = ":" # Device Id and function separator in order's String. DEFUSEPARATOR = '/' # Variable separator VARSEPARATOR = '&' # Final char for detecting the final order's string. STOPCHAR = ';'
[ 2, 554, 1287, 1149, 329, 31521, 15619, 1502, 338, 10903, 13, 198, 1268, 2043, 12576, 38019, 796, 705, 3, 6, 198, 198, 2, 8621, 283, 689, 1502, 4731, 422, 3335, 4686, 13, 198, 25256, 5064, 38311, 3398, 7227, 796, 366, 11097, 198, 198...
3.158416
101
from .chance import by_chance # noqa from .django import get_random_instance # noqa from .django import get_random_instances # noqa from .exceptions import EmptyListError # noqa from .exceptions import NoObjectsError # noqa from .generate import randint # noqa from .generate import random_birthday # noqa from .g...
[ 6738, 764, 39486, 1330, 416, 62, 39486, 220, 1303, 645, 20402, 198, 6738, 764, 28241, 14208, 1330, 651, 62, 25120, 62, 39098, 220, 1303, 645, 20402, 198, 6738, 764, 28241, 14208, 1330, 651, 62, 25120, 62, 8625, 1817, 220, 1303, 645, 2...
3.294118
187
import json import uuid from datetime import datetime from unittest import mock from urllib.parse import urlencode import responses from django.contrib.messages import get_messages from django.test import TestCase from django.urls import reverse from registrations.forms import RegistrationDetailsForm from registratio...
[ 11748, 33918, 198, 11748, 334, 27112, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 555, 715, 395, 1330, 15290, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 2956, 11925, 8189, 198, 198, 11748, 9109, 198, 6738, 42625, 14208, 13, 364...
3.55814
129
#imports import csv import json import requests import requests.utils import requests.sessions import urllib3 import sys import traceback import configparser import logging from urllib3.exceptions import InsecureRequestWarning urllib3.disable_warnings(InsecureRequestWarning) logging.basicConfig(format='%(levelname)s...
[ 2, 320, 3742, 198, 11748, 269, 21370, 198, 11748, 33918, 198, 11748, 7007, 198, 11748, 7007, 13, 26791, 198, 11748, 7007, 13, 82, 6202, 198, 11748, 2956, 297, 571, 18, 198, 11748, 25064, 198, 11748, 12854, 1891, 198, 11748, 4566, 48610,...
3.257143
140
#!/usr/bin/env python # # Copyright 2014 Corgan Labs # See LICENSE.txt for distribution terms # from hashlib import sha256 __base58_alphabet = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' __base58_radix = len(__base58_alphabet) def __string_to_int(data): "Convert string of bytes Python integer, ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 15069, 1946, 2744, 1030, 23500, 198, 2, 4091, 38559, 24290, 13, 14116, 329, 6082, 2846, 198, 2, 198, 198, 6738, 12234, 8019, 1330, 427, 64, 11645, 198, 198, 834, 8692, 336...
2.305344
786
import pytest from aiodisque import Disque, Job from aiodisque.iterators import JobsIterator @pytest.mark.asyncio @pytest.mark.asyncio @pytest.mark.asyncio @pytest.mark.asyncio
[ 11748, 12972, 9288, 198, 6738, 257, 2101, 271, 4188, 1330, 3167, 4188, 11, 15768, 198, 6738, 257, 2101, 271, 4188, 13, 2676, 2024, 1330, 19161, 37787, 628, 198, 31, 9078, 9288, 13, 4102, 13, 292, 13361, 952, 628, 198, 31, 9078, 9288, ...
2.605634
71
import os from shutil import rmtree from uuid import uuid1 from django.conf import settings from django.core.cache import cache from django.core.files.uploadedfile import SimpleUploadedFile from django.test import TestCase, Client from django.urls import reverse from posts.models import Post, Group, User, Comment
[ 11748, 28686, 198, 6738, 4423, 346, 1330, 374, 16762, 631, 198, 6738, 334, 27112, 1330, 334, 27112, 16, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 7295, 13, 23870, 1330, 12940, 198, 6738, 42625, 14...
3.573034
89
import numpy as np import pandas as pd import matplotlib.pyplot as plt data = np.loadtxt('Data1.txt') dataset = pd.DataFrame({'No.':data[:]}) dataset.sort_values('No.',inplace=True) dataset.hist(bins=50) # Exploring data plt.show() dataset.boxplot(vert=False) plt.show() Q1=np.percentile(dataset, [25]) #...
[ 11748, 299, 32152, 355, 45941, 201, 198, 11748, 19798, 292, 355, 279, 67, 201, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 201, 198, 201, 198, 7890, 796, 45941, 13, 2220, 14116, 10786, 6601, 16, 13, 14116, 11537, 201...
2.123355
608
import cv2 import numpy as np
[ 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198 ]
2.727273
11
from abc import abstractmethod from ROAR.planning_module.abstract_planner import AbstractPlanner from ROAR.control_module.controller import Controller from ROAR.planning_module.behavior_planner.behavior_planner import BehaviorPlanner from ROAR.planning_module.mission_planner.mission_planner import MissionPlanner from t...
[ 6738, 450, 66, 1330, 12531, 24396, 198, 6738, 15107, 1503, 13, 11578, 768, 62, 21412, 13, 397, 8709, 62, 11578, 1008, 1330, 27741, 20854, 1008, 198, 6738, 15107, 1503, 13, 13716, 62, 21412, 13, 36500, 1330, 22741, 198, 6738, 15107, 1503...
3.901786
112
import argparse import csv import re from datetime import datetime, timedelta from decimal import Decimal import pytz from core_data_modules.logging import Logger from dateutil.parser import isoparse from rapid_pro_tools.rapid_pro_client import RapidProClient from storage.google_cloud import google_cloud_utils log = ...
[ 11748, 1822, 29572, 198, 11748, 269, 21370, 198, 11748, 302, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 6738, 32465, 1330, 4280, 4402, 198, 198, 11748, 12972, 22877, 198, 6738, 4755, 62, 7890, 62, 18170, 13, 6404, 2...
2.457837
4,613
#!/usr/bin/python # # Copyright 2018-2020 Polyaxon, 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 ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 198, 2, 15069, 2864, 12, 42334, 12280, 897, 261, 11, 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, ...
3.758893
253
try: import ROOT except ImportError: collect_ignore_glob = ["*/root/*"] # otherwise will have problems either with tox, # or when executing pytest directly collect_ignore_glob += ["root/*"]
[ 28311, 25, 198, 220, 220, 220, 1330, 15107, 2394, 198, 16341, 17267, 12331, 25, 198, 220, 220, 220, 2824, 62, 46430, 62, 4743, 672, 796, 14631, 16208, 15763, 15211, 8973, 198, 220, 220, 220, 1303, 4306, 481, 423, 2761, 2035, 351, 8293...
3
70
# Generated by Django 3.2.9 on 2021-11-21 07:57 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 17, 13, 24, 319, 33448, 12, 1157, 12, 2481, 8753, 25, 3553, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
import numpy as np import math from humpday.objectives.deapobjectives import schwefel, schaffer, bohachevsky, griewank, rastrigin, shekel, rosenbrock # Some test objective functions to help guide optimizer choices # ------------------------------------------------------------- # # We'll use DEAP's set of groovy benchm...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 10688, 198, 6738, 49779, 820, 13, 15252, 1083, 13, 2934, 499, 15252, 1083, 1330, 5513, 732, 69, 417, 11, 5513, 31183, 11, 275, 1219, 4891, 14259, 2584, 11, 11120, 413, 962, 11, 374, 459, 4359...
2.366071
1,680
import datetime import os import shutil from packages.dialogs.auxiliar_dialogs import selfCloseInterface
[ 11748, 4818, 8079, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 198, 6738, 10392, 13, 38969, 18463, 13, 14644, 4797, 62, 38969, 18463, 1330, 2116, 26125, 39317, 628 ]
3.821429
28
#!/usr/bin/env python3 #### ros import import rospy import std_msgs.msg from rospkg import RosPack from std_msgs.msg import UInt8 from std_msgs.msg import Float32MultiArray #c from sensor_msgs.msg import Image from geometry_msgs.msg import Polygon, Point32 import cv2 from cv_bridge import CvBridge, CvBridgeError # py...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 4242, 686, 82, 1330, 220, 198, 11748, 686, 2777, 88, 198, 11748, 14367, 62, 907, 14542, 13, 19662, 198, 6738, 686, 2777, 10025, 1330, 10018, 11869, 198, 6738, 14367, 62, 907, 14542...
2.816327
196
from django.conf.urls import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns( '', url(r'^admin/', include(admin.site.urls)), url(r'^truco/', include('truco.urls', namespace="truco")), url(r'^usuarios/', include('usuarios.urls', namespace="usuarios"))...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 7572, 11, 2291, 11, 19016, 198, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 28482, 13, 2306, 375, 29392, 3419, 198, 198, 6371, 33279, 82, 796, 7572, 7, 198, 220, 220, ...
2.511628
129
#!/usr/bin/env python3 """ Description: Usage: $> roslaunch turtle_nodes.launch $> ./executive_step_02.py Output: [INFO] : State machine starting in initial state 'RESET' with userdata: [] [INFO] : State machine transitioning 'RESET':'succeeded'-->'SPAWN' [INFO] : State machine te...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 198, 11828, 25, 198, 198, 28350, 25, 198, 220, 220, 220, 720, 29, 686, 6649, 11429, 28699, 62, 77, 4147, 13, 35681, 198, 220, 220, 220, 720, 29, 24457, 18558, 8827, 62, ...
2.583333
216
import pandas as pd import numpy as np import os from hickit.reader import get_headers, get_chrom_sizes import tensorflow as tf import json import tensorflow_addons as tfa from utils import * import gc from sklearn.metrics import f1_score, average_precision_score def run_output_predictions(run_id, model_stage, thresh...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 6738, 289, 624, 270, 13, 46862, 1330, 651, 62, 50145, 11, 651, 62, 28663, 62, 82, 4340, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748...
2.206074
1,844
""" test elstruct writer/run/reader pipelines """ import warnings import tempfile import numpy import automol import elstruct SCRIPT_DCT = { 'cfour2': None, 'gaussian09': None, 'gaussian16': None, 'molpro2015': None, 'mrcc2018': None, 'nwchem6': None, 'orca4': None, 'psi4': "#!/usr/bin...
[ 37811, 1332, 1288, 7249, 6260, 14, 5143, 14, 46862, 31108, 198, 37811, 198, 11748, 14601, 198, 11748, 20218, 7753, 198, 11748, 299, 32152, 198, 11748, 3557, 349, 198, 11748, 1288, 7249, 628, 198, 6173, 46023, 62, 35, 4177, 796, 1391, 19...
1.780455
3,735
from setuptools import setup setup( name = 'tnn', version = '0.0.4', description = 'Tensorflow Neural Network Framework for Algorithmic Traders', url = 'http://github.com/Savahi/tnn', author = 'Savahi', author_email = 'sh@tradingene.ru', license = 'MIT', classifiers=[ 'Development Status :: 3 - Alpha', ...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 40406, 7, 220, 198, 197, 3672, 796, 705, 83, 20471, 3256, 198, 197, 9641, 796, 705, 15, 13, 15, 13, 19, 3256, 198, 197, 11213, 796, 705, 51, 22854, 11125, 47986, 7311, 25161, 329, 978, ...
2.834171
199
import pandas as pd import numpy as np
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941 ]
3.166667
12
#!/usr/bin/env python # -*- coding: utf-8 -*- import datetime from django.db import models
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 4818, 8079, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 628 ]
2.583333
36
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
import unittest from hypothesis import given, example from . import pyliza_strategies as liza_st from pyliza.transformation import DecompositionRule from pyliza.processing import ProcessingWord as PW from pyliza.processing import ProcessingPhrase as PPhrase
[ 11748, 555, 715, 395, 198, 6738, 14078, 1330, 1813, 11, 1672, 198, 198, 6738, 764, 1330, 279, 2645, 23638, 62, 2536, 2397, 444, 355, 300, 23638, 62, 301, 198, 6738, 279, 2645, 23638, 13, 7645, 1161, 1330, 4280, 296, 9150, 31929, 198, ...
3.768116
69
# -*- coding: utf-8 -*- # # Copyright © 2012 Zulip, Inc. # # 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,...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 15069, 10673, 2321, 1168, 377, 541, 11, 3457, 13, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866,...
3.528274
672
"""Update invoice profile API method.""" from ibsng.handler.handler import Handler class updateInvoiceProfile(Handler): """Update invoice profile method class.""" def control(self): """Validate inputs after setup method. :return: None :rtype: None """ self.is_valid(se...
[ 37811, 10260, 45458, 7034, 7824, 2446, 526, 15931, 198, 6738, 24283, 82, 782, 13, 30281, 13, 30281, 1330, 32412, 628, 198, 4871, 4296, 19904, 2942, 37046, 7, 25060, 2599, 198, 220, 220, 220, 37227, 10260, 45458, 7034, 2446, 1398, 526, 1...
2.364807
466
import pytest from api import API @pytest.fixture
[ 11748, 12972, 9288, 198, 6738, 40391, 1330, 7824, 628, 198, 31, 9078, 9288, 13, 69, 9602, 628, 628, 628, 198 ]
2.9
20
from dataclasses import dataclass from . import rte @dataclass @dataclass @dataclass @dataclass
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 198, 6738, 764, 1330, 374, 660, 628, 198, 31, 19608, 330, 31172, 628, 198, 31, 19608, 330, 31172, 628, 198, 31, 19608, 330, 31172, 628, 198, 31, 19608, 330, 31172, 628 ]
2.65
40
# coding: utf-8 import unittest import os from asn1crypto import x509, pem from pyhanko_certvalidator.fetchers import aiohttp_fetchers, requests_fetchers from pyhanko_certvalidator.context import ValidationContext from pyhanko_certvalidator.validate import verify_crl from .constants import TEST_REQUEST_TIMEOUT tests...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 11748, 555, 715, 395, 198, 11748, 28686, 198, 198, 6738, 355, 77, 16, 29609, 78, 1330, 2124, 29022, 11, 279, 368, 198, 6738, 12972, 71, 962, 78, 62, 22583, 12102, 1352, 13, 34045, 3533, 13...
2.907143
140
import os import sys from datetime import datetime from typing import List, Tuple, Union import clr import pandas as pd PISDKHOME = os.getenv("PISDKHOME") sys.path.append(PISDKHOME) clr.AddReference("OSIsoft.PISDK") from PISDK import PISDK, PISubBatch, PIUnitBatch UnitBatches = pd.DataFrame SubBatches = pd.DataFra...
[ 11748, 28686, 198, 11748, 25064, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 6738, 19720, 1330, 7343, 11, 309, 29291, 11, 4479, 198, 198, 11748, 537, 81, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 47, 1797, 48510, 39069, 796, 2...
2.088106
4,086
#!/usr/bin/env python3.7 import numpy as np import pandas as pd import tinydb as db import matplotlib.pyplot as plt from scipy.integrate import simps from pygama import DataSet import pygama.utils as pgu import pygama.analysis.histograms as pgh import pygama.analysis.peak_fitting as pga from numpy import diff """""...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 13, 22, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 7009, 9945, 355, 20613, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, ...
3.067857
280
from ..ex.relational import IRelationalRow from . import xivrow, XivSubRow, IXivSheet from .interfaces import IShopListing, IShopListingItem from .shop_listing_item import ShopListingItem @xivrow
[ 6738, 11485, 1069, 13, 2411, 864, 1330, 314, 6892, 864, 25166, 198, 6738, 764, 1330, 2124, 452, 808, 11, 1395, 452, 7004, 25166, 11, 22631, 452, 3347, 316, 198, 6738, 764, 3849, 32186, 1330, 314, 29917, 8053, 278, 11, 314, 29917, 8053...
3.046154
65
#!/usr/bin/env python3 """ **experimental** a graphical retro-style version of `ask` - because we can. :D asks a yes/no question via audio (text-to-speech). returncode reflects answer in common unix-style (0 == yes/ok, 1 == nope) Usage: xask [<msg>] [--yes=<reply_yes>] [--no=<reply_no>] [--engine=<tts-engine>] [...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 198, 1174, 23100, 9134, 1174, 257, 27831, 12175, 12, 7635, 2196, 286, 4600, 2093, 63, 532, 780, 356, 460, 13, 1058, 35, 198, 198, 6791, 257, 3763, 14, 3919, 1808, 2884, 65...
2.223081
5,693
''' Some people remain old fashioned and John is one of them. He doesn't like the new smart phones with full keypads and still uses the old keypads which require you to tap a key multiple times to type a single letter. For example, if the keyboard has two keys, one with the letters "adef" and the other one with the l...
[ 7061, 6, 628, 198, 4366, 661, 3520, 1468, 35458, 290, 1757, 318, 530, 286, 606, 13, 679, 1595, 470, 588, 262, 649, 4451, 9512, 351, 1336, 1994, 79, 5643, 290, 991, 3544, 262, 1468, 1994, 79, 5643, 543, 2421, 345, 284, 9814, 257, 1...
3.556283
764
import json import pathlib from .._config import CONFIG_FILE_NAME class ConfigData: ''' This class handles access to simulation setup configuration data. ''' # Constructor. def __setitem__( self, index, value ): ''' For setting a configuration value. ''...
[ 11748, 33918, 201, 198, 11748, 3108, 8019, 201, 198, 201, 198, 6738, 11485, 62, 11250, 1330, 25626, 62, 25664, 62, 20608, 201, 198, 201, 198, 201, 198, 4871, 17056, 6601, 25, 201, 198, 220, 220, 220, 705, 7061, 201, 198, 220, 220, 2...
2.010056
895
import numpy as np import scipy.sparse from typing import Union, List from dataclasses import dataclass, field, fields, InitVar import scipy.sparse as sp @dataclass class Subgraph: """ Represents the meta information of sampled subgraphs. """ # data fields indptr : np.ndarray indices...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 13, 82, 29572, 198, 6738, 19720, 1330, 4479, 11, 7343, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 11, 2214, 11, 7032, 11, 44707, 19852, 198, 11748, 629, 541, 88, 13, ...
2.057503
5,478
import os import pathlib from dotenv import load_dotenv # Load .env vars load_dotenv(pathlib.Path('.').parent/'.env') MONGO_URL = os.getenv('MONGO_URL') MONGO_DATABASE = os.getenv('MONGO_DATABASE')
[ 11748, 28686, 198, 11748, 3108, 8019, 198, 198, 6738, 16605, 24330, 1330, 3440, 62, 26518, 24330, 628, 198, 2, 8778, 764, 24330, 410, 945, 198, 2220, 62, 26518, 24330, 7, 6978, 8019, 13, 15235, 10786, 2637, 737, 8000, 14, 4458, 24330, ...
2.463415
82
#Read data inputList = [] with open('inputs\input1.txt') as f: for line in f.readlines(): inputList.append(int(line.strip())) #Define functions import itertools import numpy as np #Solution 1 print(solveProblem(inputList,2)) #Solution 2 print(solveProblem(inputList,3))
[ 2, 5569, 1366, 198, 15414, 8053, 796, 17635, 198, 198, 4480, 1280, 10786, 15414, 82, 59, 15414, 16, 13, 14116, 11537, 355, 277, 25, 198, 220, 220, 220, 329, 1627, 287, 277, 13, 961, 6615, 33529, 198, 220, 220, 220, 220, 220, 220, ...
2.666667
108
#!/usr/bin/python # # 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 # "Lice...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 198, 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, ...
3.892473
279
import subprocess import sys # Validate command-line arguments if len(sys.argv) < 2 or (not (sys.argv[1] == "METRICS" and len(sys.argv) == 3) and not (sys.argv[1] == "FULL" and len(sys.argv) == 7 and sys.argv[3].isdigit() and all([x.isdigit() for x in sys.argv[4].split("_")]) and sys.argv[5].lstrip("-").isdigit() and ...
[ 11748, 850, 14681, 198, 11748, 25064, 198, 198, 2, 3254, 20540, 3141, 12, 1370, 7159, 198, 361, 18896, 7, 17597, 13, 853, 85, 8, 1279, 362, 393, 357, 1662, 357, 17597, 13, 853, 85, 58, 16, 60, 6624, 366, 47123, 49, 19505, 1, 290, ...
2.175207
605
import matplotlib.pyplot as plt import pandas as pd import numpy as np # X = np.array([[5,3], # [10,15], # [15,12], # [24,10], # [30,30], # [85,70], # [71,80], # [60,78], # [70,55], # [80,91],]) # cluster = AgglomerativeClustering(n_clusters=2, affinity='euclidean', linkage='ward...
[ 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 198, 2, 1395, 796, 45941, 13, 18747, 26933, 58, 20, 11, 18, 4357, 198, 2, 220, 220, 220, 220, ...
1.994118
850
# -*- coding: utf-8 -*- __author__ = 'Stéphane-Poirier' import math from diff_graph import DiffGraph from ferrer import FerrerIterator, ferrer_size import time if __name__ == "__main__": import argparse parser = argparse.ArgumentParser(description='ramsey : evaluate expected value of Kr presence for ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 834, 9800, 834, 796, 705, 1273, 2634, 746, 1531, 12, 47, 10840, 959, 6, 198, 198, 11748, 10688, 198, 6738, 814, 62, 34960, 1330, 10631, 37065, 198, 6738, 11354, 1...
2.141931
1,543
from conans import AutoToolsBuildEnvironment, ConanFile, tools from conans.errors import ConanInvalidConfiguration import os required_conan_version = ">=1.36.0"
[ 6738, 369, 504, 1330, 11160, 33637, 15580, 31441, 11, 31634, 8979, 11, 4899, 198, 6738, 369, 504, 13, 48277, 1330, 31634, 44651, 38149, 198, 11748, 28686, 198, 198, 35827, 62, 1102, 272, 62, 9641, 796, 366, 29, 28, 16, 13, 2623, 13, ...
3.622222
45
import unittest import os import signal if __name__ == '__main__': unittest.main() os.kill(os.getpid(), signal.SIGKILL)
[ 11748, 555, 715, 395, 198, 11748, 28686, 198, 11748, 6737, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 628, 220, 220, 220, 555, 715, 395, 13, 12417, 3419, 198, 220, 220, 220, 28686, 13, 12728, 7, 418, 13, 113...
2.45283
53
import datetime import os import pycurl import sentinel5dl import sentinel5dl.__main__ as executable import tempfile import unittest import logging import sys testpath = os.path.dirname(os.path.abspath(__file__)) if __name__ == '__main__': unittest.main()
[ 11748, 4818, 8079, 198, 11748, 28686, 198, 11748, 12972, 66, 6371, 198, 11748, 1908, 20538, 20, 25404, 198, 11748, 1908, 20538, 20, 25404, 13, 834, 12417, 834, 355, 28883, 198, 11748, 20218, 7753, 198, 11748, 555, 715, 395, 198, 11748, ...
2.891304
92
import time poll_active = False poll = {} allowed_users = set() voted = set()
[ 11748, 640, 198, 198, 30393, 62, 5275, 796, 10352, 198, 30393, 796, 23884, 198, 40845, 62, 18417, 796, 900, 3419, 198, 85, 5191, 796, 900, 3419, 198 ]
2.925926
27
# Copyright 2014 Basho Technologies, Inc. # # This file is provided to you 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 applica...
[ 2, 15069, 1946, 15743, 78, 21852, 11, 3457, 13, 198, 2, 198, 2, 770, 2393, 318, 2810, 284, 345, 739, 262, 24843, 13789, 11, 198, 2, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743, 407, 779, 428, 2393, 198, 2, 2845, 2...
2.507229
1,660
from isochrones.starmodel import StarModel, BasicStarModel from isochrones import get_ichrone import numpy as np mist = get_ichrone("mist") props = dict(Teff=(5800, 100), logg=(4.5, 0.1), J=(3.58, 0.05), K=(3.22, 0.05), parallax=(100, 0.1)) props_phot = dict(J=(3.58, 0.05), K=(3.22, 0.05), parallax=(100, 0.1)) prop...
[ 6738, 318, 5374, 9821, 13, 301, 1670, 375, 417, 1330, 2907, 17633, 11, 14392, 8248, 17633, 198, 6738, 318, 5374, 9821, 1330, 651, 62, 488, 33171, 198, 11748, 299, 32152, 355, 45941, 198, 198, 37980, 796, 651, 62, 488, 33171, 7203, 379...
2.220339
177
import os, fnmatch from functools import partial from PyQt5.QtCore import QProcess from pykeyboard import PyKeyboard from bots.abstract_bot import AbstractBot from bots.action import Action from bots.utility import waitForWindowByTitle from local_settings import VIDEO_DIR
[ 11748, 28686, 11, 24714, 15699, 198, 6738, 1257, 310, 10141, 1330, 13027, 198, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 14055, 1330, 1195, 18709, 198, 6738, 12972, 2539, 3526, 1330, 9485, 9218, 3526, 198, 198, 6738, 29641, 13, 397, 87...
3.631579
76
############################################################# # rename or copy this file to config.py if you make changes # ############################################################# # change this to your fully-qualified domain name to run a # remote server. The default value of localhost will # only allow connec...
[ 29113, 14468, 7804, 4242, 2, 198, 2, 36265, 393, 4866, 428, 2393, 284, 4566, 13, 9078, 611, 345, 787, 2458, 1303, 198, 29113, 14468, 7804, 4242, 2, 198, 198, 2, 1487, 428, 284, 534, 3938, 12, 22557, 7386, 1438, 284, 1057, 257, 220, ...
2.819079
304
# emails.py from django.template import loader from django.core.mail import EmailMultiAlternatives from django.conf import settings mongodb_notification_email = NotificationEmail()
[ 2, 7237, 13, 9078, 198, 198, 6738, 42625, 14208, 13, 28243, 1330, 40213, 198, 6738, 42625, 14208, 13, 7295, 13, 4529, 1330, 9570, 29800, 23081, 2929, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 628, 198, 31059, 375, 65, 62, 1...
3.7
50
# # This source file is part of the EdgeDB open source project. # # Copyright 2008-present MagicStack Inc. and the EdgeDB authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http...
[ 2, 198, 2, 770, 2723, 2393, 318, 636, 286, 262, 13113, 11012, 1280, 2723, 1628, 13, 198, 2, 198, 2, 15069, 3648, 12, 25579, 6139, 25896, 3457, 13, 290, 262, 13113, 11012, 7035, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11...
3.025316
632
"""added orientation column to pi model Revision ID: 2711340c6d9d Revises: 490d49497045 Create Date: 2015-09-25 09:43:33.202018 """ # revision identifiers, used by Alembic. revision = '2711340c6d9d' down_revision = '490d49497045' branch_labels = None depends_on = None from alembic import op import sqlalchemy as sa ...
[ 37811, 29373, 12852, 5721, 284, 31028, 2746, 198, 198, 18009, 1166, 4522, 25, 2681, 16616, 1821, 66, 21, 67, 24, 67, 198, 18009, 2696, 25, 45601, 67, 2920, 2920, 2154, 2231, 198, 16447, 7536, 25, 1853, 12, 2931, 12, 1495, 7769, 25, ...
2.617886
123