text stringlengths 3 1.05M |
|---|
import React from 'react';
import VideoListItem from './videoListItem';
const VideoList = (props) => {
const VideoItems = props.videos.map((video) => {
return (
<VideoListItem
onVideoSelect={props.onVideoSelect}
key={video.etag}
video={video} />)
... |
from decimal import Decimal
from datetime import datetime
from mock import MagicMock, PropertyMock
import unittest
from hummingbot.core.event.events import (
BuyOrderCompletedEvent,
MarketEvent,
OrderCancelledEvent,
)
from hummingbot.strategy.hanging_orders_tracker import (
CreatedPairOfOrders,
Han... |
const schema = require('@colyseus/schema');
class GameMap extends schema.Schema {
constructor(data, mapName) {
super();
this.name = mapName;
this.isReady = false;
this.timer = data.timer || -1;
this.damage = data.damage || -1;
}
pause() {
this.isReady = false;
}
resume() {
th... |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... |
"""
Component that will help set the OpenALPR cloud for ALPR processing.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/image_processing.openalpr_cloud/
"""
import asyncio
import logging
from base64 import b64encode
import aiohttp
import async_timeout
i... |
๏ปฟ/*
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.lang['he']={"wsc":{"btnIgnore":"ืืชืขืืืืช","btnIgnoreAll":"ืืชืขืืืืช ืืืื","btnReplace":"ืืืืคื","btnReplaceAll":"ืืืืคืช ืืื","btnUndo":"ืืืืจื","changeTo":"ืฉืื ืื ื","errorLo... |
# coding: utf-8
"""
Python InsightVM API Client
OpenAPI spec version: 3
Contact: support@rapid7.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class ReferenceWithUserIDLink(object):
"""NOTE: This class is auto generate... |
/**********************************************************************************
* MIT License
*
* Copyright (c) 2018 Antoine Beauchamp
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the So... |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#ifndef __LOCALIZEDSTRINGS_H
#define __LOCALIZEDSTRINGS_H
#include "Common.h"
#include "LocalizedErrorMsgs.h"
usin... |
# A basic snake using : E = โซ(ฮฑEcont + ฮฒEcurv + ฮณEimage)ds
from target import Target
import cv2
import copy
import math
def nothing(x):
pass
class BasicSnake:
def __init__(self, target_data):
self.target = target_data
self.avgDist = 0
self.alpha = 0.2
self.beta = 1
... |
from django.contrib import admin
from meal_plan_app.models import MealPlan
# Register your models here.
admin.site.register(MealPlan) |
import Vue from 'vue';
import VueRouter from 'vue-router';
import { updateAuthState } from './auth.js';
import Index from './ui/index.vue'
import Login from './ui/account/login.vue'
import Logout from './ui/account/logout.vue'
import Callback from './ui/account/callback.vue'
import Notebooks from './ui/notebooks.vue'
... |
#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "paw.settings")
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import may fail for some other reason. Ensure that... |
# -*- coding: utf-8 -*-
import os
import time
import signal
import platform
import multiprocessing
from contextlib import closing
import sqlite3
import pytest
from usql.main import special
DATABASE = os.getenv("PYTEST_DATABASE", "test.sqlite3")
def db_connection(dbname=":memory:"):
conn = sqlite3.connect(data... |
import babel from 'rollup-plugin-babel'
import pkg from './package.json'
export default [
// CommonJS
{
input: 'src/index.js',
output: { file: 'lib/utils.js', format: 'cjs', indent: false },
external: [
...Object.keys(pkg.dependencies || {}),
...Object.keys(pkg.p... |
'use strict'
const snapshot = require('snap-shot')
const { promisify } = require('util')
const { resolve } = require('path')
const fs = require('fs')
const metascraper = require('../../..')([
require('metascraper-author')(),
require('metascraper-date')(),
require('metascraper-description')(),
require('metasc... |
'''
Utility functions for building and running distributed EC2 jobs.
The list of EC2 nodes used is in ec2_node_list.txt
author: Marcela S. Melara (melara@cs.princeton.edu)
date created: 02/04/2016
'''
from boto import ec2 # use boto 2, the API is better
from collections import OrderedDict
from subprocess import call
... |
window['h_java']=[
[
/^(?:\/\/[^\n]*|\/\*(.|\n)*?\*\/)/,
['<span style=\'color:gray\'><i>',3],
['</i></span>',0]
],
[
/^("(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/,
['<span style=\'color:green\'><b>',3],
['</b></span>',0]
],
[
/^(?:(?:\d+(?:\.\d)?\d*([lL]?|[dD]?|[fF]?)|0?\.\d+([dD]?|[fF]?))|... |
static cmVS7FlagTable cmVS10LibFlagTable[] = {
// Enum Properties
{ "ErrorReporting", "ERRORREPORT:PROMPT", "PromptImmediately",
"PromptImmediately", 0 },
{ "ErrorReporting", "ERRORREPORT:QUEUE", "Queue For Next Login",
"QueueForNextLogin", 0 },
{ "ErrorReporting", "ERRORREPORT:SEND", "Send Error Repor... |
# Designing a calculator which will get imported in another file to perform certain calculations.
def add(*tupleinput):
"Adds the given numbers."
return sum(tupleinput);
def subtract(*tupleinput):
"Subtracts all numbers from the first number."
total = tupleinput[0];
tupleinput = tupleinput[1:];
... |
# Remove the temp directory if it exists
import os
import shutil
def test_cleanup():
tempdir = os.path.join('.', 'temp')
if os.path.isdir(tempdir):
shutil.rmtree(tempdir)
return
if __name__ == '__main__':
test_cleanup()
|
#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, ... |
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from code import Code
from model import PropertyType
import any_helper
import cpp_util
import operator
import schema_util
class CppTypeGenerator(object)... |
#!/usr/bin/env python
"""Provides scikit interface."""
import numpy as np
import networkx as nx
from collections import defaultdict
from sklearn.ensemble import RandomForestRegressor
import ego.utils.treeinterpreter as ti
from ego.encode import make_encoder
from ego.vectorize import set_feature_size, vectorize_graphs
... |
import React from "react"
import { graphql, Link } from "gatsby"
export default ({data}) => {
console.log(data)
return (
<div>
<h1>Hello worldzz!</h1>
<h2>{data.allMarkdownRemark.totalCount} Posts</h2>
{data.allMarkdownRemark.edges.map(({ node }) => (
<div key={node.id}>
<L... |
from .address import *
from .script import *
from .mininode import *
from .util import *
from .qtumconfig import *
from .blocktools import *
from .key import *
from .segwit_addr import *
import io
import base64
import math
import pprint
def make_transaction(node, vin, vout):
tx = CTransaction()
tx.vin = vin
... |
/* Flux dispatcher */
var Dispatcher = require("../dispatcher/dispatcher");
/**
* ### ChartViewActions
* Send data from React views to Flux dispatcher, and on to the stores
*/
var ChartViewActions = {
/**
* Update all chart props
* @param {Object} - `chartProps`
*/
updateAllChartProps: function(newChartProps) ... |
from django.test import TestCase, Client, override_settings
from model_mommy import mommy
from model_mommy.recipe import seq
from contracts.models import Contract
from contracts.mommy_recipes import get_contract_recipe
from itertools import cycle
RATES_API_PATH = '/api/rates/'
@override_settings(PAGINATION=1)
clas... |
๏ปฟ/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
(function () {
function setupAdvParams(element) {
var attrName = this.att;
var value = element && element.hasAttribute(attrName) && element.getAttri... |
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def preorderTraversal(self, root: TreeNode) -> List[int]:
values = []
self.preorderTraversal... |
# -*- coding: utf-8 -*-
import gevent
import random
from time import sleep
from flask import Flask
from flask_sockets import Sockets
app = Flask(__name__)
sockets = Sockets(app)
GPlusIds = [
"108086881826934773478",
"103846222472267112072",
"102590783040593125503",
"102354824581711724695",
"1129836179361... |
import os
import tempfile
basedir = os.path.abspath(os.path.dirname(__file__))
class Config(object):
DEBUG = False
TESTING = False
CSRF_ENABLED = True
UPLOAD_FOLDER = tempfile.gettempdir()
ALLOWED_EXTENSIONS = {"png", "jpg", "jpeg", "gif"}
MAX_CONTENT_LENGTH = 5 * 1024 * 1024 # 5MB
class P... |
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
*
* LibTomCrypt is a library that provides various cryptographic
* algorithms in a highly modular and flexible manner.
*
* The library is free for all purposes without any express
* guarantee it works.
*/
#include "tomcrypt_private.h"
/**
@file xcb... |
"""Example of a highway section network with on/off ramps."""
from flow.envs.highway_ramps_env import HighwayRampsEnv
from flow.envs.multiagent import highway
from flow.controllers import car_following_models
from flow.controllers.car_following_models import IDMController, LACController
from flow.core.params import Su... |
from market import app
# Checks if the run.py file has executed directly and not imported
if __name__ == '__main__':
app.run(debug=True)
|
"""
Train a simple Keras DL model on the dataset used in MLflow tutorial (wine-quality.csv).
Dataset is split into train (~ 0.56), validation(~ 0.19) and test (0.25).
Validation data is used to select the best hyperparameters, test set performance is evaluated only
at epochs which improved performance on the validatio... |
define({
root: ({
viewer: {
loading: {
step1: "LOADING STORY",
step2: "LOADING DATA",
step3: "INITIALIZING THE TOUR",
loadBuilder: "SWITCHING TO BUILDER MODE",
redirectSignIn: "REDIRECTING TO SIGN-IN PAGE",
redirectSignIn2: "(you will be redirected here after sign-in)",
fail: "Sorry, M... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[338],{409:function(e,t,n){"use strict";n.r(t),n.d(t,"frontMatter",(function(){return c})),n.d(t,"metadata",(function(){return i})),n.d(t,"toc",(function(){return l})),n.d(t,"default",(function(){return p}));var r=n(3),o=n(8),a=(n(0),n(568)),c={id:"oauth2-clients",tit... |
from inotifier import Notifier
from IPython.display import display, Audio, HTML
import pkg_resources
import time
class AudioPopupNotifier(Notifier):
"""Play Sound and show Popup upon cell completion"""
def __init__(self, message="Cell Completed", audio_file="pad_confirm.wav"):
super(AudioPopupNotifi... |
# coding: utf-8
"""
Strava API v3
The [Swagger Playground](https://developers.strava.com/playground) is the easiest way to familiarize yourself with the Strava API by submitting HTTP requests and observing the responses before you write any client code. It will show what a response will look like with differe... |
/*
+----------------------------------------------------------------------+
| Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundl... |
import React from 'react'
import PropTypes from 'prop-types'
const SvgTelegram = ({ title, ...props }) => (
<svg {...props}>
<title>{title}</title>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M16.801 5.065c.152.13.217.292.195.487L15.144 16.7a.482.482 0 0 1-.227.325.953.953 0 0 1-.228.033... |
import discord
from discord.ext import commands
import random
import sys
import traceback
import asyncio
import datetime
import json
from datetime import datetime
from common_vars import *
# Import for cooldowns.
from discord.ext.commands.cooldowns import BucketType
async def convertSecs(seconds: int):
minutes... |
#ifndef SWAG_SCANNER_IMODEL_H
#define SWAG_SCANNER_IMODEL_H
#include "CloudType.h"
#include "Logger.h"
#include <memory>
#include <vector>
#include <map>
#include <pcl/filters/crop_box.h>
#include <pcl/filters/voxel_grid.h>
#include <pcl/filters/filter.h>
#include <pcl/filters/fast_bilateral.h>
#include <pcl/filters/s... |
const gulp = require('gulp');
const tailwindConfig = "tailwind.config.js"; /* Path to Tailwind config */
const mainCSS = "assets/src/styles.css"; /* Path to main stylesheet */
/**
* Custom PurgeCSS Extractor
* https://github.com/FullHuman/purgecss
*/
class TailwindExtractor {
static extract(content) {
return ... |
import template from './sw-cms-block-image-text-bubble.html.twig';
import './sw-cms-block-image-text-bubble.scss';
const { Component } = Shopware;
Component.register('sw-cms-block-image-text-bubble', {
template
});
|
export * from './components';
export * from './prefabs';
export Theme from './theme';
export Mixins from './mixins';
|
/*-----------------------------------------------------------------------/
/ Low level disk interface modlue include file (C)ChaN, 2019 /
/-----------------------------------------------------------------------*/
#ifndef _DISKIO_DEFINED
#define _DISKIO_DEFINED
#include "drv_timer.h"
#ifdef __cplusplus
ex... |
var NCubeEditor2 = (function ($) {
var headerAxisNames = ['trait','traits','businessDivisionCode','bu','month','months','col','column','cols','columns', 'attribute', 'attributes'];
var nce = null;
var hot = null;
var CellEditor;
var ColumnEditor;
var CubeEditor;
var numColumns = 0;
var ... |
/**
* @file Alipay ant mini program build task manager
* @author sparklewhy@gmail.com
*/
'use strict';
const BuildManager = require('../BuildManager');
const initNativeAntProcessor = require('./init-native-ant-processor');
const {updateReferProcessorInfo} = require('../../processor/type');
class BuildAntAppManage... |
#!/usr/bin/env python
from forcebalance.molecule import *
import os, sys
# This code checks to see whether a Q-Chem optimization has converged
# to within the same criteria as GeomeTRIC.
M = Molecule(sys.argv[1], build_topology=False)
M.align(smooth=True)
Convergence_energy = 1e-6
Convergence_grms = 3e-4
Convergenc... |
from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
from numpy import array
from numpy import cross
from numpy import bincount
from numpy import zeros
from numpy import mean
from numpy import tan
from numpy import arccos
from numpy import sum
from scipy.sparse ... |
# coding=utf-8
# Copyright 2020 The HuggingFace Team. 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 requir... |
import copy
import json
import logging
import os
import tensorflow as tf
import numpy as np
import warnings
from typing import Any, List, Dict, Text, Optional, Tuple
import rasa.utils.io
from rasa.core import utils
from rasa.core.domain import Domain
from rasa.core.featurizers import (
MaxHistoryTrackerFeaturizer... |
const express = require('express')
const mongoose = require('mongoose')
const bodyParser = require('body-parser')
require('dotenv').config()
const app = express()
const port = process.env.PORT
app.set('view engine', 'ejs')
app.use(bodyParser.urlencoded({ extended: false }))
app.use(express.static(__dirname + '/publi... |
# 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... |
import GL from '@luma.gl/constants';
import assert from './assert';
import {getParameterPolyfill} from './polyfills/get-parameter-polyfill';
const OES_vertex_array_object = 'OES_vertex_array_object';
const ANGLE_instanced_arrays = 'ANGLE_instanced_arrays';
const WEBGL_draw_buffers = 'WEBGL_draw_buffers';
const EXT_di... |
import numpy as np
import pickle
import matplotlib.pyplot as plt
import os
from objectworld import ObjectWorld
from utils import find_optimal_action_value, find_optimal_state_value, find_policy, policy_eval
if __name__ == '__main__':
save_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "objectworld... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const React = require("react");
const wrapIcon_1 = require("../utils/wrapIcon");
const rawSvg = (iconProps) => {
const { className, primaryFill } = iconProps;
return React.createElement("svg", { width: 24, height: 24, viewBox: "0 0 24 ... |
/*****************************************************************************
*
* \file
*
* \brief FreeRTOS and lwIP example for AVR32 UC3.
*
* Copyright (c) 2009-2015 Atmel Corporation. All rights reserved.
*
* \asf_license_start
*
* \page License
*
* Redistribution and use in source and binary forms, wit... |
import { Tree } from '../tree.js';
import { tran } from '../node.js';
import { preserveR } from '../rect.js';
export const style = (objN, tree) => {
const cssN = tree.elem.style ? tree.elem.style.css : null;
return Tree(
preserveR(tree.elem, {
style: {
css: cssN
... |
"""
Module containing various functions I have found useful in assembling the feature vector.
"""
import numpy as np
def combine_as_max(vector1, vector2):
"""
Combine two vectors and return a vector that has the maximum values from each vector compared pairwise.
:param vector1: First list to compare
... |
from keycloak.admin import KeycloakAdminBase
__all__ = ('Realm', 'Realms',)
class Realms(KeycloakAdminBase):
def by_name(self, name):
return Realm(name=name, client=self._client)
class Realm(KeycloakAdminBase):
_name = None
def __init__(self, name, *args, **kwargs):
self._name = name
... |
import time
import os
import sys
donothing_contents = """\
#!/bin/sh
while [ "1" -ne "2" ]; do
sleep 10
done
"""
def main():
# dummy zdctl startup of zdrun
shutup()
file = os.path.normpath(os.path.abspath(sys.argv[0]))
tmp = sys.argv[1]
dir = os.path.dirname(file)
zctldir = os.path.dirname... |
//
// YYBaseWindow.h
// OKVoice
//
// Created by yanyu on 2018/12/28.
// Copyright ยฉ 2018ๅนด luowei. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <LWOCKit/LWOCKitConfig.h>
typedef NS_OPTIONS(NSUInteger, YYBaseWindowType) {
YYBaseWindowTypeToast = 1 << 0,
YYBaseWindowTypeSlide = 1 << 1
};
static... |
# Generated by Django 2.1.15 on 2021-06-23 17:43
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
('auth', '0009_alter_user_last_name_max_length'),
]
operations = [
migrations.CreateModel(
name='User',
... |
import declination from '../../components/declination';
import preventDuplicate from '../../components/prevent-duplicate';
import Dialog from "../../libs/dialog";
$(function () {
'use strict';
/**
* Show post preview
*/
$('a[href="#preview"]').click(function(e) {
$('#preview').find('.pos... |
#!/usr/bin/env node
const _ = require('lodash');
const path = require('path');
const fs = require('fs');
const spawn = require('cross-spawn');
const commander = require('commander');
const MILKSHAKE_TASK_JSON = '.milkshake.tasks.json';
function findProjectRoot(base) {
let prev = null;
let dir = base;
do {
... |
# Copyright 2019 The Feast 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... |
module.exports.parseQuery = (query) => {
const fields = (query._fields) ? query._fields.split(',') : undefined;
const q = query._q;
const start = query._start;
const end = query._end;
const limit = query._limit;
const page = query._page;
const sort = (query._sort) ? query._sort.split(',') : undefined;
const or... |
# Copyright (C) 2019 Advanced Media Workflow Association
#
# 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 l... |
"""
InstalledRpms - Command ``rpm -qa``
===================================
The ``InstalledRpms`` class parses the output of the ``rpm -qa`` command.
Each line is parsed and stored in an ``InstalledRpm`` object. The ``rpm -qa``
command may output data in different formats and each format can be
handled by the parsing... |
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/**
* @fileoverview
* 'bluetooth-dialog-host' is used to host a <bluetooth-dialog> element to
* manage bluetooth pairing. The device properties are pro... |
/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the 2-clause BSD license.
* See license.txt in the OpenLayers distribution or repository for the
* full text of the license. */
/**
* @requires OpenLayers/Handler.js
*/
/**
* Class: OpenLayer... |
#!/usr/bin/env python3
import socket
host = '175.102.132.197' # ่ฆๆต่ฏ็ip
port = 58080 #ๆต่ฏ็ซฏๅฃ
bufsize = 1024 #ๅฎไน็ผๅฒๅคงๅฐ
tcp = True
udp = True
class test_port(object):
"""docstring for test_port"""
def __init__(self, host, port):
super(test_port, self).__init__()
self.host = host
self.port = port
self.addr = (h... |
import React from 'react';
import PropTypes from 'prop-types';
import { Prompt, withRouter } from 'react-router-dom';
import { withTranslation } from 'react-i18next';
import { Button, EmptyMessage } from '@/components';
import request from '@/utils/request';
import { PageCardLayoutList, PageEditor, PageEditorShortKeyI... |
# Copyright 2008-2015 Nokia Networks
# Copyright 2016- Robot Framework 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
... |
# -*- coding: utf-8 -*-
# UI Source 'gui/dialog_install.ui'
from PyQt5 import QtCore, QtWidgets
class Ui_DialogInstall(object):
def setupUi(self, Form):
Form.setObjectName("Form")
Form.resize(547, 331)
self.gridLayout = QtWidgets.QGridLayout(Form)
self.gridLayout.setObjectName("g... |
(window.webpackJsonp=window.webpackJsonp||[]).push([["show-theme-save-dialog"],{KeOl:function(e,t,n){"use strict";n.r(t),n.d(t,"showThemeSaveDialog",(function(){return s}));var o=n("YFKU"),a=n("fZEr"),i=n("EsvI"),c=n("JWMC");function s(e,t){function n(n){Object(i.saveTheme)(n,e).then((function(){t&&t(n)})),Object(c.tra... |
english_text = [
"""Temis Demo App""",
"""An app by [@ignacioct](https://github.com/ignacioct)""",
"""Hey there, welcome! This demo app introduces Temis, an Automatic Misogyny Detection tool for
Spanish written text. You will learn about the project, make some predictions and see how to implement
Te... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[76],{211:function(e,t,n){"use strict";n.r(t),n.d(t,"frontMatter",(function(){return o})),n.d(t,"metadata",(function(){return l})),n.d(t,"rightToc",(function(){return s})),n.d(t,"default",(function(){return b}));var a=n(2),r=n(9),i=(n(0),n(224)),o={id:"dependencies-en... |
/** @babel */
import {Observable,Observer} from 'libobs/lib/obs';
export const getTime = () => {
return Date.now();
};
export class TimerTask {
constructor({run=null}={}) {
this.when = 0;
this.period = 0;
this.fixedRate = false;
this.cancelled = false;
this.scheduledTi... |
// status.c
// updated by doing
#include <localtime.h>
inherit F_CLEAN_UP;
int help(object me);
int filter_for_heart_beat(object ob);
int main(object me, string arg)
{
object ob;
object *obs;
string msg;
mixed lt;
mapping st;
string bn;
string *ks;
int i;
if (!SECURITY_D->valid... |
import os
import pandas as pd
from sklearn.model_selection import StratifiedShuffleSplit
import rampwf as rw
problem_title = 'Iris classification'
_target_column_name = 'species'
_prediction_label_names = ['setosa', 'versicolor', 'virginica']
# A type (class) which will be used to create wrapper objects for y_pred
... |
from django.db.models import Avg, Sum, Q, F
from django.http import HttpResponse
from django.shortcuts import render
# Create your views here.
from .models import Humen
def get_data(req):
#่ๅๅฝๆฐ money>10050
humens = Humen.objects.filter(money__gt=10050)
# avg_age = humens.aggregate(Avg("age"))
avg_age... |
#1.0 Import Library
import json
import folium
import pandas as pd
from folium.plugins import MarkerCluster
#Load Data
geo_data = json.load(open("thailand.json"))
accident_data = pd.read_csv("Accident.csv")
traffic_data = pd.read_csv("Traffic.csv")
data = pd.read_csv("geoprocessed0.csv")
lat = data['latitude']
lon =... |
from flask import Flask, jsonify, request, session, redirect
from passlib.hash import pbkdf2_sha256
import uuid
from app import db
class User:
def start_session(self, user):
del user['password']
session['logged_in'] = True
session['user'] = user
# remove comments to experiment
... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import hashlib
import time
import datetime
import os
from dz_utils.dz_utils import dict_set, get_current_time, time_int2str, write_json_file_breakline, dict_get, read_json_file
def get_FileSize(filePath) -> float:
"""
่ทๅๆไปถ็ๅคงๅฐ,็ปๆไฟ็ไธคไฝๅฐๆฐ, ๅไฝไธบMB
:param filePat... |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
"""
Doubly Robust Learner. The method uses the doubly robust correction to construct doubly
robust estimates of all the potential outcomes of each samples. Then estimates a CATE model
by regressing the potential outcome... |
/*
* jQuery timepicker addon
* By: Trent Richardson [http://trentrichardson.com]
* Version 1.2
* Last Modified: 02/02/2013
*
* Copyright 2013 Trent Richardson
* You may use this project under MIT or GPL licenses.
* http://trentrichardson.com/Impromptu/GPL-LICENSE.txt
* http://trentrichardson.com/Impromptu/MIT-... |
#define SCRIPTSDIR "/home/rensenware/.local/share/dwmblocks/blocks/"
static const Block blocks[] = {
{"", SCRIPTSDIR "time.sh", 1, 0 },
{";", SCRIPTSDIR "keyboard.sh", 0, 1 },
{ " ", SCRIPTSDIR "volume.sh", 0, 2 },
{ " ", SCRIPTSDIR "mic.sh", 0, 3 },
{ " ... |
import pytest
import os
import pandas as pd
indicators = [file for file in os.listdir('data/indicator/') if len(file)==3 and file != 'TMP']
def get_processed_files_from_indicator(indicator):
files = os.listdir(f'data/indicator/{indicator}/processed')
return [(file, indicator) for file in files]
def get_proc... |
const _products = [
{ "id": 1, "title": "ๅไธบ Mate 20", "price": 3999, "inventory": 2 },
{ "id": 2, "title": "ๅฐ็ฑณ 9", "price": 2999, "inventory": 0 },
{ "id": 3, "title": "OPPO R17", "price": 2999, "inventory": 5 },
]
export default {
getProducts(cb) {
setTimeout(() => cb(_products), 100);
},
... |
'use strict'
class InsertOnlyKeystore {
constructor() {
this._signVerifyRegistry = {}
}
registerSignVerify(dbSig, signFunc, verifyFunc, postFunc) {
this._signVerifyRegistry[dbSig] = { signFunc, verifyFunc, postFunc }
}
getSignVerify(id) {
const parts = id.split('/')
const end = parts[parts.... |
#
# 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 this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... |
/*
wiring.h - Partial implementation of the Wiring API for the ATmega8.
Part of Arduino - http://www.arduino.cc/
Copyright (c) 2005-2006 David A. Mellis
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free... |
from .events import create_event
|
///\file
/******************************************************************************
The MIT License(MIT)
Embedded Template Library.
https://github.com/ETLCPP/etl
https://www.etlcpp.com
Copyright(c) 2021 jwellbelove
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software an... |
"""Provides all html tags and character entities, with lowercase names.
"""
from dss.dsl.safe_strings import safe_unicode
from dss.dsl.xml.coretypes import (
XmlCData, XmlName, XmlElement, XmlElementProto, XmlEntityRef, Comment)
from dss.dsl.html.character_entities import html_entities as _html_entities
class _Get... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{13:function(e,t,c){"use strict";var b=c(0);function l(e){let t,c,l,n;const s=e[6].default,j=Object(b.v)(s,e,e[5],null);return{c(){t=Object(b.z)("a"),c=Object(b.z)("button"),j&&j.c(),this.h()},l(e){t=Object(b.n)(e,"A",{href:!0,title:!0});var l=Object(b.l)(t);c=Obj... |