text stringlengths 3 1.05M |
|---|
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif
FOUNDATION_EXPORT double Pods_CMAQRScanner_ExampleVersionNumber;
FOUNDATION_EXPORT const unsigned char Pods_CMAQRScanner_Exa... |
# -*- coding: utf-8 -*-
"""Ensure all projects have a Piwik node."""
import logging
import time
import sys
from modularodm import Q
from framework.analytics import piwik
from framework.mongo.utils import paginated
from scripts import utils as scripts_utils
from website.app import init_app
from website.models import N... |
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import styled, { css } from 'styled-components';
import theme from '../theme';
import InputField from '../InputField';
import InputFieldError from '../InputFieldError';
import InputFieldLabel from '../InputFieldLabel';
... |
function linearSearch(inputArray, target) {
if (!inputArray || inputArray.length === 0) {
return -1;
}
for (let i=0; i<inputArray.length; i++) {
if (inputArray[i] === target) {
return i;
}
}
return -1;
} |
// Copyright 2014 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef V8_BASE_COMPILER_SPECIFIC_H_
#define V8_BASE_COMPILER_SPECIFIC_H_
#include "include/v8config.h"
// Annotate a using ALLOW_UNUSED_TYPE = or fu... |
import hashlib
import pdb
from urllib.parse import parse_qs
from .logger import Logger
from .request_body_parser import RequestBodyParser
class HashedRequestDecorator:
LOG_ID = 'lib.hashed_request_decorator'
COMPONENT_TYPES = {
'HEADER': 1,
'PATH_SEGMENT': 2,
'QUERY_PARAM': 3,
... |
# -*- coding: utf-8 -*-
from django.utils.translation import get_language
from cms import constants
from cms.apphook_pool import apphook_pool
from cms.utils.permissions import load_view_restrictions, has_global_page_permission
from cms.utils import get_language_from_request
from cms.utils.conf import get_cms_setting
f... |
import connexion
import six
from swagger_server.models.server_addr import ServerAddr # noqa: E501
from swagger_server import util
from ..config import *
def client_obtain_ip(): # noqa: E501
"""obtain iperf server ip list to connect to
Return servers ip list # noqa: E501
:rtype: List[ServerAddr]
... |
# Copyright 2017 Google 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/licenses/LICENSE-2.0
#
# Unless required by applicable law or... |
#include <stdint.h>
#include <stdlib.h>
#include <errno.h>
#include <memory.h>
#include "status.h"
#include "array.h"
#include "buffer.h"
#include "array-init.h"
#include "array-copy.h"
int narrow_array_copy(struct NarrowArray* array_dst, int64_t dst_offset,
struct NarrowArray* array_src, int64... |
# -*- coding: utf-8 -*-
# @Author: Alan Lau
# @Date: 2019-05-01 15:05:09
import os
import json
import math
import pandas as pd
import numpy as np
from pprint import pprint as ppt
def process(path):
with open(path, 'r') as rf:
subway = json.load(rf)
path_, filename = os.path.split(path)
output_pat... |
from setuptools import setup, find_packages
import sys, os
version = '0.0'
setup(
name='base2_plug',
version=version,
description="",
long_description="""\
""",
classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
keywords='',
author='',
author_ema... |
var searchData=
[
['namerow',['nameRow',['../globals_8h.html#a2682880253356b9c35b2e6745c44f125',1,'globals.h']]],
['nametable1_5fstart',['NAMETABLE1_START',['../macros_8h.html#af6b6d76b2cb121045ac2ab1a8f539f62',1,'macros.h']]],
['nametable2_5fstart',['NAMETABLE2_START',['../macros_8h.html#ad4d646e65d686c0c56ed05b... |
import { SettingsEntry } from '../core';
export class FutbinSettings extends SettingsEntry {
static id = 'futbin';
constructor() {
super('futbin', 'FutBIN integration');
this.addSetting('Show link to player page', 'show-link-to-player', false, 'checkbox');
this.addSetting('Show prices on SBC and Squad... |
import pytest
def pytest_collection_modifyitems(items):
'''Ignores initializer deprecation warnings for all nidcpower system tests.'''
for item in items:
item.add_marker(pytest.mark.filterwarnings('ignore:Attempting to initialize an independent channels session with a channels argument.:DeprecationWar... |
import unittest
import pybullet as p
import math, time
import difflib, sys
from utils import allclose, dot
class TestPybulletSaveRestoreMethods(unittest.TestCase):
def setupWorld(self):
numObjects = 50
maximalCoordinates = False
p.resetSimulation()
p.setPhysicsEngineParameter(deterministicOverla... |
/*
Copyright 2019 Adobe. All rights reserved.
This file is licensed to you 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... |
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not u... |
#!/usr/bin/env python
from sys import path
path.append('../')
from sherline_lathe.sw_2_linuxCNC_formatter import sw_2_linuxCNC_formatter
import unittest
class test_sw_2_linuxCNC_formatter(unittest.TestCase):
def test_format(self):
my_l = sw_2_linuxCNC_formatter()
File = ("test\\nc_test_files\\"... |
# Generated by Django 2.0.7 on 2018-08-06 08:25
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('tft', '0013_auto_20180806_1606'),
]
operations = [
migrations.AlterModelOptions(
name='shortcut',
options={'verbose_... |
"""Unit tests for users app forms
"""
from django.contrib.auth.models import User
from django.test import TestCase
from users.forms import AuthenticationFormWithInactiveUsersOkay, UserRegisterForm
class RegisterTests(TestCase):
"""Register Unit Test"""
def setUp(self):
"""Register test set up"""
... |
from .common import (
CountryDisplay, Error, LanguageDisplay, PermissionDisplay, SeoInput,
Weight)
from .money import (
VAT, Money, MoneyRange, ReducedRate, TaxedMoney, TaxedMoneyRange)
from .upload import Upload
|
const input = `1002576
13,x,x,x,x,x,x,37,x,x,x,x,x,449,x,29,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,19,x,x,x,23,x,x,x,x,x,x,x,773,x,x,x,x,x,x,x,x,x,41,x,x,x,x,x,x,17`.split('\n');
export { input };
|
import pygame
import types
# keeps state of the game controls
# primarily to abstract game logic from pygame
class Controls:
def __init__(self):
pygame.init()
def read(self):
c = types.SimpleNamespace()
keys = pygame.key.get_pressed()
c.advance = self.advance(keys)
c.ro... |
/* mbchar.h - Various declarations for functions found in mbchar.c
Copyright (C) 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC 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; either ... |
# -*- coding: utf-8 -*-
import numpy as np
from .utils import _get_broadcast_shape
def _check_dimension_type(csdm):
check = [item.type == "linear" for item in csdm.dimensions]
if not np.all(check):
raise NotImplementedError(
"Statistics is currently only available for linear dimensions."
... |
import {
AsyncHelpers,
EventListenerHelpers,
GenericHelpers,
StateHelpers
} from '../utilities/helpers';
import { LuigiAuth, LuigiElements } from '.';
import { AuthLayerSvc, LifecycleHooks } from '../services';
/**
* @name Configuration
*/
class LuigiConfig {
/**
* @private
* @memberof Configuration
... |
const { collectCov } = require('yargs').argv;
const { defaults } = require('jest-config'); // def. jest config object
// JEST Option (not cli option)
// - Ref: https://jestjs.io/docs/en/configuration#testmatch-arraystring
module.exports = {
verbose: true,
// # Mock & Global variable
clearMocks: true,
... |
"""
HAHNLOSER & GANGULI MODEL
with a nonlinear sensory response
Copyright (c) 2018, Silvia Pagliarini, Xavier Hinaut, Arthur Leblois
https://github.com/spagliarini
Mnemosyne team, Inria, Bordeaux, France
https://team.inria.fr/mnemosyne/fr/
Distributed under the BSD-2-Clause License
"""
import numpy as np
def GH... |
/*
*
* App constants
*
*/
export const DEFAULT_ACTION = 'app/App/DEFAULT_ACTION';
export const LOGIN = 'app/App/LOGIN';
export const LOGOUT = 'app/App/LOGOUT';
export const TRACK_USER = 'app/App/TRACK_USER';
|
# Copyright 2021 Open Collector, Inc,
#
# 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... |
import React from "react"
import { Link } from "gatsby"
import Layout from "../components/layout"
import SEO from "../components/seo"
const SecondPage = () => (
<Layout>
<SEO title="Page two" />
<h1>About</h1>
<p>Coming soon!</p>
<Link to="/">Go back to the homepage</Link>
</Layout>
)
export defa... |
# coding=utf-8
# *** WARNING: this file was generated by crd2pulumi. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
# Export this package's modules as members:
from .AkkaCluster import *
|
# coding=utf-8
# Copyright 2018 The Tensor2Tensor 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... |
define({layerIsNotSupported:"Tätä karttatason tyyppiä ei tueta."}); |
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("omi"));
else if(typeof define === 'function' && define.amd)
define(["omi"], factory);
else if(typeof exports === 'object')
exports["mobile-off-two-tone"] =... |
import os
import openai
import json
import re
openai.api_key = ""
ASSIGNMENT_HEADLINE = ""
HEADLINES = [
""
]
SUB_HEADLINES = [
""
]
STYLE = "research report"
def write_essay_on_topic(topic_num):
OUTLINE = [
"Introduction ",
"Fact ",
"Explanation ",
"Example ",
... |
/*
Bullet Collision Detection and Physics Library http://bulletphysics.org
This file is Copyright (c) 2014 Google Inc.
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... |
var categories = [];
var products = [];
var allProducts = [];
var tempProducts = [];
var finalArray = [];
var conditions = [0,"all","all",0];
var shoppingCar = [];
var firstClick = false;
$.getJSON("data/dataParcial2.json", function( data ){
console.log("Archivos Leidos");
$.each( data, function(key, val){
if(key=... |
/*
* 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
* distribu... |
import pytest
import json
import jsonpickle
import os.path
from fixture.application import Application
from fixture.db import Db
fixture_app = None
config = None
def load_config(file):
global config
if config is None:
config_file = os.path.join(
os.path.dirname(
... |
/*! jQuery Validation Plugin - v1.11.0 - 2/4/2013
* https://github.com/jzaefferer/jquery-validation
* Copyright (c) 2013 Jörn Zaefferer; Licensed MIT */
(function(a){a.extend(a.fn,{validate:function(b){if(!this.length){if(b&&b.debug&&window.console){console.warn("Nothing selected, can't validate, returning nothing.")}r... |
const { AaNotifier } = require("../lib");
const notifier = new AaNotifier();
notifier.listen("notify", (noti, news) => {
console.log(noti.name, news);
});
notifier.start();
|
# encoding: utf-8
from __future__ import absolute_import, division, print_function, unicode_literals
import re
import warnings
from datetime import datetime, timedelta
import six
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
import haystack
from haystack.backends import Ba... |
import os
from datetime import datetime
from cement import Controller, ex
from cement.utils import fs
from cement.utils.version import get_version_banner
from ..core.version import get_version
from ..core import exc
VERSION_BANNER = """
Lazily Backup Files and Directories %s
%s
""" % (get_version(), get_version_banne... |
/***
* @creater:wjiban
* @create_time:18-9-11 15:42:51
* @last_modify:wjiban
* @modify_time:18-9-11 15:42:51
* @line_count:3
**/
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World - Node.js Work.');
console.log(res);... |
import { RipeCommonsPlugin, RipeCommonsCapability } from "../abstract";
export class DevicePlugin extends RipeCommonsPlugin {
async load() {
await super.load();
this.init();
}
async unload() {
await super.unload();
}
getCapabilities() {
return [RipeCom... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 5/15/20 4:49 PM
# @File : grover.py
# qubit number=5
# total number=51
import cirq
import cirq.google as cg
from typing import Optional
import sys
from math import log2
import numpy as np
#thatsNoCode
from cirq.contrib.svg import SVGCircuit
# Symbols for... |
# This file is part of Indico.
# Copyright (C) 2002 - 2022 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from wtforms.fields import BooleanField, TextAreaField, URLField
from wtforms.fields.simple import HiddenF... |
//
// ViewController.h
// PPVideoImageDemo
//
// Created by 徐仲平 on 2016/12/13.
// Copyright © 2016年 徐仲平. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
@end
|
from worktory.connection.wrappers.scrapli_wrapper import *
from worktory.connection.wrappers.unicon_wrapper import *
from worktory.connection.wrappers.netmiko_wrapper import * |
import React, { useState, useEffect } from 'react';
import { graphql, navigate } from 'gatsby';
import useLocalStorage from '@illinois/react-use-local-storage';
import styled, { createGlobalStyle, css } from 'styled-components';
import { renderAst } from '../markdown';
import { EpisodeContext } from '../context';
impo... |
import React from "react";
import PropTypes from "prop-types";
import { css, cx } from "emotion";
import { ThemeContext } from "@hig/theme-context";
import { createCustomClassNames, generateId } from "@hig/utils";
import stylesheet from "./stylesheet";
const TogglePresenter = props => {
const {
hasFocus,
has... |
const mongodb = require('mongodb');
const Collection = mongodb.Collection;
export default class MongoCollection {
_mongoCollection:Collection;
constructor(mongoCollection:Collection) {
this._mongoCollection = mongoCollection;
}
// Does a find with "smart indexing".
// Currently this just means, if it n... |
new Vue({
el: '#app',
data: {
current: '0.00',
exp: 0,
inc: 0,
total: 0,
currentColor: '#bec8e4',
empty: true,
incomeBtn: true,
icon: 'attach_money',
text: 'Salary',
class: 'icon-1',
type: '',
color: '#a9e61c',
... |
# Copyright 2000 by Jeffrey Chang, Brad Chapman. All rights reserved.
# Copyright 2006-2017 by Peter Cock. All rights reserved.
#
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Code to work wit... |
# Auto generated by generator.py. Delete this line if you make modification.
from scrapy.spiders import Rule
from scrapy.linkextractors import LinkExtractor
XPATH = {
'name' : "//div[@class='product-detail clearfix']/div[@class='product-item']/div[@class='property']/h1[@class='product-name']",
'price' : "//div... |
from __future__ import print_function
import os
import sys
from numpy.testing import assert_allclose
sys.path.insert(1, os.path.join("..","..","..",".."))
import h2o
from h2o.estimators import H2OTargetEncoderEstimator
from tests import pyunit_utils as pu
seed = 42
here = os.path.realpath(os.path.dirname(__file__))
... |
'use strict';
const chai = require('chai');
const fsp = require('fs').promises;
const path = require('path');
const fse = require('fs-extra');
const { getTmpDirPath } = require('../../../../utils/fs');
const runServerless = require('../../../../utils/run-serverless');
chai.use(require('chai-as-promised'));
const { ex... |
# This is example is for the SparkFun Serial LCD displays.
# SparkFun sells these at its website: www.sparkfun.com
# Do you like this library? Help support SparkFun. Buy a board!
# https://www.sparkfun.com/products/14072
# https://www.sparkfun.com/products/14073
# https://www.sparkfun.com/products/14074
"""
Ser... |
//------------------------------------------------------------------------------
// MessageMessageItemTest.h
//
//------------------------------------------------------------------------------
#ifndef MESSAGEMESSAGEITEMTEST_H
#define MESSAGEMESSAGEITEMTEST_H
// Standard Includes --------------------------------------... |
import torch
import torch.nn.functional as F
from torch.nn.modules.dropout import Dropout
from sig.nn.models.base_model import BaseClassifier
from torch_geometric.nn import GCNConv, global_mean_pool
from sig.nn.modules.attention import AttentionProb
from sig.nn.modules.mask import ProbMask
class SIGCN(BaseCl... |
"""Base class for all hyperparameter optimizers."""
from abc import abstractmethod, ABC
from mala.network.hyperparameter_interface import HyperparameterInterface
from mala.network.objective_base import ObjectiveBase
class HyperOptBase(ABC):
"""Base class for hyperparameter optimizater.
Parameters
------... |
# coding=utf-8
import pytest
from zentropi.frames import Event
from zentropi.handlers import (
Handler,
HandlerRegistry,
validate_handler,
validate_kind,
validate_name
)
from zentropi.symbols import KINDS
def dummy():
"""A dummy handler."""
assert True
return True
async def dummy_as... |
function timer(obj, txt) {
obj.text(txt);
}
function showTime() {
var today = new Date();
var weekday = new Array(7)
weekday[0] = "星期一"
weekday[1] = "星期二"
weekday[2] = "星期三"
weekday[3] = "星期四"
weekday[4] = "星期五"
weekday[5] = "星期六"
weekday[6] = "星期日"
var y = today.getFullYear(... |
const models = require("../lib/models");
module.exports = (args, callback) => {
const Image = models("Image");
Image.find({}, (err, images) => {
const mappedImages = {};
for (const image of images) {
mappedImages[image.fileName] = image.getOriginalURL();
}
console... |
from django.urls import path
from . import views
from posts.views import (
index,
blog,
search,
PostDetailView,
PostCreateView,
PostUpdateView,
PostDeleteView,
)
urlpatterns = [
path('', views.index, name='home'),
path('blog/', views.blog, name='post-list'),
pat... |
/* Copyright (C) 1991-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C 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 ... |
var vendor_library=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Sym... |
void wypisz(Wska *plansza);
void wypiszslowo(Wska *plansza);
char przepiszslowo(Wska *plansza);
typedef struct pipes *PipesPtr;
PipesPtr initPipes(int argc, char *argv[]);
void sendStringToPipe(PipesPtr channel, const char *data);
bool getStringFromPipe(PipesPtr channel, char *buffer, size_t size);
void cl... |
# 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 ... |
import React, { PropTypes } from 'react';
import BMCAddItem from '../BMC/bmcAddItem';
import '../../styles/header.scss';
const Header = ({appState, addBMCItem, updateTextInput, updateSelectedCat}) => {
return (
<header>
<div id="menu">
<span className="title">Business Model Canvas Generator</span>
... |
def includeme(config):
config.add_static_view('static', 'static', cache_max_age=3600)
config.add_route('home', '/')
config.add_route('issue_agent', '/issue-agent')
config.add_route('issue_agent_lookahead', '/issue-agent-lookahead')
config.add_route('agent', '/agent/{agent_id}')
|
from __future__ import absolute_import
from __future__ import print_function
import abc
import collections
import hashlib
import logging
import time
from functools import wraps
import six
"""
Moving slowly towards entity component system design:
ExCESS : Experimental Component Entity System Simplified
Components as... |
import base64
import json
import re
import subprocess
from kubepy import api as kubectl
def header(text, style="-", min_length=60):
print()
print(style * max(min_length, len(text)))
print(text)
print(style * max(min_length, len(text)))
def get_first_owner(resource):
owners = resource["metadata"... |
# 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 React, { useState, useEffect } from 'react';
import { connect } from 'react-redux';
import NumberFormat from 'react-number-format';
import { onInputChange } from '../Common/QuoteValidation';
import {
Col,
Row,
Input,
Label,
} from 'reactstrap';
const BasicCvg = props => {
const [aDwelling, setDwellin... |
import createSvgIcon from './utils/createSvgIcon';
import { jsx as _jsx } from "react/jsx-runtime";
export default createSvgIcon([/*#__PURE__*/_jsx("path", {
d: "M3 3h2v2H3zm16 16h2v2h-2zm0-16h2v2h-2zM3 19h2v2H3z",
opacity: ".3"
}, "0"), /*#__PURE__*/_jsx("path", {
d: "m11.29 7-3.4 9h1.62l.73-2h3.49l.74 2h1.63l-3... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _webpack = require("next/dist/compiled/webpack/webpack");
var _fs = require("fs");
var _path = _interopRequireDefault(require("path"));
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: ... |
import React from 'react';
import PropTypes from 'prop-types';
import FormFieldGrid from '../form-field-grid/form-field-grid';
import { validationError, validationWarning } from '../helpers/helpers';
import { useFieldApi } from '@data-driven-forms/react-form-renderer';
import FormField from '../form-field/form-field';... |
from django.conf import settings
from django.conf.urls import url, patterns, include
urlpatterns = patterns('',)
if 'socialnetworks.facebook' in settings.INSTALLED_APPS:
urlpatterns = urlpatterns + patterns(
'',
url(r'^facebook/',
include('socialnetworks.facebook.urls', namespace='fa... |
# qubit number=4
# total number=30
import pyquil
from pyquil.api import local_forest_runtime, QVMConnection
from pyquil import Program, get_qc
from pyquil.gates import *
import numpy as np
conn = QVMConnection()
def make_circuit()-> Program:
prog = Program() # circuit begin
prog += X(3) # number=1
prog ... |
my_thing = False
if not my_thing:
print("Print a statement in here")
name = "Kane Ezki"
if name not in ['Kalob', 'Jon', 'Gully']:
print("Kane is not part of the club")
|
import os
from django.template.base import Node
from opbeat.utils.stacks import get_frame_info
try:
from django.template.base import Template
except ImportError:
class Template(object):
pass
def linebreak_iter(template_source):
yield 0
p = template_source.find('\n')
while p >= 0:
... |
# This demo uses the IE4 Web Browser control.
# It catches an "OnNavigate" event, and updates the frame title.
# (event stuff by Neil Hodgson)
import win32ui, win32con, win32api, regutil
from pywin.mfc import window, activex
from win32com.client import gencache
import sys
WebBrowserModule = gencache.EnsureModule("{E... |
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
info: >
toString: If radix is an integer from 2 to 36, but not 10,
the result is a string, the choice of which is implementation-dependent
es5id: 15.7.4.2_A2_T34
description... |
module.exports = {
id: 'en_cm',
handler: function pluralize_en_cm(val) {
const n = Number(val),
i = Math.floor(Math.abs(val)),
v = val.toString().replace(/^[^.]*\.?/, '').length;
if (isNaN(n))
throw Error('n is not a number');
if (i === 1 && v === 0)
return 'one';
return 'oth... |
# -*- coding: utf-8 -*-
#
# rasa_nlu documentation build configuration file, created by
# sphinx-quickstart on Tue Nov 22 08:50:20 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# ... |
// Download the Node helper library from twilio.com/docs/libraries/node
// These consts are your accountSid and authToken from https://www.twilio.com/console
// To set up environmental variables, see http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN... |
/*
* ! SAP UI development toolkit for HTML5 (SAPUI5)
(c) Copyright 2009-2015 SAP SE. All rights reserved
*/
sap.ui.define([],
function () {
"use strict";
/**
* Enumeration specifying which tree item child collections an operation should apply to.
*
* @enu... |
from random import randrange, choice
import pyglet
from pyglet.window import key
# Setting of input variables
WIDTH = 800
HEIGHT = 600
SPEED = 125
SPEED_KOEF = [1]
FROG_WIDTH = 80
FROG_HEIGHT = 80
PRINCESS_WIDTH = 150
PRINCESS_HEIGHT = 150
DONUTS = []
DONUTS_COORDINATES = []
SCORE = [0, 3]
FONT_SIZE = 42
TEXT_I... |
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* Fluent Bit
* ==========
* Copyright (C) 2019-2021 The Fluent Bit Authors
* Copyright (C) 2015-2018 Treasure Data Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in co... |
import os
"""
Python script which runs all test scripts.
"""
DIR = "../testing"
FILES = ["ocp_index_one_test_I.py", "ocp_index_two_test_I.py"]
for test in FILES:
try:
os.system("python {0} --folder {1}".format(test, DIR))
except:
with open(os.path.join(DIR, "log.txt"), "a+") as f:
... |
// Multimap implementation -*- C++ -*-
// Copyright (C) 2001-2020 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library 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 Foun... |
/**
* Represent a bot owner
*/
class OwnerModel {
/**
* @constructor
* @param {string} discordId DiscordId of the owner
*/
constructor(discordId = undefined) {
this._discordId = discordId;
}
/**
* @returns {string} Discord Id
*/
get discordId() {
return t... |
# coding=utf-8
# Copyright 2020 The TensorFlow Datasets 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... |
const Sequelize = require('sequelize');
const db = require('../db');
const jwt = require('jsonwebtoken');
const bcrypt = require('bcrypt');
const axios = require('axios');
const SALT_ROUNDS = 5;
const User = db.define("user", {
username: {
type: Sequelize.STRING,
unique: true,
allowNull: false,
},
... |
from django.test import SimpleTestCase
from django.urls import reverse, resolve
from mitglieder.views import *
class TestUrls(SimpleTestCase):
def test_main_screen_url_resolves(self):
url = reverse('mitglieder:homepage')
self.assertEqual(resolve(url).func, main_screen)
"""
Member erst... |
/*
* This header is generated by classdump-dyld 1.0
* on Sunday, June 7, 2020 at 11:23:42 AM Mountain Standard Time
* Operating System: Version 13.4.5 (Build 17L562)
* Image Source: /System/Library/Frameworks/MapKit.framework/MapKit
* classdump-dyld is licensed under GPLv3, Copyright © 2013-2016 by Elias Limneos.
*/
#... |
/* eslint-disable react-native/no-inline-styles */
import React, { useState } from 'react';
import { storiesOf } from '@apollosproject/ui-storybook';
import { StyleSheet, Animated, View } from 'react-native';
import Reanimated from 'react-native-reanimated';
import {
ConnectedImage,
GradientOverlayImage,
PaddedVi... |