content stringlengths 10 4.9M |
|---|
<filename>src/formatters/index.ts
export { exportAsCSV } from './csv'
export { exportAsJSON } from './json'
|
/*
* Copyright © 2021-2022 <NAME>, 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... |
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, NavigationEnd, Router } from '@angular/router';
import {MatDialog} from '@angular/material/dialog';
import { NotifierService } from 'angular-notifier';
import { filter } from 'rxjs/operators';
@Component({
selector: 'app-root',
templateUrl:... |
package convert
import (
"errors"
"reflect"
)
type (
ActualValue func(*Info) error
ActualValueMs map[reflect.Kind]ActualValue
)
type ActualValuer interface {
AC(reflect.Kind) ActualValue
}
func (ms ActualValueMs) AC(kind reflect.Kind) ActualValue {
if ms[kind] != nil {
return ms[kind]
}
return ms[reflect... |
The only color in the landscape for miles, Salvation Mountain looms like a mirage on the horizon. The three-story, three-decade work of artist Leonard Knight, who died yesterday at the age of 82, is a piece of brightly painted, hand-sculpted California desert, like an impossibly scaled cathedral made from Play-Doh.
Kn... |
#include "../../BetterEdit.hpp"
#include "../CustomKeybinds/KeybindManager.hpp"
#include <InputNode.hpp>
#include "KeybindingsLayer.hpp"
#include "KeybindListView.hpp"
#include "Scrollbar.hpp"
#include "KeybindSettingsLayer.hpp"
#include "KeymapLayer.hpp"
#include "../../utils/BGLabel.hpp"
static constexpr const int K... |
Learning complex questions from the input
A central question in language acquisition is how children master sentence types that they have seldom, if ever, heard. Here we report the findings of a preregistered, randomized, single-blind intervention study designed to test the prediction that, for one such sentence type,... |
/**
* Inner class that extends the AbstractTreeTableModel
*/
class NetworkTreeTableModel extends AbstractTreeTableModel {
String[] columns = { "Network", "Nodes", "Edges" };
Class[] columns_class = { TreeTableModel.class, String.class,
String.class };
public NetworkTreeTableModel(Object root) ... |
GOLD Coast academy graduate Brad Scheer has penned a one-year contract extension, tying him to the Suns until at least the end of 2019.
The 18-year-old, who was recruited with pick No.67 in last year's NAB AFL Draft, spent most of his junior career playing in the midfield but is eyeing a regular spot in the forward li... |
// Print some stuff at the end.
public void complete() {
if (raw || env.getBoolean("quiet")) return;
if (accepted == 0) {
throw new RuntimeException(
"0 of "+submitted+" jobs successfully submitted");
} else {
System.out.println("Success: "+
accepted+" of "+submitted+" jobs succe... |
#include <stdio.h>
int main(int argc,char* arv[]){
int T;
scanf("%d",&T);
while(T--)
{
int A,B,C,N;
scanf("%d%d%d%d",&A,&B,&C,&N);
int S=A+B+C+N;
puts(S%3!=0||A>S/3||B>S/3||C>S/3?"NO":"YES");
}
... |
//@HEADER
// ************************************************************************
//
// Kokkos v. 4.0
// Copyright (2022) National Technology & Engineering
// Solutions of Sandia, LLC (NTESS).
//
// Under the terms of Contract DE-NA0003525 with NTESS,
// the U.S. Governmen... |
import java.util.*;
import java.io.*;
import java.math.*;
public class Main3 {
public static boolean bg = false;
public static void main(String[] args) throws Exception {
BR in = new BR();
//ST in = new ST();
//LR in = new LR();
int n1 = ri(in.nx());
char[] l1 = in.nx().toCharArray();
int n... |
/**
* offload_enqueue - add an offload packet to an SGE offload receive queue
* @q: the SGE response queue
* @skb: the packet
*
* Add a new offload packet to an SGE response queue's offload packet
* queue. If the packet is the first on the queue it schedules the RX
* softirq to process the queue.
*/
static inl... |
Brazil as an Emerging Donor in Africa’s Agricultural Sector: Comparing Two Projects
This article approaches the recent phenomenon of South–South cooperation with a focus on Brazil’s recent interventions in the agricultural sector. It reports on the case of Brazil as a provider of technical cooperation for the African ... |
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// Operation shape for `CreateDeliveryStream`.
///
/// This is usually constructed for you using the the fluent builder returned by
/// [`create_delivery_stream`](crate::client::Client::create_delivery_stream).
///
/// See [`crate::client... |
8 SHARES Share Tweet
Would you like a garden that produces bountiful harvest year after year without back-breaking effort?
Of course! Who wouldn’t?
Last fall, I sat in on a lecture by Rick Austin, author of Secret Garden of Survival. Rick showed the class one picture after another of a forest-like garden filled with... |
def run(self):
print('uniqueId: {}'.format(self.signed_se['header']['uniqueId']))
self.identifier = self.signed_se['header']['uniqueId']
protected = json.loads(
base64url_decode(self.signed_se['protected'].encode('ascii')))
if protected['kid'] != self.verification_cert_kid_b6... |
Republican megadonor Sheldon Adelson has privately told one of his allies that he supports a campaign that depicts H.R. McMaster as anti-Israel and seeks to remove him from his post as national security adviser.
In an email to Mort Klein, the president of the Zionist Organization of America, Adelson writes: "Now that ... |
/*
* Because my date structure is circularVector and i'm adding the priority
* vehicle at the beginning and the others at the end ,, when we want to
* pass the vehicles first we will start with priority vehicles (it will
* pass the traffic first) so that i used removeFirst the removed Vehicle
* will be return... |
// ServeHTTP dispatches the request to the handler whose method matches the
// request method. If handler is not found it adds the Allow header to the
// response based on the configured handlers. If the request is not an OPTIONS
// request, it also sets the response status code to 405 (Method Not Allowed).
func (route... |
import React from 'react';
type Props = {
Component: React.FunctionComponent;
};
export function FixtureElement({ Component }: Props) {
return <Component />;
}
FixtureElement.cosmosCapture = false;
|
you have an idea for a future Mind Meld? [Dohave an idea for a future Mind Meld? Let us know !]
The Bram Stoker Award final ballot was recently announced, reminding me why horror as a genre is so much fun, so in that spirit, I asked our panel these questions:
Q: What first piqued your interest in horror, and why do y... |
# -*- coding: <utf-8> -*-
from __future__ import print_function
import requests
import bs4
import json
import re
import sys
import os
class Paper():
""" A class that holds the information for an Arxiv paper. """
def __init__(self, number=None, title=None, auths=None,abstract=None,fromfile=None):
""" ... |
#include "stdafx.h"
#include "TreeViewLocals.h"
#include "ide2.h"
#include "MainFrame.h"
#include "LuaDoc.h"
#include "LuaView.h"
IMPLEMENT_DYNCREATE(CTreeViewLocals, CTreeView)
CTreeViewLocals::CTreeViewLocals()
{}
CTreeViewLocals::~CTreeViewLocals()
{}
//ON_NOTIFY_REFLECT(NM_RCLICK, OnRclick)
... |
Correlation of Blood Pressure Variability as Measured By Clinic, Self-measurement at Home, and Ambulatory Blood Pressure Monitoring
BACKGROUND
Blood pressure variability (BPV) has been postulated as a potential predictor of cardiovascular outcomes. No agreement exists as to which measurement method is best for BPV est... |
/**
* Class to implement the asynchronous processing in the interface blockade
* status modification.
*
* @author NTT
*
*/
public class FcInterfaceMaintenanceUpdateRunnner extends FcAbstractInterfaceMaintenanceRunnerBase {
private MsfLogger logger = MsfLogger.getInstance(FcInterfaceMaintenanceUpdateRunnner.cla... |
/**
* Unit test for {@link AdaptiveOperationTracker} that tests the adaptability based on request latencies. This class
* only tests features not already tested in {@link OperationTrackerTest}.
*
* The status of an operation is represented as in the following format:
*
* [local unsent count] - [local inflight cou... |
#include <stdio.h>
int main()
{
int n,k,m,i,count=0,flag=0,d=0;
scanf("%d%d%d",&n,&m,&k);
int a[n];
for(i=0;i<n;i++)
{
scanf("%d",&a[i]);
if(a[i]==1)
{
count++;
}
else
flag++;
}
if(m>= count && k>= flag)
printf(... |
//! Safe wrapper around externalities invokes.
use wasm_std::{
self,
types::{H256, U256, Address}
};
/// Generic wasm error
#[derive(Debug)]
pub struct Error;
mod external {
extern "C" {
// Various call variants
/// Direct/classic call.
/// Corresponds to "CALL" opcode in EVM
... |
<filename>tests/lib/gui/lvgl/src/img.c<gh_stars>1000+
/*
* Copyright (c) 2019 <NAME> <<EMAIL>>
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr.h>
#include <lvgl.h>
#include "img.h"
static const uint8_t img_data[] = {
0x00, 0x00, 0x00, 0x00, /* Index color 0 */
0x00, 0xff, 0x00, 0x00, /* Index color ... |
from sys import stdin
_ = stdin.readline()
r = 0
p = ""
for l in stdin.readline()[:-1]:
if p == l:
r += 1
p = l
print(r) |
/**
* Soft max function
* row_maxes is a row vector (max for each row)
* row_maxes = rowmaxes(input)
* diff = exp(input - max) / diff.rowSums()
* Outputs a probability distribution.
* Note that this is a parameterized model and requires
* the sum and max for the vector being calculated
*
* @author Adam Gibson
... |
def packbits(myarray):
if myarray.dtype.kind not in 'biu':
raise TypeError(
'Expected an input array of integer or boolean data type')
myarray = myarray.ravel()
packed_size = (myarray.size + 7) // 8
packed = cupy.zeros((packed_size,), dtype=cupy.uint8)
return _packbits_kernel(mya... |
<reponame>marinelli/malodivo
{-# language ExistentialQuantification, Rank2Types, DeriveFunctor #-}
module Column where
import Redistribute (capped)
import Control.Arrow ((&&&), second)
import Data.Either (rights, partitionEithers)
import Data.List (transpose, sortOn)
import Data.List.OnPartition
... |
/*******************************************************************************
* Copyright 2018 572682
*
* 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/... |
Monoclonal antibodies for the histopathological diagnosis of cervical neoplasia
Dear Sir, Recent correspondents |
Optimal designs for some bivariate cokriging models
This article focuses on the estimation and design aspects of a bivariate collocated cokriging experiment. For a large class of covariance matrices, a linear dependency criterion is identified, which allows the best linear unbiased estimator of the primary variable in... |
<reponame>threefoldtech/sandbox_osx
# -*- coding: utf-8 -*-
# copyright (c) 2018 gevent. See LICENSE.
# cython: auto_pickle=False,embedsignature=True,always_allow_keywords=False
"""
A collection of primitives used by the hub, and suitable for
compilation with Cython because of their frequency of use.
"""
from __futur... |
/**
* convert int to byte array
* @param value int value 32 bits
* @param buffer array of byte to write to
* @param offset position to write to
*/
public static void writeIntToBytes(int value, byte[] buffer, int offset){
if(buffer.length - offset < 4){
return;
}
buffer[offset] = (byte)((value >> 24) ... |
n = input()
A = map(int, raw_input().split())
s = sum(A)
if s*10.0/n >= 45:
print 0
else:
ans = 0
A.sort()
for a in A:
ans += 1
s = s-a+5
if s*10.0/n >= 45:
break
print ans |
/**
* StorageHelper class to access local storage.
*/
public class StorageHelper {
/**
* Name of preferences.
*/
private static final String PREFERENCES_NAME = "AppCenter";
/**
* Application context instance.
*/
@SuppressLint("StaticFieldLeak")
private static Context sContext... |
// NewAdminTermsAndConditionsPayload builds a user service admin terms and
// conditions endpoint payload.
func NewAdminTermsAndConditionsPayload(body *AdminTermsAndConditionsRequestBody, auth string) *user.AdminTermsAndConditionsPayload {
v := &user.AdminTermsAndConditionsFields{
Email: *body.Email,
}
res := &use... |
//DownloadMedia is to download a media file from DingTalk
func (c *DingTalkClient) DownloadMedia(mediaID string, write io.Writer) error {
var data MediaResponse
data.Writer = write
params := url.Values{}
params.Add("media_id", mediaID)
err := c.HttpRPC("media/get", params, nil, &data)
return err
} |
<filename>rlf-module/src/main/java/com/rlf/module/config/MyBatisConfig.java
package com.rlf.module.config;
import com.github.pagehelper.PageInterceptor;
import org.apache.ibatis.type.JdbcType;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframewo... |
<reponame>netrikare/substrate-api-client
/*
Copyright 2021 Integritee AG and Supercomputing Systems AG
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/li... |
def name(self):
core_name = self.tt_cores[0].name
idx = core_name.rfind('/')
return core_name[:idx] |
<reponame>openharmony-gitee-mirror/communication_wifi
/*
* Copyright (C) 2021 Huawei Device Co., 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/license... |
import { Directive, ElementRef, Input, OnInit } from '@angular/core';
@Directive({
selector: '[sprkTabbedNavigationTab]',
})
/**
* @deprecate This directive will be removed in
* a future release in favor of the `sprk-tabs-button` directive.
* Please use the `sprk-tabs-button` directive.
* TODO: Remove this direc... |
The Islamic State in Iraq and Syria (ISIS) is upping its destruction of historic monuments in the ancient city of Palmyra, Syria.
The group this week destroyed monuments including part of a preserved Roman theatre and a tetrapylon, a series of pillars near the entrance to the city.
“This is a horror film and we will ... |
from pathlib import Path
from macpie.pandas import file_to_dataframe
from macpie.testing import assert_dfs_equal
current_dir = Path(__file__).parent.absolute()
# output_dir = current_dir
output_dir = None
primary = file_to_dataframe(current_dir / "primary.xlsx")
secondary = file_to_dataframe(current_dir / "second... |
Fantasy Premier League 2017/18 - Top picks for Gameweek 12
Vishnu Rajesh FOLLOW ANALYST Top 5 / Top 10 12.46K // 15 Nov 2017, 16:12 IST SHARE Share Options × Facebook Twitter Flipboard Reddit Google+ Email
FPL is back!
The wait is almost over. The premier league can’t return soon enough, and it is finally time to st... |
//!
//! \brief OptionsDialog::getStrokeLengthProportion
//! \return integer percentage - 0 is full stroke length (and try to increase speed to maintain this),
//! 100 is constant speed, reducing stroke length as needed
//!
int OptionsDialog::getStrokeLengthProportion()
{
QSettings settings;
return... |
<gh_stars>0
package main
import "fmt"
var ns []int
var ans [][]int
func dfs(i, n int, a []int) {
if i == n {
ans = append(ans, a)
return
}
acopy := make([]int, len(a))
copy(acopy, a)
dfs(i+1, n, a)
dfs(i+1, n, append(acopy, ns[i]))
}
func subsets(nums []int) [][]int {
ns = nums
ans = make([][]int, 0)
d... |
<reponame>paterWang/EasyReader
package com.laotan.easyreader.ui.fragment.home.child.zhihu;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import com.laotan.easyreader.R;
import com.laotan.easyreader.bean.zhihu.CommentBean;
import com.laotan.easyreader.injector.com... |
/**
* @author Josh Cummings
*/
@ExtendWith({ SpringExtension.class, SpringTestContextExtension.class })
@SecurityTestExecutionListeners
public class MethodSecurityBeanDefinitionParserTests {
private static final String CONFIG_LOCATION_PREFIX = "classpath:org/springframework/security/config/method/MethodSecurityBean... |
<reponame>Zazsona/DecorHeads
package com.zazsona.decorheads.headdata;
import com.mojang.authlib.GameProfile;
import com.mojang.authlib.properties.Property;
import com.zazsona.decorheads.Core;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.inventory.ItemStack;
impor... |
Social and educational environment modeling in future vision: infosphere tools
The article is devoted to the study of information and communication environment tools for constructing a vision of the future. The research methodology is determined by the information paradigm providing a general theoretical basis for rat... |
// SPDX-License-Identifier: GPL-2.0+
/*
* addi_apci_1500.c
* Copyright (C) 2004,2005 ADDI-DATA GmbH for the source code of this module.
*
* ADDI-DATA GmbH
* Dieselstrasse 3
* D-77833 Ottersweier
* Tel: +19(0)7223/9493-0
* Fax: +49(0)7223/9493-92
* http://www.addi-data.com
* info@addi-data.com
*/
#include <... |
def convert_annotations(root_path, gt_name, lmdb_name):
assert isinstance(root_path, str)
assert isinstance(gt_name, str)
assert isinstance(lmdb_name, str)
start_time = time.time()
gt = loadmat(gt_name)
img_num = len(gt['imnames'][0])
env = lmdb.open(lmdb_name, map_size=int(1e9 * 40))
wi... |
def minify_files():
current_dir = os.getcwd()
top_dir = os.path.dirname( os.path.dirname( current_dir ) )
js_dir = os.path.join( top_dir, 'rawsalad', 'site_media', 'js' )
css_dir = os.path.join( top_dir, 'rawsalad', 'site_media', 'css' )
html_dir = os.path.join( top_dir, 'rawsalad', 'databrowser', '... |
use exitcode;
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
use std::process;
use structopt::StructOpt;
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn verify_args_length() {
let search_terms = vec!["add".to_string(), "a".to_string(), "commit".to_string()];
let cfg = Config::new(... |
/**
* This UDF returns array of string that has been split from input string.
*
* @param input input string that want to be split
* @param delimiter separator or delimiter to split the input string
* @return array of string that has been split
* @author jesry.pandawa
* @team DE
... |
package wannabit.io.cosmostaion.task.FetchTask;
import java.util.ArrayList;
import retrofit2.Response;
import wannabit.io.cosmostaion.base.BaseApplication;
import wannabit.io.cosmostaion.base.BaseChain;
import wannabit.io.cosmostaion.base.BaseConstant;
import wannabit.io.cosmostaion.model.type.Validator;
import wanna... |
<gh_stars>1-10
package grproxy
import (
"context"
"fmt"
"net"
"strings"
"testing"
"time"
"github.com/yulrizka/grproxy/testserver"
"google.golang.org/grpc"
"google.golang.org/grpc/reflection"
)
func TestCall(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), 60*time.Second)
defer canc... |
def _prep_newdata(self, newdata):
newdata = newdata.reshape(-1, self.n_games, self.n_features)
newtensor = tf.constant(newdata)
return newtensor |
A Content Analysis of Scholarship on Consensual Nonmonogamies: Methodological Roadmaps, Current Themes, and Directions for Future Research
This study provides a content analysis of peer-reviewed journal articles about consensual nonmonogamy (CNM) from a social scientific lens published from 1926 through 2016, excludin... |
/**
* Contains integration tests (interaction with the Model) and unit tests for LessonAddCommand.
*/
public class LessonAddCommandTest {
private Model model = new ModelManager(getTypicalAddressBook(), new UserPrefs());
@Test
public void constructor_nullLesson_throwsNullPointerException() {
asse... |
from fontbakery.utils import (
can_shape,
text_flow,
unindent_and_unwrap_rationale,
)
from fontTools.ttLib import TTFont
from fontbakery.codetesting import portable_path
def test_text_flow():
assert text_flow("") == ""
assert text_flow("Testing") == "Testing"
assert text_flow("One Two Three"... |
<filename>src/main/java/de/clashsoft/gentreesrc/codegen/Generator.java
package de.clashsoft.gentreesrc.codegen;
import de.clashsoft.gentreesrc.tool.Config;
import de.clashsoft.gentreesrc.tree.DefinitionFile;
import de.clashsoft.gentreesrc.tree.decl.TypeDecl;
import org.stringtemplate.v4.AutoIndentWriter;
import org.st... |
def update_cell(self, src_path, update: bool = False) -> None:
pdk = get_active_pdk()
filepath = pathlib.Path(src_path)
cell_name = filepath.stem.split(".")[0]
function = partial(from_yaml, filepath)
try:
pdk.register_cells_yaml(**{cell_name: function}, update=update)... |
def variables(self) -> Set[str]:
root = self.root
vars = set()
if is_variable(root):
vars = {root}
elif is_function(root):
for arg in self.arguments:
vars.update(arg.variables())
return vars |
// Finds the minimum integer in an array of ints and returns it.
private int min(int[] arr)
{
int min = Integer.MAX_VALUE;
for(int i = 0; i < arr.length; ++i)
{
if(arr[i] < min)
min = arr[i];
}
return min;
} |
High unemployment numbers may be good for Republicans in the next election, which makes it disturbing that Republican leaders have blocked any discussion of stimulus policies that might succeed in putting people back to work.
In fact, all job-creating proposals that involve spending money are considered verboten among... |
Consensus Molecular Subtypes of Colorectal Cancer and their Clinical Implications.
The colorectal cancer (CRC) Subtyping Consortium has unified six independent molecular classification systems, based on gene expression data, into a single consensus system with four distinct groups, known as the Consensus Molecular Sub... |
<gh_stars>10-100
#include <Core/Geometry/IndexedGeometry.hpp>
#include <iterator>
namespace Ra {
namespace Core {
namespace Geometry {
MultiIndexedGeometry::MultiIndexedGeometry( const MultiIndexedGeometry& other ) :
AttribArrayGeometry( other ) {
deepCopy( other );
}
MultiIndexedGeometry::MultiIndexedGeomet... |
<filename>src/cookie/protocol/network/types/HumanInformations.ts
import ActorRestrictionsInformations from "./ActorRestrictionsInformations";
import HumanOption from "./HumanOption";
export default class HumanInformations {
public options: HumanOption[];
public restrictions: ActorRestrictionsInformations;
public... |
/*
* Sets scaleY and returns value indicating success.
*/
int
CSGScale::setScaleY(double scaleY)
{
mScaleY = scaleY;
mIsSetScaleY = true;
return LIBSBML_OPERATION_SUCCESS;
} |
def __get_possible_route_segments(graph, path):
edge_data = lambda a, b: graph.get_edge_data(a, b).values()
routes_between = lambda a, b: map(lambda x: x['route'], edge_data(a, b))
make_journey_segment = lambda a, b: (a, set(routes_between(a, b)))
return zip_with(make_journey_segment, path, tail(path)) |
/**
* Simple ByteBuffer pool used by SSLHandler.
* ByteBuffers are by default allocated as direct byte buffers. To use non-direct
* ByteBuffers, set system property mina.sslfilter.directbuffer to false.
*
* @author The Apache Directory Project (mina-dev@directory.apache.org)
* @version $Rev$, $Date$
*/
class SSL... |
<reponame>desmond-wang/Dythm
package troid.dythm.game.achievement;
import troid.dythm.game.profile.Profile;
public class OneHundredPlays implements Achievement {
@Override
public String getName() {
return "100 Plays";
}
@Override
public String getDescription() {
return "Complete 1... |
//
// If the input file is in Utf8 format, then the first three
// characters are a marker that indicates this.
//
int ByteOrderMarkSize(const char *cursor)
{
return (cursor[0] == (char) 0xEF &&
cursor[1] == (char) 0xBB &&
cursor[2] == (char) 0xBF
?... |
//Creating A Pair Class For Head For Tracking Head And Tail
class Pair{
public:
Node *head = NULL;
Node *tail = NULL;
} |
class SuperOpportunityFinder:
"""Super Opportunity Finder."""
def __init__(
self,
exchanges,
collections,
name=True,
opportunity_id=0,
get_usd_rates=False,
opportunity_interval=0.05,
):
"""Initialize.
SuperOpportunityFinder, given a d... |
2015 Australian Silver and Gold Coins for October
October releases from the Perth Mint of Australia feature several new gold, silver and platinum coins that showcase a variety of themes. They include Year of the Monkey coins, a two-ounce gold high relief kangaroo coin, a star-shaped coin, a maps-shaped coin, a five-ou... |
<filename>customer/back-end server/accounts/api/serializers.py
from rest_framework.serializers import ModelSerializer
from accounts.models import Account
class ProfileSerializer(ModelSerializer):
class Meta:
model = Account
fields = [
'id',
'first_name',
'last... |
#include "default_logger.h"
void DefaultLogger::log(const char *level, const char *file, int line, const char *fmt, va_list args) {
int n;
char buf[kMaxLogBufSize] = {'\0'};
n = snprintf(buf, kMaxLogBufSize, "[%s %s:%d]", level, file, line);
n += vsnprintf(buf + n, kMaxLogBufSize - n, fmt, args);
buf[n++] +... |
package mocks
import "github.com/sclevine/agouti/api"
type WebDriver struct {
OpenCall struct {
Desired map[string]interface{}
ReturnSession *api.Session
Err error
}
StartCall struct {
Called bool
Err error
}
StopCall struct {
Called bool
Err error
}
}
func (w *WebDriver) ... |
<gh_stars>0
import {faArrowRight} from '@fortawesome/free-solid-svg-icons';
import {FontAwesomeIcon as FAIcon} from '@fortawesome/react-fontawesome';
import {FC, ReactNode} from 'react';
import style from './Summary.module.scss';
import {ScrollLink} from './navbar';
interface Props {
items: {label: string, value:... |
<reponame>balcieren/erenbalci.com
import clsx from "clsx";
import { FC, ReactNode } from "react";
export type SectionLayoutProps = {
title: string;
id: string;
children: ReactNode;
titleClassName?: string;
className?: string;
};
export const SectionLayout: FC<SectionLayoutProps> = ({
id,
title,
childr... |
import os
import argparse
import pandas as pd
import numpy as np
import sys
import json
DEFAULT_PROJECT_REPO = os.path.sep.join(__file__.split(os.path.sep)[:-2])
PROJECT_REPO_DIR = os.path.abspath(
os.environ.get('PROJECT_REPO_DIR', DEFAULT_PROJECT_REPO))
sys.path.append(os.path.join(PROJECT_REPO_DIR, 'src'))
from... |
// Validate ensures that license has at least one of type or uri
func (l License) Validate() error {
if "" == l.Type && "" == l.URI {
return fmt.Errorf("license must have at least one of type or uri")
}
return nil
} |
/**
* @par Detailed Design:
* This function is responsible for actually issuing the system call that
* will create the slave simulations on the appropriate machines.
*/
void Trick::MonteCarlo::spawn_slaves() {
for (std::vector<MonteSlave *>::size_type i = 0; i < slaves.size(); ++i) {
if (slaves[i]->stat... |
<filename>src/etc/matrix_product/matrix.h
#ifndef __Matrix_
#define __Matrix_
#include <iostream>
class Matrix {
friend std::istream& operator>>(std::istream& in, Matrix& m);
friend std::ostream& operator<<(std::ostream& out, Matrix&& m);
friend std::ostream& operator<<(std::ostream& out, Matrix& m);
private:... |
def grp1(df):
grp1=df[['person','offer_id']][(df['valid_completed']==1) & (df['event']=='offer completed')].groupby(['person','offer_id']).count().reset_index()
return grp1 |
<reponame>trf2-jus-br/eproc-api
package br.jus.trf2.sistemaprocessual;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.util.Date;
import java.util.Scanner;
import javax.naming.Context;
import javax.naming.Initial... |
def authenticate_and_init(cls, username, password):
if is_ldap_authenticated_user(username, password) is True:
return cls(username=username)
else:
return None |
def office_to_rss(version, data):
out = []
out.append('''<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<language>fr</language>
<source>%s</source>
<copyright>Copyright AELF - Tout droits réservés</copyright>
''' % data.g... |
/**
* POJO class for single data processing unit - string (line)
*
* @author Sergii Sinelnychenko
*
*/
public class StringFingerprint {
/**
* Line captured, processed and analyzed
*/
private String line;
/**
* MD5 hash of the result of line processing. Used to be the unique
* anagram-signature of this... |
import java.io.Console;
public class App {
public static void main(String[] args) {
Console myConsole = System.console();
System.out.println("Hi, welcome to the store!");
System.out.println("Would you like to plan a new event? (type Y or N)");
String startEventPlan = myConsole.readLine();
if (st... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.