text stringlengths 3 1.05M |
|---|
from flask import Flask
def create_app(**config_overrides):
app = Flask(__name__)
app.config.from_pyfile('settings.py')
app.config.update(config_overrides)
from main.views import main_app
app.register_blueprint(main_app)
from stores.views import stores_app
app.register_blueprint(stores_... |
"use strict";
const setLessonName = () => {
let header = document.getElementsByClassName('header-bar__tab--active')[0]
let lessonName = header.querySelector('.header-bar__tab-title').innerText
chrome.storage.local.set({lessonname: lessonName});
}
const getText = () => {
... |
import React, { Component } from 'react';
import ChatRoomListItem from '../Rooms/ChatRoomListItem';
class Participant extends Component {
render() {
return (
<ChatRoomListItem src={this.props.src} message={this.props.status || "status"} name={this.props.name}/>
);
}
}
export defa... |
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b)... |
from imagekit import ImageSpec
from imagekit.processors import Adjust
from imagekit.processors import ResizeToFill
from imagekit.processors import ResizeToFit
class GallerySlideshowImage(ImageSpec):
processors = [ResizeToFill(750, 500)]
format = 'JPEG'
options = {'quality': 30}
class GalleryCoverThumbna... |
#ifndef _ZCEDXREF_H
#define _ZCEDXREF_H
#pragma pack (push, 8)
Zcad::ErrorStatus
zcedXrefAttach(const ZTCHAR* XrefPathname,
const ZTCHAR* XrefBlockname,
ZcDbObjectId* pXrefBTRid = NULL,
ZcDbObjectId* pXrefRefid ... |
/********************************************************************************
** Form generated from reading UI file 'EditorNameValue.ui'
**
** Created by: Qt User Interface Compiler version 5.14.2
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
**********************************... |
void foo (int x, int c, char h);
int f(void) {
return 0;
}
int x = 3;
// int deklaracijaBezDefinicije(int x); // deklaracija bez definicije
int main(void) {
int a = 5;
const char c = 'i';
int niz[3];
void foo (int x, int c, char h);
int x = 5;
int y = x + 1;
a = a+3;
... |
#Credit: @r4v4n4
"""Emoji
Available Commands:
.fleave"""
from telethon import events
import asyncio
@borg.on(events.NewMessage(pattern=r"\.(.*)", outgoing=True))
async def _(event):
if event.fwd_from:
return
animation_interval = 1
animation_ttl = range(0, 17)
input_str = event.pat... |
/**
* Select2 Finnish translation
*/
(function ($) {
"use strict";
$.fn.select2.locales['fi'] = {
formatNoMatches: function () {
return "Ei tuloksia";
},
formatInputTooShort: function (input, min) {
var n = min - input.length;
return "Ole hyvä ja an... |
# Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... |
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ Copyright 2020 Adobe Systems Incorporated
~
~ 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
~
~ htt... |
import React from 'react'
import { View } from 'react-sketchapp'
import headings from '../../data/headings'
import techData from '../../data/techs'
import { getDataLocale } from '../utils'
import Heading from '../components/Heading'
import Tech from '../components/Tech'
const heading = getDataLocale(headings.techs)
con... |
#FLM: AT rename (!)
from robofab.world import CurrentFont
string1='findText'
string2='replaceText'
f = CurrentFont()
for gname in f.selection:
#f[gname]
newname=gname.replace(string1,string2)
f[gname].name = newname
f.update() |
import asyncio
import base64
import re
import subprocess
import time
from typing import Dict, Optional, Tuple, List
import oci # type: ignore
import yaml
__all__ = ["get_nodespace", "start_node", "start_nodes"]
def load_yaml(filename: str) -> dict:
with open(filename, "r") as f:
return yaml.safe_load(f... |
import net from 'net';
var port = 22112;
var server = net.createServer(function(socket) {
console.log('# server connection1', socket.remoteAddress + ":" + socket.remotePort);
socket.on('data', function(data) {
console.log('# socket data |', data.length, '|', data.toString().trim());
});
socket.on('end', func... |
/*
* textedit.c -- textedit widget, used to allow user edit text.
*
* Copyright (c) 2018, Liu chao <lc-soft@live.cn> 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... |
module.exports = new Date(2022, 4, 27)
|
// ____ _ __ _
// | _ \(_)/ _| | |
// | |_) |_| |_ _ __ ___ ___| |_
// | _ <| | _| '__/ _ \/ __| __|
// | |_) | | | | | | (_) \__ \ |_
// |____/|_|_| |_| \___/|___/\__| 2018 - 2019
//
//
// This file is distributed under the MIT License (MIT).
// See LICENSE.txt for details.
/... |
/**************************************************************************//**
* @file nor_MX29LV320T.c
* @version V1.0
* @brief NOR Flash - MX29LV320T driver source file
*
* SPDX-License-Identifier: Apache-2.0
* @copyright (C) 2018 Nuvoton Technology Corp. All rights reserved.
*************************... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
""" Helper functions """
import logging
import os
from distutils.util import strtobool
log = logging.getLogger("csp")
def gather_environ(keys) -> dict:
"""
Return a dict of environment variables correlating to the keys dict
:param keys: The environ keys to ... |
from unittest.mock import patch
from django.test import TestCase
from django.contrib.auth import get_user_model
from core import models
def sample_user(email='test@london.com', password='test123'):
"""Create a sample user"""
return get_user_model().objects.create_user(email, password)
class ModelTests(Tes... |
function verificar() {
var data = new Date()
var ano = data.getFullYear()
var fano = document.getElementById('txtano')
var res = document.getElementById('res')
if (fano.value.length == 0 || Number(fano.value) > ano) {
window.alert('[ERRO] Verifique os dados e tente novamente!')
} else {
... |
var express = require('express');
var bodyParser = require('body-parser')
var app = express();
var exec = require('child_process').exec;
app.use(bodyParser.urlencoded({ extended: false }));
app.use(bodyParser.json());
app.get('/', function(req, res) {
res.sendFile(__dirname + "/index.htm");
console.log("GET /... |
'use strict';
const Util = require('../util.js');
const Relationship = require('../internal/relationship.js');
const Manga = require('./manga.js');
/**
* Represents an author or artist
* https://api.mangadex.org/docs.html#tag/Author
*/
class Author {
/**
* There is no reason to directly create an author o... |
import torch
from torch import nn
from area_attention import AreaAttention
class MultiHeadAreaAttention(nn.Module):
""" Multi-Head version of Area Attention. """
def __init__(self, area_attention: AreaAttention, num_heads: int, key_query_size: int,
key_query_size_hidden: int, value_size: in... |
export default function taskStatus(ev, index, list) {
list = list.map((task) => {
if (task.index === index) {
task.completed = ev.target.checked;
}
return task;
});
localStorage.setItem('tasks', JSON.stringify(list));
} |
(function (root, factory) {
if (typeof module !== 'undefined' && module.exports) {
// CommonJS
if (typeof angular === 'undefined') {
factory(require('angular'));
} else {
factory(angular);
}
module.exports = 'quantacann2-message';
} else... |
# -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2018-09-16 16:22
from __future__ import unicode_literals
import cloudinary.models
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('app', '0005_auto_20180916_1618'),
]
operations = [
migratio... |
$(document).ready(function(){
$.ajaxSetup({ cache: false });
function getRequest(url, callback) {
$.get(url, function(data) {
data = $.parseJSON(data);
callback(data);
});
}
function generatePie(idDiv, data, title){
Highcharts.chart(idDiv, {
chart: {
plotBackgroundColor: null,
... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var DEBUG = exports.DEBUG = global.DEBUG = false;
var WATCHING = exports.WATCHING = global.WATCHING = false;
var DIR = exports.DIR = global.DIR = __dirname;
var R = exports.R = global.R = {
dev: './dev/',
dest: './dest/'
};
var... |
/* SPIM S20 MIPS simulator.
Code to create, maintain and access memory.
Copyright (c) 1990-2010, James R. Larus.
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 sou... |
# Copyright (c) 2020 Sony 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://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... |
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <vespamalloc/malloc/memblockboundscheck.h>
#define MALLOC_STACK_SAVE_LEN 16
namespace vespamalloc {
typedef MemBlockBoundsCheckBaseT<20, MALLOC_STACK_SAVE_LEN> MemBlockBoundsC... |
# -*- coding: utf-8 -*-
from __future__ import print_function, division, absolute_import
from distutils.sysconfig import get_python_lib
from logging import getLogger
from os import chdir, getcwd
from os.path import (abspath, dirname, exists, expanduser, expandvars, isdir, isfile, join,
normpath, se... |
function AddCategorySuccess(data) {
debugger
if (data.status == true) {
$("#addCategory").modal("hide");
$(".modal-backdrop").remove();
var popTimer = parseInt($("#hdnPopUpTimer").val()); setTimeout("$.each(BootstrapDialog.dialogs, function(id, dialog){dialog.close();});",popT... |
import Vue from 'vue'
import App from './App.vue'
import VueResource from 'vue-resource';
import VueHead from 'vue-head'
import VueRouter from 'vue-router';
import { routes } from './routes';
import store from './store'
import './assets/css/reset.css';
Vue.use(VueResource);
Vue.use(VueRouter);
Vue.use(VueHead);
const... |
#ifndef SAMPLE_SETMAPPROJECTIONS_REQUEST_DCPS_IMPL_H_
#define SAMPLE_SETMAPPROJECTIONS_REQUEST_DCPS_IMPL_H_
#include "ccpp.h"
#include "ccpp_Sample_SetMapProjections_Request_.h"
#include "TypeSupportMetaHolder.h"
#include "TypeSupport.h"
#include "FooDataWriter_impl.h"
#include "FooDataReader_impl.h"
#include "FooData... |
#!/usr/bin/python
# Copyright (c) 2016 Hewlett-Packard Enterprise Corporation
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... |
import CalendarLocale from '../../calendar/src/locale/he_IL';
import TimePickerLocale from '../../time-picker/locale/he_IL';
// Merge into a locale object
export default {
lang: {
placeholder: 'בחר תאריך',
rangePlaceholder: ['תאריך התחלה', 'תאריך סיום'],
...CalendarLocale
},
timePic... |
(function() {var implementors = {};
implementors["crossbeam_epoch"] = [{"text":"impl<T: ?<a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html\" title=\"trait core::marker::Sized\">Sized</a> + <a class=\"trait\" href=\"crossbeam_epoch/trait.Pointable.html\" title=\"trait cross... |
/*
Share.init(Str button class);
*/
; var Share;
;(function() {
'use strict';
var encodedHref = encodeURIComponent(window.location.href);
Share = {
network: function(elem) {
var net = elem.getAttribute('data-network');
if (!net) {
return;
}
var url;
switch (net) {
case 'vk':
url ... |
import path from 'path'
const formidable = require('formidable');
import feathersErrors from 'feathers-errors'
import fs from 'fs';
import fsExtra from 'fs-extra'
const decompress = require('decompress')
const exec = require('child_process').exec
import compileIndex from '../../../components/compile-index';
import them... |
import os
import torch
import sys
from utils import extend, get_printer
def generate_data(lms_clean_root: str):
torch.manual_seed(0)
# model
input = torch.randn(2, 1, 3, 3)
input.requires_grad = True
weight = torch.randn(2, 1, 3, 3)
weight.requires_grad = True
m = torch.nn.ELU(alpha=1.0)
... |
let calculator = prompt('Введіть математичну операцію в форматі "2 + 5" (також можна -, /, *, ^). Між числами та знаком дії ОБОВ\'ЯЗКОВО пробіл. Інший запис програма не розпізнає й видасть невірну відповідь!');
if(calculator === null){
alert('Я тут для того, щоб рахувати, а ви мене закриваєте. Грубо з вашого боку... |
const sequelize = require('../config/connection');
const { User, Post } = require('../models');
const userdata = [
{
userId: '1',
username: 'alesmonde0',
email: 'nwestnedge0@cbc.ca',
password: 'password123'
},
{
userId: '2',
username: 'jwilloughway1',
email: 'rmebes1@sogou.com',
p... |
function show() {
'use strict';
// Generic setup, map is standard 960×500
var margin = {top: 100, bottom: 10, right: 70, left: 50},
width = 1200 - margin.left - margin.right,
height = 800 - margin.top - margin.bottom;
// create the standard chart
var svg = d3.select(".chart")
... |
// Copyright 2017 The Chromium 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 CHROME_BROWSER_SAFE_BROWSING_DOWNLOAD_PROTECTION_CHECK_CLIENT_DOWNLOAD_REQUEST_H_
#define CHROME_BROWSER_SAFE_BROWSING_DOWNLOAD_PROTECTION_CHECK_C... |
Ext.define('CustomApp', {
extend: 'Rally.app.App',
componentCls: 'app',
launch: function() {
this.iterationCombobox = this.add({
xtype: 'rallyiterationcombobox',
listeners: {
ready: this._onIterationComboboxLoad,
select: this._onIterationCombo... |
/*
* # Semantic - Modal
* http://github.com/semantic-org/semantic-ui/
*
*
* Copyright 2014 Contributor
* Released under the MIT license
* http://opensource.org/licenses/MIT
*
*/
;(function ( $, window, document, undefined ) {
"use strict";
$.fn.modal = function(parameters) {
var
$allModules = $(thi... |
/**
* Implement Gatsby's Browser APIs in this file.
*
* See: https://www.gatsbyjs.org/docs/browser-apis/
*/
import muiRootWrapper from './src/mui-root-wrapper'
export const wrapRootElement = muiRootWrapper
require('typeface-roboto')
|
#!/usr/bin/env python
import numpy as np
from pycrazyswarm import *
import _thread
Z = 0.3
sleepRate = 30
def goCircle(timeHelper, cf, totalTime, radius, kPosition):
startTime = timeHelper.time()
pos = cf.position()
startPos = pos + np.array([0, 0, Z])
center_circle = startPos - np.... |
from syft.execution.plan import func2plan
from syft.execution.plan import method2plan
from syft.execution.plan import Plan
|
from __future__ import absolute_import
from ..utils import BasicSegment
import time
class Segment(BasicSegment):
def add_to_powerline(self):
powerline = self.powerline
if powerline.args.shell == 'bash':
time_ = ' \\t '
elif powerline.args.shell == 'zsh':
time_ = ' %... |
import $ from 'jquery';
import BlueMap from './libs/BlueMap.js';
import '../style/style.scss';
$(document).ready(() => {
window.blueMap = new BlueMap($('#map-container')[0], 'data/');
});
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: pogoprotos/enums/iap_item_category.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.pr... |
const Command = require('../../structures/Command');
const { MessageEmbed } = require('discord.js');
const Guild = require("../../database/schemas/Guild.js");
const Economy = require("../../models/economy.js")
const warnModel = require("../../models/moderation.js")
const mongoose = require("mongoose")
const Logging = r... |
import React from "react";
import faker from "faker/locale/en_US";
import {
Container,
Row,
Col,
Nav,
NavItem,
NavLink,
Table,
Button,
Card,
CardBody,
CardFooter,
UncontrolledButtonDropdown,
DropdownToggle,
DropdownMenu,
DropdownItem,
Media,
Input,
InputGroup,
CustomInput,
InputGroupAddon,
Badge,
... |
#!/usr/bin/env node
'use strict';
/*
var fs = require('fs');
var path = require('path');
var package_json = path.join(process.cwd(), 'package.json');
var version = require(package_json).version;
console.log(version);
*/
/**
* Module dependencies
*/
var commander = require('commander');
var fs = require('fs');
var ... |
jest.setTimeout(20000)
jest.mock('inquirer')
const invoke = require('../lib/invoke')
const { expectPrompts } = require('inquirer')
const create = require('@vue/cli-test-utils/createTestProject')
const parseJS = file => {
const res = {}
;(new Function('module', file))(res)
return res.exports
}
const baseESLintC... |
import shutil
import textwrap
# Base class for exceptions
class AbbotException(Exception):
def __init__(self, message, *, expire_in=0):
self._message = message
self.expire_in = expire_in
@property
def message(self):
return self._message
@property
def message_no_format(self... |
# -*- coding: utf-8 -*-
#
# SelfTest/Hash/SHA.py: Self-test for the SHA-1 hash function
#
# Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.net>
#
# ===================================================================
# The contents of this file are dedicated to the public domain. To
# the extent that dedicatio... |
from .command import volume
from typing import NoReturn
import logging
import sys
import typer
# Configure the root logger.
def config_logger(verbosity: int):
levels = {
0: logging.ERROR,
1: logging.WARN,
2: logging.INFO,
3: logging.DEBUG
}
if verbosity > 3:
verbos... |
"""Default formatting class for Flake8."""
from flake8.formatting import base
class SimpleFormatter(base.BaseFormatter):
"""Simple abstraction for Default and Pylint formatter commonality.
Sub-classes of this need to define an ``error_format`` attribute in order
to succeed. The ``format`` method relies o... |
/* Tests for DOM 2 HTML 'HTMLScriptElement' object.
*/
var cvs = "$Id: htmlscriptelement.js 4838 2006-01-18 05:59:01Z hallvord $";
testmodule( "HTMLScriptElement", cvs );
var external1_timeout;
try {
var p1 = document.getElementById("myScript");
var p2 = document.getElementById("myScript2");
var p = p1;
... |
/* @generated */
// prettier-ignore
if (Intl.DisplayNames && typeof Intl.DisplayNames.__addLocaleData === 'function') {
Intl.DisplayNames.__addLocaleData({"data":{"bm":{"types":{"language":{"long":{"af":"af","agq":"agq","ak":"akankan","am":"amarikikan","ar":"larabukan","ar-001":"larabukan (001)","as":"as","asa":"asa"... |
from mod_pywebsocket import stream
def web_socket_do_extra_handshake(request):
pass
def web_socket_transfer_data(request):
# pywebsocket does not mask message by default. We need to build a frame manually to mask it.
request.connection.write(stream.create_text_frame('The Masked Message', mask=True))
|
import time
from typing import Optional
from prefect import context, Client
from prefect.exceptions import ClientError
def _running_with_backend() -> bool:
"""
Determine if running in context of a backend. This is always true when running
using the `CloudTaskRunner`.
Returns:
- bool: if `_ru... |
'''Text progress bar library for Python.
A text progress bar is typically used to display the progress of a long
running operation, providing a visual cue that processing is underway.
The ProgressBar class manages the current progress, and the format of the line
is given by a number of widgets. A widget is an object ... |
var path = require('path');
module.exports = {
entry: './src/main/js/app.js',
devtool: 'hidden-source-map',
cache: true,
mode: 'production',
output: {
path: __dirname,
filename: './src/resources/public/js/bundle.js'
},
devServer: {
inline: false,
contentBase:... |
import React, { Component } from 'react';
import { StyleSheet, View, Text, Animated, Linking, Button } from 'react-native';
import Mapbox from '@mapbox/react-native-mapbox-gl';
import TextModule from './components/TextModule.js';
import SwipeCards from './components/SwipeCards.js';
import Footer from './components/Foot... |
/**
* Copyright IBM Corp. 2016, 2018
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import React from 'react';
import Link from '../../Link';
import Button from '../../Button';
import TextInput from '../../TextInput';
import ... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import rospy
from geometry_msgs.msg import Twist
import tf
import sys
import tf2_ros
import geometry_msgs.msg
import logging
logging.basicConfig()
if __name__ == '__main__':
if len(sys.argv) < 8:
rospy.logerr('Invalid number of parameters\nusage: '
... |
from django.db import models
from django.contrib.postgres.indexes import GinIndex
from treebeard.mp_tree import MP_Node
from treebeard.mp_tree import MP_NodeManager, MP_NodeQuerySet
from django.contrib.postgres.search import TrigramSimilarity
from wazimap_ng.extensions.index import GinTrgmIndex
from wazimap_ng.genera... |
import React from 'react';
import { storiesOf } from '@storybook/react';
import { withKnobs, text, select } from '@storybook/addon-knobs';
import { withInfo } from '@storybook/addon-info';
import { defaultTemplate } from 'storybook/decorators/storyTemplates';
import {
storybookPackageName,
DOCUMENTATION_URL,
STOR... |
/*-
* Copyright (c) 1999 Doug Rabson
* 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. Redistributions of source code must retain the above copyright
* notice, this list of conditi... |
from contextlib import contextmanager
from piestats.update.filemanager import FileManager
import os
import logging
import click
from fnmatch import fnmatch
from io import BytesIO
import ftplib
class FtpFileManager(FileManager):
def __init__(self, r, keys, root, retention, connect_settings):
self.r = r
self... |
/****************************************************************************
**
** Copyright (C) 2020 @scriptiot
**
** EVM是一款通用化设计的虚拟机引擎,拥有语法解析前端接口、编译器、虚拟机和虚拟机扩展接口框架。
** 支持js、python、qml、lua等多种脚本语言,纯C开发,零依赖,内置REPL,支持主流 ROM > 40KB, RAM > 2KB的MCU;
** 自带垃圾回收(GC)先进的内存管理,采用最复杂的压缩算法,无内存碎片(大部分解释器都存在内存碎片)
** Version : 1.0
... |
# -*- coding: utf-8 -*-
'''
File name: code\split_divisibilities\sol_598.py
Author: Vaidic Joshi
Date created: Oct 20, 2018
Python Version: 3.x
'''
# Solution to Project Euler Problem #598 :: Split Divisibilities
#
# For more information see:
# https://projecteuler.net/problem=598
# Problem Statemen... |
//
// Created by 凌空 on 16/1/2.
// Copyright (c) 2016 fharmony. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIColor (HexExt)
+ (UIColor *)colorWithHexString:(NSString *)rgb;
+ (NSArray *)colorComponent:(UIColor *)color;
+ (NSString *)colorHexStringFromUIColor:(UIColor *)color;
+ (NSArray *)hslarryCo... |
/**
* Module date
*/
// Inclure l'interface Date.h
#include "date.h"
// Inclure les bibliothèques uniquement nécessaire à Date.c
#include <stdio.h>
#include <math.h>
/** */
void initialiser(Date *date){
date->jour = 1;
date->nomJour = JEUDI;
date->mois = JAN;
date->annee = 1970;
}
void convertir_v... |
import { ERROR, FULLSCREEN, MEDIA_COMPLETE, PLAYER_STATE, STATE_PLAYING, STATE_PAUSED } from 'events/events';
import ProgramController from 'program/program-controller';
import Model from 'controller/model';
import changeStateEvent from 'events/change-state-event';
import SharedMediaPool from 'program/shared-media-pool... |
import React, { Component, Fragment } from 'react'
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom'
import Helmet from 'react-helmet'
import includes from 'nanoutils/cjs/includes'
import ScrollToTop from './components/ScrollToTop'
import Meta from './components/Meta'
import Home from './views/... |
import random
from river import base
__all__ = ['PoissonInclusion']
class PoissonInclusion(base.Transformer):
"""Randomly selects features with an inclusion trial.
When a new feature is encountered, it is selected with probability `p`. The number of times a
feature needs to beseen before it is added t... |
/*
* Copyright © 2017 Cask Data, 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 t... |
import argparse
import os
import ctypes
import pathlib
import subprocess
class RegistrarActionRequiresAdmin(PermissionError):
''' Used to denote that this action requires admin permissions '''
pass
class Registrar:
''' A collection of methods relating to registering and unregistering PyDeskband... |
/**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
/**
* @fileOverview Insert and remove numbered and bulleted lists.
*/
( function() {
var listNodeNames = { ol: 1, ul: 1 },
emptyTextRegex = /^[\n\r\t ]*... |
"""
========================
Broadcasting over arrays
========================
.. note::
See `this article
<https://numpy.org/devdocs/user/theory.broadcasting.html>`_
for illustrations of broadcasting concepts.
The term broadcasting describes how numpy treats arrays with different
shapes during arithmeti... |
/*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[367],{430:function(e,r,t){"use strict";t.r(r),t.d(r,"frontMatter",(function(){return i})),t.d(r,"metadata",(function(){return a})),t.d(r,"rightToc",(function(){return l})),t.d(r,"default",(function(){return u}));var o=t(3),n=t(7),s=(t(0),t(446)),i={id:"user-logout",t... |
from src.Logging.Logger import *
import configparser
@HttpClientLogger
class AuthenticationBypassViaOAth():
pass
|
import snscrape.modules.twitter as sntwitter
import pandas as pd
# list to store tweet data
tweets = []
# scrape data and append to list
for i, tweet in enumberate(sntwitter.TwitterSearchScraper('fake news since:2020-03-01 until:2020-04-01').get_items()):
print(i)
tweets.append([tweet.date, tweet.id, tweet.content... |
const gulp = require('gulp'),
$ = require('gulp-load-plugins')(),
browserify = require('browserify'),
babelify = require('babelify'),
stringify = require('stringify'),
buffer = require('vinyl-buffer'),
source = require('vinyl-source-stream'),
runSequence = require('run-sequence'),
rimraf... |
/**
* Created by yuehaiming on 2019/8/12.
*/
import fetch from '@/libs/fetch/fetch';
const urlPrefix = '/madara/in/caseMonitor';
// 警情查询 初始化表格
export function sendMonitorCase(obj) {
return fetch({
url: `${urlPrefix}/sendMonitorCase`,
method: 'post',
data: obj
});
}
// 上控信息查询
expor... |
import reducer from './reducer';
import routes from './routes';
import moduleConfig from './config';
import { Module } from '../core/index';
import './template';
const module = globalConfig => (
new Module('{MODULE_NAME}', {
routes,
reducer,
config: { ...moduleConfig, ...globalConfig },
... |
Meteor.startup(function () {
Template[getTemplate('pageItem')].helpers({
formId: function () {
return 'updatePage-'+ this._id
}
});
Template[getTemplate('pageItem')].events({
'click .delete-link': function(e, instance){
e.preventDefault();
if (confirm("Delete page?")) {
... |
// Copyright (c) 2018 The PIVX developers
// Copyright (c) 2018 The Betfint developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BETFINT_ZBETFTRACKER_H
#define BETFINT_ZBETFTRACKER_H
#include "primitives/zerocoin.... |
import { tournamentEngine } from '../..';
import fs from 'fs';
import { DOUBLES, TEAM } from '../../constants/matchUpTypes';
const tournamentRecordJSON = fs.readFileSync(
'./src/global/testHarness/assignTieMatchUpParticipant.tods.json',
'utf-8'
);
it.skip('populates matchUp sides', () => {
const tournamentReco... |
import React from "react"
import {
View,
Image,
ImageBackground,
TouchableOpacity,
Text,
Button,
Switch,
TextInput,
StyleSheet,
ScrollView
} from "react-native"
import Icon from "react-native-vector-icons/FontAwesome"
import { CheckBox } from "react-native-elements"
import { connect } from "react-re... |
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.protot... |