Before Change
"Consider using project_scalar_products_matrix which is "
"safer.")
actual_first_ranks = np.array(first_static_ranks.as_list())[1:-1]
actual_first_ranks = actual_first_ranks[~np.isnan(actual_first_ranks)]
actual_second_ranks = np.array(second_static_ranks.as_list())[1:-1]
actual_second_ranks = actual_second_ranks[~np.isnan(actual_second_ranks)]
if any(actual_first_ranks % 2 != 0) or any(actual_second_ranks % 2 != 0):
raise ValueError("The TT-ranks of the arguments are not dividable by 2, it "
"seems like the arguments are not projections.\n"
"Consider using scalar_products_matrix which doesn\" "
"assume tangent space structure.")
ndims = projected_tt_vectors_1.ndims()
tt_ranks = shapes.lazy_tt_ranks(projected_tt_vectors_1)
right_size = tt_ranks[1] / 2
After Change
"space of the same TT-object. The provided arguments are "
"projections on different TT-objects (%s and %s). Or at "
"least the pointers are different." %
(projected_tt_vectors_1.projection_on,
projected_tt_vectors_2.projection_on))
ndims = projected_tt_vectors_1.ndims()
tt_ranks = shapes.lazy_tt_ranks(projected_tt_vectors_1)


Get started developing with the City's Open Data
Building applications on open data is easy with the Socrata Open Data API (SODA). Read the Getting Started guide to learn more.
Looking for more in-depth examples? Need libraries for Java, Ruby, Scala, or other languages? Socrata's full API documentation has you covered.
Show off your open data-powered application! Tell us about it here and check out our app showcase.
Every dataset, map, chart, and filtered view has an API! To find it, click the Export button and select SODA API.
Under SODA API, you will find the endpoint URL as well as a list of available column names.


Starting XI: Maritzburg v Highlands
by Soccer LadumaTelkom Knockout
Teams: Maritzburg United and Highlands Park
Date: 01 November 2019
Venue: Harry Gwala Stadium
In-form Maritzburg United will be hoping to extend their winning run when they host Highlands Park in the quarter-finals of the Telkom Knockout on Friday evening at Harry Gwala Stadium.
The match is set to get underway at 20h00.
The Team of Choice are in a rich vein of form after winning their last four games in all competitions, although their victory over Bidvest Wits in the first round of the Telkom Knockout was achieved via a penalty shoot-out.
Eric Tinkler’s charges were last in competitive action last Friday, edging Cape Town City 1-0 in the Absa Premiership.
Meanwhile, the Lions of the North have not kept up the same form before the MTN8 final loss at the beginning of October, after losing a further two games in the league to Mamelodi Sundowns and Orlando Pirates in the same month.
However, Highlands progressed to the quarter-finals of the tournament after beating Black Leopards 6-5 on penalties a couple weeks ago.
Highlands are looking to reach the semi-finals of this tournament for the first time in the PSL era. Last season they were knocked out in the first round by Maritzburg.
Here's how they line up:
Maritzburg: 31. Mpandle, 25. Xulu, 36. Kunene, 3. Sanoka, 23. De Reuck, 45. Mngonyama, 4. Allie, 14. Claasen, 26. Shandu, 7. Kutumela, 20. Moseamedi.
Subs: 30. Ofori, 15. Timm, Jappie, 5. Morgan, 8. Buchanan, 12. Nyoni, 17. Augusto.
Highlands: 1. Heugh, 15. Msane, 5. Fransman, 23. Msimango, 24. Rae, 8. Mbunjana, 22. Williams, 6. Letsholonyane, 27. Jooste, 12. Mogaila, 11. Nyembe.
Subs: 32. Ngobeni, 14. Mzava, 34. Motsepe, 21. Mbhele, 38. Shalulile, 10. Mokoena, 17. Ramagalela.


Google's free service instantly translates words, phrases, and web pages between English and over 100 other languages.
Check your understanding of English words with definitions in your own language using Cambridge's corpus-informed translation dictionaries


Javascript has long been a staple of web devopment, whether you wanted to dynamically change the contents of the page or interact with the user in some way. However in the past neither of these things was paticularly easy to do especially the altering of contents, Netscape and IE could both do this however they both did it in there own completely different way. Now however with the widespread adoption and popularization of the language there are frameworks emerging all the time to make life easier for developers, ie node.js, jquery, AngularJS etc.
One of the great things about javascript in its more convential use-case is that it allows the outsourcing of valuable computation time away from the server and out to the browser of the end user. This is a great thing as a developer since servers are expensive and outsourcing those cycle to the user allows more scalability to the application that is being made. This does however have its potential downsides obviously if the user has an older machine which can't handle the workload the application might be slugish or even unusable, and will simply not work if the user has their browswer set to not run javascript for either performance or security reasons.


We redefine solutions!
- enable seamless experiences
- e-enable frictionless action-items
- synthesize cutting-edge eyeballs
- maximize bricks-and-clicks vortals
- embrace leading-edge e-business
- enhance granular metrics
- synthesize dynamic architectures
- incubate mission-critical supply-chains
- transition web-enabled e-business
- reintermediate out-of-the-box supply-chains
- whiteboard efficient mindshare
- mesh open-source experiences
- evolve one-to-one functionalities


List Filter Input
The List Filter Input is a great way to create a fixed list from which you can select an item, when you don't need the advanced functionality of the Script Filter object.
Using the List Filter Input
Use a List Filter to make a list of your favourite comics, allowing you to open the right URL based on the item you've chosen, or use it to select a to-do list from your pre-set options.
Creating a list is very simple; Add the List Filter object to your workflow, and you'll see the following configuration options:
Each item can be added to the list with a title, subtitle and argument; The argument is then passed on as an output to the next object in your workflow.
Placeholder text is no longer required, but is recommended. The placeholder title and subtitle appear until you start typing your actual search query text. Without a placeholder, your filter will still work, but will not appear until you start typing your search query text.
Need more flexibility or dynamically created lists? Script Filters are a more customisable alternative for adding dynamic results to Alfred.
Setting List Item Icons
The list items will first inherit the icon set in the workflow's general settings. This icon can be overridden by the main List Filter object icon, set at the top of the configuration sheet. You can then override with an individual icon for the list item.
Adding a lot of images to your workflow? Keep them small by processing them via an optimisation tool like TinyPNG.
Workflow Examples Using List Filters
The Simple To-Do list example uses the List Filter object to allow you to select which to-do list you'd like to add your task to. You can find this workflow example under the [+] button at the bottom of the Workflows sidebar in Alfred's preferences, as one of the Getting Started guides and examples we've included.
Double-click the yellow List Filter object to see how the three to-do lists are added.
CSV Import
Drop a CSV file into the configuration sheet list to add the items in the CSV file to your list.
Alfred's CSV parser to adheres to RFC 4180. With regards to the ambiguity of quotes and leading spaces, for a line to be quoted (allowing for newlines and commas), the "
needs to be either at the very beginning of a line, or directly after a comma. If there are spaces after a comma then a "
, this field is not treated as quoted, and any "
marks are treated as literal.


Lawson father Dr. mother Wilkins parents years Baltimore family school medical time work home Lawson’s did came took early know {border-style Figure little px;} year #ffffff;} George Hopkins children felt friends went college house New great worked life summer Claude Hattie Johns Medical School good grandfather knew large death later lived married quite Baltimore, Friends come days father, friends, new patients pediatric said social spent usually Emilie Hattie’s away childhood died him. hours left let lifelong met old small Aunt Christmas Harriet Park Walter born described enjoyed father’s got himself like loved played position px; saw told {font-family Baltimore. Dad Elizabeth German June Lucile Mary Mr. Phil Philadelphia War World York apparently best called dinner families font-size including just long me. medicine mother, office place playing room singing stay students tell time. trip visited visiting Annie Chesapeake December Fleischmann France, Philip Roland St. asked atmosphere deal dear double; friend friend, gave hard having hospital included job known learned letters man mother’s people piano provided sailing sister soon stayed taking taught times town wedding week wonderful years. younger (Figure (Figures American Biays Emilie’s John Letter Maryland McMaster Pediatric Susan Wilkins, academic addition aged also, and, article border-color border-width built child day devoted doctor education, endocrine group happy heart her. high him, interesting kept late living lovely members memorable memories musical parties pictures possible received relatives remained sense solid; son teaching things trips wife, working young {font-style {font-weight Bache Broadway, Clara Country Emilie, Europe February Following French Goucher History Hospital Hospital, Lane Milt North October Philadelphia, Presbyterian Quaker Robert Schreiner Severn South Sun Sunday U.S. United Wedding accept adult apartment attending available baby believe bold care career children, children. church colorful contact cottage courier; course dated daughter daughter, decided delighted developed doing dress education em; especially experience fabulous fine floor following friends. garden getting grade graduated grandparents grief heard international join leaving letter life, life. live lives looked lost love marriage meet month months moved named nearby older phone photograph physician play practice, private provide pt;} public ran recall reportedly research returned school, schools schools, second set sister, son. special spend taken tales them; thirteen till time, train vacation visit wanted work. worried


citriodora {border-style ▶). px;} #ffffff;} extract aqueous pregnancy mean weight control Medical effects groups mice (.) Iran Mashhad University group px; significant {font-family Lippia Mashhad, body effect fetal fetuses font-size lemon shown treated used (%) Sciences, double; malformations verbena Data Maternal Pharmacy, SEM School antioxidant border-color border-width consumption difference dose herbal leaves maternal skeletal solid; species study using {font-style {font-weight Figure Research [], abnormalities activity administration bold courier; deformity em; g/kg number observation pharmacological pregnant properties pt;} received respectively. statistically


About me
Welcome to my blog. This is a collection of random thoughts and rants.
Allow me to introduce myself. My name is Ivan Porto Carrero and I'm an enthusiastic developer on Scala, .NET and Ruby.
Through this blog I hope I can share some of that passion and maybe help somebody out when they are looking on how to do something.


{% extends "graphs/base.html" %} {% block content %}
Shelter-in-place: March 23 to May 1.
Reopening status: Reopening
2,187 people per square mile
{{ ohio.description }}


Endless Plains [am67], plain, in Imperia, peasants: 101
Last updated Turn #111
Endless Plains [am67], plain, in Imperia, peasants: 101
------------------------------------------------------------------------
17: Crowd [ci0z] disperses.
17: Band of thieves [gn7u], bandits, number: 20, went east.
Routes leaving Endless Plains:
North, forest, to New Forest [al67], 8 days
East, plain, to Endless Plains [am68], 7 days
South, mountain, to Imperial Mountains [an67], 10 days
West, forest, to New Forest [am66], 8 days
Seen here:
Stack of nazgul [ga5n], nazgul, number: 4
Stack of giants [ho6i], giants, number: 13


Palakkad About this soundpronunciation (help·info), also known as Palghat, is a city and municipality in the state of Kerala in India, spread over an area of 26.60 square kilometres (10.27 sq mi); it is the administrative headquarters of the Palakkad District. The city is situated about 350 kilometres (220 mi) north of state capital Thiruvananthapuram and 50 kilometres (31 mi) southwest of Coimbatore in Tamil Nadu, and 66 kilometres (41 mi) northeast of Thrissur on the Salem-Kanyakumari National Highway NH 544. Palakkad is also known as the rice bowl of Kerala. The 18th-century Palakkad Fort has sturdy battlements, a moat, and a Hanuman temple on its grounds. North, on the Kalpathy River, the 15th-century Viswanatha Swamy Temple is the main venue of the famous Ratholsavam chariot festival. Northeast, near Malampuzha Dam, the town of Malampuzha has a rock garden created from recycled materials.
Dhoni Waterfalls
Fantasy Park
Palakkad fort
Malampuzha Dam


