text stringlengths 3 1.05M |
|---|
/* gpsd_config.h. Generated by scons, do not hand-hack. */
#ifndef GPSD_CONFIG_H
#define VERSION "3.16"
#define GPSD_URL "http://catb.org/gpsd"
/* #undef HAVE_LIBUSB */
#define HAVE_LIBRT 1
#define HAVE_DBUS 1
/* #undef ENABLE_BLUEZ */
#define HAVE_LINUX_CAN_H 1
#define HAVE_STDATOMIC_H 1
#define HAVE_BUILT... |
import os
import aiofiles
import yaml
import click
import asyncio
from datetime import datetime
from models.user import create_user
from models import Post, User
def run_async(coro):
asyncio.run(coro)
@click.group()
def cli():
...
async def _adduser(**kwargs):
try:
user = await create_user(**kwar... |
# diagram.py
from diagrams import Cluster, Diagram, Edge
from diagrams.aws.compute import Lambda
from diagrams.aws.network import APIGateway
graph_attr={
"bgcolor": "transparent"
}
with Diagram("CSV to Heartbeat YAML", show=False, outformat="png", filename="overview", graph_attr=graph_attr):
lambda_converte... |
#ifndef SASL_DEFS_H
#define SASL_DEFS_H 1
// Longest one I could find was ``9798-U-RSA-SHA1-ENC''
#define MAX_SASL_MECH_LEN 32
#if defined(HAVE_SASL_SASL_H) && defined(ENABLE_SASL)
#include <sasl/sasl.h>
void init_sasl(void);
#else /* End of SASL support */
typedef void* sasl_conn_t;
#define init_sasl() {}
#defin... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
"use strict";
var fs = require("hexo-fs");
var glob = require("glob");
var path = require("path");
var changeCase = require("change-case");
var scenariosSamplesPath = "../../../samples/v1.*/Scenarios/*.json";
hexo.extend.g... |
/***************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
This code is licensed under the Visual Studio SDK license terms.
THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
IMPLIED WARRANTIES... |
import React, { useState } from 'react';
import data_projects from './data/projects_data';
import ProjectCard from './ProjectCard'
import { motion } from 'framer-motion'
const Projects = () => {
const [projects, setProjects] = useState(data_projects)
const [active, setActive] = useState('All')
const ... |
import React from "react";
import './card.css';
function CheckCode(props) {
let src='';
if(props?.data?.countryCode.length) {
src = `https://www.countryflags.io/${props?.data?.countryCode[0].alpha2Code.toLowerCase()}/shiny/64.png`
}
return (
<img src={src} alt="flag" />
)
}
function... |
/*
* Copyright (C) 2010-2020 Arm Limited or its affiliates. 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 may obtain a copy of the License at
*
* www.apache.... |
/*global QUnit, sinon */
sap.ui.define([
"sap/ui/test/OpaPlugin",
"sap/ui/test/matchers/Interactable",
"sap/ui/test/matchers/Visible",
'sap/ui/test/autowaiter/_autoWaiter',
'sap/ui/test/matchers/_Enabled',
"sap/m/CheckBox",
"sap/m/Button",
"sap/m/Dialog",
"sap/ui/core/mvc/View",
"sap/ui/core/Fragment",
"./ut... |
from utill import *
def getLoopsAndIfs(lines):
labels_by_name = dict()
labels_by_line_no = dict()
cmps = []
branches_line_no = dict()
branches_label = dict()
i = 0
for line in lines:
line = removeSpaces(line.lower())
i += 1
if isLabel(line):
line = line[... |
import React, { Component } from "react";
import { Link } from "react-router-dom";
import TemplateSistema from "../../../components/templates/sistema.template";
import SunEditor from 'suneditor-react';
import 'suneditor/dist/css/suneditor.min.css'; // Import Sun Editor's CSS File
import katex from 'katex'
import 'katex... |
# Copyright (c) 2003-2016 CORE Security Technologies
#
# This software is provided under under a slightly modified version
# of the Apache Software License. See the accompanying LICENSE file
# for more information.
#
# Description:
# IEEE 802.11 Network packet codecs.
#
# Author:
# Gustavo Moreira
from array import ... |
# Copyright 2018 The TensorFlow Authors. All Rights Reserved.
# Copyright (c) 2017-2018, NVIDIA CORPORATION. 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:... |
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#if !defined(AFX_STDAFX_H__C4B6FEFA_1CDB_42E2_A4BB_C0C11A48626F__INCLUDED_)
#define AFX_STDAFX_H__C4B6FEFA_1CDB_42E2_A4BB_C0C11A48626F__INCLUDED_
... |
# flake8: noqa
import time
import numpy
from skimage.metrics import peak_signal_noise_ratio as psnr
from skimage.metrics import structural_similarity as ssim
from aydin.analysis.image_metrics import mutual_information, spectral_mutual_information
from aydin.io.datasets import normalise, add_noise, add_blur_2d, dots
f... |
import React, { Component } from 'react';
import {
BrowserRouter as Router,
Route,
Link,
Redirect,
NavLink
} from 'react-router-dom'
const HomeLink = props => {
return(
<NavLink
to='/'
exact
className = "link"
>Home</NavLink>
)
}
export default HomeLink; |
export default /* glsl */`
// For a discussion of what this is, please read this: http://lousodrome.net/blog/light/2013/05/26/gamma-correct-and-hdr-rendering-in-a-32-bits-buffer/
vec4 LinearToLinear( in vec4 value ) {
return value;
}
vec4 GammaToLinear( in vec4 value, in float gammaFactor ) {
return vec4( pow( valu... |
const querystring = require(`querystring`)
const axios = require(`axios`)
const _ = require(`lodash`)
const colorized = require(`./output-color`)
const httpExceptionHandler = require(`./http-exception-handler`)
/**
* High-level function to coordinate fetching data from a WordPress
* site.
*/
async function fetch({
... |
import math
import os
import random
import numpy as np
from PIL import Image, ImageDraw
from skimage.io import imsave
def possibilities(arr, p, m):
(x,y) = p
ps = []
p1 = ((x+1) % m,y % m)
p2 = ((x-1) % m,y % m)
p3 = (x % m, (y+1) % m)
p4 = (x % m, (y-1) % m)
for q in [p1,p2,p3,p4]:
if not arr[q]:
ps... |
import boto3
import simplejson as json
dynamodb = boto3.resource('dynamodb')
from dynamodb_json import json_util as djson
from datetime import date, datetime
def json_serial(obj):
"""JSON serializer for objects not serializable by default json code"""
if isinstance(obj, (datetime, date)):
return obj... |
import threading as th
lock=th.Lock()
x=0
def a():
global x
for i in range(10000):
x-=2
print(x)
def b():
global x
for i in range(10000):
x+=2
print(x)
def c():
global x
for i in range(10000):
x-=3
print(x)
def d():
global x
for i in range(10000):
... |
################################################################################
##
## This library is free software; you can redistribute it and/or
## modify it under the terms of the GNU Lesser General Public
## License as published by the Free Software Foundation; either
## version 2.1 of the License, or (at your op... |
#!/usr/bin/env python
# coding: utf-8
"""Generate ./pyui/config.py"""
import os
directory = os.path.dirname(os.path.abspath(__file__))
filename = os.path.join(directory, 'pyui', 'config.py')
if __name__ == "__main__":
s = '''\
#!/usr/bin/env python
# coding: utf-8
"""This python script file is generated automa... |
const postJson = require('./fixtures/post')
const modify = require('../src')
describe('wp-api-response-modifier', () => {
it('throws with bad response', () => {
expect(() => modify(1, [])).toThrowError(/expecting response to be/i)
expect(() => modify(null, [])).toThrowError(/expecting response to be/i)
e... |
import { rows } from './rows.js';
import '@stone-payments/emd-basic-table';
import '../src/index.js';
let currentButton = 'default';
const wrappers = Array.from(document.querySelectorAll('emd-state-wrapper'));
const tables = Array.from(document.querySelectorAll('emd-table'));
const header = ['Movie', 'Year'];
const... |
import React, { useState, useContext } from 'react'
import styled from 'styled-components'
import PropTypes from 'prop-types'
import { Dropdown } from 'semantic-ui-react'
import BalanceAnnotation from '../BalanceAnnotation'
import { AccountContext } from '../../context/AccountContext'
import { assetMap } from '../../as... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
_____ _____ _____ __ _ _
| __| _ | |__| | | |_ ___ ___| |_ _ _ ___
|__ | __| | | | | | . | .'| _| '_| | | . |
|_____|__| |_____|_____| |___|__,|___|_,_|___| _|
... |
/*
* MinIO Cloud Storage (C) 2019 MinIO, 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... |
'use strict';
const path = require('path');
const latestVersions = {
'influxdb': 'v1.8',
'influxdbv2': 'v2.0',
'telegraf': 'v1.16',
'chronograf': 'v1.8',
'kapacitor': 'v1.5',
'enterprise': 'v1.8',
};
const archiveDomain = 'https://archive.docs.influxdata.com';
exports.handler = (event, context, callba... |
/************************************************************
* File: editOfferDetailsModule.js
* Author: Patrick Hasenauer
* LastMod: 02.12.2016
* Description: Edit offer details page module.
************************************************************/
define([
'knockout',
... |
# This Python file uses the following encoding: utf-8
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from builtins import str
from future.utils import python_2_unicode_compatible
from creagraphenebase.py23 import bytes... |
'''
Title : Webscrapper for the line view of the website
http://mmdatraffic.interaksyon.com
Author : Felan Carlo Garcia
email : felancarlogarcia@gmail.com
felan@asti.dost.gov.ph
'''
from bs4 import BeautifulSoup
from ftfy import fix_text
from copy import copy
from re import sub
import re... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var JdiConnectorRefs;
(function (JdiConnectorRefs) {
JdiConnectorRefs["INJECT_PARAMETER_CONNECTOR_REF"] = "com.jec.commons.jdi.annotations.Inject#parameter";
JdiConnectorRefs["INJECT_FIELD_CONNECTOR_REF"] = "com.jec.commons.jdi.annotat... |
/* file: apriori_batch.h */
/*******************************************************************************
* Copyright 2014-2020 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the Licen... |
# PigletC
from .parse import parse
from .trans import trans
from .gen import gen
from .tools import error, perform
class Compiler:
def __init__(self, path, text):
self.path = path
self.text = text
self.table = {}
self.data_cnt = 0
self.label_cnt = 0
self.ir = []
... |
import ast
import astunparse
from anytree import findall
from preprocessing.code_element import Method, Class, Module, Statement, CompositeStatement
from preprocessing.diff_code_element import DiffRev
from preprocessing.utils import get_statement_elements, get_expression_elements, different_code_element
class Rev:
... |
"""
Root system data for affine Cartan types
"""
#*****************************************************************************
# Copyright (C) 2013 Nicolas M. Thiery <nthiery at users.sf.net>,
#
# Distributed under the terms of the GNU General Public License (GPL)
# http://www.gnu.org/licenses/... |
import os # accessing the os functions
import check_camera
import Capture_Image
import Train_Image
import Recognize
Recognize.recognize_attendence()
|
"""
[API] Contains exceptions that may be exposed to the library client.
"""
class CachedMethodFailedException(Exception):
pass
|
"""Tests for ju_control integration."""
|
(function (){
/******************************************************************
*
******************************************************************/
CFW.dashboard.registerWidget("cfw_youtubevideo",
{
category: "Standard Widgets",
menuicon: "fab fa-youtube",
menulabel: CFWL('cfw_widget_cfwyoutubevid... |
# global
import mxnet as mx
import math
# local
from ivy.functional.backends.mxnet import _handle_flat_arrays_in_out
@_handle_flat_arrays_in_out
def isfinite(x: mx.ndarray.ndarray.NDArray)\
-> mx.ndarray.ndarray.NDArray:
# ToDo: remove float32 conversion once int8 and uint8 work correctly. Currently 0 re... |
"""
_____ _ _______ _
| __ \ | | |__ __| | |
| |__) | __ ___ | |_ ___ | | ___ _ __ ___| |__
| ___/ '__/ _ \| __/ _ \| |/ _ \| '__/ __| '_ \
| | | | | (_) | || (_) | | (_) | | | (__| | | |
|_| |_| \___/ \__\___/|_|\___/|_| \___|_| |_|
ProtoTorch Core Packa... |
"""
Colors, and methods to select colors from lists.
"""
import numpy as np
# these are arrays of 50 colors from http://www.perbang.dk/rgbgradient/ between FF0000 (red) and 0000FF (blue) or
# #00FF00 (green) and #FFFF00 (yellow)
green2yellow = ["#00FF00", "#05FF00", "#0AFF00", "#0FFF00", "#14FF00", "#1AFF00", "#1FFF0... |
Survey
.StylesManager
.applyTheme("modern");
var json = {
"elements": [
{
"type": "sortablelist",
"name": "lifepriority",
"title": "Life Priorities ",
"isRequired": true,
"choices": ["family", "work", "pets", "travels", "games"]
}... |
#!/usr/bin/env python
import sys
import unittest
def runsuite(suite):
suite = "tests.{}".format(suite)
print("Running test suite: {}".format(suite))
res = unittest.main(suite, exit=False).result
if len(res.failures) > 0 or len(res.errors) > 0:
sys.exit(-1)
runsuite("general")
runsuite("arguments")
runsuit... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import MySQLdb
import requests
def getConnection(url, user, passwd, db=None, charset='utf8'):
if db == None:
db = user
return MySQLdb.connect(host=url, user=user, passwd=passwd, db=db, charset=charset)
def generateAccount():
# change the url
conn... |
#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'AGSTransaction.settings')
try:
from django.core.management import execute_from_command_line
exce... |
import React from 'react';
import Layout from "../components/layout";
const ContactPage = () => (
<Layout>
<div>
<h1>Contact page</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aspernatur consectetur cumque eius est explicabo id in incidunt ipsum laboriosam laudantium mollitia non ... |
import gpu
import blf
from bgl import *
from gpu_extras.batch import batch_for_shader
dpi = 72
shader = gpu.shader.from_builtin('2D_UNIFORM_COLOR')
def setTextDrawingDpi(new_dpi):
global dpi
dpi = new_dpi
def drawHorizontalLine(x, y, length, color = None, thickness = None):
drawLine(x, y, x + length, y, ... |
# coding: utf-8
"""
MailSlurp API
MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://ww... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _react = require('react');
var _react2 = _interopRequireDefault(_react);
var _pure = require('recompose/pure');
var _pure2 = _interopRequireDefault(_pure);
var _SvgIcon = require('material-ui/SvgIcon');
var _SvgIcon2 = _interopReq... |
import React from 'react'
import styled from 'styled-components'
import { StaticQuery, graphql, Link } from 'gatsby'
const Article = styled.article`
margin-bottom: 3rem;
background-color: #fbfbfb;
padding: 1rem;
border-radius: 4px;
transition: all 0.3s;
a {
text-decoration: none;
color: #161616;
... |
"This provides a more friendly UI to the image_* macros."
load("//fs_image/bzl/image_actions:clone.bzl", "image_clone")
load("//fs_image/bzl/image_actions:feature.bzl", "image_feature")
load("//fs_image/bzl/image_actions:install.bzl", "image_install", "image_install_buck_runnable")
load("//fs_image/bzl/image_actions:m... |
import os
import sys
#
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "app.settings")
APP_DIR=os.path.dirname(__file__)
LOG_FILE="/tmp/paloma.log" #: celery worker logfile
PID_FILE="/tmp/paloma.pid" #: celery worker PID file
PID_CAM="/tmp/paloma.pid"
NODE="celery" #: celery = default node
LOG_LEVEL="DEBU... |
/**
* jQuery Unveil
* A very lightweight jQuery plugin to lazy load images
* http://luis-almeida.github.com/unveil
*
* Licensed under the MIT license.
* Copyright 2013 Luís Almeida
* https://github.com/luis-almeida
*/
;(function($) {
$.fn.unveil = function(threshold, callback) {
var... |
"""
The lightning training loop handles everything except the actual computations of your model.
To decide what will happen in your training loop, define the `training_step` function.
Below are all the things lightning automates for you in the training loop.
Accumulated gradients
---------------------
Accumulated g... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } }... |
/**
* @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
'use strict';
/* eslint-env node */
const path = require( 'path' );
const webpack = require( 'webpack' );
const { bundler, styles } = req... |
import dis
import falcon
import sys
class wrap(object):
def __init__(self, f):
self.python_fn = f
self.name = f.__name__
self.falcon_fn = falcon.wrap(f)
def __call__(self, *args, **kwargs):
python_result = self.python_fn(*args, **kwargs)
falcon_result = self.falcon_fn(*args, **kwargs)
... |
# -*- coding: utf-8 -*-
#
# tile38-py documentation build configuration file, created by
# sphinx-quickstart on Wed Feb 22 16:20:37 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
# autogenerated file.
#
#... |
# 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 ... |
# Generated by Django 3.0.6 on 2020-05-30 06:42
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('auth', '0011_update_proxy_permissions'),
migrations.swappable_dependency(settings.A... |
# Copyright 2021 Datum Technology Corporation
# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1
########################################################################################################################
# Licensed under the Solderpad Hardware License v 2.1 (the "License"); you may not use this file excep... |
/*
Copyright 2015 Bloomberg Finance L.P.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agree... |
from lxml.builder import E
from .base import StylizedElement
class Group(StylizedElement):
def __init__(self, items=None, etype=E.g, **kwargs):
super().__init__(**kwargs)
self.items = items or []
self.etype = etype
def build(self, style):
self.element = self.etype()
... |
/* ------------------------------------------------------------------------------
*
* # Boxed full width page
*
* Specific JS code additions for boxed_full.html page
*
* Version: 1.0
* Latest update: May 20, 2015
*
* ---------------------------------------------------------------------------- */
$(functio... |
import React from "react";
import ReactDOM from "react-dom";
import Draft from "draft-js";
import invariant from "invariant"
// https://github.com/HubSpot/draft-extend/blob/c453fa7dd61f28fa5849f097cbbed6834639536b/src/plugins/utils.js#L46
function getEntitySelection(contentState, entityKey) {
const selections = [];
... |
#!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import json
import os
import unittest
import parlai.utils.testing as testing_utils
from parlai.core.opt import Opt
from... |
/**
* @popperjs/core v2.9.2 - MIT License
*/
"use strict"; !function (e, t) { "object" == typeof exports && "undefined" != typeof module ? t(exports) : "function" == typeof define && define.amd ? define(["exports"], t) : t((e = "undefined" != typeof globalThis ? globalThis : e || self).Popper = {}) }(this, (functio... |
// Copyright IBM Corp. 2014. All Rights Reserved.
// Node module: loopback-example-offline-sync
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT
'use strict';
/**
* @ngdoc overview
* @name loopbackExampleFullStackApp
* @description
* # loopbackExampl... |
import torch
import numpy as np
import copy
from model.dyn_stg import SpatioTemporalGraphCVAEModel
from model.online_node_model import OnlineMultimodalGenerativeCVAE
from model.model_utils import ModeKeys
from utils.scene_utils import SceneGraph
from stg_node import STGNode
# How to handle removal of edges:
# Cosine w... |
#!/usr/bin/env python3
import csv
import os
DIR_PATH = os.path.dirname(os.path.realpath(__file__))
FILENAME = DIR_PATH + "/" + "portinfo.csv"
BLOCK_SIZE = 8192
def print_row(row):
print("{service} ({description}) :{port} {protocol}".format(
service=row['Service Name'], port=row['Port Number'],
pr... |
//
// ldr.c
//
// Kernel module loader
//
// Copyright (C) 2013-2014 Bruno Ribeiro.
// Copyright (C) 2002 Michael Ringgaard.
// 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. Redistr... |
"""Helper functions for Acmeda Pulse."""
from homeassistant.core import callback
from homeassistant.helpers.device_registry import async_get_registry as get_dev_reg
from .const import DOMAIN, LOGGER
@callback
def async_add_acmeda_entities(
hass, entity_class, config_entry, current, async_add_entities
):
"""A... |
'use strict';
const escapeStringRegexp = require('escape-string-regexp');
const ansiStyles = require('ansi-styles');
const stdoutColor = require('supports-color').stdout;
const template = require('./templates.js');
const isSimpleWindowsTerm = process.platform === 'win32' && !(process.env.TERM || '').toLowerCas... |
# coding: utf-8
import re
import six
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class UpdateDesireds:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is ... |
import asyncio, discord, os, textwrap, time
from datetime import datetime
from operator import itemgetter
from discord.ext import commands
from Cogs import Utils, DisplayName, Message
def setup(bot):
# Add the bot and deps
settings = bot.get_cog("Settings")
bot.add_cog(Debugging(bot, settings))
... |
# coding: utf-8
"""
convertapi
Convert API lets you effortlessly convert file formats and types. # noqa: E501
OpenAPI spec version: v1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class DocxBody(object):
"""NOTE: ... |
//
// DIYMenu.h
// DIYMenu
//
// Created by Jonathan Beilin on 8/13/12.
// Copyright (c) 2012 DIY. All rights reserved.
//
// Thanks to Sam Vermette for sharing good ideas and clean
// code for managing a singleton overlay view in SVProgressHUD.
#import <UIKit/UIKit.h>
@class DIYMenuItem, DIYWindowPassthrough;
... |
# Generated by Django 2.2.12 on 2020-05-10 12:09
import datetime
from django.db import migrations, models
import uuid
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Secret',
fields=[
... |
const commandSuccess = envelope => ({
id: envelope.id,
method: envelope.method,
status: 'success'
});
export const Sessions = {
authenticating: {
id: '0',
from: '127.0.0.1:8124',
state: 'authenticating'
},
established: {
id: '0',
from: '127.0.0.1:8124',
... |
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import React from 'react';
import Breadcrumb from '../breadcrumb';
import DocumentTitle from '../document-title';
import EnvironmentsSummary from '../environments-summary';
import AsyncResource from '../async-resource';
import { mapRouteParams... |
# Copyright 2016-present CERN – European Organization for Nuclear Research
#
# 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... |
for i in range(1,100):
if i % 3 == 0 and i % 5 == 0:
print(i, " FizzBuzz")
elif i % 3 == 0:
print(i, " Fizz")
elif i % 5 == 0:
print(i, " Buzz")
else:
print(i)
|
import moderngl
from demosys.conf import settings
from demosys.test.testcase import DemosysTestCase
class WindowTestCase(DemosysTestCase):
def test_ctx(self):
assert isinstance(self.window.ctx, moderngl.Context)
def test_size(self):
assert self.window.width == settings.WINDOW['size'][0]
... |
define([
'ash',
'game/GameGlobals',
], function (Ash, GameGlobals) {
var EndingSystem = Ash.System.extend({
isPopupShown: false,
constructor: function () {},
addToEngine: function (engine) {
this.engine = engine;
},
removeFromEngine: function (engine) {
this.engine = null;
},
update: fun... |
import mongoose from "mongoose";
import bcrypt from "bcrypt";
const UserSchema = mongoose.Schema({
fullName: {
type: String,
required: true,
},
email: {
type: String,
required: true,
unique: true,
match: [
/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/,
"Please fill a valid ... |
exports.seed = function(knex) {
return knex("weddings").insert([
{
slug: "Brey&Abby",
date: "2020-09-21 16:00:00",
location: "River Uplands Farm",
couple_id: 1
},
{
slug: "Kim&John",
date: "2020-06-28 19:10:25",
location: "",
couple_id: 2
},
{
... |
from django.conf import settings
from django.urls import include, path
from django.conf.urls.static import static
from django.contrib import admin
from django.views.generic import TemplateView
from django.views import defaults as default_views
urlpatterns = [
path("", TemplateView.as_view(template_name="account/pa... |
function main() {
let v1 = "cos";
function v2(v3,v4,v5,v6) {
let v8 = "undefined";
const v10 = this.__lookupGetter__;
}
let v16 = 0;
while (v16 < 10) {
const v17 = new v2(10,v2,Function,v1,"cos");
const v18 = v16 + 1;
v16 = v18;
}
const v21 = [1000];
for (let v25 = 0; v25 < 100; v25++) {
const v... |
# -*- coding:utf-8 -*-
__author__ = 'sliderSun'
import tensorflow as tf
from tensorflow.contrib import rnn
from tensorflow.contrib.layers import batch_norm
class TextRCNN(object):
"""A RCNN for text classification."""
def __init__(
self, sequence_length, num_classes, vocab_size, lstm_hidden_size... |
"""Project models."""
import fnmatch
import logging
import os
import re
from urllib.parse import urlparse
from django.conf import settings
from django.contrib.auth.models import User
from django.core.files.storage import get_storage_class
from django.db import models
from django.db.models import Prefetch
from django.... |
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
import React, { useState } from 'react';
import { compose } from 'recompose';
import styled, { withTheme } from 'styled-components';
import PropTypes from 'react-desc/lib/PropTypes';
import { defaultProps } from '../../default-props';
import { Box } from '../Box';
import { Button } from '../Button';
import { DropButt... |
/** @file
Debug Library based on report status code library.
Note that if the debug message length is larger than the maximum allowable
record length, then the debug message will be ignored directly.
Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
This program and the accompanying mat... |
import warnings
warnings.filterwarnings("ignore", message="numpy.dtype size changed")
warnings.filterwarnings("ignore", message="numpy.ufunc size changed")
import cv2
import csv
import time
import numpy as np
import pandas as pd
from statistics import mode
from keras.models import load_model
from pandas.io.formats.csv... |
CONFIG = {
'gal_type': 'exp',
'psf_type': 'ps',
'shear_scene': True,
'n_coadd': 10,
'scale': 0.263,
'n_bands': 3,
'position_angle_range': (0, 360),
'scale_frac_std': 0.03,
'wcs_shear_std': 0.03,
'wcs_dither_range': (-0.5, 0.5),
'mask_and_interp': True,
'interpolation_type... |
# generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else []
PROJECT_CATKIN_DEPENDS = "".replace(';', ' ')
PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else []
PROJECT_NAME = "rosparam"
PROJECT_SPACE_DIR = "/root/... |