Tag: 上海419论坛香草社区

mrxvjtbz

Mohawk mother wants to protect daughters name

first_imgKahente Horn-Miller. Submitted photo.Tom FennarioAPTN NewsLast Saturday Kahente Horn-Miller’s weekend was interrupted by a text message from her 25-year-old daughter Karonhioko’he.It read: “What can I do about this?”Karonhioko’he was contacted on social media by a filmmaker writing a script based on her name. The filmmaker wanted to know how to pronounce “Karonhioko’he” and was searching for more details regarding Mohawk culture.“You’re mining our language for profit, and it has to stop,” is how Horn-Miller describes her immediate reaction.The 46-year-old Kanien’kehà:ka (Mohawk) woman from Kahnawà:ke Mohawk Territory became further incensed when the filmmaker responded to the family’s concerns by stating “names aren’t covered by copyright law”.“When you are appropriating our names, and misusing them and misrepresenting us, that’s a whole other level of insult,” said Horn-Miller.This is because Kanien’kehà:ka custom places a great importance on naming newborns.“We are all supposed to have our own individual names, none of us are supposed to have the same names, which is a very different tradition in western society where multiple people have the same names,” explained Horn-Miller.“So when a baby is born it’s up to the family to help find the name. It’s a spiritual process because the name is associated with the birth of a child and the circumstances around the birth, the name comes out of our relationship, or that baby’s relationship to the natural world when they arrive.”For example, the name Karonhioko’he translates as “she takes the sky out of the water,” which was bestowed upon her after consultation with clan mothers. Which for Horn-Miller, begs the question, how did the filmmaker come across the name in the first place?“I went looking and we found this website ‘behindthename.com’, based out of British Columbia and lo and behold there was her name. And there was my name, and my sister Waneek’s name, and my mother’s name, and my niece’s name,” said Horn-Miller, who says the website complied when asked to have the names removed.“I’m encouraging other Indigenous people to look at the site, find other sites, and encourage them to take these names down because of how important they are to our people,” said Horn-Miller.When asked under what circumstances a non-Indigenous artist could incorporate Indigenous culture into their work, Horn-Miller said it must start with permission first.“You go to a community and say, ‘hey, I’m writing this script, I’d like to write about your people are you willing to share anything with me about this? There’s protocols around this, where we need to be asked first, not last,” explained Horn-Miller, who is an assistant professor at the School of Indigenous and Canadian Studies at Carleton University.“For example at the university, we have very strict guidelines on how to do ethical research, where you now have to go to a community, you have to ask, ‘can I do this research in this community,’ then ‘can you help me do this, what kind of questions should I ask, who do I need to ask, what kind of research is useful to you? How can I give back?’ These are things we’re asking in the university, but this is not happening in artistic fields.”Horn-Miller isn’t the only one to articulate these thoughts. In his 2018 reference book, Elements of Indigenous Style Cree publisher and university professor Gregory Younging outlines twenty-two principles of culturally appropriate publishing practices, which include seeking permission, collaboration, not assuming copyright or public domain over oral stories or traditions, and sharing royalties with communities when using aspects of their culture.“Don’t just take our stories and tell them and think that it’s right and it’s okay, because it’s not,” said Horn-Miller, who added that the filmmaker has agreed to remove references to Karonhioko’he’s name from the script.However, Horn-Miller has since found a novel where her name and that of her sister’s is used. Despite her frustration, Horn-Miller hopes speaking about these incidents will deter people in the future from committing cultural appropriation, but without quashing sincere interest in Indigenous culture.“A majority of it we can’t share, but there are some things we should share, because of the importance of building these kids of bridges of understanding,” concluded Horn-Miller “but this has to happen in a proper way. With us, not for us and not over our heads.”tfennario@aptn.ca@tfennariolast_img read more

CONTINUE READING
jgwcorbs

House Communication By Bahamas Labour Minister Hon D Shane Gibson – Increase

