text
stringlengths
3
1.05M
import os import os.path as osp import shutil import glob import torch from torch_geometric.data import (Data, InMemoryDataset, download_url, extract_zip) class PascalPF(InMemoryDataset): r"""The Pascal-PF dataset from the `"Proposal Flow" <https://arxiv.org/abs/1511.05065>`...
import { useTheme } from '@material-ui/core/styles' import React from 'react' import { ContactLink } from '../components/Link' import { Divider } from '../components/Divider' import { Header, Paragraph, SubHeader } from '../components/Typo' import LoginRedirect from './app/login/LoginRedirect' import PageTemplate from...
(window["matrixElement_jsonp"] = window["matrixElement_jsonp"] || []).push([[9],{ /***/ "1791": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_vue_style_loader_index_js_ref_9_oneOf_1_0_node_modules_cs...
''' 39. Faça um programa que leia dez conjuntos de dois valores, o primeiro representando o número do aluno e o segundo representando a sua altura em centímetros. Encontre o aluno mais alto e o mais baixo. Mostre o número do aluno mais alto e o número do aluno mais baixo, junto com suas alturas. ''' from os import sys...
/** * Licensed to The Apereo Foundation under one or more contributor license * agreements. See the NOTICE file distributed with this work for additional * information regarding copyright ownership. * * * The Apereo Foundation licenses this file to you under the Educational * Community License, Version 2.0 (the ...
#pragma once #include <ostream> #include <string> #include <tuple> #include "Date.h" namespace bank::storage { struct Transaction { std::string id; std::string name; std::string recipient; std::string category; unsigned int amount; utils::Date date; }; inline bool operator==(const Transactio...
# uncompyle6 version 3.2.0 # Python bytecode 2.4 (62061) # Decompiled from: Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)] # Embedded file name: pirates.leveleditor.worldData.cuba_building_int_tattoo from pandac.PandaModules import Point3, VBase3, Vec4 objectStruct = {'AmbientColo...
""" Universe configuration builder. """ # absolute_import needed for tool_shed package. from __future__ import absolute_import import ConfigParser import logging import logging.config import os import re import signal import socket import string import sys import tempfile import threading from datetime import timedelt...
# Software License Agreement (BSD License) # # Copyright (c) 2008, Willow Garage, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above...
# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.model.document import Document class DepartmentApprover(Document): pass @frappe.whitel...
const axios = require('axios'); const GITHUB_URL = 'https://api.github.com/users'; module.exports = { async findUser(username) { const { data } = await axios.get(`${GITHUB_URL}/${username}`); return data; } }
import torch import pickle import random import numpy as np import torch.nn.functional as F from text_processor import Text_Processor import progressbar def load_pickle_file(in_f): with open(in_f, 'rb') as f: data = pickle.load(f) return data def load_all_response_id_list(id_response_dict, text_proce...
from __future__ import annotations import math import random import sys from dataclasses import dataclass from typing import List, Optional, Tuple, cast from gen_factor_sat import utils from gen_factor_sat.circuit.instances import FactoringAndGateStrategy, TseitinFactoringStrategy from gen_factor_sat.formula.cnf impo...
import React from "react"; import Layout from "../components/Layout"; import Seo from "../components/SEO"; const NotFoundPage = () => ( <Layout> <Seo title="404: Not found" /> <h1 className="h1">NOT FOUND</h1> <p>You just hit a route that doesn&#39;t exist... the sadness.</p> </Layout> ); export defa...
const passport = require('passport') const SpotifyStrategy = require('passport-spotify').Strategy; const User = require('./models/user') const Auth = require('./models/auth') const client = { id: process.env.CLIENT_ID, secret: process.env.CLIENT_SECRET } passport.use( new SpotifyStrategy( { clientID:...
webpackJsonp([4],{0:function(module,exports,__webpack_require__){eval("/* WEBPACK VAR INJECTION */(function(module) {'use strict';\n\nvar _css = __webpack_require__(2);\n\nvar _button = __webpack_require__(10);\n\nvar _button2 = _interopRequireDefault(_button);\n\nvar _css2 = __webpack_require__(298);\n\nvar _whiteSpac...
/* vim: tabstop=4 shiftwidth=4 noexpandtab * * ToAruOS PCI Initialization */ #include <system.h> #include <ata.h> #include <logging.h> ide_channel_regs_t ide_channels[2]; ide_device_t ide_devices[4]; uint8_t ide_buf[2048] = {0}; uint8_t ide_irq_invoked = 0; uint8_t atapi_packet[12] = {0xA8, 0, 0, 0, 0, 0, 0, 0, 0,...
/* * Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved. * Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * 1. Redist...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. # -------------------------------------------------------------------------------------------- # - Generated by tools/entrypoint_co...
const inquirer = require('inquirer'); const fs = require('fs-extra'); const path = require('path'); const ejs = require('ejs'); const chalk = require('chalk'); const question = require('../../vod-questions.json'); const { getAWSConfig } = require('../utils/get-aws'); const { generateIAMAdmin, generateIAMAdminPolicy } =...
from typing import Dict, Any Function = Any registry: Dict[str, Function] = dict() def export(*arg, **kwargs): """decorator to export functions in the registry """ def export_inner(func): registry[kwargs['name']] = func return export_inner if __name__ == "__main__": test_name = 'sum' ...
import React from "react"; import xssFilters from "xss-filters"; import * as modalTypes from "../../Modal/modalTypes"; export const traverseChildren = (el, cb) => { const filterChildren = (c) => React.Children.map(c, child => traverseChildren(child, cb) ); let newProps = null; let newElement = null; if(e...
# copyright (c) 2020 PaddlePaddle 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...
def merge(A, b, e, m): B = [] i, j = b, m + 1 while i <= m and j <= e: if A[j] < A[i]: B.append(A[j]) j = j + 1 else: B.append(A[i]) i = i + 1 while i <= m: B.append(A[i]) i = i + 1 while j <= e: B.append(A[j]) ...
(function() { 'use strict'; App.controller('DiskController', function($scope, toastr, $modal, $http, $state) { $scope.items = []; $scope.isGridView = true; $scope.showTree = false; $scope.viewModeButtonIconClass = 'fa-clock-o'; var rootItem = { name: 'Home...
/* See LICENSE file for license and copyright information */ #include <math.h> #include <girara/datastructures.h> #include <girara/utils.h> #include <girara/session.h> #include <girara/settings.h> #include "render.h" #include "zathura.h" #include "document.h" #include "page.h" #include "page-widget.h" #include "utils...
import os from .container_reader import extract from .container_writer import build from .json_container_decoder import json_decode, json_encode from .decoder import decode, encode from .file_organizer import FileOrganizer from .json_container_decoder import JsonContainerDecoder from . import helper import sys import u...
class Service { constructor(name, typ, url, server, rest, wms, wfs, csw, rdf, oai, urlPart) { // Constructor this.name = name; this.typ = typ; this.url = url; this.server = server; this.rest = rest; this.wms = wms; this.wfs = wfs; this.csw = csw; ...
import unittest import import_ipynb import pandas as pd import pandas.testing as pd_testing class Test(unittest.TestCase): def setUp(self): import Exercise_16_06_Grid_search_and_cross_validation_using_Pipeline_v1_0 self.exercises = Exercise_16_06_Grid_search_and_cross_validation_using_Pipel...
import os from base64 import b64encode from boucanpy.core.utils import getenv_bool, getenv from boucanpy.db.session import db_url API_V1_STR = "/api/v1" API_SECRET_KEY = getenv("API_SECRET_KEY") JWT_ALGORITHM = "HS256" if not API_SECRET_KEY: API_SECRET_KEY = b64encode(os.urandom(32)).decode("utf-8") ACCESS_TOK...
/* global Symbol, ArrayIterator*/ NodeList.prototype[Symbol.iterator] = function () { return new ArrayIterator(this); };
import numpy as np from skimage import io def reduce_SAP_11810506(input_image, n_size): im = io.imread(input_image) step = int((n_size - 1) / 2) im_copy = np.zeros([im.shape[0] + 2 * step, im.shape[1] + 2 * step], dtype=np.uint8) for i in range(im_copy.shape[0]): for j in range(im_copy.shape[...
module.exports = { siteMetadata: { title: `Blog`, author: `Hongyeon`, description: `A starter blog demonstrating what Gatsby can do.`, siteUrl: `https://gatsby-starter-blog-demo.netlify.com/`, social: { twitter: `kylemathews`, }, }, plugins: [ { resolve: `gatsby-source-file...
from solns.graph.graph import * import unittest from parameterized import parameterized as p from solns.bfs.bfs import * class UnitTest_Bfs(unittest.TestCase): G = Graph() G.addEdges(0,[1,2]) G.addEdges(1,[0,3]) G.addEdges(2,[3,4]) G.addEdges(3,[1,2,4,5]) G.addEdges(4,[2,3,5]) G.addEdges(5,...
'use strict'; const dayjs = require('dayjs'); const chalk = require('chalk'); const os = require('os'); const timestampFormat = 'YYYY-MM-DD HH:mm:ss.SSS (Z)'; // isAWSMessage returns true when msg starts with one of the AWS keywords. const isAWSMessage = msg => { const awsPrefixes = ['START', 'END', 'REPORT']; r...
# model settings model = dict( type='SOLO', pretrained='torchvision://resnet101', backbone=dict( type='ResNet', depth=101, num_stages=4, out_indices=(0, 1, 2, 3), # C2, C3, C4, C5 frozen_stages=1, style='pytorch'), neck=dict( type='FPN', in...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import json from django.core.exceptions import ValidationError from django.http import JsonResponse, Http404 # Create your views here. from django.shortcuts import get_object_or_404 from django.views.decorators.csrf import csrf_exempt from .models impor...
import string import random def add_space_and_encode_to_bytes(string: str) -> bytes: return "{} ".format(string).encode() def get_random_string(length: int = 10, charset: str = string.ascii_lowercase) -> str: return "".join(random.choice(charset) for i in range(length))
from setuptools import find_packages, setup, Extension setup( name="swifter", packages=["swifter"], # this must be the same as the name above version="0.295", description="A package which efficiently applies any function to a pandas dataframe or series in the fastest available manner", author="Jas...
"""Test extension array for storing nested data in a pandas container. The JSONArray stores lists of dictionaries. The storage mechanism is a list, not an ndarray. Note: We currently store lists of UserDicts (Py3 only). Pandas has a few places internally that specifically check for dicts, and does non-scalar things ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # File: example_stream_everything.py # # Part of ‘UNICORN Binance WebSocket API’ # Project website: https://www.lucit.tech/unicorn-binance-websocket-api.html # Github: https://github.com/LUCIT-Systems-and-Development/unicorn-binance-websocket-api # Documentation: https:/...
''' Hourglass network inserted in the pre-activated Resnet Use lr=0.01 for current version (c) YANG, Wei ''' import torch.nn as nn import torch.nn.functional as F #print 'hourglass biu biu' # from .preresnet import BasicBlock, Bottleneck __all__ = ['HourglassNet', 'hg'] class ResBlock(nn.Module): def __init__(s...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
# Copyright (c) 2012 Qumulo, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy of # the License at http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, sof...
# Import the libraries import math import numpy as np import pandas as pd from datetime import datetime import seaborn as sns import matplotlib.pyplot as plt %matplotlib inline plt.style.use('seaborn-whitegrid') from sklearn.neighbors import KNeighborsClassifier from sklearn.metrics import classification_report from...
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("va...
# test frozen package without __init__.py print("frzmpy_pkg2.mod") class Foo: x = 1
from copy import deepcopy from unittest import TestCase import mock import netaddr from akanda.router import models from akanda.router.drivers import iptables CONFIG = models.Configuration({ 'networks': [{ 'network_id': 'ABC123', 'interface': { 'ifname': 'eth0', 'addresses...
n = int(input()) counter = 0 line = list(input()) for i in range(1,len(line)): if(line[i] == line[i-1]): counter+=1 print(str(counter))
import itertools import torch import torch.nn as nn import numpy as np class BBoxTransform(nn.Module): def forward(self, anchors, regression): """ decode_box_outputs adapted from https://github.com/google/automl/blob/master/efficientdet/anchors.py Args: anchors: [batchsize, bo...
import csv import math import numpy as np import random from .base import classifier from numpy import asarray as arr # Bayes classifiers # Current implementation only includes a Gaussian class-conditional model, # "gaussClassify" # TODO: data weights ##############################################################...
#!/usr/bin/env python # ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are ...
from plotly.basedatatypes import BaseLayoutHierarchyType import copy class RadialAxis(BaseLayoutHierarchyType): # domain # ------ @property def domain(self): """ Polar chart subplots are not supported yet. This key has currently no effect. The 'domain' property is...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Provide the various Linear Inverted Pendulum Models (LIPMs). This includes: LIPM2D, DualLIPM2D, LIPM3D, DualLIPM3D """ # TODO: finish to implement this import os from pyrobolearn.robots.legged_robot import LeggedRobot __author__ = "Brian Delhaisse" __copyright__ = "...
#include <avr/io.h> #include "../menu.h" #include "../timer.h" #include "home.h" #include "../../Display/c/lcd.h" #include "../../../lib/c/bitmanipulation.h" #include <avr/delay.h> uint8_t selected_timer_index = 0; /** * TIMERSELECT MENU: */ void timerselect_init() { lcd_set_position(0, 0); lcd_string(menu[1].sta...
# Copyright (c) 2014 OpenStack Foundation # # 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 ...
from typing import List, Optional from enum import Enum from fastapi import FastAPI, status from pydantic import BaseModel class Fonto(BaseModel): nomo: str priskribo: Optional[str] = None fontoj = [{"nomo": "Meetup"}, {"nomo": "Duolingo"}] class FontNomoj(str, Enum): meetup = "meetup" duolingo =...
import { connect } from 'react-redux'; import Router from 'next/router'; import { updatePassword } from '../../../store/thunks/user'; import { setAuthorizationToken} from '../../../utils/api'; import setError from '../../../store/actions/error'; import { withTranslation } from '../../../../i18n'; class PasswordUpdateF...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Jun 29 09:23:17 2017 Unit testing for pymef library. Ing.,Mgr. (MSc.) Jan Cimbálník Biomedical engineering International Clinical Research Center St. Anne's University Hospital in Brno Czech Republic & Mayo systems electrophysiology lab Mayo Clinic 200...
// flow-typed signature: a8c1b8ec5f303461c9546ff530b43c20 // flow-typed version: <<STUB>>/@lugia/lugiax-core_v^1.0.1-4/flow_v0.77.0 /** * This is an autogenerated libdef stub for: * * '@lugia/lugiax-core' * * Fill this stub out by replacing all the `any` types. * * Once filled out, we encourage you to share y...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const TypeormDriver = require("typeorm/driver/oracle/OracleDriver"); const TomgUtils = require("../Utils"); const AbstractDriver_1 = require("./AbstractDriver"); class OracleDriver extends AbstractDriver_1.default { constructor() { ...
import numpy as np import copy from qiskit import BasicAer from qiskit.aqua import aqua_globals, QuantumInstance from qiskit.aqua.algorithms import NumPyMinimumEigensolver, VQE from qiskit.aqua.components.optimizers import SLSQP from qiskit.chemistry.components.initial_states import HartreeFock from qiskit.chemistry.co...
a = 1 # surprise! b = 2
class PermissionSetExtensionWizard extends PermissionSetWizard { constructor() { super(); } setData(data) { super.setData(data); if (this._data) { //initialize inputs document.getElementById("basepermext").value = this._data.basePermissionSet; } ...
# Copyright 2019 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 # # Unless required by applica...
from django.db.models import Count from .base import RoutesTestCase from django.test import TestCase import routes.services.records as rec import routes.tests.sampledata as sampledata from routes.models import Route,RouteRecord,RouteSet from routes.services import metrics import routes.services.conf as conf from route...
import os import sys from cly import * def do_quit(): sys.exit(0) def do_cat(files): for file in files: print open(os.path.expanduser(file)).read() grammar = XMLGrammar('tutorial5.xml') interact(grammar, data={ 'do_cat': do_cat, 'do_quit': do_quit, })
window.axios = require('axios'); window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; //window.Vue = require('vue'); Vue.component('ag-doc-block', require('./components/Block/Block').default); /** * Next, we will create a fresh Vue application instance and attach it to * the page. Then, you...
from jsonrpc import ServiceProxy import sys import string import getpass # ===== BEGIN USER SETTINGS ===== # if you do not set these you will be prompted for a password for every command rpcuser = "" rpcpass = "" # ====== END USER SETTINGS ====== if rpcpass == "": access = ServiceProxy("http://127.0.0.1:37571") ...
import pytest from celery.result import EagerResult from django_africa_site.users.tasks import get_users_count from django_africa_site.users.tests.factories import UserFactory @pytest.mark.django_db def test_user_count(settings): """A basic test to execute the get_users_count Celery task.""" UserFactory.cre...
""" Perez-Gonzalez, P. G., et al. 2008, ApJ, 675, 234 For smf_tot, values are corrected as seen in Behroozi et al. 2013 (http://arxiv.org/abs/1207.6105), for D (Dust model) corrections. """ import numpy as np info = \ { 'reference':'', 'data': '', 'imf': ('chabrier', (0.1, 100.)), #didn't update this } redshifts...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """Base script for running official ConvAI2 validation eval for perplexity. This uses a the version of the dataset which ...
import React, { useEffect } from 'react' import Layout from '../components/Layout' import Button from 'antd/lib/button' import 'antd/lib/button/style/css' import 'antd/lib/input/style/css' import 'antd/lib/select/style/css' import 'antd/lib/list/style/css' import 'antd/lib/form/style/css' import 'antd/lib/card/style/cs...
const dbSort = require('.') test('Test 1', () => { expect(dbSort([6, 2, 3, 4, 5])).toEqual([2, 3, 4, 5, 6]) }) test('Test 2', () => { expect(dbSort([14, 32, 3, 5, 5])).toEqual([3, 5, 5, 14, 32]) }) test('Test 3', () => { expect(dbSort([1, 2, 3, 4, 5])).toEqual([1, 2, 3, 4, 5]) }) test('Test 4', () => { expe...
function getSystemToken(env) { const systemContract = env.system_contract || `eosio.token` const [precision, symbolCode] = (env.system_symbol || `4,EOS`).split(`,`) if (!symbolCode) { throw new Error(`system_symbol must be in 'precision,symbolCode' (4,EOS) format`) } return { contra...
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *---------------------------------------------------------------...
/* * This file is a part of the open source stm32plus library. * Copyright (c) 2011,2012,2013,2014 Andy Brown <www.andybrown.me.uk> * Please see website for licensing terms. */ #pragma once namespace stm32plus { namespace net { /** * TCP connection data ready event. This event signifies that we have...
/******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ re...
### The only import you need! import socket, requests, json ### Options (Don't edit) SERVER = "irc.twitch.tv" # server PORT = 6667 # port ### Options (Edit this) PASS = "oauth:" # bot password can be found on https://twitchapps.com/tmi/ BOT = "bot" # Bot name [NO CAPITALS] CHANNEL = "channel" # Channel n...
import numpy as np import logging import unittest import os import scipy.linalg as LA import time from sklearn.utils import safe_sqr, check_array from scipy import stats from pysnptools.snpreader import Bed,Pheno from pysnptools.snpreader import SnpData,SnpReader from pysnptools.kernelreader import KernelNp...
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-50dd65dd"],{"1da1":function(t,n,e){"use strict";e.d(n,"a",(function(){return o}));e("d3b7");function a(t,n,e,a,o,i,r){try{var u=t[i](r),c=u.value}catch(d){return void e(d)}u.done?n(c):Promise.resolve(c).then(a,o)}function o(t){return function(){var n=thi...
import argparse from tqdm import tqdm import re import os import json from pandas.io.json import json_normalize import pandas as pd import time def init_parser(): parser = argparse.ArgumentParser() parser.add_argument( "--exps", "-e", nargs='+', required=True, help="Expirement pa...
#Scraper for New Hampshire Supreme Court #CourtID: nh #Court Short Name: NH #Court Contact: webmaster@courts.state.nh.us #Author: Andrei Chelaru #Reviewer: mlr #History: # - 2014-06-27: Created # - 2014-10-17: Updated by mlr to fix regex error. # - 2015-06-04: Updated by bwc so regex catches comma, period, or whitespac...
import react, { useEffect, useState } from 'react'; // material-ui import { Button, LinearProgress, Pagination, PaginationItem, Typography } from '@mui/material'; // project imports import MainCard from 'ui-component/cards/MainCard'; import {fetchCVEs, fetchCVE} from '../../api/cveApi'; import BasicTable from './basic...
from django.conf.urls import patterns, url from .views import DashboardView, GrowGuideView, GrowCreateView, \ GrowDeleteView, GrowDetailsView, GrowUpdateView, HomePageView, MeasurementCreateView, MeasurementListForPlantView, \ MeasurementUpdateView, PhotoCreateView, PhotoDeleteView, PhotoDetailView, PhotoListVi...
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Salt returner that report error back to sentry Pillar need something like:: raven: servers: - http://192.168.1.1 - https://sentry.example.com public_key: deadbeefdeadbeefdeadbeefdeadbeef secret_key: beefdeadbeefdeadbeefdeadbeefde...
#ifndef UNIT_TESTS_TEST_UTILS_H #define UNIT_TESTS_TEST_UTILS_H #include<stdlib.h> #include<assert.h> #include<stdio.h> #include "unit_tests.h" void unit_tests_test_utils(test_env* te); void test_check_error(test_env* te); void test_match_typed_ptrs(test_env* te); void test_match_s_exprs(test_env* te); void test_d...
module.exports = { strict: require('./strict'), log: require('./log'), shell: require('./shell') };
# Welcome to Universe! # # This file contains the client-side registry of environments. import logging import os # Suppress Twisted's warning about service_identity not being installed. # We don't need service_identity right now and don't want to take it on # as a dependency just to suppress this warning. import warn...
import numpy as np def gaussian_radius(det_size, min_overlap=0.7): height, width = det_size a1 = 1 b1 = (height + width) c1 = width * height * (1 - min_overlap) / (1 + min_overlap) sq1 = np.sqrt(b1 ** 2 - 4 * a1 * c1) r1 = (b1 + sq1) / 2 a2 = 4 b2 = 2 * (height + width) c2 = (1 -...
export var TileType; (function (TileType) { TileType["Arc1"] = "Arc1"; TileType["Arcs2"] = "Arcs2"; TileType["Bird"] = "Bird"; TileType["BridgeCross"] = "BridgeCross"; TileType["Cross"] = "Cross"; })(TileType || (TileType = {})); export var InternalTileType; (function (InternalTileType) { Intern...
//semaphores.c #include "semaphores.h" static Semaphore semaphores[MAX_SEMAPHORES]; static int semaphoreMutex; void initializeSemaphores() { int i; for( i = 0 ; i < MAX_SEMAPHORES ; i++){ cleanSemaphore(i); } semaphoreMutex = getMutex("semaphoreMutex"); } void cleanSemaphore(int i...
""" Script to do a regex search of all tweets for Hatebase terms How it's used: * Loads "tweets.csv" files according to 'root_path' and 'day_paths' vars * Loads Hatebase terms from 'hb_path' * Performs regex search for matching terms * Writes resulting table to "hatebase_processed_tweets.csv" Tech debt: * Incredibly ...
/* * Long chain of references going to refcount zero. * * In a basic refcount implementation this causes recursive C invocations * of the handler for zero reference count. */ /*=== 0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 11000 12000 13000 14000 15000 16000 17000 18000 19000 20000 21000 22000 23000...
import asyncio import datetime import json import logging import os import zlib import time import jsonlines from aiowebsocket.converses import AioWebSocket import traceback import utils from BiliLive import BiliLive class BiliDanmuRecorder(BiliLive): def __init__(self, config: dict, global_start: datetime.dateti...
/** * Finds subscriptions that have become orphaned. This only happens if an open api server goes down, but it requires that * the orphaned subscription is restarted. A simpler implementation would be to have a setTimeout/clearTimeout onActivity * in each subscription, but this class was abstracted for performan...
#!/usr/bin/env python3 from __future__ import print_function import os import re import sys import math import random import hashlib import filecmp import dbm.gnu import os.path import platform import argparse import subprocess from PIL import Image, ImageChops if platform.system() == "Darwin": OPENSCAD = "/Ap...
"""Parameter manipulation utilities.""" from collections.abc import Iterable, Mapping from urllib.parse import quote import datetime import json # Removed top-level import to correct circular imports # (we're in backport territory, these things happen) # from mws.mws import MWSError def enumerate_param(param, value...
# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRe...
""" This script is an example of how to use the L1 optimization reconstruction module (regularized regression scheme). |br| Firstly, a multitone signal is generated. The signal model is as follows. There are two random tones randomly distributed in the spectrum from 11kHz to 20kHz and two random tones randomly distr...