text stringlengths 3 1.05M |
|---|
# Generated by Django 3.1.5 on 2021-01-22 21:58
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('likes', '0003_auto_20210122_2137'),
]
operations... |
module.exports = {
env: {
test: {
presets: [['@babel/preset-env', { targets: { browsers: ['last 2 chrome versions'] } }]],
},
},
};
|
var $ = jQuery;
$(window).load(function() {
$('.product-slider, .single-product__slider').flexslider({
animation: "fade",
//slideshowSpeed: 7000,
animationSpeed: 600,
animationLoop: false,
pauseOnAction: false,
controlNav: true,
rtl: true,
customDirec... |
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CollisionAutomationTests.generated.h"
/**
* Container for detailing collision automated test data.
*/
USTRUCT()
struct FCollisionTestEntry
{
GENERATED_USTRUCT_BODY()
UPROPERTY()
FString RootShapeAsset;
UPROPERTY()
FString Sh... |
#!/usr/bin/env python
#
# Copyright 2007 Google 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 o... |
import React, {useState} from "react";
import "./style.css";
import TimeContainer from "@y0c/react-datepicker/lib/components/TimeContainer";
import "./calendar.scss";
import "../../../../../styles/modal.css";
import DatePicker from "@y0c/react-datepicker/lib/components/DatePicker";
import {useDispatch} from "react-redu... |
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import json
import os
class jsonf(object):
__k_encoding = "utf-8"
@staticmethod
def save_s(obj)-> str:
json_str = json.dumps(obj, sort_keys=False, ensure_ascii=False, indent=4, separators=(",", ": "))
return json_str
@staticm... |
import React from 'react';
import Screen2Data from './screen2.data';
import Screen2Logic from './screen2.logic';
import Screen2Style from './screen2.style';
// prettier-ignore
const Screen2 = () => (
// fill in here
);
export default Screen2;
|
import pymongo
client = pymongo.MongoClient("localhost", 27017)
def collection_example_reactions_smilesonly():
db = client['reaction_examples']
collection = db['lowe_1976-2013_USPTOgrants']
return collection
def collection_example_reactions_details():
db = client['reaction_examples']
collection = db['low... |
import sys
import textwrap
from optparse import Values
from typing import List
from pip._internal.cli.base_command import Command
from pip._internal.cli.status_codes import SUCCESS
from pip._internal.utils.misc import get_prog
BASE_COMPLETION = """
# pip {shell} completion start{script}# pip {shell} completion end
""... |
// Copyright 2020 Michael Rodriguez
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice appear in all copies.
//
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIM... |
// MIT License
// Copyright (C) August 2016 Hotride
#pragma once
#include <stdint.h>
#include "GLEngine/GLTexture.h" // REMOVE
#include "GLEngine/GLFrameBuffer.h" // REMOVE
#include <common/str.h> // REMOVE
#include "Point.h"
#include "Constants.h"
#include <xuocore/enumlist.h>
#define IS_MOBILE(seri... |
import React from "react"
const SectionWrapper = ({ children, bg }) => {
return <div className={`py-8 px-6 ${bg}`}>{children}</div>
}
export default SectionWrapper
|
import posixpath
import urllib
import urlparse
import httplib2
from slumber import exceptions
from slumber.serialize import Serializer
__all__ = ["Resource", "API"]
def url_join(base, *args):
"""
Helper function to join an arbitrary number of url segments together.
"""
scheme, netloc, path, query, ... |
/* eslint-disable no-undef */
import { searchPost } from '../../src/actions';
import actionTypes from '../../src/actions/actionTypes';
import mockData from '../__mocks__/mockData';
const setup = () => {
const { fetchRecipesResponse } = mockData;
return {
searchType: 'category',
searchTerm: 'specials',
... |
var pieChart;
var Radial; //the visible line of the radial inspection - the heading for which areaChart shows data
var plot_hdg_timeout; //holeds the time out command if failed
var min_terrain_elevation = 0; //all elevation below this value would turn to 0.
var no_of_samples_Graph = 100; //number of samples for t... |
# coding: utf-8
import hmac
import hashlib
def sign (message):
utf_8 = message.encode ('utf-8')
API_SECRET = "secret"
digest = hmac.new(
API_SECRET,
msg=utf_8,
digestmod=hashlib.sha256
).hexdigest().upper()
print utf_8, '=', digest
sign (u'€ 100')
sign ('one\ntwo\nthree')
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE129_Improper_Validation_Of_Array_Index__fgets_char_52a.c
Label Definition File: CWE129_Improper_Validation_Of_Array_Index.label.xml
Template File: sources-sinks-52a.tmpl.c
*/
/*
* @description
* CWE: 129 Improper Validation of Array Index
* BadSource: fgets Re... |
module.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.... |
from direct.directnotify import DirectNotifyGlobal
from direct.distributed.DistributedObject import DistributedObject
from panda3d.core import *
from toontown.building import ToonInteriorColors
from toontown.hood import ZoneUtil
from toontown.toonbase.ToonBaseGlobal import *
from toontown.toonbase.ToontownGlobals impor... |
import nltk
import sklearn_crfsuite
from sklearn_crfsuite import metrics
import pandas as pd
from sklearn.preprocessing import label_binarize
import string
# nltk.download('conll2002')
flatten = lambda l: [item for sublist in l for item in sublist]
print(__doc__)
import numpy as np
import matplotlib.pyplot as plt
fr... |
/*
* 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... |
eta=0.7
rneighb=eta
|
class Var:
def __init__(self, type_, name, is_const=False, undef=False):
self.type = type_
self.name = name
self.is_const = is_const
self.undef = undef
|
import React from 'react';
import 'react-toastify/dist/ReactToastify.css';
import { BrowserRouter } from 'react-router-dom';
import { ToastContainer } from 'react-toastify';
import { Provider } from 'react-redux';
import store from './store';
import Routes from './routes';
import Header from './components/Header';
c... |
from __future__ import annotations
from typing import Optional
import attr
import pytest
from kubernetes.client import ApiClient, Configuration
from openshift.dynamic import DynamicClient
from committime import CommitMetric
from committime.collector_github import GitHubCommitCollector
def setup_collector():
ku... |
# Script for preparing MERRA-2 reanalysis data:
# 1. Calculate effective wind speeds from u and v wind speeds in two heights (10 and 50m)
# 2. Calculate alpha friction coefficient
from paths_nz import mer_path
import glob
import numpy as np
import os
import xarray as xr
files = glob.glob(mer_path+'/*.nc')
files.sort(... |
from .menu import Menu
from .urls import Urls, COUNTRY_USA
from .utils import request_json
class Store(object):
"""The interface to the Store API
You can use this to find store information about stores near an
address, or to find the closest store to an address.
"""
def __init__(self, data={}, ... |
import os
TEST_FILE = "assets/Chase6010_Activity_20200318.CSV"
def seed_chase_checking(engine):
from loaders import ChaseCheckingLoader
dirname = os.path.dirname(__file__)
filename = os.path.join(dirname, TEST_FILE)
loader = ChaseCheckingLoader(filename, engine)
loader.load()
|
import asyncio
from collections import namedtuple
from discord import Embed, Reaction, NotFound
from Util import MessageUtils
Option = namedtuple("Option", "emoji text handler")
async def ask(ctx, text, options, timeout=60):
embed = Embed(color=0x68a910, description='\n'.join(f"{option.emoji} {option.text}" for... |
"""This example demonstrates the usage of HyperOpt with Ray Tune.
It also checks that it is usable with a separate scheduler.
"""
import time
import ray
from ray import tune
from ray.tune.suggest import ConcurrencyLimiter
from ray.tune.schedulers import AsyncHyperBandScheduler
from ray.tune.suggest.hyperopt import Hy... |
# coding=utf-8
# Copyright 2018-2020 EVA
#
# 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 ... |
from infrastructure.cqrs.decorators.requestclass import requestclass
@requestclass
class LookupConnectorTypeRequest:
# TODO:Request attributes
pass
|
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
const core = require('./core-1c31ee1f.js');
const config = require('./config-03608b68.js');
const helpers = require('./helpers-5c4a2267.js');
const theme = require('./theme-bb3a6213.js');
const Searchbar = class {
constructor(hostRef) {... |
from __future__ import unicode_literals
from django.db import models
from django.test import TestCase
from .models import (
First, Third, Parent, Child, ToFieldChild, Category, Record, Relation, Car, Driver)
class ManyToOneRegressionTests(TestCase):
def test_object_creation(self):
Third.objects.crea... |
import { all, takeLatest } from 'redux-saga/effects';
import { LOCATION_CHANGE } from 'connected-react-router';
import accountSagas from './account';
import accountsSagas from './accounts';
import adminSagas from './admin';
import adminIngressSagas from './adminIngress';
import adminRestoreSagas from './adminRestore';... |
import React, { useState, useCallback } from 'react'
import Layout from "../components/layout"
import SEO from "../components/seo"
import Gallery from "react-photo-gallery";
import Carousel, { Modal, ModalGateway } from "react-images";
import { photos } from "../data/photos";
import '../styles/photogallery.css'
import ... |
import re
s = 'aaa@xxx.com, bbb@yyy.com, ccc@zzz.net'
m = re.match(r'[a-z]+@[a-z]+\.com', s)
print(m)
# <re.Match object; span=(0, 11), match='aaa@xxx.com'>
m = re.match(r'[a-z]+@[a-z]+\.net', s)
print(m)
# None
s = 'aaa@xxx.com, bbb@yyy.com, ccc@zzz.net'
m = re.search(r'[a-z]+@[a-z]+\.net', s)
print(m)
# <re.Matc... |
export default from './LoginForm'; |
import React, { useCallback } from 'react';
import { Provider as Provider$1, connect, useDispatch, useSelector, shallowEqual } from 'react-redux';
import { combineReducers, createStore, applyMiddleware, bindActionCreators } from 'redux';
import thunk from 'redux-thunk';
function _typeof(obj) {
"@babel/helpers - type... |
const DELAY = 500;
const {writeFile, unlink} = require('fs');
const {execSync, spawnSync} = require('child_process');
const noInclude = !/\s--includei?\s/.test(spawnSync('inotifywait', ['-h']).output[1]);
const expectedError = err => console.error('expected error');
const INotifyWait = require('../cjs');
const cle... |
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/**
* Appearing of "continue" within a function call that is within an IterationStatement yields SyntaxError
*
* @path ch12/12.7/S12.7_A6.js
* @description Using labaled "continue Ide... |
/**
* Find Anagram Mappings
*
* Given two lists Aand B, and B is an anagram of A.
* B is an anagram of A means B is made by randomizing the order of the elements in A.
*
* We want to find an index mapping P, from A to B. A mapping P[i] = j means the ith element in A appears in B at index j.
*
* These lists A an... |
# run the script in mainnet-fork only
# brownie run scripts/stake.py --network mainnet-fork
from brownie import Contract, accounts, interface
from brownie_tokens import MintableForkToken
def main():
dai_addr = "0x6B175474E89094C44Da98b954EedeAC495271d0F"
usdc_addr = "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48... |
const utils = require('../../../utils/index.js')
const children = [
// '/java/java_base/test1',
// '/java/java_base/test2'
]
children_reflect = [
['/java/javabase/2019-10-31-反射.md', '反射']
]
children_interface = [
['/java/javabase/2020-6-7-接口.md', '接口基础']
]
children_proxy = [
['/java/javabase/2020... |
# Copyright 2022 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
from django.db import connection
from django.contrib import admin
from .models import Platform
@admin.register(Platform)
class TenantAdmin(admin.ModelAdmin):
list_display = ('name', 'schema_name', 'domain_url')
def get_queryset(self, request):
schema_name = connection.schema_name
if schema... |
import better_exceptions
import click
from titlecase import titlecase
from prompt_toolkit import prompt
from tinydb import Query
from lilyskel.info import Composer
from lilyskel.exceptions import MutopiaError
from lilyskel import db_interface
from lilyskel.interface.common import *
@click.group()
@click.option("-p"... |
# Copyright (c) 2014 Red Hat, 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 require... |
//
// SignUpUserInfoModel.h
// Sttarter
//
// Created by Prajna Shetty on 07/12/16.
// Copyright © 2016 Spurtree. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "JSONModel.h"
@protocol SignUpUserInfoModel @end
@interface SignUpUserInfoModel : JSONModel
@property(strong,nonatomic)NSString *st... |
import click
from cwm_worker_tests import common_cli
from cwm_worker_tests import load_generator_custom
@click.group(short_help="Load generation based on custom Python multi-threaded implementation")
def custom():
"""Load generation based on custom Python multi-threaded implementation"""
pass
custom.add_co... |
"use strict";
exports.__esModule = true;
exports.default = void 0;
var _helperPluginUtils = require("@babel/helper-plugin-utils");
var _helperFunctionName = _interopRequireDefault(require("@babel/helper-function-name"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getPalette = void 0;
const material_1 = require("./dark/foreground/material");
const mix_1 = require("./dark/foreground/mix");
const original_1 = require("./dark/foreground/original");
const hard_1 = require("./dark/background/hard");
... |
import gzip
import json
import argparse
if __name__ == '__main__':
parser = argparse.ArgumentParser(
description='Turn json.gz data to json data.')
parser.add_argument('--input', type=str,
help='the path to input file')
parser.add_argument('--output', type=str,
... |
const client = require("../../../../config/redis/client");
const ReviewUserLikeRepository = require("../../../../../domain/ReviewUserLikeRepository");
const sortedSet = require("../../../../config/redis/sortedSet");
module.exports = class extends ReviewUserLikeRepository {
constructor() {
super();
}
async p... |
#!/usr/bin/env python
# Copyright 2019, Kay Hayen, mailto:kay.hayen@gmail.com
#
# Python tests originally created or extracted from other peoples work. The
# parts were too small to be protected.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except i... |
/**
* Answer to Advent of Code, day 3 Challenge
* http://adventofcode.com/day/3
* Part 2
*/
var fs = require('fs'),
filename = "input.txt",
houseMap = {};
fs.readFile(filename, 'utf8', function(err, data) {
if (err) throw err;
var position = {
santa: { x: 0, y: 0},
robo_santa: { x: 0, y: 0}
... |
# Copyright (C) 2016 Brad Spengler
#
# This program 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) any later version.
#
# This program is distributed in ... |
//
// SPDX-FileCopyrightText: 2020 SAP SE or an SAP affiliate company and Gardener contributors
//
// SPDX-License-Identifier: Apache-2.0
//
'use strict'
const fs = require('fs')
const path = require('path')
const _ = require('lodash')
const { promisify } = require('util')
const readFile = promisify(fs.readFile)
cons... |
from __future__ import division
# This module is used by the PHENIX GUI to manage file objects and associated
# phil parameters.
# TODO better tests! major functionality is tested as part of the handlers
# specific to HKL/PDB formats, but not every method yet
from iotbx import file_reader
from libtbx.utils import h... |
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const HtmlWebpackPlugin = require("html-webpack-plugin");
module.exports = {
entry: {
app: [
"./src/index.jsx",
"./src/index.css"
]
},
resolve: {
extensions: [".js", ".jsx"]
},
module: {
rules: [{
test: /\.(js|jsx)$/,
exclude: ... |
"""
Codemonk link: https://www.hackerearth.com/practice/data-structures/queues/basics-of-queues/practice-problems/algorithm/monk-and-power-of-time-3a648bf0/
There are N processes to be completed by you, the chosen one, since you're Monk's favorite student. All the processes
have a unique number assigned to them from 1... |
import AsyncStorage from '@react-native-community/async-storage';
import { Platform } from 'react-native';
import { AppStorage, LegacyWallet, SegwitBech32Wallet, SegwitP2SHWallet } from '../class';
const bitcoin = require('fujicoinjs-lib');
const ElectrumClient = require('electrum-client');
const reverse = require('buf... |
from detector import *
from os import listdir
from sys import stdout
fix_gpu_memory_growth()
model = load_model()
validation_entries = []
for lang in listdir(VALIDATION_SET_DIR):
with open(join_path(VALIDATION_SET_DIR, lang), 'r') as f:
sentences = f.read().split('\n')
for sentence in sentences:
... |
import os
from shutil import copyfile
from urllib.request import urlretrieve
import zipfile
def download_dataset(path, path_old,
url='http://cs231n.stanford.edu/tiny-imagenet-200.zip'):
# if not os.path.exists(path):
# os.mkdir(path)
urlretrieve(url, path_old + '/tiny-imagenet-200... |
#
# Copyright (C) [2020] Futurewei Technologies, Inc.
#
# FORCE-RISCV is 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
#
# THIS SOFTWARE IS PR... |
const mongoose = require('mongoose');
const logs = require('./logs');
const conf_map = require('./url');
const config = require('./config');
const mongo_db = conf_map.get("db_url");
const db = mongoose.connection;
mongoose.connect(mongo_db, { useNewUrlParser: true, useUnifiedTopology: true});
db.on('error'... |
import textwrap
import warnings
from itertools import product
from operator import add
import pytest
import numpy as np
import pandas as pd
import pandas.util.testing as tm
from pandas.io.formats import format as pandas_format
import dask
import dask.array as da
import dask.dataframe as dd
from dask.base import compu... |
'''\
This extension facilitates login via third party authentication providers
using either the OAuth1 or OAuth2_ protocol.
In addition, it allows the use of the Open Graph Protocol (OGP_) for social
graphs and twitter cards and additional APIs a provider may have
(google analytics, google map for example).
Usage
===... |
#! /usr/bin/env python
from gpiozero import LED, Button
from time import sleep
import os
import cv2
from gaze_tracking import GazeTracking
button = Button(22)
leftM1 = LED(5)
leftM2 = LED(6)
rightM1 = LED(26)
rightM2 = LED(13)
gaze = GazeTracking()
webcam = cv2.VideoCapture(0)
counter = 0
prevText = ""
print("Program... |
import DS from 'ember-data';
import { Serializer } from 'ember-flexberry-data';
export default Serializer.Offline.extend(DS.EmbeddedRecordsMixin, {
attrs: {
suggestion: { serialize: 'id', deserialize: 'records' },
},
});
|
/**
* Provides modality support for Widgets, though an extension
*
* @module widget-modality
*/
var WIDGET = 'widget',
RENDER_UI = 'renderUI',
BIND_UI = 'bindUI',
SYNC_UI = 'syncUI',
BOUNDING_BOX = 'boundingBox',
VISIBLE = 'visible',
Z_INDEX = 'zIndex',
CHAN... |
#pragma once
#include "../Event.h"
class KeyboardEvent : public Event {
public:
KeyboardEvent(std::string name, bool down)
{
keyName = name;
isDown = down;
}
std::string keyName;
bool isDown;
};
|
# -*- coding: utf-8 -*-
import pytest
from okcupyd import settings
from okcupyd.session import Session
from okcupyd.errors import AuthenticationError
from . import util
@util.use_cassette(path='session_success')
def test_session_success():
Session.login()
@util.use_cassette(path='session_failure')
def test_ses... |
// SPDX-License-Identifier: BSD-3-Clause
//
// Copyright(c) 2018 Intel Corporation. All rights reserved.
//
// Author: Jakub Dabek <jakub.dabek@linux.intel.com>
#include <stdint.h>
#include <sof/audio/component.h>
#include <sof/audio/pipeline.h>
#include <sof/schedule/edf_schedule.h>
#include "pipeline_mocks.h"
#inclu... |
# 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 use ... |
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const Explorer_1 = __importDefault(require("../../Actions/Explorer"));
const ApiError_1 = __importDefaul... |
// @flow
import color from 'color'
import { Platform, Dimensions, PixelRatio } from 'react-native'
const deviceHeight = Dimensions.get('window').height
const deviceWidth = Dimensions.get('window').width
const platform = Platform.OS
const platformStyle = 'material'
const isIphoneX =
platform === 'ios' && (deviceHei... |
""" Client App """
import os
from flask import Blueprint, render_template
client_bp = Blueprint('client_app', __name__,
url_prefix='',
static_url_path='',
static_folder='./vue_app/dist',
template_folder='./vue_app/dist',
... |
from django.core.management.base import BaseCommand
class Command(BaseCommand):
help = "Say hello."
args = ""
output_transaction = True
def handle(self, *args, **options):
return "Hello!"
|
OWNED = [(0, 1, 2, 3, 4, 5), (6, 7, 8, 9, 10, 11)]
def _counterclockwise(after, count):
"""Counts off `count` houses, in a counter-clockwise cycle of twelve.
The first value returned is the house one step counter-clockwise
from the `after` house.
If the loop makes it all the way back to `after`, it ... |
import os
import logging
import wdm
def update_env_with_env_files():
"""
Overrides the function default args with the flags found in the environment variables files
"""
for env in ".wdm_env", ".wdm_env.generated":
try:
with open(env) as f:
for line in f.readlines():
... |
# 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 may ... |
#!/usr/bin/python
import os
import json
import re
from libpacloud.config import DB_DIR, USE
PACKAGE_DIR = lambda pkg_name: '{}{}'.format(DB_DIR, pkg_name)
METADATA_FILE = lambda pkg_name: '{}/metadata.json'.format(PACKAGE_DIR(pkg_name))
def list_packages():
list = []
for folder in os.listdir(DB_DIR):
... |
# Copyright (c) 2021, Aerele Technologies Private Limited and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class ManufactureItems(Document):
pass
|
from .indirect2 import AbstractToto
class ConcreteToto(AbstractToto):
def machin(self):
return self.helper()*2
|
var d3_time = d3.time = {},
d3_date = Date;
function d3_date_utc() {
this._ = new Date(arguments.length > 1
? Date.UTC.apply(this, arguments)
: arguments[0]);
}
d3_date_utc.prototype = {
getDate: function() { return this._.getUTCDate(); },
getDay: function() { return this._.getUTCDay(... |
const express =require('express');
const router = express.Router();
const db=require("../config/db");
router.post('/',function(req, res){
const vehicleNo=req.body.vehicleNo;
const vehicleType=req.body.vehicleType;
const paymentMethod=req.body.paymentMethod;
const CustomerID=req.body.CustomerID;
... |
from sklearn2sql_heroku.tests.classification import generic as class_gen
class_gen.test_model("GradientBoostingClassifier" , "BinaryClass_500" , "mssql")
|
/*
* Copyright 2012 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 applica... |
# For loading the mat data
from pre_process import load_data, select_features
# For calculatuons
import numpy as np
# Import the kNN library
from sklearn import neighbors
# For voting and weighting
from process import weight, vote
# Import post process analysing methods
from sklearn.preprocessing import normalize
from ... |
from .utils import *
from .core import AutoCracker
from .state import StrState,CharState
from .actions import *
|
/* ******************************************************************
* huff0 huffman decoder,
* part of Finite State Entropy library
* Copyright (c) 2013-2020, Yann Collet, Facebook, Inc.
*
* You can contact the author at :
* - FSE+HUF source repository : https://github.com/Cyan4973/FiniteStateEntropy
*
* Th... |
##
## This file is part of the libsigrokdecode project.
##
## Copyright (C) 2012-2014 Uwe Hermann <uwe@hermann-uwe.de>
##
## This program 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 2 of t... |
import os
import pytest
from powerdata_download import download, query
def test_download_query(tmpdir, download_kw):
url = query.build_query_url(**download_kw)
entry = query.get_entry(url)
local_filename = download.download_entry(entry, download_dir=tmpdir)
assert os.path.exists(local_filename)
def ... |
"use strict";
module.exports = {
initQuery: require('../methods/init-query'),
resetQuery: require('../methods/reset-query'),
initCustomFilters: require('../methods/init-custom-filters'),
initOptions: require('../methods/init-options'),
sortableClass: require('../methods/sortable-class'),
sortableChevronCla... |
"""
This is the custom function interface.
You should not implement it, or speculate about its implementation
class CustomFunction:
# Returns f(x, y) for any given positive integers x and y.
# Note that f(x, y) is increasing with respect to both x and y.
# i.e. f(x, y) < f(x + 1, y), f(x, ... |
"""
Make us a package please!
"""
from zoop._version import __version__
from zoop import exceptions
from zoop.client import ZooKeeper
from zoop.enums import Event
from zoop.lock import Lock
from zoop.logutils import divert_zoolog
from zoop.queue import Queue
from zoop.tree import Tree
__all__ = [
'exceptions',
... |
module.exports = function () {
// eslint-disable-next-line max-len,quotes
return '<symbol viewbox="0 0 14 14" id="icon-star-undefined-small"><path d="M11.375 13.988a.876.876 0 01-.446-.123L7 11.515l-3.929 2.35a.876.876 0 01-1.321-.926l.796-3.986L.175 5.77a.873.873 0 01.7-1.398h3.78L6.186.553a.875.875 0 011.628 ... |
from django.db import models
from wagtail.admin.edit_handlers import FieldPanel
from wagtail.contrib.settings.models import BaseSetting, register_setting
@register_setting
class SocialMediaSettings(BaseSetting):
instagram = models.URLField(max_length=100, blank=True)
panels = [
FieldPanel("instagram"... |