content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
''' settings for Django ''' import os import django.conf.global_settings as DEFAULT_SETTINGS LOCALHOST = False DEBUG = False TEMPLATE_DEBUG = DEBUG DEBUG_PAYMENTS = DEBUG # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.abspath( os.path.join(os.path.dirname(__file__), os....
[ 7061, 6, 6460, 329, 37770, 705, 7061, 198, 11748, 28686, 198, 11748, 42625, 14208, 13, 10414, 13, 20541, 62, 33692, 355, 5550, 38865, 62, 28480, 51, 20754, 198, 29701, 1847, 39, 10892, 796, 10352, 198, 30531, 796, 10352, 198, 51, 3620, ...
2.358883
5,584
# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import os import shutil import subprocess import sys from pex.pex_info import PexInfo from pex.testing import run_pex_command from pex.typing import TYPE_CHECKING from pex.variables import...
[ 2, 15069, 33448, 41689, 1628, 20420, 357, 3826, 27342, 9865, 3843, 20673, 13, 9132, 737, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 3826, 38559, 24290, 737, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 11748, ...
3.375
112
#!/usr/bin/python3 # # Copyright (c) 2017-2020, SUSE LLC # # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # Redistributions of source code must retain the above copyright notice, # this list ...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 2, 198, 2, 15069, 357, 66, 8, 2177, 12, 42334, 11, 311, 19108, 11419, 198, 2, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, ...
2.271242
6,120
from dataclasses import dataclass import random from typing import List import numpy as np import torch from config import Config from domain import DispatchMode from models import DQN from modules.state import FeatureManager from objects import Area, Vehicle from objects.area import AreaManager from objects.vehicle ...
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 198, 11748, 4738, 198, 6738, 19720, 1330, 7343, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 198, 198, 6738, 4566, 1330, 17056, 198, 6738, 7386, 1330, 35934, 19076, 198, 6738,...
2.970149
335
# Standard Python modules # ======================= import weakref from abc import ABCMeta, abstractmethod, abstractproperty # External modules # ================ from vtk import vtkActor from vtk import vtkMapper from vtk import vtkPolyDataAlgorithm from vtk import vtkBoundingBox # DICE modules # ============ from d...
[ 2, 8997, 11361, 13103, 198, 2, 36658, 50155, 198, 11748, 4939, 5420, 198, 6738, 450, 66, 1330, 9738, 48526, 11, 12531, 24396, 11, 12531, 26745, 198, 198, 2, 34579, 13103, 198, 2, 796, 25609, 18604, 198, 6738, 410, 30488, 1330, 410, 30...
2.386667
450
#!/usr/bin/env python # # Copyright 2011-2013 Colin Scott # # 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, 24330, 21015, 198, 2, 198, 2, 15069, 2813, 12, 6390, 18373, 4746, 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,...
3.410714
280
import os a=input("enter username:") if a.isalpha(): os.system("useradd "+a) os.system("passwd a")
[ 11748, 28686, 198, 64, 28, 15414, 7203, 9255, 20579, 25, 4943, 198, 361, 257, 13, 271, 26591, 33529, 198, 197, 418, 13, 10057, 7203, 7220, 2860, 43825, 64, 8, 198, 197, 418, 13, 10057, 7203, 6603, 16993, 257, 4943, 198 ]
2.525
40
"""Views.""" from django.conf import settings from django.contrib.auth.decorators import login_required from django.http import HttpResponse, Http404 from django.shortcuts import render, redirect from responsive_dashboard.dashboard import dashboards from responsive_dashboard.models import UserDashboard, UserDashlet ...
[ 37811, 7680, 82, 526, 15931, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 12501, 273, 2024, 1330, 17594, 62, 35827, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 3107...
3.52
100
import os from dataclasses import dataclass CONFIG = Config.create_from_env()
[ 11748, 28686, 198, 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 628, 198, 198, 10943, 16254, 796, 17056, 13, 17953, 62, 6738, 62, 24330, 3419, 198 ]
3.115385
26
import click import logging import multiprocessing import os import sys from atlas import __version__ from atlas.conf import make_config from atlas.parsers import refseq_parser from atlas.tables import merge_tables from atlas.workflows import download, run_workflow logging.basicConfig(level=logging.INFO, datefmt="%Y-...
[ 11748, 3904, 198, 11748, 18931, 198, 11748, 18540, 305, 919, 278, 198, 11748, 28686, 198, 11748, 25064, 198, 6738, 379, 21921, 1330, 11593, 9641, 834, 198, 6738, 379, 21921, 13, 10414, 1330, 787, 62, 11250, 198, 6738, 379, 21921, 13, 79...
2.772152
158
"""Test cases for the python_jsonapi.core.types.relationships module.""" from python_jsonapi.core.types.relationships import Relationship from python_jsonapi.core.types.relationships import RelationshipsMixin def test_relationship_init() -> None: """Can init a new relationships.""" sut = Relationship() as...
[ 37811, 14402, 2663, 329, 262, 21015, 62, 17752, 15042, 13, 7295, 13, 19199, 13, 39468, 5748, 8265, 526, 15931, 198, 6738, 21015, 62, 17752, 15042, 13, 7295, 13, 19199, 13, 39468, 5748, 1330, 39771, 198, 6738, 21015, 62, 17752, 15042, 13...
3.182081
346
from needlestack.indices.index import BaseIndex
[ 6738, 761, 32712, 441, 13, 521, 1063, 13, 9630, 1330, 7308, 15732, 198 ]
3.692308
13
from django.conf import settings from django.contrib.auth.models import User from django.core.mail import send_mail
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 201, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 201, 198, 6738, 42625, 14208, 13, 7295, 13, 4529, 1330, 3758, 62, 4529, 201, 198, 201, 198, 201, 198 ]
3.075
40
#! /usr/bin/python # -*- coding: utf-8 -*- __author__ = "Osman Baskaya" from nltk.stem.wordnet import WordNetLemmatizer import sys lmtzr = WordNetLemmatizer() for line in sys.stdin: print ' '.join(map(lmtzr.lemmatize, line.split()))
[ 2, 0, 1220, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 834, 9800, 834, 796, 366, 16748, 805, 347, 2093, 11729, 1, 198, 198, 6738, 299, 2528, 74, 13, 927, 13, 4775, 3262, ...
2.247706
109
# https://realpython.com/blog/python/lyricize-a-flask-app-to-create-lyrics-using-markov-chains/ from random import choice import sys text = "some sample text" text = """ An old man turned ninety-eight He won the lottery and died the next day It's a black fly in your Chardonnay It's a death row pardon two minutes too ...
[ 2, 3740, 1378, 5305, 29412, 13, 785, 14, 14036, 14, 29412, 14, 306, 1173, 1096, 12, 64, 12, 2704, 2093, 12, 1324, 12, 1462, 12, 17953, 12, 306, 10466, 12, 3500, 12, 4102, 709, 12, 38861, 14, 198, 198, 6738, 4738, 1330, 3572, 198, ...
3.793902
820
""" Copyright 2021 The Johns Hopkins University Applied Physics Laboratory LLC 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 us...
[ 37811, 198, 15269, 220, 33448, 383, 25824, 21183, 2059, 27684, 23123, 18643, 11419, 198, 220, 198, 5990, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 220, 198, 1659, 428, 3788, 290, 3917, 10314, 369...
3.931271
291
# Adapted from Graham Neubig's Paired Bootstrap script # https://github.com/neubig/util-scripts/blob/master/paired-bootstrap.py import numpy as np from sklearn.metrics import f1_score, precision_score, recall_score from tqdm import tqdm EVAL_TYPE_ACC = "acc" EVAL_TYPE_BLEU = "bleu" EVAL_TYPE_BLEU_DETOK = "bleu_detok"...
[ 2, 30019, 276, 422, 11520, 3169, 549, 328, 338, 350, 9820, 18892, 26418, 4226, 198, 2, 3740, 1378, 12567, 13, 785, 14, 710, 549, 328, 14, 22602, 12, 46521, 14, 2436, 672, 14, 9866, 14, 8957, 1202, 12, 18769, 26418, 13, 9078, 198, ...
2.332578
3,972
from paginate_sqlalchemy import SqlalchemyOrmPage
[ 6738, 42208, 4559, 62, 25410, 282, 26599, 1330, 311, 13976, 282, 26599, 5574, 76, 9876, 628 ]
3.1875
16
import tensorflow as tf # import slim # conv layers layers = tf.contrib.layers arg_scope = tf.contrib.framework.arg_scope
[ 11748, 11192, 273, 11125, 355, 48700, 198, 198, 2, 1330, 18862, 198, 2, 3063, 11685, 198, 75, 6962, 796, 48700, 13, 3642, 822, 13, 75, 6962, 198, 853, 62, 29982, 796, 48700, 13, 3642, 822, 13, 30604, 13, 853, 62, 29982, 628 ]
2.952381
42
import datetime # Log parm(File_name)
[ 11748, 4818, 8079, 198, 198, 2, 5972, 1582, 76, 7, 8979, 62, 3672, 8, 628 ]
2.666667
15
#!/usr/bin/env python # ============================================================================= # MODULE DOCSTRING # ============================================================================= """ Utility classes to wrap command line tools. The module provides a class :class:`.CLITool` that provides boilerp...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 628, 198, 2, 38093, 25609, 198, 2, 33893, 37760, 18601, 2751, 198, 2, 38093, 25609, 198, 198, 37811, 198, 18274, 879, 6097, 284, 14441, 3141, 1627, 4899, 13, 198, 198, 464, 8265, 3769, 257,...
6.978873
142
# -*- coding: utf-8 -*- import facebook from allauth.socialaccount.models import SocialToken from django.core.exceptions import ObjectDoesNotExist
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 23960, 198, 6738, 477, 18439, 13, 14557, 23317, 13, 27530, 1330, 5483, 30642, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 9515, 13921, 3673, 3109, 396...
3.311111
45
import pprint import time import keras import numpy as np import joblib import dataset_loaders import selection_policy import augmentations import experiments import experiments_util import featurized_classifiers import visualization_util import matplotlib.pyplot as plt mem = joblib.Memory(cachedir="./cache", verbo...
[ 11748, 279, 4798, 198, 11748, 640, 198, 198, 11748, 41927, 292, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 1693, 8019, 198, 198, 11748, 27039, 62, 2220, 364, 198, 11748, 6356, 62, 30586, 198, 11748, 35016, 602, 198, 11748, 10256, 1...
3.306306
111
from rest_framework import serializers from .models import *
[ 6738, 1334, 62, 30604, 1330, 11389, 11341, 198, 6738, 764, 27530, 1330, 1635, 628 ]
4.428571
14
# -*- coding: utf-8 -*- """ Created on 2014-5-13 @author: skycrab """ import json import time import random import string import urllib import hashlib import threading import traceback import xml.etree.ElementTree as ET import logging from urllib import request as urllib2 from functools import wraps from .config imp...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 41972, 319, 1946, 12, 20, 12, 1485, 198, 198, 31, 9800, 25, 6766, 6098, 397, 198, 37811, 198, 11748, 33918, 198, 11748, 640, 198, 11748, 4738, 198, 11748, ...
2.942408
191
from __future__ import annotations from contextlib import contextmanager from typing import TYPE_CHECKING from typing import Any from typing import Callable from typing import Dict from typing import List from typing import Optional from typing import Union from argo_dsl.api.io.argoproj.workflow import v1alpha1 if ...
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 198, 6738, 4732, 8019, 1330, 4732, 37153, 198, 6738, 19720, 1330, 41876, 62, 50084, 2751, 198, 6738, 19720, 1330, 4377, 198, 6738, 19720, 1330, 4889, 540, 198, 6738, 19720, 1330, 360, 713, 198, ...
3.357616
151
import unittest from app.models import Article
[ 11748, 555, 715, 395, 198, 6738, 598, 13, 27530, 1330, 10172, 628, 220, 220, 220, 220, 198 ]
3.117647
17
# coding: utf-8 ''' Created on 18.04.2013 @author: ''' import dals.os_io.io_wrapper as dal if __name__=='__main__': sets = dal.get_utf8_template() sets['name'] = 'test_import_to_jy.txt' readed = dal.file2list(sets) map(convert_one_line, readed) print 'Done'
[ 2, 19617, 25, 3384, 69, 12, 23, 201, 198, 7061, 6, 201, 198, 41972, 319, 1248, 13, 3023, 13, 6390, 201, 198, 201, 198, 31, 9800, 25, 220, 201, 198, 7061, 6, 201, 198, 201, 198, 11748, 288, 874, 13, 418, 62, 952, 13, 952, 62, ...
1.93125
160
__version__ = '1.3.0.a3'
[ 834, 9641, 834, 796, 705, 16, 13, 18, 13, 15, 13, 64, 18, 6, 198 ]
1.666667
15
import logging import math from emoji import emojize from peewee import DoesNotExist from telegram import ParseMode from telegram.ext import CommandHandler from telegram.ext import ConversationHandler from telegram.ext import Filters from telegram.ext import MessageHandler from telegram.ext import RegexHandler from...
[ 11748, 18931, 198, 11748, 10688, 198, 198, 6738, 44805, 1330, 795, 13210, 1096, 198, 198, 6738, 613, 413, 1453, 1330, 8314, 3673, 3109, 396, 198, 198, 6738, 573, 30536, 1330, 2547, 325, 19076, 198, 6738, 573, 30536, 13, 2302, 1330, 9455...
3.580645
155
""" - ` ` , ` , [] [] Run shift + alt + F10 [] ctrl + q """ """ """ # # print("") # print('hello') # print("""""") # print('''''') # : ctrl + shift + F10 # '' "" . ''' a = 7 7 a. ( ) ...
[ 37811, 198, 220, 220, 220, 220, 220, 532, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 4600, 220, 220, 220, 220, 220, 198, 220, 220, 220, 220, 220, 220, 220, 4600, 837, 220, 220, 220, 220, 220, 220, 220, 220, 198, 220, 220,...
1.532819
518
#!/usr/bin/env python3 import argparse import sys import io import os.path import shutil import requests from convert_file import convert_file from gooey import Gooey, GooeyParser if len(sys.argv) >= 2: if '--ignore-gooey' not in sys.argv: sys.argv.append('--ignore-gooey') if __name__ == '__main__': ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 1822, 29572, 198, 11748, 25064, 198, 11748, 33245, 198, 11748, 28686, 13, 6978, 198, 11748, 4423, 346, 198, 11748, 7007, 198, 6738, 10385, 62, 7753, 1330, 10385, 62, 7753, 198...
2.542636
129
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any lat...
[ 2, 357, 66, 8, 2321, 11, 3899, 1024, 23303, 272, 1279, 76, 40302, 13, 2934, 3099, 272, 31, 14816, 13, 785, 29, 198, 2, 198, 2, 770, 2393, 318, 636, 286, 28038, 856, 198, 2, 198, 2, 28038, 856, 318, 1479, 3788, 25, 345, 460, 17...
3.636364
264
#!/usr/bin/env python import argparse import os import sys import matplotlib import numpy as np matplotlib.use('Agg') import matplotlib.pyplot as plt import os, sys, inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirname(currentdir) sys.path.insert(...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 11748, 2603, 29487, 8019, 198, 11748, 299, 32152, 355, 45941, 198, 198, 6759, 29487, 8019, 13, 1904, 10786, 46384, ...
2.640152
528
from django.urls import reverse from rest_framework.test import APITestCase from testapp.models import ( A, B, C, Child, ChildProps, Container, Entry, MainObject, Parent, Tag, ) from .mixins import InclusionsMixin
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 198, 6738, 1334, 62, 30604, 13, 9288, 1330, 3486, 2043, 395, 20448, 198, 198, 6738, 1332, 1324, 13, 27530, 1330, 357, 198, 220, 220, 220, 317, 11, 198, 220, 220, 220, 347, 11, 198, ...
2.411215
107
# ---------------------------------------------------------------------------- # Copyright (c) 2022, Bokulich Laboratories. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # --------------------------------------------------------...
[ 2, 16529, 10541, 198, 2, 15069, 357, 66, 8, 33160, 11, 47390, 377, 488, 46779, 13, 198, 2, 198, 2, 4307, 6169, 739, 262, 2846, 286, 262, 40499, 347, 10305, 13789, 13, 198, 2, 198, 2, 383, 1336, 5964, 318, 287, 262, 2393, 38559, ...
4.349593
123
# vim: ts=8:sts=8:sw=8:noexpandtab # This file is part of python-markups module # License: 3-clause BSD, see LICENSE file # Copyright: (C) Dmitry Shachnev, 2012-2018 import markups.common as common from markups.abstract import AbstractMarkup, ConvertedMarkup
[ 2, 43907, 25, 40379, 28, 23, 25, 6448, 28, 23, 25, 2032, 28, 23, 25, 3919, 11201, 392, 8658, 198, 198, 2, 770, 2393, 318, 636, 286, 21015, 12, 4102, 4739, 8265, 198, 2, 13789, 25, 513, 12, 565, 682, 347, 10305, 11, 766, 38559, ...
2.955056
89
import pandas as pd from pm4py.objects.log.importer.xes import importer as xes_import from pm4py.objects.log.util import log as utils from pm4py.statistics.start_activities.log.get import get_start_activities from pm4py.statistics.end_activities.log.get import get_end_activities from pm4py.algo.filtering.log.end_a...
[ 11748, 19798, 292, 355, 279, 67, 201, 198, 6738, 9114, 19, 9078, 13, 48205, 13, 6404, 13, 320, 26634, 13, 48169, 1330, 848, 4337, 355, 2124, 274, 62, 11748, 201, 198, 6738, 9114, 19, 9078, 13, 48205, 13, 6404, 13, 22602, 1330, 2604,...
2.387345
2,734
#!/usr/bin/env python ############################################################################## # Copyright (c) 2014, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # Written by: # Nikhil Jain <nikhil.jain@acm.org> # Abhinav Bhatele <bhatele@llnl.gov...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 29113, 29113, 7804, 4242, 2235, 198, 2, 15069, 357, 66, 8, 1946, 11, 13914, 45036, 3549, 2351, 4765, 11, 11419, 13, 198, 2, 21522, 771, 379, 262, 13914, 45036, 3549, 2351, 18643, ...
2.250724
3,454
#!/usr/bin/env python import shutil import itertools import random import sys import traceback from pathlib import Path import altair as alt import pandas as pd import plotly as plotly import plotly.express as px import plotly.graph_objects as go import streamlit as st from pandas.api.types import is_numeric_dtype fro...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 11748, 4423, 346, 198, 11748, 340, 861, 10141, 198, 11748, 4738, 198, 11748, 25064, 198, 11748, 12854, 1891, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 5988, 958, 355, 5988, 19...
2.450808
681
import numpy as np from typing import List from math import sqrt from QFA.Automaton import Automaton from math import cos, sin, pi if __name__ == "__main__": example()
[ 11748, 299, 32152, 355, 45941, 198, 6738, 19720, 1330, 7343, 198, 6738, 10688, 1330, 19862, 17034, 198, 198, 6738, 1195, 7708, 13, 38062, 13951, 1330, 17406, 13951, 198, 6738, 10688, 1330, 8615, 11, 7813, 11, 31028, 628, 628, 628, 628, ...
3.12069
58
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.views.generic import TemplateView, ListView from django.shortcuts import render from rest_framework.authentication import TokenAuthentication from rest_framework import viewsets, mixins from rest_framework.response import Response from rest_fra...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 1330, 37350, 7680, 11, 7343, 7680, 198, 6738, 42625, 14208, 13, ...
2.4753
749
#!/usr/bin/env python import rospy from geometry_msgs.msg import Vector3 from sensor_msgs.msg import Imu import numpy as np c_imu, c_angle = 0, 0 if __name__ == "__main__": rospy.init_node("freq_checker") imu_sub = rospy.Subscriber("/myo_raw/myo_ori", Vector3, cb_angle) ang_sub = rospy.Subscriber("/myo_raw/myo_i...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 686, 2777, 88, 198, 6738, 22939, 62, 907, 14542, 13, 19662, 1330, 20650, 18, 198, 6738, 12694, 62, 907, 14542, 13, 19662, 1330, 1846, 84, 198, 11748, 299, 32152, 355, 45941...
2.179012
162
# [START woosmap_http_zones_collection_request] import requests import json url = "https://api.woosmap.com/zones?private_key=YOUR_PRIVATE_API_KEY" payload = json.dumps({ "zones": [ { "zone_id": "ZoneA", "description": "Delivery Zone for Store A", "store_id": "STORE_ID_1...
[ 2, 685, 2257, 7227, 266, 16426, 8899, 62, 4023, 62, 89, 1952, 62, 43681, 62, 25927, 60, 198, 11748, 7007, 198, 11748, 33918, 198, 198, 6371, 796, 366, 5450, 1378, 15042, 13, 86, 16426, 8899, 13, 785, 14, 89, 1952, 30, 19734, 62, 2...
1.992623
1,220
import win32com.client # Disable early binding: full of race conditions writing the cache files, # and changes the semantics since inheritance isn't handled correctly import win32com.client.gencache _savedGetClassForCLSID = win32com.client.gencache.GetClassForCLSID win32com.client.gencache.GetClassForCLSID = lam...
[ 11748, 1592, 2624, 785, 13, 16366, 201, 198, 201, 198, 2, 31529, 1903, 12765, 25, 1336, 286, 3234, 3403, 3597, 262, 12940, 3696, 11, 201, 198, 2, 290, 2458, 262, 33815, 1201, 24155, 2125, 470, 12118, 9380, 201, 198, 11748, 1592, 2624,...
2.862944
591
import numpy as np import matplotlib.pyplot as plt from PIL import Image from PIL import ImageOps
[ 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 350, 4146, 1330, 7412, 198, 6738, 350, 4146, 1330, 7412, 41472, 628, 628, 628, 628, 628 ]
3.147059
34
import os
[ 11748, 28686, 198 ]
3.333333
3
from django.shortcuts import render from django.http import Http404 from .models import CarOwner
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 26429, 220, 198, 6738, 764, 27530, 1330, 1879, 42419, 628, 628 ]
3.607143
28
from .WtBtAnalyst import WtBtAnalyst from .WtCtaOptimizer import WtCtaOptimizer __all__ = ["WtBtAnalyst","WtCtaOptimizer"]
[ 6738, 764, 54, 83, 33, 83, 2025, 21470, 1330, 370, 83, 33, 83, 2025, 21470, 201, 198, 6738, 764, 54, 83, 34, 8326, 27871, 320, 7509, 1330, 370, 83, 34, 8326, 27871, 320, 7509, 201, 198, 201, 198, 834, 439, 834, 796, 14631, 54, 8...
2.172414
58
import math import sys import time from grove.adc import ADC Grove = GroveRotaryAngleSensor if __name__ == '__main__': main()
[ 11748, 10688, 198, 11748, 25064, 198, 11748, 640, 198, 6738, 7128, 303, 13, 324, 66, 1330, 49169, 628, 198, 198, 42921, 303, 796, 24144, 24864, 560, 13450, 293, 47864, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, ...
2.77551
49
# -*- coding: utf-8 -*- import string from flask_wtf import FlaskForm as Form from wtforms.fields.html5 import URLField, EmailField, TelField from wtforms import (ValidationError, HiddenField, TextField, HiddenField, PasswordField, SubmitField, TextAreaField, IntegerField, RadioField, FileField, Decima...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 4731, 198, 6738, 42903, 62, 86, 27110, 1330, 46947, 8479, 355, 5178, 198, 6738, 266, 83, 23914, 13, 25747, 13, 6494, 20, 1330, 10289, 15878, 11, 9570, 15878,...
3.222826
184
"""TLA+ parser and syntax tree.""" from .parser import parse, parse_expr
[ 37811, 51, 13534, 10, 30751, 290, 15582, 5509, 526, 15931, 198, 6738, 764, 48610, 1330, 21136, 11, 21136, 62, 31937, 198 ]
3.47619
21
import keras.backend as K import keras.layers import runai.mp from .keep import Keep from .parallelised import Parallelised Activation = Keep.create('Activation') Dropout = Keep.create('Dropout') Flatten = Keep.create('Flatten')
[ 11748, 41927, 292, 13, 1891, 437, 355, 509, 198, 11748, 41927, 292, 13, 75, 6962, 198, 198, 11748, 1057, 1872, 13, 3149, 198, 198, 6738, 764, 14894, 1330, 9175, 198, 6738, 764, 1845, 29363, 1417, 1330, 42945, 1417, 198, 198, 25526, 34...
3.12
75
from matplotlib import pyplot as plt import numpy as np
[ 6738, 2603, 29487, 8019, 1330, 12972, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 198 ]
3.294118
17
# utility functions import ast import urllib import datetime import pytz import pylibmc # Import settings from django.conf import settings # API Models from apps.api.models import APIKey, Character, APITimer # Eve_DB Models from eve_db.models import MapSolarSystem # API Access Masks CHARACTER_API_ACCESS_MASKS = {'A...
[ 2, 10361, 5499, 198, 11748, 6468, 198, 11748, 2956, 297, 571, 198, 11748, 4818, 8079, 198, 11748, 12972, 22877, 198, 11748, 279, 2645, 571, 23209, 198, 198, 2, 17267, 6460, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 198, 2, ...
2.089078
2,582
from django.shortcuts import render from ..models import Field
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 198, 6738, 11485, 27530, 1330, 7663, 628, 198 ]
3.882353
17
"""mcpython - a minecraft clone written in python licenced under MIT-licence authors: uuk, xkcdjerry original game by forgleman licenced under MIT-licence minecraft by Mojang blocks based on 1.14.4.jar of minecraft, downloaded on 20th of July, 2019""" import globals as G import crafting.IRecipeType import json import...
[ 37811, 76, 13155, 7535, 532, 257, 6164, 3323, 17271, 3194, 287, 21015, 3476, 5864, 739, 17168, 12, 677, 594, 198, 41617, 25, 334, 2724, 11, 2124, 74, 10210, 73, 6996, 198, 198, 14986, 983, 416, 5784, 293, 805, 3476, 5864, 739, 17168, ...
2.691525
295
# Checks number of concurrent connections from XCaches to MWT2 dCache. # Creates alarm if more than 200 from any server. # ==== # It is run every 30 min from a cron job. import json from datetime import datetime import requests from alerts import alarms config_path = '/config/config.json' with open(con...
[ 2, 47719, 1271, 286, 24580, 8787, 422, 1395, 34, 3694, 284, 29961, 51, 17, 288, 30562, 13, 201, 198, 2, 7921, 274, 10436, 611, 517, 621, 939, 422, 597, 4382, 13, 201, 198, 2, 796, 18604, 201, 198, 2, 632, 318, 1057, 790, 1542, 9...
2.447289
664
import csv filename = "traingles.csv" with open(filename, 'r') as csv_file: csv_reader = csv.reader(csv_file) next(csv_reader) for line in csv_reader: if line: print(isInside(line))
[ 11748, 269, 21370, 628, 198, 34345, 796, 366, 9535, 278, 829, 13, 40664, 1, 198, 198, 4480, 1280, 7, 34345, 11, 705, 81, 11537, 355, 269, 21370, 62, 7753, 25, 198, 220, 220, 220, 269, 21370, 62, 46862, 796, 269, 21370, 13, 46862, ...
2.16
100
t = np.arange(0, 10, 0.1) # Time from 0 to 10 years in 0.1 steps with plt.xkcd(): p = np.exp(0.3 * t) fig = plt.figure(figsize=(6, 4)) plt.plot(t, p) plt.ylabel('Population (millions)') plt.xlabel('time (years)') plt.show()
[ 83, 796, 45941, 13, 283, 858, 7, 15, 11, 838, 11, 657, 13, 16, 8, 1303, 3862, 422, 657, 284, 838, 812, 287, 657, 13, 16, 4831, 198, 198, 4480, 458, 83, 13, 87, 74, 10210, 33529, 628, 220, 279, 796, 45941, 13, 11201, 7, 15, 1...
2.125
112
# Tests for code in squarepants/src/main/python/squarepants/plugins/copy_resources/tasks/copy_resource_jars # # Run with: # ./pants test squarepants/src/test/python/squarepants_test/plugins:copy_resources from pants.backend.jvm.targets.jar_dependency import JarDependency from pants.backend.jvm.targets.jar_library impo...
[ 2, 30307, 329, 2438, 287, 6616, 38895, 14, 10677, 14, 12417, 14, 29412, 14, 23415, 38895, 14, 37390, 14, 30073, 62, 37540, 14, 83, 6791, 14, 30073, 62, 31092, 62, 73, 945, 198, 2, 198, 2, 5660, 351, 25, 198, 2, 24457, 38895, 1332,...
3.217877
179
import os import sys # If installed to a custom prefix directory, binwalk may not be in # the default module search path(s). Try to resolve the prefix module # path and make it the first entry in sys.path. # Ensure that 'src/binwalk' becomes '.' instead of an empty string _parent_dir = os.path.dirname(os.path.dirname(...
[ 11748, 28686, 198, 11748, 25064, 198, 198, 2, 1002, 6589, 284, 257, 2183, 21231, 8619, 11, 9874, 11152, 743, 407, 307, 287, 198, 2, 262, 4277, 8265, 2989, 3108, 7, 82, 737, 9993, 284, 10568, 262, 21231, 8265, 198, 2, 3108, 290, 787,...
2.519789
379
#!/usr/bin/python3 # file: mini_frame.py # Created by Guang at 19-7-19 # description: # *-* coding:utf8 *-* import time
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 2, 2393, 25, 9927, 62, 14535, 13, 9078, 198, 2, 15622, 416, 36980, 379, 678, 12, 22, 12, 1129, 198, 2, 6764, 25, 198, 198, 2, 1635, 12, 9, 19617, 25, 40477, 23, 1635, 12, 9, 198, ...
2.45098
51
import time import pymongo import schedule from order import * from utils import * # MONGODB db = pymongo.MongoClient("mongodb://localhost:27017/")["ShaurmaBinanceTerminal"] order_db = db["orders"] JOB_INTERVAL = 10.0 # interval of updating jobs_pool = {} if __name__ == '__main__': # initialize_test_db()...
[ 11748, 640, 198, 198, 11748, 279, 4948, 25162, 198, 11748, 7269, 198, 198, 6738, 1502, 1330, 1635, 198, 6738, 3384, 4487, 1330, 1635, 198, 198, 2, 337, 18494, 3727, 33, 198, 9945, 796, 279, 4948, 25162, 13, 44, 25162, 11792, 7203, 310...
2.704
125
""" Modu spiajcy wszystkie wyszukiwania w jedn klas - wszystkei dane dla adresu ip/domeny. Klasa bezporednio uywana w widoku Django. """ from rest_framework.reverse import reverse from typing import List, Dict import whois import socket from connectors.credential import CredentialsNotFoundError from api_searcher.searc...
[ 37811, 198, 5841, 84, 599, 544, 73, 948, 266, 82, 7357, 301, 49375, 266, 893, 89, 11308, 86, 5411, 266, 474, 276, 77, 479, 21921, 532, 266, 82, 7357, 301, 365, 72, 288, 1531, 288, 5031, 512, 411, 84, 20966, 14, 3438, 28558, 13, ...
2.918478
184
# Python - 3.6.0 get_average = lambda marks: int(sum(marks) / len(marks))
[ 2, 11361, 532, 513, 13, 21, 13, 15, 198, 198, 1136, 62, 23913, 796, 37456, 8849, 25, 493, 7, 16345, 7, 14306, 8, 1220, 18896, 7, 14306, 4008, 198 ]
2.586207
29
import torch import torch.nn as nn import torch.optim as optim from torch.optim import lr_scheduler import torchvision from torchvision import datasets, transforms from torch.utils.data import DataLoader import hawtorch import hawtorch.io as io from hawtorch import Trainer from hawtorch.metrics import ClassificationM...
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 40085, 355, 6436, 198, 6738, 28034, 13, 40085, 1330, 300, 81, 62, 1416, 704, 18173, 198, 198, 11748, 28034, 10178, 198, 6738, 28034, 10178, 1330, 40522, 11...
3.088968
281
""" Example of how to make a Scatterplot with a time component """ import slayer as sly import pandas as pd DATA_URL = 'https://raw.githubusercontent.com/ajduberstein/sf_growth/master/public/data/business.csv' businesses = pd.read_csv(DATA_URL) FUCHSIA_RGBA = [255, 0, 255, 140] color_scale = sly.ColorScale( pal...
[ 37811, 198, 16281, 286, 703, 284, 787, 257, 1446, 1436, 29487, 351, 257, 640, 7515, 198, 37811, 198, 11748, 1017, 2794, 355, 49822, 198, 11748, 19798, 292, 355, 279, 67, 628, 198, 26947, 62, 21886, 796, 705, 5450, 1378, 1831, 13, 1256...
2.433898
295
import dictondisk import random import pytest import os remove_keys = {0, (33, 12.23), "c", ""} vanilla_dict = { 0: 1337, 1: 3.14, 2: 2.71, 3: 1.61, "a": "", "b": "!", "c": "", "": "", (1, .5): "lorem", (33, 12.23): "ipsum", -1: ["one", "two", "three"] }
[ 11748, 8633, 623, 1984, 198, 11748, 4738, 198, 11748, 12972, 9288, 198, 11748, 28686, 198, 198, 28956, 62, 13083, 796, 1391, 15, 11, 357, 2091, 11, 1105, 13, 1954, 828, 366, 66, 1600, 13538, 92, 198, 198, 10438, 5049, 62, 11600, 796, ...
1.992701
137
from src.extentions import db from flask_login import UserMixin from werkzeug.security import generate_password_hash, check_password_hash import datetime as dt # https://help.twitter.com/en/managing-your-account/twitter-username-rules # https://office-hack.com/gmail/password/
[ 6738, 12351, 13, 2302, 298, 507, 1330, 20613, 198, 6738, 42903, 62, 38235, 1330, 11787, 35608, 259, 198, 6738, 266, 9587, 2736, 1018, 13, 12961, 1330, 7716, 62, 28712, 62, 17831, 11, 2198, 62, 28712, 62, 17831, 198, 11748, 4818, 8079, ...
3.119565
92
import copy import enum from typing import * import numpy as np from shapely.geometry import MultiPolygon as ShapelyMultiPolygon from shapely.geometry import Point as ShapelyPoint from shapely.geometry import Polygon as ShapelyPolygon from shapely.strtree import STRtree import commonroad.geometry.transform from commo...
[ 11748, 4866, 198, 11748, 33829, 198, 6738, 19720, 1330, 1635, 198, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 5485, 306, 13, 469, 15748, 1330, 15237, 34220, 14520, 355, 25959, 306, 29800, 34220, 14520, 198, 6738, 5485, 306, 13, 469, ...
2.31865
16,300
from django.urls import path from . import views urlpatterns = [ path("test/", views.index, name = "index"), path('completed/',views.show_completed,name= "completed"), path('<int:action_id>/', views.show_action, name='action'), path('update/', views.update_status, name="update_status"), path('new/...
[ 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 6738, 764, 1330, 5009, 198, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 3108, 7203, 9288, 14, 1600, 5009, 13, 9630, 11, 1438, 796, 366, 9630, 12340, 198, 220, 220, 220,...
2.75
132
import ast from typing import List, Optional, cast import pytest from dataframe_expressions import ( Column, DataFrame, ast_Callable, ast_Column, ast_DataFrame, define_alias) from .utils_for_testing import reset_var_counter # NOQA # numpy math functions (??) # Advanced math operators # (https://docs.python....
[ 11748, 6468, 198, 6738, 19720, 1330, 7343, 11, 32233, 11, 3350, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 1366, 14535, 62, 42712, 507, 1330, 357, 198, 220, 220, 220, 29201, 11, 6060, 19778, 11, 6468, 62, 14134, 540, 11, 6468, 62, ...
2.966759
361
#!/usr/bin/env python # -*- coding: utf-8 -*- import redis rc = redis.StrictRedis(host='localhost', port=6379, db=0)
[ 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, 2266, 271, 198, 198, 6015, 796, 2266, 271, 13, 1273, 2012, 7738, 271, 7, 4774, 11639, 36750, 3256, 2493, ...
2.232143
56
# import encode import eel import cv2 import io import numpy as np import base64 import os import time import face_recognition import pickle import imutils import datetime from multiprocessing.pool import ThreadPool import random import shutil from database import * from camera import VideoCamera fro...
[ 2, 1330, 37773, 201, 198, 11748, 304, 417, 201, 198, 11748, 269, 85, 17, 201, 198, 11748, 33245, 201, 198, 11748, 299, 32152, 355, 45941, 201, 198, 11748, 2779, 2414, 201, 198, 11748, 28686, 201, 198, 11748, 640, 201, 198, 11748, 1986...
2.233742
1,061
# -*- coding: utf-8 -*- __author__ = 'Huang, Hua' from models.object import JsonSerializableObj
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 834, 9800, 834, 796, 705, 38202, 648, 11, 43709, 6, 198, 198, 6738, 4981, 13, 15252, 1330, 449, 1559, 32634, 13821, 49201, 628, 628 ]
2.631579
38
#!/usr/bin/python # -*- coding: utf-8 -*- import logging, sys from django.contrib.auth.decorators import login_required from django.shortcuts import render from walletgui.controller.global_constants import * from walletgui.controller.crypto_utils import CryptoUtility from walletgui.controller.walletmanager import Wal...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 18931, 11, 25064, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 12501, 273, 2024, 1330, 17594, 62, 35827,...
3.671141
149
import numpy as np import networkx as nx # For illustration purpose only [easy to understand the process] # ----------------------------- def pure_cascade_virality(G): '''G is a directed graph(tree)''' if not nx.is_weakly_connected(G): # return None return nodes = [k for (k,v) in G....
[ 11748, 299, 32152, 355, 45941, 198, 11748, 3127, 87, 355, 299, 87, 628, 628, 198, 2, 1114, 20936, 4007, 691, 685, 38171, 284, 1833, 262, 1429, 60, 198, 2, 34400, 32501, 198, 4299, 5899, 62, 66, 28966, 62, 37040, 1483, 7, 38, 2599, ...
2.304348
713
import pyjira.api as _api import json as _json def get_issues(id, limit=50): """Return 50 issues for a project. Parameters: - id: id of a project. - limit: max number of results to be returned. """ return _api.rest("/search?jql=project=" + str(id) + "&maxResults=" + str(limit)) def get_issue...
[ 11748, 12972, 73, 8704, 13, 15042, 355, 4808, 15042, 198, 11748, 33918, 355, 4808, 17752, 628, 198, 4299, 651, 62, 37165, 7, 312, 11, 4179, 28, 1120, 2599, 198, 220, 220, 220, 37227, 13615, 2026, 2428, 329, 257, 1628, 13, 198, 220, ...
2.368254
630
import importlib from argparse import ArgumentParser from wsgiref.simple_server import make_server p = ArgumentParser( prog="gongish serve", description="Serve a WSGI application" ) p.add_argument( "module", nargs="?", help="Module and application name (e.g: myapp:app)", type=str, ) p.add_argument...
[ 11748, 1330, 8019, 198, 6738, 1822, 29572, 1330, 45751, 46677, 198, 6738, 266, 45213, 557, 69, 13, 36439, 62, 15388, 1330, 787, 62, 15388, 628, 198, 79, 796, 45751, 46677, 7, 198, 220, 220, 220, 1172, 2625, 70, 506, 680, 4691, 1600, ...
2.674699
166
import unittest import redis import random
[ 11748, 555, 715, 395, 198, 11748, 2266, 271, 198, 11748, 4738, 628 ]
3.666667
12
#Secret Messages. New position alphabet = 'abcdefghijklmnopqrstuvwxyz' key = 3 character = input('Please enter a character ') position = alphabet.find(character) print('Position of a character ', character, ' is ', position) newPosition = position + key print('New position of a character ', character, ' is ', newPosit...
[ 2, 23725, 43534, 13, 968, 2292, 198, 198, 17307, 8380, 796, 705, 39305, 4299, 456, 2926, 41582, 10295, 404, 80, 81, 301, 14795, 86, 5431, 89, 6, 198, 2539, 796, 513, 198, 22769, 796, 5128, 10786, 5492, 3802, 257, 2095, 705, 8, 198, ...
3.571429
91
from examples.example_imports import * from manim_express.eager import PlotObj scene = EagerModeScene(screen_size=Size.bigger) graph = Line().scale(0.2) # t0 = time.time() # # delta_t = 0.5 # for a in np.linspace(3, 12, 3): # graph2 = ParametricCurve(lambda t: [t, # 0.8 * n...
[ 6738, 6096, 13, 20688, 62, 320, 3742, 1330, 1635, 198, 6738, 582, 320, 62, 42712, 13, 68, 3536, 1330, 28114, 49201, 198, 198, 29734, 796, 412, 3536, 19076, 36542, 7, 9612, 62, 7857, 28, 10699, 13, 14261, 1362, 8, 198, 198, 34960, 79...
1.864499
738
#!/usr/bin/env python # Note that this is python3 only import argparse import requests parser = argparse.ArgumentParser( "Get an observation from a FHIR server with authentication") parser.add_argument( "id", help="The observation id to retrieve") parser.add_argument( "auth", default="Admin", help="The...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 5740, 326, 428, 318, 21015, 18, 691, 198, 11748, 1822, 29572, 198, 11748, 7007, 198, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 7, 198, 220, 220, 220, 366, 3855, 281, 1...
2.907407
270
# # MythBox for XBMC - http://mythbox.googlecode.com # Copyright (C) 2010 analogue@yahoo.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at yo...
[ 2, 198, 2, 220, 18900, 14253, 329, 1395, 33, 9655, 532, 2638, 1378, 1820, 400, 3524, 13, 13297, 8189, 13, 785, 198, 2, 220, 15069, 357, 34, 8, 3050, 45304, 31, 40774, 13, 785, 198, 2, 220, 198, 2, 220, 770, 1430, 318, 1479, 3788...
2.112199
1,123
""" script to post-process training images by using OpenCV face detection and normalization MIT License Copyright (c) 2019 JinJie Chen 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 re...
[ 37811, 198, 12048, 284, 1281, 12, 14681, 3047, 4263, 416, 1262, 4946, 33538, 1986, 13326, 220, 198, 392, 3487, 1634, 198, 198, 36393, 13789, 198, 198, 15269, 357, 66, 8, 13130, 17297, 41, 494, 12555, 198, 198, 5990, 3411, 318, 29376, ...
3.54845
516
import flask from flask import render_template from flask import request from flask import url_for import json import logging ### # Globals ### app = flask.Flask(__name__) import CONFIG ### # Pages ### ############# # # Set up to run from cgi-bin script, from # gunicorn, or stand-alone. # app.secret_key = CO...
[ 11748, 42903, 198, 6738, 42903, 1330, 8543, 62, 28243, 198, 6738, 42903, 1330, 2581, 198, 6738, 42903, 1330, 19016, 62, 1640, 198, 198, 11748, 33918, 198, 11748, 18931, 198, 198, 21017, 198, 2, 40713, 874, 198, 21017, 198, 1324, 796, 42...
2.802083
192
import xarray as xr import numpy as np from pathlib import Path from tcvx21.grillix_post.components import FieldlineTracer from tcvx21.grillix_post.lineouts import Lineout xr.set_options(keep_attrs=True) def initialise_lineout_for_parallel_gradient( lineout, grid, equi, norm, npol, stored_trace: Path = None ): ...
[ 11748, 2124, 18747, 355, 2124, 81, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 256, 33967, 87, 2481, 13, 2164, 359, 844, 62, 7353, 13, 5589, 3906, 1330, 7663, 1370, 2898, 11736, 198, 6738, 256, 3...
2.43578
1,526
# Test cases for HT operations with hostapd # Copyright (c) 2013-2014, Jouni Malinen <j@w1.fi> # # This software may be distributed under the terms of the BSD license. # See README for more details. import time import logging logger = logging.getLogger() import struct import subprocess import hostapd def test_ap_ht4...
[ 2, 6208, 2663, 329, 7154, 4560, 351, 2583, 499, 67, 198, 2, 15069, 357, 66, 8, 2211, 12, 4967, 11, 449, 977, 72, 4434, 42326, 1279, 73, 31, 86, 16, 13, 12463, 29, 198, 2, 198, 2, 770, 3788, 743, 307, 9387, 739, 262, 2846, 286,...
2.142485
10,373
# coding: utf-8 # author: Haydara https://www.youtube.com/haydara import pickle with open('vocabs.pkl', 'rb') as pickle_load: voc_list = pickle.load(pickle_load) allowed_chars = ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 1772, 25, 9075, 67, 3301, 220, 3740, 1378, 2503, 13, 11604, 13, 785, 14, 71, 323, 67, 3301, 198, 198, 11748, 2298, 293, 198, 198, 4480, 1280, 10786, 18893, 8937, 13, 79, 41582, 3256, 705, ...
1.965
200
import facade import pytest import schemas
[ 11748, 43562, 198, 11748, 12972, 9288, 198, 11748, 3897, 5356, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 198 ]
2.7
30
import pandas import numpy as np from .reference_histogram_outlier import HistOutlier from typing import Union, Tuple
[ 11748, 19798, 292, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 764, 35790, 62, 10034, 21857, 62, 448, 2505, 1330, 5590, 7975, 2505, 198, 6738, 19720, 1330, 4479, 11, 309, 29291, 628 ]
3.71875
32
import numpy as np import fast_functions as ff import time print('python') G = np.zeros((512,512,240),dtype=np.uint8) G[128:384,128:384,60:180]=1 volume_data = np.load('1.npz') F = volume_data['volume'].astype(np.uint8) start_time = time.time() F = post_processing(F, F, 1.0, False) print(time.time() - start_time) st...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 3049, 62, 12543, 2733, 355, 31246, 198, 11748, 640, 628, 198, 198, 4798, 10786, 29412, 11537, 198, 38, 796, 45941, 13, 9107, 418, 19510, 25836, 11, 25836, 11, 16102, 828, 67, 4906, 28, 37659, ...
2.247423
388
# -*- coding: utf-8 -*- # @Time : 2019/5/25 16:09 # @Author : Alan # @Email : xiezhengwen2013@163.com # @File : data_preprocess2.py # @Software: PyCharm #
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2488, 7575, 220, 220, 220, 1058, 13130, 14, 20, 14, 1495, 1467, 25, 2931, 198, 2, 2488, 13838, 220, 1058, 12246, 198, 2, 2488, 15333, 220, 220, 1058, 2124, 494, 8...
2.075
80
#!/usr/bin/env python # coding:utf-8 import pymysql default_config = { 'host': '139.196.96.149', 'port': 13306, 'user': 'dataway-rw', 'password': 'QqHVMhmN*8', 'db': 'jumei', 'charset': 'utf8mb4' } apollo_config = { 'host': '127.0.0.1', 'port': 11306, 'user': 'apollo-rw', 'passw...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 19617, 25, 40477, 12, 23, 198, 11748, 279, 4948, 893, 13976, 198, 198, 12286, 62, 11250, 796, 1391, 198, 220, 220, 220, 705, 4774, 10354, 705, 20219, 13, 25272, 13, 4846, 13, 1944...
1.92691
602
import pyximport pyximport.install() from aoc24 import do_it do_it()
[ 11748, 12972, 87, 11748, 198, 9078, 87, 11748, 13, 17350, 3419, 198, 198, 6738, 257, 420, 1731, 1330, 466, 62, 270, 198, 4598, 62, 270, 3419, 198 ]
2.592593
27
from opensimplex import OpenSimplex import torch, time print(opensimplex_test('cuda')) print('') print(opensimplex_test('cpu'))
[ 6738, 9808, 320, 11141, 1330, 4946, 8890, 11141, 201, 198, 11748, 28034, 11, 640, 201, 198, 201, 198, 4798, 7, 44813, 320, 11141, 62, 9288, 10786, 66, 15339, 6, 4008, 201, 198, 4798, 7, 7061, 8, 201, 198, 4798, 7, 44813, 320, 11141,...
2.714286
49
from .levenshtein_distance import levenshtein_distance from .bk_tree import BKTree
[ 6738, 764, 293, 574, 1477, 22006, 62, 30246, 1330, 443, 574, 1477, 22006, 62, 30246, 198, 6738, 764, 65, 74, 62, 21048, 1330, 347, 42, 27660, 198 ]
3.074074
27
import torch import torch.nn as nn from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence from collections import namedtuple from ELMo.modules.char_embedding import CharEmbedding
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 28034, 13, 20471, 13, 26791, 13, 81, 20471, 1330, 2353, 62, 79, 29373, 62, 43167, 11, 14841, 62, 34860, 62, 43167, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 6738...
3.45614
57
import datetime as dt import cx_Oracle from src.app.externalOutages.getReasonId import getReasonId def createRealTimeOutage(pwcDbConnStr: str, elemTypeId: int, elementId: int, outageDt: dt.datetime, outageTypeId: int, reason: str, elementName: str, sdReqId: int, outageTagId: int) -> int: ...
[ 11748, 4818, 8079, 355, 288, 83, 198, 11748, 43213, 62, 48625, 198, 6738, 12351, 13, 1324, 13, 22615, 7975, 1095, 13, 1136, 45008, 7390, 1330, 651, 45008, 7390, 628, 198, 4299, 2251, 15633, 7575, 7975, 496, 7, 79, 86, 66, 43832, 37321...
2.2044
1,409