first_img Bahamas raising Minimum Wage by mid August Recommended for you Related Items:shane gibson Facebook Twitter Google+LinkedInPinterestWhatsAppCOMMUNICATIONBYHON. D. SHANE GIBSON, M.P.,MINISTER OF LABOUR AND NATIONAL INSURANCE&MINISTER OF THE PUBLIC SERVICEONINCREASE IN THE NATIONAL MINIMUM WAGE22ND JULY, 2015Mr. Speaker, I am so grateful to the good people of the Golden Gates Constituency on whose shoulders I stand on today and whom I have the privilege to serve. Today, Mr. Speaker, I rise to deliver a brief, but very important communication on a decision taken by the Government to cause an increase in the National Minimum Wage. Mr. Speaker, subsequent to the enactment of the National Tripartite Council Act 2014, on 1st June, 2015, the National Tripartite Council held its inaugural meeting. During this historic meeting, Social Partners representatives, namely the Bahamas Chamber of Commerce & Employers Confederation, the National Congress of Trade Unions Bahamas, the Commonwealth of the Bahamas Trade Union Congress; and the Government, discussed a number of important matters that impacted the working people of our beloved Bahamaland. This meeting, Mr. Speaker, is considered a milestone in the history of industrial relations in The Bahamas, as it marks a turning point in social dialogue and another achievement by this PLP Government.In the Charter of Governance, Mr. Speaker, we made a covenant with the trade union movement and the working people of our country that this Perry Christie led Administration will take deliberate steps to improve the standard of living and quality of life for Bahamian workers. One of the first things we did was to institutionalize the principles of ILO Convention 144 concerning Tripartite Consultations to Promote the Implementation of International Labour Standards. I wish to remind this Honourable House that it was on 2nd March, 2015, that the Governor General, Her Excellency, Dame Marguerite Pindling, signed into law the National Tripartite Council Act, 2014 and laid another pillar in our plan towards a stronger and safer Bahamas.Today Mr. Speaker, I am very pleased to publically announce and formally communicate to Parliament that the Government of The Bahamas, acting on a recommendation from the National Tripartite Council, has taken a decision to increase the National Minimum Wage.To this end, Mr. Speaker, and pursuant to Section 4(3) of the Minimum Wage Act, Chapter 321C of the Statute Laws of The Bahamas, I, acting in my capacity as the Minister with responsibility for Labour, signed the Minimum Wages Order to increase the minimum wage to Two Hundred and Ten dollars ($210.00) per week or Forty-two dollars ($42.00) per day or Five dollars and twenty-five cents ($5.25) per hour. This increase will become effective on 15th August, 2015, once both Houses of Parliament have affirmed a Resolution that I intend to formally move in due course. The National Minimum Wage, Mr. Speaker, was statutorily enacted on 21st January, 2002, and effectively mandated that no person employed in the Commonwealth of The Bahamas should be paid less than One Hundred and Fifty dollars ($150.00) or Thirty dollars ($30.00) per day, or Four ($4.00) per hour.The new minimum wage, Mr. Speaker, is a 40% increase, and while we in the government would have liked to have seen it a bit higher, we have accepted the recommendation of the National Tripartite Council and acted accordingly. I am advised that the recommended increase came about after extensive consultation with national, regional, and international experts in the area of industrial relations. Additionally Mr. Speaker, the Social Partners, I am told, deliberated, agonized and analysed data acquired both locally and internationally, as well as it examined comparative legislation from a number of CARICOM member states, before coming to a compromise on a final figure for the new national minimum wage. It is envisioned that the Council will monitor the cost of living and the retail price index, and it is prepared to recommend additional increases to ensure that weekly wage of Bahamian workers is able to keep pace with any increase in these index.Our research has confirmed that despite the false rumours that an increase in the minimum wage will lead to higher levels of unemployment, this notion should be rejected. In fact, Mr. Speaker, in the Caribbean, Latin America, and the United States, the increase in minimum wage has had a positive effect on the growth of the economy, as persons would very quickly utilize any wage increase by purchasing goods and services thus increasing economic activity. I wish to caution those unscrupulous employers that would try and undermine this increase and deliberately and intentionally withhold the additional wage from hard working Bahamians, that the Inspectorate Unit of the Department of Labour have been instructed to implement a comprehensive inspection plan to ensure that there is compliance, and it will aggressively pursue violators and prosecute them to the full extent of the law.Mr. Speaker, it is with much pride and on behalf of the working people of the Bahamas that I move the following resolution: WHEREAS section 4(2) of the Minimum Wages Act (Ch. 321B) hereinafter referred to as “the Act” provides that the Minister responsible for Labour may by order, increase the sums of minimum wages specified in section 4(1) of the Act after consultation with –(a) a confederation being in the opinion of the Minister a confederation representative of employers and associations of employers generally; and(b) an association of registered trade unions being an association in the opinion of the Minister representative of employees generally;AND WHEREAS the Minister has consulted with a The Bahamas Chamber of Commerce & Employers Confederation, a confederation representative of employers and associations of employers generally, and both the National Congress of Trade Unions Bahamas and the Commonwealth of the Bahamas Trade Union Congress, associations of registered trade unions which are representative of employees generally;AND WHEREAS pursuant to section 4(3) of the Act, as soon as the Minister has made a minimum wages order it shall be subject to affirmative resolution of both Houses of Parliament;NOW THEREFORE BE IT RESOLVED that this House approves the increase of the minimum wages set forth in paragraph (2) of the annexed Minimum Wages (Increase in Minimum Wages) Order, 2015, that is –“The minimum wages shall be fixed as follows –(a) if the employee is employed by the week the minimum wages shall be two hundred and ten dollars per week;(b) if the employee is employed by the day the minimum wages shall be forty-two dollars per day;(c) if the employee is employed by the hour the minimum wages shall be five dollars and twenty-five cents per hour.” LABOUR MINISTER HON. D.SHANE GIBSON RESPONDS TO LATEST EMPLOYMENT FIGURES Facebook Twitter Google+LinkedInPinterestWhatsApp Press Statement By The Hon. D. Shane Gibson, MP Minister of Labour & National Insurancelast_img read more

