text stringlengths 3 1.05M |
|---|
/*
* sdbm Copyright (c) 1991 by Ozan S. Yigit
*
* Modifications to use memory mapped files to enable multiple concurrent
* users:
* Copyright (c) 1996 by Larry McVoy, lm@sgi.com.
* Copyright (c) 1996 by John Schimmel, jes@sgi.com.
* Copyright (c) 1996 by Andrew Chang, awc@sgi.com.
*
* Ported to NT WIN32 enviro... |
# Kivy
from kivy.lang import Builder
from kivy.properties import StringProperty
# KivyMD
from kivymd.app import MDApp
from kivymd.uix.boxlayout import MDBoxLayout
from kivymd.uix.tab import MDTabsBase
from kivymd.uix.list import ThreeLineAvatarIconListItem
from kivymd.uix.button import MDFlatButton
from kivymd.uix.dia... |
/*
* msoft.c
*
* Rewritten by Archie Cobbs <archie@freebsd.org>
* Copyright (c) 1998-1999 Whistle Communications, Inc. All rights reserved.
* See ``COPYRIGHT.whistle''
*/
#include "ppp.h"
#include "msoft.h"
#include <openssl/sha.h>
#include <openssl/md4.h>
#include <openssl/des.h>
/*
* This stuff is described... |
# Copyright 2018 The glTF-Blender-IO authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... |
# Program to generate a test case (adjacency matrix) for Prim's and Krukal's algorithms
# The graph generated will be connected.
from random import shuffle, sample, randint
import sys
def read():
nfverts = int(input("Number of vertices: "))
density = int(input("Density (Medium 1, High 2 or Complete 3): "))
limit =... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
from code import Code
def parsePrivitiveSettings(filename):
""" 組み込み関数の設定ファイルを読み込む """
ret = {}
f = open(filename, "r")
for line in f:
line = line.strip()
line = re.sub(r'//.+', '', line) # コメントを削除
if len(line.strip()) == 0:
# コメント行
continue
p... |
#!/usr/bin/env python3
# Copyright (c) 2019 The Fujicoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.test_framework import FujicoinTestFramework
class TestShell:
"""Wrapper Class for Fu... |
// THIS FILE IS AUTO GENERATED
import { GenIcon } from '../lib';
export function GiFrogFoot (props) {
return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 512 512"},"child":[{"tag":"path","attr":{"d":"M324.3 34.79c-25.7 0-46.5 27.02-46.5 60.36 0 20.05 7.7 38.85 20.6 50.05 5.6 81.2-4.7 152.3-53.6 160.1-60.2 6.2-73.2-68.... |
import psycopg2
import sqlite3
from dotenv import load_dotenv
import os
load_dotenv()
DB_NAME = os.getenv("DB_NAME", default="OOPS")
DB_USER = os.getenv("DB_USER", default="OOPS")
DB_PW = os.getenv("DB_PW", default="OOPS")
DB_HOST = os.getenv("DB_HOST", default="OOPS")
pg_conn = psycopg2.connect(
dbname=DB_NAME,... |
/**
* @author jszeto
* @date 2/20/13
*
* Subclass of SelectMultipleItems. This is a specialized subclass for dealing with Data Model Objects.
*
*/
define(
[
'underscore',
'models/services/datamodel/DataModel',
'views/data_model_editor/form_components/SelectMultipleItems',
'modu... |
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
long_desc = '''
This package contains the googlemaps Sphinx extension.
This extension enable you to embed maps using `Google Maps`_ .
Following code is sample::
.. googlemaps:: Shibuya Station
.. _Google Maps: http://maps.google.com/
'''
requ... |
#! coding:utf-8
from sqlalchemy import Column, Integer, MetaData, String, Table,\
bindparam, exc, func, insert, select, column
from sqlalchemy.dialects import mysql, postgresql
from sqlalchemy.engine import default
from sqlalchemy.testing import AssertsCompiledSQL,\
assert_raises_message, fixtures
class _Ins... |
var app = angular.module('plaasApp');
app.factory('WebService',function($http){
return {
get:function(url){
return $http({
method:"POST",
url : SITE_URL+url,
headers:{'X-Requested-With':'XMLHttpRequest',
'Content-Type': 'ap... |
//fetch video data from youtube api
import React, { useState, useEffect } from "react";
import "./youtube.css";
const API = "AIzaSyDIIxAoo1kzmw0N4kXr8srjX6S6ElNW9bY";
const channelId = "UCCejg-zx3R3OXFItvJxVvoA";
const maxResults = 1;
const finalUrl = `https://www.googleapis.com/youtube/v3/search?key=${API}&channelId=... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
#
# Copyright © 2018 Dell Inc. or its subsidiaries. All rights reserved.
# Dell, EMC, and other trademarks are trademarks of Dell Inc. or its subsidiaries.
# Other trademarks may be trademarks of their respective owners.
#
# Licensed under the Apache License, Ver... |
import sys
sys.path.append('datasets/DOTA_devkit')
import argparse
import train
import test
import eval
from datasets.dataset_dota import DOTA
from datasets.dataset_hrsc import HRSC
from models import ctrbox_net
import decoder
import os
def parse_args():
parser = argparse.ArgumentParser(description='BBAVectors Im... |
from config import general
def printProgressBar(
iteration,
total,
decimals=0,
length=10,
fill="#",
printEnd="\n",
):
"""
Calls in a loop to create terminal progress bar.
Args:
iteration (int): Current iteration
total (int): Total iterations (Int)
prefix (... |
var Flickr = require('flickr-sdk');
var flickr = new Flickr(process.env.Flickr_API);
function getRandomInt(min, max) {
min = Math.ceil(min);
max = Math.floor(max);
return Math.floor(Math.random() * (max - min)) + min; //The maximum is exclusive and the minimum is inclusive
}
function getRandomImage(photos, p... |
// Copyright (C) 2015 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 14.5.15
description: >
Function `name` attribute not inferred in presence of static `name` method
info: |
ClassDeclaration : class BindingIdentifier ClassTail
... |
sap.ui.define([
"sap/ui/model/json/JSONModel",
"sap/ui/core/ResizeHandler",
"sap/ui/core/mvc/Controller",
"sap/f/FlexibleColumnLayout"
], function (JSONModel, ResizeHandler, Controller, FlexibleColumnLayout) {
"use strict";
return Controller.extend("sap.f.FlexibleColumnLayoutWithFullscreenPage.controller.Flexibl... |
int addition(int a, int b)
{
int sum;
sum = a+b;
return sum;
}
int main() {
return addition(2, 3);
//return 0;
} |
#!/usr/bin/env python
# encoding: utf-8
#
# Copyright (c) 2008 Doug Hellmann All rights reserved.
#
"""Using thread names in logs
"""
#end_pymotw_header
import logging
import threading
import time
logging.basicConfig(
level=logging.DEBUG,
format='[%(levelname)s] (%(threadName)-10s) %(message)s',
)
def wo... |
/* !!!! GENERATED FILE - DO NOT EDIT !!!!
* --------------------------------------
*
* This file is part of liblcf. Copyright (c) 2020 liblcf authors.
* https://github.com/EasyRPG/liblcf - https://easyrpg.org
*
* liblcf is Free/Libre Open Source Software, released under the MIT License.
* For the full copyright ... |
from django.test import TestCase
from django.urls import reverse
from .StaticFunctions import create_question
class QuestionDetailViewTests(TestCase):
def test_future_question(self):
"""
The detail view of a question with a pub_date in the future returns a 404 not found.
"""
futur... |
VERSION = (0, 8, 0, 'alpha', 1)
def get_version():
version = '%s.%s' % (VERSION[0], VERSION[1])
if VERSION[2]:
version = '%s.%s' % (version, VERSION[2])
if VERSION[3:] == ('alpha', 0):
version = '%s pre-alpha' % version
else:
if VERSION[3] != 'final':
version = '%s %... |
#include <stdio.h>
#include <stdlib.h>
struct list
{
int data;
struct list *next;
};
struct list *start, *end;
void add(struct list **head, struct list **tail, int theData)
{
if (*tail==NULL) {
*head = *tail = (struct list *)malloc(sizeof(struct list));
(*head)->data = theData;... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = isInvalid;
/**
* 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.
*
*
*/
/**
* Return... |
"""
Regression tests for defer() / only() behavior.
"""
from django.db import models
class Item(models.Model):
name = models.CharField(max_length=15)
text = models.TextField(default="xyzzy")
value = models.IntegerField()
other_value = models.IntegerField(default=0)
def __unicode__(self):
... |
var { QRLLIBmodule } = require('qrllib/build/offline-libjsqrl');
var QRLNodeJSTools = require('./functions.js');
const a = new Uint8Array(48); // NB NOT random here for testing purposes as in Python example
QRLNodeJSTools.waitForQRLLIB(async _ => {
try {
const WOTSParamW = 4
// create XmssBasic object
... |
#include "nndata.h"
#pragma once
double gaussianRandom(double average, double stdev);
double xavier(int input, int output);
double initialize(int method, int input, int output);
double normalize(unsigned char val);
double standardize(double val);
double sigmoid(double val);
double softmax(double val, double sum);... |
#!/usr/bin/env python3
'''
kicad-footprint-generator 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.
kicad-footprint-generator is distribut... |
from typing import Optional, Union
from pathlib import Path
from git import Repo
class GitHelper:
def __init__(self) -> None:
self._default_init_message = "TFW starter initialized"
@staticmethod
def _add_and_commit(
repo: Repo, message: str, author_name: str, author_email: str
) -> No... |
/**
* Flatlogic Dashboards (https://flatlogic.com/admin-dashboards)
*
* Copyright © 2015-present Flatlogic, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import path from 'path';
import chokidar from... |
import json
import subprocess
from datetime import datetime
from io import BytesIO, TextIOWrapper
import pytest
from hypothesis import given
from hypothesis import strategies as st
from isort import main
from isort._version import __version__
from isort.exceptions import InvalidSettingsPath
from isort.settings import... |
// moment.js Morocco Central Atlas Tamaziɣt (tzm) tests
// author : Abdel Said : https://github.com/abdelsaid
var moment = require("../../moment");
exports["lang:tzm"] = {
setUp : function (cb) {
moment.lang('tzm');
cb();
},
tearDown : function (cb) {
moment.lang('en');
cb... |
from flask import Flask, request
from flask_restful import Api
import logging
logging.basicConfig(level=logging.INFO)
app = Flask(__name__)
api = Api(app)
@app.route('/')
def home():
return "Welcome", 200
from .api import SnapApi
api.add_resource(SnapApi, '/api/snap/<string:_id>')
if __name__ == '__main__':
... |
from cores import *
print('.-'*20)
print(f'{cores["azul"]}Analisador de triângulos{limpar} ', end='')
print('\U0001F53A')
print('.-'*20)
r1 = float(input('Primeiro segmento: '))
r2 = float(input('Segundo segmento: '))
r3 = float(input('Terceiro segmento: '))
if r1 < r2 + r3 and r2 < r1 + r3 and r3 < r1 + r2:
print(... |
import React, {useState, useEffect, useContext } from 'react'
import Fom from '../../svg/fom.svg'
import { navigate } from 'gatsby'
import { sha256, sha224 } from 'js-sha256';
import { Form, Button, Tabs, Tab, Modal, OverlayTrigger, Tooltip } from 'react-bootstrap'
import { Input } from 'reactstrap'
import Tips from '.... |
# Copyright 2020 The Cirq Developers
#
# 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 ... |
/*
* (c) Copyright IBM Corp. 2021
* (c) Copyright Instana Inc. and contributors 2020
*/
'use strict';
const path = require('path');
const { expect } = require('chai');
const { fail } = expect;
const semver = require('semver');
const constants = require('@instana/core').tracing.constants;
const supportedVersion = ... |
//Requires
const modulename = 'AdminVault';
const fs = require('fs-extra');
const cloneDeep = require('lodash/cloneDeep');
const { dir, log, logOk, logWarn, logError } = require('../../extras/console')(modulename);
const CitizenFXProvider = require('./providers/CitizenFX');
//Helpers
const migrateProviderIdentifiers =... |
import random
# Used to merge the two halves.
def merge(ar,l,r):
a=b=c=0
while a<len(l) and b<len(r):
if l[a] < r[b]:
ar[c] = l[a]
a+=1
else:
ar[c] = r[b]
b+=1
c+=1
while a < len(l):
ar[c] = l[a]
c+=1
a+=1
while b < len(r):
ar[c] = r[b]
c+=1
b+=1
# Recursively dividies array until siz... |
import sqlite3
class RobotSqliteDatabase:
def __init__(self):
self._connection = None
def connect_to_database(self, db_file_path):
self._connection = sqlite3.connect(db_file_path)
def close_connection(self):
self._connection.close()
def row_count_is_equal_to(self, count, db... |
# Cache metaclass for optimized memory
class ElementConstructor(type):
def __new__(mcs, name, classes, fields):
def delete(self):
key = self.__getattribute__(self._primary_key)
if key in self._cache:
del self._cache[key]
@classmethod
def clear_cache(c... |
from compas_fea.cad import rhino
from compas_fea.structure import CircularSection
from compas_fea.structure import ElasticIsotropic
from compas_fea.structure import ElementProperties as Properties
from compas_fea.structure import GeneralDisplacement
from compas_fea.structure import GeneralStep
from compas_fea.s... |
# optimizer
optimizer = dict(type='SGD', lr=0.02, momentum=0.9, weight_decay=0.0001)
# optimizer = dict(type='Adam', lr=0.002,betas=(0.9, 0.99), eps=1e-08, weight_decay=0.00001)
optimizer_config = dict(grad_clip=None)
# learning policy
# lr_config = dict(
# policy='CosineAnnealing',
# warmup='linear',
# war... |
from flask import Flask
import os
from portfolio.bundles import js, css, assets
from portfolio.views import main
def create_app(config=None):
app = Flask(__name__)
app.config['DEBUG'] = True
app.config['LESS_BIN'] = os.path.realpath(os.path.join(os.path.dirname(__file__), '../node_modules/less/bin/lessc... |
from regression_tests import *
class Test(Test):
settings=TestSettings(
input=[
'x86-pe-38ffdd8526b8410583219f3cf298c13b',
'x86-pe-43f2453fee2432955b2953088814f341'
]
)
def test_decompiles_successfully(self):
assert self.decompiler.succeeded
|
"""Generate test data for users."""
import factory
from tdpservice.stts.test.factories import STTFactory
class BaseUserFactory(factory.django.DjangoModelFactory):
"""Generate test data for users."""
class Meta:
"""Hardcoded metata data for users."""
model = "users.User"
django_get_... |
// ------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
// ------------------------------------------------------------
#pragma once
namespace Reliab... |
/**
* Copyright (c) 2017 - 2019, Nordic Semiconductor ASA
*
* 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, th... |
#include <stdio.h>
int main()
{
int sign = 1;
double deno = 2.0,sum = 1.0,term;
while(deno <= 100)
{
sign = -sign;
sum += sign/deno;
deno++;
}
printf("%f\n",sum);
return 0;
}
|
// 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 app... |
from enum import Enum
class Orientation(Enum):
"""
Orientation Class as an enumeration for all four orientations (NORTH, EAST, SOUTH, WEST)
The name of the enum member is identical to the string provided by the user.
The value of the enum member represents the direction of movement, relative to coordi... |
const path = require('path')
const crypto = require('crypto')
const mime = require('mime-types')
const autoBind = require('auto-bind')
const EventEmitter = require('events')
const camelCase = require('camelcase')
const pathToRegexp = require('path-to-regexp')
const slugify = require('@sindresorhus/slugify')
const { NOD... |
import unittest
import mock
from rime.plugins import htmlify_full
from rime.util import struct
class TestHtmlifyProject(unittest.TestCase):
def test_do_clean(self):
ui = mock.MagicMock()
ui.options = struct.Struct({'skip_clean': False})
project = htmlify_full.Project('project', 'base_dir... |
from app import app, db
from flask import jsonify, make_response
import json
from app.models.item import Item
@app.route('/item/<int:id>/JSON')
def itemJSON(id):
"""Returns JSON data on an item corresponding to the ID in the URL.
"""
item = Item.query.get(id)
if item:
return jsonify(Item=item.... |
from data import CITIES, BUSINESSES, USERS, REVIEWS, TIPS, CHECKINS
import random
import json
import pandas as pd
import numpy as np
from pathlib import Path
# HELPERS
def create_similarity_matrix_categories(matrix):
"""Create a """
npu = matrix.values
m1 = npu @ npu.T
diag = np.diag(m1)
m2 = m1... |
/*
* Copyright (c) 1999 - 2001, Artur Merke <artur.merke@udo.edu>
*
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 must retain the above copyright
notice, t... |
import os
import sys
import numpy as np
import cv2
from PIL import Image
import matplotlib.pyplot as plt
from kitti.kitti_object import kitti_object, kitti_object_video
import kitti.kitti_util as utils
def get_lidar_in_image_fov(pc_velo, calib, xmin, ymin, xmax, ymax,
return_more=False, cl... |
import random
from datetime import datetime
import json
imgurCharacters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
def get_imgur_url():
imgur_url = "http://i.imgur.com/"
ext = ".jpg"
code = ""
limit = random.choice([5,6,7])
for _ in range(0, limit):
code += random.ch... |
# coding: utf-8
from __future__ import unicode_literals, print_function
from scrapy.spiders.crawl import CrawlSpider
from scrapy.spiders import Rule
from crawler import settings
from crawler.linkextractors import NextLinkExtractor
class BaseSpider(CrawlSpider):
name = None
custom_settings = {}
def __in... |
# Author: Christian Brodbeck <christianbrodbeck@nyu.edu>
#
# Key constants for Datasets
INTERPOLATE_CHANNELS = "interpolate_channels"
|
/**
* Works in RENDERER
*/
class IModal{
width = 350;//min width
height = 250;//min height
name;
data;
/**
* @type {string[]}
*/
responseEvents = [];
constructor(name, data) {
this.name = name;
this.data = data;
}
open(){
api.send('modal:open',{... |
"""
Django settings for rmvid19 project.
Generated by 'django-admin startproject' using Django 3.1.3.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
import os
fr... |
function hidesugg() {
document.getElementById("search").style.borderRadius = "100px";
document.getElementById("suggestions").style.display = "none"
}
function showsugg() {
document.getElementById("search").style.borderRadius = "25px 25px 0 0";
document.getElementById("suggestions").style.display = "inherit"
}
... |
/* $Id: sfsops.c 435 2004-06-02 15:46:36Z max $ */
/*
*
* Copyright (C) 1999 David Mazieres (dm@uun.org)
* Copyright (C) 2000 Kevin Fu (fubob@mit.edu)
*
* 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 Softwa... |
// # Task automation for Ghost
//
// Run various tasks when developing for and working with Ghost.
//
// **Usage instructions:** can be found in the [Custom Tasks](#custom%20tasks) section or by running `grunt --help`.
//
// **Debug tip:** If you have any problems with any Grunt tasks, try running them with the `--verb... |
import styled from 'styled-components';
import SliderBcgk from 'assets/illustrations/slider-bckg.webp';
export const Wrapper = styled.div`
padding: 6rem 0 3rem 0;
`;
export const TanuloinkWrapper = styled.div`
display: grid;
grid-gap: 1rem;
background-image: url(${SliderBcgk});
background-size: cover;
b... |
"""
eZmax API Definition (Full)
This API expose all the functionnalities for the eZmax and eZsign applications. # noqa: E501
The version of the OpenAPI document: 1.1.7
Contact: support-api@ezmax.ca
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401... |
# Lint as: python3
# Copyright 2017 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 ... |
import os
import pytest
import sqlalchemy as sa
from sqlalchemy_continuum.dialects.postgresql import (
drop_trigger,
sync_trigger
)
from tests import (
get_dns_from_driver,
get_driver_name,
QueryPool,
uses_native_versioning
)
@pytest.mark.skipif('not uses_native_versioning()')
class TestTrig... |
"use strict";
exports.BottomPocket = exports.BottomPocketPropsType = exports.BottomPocketProps = exports.viewFunction = void 0;
var _inferno = require("inferno");
var _vdom = require("@devextreme/vdom");
var _load_indicator = require("../load_indicator");
var _type = require("../../../core/utils/type");
var _cons... |
"""Copyright 2020 ETH Zurich, Seonwook Park
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distr... |
// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
// OffscreenCanvas test in a worker:2d.fillStyle.parse.invalid.rgba-5
// Description:
// Note:
importScripts("/resources/testharness.js");
importScripts("/html/canvas/resources/canvas-tests.js");
var t = async_test("");
var t_pass = t.done... |
// Copyright (c) 2012 Ecma International. All rights reserved.
// Ecma International makes this code available under the terms and conditions set
// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
// "Use Terms"). Any redistribution of this code must retain the above
// copyright and this n... |
# -*- coding: utf-8 -*-
##
# \file paumond_facade.py
# \title Study of an acoustic impulse in half street (sidewalk+facade).
# \author Pierre Chobeau
# \version 0.1
# \license BSD 3-Clause License
# \inst UMRAE (Ifsttar Nantes), LAUM (Le Mans Université)
# \date 2018, 15 Jan.
##
import numpy as np
im... |
import csv
import random
import requests
import sys
import time
def read_csv(filename):
with open(filename) as csvfile:
reader = csv.reader(csvfile, delimiter="\t")
for row in reader:
yield row
index = 0
# Scrape words at indices from [second arg, third arg]
for item, url in read_cs... |
# Generated by Django 3.0.7 on 2020-11-25 11:39
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0092_auto_20201120_0921'),
]
operations = [
migrations.AddField(
model_name='entitydbstradingcertificate',
n... |
#!/usr/bin/env python
#coding:utf-8
# Purpose: insert block references with appended attributes
# Created: 11.04.2010
# Copyright (C) 2010, Manfred Moitzi
# License: MIT License
"""
Provides the Insert2 composite-entity.
Insert a new block-reference with auto-creating of attribs from attdefs,
and setting attrib-text b... |
var io = require('socket.io').listen(8000);
var main = io.of('').on('connection', function(socket) {
socket.on('message', function(data, fn) {
if (fn) { // Client expects a callback
if (data) {
fn(data);
} else {
fn();
}
} else if (typeof data === 'object') {
socket.j... |
import typing
import cmath
class FFT():
def __butterfly(
self,
) -> typing.NoReturn:
n = self.__n
a = self.__a
b = 1
sign = -1 + 2 * self.__inv
while b < n:
for j in range(b):
w = cmath.rect(1., sign * cmath.pi / b * j)
k = 0
while k < n:
s, t = ... |
/*!
* froala_editor v2.7.6 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/
* Copyright 2014-2018 Froala Labs
*/
(function (factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['jquery'], factory)... |
/* File: ctrl_undo_redo_list_test.c; Copyright and License: see below */
#include "ctrl_undo_redo_list_test.h"
#include "ctrl_controller.h"
#include "ctrl_classifier_controller.h"
#include "ctrl_multi_step_changer.h"
#include "storage/data_database.h"
#include "storage/data_database_reader.h"
#include "test_assert.h"
... |
"""Copyright (c) 2010-2012 David Rio Vierra
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 DISCLAIMS ALL WA... |
#!/usr/bin/env python
"""
Purpose:
Handling pacbio isoseq
"""
import sharedinfo
import re
import focalintersect
from pyfaidx import Fasta
import pysam
from collections import Counter
from sharedinfo import exist_file, get_lines
def summarize_polyA(fasta):
""" summarize polyA type AAAAAAAAA or TTTTTTTTTT or o... |
// TODO IN FUTURE USE LIFTBRIDGE FOR DURABILITY
module.exports = require("./nats");
|
import React, { forwardRef } from 'react';
import PropTypes from 'prop-types';
const FreedesktopDotOrg = forwardRef(function FreedesktopDotOrg(
{ color = 'currentColor', size = 24, title = 'freedesktop-dot-org', ...others },
ref
) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width={size}
... |
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2016 The Hashtagcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef HASHTAGCOIN_STREAMS_H
#define HASHTAGCOIN_STREAMS_H
#include "suppor... |
from setuptools import setup, find_packages
setup(name="anipy", version=0.1, packages=find_packages()) |
from django import forms
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
from django.contrib.auth.forms import ReadOnlyPasswordHashField
from django.contrib.auth.models import Group
from django.core.exceptions import ValidationError
from .models import MyUser
class U... |
import React from "react";
import { makeStyles } from "@material-ui/core/styles";
import { Grid, Box, Typography } from "@material-ui/core";
const useStyles = makeStyles({
root: {
margin: 0,
padding: 0,
boxSizing: "border-box",
minHeight: "50vh",
flexFlow: 1,
display: "flex",
justifyConte... |
# This file is part of Buildbot. Buildbot 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, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without eve... |
var placesList;
function addGEOJsonCode() {
openGEOJSON();
appendOutputText('Added the selected geojson file to map.');
}
function findPositionCode() {
var placeName = getValueFromDomElement("findPosInput");
findPosition(placeName);
}
function addMarkerCode() {
addMarkerArray(placesList);
ap... |
# -*- coding: utf-8 -*-
from chibi.atlas import Chibi_atlas, Atlas
from subprocess import Popen, PIPE
import json
import itertools
import logging
__author__ = """dem4ply"""
__email__ = 'dem4ply@gmail.com'
__version__ = '0.4.1'
logger = logging.getLogger( 'chibi.command' )
class Command_result:
def __init__( sel... |
#!/usr/bin/env python
#
# The MIT License (MIT)
# Copyright (c) 2015 Zhichao Wang
# 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 right... |
var searchData=
[
['registration_1394',['Registration',['../class_updatable_attorney_1_1_registration.html',1,'UpdatableAttorney::Registration'],['../class_alarmable_attorney_1_1_registration.html',1,'AlarmableAttorney::Registration'],['../class_collidable_attorney_1_1_registration.html',1,'CollidableAttorney::Regist... |
import os
import numpy as np
from gwpopulation.conversions import mu_chi_var_chi_max_to_alpha_beta_max
from gwpopulation.utils import beta_dist, powerlaw
from gwpopulation.cupy_utils import trapz, xp
from gwpopulation.models.mass import (
two_component_primary_mass_ratio,
two_component_single,
)
from gwpopula... |
#!python
from linkedlist import LinkedList
# Implement LinkedStack below, then change the assignment at the bottom
# to use this Stack implementation to verify it passes all tests
class LinkedStack(object): # LIFO - do it with tail
def __init__(self, iterable=None):
"""Initialize this stack and push the... |
const boom = require('boom')
const { getPaginationParams } = require('../../lib/pagination')
const <%= schema.class_name %> = require('./<%= schema.identifier %>.model')
<%- include('./partials/controller-dependencies.js') -%>
// // // //
<%_ if (schema.identifier === 'user') { _%>
<%- include('./partials/controller-... |