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
var ele = details[i].elements.filter(e => e.name !== null).findIndexPolyfill(e => e.name.includes(query)) == -1; | |
var cmts = details[i].elements.filter(e => e.cmts !== null).findIndexPolyfill(e => e.cmts.includes(query)) == -1; | |
if (query && ele){ | |
continue; | |
} |
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
<template> | |
<template slot="row-details" slot-scope="row"> | |
<span :ticket_num="row.item.ticket_number"></span> | |
</template> | |
</template> | |
<script> | |
export default { | |
name: 'MaintenanceDetailsTable', | |
props: ['ticket_num'], |
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
// initalize resi_vid/hsd/voice and comm_vid/hsd_voice to 0... | |
// result.summary.products is List<ImpactProduct> Summary.products | |
foreach (var r in result.summary.products) | |
{ | |
if (r.customer_class == "Residential" && r.name == "Video") | |
{ | |
resi_vid = r.customer_count; |
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 time | |
print('Hello! What is your name?') | |
name = input() | |
print("It's nice to meet you, " + name + "! How old are you?") | |
age = input() | |
print("Wow! " + age + "? That's so great. Do you have a favorite color? What is it?") | |
color = input() |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using System.Web.Http; | |
using MyApp.ElasticData; | |
using MyApp.Models; | |
namespace MyApp.Controllers | |
{ |
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
def submit(self, form): | |
""" create SIs """ | |
tickets = [] | |
if form.id == 1: | |
tts_obj = Tts( | |
source='Raven', | |
region='Mountain West', | |
element='test_element120', | |
element_type='CMTS', | |
problem_code='99999' |
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
using Mapia.Core.Importer.Internal.Models; | |
using System; | |
using System.Collections.Generic; | |
namespace Mapia.Core.Models | |
{ | |
public class Maintenance : BaseImportData | |
{ | |
public string Id { get; set; } |
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
require 'csv' | |
require 'haversine' | |
fiber = CSV.read("fiber/all_florida_fiber.csv", {headers: true}).first(3) | |
customers = CSV.read("prospect_customers_geocoded.csv", {headers: true, encoding: 'ISO-8859-1'}).first(3) | |
hh = Hash.new { |hsh,key| hsh[key] = [] } | |
#for each customer, loop through all the fiber coords | |
customers.each do |customer| |
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
class Outage < ApplicationRecord | |
has_many :children | |
after_update :if_length_changed | |
def if_length_changed | |
o = Outage.find_by_id(self.id) | |
if (o.children.any?(&:changed?) || o.children.collect(&:id).sort != o.children.pluck(&:id).sort) | |
puts "\n\nlength was changed, count: #{o.children.count}\n\n" | |
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
module API | |
module V1 | |
class Tickets < Grape::API | |
include API::V1::Defaults | |
resource :tickets do | |
desc "Return all tickets" | |
get "", root: :tickets do | |
Ticket.all | |
end |
NewerOlder