CONTINUE READING
obcteega

San Diego County housing permits drop for fifth straight year

first_imgSan Diego County housing permits drop for fifth straight year Posted: September 6, 2019 September 6, 2019 00:00 00:00 spaceplay / pause qunload | stop ffullscreenshift + ←→slower / faster ↑↓volume mmute ←→seek  . seek to previous 12… 6 seek to 10%, 20% … 60% XColor SettingsAaAaAaAaTextBackgroundOpacity SettingsTextOpaqueSemi-TransparentBackgroundSemi-TransparentOpaqueTransparentFont SettingsSize||TypeSerif MonospaceSerifSans Serif MonospaceSans SerifCasualCursiveSmallCapsResetSave SettingsSAN DIEGO (KUSI) – The housing shortage in San Diego County is getting worse.For the fifth year in a row, there was a drop in the number of permits issued for new housing. Housing permits in San Diego County dropped by 43% through the first six months of 2019, compared to the same period in 2018.The numbers show a steady decline in housing construction in San Diego.We talked to Borre Winckel, the President of the Building Industry Association of San Diego County, about the issue. Winckel says the only solution is to ease regulations and make it easier for companies to build. KUSI Newsroom KUSI Newsroom, Categories: Local San Diego News FacebookTwitterlast_img read more

CONTINUE READING
fctlhund

Fortune Cutting Frequency

first_imgThere are no plans to alter rate base, currently at 830,000, the executive said. There are plans, however, to build out the identity of Fortune’s Web site, but it will not break out of its subdomain within the CNNMoney portal.Like most other magazines in the business and finance category, Fortune suffered under the recession and accompanying ad drop. The magazine’s ad pages dropped 35 percent in the first three quarters compared to same period last year, per PIB numbers. Starting next year, Time Inc.’s Fortune will publish 18 times, down from a 25-time frequency. The move coincides with a redesign of the magazine that will emphasize long-form journalism, more utility and a shift to conceptual cover designs.Focus groups were conducted earlier this year to solicit feedback on editorial positioning and design, a spokesperson told FOLIO: sister title Audience Development.The new design, led by John Korpics, who was brought on board as creative director late summer, will have a less cluttered layout and feature upgraded paper and cover stock. Edit will focus on “long-form, deep dive” journalism, and the magazine will also add new sections in the front to accommodate reader requests for more actionable, career-focused content. The magazine will expand by 8 to 12 pages per issue.last_img read more

CONTINUE READING
gecknqrd

This super house plant scrubs pollutants from your home