class ORMMigrations
Handle the migrations for the ORM.
Methods
|
__construct(DataMapperInterface $dataMapper, MigrationManagerInterface $MigrationManager = null)
Constructor. |
||
|
autoMigrate(Definition[]|Definition $definitions)
Automatically migrate given entity definitions. |
||
| string |
generateMigration(array|Definition $definitions, string $migrationName)
Generate a migration from given entity definitions. |
|
| string |
previewMigration(array|Definition $definitions, string $migrationName)
Generate a migration preview from given entity definitions. |
|
| string |
outputPHP(mixed $v, integer $tabs, boolean $line = false)
Format PHP variables to string. |
Details
at line 25
public
__construct(DataMapperInterface $dataMapper, MigrationManagerInterface $MigrationManager = null)
Constructor.
at line 34
public
autoMigrate(Definition[]|Definition $definitions)
Automatically migrate given entity definitions.
at line 48
public string
generateMigration(array|Definition $definitions, string $migrationName)
Generate a migration from given entity definitions.
at line 68
public string
previewMigration(array|Definition $definitions, string $migrationName)
Generate a migration preview from given entity definitions.
at line 442
public string
outputPHP(mixed $v, integer $tabs, boolean $line = false)
Format PHP variables to string.


I'm a Computer Science junior at CMU with an interest in web applications, maching learning, and finance.
B.S. in Computer Science • May 2020 • QPA: 3.85
Relevant Coursework:
Honors: Dean's List, School of Computer Science: Fall 2016, Spring 2017
Edison, NJ • GPA: 4.01
Honors: National Merit Scholar, National AP Scholar, Science Olympiad First Place State Medalist in Disease Detectives
I learned HTML and CSS to create a page featuring photos I had taken, complemented by some parallax and typography. Click here to visit.
Webdesign, PhotographyA side-scroller sledding game created with Pygame in Python in Fall of 2016.
PythonMy team and I created a set of minigames to teach langauge skills to kids. Using OpenCV, we tracked movement that allowed for tracing of letters and bubble popping to spell words. The mediawiki API was also used to grab snippets of text for reading practice.
Python, OpenCVI designed community geofilters that were accepted by Snapchat to be featured in various locations including local areas like Carnegie Mellon, Schenley Park, and Pittsburgh, as well as other cities such as Shanghai and Newark, for over 2 million total uses.
Illustrator, DesignAnalyzed data gathered from the Google Finance API using Python and libraries such as pandas and matplotlib; backtested simple algorithms following basic trends and technical indicators as an introduction to algorithmic trading.
PhotographyA gallery of photos I've taken over the past few years; page made from scratch.
PhotographyGraphic design, photography, volleyball, cello, skiing, journaling, traveling
Please contact me at<EMAIL_ADDRESS>or via the form below!


--- layout: page title: Setup permalink: /setup/ group: main icon: fa-cog order: 2 ---
Setup your environment and add the scss files as explained on the home page.
And just add a bit of html to your website.
{% highlight html %}Here is the default _variables.scss file, you can setup your own colors, sizes and settings.
{% highlight scss %}{% include_relative _variables.scss %}{% endhighlight %}And just enjoy the rest of your development.


Breakfast after Vasikin
The Lachmanyot at Ma'apeh Ne'eman, on the way towards Sha'ar Tzion, come out of the oven right around the end of Vasikin. Getting a couple of fresh rolls and a Shoko B'Sakit is the best way to finish off an all-night learning session.
Posted by Tzvi Goldstein, 5771-74


It is fun to share apps you create with others. To make your work available to others, you have the following options:
Put your HTML and JavaScript files on a web server and run the app from the Evothings Client app (estimated time 15 minutes).
Build a native app with Apache Cordova (estimated time 2 - 8 hours), and publish on the app stores (estimated time 4 - 16 hours depending on which app stores you target).
To run your app from Evothings Client, do as follows:
Upload your HTML, CSS, JavaScript and media files (images) to a web server. Note that you don't need to include any Cordova JavaScript files. The file cordova.js and Cordova plugin files are bundled with the Evothings Client app.
Install and run the Evothings Client app on your mobile device.
Enter the url to the main HTML file on the web server in the address field, and press the Connect button. For example if you have index.html in the folder "demo", you can enter a url like this (just as with a web page!): http://evothings.com/demo
You can also make a menu page with links to all of your apps, and open that page in Evothings client.
The drawback is you must be online to run your apps.
The positive thing is that it is very quick and easy to share apps with others. Just ask them to install the Evothings Client app and supply a url to your app or start page.
To make sharing of apps even easier, you can create links using the evothings: URL scheme. Evothings links can be shared by email or on any website, e.g. on Twitter, on a blog or on an intranet page. The user just selects the link, and the Evothings Client app launches with the app pointed to by the link.
Here is an example:
evothings://mysite.com/demo/myapp.html
That URL will launch the Evothings Client app and open:
http://mysite.com/demo/myapp.html
Apache Cordova is a build system for creating native apps with bundled HTML and JavaScript content. Apps built with Cordova are native apps that can be published on the app stores.
The Native App Build Overview shows how to build apps with Cordova.
Start out easy and deploy your app on a web server, then run it from the Evothings Client app.
If you have several apps you wish to share, make an index page that acts like a menu or gallery you can use as a launchpad (just put links to your apps on the menu page, as you would for any web page).
When you are ready for app store publication, learn how to build native apps with Cordova.


