This file contains hidden or 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
{ | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"$id": "http://api.nationalcrimeagency.gov.uk/sars/submission/v1.0/schemas/sar_submission.json", | |
"type": "object", | |
"title": "SAR Submission API", | |
"description": "National Crime Agency Suspicious Activity Report Submission API.", | |
"$comment": "Schema v1.2 (based on Business Data Model v0.43).", | |
"additionalProperties": false, | |
"additionalItems": false, | |
"properties": { |
This file contains hidden or 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 csv | |
from itertools import product | |
from requests import get | |
from time import sleep | |
from json import dump | |
from os import path, makedirs, cpu_count | |
from datetime import datetime | |
from multiprocessing import Pool | |
from enum import Enum |
This file contains hidden or 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(){function a(e){if(!(this instanceof a))return e||(e=null),null===e?new a:new a(e);if("function"==typeof e)return this.random=e,this;arguments.length&&(this.seed=0);for(var n=0;n<arguments.length;n++){var i=0;if("[object String]"===Object.prototype.toString.call(arguments[n]))for(var r=0;r<arguments[n].length;r++){for(var o=0,t=0;t<arguments[n].length;t++)o=arguments[n].charCodeAt(t)+(o<<6)+(o<<16)-o;i+=o}else i=arguments[n];this.seed+=(arguments.length-n)*i}return this.mt=this.mersenne_twister(this.seed),this.bimd5=this.blueimp_md5(),this.random=function(){return this.mt.random(this.seed)},this}function e(a,e){if(a=a||{},e)for(var n in e)void 0===a[n]&&(a[n]=e[n]);return a}function n(a,e){if(a)throw new RangeError(e)}function i(a){return function(){return this.natural(a)}}function r(a,e){for(var n,i=p(a),r=0,o=i.length;r<o;r++)e[n=i[r]]=a[n]||e[n]}function o(a,e){for(var n=0,i=a.length;n<i;n++)e[n]=a[n]}function t(a,e){var n=Array.isArray(a),i=e||(n?new Array(a.length):{});return n?o(a,i):r(a,i),i} |
This file contains hidden or 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
from random import randint,sample,random | |
from time import sleep | |
import os, platform | |
MAX_VELOCITY = 9 | |
MAX_CARS_PER_ROAD=10 #Can change this, always < ROAD_SIZE | |
P_RANDOM_STOP = 0.15 #Probab Car reduces velocity randomly | |
MAX_ROA = 1.0 #Rate of Appearance | |
EMPTY_CHAR = '.' | |
WAIT_BETWEEN_SIMULATIONS = 1 #Seconds |
This file contains hidden or 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
//Recibe un arreglo | |
function buscaMayor(a){ | |
//Para regresar | |
var f = 0; | |
var l = 0; | |
//Temporales | |
var tc = f; | |
var te = l; | |
//Iterar | |
for (var i = 1; i < a.length; i++) { |
This file contains hidden or 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
from requests import get | |
class Bitso(object): | |
"""Bitso""" | |
def __init__(self, version='v3'): | |
super(Bitso, self).__init__() | |
self.api = 'https://api.bitso.com/%s'%version | |
''' | |
Valid books: btc_mxn, eth_mxn, xrp_btc, xrp_mxn, eth_btc, bch_btc | |
''' |
This file contains hidden or 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
#include "crow.h" | |
int main() | |
{ | |
crow::SimpleApp app; | |
CROW_ROUTE(app, "/") | |
([]() { | |
return "Quick example using crow!"; | |
}); |
This file contains hidden or 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
#Regresion lineal, solo jala con linea, implementar el solicitar un grado de polinomio | |
import matplotlib.pyplot as plt | |
import numpy as np | |
x = [ 500,1300,2000,3800,4000,5500,6800,7400,10000] | |
y = [ 1000,2000,3000,4500,5000,5100,5300,5400,6000 ] | |
m = len(x) |
This file contains hidden or 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
#include <CurieBLE.h> | |
/* */ | |
BLEPeripheral blePeripheral; // BLE Peripheral Device (the board we're programming) | |
BLEService HeartRateService("180D"); // heart rate Service | |
BLECharacteristic HeartRateChar("2A35", // standard 16-bit characteristic UUID | |
BLERead | BLENotify, 2); // remote clients will be able to | |
// get notifications if this characteristic changes | |
int oldHeartRate = 0; // last heart rate reading from analog input |
This file contains hidden or 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 csv, json | |
cp = {} | |
with open('cp.csv', 'r') as f: | |
reader = csv.reader(f, delimiter='|') | |
prev = "" | |
for row in reader: | |
current = row[0] | |
if current == prev: | |
cp[current]["Colonias"].append( row[1] ) |
NewerOlder