first_img 16 Photos Sci-Tech More plants Plant-robot hybrid can make its own way to sunny spots The best indoor plants to bring the outside in How to water your plants while you’re away According to the study, the unmodified plants didn’t affect the concentration of either gas much. But the modified plants changed the concentration of chloroform dramatically inside the tube, making it drop by 82 percent just after three days. By the sixth day, it was almost completely undetectable. The concentration of benzene also decreased thanks to the modified plants. By day eight, it dropped by an impressive 75 percent.”People haven’t really been talking about these hazardous organic compounds in homes, and I think that’s because we couldn’t do anything about them,” study author Stuart Strand said in a statement. “Now we’ve engineered houseplants to remove these pollutants for us.”The research team plans to add a protein to pothos plants that can break down another hazardous pollutant inside some homes: formaldehyde. This harmful compound is often found in wood flooring and cabinets. Tags Plug in your plants with these 15 connected garden gadgets (pictures)center_img Post a comment 0 CNET’s Holiday Gift Guide: The best place to find the perfect gift for everyone on your list this season.Culture: Your hub for everything from film and television to music, comics, toys and sports. Houseplants do more than just add natural beauty to your abode. They also help clean the air.Enlarge ImageA University of Washington scientist tests genetically modified pothos ivy to see how fast the plant can break down harmful chemicals. Mark Stone/University of Washington Now, researchers at the University of Washington have improved the air-cleaning properties of one common household plant, the pothos ivy (epipremnum aureum).The team genetically modified pothos ivy to not only remove carcinogens such as chloroform and benzene from the air, but to synthesize a protein, called 2E1, that transforms these harmful compounds into molecules the plants use for their own growth.The researchers chose pothos ivy as the plant for modification because it grows well indoors in a variety of conditions. They detail their work in a new study published this week in Environmental Science & Technology. The scientists added benzene or chloroform gas to modified and non-modified plants in glass tubes. Over 11 days, they collected data on how each pollutant’s concentration changed.  Share your voicelast_img read more

CONTINUE READING
obcteega

ExSouth Texas College of Law In Downtown Houston Changing Name Again

first_img Share Courtesy Houston College of LawA federal judge agreed with the University of Houston that the Houston College of Law name is too similar to that of UH’s law school.An attorney says a downtown Houston law school will change its name again to end a federal trademark lawsuit filed by the University of Houston System.The Houston Chronicle reports the Houston College of Law, formerly the South Texas College of Law, will announce its new name by Nov. 4 in a court agreement reached Wednesday.The University of Houston System in June sued the Houston College of Law after the moniker change was announced. The system’s law school is the University of Houston Law Center.UH officials objected to the competing law school’s new name, saying it was confusing to consumers.Houston College of Law attorney Lynne Liberato says merchandise and billboards touting the June name change will be removed. The new name will also honor a benefactor.last_img read more

CONTINUE READING
mrxvjtbz

Inflatable Habitats for Polar and Space Colonists

