text
stringlengths
3
1.05M
/* * 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 ...
export default { SPLIT_KILLED: 'killed', NO_CONDITION_MATCH: 'default rule', SPLIT_NOT_FOUND: 'definition not found', EXCEPTION: 'exception', SPLIT_ARCHIVED: 'archived', NOT_IN_SPLIT: 'not in split' };
#!/usr/bin/env python # coding:utf-8 import os import logging from flask import Flask, url_for, render_template, current_app from markupsafe import Markup from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.login import LoginManager from flask.ext.wtf import CsrfProtect from flask.ext.moment import Moment from...
import asyncio import getpass import json import os import websockets # Next 4 lines are not needed for AI agents, please remove them from your code! import pygame pygame.init() program_icon = pygame.image.load("data/icon2.png") pygame.display.set_icon(program_icon) async def agent_loop(server_address="localhost:8...
"""Module & package import.""" from flask import Blueprint, render_template error = Blueprint("error", __name__) @error.errorhandler(404) def show404(err): """Show 404 page.""" return render_template("404.html")
/*! @license Firebase v4.0.0 Build: rev-c054dab Terms: https://firebase.google.com/terms/ */ /** * Copyright 2017 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www...
//! moment.js locale configuration //! locale : Azerbaijani [az] //! author : topchiyev : https://github.com/topchiyev import moment from '../moment'; var suffixes = { 1: '-inci', 5: '-inci', 8: '-inci', 70: '-inci', 80: '-inci', 2: '-nci', 7: '-nci', 20: '-nci', 50: '-nci', 3:...
import subprocess import os def erroneo(arg): task = subprocess.Popen("../../compilador/tiger " + arg, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) data = task.stdout.read() err = task.stderr.read() if err != "": exit("El caso " + arg + " tiro error: " + err) elif "yes!" in...
import numpy as np import constants import random import math import matplotlib import numpy.random as nprand import time import scipy import scipy.interpolate from contours.core import shapely_formatter as shapely_fmt from contours.quad import QuadContourGenerator from matplotlib import pyplot as plt from matplot...
/*! Select2 4.0.0 | https://github.com/select2/select2/blob/master/LICENSE.md */ (function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var e=jQuery.fn.select2.amd;return e.define("select2/i18n/fr",[],function(){return{inputTooLong:function(e){var t=e.input.length-e.maximum,n="Supprimez "+t+" carac...
var classxpcc_1_1_backend_interface = [ [ "~BackendInterface", "classxpcc_1_1_backend_interface.html#ab9491aa21eb406a8216251179b88fdbe", null ], [ "update", "classxpcc_1_1_backend_interface.html#a7c3854da5ae8e5051cd7ff2d74b22fc9", null ], [ "sendPacket", "classxpcc_1_1_backend_interface.html#ae0b877793ee63a...
"""CoronaVirus LookUp Syntax: .covid <country>""" from datetime import datetime from covid import Covid from uniborg.util import admin_cmd @borg.on(admin_cmd(pattern="covid ?(.*)", allow_sudo=True)) async def corona(event): await event.edit("`Processing...`") country = event.pattern_match.group(1) covid ...
/* Copyright 2021 DigitalOcean This code is licensed under the MIT License. You may obtain a copy of the License at https://github.com/digitalocean/nginxconfig.io/blob/master/LICENSE or https://mit-license.org/ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associate...
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // WARNING: This file was auto-generated, any change will be overridden in next release. Please use configs/es6.conf.js then run "npm run convert". // //////////////////...
import pandas as pd import glob from pathlib import Path class DataProcessor: def __init__(self): pass def write_data(self, save_file): """Write processed data to directory.""" self.data.to_pickle(save_file) class GameLogProcessor(DataProcessor): def read_data(self, input_filepa...
import math import time def time_since(since, percent): now = time.time() s = now - since es = s / percent rs = es - s return '%s (- %s)' % (as_minutes(s), as_minutes(rs)) def as_minutes(s): m = math.floor(s / 60) s -= m * 60 return '%dm %ds' % (m, s)
# !/usr/bin/python3 # # Start Measure mit TX -> "A", wait 2s , dann RX 8 Byte vom Sensor, Sio Timeout 10s wenn no Antwort ! # 1 x Sensor abfragen, ret -> Messwerte oder Fehlermeldung. import time, math import RPi.GPIO as GPIO import serial GPIO.setmode(GPIO.BCM) RE = 23 DE = 24 #port = "/dev/ttyS0" # Raspberry Pi...
from base64 import b64encode from json import dumps from os import environ from nacl import encoding, public from requests import put from requests.auth import HTTPBasicAuth def _EncryptForGithubSecret(publicKey, secretValue): publicKey = public.PublicKey(publicKey.encode('utf-8'), encoding.Base64Encoder()) sealedB...
import React, { useState, useContext } from "react" import styled from "styled-components" import Modal from "./Modal" import ButtonLink from "./ButtonLink" import Link from "./Link" import Emoji from "./Emoji" const Eth1 = styled.div` cursor: pointer; border: 1px solid ${(props) => props.theme.colors.mainnetBorde...
import React from 'react' import Answer from './Answer' export default function Question({question, getNextQuestionCallback}) { const[showAnswer, setShowAnswer] = React.useState(false); const[optionSelected, setOptionSelected] = React.useState(-1); const[correctAnswer, setCorrectAnswer] = React.useState(false); ...
import pyttsx3 import json with open('config.json', 'r', encoding='UTF-8') as config: # read config file data = config.read() configData = json.loads(data) voiceID_KO = configData['TTS']['voiceID_KO'] voiceID_EN = configData['TTS']['voiceID_EN'] engine = pyttsx3.init() # Voice IDs pulled from engine....
import React, {Component} from 'react'; import {connect} from 'react-redux'; import {bindActionCreators} from 'redux'; import {fetchWeather} from '../actions/index'; class SearchBar extends Component { constructor (props){ super(props); this.state = {term: ''}; this.onInputChange = this.onInputChange.bi...
#!/usr/bin/env python import math import OpenImageIO as oiio from OpenImageIO import ImageBuf, ImageSpec, ImageBufAlgo def make_constimage (xres, yres, chans=3, format=oiio.UINT8, value=(0,0,0), xoffset=0, yoffset=0) : spec = ImageSpec (xres,yres,chans,format) spec.x = xoffset spec.y = ...
#pragma once class Velocity { public: float U, V, W; explicit Velocity(float u = 0.0, float v = 0.0, float w = 0.0) { U = u; V = v; W = w; } virtual ~Velocity() { } };
from resolver import resolver from django.utils.importlib import import_module def __repr__(self): return '<%s, %s, %s, %s>' % (self.alias, self.col, self.field.name, self.field.model.__name__) from django.db.models.sql.where import Constraint Constraint.__repr__ = __repr__ # TODO: manipulate a copy of t...
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // WARNING: This file was auto-generated, any change will be overridden in next release. Please use configs/es6.conf.js then run "npm run convert". // //////////////////...
define([ 'raven', 'reqwest', 'common/utils/config', 'common/utils/get-property' ], function ( raven, reqwest, config, getProperty ) { // This should no longer be used. Prefer the new 'ajax-promise' library instead, which is es6 compliant. var ajaxHost = getProperty(config, 'page....
import os import pytest import sys import unittest sys.path.append(os.path.join(os.path.dirname(__file__), '../../tests/system')) import metricbeat MONGODB_FIELDS = metricbeat.COMMON_FIELDS + ["mongodb"] class Test(metricbeat.BaseTest): COMPOSE_SERVICES = ['mongodb'] @unittest.skipUnless(metricbeat.INTEG...
// // Created by itay on 11/29/21. // #ifndef WINDSOLAR_TOKENIZER_H #define WINDSOLAR_TOKENIZER_H #include <stdbool.h> #include "reader.h" #include "token.h" #include "error.h" typedef struct { Reader *reader; // Reader of input to tokenize Token token; // Current token type char *str;...
import numpy as np from . import Util from scipy.sparse import csc_matrix ## matrices for new LDstats2 models (h and compressed ys) ### drift def drift_h(num_pops, nus, frozen=None): if num_pops != len(nus): raise ValueError("number of pops must match length of nus.") # if any population is fr...
import React from "react"; import ProductCategoryRow from "../ProductCategoryRow"; import ProductRow from "../ProductRow"; const ProductTable = (props) => { const filterText = props.filterText; const inStockOnly = props.inStockOnly; const rows = []; let lastCategory = null; props.products.forEach(product ...
def count_circle_lattice_points(cx: int, cy: int, r: int, k: int) -> int: """ count up integer point (x, y) in the circle centered at (cx, cy) with radius r. and both x and y are multiple of k. """ assert r >= 0 and k >= 0 cx %= k cy %= k def is_ok(dx: int, dy: int) -> b...
#ifndef _HELPER_DIE_H_ #define _HELPER_DIE_H_ #include "config.h" #include <stdlib.h> #include <stdio.h> #include <errno.h> #ifdef FRONTEND_NCURSES #include <ncurses.h> #endif void die (const char *message, int err) { #ifdef FRONTEND_NCURSES erase(); refresh(); endwin(); #endif if (message == NULL) exi...
/* amdgpu_drm.h -- Public header for the amdgpu driver -*- linux-c -*- * * Copyright 2000 Precision Insight, Inc., Cedar Park, Texas. * Copyright 2000 VA Linux Systems, Inc., Fremont, California. * Copyright 2002 Tungsten Graphics, Inc., Cedar Park, Texas. * Copyright 2014 Advanced Micro Devices, Inc. * * Permis...
// META: global=jsshell // META: script=/wasm/jsapi/assertions.js // META: script=/wasm/jsapi/table/assertions.js test(() => { const argument = { "element": "anyfunc", "initial": 0, "minimum": 0 }; assert_throws_js(TypeError, () => WebAssembly.Table(argument)); }, "Supplying both initial and minimum"); test(() =>...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2012-2019 Snowflake Computing Inc. All right reserved. # from logging import getLogger from multiprocessing.pool import ThreadPool import pytest from snowflake.connector import ProgrammingError from snowflake.connector.compat import TO_UNICODE try: ...
# -*- coding: utf-8 -*- # copyright (c) 2016 Louis Lamarche # copyright (c) 2016-2017 Jean-Sébastien # https://github.com/jnsebgosselin/pygld # # This is part of PyGLD (Python Ground-Loop Designer). # Licensed under the terms of the MIT License. """ File for running tests programmatically. """ import pytest def m...
import ChildCmd from '../classes/ChildCmd'; /** * Creates an object which describes child logic which will be attached * to some model field. Should be used in {@link LogicBase#children} to * define a logic that should be instantiated with some arguments passed * to {@link LogicBase#config}. * * @example * cla...
var webpack2 = require('webpack'); module.exports = function() { if (process.env.NODE_ENV === 'production') { var fileLoaderName = '[name]_[hash:10].[ext]'; var imageLoaderOptions = '?optipng.optimizationLevel=4'; var cssLoaderOptions = '&minimize=true&sourceMap=true'; } if (process.env.NODE_ENV === ...
/* Copyright (c) 2019 FBK * Designed by Roberto Riggio * * 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 applica...
#include "gc.h" void swit1(C1 *q, int nc, long def, Node *n) { Node tn; regalloc(&tn, &regnode, Z); swit2(q, nc, def, n, &tn); regfree(&tn); } void swit2(C1 *q, int nc, long def, Node *n, Node *tn) { C1 *r; int i; Prog *sp; if(nc < 5) { for(i=0; i<nc; i++) { if(debug['K']) print("case = %.8llux\n"...
'use strict'; /** * @description strips data from caspio reports by iterating each row and constructing * an object with columns as keys and values being the table's row content * * @param {HTML - div element} div * @returns {array} aggregated */ function stripCaspioReport(div){ var table_id = div...
# ActivitySim # See full license in LICENSE.txt. import logging import pandas as pd from activitysim.core import tracing from activitysim.core import config from activitysim.core import inject from activitysim.core import pipeline from activitysim.core import simulate from activitysim.core.mem import force_garbage_c...
#! /usr/bin/env python # # Use the BMW ConnectedDrive API using credentials from credentials.json # You can see what should be in there by looking at credentials.json.sample. # # 'auth_basic' is the base64-encoded version of API key:API secret # You can capture it if you can intercept the traffic from the app at # the ...
from .core import read_varint, read_identifier, read_value from .parser import Parser, fg0, fg1, fg2, fg3, fg4, fg5, fg6, fg7, fg8, fg9, dim, bold from struct import unpack from io import BytesIO # Code that implements and registers the usual native types (high # level parsing and formatting) into the barebones Parser...
# -*- coding: utf-8 -*- """Domestic - Domestic Contact us - Great.gov.uk account""" import logging from types import ModuleType from typing import List from selenium.webdriver.common.by import By from selenium.webdriver.remote.webdriver import WebDriver from directory_tests_shared import URLs from directory_tests_sha...
import React, { PureComponent } from 'react'; import { Menu, Icon } from 'antd'; import { Link, withRouter } from 'react-router-dom'; import OEM from '../../assets/OEM'; const maxSider = { width: '200px', height: '100%', backgroundColor: '#001529', zIndex: 1999, transition: 'background 0.3s, left 0....
/* eslint-disable no-underscore-dangle */ import warning from 'warning'; const escapeRegex = /([[\].#*$><+~=|^:(),"'`\s])/g; function safePrefix(classNamePrefix) { const prefix = String(classNamePrefix); warning(prefix.length < 256, `Material-UI: the class name prefix is too long: ${prefix}.`); // Sanitize the ...
/*! jQuery UI - v1.10.4 - 2014-05-04 * http://jqueryui.com * Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */ jQuery(function(t){t.datepicker.regional.az={closeText:"Bağla",prevText:"&#x3C;Geri",nextText:"İrəli&#x3E;",currentText:"Bugün",monthNames:["Yanvar","Fevral","Mart","Aprel","May","İyun"...
#ifndef __ASM_SPINLOCK_H #define __ASM_SPINLOCK_H #if __LINUX_ARM_ARCH__ < 6 #error SMP not supported on pre-ARMv6 CPUs #endif #include <asm/processor.h> /* * sev and wfe are ARMv6K extensions. Uniprocessor ARMv6 may not have the K * extensions, so when running on UP, we have to patch these instructions away. */...
import abc import json from optparse import OptionParser import requests from service_mapping_plugin_framework import settings class DeallocateNSSIabc(metaclass=abc.ABCMeta): def __init__(self, nm_host, nfvo_host, subscription_host, parameter): self.NM_URL = settings.NM_URL.format(nm_host) self...
// // Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 17 2017 16:24:48). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. // #import "_$s10RealmSwift6ObjectCN.h" @class NSDate, NSString; @interface _TtC8Stickers16RealmPurchaseLog : _$s10RealmSwift6ObjectCN {...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Kedro documentation build configuration file, created by # sphinx-quickstart on Mon Dec 18 11:31:24 2017. # # 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 # auto...
macDetailCallback("000ed4000000/24",[{"d":"2003-12-21","t":"add","a":"12 rue de Blois\nOrleans BP 6744 45067 cedex\n\n","c":"FRANCE","o":"CRESITT INDUSTRIE","s":"wireshark.org"},{"d":"2015-08-27","t":"change","a":"12 rue de Blois Orleans BP 6744 FR 45067 cedex","c":"FR","o":"CRESITT INDUSTRIE"}]);
// Copyright 2014 Samsung Electronics 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 la...
const json = require('./package.json') const tpl = require('./index.tpl'); document.write(JSON.stringify(json)); document.body.innerHTML += tpl;
""" WSGI config for release_manager project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJAN...
/** * 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 agreed to...
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ # Additional basic list exercises # D. Given a list of numbers, return a list where # al...
/** * Package: controlDigitizeDialog * * Description: * Allow saving a defined point or line geometry without * inserting attribute data. Attribute window is not shown then. * Attribute window can be opened checking the checkbox for attr data. * * Files: * - http/plugins/mb_controlDigitizeDialog.js * *...
from typing import Sequence, Optional, TYPE_CHECKING import numpy as np import pybullet from transformation import Transformation from pyboolet.shape import VisualShape, CollisionShape from .simple_body import SimpleBody if TYPE_CHECKING: from ..physics_client import PhysicsClient class Sphere(SimpleBody): ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ ------------------------------------------------- @ Author : pengj @ date : 2020/6/3 13:44 @ IDE : PyCharm @ GitHub : https://github.com/JackyPJB @ Contact : pengjianbiao@hotmail.com -----------------...
var fs = require('fs'); var path = require('path'); var gm = require('gm'); var options = require('../config/options'); var formidable = require('formidable'); var FileInfo = require('./fileHelper'); var photoController = require('../db/controllers/photo'); var UploadHandler = function(req, res, callback) { this.req...
# -*- coding: utf-8 -*- # Copyright 2022 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...
'use strict'; module.exports = { up: (queryInterface, Sequelize) => { return queryInterface.bulkInsert('Instructions', [ { recipeId: 12, listOrder: 1, specification: 'Heat 1 tsp flavourless oil in a frying pan over a medium heat. Add the curry paste and cook for 1 min. Pour in the coconut milk, then leave ...
# -*- coding: utf-8 -*- # Copyright © 2017 Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can # be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause from __future__ import print_function as _ from __future__ import division as _ from...
#include "types.h" #include "param.h" #include "memlayout.h" #include "mmu.h" #include "proc.h" #include "defs.h" #include "x86.h" #include "elf.h" int exec(char *path, char **argv) { char *s, *last; int i, off; uint argc, sz, sp, ustack[3+MAXARG+1]; struct elfhdr elf; struct inode *ip; struct proghdr ph; ...
describe('DateRange', () => { let clock; beforeEach(() => { const date = new Date(2019, 3, 15) clock = cy.clock(date.getTime()) cy.server() }) it('Checks the dates are there', () => { cy.visit('/') cy.get('.v-date-range__input-field input').should('have.valu...
import os # Setup paths for module imports from _unittest.conftest import scratch_path, local_path import gc # Import required modules from pyaedt import Q3d, Q2d from pyaedt.generic.filesystem import Scratch test_project_name = "coax_Q3D" bondwire_project_name = "bondwireq3d" class TestClass: def setup_class(...
#pragma once // FIXME: not all these includes are actually needed for viewport!!!! #include <QtCore/qmath.h> #include <QComboBox> #include <QFormLayout> #include <QGroupBox> #include <QLineEdit> #include <QPainter> #include <QOpenGLPaintDevice> #include <QOpenGLWindow> #include <QtCore/QTimer> #include <QtGui/QScreen>...
__all__ = ('set_options', 'add_options', 'get_options', 'set_classpath', 'add_classpath', 'get_classpath', 'expand_classpath') import platform if platform.system() == 'Windows': split_char = ';' else: split_char = ':' vm_running = False options = [] classpath = None def set_options(*opt...
# This is a class that comes with Django that basically has, # a lot of helper functions that help is test our Django code from django.test import TestCase # Actual function to test from app.calc import add, subsctract class CaclTest(TestCase): # Any testable method needs to start with "test" def test_add_...
from geoopt import Stereographic import torch import numpy as np import matplotlib.pyplot as plt import seaborn as sns from matplotlib import rcParams import shutil if shutil.which("latex") is not None: rcParams["text.latex.preamble"] = r"\usepackage{amsmath}" rcParams["text.usetex"] = True sns.set_style("whit...
jQuery(function(jQuery) { jQuery('.custom_upload_image_button').click(function() { formfield = jQuery(this).siblings('.custom_upload_image'); preview = jQuery(this).siblings('.custom_preview_image'); tb_show('', 'media-upload.php?type=image&TB_iframe=true'); window.send_to_editor = function(html) { imgurl ...
from dumpshmamp.collectors.files import mkdir from shminspector.util.cmd import try_capture_output, is_command def collect_shell_tools_info_files(target_dir, ctx): ctx.logger.info("Collecting shell tools information...") mkdir(target_dir) _collect_info(["brew", "--config"], target_dir, "brew_config.txt...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack 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 requ...
from mongoengine import * from datetime import datetime class UserModel(Document): id = StringField( primary_key=True ) pw_hashed = StringField( min_length=8, required=True ) name = StringField( required=True ) nickname = StringField( required=Tr...
import pymongo as pym import re import unicodedata from nltk import word_tokenize import string from collections import Counter from nltk.corpus import stopwords c = pym.MongoClient().tweet.tweet corpus_valls = c.find({"t_text": re.compile(("valls"), re.I)}) corpus_hamon = c.find({"t_text": re.compile(("hamon"), re.I...
from django.db import models class BaseModel(models.Model): criacao = models.DateTimeField(auto_now_add=True) atualizacao = models.DateTimeField(auto_now=True) ativo = models.BooleanField(default=True) class Meta: abstract = True class Curso(BaseModel): titulo = models.CharField(max_len...
# Copyright (C) 2020 The Android Open Source Project # # 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 _sk_fail; _sk_fail._("sax")
/* * Copyright 1996-2021 Cyberbotics 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 ...
import pytest from nahibu.users.forms import UserCreationForm from nahibu.users.tests.factories import UserFactory pytestmark = pytest.mark.django_db class TestUserCreationForm: def test_clean_username(self): # A user with proto_user params does not exist yet. proto_user = UserFactory.build() ...
from __future__ import absolute_import, division, print_function import sys if (__name__ == "__main__"): from libtbx.auto_build import create_mac_app sys.exit(create_mac_app.run(sys.argv[1:]))
/* Copyright (c) 2007 Cyrus Daboo. 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 re...
import * as swcHelpers from "@swc/helpers"; var Controller = /*#__PURE__*/ function() { "use strict"; function Controller() { swcHelpers.classCallCheck(this, Controller); } swcHelpers.createClass(Controller, [ { key: "create", value: function create() {} }...
from django import forms from django.db import models from unfold.transactions.models import Purchase class PurchaseForm(forms.Form): price = forms.DecimalField(max_digits=8, decimal_places=2, widget=forms.HiddenInput()) external_id = forms.CharField(max_length=255, widget=forms.HiddenInput()) publisher =...
from dataclasses import dataclass, field from typing import List @dataclass class Doc: class Meta: name = "doc" elem: List[str] = field( default_factory=list, metadata={ "type": "Element", "namespace": "", "pattern": r"a\s{0,3}a", } )
import { i18n } from "../utils/i18n.js"; import { canModifyQueue } from "../utils/queue.js"; export default { name: "volume", aliases: ["v"], description: i18n.__("volume.description"), execute(message, args) { const queue = message.client.queue.get(message.guild.id); if (!queue) return message.reply(...
# pytools/puzzles/abbadiv1.py # # Author: Daniel Clark, 2016 ''' This module contains the ABBADiv1 class problem and solution from Topcoder.com ''' class ABBADiv1(object): ''' Mandatory class definition for problem ''' def can_obtain(self, initial, target): ''' Convert initial to targ...
const fetch = require('node-fetch') const prettyMs = require('pretty-ms') const logger = require('./util/logger') const prettyBytes = require('pretty-bytes') const { benchTitle } = require('./constants') const gzipIgnoreRegex = new RegExp(`(General|^Serverless|${benchTitle})`) const prettify = (val, type = 'bytes') =...
from typing import Union class BinaryTreeNode(object): def __init__(self: object, value: object = None) -> None: """ Constructor. Parameters ---------- value: object, optional The value to be set for the node. """ self.value: object = value ...
import React from "react"; import { useInput, useForm } from "@hornbeck/react-form"; import * as validators from "@hornbeck/validators"; const validate = [ validators.required("Required"), validators.email("Invalid email"), ]; function ThousandInputs() { // Warning! Don't actually do this, it's only to test pe...
import numpy as np import dace as dc M, N, S = (dc.symbol(s, dtype=dc.int64) for s in ('M', 'N', 'S')) # @dc.program # def dot(l: dc.float64[S], r: dc.float64[S]): # return np.add.reduce(np.multiply(l, r)) @dc.program def kernel(alpha: dc.float64, A: dc.float64[M, M], B: dc.float64[M, N]): for i in range(M...
import mongoose, { Schema } from 'mongoose'; const InterestSchema = new Schema({ name: { type: String, required: true }, description: { type: String }, faIcon: { type: String }, }, { timestamps: true, }); export default mongoose.model('Interest', InterestSchema);
#!/usr/bin/env python # # Journal: Psychometrika # Authors: Christopher J. Urban and Daniel J. Bauer # Affil.: L. L. Thurstone Psychometric Laboratory in the # Dept. of Psychology and Neuroscience, UNC-Chapel Hill # E-mail: cjurban@live.unc.edu # # Purpose: Some useful functions for building VAE type models. # ...
""" IDA Python Plugin to get information about functions from BAP into IDA. Finds all the locations in the executable that BAP knows to be functions and marks them as such in IDA. Keybindings: Shift-P : Run BAP and mark code as functions in IDA """ import idaapi import idc from heapq import heappush, heappop fro...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
#!/usr/bin/env python3 """ f2py2e - Fortran to Python C/API generator. 2nd Edition. See __usage__ below. Copyright 1999--2011 Pearu Peterson all rights reserved, Pearu Peterson <pearu@cens.ioc.ee> Permission to use, modify, and distribute this software is given under the terms of the NumPy License. NO WARRA...
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); /** * Make a map and return a function for checking if a key * is in that map. * IMPORTANT: all calls of this function must be prefixed with * \/\*#\_\_PURE\_\_\*\/ * So that rollup can tree-shake them if necessary. */ function ...