TABLE OF CONTENT
A. GS1 Related History 1. Mysore Lancers’ tryst with Haifa B. GS2 Related Polity 1. SC open to liquor sale on city highways 2. Allow people with genuine reasons to deposit banned notes: SC to govt 3. Centre may partially lift AFSPA 4. ‘Make registration of marriages compulsory International Relations 1. Moving beyond security ties 2. Incursions by PLA rose in 2017 3. Vietnam for greater Indian role in SE Asia 4. North Korea claims it tested intercontinental missile C. GS3 Related Economics 1. Tap GST for jobs data: PM-appointed panel Science & Technology 1. Drug-resistant TB higher among children than expected: report E. Concepts-in-News: Related Concepts to Revise/Learn F. Bills/Acts/Schemes/Orgs in News G. Practice Questions for UPSC Prelims Exam
UPSC Current Affairs 2017: News Analysis
A. GS1 Related
1. Mysore Lancers’ tryst with Haifa
Context:
- A long forgotten slice of martial history related to Mysuru will be revisited when Prime Minister Narendra Modi pays tribute to fallen Indian soldiers at the Haifa cemetery in Israel.
The Mysore Imperial Service and the liberation of Haifa:
- The Mysore Imperial Service played a big role in the liberation of Haifa on September 23, 1918, from Ottoman Turks and Germans, by allied forces.
- This is seen as one of the fiercest battles in the west Asian theatre of World War I in which India, as a British colony, fought German and the Ottoman troops.
- The Mysore Lancers were in the 15th Imperial Service as the forces sent by the princely states of Mysore, Jodhpur and Hyderabad.
- The then Mysuru Maharaja Nalwudi Krishnaraja Wadiyar sent his troops to defend the empire and even gave nearly ₹50 lakh to the India War Fund.
C. GS2 Related
1. SC open to liquor sale on city highways
Context:
- December 15, 2016 Supreme Court order: prohibited the sale of liquor within a distance of 500 metres from the outer edge of national and State highways.
- March 2017 order: the ban was not restricted to just liquor shops alongside the highways but also to other larger establishments, including pubs and hotels.
- Intention: to prevent drunken driving on high-speed thoroughfares.
- Many states started de-notifying highways in order to circumvent the December 15th
Petition: filed by NGO Arrive Safe Society challenging the Chandigarh administration’s move to de-notify certain roads.
In news:
The Supreme Court observations
- nothing wrong in de-notifying particular stretches of highways running inside city limits as city roads and such de-classification does not violate its earlier order of banning liquor sales near National and State highways.
Reasons given:
- Traffic inside city limits is usually slow and heavy, and stretches de-notified fall within the city limits.
- .The goal of the liquor ban was to prevent drunken driving in fast-moving traffic.
- The pace of traffic with the city is very different from traffic outside city limits.
- Purpose of the ban is to avoid drivers getting inebriated while driving on highways inter-linking cities.
Widespread relief: especially to pubs and restaurants in the metros, which were forced to shut down
2. Allow people with genuine reasons to deposit banned notes: SC to govt
Context: demonetization
In news:
- The Supreme Court asked the Reserve Bank of India (RBI) to come up with a policy to offer a window to people who could not deposit their demonetised notes for legitimate reasons before last year’s December 30 deadline.
3. Centre may partially lift AFSPA
In news:
- As per the inputs from a senior Home Ministry official: The Centre is considering partial removal of the Armed Forces (Special Powers) Act (AFSPA) from Assam and Arunachal Pradesh. There was no proposal to withdraw it in Jammu and Kashmir.
- In Arunachal Pradesh, complete withdrawal, except two districts in the east bordering Myanmar and Nagaland.
- Views sought: The Ministry has asked the two States for their views on AFSPA withdrawal and said that it was open to reviewing the stringent law in other States like Manipur.
Basics of AFSPA :
- Armed Forces (Special Powers) Acts (AFSPA), are Acts of the Parliament of India that grant special powers to the Indian Armed Forces in what each act terms “disturbed areas”.According to The Disturbed Areas (Special Courts) Act, 1976 once declared ‘disturbed’, the area has to maintain status quo for a minimum of 3 months.
- The AFSPA gives powers to the Army and Central forces deployed in “disturbed areas” to kill anyone acting in contravention of law, arrest and search any premises without a warrant.
- It provides cover to forces from prosecution and legal suits without the Centre’s sanction.
Active AFSPA:
- Whole of Nagaland, Assam, Manipur (excluding the seven Assembly constituencies of Imphal).
- In Arunachal Pradesh, it is in force in 16 police stations and in Tirap, Longding and Changlang districts bordering Assam.
- Tripura withdrew AFSPA in 2015.
- It is not in force in Meghalaya (except 20 kilometre area along Assam border) and Mizoram.
Supreme court ruling:
- On July 8, 2016, in a landmark ruling, The Supreme Court of India ended the immunity of the armed forces from prosecution under AFSPA, saying,“It does not matter whether the victim was a common person or a militant or a terrorist, nor does it matter whether the aggressor was a common person or the state. The law is the same for both and is equally applicable to both… This is the requirement of a democracy and the requirement of preservation of the rule of law and the preservation of individual liberties.”
- Supreme Court said that any encounter carried out by armed forces in the garb of AFSPA should be subjected to thorough inquiry.
4. ‘Make registration of marriages compulsory
In news:
- The Law Commission of India- the commission headed by former Supreme Court judge Justice B.S. Chauhan, has recommended compulsory registration of marriages.
Why?
- To protect gullible women who become victims of fake marriages.
- The lack of provisions for compulsory registration of marriages had proven disastrous for women and deprived them of societal recognition and legal security.
Key fact: Fraudulent marriages are on the rise especially among non-resident Indians. Compulsory registration can serve as a means to ensure that conditions of a valid marriage have been performed.
Minor amendment:
- Minor amendment to the Registration of Births and Deaths Act, 1969, including a provision for compulsory registration of marriage, would serve the purpose.
- And there was no need to amend any of the personal laws of religious communities.
2006 Supreme Court in Seema vs Ashwani case:
- Marriages of persons who are citizens of India belonging to various religions should be registered compulsorily in their States.
Category: INTERNATIONAL RELATIONS
1. Moving beyond security ties
Context: Prime Minister Narendra Modi’s visit to Israel
In news:
The leaders to focus on a “non-security” strategic partnership involving agriculture, water, tourism, science technology and space.
2. Incursions by PLA rose in 2017
In News:
- Incidents of transgression by the People’s Liberation Army(PLA) has increased marginally this year along the disputed Sino-Indian border compared to 2016.
- Key Fact: 20-25% increase in transgressions by the Chinese PLA till May this year, particularly in Ladakh and Arunachal Pradesh. On an average around 300 transgressions are reported along the China border due to “difference in perception.
Sovereignty claims:
- Over the years both sides have developed a strategy of sending long patrols into disputed areas in summer months to assert their claims for sovereignty.
- These patrols are undertaken at eight of the key disputed locations, mostly in Ladakh and Arunachal Pradesh and are believed to enjoy political sanction.
Reasons for increased transgression:
- Indian troops have improved their observation of the presence of Chinese patrols in disputed areas.
- The Chinese have stepped up border patrols as part of an aggressive posture along the border.
Ladakh border:
- Along the Ladakh border, India sticks mostly to a boundary drawn by British civil servant H. Johnson in 1865, which showed Aksai Chin as part of J&K.
- China disputes this claim and in the 1950s and built a road connecting Xinjiang and Tibet which ran through Aksai Chin.
- In northeast India, New Delhi sticks to the McMahon Line. China claims that McMahon Line has no legal standing and claims Arunachal Pradesh as part of Tibet.
3. Vietnam for greater Indian role in SE Asia
Delhi Dialogue IX:
- A platform for discussion between ASEAN and India.
- The Delhi Dialogue IX marks the beginning of the celebrations to mark the 25th anniversary of India-ASEAN diplomatic ties
- Vietnam on asked:
- India to play a greater role in ASEAN’s strategic and security affairs.
- India should support freedom of navigation in the South China Sea on the basis of international law and conventions.
India and ASEAN: India’s tie with ASEAN is at the centre of India’s Act East Policy.
4. North Korea claims it tested intercontinental missile
In news:
- North Korea claimed it successfully test-launched its first intercontinental ballistic missile
- North Korea’s Academy of Defence Science said the test of an ICBM the Hwasong-14 marked the “final step” in creating a “confident and powerful nuclear state that can strike anywhere on Earth.”
- Test a direct rebuke to U.S. President Donald Trump’s earlier declaration that such a test “won’t happen!”
Capability:
- A U.S. scientist examining the height and distance said the missile could potentially be powerful enough to reach Alaska.
1. Tap GST for jobs data: PM-appointed panel
Task force led by NITI Aayog vice chairman Arvind Panagariya recommends:
- The task force to improve India’s data on jobs was set up by Prime Minister Narendra Modi
- The Centre could use lakhs of firms registered under the new Goods and Services Tax (GST) as the sample frame to capture employment data through a new Annual Survey of Enterprises.
- The traditional Employment-Unemployment Surveys carried out by the National Sample Survey Office (NSSO) every five years must be scrapped.
New definition of formal employment:
- The task force has called for a fresh definition of formal employment to include any person who gets a Form 16 reflecting income tax deductions at source.
- Workers covered under any one of the The Employees’ State Insurance Act, 1948 or EPF and miscellaneous Provision Act 1952, government and other public sector employees, workers having coverage under private insurance or pension schemes of PFs,” be considered formal workers
Labour force survey
- A new periodic labour force survey (the first one has already begun this April) will be conducted annually to provide estimates of labour force, employment, unemployment, nature of employment and industry.
- To get more frequent employment trends data, an urban module of this survey will be updated every quarter.
Category: SCIENCE AND TECHNOLOGY
1. Drug-resistant TB higher among children than expected: report
In news:
- Multi-Drug Resistant (MDR) TB is higher among children than expected.
- This trend has been described as a “worrying trend” by the Union Health Ministry.
Who conducted the tests?
- Foundation for Innovative New Diagnostics (FIND) conducted the tests in collaboration with the Central TB Division under the Revised National TB Control Programme (RNTCP).
Key fact:
- Detection of tuberculosis (TB) in children remains a challenge.
- 5,500 of over 76,000 children tested in nine cities have been diagnosed with TB.
- Nine per cent of these paediatric TB cases have been diagnosed to have MDR TB
Foundation for Innovative New Diagnostics (FIND)
- FIND initially started a unique initiative for diagnosing paediatric TB in four cities of Delhi, Chennai, Hyderabad and Kolkata from April 2014 with funding from the United States Agency for International Development (USAID).
- The aim of the project is to provide rapid access to quality TB diagnosis for all presumptive paediatric TB patients in the project intervention areas.
Challenges associated with paediatric TB case detection
- Absence of appropriate samples coupled with decentralised capacity to get good samples from children to test for TB remains a challenge in paediatric TB case detection.
- Poor sensitivity of tests like the Acid fast bacilli (AFB) smear
- Children were more prone to primary MDR infection as they were in close contact with their parents and grandparents
Basic Information:
The Foundation for Innovative New Diagnostics (FIND)
- The Foundation for Innovative New Diagnostics (FIND) is a global health non-profit based in Geneva, Switzerland. FIND functions as a product development partnership, engaging in active collaboration with over 150 partners to facilitate the development, evaluation, and implementation of diagnostic tests for poverty-related diseases. The organisation’s Geneva headquarters are in Campus Biotech. Country offices are located in New Delhi, India; Cape Town, South Africa; and Hanoi, Viet Nam.
- Priorities: The organization focuses on improving diagnosis in several disease areas, including hepatitis C, HIV, malaria, neglected tropical diseases (sleeping sickness, Chagas disease, leishmaniasis, buruli ulcer), and tuberculosis. Alongside this, FIND works on diagnostic connectivity, antimicrobial resistance, acute febrile illness, and outbreak preparedness.
GeneXpert MTB/RIF
The Xpert MTB/RIF is a cartridge based nucleic acid amplification test, automated diagnostic test that can identify Mycobacterium tuberculosis (MTB) DNA and resistance to rifampicin (RIF) by nucleic acid amplification test (NAAT)
N A nucleic acid test (NAT) or nucleic acid amplification test (NAAT) is a molecular technique used to detect a particular pathogen (virus or bacterium) in a specimen of blood or other tissue or body fluid. It does so by detecting and amplifying the RNA or DNA of the pathogen, that is, making extra copies of its nucleic acids.
D. GS4 Related
Nothing here for Today!!!
PIB Articles Editorials Roundup
E. Concepts-in-News: Related Concepts to Revise/Learn
Nothing here for Today!!!
F. Bills/Acts/Schemes/Orgs in News
Nothing here for Today!!!
G. Practice Questions for UPSC Prelims Exam
Question 1:The Navegaon National Park is located in which state?
- Uttar Pradesh
- West Bengal
- Gujarat
- Maharashtra
Question 2: The Supreme Court’s power to hear Inter-State Water Disputes can be
classified under its
- Original Jurisdiction
- Appellate Jurisdiction
- Writ Jurisdiction
- Advisory Jurisdiction
Question 3: What is/are the eligibility criteria’s that needs to be fulfilled, in order to
be the member of a G7 group?
- A very high net national wealth
- A very high Human Development Index
- Both A and B
- Neither A nor B
Question 4: The National Pharmaceutical Pricing Authority is a
- Statutory body
- Constitutional body
- Body set up as per executive order
- None of the above
Question 5: VAJRA (Visiting Advanced Joint Research) Faculty scheme is being implemented
by which agency?
- The Science and Engineering Research Board (SERB)
- Council of Scientific & Industrial Research
- Indian Institute of Science
- None of the above
“Proper Current Affairs preparation is the key to success in the UPSC- Civil Services Examination. We have now launched a comprehensive ‘Online Current Affairs Crash Course’. Limited seats available. Click here to Know More.”
Practice More: Enroll for India’s Largest All-India Test Series


iFixit tears down Mate 30
by David MannersiFixit has completed a teardown of the Huawei Mate 30 and this is what it found:
6.53″ OLED display with a resolution of 2400 × 1176 (~409.29 ppi)
Huawei Kirin 990 processor with 8-core CPU, 16-Core Mali-G76 GPU, and Neural Processing Unit
Quadruple rear cameras—40 MP ƒ/1.8, 40 MP ƒ/1.6, 8 MP ƒ/2.4 with 3x optical zoom, and a 3D depth-sensing camera
32 MP ƒ/2.0 selfie cam, plus a 3D depth-sensing camera
IP68 dust/water ingress rating, USB-C port (but no headphone jack)
Facial recognition hardware, gesture recognition, and an under-display fingerprint sensor.,
The 4500 mAh cell is rated at 3.85 V, and 17.32 Wh of total power. That’s more than the 16.04 Wh from the Mate 20 X Pro or the P30 Pro. The iPhone 11 Pro Max is at 15.04 Wh.
40 MP ƒ/1.8 Cine Camera with a classical RGGB pattern on a 1/1.54″ IMX608 sensor, outputting a 3:2 format
40 MP ƒ/1.6 SuperSensing Camera with Huawei’s special RYYB pattern and OIS on a 1/1.7″ IMX600 sensor, shooting in 4:3
This camera can supposedly shoot 256× Ultra Slow-motion videos @7680 FPS, which might explain this little breakout board sitting in the middle of the data stream from the SuperSensing Camera. Is it a dedicated ISP (Image Signal Processor) for intensive slo-mo image buffering and calculation?
8 MP ƒ/2.4 telephoto lens with OIS over an OV08A10 sensor to offer 3x optical zoom, 5x hybrid zoom and up to 30x digital zoom
3D depth-sensing camera for real-time in-depth video effects with an IMX316 sensor
HiSilicon Hi6421 power management IC
HiSilicon Hi6422 power management IC
STMicroelectronics BWL68 wireless charging receiver IC
Halo Micro HL1506F1 battery management IC
Hynix H9HKNNNFBMAU-DRNEH 8 GB LPDDR4X SDRAM with the SoC Kirin 990 layered
Kioxia (Toshiba) M-CT041930U544311JPN 256 GB UFS
HiSilicon Hi1103 Wi-Fi module (as seen in the Mate 20 X 5G)
HiSilicon Hi6363 RF transceiver (as in the Mate 20 Pro)
HiSilicon Hi6526 power management IC
NXP 80T37 (likely NFC controller)
See also: Competition: Win an iFixit Pro Tech Toolkit


