text stringlengths 3 1.05M |
|---|
/*
american fuzzy lop++ - high-performance binary-only instrumentation
-------------------------------------------------------------------
Originally written by Andrew Griffiths <agriffiths@google.com> and
Michal Zalewski
TCG instrumentation and block chaining support by Andrea Bi... |
import catwigopy.twitter_manager as tm
from catwigopy.User import User
from catwigopy.auxiliar import *
from catwigopy.analysis import *
import pandas as pd
import pickle
import pkg_resources
name = "catwigopy"
class Catwigopy:
"""
The main class of the package. It offers methods to manage all the functiona... |
import api from './api';
export default {
resource: 'deviceid',
patchRelease(deviceid){
console.log("patchRelease from relaesedevice.js: deviceid",deviceid)
return api().patch(`/devices/${deviceid}/release`)
}
} |
import { serialize, parse } from 'cookie';
const TOKEN_NAME = 'token';
export const MAX_AGE = 60 * 60 * 8; // 8 hours
export function setTokenCookie(res, token) {
const cookie = serialize(TOKEN_NAME, token, {
maxAge: MAX_AGE,
expires: new Date(Date.now() + MAX_AGE * 1000),
httpOnly: true,
secure: p... |
import {Utils, Support} from '@wiajs/core';
function resizablePanel(panel) {
const app = panel.app;
if (panel.resizableInitialized) return;
Utils.extend(panel, {
resizable: true,
resizableWidth: null,
resizableInitialized: true,
});
const $htmlEl = $('html');
const { $el, $backdropEl, side, eff... |
from decimal import Decimal
from django import forms
from django.conf import settings
from django.core.exceptions import ValidationError
from django.db.models import Q
from django.forms.fields import Field
from django.forms.formsets import formset_factory, BaseFormSet
import commonware
import happyforms
from slumber.... |
import gym
from baselines import deepq
def main():
env = gym.make("CartPole-v0")
act = deepq.load("cartpole_model.pkl")
while True:
obs, done = env.reset(), False
episode_rew = 0
while not done:
env.render()
obs, rew, done, _ = env.step(act(obs[None])[0])
... |
# @Author : Wang Xiaoqiang
# @GitHub : https://github.com/rzjing
# @File : scheduler.py
# @Time : 2020/1/5 15:34
from apscheduler.jobstores.redis import RedisJobStore
from apscheduler.schedulers.background import BackgroundScheduler
from app.config import Config
class Scheduler(object):
def __init_... |
"""Helpers for sanitising HTML input to the bot."""
import bleach
__all__ = ["clean"]
"""
Take the list of allowed tags and attributes from Element for consistency:
https://github.com/matrix-org/matrix-react-sdk/blob/master/src/HtmlUtils.js#L180-L195
"""
ALLOWED_TAGS = [
"font", # custom to matrix for IRC-sty... |
Package.describe({
name: 'nobutakaoshiro:framework7-ios-material',
version: '1.0.4',
summary: 'Framework7 (v1.4.2) with Meteor. You can choose iOS or Android theme.',
git: 'https://github.com/nobutakaoshiro/meteor-framework7-ios-material.git',
documentation: 'README.md'
});
Package.onUse(function(api) {
a... |
// hashtag/[tag].js
import React, { useEffect } from "react";
import { useDispatch, useSelector } from "react-redux";
import { useRouter } from "next/router";
import { END } from "redux-saga";
import axios from "axios";
import { LOAD_HASHTAG_POSTS_REQUEST } from "../../reducers/post";
import PostCard from "../../comp... |
# Copyright (c) 2013 ARM Limited
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implementation of the functionality ... |
import React from "react";
import Router from './router'
function App() {
return (
<Router />
);
}
export default App;
|
import React, { Component } from "react";
import axios from "axios";
// banner_image_url: null
// category: "Computer programming"
// column_names_merged_with_images: (9) ["id", "name", "description", "url", "category", "position", "thumb_image", "banner_image", "logo"]
// description: "A tech school that teaches the ... |
## Copyright (C) 2019, Huan Zhang <huan@huan-zhang.com>
## Hongge Chen <chenhg@mit.edu>
## Chaowei Xiao <xiaocw@umich.edu>
##
## This program is licenced under the BSD 2-Clause License,
## contained in the LICENCE file in this directory.
##
import sys
import copy
import torch
im... |
from expects import expect, be, equal
from mamba import describe, it
from genyrator.entities.Column import ForeignKey
from genyrator.entities.entity.create_entity_from_type_dict import create_entity_from_type_dict
with describe('create from type dict'):
with it('converts identifier column'):
result = crea... |
// @flow
import type { Node } from 'react';
import React, { Component } from 'react';
import { observer } from 'mobx-react';
import { handleExternalLinkClick } from '../../../utils/routing';
import PickCurrencyOptionDialog from '../../../components/wallet/add/option-dialog/PickCurrencyOptionDialog';
type Props = {|
... |
import ItemSerializer from '@apps/drive/serializers/item_serializer'
import Folder from '@apps/drive/models/folder'
import Item from '@apps/drive/models/item'
const getFolder = async (req, { code }) => {
if(code === 'drive') return 'null'
const folder = await Folder.where({
code
}).fetch({
transacting:... |
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('vue')) :
typeof define === 'function' && define.amd ? define(['vue'], factory) :
(global = global || self, global['vue-trend-chart'] = factory(global.vue));
}(this, (function (vue) { 'use... |
//_ => ~ => -
{
/* <script src="/jspsych-6.3.0/plugins/jspsych-html-keyboard-response.js"></script> */
// <div id="clock"></div>
// <div id="jspsych-experiment"></div>
// let J = new L(true, "clock");
}
class J {
constructor(isExercise, clockId) {
this._one = '';
this._all = '';
this._tmpAll = {
Acc: 0,
... |
# -*- coding: utf-8 -*-
# Copyright (c) 2010-2016, MIT Probabilistic Computing 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/LICENS... |
'use strict';
/**
* @class dE00
* @classdesc
* The CIE2000 color difference algorithm.
* http://en.wikipedia.org/wiki/Color_difference#CIEDE2000
* @constructs dE00
* @memberOf DeltaE
* @property {object} x1 The LAB color configuration object.
* @property {number} x1.L The lightness value, on scale of 0-100.
*... |
"use strict";
/*
* Copyright The OpenTelemetry 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 app... |
/**
******************************************************************************
* @file Audio/Audio_playback_and_record/Src/waveplayer.c
* @author MCD Application Team
* @brief This file provides the Audio Out (playback) interface API
*****************************************************************... |
from setuptools import setup
requires = [
'click==6.7',
'bucketstore==0.1.1'
]
setup(
name="s3env",
version="0.0.4",
author="Cameron Maske",
description="Manipulate a key/value JSON object file in an S3 bucket through the CLI",
author_email="cameronmaske@gmail.com",
url='https://githu... |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... |
'use strict'
module.exports = {
up: async (queryInterface, Sequelize) => {
await queryInterface.sequelize.query(`ALTER TABLE "public"."SessionTokens"
DROP CONSTRAINT "SessionTokens_cnodeUserUUID_fkey",
ADD CONSTRAINT "SessionTokens_cnodeUserUUID_fkey" FOREIGN KEY ("cnodeUserUUID")
REFERENCES "publi... |
export default class Async {
constructor() {
this.promises = [];
this.clientPrerender = false;
}
setClientPreRender() {
// Prevents anything that was server rendered from running again.
this.clientPrerender = true;
}
setClientPostRender() {
this.clientPrerender = false;
}
task(cb) {... |
var data = {
"body": "<path opacity=\".3\" d=\"M3 17h18V5H3v12zm5-9h11v2H8V8zm0 4h11v2H8v-2zM5 8h2v2H5V8zm0 4h2v2H5v-2z\" fill=\"currentColor\"/><path d=\"M8 12h11v2H8zm0-4h11v2H8zm13-5H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h5v2h8v-2h5c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 14H3V5h18v12zM5 12h2v2H5zm0-4h2v2H5z\" fill=\"curren... |
import pytest
import torch
from torch import nn
import torch.nn.functional as F
from syft.generic.pointers.pointer_tensor import PointerTensor
from syft.exceptions import InvalidTensorForRemoteGet
import syft
def test___str__(workers):
bob = workers["bob"]
tensor = torch.Tensor([1, 2, 3, 4])
assert isinst... |
import { makeStyles } from '@material-ui/core/styles';
const useStyles = makeStyles(() => ({
root: {
display: 'flex',
flexDirection: 'column',
width: 465,
},
modal: {
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
outline: 0,
},
loader: {
display: 'flex',
... |
/*
* Copyright (C) 2005 Anthony Liguori <anthony@codemonkey.ws>
*
* Network Block Device
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; under version 2 of the License.
*
* Thi... |
# 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
# d... |
"""
Quiver Homspace
"""
# ****************************************************************************
# Copyright (C) 2012 Jim Stark <jstarx@gmail.com>
# 2013 Simon King <simon.king@uni-jena.de>
#
# Distributed under the terms of the GNU General Public License (GPL)
#
# This code is distributed in... |
import configuration.settings
import requests
api_base_url = configuration.settings.SUPERJOB_API_BASE_URL
api_access_token = configuration.settings.SUPERJOB_API_ACCESS_TOKEN
def fetch_vacancies(keyword, town=None, catalogues=None, currency=None, period=0, page=0, count=100):
"""Fetch vacancies from SuperJob API,... |
import numpy as np
import cv2 as cv
def agregar_imagen(fondo, imagen, x, y):
filtro_x = -x if x < 0 else 0
filtro_y = -y if y < 0 else 0
x = 0 if x < 0 else x
y = 0 if y < 0 else y
if len(imagen.shape) > 2:
alto, ancho, cantidad_canales = imagen.shape
else:
alto, ... |
import unittest
import solver
class TestSolution(unittest.TestCase):
def test_solve(self):
self.assertEqual(solver.solve([2, 3, 4]), 12)
self.assertEqual(solver.solve([5, 15]), 15)
self.assertEqual(solver.solve([3, 9, 10]), 90)
self.assertEqual(solver.solve(range(1, 4)), 6)
|
# -*- coding:utf-8 -*-
'''Train CIFAR10 with PyTorch.'''
from __future__ import print_function
import os
os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"
os.environ["CUDA_VISIBLE_DEVICES"] = "2"
import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
import torch.backends.cud... |
module.exports = {
extends: ["stylelint-config-standard"],
rules: {
"no-descending-specificity": null,
indentation: null,
},
}
|
/* mbed Microcontroller Library
*******************************************************************************
* Copyright (c) 2016, STMicroelectronics
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following condition... |
# -*- coding: utf-8 -*-
# MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
#
# Copyright (c) 2014-2021 Megvii Inc. All rights reserved.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT ARRANTI... |
#! /usr/bin/python2
# -*- coding: utf8 -*-
from __future__ import division
from math import ceil
import pykka, tweepy, time
from warnings import warn
class Fetcher(pykka.ThreadingActor):
"""Fetch friends and tweets for a given ego
On actor per user must be created """
def __init__(self, api, ego_id):
... |
# model settings
_base_ = [
'../_base_/datasets/zhuhai15708_3class.py', '../_base_/default_runtime.py',
'../_base_/schedules/schedule_160k.py'
]
#norm_cfg = dict(type='SyncBN', requires_grad=True)
norm_cfg = dict(type='BN',requires_grad=True)
model = dict(
type='EncoderDecoder',
pretrained='mmcls://mobi... |
import {
SETCREDENTIALS,
SET_AUTH_PATH
} from '../../actions/accounts/accountActions';
const cookies = {}
let login = 'root'
let password = ''
document.cookie.split(';').forEach(cookie => {
const key = cookie.split('=')[0]
const value = cookie.split('=')[1]
cookies.key = value
})
if (cookies.hasOwnProperty ('l... |
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <functional>
#include <ABI45_0_0jsi/ABI45_0_0jsi.h>
namespace ABI45_0_0facebook {
namespace ABI45_0_0Rea... |
/*
Copyright (c) 2011 David Björklund
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, d... |
#!/usr/bin/env python3
from smbus2 import SMBus, i2c_msg
import struct
from time import sleep
def calculateCRC(input):
crc = 0xFF
for i in range (0, 2):
crc = crc ^ input[i]
for j in range(8, 0, -1):
if crc & 0x80:
crc = (crc << 1) ^ 0x31
else:
... |
"""Playbook Variable Model"""
# third-party
from pydantic import BaseModel, Field
class PlaybookVariableModel(BaseModel):
"""Playbook Variable Model
Parsing the variable into it individual parts:
#App:1234:output!String
"""
app_type: str = Field(
None,
description='The applicatio... |
import sys
import pytest
sys.path.append('../')
from model import *
def setup():
gb = Course('Math','Fall 2017')
joe = Student(gb, 'Joe', 'Davis', 'joe@pdx.edu')
mary = Student(gb, 'Mary', 'Wilcox', 'm2w@pdx.edu')
gb.students.append(joe)
gb.students.append(mary)
quizzes = Category(gb, 'Quizzes... |
var searchData=
[
['window',['window',['../class_a_p_i_explorer_1_1_a_p_i_explorer.html#a451f3cdc177e58021e590f51bc836a49',1,'APIExplorer.APIExplorer.window()'],['../class_d_c2126_a_1_1dc2126a_gui.html#a03d2568ac17a48e5d049946cb2039dd6',1,'DC2126A.dc2126aGui.window()'],['../class_hr_listener_1_1hr_listener_gui.html#a... |
var layers = module.exports = {};
var attribution = '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap közreműködők</a>';
/**
* Default mapnik tiles from http://www.openstreetmap.org
*/
layers.mapnik = L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 19,
subdomai... |
(function($) {
"use strict"; // Start of use strict
// Smooth scrolling using jQuery easing
$('a.js-scroll-trigger[href*="#"]:not([href="#"])').click(function() {
if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) {
var target = $(this.ha... |
function App(){
const [todos, setTodos] = React.useState([
{text: 'learn react', isCompleted: false,},
{text: 'meet friend for lunch', isCompleted: false,},
{text: 'build todo app', isCompleted: false,},
]);
const addTodo = text => {
const newTodos = [...todos, {text... |
"""
Copyright (c) 2015 Red Hat, Inc
All rights reserved.
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
"""
from __future__ import print_function, unicode_literals, absolute_import
import os
import re
import inspect
def test_if_all_versions_match(... |
'''Simplified Solution'''
def countApplesAndOranges(s, t, a, b, apples, oranges):
apple_count = sum([1 for apple in apples if apple+a in range(s, t+1)])
orange_count = sum([1 for orange in oranges if orange+b in range(s, t+1)])
print(apple_count)
print(orange_count)
'''Descriptive Solution'''
# def cou... |
# encoding: utf-8
"""Unit tests for ckan/logic/auth/delete.py.
"""
import pytest
from six import string_types
import ckan.logic.auth.delete as auth_delete
import ckan.tests.factories as factories
import ckan.tests.helpers as helpers
from ckan import model
logic = helpers.logic
@pytest.mark.usefixtures("clean_db",... |
#!/usr/bin/env python3
import datetime
import sys
args = sys.argv[1:]
if len(args) < 2:
print("usage: sunkcost <cost> <start_date>")
sys.exit()
cost = float(args[0])
yyyy, mm, dd = args[1].split("-")
startdate = datetime.date(int(yyyy), int(mm), int(dd))
enddate = startdate + datetime.timedelta(days=365)
now... |
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
import ConfigParser
from hermes_python.hermes import Hermes
from hermes_python.ontology import *
from snipsowm.snipsowm import SnipsOWM
import io
import math
import datetime as dt
from dateutil.parser import parse
CONFIGURATION_ENCODING_FORMAT = "utf-8"
CONFIG_INI = "con... |
// ------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
// ------------------------------------------------------------
#pragma once
namespace Naming... |
from rest_framework import serializers
from ..common.aws import *
class AwsEcsTaskDefinitionSerializer(serializers.Serializer):
task_definition_arn = serializers.CharField(
source='aws_ecs_task_definition_arn', max_length=1000,
required=False)
task_definition_infrastructure... |
'''
Copyright 2017, Fujitsu Network Communications, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in w... |
/*
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1.... |
"""
Workflow Job
------------------
The Query class represents a workflow job model from the RESTFul Workflow Service API
"""
import configparser
import json
import datetime
import os
import botocore.session
import dateutil
import time
import logging
from typing import Callable, Union, Optional, Dict, List
from . i... |
import React, { Component } from 'react';
import github from '../github-logo.png';
import linkedin from '../linkedin-icon.png';
import './contact.css'
class Contact extends Component {
constructor(props) {
super(props);
this.state = {
user_name: "",
user_email: "",
... |
"""
Low level access. Makes no effort to parse results.
"""
import os
import pickle # nosec
from typing import Any, Dict, Tuple, cast
from diskcache import Cache
from stackapi import StackAPI
from so_pip import settings as settings
if settings.OUTPUT_FOLDER == "":
raise TypeError("Loaded this module too early."... |
#!/usr/bin/env python
import os
import sys
import pymysql
pymysql.install_as_MySQLdb()
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "api.config.development")
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above imp... |
/*
* Copyright (C) 2005, 2006 IBM Corporation
* Copyright (C) 2014, 2015 Intel Corporation
*
* Authors:
* Leendert van Doorn <leendert@watson.ibm.com>
* Kylene Hall <kjhall@us.ibm.com>
*
* Maintained by: <tpmdd-devel@lists.sourceforge.net>
*
* Device driver for TCG/TCPA TPM (trusted platform module).
* Speci... |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'C:\Users\Raphael\Desktop\Git\PyManatee\pyleecan\GUI\Dialog\DMachineSetup\SWSlot\PWSlot28\PWSlot28.ui'
#
# Created by: PyQt5 UI code generator 5.9.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, Qt... |
import argparse
import logging
import os
from ceph_deploy import hosts
from ceph_deploy.cliutil import priority
from ceph_deploy.lib import remoto
from ceph_deploy.util.constants import default_components
from ceph_deploy.util.paths import gpg
LOG = logging.getLogger(__name__)
def sanitize_args(args):
"""
a... |
# -*- coding: utf-8; tab-width: 4; indent-tabs-mode: f; python-indent: 4 -*-
#
# Copyright (c) 2015-2019 Intel, Inc. All rights reserved.
# Copyright (c) 2019 Triad National Security, LLC. All rights
# reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
import os,... |
#!/usr/bin/python3.7
# UTF8
# Date: Tue 27 Aug 2019 14:27:23 CEST
# Author: Nicolas Flandrois
# Calcul de son IMC
# (Indice de Masse Corporelle)
# Calcul de l'IMC :
# IMC = weight(kg) / height²(m)
# Avec ce résultat, on peut se situer par rapport aux catégories ci-dessous :
# Catégorie de l'IMC (kg/m2) Classificat... |
import json
import logging
import os
import tempfile
import asyncio
import platform
import aiohttp
from yarl import URL
import pytest
from aiohttp import ClientSession
from injector import (ClassAssistedBuilder, Injector, Module, inject, provider,
singleton)
from backup.config import Config, Set... |
var ctf_js_exists=void 0!==ctf_js_exists;ctf_js_exists||function(u){function t(){if(window.ctfObject.consentGiven||!window.ctfObject.gdpr)return!0;if("undefined"!=typeof CLI_Cookie)null!==CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME)&&(window.ctfObject.consentGiven="yes"===CLI_Cookie.read("cookielawinfo-checkbox-non-necessar... |
from sys import maxsize
class Contact:
def __init__(self, contact_firstname=None, contact_lastname=None, all_phones_from_home_page=None, id=None,
contact_homephone=None, contact_mobilephone=None, contact_workphone=None, contact_secondaryphone=None,
contact_address=None, contact_... |
# coding: utf-8
# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _GridItem = _interopRequireDefault(require("../grid/GridItem"));
var _sortableFactories = require("../sortable/sortable-factories");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj ... |
import hashlib
from pathlib import Path
from typing import List
from urllib.parse import quote, urlencode
import requests
from docutils import nodes
from docutils.parsers.rst.directives.images import Image
_THIS_DIR = Path(__file__).parent
# Color palette from PyTorch Developer Day 2021 Presentation Template
YELLOW... |
/* -*- Mode: C; c-basic-offset:4 ; -*- */
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2006 The University of Tennessee and The University
* ... |
/*
* Copyright (c) 2006-2009 Erin Catto http://www.box2d.org
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
* Permission is granted to anyone to use this software for any purpos... |
"""
Client library for Luncho API.
Use luncho.ts and luncho.py rather than LunchoAPI.ts and others. # noqa: E501
The version of the OpenAPI document: 0.0.1
Generated by: https://openapi-generator.tech
"""
import json
import atexit
import mimetypes
from multiprocessing.pool import ThreadPool
import... |
# Copyright (c) 2010-2014 OpenStack Foundation.
#
# 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... |
!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("../../mode/sql/sql")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../../mode/sql/sql"],a):a(CodeMirror)}(function(a){"use strict";function b(a){return"[object Array]"==Object.prototype.toS... |
import time
from binascii import hexlify
from past.builtins import xrange
class Ultrasonic(object):
def __init__(self, name, ble, mqtt, protocol, default_topic, id_num, u_trigger_id, s_trigger_id):
self.is_connected = 0
self.name = name
self.id = id_num
self.u_trigger_id = u_trigg... |
/**
* Owl Carousel v2.3.4
* Copyright 2013-2018 David Deutsch
* Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE
*/
/**
* Owl carousel
* @version 2.3.4
* @author Bartosz Wojciechowski
* @author David Deutsch
* @license The MIT License (MIT)
* @todo Lazy Load Icon... |
import binascii
import json
import os
from pathlib import Path
from django.contrib.auth.models import User
from django.db.models import Q
from django.db import models
class FindJobManager(models.Manager):
def get_queryset(self):
return super().get_queryset().exclude(fun="saltutil.find_job")
class Jids... |
import {List} from 'immutable';
import {createReducer} from '../../../src/utils/store';
import {
createNewMessage,
createLinkSnippet,
createComponentMessage,
} from '../../../src/utils/messages';
import {MESSAGE_SENDER} from '../../../src/constants.js';
import * as actionTypes from '../actions/actionTypes';
co... |
import _ from 'lodash';
import uiModules from 'ui/modules';
import contextAppTemplate from './app.html';
import './components/loading_button';
import './components/size_picker/size_picker';
import {
createInitialQueryParametersState,
QueryParameterActionsProvider,
QUERY_PARAMETER_KEYS,
} from './query_parameters... |
import statistics
from data.seek_sets import seek_set
from puzzle.heuristics import acrostic
from puzzle.problems import problem
class AcrosticProblem(problem.Problem):
def __init__(self, name, lines, **kwargs):
super(AcrosticProblem, self).__init__(name, lines, **kwargs)
self._acrostic = acrostic.Acrostic... |
# -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2018-2019 Fetch.AI Limited
#
# 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 ... |
const {
GraphQLID,
GraphQLObjectType,
GraphQLString,
GraphQLNonNull
} = require('graphql')
const MeType = new GraphQLObjectType({
name: 'Me',
fields: () => {
return {
id: { type: GraphQLNonNull(GraphQLID) },
email: { type: GraphQLNonNull(GraphQLString) },
username: { type: GraphQLNonN... |
/*
* (c) Copyright IBM Corp. 2021
* (c) Copyright Instana Inc. and contributors 2020
*/
'use strict';
require('@instana/core').registerAdditionalInstrumentations([
require('./instrumentation/process/edgemicro'),
require('./instrumentation/process/childProcess')
]);
|
import spiceypy as spice
import numpy as np
import ale
from ale.base.type_sensor import Framer
from ale.transformation import FrameChain
from ale.rotation import TimeDependentRotation
from ale import util
class NaifSpice():
def __enter__(self):
"""
Called when the context is created. This is used
... |
const path = require("path");
module.exports = {
extends: "../.babelrc.js",
plugins: [
[
"babel-plugin-relay",
{ artifactDirectory: path.resolve(__dirname, "./__generated__") },
],
],
};
|
const path = require('path');
const mix = require('laravel-mix');
mix.config.vue.esModule = true;
mix
.js('resources/js/app.js', 'public/js')
.sass('resources/sass/app.scss', 'public/css')
.sourceMaps();
if (mix.inProduction()) {
mix.version();
}
mix.webpackConfig({
// plugins: [
// Removemos o menu aqui
... |
import requests
r = requests.get('https://jenapp.appgallabs.io/microservice/')
print(r.status_code)
print(r.json()) |
class ReqParser(object):
@classmethod
def check_body(cls, req, params):
for param in params:
if param not in req:
return False
return True
@classmethod
def as_jsonlist(cls, chunk):
return list(map(lambda x: x.json() if x else None, chunk))
|
import pkg_resources
__all__ = ["VERSION", "__version__", "__short_version__"]
# single-sourcing the package version
version_file = pkg_resources.resource_filename("dftinputgen", "VERSION.txt")
with open(version_file, "r") as fr:
__version__ = fr.read().strip()
VERSION = __version__
__short_version__ = __versi... |
# Copyright (c) 2016 PaddlePaddle 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 required by applic... |
var searchData=
[
['width_0',['width',['../classwte_1_1cmp_1_1hitbox.html#af23b8b5f3393b47f659aeebc2b2960ff',1,'wte::cmp::hitbox']]]
];
|
import os
import select
import signal
import sys
import uuid
from django_spring.config import Config
from django_spring.utils.logger import get_logger, TERM_COLORS
from django_spring.utils.socket_data import (
closing,
connect,
fd_redirect_list,
write_json,
)
class Client(object):
def __init__(se... |