text
stringlengths
1
927k
# This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild from pkg_resources import parse_version from kaitaistruct import __version__ as ks_version, KaitaiStruct, KaitaiStream, BytesIO if parse_version(ks_version) < parse_version('0.7'): raise Exception("Incompatible Kai...
import os from re import compile as re, M import json from tornado import ioloop, log from .alerts import BaseAlert from .utils import parse_interval from .handlers import registry LOGGER = log.gen_log COMMENT_RE = re('//\s+.*$', M) class Reactor(object): """ Class description. """ defaults = { ...
import spacy # 导入Matcher from spacy.matcher import Matcher nlp = spacy.load("en_core_web_sm") doc = nlp("Upcoming iPhone X release date leaked as Apple reveals pre-orders") # 用模型分享的词汇表初始化Matcher matcher = Matcher(nlp.vocab) # 创建一个模板来匹配这两个词符:"iPhone"和"X" pattern = [{"TEXT": "iPhone"}, {"TEXT": "X"}] # 把模板加入到matcher...
""" Remove and Retrain (ROAR) experiment. """ import os import sys import time import argparse from datetime import datetime import numpy as np here = os.path.abspath(os.path.dirname(__file__)) sys.path.insert(0, here + '/../../') sys.path.insert(0, here + '/../') import dare from utility import data_util from utilit...
# coding=utf-8 # Copyright 2021 The Deeplab2 Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
import pickle, cwd class Contact: """Represents a persons contact. Attributes: name, phone_no, email. """ def __init__(self, name, number, email=None): """Initialize instance fields.""" self.__name = name self.__phone_no = number self.__email = email def __...
# search.py # --------- # Licensing Information: You are free to use or extend these projects for # educational purposes provided that (1) you do not distribute or publish # solutions, (2) you retain this notice, and (3) you provide clear # attribution to UC Berkeley, including a link to http://ai.berkeley.edu. # # A...
import pytest from django.conf import settings from django.contrib import messages from django.contrib.auth.models import AnonymousUser from django.contrib.messages.middleware import MessageMiddleware from django.contrib.sessions.middleware import SessionMiddleware from django.test import RequestFactory from django.url...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
"""Tests for ConnectedDriveAccount.""" import datetime import logging import os import time import unittest from unittest.mock import Mock import time_machine from bimmer_connected.country_selector import get_region_from_name, valid_regions from bimmer_connected.utils import get_class_property_names, parse_datetime, ...
load("@rules_jvm_external//:specs.bzl", "maven") def nullaway_workspace(): """Defines the Nullaway dependencies, to be loaded with maven_install""" return [ maven.artifact( group = "com.uber.nullaway", artifact = "nullaway", version = "0.7.10", ), mav...
import pandas as pd pd.set_option( 'display.max_columns', 24 ) file_path = 'C:/Users/profAlexandre/Desktop/inteligencia artificial/data-preprocessing/dataset/' file_name = 'traffic-collision-data-from-2010-to-present.csv' df = pd.read_csv( file_path + file_name ) # show head from dataset #print( df.head() ) # show ...
#!/usr/bin/env python # for all to often task: text data file, plot single column import matplotlib matplotlib.rc('axes.formatter', useoffset=False) import matplotlib.pyplot as plt import argparse from numpy import arange from numpy import loadtxt from numpy import transpose parser = argparse.ArgumentParser() parser....
# Copyright 2021 Google LLC. # Copyright (c) Microsoft Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
import os ORG_NAME = "B1T" ORG_DOMAIN = "bit.co.rs" APP_NAME = "Droptopus" APP_DIR = os.path.dirname(os.path.realpath(os.path.join(__file__))) ASSETS_DIR = os.path.join(APP_DIR, "assets")
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
from django.apps import AppConfig class SoloappConfig(AppConfig): name = 'soloApp'
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: yandex/cloud/serverless/triggers/v1/trigger_service.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import r...
from __future__ import absolute_import from sentry.api.base import DocSection from sentry.api.bases.organization import OrganizationReleasesBaseEndpoint from sentry.api.exceptions import ResourceDoesNotExist from sentry.api.serializers import serialize from sentry.models import Release, ReleaseCommit class Organizat...
from __future__ import absolute_import, print_function import logging from types import LambdaType from sentry.models import Organization from sentry.web.frontend.base import BaseView from sentry.utils.session_store import RedisSessionStore from sentry.utils.hashlib import md5_text from sentry.web.helpers import ren...
""" Library Features: Name: lib_utils_time Author(s): Fabio Delogu (fabio.delogu@cimafoundation.org) Date: '20211208' Version: '1.0.0' """ ####################################################################################### # Libraries import logging import pandas as pd from datetime im...
# Copyright 2021 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 required by applicable law or agree...
#!/usr/bin/env python """ Modbus Message Parser -------------------------------------------------------------------------- The following is an example of how to parse modbus messages using the supplied framers for a number of protocols: * tcp * ascii * rtu * binary """ # ----------------------------------------------...
#!/usr/bin/env python2 # Automatically helps the user setup a lane config.ini import sys, os configTemplate = """\ ########################THIS-FILE-IS-GENERATED-BY-CONFIGLANE################### # A configuration file for the plugin manager to use for managing the modules # Format is a simple windows INI style # The...
from collections import defaultdict from functools import wraps from time import time from typing import Callable class CallMetrics(object): def __init__(self): self.start_time = time() self.execution_time = defaultdict(lambda: 0.) self.execution_count = defaultdict(lambda: 0) def res...
"""Tests the xonsh.procs.specs""" from subprocess import Popen import pytest from xonsh.procs.specs import cmds_to_specs from xonsh.environ import Env from xonsh.procs.posix import PopenThread from xonsh.procs.proxies import ProcProxy, ProcProxyThread from .tools import skip_if_on_windows @skip_if_on_windows def ...
# 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, ...
"""Netatmo Media Source Implementation.""" from __future__ import annotations import datetime as dt import logging import re from homeassistant.components.media_player.const import ( MEDIA_CLASS_DIRECTORY, MEDIA_CLASS_VIDEO, MEDIA_TYPE_VIDEO, ) from homeassistant.components.media_player.errors import Brow...
from flask import render_template, current_app from flask_babel import _ from app.email import send_email def send_password_reset_email(user): token = user.get_reset_password_token() send_email(_('[Microblog] Reset Your Password'), sender=current_app.config['ADMINS'][0], recipie...
#!/usr/bin/env python3 import argparse import os import sys from typing import Dict, Set from generate import spec_files def update_manifest(stone_root: str): stone_files = spec_files(stone_root) deps: Dict[str, Set[str]] = {} for filepath in stone_files: module = None with open(filepath...
#!usr/bin/env python3 import bz2 from concurrent.futures import ProcessPoolExecutor def unpack(requests): """Unpack a list of requests compressed in bz2""" return [bz2.decompress(request) for request in requests] def unpack_proc(requests): """Unpack a list of requests compressed in bz2 using a process p...
import numpy as np def read_octo(): octo_map = [] file = open('octo.txt', "r") f1 = file.read() file.close() f2 = f1.split("\n") for h in f2: list_h = [] list_h[:0] = h octo_map.append([int(l) for l in list_h]) return np.array(octo_map) def energy_increase(cur...
from flask import current_app as app class feedbackToProduct(): def __init__(self, uid, pid, rate, review, time, vote): self.uid = uid self.pid = pid self.rate = rate self.review = review self.time = time self.vote = vote @staticmethod def AddFeedbackToProdu...
from __future__ import print_function import os import re import sys import shutil import subprocess import is_msgs def get_include(): return os.path.split(os.path.dirname(is_msgs.__file__))[0] if __name__ == '__main__': if len(sys.argv) < 2: print('Nothing to do. No *.proto files passed on arguments....
from typing import Union from diayn_rnn_seq_rnn_stepwise_classifier.networks.bi_rnn_stepwise_seqwise import \ BiRnnStepwiseSeqWiseClassifier class RnnStepwiseSeqwiseClassifierObsDimSelect(BiRnnStepwiseSeqWiseClassifier): def __init__(self, *args, input_size, ...
from glob import glob import os import tensorflow as tf import numpy as np import cv2 def block_patch(input, patch_size=15, margin=5): shape = input.get_shape().as_list() #create patch in random size pad_size = tf.random_uniform([2], minval=int(patch_size*0.1), maxval=patch_size, dtype=tf.int32) patch = tf.zeros...
#!/usr/bin/env python3 import os import errno import logging from src.issue import Issue from settings import jira_to_zen_backlog_map, jira_to_zen_sprint_map, zen_to_jira_map, urls logger = logging.getLogger(__name__) def check_for_git_config(git_config_file): """ User must have ~/.gitconfig in home direct...
import numpy as np def remove_values_from_list(the_list, val): return [value for value in the_list if value != val] def remove_values_from_list_to_float(the_list, val): return [float(value) for value in the_list if value != val] def load_3d_arr_from_string(arr): arr = arr.replace('[', '').replace(']',...
# Copyright (c) Sydney Erickson 2017 import buildlib import buildsettings buildlib.build_configure("plotutils-2.6.tar.gz", "")
import pandas as pd import numpy as np from utils.DatasetFilter import DatasetFilter from utils.DatasetSplitter import DatasetSplitter class Dataset: def __init__(self, dataset_options): self.options = dataset_options; self.df = None; self.columns_df = None; self.data = None; ...
import pytest import uqbar.strings import supriya.assets.synthdefs import supriya.nonrealtime import supriya.patterns import supriya.synthdefs import supriya.ugens from supriya import AddAction with supriya.synthdefs.SynthDefBuilder(in_=0, out=0) as builder: source = supriya.ugens.In.ar(bus=builder["in_"]) so...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** 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 from ... import _utilities, _tables __a...
from itertools import chain, combinations from time import time import collections from random import randint def powerset(iterable): "powerset([1,2,3]) --> () (1,) (2,) (3,) (1,2) (1,3) (2,3) (1,2,3)" s = list(iterable) return chain.from_iterable(combinations(s, r) for r in range(len(s) + 1)) def lucky...
''' A data generator for 2D object detection. Copyright (C) 2018 Pierluigi Ferrari 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...
""" InfluxAlchemy Operations. """ from influxalchemy.operations import Operation def test_op_init(): op = Operation(" fizz ", " buzz ") assert op._op == " fizz " assert op._nop == " buzz " def test_op_str(): op = Operation(" fizz ", " buzz ") assert str(op) == " fizz " def test_op_repr(): ...
######## # Copyright (c) 2017 GigaSpaces Technologies Ltd. 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...
# -*- coding: utf-8 -*- import typing TYPE_PROVINCE = 'province' TYPE_CITY = 'city' TYPE_DIRECT = 'direct' TYPE_COUNTY = 'county' class Place(object): __slots__ = ['id', 'name', 'shorts', 'parent', 'children_type', 'children', 'enabled'] def __init__(self, _id: str, name: s...
import cv2 import numpy as np import os def eval_metric(label_path,output_path): label = cv2.imread(label_path,0) output = cv2.imread(output_path,0) _, label = cv2.threshold(label,0,1,cv2.THRESH_BINARY) _, output = cv2.threshold(output,0,1,cv2.THRESH_BINARY) label_ = 1- label output_ = 1-output Dn = label_.sum(...
import json from unittest import mock from asynctest import TestCase as AsyncTestCase from asynctest import mock as async_mock from indy_catalyst_agent.holder.indy import IndyHolder class TestIndyHolder(AsyncTestCase): def test_init(self): holder = IndyHolder("wallet") assert holder.wallet == "w...
import numpy as np from ray.rllib.models.torch.torch_modelv2 import TorchModelV2 from ray.rllib.utils import try_import_torch torch, nn = try_import_torch() class DQNTorchModel(TorchModelV2): """Extension of standard TorchModelV2 to provide dueling-Q functionality. """ def __init__( self, ...
#!/usr/bin/env python3 ### # # # # Program Description : # Created By : Benjamin Kleynhans # Creation Date : January 25, 2020 # Authors : Benjamin Kleynhans # # Last Modified By : Benjamin Kleynhans # Last Modified Date : August 20, 2020 # Filename : launcher.py # ### # Syste...
# coding: utf-8 """ Pure1 Public REST API No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 1.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re import six import typing from...
from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ ...
from ..loaders import load_data from ..utils import load_json_config from deoxys_image.patch_sliding import get_patch_indice from deoxys_vis import read_csv import numpy as np import h5py import pandas as pd import os from time import time import shutil import matplotlib.pyplot as plt import warnings class H5Metri...
""" Django settings for cb_ux_test_2_33170 project. Generated by 'django-admin startproject' using Django 2.2.2. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ i...
#Desafio 046: Faça um programa que mostre na tela uma contagem regressiva para o estouro de fogos de artifício, indo de 10 até 0, com uma pausa de 1 segundo entre eles. from time import sleep import emoji print('10 SEGUNDO PARA A VIRADA DO ANO!!!') print('-=-'*20) for c in range(10, -1, -1): print(c) sleep(1)...
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/01_mail.ipynb (unless otherwise specified). __all__ = ['MessageEncoded', 'SCOPES', 'Emailer'] # Cell from dataclasses import dataclass from typing import Optional import base64 import os import os.path import pathlib import pickle from email.mime.application import MIM...
#!/usr/bin/env python from __future__ import division, absolute_import, print_function import os import sys import unittest cwd = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0, cwd) from podcasts import Podcast source = os.path.join(cwd, "test", "fixtures", "barstool.xml") _copyrig...
#!/usr/bin/env python3 import socket import struct import sys def parse_ip(packet): header_length_in_bytes = (packet[0] & 0x0F) * 4 # 0x0F == 00001111 header = packet[:header_length_in_bytes] # structs: https://docs.python.org/3.6/library/struct.html#module-struct _, totalLength, _, _, protocol, _, source, desti...
""" This file offers the methods to automatically retrieve the graph Nitrincola lacisaponensis. The graph is automatically retrieved from the STRING repository. References --------------------- Please cite the following if you use the data: ```bib @article{szklarczyk2019string, title={STRING v11: protein--prot...
#copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve. # #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 l...
import sys if (sys.version_info > (3, 0)): import summary_statistics.afs_stats_bitarray as afs_stats_bitarray else: import afs_stats_bitarray def store_segregating_site_stats(seq_list, results, head_list): for seq in seq_list: if seq.type == 'discovery': current_res = afs_stats_bitarra...
import math import os from solid import * """ The math for a helix comes from https://mathworld.wolfram.com/Helix.html x, y and z are coordinates in 3d space r is a constant and gives the radius of the helix t is where we are in a turn (in radians) and is thus a number from 0 to 2 * pi c is a constant defining the hei...
import hashlib from datetime import datetime, timedelta from tushare.util.dateu import trade_cal import talib ######################################################################################################################## # # # 无状态公共函数 # # # ##################################################################...
#!/usr/bin/python # # Copyright 2010 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
import os import weather def help1(): """used to identify the intent help""" pass def hyperlink(): """ Used to identify the tag hyperlink""" pass async def ky_weather(message): url = os.environ['mistsupremacyspecialurl'] weather1 = weather.weather(url=url) await message.channel.send("Th...
from __future__ import unicode_literals import logging from dvc.exceptions import CheckoutErrorSuggestGit, CheckoutError from dvc.progress import Tqdm logger = logging.getLogger(__name__) def _cleanup_unused_links(self, all_stages): used = [ out.fspath for stage in all_stages for out i...
#!/usr/bin/env python3 # Copyright (c) 2019 The Bitcoin developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the response of wallet to a variety of weird / nonstandard coins that it might try to spend.""" from decima...
from django.urls import path from visuals import views urlpatterns = [ path('index/', views.IndexView.as_view(), name='index'), ]
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. """Stop the maro-node-api-server service. """ from ..utils.subprocess import Subprocess STOP_SERVICE_COMMAND = "systemctl --user stop maro-node-api-server.service" if __name__ == "__main__": # Stop service _ = Subprocess.run(command=S...
# Copyright (c) 2015 Marc Brinkmann # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distr...
from torch import nn, Tensor from typing import Union from torch.nn import CrossEntropyLoss class LabelSmoothCrossEntropy(nn.Module): def __init__(self, smoothing=0.1): super().__init__() assert smoothing < 1.0 self.smoothing = smoothing self.confidence = 1. - smoothing sel...
from .table import Table class TableTransformer(object): def transform(self, table, *args): """ To be implemented in inherited classes """ return table class Transpose(TableTransformer): def transform(self, table): """Converts rows into columns and vice versa ...
#!/usr/bin/env python # coding: utf-8 import os import numpy as np import pandas as pd from bibmatch.authorclass import author def adf2author(aid, adf): author_dict = {} author_dict['all_names'] = set(adf['FullName']) author_dict['prefered_name'] = sorted(author_dict['all_names'], key = len)[-1] author...
#!/usr/bin/env python3 from neml import history, interpolate from neml.math import tensors, rotations from neml.cp import crystallography, slipharden, sliprules from common import differentiate from nicediff import * import unittest import numpy as np import numpy.linalg as la class CommonSlipRule(object): def te...
""" Method agnostic utility functions for linear progamming """ import numpy as np import scipy.sparse as sps from warnings import warn from .optimize import OptimizeWarning from scipy.optimize._remove_redundancy import ( _remove_redundancy, _remove_redundancy_sparse, _remove_redundancy_dense ) def _check_sp...
# coding=utf-8 # Copyright 2020 The TF-Agents Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. # -------------------------------------------------------------------------- import collections import collections.abc import os import warnings from...
# Copyright The PyTorch Lightning team. # # 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 i...
# Module: appQuitter # Description: Quits the application # Usage: !appquitter "PID/Application Name" or !appquitter "PID/Application Name" minutesToQuit # Dependencies: os import os, asyncio, configs,subprocess async def appquitter(ctx,appName, minutes=0): printlist=[] application={} if appName.isnumer...
from .executor import Executor from dump.match_infra import MatchRequest from dump.helper import create_template_dict class Vlan(Executor): ARG_NAME = "vlan_name" def __init__(self, match_engine=None): super().__init__(match_engine) self.ret_temp = {} self.ns = '' ...
import tablib from impresario.song import Song, Songbook def test_song_pinyin(): song = Song(name="歌曲") assert song.pinyin == ["Ge", "Qu"] def test_song_mixed_title(): song = Song(name="歌曲 some songs") assert song.pinyin == ["Ge", "Qu", "Some", "Songs"] def test_song_normalized_key(): song = ...
from opencmiss.zinc.field import Field from opencmiss.zinc.glyph import Glyph class TrackingPointsScene(object): def __init__(self, master_model): self._master_model = master_model def create_graphics(self): tracking_points_model = self._master_model.get_tracking_points_model() coord...
from .mtgnn_model import MTGNN_Forecaster
import time from threading import Thread, Lock from LaserOperation import * from svgelements import Path, SVGText STATE_UNKNOWN = -1 STATE_INITIALIZE = 0 STATE_IDLE = 1 STATE_ACTIVE = 2 STATE_BUSY = 3 STATE_PAUSE = 4 STATE_END = 5 STATE_TERMINATE = 10 INTERPRETER_STATE_RAPID = 0 INTERPRETER_STATE_FINISH = 1 INTERPRE...
#Shape of capital Q: def for_Q(): """printing capital 'Q' using for loop""" for row in range(6): for col in range(7): if col%5==0 and row%5!=0 or row in(0,5) and col not in(0,5,6) or row==3 and col==4 or row==5 and col==6: print("*",end=" ") else: ...
''' # -*- encoding=UTF-8 —*— from flask import Flask app = Flask(__name__) app.config.from_pyfile('app.conf') from application import models,views
# -*- coding: utf-8 -*- from route4me import Route4Me API_KEY = "11111111111111111111111111111111" def main(): route4me = Route4Me(API_KEY) route = route4me.route print('Getting Last Route') response = route.get_routes(limit=1, offset=0) if isinstance(response, dict) and 'errors' in response.key...
# -*- coding:utf-8 -*- from __future__ import absolute_import from __future__ import print_function from __future__ import division import os import sys import tensorflow as tf import time import cv2 import pickle import numpy as np import argparse from tqdm import tqdm sys.path.append("../../") from libs.models.det...
# Referenced from # https://opensource.apple.com/tarballs/xnu-7195.60.75/bsd/kern/kdebug.c # https://gitee.com/mirrors/darwin-xnu/blob/main/bsd/kern/kdebug.c kdebug.h import enum import io from construct import Struct, Const, Padding, Int32ul, Int64ul, Array, GreedyRange, Byte, FixedSized, \ CString KDBG_CLASS...
from django.conf import settings from security.json_web_token import JSONWebToken def decode_response(response): return JSONWebToken.decode( data=response.content, key=settings.OPENLDAP_JWT_KEY, audience=settings.OPENLDAP_JWT_AUDIENCE, algorithms=[settings.OPENLDAP_JWT_ALGORITHM],...
from django.conf.urls import url # views from cooggerapp.views import explorer urlpatterns = [ url(r'^tags/(?P<hashtag>.+)/', explorer.Hashtag.as_view(), name="hashtag"), url(r'^list/(?P<list_>.+)/', explorer.Userlist.as_view(), name="list"), url(r'^language/(?P<lang_name>.+)/', explorer.Languages.as_view...
import numpy as np import torch from torch import nn import torch.nn.functional as F # open text file and read in data as `text` with open('data/anna.txt', 'r') as f: text = f.read() # print(text[:100]) # encode the text and map each character to an integer and vice versa # we create two dictionaries: # 1. int2...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: MIT. See LICENSE import json import os from typing import TYPE_CHECKING import frappe import frappe.model import frappe.utils from frappe import _ from frappe.desk.reportview import validate_args from frappe.model.db_query import check_par...
#!/usr/bin/env python # Copyright (c) 2017, DIANA-HEP # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # list ...
############################################################################### ## ## Copyright (C) 2014-2016, New York University. ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## ...
"""blog URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based vi...
#!/usr/bin/env python ############################################################################### # $Id: gsc.py 16265 2009-02-08 11:15:27Z rouault $ # # Project: GDAL/OGR Test Suite # Purpose: Test GSC driver # Author: Frank Warmerdam <warmerdam@pobox.com> # #####################################################...
# Copyright 2019-2020 The Solas Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
# -*- coding: utf-8 -*- __version__ = "0.5.9" __author__ = "mehtaarn000" __license__ = "MIT" __maintainer__ = "mehtaarn000" __credits__ = ["mehtaarn000", "kilianalias", "nethracookie", "bizzyvinci"] """A python module that will allow users to get product prices information from a multitude of different websites.""" fr...