This document guides you on how to install the WSO2 Web Services Framework/Ruby extension, and run the server and client samples on Linux and Microsoft Windows operating systems.
Please send your feedback to the user mailing list<EMAIL_ADDRESS>Kindly see Home page for subscription.
You need to download following dependency libraries:
In addition you need to have visual studio installed on your system.
[1] http://www.zlatkovic.com/pub/libxml/
[2] http://www.slproweb.com/products/Win32OpenSSL.html
[3] http://dev.mysql.com/downloads/
[4] http://www.ruby-lang.org/en/downloads/
NOTE: WSO2-WSF-Ruby-x.y.z Win32 Binary Will be compiled using following version of dependency libraries.
Now you should have the wso2-wsf-ruby binary pack with following structure.
wso2-wsf-ruby-bin-x.y.z-win32 | +-- wsf_c | +-- doc | +-- samples | +-- lib
NOTE : run "ruby find_rbconfig.rb" in a console to find where this 'rbconfig.rb' file is. (use '/' or '\\' to to seperate directories. | e.g. "E:/install/wsfc" or "E:\\install\\wsfc") #--------------------------------------------------------------------------------- CONFIG["WSFC_HOME"] = "\\wsf_c" CONFIG["WSF_LOG_DIR"] = "where\\you\\wish\\log\\file\\should\\be" CONFIG["WSF_LOG_LEVEL"] = "3" #--------------------------------------------------------------------------------- NOTE: Above WSF_LOG_LEVEL entry can have one of the following values- "0" - CRITICAL "1" - ERROR "2" - WARNING "3" - INFO "4" - DEBUG "5" - TRACE
#if _MSC_VER != 1200 #error MSC version unmatch #endif NOTE : run "ruby find_config_h.rb" in a console to find where this file is.
Add the following entries to your rbconfig.rb file which is in your Ruby installation location. NOTE : run "ruby find_rbconfig.rb" in a console to find where this 'rbconfig.rb' file is. (use '/' or '\\' to to seperate directories. | e.g. "E:/install/wsfc" or "E:\\install\\wsfc") #--------------------------------------------------------------------------------- CONFIG["WSFC_HOME"] = "\\wsf_c" CONFIG["WSF_LOG_DIR"] = "where\\you\\wish\\log\\files\\should\\be" CONFIG["WSF_LOG_LEVEL"] = "3" #--------------------------------------------------------------------------------- NOTE: Above WSF_LOG_LEVEL entry can have one of the following values- "0" - CRITICAL "1" - ERROR "2" - WARNING "3" - INFO "4" - DEBUG "5" - TRACE
cd samples/provider
ruby deploy_samples.rb your_rails_application
cd your_rails_application
run the ruby script/server
NOTE: If you are using rails 2.0.0 or above you may need to configure the database information in your rails application. You can find a guide on how to configure the database from the following link.
http://wiki.rubyonrails.com/rails/pages/TutorialStepOnecd wsfc_ruby_source_installation/samples/consumer


Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| id | BIGINT | 19 | √ | null |
|
|
||||||||
| from_office_id | BIGINT | 19 | null |
|
|
|||||||||
| to_office_id | BIGINT | 19 | null |
|
|
|||||||||
| from_client_id | BIGINT | 19 | √ | NULL |
|
|
||||||||
| to_client_id | BIGINT | 19 | √ | NULL |
|
|
||||||||
| from_savings_account_id | BIGINT | 19 | √ | NULL |
|
|
||||||||
| to_savings_account_id | BIGINT | 19 | √ | NULL |
|
|
||||||||
| from_loan_account_id | BIGINT | 19 | √ | NULL |
|
|
||||||||
| to_loan_account_id | BIGINT | 19 | √ | NULL |
|
|
||||||||
| transfer_type | SMALLINT | 5 | √ | NULL |
|
|
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| PRIMARY | Primary key | Asc | id |
| FK_m_account_transfer_details_from_client | Performance | Asc | from_client_id |
| FK_m_account_transfer_details_from_loan_account | Performance | Asc | from_loan_account_id |
| FK_m_account_transfer_details_from_office | Performance | Asc | from_office_id |
| FK_m_account_transfer_details_from_savings_account | Performance | Asc | from_savings_account_id |
| FK_m_account_transfer_details_to_client | Performance | Asc | to_client_id |
| FK_m_account_transfer_details_to_loan_account | Performance | Asc | to_loan_account_id |
| FK_m_account_transfer_details_to_office | Performance | Asc | to_office_id |
| FK_m_account_transfer_details_to_savings_account | Performance | Asc | to_savings_account_id |


A 'vision' concept for advanced RIA applications of Silverlight technology
I was commissioned to create and advanced vision for what the future of Silverlight could include. The brief was to push the limits and take visualization in a different direction.


Undergraduate student in Velammal College Of Engineering And Technology. Passionate person with lots of determination in achieving goals.Sportive person and a team player
Get Started!Single vendor online portal where all ordering takesplace and completes with payment
Booking of tickets for movietime.Online portal to check the availability for seats and payments.
2015-2019
I'm a undergraduate candidate of Velammal College Of Engineering And Technology belonging to computer science and engineering stream.
CGPA:6.5
2014-2015
I've pursued my HSC in Velammal Matriculation Higher Secondary School in Madurai.
Percentage:83.5%
2012-2013
I've pursued my SSLC in Velammal Matriculation Higher Secondary School in Madurai.
Percentage:90%
IN-BOX ME THROUGH
8838035146
hemanthkumar541998@gmail.com


Next: Tilde G-> General Floating-Point, Previous: Tilde F-> Fixed-Format Floating-Point, Up: FORMAT Floating-Point Printers
The next arg is printed as a float in exponential notation.
The full form is ~w,d,e,k,overflowchar,padchar,exponentcharE. The parameter w is the width of the field to be printed; d is the number of digits to print after the decimal point; e is the number of digits to use when printing the exponent; k is a scale factor that defaults to one (not zero).
Exactly w characters will be output. First, leading copies of the character padchar (which defaults to a space) are printed, if necessary, to pad the field on the left. If the arg is negative, then a minus sign is printed; if the arg is not negative, then a plus sign is printed if and only if the @ modifier was supplied. Then a sequence of digits containing a single embedded decimal point is printed. The form of this sequence of digits depends on the scale factor k. If k is zero, then d digits are printed after the decimal point, and a single zero digit appears before the decimal point if the total field width will permit it. If k is positive, then it must be strictly less than d+2; k significant digits are printed before the decimal point, and d- k+1 digits are printed after the decimal point. If k is negative, then it must be strictly greater than - d; a single zero digit appears before the decimal point if the total field width will permit it, and after the decimal point are printed first - k zeros and then d+k significant digits. The printed fraction must be properly rounded. When rounding up and rounding down would produce printed values equidistant from the scaled value of arg, then the implementation is free to use either one. For example, printing the argument 637.5 using the format ~8,2E may correctly produce either 6.37E+2 or 6.38E+2.
Following the digit sequence, the exponent is printed. First the character parameter exponentchar is printed; if this parameter is omitted, then the exponent marker that prin1 would use is printed, as determined from the type of the float and the current value of *read-default-float-format*. Next, either a plus sign or a minus sign is printed, followed by e digits representing the power of ten by which the printed fraction must be multiplied to properly represent the rounded value of arg.
If it is impossible to print the value in the required format in a field of width w, possibly because k is too large or too small or because the exponent cannot be printed in e character positions, then one of two actions is taken. If the parameter overflowchar is supplied, then w copies of that parameter are printed instead of the scaled value of arg. If the overflowchar parameter is omitted, then the scaled value is printed using more than w characters, as many more as may be needed; if the problem is that d is too small for the supplied k or that e is too small, then a larger value is used for d or e as may be needed.
If the w parameter is omitted, then the field is of variable width. In effect a value is chosen for w in such a way that no leading pad characters need to be printed.
If the parameter d is omitted, then there is no constraint on the number of digits to appear. A value is chosen for d in such a way that as many digits as possible may be printed subject to the width constraint imposed by the parameter w, the constraint of the scale factor k, and the constraint that no trailing zero digits may appear in the fraction, except that if the fraction to be printed is zero then a single zero digit should appear after the decimal point.
If the parameter e is omitted, then the exponent is printed using the smallest number of digits necessary to represent its value.
If all of w, d, and e are omitted, then the effect is to print the value using ordinary free-format exponential-notation output; prin1 uses
a similar
format for any non-zero number whose magnitude is less than 10^-3 or greater than or equal to 10^7.
The only difference is that the ~E directive always prints a plus or minus sign in front of the exponent, while prin1 omits the plus sign if the exponent is non-negative.
If arg is a rational number, then it is coerced to be a single float and then printed. Alternatively, an implementation is permitted to process a rational number by any other method that has essentially the same behavior but avoids loss of precision or overflow because of the coercion. If w and d are unsupplied and the number has no exact decimal representation, for example 1/3, some precision cutoff must be chosen by the implementation since only a finite number of digits may be printed.
If arg is a complex number or some non-numeric object, then it is printed using the format directive ~wD, thereby printing it in decimal radix and a minimum field width of w.
~E binds *print-escape* to false
and *print-readably* to false.