first_img Earth to Mars in 100 days: The power of nuclear rockets Explore further This document is subject to copyright. Apart from any fair dealing for the purpose of private study or research, no part may be reproduced without the written permission. The content is provided for information purposes only. Humanity has long since established a foothold in the Artic and Antarctic, but extensive colonization of these regions may soon become economically viable. If we can learn to build self-sufficient habitats in these extreme environments, similar technology could be used to live on the Moon or Mars. Citation: Inflatable Habitats for Polar and Space Colonists (2007, January 29) retrieved 18 August 2019 from https://phys.org/news/2007-01-inflatable-habitats-polar-space-colonists.htmlcenter_img Inflatable dome for cold, high-latitude regions on Earth. The main figure (a) shows a cross-section of the suggested biosphere, and the small figure (b) shows a top-down view. The important components are labeled: a thin, transparent double film on the sunlit side (1), a reflective cover on the shaded side (2), control louvers (3), the entrance (5), and an air pump/ventilator (6). The direction of the Sun is indicated by beams of light (4). The average temperature of the Antarctic coast in winter is about –20 °C. As if this weren’t enough, the region suffers from heavy snowfall, strong winds, and six-month nights. How can humanity possibly survive in such a hostile environment? So far we seem to have managed well; Antarctica has almost forty permanently staffed research stations (with several more scheduled to open by 2008). These installations are far from self-sufficient, however; the USA alone spent 125 million dollars in 1995 on maintenance and operations.[1] All vital resources must be imported—construction materials, food, and especially fuel for generating electricity and heat. Modern technology and construction techniques may soon permit the long-term, self-sufficient colonization of such extreme environments.Why would anyone want to live there? Exceptional scientific research aside, the Arctic is though to be rich in mineral resources (oil in particular). The Antarctic is covered by an ice sheet over a mile thick, making any mineral resources it may have difficult to access. Its biological resources, however, have great potential. Many organisms adapted to extreme cold have evolved unusual biochemical processes, which can be leveraged into valuable industrial or medical techniques.[2] Alexander Bolonkin and Richard Cathcart are firm believers in the value of this chilling territory. “Many people worldwide, especially in the Temperate Zones, muse on the possibility of humans someday inhabiting orbiting Space Settlements and Moon Bases, or a terraformed Mars” Bolonkin points out, “but few seem to contemplate an increased use of ~25% of Earth’s surface—the Polar Regions.”Indeed, the question of space exploration is intriguing. We would all like to know whether there is life on Mars, but robot probes can only perform the experiments they take along with them. Only humans are flexible enough to explore a new territory in detail and determine whether there are enough resources to sustain a long-term presence. Does modern technology really permit the design of lightweight, energy-efficient habitats suitable for other worlds? Greenhouse LivingThe Sun provides the Earth and Moon with about 1400 Watts per square meter, which is ample energy to warm a habitat even when the angle of the incident light and losses due to reflection are taken into account. On Mars, the sunshine is a little less than half as strong—which means that the equator of Mars receives about as much solar energy as the higher latitudes of Earth (Iceland, for example). The most efficient way to generate heat from sunlight is, of course, the well-known “greenhouse” effect. Given a transparent or translucent roof, any structure can hold onto the energy of sunlight long enough to transform it into heat. Glass works well for this, but glass is heavy and expensive to transport.Some good alternatives to glass are now available, however, and more options are on the way. Innovative manufacturing techniques have created many useful composite materials, including translucent, flexible membranes such as Saint-Gobain’s Sheerfill®. While these materials are certainly more expensive than glass, very little is required to construct a useful shelter.In a recent article submitted to arXiv.org [3], Bolonkin and Cathcart have designed an inflatable, translucent dome that can heat its interior to comfortable temperatures using only the weak sunlight of high latitudes. While many details remain to be worked out, the essential concept is sound. To improve the energy efficiency of the structure, they propose adding multiple insulating layers, aluminum-coated shutters, and a fine electrical network to sense damage to the structure. The dome would be supported entirely by the pressure of the air inside, which can be adjusted to compensate for the added buoyancy caused by high winds. The principle advantages of this design are the low weight and flexibility of the material. If only a few people at a time need shelter, an enclosure the size of a small house would weigh only about 65 kg, or as much as a person. This is light enough even for a space mission, and setting up would be as easy as turning on an air pump. For large colonies, enough membrane to enclose 200 hectares would weigh only 145 tons. The interior would be warm and sheltered, a safe environment for the construction of more traditional buildings and gardens.Bolonkin and Cathcart have attracted attention with their proposal, but a prototype has not yet been constructed.Notes:[1] Source: 1996 report on the U.S. Antarctic Program by the National Science and Technology Council; www.nsf.gov/pubs/1996/nstc96rp/chiv.htm[2] Source: Sam Johnston, “Recent Trends in Biological Prospecting”, UN University Institute for Advanced Studies; www.ias.unu.edu/sub_page.aspx?catID=35&ddlID=20[3] xxx.arxiv.org/abs/physics/0701098By Ben Mathiesen, Copyright 2007 PhysOrg.com. All rights reserved. This material may not be published, broadcast, rewritten or redistributed in whole or part without the express written permission of PhysOrg.com.last_img read more

CONTINUE READING
gtfwxyto

Jadavpur University to collaborate with central research institutes

first_imgKolkata: Jadavpur University has been identified by the union government as the state’s only university and one of the 10 universities in the country to develop synergy between the varsity and centrally funded research institutes.”This will enable us to have access to infrastructure facilities of central research institutes located in and around Kolkata. It will enable us to create opportunities of joint collaborative research with these central institutes and at the same time, we will be able to carry out joint research projects and joint supervision of PhD dissertations by the faculty members of JU and these research institutes,” JU Vice-Chancellor Suranjan Das said. Also Read – Heavy rain hits traffic, flightsAccording to a senior JU official, the university teachers couldn’t avail the excellent infrastructure facilities in the research institutes. “Now, with this distinction, the standard of research will surely get a big boost,” he added.According to a senior official of the varsity, JU is probably the only varsity in eastern India to avail these facilities.The central institutes with whom JU can develop synergy are Saha Institute of Nuclear Physics, Central Glass and Ceramic Research Institute, National Institute of Biomedical Genomics, Indian Institute of Chemical Biology, SN Bose Institute, Bose Institute, Indian Association of Cultivation of Science and Variable Energy Cyclotron Centre. The joint faculty council of Science and Technology as well as the executive council of JU have already accepted the Centre’s proposal in principle and have resolved that Boards of Studies will discuss the modalities for implementation of the scheme. The Union ministry has also given the nod to JU to take on board any other experts as desired from universities and national laboratories in proximity.last_img read more

CONTINUE READING
ivjmglyp

San Francisco legislation proposes a citywide ban on governments use of facial

