content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
# -*- coding: utf-8 -*- # Generated by Django 1.9.6 on 2016-06-07 13:30 from __future__ import unicode_literals from django.db import migrations
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 24, 13, 21, 319, 1584, 12, 3312, 12, 2998, 1511, 25, 1270, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, 1...
2.672727
55
""" Extract as-run river time series. To test on mac: run extract_rivers -gtx cas6_v3_lo8b -0 2019.07.04 -1 2019.07.04 To run on perigee: run extract_rivers -gtx cas6_v3_lo8b -0 2018.01.01 -1 2018.01.10 run extract_rivers -gtx cas6_v3_lo8b -0 2018.01.01 -1 2018.12.31 Performance: takes 23 sec per year on perigee M...
[ 37811, 198, 198, 11627, 974, 355, 12, 5143, 7850, 640, 2168, 13, 198, 198, 2514, 1332, 319, 8352, 25, 198, 5143, 7925, 62, 380, 690, 532, 13655, 87, 6124, 21, 62, 85, 18, 62, 5439, 23, 65, 532, 15, 13130, 13, 2998, 13, 3023, 532...
2.305712
1,593
# Generated by Django 3.0.7 on 2020-11-07 16:58 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 22, 319, 12131, 12, 1157, 12, 2998, 1467, 25, 3365, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
from __future__ import absolute_import import math import operator from collections import OrderedDict from functools import reduce from typing import Union, Sequence, Optional import torch from laia.data import PaddedTensor from laia.nn.pyramid_maxpool_2d import PyramidMaxPool2d from laia.nn.temporal_pyramid_maxpoo...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 11748, 10688, 198, 11748, 10088, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 6738, 1257, 310, 10141, 1330, 4646, 198, 6738, 19720, 1330, 4479, 11, 45835, 11, 32233, 198, 1...
2.577287
317
import pyglet from pyglet.gl import * from robocute.node import * from robocute.vu import * from robocute.shape import Rect
[ 11748, 12972, 70, 1616, 201, 198, 6738, 12972, 70, 1616, 13, 4743, 1330, 1635, 201, 198, 201, 198, 6738, 3857, 420, 1133, 13, 17440, 1330, 1635, 201, 198, 6738, 3857, 420, 1133, 13, 40939, 1330, 1635, 201, 198, 6738, 3857, 420, 1133, ...
2.765957
47
# Copyright 2014 Google Inc. All Rights Reserved. """Commands for reading and manipulating HTTP health checks.""" from googlecloudsdk.calliope import base HttpHealthChecks.detailed_help = { 'brief': ('Read and manipulate HTTP health checks for load balanced ' 'instances') }
[ 2, 15069, 1946, 3012, 3457, 13, 1439, 6923, 33876, 13, 198, 37811, 6935, 1746, 329, 3555, 290, 29349, 14626, 1535, 8794, 526, 15931, 198, 198, 6738, 23645, 17721, 21282, 74, 13, 13345, 72, 3008, 1330, 2779, 628, 198, 198, 43481, 18081, ...
3.3
90
##!/usr/bin/python # # ============================================================================ # # 06.02.18 <-- Date of Last Modification. # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ---------------------------------------------------------------------------- # # BASIC TASK WRAPPER # # Command-line...
[ 2235, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 2, 198, 2, 38093, 2559, 18604, 198, 2, 198, 2, 220, 220, 220, 9130, 13, 2999, 13, 1507, 220, 220, 1279, 438, 220, 7536, 286, 4586, 3401, 2649, 13, 198, 2, 220, 220, 220, 220, 22...
2.670796
565
from .wideresnet import * from .wideresnet_lk import * WRN_MODELS = { 'WideResNet':WideResNet, 'WideResNet_Lk': WideResNet_Lk, }
[ 6738, 764, 4421, 411, 3262, 1330, 1635, 198, 6738, 764, 4421, 411, 3262, 62, 75, 74, 1330, 1635, 198, 198, 18564, 45, 62, 33365, 37142, 796, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 705, 42559, 4965, 7934, 10354, 42559, 4965, 7...
2
77
# This script is based on moltres/python/extractSerpent2GCs.py import os import numpy as np import argparse import subprocess import serpentTools as sT def makePropertiesDir( outdir, filebase, mapFile, unimapFile, serp1=False, fromMain=False): """ Takes in a mapping...
[ 2, 770, 4226, 318, 1912, 319, 285, 5978, 411, 14, 29412, 14, 2302, 974, 7089, 16923, 17, 15916, 82, 13, 9078, 198, 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 1822, 29572, 198, 11748, 850, 14681, 198, 11748, 33727, 3...
1.938095
4,620
import os from . import utils import numpy as np from scipy.stats import scoreatpercentile from scipy.optimize import curve_fit from scipy import exp import operator from copy import copy, deepcopy from collections import defaultdict, Counter import re from pyteomics import parser, mass, fasta, auxiliary as aux, achrom...
[ 11748, 28686, 198, 6738, 764, 1330, 3384, 4487, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 629, 541, 88, 13, 34242, 1330, 4776, 265, 25067, 576, 198, 6738, 629, 541, 88, 13, 40085, 1096, 1330, 12133, 62, 11147, 198, 6738, 629, 541...
3.230999
671
from django.conf.urls import url from django.views.generic import TemplateView from . import views urlpatterns = [ url(r"^list_signup/$", views.list_signup, name="waitinglist_list_signup"), url(r"^ajax_list_signup/$", views.ajax_list_signup, name="waitinglist_ajax_list_signup"), url(r"^survey/thanks/$", ...
[ 6738, 42625, 14208, 13, 10414, 13, 6371, 82, 1330, 19016, 198, 6738, 42625, 14208, 13, 33571, 13, 41357, 1330, 37350, 7680, 198, 198, 6738, 764, 1330, 5009, 628, 198, 6371, 33279, 82, 796, 685, 198, 220, 220, 220, 19016, 7, 81, 1, 6...
2.475225
444
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from pathlib import Path from nokogiri.which_env import which_env from pickle import Unpickler
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 299, 482, 519, 14783, 13, 4758, 62, 24330, 1330, 543, 62, 24330, 198, 6...
2.764706
51
# tests.test_contrib.test_prepredict # Test the prepredict estimator. # # Author: Benjamin Bengfort <benjamin@bengfort.com> # Created: Mon Jul 12 07:07:33 2021 -0400 # # ID: test_prepredict.py [] benjamin@bengfort.com $ """ Test the prepredict estimator. """ ##########################################################...
[ 2, 5254, 13, 9288, 62, 3642, 822, 13, 9288, 62, 46012, 17407, 198, 2, 6208, 262, 3143, 17407, 3959, 1352, 13, 198, 2, 198, 2, 6434, 25, 220, 14533, 14964, 3319, 1279, 11722, 13337, 31, 65, 1516, 3319, 13, 785, 29, 198, 2, 15622, ...
4.33123
317
# input and print, with format strings s = input("What's your name?\n") print(f"hello, {s}")
[ 2, 5128, 290, 3601, 11, 351, 5794, 13042, 198, 198, 82, 796, 5128, 7203, 2061, 338, 534, 1438, 30, 59, 77, 4943, 198, 4798, 7, 69, 1, 31373, 11, 1391, 82, 92, 4943, 198 ]
2.764706
34
import os, sys import numpy as np import matplotlib.pyplot as plt # Export library path rootname = "mesoscopic-functional-connectivity" thispath = os.path.dirname(os.path.abspath(__file__)) rootpath = os.path.join(thispath[:thispath.index(rootname)], rootname) print("Appending project path", rootpath) sys.path.append(...
[ 11748, 28686, 11, 25064, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 2, 36472, 5888, 3108, 198, 15763, 3672, 796, 366, 6880, 48228, 12, 45124, 12, 8443, 3458, 1, 198, 566...
2.521205
896
''' A Gameplay Mechanic [TS4] By CozyGnomes (https://cozygnomes.tumblr.com/) This is an existing document that contains several things you can do in your gameplay on TS4. This program comes with the intention of automatically generating the related phrase without having to sear...
[ 7061, 6, 198, 220, 220, 220, 220, 220, 220, 220, 317, 3776, 1759, 13438, 291, 685, 4694, 19, 60, 198, 220, 220, 220, 220, 220, 220, 220, 2750, 1766, 7357, 38, 77, 2586, 357, 5450, 1378, 1073, 7357, 4593, 2586, 13, 45364, 13, 785, ...
2.912281
171
display(3,4) display(a=3,b=4) display(b=4,a=3)
[ 201, 198, 13812, 7, 18, 11, 19, 8, 201, 198, 13812, 7, 64, 28, 18, 11, 65, 28, 19, 8, 201, 198, 13812, 7, 65, 28, 19, 11, 64, 28, 18, 8 ]
1.5625
32
# %% from collections import OrderedDict import dataloaders.base from dataloaders.datasetGen import SplitGen, PermutedGen train_dataset, val_dataset = dataloaders.base.__dict__["CIFAR10"]('data', False) # %% print(train_dataset) # %% train_dataset_splits, val_dataset_splits, task_output_space = SplitGen(train_data...
[ 2, 43313, 198, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 11748, 4818, 282, 1170, 364, 13, 8692, 198, 6738, 4818, 282, 1170, 364, 13, 19608, 292, 316, 13746, 1330, 27758, 13746, 11, 2448, 76, 7241, 13746, 628, 198, 27432, 62, ...
1.59309
521
import sys import pyfits import numpy as np from PySpectrograph import Spectrum from PySpectrograph.Utilities.fit import interfit import pylab as pl def ncor(x, y): """Calculate the normalized correlation of two arrays""" d=np.correlate(x,x)*np.correlate(y,y) if d<=0: return 0 return np.correlate(x,y)...
[ 11748, 25064, 198, 11748, 12972, 21013, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 9485, 49738, 3828, 1470, 1330, 27217, 198, 6738, 9485, 49738, 3828, 1470, 13, 18274, 2410, 13, 11147, 1330, 9556, 270, 198, 198, 11748, 279, 2645, 397,...
2.010701
1,869
################################################################################ # This is the main file for preprocessing smartphone sensor data # # # # Contributors: Anna Hakala & Ana Triana ...
[ 29113, 29113, 14468, 198, 2, 770, 318, 262, 1388, 2393, 329, 662, 36948, 11745, 12694, 1366, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 1303, 198, 2, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220...
2.561983
24,563
# imports import visa import numpy as np import os import csv import time import datetime import tkinter as tk from tkinter.filedialog import askopenfilename, askdirectory from tkinter.ttk import Frame, Button, Style,Treeview, Scrollbar, Checkbutton from functools import partial import serial # This app uses an arduino...
[ 2, 17944, 198, 11748, 14552, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28686, 198, 11748, 269, 21370, 198, 11748, 640, 198, 11748, 4818, 8079, 198, 11748, 256, 74, 3849, 355, 256, 74, 198, 6738, 256, 74, 3849, 13, 69, 3902, 498,...
3.417808
146
#-*- coding:utf-8 -*- __author__ = "ChenJun" import theano import theano.tensor as T import numpy as np import cPickle as pickle from theano_models.qa_cnn import CNNModule from theano_models.layers import InteractLayer, MLP, MLPDropout, BatchNormLayer from theano_models.optimizer import Optimizer from data_process.load...
[ 2, 12, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 834, 9800, 834, 796, 366, 34, 831, 22396, 1, 198, 11748, 262, 5733, 198, 11748, 262, 5733, 13, 83, 22854, 355, 309, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 269, 31...
2.109972
5,265
# Rest Server from flask import Flask, jsonify, abort, request # Eureka client from eureka.client import EurekaClient # Background tasks import threading import atexit import logging import socket import netifaces as ni import sys import os import time # Plotter libs from io import BytesIO import pymongo from pymongo ...
[ 2, 8324, 9652, 198, 6738, 42903, 1330, 46947, 11, 33918, 1958, 11, 15614, 11, 2581, 198, 2, 412, 495, 4914, 5456, 198, 6738, 304, 495, 4914, 13, 16366, 1330, 412, 495, 4914, 11792, 198, 2, 25353, 8861, 198, 11748, 4704, 278, 198, 11...
2.818372
479
#Example for Jon Smirl on 28 Dec 1999, originally by Steve Muench, with improvements by Mike Brown and Jeremy Richman from Xml.Xslt import test_harness sheet_1 = """<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="/"> <html> <head/> <body> <xsl:apply-template...
[ 2, 16281, 329, 5966, 2439, 1901, 319, 2579, 4280, 7358, 11, 6198, 416, 6542, 8252, 24421, 11, 351, 8561, 416, 4995, 4373, 290, 11753, 3998, 805, 198, 198, 6738, 1395, 4029, 13, 55, 82, 2528, 1330, 1332, 62, 9869, 1108, 198, 198, 217...
2.381313
1,188
import tldextract from django.db.models import Q from docutils import nodes from docutils.transforms import Transform from django_docutils.favicon.models import get_favicon_model from ..nodes import icon Favicon = get_favicon_model() def resolve_favicon(url): """Given a URL to a website, see if a Favicon exist...
[ 11748, 256, 335, 2302, 974, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 1330, 1195, 198, 6738, 2205, 26791, 1330, 13760, 198, 6738, 2205, 26791, 13, 7645, 23914, 1330, 26981, 198, 198, 6738, 42625, 14208, 62, 15390, 26791, 13, 69, 615...
2.714815
540
import dynet as dy import os from xnmt.serializer import Serializable
[ 11748, 37860, 316, 355, 20268, 198, 11748, 28686, 198, 6738, 2124, 77, 16762, 13, 46911, 7509, 1330, 23283, 13821, 198 ]
3.5
20
import csv from django.http import HttpResponse, HttpResponseForbidden from django.template.defaultfilters import slugify from django.db.models.loading import get_model def admin_list_export(request, model_name, app_label, queryset=None, fields=None, list_display=True): """ Put the following line in your urls....
[ 11748, 269, 21370, 198, 6738, 42625, 14208, 13, 4023, 1330, 367, 29281, 31077, 11, 367, 29281, 31077, 1890, 37978, 198, 6738, 42625, 14208, 13, 28243, 13, 12286, 10379, 1010, 1330, 31065, 1958, 198, 6738, 42625, 14208, 13, 9945, 13, 27530...
2.436047
860
# -*- coding: utf-8 -*- # Author: Massimo Menichinelli # Homepage: http://www.openp2pdesign.org # License: MIT # import wx import serial #A new custom class that extends the wx.Frame #Main program if __name__ == '__main__': # Connect to serial port first try: arduino = serial.Serial('/dev/tty.usbmod...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 6434, 25, 5674, 25147, 6065, 488, 44076, 198, 2, 5995, 7700, 25, 2638, 1378, 2503, 13, 9654, 79, 17, 79, 26124, 13, 2398, 198, 2, 13789, 25, 17168, 198, 2, 198, ...
2.53125
224
# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import annotations from textwrap import dedent from typing import Any, ContextManager import pytest from pants.backend.docker.subsystems.dockerfile_parser import rules a...
[ 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, 198, 6738, 11593, 37443, 834, 1330, 37647, 198, ...
3.596806
501
from .test_ai_model import TestAiModelExtension
[ 6738, 764, 9288, 62, 1872, 62, 19849, 1330, 6208, 32, 72, 17633, 11627, 3004, 198 ]
3.2
15
#!/usr/bin/env python3 import logging from pathlib import Path import json from datetime import datetime, timedelta from typing import Set, Sequence, Any, Iterator from dataclasses import dataclass from .exporthelpers.dal_helper import PathIsh, Json, Res, datetime_naive from .exporthelpers.logging_helper import LazyLo...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 11748, 18931, 198, 6738, 3108, 8019, 1330, 10644, 198, 11748, 33918, 198, 6738, 4818, 8079, 1330, 4818, 8079, 11, 28805, 12514, 198, 6738, 19720, 1330, 5345, 11, 45835, 11, 4377, 11,...
2.910053
189
import FWCore.ParameterSet.Config as cms from MuonAnalysis.MuonAssociators.muonL1Match_cfi import * muonHLTL1Match = cms.EDProducer("HLTL1MuonMatcher", muonL1MatcherParameters, # Reconstructed muons src = cms.InputTag("muons"), # L1 Muon collection, and preselection on that collection ...
[ 11748, 48849, 14055, 13, 36301, 7248, 13, 16934, 355, 269, 907, 201, 198, 201, 198, 6738, 8252, 261, 32750, 13, 33239, 261, 8021, 1733, 2024, 13, 30300, 261, 43, 16, 23850, 62, 66, 12463, 1330, 1635, 201, 198, 201, 198, 30300, 261, ...
2.558648
503
lista = list() while True: lista.append(int(input("Digite um nmero inteiro:\t"))) while True: p = str(input("Digitar mais nmeros?\t").strip())[0].upper() if p in 'SN': break else: print("\033[31mDigite uma opo vlida!\033[m") if p == 'N': break par = li...
[ 4868, 64, 796, 1351, 3419, 198, 4514, 6407, 25, 198, 220, 220, 220, 1351, 64, 13, 33295, 7, 600, 7, 15414, 7203, 19511, 578, 23781, 299, 647, 78, 493, 68, 7058, 7479, 83, 1, 22305, 198, 220, 220, 220, 981, 6407, 25, 198, 220, 22...
1.928571
322
#! /usr/bin/env python # -*- coding: utf-8 -* import collections from census_data_downloader.core.tables import BaseTableConfig from census_data_downloader.core.decorators import register
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 198, 11748, 17268, 198, 6738, 21649, 62, 7890, 62, 15002, 263, 13, 7295, 13, 83, 2977, 1330, 7308, 10962, 16934, 198, 6738, ...
3.163934
61
# Copyright 2018 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
[ 2, 15069, 2864, 22783, 286, 3517, 9309, 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...
3.86747
166
import Crypto.Random from Crypto.Cipher import AES import hashlib import base64 SALT_SIZE = 16 AES_MULTIPLE = 16 NUMBER_OF_ITERATIONS = 20
[ 11748, 36579, 13, 29531, 198, 6738, 36579, 13, 34, 10803, 1330, 34329, 198, 11748, 12234, 8019, 198, 11748, 2779, 2414, 198, 198, 50, 31429, 62, 33489, 796, 1467, 198, 32, 1546, 62, 44, 16724, 4061, 2538, 796, 1467, 198, 41359, 13246, ...
2.8
50
from xml.etree import ElementTree from xml.dom import minidom def get_pretty_xml(tree): """Transforms and pretty-prints a given xml-tree to string :param tree: XML-tree :type tree: object :returns: (Prettified) stringified version of the passed xml-tree :rtype: str """ stringified_tree = ...
[ 6738, 35555, 13, 316, 631, 1330, 11703, 27660, 198, 6738, 35555, 13, 3438, 1330, 949, 312, 296, 628, 198, 4299, 651, 62, 37784, 62, 19875, 7, 21048, 2599, 198, 220, 220, 220, 37227, 8291, 23914, 290, 2495, 12, 17190, 257, 1813, 35555,...
2.75
168
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import sys import time import GetOldTweets3 as Got3 if sys.version_info[0] < 3: raise Exception("Python 2.x is not supported. Please upgrade to 3.x") sys.path.append(os.path.join(os.path.dirname(__file__), ".."))
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 640, 198, 11748, 3497, 19620, 32665, 1039, 18, 355, 11853, 18, 19...
2.554545
110
import extsum as ext URL = "https://i.picsum.photos/id/42/1/1.jpg" # Uncomment for random Picsum photo # URL = "https://picsum.photos/1/1" if __name__ == '__main__': # Init photo = ext.Load(URL) photo_parsed = ext.Parse(photo) # Print found ID (if any) id_found = photo_parsed.find_id() if id_...
[ 11748, 409, 912, 388, 355, 1070, 198, 198, 21886, 796, 366, 5450, 1378, 72, 13, 79, 873, 388, 13, 24729, 14, 312, 14, 3682, 14, 16, 14, 16, 13, 9479, 1, 198, 2, 791, 23893, 329, 4738, 350, 873, 388, 4590, 198, 2, 10289, 796, 3...
2.215789
190
import subprocess from .base import Base
[ 11748, 850, 14681, 198, 198, 6738, 764, 8692, 1330, 7308, 628 ]
3.909091
11
from Module import AbstractModule ## def plot_pca(filename, result_fig, opts='b', legend=None): ## import arrayio ## from genomicode import jmath, mplgraph ## from genomicode import filelib ## R = jmath.start_R() ## jmath.R_equals(filename, 'filename') ## M = arrayio.read(filename) ## lab...
[ 6738, 19937, 1330, 27741, 26796, 628, 198, 2235, 825, 7110, 62, 79, 6888, 7, 34345, 11, 1255, 62, 5647, 11, 2172, 82, 11639, 65, 3256, 8177, 28, 14202, 2599, 198, 2235, 220, 220, 220, 220, 1330, 7177, 952, 198, 2235, 220, 220, 220, ...
2.017007
588
from plots import plot_experiment_APs, plot_experiment_no_diff, experiment_VI_plots import os # paths, names, title, out_dir, out_name data_dir = '/Users/amcg0011/Data/pia-tracking/dl-results/210512_150843_seed_z-1_y-1_x-1_m_centg' suffix = 'seed_z-1_y-1_x-1_m_centg' out_dir = os.path.join(data_dir, 'DL-vs-Dog') ap_pat...
[ 6738, 21528, 1330, 7110, 62, 23100, 3681, 62, 2969, 82, 11, 7110, 62, 23100, 3681, 62, 3919, 62, 26069, 11, 6306, 62, 12861, 62, 489, 1747, 198, 11748, 28686, 198, 2, 13532, 11, 3891, 11, 3670, 11, 503, 62, 15908, 11, 503, 62, 367...
2.071698
530
""" Python Flight Mechanics Engine (PyFME). Copyright (c) AeroPython Development Team. Distributed under the terms of the MIT License. Velocity -------- The aircraft state has """ from abc import abstractmethod import numpy as np # TODO: think about generic changes from body to horizon that could be used for # vel...
[ 37811, 198, 37906, 13365, 47570, 7117, 357, 20519, 37, 11682, 737, 198, 15269, 357, 66, 8, 44720, 37906, 7712, 4816, 13, 198, 20344, 6169, 739, 262, 2846, 286, 262, 17168, 13789, 13, 198, 198, 46261, 11683, 198, 982, 198, 198, 464, 62...
3.985401
137
# test while statements while 0: 1 while 0: 2 else: 3
[ 2, 1332, 981, 6299, 198, 198, 4514, 657, 25, 198, 220, 220, 220, 352, 198, 198, 4514, 657, 25, 198, 220, 220, 220, 362, 198, 17772, 25, 198, 220, 220, 220, 513, 198 ]
2.060606
33
from minds.sections.newsfeed import NewsfeedAPI from minds.sections.channel import ChannelAPI from minds.sections.notifications import NotificationsAPI from minds.sections.posting import PostingAPI from minds.sections.interact import InteractAPI
[ 6738, 9017, 13, 23946, 13, 10827, 12363, 1330, 3000, 12363, 17614, 198, 6738, 9017, 13, 23946, 13, 17620, 1330, 11102, 17614, 198, 6738, 9017, 13, 23946, 13, 1662, 6637, 1330, 1892, 6637, 17614, 198, 6738, 9017, 13, 23946, 13, 7353, 278...
4.241379
58
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ AUTHOR - Antti Suni <antti.suni@helsinki.fi> - Sbastien Le Maguer <lemagues@tcd.ie> DESCRIPTION usage: cwt_global_spectrum.py [-h] [-v] [-o OUTPUT] [-P] input_file Tool for extracting global wavele...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 37811, 198, 32, 24318, 1581, 198, 220, 220, 220, 532, 3738, 20259, 3825, 72, 1279, 415, 20259, 13, 19155, 72, 31,...
2.468148
3,375
import sys import math import operator import re from os import listdir from os.path import isfile, join from PIL import Image IMAGE_WIDTH = 355 IMAGE_HEIGHT = 355 BORDER_DISCOUNT = 0.11 BLOCK_SIZE = 36 BLOCKS_SIZE = BLOCK_SIZE * BLOCK_SIZE X_BLOCK_SIZE = IMAGE_WIDTH / BLOCK_SIZE; Y_BLOCK_SIZE = IMAGE_HEIGHT / BLO...
[ 11748, 25064, 198, 11748, 10688, 198, 11748, 10088, 198, 11748, 302, 198, 198, 6738, 28686, 1330, 1351, 15908, 198, 6738, 28686, 13, 6978, 1330, 318, 7753, 11, 4654, 198, 6738, 350, 4146, 1330, 7412, 198, 198, 3955, 11879, 62, 54, 2389,...
2.247232
271
import tensorflow as tf from tensorflow.contrib import learn from betahex.features import Features from betahex.training.common import make_train_model, make_policy_input_fn, accuracy from betahex.models import MODEL tf.logging.set_verbosity(tf.logging.INFO) if __name__ == '__main__': tf.app.run()
[ 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 11192, 273, 11125, 13, 3642, 822, 1330, 2193, 198, 198, 6738, 12159, 33095, 13, 40890, 1330, 17571, 198, 6738, 12159, 33095, 13, 34409, 13, 11321, 1330, 787, 62, 27432, 62, 19849, 11, 787...
3.029412
102
# -*- coding: utf-8 -*- """ BSD 3-Clause License Copyright 2021 National Technology & Engineering Solutions of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government retains certain rights in this software. Redistribution and use in source and binary forms, with or without...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 21800, 513, 12, 2601, 682, 13789, 201, 198, 201, 198, 15269, 33448, 2351, 8987, 1222, 14044, 23555, 286, 3837, 544, 11, 11419, 357, 11251, 7597, 73...
3.346035
2,913
import math import numpy as np import pykokkos as pk #@pk.workunit #def CellSum # for i in range(num_parts) #@profile def Advance(p_pos_x, p_pos_y, p_pos_z, p_mesh_cell, dx, p_dir_y, p_dir_z, p_dir_x, p_speed, p_time, num_part, mesh_total_xsec, mesh_dist_traveled, mesh_dist_traveled_squared, L)...
[ 11748, 10688, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 12972, 32004, 46150, 355, 279, 74, 628, 628, 198, 2, 31, 79, 74, 13, 1818, 20850, 198, 2, 4299, 12440, 13065, 198, 2, 220, 220, 220, 329, 1312, 287, 2837, 7, 22510, 62, ...
1.857701
1,792
from django.conf import settings from ..defaults import AUTHENTICATORS from ..utils import get_module authenticators = [] all_args = []
[ 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 11485, 12286, 82, 1330, 37195, 3525, 2149, 1404, 20673, 198, 6738, 11485, 26791, 1330, 651, 62, 21412, 198, 198, 41299, 44549, 796, 17635, 198, 439, 62, 22046, 796, 17635, 628 ]
3.538462
39
import face_recognition as fr def compare_faces(file1, file2): """ Compare two images and return True / False for matching. """ # Load the jpg files into numpy arrays image1 = fr.load_image_file(file1) image2 = fr.load_image_file(file2) # Get the face encodings for each face in each im...
[ 11748, 1986, 62, 26243, 653, 355, 1216, 198, 198, 4299, 8996, 62, 32186, 7, 7753, 16, 11, 2393, 17, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 27814, 734, 4263, 290, 1441, 6407, 1220, 10352, 329, 12336, 13, 198, 220, 220, ...
2.546485
441
import numpy as np import pandas as pd import pyproj as pyproj import shapely as shapely from shapely.geometry import Point from haversine import haversine import src.config.column_names as col_names # Finds nearest zipcode geolocation to the crime location, then adds this zipcode to the crime dataset
[ 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 11748, 12972, 1676, 73, 355, 12972, 1676, 73, 198, 11748, 5485, 306, 355, 5485, 306, 198, 6738, 5485, 306, 13, 469, 15748, 1330, 6252, 198, 6738, 387, 690, 500,...
3.511364
88
increment(3,4,5,6) print(dance(1,2,3,4,5,6))
[ 198, 24988, 434, 7, 18, 11, 19, 11, 20, 11, 21, 8, 198, 4798, 7, 67, 590, 7, 16, 11, 17, 11, 18, 11, 19, 11, 20, 11, 21, 4008, 628, 628 ]
1.53125
32
from flask_restful import Resource from flask_restful import reqparse from sqlalchemy.exc import SQLAlchemyError from config import Configuration from models.tag import TagModel as TM
[ 6738, 42903, 62, 2118, 913, 1330, 20857, 198, 6738, 42903, 62, 2118, 913, 1330, 43089, 29572, 198, 198, 6738, 44161, 282, 26599, 13, 41194, 1330, 16363, 2348, 26599, 12331, 198, 198, 6738, 4566, 1330, 28373, 198, 198, 6738, 4981, 13, 12...
3.9375
48
# Generated by Django 3.0.7 on 2020-06-06 16:06 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 22, 319, 12131, 12, 3312, 12, 3312, 1467, 25, 3312, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
""" Manager,text-in text-out agent """ import os import sys import time import argparse import logging BASE_DIR = os.path.dirname(os.path.abspath(__file__)) sys.path.append(os.path.join(BASE_DIR, '../..')) os.environ["CUDA_VISIBLE_DEVICES"]="1" from DM.DST.StateTracking import DialogStateTracker from DM.policy.RuleM...
[ 37811, 198, 9142, 11, 5239, 12, 259, 2420, 12, 448, 5797, 220, 198, 37811, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 640, 198, 11748, 1822, 29572, 198, 11748, 18931, 198, 33, 11159, 62, 34720, 796, 28686, 13, 6978, 13, 15908, ...
2.125915
683
# -*- coding: utf-8 -*- from __future__ import print_function """ CLUs Custom exception classes live here """ __all__ = ('BadDotpathWarning', 'CDBError', 'ConfigurationError', 'ExecutionError', 'FilesystemError', 'ExportError', 'ExportWarning', 'KeyValueError', ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 3601, 62, 8818, 198, 198, 37811, 7852, 5842, 8562, 6631, 6097, 2107, 994, 37227, 198, 198, 834, 439, 834, 796, 19203, 22069, 35, 313, 6978...
2.281768
181
from setuptools import find_packages, setup setup( name='src', packages=find_packages(), version='0.1.0', description='Prediction of likely occurance of Vehicle Accident', author='sea karki', license='', )
[ 6738, 900, 37623, 10141, 1330, 1064, 62, 43789, 11, 9058, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 10677, 3256, 198, 220, 220, 220, 10392, 28, 19796, 62, 43789, 22784, 198, 220, 220, 220, 2196, 11639, 15, 13, 16, 13, 15,...
2.817073
82
#!/usr/bin/env python import sys, time, os sys.path.append('../src') import numpy as np import matplotlib.pylab as plt import hla from hla import caget, caput if __name__ == "__main__": #filter_orm('../test/dat/orm-full-0179.pkl') #filter_orm('../test/dat/orm-full-0181.pkl') #filter_orm...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 25064, 11, 640, 11, 28686, 198, 17597, 13, 6978, 13, 33295, 10786, 40720, 10677, 11537, 198, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2603, 29487, 8019, 13, 79, 2645, ...
2.069588
388
import numpy as np import cv2 #sample function - dummy callback function #capture live video cap = cv2.VideoCapture(0) #window for trackbars cv2.namedWindow('Track') #defining trackbars to control HSV values of given video stream cv2.createTrackbar('L_HUE', 'Track', 0, 255, nothing) cv2.createTrackbar('L...
[ 11748, 299, 32152, 355, 45941, 201, 198, 11748, 269, 85, 17, 201, 198, 201, 198, 2, 39873, 2163, 532, 31548, 23838, 2163, 201, 198, 201, 198, 2, 27144, 495, 2107, 2008, 201, 198, 11128, 796, 269, 85, 17, 13, 10798, 49630, 7, 15, 8...
2.228
750
# Copyright 2021 The gRPC Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
[ 2, 15069, 33448, 383, 308, 49, 5662, 46665, 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,...
2.526602
1,842
import scrapy from ..items import BasicHouseItem from ..utils import generate_url
[ 11748, 15881, 88, 198, 6738, 11485, 23814, 1330, 14392, 18102, 7449, 198, 6738, 11485, 26791, 1330, 7716, 62, 6371, 628 ]
4.15
20
from wfdb.io.record import (Record, MultiRecord, rdheader, rdrecord, rdsamp, wrsamp, dl_database, edf2mit, mit2edf, wav2mit, mit2wav, wfdb2mat, csv2mit, sampfreq, signame, wfdbdesc, wfdbtime, sigavg) from wfdb.io.annotation import (Anno...
[ 6738, 266, 69, 9945, 13, 952, 13, 22105, 1330, 357, 23739, 11, 15237, 23739, 11, 374, 67, 25677, 11, 374, 67, 22105, 11, 374, 9310, 696, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 22...
1.875622
402
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations
[ 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, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 11, 15720, 602, 628 ]
2.891892
37
""" You are given a digital number written down on a sheet of paper. Your task is to figure out if you rotate the given sheet of paper by 180 degrees would the number still look exactly the same. input: "1" output: false input: "29562" output: true input: "77" output: false """ def digital_number(number): "...
[ 37811, 198, 1639, 389, 1813, 257, 4875, 1271, 3194, 866, 319, 257, 9629, 286, 3348, 13, 220, 198, 7120, 4876, 318, 284, 3785, 503, 611, 345, 23064, 262, 1813, 9629, 286, 3348, 416, 11546, 7370, 561, 262, 1271, 991, 804, 3446, 262, 9...
2.733918
342
import argparse import os, json, sys import azureml.core from azureml.core import Workspace from azureml.core import Experiment from azureml.core.model import Model import azureml.core from azureml.core import Run from azureml.core.webservice import AciWebservice, Webservice from azureml.core.conda_dependencies import...
[ 11748, 1822, 29572, 198, 11748, 28686, 11, 33918, 11, 25064, 198, 11748, 35560, 495, 4029, 13, 7295, 198, 6738, 35560, 495, 4029, 13, 7295, 1330, 10933, 10223, 198, 6738, 35560, 495, 4029, 13, 7295, 1330, 29544, 198, 6738, 35560, 495, 4...
2.850247
1,823
from tools import instruction_helpers from tools.errors import InstructionNotFound from logs.logconfig import log_config LOG = log_config()
[ 6738, 4899, 1330, 12064, 62, 16794, 364, 198, 6738, 4899, 13, 48277, 1330, 46486, 3673, 21077, 198, 6738, 17259, 13, 6404, 11250, 1330, 2604, 62, 11250, 198, 198, 25294, 796, 2604, 62, 11250, 3419, 628, 198 ]
3.972222
36
from django.shortcuts import render from django.contrib.auth.decorators import login_required from chameleon.decorators import terms_required from django.contrib import messages from django.http import ( Http404, HttpResponseForbidden, HttpResponse, HttpResponseRedirect, HttpResponseNotAllowed, ...
[ 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 12501, 273, 2024, 1330, 17594, 62, 35827, 198, 6738, 442, 480, 38970, 13, 12501, 273, 2024, 1330, 2846, 62, 35827, 198, 6738, 42625...
2.616615
1,625
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # # pipe.py # # Copyright 2014 Giorgio Gilestro <gg@kozak> # # 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 Licen...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 198, 2, 220, 12656, 13, 9078, 198, 2, 220, 220, 198, 2, 220, 15069, 1946, 402, 1504, 27769, 10689, 47692, 12...
3.043605
344
import os import sys # A Python script that can be used to determine which files that require # patching have been touched between two points in the repo. if __name__ == '__main__': if len(sys.argv) != 3: sys.stderr.write('Usage: android-patch.py <commit> <commit>') sys.exit(1) patches = get_p...
[ 11748, 28686, 198, 11748, 25064, 198, 198, 2, 317, 11361, 4226, 326, 460, 307, 973, 284, 5004, 543, 3696, 326, 2421, 198, 2, 8529, 278, 423, 587, 12615, 1022, 734, 2173, 287, 262, 29924, 13, 198, 198, 361, 11593, 3672, 834, 6624, 70...
2.261905
336
from pyautofinance.common.strategies.bracket_strategy import BracketStrategy
[ 6738, 12972, 2306, 1659, 14149, 13, 11321, 13, 2536, 2397, 444, 13, 1671, 8317, 62, 2536, 4338, 1330, 1709, 8317, 13290, 4338, 628 ]
3.391304
23
import json from docopt import docopt from bigip_utils.logger import logger from bigip_utils.bigip import * # # This script enforces all attack signatures that are ready to be enforced: # https://support.f5.com/csp/article/K60640453?utm_source=f5support&utm_medium=RSS # __doc__ = """ Usage: enforce-read...
[ 11748, 33918, 198, 6738, 2205, 8738, 1330, 2205, 8738, 198, 198, 6738, 1263, 541, 62, 26791, 13, 6404, 1362, 1330, 49706, 198, 6738, 1263, 541, 62, 26791, 13, 14261, 541, 1330, 1635, 198, 2, 198, 2, 770, 4226, 551, 27087, 477, 1368, ...
2.150872
1,319
# sysinstall.py vi:ts=4:sw=4:expandtab: # # Copyright (c) 2006-2008 Three Rings Design, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the a...
[ 2, 25064, 17350, 13, 9078, 25357, 25, 912, 28, 19, 25, 2032, 28, 19, 25, 11201, 392, 8658, 25, 198, 2, 198, 2, 15069, 357, 66, 8, 4793, 12, 11528, 7683, 26028, 8495, 11, 3457, 13, 198, 2, 1439, 2489, 10395, 13, 198, 2, 198, 2,...
3.497881
472
""" This module is for fetching information from dynamo about different sites """ from .inventory import _get_inventory def _small_query(*args): """ This is a wrapper function for opening and closing inventory connection :param args: arguments to pass to query :returns: Result of the query :rty...
[ 37811, 198, 1212, 8265, 318, 329, 21207, 278, 1321, 422, 6382, 78, 546, 1180, 5043, 198, 37811, 628, 198, 6738, 764, 24807, 1330, 4808, 1136, 62, 24807, 628, 198, 4299, 4808, 17470, 62, 22766, 46491, 22046, 2599, 198, 220, 220, 220, 3...
2.802273
440
import shutil import os from django.core.management.base import BaseCommand, CommandError from django.conf import settings from .models import BookCover, get_book_cover_image_path
[ 11748, 4423, 346, 198, 11748, 28686, 198, 6738, 42625, 14208, 13, 7295, 13, 27604, 13, 8692, 1330, 7308, 21575, 11, 9455, 12331, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 764, 27530, 1330, 4897, 27245, 11, 651, 62, 2070...
3.770833
48
"""The admin_history database table. This is a stopgap representation of changes to the admin table until we have a group system and a group-based authorization system up and running. """ from __future__ import annotations from datetime import datetime from sqlalchemy import Column, DateTime, Enum, Index, Integer, ...
[ 37811, 464, 13169, 62, 23569, 6831, 3084, 13, 198, 198, 1212, 318, 257, 2245, 43554, 10552, 286, 2458, 284, 262, 13169, 3084, 1566, 356, 423, 257, 198, 8094, 1080, 290, 257, 1448, 12, 3106, 19601, 1080, 510, 290, 2491, 13, 198, 37811,...
3.932203
118
import traceback from ..models import ServerError
[ 11748, 12854, 1891, 198, 6738, 11485, 27530, 1330, 9652, 12331, 198 ]
4.545455
11
import re from typing import Any, Dict, Sequence, List, Optional, Tuple from .base import Parser from .components import InterestingFinding from .results import WPScanResults #################### CLI PARSER ######################
[ 11748, 302, 198, 6738, 19720, 1330, 4377, 11, 360, 713, 11, 45835, 11, 7343, 11, 32233, 11, 309, 29291, 198, 198, 6738, 764, 8692, 1330, 23042, 263, 198, 6738, 764, 5589, 3906, 1330, 43580, 36276, 198, 6738, 764, 43420, 1330, 28993, 3...
4.105263
57
from typing import Any, Dict, Union from django.conf import settings from django.http.response import HttpResponseBase, HttpResponseRedirect from django.views.generic import TemplateView from django.contrib.auth.views import LoginView, redirect_to_login
[ 6738, 19720, 1330, 4377, 11, 360, 713, 11, 4479, 198, 6738, 42625, 14208, 13, 10414, 1330, 6460, 198, 6738, 42625, 14208, 13, 4023, 13, 26209, 1330, 367, 29281, 31077, 14881, 11, 367, 29281, 31077, 7738, 1060, 198, 6738, 42625, 14208, 1...
3.710145
69
import pytest from mcanitexgen.animation.generator import Animation, GeneratorError
[ 11748, 12972, 9288, 198, 198, 6738, 285, 5171, 578, 87, 5235, 13, 11227, 341, 13, 8612, 1352, 1330, 23535, 11, 35986, 12331, 628, 628 ]
3.666667
24
#! /usr/bin/env python """ This is a "quick and dirty" solution to getting polarization data through the pipeline. This script creates new fits files with independent polarization states. Make sure you have plenty of diskspace. """ from __future__ import print_function import argparse import os from time import sleep...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 37811, 198, 1212, 318, 257, 366, 24209, 290, 11841, 1, 4610, 284, 1972, 42704, 1366, 832, 262, 11523, 13, 198, 1212, 4226, 8075, 649, 11414, 3696, 351, 4795, 42704, 2585, 13, ...
2.735586
503
from holoprot.models.trainer import Trainer
[ 6738, 6039, 404, 10599, 13, 27530, 13, 2213, 10613, 1330, 31924, 198 ]
3.666667
12
# Copyright 1999-2020 Alibaba Group Holding Ltd. # # 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 a...
[ 2, 15069, 7358, 12, 42334, 41992, 4912, 31703, 12052, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789,...
3.836634
202
# -*- coding: utf-8 -*- """ author: pwxcoo date: 2018-02-05 description: """ import requests, json from bs4 import BeautifulSoup def downloader(url): """ """ response = requests.get(url) if response.status_code != 200: print(f'{url} is failed!') return print(f'{url}...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 37811, 198, 198, 9800, 25, 279, 49345, 1073, 78, 198, 4475, 25, 2864, 12, 2999, 12, 2713, 220, 198, 11213, 25, 220, 198, 198, 37811, 198, 198, 11748, 7007, 11, ...
2.173317
802
import os import sys import copy import ipdb import json import mat73 import numpy as np import scipy.io as sio sys.path.append(os.path.join(os.path.dirname(__file__), '..')) from lib.camera.camera import CameraInfoPacket, catesian2homogenous rot = np.array([[1, 0, 0], [0, 0, -1], [0, 1, 0]]) # rotate along the x ax...
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 4866, 198, 11748, 20966, 9945, 198, 11748, 33918, 198, 11748, 2603, 4790, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 13, 952, 355, 264, 952, 198, 17597, 13, 6978, 13, 33295...
1.613876
13,361
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.response.AlipayResponse import AlipayResponse from alipay.aop.api.domain.LeadsOrderInfo import LeadsOrderInfo
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 33918, 198, 198, 6738, 435, 541, 323, 13, 64, 404, 13, 15042, 13, 26209, 13, 2348, 541, 323, 31077, 1330, 978,...
2.676056
71
from django.contrib.admin.filters import RelatedFieldListFilter, AllValuesFieldListFilter from django.db import models from django.db.models.query_utils import Q from django.utils.translation import ugettext as _ from django.utils.encoding import smart_unicode
[ 6738, 42625, 14208, 13, 3642, 822, 13, 28482, 13, 10379, 1010, 1330, 19809, 15878, 8053, 22417, 11, 1439, 40161, 15878, 8053, 22417, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 6738, 42625, 14208, 13, 9945, 13, 27530, 13, 22766, ...
3.506494
77
from sqlalchemy import create_engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import scoped_session, sessionmaker import settings engine = create_engine(settings.API_DATA) db_session = scoped_session(sessionmaker(bind=engine)) Base = declarative_base() Base.query = db_session.query...
[ 6738, 44161, 282, 26599, 1330, 2251, 62, 18392, 198, 6738, 44161, 282, 26599, 13, 2302, 13, 32446, 283, 876, 1330, 2377, 283, 876, 62, 8692, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 629, 19458, 62, 29891, 11, 6246, 10297, 198, 198...
3.353535
99
# https://www.hackerrank.com/challenges/np-arrays/problem import numpy
[ 2, 3740, 1378, 2503, 13, 31153, 8056, 962, 13, 785, 14, 36747, 34120, 14, 37659, 12, 3258, 592, 14, 45573, 198, 198, 11748, 299, 32152, 628 ]
2.807692
26
# -*- coding:utf-8 -*- """ PyCfg - R. Souweine, 2016. """ import sys import os import ConfigParser from datetime import datetime if __name__ == "__main__": c = Cfg("configs/global.cfg", ["inv", "general"]) print c.show_config()
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 37811, 198, 20519, 34, 40616, 532, 371, 13, 22862, 732, 500, 11, 1584, 13, 198, 37811, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 17056, 46677, 198, 6738, 4818, 8079, ...
2.371429
105
from .utils import get_filters, get_values, get_relations, set_values, set_relations
[ 6738, 764, 26791, 1330, 651, 62, 10379, 1010, 11, 651, 62, 27160, 11, 651, 62, 39468, 11, 900, 62, 27160, 11, 900, 62, 39468, 628, 198 ]
3.346154
26
from math import ceil, floor, trunc x = 1.4 y = 2.6 print(floor(x), floor(y)) print(floor(-x), floor(-y)) print(ceil(x), ceil(y)) print(ceil(-x), ceil(-y)) print(trunc(x), trunc(y)) print(trunc(-x), trunc(-y))
[ 6738, 10688, 1330, 2906, 346, 11, 4314, 11, 40122, 198, 198, 87, 796, 352, 13, 19, 198, 88, 796, 362, 13, 21, 198, 198, 4798, 7, 28300, 7, 87, 828, 4314, 7, 88, 4008, 198, 4798, 7, 28300, 32590, 87, 828, 4314, 32590, 88, 4008, ...
2.208333
96
#!/usr/bin/env python import requests import json store = 'http://localhost:8080/source' print "post a document" doc = {'name': 'tom'} headers = {'Content-Type': 'application/json'} r = requests.post(store, headers=headers, data=json.dumps(doc)) print r.status_code docid = r.json()['id'] revid = r.json()['rev'] p...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 7007, 198, 11748, 33918, 198, 198, 8095, 796, 705, 4023, 1378, 36750, 25, 1795, 1795, 14, 10459, 6, 198, 198, 4798, 366, 7353, 257, 3188, 1, 198, 198, 15390, 796, 1391, 6...
2.758065
186
import numpy as np import tensorflow as tf from tensorflow_probability.python.distributions import seed_stream import tensorflow_probability as tfp import mvg_distributions.covariance_representations as cov_rep from mvg_distributions.gamma import SqrtGamma tfd = tfp.distributions tfb = tfp.bijectors class SparseSq...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 6738, 11192, 273, 11125, 62, 1676, 65, 1799, 13, 29412, 13, 17080, 2455, 507, 1330, 9403, 62, 5532, 198, 11748, 11192, 273, 11125, 62, 1676, 65, 1799, 355, ...
2.240424
1,697
import json from datetime import datetime from django.utils.timezone import utc from .base import AnymailBaseWebhookView from ..signals import AnymailTrackingEvent, EventType, RejectReason, tracking
[ 11748, 33918, 198, 6738, 4818, 8079, 1330, 4818, 8079, 198, 198, 6738, 42625, 14208, 13, 26791, 13, 2435, 11340, 1330, 3384, 66, 198, 198, 6738, 764, 8692, 1330, 4377, 4529, 14881, 13908, 25480, 7680, 198, 6738, 11485, 12683, 874, 1330, ...
3.672727
55
"""Custom strategy""" from urllib.parse import urlencode from django.db import transaction from social_django.strategy import DjangoStrategy from main import features from profiles.models import LegalAddress, Profile
[ 37811, 15022, 4811, 37811, 198, 6738, 2956, 297, 571, 13, 29572, 1330, 2956, 11925, 8189, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 8611, 198, 6738, 1919, 62, 28241, 14208, 13, 2536, 4338, 1330, 37770, 13290, 4338, 198, 198, 6738, 1...
4.036364
55
__version__ = '0.0.2' from pathlib import Path APP_DIR = Path(__file__).parent
[ 834, 9641, 834, 796, 705, 15, 13, 15, 13, 17, 6, 628, 198, 6738, 3108, 8019, 1330, 10644, 628, 198, 24805, 62, 34720, 796, 10644, 7, 834, 7753, 834, 737, 8000, 198 ]
2.59375
32
# -*- coding: utf-8 -*- from addons.base.tests.base import OAuthAddonTestCaseMixin, AddonTestCase from addons.swift.provider import SwiftProvider from addons.swift.serializer import SwiftSerializer from addons.swift.tests.factories import SwiftAccountFactory
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 751, 684, 13, 8692, 13, 41989, 13, 8692, 1330, 440, 30515, 4550, 261, 14402, 20448, 35608, 259, 11, 3060, 261, 14402, 20448, 198, 6738, 751, 684, 13, 2032, 2135, ...
3.197531
81
# -*- coding: utf-8 -*- ''' Mac hardware information, generated by system_profiler. This is a separate grains module because it has a dependency on plistlib. ''' import logging import salt.utils import salt.modules.cmdmod log = logging.getLogger(__name__) __virtualname__ = 'mac_sp' try: import plistlib has...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 7061, 6, 198, 14155, 6890, 1321, 11, 7560, 416, 1080, 62, 5577, 5329, 13, 198, 198, 1212, 318, 257, 4553, 21824, 8265, 780, 340, 468, 257, 20203, 319, 458, 396, 8019, ...
2.826923
416