| DOSE: |
1 cup |
oral |
Coffee |
(liquid) |
| |
200 mg |
oral |
Caffeine |
(powder / crystals) |
| |
150 mg |
insufflated |
Caffeine |
(powder / crystals) |
I have noticed their aren't any reports regarding the use of pure caffeine extract. I've recently purchased 100g of 100% pure caffeine extract.
Background
I'm a normal coffee drinker though I only injest 1 cup a day in the morning though with out it I barely function. Sometimes I will also have 1 or 2 cups of tea throughout the day. This amounts to about 200mg in a day (strong black coffee 120mg aprox and 1 - 2 teas at around 40mg each).
Drank
As with any day I had my regular morning coffee but I also added aproximatly 200mg of caffeine powder to my morning brew. The effects where very noticeable. I felt energised and slightly euphoric.
Snorted
Later I tryed snorting the caffeine. I have done this before when I purchased 2 grams of suposibly pure caffeine from the internet. This couldn't have ben pure as the burn from snorting was unbearable. Because of my previous experiments I was expecting a burn sensation from my nose when I snorted the powder (150mg aprox). There was no burn, a slight tingling and a bitter taste dripping down the back of my throat. The high was noticable almost instantly, but the downside of the quick up take is the crash also happens sooner, I'd say aproximatly 30 - 40mins after.
I intend to keep the rest of my 100g of pure caffeine I intend to use it mainly in the summer (I hate drinking coffee and other hot drinks when it's hot and sunny). I can add exact amounts of caffeine to bottled water much better than red bull or the like nice clean high. Though I do intend to purchase some turine and try experimenting with caffeine as the combination of these 2 chemicals seems to increase the effects of the stimulant effect of caffeine.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


--- layout: post title: Reinstalling WSL Ubuntu (prep for TinyFPGA RISC-V toolchain) date: '2019-02-03T20:11:00.000-08:00' author: gojimmypi tags: - tinyFPGA - Ubuntu - X-Windows - WSL - FPGA - RISC-V - RISCV modified_time: '2019-02-13T18:24:13.128-08:00' thumbnail: https://3.bp.blogspot.com/-qXi_lyssPxs/XFdh28sY7TI/AAAAAAAAB2k/vE0shAA0ziATUDJCSkH2Ei8VpLxA_H_VwCLcBGAs/s72-c/Ubuntu%2BDirectory.PNG blogger_id: tag:blogger.com,1999:blog-4109066286647243251.post-9043037950963542594 blogger_orig_url: https://gojimmypi.blogspot.com/2019/02/wsl-tinyfpga-toolchain-risc-v-part-5.html ---
wslconfig /u Ubuntu
in a DOS command prompt. WSL may need to be manually deleted by uninstalling and removing the CanonicalGroupLimited.Ubuntu{...}
directory in %USERPROFILE%\AppData\Local\Packages\
. Uninstall the Windows "Apps & Features" Ubuntu app, then visit https://aka.ms/wslstore
C:\
directory is available in WSL as /mnt/c/
.
lxrun /uninstall /full
or also from DOS Prompt:
DEL /S %localappdata%\lxss\
I didn't have the lxrun
command, nor a C:\Users\gojimmypi\AppData\Local\lxss
directory. I tried DOS command prompt, a powershell prompt, the Windows bash prompt (C:\Windows\system32\bash.exe) and Ubuntu prompt. Indeed according to Microsoft, lxrun is deprecated as of Windows 10 1803 and later
. As noted in a prior blog, my Ubuntu was installed in this directory:
C:\Users\gojimmypi\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\rootfs\home\gojimmypi
To help find it, you can run a command like this in your WSL instance:
echo wow > ~/zowie.tag
then from a DOS command-prompt:
C:\Users\gojimmypi>dir zowie.tag /s
Volume in drive C is Windows
Volume Serial Number is 9078-2015
Directory of C:\Users\gojimmypi\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\rootfs\home\gojimmypi
02/03/2019 01:43 PM 4 zowie.tag
1 File(s) 4 bytes
del CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc /s /q > null:wslconfig /list
pause
wslconfig /unregister distroname
del CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc /s /q > null:
wslconfig /unregister distroname
The /s deletes all subdirectories. The /q is "quiet mode" (don't confirm every directory to delete), and I send output to null: as the RISC-V toolchain is massive, and showing all that on the screen would take forever. That actually didn't work, either - leaving behind a ton of directories. So then I tried:
rmdir CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc /s /q
which also did not work, giving an error: CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LOCALS~1\rootfs\lib\recovery-mode - The directory is not empty.
So I continued to manually delete directories manually until everything was gone. Running WSL from a DOS command prompt shows that nothing is installed:
Installing, this may take a few minutes...
Please create a default UNIX user account. The username does not need to match your Windows username.
For more information visit: https://aka.ms/wslusers
Enter new UNIX username: gojimmypi
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Installation successful!To run a command as administrator (user "root"), use "sudo
".
See "man sudo_root" for details.
gojimmypi@HOSTNAME:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
Release: 18.04
Codename: bionic
mkdir -p ~/workspace/
cd ~/workspace/
git clone https://gist.github.com/243fc3a6eead72ae3db8fd32f2567c96.git TinyFPGA_Toolchain
cd TinyFPGA_Toolchain
chmod +x TinyFPGA_Toolchain.sh
sudo ./TinyFPGA_Toolchain.sh
Or if you prefer:
sudo ls # pause if copy/paste password prompt
sudo apt-get update --assume-yes
sudo apt-get upgrade --assume-yes
mkdir -p ~/workspace/
cd ~/workspace/
# install icestorm dependencies
# this next install needs a bit of disk space:
# 0 upgraded, 205 newly installed, 0 to remove and 3 not upgraded.
# Need to get 130 MB of archives.
# After this operation, 652 MB of additional disk space will be used.
#
sudo apt-get install build-essential clang bison flex libreadline-dev \
gawk tcl-dev libffi-dev git mercurial graphviz \
xdot pkg-config python python3 libftdi-dev --assume-yes
# tinyFPGA BX
git clone --recursive https://github.com/tinyfpga/TinyFPGA-BX.git
cd ~/workspace/
# icestorm
git clone https://github.com/cliffordwolf/icestorm.git icestorm
cd icestorm
make -j$(nproc)
sudo make install
cd ~/workspace/
# arachne-pnr
git clone https://github.com/cseed/arachne-pnr.git arachne-pnr
cd arachne-pnr
make -j$(nproc)
sudo make install
cd ~/workspace/
# nextpnr
git clone https://github.com/YosysHQ/nextpnr.git
# this next line is about another half gig of files!
# 0 upgraded, 249 newly installed, 0 to remove and 3 not upgraded.
# Need to get 132 MB of archives.
# After this operation, 623 MB of additional disk space will be used.
#
sudo apt-get install libboost-all-dev python3-dev qt5-default clang-format
cd nextpnr
cmake -DARCH=ice40 .
make -j$(nproc)
sudo make install
cd ~/workspace/
# yosys
git clone https://github.com/cliffordwolf/yosys.git yosys
cd yosys
make -j$(nproc)
sudo make install
cd ~/workspace/
#RISC-V
git clone https://github.com/cliffordwolf/picorv32.git
sudo mkdir /opt/riscv32i
sudo chown $USER /opt/riscv32i
sudo apt-get install autoconf automake autotools-dev curl libmpc-dev \
libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo \
gperf libtool patchutils bc zlib1g-dev git libexpat1-dev --assume-yes


--- layout: session academic: true title: "Nomad Maps, an andean cartographic itinerancy by bike" subtitle: "Nomad Maps film documentary - 28 minutes - French and spanish (english subtitles)" code: "DKVXZK" speaker_names_with_affiliations: ['Alban Vivert (Nomad Maps / CartONG volunteer)'] extra_tags: room: "Mathematikon C" length: "00:40" time: "Sunday, 15:00" resources: [] recording: False ---
Nomad Maps is a project carried out in partnership with the French NGO CartONG, created by Alban Vivert, a French geographer and cartographer, passionate about mapping, travel and cycling. Financed by a crowdfunding and a grant from the Fondation de France, Nomad Maps across the Andes had several objectives during these 5 and a half months of travel:
Mapping on OpenStreetMap and Mapillary: more than 10,000 nodes mapped on OSM and more than 110,000 mapillary pictures added.
Meet local OSM contributors: 16 contributors met and participated in the SOTM Latam 2018 in Buenos Aires.
Participate in micro collaborative mapping projects with local associations.
Develop CartONG's Latin American partnership.
Develop a community of "NomadMappers": a community of travellers who want to make their trip useful by mapping the countries visited on OpenStreetMap.
Nomad Maps documentary deals in 28 minutes with the second goal of the project, more exactly the meeting with local OSM contributors from Colombia, Ecuador and Peru.
This documentary has different targets. For OSM experts, the aim is to give visibility to Latin American projects. For the non-specialists, the aim is to show the impact and relevance of OSM mapping in the humanitarian and development community in Latin America.
To see more about Nomad Maps:
Nomad Maps website: http:/www.nomadmaps.net Map of the route: http://nomadmaps.net/andes Blog: https://nomadmapsblog.wordpress.com/ Facebook: https://www.facebook.com/NomadMapsProject/ Instagram: https://www.instagram.com/nomadmapsproject Twitter: https://twitter.com/MapsNomad


Polynomial module¶
-
class
Polynomial.
Polynomial
(coefs, j, k, lam=array([1]))[source]¶ Bases:
object
-
GM
= {}¶
-
static
basis_inner
(j, i, k, ip, lam=array([1]))[source]¶ Computes any Sobolev inner product of <P_ji, P_ki’>.
- Parameters
i, k, ip (j,) – correspond to j, i, k, i’ in P_ji, P_ki’ respectively.
lam – np.array of lambda values for the generalized Sobolev inner product. The default value is 1 (corresponding to the regular Sobolev inner product). If lam = np.array([0]), this is the L2 inner product.
- Returns
- Sobolev inner product of <P_ji, P_ki’> with given lambda
values.
-
static
build_GM
(n, lam=array([1]))[source]¶ - Constructs Gram Matrix of a given size for a given generalized
Sobolev inner product. This is used to later compute inner products more quickly.
- The Gram Matrix is stored in the dictionary Polynomial.GM keyed
by the string representing the values of lambda.
- Parameters
n – size of Gram Matrix
lam – np.array of lambda values for the generalized Sobolev inner product. The default value is 1 (corresponding to the regular Sobolev inner product). If lam = np.array([0]), this is the L2 inner product.
-
static
build_condensed_GM
(n, i, lam=array([1]))[source]¶ - When we work with only polynomials from a certain family
(k = 1, 2, or 3), it is more convenient to only work with the basis {P_0k, P_1k,…}. This function creates the Gram Matrix for a given generalized Sobolev inner product.
- Parameters
n – size of Gram Matrix required
i – family of polynomials (i represents k in the preceding paragraph)
lam – np.array of lambda values for the generalized Sobolev inner product. The default value is 1 (corresponding to the regular Sobolev inner product). If lam = np.array([0]), this is the L2 inner product.
-
dnvalue
(j, i=1)[source]¶ - This function calculates the value of the normal derivative of
a polynomial on a boundary point of SG
- Parameters
j – number of polynomials to evaluate
i – index of boundary point i = 0, 1, 2
- Returns
value of the normal derivative of polynomial at q_i
-
static
fast_inner
(arr1, arr2, GM)[source]¶ - Computes any inner product between two polynomials represented
as arrays of coefficients.
- Parameters
arr2 (arr1,) – arrays of coefficients of polynomials in monomial basis.
GM – Gram Matrix of inner product (Note: the baisis order for arr1 and arr2 must match that of GM)
- Returns
- Sobolev inner product between the polynomials represented
by arr1, and arr2 for the inner product represented by GM.
-
static
get_condensed_GM
(k, lam=array([1]))[source]¶ - This function takes the existing Gram Matrix for a given
generalized Sobolev inner product expressed with respect to the orginal monomial basis {P_01, P_02, P_03, P_11, P_12, P_13, …} and returns the condensed matrix expressed with respect to the basis {P_0k, P_1k,… }.
- Parameters
k – index corresponding to ‘k’ in the preceding paragraph
lam – np.array of lambda values for the generalized Sobolev inner product. The default value is 1 (corresponding to the regular Sobolev inner product). If lam = np.array([0]), this is the L2 inner product.
- Returns
- Gram Matrix with of given inner product with respect
to the basis {P_0k, P_1k,… }.
-
get_condensed_coefs
()[source]¶ - This function returns the array of coefficients with respect to
the condensed basis {P_0k, P_1k,… } when we work with polynomials from only one family (k = 1, 2, or 3).
-
static
has_GM
(n, lam=array([1]))[source]¶ - This function checks whether a Gram Matrix of a given size has
been built for a given inner product.
- Parameters
n – size of Gram Matrix required
lam – array of lambda values for the inner product (default is [1] which is the regular Sobolev inner product).
- Returns
- Boolean value expressing whether such a Gram Matrix has been
constructed.
-
inner
(other)[source]¶ - Computes the inner product between 2 Polynomial objects.
If the Gram Matrix is available, this function uses fast_inner. Otherwise, this function uses slow_inner.
-
static
slow_inner
(arr1, arr2, lam=array([1]))[source]¶ - Computes any inner product between two polynomials represented
as arrays of coefficients.
- Parameters
arr2 (arr1,) – arrays of coefficients of polynomials in monomial basis.(Note: the basis is ordered {P_01, P_02, P_03, P_11, P_12, P_13, …}).
lam – np.array of lambda values for the generalized Sobolev inner product. The default value is 1 (corresponding to the regular Sobolev inner product). If lam = np.array([0]), this is the L2 inner product.
- Returns
- Sobolev inner product between the polynomials represented
by arr1, and arr2 with the given lambda values.
-


Become a Master of Shouts!
Enter your sentence and translate to THU'UM
FUS RO DAHH!
Go Dragonborn, use the power of the THU'UM!
© 2021 Hamza Husein


Welcome to the Pizza Parlor
Scroll Down
Lets make your Pizza
Size
Large @1000Ksh
Medium @800Ksh
Small @600Ksh
Crust
Crispy @500 Ksh
Stuffed @500Ksh
Gluten free @500Ksh
Toppings
Pepperoni @100Ksh
Mushroom @100Ksh
Sausage @100Ksh
Extra Cheese @100Ksh
Black Olives @100Ksh
Number of pizzas
Delivery
Delivery charges is 200 Ksh
Scroll Down
Amount
Ksh


UTable< _T, kGrowSize > Class Template Reference
Purpose: To allow for fast identification of free slots in.
More...
#include <UTable.h>
List of all members.
|
Classes |
| union | Item |
Public Member Functions |
| | UTable (unsigned int initSize=kGrowSize) |
| | ctor & dtor
|
| | ~UTable () |
| unsigned int | Insert (const _T &item) |
| | item insertion and removal.
|
| void | Remove (unsigned int id) |
| _T & | operator[] (unsigned int id) |
| const _T & | operator[] (unsigned int id) const |
Detailed Description
template<typename _T, const unsigned int kGrowSize = 16>
class UTable< _T, kGrowSize >
Purpose: To allow for fast identification of free slots in.
File: UTable.h Author: Kevin Bray Created: 01-21-06 Copyright © 2005 Bootstrap Studios project includes. class UTable
Definition at line 21 of file UTable.h.
Constructor & Destructor Documentation
template<typename _T , const unsigned int kGrowSize>
| UTable< _T, kGrowSize >::UTable |
( |
unsigned int |
initSize = kGrowSize |
) |
[inline] |
ctor & dtor
Definition at line 64 of file UTable.h.
template<typename _T , const unsigned int kGrowSize>
Member Function Documentation
template<typename _T , const unsigned int kGrowSize>
| unsigned int UTable< _T, kGrowSize >::Insert |
( |
const _T & |
item |
) |
[inline] |
item insertion and removal.
public methods
expand.
copy old items.
link new items.
set the internal pointers.
allocate our items.
Definition at line 91 of file UTable.h.
template<typename _T , const unsigned int kGrowSize>
| const _T & UTable< _T, kGrowSize >::operator[] |
( |
unsigned int |
id |
) |
const [inline] |
template<typename _T , const unsigned int kGrowSize>
| _T & UTable< _T, kGrowSize >::operator[] |
( |
unsigned int |
id |
) |
[inline] |
template<typename _T , const unsigned int kGrowSize>
| void UTable< _T, kGrowSize >::Remove |
( |
unsigned int |
id |
) |
[inline] |
The documentation for this class was generated from the following file:
- C:/Bootstrap/ProjectBX/Documentation/Code/Engine/Common/UTable.h


# -*- coding: utf8 -*- import sys import os import unittest import platform from pygame.tests.test_utils import example_path, AssertRaisesRegexMixin import pygame from pygame import mixer from pygame.compat import unicode_, as_bytes, bytes_ IS_PYPY = 'PyPy' == platform.python_implementation() ################################### CONSTANTS ################################## FREQUENCIES = [11025, 22050, 44100, 48000] SIZES = [-16, -8, 8, 16] if pygame.get_sdl_version()[0] >= 2: SIZES.append(32) CHANNELS = [1, 2] BUFFERS = [3024] CONFIGS = [{'frequency' : f, 'size' : s, 'channels': c} for f in FREQUENCIES for s in SIZES for c in CHANNELS] # Using all CONFIGS fails on a Mac; probably older SDL_mixer; we could do: # if platform.system() == 'Darwin': # But using all CONFIGS is very slow (> 10 sec for example) # And probably, we don't need to be so exhaustive, hence: CONFIG = {'frequency' : 22050, 'size' : -16, 'channels' : 2} # base config if pygame.get_sdl_version()[0] >= 2: CONFIG = {'frequency' : 44100, 'size' : 32, 'channels' : 2} # base config ############################## MODULE LEVEL TESTS ############################## class MixerModuleTest(unittest.TestCase): def tearDown(self): mixer.quit() mixer.pre_init(0, 0, 0, 0) def test_init__keyword_args(self): # note: this test used to loop over all CONFIGS, but it's very slow.. mixer.init(**CONFIG) mixer_conf = mixer.get_init() self.assertEqual(mixer_conf[0], CONFIG['frequency']) # Not all "sizes" are supported on all systems, hence "abs". self.assertEqual(abs(mixer_conf[1]), abs(CONFIG['size'])) self.assertEqual(mixer_conf[2], CONFIG['channels']) def test_pre_init__keyword_args(self): # note: this test used to loop over all CONFIGS, but it's very slow.. mixer.pre_init(**CONFIG) mixer.init() mixer_conf = mixer.get_init() self.assertEqual(mixer_conf[0], CONFIG['frequency']) # Not all "sizes" are supported on all systems, hence "abs". self.assertEqual(abs(mixer_conf[1]), abs(CONFIG['size'])) self.assertEqual(mixer_conf[2], CONFIG['channels']) def test_pre_init__zero_values(self): # Ensure that argument values of 0 are replaced with # default values. No way to check buffer size though. mixer.pre_init(44100, -8, 1) # Non default values mixer.pre_init(0, 0, 0) # Should reset to default values mixer.init() self.assertEqual(mixer.get_init(), (22050, -16, 2)) def test_init__zero_values(self): # Ensure that argument values of 0 are replaced with # preset values. No way to check buffer size though. mixer.pre_init(44100, 8, 1, allowedchanges=0) # None default values mixer.init(0, 0, 0) self.assertEqual(mixer.get_init(), (44100, 8, 1)) @unittest.skip('SDL_mixer bug') def test_get_init__returns_exact_values_used_for_init(self): # fix in 1.9 - I think it's a SDL_mixer bug. # TODO: When this bug is fixed, testing through every combination # will be too slow so adjust as necessary, at the moment it # breaks the loop after first failure for init_conf in CONFIGS: frequency, size, channels if (frequency, size) == (22050, 16): continue mixer.init(frequency, size, channels) mixer_conf = mixer.get_init() self.assertEqual(init_conf, mixer_conf) mixer.quit() def test_get_init__returns_None_if_mixer_not_initialized(self): self.assertIsNone(mixer.get_init()) def test_get_num_channels__defaults_eight_after_init(self): mixer.init() self.assertEqual(mixer.get_num_channels(), 8) def test_set_num_channels(self): mixer.init() default_num_channels = mixer.get_num_channels() for i in range(1, default_num_channels + 1): mixer.set_num_channels(i) self.assertEqual(mixer.get_num_channels(), i) def test_quit(self): """ get_num_channels() Should throw pygame.error if uninitialized after mixer.quit() """ mixer.init() mixer.quit() self.assertRaises(pygame.error, mixer.get_num_channels) def test_sound_args(self): def get_bytes(snd): return snd.get_raw() mixer.init() sample = as_bytes('\x00\xff') * 24 wave_path = example_path(os.path.join('data', 'house_lo.wav')) uwave_path = unicode_(wave_path) bwave_path = uwave_path.encode(sys.getfilesystemencoding()) snd = mixer.Sound(file=wave_path) self.assertTrue(snd.get_length() > 0.5) snd_bytes = get_bytes(snd) self.assertTrue(len(snd_bytes) > 1000) self.assertEqual(get_bytes(mixer.Sound(wave_path)), snd_bytes) self.assertEqual(get_bytes(mixer.Sound(file=uwave_path)), snd_bytes) self.assertEqual(get_bytes(mixer.Sound(uwave_path)), snd_bytes) arg_emsg = 'Sound takes either 1 positional or 1 keyword argument' with self.assertRaises(TypeError) as cm: mixer.Sound() self.assertEqual(str(cm.exception), arg_emsg) with self.assertRaises(TypeError) as cm: mixer.Sound(wave_path, buffer=sample) self.assertEqual(str(cm.exception), arg_emsg) with self.assertRaises(TypeError) as cm: mixer.Sound(sample, file=wave_path) self.assertEqual(str(cm.exception), arg_emsg) with self.assertRaises(TypeError) as cm: mixer.Sound(buffer=sample, file=wave_path) self.assertEqual(str(cm.exception), arg_emsg) with self.assertRaises(TypeError) as cm: mixer.Sound(foobar=sample) self.assertEqual(str(cm.exception), "Unrecognized keyword argument 'foobar'") snd = mixer.Sound(wave_path, **{}) self.assertEqual(get_bytes(snd), snd_bytes) snd = mixer.Sound(*[], **{'file': wave_path}) with self.assertRaises(TypeError) as cm: mixer.Sound([]) self.assertEqual(str(cm.exception), 'Unrecognized argument (type list)') with self.assertRaises(TypeError) as cm: snd = mixer.Sound(buffer=[]) emsg = 'Expected object with buffer interface: got a list' self.assertEqual(str(cm.exception), emsg) ufake_path = unicode_('12345678') self.assertRaises(IOError, mixer.Sound, ufake_path) self.assertRaises(IOError, mixer.Sound, '12345678') with self.assertRaises(TypeError) as cm: mixer.Sound(buffer=unicode_('something')) emsg = 'Unicode object not allowed as buffer object' self.assertEqual(str(cm.exception), emsg) self.assertEqual(get_bytes(mixer.Sound(buffer=sample)), sample) if type(sample) != str: somebytes = get_bytes(mixer.Sound(sample)) # on python 2 we do not allow using string except as file name. self.assertEqual(somebytes, sample) self.assertEqual(get_bytes(mixer.Sound(file=bwave_path)), snd_bytes) self.assertEqual(get_bytes(mixer.Sound(bwave_path)), snd_bytes) snd = mixer.Sound(wave_path) with self.assertRaises(TypeError) as cm: mixer.Sound(wave_path, array=snd) self.assertEqual(str(cm.exception), arg_emsg) with self.assertRaises(TypeError) as cm: mixer.Sound(buffer=sample, array=snd) self.assertEqual(str(cm.exception), arg_emsg) snd2 = mixer.Sound(array=snd) self.assertEqual(snd.get_raw(), snd2.get_raw()) def test_sound_unicode(self): """test non-ASCII unicode path""" mixer.init() import shutil ep = unicode_(example_path('data')) temp_file = os.path.join(ep, u'你好.wav') org_file = os.path.join(ep, u'house_lo.wav') shutil.copy(org_file, temp_file) try: with open(temp_file, 'rb') as f: pass except IOError: raise unittest.SkipTest('the path cannot be opened') try: sound = mixer.Sound(temp_file) del sound finally: os.remove(temp_file) @unittest.skipIf(os.environ.get('SDL_AUDIODRIVER') == 'disk', 'this test fails without real sound card') def test_array_keyword(self): try: from numpy import (array, arange, zeros, int8, uint8, int16, uint16, int32, uint32) except ImportError: self.skipTest('requires numpy') freq = 22050 format_list = [-8, 8, -16, 16] channels_list = [1, 2] a_lists = dict((f, []) for f in format_list) a32u_mono = arange(0, 256, 1, uint32) a16u_mono = a32u_mono.astype(uint16) a8u_mono = a32u_mono.astype(uint8) au_list_mono = [(1, a) for a in [a8u_mono, a16u_mono, a32u_mono]] for format in format_list: if format > 0: a_lists[format].extend(au_list_mono) a32s_mono = arange(-128, 128, 1, int32) a16s_mono = a32s_mono.astype(int16) a8s_mono = a32s_mono.astype(int8) as_list_mono = [(1, a) for a in [a8s_mono, a16s_mono, a32s_mono]] for format in format_list: if format < 0: a_lists[format].extend(as_list_mono) a32u_stereo = zeros([a32u_mono.shape[0], 2], uint32) a32u_stereo[:,0] = a32u_mono a32u_stereo[:,1] = 255 - a32u_mono a16u_stereo = a32u_stereo.astype(uint16) a8u_stereo = a32u_stereo.astype(uint8) au_list_stereo = [(2, a) for a in [a8u_stereo, a16u_stereo, a32u_stereo]] for format in format_list: if format > 0: a_lists[format].extend(au_list_stereo) a32s_stereo = zeros([a32s_mono.shape[0], 2], int32) a32s_stereo[:,0] = a32s_mono a32s_stereo[:,1] = -1 - a32s_mono a16s_stereo = a32s_stereo.astype(int16) a8s_stereo = a32s_stereo.astype(int8) as_list_stereo = [(2, a) for a in [a8s_stereo, a16s_stereo, a32s_stereo]] for format in format_list: if format < 0: a_lists[format].extend(as_list_stereo) for format in format_list: for channels in channels_list: try: mixer.init(freq, format, channels) except pygame.error: # Some formats (e.g. 16) may not be supported. continue try: __, f, c = mixer.get_init() if f != format or c != channels: # Some formats (e.g. -8) may not be supported. continue for c, a in a_lists[format]: self._test_array_argument(format, a, c == channels) finally: mixer.quit() def _test_array_argument(self, format, a, test_pass): from numpy import array, all as all_ try: snd = mixer.Sound(array=a) except ValueError: if not test_pass: return self.fail("Raised ValueError: Format %i, dtype %s" % (format, a.dtype)) if not test_pass: self.fail("Did not raise ValueError: Format %i, dtype %s" % (format, a.dtype)) a2 = array(snd) a3 = a.astype(a2.dtype) lshift = abs(format) - 8 * a.itemsize if lshift >= 0: # This is asymmetric with respect to downcasting. a3 <<= lshift self.assertTrue(all_(a2 == a3), "Format %i, dtype %s" % (format, a.dtype)) def _test_array_interface_fail(self, a): self.assertRaises(ValueError, mixer.Sound, array=a) def test_array_interface(self): mixer.init(22050, -16, 1, allowedchanges=0) snd = mixer.Sound(buffer=as_bytes('\x00\x7f') * 20) d = snd.__array_interface__ self.assertTrue(isinstance(d, dict)) if pygame.get_sdl_byteorder() == pygame.LIL_ENDIAN: typestr = '<i2' else: typestr = '>i2' self.assertEqual(d['typestr'], typestr) self.assertEqual(d['shape'], (20,)) self.assertEqual(d['strides'], (2,)) self.assertEqual(d['data'], (snd._samples_address, False)) @unittest.skipIf(not pygame.HAVE_NEWBUF, 'newbuf not implemented') def test_newbuf__one_channel(self): mixer.init(22050, -16, 1) self._NEWBUF_export_check() @unittest.skipIf(not pygame.HAVE_NEWBUF, 'newbuf not implemented') def test_newbuf__twho_channel(self): mixer.init(22050, -16, 2) self._NEWBUF_export_check() def _NEWBUF_export_check(self): freq, fmt, channels = mixer.get_init() ndim = 1 if (channels == 1) else 2 itemsize = abs(fmt) // 8 formats = {8: 'B', -8: 'b', 16: '=H', -16: '=h', 32: '=I', -32: '=i', # 32 and 64 for future consideration 64: '=Q', -64: '=q'} format = formats[fmt] from pygame.tests.test_utils import buftools Exporter = buftools.Exporter Importer = buftools.Importer is_lil_endian = pygame.get_sdl_byteorder() == pygame.LIL_ENDIAN fsys, frev = ('<', '>') if is_lil_endian else ('>', '<') shape = (10, channels)[:ndim] strides = (channels * itemsize, itemsize)[2 - ndim:] exp = Exporter(shape, format=frev + 'i') snd = mixer.Sound(array=exp) buflen = len(exp) * itemsize * channels imp = Importer(snd, buftools.PyBUF_SIMPLE) self.assertEqual(imp.ndim, 0) self.assertTrue(imp.format is None) self.assertEqual(imp.len, buflen) self.assertEqual(imp.itemsize, itemsize) self.assertTrue(imp.shape is None) self.assertTrue(imp.strides is None) self.assertTrue(imp.suboffsets is None) self.assertFalse(imp.readonly) self.assertEqual(imp.buf, snd._samples_address) imp = Importer(snd, buftools.PyBUF_WRITABLE) self.assertEqual(imp.ndim, 0) self.assertTrue(imp.format is None) self.assertEqual(imp.len, buflen) self.assertEqual(imp.itemsize, itemsize) self.assertTrue(imp.shape is None) self.assertTrue(imp.strides is None) self.assertTrue(imp.suboffsets is None) self.assertFalse(imp.readonly) self.assertEqual(imp.buf, snd._samples_address) imp = Importer(snd, buftools.PyBUF_FORMAT) self.assertEqual(imp.ndim, 0) self.assertEqual(imp.format, format) self.assertEqual(imp.len, buflen) self.assertEqual(imp.itemsize, itemsize) self.assertTrue(imp.shape is None) self.assertTrue(imp.strides is None) self.assertTrue(imp.suboffsets is None) self.assertFalse(imp.readonly) self.assertEqual(imp.buf, snd._samples_address) imp = Importer(snd, buftools.PyBUF_ND) self.assertEqual(imp.ndim, ndim) self.assertTrue(imp.format is None) self.assertEqual(imp.len, buflen) self.assertEqual(imp.itemsize, itemsize) self.assertEqual(imp.shape, shape) self.assertTrue(imp.strides is None) self.assertTrue(imp.suboffsets is None) self.assertFalse(imp.readonly) self.assertEqual(imp.buf, snd._samples_address) imp = Importer(snd, buftools.PyBUF_STRIDES) self.assertEqual(imp.ndim, ndim) self.assertTrue(imp.format is None) self.assertEqual(imp.len, buflen) self.assertEqual(imp.itemsize, itemsize) self.assertEqual(imp.shape, shape) self.assertEqual(imp.strides, strides) self.assertTrue(imp.suboffsets is None) self.assertFalse(imp.readonly) self.assertEqual(imp.buf, snd._samples_address) imp = Importer(snd, buftools.PyBUF_FULL_RO) self.assertEqual(imp.ndim, ndim) self.assertEqual(imp.format, format) self.assertEqual(imp.len, buflen) self.assertEqual(imp.itemsize, 2) self.assertEqual(imp.shape, shape) self.assertEqual(imp.strides, strides) self.assertTrue(imp.suboffsets is None) self.assertFalse(imp.readonly) self.assertEqual(imp.buf, snd._samples_address) imp = Importer(snd, buftools.PyBUF_FULL_RO) self.assertEqual(imp.ndim, ndim) self.assertEqual(imp.format, format) self.assertEqual(imp.len, buflen) self.assertEqual(imp.itemsize, itemsize) self.assertEqual(imp.shape, exp.shape) self.assertEqual(imp.strides, strides) self.assertTrue(imp.suboffsets is None) self.assertFalse(imp.readonly) self.assertEqual(imp.buf, snd._samples_address) imp = Importer(snd, buftools.PyBUF_C_CONTIGUOUS) self.assertEqual(imp.ndim, ndim) self.assertTrue(imp.format is None) self.assertEqual(imp.strides, strides) imp = Importer(snd, buftools.PyBUF_ANY_CONTIGUOUS) self.assertEqual(imp.ndim, ndim) self.assertTrue(imp.format is None) self.assertEqual(imp.strides, strides) if ndim == 1: imp = Importer(snd, buftools.PyBUF_F_CONTIGUOUS) self.assertEqual(imp.ndim, 1) self.assertTrue(imp.format is None) self.assertEqual(imp.strides, strides) else: self.assertRaises(BufferError, Importer, snd, buftools.PyBUF_F_CONTIGUOUS) def todo_test_fadeout(self): # __doc__ (as of 2008-08-02) for pygame.mixer.fadeout: # pygame.mixer.fadeout(time): return None # fade out the volume on all sounds before stopping # # This will fade out the volume on all active channels over the time # argument in milliseconds. After the sound is muted the playback will # stop. # self.fail() def todo_test_find_channel(self): # __doc__ (as of 2008-08-02) for pygame.mixer.find_channel: # pygame.mixer.find_channel(force=False): return Channel # find an unused channel # # This will find and return an inactive Channel object. If there are # no inactive Channels this function will return None. If there are no # inactive channels and the force argument is True, this will find the # Channel with the longest running Sound and return it. # # If the mixer has reserved channels from pygame.mixer.set_reserved() # then those channels will not be returned here. # self.fail() def todo_test_get_busy(self): # __doc__ (as of 2008-08-02) for pygame.mixer.get_busy: # pygame.mixer.get_busy(): return bool # test if any sound is being mixed # # Returns True if the mixer is busy mixing any channels. If the mixer # is idle then this return False. # self.fail() def todo_test_pause(self): # __doc__ (as of 2008-08-02) for pygame.mixer.pause: # pygame.mixer.pause(): return None # temporarily stop playback of all sound channels # # This will temporarily stop all playback on the active mixer # channels. The playback can later be resumed with # pygame.mixer.unpause() # self.fail() def todo_test_set_reserved(self): # __doc__ (as of 2008-08-02) for pygame.mixer.set_reserved: # pygame.mixer.set_reserved(count): return None # reserve channels from being automatically used # # The mixer can reserve any number of channels that will not be # automatically selected for playback by Sounds. If sounds are # currently playing on the reserved channels they will not be stopped. # # This allows the application to reserve a specific number of channels # for important sounds that must not be dropped or have a guaranteed # channel to play on. # self.fail() def todo_test_stop(self): # __doc__ (as of 2008-08-02) for pygame.mixer.stop: # pygame.mixer.stop(): return None # stop playback of all sound channels # # This will stop all playback of all active mixer channels. self.fail() def todo_test_unpause(self): # __doc__ (as of 2008-08-02) for pygame.mixer.unpause: # pygame.mixer.unpause(): return None # resume paused playback of sound channels # # This will resume all active sound channels after they have been paused. self.fail() ############################## CHANNEL CLASS TESTS ############################# class ChannelTypeTest(AssertRaisesRegexMixin, unittest.TestCase): @classmethod def setUpClass(cls): # Initializing the mixer is slow, so minimize the times it is called. mixer.init() @classmethod def tearDownClass(cls): mixer.quit() def setUp(cls): # This makes sure the mixer is always initialized before each test (in # case a test calls pygame.mixer.quit()). if mixer.get_init() is None: mixer.init() def test_channel(self): """Ensure Channel() creation works.""" channel = mixer.Channel(0) self.assertIsInstance(channel, mixer.ChannelType) self.assertEqual(channel.__class__.__name__, 'Channel') def test_channel__without_arg(self): """Ensure exception for Channel() creation with no argument.""" with self.assertRaises(TypeError): mixer.Channel() def test_channel__invalid_id(self): """Ensure exception for Channel() creation with an invalid id.""" with self.assertRaises(IndexError): mixer.Channel(-1) def test_channel__before_init(self): """Ensure exception for Channel() creation with non-init mixer.""" mixer.quit() with self.assertRaisesRegex(pygame.error, 'mixer not initialized'): mixer.Channel(0) def todo_test_fadeout(self): # __doc__ (as of 2008-08-02) for pygame.mixer.Channel.fadeout: # Channel.fadeout(time): return None # stop playback after fading channel out # # Stop playback of a channel after fading out the sound over the given # time argument in milliseconds. # self.fail() def test_get_busy(self): """Ensure an idle channel's busy state is correct.""" expected_busy = False channel = mixer.Channel(0) busy = channel.get_busy() self.assertEqual(busy, expected_busy) def todo_test_get_busy__active(self): """Ensure an active channel's busy state is correct.""" self.fail() def todo_test_get_endevent(self): # __doc__ (as of 2008-08-02) for pygame.mixer.Channel.get_endevent: # Channel.get_endevent(): return type # get the event a channel sends when playback stops # # Returns the event type to be sent every time the Channel finishes # playback of a Sound. If there is no endevent the function returns # pygame.NOEVENT. # self.fail() def todo_test_get_queue(self): # __doc__ (as of 2008-08-02) for pygame.mixer.Channel.get_queue: # Channel.get_queue(): return Sound # return any Sound that is queued # # If a Sound is already queued on this channel it will be returned. # Once the queued sound begins playback it will no longer be on the # queue. # self.fail() def todo_test_get_sound(self): # __doc__ (as of 2008-08-02) for pygame.mixer.Channel.get_sound: # Channel.get_sound(): return Sound # get the currently playing Sound # # Return the actual Sound object currently playing on this channel. If # the channel is idle None is returned. # self.fail() def test_get_volume(self): """Ensure a channel's volume can be retrieved.""" expected_volume = 1.0 # default channel = mixer.Channel(0) volume = channel.get_volume() self.assertAlmostEqual(volume, expected_volume) def todo_test_get_volume__while_playing(self): """Ensure a channel's volume can be retrieved while playing.""" self.fail() def todo_test_pause(self): # __doc__ (as of 2008-08-02) for pygame.mixer.Channel.pause: # Channel.pause(): return None # temporarily stop playback of a channel # # Temporarily stop the playback of sound on a channel. It can be # resumed at a later time with Channel.unpause() # self.fail() def todo_test_play(self): # __doc__ (as of 2008-08-02) for pygame.mixer.Channel.play: # Channel.play(Sound, loops=0, maxtime=0, fade_ms=0): return None # play a Sound on a specific Channel # # This will begin playback of a Sound on a specific Channel. If the # Channel is currently playing any other Sound it will be stopped. # # The loops argument has the same meaning as in Sound.play(): it is # the number of times to repeat the sound after the first time. If it # is 3, the sound will be played 4 times (the first time, then three # more). If loops is -1 then the playback will repeat indefinitely. # # As in Sound.play(), the maxtime argument can be used to stop # playback of the Sound after a given number of milliseconds. # # As in Sound.play(), the fade_ms argument can be used fade in the sound. self.fail() def todo_test_queue(self): # __doc__ (as of 2008-08-02) for pygame.mixer.Channel.queue: # Channel.queue(Sound): return None # queue a Sound object to follow the current # # When a Sound is queued on a Channel, it will begin playing # immediately after the current Sound is finished. Each channel can # only have a single Sound queued at a time. The queued Sound will # only play if the current playback finished automatically. It is # cleared on any other call to Channel.stop() or Channel.play(). # # If there is no sound actively playing on the Channel then the Sound # will begin playing immediately. # self.fail() def todo_test_set_endevent(self): # __doc__ (as of 2008-08-02) for pygame.mixer.Channel.set_endevent: # Channel.set_endevent(): return None # Channel.set_endevent(type): return None # have the channel send an event when playback stops # # When an endevent is set for a channel, it will send an event to the # pygame queue every time a sound finishes playing on that channel # (not just the first time). Use pygame.event.get() to retrieve the # endevent once it's sent. # # Note that if you called Sound.play(n) or Channel.play(sound,n), the # end event is sent only once: after the sound has been played "n+1" # times (see the documentation of Sound.play). # # If Channel.stop() or Channel.play() is called while the sound was # still playing, the event will be posted immediately. # # The type argument will be the event id sent to the queue. This can # be any valid event type, but a good choice would be a value between # pygame.locals.USEREVENT and pygame.locals.NUMEVENTS. If no type # argument is given then the Channel will stop sending endevents. # self.fail() def todo_test_set_volume(self): # __doc__ (as of 2008-08-02) for pygame.mixer.Channel.set_volume: # Channel.set_volume(value): return None # Channel.set_volume(left, right): return None # set the volume of a playing channel # # Set the volume (loudness) of a playing sound. When a channel starts # to play its volume value is reset. This only affects the current # sound. The value argument is between 0.0 and 1.0. # # If one argument is passed, it will be the volume of both speakers. # If two arguments are passed and the mixer is in stereo mode, the # first argument will be the volume of the left speaker and the second # will be the volume of the right speaker. (If the second argument is # None, the first argument will be the volume of both speakers.) # # If the channel is playing a Sound on which set_volume() has also # been called, both calls are taken into account. For example: # # sound = pygame.mixer.Sound("s.wav") # channel = s.play() # Sound plays at full volume by default # sound.set_volume(0.9) # Now plays at 90% of full volume. # sound.set_volume(0.6) # Now plays at 60% (previous value replaced). # channel.set_volume(0.5) # Now plays at 30% (0.6 * 0.5). self.fail() def todo_test_stop(self): # __doc__ (as of 2008-08-02) for pygame.mixer.Channel.stop: # Channel.stop(): return None # stop playback on a Channel # # Stop sound playback on a channel. After playback is stopped the # channel becomes available for new Sounds to play on it. # self.fail() def todo_test_unpause(self): # __doc__ (as of 2008-08-02) for pygame.mixer.Channel.unpause: # Channel.unpause(): return None # resume pause playback of a channel # # Resume the playback on a paused channel. self.fail() ############################### SOUND CLASS TESTS ############################## class SoundTypeTest(AssertRaisesRegexMixin, unittest.TestCase): @classmethod def setUpClass(cls): # Initializing the mixer is slow, so minimize the times it is called. mixer.init() @classmethod def tearDownClass(cls): mixer.quit() def setUp(cls): # This makes sure the mixer is always initialized before each test (in # case a test calls pygame.mixer.quit()). if mixer.get_init() is None: mixer.init() # See MixerModuleTest's methods test_sound_args(), test_sound_unicode(), # and test_array_keyword() for additional testing of Sound() creation. def test_sound(self): """Ensure Sound() creation with a filename works.""" filename = example_path(os.path.join('data', 'house_lo.wav')) sound1 = mixer.Sound(filename) sound2 = mixer.Sound(file=filename) self.assertIsInstance(sound1, mixer.Sound) self.assertIsInstance(sound2, mixer.Sound) def test_sound__from_file_object(self): """Ensure Sound() creation with a file object works.""" filename = example_path(os.path.join('data', 'house_lo.wav')) # Using 'with' ensures the file is closed even if test fails. with open(filename, "rb") as file_obj: sound = mixer.Sound(file_obj) self.assertIsInstance(sound, mixer.Sound) def test_sound__from_sound_object(self): """Ensure Sound() creation with a Sound() object works.""" filename = example_path(os.path.join('data', 'house_lo.wav')) sound_obj = mixer.Sound(file=filename) sound = mixer.Sound(sound_obj) self.assertIsInstance(sound, mixer.Sound) def todo_test_sound__from_buffer(self): """Ensure Sound() creation with a buffer works.""" self.fail() def todo_test_sound__from_array(self): """Ensure Sound() creation with an array works.""" self.fail() def test_sound__without_arg(self): """Ensure exception raised for Sound() creation with no argument.""" with self.assertRaises(TypeError): mixer.Sound() def test_sound__before_init(self): """Ensure exception raised for Sound() creation with non-init mixer.""" mixer.quit() filename = example_path(os.path.join('data', 'house_lo.wav')) with self.assertRaisesRegex(pygame.error, 'mixer not initialized'): mixer.Sound(file=filename) @unittest.skipIf(IS_PYPY, 'pypy skip') def test_samples_address(self): """Test the _samples_address getter.""" from ctypes import pythonapi, c_void_p, py_object try: Bytes_FromString = pythonapi.PyBytes_FromString # python 3 except: Bytes_FromString = pythonapi.PyString_FromString # python 2 Bytes_FromString.restype = c_void_p Bytes_FromString.argtypes = [py_object] samples = as_bytes('abcdefgh') # keep byte size a multiple of 4 sample_bytes = Bytes_FromString(samples) snd = mixer.Sound(buffer=samples) self.assertNotEqual(snd._samples_address, sample_bytes) def todo_test_fadeout(self): # __doc__ (as of 2008-08-02) for pygame.mixer.Sound.fadeout: # Sound.fadeout(time): return None # stop sound playback after fading out # # This will stop playback of the sound after fading it out over the # time argument in milliseconds. The Sound will fade and stop on all # actively playing channels. # self.fail() def todo_test_get_length(self): # __doc__ (as of 2008-08-02) for pygame.mixer.Sound.get_length: # Sound.get_length(): return seconds # get the length of the Sound # # Return the length of this Sound in seconds. self.fail() def test_get_num_channels(self): """Ensure correct number of channels.""" expected_channels = 0 filename = example_path(os.path.join('data', 'house_lo.wav')) sound = mixer.Sound(file=filename) num_channels = sound.get_num_channels() self.assertEqual(num_channels, expected_channels) def todo_test_get_num_channels__while_playing(self): """Ensure correct number of channels while playing.""" self.fail() def test_get_volume(self): """Ensure a sound's volume can be retrieved.""" expected_volume = 1.0 # default filename = example_path(os.path.join('data', 'house_lo.wav')) sound = mixer.Sound(file=filename) volume = sound.get_volume() self.assertAlmostEqual(volume, expected_volume) def todo_test_get_volume__while_playing(self): """Ensure a sound's volume can be retrieved while playing.""" self.fail() def todo_test_play(self): # __doc__ (as of 2008-08-02) for pygame.mixer.Sound.play: # Sound.play(loops=0, maxtime=0, fade_ms=0): return Channel # begin sound playback # # Begin playback of the Sound (i.e., on the computer's speakers) on an # available Channel. This will forcibly select a Channel, so playback # may cut off a currently playing sound if necessary. # # The loops argument controls how many times the sample will be # repeated after being played the first time. A value of 5 means that # the sound will be played once, then repeated five times, and so is # played a total of six times. The default value (zero) means the # Sound is not repeated, and so is only played once. If loops is set # to -1 the Sound will loop indefinitely (though you can still call # stop() to stop it). # # The maxtime argument can be used to stop playback after a given # number of milliseconds. # # The fade_ms argument will make the sound start playing at 0 volume # and fade up to full volume over the time given. The sample may end # before the fade-in is complete. # # This returns the Channel object for the channel that was selected. self.fail() def test_set_volume(self): """Ensure a sound's volume can be set.""" float_delta = 1.0 / 128 # SDL volume range is 0 to 128 filename = example_path(os.path.join('data', 'house_lo.wav')) sound = mixer.Sound(file=filename) current_volume = sound.get_volume() # (volume_set_value : expected_volume) volumes = ((-1, current_volume), # value < 0 won't change volume (0, 0.0), (0.01, 0.01), (0.1, 0.1), (0.5, 0.5), (0.9, 0.9), (0.99, 0.99), (1, 1.0), (1.1, 1.0), (2.0, 1.0)) for volume_set_value, expected_volume in volumes: sound.set_volume(volume_set_value) self.assertAlmostEqual(sound.get_volume(), expected_volume, delta=float_delta) def todo_test_set_volume__while_playing(self): """Ensure a sound's volume can be set while playing.""" self.fail() def test_stop(self): """Ensure stop can be called while not playing a sound.""" expected_channels = 0 filename = example_path(os.path.join('data', 'house_lo.wav')) sound = mixer.Sound(file=filename) sound.stop() self.assertEqual(sound.get_num_channels(), expected_channels) def todo_test_stop__while_playing(self): """Ensure stop stops a playing sound.""" self.fail() def test_get_raw(self): """Ensure get_raw returns the correct bytestring.""" samples = as_bytes('abcdefgh') # keep byte size a multiple of 4 snd = mixer.Sound(buffer=samples) raw = snd.get_raw() self.assertIsInstance(raw, bytes_) self.assertEqual(raw, samples) ##################################### MAIN ##################################### if __name__ == '__main__': unittest.main()