text stringlengths 3 1.05M |
|---|
#!/usr/bin/env python
# coding:utf-8
import subprocess
import shutil
from xml.dom import minidom
import zipfile
import os
import re
import glob
import sys
import codecs
import random
import string
import time
# from elf_header import ELF
# from study.day14_jiagu.apk_auto_enforce.elf_header import ELF
... |
import { defineMessages } from 'react-intl'
export default defineMessages({
'schema.housing.title': {
id: 'schema.housing.title',
defaultMessage: 'Title'
},
'schema.housing.examples': {
id: 'schema.housing.examples',
defaultMessage: 'Examples'
},
'schema.housing.category': {
id: 'schema.h... |
angular.module('ui.bootstrap.datetimepicker', ["ui.bootstrap.dateparser", "ui.bootstrap.datepicker", "ui.bootstrap.timepicker"])
.directive('datepickerPopup', function () {
return {
restrict: 'EAC',
require: 'ngModel',
link: function (scope, element, attr, controller) {
//remove the defa... |
var shareImageButton = document.querySelector('#share-image-button');
var createPostArea = document.querySelector('#create-post');
var closeCreatePostModalButton = document.querySelector('#close-create-post-modal-btn');
var sharedMomentsArea = document.querySelector('#shared-moments');
var form = document.querySelector... |
salir="s"
while salir!="Salir":
try:
seguir_ordenando="s"
cantidad_total_producto=[0,0,0]
cantidad_producto=[0,0,0]
producto=["Papas","Hamburguesas","Tacos"]
total=0
print("Bienvenido al Restaurante Rapi-Comidas\nEl menú de hoy es: \n\t1. Papas \t\tValor: 600 ... |
from typing import Tuple
from hypothesis import given
from ground.base import (Context,
Kind)
from tests.hints import (PointsPair,
PointsTriplet)
from . import strategies
@given(strategies.contexts_with_points_triplets)
def test_basic(context_with_points_triplet: Tu... |
// @link https://schemas.extratv.com/json-schema/extra/notify/request/get-notification-history-request/1-0-0.json#
import Fb from '@gdbots/pbj/FieldBuilder.js';
import Format from '@gdbots/pbj/enums/Format.js';
import GdbotsPbjxRequestV1Mixin from '@gdbots/schemas/gdbots/pbjx/mixin/request/RequestV1Mixin.js';
import Me... |
import { HarmonicDiffusionGrid } from "./HarmonicDiffusionGrid.js";
import { randomIntegerBetween, seededRandom } from "../../../core/math/MathUtils.js";
test("constructor doesn't throw", () => {
new HarmonicDiffusionGrid([], 0, 0);
});
test("step 1x1 unassigned", () => {
const grid = new HarmonicDiffusionGri... |
/* Version: 16.0.9106.1000 */
Type.registerNamespace("Strings");Strings.OfficeOM=function(){};Strings.OfficeOM.registerClass("Strings.OfficeOM");Strings.OfficeOM.L_NonUniformPartialSetNotSupported="No se pueden utilizar parámetros de coordenadas con el tipo de coerción Tabla cuando la tabla contiene celdas combinada... |
import unittest
import linked_list
class Test(unittest.TestCase):
def test_run_once(self):
self.assertEqual(1 + 1, 2)
if __name__ == "__main__" : unittest.main()
|
##########################################################################
#
# Copyright (c) 2013-2014, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redi... |
(function() {
"use strict";
var glob = require("glob");
var fs = require("fs");
var v8 = require("./v8Ext");
var basePath = "libs/v8/" + v8.version + "/include";
console.log("Copying V8 Includes for Flathead project...");
var copyFile = function(source, destination) {
console.log(source + " > " + destinati... |
/* eslint-disable quote-props,func-style,no-var,prefer-rest-params */
export const func1 = function (p1, ...params) {
return `${p1} ${p1?.length} ${params.length} ${Array.from(arguments).length}`
}
export var var1 = 'var1'
export default {
func1,
'var_1_1': var1,
var_1_2 : var1
}
|
module.exports = function (api, opts) {
const { nodeEnv } = opts;
delete opts['nodeEnv'];
return {
presets: [
[
require('./lib').default,
require('@birman/utils').deepmerge(
{
env: {
useBuiltIns: 'entry',
corejs: 3,
modules... |
if (process.argv[2] === "seeder") {
// Seeder
const { importData, destroyData } = require('./api/dist/seeder')
if (process.argv[3] === "-d") {
destroyData()
} else {
importData()
}
} else {
// Load API
const app = require('./api/dist/app')
} |
import _ from 'lodash';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Link } from 'react-router-dom';
import { fetchPosts } from '../actions';
class PostsIndex extends Component {
componentDidMount(){
this.props.fetchPosts();
}
renderPosts() {
return _.map(th... |
#!/usr/bin/env python
# coding: utf-8
# In[301]:
import numpy as np
import sys
import matplotlib.pyplot as plt
from matplotlib.colors import rgb_to_hsv, hsv_to_rgb
from skimage.draw import line_aa
from PIL import Image
# In[302]:
image = Image.open(sys.argv[1])
image = np.array(image, dtype=np.float32) / 255
#... |
// NOTE: This file was generated by the ServiceGenerator.
// ----------------------------------------------------------------------------
// API:
// Cloud OS Config API (osconfig/v1)
// Description:
// OS management tools that can be used for patch management, patch
// compliance, and configuration management on... |
from conans import ConanFile, AutoToolsBuildEnvironment, tools
import os
class LibevdevConan(ConanFile):
name = "libevdev"
version = "1.9.0"
license = "X11"
description = "Wrapper library for Linux evdev devices."
homepage = "https://www.freedesktop.org/wiki/Software/libevdev"
url = "https://gi... |
from django.apps import AppConfig
class ProfillConfig(AppConfig):
name = 'profill'
|
#coding: latin1
#< full
from algoritmia.problems.knapsack import branch_and_bound_knapsack0
v, w, W = [10,2,3,4,2], [12,5,6,2,6], 10
x, score = branch_and_bound_knapsack0(v, w, W)
print(x, score)
#> full |
'use strict';
const fs = require('fs');
const path = require('path');
const Sequelize = require('sequelize');
const basename = path.basename(__filename);
const env = process.env.NODE_ENV || 'development';
const config = require(__dirname + '/../config/config.json')[env];
const db = {};
let sequelize;
if (config.use_e... |
define([
'dojo/_base/declare',
'dojo/_base/lang',
'dojo/_base/array',
'dijit/MenuItem',
'dijit/registry',
'EbrcTracks/View/Dialog/SetTrackYMax',
'EbrcTracks/View/Dialog/SetTrackLogScale',
'EbrcTracks/View/Dialog/DownloadHelp',
'JBrowse/Plugin'
],
... |
/*
* TLS PRF P_SHA256
* Copyright (c) 2011, Jouni Malinen <j@w1.fi>
*
* This software may be distributed under the terms of the BSD license.
* See README for more details.
*/
#include "includes.h"
#include "common.h"
#include "sha256.h"
/**
* tls_prf_sha256 - Pseudo-Random Function for TLS v1.2 (P_SHA256, RFC... |
function foo(){
var a = 10;
var b = 20;
return a + b;
}
function bar(){
var x = 10;
var y = 20;
return x + y;
}
|
const assert = require('assert');
const makeConfig = require('../../../core/util/makeConfig');
describe('make config', function () {
it('should pass the filter arg correctly', function () {
const actualConfig = makeConfig('init', { filter: true });
assert.strictEqual(actualConfig.args.filter, true);
});
... |
import { API } from '$lib/api/server-side';
/**
* @type {import('@sveltejs/kit').RequestHandler}
*/
export async function get()
{
try
{
const songs = await API.fetchSongs();
return { body: songs };
}
catch(error)
{
if(error.response)
return { status: error?.response?.status... |
export default {
common: {
play: "播放",
songs: "首歌",
},
nav: {
home: "首页",
explore: "发现",
library: "音乐库",
search: "搜索",
github: "GitHub 仓库",
},
home: {
recommendPlaylist: "推荐歌单",
recommendArtist: "推荐艺人",
newAlbum: "新专速递",
seeMore: "查看全部",
charts: "排行榜",
},
li... |
$(document).ready(function () {
var doExist = $("ul.globalErrors").length;
if (doExist) {
setTimeout(function () {
$("ul.globalErrors").fadeOut(3000);
}, 3000);
}
var doEventExist = $("ul.globalSuccess").length;
if (doEventExist) {
setTimeout(function () {
... |
/* ------------------------------------------------------------------------------
*
* # Handsontable - Excel-like tables with extensive funtionality
*
* Specific JS code additions for handsontable_advanced.html page
*
* Version: 1.0
* Latest update: Nov 1, 2015
*
* --------------------------------------------------... |
/* Copyright (c) 2013-2016, David Hauweele <david@hauweele.net>
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, thi... |
const db = {
names: [
{id: 0, text: 'James'},
{id: 1, text: 'William'}
]
};
class MainApi{
async getAll(){
return new Promise(y => setTimeout(() => {
y(db.names)
}, 200))
}
async getFirst(){
return new Promise(y => setTimeout(() => {
y(db.names[0])
}, 200))
}
async ... |
/*
* Copyright 2018 TWO SIGMA OPEN SOURCE, 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 appl... |
# -*- coding: utf-8 -*-
import os
import json
import yaml
import logging
import logging.config
import time
import aiohttp
from aiohttp import web
def _get_logger():
logger = logging.getLogger('entitymanager.server')
return logger
class JsonEncoder(json.JSONEncoder):
def default(self, ... |
// Copyright 2016 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 PRINTING_BACKEND_PRINT_BACKEND_CUPS_H_
#define PRINTING_BACKEND_PRINT_BACKEND_CUPS_H_
#include <memory>
#include <string>
#include "base/files/f... |
from os.path import join, dirname
from dotenv import load_dotenv
import os
dotenv_path = join(dirname(__file__), '.env')
load_dotenv(dotenv_path)
'''
Configuration for Redis.
Although this package is using python-dotenv, it is advised to configure
through environment valuables.
'''
redis_config = {
"host": os... |
'use strict';
describe('Controller: CarTypesListCtrl', function () {
// load the controller's module
beforeEach(module('carRentalAppApp'));
var CarTypesListCtrl,
scope;
// Initialize the controller and a mock scope
beforeEach(inject(function ($controller, $rootScope) {
scope = $rootScope.$new();
... |
// The following example creates five accessible and
// focusable markers.
var tourStopsa = [];
var datamap = [];
lok.forEach(item => {
var geo = {lat: parseFloat(item.lat), lng: parseFloat(item.lng)};
datamap.push(geo);
datamap.push(item.nama_lokasi);
tourStopsa.push(datamap);
... |
import argparse
import random
import unittest
from multiprocessing import Manager
import torch
import torch.nn as nn
from fairseq import distributed_utils, optim
class Model(nn.Module):
def __init__(self, input_size, output_size):
super(Model, self).__init__()
self.fc = nn.Linear(inp... |
// SPDX-License-Identifier: GPL-2.0+
/*
* Pvpanic Device Support
*
* Copyright (C) 2013 Fujitsu.
* Copyright (C) 2018 ZTE.
* Copyright (C) 2021 Oracle.
*/
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/kexec.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/plat... |
// Copyright 2015-2018 Espressif Systems (Shanghai) PTE 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 a... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[15],{365:function(t,e,s){"use strict";s.r(e);var a=s(1),i=Object(a.a)({},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"content"},[this._m(0),this._v(" "),e("FirstName")],1)},[function(){var t=this.$createElement,e=this._self._c|... |
import datetime
import logging
from typing import List, Tuple
import numpy as np
import geopandas as gpd
import pandas as pd
from geoalchemy2 import WKTElement
from shapely import wkt
from shapely.geometry import Polygon, Point
from sklearn.base import TransformerMixin
from sqlalchemy import VARCHAR
from tqdm import tq... |
/**
* Created by ari on 6/19/2015.
*/
// Client Script
if(typeof document === 'object')
(function() {
self.addEventListener('submit', onFormEvent, false);
//self.addEventListener('change', onFormEvent, false);
self.addEventListener('input', onFormEvent, false);
funct... |
# Generated by Django 3.2.1 on 2021-05-09 17:35
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
... |
from requests.exceptions import RequestException
from contextlib import closing
import logging
import requests
def simple_get(url):
try:
with closing(requests.get(url, stream=True)) as response:
if is_html(response):
return response.content
else:
ret... |
// Copyright IBM Corp. 2018. All Rights Reserved.
// Node module: @loopback/cli
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT
'use strict';
const assert = require('yeoman-assert');
const fs = require('fs');
const expect = require('@loopback/testlab').... |
from tqdm import tqdm
import torch
import numpy as np
from torch import nn
# helpful function
def sum_params(model):
s = 0
for p in model.parameters():
n = p.cpu().data.numpy()
s += np.sum(n)
return s
class BertPuncCapV1(nn.Module):
"""
This is the first version of BertPuncCap. It... |
(function() {
'use strict';
angular
.module('jhbookz')
.config(stateConfig);
stateConfig.$inject = ['$stateProvider'];
function stateConfig($stateProvider) {
$stateProvider.state('settings', {
parent: 'account',
url: '/settings',
data: {
... |
import unittest
import pytest
from sumeval.metrics.lang.lang_zh import LangZH
class TestLangZH(unittest.TestCase):
def test_tokenize(self):
lang = LangZH()
text = "我发现了一朵非常漂亮的花"
tokens = lang.tokenize(text)
self.assertEqual(len(tokens), 8)
@pytest.mark.skip(reason="Download t... |
/*!
* # Semantic UI undefined - Form Validation
* http://github.com/semantic-org/semantic-ui/
*
*
* Released under the MIT license
* http://opensource.org/licenses/MIT
*
*/
;(function ($, window, document, undefined) {
"use strict";
window = (typeof window != 'undefined' && window.Math == Math)
? window
... |
(function(){tinymce.PluginManager.requireLangPack("example");tinymce.create("tinymce.plugins.ExamplePlugin",{init:function(a,b){a.addCommand("mceExample",function(){a.windowManager.open({file:b+"/dialog.htm",width:320+parseInt(a.getLang("example.delta_width",0)),height:120+parseInt(a.getLang("example.delta_height",0)),... |
/*
* This header is generated by classdump-dyld 1.5
* on Wednesday, April 28, 2021 at 9:05:43 PM Mountain Standard Time
* Operating System: Version 14.5 (Build 18L204)
* Image Source: /System/Library/Frameworks/MediaPlayer.frame... |
import pandas as pd
import numpy as np
np.seterr(divide="raise")
rolling_zscore = (
lambda x: (x - x.rolling(window=200, min_periods=10).mean())
/ x.rolling(window=200, min_periods=10).std()
)
rolling_percentile = lambda x: x.rolling(200, min_periods=10).apply(
lambda x: pd.Series(x).rank(pct=True)[0]
)
... |
#!/usr/bin/env python3
import datetime
import importlib
import os
import sys
import fcntl
import errno
import signal
import shutil
import subprocess
import textwrap
import time
import traceback
from multiprocessing import Process
from typing import Dict
from common.basedir import BASEDIR
from common.spinner import Sp... |
const {Collection} = require('./collection');
class HomeCollection extends Collection {
reload(_, cb) {
let pageUrl = new PageURL(this.url);
this.fetch(this.url).then((doc)=>{
let titles = doc.querySelectorAll('.latest-tab-nav > ul > li');
let cols = doc.querySelectorAll('... |
"""RyuApp base class for FAUCET/Gauge."""
# Copyright (C) 2013 Nippon Telegraph and Telephone Corporation.
# Copyright (C) 2015 Brad Cowie, Christopher Lorier and Joe Stringer.
# Copyright (C) 2015 Research and Education Advanced Network New Zealand Ltd.
# Copyright (C) 2015--2019 The Contributors
#
# Licensed under t... |
from django import forms
from offices.models import OfficeType, Office, StateOfficeBase
class OfficeTypeForm(forms.ModelForm):
class Meta:
model = OfficeType
fields = ['title']
class OfficeForm(forms.ModelForm):
class Meta:
model = Office
fields = ['type_ref', 'title', 'websit... |
import React from 'react';
import Image from 'next/image';
import Head from 'next/head';
import { AnimatePresence, motion } from 'framer-motion';
import '@fontsource/plus-jakarta-sans';
export default function Home() {
const [idea, setIdea] = React.useState('');
const getIdea = async () => {
const body = await (... |
import navegador5 as nv
import navegador5.url_tool as nvurl
import navegador5.head as nvhead
import navegador5.body as nvbody
import navegador5.cookie
import navegador5.cookie.cookie as nvcookie
import navegador5.cookie.rfc6265 as nvrfc6265
import navegador5.jq as nvjq
import navegador5.js_random as nvjr
import navegad... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
wz_compat/migrate.py - last updated 2019-09-28
Use data from the database of a previous year to get a starting point
for a new year.
==============================
Copyright 2019 Michael Towers
Licensed under the Apache License, Version 2.0 (the "License");
y... |
const createImage = url =>
new Promise((resolve, reject) => {
const image = new Image()
image.addEventListener('load', () => resolve(image))
image.addEventListener('error', error => reject(error))
image.setAttribute('crossOrigin', 'anonymous') // needed to avoid cross-origin issues on CodeSandbox
... |
import tkinter as tk
from tkinter import messagebox
from tkinter import ttk
from tkinter import font
from ttkthemes import ThemedTk
import tweepy
import src.GUI._stream_tab as _stream_tab
import src.GUI._search_tab as _search_tab
import src.GUI._query_tab as _query_tab
from src.collection.collect import get_replies
... |
/*
* 2007-2014 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy ... |
//
//
// MIT License
//
// Copyright (c) 2017 Stellacore Corporation.
//
// 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 ... |
import { Row, Col } from '../../model';
import {
closest as domClosest,
event as domEvent
} from 'min-dom';
const TARGET_SELECTOR =
`.dmn-decision-table-container td,
.dmn-decision-table-container th`;
export default class DragAndDrop {
constructor(eventBus, renderer, modeling, sheet) {
t... |
# Copyright 2019 The Texar 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 ... |
#ifndef _SYS_LOG_H_
#define _SYS_LOG_H_
typedef void(*f_flint_log)(const char* format, ...);
enum{
LOG_TRACE = 0,
LOG_INFO = 1,
LOG_DEBUG = 2,
LOG_WARN = 3,
LOG_ERR = 4,
LOG_CUSTOM = 5
};
void flint_log_init(void);
void flint_log_deinit(void);
void flint_log_reg(int lvl, f_flint_log);
typede... |
import os
from conans import ConanFile, tools
from conans.errors import ConanInvalidConfiguration
required_conan_version = ">=1.32.0"
class FrugallyDeepConan(ConanFile):
name = "frugally-deep"
description = "Use Keras models in C++ with ease."
license = "MIT"
topics = ("keras", "tensorflow")
hom... |
#
# Copyright 2021 Logical Clocks AB
#
# 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... |
/* */
"format cjs";
var parse5 = require('parse5/index');
var parser = new parse5.Parser(parse5.TreeAdapters.htmlparser2);
var serializer = new parse5.Serializer(parse5.TreeAdapters.htmlparser2);
var treeAdapter = parser.treeAdapter;
import { ListWrapper, StringMapWrapper } from 'angular2/src/facade/collection';
impor... |
// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.200921.6
#ifndef WINRT_Windows_Media_Devices_Core_0_H
#define WINRT_Windows_Media_Devices_Core_0_H
WINRT_EXPORT namespace winrt::Windows::Foundation
{
template <typename T> struct __declspec(empty_bases) IReference;
struct Point;
}
WIN... |
"""
Prime Developer Trial
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v1
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from fds.sdk.Q... |
/*
* WARNING: do not edit!
* Generated by Makefile from ../../openssl-src/include/openssl/opensslconf.h.in
*
* Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can... |
/* Generated by re2c */
#line 1 "encodings/default_full_8_encoding_policy_substitute.re"
// re2c $INPUT -o $OUTPUT -8 --encoding-policy substitute
#line 6 "encodings/default_full_8_encoding_policy_substitute.c"
{
YYCTYPE yych;
if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
yych = *YYCURSOR;
switch (yych) {
case 0x00:
... |
export default {
componentContainer: {},
container: {
alignItems: 'center',
flexDirection: 'row',
flexWrap: 'nowrap'
},
input: {
borderRadius: 6,
borderStyle: 'solid',
borderWidth: 1.5,
fontSize: 14,
height: 40,
marginRight: 24,
padding: 10,
paddingRight: 34,
widt... |
# STUDY DEFINITION FOR BASELINE CHARACTERISTICS
# Import necessary functions
from cohortextractor import (
StudyDefinition,
patients,
codelist_from_csv,
codelist,
filter_codes_by_category,
combine_codelists,
Measure
)
# Import codelists
from codelists import *
study = StudyDefinition... |
def index_tracker(key, msg):
"""
This function is meant to track the start and end index of
a key in a message.
Takes in: (key : string) (msg : string)
Does: Calls helper_track when the first char of key matches a char in msg
to determine if the entire key string matches
returns tuple (True, start, fini... |
import eventbus from './eventbus';
const { ipcMain } = require('electron');
const fs = require('fs');
const storage = require('electron-json-storage');
import moment from 'moment';
let timers = [];
let timerIntervals = {};
storage.get('twitchtube_timers', function(error, data) {
if (error) throw error;
if (Array... |
var structcc_p_v_r_texture_pixel_format_info =
[
[ "alpha", "structcc_p_v_r_texture_pixel_format_info.html#a9b64c2f4c30ada6f2f1d96da18ded1ee", null ],
[ "bpp", "structcc_p_v_r_texture_pixel_format_info.html#a17bdfe2798dacb937d7fd4b848192d98", null ],
[ "ccPixelFormat", "structcc_p_v_r_texture_pixel_format_i... |
# -*- coding: utf-8 -*-
import unittest
from collections import namedtuple
from os import path
from random import shuffle
import numpy as np
from replicationbase import ReplicationBase, REPRO_QUALITY_LEVELS
from classic_heuristics.lr3opt import lr3opt_init, _check_lr3opt_move, _init_with_random
from cvrp_ops import ... |
import geopandas as gpd
import numpy as np
import pytest
from scipy.ndimage.morphology import binary_erosion
from shapely.geometry.linestring import LineString
from shapely.geometry.multilinestring import MultiLineString
from shapely.geometry.multipolygon import MultiPolygon
from shapely.geometry.polygon import Polygon... |
import sys
import os
import argparse
from pathlib import Path
import datetime
import shutil
import logging
import torch
import torch.nn.functional as F
from torch.utils.tensorboard import SummaryWriter
import numpy as np
from tqdm import tqdm
sys.path.append(os.path.join(sys.path[0], '../..'))
from dataloader.any_fo... |
#!/usr/bin/env python
"""Basic histogram script"""
import argparse
from general_seq import conv
from general_seq import seq_IO
from plot import conv as pconv
from plot import hist
def main(data_file, title, output_prefix):
sequences = seq_IO.read_sequences(data_file, additional_params=True, header=True)
dat... |
import { Container } from 'react-bootstrap'
import { Route, Switch } from 'react-router-dom'
// Layout
import Layout from './layout/Layout'
// pages
import Home from './pages/Home'
import About from './pages/About'
import NotFound from './pages/NotFound'
const App = () => {
return (
<div>
<Layout>
<S... |
import select, time, queue
from bitcoinnano import Connection, Interface, SimpleConfig
from bitcoinnano.network import parse_servers
from collections import defaultdict
# electrum.util.set_verbosity(1)
def get_interfaces(servers, timeout=10):
'''Returns a map of servers to connected interfaces. If any
connec... |
/**
* Created by Rogier on 27/06/2017.
*/
import { assign, clone, cloneDeep, concat, each, find, isArray, map, merge, pull, startsWith } from 'lodash';
import * as React from 'react';
import is from 'bottom_line/lang/is';
import rightOf from 'bottom_line/sequences/rightOf';
// entity id
let eid = 0;
/**
* Scene load... |
describe('DAY 7: this keyword', () => {
it(`invoke a constructor function and assign the resulting object to "a"`, () => {
/**
* @returns {undefined|object}
*/
function A () {
this.b = function b () {
return this.c;
};
this.c... |
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible 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 version 3 of the License, or
# (at your option) an... |
import * as f from '@kuba/f'
import agent from './agent'
import bots from './bots'
export default f.or(f.isEmpty(agent), f.test(bots, agent))
|
#
# Simple JWT documentation build configuration file, created by
# sphinx-quickstart on Thu Oct 16 20:43:24 2014.
#
# 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.
#
# All configuration valu... |
from tap_lever.streams.base import BaseStream
from tap_lever.streams import cache as stream_cache
import singer
LOGGER = singer.get_logger() # noqa
class CandidateReferralsStream(BaseStream):
API_METHOD = 'GET'
TABLE = 'candidate_referrals'
@property
def path(self):
return '/candidates/{ca... |
##############################################################################
#
# Copyright (c) 2014, 2degrees Limited.
# All Rights Reserved.
#
# This file is part of hubspot-contacts
# <https://github.com/2degrees/hubspot-contacts>, which is subject to the
# provisions of the BSD at
# <http://dev.2degreesnetwork.com... |
from django.template.defaultfilters import truncatewords
from django.utils.html import strip_tags
from docutils import nodes
def extract_title(document):
"""Return the title of the document.
:param document:
:type document: :class:`docutils.nodes.document`
"""
for node in document.traverse(nodes... |
from __future__ import annotations
from dataclasses import dataclass
from dataclasses import field
from typing import List
from typing import Optional
from typing import TYPE_CHECKING
from sqlalchemy import Column
from sqlalchemy import ForeignKey
from sqlalchemy import Integer
from sqlalchemy import select
from sqla... |
/**
* Pipedrive API v1
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* ... |
# -*- coding: utf-8 -*-
# This code is part of Ansible, but is an independent component
# This particular file snippet, and this file snippet only, is BSD licensed.
# Modules you write using this snippet, which is embedded dynamically by Ansible
# still belong to the author of the module, and may assign their own lic... |
#Ex.11
hora = str(input('Insira o valor hora (HH:MM): ')).split(':')
min = int(hora[1])
min += int(hora[0]) * 60
print(f'Passaram-se {min} minutos desde as 00:00h.')
|
#ifndef VOXBLOX_BLOCK_HASH_H_
#define VOXBLOX_BLOCK_HASH_H_
#include <functional>
#include <unordered_map>
#include <Eigen/Core>
#include "voxblox/core/common.h"
namespace voxblox {
struct BlockIndexHash {
static constexpr size_t prime1 = 73856093;
static constexpr size_t prime2 = 19349663;
static constexpr ... |
# 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 u... |