content
stringlengths
1
1.05M
input_ids
listlengths
1
883k
ratio_char_token
float64
1
22.9
token_count
int64
1
883k
#!/usr/bin/env python3 """ The Coin Change Problem :author: Dela Anthonio :hackerrank: https://hackerrank.com/delaanthonio :problem: https://www.hackerrank.com/challenges/coin-change/problem """ from typing import List def count_ways(amount: int, coins: List[int]) -> int: """Return the number of ways we can cou...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 37811, 198, 464, 16312, 9794, 20647, 198, 198, 25, 9800, 25, 4216, 64, 8451, 261, 952, 198, 25, 31153, 8056, 962, 25, 3740, 1378, 31153, 8056, 962, 13, 785, 14, 67, 10304, 29313,...
2.618605
215
from django.contrib import admin #from .models import * from . import models # Register your models here. admin.site.register(models.ClimbModel)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 198, 2, 6738, 764, 27530, 1330, 1635, 198, 6738, 764, 1330, 4981, 198, 198, 2, 17296, 534, 4981, 994, 13, 198, 28482, 13, 15654, 13, 30238, 7, 27530, 13, 34, 2475, 65, 17633, 8, ...
3.340909
44
# coding: utf-8 from runpy import run_path from setuptools import setup # Get the version from the relevant file d = run_path('skaero/version.py') __version__ = d['__version__'] setup( name="scikit-aero", version=__version__, description="Aeronautical engineering calculations in Python.", author="Juan...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 6738, 1057, 9078, 1330, 1057, 62, 6978, 198, 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 2, 3497, 262, 2196, 422, 262, 5981, 2393, 198, 67, 796, 1057, 62, 6978, 10786, 82, 4914, 3529, 14, 96...
2.538153
498
""" 8 """ n=int(input("n:")) queens = [0]*(n+1) # col_flags=[0]*(n+1) # diag_flags = [0]*(2*n) # diag2_flags = [0] * (2*n) count = 0 queen(n) print(f"{count}\n")
[ 37811, 198, 23, 628, 198, 198, 37811, 628, 198, 77, 28, 600, 7, 15414, 7203, 77, 11097, 4008, 198, 4188, 641, 796, 685, 15, 60, 9, 7, 77, 10, 16, 8, 198, 2, 220, 198, 4033, 62, 33152, 41888, 15, 60, 9, 7, 77, 10, 16, 8, 19...
1.616822
107
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: CC-BY-4.0 import os import cv2 from collections import namedtuple import imageio from PIL import Image from random import randrange import numpy as np from sklearn.decomposition import PCA from scipy.spatial.distance import...
[ 2, 15069, 6186, 13, 785, 11, 3457, 13, 393, 663, 29116, 13, 1439, 6923, 33876, 13, 198, 2, 30628, 55, 12, 34156, 12, 33234, 7483, 25, 12624, 12, 17513, 12, 19, 13, 15, 198, 198, 11748, 28686, 198, 11748, 269, 85, 17, 198, 6738, ...
3.420354
226
import re import lxml.html from openstates.utils import LXMLMixin from billy.scrape.legislators import LegislatorScraper, Legislator
[ 11748, 302, 198, 11748, 300, 19875, 13, 6494, 198, 6738, 1280, 27219, 13, 26791, 1330, 44988, 5805, 35608, 259, 198, 198, 6738, 2855, 88, 13, 1416, 13484, 13, 1455, 3044, 2024, 1330, 12288, 1352, 3351, 38545, 11, 12288, 1352, 628, 198 ]
3.317073
41
from header import * from .utils import * from .util_func import * '''Only for Testing'''
[ 6738, 13639, 1330, 1635, 198, 6738, 764, 26791, 1330, 1635, 198, 6738, 764, 22602, 62, 20786, 1330, 1635, 198, 198, 7061, 6, 10049, 329, 23983, 7061, 6, 628, 198 ]
3.206897
29
# # PySNMP MIB module DABING-MIB (http://snmplabs.com/pysmi) # ASN.1 source file://..\DABING-MIB.mib # Produced by pysmi-0.3.4 at Tue Mar 22 12:53:47 2022 # On host ? platform ? version ? by user ? # Using Python version 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 22:45:29) [MSC v.1916 32 bit (Intel)] # OctetString, Objec...
[ 2, 198, 2, 9485, 15571, 7378, 337, 9865, 8265, 360, 6242, 2751, 12, 8895, 33, 357, 4023, 1378, 16184, 76, 489, 8937, 13, 785, 14, 79, 893, 11632, 8, 198, 2, 7054, 45, 13, 16, 2723, 2393, 1378, 492, 59, 5631, 33, 2751, 12, 8895, ...
2.735532
1,607
import os import numpy as np save_stem='extra_vis_friday_harbor' data_dir='../../data/sdk_new_100' resolution=100 cre=False source_acronyms=['VISal','VISam','VISl','VISp','VISpl','VISpm', 'VISli','VISpor','VISrl','VISa'] lambda_list = np.logspace(3,12,10) scale_lambda=True min_vox=0 # save_file_name='...
[ 11748, 28686, 198, 11748, 299, 32152, 355, 45941, 198, 198, 21928, 62, 927, 11639, 26086, 62, 4703, 62, 8310, 2567, 62, 9869, 2865, 6, 198, 7890, 62, 15908, 11639, 40720, 40720, 7890, 14, 21282, 74, 62, 3605, 62, 3064, 6, 198, 29268, ...
2.372208
403
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Nov 20 09:42:39 2020 @author: niklas """ from mossepy.mosse_tracker import MOSSE # choose position of object in first frame # that should be done by mouse click objPos = [256, 256] # choose tracker type tracker = MOSSE() # initialize object position ...
[ 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, 41972, 319, 19480, 5267, 1160, 7769, 25, 3682, 25, 2670, 12131, 198, 198, 31, 9800, 25, 299, 1134, 21...
2.911765
136
def solve(polynomial): """ input is polynomial if more than one variable, returns 'too many variables' looks for formula to apply to coefficients returns solution or 'I cannot solve yet...' """ if len(polynomial.term_matrix[0]) > 2: return 'too many variables' elif len(polynomial...
[ 4299, 8494, 7, 35428, 26601, 498, 2599, 198, 220, 220, 220, 37227, 198, 220, 220, 220, 5128, 318, 745, 6213, 49070, 198, 220, 220, 220, 611, 517, 621, 530, 7885, 11, 5860, 705, 18820, 867, 9633, 6, 198, 220, 220, 220, 3073, 329, 1...
2.030827
1,330
"""Utility functions for parsing SVG styles.""" __all__ = ["cascade_element_style", "parse_style", "parse_color_string"] from xml.dom.minidom import Element as MinidomElement from colour import web2hex from ...utils.color import rgb_to_hex from typing import Dict, List CASCADING_STYLING_ATTRIBUTES: List[str] = [ ...
[ 37811, 18274, 879, 5499, 329, 32096, 45809, 12186, 526, 15931, 628, 198, 834, 439, 834, 796, 14631, 66, 28966, 62, 30854, 62, 7635, 1600, 366, 29572, 62, 7635, 1600, 366, 29572, 62, 8043, 62, 8841, 8973, 198, 198, 6738, 35555, 13, 343...
2.544611
2,264
#!/usr/bin/env python #coding:utf-8 import os import RPi.GPIO as GPIO # import json from time import sleep # from twython import Twython f=open("tw_config.json",'r') config=json.load(f) f.close() CONSUMER_KEY =config['consumer_key'] CONSUMER_SECRET =config['consumer_secret'] ACCESS_TOKEN =config['access_token'] ACCE...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 66, 7656, 25, 40477, 12, 23, 198, 198, 11748, 28686, 198, 11748, 25812, 72, 13, 16960, 9399, 355, 50143, 1303, 198, 11748, 33918, 198, 6738, 640, 1330, 3993, 1303, 198, 6738, 665, ...
2.415902
327
""" Unit tests for ``wheezy.templates.utils``. """ import unittest
[ 198, 37811, 11801, 5254, 329, 7559, 12491, 68, 7357, 13, 11498, 17041, 13, 26791, 15506, 13, 198, 37811, 198, 198, 11748, 555, 715, 395, 628, 198 ]
2.730769
26
# -*- coding:utf-8 -*- # /usr/bin/env python """ Date: 2019/10/21 12:08 Desc: --- """ import json import time import pandas as pd import requests from tqdm import tqdm from akshare.economic.cons import ( JS_CONS_GOLD_ETF_URL, JS_CONS_SLIVER_ETF_URL, JS_CONS_OPEC_URL, ) def macro_cons_gold_volume(): ...
[ 2, 532, 9, 12, 19617, 25, 40477, 12, 23, 532, 9, 12, 198, 2, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 37811, 198, 10430, 25, 13130, 14, 940, 14, 2481, 1105, 25, 2919, 198, 24564, 25, 11420, 198, 198, 37811, 198, 11748, 33918,...
1.855357
18,480
############################################################################## # Written by: Cachen Chen <cachen@novell.com> # Date: 08/06/2008 # Description: Application wrapper for scrollbar.py # Used by the scrollbar-*.py tests ###################################################################...
[ 198, 29113, 29113, 7804, 4242, 2235, 198, 2, 22503, 416, 25, 220, 327, 330, 831, 12555, 1279, 66, 330, 831, 31, 77, 659, 297, 13, 785, 29, 198, 2, 7536, 25, 220, 220, 220, 220, 220, 220, 220, 8487, 14, 3312, 14, 11528, 198, 2, ...
2.738095
546
import json from os import path from tweepy import OAuthHandler, Stream from tweepy.streaming import StreamListener from sqlalchemy.orm.exc import NoResultFound from database import session, Tweet, Hashtag, User consumer_key = "0qFf4T2xPWVIycLmAwk3rDQ55" consumer_secret = "LcHpujASn4fIIrQ8sikbCTQ3oyU6T6opchFVWBBqwI...
[ 11748, 33918, 198, 6738, 28686, 1330, 3108, 198, 198, 6738, 4184, 538, 88, 1330, 440, 30515, 25060, 11, 13860, 198, 6738, 4184, 538, 88, 13, 5532, 278, 1330, 13860, 33252, 198, 198, 6738, 44161, 282, 26599, 13, 579, 13, 41194, 1330, 1...
2.257813
256
from flask import render_template, jsonify from app import app import random
[ 6738, 42903, 1330, 8543, 62, 28243, 11, 33918, 1958, 198, 6738, 598, 1330, 598, 198, 11748, 4738, 628, 628, 628 ]
4.1
20
# encoding: utf-8 ''' @author: yangsen @license: @contact: @software: @file: numpy_mat.py @time: 18-8-25 9:56 @desc: ''' import numpy as np a = np.arange(9).reshape(3,3) # a[1] a[[1,2]] a[np.array([1,2])] # a[:,1] a[:,[1,2]] a[:,np.array([1,2])]
[ 2, 21004, 25, 3384, 69, 12, 23, 198, 7061, 6, 198, 31, 9800, 25, 331, 648, 6248, 198, 31, 43085, 25, 198, 31, 32057, 25, 198, 31, 43776, 25, 198, 31, 7753, 25, 299, 32152, 62, 6759, 13, 9078, 198, 31, 2435, 25, 1248, 12, 23, ...
1.77305
141
import copy from typing import Callable, Dict, List, Optional import torch import torch.nn as nn import torch.optim as optim from ai_traineree import DEVICE from ai_traineree.agents import AgentBase from ai_traineree.agents.agent_utils import soft_update from ai_traineree.buffers import NStepBuffer, PERBuffer from ai...
[ 11748, 4866, 198, 6738, 19720, 1330, 4889, 540, 11, 360, 713, 11, 7343, 11, 32233, 198, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 40085, 355, 6436, 198, 198, 6738, 257, 72, 62, 27432, 45316,...
2.359911
2,684
from pycu.nvvm import (get_libdevice, ir_version, version, add_module_to_program, compile_program, create_program, destroy_program, get_compiled_result, get_compiled_result_size, get_program_log, get_program_log_size, lazy_add_module_to_program, verify_program) import os import sys from ctypes import c...
[ 6738, 12972, 27399, 13, 48005, 14761, 1330, 357, 1136, 62, 8019, 25202, 11, 4173, 62, 9641, 11, 2196, 11, 751, 62, 21412, 62, 1462, 62, 23065, 11, 17632, 62, 23065, 11, 198, 197, 197, 197, 197, 197, 220, 220, 2251, 62, 23065, 11, ...
2.834711
121
# Copyright (c) 2022, itsdve GmbH and Contributors # See license.txt # import frappe import unittest
[ 2, 15069, 357, 66, 8, 33160, 11, 663, 67, 303, 402, 2022, 39, 290, 25767, 669, 198, 2, 4091, 5964, 13, 14116, 198, 198, 2, 1330, 5306, 27768, 198, 11748, 555, 715, 395, 198 ]
3
34
# -*- coding: utf-8 -*- """ Created on Sun Nov 21 14:51:01 2021 @author: 75638 """ import pandas as pd import numpy as np pd.set_option('display.max_columns', None) pd.set_option('display.width', 10000) def process_data(path1,path2): ''' 1.path1: file path of different factor 2.path2:file path...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 37811, 201, 198, 41972, 319, 3825, 5267, 2310, 1478, 25, 4349, 25, 486, 33448, 201, 198, 201, 198, 31, 9800, 25, 767, 3980, 2548, 201, 198, 37811, 201, 198, 11748...
2.276536
716
import pytest from pathlib import Path from blendtorch import btt BLENDDIR = Path(__file__).parent/'blender'
[ 11748, 12972, 9288, 198, 6738, 3108, 8019, 1330, 10644, 198, 6738, 13516, 13165, 354, 1330, 275, 926, 198, 198, 9148, 10619, 34720, 796, 10644, 7, 834, 7753, 834, 737, 8000, 14, 6, 2436, 2194, 6, 628, 628, 198 ]
3
38
VERSION = (0, 9, 5)
[ 43717, 796, 357, 15, 11, 860, 11, 642, 8, 198 ]
2
10
# Copyright 2020 Google LLC. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # #...
[ 2, 15069, 12131, 3012, 11419, 13, 198, 2, 198, 2, 2297, 396, 3890, 290, 779, 287, 2723, 290, 13934, 5107, 11, 351, 393, 1231, 198, 2, 17613, 11, 389, 10431, 2810, 326, 262, 1708, 3403, 198, 2, 389, 1138, 25, 198, 2, 198, 2, 352,...
2.6643
7,465
import sys import unittest from dynd import nd, ndt """ class TestFields(unittest.TestCase): def test_simple(self): a = nd.array([ (1, 2, 'a', 'b'), (3, 4, 'ab', 'cd'), (5, 6, 'def', 'ghi')], type='3 * {x: int32, y: int32, z: string, w: string...
[ 11748, 25064, 198, 11748, 555, 715, 395, 198, 6738, 20268, 358, 1330, 299, 67, 11, 299, 28664, 198, 198, 37811, 198, 4871, 6208, 15878, 82, 7, 403, 715, 395, 13, 14402, 20448, 2599, 198, 220, 220, 220, 825, 1332, 62, 36439, 7, 944, ...
1.590841
2,664
from typing import Union, Iterable, List import numpy as np import pandas as pd from ..models._transformer import _ArrayTransformer, _MultiArrayTransformer
[ 6738, 19720, 1330, 4479, 11, 40806, 540, 11, 7343, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 11485, 27530, 13557, 7645, 16354, 1330, 4808, 19182, 8291, 16354, 11, 4808, 29800, 19182, 8291, ...
3.697674
43
import os import sys import lipd # import pythonAdapter, assumes in ../python-adapter/ tests_dir = os.path.dirname(os.path.realpath(__file__)) fc_dir = os.path.dirname(tests_dir) python_adapter_dir = os.path.join(fc_dir, "python-adapter") sys.path.append(python_adapter_dir) import adapter # have to call adapter in ...
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 10645, 67, 198, 198, 2, 1330, 21015, 47307, 11, 18533, 287, 11485, 14, 29412, 12, 324, 3429, 14, 198, 41989, 62, 15908, 796, 28686, 13, 6978, 13, 15908, 3672, 7, 418, 13, 6978, 13, 5305, ...
2.88961
154
from PIL import Image from PIL import ImageTk import tkinter as tki from tkinter import Toplevel, Scale import threading import datetime import cv2 import os import time import platform
[ 6738, 350, 4146, 1330, 7412, 198, 6738, 350, 4146, 1330, 7412, 51, 74, 198, 11748, 256, 74, 3849, 355, 256, 4106, 198, 6738, 256, 74, 3849, 1330, 309, 643, 626, 11, 21589, 198, 11748, 4704, 278, 198, 11748, 4818, 8079, 198, 11748, 2...
3.4
55
import compas import compas_rhino from compas.datastructures import Mesh mesh = Mesh.from_ply(compas.get('stanford_dragon.ply')) compas_rhino.mesh_draw(mesh)
[ 11748, 552, 292, 198, 11748, 552, 292, 62, 17179, 2879, 198, 6738, 552, 292, 13, 19608, 459, 1356, 942, 1330, 47529, 198, 198, 76, 5069, 796, 47529, 13, 6738, 62, 2145, 7, 5589, 292, 13, 1136, 10786, 14192, 3841, 62, 14844, 13, 2145...
2.580645
62
# Neural Networks Demystified # Part 1: Data + Architecture # # Supporting code for short YouTube series on artificial neural networks. # # Stephen Welch # @stephencwelch import numpy as np # X = (hours sleeping, hours studying), y = Score on test X = np.array(([3,5], [5,1], [10,2]), dtype=float) y = np.array(([75], ...
[ 2, 47986, 27862, 1897, 88, 301, 1431, 198, 2, 2142, 352, 25, 6060, 1343, 29778, 198, 2, 198, 2, 44188, 2438, 329, 1790, 7444, 2168, 319, 11666, 17019, 7686, 13, 198, 2, 198, 2, 7970, 41524, 198, 2, 2488, 9662, 831, 66, 86, 417, ...
2.773333
150
import json import logging import os import pathlib import re import textwrap import warnings from typing import List, Optional import jinja2 import pandas import requests import requests_cache import yaml from manubot.util import read_serialized_data, read_serialized_dict from manubot.process.bibliography import loa...
[ 11748, 33918, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 3108, 8019, 198, 11748, 302, 198, 11748, 2420, 37150, 198, 11748, 14601, 198, 6738, 19720, 1330, 7343, 11, 32233, 198, 198, 11748, 474, 259, 6592, 17, 198, 11748, 19798, 292,...
2.533815
7,467
#! /usr/bin/env python # scrape the IBA pages for cocktail lists import sys import xml.etree.ElementTree as ET from lxml import html import requests from pprint import pprint from collections import OrderedDict import json url = 'http://iba-world.com/new-era-drinks/' jsonfile = 'IBA_new_era_drinks.json' url = 'http...
[ 2, 0, 1220, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 42778, 262, 314, 4339, 5468, 329, 24554, 8341, 198, 198, 11748, 25064, 198, 11748, 35555, 13, 316, 631, 13, 20180, 27660, 355, 12152, 198, 6738, 300, 19875, 1330, 27711, 198,...
2.25861
1,655
api_key = "9N7hvPP9yFrjBnELpBdthluBjiOWzJZw" mongo_url = 'mongodb://localhost:27017' mongo_db = 'CarPopularity' mongo_collections = ['CarSalesByYear', 'PopularCarsByRegion'] years_data = ['2019', '2018', '2017', '2016', '2015'] test_mode = True
[ 15042, 62, 2539, 796, 366, 24, 45, 22, 71, 85, 10246, 24, 88, 6732, 73, 33, 77, 3698, 79, 33, 67, 400, 2290, 33, 7285, 3913, 89, 41, 57, 86, 1, 198, 76, 25162, 62, 6371, 796, 705, 31059, 375, 65, 1378, 36750, 25, 1983, 29326, ...
2.32381
105
import imp import torch import torch.nn as nn import numpy as np import torch.nn.functional as F from pytorch_ares.attack_torch.utils import loss_adv
[ 11748, 848, 198, 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 198, 6738, 12972, 13165, 354, 62, 3565, 13, 20358, 62, 13165, 354, 13, 2...
3.191489
47
from django import template register = template.Library()
[ 6738, 42625, 14208, 1330, 11055, 198, 198, 30238, 796, 11055, 13, 23377, 3419, 628 ]
4.285714
14
from django.test import TestCase from django.contrib.auth.models import User from wiki.models import Page from django.utils.text import slugify # Create your tests here. ''' Steps to writing a test 1. Set up your test data 2. Make a request (GET, POST) 3a. Check if response matches what we expect 3b. C...
[ 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 22719, 13, 27530, 1330, 7873, 198, 6738, 42625, 14208, 13, 26791, 13, 5239, 1330, 31065, 1958, 198, 1...
3.212389
113
__author__ = 'Mitja Pagon <mitja@inueni.com>' __version__ = '0.2'
[ 834, 9800, 834, 796, 705, 43339, 6592, 350, 1840, 1279, 2781, 6592, 31, 259, 84, 43850, 13, 785, 29, 6, 198, 834, 9641, 834, 796, 705, 15, 13, 17, 6, 198 ]
2.129032
31
''' The randomization defense method, which applies random . ''' import tensorflow as tf from ares.defense.input_transformation import input_transformation def randomize(xs, scale_min=0.875, pad_value=0.0): ''' Apply random rescaling and padding to xs. :param xs: A batch of inputs for some classifier. ...
[ 7061, 6, 383, 4738, 1634, 3761, 2446, 11, 543, 8991, 4738, 764, 705, 7061, 198, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 198, 6738, 389, 82, 13, 19774, 13, 15414, 62, 7645, 1161, 1330, 5128, 62, 7645, 1161, 628, 198, 4299, 47...
2.543811
719
from django.contrib import admin from annotate.backend.models import Image, Annotation admin.site.register(Image) admin.site.register(Annotation)
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 24708, 378, 13, 1891, 437, 13, 27530, 1330, 7412, 11, 1052, 38983, 198, 198, 28482, 13, 15654, 13, 30238, 7, 5159, 8, 198, 28482, 13, 15654, 13, 30238, 7, 2025, 38983, 8, 19...
3.418605
43
data = open('./original').readlines() alphabet = { "<":"lt", ">":"gt", "=":"=", "-":'-', "+":"+", "-":"-", "~":"~", "!":"ex", "%":"%", "^":"^", "&":"&", "*":"*", "(":"(", ")":"right_paran", "[":"[",...
[ 7890, 796, 1280, 7, 4458, 14, 14986, 27691, 961, 6615, 3419, 628, 198, 17307, 8380, 796, 1391, 198, 220, 220, 220, 220, 220, 220, 220, 33490, 2404, 2528, 1600, 198, 220, 220, 220, 220, 220, 220, 220, 366, 29, 2404, 13655, 1600, 198,...
1.676923
910
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 2, 15069, 4343, 3012, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, ...
3.61519
395
from struct import pack from .vector import * from .formatdecimal import decimal from numbers import Number import os import sys try: basestring except: basestring = str def toSCADModule(polys, moduleName, digitsAfterDecimal=9, colorOverride=None): """ INPUT: polys: list of (color,polyhedra) pair...
[ 6738, 2878, 1330, 2353, 198, 6738, 764, 31364, 1330, 1635, 198, 6738, 764, 18982, 12501, 4402, 1330, 32465, 198, 6738, 3146, 1330, 7913, 220, 198, 11748, 28686, 198, 11748, 25064, 198, 198, 28311, 25, 198, 220, 220, 220, 1615, 395, 1806...
2.249837
1,537
import numpy as np from PIL import Image import matplotlib.pyplot as plt import histogram_module import dist_module # model_images - list of file names of model images # query_images - list of file names of query images # # dist_type - string which specifies distance type: 'chi2', 'l2', 'intersect' # hist_type - s...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 350, 4146, 1330, 7412, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 198, 11748, 1554, 21857, 62, 21412, 198, 11748, 1233, 62, 21412, 628, 198, 198, 2, 2746, 62, 17566, 53...
3.424242
264
import argparse import logging import sys from .dycco import document if __name__ == '__main__': arg_parser = argparse.ArgumentParser(prog='dycco', description='Literate-style documentation generator.') arg_parser.add_argument('source_file', nargs='+', default=sys.stdin, help='Source files to document') ...
[ 11748, 1822, 29572, 198, 11748, 18931, 198, 11748, 25064, 198, 198, 6738, 764, 9892, 535, 78, 1330, 3188, 628, 198, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 198, 220, 220, 220, 1822, 62, 48610, 796, 1822, 29572, ...
2.9601
401
################################################################################ # Copyright (c) 2015-2018 Skymind, Inc. # # This program and the accompanying materials are made available under the # terms of the Apache License, Version 2.0 which is available at # https://www.apache.org/licenses/LICENSE-2.0. # # Unless...
[ 29113, 29113, 14468, 198, 2, 15069, 357, 66, 8, 1853, 12, 7908, 5274, 10155, 11, 3457, 13, 198, 2, 198, 2, 770, 1430, 290, 262, 19249, 5696, 389, 925, 1695, 739, 262, 198, 2, 2846, 286, 262, 24843, 13789, 11, 10628, 362, 13, 15, ...
2.392652
1,742
import serial ser = serial.Serial('/dev/tty.usbmodem7071', 115200, timeout=10) ser.write("\xb1\xa3\xb5\xb5") #set usec mode 177,163,181,181 ser.flush() ser.flushInput() obs = ser.read(8) if len(obs) != 8: print('Error: no buttons presses detected') print 'Observed data (as hex): '+ obs.encode('hex') obsBin = [ord(...
[ 11748, 11389, 198, 2655, 796, 11389, 13, 32634, 10786, 14, 7959, 14, 42852, 13, 43319, 4666, 368, 2154, 4869, 3256, 12279, 2167, 11, 26827, 28, 940, 8, 198, 2655, 13, 13564, 7203, 59, 30894, 16, 59, 27865, 18, 59, 30894, 20, 59, 308...
2.349206
252
import os from typing import Tuple import torchaudio from torch import Tensor from torch.utils.data import Dataset from torchaudio.datasets.utils import ( download_url, extract_archive, walk_files, ) URL = "train-clean-100" FOLDER_IN_ARCHIVE = "LibriTTS" _CHECKSUMS = { "http://www.openslr.org/60/dev-c...
[ 11748, 28686, 198, 6738, 19720, 1330, 309, 29291, 198, 198, 11748, 28034, 24051, 198, 6738, 28034, 1330, 309, 22854, 198, 6738, 28034, 13, 26791, 13, 7890, 1330, 16092, 292, 316, 198, 6738, 28034, 24051, 13, 19608, 292, 1039, 13, 26791, ...
2.131148
427
# coding: utf-8 ######################################################################### # : <a href="http://www.crazyit.org">Java</a> # # author yeeku.H.lee kongyeeku@163.com # # # # version 1.0 ...
[ 2, 19617, 25, 3384, 69, 12, 23, 201, 198, 29113, 29113, 7804, 2, 201, 198, 2, 1058, 1279, 64, 13291, 2625, 4023, 1378, 2503, 13, 50112, 270, 13, 2398, 5320, 29584, 3556, 64, 29, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, ...
1.63506
1,255
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Dec 18 20:13:57 2018 @author: allen """ import random, os, json, datetime, time from flask import Flask, Response from pymongo import MongoClient from bson import json_util app = Flask(__name__) MONGO_URI = "mongodb://mongodb:27017" # "mongodb:<con...
[ 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, 41972, 319, 30030, 4280, 1248, 1160, 25, 1485, 25, 3553, 2864, 198, 198, 31, 9800, 25, 477, 268, 198,...
2.833333
330
#! /usr/bin/Python from gensim.models.keyedvectors import KeyedVectors from scipy import spatial from numpy import linalg import argparse import sys vector_file = sys.argv[1] if len(sys.argv) != 6: print('arguments wrong!') print(len(sys.argv)) exit() else: words = [sys.argv[2], sys.argv[3], sys.arg...
[ 2, 0, 1220, 14629, 14, 8800, 14, 37906, 201, 198, 201, 198, 6738, 308, 641, 320, 13, 27530, 13, 2539, 276, 303, 5217, 1330, 7383, 276, 53, 478, 669, 201, 198, 6738, 629, 541, 88, 1330, 21739, 201, 198, 6738, 299, 32152, 1330, 300,...
2.058108
740
import numpy as np import scipy as sp import scipy.sparse.linalg as splinalg def eig2_nL(g, tol_eigs = 1.0e-6, normalize:bool = True, dim:int=1): """ DESCRIPTION ----------- Computes the eigenvector that corresponds to the second smallest eigenvalue of the normalized Laplacian matrix ...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 355, 599, 198, 11748, 629, 541, 88, 13, 82, 29572, 13, 75, 1292, 70, 355, 4328, 1292, 70, 628, 198, 4299, 304, 328, 17, 62, 77, 43, 7, 70, 11, 284, 75, 62, 68, 9235, 796...
2.326456
824
""" ******************************************************************************* * Ledger Blue * (c) 2016 Ledger * * 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....
[ 37811, 198, 17174, 17174, 46068, 8162, 198, 9, 220, 220, 22964, 1362, 4518, 198, 9, 220, 220, 357, 66, 8, 1584, 22964, 1362, 198, 9, 198, 9, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, ...
3.010753
558
# Copyright 2020 XAMES3. 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 agree...
[ 2, 15069, 12131, 1395, 29559, 18, 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, 1...
3.224
750
from django.contrib import messages from django.contrib.auth import login, authenticate from django.shortcuts import render, redirect from django.urls import reverse from django.views import View from application.forms import AuthenticateForm from application.views import get_navbar, Page
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 6218, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 1330, 17594, 11, 8323, 5344, 198, 6738, 42625, 14208, 13, 19509, 23779, 1330, 8543, 11, 18941, 198, 6738, 42625, 14208, 13, 6371, 82, 1330...
4
73
# Copyright 2017 Mycroft AI Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
[ 2, 15069, 2177, 2011, 36714, 9552, 3457, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, 287, 11846, 351, 262, 13789, 13, 198, 2...
3.863354
161
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.response.AlipayResponse import AlipayResponse
[ 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.571429
49
import os from PyQt5 import QtCore from PyQt5.QtCore import QRect, QPoint from PyQt5.QtGui import QMovie, QCloseEvent, QShowEvent from PyQt5.QtWidgets import QDialog, QLabel, QVBoxLayout, QApplication, QWidget
[ 11748, 28686, 198, 198, 6738, 9485, 48, 83, 20, 1330, 33734, 14055, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 14055, 1330, 42137, 478, 11, 1195, 12727, 198, 6738, 9485, 48, 83, 20, 13, 48, 83, 8205, 72, 1330, 1195, 25097, 11, 1195,...
2.65
80
# # PySNMP MIB module MWORKS-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/MWORKS-MIB # Produced by pysmi-0.3.4 at Wed May 1 14:16:04 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:...
[ 2, 198, 2, 9485, 15571, 7378, 337, 9865, 8265, 29961, 14670, 50, 12, 8895, 33, 357, 4023, 1378, 16184, 76, 489, 8937, 13, 785, 14, 79, 893, 11632, 8, 198, 2, 7054, 45, 13, 16, 2723, 2393, 1378, 14, 14490, 14, 67, 615, 47562, 19,...
2.624263
1,187
#!/usr/bin/env python import sys import re from subprocess import Popen, PIPE import argparse from pbxproj import XcodeProject, TreeType from pbxproj import FileOptions if __name__ == "__main__": main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 11748, 25064, 198, 11748, 302, 198, 6738, 850, 14681, 1330, 8099, 268, 11, 350, 4061, 36, 198, 11748, 1822, 29572, 198, 198, 6738, 279, 65, 87, 1676, 73, 1330, 1395, 8189, 16775, ...
2.837838
74
# == 1 == bar = [1, 2] print(foo(bar)) # == 2 == bar = [1, 2] print(foo(bar)) # == 3 == bar = [1, 2] print(foo()) # == 4 == bar = [1, 2] print(foo(bar), bar) # == 5 == bar = [1, 2] print(foo(bar), bar) # == 6 == try: bar = 1 / 0 print(bar) except ZeroDivisionError as bar: print(bar) pr...
[ 2, 6624, 220, 352, 220, 6624, 198, 5657, 796, 685, 16, 11, 362, 60, 198, 4798, 7, 21943, 7, 5657, 4008, 628, 198, 2, 6624, 220, 362, 220, 6624, 198, 5657, 796, 685, 16, 11, 362, 60, 198, 4798, 7, 21943, 7, 5657, 4008, 628, 198...
1.987085
542
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Author: Chmouel Boudjnah <chmouel@chmouel.com> # # 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, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 6434, 25, 609, 76, 280, 417, 347, 2778, 73, 40909, 1279, 354, 76, 280, 417, 31, 354, 76, 280, 417, 13, 785...
3.008065
372
from .algolia import search_by_nsuid from .algolia import search_by_platform from .algolia import search_by_query
[ 6738, 764, 14016, 22703, 1330, 2989, 62, 1525, 62, 77, 2385, 312, 198, 6738, 764, 14016, 22703, 1330, 2989, 62, 1525, 62, 24254, 198, 6738, 764, 14016, 22703, 1330, 2989, 62, 1525, 62, 22766, 198 ]
3.257143
35
# Other solution # V2 # Time: O(|S|+|T|) # Space:O(|S|+|T|) # Refer from: # https://leetcode.com/problems/minimum-window-substring/solution/ # Sliding Window # We start with two pointers, leftleft and rightright initially pointing to the first element of the string S. # We use the rightright pointer to expand th...
[ 198, 2, 3819, 4610, 198, 2, 569, 17, 198, 198, 2, 3862, 25, 440, 7, 91, 50, 91, 10, 91, 51, 91, 8, 198, 2, 4687, 25, 46, 7, 91, 50, 91, 10, 91, 51, 91, 8, 198, 198, 2, 33973, 422, 25, 198, 2, 3740, 1378, 293, 316, 8189...
3.451444
381
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-10-17 04:12 from __future__ import unicode_literals from django.db import migrations import wagtail.core.blocks import wagtail.core.fields
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 2980, 515, 416, 37770, 352, 13, 1157, 13, 20, 319, 2177, 12, 940, 12, 1558, 8702, 25, 1065, 198, 6738, 11593, 37443, 834, 1330, 28000, 1098, 62, 17201, 874, 198, ...
2.767123
73
import torch import torch.nn as nn import torch.nn.functional as F
[ 11748, 28034, 198, 11748, 28034, 13, 20471, 355, 299, 77, 198, 11748, 28034, 13, 20471, 13, 45124, 355, 376, 628, 198 ]
3.285714
21
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import unittest from unittest.mock import patch, MagicMock from typing import List, Tuple from .. import Storage # M...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 15069, 357, 66, 8, 3203, 11, 3457, 13, 290, 663, 29116, 13, 198, 2, 198, 2, 770, 2723, 2438, 318, 11971, 739, 262, 17168, 5964, 1043, 287, 262, 198, 2, 38559, 24290, 2393, ...
3.663265
98
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
[ 2, 19617, 28, 40477, 12, 23, 198, 2, 17202, 39410, 25, 428, 2393, 373, 7560, 416, 262, 21624, 12994, 24118, 687, 10290, 357, 27110, 5235, 8, 16984, 13, 17202, 198, 2, 17202, 2141, 407, 4370, 416, 1021, 4556, 345, 821, 1728, 345, 760...
2.524085
1,038
#!/usr/bin/env python3 import itertools # Constants NUMBERS = range(0, 10) # Main Execution if __name__ == '__main__': main()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 340, 861, 10141, 198, 198, 2, 4757, 1187, 198, 198, 41359, 33, 4877, 796, 2837, 7, 15, 11, 838, 8, 198, 198, 2, 8774, 37497, 198, 198, 361, 11593, 3672, 834, 6624, ...
2.410714
56
# Copyright (C) 2015-2021 Regents of the University of California # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
[ 2, 15069, 357, 34, 8, 1853, 12, 1238, 2481, 3310, 658, 286, 262, 2059, 286, 3442, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 198, 2, 345, 743, 407, 779, 428, 2393, 2845, ...
2.67331
3,713
# -*- coding: utf-8 -*- from lite_tools import get_md5, get_sha, get_sha3, get_b64e, get_b64d # about hashlib ==> get_md5, get_sha, get_sha3 || default mode=256 s = "test_information" # print(get_md5(s)) # 5414ffd88fcb58417e64ecec51bb3a6b print(get_md5(s, upper=True)) # 5414FFD88FCB58417E64ECEC...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 300, 578, 62, 31391, 1330, 651, 62, 9132, 20, 11, 651, 62, 26270, 11, 651, 62, 26270, 18, 11, 651, 62, 65, 2414, 68, 11, 651, 62, 65, 2414, 67, 628, 198, 2...
1.755194
1,107
__all__ = ["mock_pv_info", "test_pv_tracking"]
[ 834, 439, 834, 796, 14631, 76, 735, 62, 79, 85, 62, 10951, 1600, 366, 9288, 62, 79, 85, 62, 36280, 8973, 198 ]
2.136364
22
import carmcmc as cm from gatspy.periodic import LombScargleFast import matplotlib.pyplot as plt import numpy as np
[ 11748, 1097, 76, 11215, 66, 355, 12067, 198, 6738, 308, 1381, 9078, 13, 41007, 291, 1330, 28503, 3351, 853, 293, 22968, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 198, 11748, 299, 32152, 355, 45941, 628 ]
3
39
# Fast large file synchronization inspired by rsync. # # Author: Peter Odding <peter@peterodding.com> # Last Change: March 6, 2020 # URL: https://pdiffcopy.readthedocs.io """Parallel hashing of files using :mod:`multiprocessing` and :mod:`pdiffcopy.mp`.""" # Standard library modules. import functools import hashlib i...
[ 2, 12549, 1588, 2393, 42133, 7867, 416, 374, 27261, 13, 198, 2, 198, 2, 6434, 25, 5613, 20664, 278, 1279, 79, 2357, 31, 79, 2357, 5088, 278, 13, 785, 29, 198, 2, 4586, 9794, 25, 2805, 718, 11, 12131, 198, 2, 10289, 25, 3740, 137...
3.021053
285
# Copyright 2014-2018 The PySCF Developers. 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 appl...
[ 2, 15069, 1946, 12, 7908, 383, 9485, 6173, 37, 34152, 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...
3.568807
218
import pytest from moz_library.rental_books import RentalBooks
[ 11748, 12972, 9288, 198, 6738, 6941, 89, 62, 32016, 13, 1156, 282, 62, 12106, 1330, 371, 2470, 30650, 628 ]
3.368421
19
import aspose.pydrawing as drawing import aspose.slides as slides
[ 11748, 355, 3455, 13, 79, 5173, 1831, 278, 355, 8263, 198, 11748, 355, 3455, 13, 6649, 1460, 355, 19392 ]
3.421053
19
from django import forms from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.utils.translation import gettext as _ from dcim.models import DeviceRole, DeviceType, Platform, Region, Site, SiteGroup from extras.choices import * from extras.models import * fr...
[ 6738, 42625, 14208, 1330, 5107, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 18439, 13, 27530, 1330, 11787, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 11299, 19199, 13, 27530, 1330, 14041, 6030, 198, 6738, 42625, 14208, 13, 26791, 13, 4...
3.427673
318
#!/usr/bin/python3 ## write2cly.py - reads json (generated by sml_reader.py) from stdin ## - writes values to Corlysis time series InfluxDB ## ## Writes data from smart meter to time series database (InfluxDB) ## at Corlysis.com [1]. You need to configure your database and token ## in the config secti...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 18, 198, 198, 2235, 3551, 17, 66, 306, 13, 9078, 220, 220, 532, 9743, 33918, 357, 27568, 416, 895, 75, 62, 46862, 13, 9078, 8, 422, 14367, 259, 198, 2235, 220, 220, 220, 220, 220, 220, 220, ...
2.762108
702
# Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license # Copyright (C) 2003-2007, 2009-2011 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and ...
[ 2, 15069, 357, 34, 8, 360, 77, 2777, 7535, 25767, 669, 11, 766, 38559, 24290, 329, 2420, 286, 3180, 34, 5964, 198, 198, 2, 15069, 357, 34, 8, 5816, 12, 12726, 11, 3717, 12, 9804, 399, 6351, 388, 11, 3457, 13, 198, 2, 198, 2, 2...
2.318841
621
""" @file 01_test.py @brief Script for test @author Toshiki Nakamura, Yuki Nikaido, and Yohei Kawaguchi (Hitachi Ltd.) Copyright (C) 2020 Hitachi, Ltd. All right reserved. """ ######################################################################## # import default python-library ###############################...
[ 37811, 198, 2488, 7753, 220, 220, 5534, 62, 9288, 13, 9078, 198, 2488, 65, 3796, 220, 12327, 329, 1332, 198, 2488, 9800, 47922, 5580, 22255, 37324, 11, 575, 11308, 11271, 44354, 11, 290, 25455, 27392, 23043, 363, 22200, 357, 17889, 1429...
2.037096
5,068
import argparse import os parser = argparse.ArgumentParser(description="a simple parser") parser.add_argument("filename", type=str) parser.add_argument("lineno", nargs="+", type=int) parser.add_argument("--same_length", action=argparse.BooleanOptionalAction)
[ 11748, 1822, 29572, 198, 11748, 28686, 198, 198, 48610, 796, 1822, 29572, 13, 28100, 1713, 46677, 7, 11213, 2625, 64, 2829, 30751, 4943, 198, 198, 48610, 13, 2860, 62, 49140, 7203, 34345, 1600, 2099, 28, 2536, 8, 198, 48610, 13, 2860, ...
3.316456
79
from __future__ import absolute_import import six import string import warnings import pytz from collections import OrderedDict from dateutil.parser import parse as parse_date from django.db import models from django.utils import timezone from django.utils.translation import ugettext_lazy as _ from hashlib import md5...
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 198, 11748, 2237, 198, 11748, 4731, 198, 11748, 14601, 198, 11748, 12972, 22877, 198, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 198, 6738, 3128, 22602, 13, 48610, 1330, 21136, 355, ...
2.534418
3,443
""" Makes training and test dataset for nowcasting model using SEVIR """ # -*- coding: utf-8 -*- import argparse import logging import os import h5py os.environ["HDF5_USE_FILE_LOCKING"]='FALSE' import sys import numpy as np import tensorflow as tf from nowcast_generator import get_nowcast_test_generator # parser = ...
[ 37811, 198, 44, 1124, 3047, 290, 1332, 27039, 329, 783, 19913, 2746, 1262, 7946, 53, 4663, 198, 37811, 198, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 1822, 29572, 198, 11748, 18931, 198, 198, 11748, ...
2.851064
611
# The Original importer was created by Nick # Copyright (c) 2020 Nick import bpy import bmesh import os import array import math from mathutils import * from bpy_extras.image_utils import load_image from .cast import Cast, Model, Animation, Curve, NotificationTrack, Mesh, Skeleton, Bone, Material, File
[ 198, 2, 383, 13745, 848, 4337, 373, 2727, 416, 8047, 198, 2, 15069, 357, 66, 8, 12131, 8047, 198, 198, 11748, 275, 9078, 198, 11748, 275, 76, 5069, 198, 11748, 28686, 198, 11748, 7177, 198, 11748, 10688, 198, 6738, 10688, 26791, 1330,...
3.556818
88
# https://luma-oled.readthedocs.io/en/latest/software.html import os import sys import time import threading import usb4vc_oled from luma.core.render import canvas import RPi.GPIO as GPIO import usb4vc_usb_scan import usb4vc_shared import usb4vc_show_ev import usb4vc_check_update import json import subprocess from sub...
[ 2, 3740, 1378, 75, 7487, 12, 45342, 13, 961, 83, 704, 420, 82, 13, 952, 14, 268, 14, 42861, 14, 43776, 13, 6494, 198, 198, 11748, 28686, 198, 11748, 25064, 198, 11748, 640, 198, 11748, 4704, 278, 198, 11748, 38551, 19, 28435, 62, ...
2.037536
5,488
# Generated by Django 3.0.2 on 2020-02-24 23:16 from django.db import migrations, models
[ 2, 2980, 515, 416, 37770, 513, 13, 15, 13, 17, 319, 12131, 12, 2999, 12, 1731, 2242, 25, 1433, 198, 198, 6738, 42625, 14208, 13, 9945, 1330, 15720, 602, 11, 4981, 628 ]
2.84375
32
# -*- coding: utf-8 -*- ### # (C) Copyright [2019] Hewlett Packard Enterprise Development LP # # 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 #...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 21017, 198, 2, 357, 34, 8, 15069, 685, 23344, 60, 30446, 15503, 6400, 446, 14973, 7712, 18470, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, ...
2.214428
2,010
# -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function, unicode_literals) from .core import UnitedStates
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 6738, 11593, 37443, 834, 1330, 357, 48546, 62, 11748, 11, 7297, 11, 3601, 62, 8818, 11, 198, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, 22...
2.405797
69
#!/usr/bin/env python # -*- coding: utf-8 -*- import random import numpy as np # Generic data augmentation ########## # Images # ########## def horizontal_flip(p=0.5): return fc def vertical_flip(p=0.5): return fc def gaussian_noise(p=0.5, mean=0, sigma=0.02): return fc def black_vstripe(p=0.5, size=...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 11748, 4738, 198, 11748, 299, 32152, 355, 45941, 628, 198, 2, 42044, 1366, 16339, 14374, 198, 198, 7804, 2235, 198...
2.454373
526
from django.contrib import admin from django.contrib.gis import geos from leaflet.admin import LeafletGeoAdmin, LeafletGeoAdminMixin from .models import Lau1 from .models import Nuts3 from .models import Airport from .models import Road from .models import PublicTransportStop from .models import RailwayStation from dja...
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 3642, 822, 13, 70, 271, 1330, 4903, 418, 198, 6738, 12835, 1616, 13, 28482, 1330, 14697, 1616, 10082, 78, 46787, 11, 14697, 1616, 10082, 78, 46787, 35608, 259,...
3.371681
226
import logging import json import asyncio from google.protobuf import json_format from umbra.common.protobuf.umbra_grpc import MonitorBase from umbra.common.protobuf.umbra_pb2 import Instruction, Snapshot from umbra.monitor.tools import Tools logger = logging.getLogger(__name__) logging.getLogger("hpack").setLevel(...
[ 11748, 18931, 198, 11748, 33918, 198, 11748, 30351, 952, 198, 198, 6738, 23645, 13, 11235, 672, 3046, 1330, 33918, 62, 18982, 198, 198, 6738, 20810, 430, 13, 11321, 13, 11235, 672, 3046, 13, 2178, 430, 62, 2164, 14751, 1330, 18289, 1488...
3.12963
108
"""https://www.dndbeyond.com/spells/hunters-mark""" from unittest.mock import patch import dice from pycs.constant import ActionCategory from pycs.constant import SpellType from pycs.creature import Creature from pycs.effect import Effect from pycs.gear import Shortbow from pycs.spell import SpellAction from pycs.spel...
[ 37811, 5450, 1378, 2503, 13, 67, 358, 1350, 3243, 13, 785, 14, 46143, 82, 14, 20088, 1010, 12, 4102, 37811, 198, 198, 6738, 555, 715, 395, 13, 76, 735, 1330, 8529, 198, 11748, 17963, 198, 6738, 12972, 6359, 13, 9979, 415, 1330, 7561...
6.515152
165
import numpy as np
[ 11748, 299, 32152, 355, 45941, 628, 198 ]
3
7
from .gripper_model import GripperModel from .gripper_factory import gripper_factory from .gripper_tester import GripperTester from .panda_gripper import PandaGripper from .rethink_gripper import RethinkGripper from .robotiq_85_gripper import Robotiq85Gripper from .robotiq_three_finger_gripper import RobotiqThreeFinge...
[ 6738, 764, 70, 380, 2848, 62, 19849, 1330, 20914, 2848, 17633, 198, 6738, 764, 70, 380, 2848, 62, 69, 9548, 1330, 11120, 2848, 62, 69, 9548, 198, 6738, 764, 70, 380, 2848, 62, 4879, 353, 1330, 20914, 2848, 51, 7834, 198, 198, 6738, ...
2.50533
469
import logging logger = logging.getLogger(__name__) import random import chainercv import numpy as np from matplotlib import pyplot as plt from mpl_toolkits.mplot3d import Axes3D # NOQA from pose.hand_dataset.geometry_utils import normalize_joint_zyx from pose.hand_dataset.image_utils import normalize_depth # Dec...
[ 11748, 18931, 198, 198, 6404, 1362, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 198, 198, 11748, 4738, 198, 198, 11748, 6333, 2798, 85, 198, 11748, 299, 32152, 355, 45941, 198, 6738, 2603, 29487, 8019, 1330, 12972, 29487, ...
2.146986
1,211
#!/usr/bin/env python3 from flask import Flask app = Flask(__name__) if __name__ == "__main__": app.run()
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 6738, 42903, 1330, 46947, 198, 1324, 796, 46947, 7, 834, 3672, 834, 8, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 598, 13, 5143, ...
2.511111
45
import os import skimage.io from torch.nn import Module import torch.nn from torchvision.models import resnet18 from nn.speaker_dataset import Dataset # @UnusedImport os.environ['TORCH_MODEL_ZOO'] = '../data/' VIDTIMIT_PATH = '../data/vidtimit/' skimage.io.use_plugin('pil')
[ 11748, 28686, 198, 198, 11748, 1341, 9060, 13, 952, 198, 6738, 28034, 13, 20471, 1330, 19937, 198, 11748, 28034, 13, 20471, 198, 6738, 28034, 10178, 13, 27530, 1330, 581, 3262, 1507, 198, 6738, 299, 77, 13, 4125, 3110, 62, 19608, 292, ...
2.62037
108
# Copyright 2018 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
[ 2, 15069, 2864, 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, 7330...
3.734234
222