text
stringlengths
3
1.05M
function _toggle(show, hide) { if (show) _show(show); if (hide) _hide(hide); } function _show(what, callback) { if (typeof what === 'string') what = document.querySelectorAll(what); if (what instanceof Array) return what.forEach(w => _show(w, callback)); if (what instanceof NodeList) return A...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=expandAttachmentForHumans.js.map
import asyncio import logging import time from pathlib import Path from typing import Callable, Dict, List, Optional, Tuple from blspy import PrivateKey from src.cmds.init_funcs import check_keys from src.consensus.block_rewards import calculate_base_farmer_reward from src.consensus.network_type import NetworkType fr...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdarg.h> #include "typings.h" #include "memory.h" #include "log.h" void _log(char *message, LogLevel level, va_list args) { char *buffer = (char *)malloc(MAX_LOG_LENGHT * sizeof(char)); switch (level) { case LOG_FATAL: ...
def file_name_for_format(file_format): names = { 'json': 'data', 'xlsx': 'catalog' } file_name = names[file_format] return file_name
/* * This header is generated by classdump-dyld 1.5 * on Wednesday, April 28, 2021 at 9:04:50 PM Mountain Standard Time * Operating System: Version 14.5 (Build 18L204) * Image Source: /System/Library/PrivateFrameworks/Preference...
from gate.input_gate import Input def bits_to_gates(bitstring, inps): for i in range(len(bitstring)): inps[i].output = 0 if bitstring[i] == "0" else 1 return inps
from django import forms from .models import Topic class NewTopicsForm(forms.ModelForm): message = forms.CharField( widget=forms.Textarea( attrs={'rows': 5, 'placeholder': 'What is on your mind?'} ), max_length=4000, help_text='The max length of the text is 4000.' )...
import itertools import logging import math import re import string import struct from collections import defaultdict from bintrees import AVLTree import claripy import cle import pyvex from cle.address_translator import AT from .memory_data import MemoryData from .cfg_arch_options import CFGArchOptions from .cfg_ba...
const signupFormHandler = async (event) => { event.preventDefault(); const username = document.querySelector('#username-signup').value.trim(); const password = document.querySelector('#password-signup').value.trim(); if (username && password) { const response = await fetch('/api/users/signup', { m...
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the Lic...
from allennlp_semparse.state_machines.trainers.decoder_trainer import DecoderTrainer from allennlp_semparse.state_machines.trainers.expected_risk_minimization import ExpectedRiskMinimization from allennlp_semparse.state_machines.trainers.maximum_marginal_likelihood import MaximumMarginalLikelihood
/**! * cnpmjs.org - test/controllers/registry/user/update.test.js * * Copyright(c) cnpmjs.org and other contributors. * MIT Licensed * * Authors: * fengmk2 <fengmk2@gmail.com> (http://fengmk2.github.com) */ 'use strict'; /** * Module dependencies. */ var request = require('supertest'); var mm = require('m...
/*------------------------------------------------------------------------- * * pg_ctl --- start/stops/restarts the PostgreSQL server * * Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group * * src/bin/pg_ctl/pg_ctl.c * *-------------------------------------------------------------------------...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Stencil documentation build configuration file, created by # sphinx-quickstart on Sun Nov 27 05:54:36 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # au...
# -*- coding: utf-8 -*- from .context import pyrestapi import unittest class AdvancedTestSuite(unittest.TestCase): """Advanced test cases.""" def test_thoughts(self): pyrestapi.hmm() if __name__ == '__main__': unittest.main()
from mock import patch import pytest import optuna from optuna.integration import CmaEsSampler from optuna.integration import SkoptSampler from optuna.testing.sampler import FirstTrialOnlyRandomSampler if optuna.types.TYPE_CHECKING: from typing import Callable # NOQA from optuna.samplers import BaseSampler ...
def say_hi(name, age): """ Hi! """ # your code here return "Hi. My name is "+name+" and I'm "+str(age)+" years old" if __name__ == '__main__': #These "asserts" using only for self-checking and not necessary for auto-testing assert say_hi("Alex", 32) == "Hi. My name is Alex and I'm 32 ye...
int nondet_int(); _Bool nondet_bool(); main() { int x, y, d; while (x>0 && y>0 && d>0) { _Bool c = nondet_bool(); if(c) { x=x-1; d=nondet_int(); } else { x = nondet_int(); y = y- 1; d=d-1; } } assert(!(x>0 && y>0 && d>0)); }
/** * Created by mystic_alex on 25/08/16. */ const ITERATIONS = 20; const DIGITS = 6; var atualizarTabelaPerformance = function() { var tabelaBody = $('#tabelaPerformance tbody'); var html = ''; for (var i = 0; i < grafoMatriz.matriz.length; i++) { html += getRowTabelaPerformance(i, grafoMatri...
#!/usr/bin/python3 # -*- coding: utf-8 -*- """ EasyJWT provides a simple interface to creating and verifying `JSON Web Tokens (JWTs) <https://tools.ietf.org/html/rfc7519>`_ in Python. It allows you to once define the claims of the JWT, and to then create and accept tokens with these claims without having t...
!function(){function t(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function n(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function e(t,e,r){return e&&n(t.prototype,e),r&&...
import os class Junky: def __init__(self, exts): self.exts = exts def getJunkFiles(self, path): all_files = [p for p in os.listdir(path) if os.path.isfile(os.path.join(path, p))] junkfiles = filter(self.findJunk, all_files ) return list(junkfiles) def findJunk(self, f): ...
# encoding: utf-8 import os import random import torch import torch.nn as nn import torch.distributed as dist from yolox.exp import Exp as MyExp from yolox.data import get_yolox_datadir # !/usr/bin/env python3 # -*- coding:utf-8 -*- # Copyright (c) Megvii, Inc. and its affiliates. import cv2 import numpy as np from ...
import React from 'react' import './Card.css' const Card = ({ title, text, image }) => ( <div className="Card"> <img src={image} alt="" /> <h3>{title}</h3> <p>{text}</p> </div> ) export default Card
# Generated by Django 3.1.8 on 2021-04-28 11:14 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("supply_chains", "0011_merge_20210427_1556"), ] operations = [ migrations.AlterField( model_name="strategicaction", n...
# Importing the Kratos Library import KratosMultiphysics from KratosMultiphysics import assign_scalar_variable_to_entities_process def Factory(settings, Model): if not isinstance(settings, KratosMultiphysics.Parameters): raise Exception("expected input shall be a Parameters object, encapsulating a json str...
!function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.d...
# uncompyle6 version 3.7.4 # Python bytecode 3.7 (3394) # Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)] # Embedded file name: T:\InGame\Gameplay\Scripts\Server\open_street_director\basic_festival.py # Compiled at: 2019-10-02 18:49:25 # Size of source mod 2**32...
""" Extends the checker mode example with a checker panel. """ import logging logging.basicConfig(level=logging.DEBUG) import sys from pyqode.qt import QtWidgets from pyqode.core.api import CodeEdit from pyqode.core.panels import CheckerPanel from pyqode.core.modes import CheckerMode, CheckerMessages # use server fr...
const asyncAuto = require('async/auto'); const asyncMap = require('async/map'); const {featureFlagDetails} = require('bolt09'); const {returnResult} = require('asyncjs-util'); const decBase = 10; const {ceil} = Math; const {isArray} = Array; const microPerMilli = 1e3; /** Get connected peers. LND 0.8.2 and below d...
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- """Azure K...
import { connect } from "react-redux"; import { selectorMap } from "../fp"; import { bindActionCreators } from "redux"; import * as controlActions from "../actions/ControlActions"; const mapStateToProps = selectorMap({}); const mapDispatchToProps = dispatch => bindActionCreators( { modalShown: controlActi...
import numpy as np from cvxpy import Minimize, Problem, Variable, entr, log import math ANSWERS = [] A = np.array(np.mat('-1 -1 0 0 0;\ 0 1 -1 -1 0;\ 0 0 0 1 1')) I = Variable(5) I_entr = Variable(2) f_0 = -entr(I_entr[0])-I[2] - 26.0 * log(I[2]) f_0 += -entr(I_entr[1])-I[3] - 26.0 * log(I[3]) constraints = [] co...
""" Optuna example that optimizes multi-layer perceptrons using Tensorflow (Estimator API). In this example, we optimize the validation accuracy of hand-written digit recognition using Tensorflow and MNIST. We optimize the neural network architecture as well as the optimizer configuration. As it is too time consuming ...
#ifndef IMAGE_H #define IMAGE_H #include "compiler/compiler_warnings_control.h" DISABLE_COMPILER_WARNINGS #include <QImage> #include <QString> RESTORE_COMPILER_WARNINGS class QWidget; enum IMGFORMAT {JPG, BMP, PNG, GIF, TIFF, XBM, XPM, UNKN}; enum WPOPTIONS {CENTERED, STRETCHED, SYSTEM_DEFAULT}; struct ImgParams { ...
var searchData= [ ['edgecount_0',['edgeCount',['../struct_n_group.html#a83a55e1b373f1e3ec3e28f5c664a087b',1,'NGroup::edgeCount()'],['../struct_n_user.html#aed414ae49238de839c22d92fc0e0f88d',1,'NUser::edgeCount()']]], ['email_1',['email',['../struct_n_account.html#aee834e4317f33e0708dfe893ff772faa',1,'NAccount']]], ...
#pragma once void SetWindowProcedure(HWND* WND) { auto former = (WNDPROC)::GetWindowLongPtr(*WND, GWLP_WNDPROC); ::SetWindowLongPtr(*WND, GWLP_WNDPROC, (LONG_PTR)WindowProcedure); SetWindowPos(*WND, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); } void destroy(HWND WND, HGLRC RC, HDC DC) { wglM...
/* * If not stated otherwise in this file or this component's LICENSE file the * following copyright and licenses apply: * * Copyright 2020 RDK Management * * 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 co...
import React from "react" import styled from 'styled-components' const Wrapper = styled.section` width: 93%; margin: 0px auto; ` const Border = styled.div` background: ${props => props.borderColor}; height: 1px; ` const BorderAll = props => ( <Wrapper> <Border borderColor={props.borderColo...
import threading import time as ttime import json from bluesky_queueserver.manager.start_manager import WatchdogProcess from bluesky_queueserver.tests.common import format_jsonrpc_msg import logging class ReManagerEmulation(threading.Thread): """ Emulation of RE Manager, which is using Thread instead of Pro...
# -*- coding: utf-8 -*- import whatthepatch as wtp from whatthepatch.patch import Change, diffobj, header as headerobj import unittest import os module_path = os.path.dirname(__file__) def datapath(fname): return os.path.join(module_path, "casefiles", fname) def indent(amount, changes): indent_str = " "...
from openslides.utils.rest_api import ( IdPrimaryKeyRelatedField, ModelSerializer, SerializerMethodField, ) from openslides.utils.validate import validate_html_strict from ..utils.auth import get_group_model from .models import ChatGroup, ChatMessage class ChatGroupSerializer(ModelSerializer): """ ...
#include <stdio.h> int main() { float a; float b; float c; float d; scanf("%f %f %f",&a,&b,&c); d=(b*b-4*a*c)/2*a; printf("%.2f",d); return 0; }
import os import matplotlib as mpl import matplotlib.pyplot as plt import numpy as np from matplotlib.backends.backend_pdf import PdfPages mpl.rcParams['font.size'] = 12 mpl.rcParams['legend.fontsize'] = 'large' mpl.rcParams['figure.titlesize'] = 'large' mpl.rcParams["font.family"] = "serif" csfont = {'fontname':'Tim...
# -*- 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...
// FILTERS const filterByVersions = branch => branch === 'develop' || branch.startsWith('TaaS_') // MAPS // 'develop' => { label: 'Latest', value: 'develop' } const mapToObject = branch => ({ label: branch, value: branch }) export default { filterByVersions, mapToObject }
# Copyright (C) 2019 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """Utility functions for selenium.""" import json import logging import time from selenium.common import exceptions from selenium.common.exceptions import UnexpectedAlertPresentException from selenium.webdr...
/** * Hilo 1.3.0 for amd * Copyright 2016 alibaba.com * Licensed under the MIT License */ define('hilo/geom/Matrix', ['hilo/core/Class'], function(Class){ /** * @language=en * @class Matrix class is a transforming matrix, which declare how points in one coordinate maped to another coordinate. * @param {Number...
import os from glob import glob from typing import List, Optional from dagster_buildkite.defines import GCP_CREDS_LOCAL_FILE, GIT_REPO_ROOT from dagster_buildkite.package_spec import PackageSpec from dagster_buildkite.python_version import AvailablePythonVersion from dagster_buildkite.steps.test_images import core_tes...
import json import os import copy import numpy as np from PIL import Image from typing import Callable from typing import List, Tuple from typing import Optional import pytorch_lightning as pl import torch from torch.utils.data import DataLoader from torch.utils.data import Dataset import torchvision.transforms.functi...
#ifdef LED_DRIVER_APA102C #include <stdint.h> #include <avr/io.h> #include <string.h> #include <util/delay.h> #include "main.h" #include "led-api.h" #include "wire-protocol.h" /* SPI LED driver to send data to APA102 LEDs * * Preformatted data is sent to the micro and then * passed in via led_update_buffer(). Th...
from itertools import product import pytest import requests_mock from web3data.chains import Chains from web3data.exceptions import APIError from web3data.handlers.signature import SignatureHandler from . import API_PREFIX, CHAINS, HEADERS, RESPONSE LIMITED_CHAINS = ( Chains.BCH, Chains.BSV, Chains.BTC,...
import re import pytest import django from django import forms from django.forms.models import formset_factory from django.middleware.csrf import _get_new_csrf_string from django.template import Context, Template, TemplateSyntaxError from django.test.html import parse_html from django.urls import reverse from django....
## License: Apache 2.0. See LICENSE file in root directory. ## Copyright(c) 2017 Intel Corporation. All Rights Reserved. ##################################################### ## Align Depth to Color ## ##################################################### # First import the library import p...
"""Solution to Kata https://www.codewars.com/kata/the-sum-of-the-prime-factors-of-a-number-dot-dot-dot-what-for.""" def is_prime(n): d = 2 while d * d <= n: if n % d == 0: return False d += 1 return n > 1 def prime_factors(n): factors = [] p = 2 while n >= (p * p):...
import os print("made by M.r joooon ") print("@jokerkinger") print(" جهت کیر شدن پارا کوبص") joker = input("Enter your kiri name : ") os.system("pkg install toilet -y ") os.system("clear") king = "toilet -f mono12 -F gay " os.system("clear") os.system("figlet " + king)
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: roi.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf im...
import PropTypes from 'prop-types'; import { Icon } from '@iconify/react'; import searchFill from '@iconify/icons-eva/search-fill'; import trash2Fill from '@iconify/icons-eva/trash-2-fill'; import roundFilterList from '@iconify/icons-ic/round-filter-list'; // material import { styled } from '@material-ui/core/styles'; ...
# from .youtube import YouTube # from .database import Database # assert all((YouTube, Database))
var config = require("../config") , npm = require("npm") , semver = require("semver") , moment = require("moment") , githubUrl = require("github-url") , async = require("async") , extract = require("extract") , github = require("./github") // Get a username and repo name for a github repository function ...
/* MIT License - Copyright (c) 2019-2022 Francis Van Roie For full license information read the LICENSE file in the project folder */ #ifndef HASP_PARSER_H #define HASP_PARSER_H #include "hasplib.h" class Parser { public: static bool haspPayloadToColor(const char* payload, lv_color32_t& color); static ...
module.exports = { data: { trueKey: true, falseKey: false, subKey: { subProp: 1 } } };
exec(open('./generate_graph.py').read()) exec(open('./regularize_graph.py').read()) exec(open('./generate_one_to_one_maps.py').read()) exec(open('./generate_adversary_observations.py').read()) exec(open('./generate_max_weight_matching.py').read()) exec(open('./calculate_precision.py').read()) n=100 d=2 ps=[0.20] num_t...
"""Settings Set any and all project variables here. If you have two version of the project running, they should differ only in variables set in this file. Optionally, secret stuff is located in the a .env file, to be loaded here. """ import os DATA = os.path.join( os.path.dirname(os.path.dirname(os.path.realpat...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function from polyaxon_schemas.experiment import ExperimentConfig # noqa from polyaxon_schemas.experiment import ExperimentJobConfig # noqa
import ContextMenu from './ContextMenu'; export default { __init__: [ 'contextMenu' ], contextMenu: [ 'type', ContextMenu ] };
[ {'base_name': 'NED_NED', 'service_type': 'cone', 'access_url': 'http://ned.ipac.caltech.edu/cgi-bin/NEDobjsearch?search_type=Near+Position+Search&of=xml_main', 'adql': '' } ]
import { r as registerInstance, c as createEvent, d as getIonMode, h, H as Host, e as getElement } from './core-c02a05e9.js'; import './config-503c2549.js'; import { c as createColorClasses, h as hostContext } from './theme-353a032e.js'; import { f as findItemLabel, r as renderHiddenInput } from './helpers-c90aaa66.js'...
/***************************************************************************//** * @file * @brief CMSIS Cortex-M3 Peripheral Access Layer Header File * for EFM EFM32G290F128 * @version 5.8.0 ******************************************************************************* * # License * <b>Copyright 2019 Sil...
# -*- coding: utf-8 -*- import logging import torch import torch.nn as nn from transformers import BertModel from embedder import Embedder from rnn_encoder import RNNEncoder from modules import AttentionLayer, FeedForwardLayer class NeurClariQuestion(nn.Module): def __init__(self, encoder_nam...
#!/usr/bin/env python # encoding=utf8 import web import urlparse import json import os import urllib import sys import Function_adapter urls = ( '/(.*)', 'myweb' ) app = web.application(urls, globals()) class myweb: def GET(self, name): reload(sys) sys.setdefaultencoding('utf8') f...
/* * Copyright (c) 2018-present, aliminabc@gmail.com. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #ifndef HWVC_ANDROID_ALXMLTAGDEFINE_H #define HWVC_ANDROID_ALXMLTAGDEFINE_H #define XML_VERSION "1.0" #define V...
import React from 'react'; import ReactDOM from 'react-dom'; import './index.css'; import App from './components/App'; import reportWebVitals from './reportWebVitals'; import { createStore } from 'redux'; import { Provider } from 'react-redux'; import rootReducer from './reducers/index'; import 'bootstrap/dist/css/boot...
# -*- coding: utf-8 -*- # FOGLAMP_BEGIN # See: http://foglamp.readthedocs.io/ # FOGLAMP_END from foglamp.services.common.microservice_management.service_registry import service_registry __author__ = "Ashish Jabble, Praveen Garg, Ashwin Gopalakrishnan" __copyright__ = "Copyright (c) 2017 OSIsoft, LLC" __license__ = ...
/* * jdlhuff.c * * Copyright (C) 1991-1998, Thomas G. Lane. * This file is part of the Independent JPEG Group's software. * For conditions of distribution and use, see the accompanying README file. * * This file contains Huffman entropy decoding routines for lossless JPEG. * * Much of the complexity here has t...
/*! ng-dialog - v0.3.12 (https://github.com/likeastore/ngDialog) */ !function(a,b){"undefined"!=typeof module&&module.exports?module.exports=b(require("angular")):"function"==typeof define&&define.amd?define(["angular"],b):b(a.angular)}(this,function(a){"use strict";var b,c=a.module("ngDialog",[]),d=a.element,e=a.isDef...
from common import ScanMode, ScanResult import collections import cv2 import functools import json import numpy import os from typing import Dict, Iterator, List, Tuple # The expected color for the video background. BG_COLOR = (194, 222, 228) WOOD_COLOR = (115, 175, 228) # Mapping from background colors (in BGR for...
const tr = JsonReader.commands.petFeed; /** * Feed your pet ! * @param {("fr"|"en")} language - Language to use in the response * @param {module:"discord.js".Message} message - Message from the discord server * @param {String[]} args=[] - Additional arguments sent with the command */ const PetFeedCommand = async ...
# Note: if you are missing the "serial" package, you'll want to install pySerial # On a mac, we've had luck installing by typing # easy_install pySerial # from the commandline # Interface to Nonin 3150 # # Using references from Nonin: # "3150-Specifications_7970_000-Rev-A.pdf" # "3150 Commands.docx" (includes ...
import json import sys from calm.dsl.builtins import Blueprint from calm.dsl.cli.bps import compile_blueprint, create_blueprint from calm.dsl.api.handle import get_api_client from vars import CENTOS_CRED, ERA_CRED from services import DemoApp, Haproxy, Postgres from packages import DemoAppPackage, HaproxyPackage, Pos...
import { HeartLightIcon, HeartIcon, BookmarkIcon, BookmarkLightIcon } from '../../icons'; import Tooltip from '@material-ui/core/Tooltip'; import Zoom from '@material-ui/core/Zoom'; const PostLeftPanel = (props) => { const { postData, likeLoading, saveLoading, handleLikeReaction, handleSaveReaction } = props; ...
export const load = '@@avrs-cabinet/network/hierarchy/LOAD' export const loadStat = '@@avrs-cabinet/network/hierarchy/LOAD_STAT' export const clearStat = '@@avrs-cabinet/network/hierarchy/CLEAR_STAT'
"""Retrieve tweets, embedding, save into database""" import basilica import tweepy from decouple import config from .models import DB, Tweet, User TWITTER_AUTH = tweepy.OAuthHandler(config('TWITTER_CONSUMER_KEY'), config('TWITTER_CONSUMER_SECRET')) TWITTER_AUTH.set_access_token(conf...
#pragma once #include <toolbox/Dereference.h> #include <type_traits> namespace toolbox { /** Holds a value which may be a raw pointer, smart pointer or stack variable */ template <typename T> class Value { private: T data_; public: using element_type = typename std::remove_reference<decltype(derefer...
/* * Copyright 2013 Facebook, 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...
from rest_framework import permissions, response, serializers, viewsets from rest_framework.decorators import action from posthog.api.routing import StructuredViewSetMixin from posthog.async_migrations.runner import MAX_CONCURRENT_ASYNC_MIGRATIONS, is_posthog_version_compatible from posthog.async_migrations.utils impo...
/* * Copyright (c) 2012-2019 Israel Jacquez * See LICENSE for details. * * Israel Jacquez <mrkotfw@gmail.com> */ #include <assert.h> #include <stdint.h> #include <stdbool.h> #include <string.h> #include <stdlib.h> #include <cpu/cache.h> #include <cpu/dmac.h> #include <cpu/intc.h> #include <vdp.h> #include <sys...
/* * Copyright (c) 2021-2022 REV Robotics * * 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 followi...
from rest_framework import status from rest_framework.exceptions import (APIException, PermissionDenied, ValidationError) class FileParseException(APIException): status_code = status.HTTP_400_BAD_REQUEST default_detail = 'Invalid file format, line {}: {}' default_cod...
"use strict"; /* TODO - Add blockhash functionality back into getTxOutProof */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise...
'''[*args] Recall from iterable packing a, b, c = (10, 2O, 30) -> A = 10 B = 20 C = 30 Something similar happens when positional arguments are passed to a function: def func1(a, b, c): # CODE func1(10, 20, 30) -> a = 10 b = 20 c = 30 Recall also: a, b, *c = 10, 20, 'a', 'b' -> a=10 ...
# Copyright (c) 2014-2016 Ryan Huber <rhuber@gmail.com> # Copyright (c) 2015-2018 Tollef Fog Heen <tfheen@err.no> # Copyright (c) 2015-2020 Trygve Aaberge <trygveaa@gmail.com> # Released under the MIT license. from __future__ import print_function, unicode_literals from collections import OrderedDict, namedtuple from...
import mri from 'mri'; import chalk from 'chalk'; import Now from '../util/now'; import createOutput from '../util/output'; import logo from '../util/output/logo'; import elapsed from '../util/output/elapsed.ts'; import { maybeURL, normalizeURL, parseInstanceURL } from '../util/url'; import printEvents from '../util/ev...
>>> 2 + 2 4 >>> 50 - 5*6 20 >>> (50 - 5*6) / 4 5.0 >>> 8 / 5 # la división simpre retorna un número de punto flotante 1.6 >>> 17 / 3 # la división clásica retorna un punto flotante 5.666666666666667 >>> >>> 17 // 3 # la división entera descarta la parte fraccional 5 >>> 17 % 3 # el operado % retorna el resto de la div...
ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var DocCommentHighlightRule...
#include DEVIRTUALIZE_HEADER_FIX(IFlowSystem.h) #ifndef __IFLOWSYSTEM_H__ #define __IFLOWSYSTEM_H__ #pragma once #include "ConfigurableVariant.h" #include "SerializeFwd.h" #define _UICONFIG(x) x struct IFlowGraphModuleManager; struct IFlowGraphDebugger; typedef uint8 TFlowPortId; typedef uint16 TFlowNodeId; typed...
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE190_Integer_Overflow__int64_t_fscanf_preinc_52c.c Label Definition File: CWE190_Integer_Overflow.label.xml Template File: sources-sinks-52c.tmpl.c */ /* * @description * CWE: 190 Integer Overflow * BadSource: fscanf Read data from the console using fscanf() ...
// Boilerplate const m = attract('core/models'); module.exports = { create: async (req, res, next) => { try { const user = await m.user.create(req.body); return res.render('users', user); } catch (error) { return next(error); } }, read: async (req, res) => { if (req.params.user...
from django.core.management.base import BaseCommand, CommandError from mlpipe.models import Pipe import mlpipe.mlpipe_utils as mlpipeutils from mlpipe.job_utils import JobRunner import os class Command(BaseCommand): help = 'get the md5 for a string' def add_arguments(self, parser): # Positional argume...