text stringlengths 3 1.05M |
|---|
export const CHAT_SEND_REQUEST = 'CHAT_SEND_REQUEST'
export const CHAT_SEND_SUCCESS = 'CHAT_SEND_SUCCESS'
export const CHAT_SEND_FAILED = 'CHAT_SEND_FAILED'
export const CHAT_RECEIVED = 'CHAT_RECEIVED'
export const SERVER_EMIT_MESSAGE = 'SERVER_EMIT_MESSAGE'
export const CLIENT_WEB_EMIT_MESSAGE = 'WEB-CLIENT-SEND::CL... |
/*
* angular-simple-autocomplete-directive
* (c) 2016 Alex Neamtu
* License: MIT
*/
var autocompleteTmpl = require('./templates/autocomplete.html');
class controller {
constructor($scope, $sce) {
this.$scope = $scope;
this.$sce = $sce;
$scope.selected = -1;
$scope.selectOption... |
import React from "react"
import Markdown from "react-markdown"
import ButtonLink from "../elements/button-link"
import { getButtonAppearance } from "@/utils/button"
import { GatsbyImage, getImage } from "gatsby-plugin-image"
import { useStaticQuery, graphql } from "gatsby"
import { BgImage } from "gbimage-bridge"
impo... |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# The MIT License (MIT)
#
# Copyright (c) 2015 Bartosz Janda
#
# 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 w... |
"""Load processed spending data from the data cache."""
from typing import Literal
import pandas as pd
from pydantic import validate_arguments
from . import DATA_DIR
CACHE_DIR = DATA_DIR / "processed" / "spending"
__all__ = ["load_budgeted_department_spending", "load_actual_department_spending"]
@validate_argume... |
const electron = require('electron');
const is = require('electron-is');
class Notifier {
constructor () {
this.activeNotifications = [];
this.notificationBaseHeight = 80;
this.lineHeight = 17; // derived from the css
this.queue = [];
// workAreaSize automatically discounts start bar
// set t... |
(function () {
'use strict';
angular.module('app.stack')
.config(route);
/* @ngInject */
function route($stateProvider, $urlRouterProvider) {
//warning: otherwise(url) will be redirect loop on state with errored resolve
$urlRouterProvider.otherwise(function($injector) {
... |
/*
* This header is generated by classdump-dyld 1.5
* on Wednesday, April 28, 2021 at 9:04:41 PM Mountain Standard Time
* Operating System: Version 14.5 (Build 18L204)
* Image Source: /System/Library/PrivateFrameworks/PhotoLibra... |
from brownie import (
network,
accounts,
config,
interface,
LinkToken,
MockV3Aggregator,
MockWETH,
MockDAI,
Contract,
)
INITIAL_PRICE_FEED_VALUE = 2000000000000000000000
DECIMALS = 18
NON_FORKED_LOCAL_BLOCKCHAIN_ENVIRONMENTS = ["hardhat", "development", "ganache"]
LOCAL_BLOCKCHAIN_... |
import axios from 'axios'
const apiClient = axios.create({
// for external server call
baseURL: 'https://my-json-server.typicode.com/emma-martin/real-world-vue3',
// uncomment this for posting events and working locally
// baseURL: 'http://localhost:3000',
withCredentials: false,
headers: {
Accept: 'app... |
/* Parse expressions for GDB.
Copyright 1986, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
1997, 1998, 1999, 2000, 2001, 2004, 2005 Free Software Foundation, Inc.
Modified from expread.y by the Department of Computer Science at the
State University of New York at Buffalo, 1991.
This file is part of... |
# -*- coding: utf-8 -*-
"""
implicit version of dependency cache from ibeis/templates/template_generator
"""
from __future__ import absolute_import, division, print_function, unicode_literals
import utool as ut
import numpy as np
import six
from six.moves import zip
from dtool_ibeis import sql_control
from dtool_ibeis ... |
# Copyright 2013 OpenStack Foundation
# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... |
# Copyright (c) 2012 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.
{
'includes': [
'icu.gypi',
],
'variables': {
'use_system_icu%': 0,
'icu_use_data_file_flag%': 0,
'want_separate_host_toolset%': 1,... |
#!/usr/bin/env python
"""
Business logic for request # 1.
Enji Cooper, October 2013
"""
def req1(**kwargs):
print('kwargs is', kwargs)
return kwargs
|
const fs = require('fs')
const path = require('path')
const GLB = require('../lib/glb')
const GLBParser = require('../lib/glb-parser')
const GLBWriter = require('../lib/glb-writer')
const readline = require('readline')
const encoderModule = require('draco3d').createEncoderModule({})
const opts = require('command-line-... |
import os
import sys
import pytest
def pytest_addoption(parser):
parser.addoption(
"--run-integration-tests", action="store_true", help=("Run integration tests.")
)
if sys.gettrace():
@pytest.fixture(autouse=True)
def restore_tracing():
"""Restore tracing function (when run with Co... |
module.exports=require('../../decode-ranges.js')('4Krgf') |
const path = require('path')
module.exports.createPages = async ({ graphql, actions}) => {
const { createPage } = actions
const blogTemplate = path.resolve('./src/templates/blog.js')
const res = await graphql(`
query {
allContentfulProjectPost {
edges {
... |
var fs = require('fs')
var parseTorrentFile = require('../')
var test = require('tape')
var leavesUrlList = fs.readFileSync(__dirname + '/torrents/leaves-empty-url-list.torrent')
test('parse empty url-list', function (t) {
var torrent = parseTorrentFile(leavesUrlList)
t.deepEqual(torrent.urlList, [])
t.end()
})... |
"""
Django settings for geobit project.
Generated by 'django-admin startproject' using Django 3.2.8.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
from pathlib ... |
import argparse
import logging
from logging.handlers import RotatingFileHandler
from os import sys, path
from flasgger import Swagger
from flask import Flask, request
from flask.json import jsonify
sys.path.append(path.dirname(path.dirname(path.abspath(__file__))))
from agent_core import AgentCore
app = Flask(__nam... |
# Software License Agreement (BSD License)
#
# Copyright (c) 2019, Zerong Zheng (zzr18@mails.tsinghua.edu.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 of source code mus... |
"""
Find all security groups, that are not used
"""
import configparser
config = configparser.ConfigParser()
config.read('..\config.ini')
from TM1py.Services import TM1Service
with TM1Service(**config['tm1srv01']) as tm1:
# Get all groups
all_groups = tm1.security.get_all_groups()
# Determine the used gr... |
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
function globToRegExp(glob) {
// * [^\\\/]*
// /**/ /.+/
// ^* \./.+ (concord special)
// ? [^\\\/]
// [!...] [^...]
// [^...] [^...]
// / [\\\/]
// {...,...} (...|...)
// ?(...|...) (...|...)?
/... |
/*-
* Copyright (c) 2014-2015 MongoDB, Inc.
* Copyright (c) 2008-2014 WiredTiger, Inc.
* All rights reserved.
*
* See the file LICENSE for redistribution information.
*/
#include "wt_internal.h"
/*
* WT_BTREE_CURSOR_SAVE_AND_RESTORE
* Save the cursor's key/value data/size fields, call an underlying btree
* f... |
/*!
JSZip - A Javascript class for generating and reading zip files
<http://stuartk.com/jszip>
(c) 2009-2014 Stuart Knightley <stuart [at] stuartk.com>
Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/master/LICENSE.markdown.
JSZip uses the library pako released under the MIT licen... |
import MakeGroupAdminButton from './MakeGroupAdminButton';
export default MakeGroupAdminButton;
|
//>>built
define("dojox/grid/enhanced/plugins/Printer", [
"dojo/_base/declare",
"dojo/_base/html",
"dojo/_base/Deferred",
"dojo/_base/lang",
"dojo/_base/sniff",
"dojo/_base/xhr",
"dojo/_base/array",
"dojo/query",
"dojo/DeferredList",
"../_Plugin",
"../../EnhancedGrid",
"./exporter/TableWriter"
], function(... |
/* Copyright (c) 2011, Code Aurora Forum. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope th... |
define(['ojs/ojcore', 'knockout', 'jquery', 'ojs/ojknockout', 'ojs/ojtable', 'ojs/ojpagingcontrol', 'ojs/ojpagingtabledatasource', 'ojs/ojarraytabledatasource'],
function(oj, ko, $)
{
function viewModel()
{
var self = this;
var deptArray = [
{MasterId: 10015, MasterName: 'ADFPM 1001 neverendi... |
import {HtmlElement, Checkbox, TextField, Text} from 'cx/widgets';
import {Md} from '../../components/Md';
import {CodeSplit} from '../../components/CodeSplit';
import {CodeSnippet} from '../../components/CodeSnippet';
import {ConfigTable} from '../../components/ConfigTable';
export const GettingStarted = <cx>
<M... |
# -*- coding: utf-8 -*-
import argparse
import logging
import logging.handlers
import os
import webbrowser
import tornado.ioloop
import tornado.web
import api.chat
import api.main
import config
import models.avatar
import models.database
import models.translate
import update
logger = logging.getLogger(__name__)
BA... |
/*
* easy-autocomplete
* jQuery plugin for autocompletion
*
* @author Łukasz Pawełczak (http://github.com/pawelczak)
* @version 1.3.5
* Copyright License:
*/
var EasyAutocomplete = function(a){return a.Configuration = function(a){function b(){if ("xml" === a.dataType && (a.getValue || (a.getValue = function(... |
#ifndef INC_NMEA_H
#define INC_NMEA_H
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
/* NMEA sentence types */
typedef enum {
NMEA_UNKNOWN,
NMEA_GPGGA,
NMEA_GPGLL,
NMEA_GPRMC,
NMEA_GPGSV
} nmea_t;
/* NMEA cardinal direction types */
typedef char nmea_cardinal_t;
#define NMEA_CARDINAL_DIR_NORTH ... |
// @flow
import React from 'react';
import {observable} from 'mobx';
import {shallow} from 'enzyme';
import {ResourceStore, userStore} from 'sulu-admin-bundle/stores';
import {fieldTypeDefaultProps} from 'sulu-admin-bundle/utils/TestHelper';
import {FormInspector, ResourceFormStore} from 'sulu-admin-bundle/containers';... |
define("ace/snippets/csp",["require","exports","module"], function(require, exports, module) {
"use strict";
exports.snippetText =undefined;
exports.scope = "";
});
|
#-*-coding:utf8 -*-
import os
import time
import cmd_tools
from config import ConfigParse
import log_utils
import manifest_utils
import my_utils
import zip_utils
from pack_exception import PackException
import pack_exception
import file_utils
import env
from time import sleep
class PackManager(o... |
/********************
* String formatter
********************/
/**
* @param {string} string
* @returns {string}
*/
const snakeCaseCap = (string) => {
return string
.replace(/\W+/g, ' ')
.split(/ |\B(?=[A-Z0-9])/)
.map((word) => word.toUpperCase())
.join('_');
};
/********************
* User Inp... |
class GoogleMapsUrlHelper {
static getAddress(node) {
if (node.address && node.address.address) return node.address.address
return null
}
static getLocation(node = null) {
if (node == null) {
return {
lat: 63.4305149,
lng: 10.3950528,
}
}
if (node.latLong && node.l... |
# -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-09-14 23:05
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('tournament', '0094_season_playoffs'),
]
operations = [
migrations.AlterField(
model_name='season',
... |
var fs = require("fs"),
{ FFmpeg } = require("../index");
// open input stream
var infs = fs.createReaurlream(__dirname + "/test/assets/testvideo-43.avi");
infs.on("error", function(err) {
console.log(err);
});
// create new ffmpeg processor instance using input stream
// instead of file path (can be any Readabl... |
""" Holds GoogleConnection class.
This module provides the interface to Google Trends via the GoogleConnection class.
Interacts with GT's time series widget via the :func:`get_timeseries` method,
related queries via :func:`get_related_queries`.
"""
import json
import datetime
from typing import Dict, List, Tuple, Uni... |
def hex_spiral(first, second):
DIRS = ((0, -1, 1), (-1, 0, 1), (-1, 1, 0), (0, 1, -1), (1, 0, -1), (1, -1, 0))
tiles = {1: (0, 0, 0), 2: (0, -1, 1)}
loc = (0, -1, 1)
lvl = 1
dir_index = 2
maxval = max(first, second)
for val in range(3, maxval+1):
nextloc = tuple(p+d for p, d in zip(l... |
"""
Copyright Astronomer, 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 to in writing, software
di... |
class Register():
def __init__(self, value=0):
self.value = value
# def __get__(self, instance, owner):
# return instance.value
# def __set__(self, instance, new_value):
# instance.value = new_value
# def __add__(self, value):
# return self.value + value
# def __i... |
# Copyright 2020-2021 Cambridge Quantum Computing
#
# 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 a... |
import _extends from "@babel/runtime/helpers/esm/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
import React from 'react';
import clsx from 'clsx';
import PropTypes from 'prop-types';
import TreeViewContext from './TreeViewContext';
import { withStyles } f... |
#!/usr/bin/env python3
import csv
import string
import sys
instructions = []
with open('data.txt', 'r') as file:
reader = csv.reader(file)
for row in reader:
by_space = row[0].split()
instructions.append([by_space[0], by_space[-1]])
memory = dict()
mask0 = 0
mask1 = 0
mask = "" # for part 2 on... |
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Refl... |
###
# Copyright (c) 2016, 2017 Diamond Light Source Ltd.
#
# Contributors:
# Gary Yendell - initial API and implementation and/or initial documentation
# Charles Mita - initial API and implementation and/or initial documentation
#
###
import math as m
from annotypes import Anno, Union, Array, Sequence
from sca... |
# coding=utf8
import argparse
import sys
from .treecat import tree
def main():
parser = argparse.ArgumentParser()
parser.add_argument('path', nargs='*')
parser.add_argument('-s', '--summary', action='store_true')
parser.add_argument('-L', '--max-lines', type=int)
parser.add_argument('-W', '--max-... |
// Copyright (c) 2012 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_CHROMEOS_MEMORY_LOW_MEMORY_OBSERVER_H_
#define CHROME_BROWSER_CHROMEOS_MEMORY_LOW_MEMORY_OBSERVER_H_
#include "base/memory/ref... |
# -*- coding: utf-8 -*-
"""
Functions to measure the synchrony of several spike trains.
Synchrony Measures
------------------
.. autosummary::
:toctree: _toctree/spike_train_synchrony/
spike_contrast
Synchrotool
:copyright: Copyright 2014-2022 by the Elephant team, see `doc/authors.rst`.
:license: Mod... |
'use strict';
var Conekta = require('conekta');
var jwt = require('jsonwebtoken');
var User = require('../../../models/User');
module.exports = function(router) {
router.post('/', function(req, res) {
var authKey = req.headers['x-access-token'];
var indexCard = req.body.indexcard;
var indexAddress = req... |
const Post = require('../models/post');
module.exports = {
create,
deleteLike
}
async function create(req, res) {
try {
const post = await Post.findById(req.params.id);
post.likes.push({ username: req.user.username, userId: req.user._id }); //mutating a document
await post.save()/... |
import Ngular from "ngular-metal/core";
import {dasherize} from "ngular-runtime/system/string";
QUnit.module('NgularStringUtils.dasherize');
if (!Ngular.EXTEND_PROTOTYPES && !Ngular.EXTEND_PROTOTYPES.String) {
QUnit.test("String.prototype.dasherize is not modified without EXTEND_PROTOTYPES", function() {
ok("un... |
#!/usr/bin/python
########################################################################################################################
#
# Copyright (c) 2014, Regents of the University of California
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permi... |
from io import BytesIO
from typing import DefaultDict, List, Set, Tuple
from arabic_reshaper import reshape as reshape_rtl_text
from bidi.algorithm import get_display as bidi_display
from PIL import Image, ImageDraw
from codenames.duet.game import GameMixin, Team, Identity, BOARD_SIZE
from codenames.resources.fonts i... |
import matplotlib.pyplot as plt
ax1 = None
tnode_style = dict(boxstyle="round4", fc="1") # 定义判断节点形态
leafNode = dict(boxstyle="round4", fc="1") # 定义叶节点形态
arrow_args = dict(arrowstyle="-") # 定义箭头
plt.interactive(True)
def draw_text_node(x, y, text):
ax1.text(x, y, text, va="center", ha="left", wrap=True, bbox... |
/**
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
* Licensed under the LGPL or a commercial license.
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.0 (2019-10-17)
*/
!(function(o) {
"use strict";
va... |
module.exports = {
"branches": ["master", "next", "beta", "alpha"],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"@semantic-release/npm",
[
"@semantic-release/git",
{
"assets": [
"packa... |
##
# File: EcodClassificationProviderTests.py
# Date: 23-Jun-2021 JDW
#
# Updates:
#
##
"""
Test cases for operations that read ECOD classification data from flat files -
"""
import logging
import os
import time
import unittest
from rcsb.utils.struct import __version__
from rcsb.utils.struct.EcodClassification... |
/**
* @fileoverview Ensure that each import in the file is correctly ordered relative to the others
* @author Maël Nison
* @copyright 2016 Maël Nison. All rights reserved.
* See LICENSE file in root directory for full license.
*/
"use strict";
const fs = require("fs");
const path = require("path");
//-----------... |
function cleanPrefix(input) {
return input != null ? fn.string(input).replace(".", "") : null;
}
module.exports = {
cleanPrefix
};
|
// Generated from condition.g4 by ANTLR 4.7.1
// jshint ignore: start
var antlr4 = require('antlr4/index');
// This class defines a complete generic visitor for a parse tree produced by conditionParser.
function conditionVisitor() {
antlr4.tree.ParseTreeVisitor.call(this);
return this;
}
conditionVisitor.prototype... |
const express = require("express");
const helmet = require("helmet");
const contentLength = require("express-content-length-validator");
const path = require("path");
const fs = require("fs");
const requestIp = require("request-ip");
const port = 8080;
const terminalDir = path.join(__dirname, "public", "terminals");
c... |
mycallback( {"ELECTION CODE": "N2012", "EXPENDITURE PURPOSE DESCRIP": "Contributions to Federal Candidate", "BENEFICIARY CANDIDATE OFFICE": "", "PAYEE ZIP": "160450476", "MEMO CODE": "", "PAYEE STATE": "PA", "PAYEE LAST NAME": "", "PAYEE CITY": "Lyndora", "PAYEE SUFFIX": "", "CONDUIT STREET 2": "", "CONDUIT STREET 1": ... |
from .keyboard import Keyboard
class Sound:
"""
Class Sound
:author: Paradoxis <luke@paradoxis.nl>
:description:
Allows you control the Windows volume
The first time a sound method is called, the system volume is fully reset.
This triggers sound and mute tracking.
"""
# Current v... |
/*
* This file and its contents are licensed under the Apache License 2.0.
* Please see the included NOTICE for copyright information and
* LICENSE-APACHE for a copy of the license.
*/
#include <postgres.h>
#include <nodes/pathnodes.h>
#include <utils/builtins.h>
#include <utils/guc.h>
#include <utils/varlena.h>
#i... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Aug 23 21:12:35 2019
@author: tbury
Test for eval_recon function
"""
import pytest
import numpy as np
import pandas as pd
# Import ewstools
from ewstools import core
from ewstools import helpers
# Simulate a simple multi-variate time series
tVals... |
#!/usr/bin/env python
import os
import sys
import math
import numpy as np
import random
####------------
Replicas = int(sys.argv[1])
Cycle = int(sys.argv[2])
def TemperatureExchange(Replicas):
exchangeList = range(Replicas)
#random.shuffle(exchangeList)
#####Read the mdinfo files######
Temp = 0.0
... |
import React from 'react'
import PropTypes from 'prop-types'
import PreviewCompatibleImage from '../elements/media/PreviewCompatibleImage'
const FeatureGrid = ({ gridItems }) => (
<div className="columns is-multiline">
{gridItems.map((item) => (
<div key={item.text} className="column is-6">
<sectio... |
import { dew as _baseLtDewDew } from "./_baseLt.dew.js";
import { dew as _createRelationalOperationDewDew } from "./_createRelationalOperation.dew.js";
var exports = {},
_dewExec = false;
export function dew() {
if (_dewExec) return exports;
_dewExec = true;
var baseLt = _baseLtDewDew(),
createRelation... |
var crypto = require('crypto');
function CoreMotionStartStepCountingArgs(__SLAG_PROPERTIES) {
__SLAG_PROPERTIES = __SLAG_PROPERTIES || {};
var __SLAG_DEVICE = JSON.parse(process.env.SLAG_DEVICE);
var __SLAG_CHECKS = [], __SLAG_NAMES = [
'stepCounts',
'id'
];
if (__SLAG_NAMES.length > 0 && process.env.SLAG_S... |
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models
class ResConfigSettings(models.TransientModel):
_inherit = 'res.config.settings'
group_expiry_date_on_delivery_slip = fields.Boolean("Display Expiration Dates on Delivery S... |
import {
defaultFont,
primaryColor,
infoColor,
successColor,
warningColor,
dangerColor,
grayColor,
} from "src/assets/jss/material-dashboard-react.js";
const typographyStyle = {
defaultFontStyle: {
...defaultFont,
fontSize: "14px",
},
defaultHeaderMargins: {
marginTop: "20px",
margi... |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.apps import AppConfig
class ChinookApiConfig(AppConfig):
name = 'chinookapi'
|
/**
*
* Leetcode 最优解
*/
var oddEvenList = function(head) {
if(head === null)
return head;
let h1 = null, // odd head
p1 = null, // odd node
p = head,
t = null;
while(p.next && p.next.next) {
t = p.next.next;
if(h1 === null) {
h1 = p.next;
p1 = h1;
} else {
p1.next = p.next;
... |
import io
import logging
import os
import warnings
import zipfile
from datetime import datetime
import numpy as np
import pandas as pd
import requests
from sklearn.preprocessing import StandardScaler
logger = logging.getLogger('log')
NAME = 'uci'
SAMPLES_PER_DAY = 96
FREQ = 'H'
TARGET = 'Global_active_power'
DATETIM... |
##############################################################################
#
# Copyright (c) 2001, 2002 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# TH... |
import subprocess
import sys
import os
import socket
import re
import argparse
# Created By: EH
# Educational purpose only
# I'm not responsible for your actions
def clear_console():
if sys.platform == "win32":
os.system("cls")
else:
print("This script works on windows")
... |
#! /usr/bin/env python3
name = input("Enter the name: ")
fobj = open(name)
print(fobj.read())
fobj.close()
|
#!/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.
from data_preprocessing import CLIMATE_VARS
from data_preprocessing.sample_quadruplets import generate_training_for_coun... |
// import { fromJS } from 'immutable';
// import { selectMlabelpageDomain } from '../selectors';
describe('selectMlabelpageDomain', () => {
it('Expect to have unit tests specified', () => {
expect(true).toEqual(false);
});
});
|
import copy
import math
import random
class Node:
"""
Data structure to keep track of our search
"""
def __init__(self, state, parent=None):
self.visits = 1
self.reward = 0.0
self.state = state
self.children = []
self.children_move = []
self.parent = pa... |
// @flow
import { ActionSheetIOS } from 'react-native';
export interface ActionSheet {
show(options: Array<any>): Promise<string> ;
}
export default class ActionSheetNative implements ActionSheet {
show(options: Array<any>): Promise<string> {
return new Promise((resolve) => {
ActionSheetIOS.showActionS... |
def download(bbox, timeframe, beam, earthdata_uid, email):
import os
from icepyx import icesat2data as ipd
from icepyx import core
import readers as rd
short_name = ATL03 '''fill in with name of whichever DataSet this is a member function of'''
region.ipd.Icesat2Data(short_name, ... |
// Copyright 2020 The Fuchsia 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 SRC_DEVELOPER_DEBUG_DEBUG_AGENT_ZIRCON_PROCESS_HANDLE_H_
#define SRC_DEVELOPER_DEBUG_DEBUG_AGENT_ZIRCON_PROCESS_HANDLE_H_
#include "src/developer/... |
#!/usr/bin/env python3
# GraphMaker.py -- Python 3 script to scan files for @@graph tags and process
# the related JSON objects to generate GraphViz input files.
# Copyright (c) 2020-2021 James Kottas. All rights reserved.
import argparse
import glob
import json
import os
import re
import sys
# Module ... |
/**
******************************************************************************
* @file USB_Host/MSC_Standalone/Src/main.c
* @author MCD Application Team
* @brief USB host Mass storage demo main file
******************************************************************************
* @attention
*
*... |
/*****************************************************************************
* *
* OpenNI 2.x Alpha *
* Copyright (C) 2012 PrimeSense Ltd. *
* ... |
/**
* Created by fight on 2019/3/4.
*/
const webpack = require('webpack')
const merge = require('webpack-merge')
const basewebpackConfig = require('./package.config')
const ExtractTestPlugin = require('extract-text-webpack-plugin')
const extractScss = new ExtractTestPlugin('/autumn.min.css')
module.export = merge(b... |
"""
.. module: dispatch.plugins.dispatch_pagerduty.plugin
:platform: Unix
:copyright: (c) 2019 by Netflix Inc., see AUTHORS for more
:license: Apache, see LICENSE for more details.
"""
import logging
from dispatch.decorators import apply, counter, timer
from dispatch.plugins import kandbox_data_generator a... |
""" Architect controls architecture of cell by computing gradients of alphas """
import copy
import os
import random
import numpy as np
import torch
import genotypes
from visualize import plot
class Architect():
""" Compute gradients of alphas """
def __init__(self, net, w_momentum, w_weight_decay):
... |
import pandas as pd
from tqdm import tqdm
import collections
import json
import random
import re
import fnmatch
import string
import bert
from bert import modeling, tokenization
from bert_utils import InputFeatures, model_fn_builder, input_fn_builder
import tensorflow as tf
tf.set_random_seed(17)
class GAPNormalizer(... |
import { combineReducers } from "redux";
import auth from "./auth";
import main from "./main";
const reducer = combineReducers({
auth: auth,
main: main,
});
export default reducer;
|
# Copyright 2016 The TensorFlow 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... |
const reducer = (state, action) => {
switch (action.type) {
case 'ADD_PROJECT':
return {
...state,
jobs: [...state.projects, action.payload]
}
case 'SWITCH_MENU':
return {
...state,
menuIsVisble: wind... |
# Copyright 2014 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 agr... |