text stringlengths 3 1.05M |
|---|
/*
* Class for handling edge cases for shell code generation. Defines "emit" methods.
*/
module.exports = (Visitor) => class Generator extends Visitor {
constructor() {
super();
}
};
|
import "react-native";
import React from "react";
import renderer from "react-test-renderer";
import { Text } from "../../src/atoms/Text";
jest.mock("Platform", () => {
const Platform = require.requireActual("Platform");
Platform.OS = "ios";
return Platform;
});
it("renders h1 text", () => {
const tre... |
from behavior import *
from playchart import *
from gamedatadump import *
import json
import gameviewer
class Character:
def __init__(self, sketch_file, emotion_model):
self.emotion_model = emotion_model
self.debug_info = ''
self.game = None
self.sketch = {}
... |
from aioredis.parser import Reader
from aioredis.stream import StreamReader
from asyncio.streams import StreamReaderProtocol
import msgpack
from .serializer import default
from .special_args import Auth, AuthRequired, ConnState
MAX_CHUNK_SIZE = 65536
OK = b"+OK\r\n"
COMMAND_PING = b"PING"
PONG = b"+PONG\r\n"
COMMAND... |
from django.shortcuts import render
from rest_framework import generics, authentication, permissions
from rest_framework.authtoken.views import ObtainAuthToken
from rest_framework.settings import api_settings
from django.contrib.auth import get_user_model
User = get_user_model()
from user.serializers import (
User... |
//var chalk = require("chalk");
import chalk from "chalk";
/* eslint-disable no-console */
console.log(chalk.green('Starting app in dev mode...'));
|
webpackJsonpac__name_([0],{
/***/ 1321:
/***/ function(module, exports, __webpack_require__) {
"use strict";
"use strict";
var core_1 = __webpack_require__(0);
var common_1 = __webpack_require__(20);
var forms_1 = __webpack_require__(19);
var nga_module_1 = __webpack_require__(333);
var dashboard_component_1 = __webp... |
(function () {
"use strict";
/* declare global variables within the class */
var uiFrontLogin,
uiFrontRegister,
uiFrontEmail,
uiFrontReset,
filler;
/* private ajax function that will send request to backend */
function _ajax(oParams, fnCallback, uiBtn) {
if (... |
const fs = require('fs');
const path = require('path');
const ini = require('ini');
const pm2s = require('./pm2s');
const utils = {
isNull: function (v) {
return v === null || v === undefined || v === '';
},
isEmpty: function (v) {
return this.isNull(v) || v.length === 0;
},
parentDir: function ()... |
import React from 'react';
import { BrowserRouter, Route } from 'react-router-dom';
import Home from './Home';
import Login from './Login';
import { AuthProvider } from './Auth';
import PrivateRoute from './PrivateRoute';
function Admin() {
return (
<AuthProvider>
<BrowserRouter>
<div>
... |
import PropTypes from 'prop-types';
const Container = PropTypes.shape({
on: PropTypes.func,
off: PropTypes.func,
isHidden: PropTypes.bool,
tab: PropTypes.shape({
header: PropTypes.shape({
tabs: PropTypes.arrayOf(
PropTypes.shape({
contentItem: PropTypes.shape({}),
})
)... |
# Copyright 2019 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, ... |
/* Copyright (c) 2013, Vsevolod Stakhov
* 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 o... |
# qubit number=4
# total number=28
import cirq
import qiskit
from qiskit.providers.aer import QasmSimulator
from qiskit.test.mock import FakeVigo
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit import BasicAer, execute, transpile
from pprint import pprint
from qiskit.test.mock import ... |
"""
This example demonstrates the use of ColorBarItem, which displays a simple interactive color bar.
"""
import numpy as np
import pyqtgraph as pg
from pyqtgraph.Qt import QtCore, QtGui, QtWidgets, mkQApp
from pyphocorehelpers.gui.PhoUIContainer import PhoUIContainer
from pyphoplacecellanalysis.GUI.Qt.PlacefieldVi... |
# -*- coding: utf-8 -*-
"""@package Methods.Machine.Machine.comp_masses
Compute the masses of the machine method
@date Created on Thu Jan 29 13:09:38 2015
@copyright (C) 2015-2016 EOMYS ENGINEERING.
@author pierre_b
"""
def comp_masses(self):
"""Compute the masses of the machine
- Mmach : Mass total [kg]
... |
from unittest.mock import patch
from django.core.management import call_command
from django.db.utils import OperationalError
from django.test import TestCase
class CommandTests(TestCase):
def test_wait_for_db_ready(self):
"""Test waiting for db when the db is avail"""
with patch('django.db.utils... |
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
// ***************************************************************
// - [#] indicates a test step (e.g. # Go to a page)
// - [*] indicates an assertion (e.g. * Check the title)
// - Use element ID when selec... |
/*
* Copyright (c) 2004-2006 Maxim Sobolev <sobomax@FreeBSD.org>
* Copyright (c) 2006-2007 Sippy Software, Inc., http://www.sippysoft.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
... |
#!/usr/bin/env python
"""Unit test for check definitions."""
from __future__ import absolute_import
from __future__ import unicode_literals
import glob
import os
from grr_response_core import config
from grr_response_core.lib import flags
from grr_response_server.check_lib import checks_test_lib
from grr.test_lib im... |
"""
Utility script for clearing data from a Demo Dataverse
To use this script:
(1) Set an environment variable with an API key from a Dataverse administrator
export DV_API_KEY=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
(2) (Optional) Edit "datasets_to_keep.py" and add datasets to NOT delete
(3) Run "python delete_datase... |
'use strict';
class Service {
get position() {/* */}
get attached_to() {/* */}
get requires() {/* */}
get name() {/* */}
get superClass() {/* */}
handle(event) {/* */}
set hook(h) {/* */}
get hooks() {/* */}
}
module.exports = Service;
|
//
// XHAboutMeViewController.h
// XHSmartHomeSystem
//
// Created by bl4ckra1sond3tre on 5/28/15.
// Copyright (c) 2015 bl4ckra1sond3tre. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface XHAboutMeViewController : UIViewController
@end
|
"""Import Variants and some misconceptions
# module1.py
import math
sys.modules
is math in sys.modules? math <module object> ________
if not, load and insert ref \
... |
from locust import HttpLocust, TaskSet, TaskSequence, between, constant
from bs4 import BeautifulSoup, SoupStrainer
from string import ascii_lowercase
import random
import gevent
import sys
import re
# TODO:
# Modify current_hunt request to only look at unsolved puzzles
# Fix no last_pk error with chat post (user ... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Script for testing KRad module library
References:
RADKFILE/KRADFILE
This project provides a decomposition of kanji into a number of visual elements
or radicals to support software which provides a lookup service using kanji components.
h... |
#!/usr/bin/env python3
# Copyright (c) 2015-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test BIP66 (DER SIG).
Test that the DERSIG soft-fork activates at (regtest) height 1251.
"""
from tes... |
/*-----------------------------------------------------------------------------------*/
/* RETINA.JS
/*-----------------------------------------------------------------------------------*/
(function () {
function t(e) {
this.path = e;
var t = this.path.split("."),
n = t.slice(0, t.length... |
/**
* Quick and dirty script to update frontmatter of all markdown to include
* 'publish_date' and 'layout' for astro.
*/
const { read, batch } = require("frontmatter-file-batcher");
(async () => {
// const fileContents = await read("src/pages/fleeting-notes/20200920.md");
// console.log(fileContents);
awai... |
// Imports
const { build } = require('quoia');
const path = require('path');
// Quoia config
const config = {
outDir: './docs',
rootPage: require('./src/pages/home/home.quoia'),
templatingEngine: 'handlebars',
rootCopy: [
'./src/assets',
'./src/root/'
],
cssPreprocessor: 'sass',
cssIncludePaths: ... |
#include "XEnDec_Common.h"
#include "xemod_common.h"
int genRandXEV3()
{
int tempRand = 0;
tempRand = genRand32();
tempRand = tempRand ^ (genRand32() << 18);
tempRand = tempRand ^ (genRand32() << 2 );
tempRand = tempRand ^ genRand32();
tempRand = genRand32();
tempRand = tempRand ^ genRand32();
tempRand = te... |
import './__mocks__/resolveConfig.js'
import path from 'node:path'
import { jest } from '@jest/globals'
import fs from 'fs-extra'
import { addConfigFileSerializer } from './__utils__/addConfigFileSerializer.js'
import { withGitIntegration } from './__utils__/withGitIntegration.js'
import * as fileFixtures from './__... |
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
# See COPYING file distributed along with the PyMVPA package for the
# copyright and license terms.
#
### ### ### ### ###... |
# coding=utf-8
r"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from tests import IntegrationTestCase
from tests.holodeck import Request
from twilio.base.exceptions import TwilioException
from twilio.http.response import Response
class MemberTestCase(Integratio... |
from app1.models import *
from app1.util.utils import *
def delTeachCourse(request):
'''
http://127.0.0.1:8000/app5/delTeachCourse?tno=001&teachCourse__cno
'''
try:
if(request.method=='POST'):
studata=json.loads(request.body)
data=studata["data"]
... |
var searchData=
[
['char_5fto_5fsymbol',['char_to_symbol',['../structtest__types.html#aadadf55567c37c9be3130f97eadd0e34',1,'test_types']]],
['clear',['clear',['../classeosio_1_1string.html#aac90a49eab4c1c047f40bf7e34fb46c9',1,'eosio::string']]],
['compare',['compare',['../classeosio_1_1string.html#a55fb26a6d5c77e... |
Object.defineProperty(exports, "__esModule", { value: true });
const React = require("react"),
Attributes_1 = require("../../Attributes"),
classNames = require("classnames/bind"),
css = classNames.bind(require("./Field.module.scss"));
/**
* Form Error
*
* @param props Control properties (defined in `Form... |
#!/usr/bin/env python
# coding: utf-8
# # This notebook is for pre- processing Text Data from a folder and and store the output in a specified directory
# ## Objectives
# This notebook aims to give the user the ability to read the code from a folder of .txt files, perform the steps for pre processing on selecte... |
import tensorflow as tf
from keras.applications import Xception
from keras.utils import multi_gpu_model
import numpy as np
import pdb
num_samples = 1000
height = 224
width = 224
num_classes = 1000
# Instantiate the base model (or "template" model).
# We recommend doing this with under a CPU device scope,
# so that th... |
# 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 ... |
# 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
from... |
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyAnyio(PythonPackage):
"""High level compatibility layer for multiple asynchronous event ... |
#
# 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... |
#!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... |
#!/usr/bin/env python
# Zed Attack Proxy (ZAP) and its related class files.
#
# ZAP is an HTTP/HTTPS proxy for assessing web application security.
#
# Copyright 2017 ZAP Development Team
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License... |
from ..error.CmdExecError import CmdExecError
class StrUtil:
@staticmethod
def getCommandPropertiesFromStr(cid: str) -> dict:
props: dict = {'module': None, 'cid': None}
if cid is None:
return props
arr: list = cid.split('.')
if len(arr) > 1:
... |
import { useState, useEffect, useRef, useContext } from 'react';
import { ethers } from 'ethers';
import Head from 'next/head';
import Web3Context from '../context/Web3Context';
// Import the ABIs
import SolidityStorage from '../artifacts/contracts/SolidityStorage.json';
import VyperStorage from '../artifacts/contract... |
import time
def function(arg1, arg2):
print(time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time())))
print(arg1, "+", arg2, "=", arg1 + arg2)
|
# coding: utf-8
"""
Cloudbreak API
Cloudbreak is a powerful left surf that breaks over a coral reef, a mile off southwest the island of Tavarua, Fiji. Cloudbreak is a cloud agnostic Hadoop as a Service API. Abstracts the provisioning and ease management and monitoring of on-demand clusters. SequenceIQ's Cloud... |
# vim: set fileencoding=utf-8 :
from __future__ import absolute_import, print_function, unicode_literals
import abc
import logbook
import six
import treq
import txwebretry
import stethoscope.api.utils
import stethoscope.plugins.mixins.http
logger = logbook.Logger(__name__)
@six.add_metaclass(abc.ABCMeta)
class ... |
from linora.param_search.GEClassifier._RandomSearch import RandomSearch
# from linora.param_search.GEClassifier._GridSearch import GridSearch
|
#!/usr/bin/env python
# Copyright 2016 Vidyo 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 ag... |
# 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
from... |
#import dino file to create herd
from dino import Dino
class Herd:
def __init__(self) :
self.herd = []
def create_herd(self):
littlefoot = Dino('Little Foot, 30')
self.dino.append(littlefoot)
duckie = Dino('Duckie, 50')
self.dino.append(duckie)
petree = Dino ('Petree, 22')
... |
# Copyright 2015 OpenStack Foundation
# 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 requ... |
import logging; log = logging.getLogger(__name__)
from .Menu import Menu
class AttachPointMenu(Menu):
"""A menu for examining an attach point."""
def __init__(self, parent):
super().__init__(parent)
self.title = "Attach Points"
self.refresh()
def refresh(self):
if self.pa... |
/*
* 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to ... |
import { getMachineRole } from '../../selectors';
import { DASHES } from '../../constants';
export const BaremetalHostRole = ({ machine }) => getMachineRole(machine) || DASHES;
|
# Copyright 2016 The Bazel 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 applicable la... |
/*
* Copyright (C) 2017 Inria
* 2017 OTA keys
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup boards_nucleo-f031k6
* @{
*
* @file
* @brief Perip... |
"""
It was found that the BigHand annotation files contain annotations for
files that do not exist. This script checks that the length of annotation files
is equal to the number of files in corresponding directories.
"""
from src.utils.paths import BIGHAND_DATASET_DIR
import os
import glob
from pathlib import Path
... |
/* Exercise 5-7. Rewrite readlines to store lines in an array supplied by main,
rather than calling alloc to maintain storage. How much faster is the
program? */
#include <stdio.h>
#define MAXLINES 5000
#define MAXLEN 100
void m_strcpy(char *dest, char *src)
{
while (*dest++ = *src++)
;
}
int m_... |
//解析udp的data数据
function show(value) {
value = value.split(':');
let arr = [];
for (let i = 0; i < value.length; i++) {
arr.push(+('0x' + value[i]));
}
console.log(Buffer.from(arr).toString());
}
//eg:
show('e4:bd:a0:e5:a5:bd:ef:bc:8c:63:6c:69:65:6e:74:41:ef:bc:8c:e6:88:91:e6:98:af:63:6c:69:... |
# %%
import os
from collections import OrderedDict, deque, namedtuple
from typing import List, Tuple
import gym
import numpy as np
import torch
from pytorch_lightning import LightningModule, Trainer
from pytorch_lightning.utilities import DistributedType
from torch import Tensor, nn
from torch.optim import Adam, Optim... |
###########################################################################
#
# Copyright 2019 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
#
# https://www.apache.org/... |
"""
General functions for scraping data from Google search engine results pages.
"""
import re
import requests
import urllib.parse
import pandas as pd
import numpy as np
from requests_html import HTMLSession
def _get_source(url: str):
"""Return the source code for the provided URL.
Args:
url (string... |
import pytest
from pytest_test_utils import TmpDir
from scmrepo.git import Git
def test_open(tmp_dir: TmpDir, scm: Git):
files = tmp_dir.gen(
{"foo": "foo", "тест": "проверка", "data": {"lorem": "ipsum"}}
)
scm.add_commit(files, message="add")
fs = scm.get_fs("master")
with fs.open("foo"... |
import argparse
from pathlib import Path
import os
from tqdm import tqdm
REMOTE_BASE = "https://people.eecs.berkeley.edu/~paras/datasets" #"https://contrastive-code.s3.amazonaws.com" #
SHARED_BASE = Path("/work/paras/contracode/data").resolve()
DEFAULT_LOCAL_BASE = str((Path(__file__).parent.parent / "data").resolv... |
from collections import OrderedDict
from itertools import count, groupby
from django.conf import settings
from django.contrib.auth.models import User
from django.contrib.contenttypes.fields import GenericForeignKey, GenericRelation
from django.contrib.contenttypes.models import ContentType
from django.contrib.postgres... |
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-d003b848"],{"00dd":function(n,t){n.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAiCAMAAAANmfvwAAAAdVBMVEUAAADMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM... |
function (config) {
try {
var apiKey = config.request.headers['apiKey'];
if(apiKey != "2222"){
return false;
}
var requestBody = JSON.parse(config.request.body);
var consentId = requestBody.consent_id;
var isMatch = false;
switch (consentId) {
... |
const Occurrences = require('./Occurrences');
const Discord = require('./Discord');
module.exports = {
Occurrences,
Discord,
};
|
let DotJson = require('dot-json');
let { exec } = require('child_process')
module.exports.runFromPackage = function (package, command) {
exec(command, { cwd: __dirname+'/../packages/'+package })
}
module.exports.run = function (command) {
exec(command, { cwd: __dirname+'/..' })
}
module.exports.writeToPackag... |
const VerusZkedidUtils = require('verus-zkedid-utils')
const { VERUS_LINK, INVALID_SM_PARAMS, VERUS_PAYMENT_REQUEST } = VerusZkedidUtils.constants
const { decompress } = require('./utils/compress')
module.exports = {
/**
* Reads a payment request string and attempts to parse it
* @param {String} requestLink Th... |
from sqlalchemy import Boolean, Column, Float, Integer, String
from src.infra.sqlalchemy.config.database import Base
class Product(Base):
__tablename__ = 'produto'
id = Column(Integer, primary_key=True, index=True)
name = Column(String)
detail = Column(String)
price = Column(Float)
available... |
module.exports = {
name: "java_map",
description: "java map",
execute(message, args) {
message.channel.send("To be implemented...");
},
};
|
/**
* @file lpc43xx_scu.c
* @brief
*
* DAPLink Interface Firmware
* Copyright (c) 2009-2016, ARM Limited, All Rights Reserved
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You... |
import numbers
from typing import TYPE_CHECKING, List, Tuple, Type, Union
import warnings
import numpy as np
from pandas._libs import lib, missing as libmissing
from pandas._typing import ArrayLike
from pandas.compat import set_function_name
from pandas.compat.numpy import function as nv
from pandas.core.dtypes.comm... |
var scrollLoad = (function (options) {
var defaults = (arguments.length == 0) ? { src: 'xSrc', time: 300} : { src: options.src || 'xSrc', time: options.time ||300};
var camelize = function (s) {
return s.replace(/-(\w)/g, function (strMatch, p1) {
return p1.toUpperCase(... |
/*
* This file was automatically generated using arm64-sysreg-lib
* See: https://github.com/ashwio/arm64-sysreg-lib
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON... |
# 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 in writing, ... |
// import { selectHumanResourcePageDomain } from '../selectors';
describe('selectHumanResourcePageDomain', () => {
it('Expect to have unit tests specified', () => {
expect(true).toEqual(false);
});
});
|
# pylint: disable=line-too-long, invalid-name, broad-except
""" developing testing file """
import datetime
import os
import requests
from server_automation.tests import test_exporter_tool as tester, request_sampels
import logging
import json
# log_mode = os.environ.get('DEBUG_LOGS', None)
# file_log = os.environ.get('... |
//
// AMPIdentify.h
// Copyright (c) 2015 Amplitude Inc. (https://amplitude.com/)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation ... |
""" A map that normalizes type names that are slightly different
between the different sources """
types = {
"Titanium.Activity": "Titanium.Android.Activity",
"Titanium.Intent": "Titanium.Android.Intent",
"Titanium.Service": "Titanium.Android.Service",
"Titanium.Menu": "Titanium.Android.Menu",
"Titanium.MenuItem":... |
import os
from flask import Flask, request, jsonify
import keras
from keras.preprocessing import image
from keras import backend as K
app = Flask(__name__)
app.config['UPLOAD_FOLDER'] = 'Uploads'
model = None
graph = None
# Loading a keras model with flask
# https://blog.keras.io/building-a-simple-ker... |
# Generated by Django 2.1.2 on 2021-06-28 03:07
import DjangoUeditor.models
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH... |
from django.http import HttpResponse
from django.shortcuts import render
def hello(request):
return HttpResponse("Hello, World!!!!!")
|
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright 2013 UnitedStack 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/licen... |
# 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
from ... |
RocketChat.sendMessage = function(user, message, room, upsert = false) {
if (!user || !message || !room._id) {
return false;
}
if (message.ts == null) {
message.ts = new Date();
}
message.u = _.pick(user, ['_id', 'username', 'name']);
if (!Match.test(message.msg, String)) {
message.msg = '';
}
message.rid... |
#!/usr/bin/env python
# Copyright 2016-2017 Nitor Creations Oy
#
# 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 appli... |
import asyncio
import discord
import inspect
import os
from discord.ext import commands
class Base:
def __init__(self, bot):
self.bot = bot
self.color = bot.user_color
self.session = bot.aiohttp_session
@commands.command(aliases=['pingpong'])
async def ping(self, ctx):
""... |
import slufigy from 'slugify';
export default function slug(name){
return slufigy(name, {lower: true}).replace(/[^\w\-]+/g, '')
} |
import cv2
import numpy as np
import chumpy as ch
from copy import deepcopy
from opendr.everything import *
def nothing(x):
pass
def get_renderer():
import chumpy as ch
# Load mesh
m = load_mesh('/Users/matt/geist/OpenDR/test_dr/nasa_earth.obj')
m.v += ch.array([0,0,3.])
w, h = (... |
window.sosUrl = 'https://demo.geomatico.es/52n-sos/service';
|
/*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010-present Facebook, Inc. (http://www.facebook.com) |
+---------... |
# -*- coding: utf-8 -*-
"""
This file is not runnable, but it only consists of various
lists which are required by some other programs.
"""
#
# © Rob W.W. Hooft, 2003
# © Daniel Herding, 2004
# © Ævar Arnfjörð Bjarmason, 2004
# © Andre Engels, 2004-2005
# © Yuri Astrakhan, 2005-2006 FirstnameLastname@gmail.com
# ... |
import { GetterPortModel, NodeModel } from './base'
export default class SetterModel extends NodeModel {
constructor(type, varType) {
super(type)
this.addPort(new GetterPortModel('value', varType))
this.value = ''
}
serialize() {
let { value } = this
return {...super.serialize(), payload: { ... |
/* =========================================================
* bootstrap-datepicker.js
* http://www.eyecon.ro/bootstrap-datepicker
* =========================================================
* Copyright 2012 Stefan Petre
* Improvements by Andrew Rowls
*
* Licensed under the Apache License, Version 2.0 (the "Lice... |