content
stringlengths
1
1.04M
input_ids
listlengths
1
774k
ratio_char_token
float64
0.38
22.9
token_count
int64
1
774k
from typing import List from unittest import TestCase class TestListMethods(TestCase): """ This test case is verifying basic list data type methods. """ def test_append(self) -> None: """ Test checks if given elements are adding to array """ flist: List[...] = [] for i in range(1, 4)...
[ 6738, 19720, 1330, 7343, 198, 6738, 555, 715, 395, 1330, 6208, 20448, 628, 198, 4871, 6208, 8053, 46202, 7, 14402, 20448, 2599, 198, 220, 220, 220, 37227, 770, 1332, 1339, 318, 45505, 4096, 1351, 1366, 2099, 5050, 13, 37227, 628, 220, ...
2.310811
444
#!/usr/bin/python import sys import os import subprocess from os.path import join, isdir import numpy as np import fileinput from numpy.random import permutation ##------------------------------------------------------------------ import torch from torch import autograd, nn, optim from torch.autograd import Variable im...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 11748, 25064, 198, 11748, 28686, 198, 11748, 850, 14681, 198, 6738, 28686, 13, 6978, 1330, 4654, 11, 318, 15908, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 2393, 15414, 198, 6738, 299, 321...
2.156104
2,998
from unittest import TestCase, main import os from tempfile import TemporaryDirectory from absl import logging import openfst_python as fst from pydecoders.graph.graph_builder import GraphBuilder if __name__ == '__main__': logging.set_verbosity(logging.INFO) main()
[ 198, 6738, 555, 715, 395, 1330, 6208, 20448, 11, 1388, 198, 11748, 28686, 198, 6738, 20218, 7753, 1330, 46042, 43055, 198, 6738, 2352, 75, 1330, 18931, 198, 11748, 1280, 69, 301, 62, 29412, 355, 277, 301, 198, 6738, 279, 5173, 721, 37...
3.172414
87
from setuptools import setup setup( name='cvxbind', version='1.0', description='Python Oculus Rift DK2 Driver', author='Jacob Panikulam', author_email='jpanikulam@ufl.edu', url='https://www.python.org/', entry_points={ "console_scripts": ["cvxbind=cvxbind.main:main"] }, pack...
[ 6738, 900, 37623, 10141, 1330, 9058, 198, 198, 40406, 7, 198, 220, 220, 220, 1438, 11639, 33967, 87, 21653, 3256, 198, 220, 220, 220, 2196, 11639, 16, 13, 15, 3256, 198, 220, 220, 220, 6764, 11639, 37906, 22334, 21222, 32975, 17, 1243...
2.176166
193
import tensorflow as tf def my_model(features): """ Base model definitions """ return tf.layers.dense(features, 1024)
[ 11748, 11192, 273, 11125, 355, 48700, 198, 198, 4299, 616, 62, 19849, 7, 40890, 2599, 198, 220, 37227, 7308, 2746, 17336, 37227, 198, 220, 1441, 48700, 13, 75, 6962, 13, 67, 1072, 7, 40890, 11, 28119, 8 ]
3.297297
37
""" This module contains class definitions for wFSAs. :Authors: - Wilker Aziz """ from collections import defaultdict from .symbol import Terminal class WDFSA(object): """ This is a deterministic wFSA. TODO: extend it to handle nondeterminism. """ def n_states(self): """Number of s...
[ 37811, 198, 1212, 8265, 4909, 1398, 17336, 329, 266, 10652, 1722, 13, 198, 198, 25, 30515, 669, 25, 532, 5187, 6122, 7578, 528, 198, 37811, 198, 198, 6738, 17268, 1330, 4277, 11600, 198, 6738, 764, 1837, 23650, 1330, 24523, 628, 198, ...
2.379341
2,275
import numpy as np import statsmodels.api as sm from timeit import default_timer as timer # https://stackoverflow.com/questions/7370801/how-to-measure-elapsed-time-in-python from .Model import Model ### EDIT BELOW HERE ### # fit the model # get the coefficients # get the pvalues # calculate th...
[ 11748, 299, 32152, 355, 45941, 198, 11748, 9756, 27530, 13, 15042, 355, 895, 198, 6738, 640, 270, 1330, 4277, 62, 45016, 355, 19781, 1303, 3740, 1378, 25558, 2502, 11125, 13, 785, 14, 6138, 507, 14, 4790, 32583, 486, 14, 4919, 12, 146...
3.151786
112
import numpy as np from dbsp_drp import splicing
[ 11748, 299, 32152, 355, 45941, 198, 198, 6738, 288, 24145, 62, 7109, 79, 1330, 4328, 6345, 198 ]
2.941176
17
import functools import warnings from sqlalchemy import Table, sql, types, MetaData from sqlalchemy.orm import relationship from sqlalchemy.orm.util import class_mapper from sqlalchemy.exc import SAWarning from sqlalchemy.ext.declarative import declarative_base from geoalchemy import Geometry, GeometryColumn from geo...
[ 11748, 1257, 310, 10141, 198, 11748, 14601, 198, 198, 6738, 44161, 282, 26599, 1330, 8655, 11, 44161, 11, 3858, 11, 30277, 6601, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 2776, 198, 6738, 44161, 282, 26599, 13, 579, 13, 22602, 1330, ...
2.701731
751
# Created by Kelvin_Clark on 1/31/2022, 12:59 PM from typing import Optional from sqlalchemy import and_ from sqlalchemy.orm import Session from app.data.entities.user import User from app.utils.security.password_util import verify_password_hash
[ 2, 15622, 416, 46577, 62, 43250, 319, 352, 14, 3132, 14, 1238, 1828, 11, 1105, 25, 3270, 3122, 198, 6738, 19720, 1330, 32233, 198, 198, 6738, 44161, 282, 26599, 1330, 290, 62, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 23575, 198, ...
3.438356
73
r1 = float(input('Primeiro segmento: ')) r2 = float(input('Segundo segmento: ')) r3 = float(input('Terceiro segmento: ')) if r1 < r2 + r3 and r2 < r1 + r3 and r3 < r2 + r1: print('Podem formar um triangulo') if r1 == r2 and r2 == r3 and r1 == r3: #pode ser feito também com: 'if r1 == r2 == r3:', sem utilizar a f...
[ 81, 16, 796, 12178, 7, 15414, 10786, 26405, 7058, 10618, 78, 25, 705, 4008, 198, 81, 17, 796, 12178, 7, 15414, 10786, 41030, 41204, 10618, 78, 25, 705, 4008, 198, 81, 18, 796, 12178, 7, 15414, 10786, 15156, 344, 7058, 10618, 78, 25,...
2.140152
264
import discord import random from discord.ext import commands token = open("token.txt", "r").read() client = discord.Client() bot = commands.Bot(command_prefix='!joker') @client.event #didnot work on bot join @client.event ##@bot.command() ##async def mention(ctx, user : discord.Member): ## await ctx....
[ 11748, 36446, 201, 198, 11748, 4738, 201, 198, 6738, 36446, 13, 2302, 1330, 9729, 201, 198, 30001, 796, 1280, 7203, 30001, 13, 14116, 1600, 366, 81, 11074, 961, 3419, 201, 198, 16366, 796, 36446, 13, 11792, 3419, 201, 198, 13645, 796, ...
2.105134
409
import os class Node(object): """ Convenience class for creating Qt Tree Model Views :param str name: name of the node :param Node parent: Node parent """ def find_child_by_name(self, name): """Get immediate child Node by its full name. This allows for searches t...
[ 11748, 28686, 201, 198, 201, 198, 201, 198, 4871, 19081, 7, 15252, 2599, 201, 198, 220, 220, 220, 37227, 201, 198, 220, 220, 220, 1482, 574, 1240, 1398, 329, 4441, 33734, 12200, 9104, 29978, 201, 198, 201, 198, 220, 220, 220, 1058, ...
2.243243
1,776
import asyncio import time from bcreg.credssubmitter import CONTROLLER_HEALTH_URL, CONTROLLER_HEALTH_WAIT, CONTROLLER_HEALTH_TIMEOUT, check_controller_health print("Pinging " + CONTROLLER_HEALTH_URL + " ...") try: loop = asyncio.get_event_loop() start_time = time.perf_counter() while (time.perf_counter(...
[ 198, 11748, 30351, 952, 198, 11748, 640, 198, 198, 6738, 47125, 2301, 13, 66, 445, 824, 549, 37974, 1330, 27342, 46, 3069, 1137, 62, 13909, 40818, 62, 21886, 11, 27342, 46, 3069, 1137, 62, 13909, 40818, 62, 15543, 2043, 11, 27342, 46,...
2.568
250
import pickle import os
[ 11748, 2298, 293, 201, 198, 11748, 28686, 201 ]
3.125
8
#!/usr/bin/env python 3 # MIT License # # Copyright (c) 2020 Carlos Gil Gonzalez # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the right...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 513, 198, 198, 2, 17168, 13789, 198, 2, 198, 2, 15069, 357, 66, 8, 12131, 17409, 10689, 24416, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11, 284, 597, 1048, 167...
3.59322
354
#!/usr/bin/env python3 from skinnywms.wmssvr import application application.run(debug=True, threaded=False)
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 6738, 29494, 86, 907, 13, 26377, 824, 37020, 1330, 3586, 198, 31438, 13, 5143, 7, 24442, 28, 17821, 11, 40945, 28, 25101, 8, 198 ]
3.176471
34
# -*- coding: utf-8 -*- import twitter import requests
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 17044, 198, 11748, 7007, 628 ]
2.8
20
import stp.play as play import stp.tactic as tactic from rj_gameplay.tactic import pass_tactic, pass_seek, nmark_tactic, goalie_tactic, clear_tactic, wall_tactic import stp.skill as skill import stp.role as role from stp.role.assignment.naive import NaiveRoleAssignment import stp.rc as rc from typing import Dict, Gene...
[ 11748, 336, 79, 13, 1759, 355, 711, 198, 11748, 336, 79, 13, 83, 12009, 355, 18543, 198, 198, 6738, 374, 73, 62, 6057, 1759, 13, 83, 12009, 1330, 1208, 62, 83, 12009, 11, 1208, 62, 36163, 11, 299, 4102, 62, 83, 12009, 11, 31071, ...
3.033493
209
import cv2 import numpy as np if __name__ == "__main__": img = cv2.imread('/Users/liyue/Desktop/QC/QRCode/土地謄本/0_origin.jpg') irimg = InRangeImage(img) cv2.waitKey(0) cv2.destroyAllWindows()
[ 11748, 269, 85, 17, 198, 11748, 299, 32152, 355, 45941, 198, 220, 220, 220, 220, 220, 220, 220, 220, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1298, 198, 220, 220, 220, 33705, 796, 269, 85, 17, 13, 320, 961, 10786, 1...
1.902655
113
import itertools import operator import random from fractions import Fraction from typing import Callable from raiden.exceptions import UndefinedMediationFee from raiden.transfer import channel, routes, secret_registry from raiden.transfer.architecture import Event, StateChange, SuccessOrError, TransitionResult from r...
[ 11748, 340, 861, 10141, 198, 11748, 10088, 198, 11748, 4738, 198, 6738, 49876, 1330, 376, 7861, 198, 6738, 19720, 1330, 4889, 540, 198, 198, 6738, 9513, 268, 13, 1069, 11755, 1330, 13794, 18156, 9921, 3920, 37, 1453, 198, 6738, 9513, 26...
2.548803
23,892
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
# coding: utf-8 # In[1]: import tensorflow as tf import utils as utils import aux_network_func as af import data_processor as dp #Alphabet maps objects to integer ids from alphabet import Alphabet import network as network import dill import numpy as np import os import time import datetime from tensorflow.python ...
[ 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 198, 2, 554, 58, 16, 5974, 198, 198, 11748, 11192, 273, 11125, 355, 48700, 198, 11748, 3384, 4487, 355, 3384, 4487, 198, 11748, 27506, 62, 27349, 62, 20786, 355, 6580, 198, 11748, 1366, 62, ...
2.522605
6,481
from django.urls import path from myMusicApp.albums.views import add_album, edit_album, delete_album, album_details urlpatterns = [ path('add/', add_album, name='add album'), path('edit/<int:pk>', edit_album, name='edit album'), path('delete/<int:pk>', delete_album, name='delete album'), path('details...
[ 6738, 42625, 14208, 13, 6371, 82, 1330, 3108, 198, 198, 6738, 616, 22648, 4677, 13, 40916, 82, 13, 33571, 1330, 751, 62, 40916, 11, 4370, 62, 40916, 11, 12233, 62, 40916, 11, 5062, 62, 36604, 198, 198, 6371, 33279, 82, 796, 685, 198...
2.748148
135
# x_7_7 # # from ast import pattern import re pin = '1234' # 暗証番号 pattern1 = r'[0-9]{4}' pattern2 = r'[2-9]{4}' pattern3 = r'[0-9]{3}' pattern4 = r'[0-9]{3, 5}' print(is_match(r'[0-9]{4}', pin))
[ 2, 2124, 62, 22, 62, 22, 198, 2, 198, 2, 198, 198, 6738, 6468, 1330, 3912, 198, 11748, 302, 628, 198, 198, 11635, 796, 705, 1065, 2682, 6, 220, 1303, 10545, 248, 245, 164, 101, 120, 45911, 103, 20998, 115, 198, 198, 33279, 16, 7...
1.624
125
from django.contrib import admin from django.utils.safestring import mark_safe # Register your models here. from .models import UserProfile,Article,Category,Siteinfo,Acimage admin.site.register(UserProfile,UserProfileAdmin) admin.site.register(Category,CategoryAdmin) admin.site.register(Article,ArticleAdmin) ...
[ 6738, 42625, 14208, 13, 3642, 822, 1330, 13169, 198, 6738, 42625, 14208, 13, 26791, 13, 49585, 395, 1806, 1330, 1317, 62, 21230, 198, 2, 17296, 534, 4981, 994, 13, 198, 198, 6738, 764, 27530, 1330, 11787, 37046, 11, 14906, 11, 27313, ...
3.432203
118
from ._fftconvolve import fftconvolve2d from ..structures.weights import gauss from math import ceil def fftgauss(img, sigma, theta=0, pad_type=None, **kwargs): ''' Smooths the input image with a gaussian kernel. Uses the fft method and allows specifying a custom pad type with **kwargs from numpy.pad docu...
[ 6738, 47540, 487, 83, 42946, 6442, 1330, 277, 701, 42946, 6442, 17, 67, 198, 6738, 11485, 7249, 942, 13, 43775, 1330, 31986, 1046, 198, 198, 6738, 10688, 1330, 2906, 346, 198, 198, 4299, 277, 701, 4908, 1046, 7, 9600, 11, 264, 13495, ...
2.80605
562
from flask import Flask,jsonify,request import os import json import codecs import xlwt from flask_apscheduler import APScheduler import time import random import math import xlrd app = Flask(__name__) if not os.path.exists("Database"): os.mkdir("Database") if not os.path.exists("Backup"): os.mkdir("Backup") ...
[ 6738, 42903, 1330, 46947, 11, 17752, 1958, 11, 25927, 198, 11748, 28686, 198, 11748, 33918, 198, 11748, 40481, 82, 198, 11748, 2124, 75, 46569, 198, 6738, 42903, 62, 499, 1416, 704, 18173, 1330, 3486, 50, 1740, 18173, 198, 11748, 640, 1...
2.39939
328
# -*- coding: utf-8 -*- # pylint: disable=wrong-import-position """ Function for computing expected number of photons to survive from a time-independent Cartesian-binned table. """ from __future__ import absolute_import, division, print_function __all__ = ['pexp_xyz'] __author__ = 'P. Eller, J.L. Lanfranchi' __lice...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 2, 279, 2645, 600, 25, 15560, 28, 36460, 12, 11748, 12, 9150, 198, 198, 37811, 198, 22203, 329, 14492, 2938, 1271, 286, 44378, 284, 7866, 422, 257, 198, 2435, 12, 3475...
2.493401
985
from django.apps import AppConfig
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 628 ]
3.888889
9
# Copyright 2011 OpenStack Foundation # Copyright 2011 Justin Santa Barbara # 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/l...
[ 2, 15069, 2813, 4946, 25896, 5693, 198, 2, 15069, 2813, 10799, 8909, 16685, 198, 2, 1439, 6923, 33876, 13, 198, 2, 198, 2, 220, 220, 220, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34156, 15341, 345, 743,...
3.265823
395
#!/usr/bin/env python2.7 # # Copyright 2017 Google Inc, 2019 Open GEE Contributors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 17, 13, 22, 198, 2, 198, 2, 15069, 2177, 3012, 3457, 11, 13130, 4946, 402, 6500, 25767, 669, 13, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, ...
2.61856
5,765
# # PySNMP MIB module HH3C-DLDP2-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HH3C-DLDP2-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 19:13:05 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2...
[ 2, 198, 2, 9485, 15571, 7378, 337, 9865, 8265, 47138, 18, 34, 12, 19260, 6322, 17, 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, ...
2.339271
3,593
import numpy as np from functools import reduce from app.utils import get_reflection_indexes, transformations_codes from app.config import ( X_MAX_TRANSLATED, X_MIN_TRANSLATED, Y_MAX_TRANSLATED, Y_MIN_TRANSLATED, MAX_NORMALIZED_VALUE, MIN_NORMALIZED_VALUE, ) def build_translation_matrix(Tx, ...
[ 11748, 299, 32152, 355, 45941, 198, 6738, 1257, 310, 10141, 1330, 4646, 198, 6738, 598, 13, 26791, 1330, 651, 62, 5420, 1564, 62, 9630, 274, 11, 38226, 62, 40148, 198, 6738, 598, 13, 11250, 1330, 357, 198, 220, 220, 220, 1395, 62, 2...
1.688274
2,422
""" Alternative calculation to the v_calc_staff_monthly set of views. This one differs by having period as a column. There is not a significant performance difference beteween the two until it comes to aggregation (which for the other, could require an unpivot). """ from planning_system.db.schema.views.finance.v_c...
[ 37811, 198, 49788, 17952, 284, 262, 410, 62, 9948, 66, 62, 28120, 62, 8424, 306, 900, 286, 5009, 13, 220, 198, 1212, 530, 24242, 416, 1719, 2278, 355, 257, 5721, 13, 1318, 318, 407, 257, 2383, 198, 26585, 3580, 731, 413, 6429, 262, ...
2.125894
699
""" 19. Remove Nth Node From End of List Given linked list: 1->2->3->4->5, and n = 2. After removing the second node from the end, the linked list becomes 1->2->3->5. """ # Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None ...
[ 37811, 201, 198, 1129, 13, 17220, 399, 400, 19081, 3574, 5268, 286, 7343, 201, 198, 15056, 6692, 1351, 25, 352, 3784, 17, 3784, 18, 3784, 19, 3784, 20, 11, 290, 299, 796, 362, 13, 201, 198, 201, 198, 3260, 10829, 262, 1218, 10139, ...
2.230263
152
import json import os from convlab2.util.multiwoz.state import default_state from convlab2.dst.rule.multiwoz.dst_util import normalize_value from convlab2.dst.dst import DST from convlab2.util.multiwoz.multiwoz_slot_trans import REF_SYS_DA class RuleDST(DST): """Rule based DST which trivially updates new values ...
[ 11748, 33918, 198, 11748, 28686, 198, 198, 6738, 3063, 23912, 17, 13, 22602, 13, 16680, 14246, 8590, 13, 5219, 1330, 4277, 62, 5219, 198, 6738, 3063, 23912, 17, 13, 67, 301, 13, 25135, 13, 16680, 14246, 8590, 13, 67, 301, 62, 22602, ...
1.663396
5,300
from toontown.coghq.SpecImports import * from toontown.toonbase import ToontownGlobals CogParent = 100007 CogParent1 = 100009 BattlePlace1 = 100004 BattlePlace2 = 100005 BattleCellId = 0 BattleCellId1 = 1 BattleCells = {BattleCellId: {'parentEntId': BattlePlace1, 'pos': Point3(0, 0, 0)}, BattleCellId1:...
[ 6738, 284, 756, 593, 13, 1073, 456, 80, 13, 22882, 3546, 3742, 1330, 1635, 198, 6738, 284, 756, 593, 13, 1462, 261, 8692, 1330, 1675, 756, 593, 9861, 672, 874, 198, 34, 519, 24546, 796, 1802, 25816, 198, 34, 519, 24546, 16, 796, 1...
2.315846
934
from typing import List, Optional, Sequence from sqlalchemy.orm import DeclarativeMeta from ..clause_binder.clause_binder import ClauseBinder from ..query import CRUDQuery from .select_provider import SelectProvider from .insert_provider import InsertProvider from .update_provider import UpdateProvider from .delete_pro...
[ 6738, 19720, 1330, 7343, 11, 32233, 11, 45835, 198, 6738, 44161, 282, 26599, 13, 579, 1330, 16691, 283, 876, 48526, 198, 6738, 11485, 565, 682, 62, 65, 5540, 13, 565, 682, 62, 65, 5540, 1330, 28081, 33, 5540, 198, 6738, 11485, 22766, ...
4.030928
97
INSTALLED_APPS = [ 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.gis', # all-auth 'django.contrib.sites', 'allauth', 'allauth.account', 'allauth.socialaccount', # o...
[ 38604, 7036, 1961, 62, 2969, 3705, 796, 685, 198, 220, 220, 220, 705, 28241, 14208, 13, 3642, 822, 13, 18439, 3256, 198, 220, 220, 220, 705, 28241, 14208, 13, 3642, 822, 13, 11299, 19199, 3256, 198, 220, 220, 220, 705, 28241, 14208, ...
2.215103
437
import warnings from amuse.datamodel import * warnings.warn("amuse.support.data.core has moved to amuse.datamodel", DeprecationWarning)
[ 11748, 14601, 198, 198, 6738, 26072, 13, 19608, 321, 375, 417, 1330, 1635, 198, 198, 40539, 654, 13, 40539, 7203, 321, 1904, 13, 11284, 13, 7890, 13, 7295, 468, 3888, 284, 26072, 13, 19608, 321, 375, 417, 1600, 2129, 8344, 341, 20361,...
3.111111
45
$NetBSD: patch-Lib_ctypes_macholib_dyld.py,v 1.1 2020/11/17 19:33:26 sjmulder Exp $ Support for macOS 11 and Apple Silicon (ARM). Mostly backported from: https://github.com/python/cpython/pull/22855 --- Lib/ctypes/macholib/dyld.py.orig 2020-08-15 05:20:16.000000000 +0000 +++ Lib/ctypes/macholib/dyld.py @@ -6,6 +6,11 ...
[ 3, 7934, 21800, 25, 8529, 12, 25835, 62, 310, 9497, 62, 76, 620, 349, 571, 62, 9892, 335, 13, 9078, 11, 85, 352, 13, 16, 12131, 14, 1157, 14, 1558, 678, 25, 2091, 25, 2075, 264, 73, 30300, 6499, 5518, 720, 198, 198, 15514, 329, ...
2.259259
540
from dataclasses import dataclass @dataclass class Client: """Class representing a pizza with ingredients.""" id: int likes: set dislikes: set
[ 6738, 4818, 330, 28958, 1330, 4818, 330, 31172, 628, 198, 31, 19608, 330, 31172, 198, 4871, 20985, 25, 198, 220, 220, 220, 37227, 9487, 10200, 257, 14256, 351, 9391, 526, 15931, 198, 220, 220, 220, 4686, 25, 493, 198, 220, 220, 220, ...
2.981481
54
from django.http import request from django.views import generic import OrchardVision.settings as settings import broker.models as models from broker.models import Tree from html import escape import json
[ 6738, 42625, 14208, 13, 4023, 1330, 2581, 198, 6738, 42625, 14208, 13, 33571, 1330, 14276, 198, 198, 11748, 1471, 30215, 44206, 13, 33692, 355, 6460, 198, 11748, 20426, 13, 27530, 355, 4981, 198, 6738, 20426, 13, 27530, 1330, 12200, 198, ...
4.291667
48
__author__ = 'Davide Monfrecola' from phantomrestclient import auth from phantomrestclient import launchconfigurations from phantomrestclient import domains from phantomrestclient import sites from phantomrestclient import phantomrequests # only for testing purpouse if __name__ == "__main__": #d = domains.Domains...
[ 834, 9800, 834, 796, 705, 35, 615, 485, 2892, 19503, 4033, 64, 6, 198, 198, 6738, 36381, 2118, 16366, 1330, 6284, 198, 6738, 36381, 2118, 16366, 1330, 4219, 11250, 20074, 198, 6738, 36381, 2118, 16366, 1330, 18209, 198, 6738, 36381, 211...
3.136986
146
# -*- coding: utf-8 -*- import tkinter root = tkinter.Tk() root.wm_title("Tkinter04 Demo") label1 = tkinter.Label(root, text=u"账号:").grid(row=0, sticky="w") label2 = tkinter.Label(root, text=u"密码:").grid(row=1, sticky="w") label3 = tkinter.Label(root, text=u"") var = tkinter.Variable() var.set("tester") ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 201, 198, 11748, 256, 74, 3849, 201, 198, 201, 198, 15763, 796, 256, 74, 3849, 13, 51, 74, 3419, 201, 198, 15763, 13, 26377, 62, 7839, 7203, 51, 74, 3849, 3023, 34588, 49...
1.214286
966
#!/usr/bin/env python # import os import femagtools.jhb
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 198, 11748, 28686, 198, 11748, 2796, 363, 31391, 13, 73, 71, 65, 628, 628 ]
2.458333
24
import logging from pytest_play.providers import BaseProvider from sqlalchemy.pool import NullPool from sqlalchemy import ( create_engine, text, ) class SQLProvider(BaseProvider): """ SQL provider """ def get_db(self, database_url): """ Return a cached db engine if available """ if no...
[ 11748, 18931, 198, 6738, 12972, 9288, 62, 1759, 13, 15234, 4157, 1330, 7308, 29495, 198, 6738, 44161, 282, 26599, 13, 7742, 1330, 35886, 27201, 198, 6738, 44161, 282, 26599, 1330, 357, 198, 220, 220, 220, 2251, 62, 18392, 11, 198, 220, ...
2.069921
758
import torch from .common import QLayer from ..functions import xnor_connect import warnings warnings.simplefilter("always",DeprecationWarning) warnings.warn("Module not finished due to gradient implementation on conv layer !", ImportWarning)
[ 11748, 28034, 220, 198, 6738, 764, 11321, 1330, 1195, 49925, 198, 6738, 11485, 12543, 2733, 1330, 2124, 13099, 62, 8443, 198, 11748, 14601, 198, 40539, 654, 13, 36439, 24455, 7203, 33770, 1600, 12156, 8344, 341, 20361, 8, 198, 40539, 654,...
4.04918
61
def test_dump_molecular_structures( request, tmp_path, molecule_db, name_db, case_data, ): """ Dump molecular structures. This test dumps molecules to files and to a MongoDB database so that they can be visually inspected. Parameters ---------- request : :class:`pytest....
[ 4299, 1332, 62, 39455, 62, 76, 2305, 10440, 62, 7249, 942, 7, 198, 220, 220, 220, 2581, 11, 198, 220, 220, 220, 45218, 62, 6978, 11, 198, 220, 220, 220, 27756, 62, 9945, 11, 198, 220, 220, 220, 1438, 62, 9945, 11, 198, 220, 220,...
2.702312
346
# app/conversations/models.py # Django modules from django.db import models # Locals from app.users.models import MyCustomUser # Create your models here. # NAMA MODEL/TABEL: Conversation # NAMA MODEL/TABEL: Message
[ 2, 598, 14, 1102, 690, 602, 14, 27530, 13, 9078, 198, 198, 2, 37770, 13103, 198, 6738, 42625, 14208, 13, 9945, 1330, 4981, 198, 198, 2, 15181, 874, 198, 6738, 598, 13, 18417, 13, 27530, 1330, 2011, 15022, 12982, 198, 198, 2, 13610, ...
3
74
import angr
[ 11748, 281, 2164, 628 ]
3.25
4
from functools import wraps from evalml.exceptions import PipelineNotYetFittedError from evalml.utils.base_meta import BaseMeta class PipelineBaseMeta(BaseMeta): """Metaclass that overrides creating a new pipeline by wrapping methods with validators and setters""" @classmethod def check_for_fit(cls, m...
[ 198, 198, 6738, 1257, 310, 10141, 1330, 27521, 198, 198, 6738, 5418, 4029, 13, 1069, 11755, 1330, 37709, 3673, 11486, 37, 2175, 12331, 198, 6738, 5418, 4029, 13, 26791, 13, 8692, 62, 28961, 1330, 7308, 48526, 628, 198, 4871, 37709, 1488...
2.877717
368
import scrappers import scrappers.mixins class FoxNews(scrappers.mixins.RSSScrapper, scrappers.Scrapper): """The Fox News RSS feeds scrapper. """
[ 11748, 19320, 11799, 198, 11748, 19320, 11799, 13, 19816, 1040, 628, 198, 4871, 5426, 9980, 7, 1416, 430, 11799, 13, 19816, 1040, 13, 49, 5432, 3351, 430, 2848, 11, 19320, 11799, 13, 3351, 430, 2848, 2599, 198, 220, 220, 220, 37227, 4...
2.836364
55
#!/usr/bin/env python # Copyright (c) 2018 Anish Athalye (me@anishathalye.com) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 198, 2, 15069, 357, 66, 8, 2864, 1052, 680, 13548, 3400, 68, 357, 1326, 31, 7115, 776, 3400, 68, 13, 785, 8, 198, 2, 198, 2, 2448, 3411, 318, 29376, 7520, 11, 1479, 286, 3877, 11...
3.435208
409
from faker import Faker from generators.uniform_distribution_gen import UniformDistributionGen from generators.random_relation_gen import RandomRelationGen from base.field_base import FieldBase from generators.normal_distribution_gen import NormalDistributionGen from generators.first_name_generator import FirstNameGene...
[ 6738, 277, 3110, 1330, 376, 3110, 198, 6738, 27298, 13, 403, 6933, 62, 17080, 3890, 62, 5235, 1330, 35712, 20344, 3890, 13746, 198, 6738, 27298, 13, 25120, 62, 49501, 62, 5235, 1330, 14534, 6892, 341, 13746, 198, 6738, 2779, 13, 3245, ...
2.7184
625
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the ...
[ 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, 257, 4866, 286, 262, 13789, 379, 198, 19...
2.229281
12,609
import os import sys import json import argparse import numpy as np import nibabel as nib import scipy.io as sio from matplotlib import cm from json import encoder from matplotlib import colors as mcolors encoder.FLOAT_REPR = lambda o: format(o, '.2f') def build_wmc(tck_file, tractID_list): """ Build the wm...
[ 11748, 28686, 198, 11748, 25064, 198, 11748, 33918, 198, 11748, 1822, 29572, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 33272, 9608, 355, 33272, 198, 11748, 629, 541, 88, 13, 952, 355, 264, 952, 198, 6738, 2603, 29487, 8019, 1330, ...
2.219891
1,287
import environs env = environs.Env() env.read_env() APP_DEBUG = env.bool('APP_DEBUG', False)
[ 11748, 17365, 343, 684, 198, 198, 24330, 796, 17365, 343, 684, 13, 4834, 85, 3419, 198, 24330, 13, 961, 62, 24330, 3419, 198, 198, 24805, 62, 30531, 796, 17365, 13, 30388, 10786, 24805, 62, 30531, 3256, 10352, 8, 198 ]
2.435897
39
#Todo functions punctuation = ",./?'|}{[]=+-_;:<>!@#$%^&*()`~" fd = open("FDText.txt") hf = open("huckfinn.txt") fdText=fd.read() hfText=hf.read() fdArray = fdText.split() hfArray = hfText.split() fdArray2 = cleantext(fdArray) hfArray2 = cleantext(hfArray) fd.close() hf.close() print(hfArray2)
[ 198, 2, 51, 24313, 5499, 628, 628, 198, 79, 16260, 2288, 796, 33172, 19571, 8348, 91, 18477, 21737, 28, 10, 12, 62, 26, 25, 27, 29, 0, 31, 29953, 4, 61, 5, 9, 3419, 63, 93, 1, 198, 16344, 796, 1280, 7203, 26009, 8206, 13, 1411...
2.039735
151
from random import randint from random import choice from random import uniform from collections import namedtuple from typing import List, Dict _Options = namedtuple("Options", ["vowels", "consonants", "max_initial_consonants", "m...
[ 6738, 4738, 1330, 43720, 600, 198, 6738, 4738, 1330, 3572, 198, 6738, 4738, 1330, 8187, 198, 6738, 17268, 1330, 3706, 83, 29291, 198, 6738, 19720, 1330, 7343, 11, 360, 713, 628, 198, 62, 29046, 796, 3706, 83, 29291, 7203, 29046, 1600, ...
2
508
import os import sys sys.path.append(os.path.dirname(__file__)) from libs.AbstractLanguageDetectionModel import AbstractLanguageDetectionModel from libs.langfromchars.mobi.LangFromChars import LangFromChars
[ 11748, 28686, 198, 11748, 25064, 198, 17597, 13, 6978, 13, 33295, 7, 418, 13, 6978, 13, 15908, 3672, 7, 834, 7753, 834, 4008, 198, 198, 6738, 9195, 82, 13, 23839, 32065, 11242, 3213, 17633, 1330, 27741, 32065, 11242, 3213, 17633, 198, ...
3.296875
64
# coding: utf-8 # # Copyright 2021 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
[ 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 198, 2, 15069, 33448, 383, 9385, 544, 46665, 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, 74...
3.59375
320
import sys import gpiod import time import liblo with gpiod.Chip('gpiochip0') as chip: if (len(sys.argv) > 1): # Use arg specified line line = chip.get_line(int(sys.argv[1])) else: # TXD1 (GPIO14) line = chip.get_line(14) line.request(consumer=sys.argv[0], type=gpiod.LINE_RE...
[ 11748, 25064, 198, 11748, 27809, 2101, 198, 11748, 640, 198, 11748, 9195, 5439, 198, 198, 4480, 27809, 2101, 13, 49985, 10786, 31197, 952, 35902, 15, 11537, 355, 11594, 25, 198, 220, 220, 220, 611, 357, 11925, 7, 17597, 13, 853, 85, 8...
1.90133
902
# from django.test import TestCase import unittest import requests, os, json, sys, logging from django.http import JsonResponse from nyokaserver.nyokaServerClass import NyokaServer
[ 2, 422, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 11748, 555, 715, 395, 198, 11748, 7007, 11, 28686, 11, 33918, 11, 25064, 11, 18931, 198, 6738, 42625, 14208, 13, 4023, 1330, 449, 1559, 31077, 198, 6738, 299, 88, 482, 6005, 332,...
3.480769
52
#!/usr/bin/python import urllib import urllib2 from collections import OrderedDict as OrderedDict import json import base64 import logging import os # own modules from datalogger import Timeseries as Timeseries from datalogger import TimeseriesArray as TimeseriesArray from datalogger import TimeseriesArrayStats as Tim...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 198, 11748, 2956, 297, 571, 198, 11748, 2956, 297, 571, 17, 198, 6738, 17268, 1330, 14230, 1068, 35, 713, 355, 14230, 1068, 35, 713, 198, 11748, 33918, 198, 11748, 2779, 2414, 198, 11748, 189...
2.099271
6,588
# lower, upper, title, capitalize, isupper, islower # istitle, swapcase g = "HI" "HI".lower() # firsth method g.lower() # second method print(g.lower()) print(g) g = g.lower() print(g) # ######################################################## # g = "Python" print(g.lower()) # "Python" >> "python" print(g.upper(...
[ 2, 2793, 11, 6727, 11, 3670, 11, 35160, 11, 318, 45828, 11, 318, 21037, 198, 2, 318, 7839, 11, 16075, 7442, 198, 70, 796, 366, 25374, 1, 198, 198, 1, 25374, 1911, 21037, 3419, 1303, 717, 71, 2446, 198, 70, 13, 21037, 3419, 220, ...
2.498498
333
"""Variables prefixed with `DEFAULT` should be able to be overridden by configuration file and command-line arguments.""" UNIT = 100000000 # The same across assets. # Versions VERSION_MAJOR = 9 VERSION_MINOR = 59 VERSION_REVISION = 4 VERSION_STRING = str(VERSION_MAJOR) + '.' + str(VERSION_MINOR) + '.' + str(V...
[ 37811, 23907, 2977, 7694, 2966, 351, 4600, 7206, 38865, 63, 815, 307, 1498, 284, 307, 23170, 4651, 416, 198, 11250, 3924, 2393, 290, 3141, 12, 1370, 7159, 526, 15931, 198, 198, 4944, 2043, 796, 1802, 10535, 220, 220, 220, 220, 220, 22...
2.260174
1,376
from .models import Profile, Project, Vote from django.forms import ModelForm, widgets from django import forms
[ 6738, 764, 27530, 1330, 13118, 11, 4935, 11, 19175, 198, 6738, 42625, 14208, 13, 23914, 1330, 9104, 8479, 11, 40803, 198, 6738, 42625, 14208, 1330, 5107 ]
4.269231
26
#!/usr/bin/env python # -*- coding: utf-8 -*- ################################################################### # Author: Mu yanru # Date : 2019.2 # Email : muyanru345@163.com ################################################################### import random from dayu_widgets3.combo_box import MComboBox from dayu_w...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 29113, 29113, 21017, 198, 2, 6434, 25, 8252, 331, 272, 622, 198, 2, 7536, 220, 1058, 13130, 13, 17, 198, 2, 9570, 1...
2.949807
259
import librosa import numpy as np import scipy.signal import torch import textgrid import pickle import os import torch import torch.nn.functional as F import s3prl.hub as hub import w2v2_model_jeff WINDOWS = {'hamming': scipy.signal.hamming, 'hann': scipy.signal.hann, 'blackman': scipy.signal...
[ 11748, 9195, 4951, 64, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 629, 541, 88, 13, 12683, 282, 198, 11748, 28034, 198, 11748, 2420, 25928, 198, 11748, 2298, 293, 198, 11748, 28686, 198, 198, 11748, 28034, 220, 198, 11748, 28034, 1...
2.037098
3,046
from pytl866.context import Tl866Context from pytl866.driver import DriverError, \ VPP_98, VPP_126, VPP_140, VPP_166, VPP_144, VPP_171, VPP_185, VPP_212, \ VDD_30, VDD_35, VDD_46, VDD_51, VDD_43, VDD_48, VDD_60, VDD_65
[ 6738, 12972, 28781, 42240, 13, 22866, 1330, 309, 75, 42240, 21947, 198, 6738, 12972, 28781, 42240, 13, 26230, 1330, 12434, 12331, 11, 3467, 198, 220, 220, 220, 569, 10246, 62, 4089, 11, 569, 10246, 62, 19420, 11, 569, 10246, 62, 15187, ...
2.026786
112
#!/usr/bin/env python3 # coding: utf-8 # Copyright 2019 Huawei Technologies Co., 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 ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 2, 19617, 25, 3384, 69, 12, 23, 198, 2, 15069, 13130, 43208, 21852, 1766, 1539, 12052, 198, 2, 198, 2, 49962, 739, 262, 24843, 13789, 11, 10628, 362, 13, 15, 357, 1169, 366, 34...
2.226685
4,257
from typing import List, Dict, Iterable, Union, Callable from enum import Enum, auto import json from pathlib import Path from pysam import VariantRecord VariantRecords = Iterable[VariantRecord] Chrom = str ChromSizes = Dict[Chrom, int] class SeqRegion: """Mapping between vcf records in two coordinate spaces ...
[ 6738, 19720, 1330, 7343, 11, 360, 713, 11, 40806, 540, 11, 4479, 11, 4889, 540, 198, 6738, 33829, 1330, 2039, 388, 11, 8295, 198, 11748, 33918, 198, 6738, 3108, 8019, 1330, 10644, 198, 198, 6738, 279, 893, 321, 1330, 38215, 23739, 198...
2.939189
148
import sys from setuptools import setup, find_packages from setuptools.command.test import test as TestCommand __version__ = "unknown" # "import" __version__ for line in open("sfs/__init__.py"): if line.startswith("__version__"): exec(line) break # See http://pytest.org/latest/goodpractises.html...
[ 11748, 25064, 198, 6738, 900, 37623, 10141, 1330, 9058, 11, 1064, 62, 43789, 198, 6738, 900, 37623, 10141, 13, 21812, 13, 9288, 1330, 1332, 355, 6208, 21575, 198, 198, 834, 9641, 834, 796, 366, 34680, 1, 198, 198, 2, 366, 11748, 1, ...
2.538126
459
import csv import os from statistics import mean csvpath = os.path.join('resources', 'budget_data.csv') output_file = os.path.join('resources', 'Financial_Analysis.txt') with open(csvpath, 'r', newline='') as csvfile: csvreader = csv.reader(csvfile, delimiter=",") # Defining our dictionaries and lists da...
[ 11748, 269, 21370, 198, 11748, 28686, 198, 6738, 7869, 1330, 1612, 198, 198, 40664, 6978, 796, 28686, 13, 6978, 13, 22179, 10786, 37540, 3256, 705, 37315, 62, 7890, 13, 40664, 11537, 198, 22915, 62, 7753, 796, 28686, 13, 6978, 13, 22179...
2.902796
751
import helpers from sensory_cloud.config import Config from sensory_cloud.generated.common.common_pb2 import ServerHealthResponse from sensory_cloud.services.health_service import HealthService if __name__ == "__main__": server_health = health_service_example()
[ 11748, 49385, 198, 198, 6738, 23326, 62, 17721, 13, 11250, 1330, 17056, 198, 6738, 23326, 62, 17721, 13, 27568, 13, 11321, 13, 11321, 62, 40842, 17, 1330, 9652, 18081, 31077, 198, 6738, 23326, 62, 17721, 13, 30416, 13, 13948, 62, 15271,...
3.75
72
from genologics.lims import * from genologics_sql.utils import * from genologics.config import BASEURI, USERNAME, PASSWORD from genologics_sql.tables import Process from pprint import pprint import genologics.entities as gent import LIMS2DB.utils as lutils import LIMS2DB.classes as lclasses if __name__ == "__main...
[ 198, 6738, 2429, 928, 873, 13, 2475, 82, 1330, 1635, 198, 6738, 2429, 928, 873, 62, 25410, 13, 26791, 1330, 1635, 198, 6738, 2429, 928, 873, 13, 11250, 1330, 49688, 47269, 11, 1294, 1137, 20608, 11, 41752, 54, 12532, 198, 6738, 2429, ...
2.404082
245
"""Base classes for CoverageProviders. The CoverageProviders themselves are in the file corresponding to the service that needs coverage -- overdrive.py, metadata_wrangler.py, and so on. """ import logging from lxml import etree from nose.tools import set_trace from StringIO import StringIO from core.coverage import (...
[ 37811, 14881, 6097, 329, 33998, 15946, 4157, 13, 198, 198, 464, 33998, 15946, 4157, 2405, 389, 287, 262, 2393, 11188, 284, 262, 198, 15271, 326, 2476, 5197, 1377, 625, 19472, 13, 9078, 11, 20150, 62, 18351, 49910, 13, 9078, 11, 290, 1...
2.666352
2,116
from .__Fundamental_6 import * import typing import System.IO import System.Collections.Generic import System import QuantConnect.Data.Fundamental.MultiPeriodField import QuantConnect.Data.Fundamental import QuantConnect.Data import QuantConnect import datetime class BeginningCashPositionCashFlowStatement(QuantConnec...
[ 6738, 764, 834, 24553, 6860, 62, 21, 1330, 1635, 198, 11748, 19720, 198, 11748, 4482, 13, 9399, 198, 11748, 4482, 13, 5216, 26448, 13, 46189, 198, 11748, 4482, 198, 11748, 16972, 13313, 13, 6601, 13, 24553, 6860, 13, 29800, 5990, 2101, ...
3.172048
2,168
linux_only_targets="blink bluetooth.ble_bqb netmgrapp bluetooth.blemesh_srv bluetooth.blemesh uDataapp bluetooth.blemesh_cli bluetooth.bleadv wifihalapp hdlcapp.hdlcserver acapp helloworld bluetooth.bleperipheral helloworld_nocli"
[ 23289, 62, 8807, 62, 83, 853, 1039, 2625, 2436, 676, 48208, 16271, 13, 903, 62, 65, 80, 65, 2010, 11296, 430, 381, 48208, 16271, 13, 11253, 5069, 62, 27891, 85, 48208, 16271, 13, 11253, 5069, 334, 6601, 1324, 48208, 16271, 13, 11253, ...
2.717647
85
"""Entity for Zigbee Home Automation.""" import asyncio import logging import time from homeassistant.core import callback from homeassistant.helpers import entity from homeassistant.helpers.device_registry import CONNECTION_ZIGBEE from homeassistant.helpers.dispatcher import async_dispatcher_connect from homeassista...
[ 37811, 32398, 329, 24992, 20963, 5995, 17406, 341, 526, 15931, 198, 198, 11748, 30351, 952, 198, 11748, 18931, 198, 11748, 640, 198, 198, 6738, 1363, 562, 10167, 13, 7295, 1330, 23838, 198, 6738, 1363, 562, 10167, 13, 16794, 364, 1330, ...
2.220614
2,833
#coding=utf-8 from __future__ import absolute_import, unicode_literals # https://github.com/qiniu/python-sdk/blob/master/qiniu/services/storage/uploader.py # https://developer.qiniu.com/kodo/sdk/python from qiniu import Auth,put_file,put_data,BucketManager from .utils import QiniuError, bucket_lister from os.path impor...
[ 2, 66, 7656, 28, 40477, 12, 23, 198, 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 11, 28000, 1098, 62, 17201, 874, 198, 2, 3740, 1378, 12567, 13, 785, 14, 80, 5362, 84, 14, 29412, 12, 21282, 74, 14, 2436, 672, 14, 9866, 14, 8...
1.411422
3,257
# -*- coding: utf-8 -*- import numpy as np import pandas as pd from sklearn.externals import joblib from qstrader.price_parser import PriceParser from qstrader.event import (SignalEvent, EventType) from qstrader.strategy.base import AbstractStrategy class IntradayMachineLearningPredictionStrategy(AbstractStrategy): ...
[ 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 198, 198, 6738, 1341, 35720, 13, 1069, 759, 874, 1330, 1693, 8019, 198, 6738, 10662, 2536, 5067, 13,...
2
1,166
#!/usr/bin/env python3 import argparse import os from junit_xml import TestSuite, TestCase if __name__ == "__main__": ap = argparse.ArgumentParser(add_help=True) ap.add_argument("-o", "--out", default=None, help="Output file.") ap.add_argument("input", help="input file") args = ap.parse_args() ...
[ 2, 48443, 14629, 14, 8800, 14, 24330, 21015, 18, 198, 198, 11748, 1822, 29572, 198, 11748, 28686, 198, 6738, 10891, 270, 62, 19875, 1330, 6208, 5606, 578, 11, 6208, 20448, 628, 198, 361, 11593, 3672, 834, 6624, 366, 834, 12417, 834, 1...
2.221843
293
import os import tensorflow as tf
[ 11748, 28686, 198, 198, 11748, 11192, 273, 11125, 355, 48700, 628 ]
3.272727
11
from models import MonModel, change_time # from models.user import User import models.user # from models.tweet import Tweet # 这样不行 import models.tweet # 为了避免和comment交叉引用 import time class Comment(MonModel): """ __fields__ = [ '_id', ('id', int, -1), ('type', str, ''), ('deleted', bool, False)...
[ 6738, 4981, 1330, 2892, 17633, 11, 1487, 62, 2435, 198, 2, 422, 4981, 13, 7220, 1330, 11787, 198, 11748, 4981, 13, 7220, 198, 2, 422, 4981, 13, 83, 7277, 1330, 18752, 220, 1303, 5525, 123, 247, 43718, 115, 38834, 26193, 234, 198, 11...
1.989071
549
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Feb 21 14:04:11 2020 @author: ICARD """ #module systeme : import os.path import os import threading import configparser Config = configparser.ConfigParser() verrou = threading.Lock() def creer_config_defaut(): ''' Ici dans la fonction creer_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, 19480, 3158, 2310, 1478, 25, 3023, 25, 1157, 12131, 198, 198, 31, 9800, 25, 12460, 9795, ...
2.158666
1,979
#Done by Carlos Amaral (19/07/2020) #Try 15.1- Cubes import matplotlib.pyplot as plt x_values = [1, 2, 3, 4, 5] y_values = [1, 8, 27, 64, 125] plt.style.use('seaborn') fig, ax = plt.subplots() ax.plot(x_values, y_values, linewidth = 3) #Set chart title and label axes ax.set_title("Cubic Numbers", fontsize = 24) ...
[ 2, 45677, 416, 17409, 44291, 282, 357, 1129, 14, 2998, 14, 42334, 8, 628, 198, 2, 23433, 1315, 13, 16, 12, 7070, 274, 198, 198, 11748, 2603, 29487, 8019, 13, 9078, 29487, 355, 458, 83, 220, 198, 198, 87, 62, 27160, 796, 685, 16, ...
2.403941
203
## https://github.com/bast/somepackage ## https://github.com/navdeep-G/samplemod if __name__ == '__main__': BoardFeet = CalcBoardFeet(8,1,LengthInFeet=8) print(BoardFeet) BoardFeet = CalcBoardFeet(7,2,LengthInInches=120) print(BoardFeet)
[ 2235, 3740, 1378, 12567, 13, 785, 14, 65, 459, 14, 11246, 26495, 198, 2235, 3740, 1378, 12567, 13, 785, 14, 28341, 22089, 12, 38, 14, 39873, 4666, 628, 628, 198, 361, 11593, 3672, 834, 6624, 705, 834, 12417, 834, 10354, 628, 220, 22...
2.354545
110
import random for i in range(5): print(random.randint(1, 10))
[ 11748, 4738, 198, 1640, 1312, 287, 2837, 7, 20, 2599, 198, 220, 220, 220, 3601, 7, 25120, 13, 25192, 600, 7, 16, 11, 838, 4008 ]
2.6
25
""" This automation Quarantines and EC2 Instance, identified as above or below the configured threshold by Hyperglance Rule(s) This automation will operate across accounts, where the appropriate IAM Role exists. """ import logging logger = logging.getLogger() logger.setLevel(logging.INFO) def hyperglance_automati...
[ 37811, 198, 1212, 22771, 2264, 4741, 1127, 290, 13182, 17, 2262, 590, 11, 5174, 355, 2029, 393, 2174, 262, 17839, 11387, 198, 1525, 15079, 4743, 590, 14330, 7, 82, 8, 198, 198, 1212, 22771, 481, 8076, 1973, 5504, 11, 810, 262, 5035, ...
2.26959
1,072
from plotly.subplots import make_subplots import plotly.graph_objs as go import numpy as np import pandas as pd
[ 6738, 7110, 306, 13, 7266, 489, 1747, 1330, 787, 62, 7266, 489, 1747, 198, 11748, 7110, 306, 13, 34960, 62, 672, 8457, 355, 467, 198, 11748, 299, 32152, 355, 45941, 198, 11748, 19798, 292, 355, 279, 67, 628, 628, 628, 628 ]
2.902439
41
from decimal import Decimal from django.test import TestCase from cartridge.shop.models import Cart from cartridge.shop.tests import ShopTests from cartridgetax.handler import default_billship_handler
[ 6738, 32465, 1330, 4280, 4402, 198, 198, 6738, 42625, 14208, 13, 9288, 1330, 6208, 20448, 198, 198, 6738, 26904, 13, 24643, 13, 27530, 1330, 13690, 198, 6738, 26904, 13, 24643, 13, 41989, 1330, 13705, 51, 3558, 198, 198, 6738, 6383, 605...
3.745455
55
import logging import math import numpy as np #TODO: Remove this line from PySide.QtGui import QGraphicsPolygonItem, QImage from PySide.QtGui import QColor, QGraphicsPixmapItem, QPixmap from PySide.QtCore import QPoint, QPointF, Qt from traits.api import Bool, Enum, DelegatesTo, Dict, HasTraits, Instance, Int, List...
[ 11748, 18931, 198, 11748, 10688, 198, 198, 11748, 299, 32152, 355, 45941, 198, 198, 2, 51, 3727, 46, 25, 17220, 428, 1627, 198, 6738, 9485, 24819, 13, 48, 83, 8205, 72, 1330, 1195, 18172, 34220, 14520, 7449, 11, 1195, 5159, 198, 198, ...
2.562572
871
from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ class MusicConfig(AppConfig): """Configuration for ``Music`` app.""" name = 'apps.music' verbose_name = _('Music')
[ 6738, 42625, 14208, 13, 18211, 1330, 2034, 16934, 198, 6738, 42625, 14208, 13, 26791, 13, 41519, 1330, 334, 1136, 5239, 62, 75, 12582, 355, 4808, 628, 198, 4871, 7849, 16934, 7, 4677, 16934, 2599, 198, 220, 220, 220, 37227, 38149, 329, ...
3.041667
72
#!/usr/bin/python # -*- coding: utf-8 -*- # Use Python 3 ! # Filter 2gram files to keep cities that really exist # In : # "../_data/2gram-to/" directory # "../_out/inverted_cities.json" # Out : # "../_out/2gram-to-cities/" directory # Prerequisite: # 01, 02 import csv import json import time import os conj = "t...
[ 2, 48443, 14629, 14, 8800, 14, 29412, 198, 2, 532, 9, 12, 19617, 25, 3384, 69, 12, 23, 532, 9, 12, 198, 198, 2, 5765, 11361, 513, 5145, 198, 2, 25853, 362, 4546, 3696, 284, 1394, 4736, 326, 1107, 2152, 198, 2, 554, 1058, 198, ...
2.424171
844
import os.path as osp from glob import glob from .base_flow import FlowDataset
[ 11748, 28686, 13, 6978, 355, 267, 2777, 198, 6738, 15095, 1330, 15095, 198, 198, 6738, 764, 8692, 62, 11125, 1330, 27782, 27354, 292, 316, 628 ]
3.24
25
import io import subprocess import logging import os import gzip from .vfs import VFSFile log = logging.getLogger(__name__) class GzipReader(VFSFile, io.RawIOBase): """A pipe object that takes a file-like object as input and acts itself like a stream, decompressing data on the fly.""" __module__ = 'pyo...
[ 11748, 33245, 198, 11748, 850, 14681, 198, 11748, 18931, 198, 11748, 28686, 198, 11748, 308, 13344, 198, 198, 6738, 764, 85, 9501, 1330, 569, 10652, 8979, 628, 198, 6404, 796, 18931, 13, 1136, 11187, 1362, 7, 834, 3672, 834, 8, 628, 1...
2.11398
2,053
from __future__ import absolute_import from .densenet161 import densenet_no_top from .resnet50_notop import resnet50_notop
[ 6738, 11593, 37443, 834, 1330, 4112, 62, 11748, 198, 6738, 764, 67, 18756, 316, 25948, 1330, 288, 18756, 316, 62, 3919, 62, 4852, 198, 6738, 764, 411, 3262, 1120, 62, 1662, 404, 1330, 581, 3262, 1120, 62, 1662, 404, 198 ]
3.075
40