first_imgSan Francisco will be the first city in the U.S. to ban the government from using facial recognition technology, if a legislation that was tabelled yesterday, stands approved. The ‘Stop Secret Oversight Ordinance’, will be proposed by Supervisor Aaron Peskin. The legislation seeks to do the following: Departments in the city will have to seek approval from the Board of Supervisors before using or buying surveillance technology The legislation would implement annual audits of surveillance technology in order to ensure that the tools involved are properly used. A blanket ban will be issued that stops departments from purchasing or using facial recognition technology. The legislation, which would also apply to law enforcement, will be heard in committee next month. It has already obtained support from civil rights groups like the ACLU of Northern California. The legislation also makes a strong point that ‘surveillance efforts have historically been used to intimidate and oppress certain communities and groups more than others, including those that are defined by a common race, ethnicity, religion, national origin, income level, sexual orientation, or political perspective. The propensity for facial recognition technology to endanger civil rights and civil liberties substantially outweighs its purported benefits, and the technology will exacerbate racial injustice and threaten our ability to live free of continuous government monitoring’. The news comes at a time where facial recognition technology stands at the realms of debate between various privacy and security personnel. While the tech has been put to good use by various organizations, we can’t help but notice the negative impacts it can have on citizens. Take for instance the WEF 2019 talk that pointed out the role of governments and military in the use (and potential abuse) of today’s technology. Users on Twitter displayed reactions along the same line, expressing their relief that the government will no longer be able to “invade and micromanage the privacy of others.” Some also have called Facial recognition used by the government as ‘Dangerous’. Head over to The Verge for more insights on this news. Read Next Four IBM facial recognition patents in 2018, we found intriguing Google won’t sell its facial recognition technology until questions around tech and policy are sorted Australia’s Facial recognition and identity system can have “chilling effect on freedoms of political discussion, the right to protest and the right to dissent”: The Guardian reportlast_img read more

CONTINUE READING
poelcsdo

Creating a chatbot to assist in network operations Tutorial

