text stringlengths 27 775k |
|---|
# test_logger
from opyprint import print # noqa: F401
from opyprint.logger import Logger, LoggerBase, PrintLogger
def test_base_logger():
assert Logger.DEBUG == LoggerBase.DEBUG
assert Logger.DISABLED == LoggerBase.DISABLED
assert Logger.TRACE == LoggerBase.TRACE
assert Logger.INFO == LoggerBase.INF... |
import { BlendMode, FillRule, ShapeType } from '../helpers';
import { MultiDimensionalKeyframed, Value, OffsetKeyframe } from '../properties';
export type Fill = {
/**
* Match Name
* @desc After Effect's Match Name. Used for expressions
*/
mn: string;
/**
* Name
* @desc After Effect's Name. Used f... |
import numpy as np
import sys
from plotter import Plotter, PlotterType
x = np.linspace(-np.pi, np.pi, 201)
to_plot = [
{
"title": "Plot",
"type": PlotterType.PLOT,
"data": [x, np.sin(x)]
},
]
pl = Plotter(to_plot)
pl.export_tikz(filename="tikz/tikz_figure.tex")
|
package com.ichmed.trinketeers.util.render;
public interface IGraphic
{
public void render();
}
|
using LagoVista.Core.PlatformSupport;
using System;
using System.Collections.Generic;
using System.Text;
namespace LagoVista.DroneBaseStation.Core.Interfaces
{
public interface IChannel : ISerialPort
{
}
}
|
package com.ociweb.gl.impl.stage;
import com.ociweb.gl.api.HTTPResponseReader;
public interface CallableHTTPResponse {
boolean responseHTTP(HTTPResponseReader reader);
}
|
import React from 'react';
import * as d3 from "d3";
export default class BasicPieChart extends React.Component {
constructor(props) {
super(props);
this.state = {
data: [
{
apps_by_deployment: "error",
apps_by_deployment_doc_count: "5"
},
{
apps_by... |
export PYTHONPATH=`pwd`:$PYTHONPATH
# class-agnostic
CONFIG='solov2_release_x101_dcn_fpn_2gpu_3x_6lambda_bothfocalloss_Tdiv4_rlemask_crop'
# Notice! Need to check
# mmdet/datasets/synthetics.py#21-244
# tools/test_ins_vis.py#44 vis_seg()
CUDA_VISIBLE_DEVICES=2 python tools/test_ins_vis.py \
configs/solov2/synthe... |
/*
* Copyright 2021 The Android Open Source Project
*
* 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... |
import kotlin.math.abs
class Solution {
fun findClosestElements(arr: IntArray, k: Int, x: Int): List<Int> {
val ans = arr.sortedBy {
abs(it - x)
}
return ans.take(k).sorted()
}
} |
import family.haschka.wolkenschloss.gradle.ca.ServerCertificate
import family.haschka.wolkenschloss.gradle.testbed.Apply
import family.haschka.wolkenschloss.gradle.testbed.domain.DomainExtension
import family.haschka.wolkenschloss.gradle.testbed.domain.DomainTasks
plugins {
id("family.haschka.wolkenschloss.testbed... |
using Aktien.Data.Types;
using Aktien.Logic.Core;
using Aktien.Logic.Messages.Base;
using Base.Logic.Core;
using Base.Logic.Messages;
using Base.Logic.ViewModels;
using GalaSoft.MvvmLight.CommandWpf;
using GalaSoft.MvvmLight.Messaging;
using Logic.Messages.Base;
using System;
using System.Collections.Generic;
using Sy... |
// (c) Copyright 2017 Cloudera, 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 t... |
const firebaseService = require("./db/firebase-service");
const db = firebaseService.db;
const bucket = firebaseService.bucket;
const WORDS_COLLECTION_NAME = firebaseService.WORDS_COLLECTION_NAME;
const wordListsCollection = firebaseService.wordListsCollection;
module.exports.insertNewWord = (listId, word) => {
re... |
import collections
import functools
import io
import logging
import os.path
import pathlib
import shutil
import subprocess
import sys
import tempfile
import textwrap
from typing import Dict, Optional, Type, Union
import teetime
from . import core, package_managers
__all__ = [
"VirtualEnvironment",
"VirtualEn... |
# Dark Mode Toggle
🐧 Dark mode toggle using button click!


|
/**
* Copyright 2016 Damian Glinkowski <damianglinkowski@gmail.com>
*/
#include "./Color.h"
Color::Color()
: r(0.0f), g(0.0f), b(0.0f), a(1.0f) {
}
Color::Color(float r, float g, float b)
: r(r), g(g), b(b), a(1.0f) {
}
Color::Color(float r, float g, float b, float a)
: r(r), g(g), b(b), a(a) {
}
Col... |
/**
* Created by Kelvin on 6/16/2016.
*/
(function() {
'use strict';
angular.module('tiffanyAndKelvin')
.controller('RSVPCodeCtrl', RSVPCodeCtrl);
function RSVPCodeCtrl(RSVPFactory, $state) {
var vm = this;
vm.form = {};
vm.formModel = {
code: ''
};
... |
class BoggleGame {
/* make a new game at this DOM id */
constructor(boardId, secs = 60) {
this.secs = secs; // game length
this.showTimer();
this.score = 0;
this.words = new Set();
this.board = $("#" + boardId);
// REMOVE - Added this in because i couldn't get for... |
<?php
namespace Omnipay\Yeepay\Requests;
use Omnipay\Yeepay\Common\Signer;
use Omnipay\Yeepay\Request\YeepayPurchaseRequest;
use Omnipay\Yeepay\Responses\YeepayPurchaseResponse;
use Omnipay\Common\Exception\InvalidRequestException;
/**
* Class YeepayWebPurchaseRequest
* @package Omnipay\Yeepay\Requests
*/
class Y... |
#!/usr/bin/bash
#target location of script: /tensorflow/containerstarter.sh
echo -e "changeme" | (passwd --stdin tensorflow)
printf "changemee\nchangemee\n\n" | vncpasswd
vncserver
sleep infinity
|
/* @flow */
import type { MismatchedModules, UpdateDepsPromptResults } from '../../types';
const path = require('path');
const getSingleEntryFromGenerator = require('./getSingleEntryFromGenerator');
const parseConfig = require('gluestick-generators').parseConfig;
const { isValidVersion, promptModulesUpdate } = require... |
/**
* External dependencies
*/
import { __ } from '@wordpress/i18n';
export const sellingVenueOptions = [
{
key: 'no',
label: __( 'No', 'woocommerce' ),
},
{
key: 'other',
label: __( 'Yes, on another platform', 'woocommerce' ),
},
{
key: 'other-woocommerce',
label: __(
'Yes, I own a different sto... |
package scala.build.options
import scala.build.Positioned
import scala.build.errors.{BuildException, MalformedInputError}
import scala.build.internal.Licenses
final case class PublishOptions(
organization: Option[Positioned[String]] = None,
name: Option[Positioned[String]] = None,
version: Option[Positioned[Str... |
package com.stripe.android;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import com.stripe.android.exception.InvalidRequestException;
import com.stripe.android.utils.ObjectUtils;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import ja... |
package com.task.noteapp.features.notes.data.datasource
import com.task.noteapp.db.NotesDao
import com.task.noteapp.db.entity.NoteEntity
import com.task.noteapp.db.entity.NoteHistoryEntity
import javax.inject.Inject
/**
* Created by Bulent Turkmen on 29.09.2021.
*/
class NotesLocalDataSource @Inject constructor(
... |
export declare const initUsersDB: () => boolean;
export declare const initLicencesDB: () => boolean;
|
---
title: Micro layouts
description: >
Build flexible components that can be placed anywhere.
authors:
- adactio
date: 2021-11-03
--- |
import { CommonModule } from '@angular/common'
import { NgModule } from '@angular/core'
import { FormsModule, ReactiveFormsModule } from '@angular/forms'
import { MaterialModule } from '@exlibris/exl-cloudapp-angular-lib'
import { ColumnOptionComponent } from './column-option.component'
import { ColumnOptionsListCompon... |
import {
Component,
DebugElement,
ErrorHandler,
NO_ERRORS_SCHEMA
} from '@angular/core';
import { TestBed } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { RouterTestingModule } from '@angular/router/testing';
import {
Observable,
Subject
} from 'rxjs';
import { creat... |
#include "server.h"
#include "tcpserver.h"
#include "tcpclient.h"
#include <QHostAddress>
#include <QMessageBox>
#include <QDebug>
#include "mainwidget.h"
#include "dao.h"
#include <QJsonDocument>
#include <QJsonObject>
#include "enums.h"
#include <QJsonArray>
#include <QThread>
extern MainWidget* mw;
Server* Server::s... |
#!/usr/bin/env bash
set -e
set -m
SCENARIO="oidc-login-strapi"
STRAPI_FOLDER=${PWD}/ci/tests/puppeteer/scenarios/${SCENARIO}/strapi
pid=$(cat $STRAPI_FOLDER/strapi.pid)
echo "Killing any processes strapi script started"
# msys2 ps doesn't support ps format (e.g. -o)
kill $(ps | grep $pid | awk '{print $1}')
|
'use strict';
var assert = require('assert');
var defer = require('./defer');
var p = require('../');
describe('p.all', function () {
describe('resolution', function () {
var first, second;
beforeEach(function () {
first = defer();
second = defer();
// Out-of-order so we can test the o... |
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Profile extends Model
{
protected $guarded = [];
public function user()
{
return $this->belongsTo('App\User');
}
public function santa()
{
return $this->hasMany('App\User', 'id', 'santa_id');
}
public... |
'''
DIVISIBILITY OF STRINGS:
FIND IF STRING s IS DIVISIBLE BY t
IF YES,
THEN FIND u, ON REPEATING WHICH WE GET BOTH s AND t
RETURN LENGTH OF u
ELSE RETURN -1
EXAMPLE:
i/p: s="abcabcabcabc" t="abcabc"
o/p: 3 (AS |u|=|"abc"|=3)
'''
def FSD2(s, t):
temp = ""
for i in range(0, int(len(s... |
using System.Threading.Tasks;
using DemoWeb.Models;
namespace DemoWeb.Services
{
public interface ITranscriptRepository
{
Task AddToTranscript(int studentId, CreateTranscript transcript);
Task<Transcript> GetTranscript(int studentId, int courseId);
}
}
|
#!/usr/bin/env node
'use strict';
require('colorful').colorful();
const program = require('commander');
const pkg = require('../../package.json');
// fire-tools -v
// fire-tools -h
program.version(pkg.version, '-v, --version').usage('<command> [options]');
program.command('run [name]', 'run specified task'); // 如果存在... |
/*
* Copyright 2015 Alexey Andreev.
*
* 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... |
-- PGOPTIONS=--search_path=stdb psql -d simpletrack -U stdb_user -f schema.sql
create or replace function nonempty(text) returns boolean as $$
select length(trim($1)) > 0
$$ language sql strict immutable;
-- remove tables in reverse order
drop table if exists asset_meta;
drop table if exists asset_meta_type;
drop t... |
package com.example.androidmapspolylines.UI.Interfaces
import com.example.androidmapspolylines.Models.Ride
interface BottomSheetInterface {
fun callbackMethod(rideMode: String?)
fun callbackSpqcialReq(rideReq: Ride)
} |
using Plots,FFTW
using JLD2
for (ind, arg) in enumerate(ARGS)
t = typeof(arg)
msg = "$(ind) -> $arg :$t"
println(msg)
end
function sqaure_windowing_signal(signal::Array{Float64})
windowed_signal = signal
window_correction_factor = 1
return (windowed_signal,window_correction_factor)
end
functi... |
use simpletcp::simpletcp::{Message, TcpServer, TcpStream};
use std::thread::{sleep, spawn};
use std::time::Duration;
fn main() {
let server = TcpServer::new("127.0.0.1:4234").unwrap();
spawn(|| {
//Give server some time to start
sleep(Duration::from_millis(50));
client_thread();
});... |
module Rescore where
import qualified Data.Char as C
import Database.Persist
import Common
import Score
rescore :: Entity Contest -> [String] -> DatabaseM ()
rescore c args' = case args' of
[] ->
usage
cmd':args ->
case lookup (fmap C.toLower cmd') dispatch of
Nothing ->
... |
<?php
namespace inklabs\kommerce\ActionHandler\User;
use inklabs\kommerce\Action\User\ResetPasswordCommand;
use inklabs\kommerce\Entity\Cart;
use inklabs\kommerce\Entity\TaxRate;
use inklabs\kommerce\Entity\User;
use inklabs\kommerce\Entity\UserRole;
use inklabs\kommerce\Entity\UserToken;
use inklabs\kommerce\Event\Re... |
class StoryIndexForComments < ActiveRecord::Migration[6.0]
def change
remove_index :stories, name: "index_stories_on_is_expired"
remove_index :stories, name: "index_stories_on_is_moderated"
remove_index :stories, name: "is_idxes"
add_index :stories, [:id, :is_expired]
end
end
|
---
title: Cyrus Biotechnology
site: https://cyrusbio.com
logo: cyrus.svg
---
|
class OrganismsController < ApplicationController
def kingdom
render json: Organism.kingdom
end
def phylum
render json: Organism.phylum
end
def klass
render json: Organism.klass
end
def order
render json: Organism.order
end
def family
render json: Organism.family
end
def ... |
package observer.screens;
import java.util.Observable;
public class CurrentConditionsScreen extends AbstractScreenObserver {
public CurrentConditionsScreen(Observable weatherData) {
super(weatherData);
}
@Override
public void processData() {
//do nothing
}
public void displa... |
/**
* Copyright (c) 2017 Bevan Hunt. All rights reserved.
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
package cmd
import (
"fmt"
"log"
"net/url"
"strconv"
"strings"
"time"
"github.com/bevanhunt/gowrex"
"github.com/dixonwille/w... |
from django.contrib import admin
from src.apps.books.models import Book, BookAuthorship
class BookAuthorshipAdminInline(admin.TabularInline):
model = BookAuthorship
extra = 0
@admin.register(Book)
class BookAdmin(admin.ModelAdmin):
list_display = ('id', 'title', 'publisher')
filter_horizontal = ('a... |
<?php
declare(strict_types=1);
namespace Tests\Brille24\SyliusCustomerOptionsPlugin\Behat\Context;
use Behat\Behat\Context\Context;
use Brille24\SyliusCustomerOptionsPlugin\Entity\CustomerOptions\CustomerOptionGroupInterface;
use Brille24\SyliusCustomerOptionsPlugin\Entity\CustomerOptions\CustomerOptionInterface;
us... |
Using `strings.Builder` is overkill for this simple use case.
Use `fmt.Sprintf` or simple concatenation using the `+` operator, instead.
|
package me.star.security.controller;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import me.star.security.service.OnlineUserService;
import me.star.utils.EncryptUtils;
import org.springframework.data.domain.Pageable;
import org.springframework.ht... |
using hw.UnitTest;
using Reni.FeatureTest.Helper;
namespace Reni.FeatureTest.Function
{
[UnitTest]
[Target(@"f: @100;f() dump_print;")]
[Output("100")]
[Function]
public sealed class ConstantFunction : CompilerTest {}
} |
package funcify.feature.naming.impl
import funcify.feature.naming.NameSegment
/**
*
* @author smccarron
* @created 3/16/22
*/
data class DefaultNameSegment(override val value: String) : NameSegment {
override fun toString(): String {
return value
}
}
|
module SampleFeeds
FEEDS = {
sample_atom_feed: "AmazonWebServicesBlog.xml",
sample_atom_middleman_feed: "FeedjiraBlog.xml",
sample_atom_xhtml_feed: "pet_atom.xml",
sample_atom_feed_line_breaks: "AtomFeedWithSpacesAroundEquals.xml",
sample_atom_entry_content: "AmazonWebServicesBlogFirstEntryContent... |
require 'thread'
module Imggrabber
module Adapters
class ThreadsAdapter
def self.run(number, path, images)
queue = Queue.new
images.each { |image| queue << image }
threads = number.times.map do
Thread.new do
while !queue.empty? && image = queue.pop
... |
1 2 5 6 8 9 10
2 5 6 11
3 1 2 6 7 9 10
4 1 2 3 5 6 7 10 11
5 3 7 10
6 5 9 10 11
7 1 2 6 11
8 2 3 4 5 6 7 10 11
9 2 4 5 7 8 10
10 2 7
11 1 3 5 9 10 |
package examples
object RecordDefinitionExample {
import shapeless._
import record._
import ops.hlist.{ToList,Align}
import ops.record.{ Keys, Values }
import shapeless.labelled._
import syntax.singleton._
case class Person(firstName:String, lastName:String, age:Int)
val personGen = LabelledGeneric[Pe... |
package io.github.zeyomir.cv.overview.certificates
import io.github.zeyomir.cv.domain.entity.CvCertificate
import io.github.zeyomir.cv.domain.repository.CvRepository
import io.reactivex.Observable
class StreamCvCertificatesUseCase(
private val repository: CvRepository
) {
fun execute(): Observable<List<CvCert... |
# Skydot
Skydot Architecture Diagram:
![alt text][diagram]
[diagram]: https://github.com/lexibrown/Skydot/blob/master/images/lowleveldiagram.PNG "Low Level Diagram" |
package root
import (
"github.com/BurntSushi/wingo/prompt"
"github.com/BurntSushi/xgbutil"
"github.com/BurntSushi/xgbutil/ewmh"
"github.com/BurntSushi/xgbutil/keybind"
"github.com/BurntSushi/xgbutil/xevent"
"github.com/BurntSushi/xgbutil/xgraphics"
"github.com/BurntSushi/xgbutil/xwindow"
"github.com/levavakian... |
package controller;
import authoring.frontend.exceptions.MissingPropertiesException;
import frontend.StageManager;
/**
* Interface that both controllers in the Authoring/GamePlay MVC setups must
* implement. Used to maximized shared responsibility of View class.
* @author Sarahbland
*
*/
public interface MVContr... |
---
title: Expand the tab heigh to 100%
page_title: Expand the tab heigh to 100%
description: Expand the tab heigh to 100%
---
# Expand the tab heigh to 100%
The following runnable sample demonstrates how to expand the tab heigh to 100% of the parent container.
#### Example:
```html
<div id="tabstrip">
<u... |
using System;
using Couchbase.Core.Version;
namespace Couchbase.Linq.Versioning
{
/// <summary>
/// Constants for the Couchbase versions where new features are implemented.
/// </summary>
internal static class FeatureVersions
{
/// <summary>
/// Default version we assume if we can'... |
import csv
def WriteListToCSV(outname, list, delim):
'''
Function to write a list of lists into a csv-file. Each entry in the list is thereby a new line
--> the function is designed towards the standard output of may of my analyses.
PARAMETERS
----------
outname : string (required)
Pat... |
---
layout: watch
title: TLP4 - 30/05/2019 - M20190530_224233_TLP_4T.jpg
date: 2019-05-30 22:42:33
permalink: /2019/05/30/watch/M20190530_224233_TLP_4
capture: TLP4/2019/201905/20190530/M20190530_224233_TLP_4T.jpg
---
|
import { Location } from "../types";
import { DistanceMatrix } from "../types/distance-matrix.type";
export interface GoogleMatrixClient {
getDistance: (originArr: Location[], destinationArr: Location[]) => Promise<DistanceMatrix>
} |
using System;
using System.Data.SQLite;
using System.IO;
using ClickHouse.Ado;
namespace Test.ClickHouse.DbLoad {
class Program {
static void Main(string[] args) {
var dbfilename = Path.GetFullPath("Northwind.db3");
ClickHouseConnectionSettings set = new ClickHouseC... |
var group__group__cryptolite__sha__data__structures =
[
[ "cy_stc_cryptolite_sha_desc_t", "structcy__stc__cryptolite__sha__desc__t.html", null ],
[ "cy_stc_cryptolite_sha_context_t", "structcy__stc__cryptolite__sha__context__t.html", null ]
]; |
// 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 use ... |
import pandas
import random
from tkinter import *
BACKGROUND_COLOR = "#B1DDC6"
def get_word():
""" Gets a random word from the word list and updates the card to show the details"""
global timer, word_data
window.after_cancel(timer)
word_data = random.choice(word_list)
canvas.itemconfig(card_bg, ... |
# Pathos API Documentation for `SystemError`
```swift
public enum SystemError
```
An error returned by the OS.
### Conforms to
* Equatable
* Error
### Nested type aliases
```swift
public typealias Code
```
On macOS and Linux, it is aliased to `Int32`. On Windows, it is `UInt32`.
### Initializers
```swift
publ... |
import React, {useState} from 'react'
import Long from 'long'
import IconButton from '@material-ui/core/IconButton'
import { Button } from '@material-ui/core'
import { IndexingService } from 'moneystream-wallet'
import { PopupProps } from '../types'
import { WalletBalance } from './WalletBalance'
export const SendWall... |
using System;
using Amazon.DynamoDb.Models;
namespace Amazon.DynamoDb;
public sealed class UpdateTimeToLiveRequest
{
public UpdateTimeToLiveRequest(string tableName, string attributeName, bool enabled)
{
ArgumentNullException.ThrowIfNull(tableName);
TableName = tableName;
... |
// Copyright (C) 2021 Reece H. Dunn. SPDX-License-Identifier: Apache-2.0
package opennlp.ext.tests.token
import opennlp.ext.token.Token
import opennlp.ext.token.tokenize
import opennlp.tools.util.Span
import org.hamcrest.CoreMatchers.`is`
import org.hamcrest.MatcherAssert.assertThat
import org.junit.jupiter.ap... |
=head1 NAME
PPIx::Regexp::Node::Range - Represent a character range in a character class
=head1 SYNOPSIS
use PPIx::Regexp::Dumper;
PPIx::Regexp::Dumper->new( 'qr{[a-z]}smx' )
->print();
=head1 INHERITANCE
C<PPIx::Regexp::Node::Range> is a
L<PPIx::Regexp::Node|PPIx::Regexp::Node>.
C<PPIx::Regexp::Node::Rang... |
---
title: Building instant features with advanced Plone themes
date: "2017-10-23T06:00:00Z"
tags: ["chameleon", "plone", "requirejs", "templating", "theming"]
---
Plone, "[The Ultimate Enterprise CMS](https://plone.com/)", ships with
built-in batteries for building sophisticated content management
solutions without w... |
/*
Copyright(c) 2013 Andrew Fray
Licensed under the MIT license. See the license.txt file for full details.
*/
using System;
using System.Collections.Generic;
using System.Linq;
namespace UnTest {
public static class Assert {
public static void IsTrue(bool condition) {
if (condition == false) {... |
// Automatically generated - do not modify!
package typescript
external interface GetCompletionsAtPositionOptions : UserPreferences {
/**
* If the editor is asking for completions because a certain character was typed
* (as opposed to when the user explicitly requested them) this should be set.
*/
... |
import Discord from 'discord.js';
import { exit } from 'process';
import commands from './commands'
const prefix = process.env.DISCORD_PREFIX || '!';
const client = new Discord.Client();
client.once('ready', () => {
console.log('ready!');
});
client.on('message', message => {
if (!message.content.startsWith(pre... |
package org.cloudfoundry.credhub.controllers.v1.management
import org.assertj.core.api.Assertions.assertThat
import org.cloudfoundry.credhub.helpers.CredHubRestDocs
import org.cloudfoundry.credhub.helpers.MockMvcFactory
import org.cloudfoundry.credhub.helpers.credHubAuthHeader
import org.cloudfoundry.credhub.managemen... |
using Kirinji.LightWands;
using Kirinji.LinqToObservableCollection.Support;
using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Kirinji.LinqToObservableCollection.Impl
{
sealed class Moved<T> : IMoved<T>
... |
#!/bin/bash
source activate dema
src_lang="en"
tgt_lang="de"
load_path="../saved_exps/${tgt_lang}"
data_path="../data"
CUDA_VISIBLE_DEVICES=2 OMP_NUM_THREADS=4 python -u ../evaluation/export_embs.py \
--src_lang ${src_lang} \
--tgt_lang ${tgt_lang} \
--s2t_map_path ${load_path}/best_s2t_params.bin \
... |
require "httparty"
require "open-uri"
require "redis"
require "sequel"
require_relative "../lib/fiber_scheduler"
DB = Sequel.postgres
Sequel.extension(:fiber_concurrency)
FiberScheduler do
Fiber.schedule do
URI.open("https://httpbin.org/delay/2")
end
Fiber.schedule do
HTTParty.get("https://httpbin.org/... |
package typingsSlinky.googleVisualization.google.visualization
import typingsSlinky.googleVisualization.anon.CellColor
import typingsSlinky.googleVisualization.anon.Colors
import typingsSlinky.googleVisualization.anon.IsHtml
import org.scalablytyped.runtime.StObject
import scala.scalajs.js
import scala.scalajs.js.`|`
... |
require 'spec_helper'
describe Lab42::Stream do
context 'lazy_take_while (until)' do
context "empty" do
it 'is empty for empty' do
expect( empty_stream.lazy_take_while :true ).to be_empty
end
end # context "empty"
context "finite" do
let(:three){1..3}
subject do
... |
import 'package:flutter_mvp/bean/hot_bean_entity.dart';
import 'package:flutter_mvp/bean/header_bean_entity.dart';
import 'package:flutter_mvp/bean/home_bean_entity.dart';
import 'package:flutter_mvp/bean/catetory_bean_entity.dart';
class EntityFactory {
static T generateOBJ<T>(json) {
if (1 == 0) {
return... |
using System;
namespace REFrostedViewController {
/// <summary>
/// Direction enum
/// </summary>
public enum REFrostedViewControllerDirection {
Left = 0,
Right = 1,
Top = 2,
Bottom = 3,
}
/// <summary>
/// Style enum
... |
---
title: "Managing disk partitions in Linux"
description: ""
author: "John Paul"
date: "2019-01-31"
tags: ["linux"]
---
The `fdisk` (format disk/fixed disk) command is used to view, create, resize,
delete, change, copy and/or move partitions on a hard-drive. You must use the
command as root.
To list all disk partit... |
package typingsSlinky.typeorm.typingsMod
import typingsSlinky.node.Buffer
import org.scalablytyped.runtime.StObject
import scala.scalajs.js
import scala.scalajs.js.`|`
import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess}
@js.native
trait MongoClientOptions extends StObject {... |
package com.exercise.data.gateway
import com.exercise.data.entity.RepositoriesEntity
import com.exercise.data.network.service.RepositoriesNetworkService
import com.exercise.domain.entity.Repositories
import com.exercise.domain.gateway.RepositoriesGateway
import com.exercise.domain.mapper.Mapper
import io.reactivex.rxj... |
require("dotenv").config();
const Registry = require("../models/registry");
const express = require("express");
const router = require("express").Router({ mergeParams: true });
router.use(express.json());
const { findRegistryById } = require("../middleware");
// GET Registry table
router.get("/", async (req, res) =... |
package typingsSlinky.electron.Electron
import org.scalablytyped.runtime.StObject
import scala.scalajs.js
import scala.scalajs.js.`|`
import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess}
@js.native
trait WebSource extends StObject {
// Docs: https://electronjs.org/docs/... |
Rails.application.routes.draw do
get 'gem-versions' => 'viscera/viscera#index'
end |
require 'spec_helper'
describe SalsaLabs::ObjectsFetcher do
let(:client) do
double(
'API client',
fetch: File.read('spec/fixtures/getObjects.sjs_action.xml')
)
end
describe "#fetch" do
before(:each) do
allow(SalsaLabs::ApiClient).to receive(:new) { client }
end
it "calls t... |
package me.vovak.astminer.examples
import astminer.common.model.Node
import astminer.parse.java.GumTreeJavaParser
import java.io.File
const val INPUT_PATH = "input.java"
data class ParameterDefinition(val type: String, val name: String) {
override fun toString() = "$type $name"
}
data class ReturnStatements(val... |
CREATE PROCEDURE dbo.sp_crm_table_restore @ProcessId INT, @BackupTablePrefix NVARCHAR(36),
@ControlSchemaName NVARCHAR(36), @ControlTableName NVARCHAR(100), @LastUpdate DATETIME2(3)
AS
DECLARE @SinkSchemaName NVARCHAR(36);
DECLARE @SinkTableName NVARCHAR(100);
DECLARE @sql NVARCHAR(MAX) = '
SEL... |
from api.node.messages import LOG_NODE_UPDATE
from api.task.utils import callback, task_log_error, mgmt_lock
from api.task.internal import InternalTask
from vms.models import Node, DefaultDc
from que import TG_DC_UNBOUND
from que.tasks import cq, execute, get_task_logger
from que.mgmt import MgmtCallbackTask
__all__ =... |
function Install-LabModule {
<#
.SYNOPSIS
Installs Lability PowerShell and DSC resource modules.
.DESCRIPTION
The Install-LabModule cmdlet installs PowerShell modules and/or DSC resource modules from Lability's
module cache in to the local system. The DSC resources and/or PowerShell modu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.