text stringlengths 3 1.05M |
|---|
import hashlib
import random
import string
import logging
from django.db import models
LOG = logging.getLogger(__name__)
class Device(models.Model):
name = models.CharField(max_length=50, unique=True)
customer = models.CharField(max_length=50)
agent_status = models.CharField(max_length=10, default="off... |
import openpathsampling as paths
import collections
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from openpathsampling.progress import SimpleProgress
try:
from collections import abc
except ImportError:
import collections as abc
# based on http://stackoverflow.com/a/3387975
class Tr... |
var $ = require('preconditions').singleton();
var _ = require('lodash');
var Bitcore = require('@dashevo/dashcore-lib');
var Common = require('./common');
var Utils = Common.Utils;
var log = require('./log');
/**
* @desc Verifier constructor. Checks data given by the server
*
* @constructor
*/
function Verifier... |
var searchData=
[
['randomfloatinggenerator',['RandomFloatingGenerator',['../classCatch_1_1Generators_1_1RandomFloatingGenerator.html',1,'Catch::Generators']]],
['randomintegergenerator',['RandomIntegerGenerator',['../classCatch_1_1Generators_1_1RandomIntegerGenerator.html',1,'Catch::Generators']]],
['rangegenera... |
from jsonrpc import ServiceProxy
access = ServiceProxy("http://127.0.0.1:9391")
pwd = raw_input("Enter old wallet passphrase: ")
pwd2 = raw_input("Enter new wallet passphrase: ")
access.walletpassphrasechange(pwd, pwd2)
|
#! python3
import bs4
exampleFile = open(r'C:\Users\aline\Desktop\Vandeilson_UNICSUL\git_repositorio\python_automate_boring_stuff_exercises\Chapter-11_Web-Scrapping\example.html')
exampleSoup = bs4.BeautifulSoup(exampleFile.read())
elems = exampleSoup.select('#author')
print(type(elems))
print(len(elems))
print(type... |
class Solution:
def maxProfit(self, prices):
total = 0
if len(prices) == 0:
return total
length = len(prices)
i = 0
while i < length - 1:
if prices[i] < prices[i + 1]:
total += prices[i + 1] - prices[i]
i += 1
retu... |
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[31],{
/***/ "fSgp":
/*!******************************************************************!*\
!*** ./node_modules/@ionic/core/dist/esm/ion-segment_2.entry.js ***!
\******************************************************************/
/*! exports provided:... |
define(["../app-scroll-effects-behavior.js", "../../helpers/helpers.js"], function (_appScrollEffectsBehavior, _helpers) {
"use strict";
/**
@license
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at
http://polymer.github.io... |
import { API, graphqlOperation } from 'aws-amplify'
import { getTodo, getTodoList } from '../../src/graphql/queries'
import config from '../../src/aws-exports'
API.configure(config)
const TodoPage = (props) => {
return (
<div>
<h2>Individual Todo {props.todo.id}</h2>
<pre>{JSON.stringify(props.todo,... |
/**
* Copyright 2018 The Pennsylvania State University
* @license Apache-2.0, see License.md for full text.
*/import{html,PolymerElement}from"./node_modules/@polymer/polymer/polymer-element.js";import{afterNextRender}from"./node_modules/@polymer/polymer/lib/utils/render-status.js";import{HAXWiring}from"./node_module... |
/**
* Add a expander (details).
*
*/
//(function() {
// Register the plugin within the editor.
CKEDITOR.plugins.add( 'expander', {
requires: 'widget',
icons: 'expander',
init: function( editor ) {
// Allow `summary` to be editable:
CKEDITOR.dtd.$ed... |
define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var reservedKeywords = exports.reservedK... |
/**
* @license Highstock JS v9.1.2 (2021-06-16)
* @module highcharts/indicators/aroon-oscillator
* @requires highcharts
* @requires highcharts/modules/stock
*
* Indicator series type for Highcharts Stock
*
* (c) 2010-2021 Wojciech Chmiel
*
* License: www.highcharts.com/license
*/
'use strict';
import '../../... |
const boost = require('movehub-async');
boost.on('ble-ready', status => {
console.log('ble-ready', status);
});
async function Robot() {
const hub = await boost.getHubAsync();
await hub.ledAsync('red');
await hub.ledAsync('yellow');
await hub.ledAsync('green');
//await hub.motorTimeAsync(... |
var request = require('request');
var db = require('../../src/databases/databases.js').db;
var utils = require('../utils.js');
var getHash = require('../../src/utils/getHash.js');
describe('getSkipSegments', () => {
before(() => {
let startOfQuery = "INSERT INTO sponsorTimes (videoID, startTime, endTime, votes,... |
var searchData=
[
['withcardcheckperiod',['withCardCheckPeriod',['../class_sd_card_print_handler.html#a0ddcaed71e575f70e5a5240cd5765002',1,'SdCardPrintHandler']]],
['withdesiredfilesize',['withDesiredFileSize',['../class_sd_card_print_handler.html#a72ba4425d0d1551a2ad4513f2bfaefa5',1,'SdCardPrintHandler']]],
['wi... |
from sympy.core.symbol import symbols
from sympy.printing import ccode
from sympy.codegen.ast import Declaration, Variable, float64, int64, String
from sympy.codegen.cnodes import (
alignof, CommaOperator, goto, Label, PreDecrement, PostDecrement, PreIncrement, PostIncrement,
sizeof, union, struct
)
x, y = sym... |
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4223605d"],{"41db":function(t,a,s){"use strict";s.d(a,"o",function(){return n}),s.d(a,"d",function(){return o}),s.d(a,"h",function(){return p}),s.d(a,"g",function(){return r}),s.d(a,"e",function(){return i}),s.d(a,"f",function(){return l}),s.d(a,"k",func... |
module.exports = {
type: 'FeatureCollection',
features: [
{
type: 'Feature',
properties: {
OBJECTID: 1,
Boundary: 'CD 11: Beach Area',
Shape__Area: 0.0000916576730105589,
Shape__Length: 0.0932623657489947
},
geometry: {
type: 'Polygon',
coo... |
import argparse
import os
import json
import string
import sqlite3
import collections
import unicodedata
import logging
import nltk
def connect_to_db(db_path):
conn = sqlite3.connect(db_path)
c = conn.cursor()
return c
def main():
parser = argparse.ArgumentParser()
# Required parameters
pars... |
import os
from glob import glob
import numpy as np
import pandas as pd
import tensorflow as tf
import sklearn
from sklearn.metrics import f1_score, precision_score, recall_score, roc_auc_score
def make_dirs(dir):
os.makedirs(dir, exist_ok=True)
def one_hot_encode(data, n_categories):
if isinstance(data, lis... |
import { hashSync, genSaltSync, compareSync } from 'bcryptjs'
import genSalt from './salt'
let users
/*
let localStorage
const salt = genSaltSync(10)
// If we're testing, use a local storage polyfill
if (global.process && process.env.NODE_ENV === 'test') {
localStorage = require('localStorage')
} else {
// If not... |
var helpers = require('../index');
var assert = require('assert');
var Hbs = require('handlebars');
describe('subtract', function() {
before(function() {
helpers.register(Hbs, 'subtract');
});
it('should handle subtract block helper', function() {
var str = '{{subtract a b}}';
var template = Hbs.com... |
#!/usr/bin/env python
# coding: utf-8
import logging
from elasticsearch import Elasticsearch
class ConnectElasticsearch:
def __init__(self, host='localhost', port=9200):
'''
Reads the value of the host and the port.
'''
self.host = host
self.port = port
def connect... |
from django.db import models
from django.db.models import Q, Avg, Count
from decimal import *
class Monthly(models.Model):
FIXED = 'FIXED'
ARM = 'ARM'
PAYMENT_TYPE_CHOICES = (
(FIXED, 'Fixed Rate Mortgage'),
(ARM, 'Adjustable Rate Mortgage'))
JUMBO = 'JUMBO'
CONF = 'CONF'
AG... |
// IMPORTANT
// ---------
// This is an auto generated file with React CDK.
// Do not modify this file.
// Use `.storybook/user/modify_webpack_config.js instead`.
const path = require('path');
const updateConfig = require('./user/modify_webpack_config');
const config = {
module: {
rules: [
{
test:... |
/*
* Ext JS Library 3.0 RC2
* Copyright(c) 2006-2009, Ext JS, LLC.
* licensing@extjs.com
*
* http://extjs.com/license
*/
Ext.tree.TreeFilter=function(tree,config){this.tree=tree;this.filtered={};Ext.apply(this,config);};Ext.tree.TreeFilter.prototype={clearBlank:false,reverse:false,autoClear:false,remove:false,... |
var searchData=
[
['option_882',['OPTION',['../classit_1_1unical_1_1mat_1_1embasp_1_1specializations_1_1dlv_1_1android_1_1DLVAndroidReasoner.html#aec74da630c5e040e726e0b4d780e2907',1,'it::unical::mat::embasp::specializations::dlv::android::DLVAndroidReasoner']]],
['options_883',['options',['../classit_1_1unical_1_1... |
# coding: utf-8
"""
Clever API
The Clever API
OpenAPI spec version: 2.0.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import os
import sys
import unittest
import clever
from clever.rest import ApiException
from clever.models.con... |
/* eslint-disable no-undef */
describe("About Mutability", function() {
it("should expect object properties to be public and mutable", function () {
var aPerson = {firstname: "John", lastname: "Smith" };
aPerson.firstname = "Alan";
expect(aPerson.firstname).toBe('Alan');
});
it("should understand t... |
import React from "react"
import { Link, graphql } from "gatsby"
import styled from 'styled-components';
import Layout from "../components/Layout/Layout"
import SEO from "../components/seo"
import Header from "../components/Header/Header"
import Project from "../components/Project/Project"
import Skills from "../compo... |
/**
* jQuery Validation Plugin 1.9.0
*
* http://bassistance.de/jquery-plugins/jquery-plugin-validation/
* http://docs.jquery.com/Plugins/Validation
*
* Copyright (c) 2006 - 2011 Jörn Zaefferer
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
*... |
# Used from https://github.com/philipperemy/Deep-Learning-Tinder/blob/master/tinder_token.py
import re
import requests
import robobrowser
MOBILE_USER_AGENT = "Tinder/9.0.0 (iPhone; iOS 10.3.2; Scale/2.00)"
FB_AUTH = "https://www.facebook.com/v2.6/dialog/oauth?redirect_uri=fb464891386855067%3A%2F%2Fauthorize%2F&disp... |
define(
({
insertEntity: "Masukkan Simbol"
})
);
|
/*
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang("a11yhelp", "fi", {
title: "Saavutettavuus ohjeet",
contents: "Ohjeen sisällöt. Sulkeaksesi tämän dialogin paina ESC.",
legend: [{
... |
import React from 'react';
import { Redirect } from 'react-router';
import './index.css';
import {server_addr} from '../../const';
class SearchBar extends React.Component {
constructor(props) {
super(props);
this.state = {
searchInput : '',
redirect : false,
se... |
const express = require("express");
const mongoose = require("mongoose");
const app = express();
const PORT = process.env.PORT || 3001;
app.use(express.json());
app.use(express.urlencoded({ extended: true }));
app.use(express.static("public"));
mongoose.connect(
process.env.MONGODB_URI || "mongodb://localhost:27017... |
/** Copyright (c) 2018 Uber Technologies, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
import test from 'tape-cup';
import React from 'react';
import {renderToString as render} from 'react-dom/server';
import {Rout... |
// Copyright 2021 ETH Zurich, Media Technology Center
//
// 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 re... |
J$.iids = {"8":[13,7,13,23],"9":[1,11,1,18],"10":[14,7,14,27],"16":[14,7,14,71],"17":[1,19,1,37],"18":[14,7,14,41],"24":[14,7,14,71],"25":[1,11,1,38],"26":[14,45,14,71],"32":[16,11,16,30],"33":[1,11,1,38],"34":[16,11,16,30],"40":[11,18,11,42],"41":[1,11,1,38],"49":[2,16,2,23],"57":[2,24,2,48],"65":[2,16,2,49],"73":[2,1... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var AttachmentV1_1 = require("./AttachmentV1");
exports.AttachmentV1 = AttachmentV1_1.AttachmentV1;
var PartyReferenceV1_1 = require("./PartyReferenceV1");
exports.PartyReferenceV1 = PartyReferenceV1_1.PartyReferenceV1;
var LocationV1_1 = requ... |
print(__package__, __name__,__file__)
from datetime import date
import os
from sqlalchemy import create_engine, Column, String, Integer, Date, ForeignKey
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker, relationship, backref
from dataloader.helpers.directoryCreator imp... |
from .detector3d_template import Detector3DTemplate
class CenterPointRCNN(Detector3DTemplate):
def __init__(self, model_cfg, num_class, dataset):
super().__init__(model_cfg=model_cfg, num_class=num_class, dataset=dataset)
self.module_list = self.build_networks()
def forward(self, batch_dict):... |
/* eslint-disable consistent-return */
const chalk = require('chalk');
const SpringServiceGenerator = require('generator-jhipster/generators/spring-service');
module.exports = class extends SpringServiceGenerator {
constructor(args, opts) {
super(args, { fromBlueprint: true, ...opts }); // fromBlueprint va... |
// Copyright (c) YugaByte, Inc.
import React, { Component } from 'react';
import { YBModal } from '../../common/forms/fields';
import PropTypes from 'prop-types';
import { isNonEmptyObject } from '../../../utils/ObjectUtils';
export default class DeleteBackup extends Component {
static propTypes = {
tableInfo: ... |
var a00918 =
[
[ "type", "a00918.html#a49dfe9e9d1800ec3020813e2192f6921", null ]
]; |
module.exports = ({ path }) => ({
presets: [
[
"@babel/preset-env",
{
targets: {
node: "12"
}
}
],
"@babel/preset-typescript"
],
plugins: [
["@babel/plugin-proposal-class-properties"],
... |
from bs4 import BeautifulSoup
with open("./Test_Data/cars_test.html") as file:
soup = BeautifulSoup(file, features="html.parser")
for link in soup.find_all('a'):
a = link.get("href")
if a and "https://www.cars.com/research/" in a and "/consumer-reviews/" not in a:
print(a)
"""
with open("./Test_... |
const Discord = require('discord.js');
exports.run = (Bot, message, args) => {
//Check if reason is provided and there is a mention
Bot.sql.all(`SELECT * FROM tickets WHERE ServerId = ?`, [message.guild.id]).then(rows => {
let embed = new Discord.RichEmbed();
embed.setTitle("Current tickets:");
... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _index = require('../../setMonth/index.js');
var _index2 = _interopRequireDefault(_index);
var _index3 = require('../_lib/convertToFP/index.js');
var _index4 = _interopRequireDefault(_index3);
function _interopRequireDefault(obj) {... |
(function(window, document, exportName) {
let _target = false;
const _window = [window];
const defaultOptions = {
'mouseEvent': true,
'minDistance': 30
};
function SwipeIt(selector, options = {}) {
const _elements = nodeListToArray(document.querySelectorAll(selector));
let _xStart, _yStart, ... |
/**
* Fusion.Widget.Navigator
*
* $Id$
*
* Copyright (c) 2007, DM Solutions Group Inc.
* 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 limitatio... |
/**
* skylark-osjsv2-client - A version of osjs-client that ported to running on skylarkjs
* @author Hudaokeji, Inc.
* @version v0.9.0
* @link https://github.com/skylark-integration/skylark-osjsv2-client/
* @license MIT
*/
define([],function(){return'\r\n<div id="Login">\r\n <form method="post" id="LoginForm">\r... |
// 平行四边形
import Polyline from './polyline';
import {toNumber, toArray} from '../utils/attribute_value';
const setDefault = Symbol.for('spritejs_setAttributeDefault');
const setAttribute = Symbol.for('spritejs_setAttribute');
const getAttribute = Symbol.for('spritejs_getAttribute');
function getPoints(attr) {
const ... |
/* =============================================================
* notate.js v1.0.0
* https://github.com/mayankcpdixit/notatejs
* =============================================================
* The MIT License (MIT)
* Copyright (c) 2016 Mayank Dixit
* ============================================================ *... |
from sage.rings.polynomial.pbori.pbori import mod_mon_set
from .PyPolyBoRi import (BooleSet, Monomial, Polynomial, Variable,
GroebnerStrategy, ReductionStrategy, parallel_reduce,
easy_linear_factors, BoolePolynomialVector)
from .easy_polynomials import (easy_linear_poly... |
import sys
from loguru import logger
def check_tb_sink(message):
exception = message.record["exception"]
if exception is None:
return
assert exception.traceback is not None
logger.remove()
logger.add(check_tb_sink, enqueue=False, catch=False)
logger.add(sys.stderr, enqueue=True, catch=False, fo... |
/**
* @fileoverview Prevent usage of bare URLs
* @author Eddie Antonio Santos
*/
"use strict";
var uri = require('../grammars/uri');
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
... |
##########################################################################################
# Sam - Home and Office Automation Message Handler
# (Sam Message Handler)
#
# Version 1.0
#
# Py-AIML or PyAIML Interpreter Personality Slackbot
# Used for both home automation and office automation
#
# Credits:
# Many great wo... |
import * as d3 from 'd3'
import addAxisLabel from './addAxisLabel'
describe('LightCurveViewer > d3 > addAxisLabel', function () {
let body, node
before(function () {
body = document.getElementsByTagName('body')[0]
node = document.createElement('svg')
body.appendChild(node)
})
after(function () {
... |
let flores = ["rosa", "girasol", "lirio"];
console.log(flores[2]);
|
assert = function(is_true){if (!(is_true)) {throw new Error("Test failed")}}
// Copyright JS Foundation and other contributors, http://js.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 ... |
//setup.js
require('jsdom-global')(undefined, { pretendToBeVisual: true, url: 'http://localhost' })
global.expect = require('expect')
// https://github.com/vuejs/vue-cli/issues/2128
window.Date = Date |
import tornado.web
import tornado.ioloop
class basicRequestHandler(tornado.web.RequestHandler):
def get(self):
self.set_header("Access-Control-Allow-Origin", "gcp-public-data-landsat.storage.googleapis.com")
self.write(f"Served successfully.")
def options(self):
self.set_header("Access... |
var _loop_1 = function (i) {
setTimeout(function () { console.log(i); }, 100 * i);
};
for (var i = 0; i < 10; i++) {
_loop_1(i);
}
|
import unittest
from mock import Mock
from zappa.handler import LambdaHandler
def no_args():
return
def one_arg(first):
return first
def two_args(first, second):
return first, second
def var_args(*args):
return args
def var_args_with_one(first, *args):
return first, args[0]
def unsupport... |
# 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... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[101],{QdDj:function(t,e){var n,o,i,r,a;(function(){"use strict";var t=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" "));function e(e){var n=t.has(e);return e=/^[a-z][.0-9_a-z]*-[\-.0... |
const test = require('tape')
const { type } = require('kyanite')
const { Maybe } = require('../src/maybe')
test('Maybe', t => {
const m = Maybe(0)
t.true(type(m) === 'Object', 'Maybe returns a proper object back')
t.end()
})
test('Maybe -- With Default', t => {
t.same(Maybe(9).withDefault('N/A'), 9, 'Did not... |
# -*- coding: utf-8 -*-
#
# hypre documentation build configuration file, created by
# sphinx-quickstart on Fri Nov 17 15:46:25 2017.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All c... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# File : Ampel-interface/ampel/cli/LoadAnyOfAction.py
# License : BSD-3-Clause
# Author : vb <vbrinnel@physik.hu-berlin.de>
# Date : 18.03.2021
# Last Modified Date: 22.10.2021
# Last Modified By : vb <vbrinnel@physik.hu-berli... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[89],{2553:function(module,exports){module.exports=function(hljs){return{keywords:{keyword:"package import option optional required repeated group oneof",built_in:"double float int32 int64 uint32 uint64 sint32 sint64 fixed32 fixed64 sfixed32 sfixed64 bool string bytes... |
//packages and files needed for this application
const fs = require('fs');
const inquirer = require('inquirer');
const chalk = require('chalk');
const Employee = require('./lib/Employee.js');
const Manager = require('./lib/Manager.js');
const Engineer = require('./lib/Engineer.js');
const Intern = require('./lib/Intern... |
# from peewee import *
from playhouse.apsw_ext import TextField, IntegerField, PrimaryKeyField
from py.trawl_analyzer.Settings import SensorsModel as BaseModel
# database = SqliteDatabase('data\clean_sensors.db', **{})
class UnknownField(object):
def __init__(self, *_, **__): pass
class EnviroNetRawFiles(Base... |
// TODO: Write code to define and export the Employee class
class Employee {
constructor(name, id, email) {
this.name = name;
this.id = id;
this.email = email;
}
getName() {
return(this.name)
}
getId() {
return(this.id)
}
getEmail() {
return(this.email)
}
getRole(... |
import getConfig from 'next/config'
// Only holds serverRuntimeConfig and publicRuntimeConfig
const { serverRuntimeConfig, publicRuntimeConfig } = getConfig()
export default function Header() {
return (
<div className="bg-gray-200 rounded-md mb-6 p-6 pt-12 pb-12">
<div className="grid grid-cols-1 md:grid-... |
/*! For license information please see 37a2580e5d880d2e72950bb2caadd8e16b0f35af-6039f102b127604c022c.js.LICENSE.txt */
(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{"8+s/":function(e,t,r){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var o=r("q1tI"),a=n(o),i=n(r("Gytx"));... |
#!/usr/bin/env python
import os
import sys
from pathlib import Path
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local")
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import may fail for some... |
// Copyright (c) 2012 Ecma International. All rights reserved.
// Ecma International makes this code available under the terms and conditions set
// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
// "Use Terms"). Any redistribution of this code must retain the above
// copyright and this n... |
import pygame
from game.base_view import BaseView
from game.my_game import MyGame
class PauseView(BaseView):
def __init__(self, parent: BaseView):
self.parent = parent
title_font = pygame.font.SysFont("Arial", 40)
self.title_text = title_font.render("Paused", True, (255, 255, 255))
... |
//TO_READ [2016-10-15] : Angular err / debug if DOM storage is disabled
//This is THE app module. ALL DEPENDz modules are loaded here,
//thus no need to explicitly load at each module's definition
const app = angular.module('trade_reskew',
['reskewDOMStorage',
'reskewLogin',
'reskewMe... |
const express = require("express");
const app = express();
app.use(require("cors")());
app.use(express.json());
app.use('/uploads',express.static(__dirname+'/uploads'))
require("./plugins/db")(app);
require('./routes/admin')(app);
app.listen(3000, () => {
console.log("App listening on port 3000!");
});
|
app.directive('messagesDirective', [
'$http',
'$state',
'$stateParams',
'$rootScope',
function directive($http,$state,$stateParams,$rootScope) {
return {
restrict: "A",
scope: true,
link: function link( scope, element, attributeSet )
{
console.log( "messagesDirective Runinn... |
// ==UserScript==
// @name Remove VK block
// @include http://vk.com/*
// @include https://vk.com/*
// ==/UserScript==
function updateNarrow() {
var bar = ge('narrow_column'), pageBody = ge('page_body');
if (browser.mobile || !bar || !pageBody) return;
var wh = window.lastWindowHeight || 0, st = Math.min(scroll... |
import 'react-id-swiper/lib/styles/css/swiper.css';
import moment from 'moment';
import { Button, Drawer, Avatar } from 'antd';
import React, { useState } from 'react';
import { connect } from 'react-redux';
import get from 'lodash/get';
import Datagrid from '@/containers/List/components/Datagrid';
import Filters from ... |
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// WARNING: This file was auto-generated, any change will be overridden in next release. Please use configs/es6.conf.js then run "npm run convert". //
//////////////////... |
import React from 'react'
import RegularError from '../components/regular-error'
class HandleError extends React.Component {
state = {
handleError: false
}
componentDidCatch(error, info) {
//send this error to service like sentry
this.setState({
handleError: true
})
}
render() {
i... |
'use strict';
angular.module('billing').controller('BillingController',
['$scope', '$http', '$timeout', '$sce', '$state', '$translate','$stateParams', 'Authentication', 'UsersHelper', 'Billing', 'BillingHelper', 'lodash',
function($scope, $http, $timeout, $sce, $state, $translate, $stateParams, Authentication, ... |
export const homeObjOne={
lightBg:false,
lightText: true,
lightTextDesc: true,
topLine: 'Workout planner',
headline: 'Unlimited Workouts to help your goal',
description: 'Get access to thousands of workouts. Mix match and plan new or known techniques to a personalized list allowing complete user creativity ... |
import Nat from '@agoric/nat';
import harden from '@agoric/harden';
import { makeCollect } from '@agoric/spawner';
import { escrowExchangeSrcs } from '@agoric/spawner/src/escrow';
import { assert, details } from '@agoric/assert';
import { makeMint } from '@agoric/ertp';
import { makePixelConfig } from './pixelConfig';... |
module.exports = {
AUTH_USER: 'AUTH_USER',
ADD_SCHEDULE: 'ADD_SCHEDULE',
GET_SCHEDULES: 'GET_SCHEDULES'
} |
let express = require('express');
let mongoose = require('mongoose');
let logger = require('morgan');
let cookieParser = require('cookie-parser');
let bodyParser = require('body-parser');
let config = require('config');
let router = require('./app/routes/index');
mongoose.connect(config.DB_HOST, {useMongoClient: true... |
// ____ ____
// | ___| _ |
// | ___| __|
// |____|_|
// ___________
//
// Una Foresta by emanuelepizzuti [10print, WEBGL, perlin noise]
// 2021 © emanuelepizzuti, Daniele @Fupete and the course DS-2021 at DESIGN.unirsm
// github.com/ds-2021-unirsm — github.com/fupete
// Educational purposes, MIT License, 2021, San ... |
'use strict'
const util = require('util')
const fs = require('fs')
const path = require('path')
const debug = require('debug')('koa-grace:xload')
const formidable = require('formidable')
let hashFileExist
/**
* formidablePromise
* @param {Object} req request
* @param {Object} config 配置项,参考:https://g... |
'''
Provides commands to globally modify the bot's behaviour.
'''
import logging
import pydoc
from .users_plugin import isadmin
from tombot.registry import get_easy_logger, Command, Subscribe, BOT_START
from tombot.registry import COMMAND_DICT, COMMAND_CATEGORIES
from tombot.helper_functions import determine_sender, ex... |
"""
Project Euler Problem 7: https://projecteuler.net/problem=7
10001st prime
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we
can see that the 6th prime is 13.
What is the 10001st prime number?
References:
- https://en.wikipedia.org/wiki/Prime_number
"""
from math import sqrt
... |
const config = require('./src/config');
module.exports = {
siteMetadata: {
title: 'Ariff Nazhan',
description:
'This is for the assignment purpose',
siteUrl: 'https://nazhan.peacehotel.my', // No trailing slash allowed!
image: '/og.png', // Path to your image you placed in the 'static' folder
... |
'use strict';
var method = require('./../method');
var assign = require('lodash.assign');
/**
* @memberof machines
* @method list
* @description List information about all machines available to either the current
* authenticated user or the team, if the user belongs to a team.
* The list method takes an optional... |
const pU = require('../paymentHandler/payment-utils')
const errorMessages = require('./error-messages')
const c = require('../config/constants')
const auth = require('./authentication')
function withPayment(paymentObject) {
const errors = {}
return {
validateMetadataFields() {
if (!paymentObject.custom)... |