first_imgIn this tutorial, we will understand how to leverage chatbots to assist in network operations. As we move toward intelligent operations, another area to focus on is mobility. It’s good to have a script to perform configurations, remediations, or even troubleshooting, but it still requires a presence to monitor, initiate, or even execute those programs or scripts. Nokia’s MIKA is a good example of a chatbot that operations personnel can use for network troubleshooting and repair. According to Nokia’s blog,  MIKA responds with an alarm prioritization information based on the realities for this individual network and also compare’s the current situation to a whole service history of past events from this network and others, in order to identify the best solution for the current problem. Let’s create a chatbot to assist in network operations. For this use case, we will use a widely-used chat application, Slack. Referring to the intelligent data analysis capabilities of Splunk, we would see some user chat interaction with the chatbot, to get some insight into the environment. This tutorial is an excerpt from a book written by Abhishek Ratan titled Practical Network Automation – Second Edition. This book will acquaint you with the fundamental concepts of network automation and help you improve your data center’s robustness and security. The code for this tutorial can be found on GitHub. As we have our web framework deployed, we’ll leverage the same framework to interact with the Slack chatbot, which in turn will interact with Splunk. It can also interact directly with network devices so we can initiate some complex chats, such as rebooting a router from Slack if need be. This eventually gives mobility to an engineer who can work on tasks from anywhere (even from a cellphone) without being tied to a certain location or office. To create a chatbot, here are the basic steps: Create a workspace (or account) on Slack: Create an application in your workspace (in our case, we have created an app called mybot): Here is the basic information about the application (App ID and Client ID can be used along with other information that uniquely identifies this application): Add a bot capability to this application: Add the event subscriptions and mapping to the external API that the messages will be posted to. An event subscription is when someone types the reference to the chatbot on the chat, then which API will be called with the data that is being typed in the chat with this chatbot: Here, a crucial step is once we type in the URL that accepts chat messages, that particular URL needs to be verified from Slack. A verification involves the API endpoint sending the same response back as a string or JSON that is being sent to that endpoint from Slack. If we receive the same response, Slack confirms that the endpoint is authentic and marks it as verified. This is a one-time process and any changes in the API URL will result in repeating this step. Here is the Python code in the Ops API framework that responds to this specific query: import falconimport jsondef on_get(self,req,resp): # Handles GET request resp.status=falcon.HTTP_200 # Default status resp.body=json.dumps({“Server is Up!”})def on_post(self,req,resp): # Handles POST Request print(“In post”) data=req.bounded_stream.read() try: # Authenticating end point to Slack data=json.loads(data)[“challenge”] # Default status resp.status=falcon.HTTP_200 # Send challenge string back as response resp.body=data except: # URL already verified resp.status=falcon.HTTP_200 resp.body=”” This would validate, and if a challenge is sent from Slack, it would respond back with the same challenge value that confirms it to be the right endpoint for the Slack channel to send chat data to. Install this application (or chatbot) into any channels (this is similar to adding a user in a group chat): The core API framework code that responds to specific chat messages, performs the following actions: Acknowledges any post sent to Slack with a response of 200 in three seconds. If this is not done, Slack reports back: endpoint not reachable. Ensures any message sent from chatbot (not from any real user) is again not sent back as a reply. This can create a loop, since a message sent from a chatbot, would be treated as a new message in Slack chat and it would be sent again to URL. This would eventually make the chat unusable, causing repetitive messages on the chat. Authenticates the response with a token that would be sent back to Slack to ensure the response coming to Slack is from an authenticated source. The code is as follows: import falconimport jsonimport requestsimport base64from splunkquery import runfrom splunk_alexa import alexafrom channel import channel_connect,set_dataclass Bot_BECJ82A3V(): def on_get(self,req,resp): # Handles GET request resp.status=falcon.HTTP_200 # Default status resp.body=json.dumps({“Server is Up!”}) def on_post(self,req,resp): # Handles POST Request print(“In post”) data=req.bounded_stream.read() try: bot_id=json.loads(data)[“event”][“bot_id”] if bot_id==”BECJ82A3V”: print(“Ignore message from same bot”) resp.status=falcon.HTTP_200 resp.body=”” return except: print(“Life goes on. . .”) try: # Authenticating end point to Slack data=json.loads(data)[“challenge”] # Default status resp.status=falcon.HTTP_200 # Send challenge string back as response resp.body=data except: # URL already verified resp.status=falcon.HTTP_200 resp.body=”” print(data) data=json.loads(data) #Get the channel and data information channel=data[“event”][“channel”] text=data[“event”][“text”] # Authenticate Agent to access Slack endpoint token=”xoxp-xxxxxx” # Set parameters print(type(data)) print(text) set_data(channel,token,resp) # Process request and connect to slack channel channel_connect(text) return# falcon.API instance , callable from gunicornapp= falcon.API()# instantiate helloWorld classBot3V=Bot_BECJ82A3V()# map URL to helloWorld classapp.add_route(“/slack”,Bot3V) Performing a channel interaction response: This code takes care of interpreting specific chats that are performed with chat-bot, in the chat channel. Additionally, this would respond with the reply, to the specific user or channel ID and with authentication token to the Slack API https://slack.com/api/chat.postMessage. This ensures the message or reply back to the Slack chat is shown on the specific channel, from where it originated. As a sample, we would use the chat to encrypt or decrypt a specific value. For example, if we write encrypt username[:]password, it would return an encrypted string with a base64 value. Similarly, if we write decrypt , the chatbot would return a after decrypting the encoded string. The code is as follows: import jsonimport requestsimport base64from splunk_alexa import alexachannl=””token=””resp=””def set_data(Channel,Token,Response): global channl,token,resp channl=Channel token=Token resp=Responsedef send_data(text):global channl,token,resprint(channl)resp = requests.post(“https://slack.com/api/chat.postMessage”,data='{“channel”:”‘+channl+'”,”text”:”‘+text+'”}’,headers={“Content-type”: “application/json”,”Authorization”: “Bearer “+token},verify=False)def channel_connect(text):global channl,token,resptry: print(text)arg=text.split(‘ ‘)print(str(arg))path=arg[0].lower()print(path in [“decode”,”encode”])if path in [“decode”,”encode”]:print(“deecode api”)else:result=alexa(arg,resp)text=””try:for i in result:print(i)print(str(i.values()))for j in i.values():print(j)text=text+’ ‘+j#print(j)if text==”” or text==None:text=”None”send_data(text)returnexcept:text=”None”send_data(text)returndecode=arg[1]except:print(“Please enter a string to decode”)text=” argument cannot be empty”send_data(text)returndeencode(arg,text)def deencode(arg,text):global channl,token,respdecode=arg[1]if arg[1]==’–help’:#print(“Sinput”)text=”encode/decode “send_data(text)returnif arg[0].lower()==”encode”:encoded=base64.b64encode(str.encode(decode))if ‘[:]’ in decode:text=”Encoded string: “+encoded.decode(‘utf-8’)send_data(text)returnelse:text=”sample string format username[:]password”send_data(text)returntry:creds=base64.b64decode(decode)creds=creds.decode(“utf-8”)except:print(“problem while decoding String”)text=”Error decoding the string. Check your encoded string.”send_data(text)returnif ‘[:]’ in str(creds):print(“[:] substring exists in the decoded base64 credentials”)# split based on the first match of “[:]”credentials = str(creds).split(‘[:]’,1)username = str(credentials[0])password = str(credentials[1])status = ‘success’else:text=”encoded string is not in standard format, use username[:]password”send_data(text)print(“the encoded base64 is not in standard format username[:]password”)username = “Invalid”password = “Invalid”status = ‘failed’temp_dict = {}temp_dict[‘output’] = {‘username’:username,’password’:password}temp_dict[‘status’] = statustemp_dict[‘identifier’] = “”temp_dict[‘type’] = “”#result.append(temp_dict)print(temp_dict)text=” “+username+” “+passwordsend_data(text)print(resp.text)print(resp.status_code)return This code queries the Splunk instance for a particular chat with the chatbot. The chat would ask for any management interface (Loopback45) that is currently down. Additionally, in the chat, a user can ask for all routers on which the management interface is up. This English response is converted into a Splunk query and, based upon the response from Splunk, it returns the status to the Slack chat. Let us see the code that performs the action to respond the result, to Slack chat: from splunkquery import rundef alexa(data,resp): try: string=data.split(‘ ‘) except: string=data search=’ ‘.join(string[0:-1]) param=string[-1] print(“param”+param) match_dict={0:”routers management interface”,1:”routers management loopback”} for no in range(2): print(match_dict[no].split(‘ ‘)) print(search.split(‘ ‘)) test=list(map(lambda x:x in search.split(‘ ‘),match_dict[no].split(‘ ‘))) print(test) print(no) if False in test: pass else: if no in [0,1]: if param.lower()==”up”: query=”search%20index%3D%22main%22%20earliest%3D0%20%7C%20dedup%20interface_name%2Crouter_name%20%7C%20where%20interface_name%3D%22Loopback45%22%20%20and%20interface_status%3D%22up%22%20%7C%20table%20router_name” elif param.lower()==”down”: query=”search%20index%3D%22main%22%20earliest%3D0%20%7C%20dedup%20interface_name%2Crouter_name%20%7C%20where%20interface_name%3D%22Loopback45%22%20%20and%20interface_status%21%3D%22up%22%20%7C%20table%20router_name” else: return “None” result=run(query,resp) return result The following Splunk query fetches the status: For UP interface: The query would be as follows: index=”main” earliest=0 | dedup interface_name,router_name | where interface_name=”Loopback45″ and interface_status=”up” | table router_name For DOWN interface (any status except ): The query would be as follows: index=”main” earliest=0 | dedup interface_name,router_name | where interface_name=”Loopback45″ and interface_status!=”up” | table router_name Let’s see the end result of chatting with the chatbot and the responses being sent back based on the chats. The encoding/decoding example is as follows: As we can see here, we sent a chat with the encode abhishek[:]password123 message. This chat was sent as a POST request to the API, which in turn encrypted it to base64 and responded back with the added words as Encoded string: . In the next chat, we passed the same string with the decode option. This responds back with decoding the information from API function, and responds back to Slack chat, with username abhishek and password password123. Let’s see the example of the Splunk query chat: In this query, we have shut down the Loopback45 interface on rtr1. During our scheduled discovery of those interfaces through the Python script, the data is now in Splunk. When queried on which management interface (Loopback45) is down, it would respond back with rtr1. The slack chat, On which routers the management interface is down, would pass this to the API, which, upon receiving this payload, will run the Splunk query to get the stats. The return value (which, in this case, is rtr1) will be given back as a response in the chat. Similarly, a reverse query of, On which routers the management interface is up, will query Splunk and eventually share back the response as rtr2, rtr3, and rtr4 (as interfaces on all these routers are UP). This chat use case can be extended to ensure that full end-to-end troubleshooting can occur using a simple chat. Extensive cases can be built using various backend functions, starting from a basic identification of problems to complex tasks, such as remediation based upon identified situations. Summary In this tutorial, we implemented some real-life use cases and looked at techniques to perform troubleshooting using chatbot. The use cases gave us insight into performing intelligent remediation as well as performing audits at scale, which are key challenges in the current environment. To learn how to automate your own network without any hassle while leveraging the power of Python, check out our book Practical Network Automation – Second Edition. Read Next Preparing and automating a task in Python [Tutorial] PyPy 7.0 released for Python 2.7, 3.5, and 3.6 alpha 5 blog posts that could make you a better Python programmerlast_img read more

CONTINUE READING