content stringlengths 10 4.9M |
|---|
def is_subsection_of(self, axis):
ret = True
ret = ret and (self.start in axis.data)
ret = ret and (self.step == axis.step)
ret = ret and (self.max in axis.data)
return ret |
<gh_stars>10-100
import { IObfuscatingReplacer } from '../../../interfaces/node-transformers/obfuscating-transformers/obfuscating-replacers/IObfuscatingReplacer';
import { LiteralObfuscatingReplacer } from '../../../enums/node-transformers/obfuscating-transformers/obfuscating-replacers/LiteralObfuscatingReplacer';
ex... |
Artist's impression by Michael Osadciw/Univ. of Rochester
A recently discovered stellar neighbour of the Sun penetrated the extreme fringes of the Solar System — the closest encounter ever documented — at around the time that modern humans began spreading from Africa into Eurasia.
During occasional flare-ups that may... |
Leaving me behind as I would have it no other way
It had been nine years, since I last took this train
And here I was, gearing up to take it once again
She stood there with a forlorn look in her eyes, mindless of the crowd that hustled around her. The ten days had passed away in a flash and before we knew it, we fou... |
/**
* Bit of a hack, but we need to clone the SingleSignOnService as they are referenced and if we change the
* location it will change it for all subsequent uses
*/
SingleSignOnService copySingleSignOnService(SingleSignOnService ssoService) {
SAMLObjectBuilder<SingleSignOnService> builder = (SAM... |
/**
* A helper class for configuring STOMP protocol handling over WebSocket
* with optional SockJS fallback options.
*
* @author Rossen Stoyanchev
* @since 4.0
*/
public class ServletStompEndpointRegistration
extends AbstractStompEndpointRegistration<MultiValueMap<HttpRequestHandler, String>> {
public Servle... |
Starting on January 1, 2016, California law enforcement agencies and companies will have to take new steps to make their automated license plate reader (ALPR, or LPR) policies more transparent to the public.
Among other things, under Senate Bill 34, any "ALPR operator" will be required to:
Implement a usage and priva... |
/******************************************************************************
* *
* POP SHOTS. *
* ... |
/* Copyright (c) 2010 Daniel Doubrovkine, All Rights Reserved
*
* The contents of this file is dual-licensed under 2
* alternative Open Source/Free licenses: LGPL 2.1 or later and
* Apache License 2.0. (starting with JNA version 4.0.0).
*
* You can freely decide which license you want to apply to
* the project.
... |
#include <migraphx/onnx/op_parser.hpp>
#include <migraphx/onnx/checks.hpp>
#include <migraphx/ranges.hpp>
#include <migraphx/instruction.hpp>
#include <migraphx/shape_for_each.hpp>
#include <migraphx/make_op.hpp>
namespace migraphx {
inline namespace MIGRAPHX_INLINE_NS {
namespace onnx {
struct parse_upsample : op_pa... |
#include <vector>
// takes a heap, and an index into that heap. Assumes that
// the children of array[index] are both max-heaps in order
// to make the sub-tree rooted at array[index] a max-heap:
void fix_max_heap_subtree(std::vector<int> &array, int index, int heap_length) {
while (true) {
int left_c... |
<reponame>wolfgang-lausenhammer/Okeanos
package okeanos.math.regression.periodic;
import okeanos.math.regression.TrendLine;
/**
* Provides a common interface for all periodic trendline functions. That is,
* regression functions.
*
* @author <NAME>
*/
public interface PeriodicTrendLine extends TrendLine {
/**
... |
<reponame>xehoth/OnlineJudgeCodes
/*
* created by xehoth 06-05-2017
*/
#include <bits/stdc++.h>
char ibuf[1000000], *ih = ibuf;
template <class T>
inline void read(T &x) {
static char c;
for (c = *ih++; !isdigit(c); c = *ih++)
;
for (x = 0; isdigit(c); c = *ih++) x = (x + (x << 2) << 1) + (c ^ '... |
<reponame>fxarte/FileSystemAnalyzer
package com.dscid.filesystemanalyzer.processors;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import com.dscid.filesystemanalyzer.DB.DBLayer;
import com.ds... |
def response(self):
return RESPONSE[self.errorCode] % self.errorMessage |
//! A physical or logical component
use super::evse_type::EVSEType;
use validator::Validate;
/// A Physical or Logcal component
#[derive(serde::Serialize, serde::Deserialize, Validate, Debug, Clone, PartialEq)]
#[serde(rename_all = "camelCase")]
pub struct ComponentType {
/// Name of the component. Name should be ... |
def read_names_list_from_file(filepath):
lines_raw = open(filepath, 'r').readlines()
names_list = []
for line in lines_raw:
if line[:1] != '#':
old_name, new_name = line.split()
old_name = old_name.strip()
new_name = new_name.strip()
names_list.append(... |
<gh_stars>0
/*
* Multi2Sim
* Copyright (C) 2012 <NAME> (<EMAIL>)
*
* 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 the License, or
* (at your option) any later ... |
A disappearing act? Report of an unusual radiographic feature.
The clinical presentation of root resorption varies between patients, and occasionally may be a coincidental finding on routine radiographs. Clinical symptoms may be absent but, if present, usually indicate the presence of pulpal disease. The treatment opt... |
//Need to make entries into actual sub-windows
void Menu_paint(Window* menu_window) {
int i;
MenuEntry* current_entry;
Menu* menu = (Menu*)menu_window;
if(menu->old_paint)
menu->old_paint(menu_window);
for(i = 0; i < menu->entries; i++) {
current_entry = (MenuEntry*)List_get_at(menu-... |
from django.shortcuts import render
from django.db import transaction
# class Get_Host(APIView):
# def post(self, request):
# host = request.META.get('HTTP_USER_AGENT')
# return Response({"Host": host})
|
<reponame>bini-r-s/Option-Pricing
from BSM import BSM_option_class
|
// Test that valid messages are simultaneously available for a critical
// list of sensors. This must return true before the control system will
// advance out of the kInitializationStateWaitForValidData.
static bool EstimatorGroundIsDataReady(const FaultMask faults[]) {
if (HasAnyFault(&faults[kSubsysGsGpsPos])) re... |
<reponame>onlyfeng/luajit2
/*
** IR CALL* instruction definitions.
** Copyright (C) 2005-2021 <NAME>. See Copyright Notice in luajit.h
*/
#ifndef _LJ_IRCALL_H
#define _LJ_IRCALL_H
#include "lj_obj.h"
#include "lj_ir.h"
#include "lj_jit.h"
/* C call info for CALL* instructions. */
typedef struct CCallInfo {
ASMFunc... |
// SetCORSHeaders modifies headers of http.ResponseWriter by adding headers
// which allow CORS requests
func SetCORSHeaders(w http.ResponseWriter) {
w.Header().Set("Access-Control-Allow-Origin", "*")
w.Header().Set("Access-Control-Allow-Methods", "GET, HEAD, OPTIONS")
w.Header().Set("Access-Control-Allow-Headers", ... |
export const scrolling = (
node: HTMLElement,
predicate: (scrollTop: number) => boolean
) => {
const predicateTrue = () => predicate(window.scrollY);
const emitEventOnPredicate = () => {
if (predicateTrue())
node.dispatchEvent(new CustomEvent('hit'));
else node.dispatchEven... |
<reponame>vanipoudwal/Term-7-DCGAE
package com.niit.FilterSort;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.google.appen... |
// ApplyChanges applies a given set of changes in a given zone.
func (p *SafeDNSProvider) ApplyChanges(ctx context.Context, changes *plan.Changes) error {
zoneNameIDMapper := provider.ZoneIDName{}
zones, err := p.Zones(ctx)
if err != nil {
return err
}
for _, zone := range zones {
zoneNameIDMapper.Add(zone.Nam... |
/**
* Processes all student step files and associated model names to generate
* the inputs to the next component.
*/
@Override
protected void runComponent() {
logger.debug("Running BKT on file = " + this.getAttachment(0, 0) + ", model = " + this.modelName);
String resultsString = c... |
<gh_stars>1-10
export declare enum CommandArgs {
build = "build",
dev = "dev",
start = "start",
help = "-h",
version = "-v"
}
|
<reponame>BBN-E/serif
// Copyright 2008 by BBN Technologies Corp.
// All Rights Reserved.
#ifndef NODE_INFO_H
#define NODE_INFO_H
/** This module defines NodeInfo, which provides static methods
* that can be used to check whether a SynNode belongs to a given
* category. Examples include isOfNPKind() and i... |
<filename>native/external-libraries/boost/boost/log/filters/attr.hpp
/*
* Copyright <NAME> 2007 - 2010.
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt)
*/
/*!
* \file filters/attr.hpp
*... |
Setting the global research agenda for community health systems: literature and consultative review
Background Globally, there is renewed interest in and momentum for strengthening community health systems, as also emphasized by the recent Astana Declaration. Recent reviews have identified factors critical to successf... |
#include <cstdio>
#include <cmath>
using namespace std;
#define fo( i, x, y ) for ( int i=x; i<y; ++i )
int n, A, B;
int gcd( int A, int B )
{
if ( !B ) return A;
return gcd( B, A % B );
}
bool check( int A, int B )
{
int G = gcd( A, B );
A = A / G, B = B / G;
if ( ( G % A ) || ( G % B ) ) re... |
/*
pio.c --
I/O chip and peripheral emulation.
*/
#include "shared.h"
namespace MDFN_IEN_SMS
{
static io_state io_lut[2][256];
static const io_state *io_current;
void pio_init(void)
{
int i, j;
/* Make pin state LUT */
for(j = 0; j < 2; j++)
{
for(i = 0; i < 0x100;... |
/**
* Created by shifar on 16/9/16.
*/
public abstract class AdvancedBaseServlet extends HttpServlet {
static final String VERSION_CODE = "/v1";
static final String CONTENT_TYPE_JSON = "application/json; charset=utf-8";
private static final String ERROR_GET_NOT_SUPPORTED = "GET method not supported";
... |
package com.kururu.skillup.algorithm;
/**
* Algorithm Executable Interface
*
* @Author Rick00Kim <EMAIL>
*/
public interface AlgorithmIF {
enum RESULT {
SUCCESS, FAILURE
}
/**
* Prepare Test data
*/
void input();
/**
* Algorithm processing
*/
void process();
... |
import sendEmail from '../sendMail';
let email = sendEmail;
email = jest.fn(() => 'Autorizado');
const functionEmail = {
sendEmail,
};
describe('Utilidad de envio de correos', () => {
it('Debe ser equivalente a codigo generado', () => {
expect(sendEmail).toMatchSnapshot();
});
it('Debe poder ser llamado',... |
The “counter-hacking unit” is fighting a cyber cold war against computer-based espionage, largely coming from China and Russia.
The Office of Cyber Security has formed Computer Emergency Response Teams to deal with the threat, based at GCHQ in Cheltenham, Gloucestershire.
The units are on 24-hour standby to deal with... |
<filename>app/src/main/java/net/machina/fieldgame/connectingcheck/InternetCheck.java
package net.machina.fieldgame.connectingcheck;
import android.os.AsyncTask;
import java.net.InetSocketAddress;
import java.net.Socket;
/**
* Klasa mająca za zadanie sprawdzenie czy użytkownik jest połaczony z internetem
*/
public... |
import decrement from "Math/decrement/decrement"
describe(`function decrement(number)`, () => {
it(`should decrement the number by one`, () => {
const number = 1
expect(decrement(number))
.toEqual(number - 1)
})
})
|
N,K=map(int,input().split())
S=str(input())
happiness=N
for i in range(N):
if i==0:
if S[0]=='L':
happiness-=1
continue
if i==N-1:
if S[N-1]=='R':
happiness-=1
continue
if S[i]=='R':
if S[i+1]=='L':
happiness-=1
else:... |
<reponame>q2316367743/es-client
import { defineConfig } from 'vite'
import monacoEditorPlugin from "vite-plugin-monaco-editor"
import vue from '@vitejs/plugin-vue'
import { VitePWA } from 'vite-plugin-pwa'
const path = require('path')
// import path from 'path'
function _resolve(dir: string) {
return path.resolve(... |
package deltix.util.ldap.config;
import javax.xml.bind.annotation.XmlElement;
import java.util.ArrayList;
/**
*
*/
public class Binding {
public Binding() { } // JAXB
@XmlElement(name = "objectClass")
public ArrayList<String> objectsClasses = new ArrayList<String>();
@XmlElement(name = "attribute... |
T = int(input())
while T:
T = T-1
n = input()
arr = list(map(int, input().strip().split()))
even, odd = 0, 0
for i in range(len(arr)):
#if missplaced
if i%2 != arr[i]%2:
if i%2:#if odd
odd = odd+1
else:
even = even+1... |
An Experimental Model to Study Tuberculosis-Malaria Coinfection upon Natural Transmission of Mycobacterium tuberculosis and Plasmodium berghei
Coinfections naturally occur due to the geographic overlap of distinct types of pathogenic organisms. Concurrent infections most likely modulate the respective immune response ... |
import Align from '../enums/align';
export const center = (align: Align) => {
if (align === Align.CenterHorizontal) {
return `
left: 50%;
transform: translateX(-50%);
`;
} else if (align === Align.CenterVertical) {
return `
top: 50%;
transform: translateY(-50%);
`;
} else ... |
/**
* @param path non-null
* @param action non-null
* @param conf
* @throws SemanticException
* @throws HCatException
*
* This method validates only for existing path. If path doesn't exist
* there is nothing to validate. So, make sure that path passed in is non-null.
*/
@SuppressWarnings("de... |
Switching antipsychotics as a treatment strategy for antipsychotic-induced weight gain and dyslipidemia.
Patients taking antipsychotic medications for psychiatric disorders also have many risk factors for medical comorbidities and early death. While these risk factors were present before the arrival of the newer antip... |
// Copyright 2013 Tumblr, 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... |
def update_slits(self, spec2DObj):
if spec2DObj.det != self.det:
msgs.error("Objects are not even the same detector!!")
if not np.array_equal(spec2DObj.slits.spat_id, spec2DObj.slits.spat_id):
msgs.error("SPAT_IDs are not in sync!")
bpm = spec2DObj.slits.mask.astype(bool)... |
// addSnapshotFinalizer adds a Finalizer for VolumeSnapshot.
func (ctrl *csiSnapshotCommonController) addSnapshotFinalizer(snapshot *crdv1.VolumeSnapshot, addSourceFinalizer bool, addBoundFinalizer bool) error {
snapshotClone := snapshot.DeepCopy()
if addSourceFinalizer {
snapshotClone.ObjectMeta.Finalizers = appen... |
def add_property_list(request):
form = False
files = False
if request.method == 'POST' and "file" in request.POST:
form = RecipeForm(request.POST.get('file')).html_output()
else:
if request.method == 'POST':
file_name = request.POST.get('recipe_file')
form = Recip... |
/// Read a value from a given APIC `register`
pub unsafe fn read_apic(&self, register: Register) -> u32 {
// Convert the register enum to the actual MMIO offset
let offset = register as usize;
match &self.mode {
ApicMode::Apic(mapping) => {
// Read the value using the... |
static const unsigned char FolderFilled_array[900] = {
0x00, 0x00, 0x00, 0x00, 0xe0, 0x0f, 0xc4, 0xf0, 0xff, 0x0f, 0xc4, 0xf1,
0xff, 0x0f, 0xc4, 0xf1, 0xff, 0x0f, 0xc4, 0xf1, 0xff, 0x0f, 0xc4, 0xf1,
0xff, 0x0f, 0xc4, 0xf1, 0xff, 0x0f, 0xc4, 0xf1, 0xff, 0x0f, 0xc4, 0xf1,
0xff, 0x0f, 0xc4, 0xf1, 0x70, 0x0e, 0xc4, ... |
<filename>service/connection/connection_test.go
package connection
import "testing"
func TestConnectionMatchOpts(t *testing.T) {
var (
disabled = false
enabled = true
c = &Connection{
Enabled: true,
FromID: 1,
State: StateConfirmed,
ToID: 2,
Type: TypeFriend,
}
cases = map[*... |
def quality(self):
diff = min(self.max_diff, self.team_factor * abs(self.p1.microntrp - self.p2.microntrp))
Q = round(100 - 100 * (diff / self.max_diff))
return Q |
//
// The low level character spooler. We keep up with the line/col info here,
// so that we don't have to do it in multiple places below.
//
// Note that we support a single pushback character. We check it first and
// return it if we have one. Newlines or whitspace are never pushed back,
// only actual content c... |
/**
* Set stream head as firstAddress, set the iterator from
* firstAddress till the current tail of the log
*
* @param firstAddress
*/
public void seek(long firstAddress) {
log.trace("seek head {}", firstAddress);
txStream.seek(firstAddress);
... |
def from_json(cls, graph_path, assignment, updaters=None):
graph = Graph.from_json(graph_path)
return cls(graph, assignment, updaters) |
<gh_stars>0
import { CompositionAggregateFactory } from '../../../domain/composition/command/composition.aggregate-factory';
import { CompositionDispatcher } from '../../../domain/composition/command/composition.dispatcher';
import { InitCompositionCommandHandler } from '../../../domain/composition/command/init/init-co... |
Soundrop, the popular Spotify app that lets users create “rooms” to share streamed-music playlists with others, is turning up the volume on its service. Today, the company is announcing a new SDK so that others can create their own Soundrop-Spotify powered music apps. The service is kicking off with a bang: David Guett... |
/**
* @return int set representing the heap def statements that are gen'ed by the basic block. null if none.
*/
IntSet gen(IExplodedBasicBlock b) {
SSAInstruction s = b.getInstruction();
if (DEBUG) {
System.err.println("gen " + b + " " + s);
}
if (s == null) {
return nu... |
def vinet_energy(V, E0, B0, BP, V0):
eta = (V / V0) ** (1 / 3)
return E0 + 2 * B0 * V0 / (BP - 1) ** 2 * (
2 - (5 + 3 * BP * (eta - 1) - 3 * eta) * np.exp(-3 * (BP - 1) * (eta - 1) / 2)
) |
def starting(self, sender, **kwargs):
_log.debug("Starting: {}".format(self.__class__.__name__))
Files will need to be in webroot/simpleweb in order for them to be
browsed from http://localhost:8080/simpleweb/index.html
Note: filename is required as we don't currently autoredirect to
... |
Before Ostler’s own ideology—entailing a fanciful technological determinism—takes hold of his argument, The Last Lingua Franca is wide-ranging and insightful. He is on firm ground when he uses historical examples to question the future of English as a global language. He shows repeatedly how governments abolish even we... |
/**
* The alphabetically sorted list of applications.
*/
public class AlphabeticalAppsList {
/**
* Info about a section in the alphabetic list
*/
public static class SectionInfo {
// The number of applications in this section
public int numApps;
// The section break AdapterI... |
/**
* Use this API to convert sslpkcs8.
*/
public static base_response convert(nitro_service client, sslpkcs8 resource) throws Exception {
sslpkcs8 convertresource = new sslpkcs8();
convertresource.pkcs8file = resource.pkcs8file;
convertresource.keyfile = resource.keyfile;
convertresource.keyform = resource.k... |
/**
* Ends the current interview and returns to the Interviewee page. Will throw an error if the interviewee still
* has missing attributes without a score.
*/
public class EndCommand extends Command {
public static final String MESSAGE_SUCCESS = "Ended interview with %s.";
public static final String MESSAGE... |
// NewWatcher creates a new Watcher on a list of artifacts.
func NewWatcher(artifacts []*config.Artifact) (Watcher, error) {
fsEvents := make(chan notify.EventInfo, 100)
depsToArtifact := map[string][]*config.Artifact{}
for _, a := range artifacts {
if err := addDepsForArtifact(a, depsToArtifact); err != nil {
... |
<reponame>Bremys/RustDDS
use crate::dds::traits::key::KeyHash;
use crate::messages::submessages::submessage_elements::serialized_payload::SerializedPayload;
use crate::structure::cache_change::ChangeKind;
#[cfg(test)]
use bytes::Bytes;
// DDSData represets a serialized data sample with metadata
#[derive(Debug, Par... |
export * from './deep-clone'
export * from './get-function-args'
|
One of two prints I'll sell at Galacon this week. there's obviously no obnoxious watermark on the actual poster.
oof this was a lot of work. I usually don't draw background and perspective so this was a big effort for me. the composition especially proved itself to be a big challenge but in the end it came out pretty ... |
<reponame>Nuullll/llvm-test-suite<filename>SingleSource/Regression/C/gcc-c-torture/execute/20021011-1.c
/* PR opt/8165. */
extern void abort (void);
char buf[64];
int
main (void)
{
int i;
__builtin_strcpy (buf, "mystring");
if (__builtin_strcmp (buf, "mystring") != 0)
abort ();
for (i = 0; i < 16; ++i... |
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef EXTENSIONS_RENDERER_BINDINGS_API_BINDING_HOOKS_TEST_DELEGATE_H_
#define EXTENSIONS_RENDERER_BINDINGS_API_BINDING_HOOKS_TEST_DELEGATE_H_
#include ... |
A Study on Optimization of Dual Rail and Charge Sharing based Dynamic Latched Comparator
There has always been a demand for high speed and low power analog to digital converters (ADCs). This demand has pushed to increase modification and enhancement in conventional parent architectures especially for low power consump... |
/*
Copyright 2020 WeAreFrank!
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 wri... |
import React from 'react'
import {
Badge,
Box,
Text,
DropDown,
DropDownTrigger,
DropDownMenu,
DropDownItem,
Button,
Icon,
} from '../..'
import { withKnobs, radios } from '../../../storybook/node_modules/@storybook/addon-knobs'
import StoryWrapper from '../../utils/story-wrapper'
export default {
t... |
package main
import (
"fmt"
"strings"
)
func main() {
var target string;
fmt.Println("[+]]Press 1 to encrypt, 2 to deccrypt ")
fmt.Println("[-]Enter your choise: ")
fmt.Scan(&target)
if target == "1" {
var data string;
fmt.Printf("[-]Enter data: ")
fmt.Scan(&data)
var key int;... |
Republican strategist Rick Wilson rips fans of Donald Trump on Jan. 19, 2016. (Crooks and Liars)
Longtime conservative political consultant Rick Wilson launched a furious tweetstorm on Tuesday night following the stunning decision by President Donald Trump to fire FBI Director James Comey.
Wilson has long been a thor... |
<filename>src/main/java/com/volmit/react/util/Title.java
package com.volmit.react.util;
import org.bukkit.entity.Player;
public class Title {
private String title;
private String subTitle;
private String action;
private Integer fadeIn;
private Integer fadeOut;
private Integer stayTime;
pu... |
/*
* RELIC is an Efficient LIbrary for Cryptography
* Copyright (c) 2010 RELIC Authors
*
* This file is part of RELIC. RELIC is legal property of its developers,
* whose names are not listed here. Please refer to the COPYRIGHT file
* for contact information.
*
* RELIC is free software; you can redistribute it a... |
/* (non-Javadoc
* Method declared on IStringPoolParticipant
*/
public void storeStrings(StringPool set) {
super.storeStrings(set);
Object o = data;
if (o instanceof IStringPoolParticipant)
((IStringPoolParticipant) o).shareStrings(set);
} |
s = input()
n = len(s)
i = s.find('=')
l = s[0:i].count('|')
r = s[i:n].count('|')
if (l == r):
print(s)
else:
k = s.find("||")
if (l-r == 2):
print(s[0:k] + s[k+1:n] + '|')
elif (l-r == -2):
print(s[0:i] + '|' + s[i:n-1])
else:
print("Impossible")
|
def create(log_file_path, prefix='logfile', **kwargs):
if not os.path.exists(log_file_path):
os.makedirs(log_file_path)
tnow = "_{:%Y%m%d%H%M%S.%f}".format(datetime.now())
fname = prefix + tnow + ".log"
fname = os.path.join(log_file_path, fname)
logger = setup(fname, **kwargs)
return f... |
// TODO: tan_hfov_x and tan_hfov_y must be revisited in the face of
// nonuniform scaling. It may be more appropriate to describe the viewing
// frustum in a different way entirely.
view::view( const vector n_forward, vector n_center, int n_width,
int n_height, bool n_forward_changed,
double n_gcf, vector n_gcfve... |
<commit_msg>Fix unit test for seo faces url
<commit_before>from django.test import TestCase
from functional_tests.factory import FaceFactory
class Facetest(TestCase):
def setUp(self):
self.face = FaceFactory(title='Lokesh')
def test_title_to_share_returns_meet_Lokesh__farmer_from_sivaganga_tamil_nadu... |
// Get returns the image from the cache. If the return value is nil the image
// was not found in the cache and should be added to the cache by Put.
func (cache *ImageCache) Get(id ImageID, width, height int) image.Image {
cache.m.Lock()
defer cache.m.Unlock()
keyFmt := cache.keyFormat(id, width, height)
return cac... |
Great Egrets are huge, elegant birds that frequent wetlands and shores of the river and lakes in summer. They are not often seen in our area of North Central PA, but one was visiting a friend’s wetlands and I was able to put in with the kayak and get close shots of this awesome bird! Like other herons and egrets, they ... |
------------------------------------------
------------------------------------------
--- Imports ---
{-# LANGUAGE LambdaCase #-}
import Colors.Colors
import Control.Monad
import Data.Bits ( testBit )
import Data.List
import qualif... |
Jake Adelstein (born March 28, 1969) is a Jewish-American[1] journalist, crime writer, and blogger who has spent most of his career in Japan. He is the author of Tokyo Vice: An American Reporter on the Police Beat in Japan.
Career [ edit ]
Adelstein grew up in Missouri and moved to Japan at age 19 to study Japanese l... |
type ConfigurationTransport = {
levels: [string],
};
export type ConfigurationObject = {
transport: ConfigurationTransport,
path: string,
};
|
One Frame of Expert System for Product Design
The problems existing in the product design process were analyzed. Applying artificial intelligence theory and technology to the product design field is discussed and one frame of a product design expert system is proposed. According to procedure of product design, the exp... |
<gh_stars>0
/**
*
*/
package com.samton.erp.api.orders.bean.entity.vo;
import java.math.BigDecimal;
import com.samton.erp.api.orders.bean.entity.TErpOrders;
/**
*
* @Description:订单导出实体类
* @author: lijianzhou
* @date: 2016年4月26日
* Copyright (c) 2015, Samton. All rights reserved
*/
public class Orde... |
module HAD.Y2014.M02.D26.Exercise where
-- | Sum the value inside the maybe if there aren't any Nothing,
-- otherwise return Nothing
--
-- Examples
--
-- >>> sumIfAll [Just 1, Just 2]
-- Just 3
--
-- >>> sumIfAll [Just 1, Nothing]
-- Nothing
--
sumIfAll :: Num a => [Maybe a] -> Maybe a
sumIfAll = undefined
|
/**
* Gets the number of unique submissions made for the given exercise
*
* @param exerciseId the exercise id to get the number for
* @return the number of participations (= unique submissions) of the exercise
*/
@Query("""
SELECT COUNT (DISTINCT p.id) FROM StudentParticipation p
... |
// InitDatastore initializes the datastore by app name
// return true if successful false otherwise
func (ms *ManagerService) InitDatastore(app string) bool {
if ms.DBConfig[app] == nil {
ms.DBConfig[app] = &superbase.DBConfig{}
}
success := true
ms.DBConfig[app].Server, _ = ms.GetAppProperty(app, "dbserver")
ms... |
<filename>pkg/codegen/internal/test/testdata/simple-enum-schema/python/pulumi_plant_provider/_enums.py
# coding=utf-8
# *** WARNING: this file was generated by test. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***/* (robertc) Allow Hooks to be self documenting. (<NAME>) */
from enu... |
def generate_constants() -> None:
cinit_ops = "\n".join(
f"CInit{n} == Values = 0..{n}" for n in EXPERIMENT_CARDINALITIES
)
print(CONSTANT_MODULE_FMT.format(cinit_ops=cinit_ops)) |
/**
* Base class for all Smithy tasks.
*/
abstract class BaseSmithyTask extends DefaultTask {
static final String RUNTIME_CLASSPATH = "runtimeClasspath";
static final String COMPILE_CLASSPATH = "compileClasspath";
private FileCollection models;
private boolean allowUnknownTraits;
/**
* Get... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.