This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
with open('questions.json') as f: | |
questions = json.load(f) | |
question_number= questions[0] # 0 For getting first question answer set | |
print(question_number["question"]) | |
#Prints what is 2+2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function my_cache_get_event($id){ | |
$url = 'url'; | |
$file = __DIR__.'\cache\user_event_cache_id_'.$id.'.json'; | |
if (time()-filemtime($file) > 24 * 3600) { | |
// file older than 24 hours | |
file_put_contents($file, file_get_contents($url)); | |
$json = file_get_contents($file); | |
return json_decode($json); | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import mysql.connector | |
import time | |
import re | |
from pprint import pprint | |
config = { | |
'user': 'root', | |
'password': 'root', | |
'host': 'localhost', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"rasa_nlu_data": { | |
"common_examples": [ | |
{ | |
"text": "i want to go marienplatz", | |
"intent": "FindConnection", | |
"entities": [ | |
{ | |
"entity": "StationDest", | |
"start": 13, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- begin snippet: js hide: false console: true babel: false --> | |
<!-- language: lang-js --> | |
const one = [ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* All lat-long specific operation define here | |
* | |
* http://www.movable-type.co.uk/scripts/latlong.html | |
* Original: https://gis.stackexchange.com/a/265626 | |
* Updated: Jackdh | |
*/ | |
const _ = require('lodash'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
make action-serve; | |
python -m rasa_core.run -d models / current / dialogue -u models / current / nlu --port 5055 --credentials credentials.yml --verbose | |
MacBook-Pro-de-igor:RasaTalk igorgadelha$ yarn | |
yarn install v1.7.0 | |
info No lockfile found. | |
$ npm run npmcheckversion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@CD29UBUNTU:/home/administrator/Downloads/test/RasaTalk# yarn build:dll | |
yarn run v1.13.0 | |
$ node ./internals/scripts/dependencies.js | |
Building the Webpack DLL... | |
Hash: 7abf5469065c09996900 | |
Version: webpack 4.12.0 | |
Time: 17083ms | |
Built at: 01/28/2019 7:43:27 PM | |
Asset Size Chunks Chunk Names | |
reactBoilerplateDeps.dll.js 45.9 MiB reactBoilerplateDeps [emitted] [big] reactBoilerplateDeps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useEffect, useRef, useState } from "react"; | |
type UseHoverType<T extends HTMLElement> = [React.RefObject<T>, boolean]; | |
function useHover<T extends HTMLElement>(): UseHoverType<T> { | |
const [value, setValue] = useState(false); | |
const ref = useRef<T>(null); | |
const handleMouseOver = () => setValue(true); |