content stringlengths 10 4.9M |
|---|
THE
MODERN MIND
An Intellectual History of the 20th Century
PETER WATSON
# CONTENTS
Cover
Title Page
Preface
Introduction: An Evolution in the Rules of Thought
[PART ONE
FREUD TO WITTGENSTEIN The Sense of a Beginning](9780062039125_epub_p01_r1.html)
1 Disturbing the Peace
2 Half-way House
3 Darwin's He... |
// ====================================================================================================================
// Constructor / destructor / create / destroy
// ====================================================================================================================
DecCu::DecCu()
{
#if JVET_M0427_I... |
<reponame>tilotech/tilores-cli
package cmd
const applicationName = "TiloRes"
const applicationNameLower = "tilores"
const toolName = "tilores-cli"
const generatedMsg = "Code generated by github.com/tilotech/tilores-cli, DO NOT EDIT."
|
<filename>solr/core/src/test/org/apache/solr/core/CachingDirectoryFactoryTest.java
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses ... |
<filename>snowplowtrk.go<gh_stars>1-10
//
// Copyright (c) 2016 Snowplow Analytics Ltd. All rights reserved.
//
// This program is licensed to you under the Apache License Version 2.0,
// and you may not use this file except in compliance with the Apache License Version 2.0.
// You may obtain a copy of the Apache Licen... |
<reponame>Timicapstone/minstrel-Usyd
// SPDX-License-Identifier: GPL-2.0
/******************************************************************************
*
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
*
******************************************************************************/
#define _R... |
/**
Save user options as preferences.
*/
public void savePrefs() {
prefs.setPref(HEADING_LEVEL_START, headingLevelStartSlider.getValue());
prefs.setPref(HEADING_LEVEL_END, headingLevelEndSlider.getValue());
} |
// Stop set lifecycle status to stopped
func (l *LifeCycle) Stop() {
l.stopLock.Lock()
l.stopped = true
l.stopLock.Unlock()
} |
/// A very permissive set of default for quick development. Not recommended for production use.
///
/// *All* origins, methods, request headers and exposed headers allowed. Credentials supported.
/// Max age 1 hour. Does not send wildcard.
pub fn permissive() -> Self {
let inner = Inner {
al... |
<reponame>InnaBoitsun/BetterRetailGroceryTest
/// <reference path='../../../Typings/tsd.d.ts' />
/// <reference path='../../JQueryPlugins/ISerializeObjectJqueryPlugin.ts' />
/// <reference path='../../Mvc/Controller.ts' />
/// <reference path='../../ErrorHandling/ErrorHandler.ts' />
/// <reference path='../../Mvc/ICont... |
/**
* As you can see, those test docent fail
* The reason for its previous failure was because you were using List to store employeeSkills
* in the Schedule domain while Set was being used in the DTO. So when you call copyProperties on bean utils,
* this particular field is skipped. Please check the... |
Donald Trump Jr. blasted a “Shakespeare in the Park” play sponsored by the New York Times and other corporations that depicts the assassination of a character that resembles President Donald Trump.
“I wonder how much of this ‘art’ is funded by taxpayers,” Trump Jr. tweeted Sunday along with a link to a story about the... |
/**
* A simple {@link Fragment} subclass.
*/
public class Help_Fragment extends Fragment {
String TAG = "HelpFragment";
/**
* This is the callback variable, for the button to launch the server or client fragment from the mainActivity.
*/
private OnFragmentInteractionListener mListener;
/*... |
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server... |
/**
* A {@link RequestHandler2} for use as an SPI by the AWS SDK to automatically trace all requests.
*/
public class TracingRequestHandler extends RequestHandler2 {
private static final RequestHandler2 DELEGATE =
AwsSdkTracing.builder(GlobalOpenTelemetry.get())
.setCaptureExperimentalSpanAttribute... |
Giovinco agent blasts rumours
By Football Italia staff
Sebastian Giovinco is linked with Torino, Inter, Genoa and Parma, but his agent insists he “never considered leaving Juventus.”
The Atomic Ant was one of Italy’s brightest young prospects, but he turns 27 next month and has made only 13 appearances for Juve in a... |
<reponame>DVSR1966/par4all<filename>packages/PIPS/validation/Outlining/outline18.c
#define size 100
typedef struct {
int val;
} my_type;
///@brief update particles features
int main (void) {
my_type t[10];
for(int i = 0; i < 10; i ++) {
t[i].val= i;
}
// go through my types
for(int i = 0; i < 10; i +... |
/**
*
* @author Krzysztof Marecki
*/
public class SqlGenerator {
public class QueryParameter {
private int parameterIndex;
public int getParameterIndex() {
return parameterIndex;
}
private String parameterName;
public String getParamet... |
//Recursively get the absolute on-screen y-coordinate of this window
int Window_screen_y(Window* window) {
if(window->parent)
return window->y + Window_screen_y(window->parent);
return window->y;
} |
def choice_input(prompt, choices, enumeration='number', error_message=None):
from string import ascii_uppercase
if enumeration == 'number':
chars = [str(x + 1) for x in range(len(choices))]
elif enumeration == 'char':
assert len(choices) < 27, "Choices can't be represented by single chars"
... |
/**
* Created by tc :)
*/
public class TitleMoreProvider extends BaseItemProvider<Title, BaseViewHolder> {
@Override
public int viewType() {
return Constant.UIType.TYPE_TITLE_MORE;
}
@Override
public int layout() {
return R.layout.rv_item_title_more;
}
@Override
publ... |
<gh_stars>0
/*
Copyright 2019 The Kubernetes 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 agreed to ... |
<gh_stars>0
import React, { useEffect, useState } from 'react';
import {
Text,
View,
ScrollView,
SafeAreaView,
TouchableOpacity
} from 'react-native';
import { Icon } from 'react-native-elements';
import { styles, StyledSearchBar, Container } from './style';
import GlobalState from '../../store';
import globa... |
/**
* Creates the federate node initial object graph.
*/
public class FedNodeContext extends RskContext {
private FedNodeSystemProperties fedNodeSystemProperties;
private BtcToRskClient.Factory btcToRskClientFactory;
private BtcToRskClient btcToRskClientActive;
private BtcToRskClient btcToRskClientRe... |
<filename>difc-kernel/pileus-kernel/arch/arm/mach-orion5x/irq.c
/*
* arch/arm/mach-orion5x/irq.c
*
* Core IRQ functions for Marvell Orion System On Chip
*
* Maintainer: <NAME> <<EMAIL>>
*
* This file is licensed under the terms of the GNU General Public
* License version 2. This program is licensed "as is" wit... |
// String stringifies an internal BDD node labaeling the plies with the given vocabulary v.
func (n Internal) String(v ...[]string) string {
switch len(v) {
case 0:
return fmt.Sprintf(
"(%v/T: %v, %v/F: %v)",
n.Ply, n.True.String(v...), n.Ply, n.False.String(v...),
)
case 1:
return fmt.Sprintf(
"(%v/T... |
/** <pre>
* Modify Information:
* Author Date Description
* ============ ============= ============================
* lilei 2019/10/8 Create this file
* </pre>
*/
public class ConditionalTest {
@Test
public void switchTest() {
String json = "{" +
"branches... |
<commit_msg>Rename `App` to `ConfigApp`, `Deps` to `ConfigDeps`<commit_before>package main
import "github.com/BurntSushi/toml"
type Config struct {
App App `toml:"application"`
Deps Deps `toml:"dependencies"`
}
type App struct {
Name string
Version string
Authors []string
}
type Deps map[string]string
fu... |
// Tokenize turns textual definition into a series of valid tokens.
// If no valid token is found at given place, char at 0 position is returned.
func (tp *TextParser) Tokenize(
data []byte, EOF bool,
) (advance int, token []byte, err error) {
if EOF {
return
}
switch {
case data[0] == '\n':
err = EndScan{}
c... |
<gh_stars>0
//
// Created by DefTruth on 2021/11/13.
//
#include "ncnn_glint_partial_fc.h"
using ncnncv::NCNNGlintPartialFC;
void NCNNGlintPartialFC::transform(const cv::Mat &mat, ncnn::Mat &in)
{
// BGR NHWC -> RGB NCHW
int h = mat.rows;
int w = mat.cols;
in = ncnn::Mat::from_pixels_resize(
mat.data, ... |
/**
* Returns the reciprocal of the rank of the first relevant document
* retrieved, or zero if no relevant documents were retrieved.
*/
public double reciprocalRank() {
if (_relevantRetrieved.size() == 0) {
return 0;
}
return 1.0 / (double) _relevantRetrieved.get(0).r... |
import java.util.*;
public class qd{
public static void main(String args[]){
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
int k=sc.nextInt();
int a=sc.nextInt();
int b=sc.nextInt();
int r[]={(b-a)%k,(a-b)%k,(b+a)%k,(-b-a)%k};
long max=0,min=... |
def lcm(*nums):
lcm_val = nums[0]
for num in nums[1:]:
lcm_val = lcm_val * num // fractions.gcd(lcm_val, num)
return lcm_val |
import binascii
import random
from django.conf import settings
from jsonrpc import EthJsonRpc
ethereum_client = EthJsonRpc(settings.ETHEREUM_HOSTNAME, settings.ETHEREUM_PORT)
class ChannelStage(object):
EMPTY = 0
PARTIALLY_CONFIRMED = 1
CONFIRMED = 2
CLOSING = 3
CLOSED = 4
def is_available(ci... |
def representative(self):
return self._element.get('representative', False) == 'true' |
/**
* Converts data of this object to a JSON string and writes it to the given file
* @param file File the data should be written into
* @param prettyPrint If true will add extra spacers and line breaks for easy human reading
* @throws IOException if error while writing occurs
*/
public void toFile(File file,... |
<reponame>transceptor-technology/siridb-server
/*
* shard.c - SiriDB shard file.
*/
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#include <assert.h>
#include <ctree/ctree.h>
#include <imap/imap.h>
#include <limits.h>
#include <logger/logger.h>
#include <siri/db/series.h>
#include <siri/db/shard.h>
#include <siri/db... |
package plans
import (
"github.com/hashicorp/terraform-plugin-sdk/internal/addrs"
"github.com/hashicorp/terraform-plugin-sdk/internal/states"
"github.com/zclconf/go-cty/cty"
)
// Changes describes various actions that Terraform will attempt to take if
// the corresponding plan is applied.
//
// A Changes object ca... |
/* write count bytes from buf into file starting at offset pos,
* all bytes are assumed to be allocated to file, so file should
* be extended before calling this routine */
int unifyfs_fid_write(int fid, off_t pos, const void* buf, size_t count)
{
int rc;
if (count == 0) {
return UNIFYFS_SUCCESS;
... |
def channel_from_xmltv_list(xml_chan: Element) -> Channel:
chan = Channel.__new__(Channel)
chan.load_xmltv_data(xml_chan)
return chan |
/**
* @author Chen Keinan
*/
@Component
@Scope(BeanDefinition.SCOPE_PROTOTYPE)
public class LoginRelatedDataService implements RestService {
@Autowired
private CentralConfigService centralConfigService;
@Override
public void execute(ArtifactoryRestRequest request, RestResponse response) {
Ce... |
<filename>src/pages/components/pages/image/image.config.ts
export default {
navigationBarTitleText: 'Image组件'
}
|
[n, q] = map(int, raw_input().split())
originalTape = raw_input()
def solve(tape):
direction = 1
position = 0
buckets = [0] * 10
n = len(tape)
last = -1
while (0 <= position < n):
# print ''.join(tape), ('\n'+position*' '+'^'), '\n'
if tape[position] in '0123456789':
buckets[int(tape[posit... |
/**
* The configuration class for running multiple tests in a batch.
*/
@Entity
public class TestExecutionConfig implements Serializable {
private static final long serialVersionUID = -1523151999366958537L;
/** The id of the config in the database. */
@Id
@GeneratedValue
private Long id;
/*... |
def sample_plate_external_barcode(plate_id):
sample_plate = db.session.query(Plate).filter_by(plate_id=plate_id).first()
if request.method == 'GET':
sample_plate_dict = {
"plate_id": plate_id,
"externalBarcode": sample_plate.external_barcode,
}
resp = Response(res... |
<filename>serde-generate/src/lib.rs
// Copyright (c) Facebook, Inc. and its affiliates
// SPDX-License-Identifier: MIT OR Apache-2.0
//! This crate aims to compile the data formats extracted from Rust by [`serde-reflection`](https://crates.io/crates/serde-reflection)
//! into type definitions and (de)serialization met... |
/**
* Method to know if the message must be filtered.
*
* @param message String message to check
* @return boolean: true if the message is not valid because is filtered, false otherwise.
* @throws MessageException Exception throwed if the message is null or if it's too short or
* ... |
def PS():
uOutput = 0;
uInput = int(input());
if(uInput % 2 == 0):
bQuart = 0;
if(uInput % 4 == 0):
bQuart = 1;
uHalf = uInput // 2;
uOutput = (uHalf // 2) - bQuart;
return uOutput;
def GetDoorIndex(c):
return (ord(c) - ord("A"));
uOpen... |
In 1992, his club Ballinascreen were due to play Castledawson at 1pm on a Sunday. Burns was to bring Paul Hickson and Mickey Boyle to the game. He stopped at Boyle's first. Boyle came out to the car and told him he'd just got a phone call to say the game was off. Someone had died. (In the GAA, someone always dies.) Boy... |
/*
* AT+CIPSTO
* Sets the TCP Server Timneout
*/
bool esp8266_set_AT_CIPSTO(int timeout) {
char *buf;
esp8266_serial_prepare_AT();
esp8266_serial_print("AT+CIPSTO=");
esp8266_serial_printiln(timeout);
buf = esp8266_serial_recv_string2("OK", "FAIL", 10000);
if (strstr((const char *)buf, "OK") ... |
import BookState from "./book.state";
import * as BookActions from './book.actions';
const initialState: BookState = {
all: [],
details: null
}
function getAllBooks(state, action) {
return {
...state,
all: action
}
}
function getBookDetails(state, bookDetails) {
return {
... |
Mayor Eric Garcetti launched a bold initiative today calling for city departments to pursue a goal of eliminating traffic-related deaths by 2025.
The program, called “Vision Zero,” is based on the fundamental principle that traffic deaths can be avoided through strategic, data-driven approaches to engineering, enforce... |
/**
* @deprecated This method may be removed in future. MainFrame should only contain
* a single component assigned via {@link #setContent(GdxComponent)}
*/
@Override
public void insertComponent(int index, GdxComponent component) {
super.insertComponent(index, component);
ComponentUti... |
def find_Circles_ida(image, radii, r_width,verbose = False):
acc = np.zeros((radii.size, image.shape[0], image.shape[1]))
for i, r in enumerate(radii):
C = make_circles(r, r_width)
acc[i, :, :] = fftconvolve(image, C, 'same')
print('Running fft convolution ', i, ' from a total of ', len(... |
<filename>GUI/test/Sets.h
/**
* Project Pegaso
*/
#ifndef _SETS_H
#define _SETS_H
#include <QVector>
#include <QDebug>
#include "Resultado.h"
#include "Set.h"
class Sets: public Resultado {
public:
bool operator==(const Sets &other)const;
QVector<Set *> getSets() const;
void setSets(const QVector... |
Machine Learning-Based Multi-Level Fusion Framework for a Hybrid Voltammetric and Impedimetric Metal Ions Electronic Tongue
: Electronic tongues and artificial gustation for crucial analytes in the environment, such as metal ions, are becoming increasingly important. In this contribution, we propose a multi-level fusio... |
/**
* Method returns artifacts results list of registry content search
*
* @param criteria search criteria
* @param registry registry
* @return search results
* @throws GovernanceException
*/
private static List<GovernanceArtifact> performContentSearch(String criteria, Registry regist... |
<gh_stars>10-100
/* Copyright 2019 The Apollo 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 required by applic... |
n=input()
print n/3 * 2 + [0,1,1][n%3] |
// Parse parses args as PaginationParams.
func (pc PaginationConfig) Parse(args map[string]interface{}) (*PaginationParams, error) {
if pc.isForward() {
if v, ok := args["first"]; ok {
size, ok := v.(int)
if !ok || size < 0 {
return nil, fmt.Errorf("invalid value for \"first\": %v", v)
}
var pivot st... |
/**
* Test class for WebsocketUtil
*/
@RunWith(PowerMockRunner.class)
@PrepareForTest({WebsocketUtilTestCase.class, ServiceReferenceHolder.class, Caching.class, APIUtil.class,
PrivilegedCarbonContext.class, MultitenantUtils.class,
org.wso2.carbon.apimgt.impl.internal.ServiceReferenceHolder.class, Cach... |
package com.trak.sam.collegelog.callback;
import com.trak.sam.collegelog.model.User;
public interface OnUserListItemClick extends BaseItemClick<User> {
}
|
def open(
self,
mode="r",
buffering=-1,
encoding=None,
errors=None,
newline=None,
closefd=True,
opener=None,
ignore_ext=False,
compression=None,
bsm: Optional['BotoSesManager'] = None,
):
s3_client = _resolve_s3_client(c... |
package main
import "fmt"
func main() {
var n, m, a_ij, b_j int
fmt.Scan(&n, &m)
a := make([][]int, n)
for i:=0; i<n; i++ {
a[i] = make([]int, m)
for j:=0; j<m; j++ {
fmt.Scan(&a_ij)
a[i][j] = a_ij
}
}
b := make([]int, m)
for j:=0; j<m; j++ {
fmt.Scan(&b_j)
b[j] = b_j
}
c := make([]int, n... |
/**
* Process rcf checkpoint for total rcf updates polling
* @param checkpointModel rcf model restored from its checkpoint
* @param modelId model Id
* @param detectorId detector Id
* @param listener listener to return total updates of rcf
*/
private void processRcfCheckpoint(
Optio... |
/* Copyright (C) 2008, 2009 <NAME>.
This file is part of the Kate codec library.
Written by <NAME>.
Use, distribution and reproduction of this library is governed
by a BSD style source license included with this source in the
file 'COPYING'. Please read these terms before distributing. */
#ifdef HAVE_... |
<gh_stars>10-100
// Decompiled by DJ v3.12.12.96 Copyright 2011 <NAME> Date: 17/03/2013 01:04:34
// Home Page: http://members.fortunecity.com/neshkov/dj.html http://www.neshkov.com/dj.html - Check often for new version!
// Decompiler options: packimports(3)
// Source File Name: AddNewPayeePage.java
package c... |
import { GraphQLString, GraphQLNonNull, GraphQLObjectType } from "graphql"
import { mutationWithClientMutationId } from "graphql-relay"
import GraphQLJSON from "graphql-type-json"
import { ResolverContext } from "types/graphql"
import { StaticPathLoader } from "lib/loaders/api/loader_interface"
export const GeminiEntr... |
/*
* ** File generated automatically, do not modify **
*
* This file defines the list of modules available in current build configuration
*
*
*/
#define HAVE_OPENCV_CALIB3D
#define HAVE_OPENCV_CONTRIB
#define HAVE_OPENCV_CORE
#define HAVE_OPENCV_FEATURES2D
#define HAVE_OPENCV_FLANN
#define HAVE_OPENCV_GPU
#d... |
// This file is part of ViViA, and is distributed under the
// OSI-approved BSD 3-Clause License. See top-level LICENSE file or
// https://github.com/Kitware/vivia/blob/master/LICENSE for details.
#ifndef __vtkVgAtomic_h
#define __vtkVgAtomic_h
#include <vgExport.h>
#if defined(WIN32) || defined(_WIN32)
#include <... |
<reponame>dmNadim/Numerical-Methods<filename>2. Interpolation and Curve Fitting/1. Linear Interpolation Method.py
## (y - y1) / (x - x1) = (y2 - y1) / (x2 - x1)
y = lambda x, x1, x2, y1, y2: y1 + (y2-y1) / (x2-x1) * (x-x1)
def interpolation(xp, X, Y):
if xp < X[0]:
print("Given x-value is out of range")
... |
from itertools import product
h,w,k = map(int, input().split())
a =[]
for i in range(h):
a.append(input().split())
f=list(product([0,1], repeat=h))
f2=list(product([0,1], repeat=w))
b=0
su=0
for i in f:
for j in f2:
for i2 in range(h):
for j2 in range(w):
if i[i2]==0 and j[j2]=... |
class EngineOperation:
"""Engine Operations
All operations realted to TradeEngine class wrote here
"""
def __init__(self) -> None:
pass
def realized_pnl(self,side:str, volume: float, entry_price: float, close_price: float):
"""caculate realized pnl when position is closed b... |
//
// JXPlayerSongListViewController.h
// WeMusic
//
// Created by satyapeng on 27/7/2018.
//
#import <UIKit/UIKit.h>
@class JOOXiOSSDK;
@interface JXPlayerSongListViewController : UIViewController
@property (strong, nonatomic) JOOXiOSSDK *sdk;
@property (assign, nonatomic) BOOL isADPlaylist;
@property (strong, ... |
import React, { Component } from "react"
import DesktopIcon from "./DesktopIcon";
import Window from "../Windows/Window";
import WindowManager from "../Windows/WindowManager";
import { WindowCreateAction, WindowCreateActionMaker } from './../state/windows/windowsActions';
import { Dispatch } from "redux";
impor... |
/**
* Used to verify if a word is a palindrome
* @param in word to be reveresed
* @return boolean will return true if it is a palindrome, false otherwise
*/
public boolean palindrome(String in){
stack = new Stack<Character>();
for(int i = 0; i < in.length(); i++){
stack.push(in.charAt(i));
... |
<filename>nltk/internals.py
# Natural Language Toolkit: Internal utility functions
#
# Copyright (C) 2001-2021 NLTK Project
# Author: <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# URL: <http://nltk.org/>
# For license information, see LICENSE.TXT
import fnmatch
import locale
import os
import... |
// Returns an instance of delivery client
func (df *deliveryFactoryImpl) Service(g GossipServiceAdapter, ordererSource *orderers.ConnectionSource, mcs api.MessageCryptoService, isStaticLeader bool) deliverservice.DeliverService {
return deliverservice.NewDeliverService(&deliverservice.Config{
IsStaticLeader: i... |
<reponame>prostojs/router<gh_stars>1-10
import {
BasicNode,
TBasicNodeOptions,
TProstoParserHoistOptions,
} from '@prostojs/parser'
import {
EPathSegmentType,
TParsedSegment,
TParsedSegmentParametric,
} from '..'
export function parsePath(expr: string): TParsedSegment[] {
return parser.p... |
// SubscribeToNotifications subscribes to c8y notifications on the Microservice's agent managed object
func (m *Microservice) SubscribeToNotifications(user c8y.ServiceUser, realtimeChannel string, onMessageFunc func(*c8y.Message)) error {
realtime, err := m.NewRealtimeClient(user)
if err != nil {
return errors.New(... |
<filename>cmd/tddtester/tddtester.go<gh_stars>0
package main
import (
"flag"
"fmt"
//"github.com/fsnotify/fsnotify"
"os"
)
var lang string
var directory string
func main() {
flag.StringVar(&lang, "lang", "", "programming language")
flag.StringVar(&dir, "dir", "", "directory to watch")
flag.StringVar(&command... |
/**
* Stores a new SDK profile into the database.
*
* @param sdkProfile
* the sdk profile
* @return the sdk profile dto
* @throws KaaAdminServiceException
* the kaa admin service exception
*/
@RequestMapping(value = "createSdkProfile", method = RequestMetho... |
<reponame>rkorytkowski/teiid<gh_stars>0
/*
* Copyright Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags and
* the COPYRIGHT.txt file distributed with this work.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in co... |
def diagonalize_MT(MT):
eigvals, eigvecs = np.linalg.eig(MT);
eigvals = sorted(eigvals)[::-1];
return np.diag(eigvals); |
<gh_stars>0
package com.vaadin.database.data.entity;
import javax.persistence.*;
import java.util.HashSet;
import java.util.Objects;
import java.util.Set;
@Entity
@Table(name = "telephone_exchanges")
public class Telephone_exchanges {
@Id
@SequenceGenerator(name = "Exchanges_generator", sequenceName = "Excha... |
<reponame>FreeElephants/HexammonClient
import { Component } from "@angular/core";
@Component({
selector: 'grid-component',
templateUrl: 'grid.html',
styleUrls: ['grid.css']
})
export class GridComponent {
rowsNumber: number = 14;
getNumberOfRowsPairAsArray(): Array<number> {
return this.nu... |
<filename>handlers/homepage.go
package handlers
import (
"fmt"
"github.com/gin-gonic/gin"
"github.com/stekostas/fwd-dog/models"
"github.com/stekostas/fwd-dog/services"
"net/http"
"net/url"
"time"
)
type HomepageHandler struct {
TtlOptions map[time.Duration]string
LinkGenerator *services.LinkGenerator
}
t... |
<gh_stars>10-100
/*
* This source file is part of an OSTIS project. For the latest info, see http://ostis.net
* Distributed under the MIT License
* (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
*/
#pragma once
#include "utils/sc_log.hpp"
#include "utils/sc_message.hpp"
#include "ut... |
The American Sociological Association (ASA) has announced that it will launch an (as-yet unnamed) open access general sociology journal as soon as possible (this year, maybe next). Its proposed features are a mix of traditional and new: there will be start-up cash and a stipend for Editors, peer-review is to be on the ... |
/**
* A {@link Converter} that accepts only {@link String} and then invokes a {@link Parser}. If the parser is successful,
* the {@link Function transformer} is used to make the {@link ParserToken} into the target value.
*/
final class ParserConverter<V, P extends ParserContext, C extends ConverterContext> implement... |
This post was updated Aug. 4 at 2:30 a.m.
A cyberattack on a UCLA administration server potentially breached the personal information of about 32,000 students earlier this week, UCLA officials said.
On Monday, UCLA reported an alleged May 18 cyberattack on a Summer Sessions and International Education Office server. ... |
#pragma once
#include "FileSystem/JsonValue.h"
class NavMesh;
namespace NavMeshImporter {
bool ImportNavMesh(const char* filePath, JsonValue jMeta);
bool ExportNavMesh(NavMesh& navMesh, const char* filePath);
} // namespace MaterialImporter |
# -*- coding: utf-8 -*-
"""
Created on Wed Aug 10 14:55:16 2016
@author: Stuart
"""
version = "0.8.0"
|
from packaging import version
from ascmhl.utils import datetime_now_filename_string
import datetime
import os, time
def test_time():
datetime_now_filename = datetime_now_filename_string()
datetime_now_filename_reference = datetime.datetime.strftime(datetime.datetime.utcnow(), "%Y-%m-%d_%H%M%S")
print("d... |
/** A value entity handler */
public class CartEntityRouter extends ValueEntityRouter<ShoppingCartDomain.Cart, CartEntity> {
public CartEntityRouter(CartEntity entity) {
super(entity);
}
@Override
public ValueEntity.Effect<?> handleCommand(
String commandName, ShoppingCartDomain.Cart state, Object c... |
/**
* Created by Administrator on 2019/7/27.
*/
public class QueryShopDetailService extends BaseService {
public QueryShopDetailService(String params) {
super(UrlConstant.SHOP_DETAIL_URL, params);
}
} |
<reponame>ptcfrontend/graphql-relay-py<gh_stars>100-1000
from typing import Any, NamedTuple
from graphql.type import (
GraphQLArgument,
GraphQLArgumentMap,
GraphQLBoolean,
GraphQLField,
GraphQLFieldMap,
GraphQLFieldResolver,
GraphQLInt,
GraphQLList,
GraphQLNonNull,
GraphQLObject... |
/**
* Complete the initialisation process. After this method
* is called no methods should be added to the meta class.
* Invocation of methods or access to fields/properties is
* forbidden unless this method is called. This method
* should contain any initialisation code, taking a longer
... |
/**
* Zooms the scale in/out by the given factor and moves the pixel height to
* the center of the scale.
*
* @param zoomFactor
* @param yZoomCenterPixel
*/
public void zoom(float zoomFactor, int yZoomCenterPixel) {
forceTickRecompute = true;
float centerVal = getValueForH... |
/*
post reports collected so far (pulled from priority queue). return value depends on function execution reason @param status.
if due to EmptyQueue, returns to ReportsScheduler size written so far in order to keep writing new requests until size limit.
if due to SizeLimit, size limit has reached, the process will slee... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.