content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from django.contrib import admin from.models import Posteo, Comment, Like, Dislike, User admin.site.register(Posteo) admin.site.register(Comment) admin.site.register(Like) admin.site.register(Dislike) admin.site.register(User)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 628, 198, 6738, 13, 27530, 1330, 2947, 68, 78, 11, 18957, 11, 4525, 11, 3167, 2339, 11, 11787, 198, 198, 28482, 13, 15654, 13, 30238, 7, 6307, 68, 78, 8, 198, 28482, 13, 15654, 13, 3...
3.026316
76
default_app_config = "wagtail_ab_testing.test.apps.WagtailAbTestingTestAppConfig"
[ 12286, 62, 1324, 62, 11250, 796, 366, 86, 363, 13199, 62, 397, 62, 33407, 13, 9288, 13, 18211, 13, 54, 363, 13199, 4826, 44154, 14402, 4677, 16934, 1, 198 ]
2.827586
29
""" Python scripts that, if they are compatible, eliminate and compact nodes and edges """ import logging GRAPH_LOGGER = logging.getLogger(__name__) def tuple_to_string(node): """Given a tuple of a node id and orientation :return tuple element concatenete by |: """ node_id, node_orn = node return...
[ 37811, 198, 37906, 14750, 326, 11, 611, 484, 389, 11670, 11, 11005, 290, 16001, 13760, 290, 13015, 198, 37811, 198, 198, 11748, 18931, 198, 198, 10761, 31300, 62, 25294, 30373, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, ...
1.887526
8,971
from unittest import TestCase from nose.tools import * import os import datetime as dt import mock from StringIO import StringIO from phillyleg.management.scraper_wrappers import PhillyLegistarSiteWrapper from phillyleg.models import *
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 6738, 9686, 13, 31391, 1330, 1635, 198, 198, 11748, 28686, 198, 11748, 4818, 8079, 355, 288, 83, 198, 11748, 15290, 198, 6738, 10903, 9399, 1330, 10903, 9399, 198, 198, 6738, 872, 6548, 1455,...
3.558824
68
""" The Django patching works as follows: Django internals are instrumented via normal `patch()`. `django.apps.registry.Apps.populate` is patched to add instrumentation for any specific Django apps like Django Rest Framework (DRF). """ from inspect import getmro from inspect import isclass from inspect import isfunct...
[ 37811, 198, 464, 37770, 8529, 278, 2499, 355, 5679, 25, 198, 198, 35, 73, 14208, 1788, 874, 389, 8875, 276, 2884, 3487, 4600, 17147, 3419, 44646, 198, 198, 63, 28241, 14208, 13, 18211, 13, 2301, 4592, 13, 48433, 13, 12924, 5039, 63, ...
2.313384
7,636
""" Example Flask app """ from flask import Flask application = Flask(__name__) @application.route("/flask/test") def test(): """ Default route """ return "Hello World, from Flask!" if __name__ == "__main__": application.run(host="0.0.0.0:5000")
[ 37811, 198, 16281, 46947, 598, 198, 37811, 198, 198, 6738, 42903, 1330, 46947, 198, 198, 31438, 796, 46947, 7, 834, 3672, 834, 8, 628, 198, 31, 31438, 13, 38629, 7203, 14, 2704, 2093, 14, 9288, 4943, 198, 4299, 1332, 33529, 198, 220, ...
2.693069
101
from .tracker import Tracker from .time_since import time_since
[ 6738, 764, 2213, 10735, 1330, 26885, 198, 6738, 764, 2435, 62, 20777, 1330, 640, 62, 20777, 198 ]
3.764706
17
from __future__ import annotations from collections import abc from nansi.plugins.action.compose import ComposeAction from nansi.utils.collections import dig
[ 6738, 11593, 37443, 834, 1330, 37647, 198, 6738, 17268, 1330, 450, 66, 198, 198, 6738, 299, 504, 72, 13, 37390, 13, 2673, 13, 785, 3455, 1330, 3082, 577, 12502, 198, 6738, 299, 504, 72, 13, 26791, 13, 4033, 26448, 1330, 3100, 198 ]
3.785714
42
# Generated by Django 3.0.7 on 2020-06-19 18:05 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 22, 319, 12131, 12, 3312, 12, 1129, 1248, 25, 2713, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
import pandas as pd import sys print(sys.argv[2]) data = pd.read_table('/data/'+sys.argv[2]) data.to_csv('/tmp/data.csv', index = False)
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 25064, 198, 198, 4798, 7, 17597, 13, 853, 85, 58, 17, 12962, 198, 7890, 796, 279, 67, 13, 961, 62, 11487, 10786, 14, 7890, 14, 6, 10, 17597, 13, 853, 85, 58, 17, 12962, 198, 7890, 13,...
2.283333
60
import subprocess import json import time import sys def generate(tag, amount): """This function generates a specific number of tags relataed to one main tag""" setOfTags = set() setOfTags.add("#" + tag) # for _ in range(int(sys.argv[2])): search() with open('savedStatus/hashtags.json'...
[ 11748, 850, 14681, 198, 11748, 33918, 198, 11748, 640, 198, 11748, 25064, 628, 198, 4299, 220, 220, 220, 220, 7716, 7, 12985, 11, 2033, 2599, 198, 220, 220, 220, 37227, 1212, 2163, 18616, 257, 2176, 1271, 286, 15940, 823, 1045, 276, 2...
2.598985
197
import string inputFile = r"D:\Advent_of_Code_2020\ozzmeister00\PyAdventOfCode2020\inputs\day06.txt" testFile = r"D:\Advent_of_Code_2020\ozzmeister00\PyAdventOfCode2020\inputs\day06_test.txt" inputFiles = [inputFile, testFile] def chunkify(inData, startIndex): """ :param list inData: the list of individual ...
[ 11748, 4731, 198, 198, 15414, 8979, 796, 374, 1, 35, 7479, 2782, 1151, 62, 1659, 62, 10669, 62, 42334, 59, 78, 3019, 1326, 1694, 405, 59, 20519, 2782, 1151, 5189, 10669, 42334, 59, 15414, 82, 59, 820, 3312, 13, 14116, 1, 198, 9288, ...
2.544615
325
#!/usr/bin/env python """An example of how to embed an IPython shell into a running program. Please see the documentation in the IPython.Shell module for more details. The accompanying file example-embed-short.py has quick code fragments for embedding which you can cut and paste in your code once you understand how ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 2025, 1672, 286, 703, 284, 11525, 281, 6101, 7535, 7582, 656, 257, 2491, 1430, 13, 198, 198, 5492, 766, 262, 10314, 287, 262, 6101, 7535, 13, 23248, 8265, 329, 517, 3307, ...
3.295349
1,290
#!/usr/bin/python # # Usage: # scripts/upload-assets.py VERSION # # where VERSION is a version string like "v1.2.3" or "latest" # # Generates static assets for HTML, JS, and CSS. # Then uploads them to the public bucket. import argparse import os import re import subprocess import sys parser = argparse.ArgumentParser...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 198, 2, 29566, 25, 198, 2, 14750, 14, 25850, 12, 19668, 13, 9078, 44156, 2849, 198, 2, 198, 2, 810, 44156, 2849, 318, 257, 2196, 4731, 588, 366, 85, 16, 13, 17, 13, 18, 1, 393, 366...
2.740586
478
import json def get_readings(): """Load readings from local filesysystem. There's no need to refactor this function. The json library reads until EOF and then loads into memory. Returns a dictionary.""" with open('./readings.json', 'r') as f: readings = json.load(f) return readings
[ 11748, 33918, 628, 198, 4299, 651, 62, 961, 654, 33529, 198, 220, 220, 220, 37227, 8912, 24654, 422, 1957, 3696, 893, 6781, 13, 198, 220, 220, 220, 1318, 338, 645, 761, 284, 1006, 11218, 428, 2163, 13, 198, 220, 220, 220, 383, 33918...
2.990566
106
# coding=utf-8 # Copyright (C) ATHENA AUTHORS # 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 ...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 15069, 357, 34, 8, 317, 4221, 45510, 37195, 20673, 198, 2, 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, ...
2.914205
711
#!/usr/bin/env python3 import os import shutil import yaml import subprocess class HelmCommand(object): """Wrapped HELM command used by rdbox_app_market. Attributes: helm (str): Full path of platform-specific helm commands. """
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 331, 43695, 198, 11748, 850, 14681, 628, 198, 4871, 28351, 21575, 7, 15252, 2599, 198, 220, 220, 220, 37227, 36918, 1496, 36255, 44, ...
2.952941
85
import torch import torch.nn.functional as F import torch.nn as nn import math import numpy as np class NoisyLinear(nn.Module): """Noisy linear module for NoisyNet. Attributes: in_features (int): input size of linear module out_features (int): output size of linear module std_i...
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 10688, 198, 11748, 299, 32152, 355, 45941, 198, 198, 4871, 1400, 13560, 14993, 451, 7, 20471, 13, 26796, 2599, 198,...
2.217002
1,341
from django.template import RequestContext from achilles import blocks, actions register = actions.Library('tables') def default_accessor(object, name): """ Extract the given field from a model: :param object: Object to read the field from :param name: Field name to access on the object """ ...
[ 6738, 42625, 14208, 13, 28243, 1330, 19390, 21947, 198, 198, 6738, 257, 354, 21718, 1330, 7021, 11, 4028, 628, 198, 30238, 796, 4028, 13, 23377, 10786, 83, 2977, 11537, 628, 198, 4299, 4277, 62, 15526, 273, 7, 15252, 11, 1438, 2599, 1...
2.738377
1,269
# -*- coding: utf-8 -*- # Generated by Django 1.11.21 on 2019-07-02 16:30 from __future__ import unicode_literals import bitfield.models from django.db import migrations, models from django.utils.translation import gettext as _ from model_utils import Choices # Deprecating AGE_AT_BIRTH_CHOICES = Choices( ("na", _...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 2481, 319, 13130, 12, 2998, 12, 2999, 1467, 25, 1270, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198...
2.080569
633
#!/usr/bin/env python """Plot all graph metrics as histograms""" import itertools import sys import operator import numpy from numpy import linalg as LA import argparse from general_seq import conv from general_seq import seq_IO from plot import conv as pconv from plot import hist from collections import Counter if _...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 43328, 477, 4823, 20731, 355, 1554, 26836, 37811, 198, 11748, 340, 861, 10141, 198, 11748, 25064, 198, 11748, 10088, 198, 11748, 299, 32152, 198, 6738, 299, 32152, 1330, 300, ...
3.362745
204
"""Parameters management.""" import copy from modoboa.lib import exceptions, form_utils, signals from modoboa.lib.sysutils import guess_extension_name class NotDefined(exceptions.ModoboaException): """Custom exception for undefined parameters.""" http_code = 404 class Registry(object): """A registry ...
[ 37811, 48944, 4542, 526, 15931, 198, 198, 11748, 4866, 198, 198, 6738, 953, 672, 12162, 13, 8019, 1330, 13269, 11, 1296, 62, 26791, 11, 10425, 198, 6738, 953, 672, 12162, 13, 8019, 13, 17597, 26791, 1330, 4724, 62, 2302, 3004, 62, 367...
2.436846
2,676
import pytest
[ 11748, 12972, 9288, 628 ]
3.75
4
# code adapted from https://github.com/jfzhang95/pytorch-deeplab-xception/ import math from collections import OrderedDict import torch.nn as nn import torch.nn.functional as F from encoding.nn import SyncBatchNorm, GlobalAvgPool2d from ..model_store import get_model_file __all__ = ['Xception65', 'Xception71', 'xcepti...
[ 2, 2438, 16573, 422, 3740, 1378, 12567, 13, 785, 14, 73, 69, 23548, 648, 3865, 14, 9078, 13165, 354, 12, 67, 1453, 489, 397, 12, 87, 4516, 14, 198, 11748, 10688, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 11748, 28034, 13, ...
2.752577
291
import re from nonebot import IntentCommand, CommandSession from nalomu.commands import BaseCommand, method_command, method_parser, method_nlp from nalomu.util import is_number from .data_source import NUser, fortune_list, fortune_list_image __all__ = ['UserCommands']
[ 11748, 302, 198, 198, 6738, 4844, 13645, 1330, 39168, 21575, 11, 9455, 36044, 198, 198, 6738, 299, 282, 296, 84, 13, 9503, 1746, 1330, 7308, 21575, 11, 2446, 62, 21812, 11, 2446, 62, 48610, 11, 2446, 62, 21283, 79, 198, 6738, 299, 2...
3.301205
83
## TODO: Reference: Tooling from werkzeug tools - citation needed from __future__ import unicode_literals import sys from rexpro.exceptions import RexProConnectionException, RexProScriptException from mogwai._compat import reraise, string_types, PY2 from mogwai import connection from mogwai.exceptions import MogwaiBlue...
[ 2235, 16926, 46, 25, 20984, 25, 16984, 278, 422, 266, 9587, 2736, 1018, 4899, 532, 27860, 2622, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 11748, 25064, 198, 6738, 302, 87, 1676, 13, 1069, 11755, 1330, 17853, ...
2.92891
2,321
import pymc3 as pm import numpy as np # import pydevd # pydevd.set_pm_excepthook() np.seterr(invalid="raise") data = np.random.normal(size=(2, 20)) with pm.Model() as model: x = pm.Normal("x", mu=0.5, sigma=2.0, shape=(2, 1)) z = pm.Beta("z", alpha=10, beta=5.5) d = pm.Normal("data", mu=x, sigma=0.75, o...
[ 11748, 279, 4948, 66, 18, 355, 9114, 198, 11748, 299, 32152, 355, 45941, 198, 198, 2, 1330, 279, 5173, 1990, 67, 198, 2, 279, 5173, 1990, 67, 13, 2617, 62, 4426, 62, 1069, 344, 79, 400, 566, 3419, 198, 37659, 13, 82, 2357, 81, 7...
2.125
176
#!/usr/bin/env python import os import sys import math import argparse import subprocess import numpy as np import pat3dem.pdb as p3p import scipy.optimize as opt from EMAN2 import * class RandomDisplacementBounds(object): """random displacement with bounds""" def __call__(self, x): """take a random step bu...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 10688, 198, 11748, 1822, 29572, 198, 11748, 850, 14681, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 1458, 18, 9536, 13, 79, 9945, 35...
2.835443
237
import sys, pandas sys.path.append('./log_helper') sys.path.append('./model') from process_raw_prices import generate_pair_df csv1 = pandas.read_csv(r'C:\Users\russi\PycharmProjects\pairstrade-fyp-2019-master\model\dataset\nyse-daily-trimmed-same-length\LEAF.csv') csv2 = pandas.read_csv(r'C:\Users\russi\Pych...
[ 11748, 25064, 11, 19798, 292, 201, 198, 201, 198, 17597, 13, 6978, 13, 33295, 7, 4458, 14, 6404, 62, 2978, 525, 11537, 201, 198, 17597, 13, 6978, 13, 33295, 7, 4458, 14, 19849, 11537, 201, 198, 201, 198, 6738, 1429, 62, 1831, 62, ...
2.268519
216
from unittest.mock import call, patch import pytest from dev.tasks.pip import Pip @patch('dev.tasks.pip.run_command') @patch('dev.tasks.pip.run_command') @patch('dev.tasks.pip.os.path.exists') @patch('dev.tasks.pip.run_command') @patch('dev.task.error_console.print') @patch('dev.tasks.pip.run_command') @pat...
[ 6738, 555, 715, 395, 13, 76, 735, 1330, 869, 11, 8529, 198, 198, 11748, 12972, 9288, 198, 198, 6738, 1614, 13, 83, 6791, 13, 79, 541, 1330, 25149, 628, 198, 31, 17147, 10786, 7959, 13, 83, 6791, 13, 79, 541, 13, 5143, 62, 21812, ...
2.394558
147
from django.contrib import admin from .models import Product # Register your models here. admin.site.register(Product, ProductAdmin)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 764, 27530, 1330, 8721, 198, 198, 2, 17296, 534, 4981, 994, 13, 198, 198, 28482, 13, 15654, 13, 30238, 7, 15667, 11, 8721, 46787, 8, 198 ]
3.75
36
from django.contrib.auth.models import User from django import forms '''class UserForm(forms.ModelForm): password=forms.CharField(widget=forms.PasswordInput) class Meta: model=User field="__all__" '''
[ 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 42625, 14208, 1330, 5107, 198, 198, 7061, 6, 4871, 11787, 8479, 7, 23914, 13, 17633, 8479, 2599, 198, 197, 28712, 28, 23914, 13, 12441, 15878, 7, 42655, ...
2.916667
72
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
[ 2, 15069, 33448, 3012, 11419, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2, 921, 743, 733...
3.849711
173
from tqdm import tqdm import numpy as np # This line is used only to have the ability to see the progress of # import to MongoDB tqdm.pandas() class MongoImportDF(): """ A class used to import a dataframe into MongoDB with some cleaning before Attributes ---------- df : pandas.DataFrame a...
[ 6738, 256, 80, 36020, 1330, 256, 80, 36020, 198, 11748, 299, 32152, 355, 45941, 198, 2, 770, 1627, 318, 973, 691, 284, 423, 262, 2694, 284, 766, 262, 4371, 286, 198, 2, 1330, 284, 42591, 11012, 198, 83, 80, 36020, 13, 79, 392, 292...
3.210843
332
import csv import ctypes import logging import os import sys from multiprocessing import Pool from multiprocessing import Process from multiprocessing import Queue from zlib import adler32 from mwm import MetadataField from mwm import Mwm from mwm.ft2osm import read_osm2ft HEADERS = { "mapping": "osmid fid mwm_id...
[ 11748, 269, 21370, 198, 11748, 269, 19199, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 25064, 198, 6738, 18540, 305, 919, 278, 1330, 19850, 198, 6738, 18540, 305, 919, 278, 1330, 10854, 198, 6738, 18540, 305, 919, 278, 1330, 4670, ...
2.42928
403
from discord.ext import commands import discord import requests from botlibrary import constants # Anton Rewrite that shit
[ 6738, 36446, 13, 2302, 1330, 9729, 198, 11748, 36446, 198, 11748, 7007, 198, 6738, 10214, 32016, 1330, 38491, 628, 198, 2, 9261, 16140, 6525, 326, 7510, 628 ]
4.666667
27
# ------------------------------------------- # Personae - A Character-Visualisation Tool for Dramatic Texts # # NVS Challenge - 2016 # # Extract data from TEI XML markup of # - The Comedy of Errors # - The Winter's Tale # # suitable for use in front-end data ...
[ 2, 20368, 32284, 198, 2, 220, 220, 220, 220, 220, 220, 7755, 3609, 532, 317, 15684, 12, 36259, 5612, 16984, 329, 36736, 1512, 8255, 82, 198, 2, 220, 220, 220, 220, 220, 220, 220, 198, 2, 220, 220, 220, 220, 220, 220, 399, 20304, ...
3.1778
1,018
from dispatcher import Signal ORDER_CREATED = Signal('order_created', ('order_id', 'user_id', 'shop_id')) SIGNAL_A= Signal('signal_a', ('order_id', 'user_id')) SIGNAL_B = Signal('signal_b', ('order_id', 'user_id'))
[ 6738, 49952, 1330, 26484, 628, 198, 12532, 1137, 62, 43387, 11617, 796, 26484, 10786, 2875, 62, 25598, 3256, 19203, 2875, 62, 312, 3256, 705, 7220, 62, 312, 3256, 705, 24643, 62, 312, 6, 4008, 198, 198, 46224, 1847, 62, 32, 28, 26484,...
2.576471
85
import pymysql import datetime import requests import http.cookiejar import re, calendar, requests, json, time, glob import urllib from bs4 import BeautifulSoup import os import uuid import threading import subprocess import shlex import math import glob import shutil from urllib3.exceptions import MaxRetryError, NewC...
[ 11748, 279, 4948, 893, 13976, 198, 11748, 4818, 8079, 198, 11748, 7007, 198, 11748, 2638, 13, 44453, 9491, 198, 11748, 302, 11, 220, 11845, 11, 7007, 11, 33918, 11, 640, 11, 15095, 198, 11748, 2956, 297, 571, 198, 6738, 275, 82, 19, ...
3.675127
197
import numpy as np import unittest from ..util import BaseCase from pygsti.modelpacks.legacy import std1Q_XYI as std from pygsti.objects.replib import slowreplib try: from pygsti.objects.replib import fastreplib _FASTREPLIB_LOADED = True except ImportError: _FASTREPLIB_LOADED = False @unittest.skipUnl...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 555, 715, 395, 198, 6738, 11485, 22602, 1330, 7308, 20448, 198, 198, 6738, 12972, 70, 301, 72, 13, 19849, 32377, 13, 1455, 1590, 1330, 14367, 16, 48, 62, 34278, 40, 355, 14367, 198, 6738, 129...
2.596026
151
from time import sleep import requests headers = { "Accept": "application/vnd.github.v3+json", "Authorization": "token xxxxxxxxxx", # github授权token "X-OAuth-Scopes": "repo" } with open('./repos.txt', 'r', encoding='utf-8') as f: data = f.readlines() url = "https://api.github.com/repos/{}/{}" urls = ...
[ 6738, 640, 1330, 3993, 198, 11748, 7007, 198, 198, 50145, 796, 1391, 198, 220, 220, 220, 366, 38855, 1298, 366, 31438, 14, 85, 358, 13, 12567, 13, 85, 18, 10, 17752, 1600, 198, 220, 220, 220, 366, 13838, 1634, 1298, 366, 30001, 2124...
2.385965
228
# -*- encoding: utf-8 -*- # Copyright 2017 NEC Corporation # # 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, 532, 9, 12, 21004, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 15069, 2177, 41804, 10501, 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, 2...
3.67757
214
from ..conversion import check_conversion
[ 6738, 11485, 1102, 9641, 1330, 2198, 62, 1102, 9641, 628, 628, 628, 628, 628, 628, 198 ]
3.375
16
import cv2 import numpy as np from object_detector import ObjectDetection p1_hand = (0, 0) p2_hand = (200, 300) lower_hsv_hand = (0, 50, 0) file_directory = 'Data\\Train\\Right\\' name = 'HANDS' i = 2000 limit = 2999 cap = cv2.VideoCapture(1) obj = ObjectDetection(hands_or_blue=2, p1=p1_hand, p2=p2_hand, lower_hsv=lo...
[ 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 2134, 62, 15255, 9250, 1330, 9515, 11242, 3213, 198, 198, 79, 16, 62, 4993, 796, 357, 15, 11, 657, 8, 198, 79, 17, 62, 4993, 796, 357, 2167, 11, 5867, 8, 198, 21...
2.157434
343
from django.contrib import admin from .models import Order, StatusCrm, CommentCrm admin.site.register(Order, OrderAdm) admin.site.register(StatusCrm) admin.site.register(CommentCrm) # Register your models here.
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 764, 27530, 1330, 8284, 11, 12678, 13916, 76, 11, 18957, 13916, 76, 628, 628, 198, 28482, 13, 15654, 13, 30238, 7, 18743, 11, 8284, 2782, 76, 8, 198, 28482, 13, 15654, 13, 3...
3.208955
67
# Project imports import os import sys import hashlib import random import re import shutil import string import tempfile import time sys.path.insert(0, os.path.abspath(os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))))) sys.path.insert(0, os.path.abspath(os.path.dirname(o...
[ 2, 4935, 17944, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 11748, 12234, 8019, 198, 11748, 4738, 198, 11748, 302, 198, 11748, 4423, 346, 198, 11748, 4731, 198, 11748, 20218, 7753, 198, 11748, 640, 198, 198, 17597, 13, 6978, 13, 284...
2.808081
198
import os class Config: ''' General configuration parent class ''' NEWS_API_BASE_URL = 'http://newsapi.org/v2/everything?q=bitcoin&from=2020-11-01&sortBy=publishedAt&apiKey=0ac1c2d0556d41389f0ea5569f3c85b6' NEWS_SOURCE_BASE_URL = 'http://newsapi.org/v2/everything?q=bitcoin&from=2020-11-01&sortBy=pu...
[ 11748, 28686, 198, 198, 4871, 17056, 25, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 3611, 8398, 2560, 1398, 198, 220, 220, 220, 705, 7061, 198, 220, 220, 220, 28840, 62, 17614, 62, 33, 11159, 62, 21886, 796, 705, 4023, 1378,...
2.518817
372
# -*- coding: utf-8 -*- """ Created on Sat Oct 3 19:52:45 2015 @author: Jorge Ulises Useche Cuellar """ from numpy import * from matplotlib.pyplot import * #import matplotlib.pyplot as plt #import matplotlib.image as Image #from sympy import * from PIL import Image #import numpy as np #fig, (ax1, ax2, ax...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 7031, 2556, 220, 513, 678, 25, 4309, 25, 2231, 1853, 201, 198, 201, 198, 31, 9800, 25, 34687, 16322, 2696, 471, 2363, 258, 40568, 297...
1.846505
658
import logging logging.getLogger("requests").setLevel(logging.WARNING) logging.getLogger("urllib3").setLevel(logging.WARNING) from logging.handlers import TimedRotatingFileHandler
[ 11748, 18931, 198, 6404, 2667, 13, 1136, 11187, 1362, 7203, 8897, 3558, 11074, 2617, 4971, 7, 6404, 2667, 13, 31502, 8, 198, 6404, 2667, 13, 1136, 11187, 1362, 7203, 333, 297, 571, 18, 11074, 2617, 4971, 7, 6404, 2667, 13, 31502, 8, ...
3.232143
56
import psutil import time import re import os import shutil import sys import shlex import configparser import config from status import Status #[[$SRC_FILES...]] usage examples: #[[$SRC_FILES...]] --> a.cppb.cppc.cpp #[[$SRC_FILES... ]] --> a.cpp b.cpp c.cpp #[[$SRC_FILES... –r, ]] --> a.cpp –r, b.c...
[ 11748, 26692, 22602, 198, 11748, 640, 198, 11748, 302, 198, 11748, 28686, 198, 11748, 4423, 346, 198, 11748, 25064, 198, 11748, 427, 2588, 198, 11748, 4566, 48610, 198, 11748, 4566, 198, 6738, 3722, 1330, 12678, 198, 198, 2, 30109, 3, 5...
1.933673
784
import time from Errors import *
[ 11748, 640, 198, 6738, 44225, 1330, 1635 ]
4.571429
7
import os, sys import inspect currentdir = os.path.dirname(os.path.abspath( inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirname(currentdir) sys.path.insert(0, parentdir) import numpy as np import pytest import librosa import pathlib import soundpy as sp audio_dir = 'test_audio/' test_audiofile =...
[ 11748, 28686, 11, 25064, 198, 11748, 10104, 198, 14421, 15908, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 397, 2777, 776, 7, 198, 220, 220, 220, 10104, 13, 1136, 7753, 7, 1040, 806, 13, 14421, 14535, 3419, 22305, 1...
2.8
130
from django.conf import settings from django.contrib import auth from django.core.exceptions import ImproperlyConfigured from django.shortcuts import redirect from django.views.generic import FormView
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 3642, 822, 1330, 6284, 198, 6738, 42625, 14208, 13, 7295, 13, 1069, 11755, 1330, 12205, 525, 306, 16934, 1522, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 18941,...
3.849057
53
import urllib.request,json from .models import Sources from .models import Articles #Getting the NEWS_API_KEY api_key = None #Getting the news base_url base_url =None # a function that replaces the empty variables we created with the configuration objects we created and pass in the app instance source_url =None def ge...
[ 11748, 2956, 297, 571, 13, 25927, 11, 17752, 198, 6738, 764, 27530, 1330, 26406, 198, 6738, 764, 27530, 1330, 22698, 198, 2, 20570, 262, 28840, 62, 17614, 62, 20373, 198, 15042, 62, 2539, 796, 6045, 198, 2, 20570, 262, 1705, 2779, 62,...
2.732082
586
from codeaug.varm import (Language, Node, Parser, TreeSitterCode, tree_sitter_path)
[ 6738, 2438, 7493, 13, 85, 1670, 1330, 357, 32065, 11, 19081, 11, 23042, 263, 11, 12200, 50, 1967, 10669, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
2.055556
54
# coding: utf-8 # ## Prepare parallel corpus # # **Based on TensorFlow code: https://github.com/tensorflow/models/blob/master/tutorials/rnn/translate/data_utils.py** # In[ ]: import os import re import pickle from tqdm import tqdm import sys # In[ ]: from nmt_config import * # In[ ]: data_fname = {"en": os.pa...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 22492, 43426, 10730, 35789, 198, 2, 220, 198, 2, 12429, 15001, 319, 309, 22854, 37535, 2438, 25, 3740, 1378, 12567, 13, 785, 14, 83, 22854, 11125, 14, 27530, 14, 2436, 672, 14, 9866, 14...
2.274725
455
# https://www.geeksforgeeks.org/detect-cycle-in-a-graph/
[ 2, 3740, 1378, 2503, 13, 469, 2573, 30293, 2573, 13, 2398, 14, 15255, 478, 12, 13696, 12, 259, 12, 64, 12, 34960, 14 ]
2.434783
23
import boto3 import botocore import random import string from crhelper import CfnResource helper = CfnResource() @helper.create @helper.delete @helper.update
[ 11748, 275, 2069, 18, 198, 11748, 10214, 420, 382, 198, 11748, 4738, 198, 11748, 4731, 198, 6738, 1067, 2978, 525, 1330, 327, 22184, 26198, 198, 198, 2978, 525, 796, 327, 22184, 26198, 3419, 198, 198, 31, 2978, 525, 13, 17953, 198, 19...
2.981481
54
#!/usr/bin/python3 # -*- coding:utf-8 -*- # File Name: fork.py # Author: Lipsum # Mail: niuleipeng@gmail.com # Created Time: 2016-05-16 11:01:29 import os print('Process %s start...' %(os.getpid())) pid = os.fork() if pid == 0: print('I am child process %s and my parent process is %s' %(os.getpid(), os.getppid...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 198, 2, 9220, 6530, 25, 15563, 13, 9078, 198, 2, 6434, 25, 406, 2419, 388, 198, 2, 11099, 25, 37628, 2261, 541, 1516, 31,...
2.464706
170
""" Module for layers that are typically used as output (c) 2020 d373c7 """ import torch import torch.nn as nn from math import sqrt from .common import Layer from ...features.common import FeatureCategorical from ...features.tensor import TensorDefinition from collections import OrderedDict from typing import List, Tu...
[ 37811, 198, 26796, 329, 11685, 326, 389, 6032, 973, 355, 5072, 198, 7, 66, 8, 12131, 288, 34770, 66, 22, 198, 37811, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 6738, 10688, 1330, 19862, 17034, 198, 6738, 764, ...
3.543902
410
#MenuTitle: Open Info/ folder (GlyphsData.xml) # -*- coding: utf-8 -*- __doc__=""" Opens the Info/ folder in ~/Library/Application support/Glyphs to update the GlyphsData.xml file. """ import subprocess path = os.path.expanduser('~/Library/Application Support/Glyphs/Info') print "Opening the Info/ folder: " + path ...
[ 2, 23381, 19160, 25, 4946, 14151, 14, 9483, 357, 38, 306, 746, 82, 6601, 13, 19875, 8, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 834, 15390, 834, 2625, 15931, 198, 18257, 641, 262, 14151, 14, 9483, 287, ...
2.8125
128
from lxml import html import requests import os
[ 6738, 300, 19875, 1330, 27711, 198, 11748, 7007, 198, 11748, 28686, 198 ]
4
12
import numpy as np import pymesh from math import sqrt import csv def compute_vertices_to_mesh_distances(groundtruth_vertices, grundtruth_landmark_points, predicted_mesh_vertices, predicted_mesh_faces, predicted_mesh_landmark_points, out_fi...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 279, 4948, 5069, 198, 6738, 10688, 1330, 19862, 17034, 198, 11748, 269, 21370, 628, 198, 4299, 24061, 62, 1851, 1063, 62, 1462, 62, 76, 5069, 62, 17080, 1817, 7, 2833, 35310, 62, 1851, 1063, ...
2.56015
3,192
import ast def parse_ast(contents, fname, mode='exec'): """Wrapper for ast.parse() that cleans the contents of CRs and ensures it ends with a newline.""" contents = contents.replace('\r', '') # py26 barfs on CRs if not contents.endswith('\n'): contents += '\n' # to make ast.parse happy :( ...
[ 198, 11748, 6468, 198, 198, 4299, 21136, 62, 459, 7, 3642, 658, 11, 277, 3672, 11, 4235, 11639, 18558, 6, 2599, 198, 220, 220, 220, 37227, 36918, 2848, 329, 6468, 13, 29572, 3419, 326, 20658, 262, 10154, 286, 8740, 82, 290, 19047, 1...
2.560606
396
import json import uuid from typing import Type from sqlalchemy.orm import Session from sqlalchemy import TEXT from sqlalchemy.types import TypeDecorator, CHAR from sqlalchemy.dialects.postgresql import UUID, JSONB class GUID(TypeDecorator): """Platform-independent GUID type. Uses PostgreSQL's UU...
[ 11748, 33918, 201, 198, 11748, 334, 27112, 201, 198, 6738, 19720, 1330, 5994, 201, 198, 201, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 23575, 201, 198, 6738, 44161, 282, 26599, 1330, 40383, 201, 198, 6738, 44161, 282, 26599, 13, 1919...
2.711207
232
import os import time import json import googlemaps from aux.functions import (get_key, get_remaining_restults, get_place_details, print_output) from aux.locations_01 import SEARCH_LOCATIONS import aux.record as record dirname = os.path.dirname(__file__) rootdir = dirname[0:-12] key_path = f"{rootdir}.env" json_dataf...
[ 11748, 28686, 198, 11748, 640, 198, 11748, 33918, 198, 11748, 23645, 31803, 198, 6738, 27506, 13, 12543, 2733, 1330, 357, 1136, 62, 2539, 11, 651, 62, 2787, 1397, 62, 2118, 8376, 11, 651, 62, 5372, 62, 36604, 11, 3601, 62, 22915, 8, ...
2.619236
759
from typing import List, Optional import numpy from .mpmilp_program import MPMILP_Program from .mpqp_program import MPQP_Program from .solver import Solver class MPMIQP_Program(MPMILP_Program): r""" The standard class for multiparametric mixed integer quadratic programming. .. math:: \min \fra...
[ 6738, 19720, 1330, 7343, 11, 32233, 198, 198, 11748, 299, 32152, 198, 198, 6738, 764, 3149, 25433, 79, 62, 23065, 1330, 4904, 44, 4146, 47, 62, 15167, 198, 6738, 764, 3149, 80, 79, 62, 23065, 1330, 4904, 48, 47, 62, 15167, 198, 6738...
2.154014
1,831
import os,copy from collections import OrderedDict import numpy as np if False: T = 1000 task_directory = 'MgO_LC/MgO_NaCl_unit.npt.T1000' lammps_results = LammpsNptSimulationData( task_directory=task_directory) lammps_results.read_lattice_out() lammps_results.plot_lattice_data() sma...
[ 11748, 28686, 11, 30073, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 11748, 299, 32152, 355, 45941, 198, 361, 10352, 25, 198, 220, 220, 220, 309, 796, 8576, 198, 220, 220, 220, 4876, 62, 34945, 796, 705, 44, 70, 46, 62, 5639,...
2.182428
1,491
import time import logging from os import linesep from telnetlib import Telnet from threading import Thread from typing import List, Tuple, Dict from ._internals import Slot, Timeline from .timecode import parse_framerate class Hyperdeck: """Blackmagic Design Hyperdeck Control Interface Parameters --...
[ 11748, 640, 198, 11748, 18931, 198, 6738, 28686, 1330, 3951, 538, 198, 6738, 13632, 3262, 8019, 1330, 12088, 3262, 198, 6738, 4704, 278, 1330, 14122, 198, 6738, 19720, 1330, 7343, 11, 309, 29291, 11, 360, 713, 198, 198, 6738, 47540, 231...
2.360737
5,267
from a10sdk.common.A10BaseClass import A10BaseClass class Stats(A10BaseClass): """This class does not support CRUD Operations please use parent. :param ip_other_block_alloc: {"optional": true, "size": "8", "type": "number", "oid": "17", "format": "counter"} :param entry_match_drop: {"optional": true...
[ 6738, 257, 940, 21282, 74, 13, 11321, 13, 32, 940, 14881, 9487, 1330, 317, 940, 14881, 9487, 628, 198, 4871, 20595, 7, 32, 940, 14881, 9487, 2599, 198, 220, 220, 220, 220, 198, 220, 220, 220, 37227, 1212, 1398, 857, 407, 1104, 8740,...
2.759863
1,166
from rest_framework import status from rest_framework.decorators import api_view from rest_framework.response import Response import qleader.fci.fci_H2 as fci @api_view(["GET"])
[ 6738, 1334, 62, 30604, 1330, 3722, 198, 6738, 1334, 62, 30604, 13, 12501, 273, 2024, 1330, 40391, 62, 1177, 198, 6738, 1334, 62, 30604, 13, 26209, 1330, 18261, 198, 198, 11748, 10662, 27940, 13, 69, 979, 13, 69, 979, 62, 39, 17, 355...
3.175439
57
import tensorflow as tf m1 = tf.constant([[1., 2.]]) m2 = tf.constant([[1],[2]]) m3 = tf.constant([ [[1, 2],[3, 4],[5, 6]], [[7, 8],[9, 10],[11, 12]] ]) print(m1) print(m2) print(m3)
[ 11748, 11192, 273, 11125, 355, 48700, 201, 198, 201, 198, 76, 16, 796, 48700, 13, 9979, 415, 26933, 58, 16, 1539, 362, 8183, 12962, 201, 198, 201, 198, 76, 17, 796, 48700, 13, 9979, 415, 26933, 58, 16, 38430, 17, 11907, 8, 201, 19...
1.705426
129
""" This file contains django settings to run tests with runtests.py """ SECRET_KEY = 'fake-key' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'test', 'USER': 'test', 'PASSWORD': 'test', 'HOST': '127.0.0.1', 'PORT': '5432' ...
[ 37811, 198, 1212, 2393, 4909, 42625, 14208, 6460, 284, 1057, 5254, 351, 1057, 41989, 13, 9078, 198, 37811, 198, 23683, 26087, 62, 20373, 796, 705, 30706, 12, 2539, 6, 198, 198, 35, 1404, 6242, 1921, 1546, 796, 1391, 198, 220, 220, 220...
1.863057
314
# Copyright 2020 kubeflow.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 applicable law or agreed to in writing...
[ 2, 15069, 12131, 479, 549, 891, 9319, 13, 2398, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198...
2.992819
557
# Nothing of use to be seen here! import numpy as np import networkx as nx import matplotlib.pyplot as plt from .value import Value # Generate toy 2D data of a donut inside another donut # Visualize the contour plot of the neural net's predictions
[ 2, 10528, 286, 779, 284, 307, 1775, 994, 0, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 3127, 87, 355, 299, 87, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 764, 8367, 1330, 11052, 628, 198, 2, ...
3.486111
72
import os from collections import namedtuple from configparser import ConfigParser JikkenConfig = namedtuple("JikkenConfig", ['db_path', 'db_type', 'db_name']) JikkenConfig.__new__.__defaults__ = ("~/.jikken/jikken_db", "tiny", "jikken") DEFAULT_FILE = \ """ [db] path = ~/.jikken/jikken_db/ type = tin...
[ 11748, 28686, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 6738, 4566, 48610, 1330, 17056, 46677, 198, 198, 41, 1134, 3464, 16934, 796, 3706, 83, 29291, 7203, 41, 1134, 3464, 16934, 1600, 37250, 9945, 62, 6978, 3256, 705, 9945, 62, 490...
2.4125
160
import os import re from pathlib import Path import pytest from PIL import Image from selenium.webdriver.remote.webelement import WebElement from eye.comparator import Comparator from eye.WebElementHandler import WebElementHandler @pytest.fixture
[ 11748, 28686, 198, 11748, 302, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 11748, 12972, 9288, 198, 6738, 350, 4146, 1330, 7412, 198, 6738, 384, 11925, 1505, 13, 12384, 26230, 13, 47960, 13, 732, 1350, 1732, 1330, 5313, 20180, 198, 19...
3.56338
71
"""Following example works with Python Client""" from mapr.ojai.ojai_query.QueryOp import QueryOp from mapr.ojai.storage.ConnectionFactory import ConnectionFactory """Create a connection, get store, insert new document into store""" # create a connection connection_string = "localhost:5678?auth=basic;user=mapr;passwor...
[ 37811, 14291, 1672, 2499, 351, 11361, 20985, 37811, 198, 6738, 3975, 81, 13, 13210, 1872, 13, 13210, 1872, 62, 22766, 13, 20746, 18257, 1330, 43301, 18257, 198, 6738, 3975, 81, 13, 13210, 1872, 13, 35350, 13, 32048, 22810, 1330, 26923, ...
2.769231
507
''' Created on Sep 10, 2013 @author: Xuebin Wei weixuebin@gmail.com Dept of GGY, UGA Construct the network ''' import Graphy import arcpy #import pickle import cPickle as pickle import sys import traceback EdgeLayer = arcpy.GetParameterAsText(0) EdgeWeight = arcpy.GetParameterAsText(1) Nature = arcpy.GetParameter...
[ 7061, 6, 198, 41972, 319, 8621, 838, 11, 2211, 198, 31, 9800, 25, 47298, 8800, 29341, 198, 732, 844, 518, 8800, 31, 14816, 13, 785, 198, 5005, 457, 286, 402, 31212, 11, 471, 9273, 198, 198, 42316, 262, 3127, 220, 198, 198, 7061, 6...
2.668486
733
import pandas as pd import numpy as np import matplotlib.pyplot as plt from pyod.models.abod import ABOD from pyod.models.cblof import CBLOF from pyod.models.feature_bagging import FeatureBagging from pyod.models.hbos import HBOS from pyod.models.iforest import IForest from pyod.models.knn import KNN from pyod.models.l...
[ 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 6738, 12972, 375, 13, 27530, 13, 397, 375, 1330, 9564, 3727, 198, 6738, 12972, 375, 13, 27530, 13,...
2.371868
1,756
import logging import structlog from django.http import HttpRequest, HttpResponse structlog_logger: structlog.stdlib.BoundLogger = structlog.getLogger('app').bind() logging_logger: logging.Logger = logging.getLogger('app') MODE_TO_LOGGER = { 'structlog': structlog_logger, 'stdlib': logging_logger, }
[ 11748, 18931, 198, 198, 11748, 2878, 6404, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 18453, 11, 367, 29281, 31077, 198, 198, 7249, 6404, 62, 6404, 1362, 25, 2878, 6404, 13, 19282, 8019, 13, 49646, 11187, 1362, 796, 2878, 6404...
2.845455
110
''' Created on Oct 22, 2016 @author: dj ''' if __name__ == '__main__': main()
[ 7061, 6, 201, 198, 41972, 319, 2556, 2534, 11, 1584, 201, 198, 201, 198, 31, 9800, 25, 42625, 201, 198, 7061, 6, 201, 198, 201, 198, 201, 198, 201, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 201, 198, 220, 220,...
1.959184
49
import click import glob import numpy as np import os import pathlib import sys import tifffile as tiff import torch from rich import traceback, print from rts_package.models.unet import U2NET from torchvision.datasets.utils import download_url from urllib.error import URLError WD = os.path.dirname(__file__) @click....
[ 11748, 3904, 198, 11748, 15095, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 3108, 8019, 198, 11748, 25064, 198, 11748, 256, 361, 487, 576, 355, 256, 733, 198, 11748, 28034, 198, 6738, 5527, 1330, 12854, 1891, 11, ...
2.374142
1,748
import json import os import sys import tarfile from metaflow.environment import MetaflowEnvironment from metaflow.exception import MetaflowException from .conda import Conda from . import get_conda_manifest_path, CONDA_MAGIC_FILE
[ 11748, 33918, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 13422, 7753, 198, 198, 6738, 1138, 1878, 9319, 13, 38986, 1330, 3395, 1878, 9319, 31441, 198, 6738, 1138, 1878, 9319, 13, 1069, 4516, 1330, 3395, 1878, 9319, 16922, 198, 6738...
3.391304
69
# Generated by Django 3.0.4 on 2021-04-05 12:25 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import uuid
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 19, 319, 33448, 12, 3023, 12, 2713, 1105, 25, 1495, 198, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 198, 11748, 42625, 14...
3.017857
56
# Copyright 2017 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 required by applicable law or ...
[ 2, 15069, 2177, 3012, 11, 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, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 137...
3.802263
1,679
import unittest from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from sqlalchemy.engine import Engine from enjoliver.db import session_commit from enjoliver.model import Base, Machine, MachineInterface, Schedule, ScheduleRoles from enjoliver.repositories.machine_discovery import MachineDis...
[ 11748, 555, 715, 395, 198, 198, 6738, 44161, 282, 26599, 1330, 2251, 62, 18392, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 6246, 10297, 198, 6738, 44161, 282, 26599, 13, 18392, 1330, 7117, 198, 198, 6738, 551, 73, 349, 1428, 13, 994...
3.719008
121
from django.test import TestCase from . models import Post # Create your tests here.
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 764, 4981, 1330, 2947, 198, 198, 2, 13610, 534, 5254, 994, 13 ]
3.863636
22
"""Unicode Properties (autogen).""" from __future__ import unicode_literals unicode_east_asian_width = { "^a": "\u0000-\u00a0\u00a2-\u00a3\u00a5-\u00a6\u00a9\u00ab-\u00ac\u00af\u00b5\u00bb\u00c0-\u00c5\u00c7-\u00cf\u00d1-\u00d6\u00d9-\u00dd\u00e2-\u00e5\u00e7\u00eb\u00ee-\u00ef\u00f1\u00f4-\u00f6\u00fb\u00fd\u00ff...
[ 37811, 3118, 291, 1098, 24946, 357, 2306, 6644, 21387, 15931, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 198, 46903, 1098, 62, 23316, 62, 292, 666, 62, 10394, 796, 1391, 198, 220, 220, 220, 366, 61, 64, 1298...
1.444226
7,136
#!/usr/bin/env python """ MultiQC Multi Genome Alignment module """ import locale import logging import operator import os from collections import OrderedDict from functools import cmp_to_key from lxml import objectify, etree from natsort import natsorted from types import SimpleNamespace from multiqc import config...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 15237, 48, 34, 15237, 5215, 462, 978, 16747, 8265, 37227, 198, 198, 11748, 36693, 198, 11748, 18931, 198, 11748, 10088, 198, 11748, 28686, 198, 198, 6738, 17268, 1330, 14230, ...
2.238379
16,285
# Calculate a Suite of Bitcoin Specific Metrics #Data Science import pandas as pd import numpy as np import math import datetime as date today = date.datetime.now().strftime('%Y-%m-%d') from checkonchain.general.coinmetrics_api import * #Coinmetrics.io from checkonchain.general.regression_analysis import * from checko...
[ 2, 27131, 378, 257, 26264, 286, 6185, 17377, 3395, 10466, 198, 2, 6601, 5800, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 10688, 198, 11748, 4818, 8079, 355, 3128, 198, 40838, 796, 3128, 13, 1...
3.20354
113
#%% import os import numpy as np import pandas as pd DATAFOLDER = "prm-datasets/indicators/" SP = "Displacement/FDP2008a.csv" df = pd.read_csv(os.path.join(DATAFOLDER, SP), sep=";") # fix ISO code / name df['scode'].replace("MYA", "MMR", inplace=True) df['country'].replace("Myanmar (Burma)", "Myanmar", inplace=Tru...
[ 198, 2, 16626, 220, 198, 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 35, 1404, 8579, 3535, 14418, 796, 366, 1050, 76, 12, 19608, 292, 1039, 14, 521, 44549, 30487, 198, 4303, 796, ...
2.296552
290
import ctools.Driver as Driver import pdb Driver.initSystem("Solvated Micelle") Driver.loadTopology("complex.top") Driver.loadStructure("complex.gro") Driver.writeStructure("complex_out.gro") Driver.write_topology("complex_out.top")
[ 11748, 269, 31391, 13, 32103, 355, 12434, 198, 11748, 279, 9945, 198, 32103, 13, 15003, 11964, 7203, 36949, 85, 515, 7631, 13485, 4943, 198, 198, 32103, 13, 2220, 9126, 1435, 7203, 41887, 13, 4852, 4943, 198, 32103, 13, 2220, 1273, 5620...
3.118421
76
from django.core.management.base import BaseCommand from django.test.client import Client import os, sys, re import requests from django.conf import settings # pylint: disable=E1103 # Instance of 'WSGIRequest' has no 'status_code' member # (but some types could not be inferred) (maybe-no-member)
[ 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 198, 6738, 42625, 14208, 13, 9288, 13, 16366, 1330, 20985, 198, 11748, 28686, 11, 25064, 11, 302, 198, 11748, 7007, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 19...
3.359551
89
""" OpenVINO DL Workbench Class for ORM dataset wait job Copyright (c) 2020 Intel Corporation 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 ...
[ 37811, 198, 4946, 53, 46016, 23641, 5521, 26968, 198, 5016, 329, 6375, 44, 27039, 4043, 1693, 628, 15069, 357, 66, 8, 12131, 8180, 10501, 628, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 3...
3.916667
228
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
from braces.views import UserFormKwargsMixin from xhtml2pdf import pisa from django.urls import reverse from django.utils.translation import ugettext_lazy as _ from django.views.generic.base import TemplateResponseMixin from django.http import HttpResponse from django.template.loader import get_template from .models ...
[ 6738, 47241, 13, 33571, 1330, 11787, 8479, 42, 86, 22046, 35608, 259, 198, 6738, 2124, 6494, 17, 12315, 1330, 279, 9160, 198, 6738, 42625, 14208, 13, 6371, 82, 1330, 9575, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 334, 1136, ...
2.587566
1,142
from unittest import TestCase __author__ = 'cenk'
[ 6738, 555, 715, 395, 1330, 6208, 20448, 198, 198, 834, 9800, 834, 796, 705, 66, 268, 74, 6, 628 ]
2.736842
19
from util.config import Config from dataProcess import dataProcess import time if __name__ == '__main__': conf = Config('./config/GCNCMI.conf') print(1) s=time.time() for i in range(0, 5): recSys = dataProcess(conf, i) recSys.execute(i) e = time.time() print("Run t...
[ 6738, 7736, 13, 11250, 1330, 17056, 198, 6738, 1366, 18709, 1330, 1366, 18709, 198, 11748, 640, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 628, 220, 220, 220, 1013, 796, 220, 17056, 7, 4458, 14, 11250, 14, 159...
2.16185
173
# The MIT License (MIT) # Copyright (c) [2015] [Houtmann Hadrien] # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the Aidez-moi), to deal # in the Software without restriction, including without limitation the rights # to use, copy, m...
[ 2, 383, 17168, 13789, 357, 36393, 8, 198, 2, 15069, 357, 66, 8, 685, 4626, 60, 685, 39, 448, 9038, 11161, 15355, 60, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 16727, 257, 4866, 198, 2, 286, 4...
3.563063
444