Developing python projects
When we develop more than one python project, we need to configure our development environment with the dependencies of all the projects. This becomes even more complicated when there are many people on the development of the project. To do this, you need to create a development environment that is isolated from the others. We can do this thanks to docker containers.
Prepare project
Let’s imagine that our project has this structure:
pydk
├─── requirements.txt
└─── src
└─── server.py
We now think that our project may depend on some external libraries, such as Flask. Let’s prepare a file called requirements.txt with a line inside it: Flask==1.1.2
While our server.py application, it will be a simple Flask application like the following:
from flask import Flask
server = Flask(__name__)
@server.route("/")
def hello_docker():
return "Hello docker!"
if __name__ == "__main__":
server.run(host='<IP_ADDRESS>')
Now, we can run and continue to develop this project locally, but if we had other projects with requirements that would conflict, we would break this or other projects. So, let’s see how we can isolate this project inside a container that is the same for all the developers who are going to develop.
Prepare dockerfile
Now we need to create a Dockerfile (pydk/Dockerfile
) that contains suitable instructions to build our container so that it can execute our python code.
# base image
FROM python:3.9
# working directory in the container
WORKDIR /pydk
# copy the dependencies file to the working directory
COPY requirements.txt .
# install dependencies
RUN pip install -r requirements.txt
# copy the content of the local src directory to the working directory
COPY src/ .
# command to run on container start
CMD [ "python", "./server.py" ]
Now we run the command to build our image. When docker builder kicks in, you can see all the steps we wrote in our dockerfile:
$ docker build -t mypy .
Sending build context to Docker daemon 4.608kB
Step 1/6 : FROM python:3.9
3.9: Pulling from library/python
6c33745f49b4: Pull complete
ef072fc32a84: Pull complete
c0afb8e68e0b: Pull complete
d599c07d28e6: Pull complete
f2ecc74db11a: Pull complete
26856d31ce86: Pull complete
a463ae07b5f3: Pull complete
54f24c50f14e: Pull complete
168ee6df05fe: Pull complete
Digest: sha256:39c16d1a064c0239939d4ed52923b736c25b389e6ea439d5652b8fc9564ede76
Status: Downloaded newer image for python:3.9
---> d1eef6fb8dbe
Step 2/6 : WORKDIR /pydk
---> Running in ab2f8923ad12
Removing intermediate container ab2f8923ad12
---> bad3fb87e418
Step 3/6 : COPY requirements.txt .
---> eade175d7095
Step 4/6 : RUN pip install -r requirements.txt
---> Running in de2b7fcd2c6d
Collecting Flask==1.1.2
Downloading Flask-1.1.2-py2.py3-none-any.whl (94 kB)
Collecting click>=5.1
Downloading click-7.1.2-py2.py3-none-any.whl (82 kB)
Collecting itsdangerous>=0.24
Downloading itsdangerous-1.1.0-py2.py3-none-any.whl (16 kB)
Collecting Jinja2>=2.10.1
Downloading Jinja2-2.11.2-py2.py3-none-any.whl (125 kB)
Collecting MarkupSafe>=0.23
Downloading MarkupSafe-1.1.1.tar.gz (19 kB)
Collecting Werkzeug>=0.15
Downloading Werkzeug-1.0.1-py2.py3-none-any.whl (298 kB)
Building wheels for collected packages: MarkupSafe
Building wheel for MarkupSafe (setup.py): started
Building wheel for MarkupSafe (setup.py): finished with status 'done'
Created wheel for MarkupSafe: filename=MarkupSafe-1.1.1-cp39-cp39-linux_x86_64.whl size=32240 sha256=6fbda6c15fe2abefc6c8f4ec2ac66c421b1cf997c1a53a532a39bbebc8083860
Stored in directory: /root/.cache/pip/wheels/e0/19/6f/6ba857621f50dc08e084312746ed3ebc14211ba30037d5e44e
Successfully built MarkupSafe
Installing collected packages: MarkupSafe, Werkzeug, Jinja2, itsdangerous, click, Flask
Successfully installed Flask-1.1.2 Jinja2-2.11.2 MarkupSafe-1.1.1 Werkzeug-1.0.1 click-7.1.2 itsdangerous-1.1.0
Removing intermediate container de2b7fcd2c6d
---> 595ceaa19d29
Step 5/6 : COPY src/ .
---> 98294355a272
Step 6/6 : CMD [ "python", "./server.py" ]
---> Running in 1fb2a61f97ce
Removing intermediate container 1fb2a61f97ce
---> 09fd1053a1c1
Successfully built 09fd1053a1c1
Successfully tagged mypy:latest
Let’s check the newly created image.
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
mypy latest 09fd1053a1c1 15 minutes ago 896MB
python 3.9 d1eef6fb8dbe 8 days ago 885MB
Test Flask on docker
Now we can launch our image and test our application.
$ docker run -d -p 5000:5000 mypy
487c215ec0cc2b44c1612c0aadbd3f1f47c32a0b29273da3dabf77351717852c
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
487c215ec0cc mypy "python ./server.py" 28 seconds ago Up 27 seconds <IP_ADDRESS>:5000->5000/tcp crazy_hermann
$ curl http://localhost:5000
Hello docker!
Conclusion
We have created a small development environment for python application. Now, we can connect to our image and continue the development of the application without affecting our local environment.


It's easy, just enter your location and destination and we'll find you a movie that will save you from boredom.


Home
Edit Decks
Play
Shop
Red Deck Wins
Jed Deck Wins
Experimental Green
Add a new deck.
100% win rate
played 25 times
Estimated worth 15 dollars
0% win rate
played 200 times
Estimated worth 105 dollars
50% win rate
played 2 times
Estimated worth 1 dollar


🎭 Arya's Art Manager 🎭
Wines Movies NPR Tiny Desks TV Shows Books GitHub ->
+-------------------------------------------------------+
| |
| TODO: BOOKS |
| |
+-------------------------------------------------------+
- The Comanche Empire by Pekka Hämäläinen
- Democracy in America by Alexis de Tocqueville
- Things Fall Apart by Chinua Achebe
- Muqaddimah by Ibn Khaldun
- The Death and Life of Great American Cities by Jane
Jacobs
- The Unfinished Revolution: Sun Yat-Sen and the
Struggle for Modern China by Tjio Kayloe
- Critical Path by Buckminster Fuller
- Operation Manual for Spaceship Earth by Buckminster
Fuller
- Metropolis by Ben Wilson
- The Collapse of Complex Societies by Joseph Tainter
- The Theory of Island Biogeography by EO Wilson &
Robert MacArthur
- What it Takes by Richard Cramer
- Perdurabo: Life of Aleister Crowley by R. Kaczynski
- Time & the Art of Living by Robert Grudin
- The Unsettling of America by Wendell Berry
- Signs Preceding the End of the World by Yuri Herrera
translated by Lisa Dillman
- Confessions by St. Augustine


--- layout: post title: Team Winner, Superstar 2011 @ Yahoo! date: 2011-11-23 18:03:46.000000000 +01:00 categories: [] tags: [] status: publish type: post published: true meta: _edit_last: '1' author: ---
Yodel for the Algorithmic Search Bing Transition Team
The Algorithmic Search Bing Transition team maniacally focused on desktop and mobile migration of web, image and video search in 40+ global markets from Yahoo’s YST infrastructure to Microsoft’s Bing platform. The Bing Transition Team in Bangalore specifically took complete responsibility for transitioning image and video search to the Bing platform. The Bing transition represents a first-of-its kind partnership for Yahoo!. It is an inherently complex relationship, extremely difficult technical transition and horizontal cross company project unlike any Yahoo! has undertaken in the past. But this team was up to the challenge, delivering with speed and quality. Successful completion of the Algorithmic Search transition in multiple global markets will save $150M+ annually in capital expenditure costs, allowing Yahoo! to focus on global search experience innovation and beyond, both in our core desktop search business, but also importantly across mobile and tablet devices.
Team Winner, Superstar 2011


Hello, I am a CS Grad student at University of Massachusetts Amherst. I aspire to work in an evolving engineering environment to develop tools for industry use.
I am interested in Machine Learning and Computational Neuroscience, and have hand-on experience with Python, C, C++ and Java.
In my free time, I love to take long walks, read the works of Ishiguro and Murakami or simply admire Calvin & Hobbes. I am a huge fan of Liverpool FC, and am always up to talk about soccer!
I utilized my final semester of undergrad researching at the RISE Lab in IIT-M. Over there, I worked under the amazing guidance of Dr. Mitesh Khapra on a machine learning & NLP project that aimed to generate natural language descriptions from structured data.
I worked with Python and Tensorflow, and utilized algorithms such as beam search and multi-task learning to improve the classification accuracy.
During winter 2016 and summer 2017 I interned at an emerging, one-of-a-kind startup in Mumbai that focusses on automating medical insurance claim processes.
During my internships, I worked with Python to build intelligent models to properly classify medical reports, identify sensitive data and anonymize them and pick out OCR mistakes and rectify them.
I interned at GetEvangelized, an online platform for brands to meet micro-celebrities during spring 2016.
I was primarily tasked with developing a new website for the organization. For this task, I majorly worked on heavily modifying Drupal templates for inner pages, while using HTML, CSS and JS to design the home page.
Developed an end-to-end waste management system with two others as the capstone project. The system seamlessly integrates hardware fixed on trashcans, a web dashboard and Telegram API to provide realtime updates and visualizations about waste generation to the user as well as the municipality.
View ProjectA proof-of-concept project that use Voice Recognition to detect statistical facts and searched the web to either verify or refute the claim.
View ProjectUtilized Latent Semantic Analysis to identify similar movies based on IMDb summaries. Further used k-means to provide a colourful visualization to show how different movies are related.
View Project


Money Game. Should Red redouble? If redoubled, should White take?
pips Red=79 White=61
(CorrectAnswer= 0/0, ErrorScore= 0)
It is always gratifying when a ‘known' book position occurs in real life. As Tim Chow has commented this is in Trice's “Boot Camp” and I have seen it elsewhere.
I know that this is a redouble and a take because it is in my backgammon model. You can work this out from first principles to establish that White wins more than 25% of the time (in fact it is nearly 29%) but it is easier if you just keep this as one of your reference positions.
Given that the cube has enormous value to White in this position he can actually take with less than 25% winning chances. If White has a five-point home board then Red does not have a redouble.
This occurred in the Battersea chouette. Red redoubled – White dropped in a flash. It really is worth learning those reference positions!
I know that this is a redouble and a take because it is in my backgammon model. You can work this out from first principles to establish that White wins more than 25% of the time (in fact it is nearly 29%) but it is easier if you just keep this as one of your reference positions.
Given that the cube has enormous value to White in this position he can actually take with less than 25% winning chances. If White has a five-point home board then Red does not have a redouble.
This occurred in the Battersea chouette. Red redoubled – White dropped in a flash. It really is worth learning those reference positions!
Cube analysis 2-ply cubeless equity +0.955 (Money: +0.929) 0.722 0.533 0.007 - 0.278 0.052 0.003 Cubeful equities: 1. No double +1.065 2. Double, take +1.584 (+0.519) 3. Double, pass +1.000 (-0.065) Proper cube action: Too good to double, pass (11.1%)


CONTACT A film review by Andrew Hicks Copyright 1997 Andrew Hicks / Fatboy Productions
(1997) *** (out of four)
There have been so many movies in recent years about aliens that if any extraterrestrials ever do show up it will certainly be an anti-climax. CONTACT seems the exception -- no alien intervention could possibly be as anti-climactic as the last half-hour of CONTACT, a slow-moving film that builds up to a promising close encounter of the third kind and gives us an incredibly hokey dream-like sequence instead.
It's a shame, too, because I really admired CONTACT up to that point. It's one of the only intelligent dealings with the ramifications of searching for alien life and the inevitable conflicts that will arise between the elements of religion and science and the representatives thereof. This Carl Sagan adaptation takes the high road all through the lengthy setup, providing us with a protagonist in which we invest a lot of emotion.
We meet Ellie Airway, played by Jodie Foster (in her best performance since SILENCE OF THE LAMBS), at the tender age of 8, already initiating contact via short-wave radio with people in far off places and looking through telescopes at the stars above. It's the nurturing of her loving father that makes it all possible and, like any other movie in which one parent figures large, we see the death of the father. The young Ellie doesn't buy the priest's explanation that it was part of God's undecipherable master plan, setting up a lifetime (and a movietime) of conflict between Ellie's rational agnostic mind and people of faith.
The most interesting thing about CONTACT is this dichotomy and I'm sure it's by no personal bias of Sagan that the agnostic astronomer seems the most moral and emotional person in this diegetic universe. With a cast of one-notes like Tom Skeritt (the bastard-in-power who first cuts Ellie's funding then takes all the credit once contact with aliens is made), Angela Basset (skeptical White House female security agent) and James Woods (skeptical White House male security agent), that's hardly a surprise.
Then there's Matthew McConaughey, the sympathetic religious figure who also serves as the movie's love interest. The word "religious" in CONTACT denotes a person who believes in faith over science -- as McConaughey's pontificating hippie points out, some people _need_ to believe in God rather than resign themselves to the loneliness felt when they realize they're so small and minute. Ellie's flip-side view is that science is the universal language and the existence of aliens would allow humans to be part of a much more unifying cosmic force.
Lest the movie bog itself down too much beneath these sentiments, director Robert Zemeckis intersperses the same kind of media tricks that made FORREST GUMP seem in places like an important documentary. As Ellie receives a message from the great beyond, with visual instructions hidden behind images of Hitler (quite a unifying cosmic force his own self), the world takes notice. We see every CNN anchor ever hired pondering the ramifications of this contact, along with deftly-edited footage of President Clinton saying that this ground-breaking new discovery may alter the course of history. The real-life speech was about the advent of the Arch Deluxe burger, but a snip here and a morph there and suddenly he's talking about aliens.
To which degree you will like CONTACT depends on your interest of the topic. We've seen alien intervention treated a hundred different ways in the movies, but rarely has it seemed so real and possible than in CONTACT. Rarely also has it been flushed down the cosmic crapper by such a New Age ending that looks like a Shirley MacLaine music video than a Hollywood finale. CONTACT is miles removed from MEN IN BLACK but with about 100 extra IQ points and a refusal to give the audience what they crave.
--
Visit the Movie Critic at LARGE homepage at http://www.missouri.edu/~c667778/movies.html
Serving America For Nearly 1/25th of a Century!
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


z
___
z
_/ |
z
|_____|{)_ --- ==\/\ | [_____] __)| | | //| |
Buenas noches
Your computer took a siesta.


Overview
Mersenne exponent set: (Me)
A Mersenne exponent is an integer n such that 2n-1 is prime. link
Mersenne number set (Mn)
A Mersenne number is an integer in the form 2n-1, where n is any positive integer. link
Mersenne prime number set (Mp)
A Mersenne prime is a prime number in the form 2p-1, where p is prime. link
Prime number set (Pn)
A prime number (or a prime) is a natural number greater than 1 that is not a product of two smaller natural numbers link
-
Mersenne exponent
The set of Mersenne exponents is a subset of the prime number set defined in the above headers. When these specific exponents, n, are plugged into the Mersenne number with form 2n-1, the result will be a Mersenne prime.
-
Mersenne number
Mersenne primes and Mersenne numbers are named after Marin Mersenne, a french scholar from the 1700s. Originally, Mersenne had the list of Mersenne Primes and Mersenne numbers incorrect. The set of primes contained composite numbers (Ex: M67, M257) while the set of composite numbers contained some prime numbers (Ex: M61, M281). Later, Edouard Lucas corrected for these smaller numbers using theories that we will show below.
The mersenne number set is eclipsed by its own subset the Mersenne Primes. Much research is being conducted to find the next largest prime (GIMPS). Of course this would not be possible without Mersenne numbers.
Mersenne numbers that are not prime, are composite Mersenne numbers. These are commonly factored to down to a product of primes. Ex: 211-1 = 2047 = 23x89
-
Mersenne prime number
The star of the show, Mersenne numbers have a great spotlight in the prime number research space. A subset of the Mersenne numbers, these prime numbers are of the form 2p-1, where p is a prime.
Highest known Mersenne Prime Mp is 51 (M51), which was found in December 2018. This is now the largest known prime, which is represented by 282,589,933-1. This new prime contains 24,862,048 digits. That looks like this.
The highest confirmed Mersenne prime is M47. It is one thing to calculate the prime, but confirming the number requires factorization and traditional methods that would normally be used to evaluate prime numbers. This must be done to confirm the original calculation. Along with the traditional factorization and confirmation of the lower level exponents, a recalculation is done with shifted bits to validate
-
Prime number
Using Mersenne primes, we are able to calculate the largest known primes. Large primes have many uses in the real world and theoretical world.
Prime Generator
N-th Prime Calculator
This calculator will return the n-th prime from a set of primes calculated with the Sieve of Eratothenes
We can also find a list of the first 1000 primes here
- Total Mersenne Exponents: 47 (Found in the set at the top of the page)
- Total regular primes calculated: 57 Calculate Primes
Enter the index n for the desired prime:
Pn(1) is 2
Pseudocode:
//algorithm Sieve of Eratosthenes is
input: an integer n > 1.
output: all prime numbers from 2 through n.
let A be an array of Boolean values,
indexed by integers 2 to n, initially all set to true.
for i = 2, 3, 4, ..., not exceeding √n do
if A[i] is true
for j = i2, i2+i, i2+2i, i2+3i, ..., not exceeding n do
A[j] := false
return all i such that A[i] is true.
Implementation (Js):
//execute sieve given max as upperbound
function fn(max){
array = new Array(max);
for(var i = 0; i < array.length; i++){
array[i] = true;
for(var p = 2; p*p < max; p++){
if(array[p] == true){
for(var i = p*p; i < max; i+=p){
array[i] = false;
}
}
for(var p = 2; p < max; p++){
if(array[p] == true){
primes.push(p);
}
}
Sieve of Eratothenes
The Sieve of Eratosthenes is an ancient algorithm that eliminates all composite numbers up to a given number. It is thought that the Greek Mathmatician Eratosthenes of Cyrene is the one to have used it first.
Algorithm desc. The algorithm works by creating a list of booleans from 2 to the upper bound. It then does iterates to the upper bound, checking every element in the boolean array if it is true or false. If it hits an element that is true, then it will iterates over every multiple of that number setting the respective index to false in the boolean list. If it hits false, then another smaller integer was a multiple of that index and it was set to false, skipping to the next list element. At the end, iterate through the boolean list, save all of the indexes of the "true" values. These indexes are the primes from 2 to the upper bound.
Time complexity = O(n(log(logn)))
"Sift the Two's and Sift the Three's, The Sieve of Eratosthenes. When the multiples sublime, The numbers that remain are Prime." - Anonymous
Mersenne Calculator
Mersenne calculator
This calculator will have restricted calculation bounds due to machine and browser limitations. (p > 21701 will be taxing)
Input value n for: 2p-1 where p is a prime
Output from calculating 23-1 is:
(a Mersenne prime!)
7
To check if a Mersenne number is prime we can use the Lucas Lehmer primality test as defined below.
Pseudocode:
// Determine if Mp = 2p − 1 is prime for p > 2
Lucas–Lehmer(p)
var s = 4
var M = 2p − 1
repeat p − 2 times:
s = ((s × s) − 2) mod M
if s == 0 return PRIME else return COMPOSITE
Implementation (Js):
//Logic for the Mersenne Prime test given the prime p
function lucasLehmerPrime(p){
var mersenneVal = (2**p)-1;
var nextVal = 4 % mersenneVal
for(var i = 1; i < p-1; i++){
nextVal = (nextVal*nextVal-2) % mersenneVal;
}
return nextVal==0;
}
Lucas–Lehmer primality test
LLPT was developed by Edouard Lucas in 1856, and later improved by Lucas in 1878, lastly by Derrick Lehmer in the 1930s. Its most famous application is in GIMPS, the Great Internet Mersenne Prime Search.
The LLPT algorithm has an efficient time-complexity for computational execution. Due to the fact that the iterations only execute up to p-2, the largest known prime would have taken 80 million execution cycles. This can be done relatively quickly on a modern computer. Where the algorithm is least efficient is in the mathmatical operation of 2p-1. This exponent calculation is sort of a hidden algorithm, it is executed in the background by iteratively multiplying 2 together. In applications like GIMP, other algorithms are implemented to square these huge numbers and divide related work loads.
Lucas-Lehmer sequence can be seen here (s2-2): 4, 42-2=14, 142-2=194, ...
Mersenne Binary Calculator
Binary representation of Mersenne Primes and Mersenne Numbers
Input a number to generate of term of n digits of "1". This will binary number that will be a prime or a Mersenne prime
- Input "11", "89", and "127" to see examples of primes and Mersenne primes. This will also demonstrate simplification of terms as the exponent grows larger.
- For fun, try higher values like the Mersenne exponent: 21701. It may take a short while to load... but it will. The fact that this extremely large value can be confirmed by the LLPT (in a browser!) blew my mind.
1112 =
710
(A Mersenne prime!)
Binary to Decimal Breakdown:
(22)+(21)+(20)
Note: Once the decimal value surpasses BigInt size, precision is lost and Mersenne primes will not be checked correctly.
Pseudocode:
// Convert binary number n into its decimal representation
BinaryToDecimal(n)
var decimal = 0
for i=0, 0 to n.length times:
decimal = decimal + 2i
increment i
return decimal
Implementation (Js):
//base2 to base10 conversion
//given b, the number of binary digits
function fn(b){
var binDecimalVal = 0;
for(var i = 0; i < b; i++){
binDecimalVal += 2n**i;
}
//update new variables
//update UI
}
-
Mersenne Prime representations in binary:
- 112 = 310
- 1112 = 710
- 111112 = 3110
- 11111112 = 12710
-<PHONE_NUMBER>1112 = 819110
- . . .
Binary to Decimal Conversion
The actual implementation for the calculator above has been optimized to only calculate the difference from the previous number instead of a complete recalculation.
The binary representation of 2n-1 is n repitions of the digit 1. This can be extended to Mersenne primes where 2p-1 is p repitions of the digit 1, p being a Mersenne exponent.
This is because 2n creates a term with single digit of "1" followed by n digits of "0"
When 1 is taken away from this term, the term becomes n-1 digits of "1". In other words, the leading 1 is removed and all the "0"s become "1"s
Ex:
(100000-1)2 = (32-1)10
= 111112 = 3110
Getting back to 100000 from 11111 is more intuitive when we apply carry-overs from the adding operation.
In base-2, the highest value is 1. Adding 1+1 would create a carry over.
Ex: 1+1 = 10
Likewise, 11111+1 = 100000, as the 1 carries all the way to the front while switching the trailing "1"s into "0"s.
Interesting facts.
-
Cryptography
Large primes are used in encryption algorithms for cyber-security. The RSA encryption system is a PRIME example, using two large prime numbers to create a product that then requires prime-factorization. Note: Mersenne primes are not ideal for RSA encryption because they are guessed easily.
-
Javascript limiations
I learned new limitations of javascript with big integer calculations. I had to research BigInt variable declaration and the javascript runtime memory sizes.
BigInt allows us to calculate past 2^31, as 231 is a computers max integer. 231 seems odd but they use the first bit to represent the +/- of the integer. This allows computer to have an integer range of -231 to +231 for a total of 232 integer representations.
-
The Great Internet Mersenne Prime Search (GIMPS)
GIMPS is an ongoing initiative to identify the largest known primes using Mersenne primes. GIMPS has a free program for download that requests assignments and work loads to be ran on the host system. If a computer finds a new prime that which is later confirmed through multiple checks and validations, the user and computer are documented and put in the record list.
Many computer and hardware enthusiasts have probably heard of the GIMPS program "prime95", as it is heavily used for stress testing computers and processor voltage/power limits.
The latest information can be found on their homepage: mersenne.org. One of the latest updates is from a contributer, they found a way to eliminate the need for a second primality test to be done when a new prime is found. This saves 95.5% of the workload that would have originally been required.
References
Many more readings and research to understand these concepts and the maths behind them


This demo was created to show the functional differences between FOIT and FOUT. It’s using Open Sans loaded from Google Web Fonts. (Not sure what FOIT and FOUT are?) Decide for yourself—which feels faster? Which feels more stable? Take note of the difference in page stability when you group your repaints.
Created by @zachleat. Read more at FOIT vs. FOUT (the blog post) or the Comprehensive Guide to Font Loading Strategies. You can always return to zachleat.com.
This is a paragraph. This is heavier text. This is emphasized text. This is heavier and emphasized text.
This is a paragraph. This is heavier text. This is emphasized text. This is heavier and emphasized text.


-
affinity_graph.py --
affinity_graph.py - offers a mechanism for producing an affinity graph as follows:
- create a random bipartite graph G_B = (V_0, V_1, A)
- for each v,w in V_0, add edge vw if there exists x in V_1 such that vx,wx in A
- remove V_1
@author Matthias Stallmann
@date 2018/3/29
-
ba_gen.py --
ba_gen.py - a generator of a Barabasi-Albert graph given number of
vertices and desired average degree
-
bl_rg.py --
bl_rg.py - (bucket-list random graph) generates graphs with a specified degree variance,
minimum degree and maximum degree
uses a list of buckets, each bucket storing vertices of the same degree
a graph is printed to standard output in snap format
@author Matt Stallmann
@date 2018/7/18
-
cl_gen.py --
cl_gen.py - a generator of a Chung-Lu graph given various parameters relating to
degree sequence generation; also has option of reading sequence from
file or standard input
-
cluster_graphs.py --
Given a stochastic block matrix, compute the expected number of edges
-
create_lpx.sh --
creates a directory containing cplex input instances from instances in a given directory
note: snap2lpx.py must be in the same directory as this script
-
delaunay.py --
Obtained from
http://code.activestate.com/recipes/579021-delaunay-triangulation/
The algorithm uses the S-hull method by D A Sinclair
(http://www.s-hull.org/paper/s_hull.pdf). The method involves ordering the
points in increasing distance from the cloud's center of gravity, creating
a triangle with the first three points, and adding the remaining points
while contructing triangles between the point and boundary edges - only
triangles with a definite sign need to be added (the edge must be
visible). Finally, an edge flipping step ensures that the triangles are
well formed, i.e. the sum of opposite angles to an edge is < 180 degree
(the so-called Delaunay criterion).
-
permute_graph.py --
creates a given number of copies of a graph in snap format;
the vertices are randomly renumbered and edges put in random order in each copy
-
random_delaunay.py --
creates a random Delaunay triangulation using delaunay.py to do the
triangulation after a random set of points have been
chosen; there is an option to triangulate the infinite face
-
snap2edgelist.py --
converts snap format to a simple edgelist format where the first line gives
number of vertices and edges, respectively, and the remaining lines give
endpoints of edges. Vertex numbers in the output range from 0 to n-1, where
n is the number of vertices.
The following assumptions are made about the input:
- vertex numbers go from 1 to n
- if a vertex number is > n, then the max vertex number is used as number of vertices
in the output (no harm done for the oct estimator)
-
snap2graphml.py --
translates from snap format, described below, to the graphml format
used by Galant or Gephi;
this program is a simple filter, translating from standard input to standard output.
snap format is as follows:
# comment line 1
...
# comment line k
source_1 target_1
...
source_m target_m
sources and targets are vertex numbers starting at 1
-
snap2lpx.py --
lightweight script to convert a snap file to a CPLEX-readable file;
vertices numbered 0 through the maximum vertex number are assumed to exist;
no harm done if they don't - it simply means that
there will be variables not involved in any constraints;
reason for this is so that the -verify option in cplex_ilp produces a string
of 0's and 1's that represents vertices starting at vertex 0.
-
wcg_gen.py --
wcg_gen.py - generates dense graphs with small vertex covers by expanding a construction
that shows the greedy heuristic to have arbitrarily bad approximation ratio


CompanyLogo
Home
Contact
About
Login/Signup
Terms
Updates
Health-care Engineering
-->
Sort by:
Relevance
Most Recent
Nearest
Items per page:
12
24
36
Test1
Test1
Test1
Test1
Test1
Test1
Test1
Test1
Test1
Test1
Test1
Test1
Test1
Test1
Test1
Items per page:
12
24
36
Items per page:
12
24
36
Items per page:
12
24
36


{{ competition?.deadline | date: "MMM d, y, h:mm a" }}
You have successfuly submitted your story. Good luck!


or, install the Visual Studio Extension to investigate builds inside Visual Studio:
Using MSBuild.exe /bl to record a binary log
MSBuild 15.3 introduces a new command-line switch: /bl to record all build events to a structured/binary log file:
Double-click the .binlog file to open it in MSBuild Structured Log Viewer:
Replaying a .binlog to reconstruct text logs
You can pass a .binlog file to MSBuild instead of a project/solution to replay it to other loggers, as if a real build was happening. This allows you to reconstruct a text log of any verbosity given the .binlog file. Read more at: https://github.com/Microsoft/msbuild/wiki/Binary-Log#replaying-a-binary-log
Binary log advantages
- Completeness - records the exact events in order they happened during the build. You can replay a binary log into other loggers to reconstruct full text logs. Pass the .binlog file to MSBuild.exe instead of a project/solution to replay the log as if the original build was happening.
- Verbosity - binary logs capture more information than even the most diagnostic-level text logs. The binary logger turns on various MSBuild switches to output more information, such as task inputs and target outputs.
- Faster builds - less overhead than a text log, can make builds significantly faster if other logs are disabled. They can be reconstructed later anyway if needed.
- Smaller disk size - a binary log is much smaller in size than a corresponding diagnostic-level text log (10-20x or more). This can result in significant storage savings on CI servers.
- Easier to read/analyze - text logs (especially from multi-processor builds) can become unwieldy, intertwined and hard to read. The viewer allows to collapse unneeded sections, as well as intelligent search.
- Programmatic access - All information is easily accessible programmatically for tools such as analyzers (whereas you need to parse text logs yourself and it's hard without a clearly defined structure) A .NET API is available to load and query binary logs.
- Embedded source files - optionally embed the source text of all project files and imported targets files used during the build, so it is possible to correlate log events with the source code. Preprocessed view (with all imports inlined) is available for each file (like /pp).
Read more about the new MSBuild binary log format (*.binlog)
Viewer Features
The MSBuild Structured Log Viewer can build projects and solutions or open existing log files:
Leverage the source code of projects and targets embedded in the log file:
The viewer supports three file formats:
- *.binlog (official MSBuild binary log format, produced by msbuild.exe /bl
- *.buildlog (when you Save As... in the viewer)
- *.xml (for large human-readable XML logs)
The viewer can read all 3 formats and can save to either *.buildlog or *.xml.
See here for the list of viewer features
Command-line help for the /bl switch
See MSBuild command-line help msbuild /? for more information on the /bl switch. The switch is available starting with MSBuild 15.3 (Visual Studio 2017 Update 3 or newer).
/binaryLogger[:[LogFile=]output.binlog[;ProjectImports={None,Embed,ZipFile}]]
Serializes all build events to a compressed binary file.
By default the file is in the current directory and named
"msbuild.binlog". The binary log is a detailed description
of the build process that can later be used to reconstruct
text logs and used by other analysis tools. A binary log
is usually 10-20x smaller than the most detailed text
diagnostic-level log, but it contains more information.
(Short form: /bl)
The binary logger by default collects the source text of
project files, including all imported projects and target
files encountered during the build. The optional
ProjectImports switch controls this behavior:
ProjectImports=None - Don't collect the project
imports.
ProjectImports=Embed - Embed project imports in the
log file.
ProjectImports=ZipFile - Save project files to
output.projectimports.zip
where output is the same name
as the binary log file name.
The default setting for ProjectImports is Embed.
Note: the logger does not collect non-MSBuild source files
such as .cs, .cpp etc.
A .binlog file can be "played back" by passing it to
msbuild.exe as an argument instead of a project/solution.
Other loggers will receive the information contained
in the log file as if the original build was happening.
You can read more about the binary log and its usages at:
https://github.com/Microsoft/msbuild/wiki/Binary-Log
Examples:
/bl
/bl:output.binlog
/bl:output.binlog;ProjectImports=None
/bl:output.binlog;ProjectImports=ZipFile
/bl:..\..\custom.binlog
/binaryLogger
Recording a binary log with older versions of MSBuild
The built-in /bl switch was only introduced in MSBuild 15.3 (Visual Studio 2017 Update 3). However there is a way to record a binary log with previous versions of MSBuild as well. You can attach the logger to any MSBuild-based build using the logger library: StructuredLogger.dll. It is available in a NuGet package:
MSBuild.StructuredLogger
Alternatively, you can download StructuredLogger.dll directly from the releases page at: https://github.com/KirillOsenkov/MSBuildStructuredLog/releases
Use a command-line such as this to pass the BinaryLogger to MSBuild:
msbuild solution.sln /t:Rebuild /v:diag /noconlog /logger:BinaryLogger,%localappdata%\MSBuildStructuredLogViewer\app-2.1.174\StructuredLogger.dll;1.binlog
To use a portable version of the logger (e.g. with the dotnet msbuild command) you need a .NET Standard version of StructuredLogger.dll, not the .NET Framework (Desktop) version. Inside the NuGet package there is the lib\netstandard2.0\StructuredLogger.dll. Try passing that to dotnet build like this:
dotnet msbuild Some.sln /v:diag /nologo /logger:BinaryLogger,"packages\MSBuild.StructuredLogger.2.1.174\lib\netstandard2.0\StructuredLogger.dll";"C:\Users\SomeUser\Desktop\binarylog.binlog"
Investigating IDE and design-time builds inside Visual Studio
Use the Project System Tools Visual Studio extension to record binary logs of IDE and design-time builds.
See more information about design-time builds here:
https://github.com/dotnet/project-system/blob/master/docs/design-time-builds.md
Security concerns
The binary log contains and exposes environment variables. Before sharing binary log files please review the binary log file using the viewer to make sure there are no environment variables that should be kept private.
Reading MSBuild .binlogs programmatically
Reference the MSBuild.StructuredLogger NuGet package. All you need is to reference StructuredLogger.dll from that package.
You may also need to reference MSBuild Microsoft.Build.Framework.
There are various APIs for various scenarios. A high-level API to read a .binlog file into a tree structure that you normally see in the viewer is:
using System;
using Microsoft.Build.Logging.StructuredLogger;
class BinaryLogReadBuild
{
static void Main(string[] args)
{
string binLogFilePath = @"C:\temp\test.binlog";
var buildRoot = BinaryLog.ReadBuild(binLogFilePath);
buildRoot.VisitAllChildren<CscTask>(c => Console.WriteLine(c.CommandLineArguments));
}
}
There is a more formal API to read the C# compiler invocations from a binlog, read more here:
https://github.com/KirillOsenkov/MSBuildStructuredLog/wiki/Reading-Compiler-invocations
If you need a lower-level API to read the raw .binlog records yourself you can use BinLogReader.ReadRecords(string binLogFilePath):
using System;
using Microsoft.Build.Framework;
using Microsoft.Build.Logging;
using Microsoft.Build.Logging.StructuredLogger;
class BinLogReader
{
static void Main(string[] args)
{
string binLogFilePath = @"C:\temp\test.binlog";
var binLogReader = new BinLogReader();
foreach (var record in binLogReader.ReadRecords(binLogFilePath))
{
var buildEventArgs = record.Args;
// print command lines of all tool tasks such as Csc
if (buildEventArgs is TaskCommandLineEventArgs taskCommandLine)
{
Console.WriteLine(taskCommandLine.CommandLine);
}
}
}
}
Another example of using the API is reading start/end times and durations of targets:
https://github.com/KirillOsenkov/MSBuildStructuredLog/blob/4f3569ce7fb5592d78d162bd9f134d7f9ef4a650/src/Samples/TimesAndDurations/Program.cs#L23
Source code on GitHub
The MSBuild Structured Log Viewer project is open-source on GitHub at:
https://github.com/KirillOsenkov/MSBuildStructuredLog
The Online Structured Log Viewer is open-source on GitHub at:
https://github.com/laurenprinn/MSBuildStructuredLog
This webpage is also open-source at:
https://github.com/KirillOsenkov/MSBuildLog


|
Theoria
|
#include <Config.h>
Classes | |
| struct | Attr |
Public Types | |
| using | ConstConfigList = std::vector< const Config * > |
| using | ConfigPredicate = std::function< bool(const Config *)> |
Public Member Functions | |
| Config () | |
| virtual | ~Config () |
| Attrs::const_iterator | findAttr (const std::string &name) const |
| const Config * | getParent () const noexcept |
| bool | hasChild (const Config *child) const |
| int | numChildren () const |
| ConstConfigList | getChildren () const |
| ConstConfigList | getChildren (const ConfigPredicate &predicate) const |
| const Config * | getChild (const std::string &name) const |
| ConstConfigList | getSiblings () const |
| ConstConfigList | getSiblings (const ConfigPredicate &predicate) const |
| bool | isRoot () const noexcept |
| bool | isLeaf () const noexcept |
| const std::string & | name () const noexcept |
| std::string | desc () const noexcept |
| bool | hasAttr (const std::string &name) const |
| int | numAttr () const |
| template<class T > | |
| T | getAttr (const std::string &name) const |
| template<class T > | |
| T | getAttr (const std::string &name, const T &def) const noexcept |
| std::string | getAttrAsStr (const std::string &name, const std::string &def="") const noexcept |
| int | getAttrAsInt (const std::string &name, int def=0) const |
| double | getAttrAsDbl (const std::string &name, double def=0.0) const |
| bool | getAttrAsBool (const std::string &name, bool def=false) const |
| virtual bool | isArray () const |
| virtual void | toTOML (std::ostream &out) const |
| Attrs::const_iterator | beginAttr () const |
| Attrs::const_iterator | endAttr () const |
Protected Types | |
| using | Text = std::string |
| using | Attrs = std::vector< Attr > |
| using | Children = std::vector< Config * > |
Protected Member Functions | |
| Config (const std::string &name, const std::string &desc) | |
| void | addAttr (const std::string &name, const std::string &value, const std::string &type="") |
| void | addChild (Config *child, bool allowDups=false) |
| Attrs::iterator | findAttr (const std::string &name) |
| Attrs::iterator | endAttr () |
| void | setName (const std::string &name) |
| void | setDesc (const std::string &desc) |
Protected Attributes | |
| std::string | _name |
| Text | _desc |
| Config * | _parent |
| Children | _children |
| Attrs | _attrs |
Friends | |
| class | ConfigBuilder |
class Config
A hierarchical data structure representing runtime configuration. Config is the result of parsing a file in some format supported by a config builder and resolving variable references using some chain of ConfigVariableResolvers.
Thus when a Config object arrives at a component's init it is fully specified (variable free) provided the variables could be resolved.
|
protected |
The type of container of attributes
|
protected |
The type of container of children
| using theoria::config::Config::ConfigPredicate = std::function<bool (const Config *)> |
The type used for a predicate on a Config node
| using theoria::config::Config::ConstConfigList = std::vector<const Config*> |
The type used for a list of Config nodes
|
protected |
Type of long text strings
| Config::Config | ( | ) |
Construct an empty config node (no attrs, no children)
|
virtual |
Destructor
|
protected |
Constructor initializing name and description of config node
|
protected |
Adds an attribute to this config node
| name | name of the attribute |
| value | value of the attribute |
| type | optional type of the attribute |
|
protected |
Add a child config node.
| child | the child to add |
| allowDups | true if nodes with duplicate names are allowed |
|
inline |
Return iterator over all attributes
|
inlinenoexcept |
The nodes desc.
|
inline |
Return bounding iterator past last attribute
|
inlineprotected |
End of attributes
|
inline |
Find an attribute by name
|
inlineprotected |
Find attribute
|
inline |
Get the attribute of specified name as the given type T
| std::runtime_error | if no such attribute |
| std::runtime_error | if no legal conversion possible |
|
inlinenoexcept |
Get the attribute of specified name as the given type T or def if no such attribute
| name | the name of the attribute |
| def | default value if no such attribute |
| std::run_time | error if attribute exists but can't be converted to type T |
|
inline |
Get the value of the attribute of specified name as a boolean or default if no such attribute exists
| name | the name of the attribute |
| def | the default value if name does not exist |
| std::runtime_error | if conversion to bool not possible |
|
inline |
Get the value of the attribute of specified name as a double or default if no such attribute exists
| name | the name of the attribute |
| def | the default value if name does not exist |
| std::runtime_error | if conversion to double not possible |
|
inline |
Get the value of the attribute of specified name as an int or default if no such attribute exists
| name | the name of the attribute |
| def | the default value if name does not exist |
| std::runtime_error | if conversion to int not possible |
|
inlinenoexcept |
Get the value of the attribute of specified name as a string or default if no such attribute exists
| name | the name of the attribute |
| def | default value if name does not exist This function will always return some value - never throws |
| const Config * Config::getChild | ( | const std::string & | name | ) | const |
Return child with given name.
|
inline |
Return all children in a list
| ConstConfigList Config::getChildren | ( | const ConfigPredicate & | predicate | ) | const |
Return only those children that satisfy the predicate
| predicate | bool (const Config*) |
|
inlinenoexcept |
The parent of this config node or nullptr if this is the top-level node
| ConstConfigList Config::getSiblings | ( | ) | const |
Return siblings of this node (nodes at same level other than this)
| ConstConfigList Config::getSiblings | ( | const ConfigPredicate & | predicate | ) | const |
Return siblings of this node (nodes at same level other than this) that satisfy predicate
|
inline |
Test if node has a attribute with given name
|
inline |
Test if node has children
|
virtual |
Test to descriminate between a normal Config node and a ConfigArray (arry of nodes)
Reimplemented in theoria::config::ConfigArray.
|
inlinenoexcept |
Test if this node is a leaf (no children)
|
inlinenoexcept |
Test if this node is root
|
inlinenoexcept |
The name of the node
|
inline |
The number of attributes of this node
|
inline |
Return the number of children of this node
|
inlineprotected |
Set or change attribute's desc
|
inlineprotected |
Set or change attribute's name
|
virtual |
Write the TOML (http://github.com/toml-lang/toml) to provided stream NOTE: The source format need not have been TOML to use this conversion
Reimplemented in theoria::config::ConfigArray.
|
friend |
A Config is constructed by a ConfigBuilder therefor only ConfigBuilder has ability to mutate configs.


Robot state: """ + robot_state + """
Blade: """ + blade_state + """
Speed: """ + speed_val + """
Blade: """ + str(batt_lvl) + """
Blade: """ + str(dist_covered) + """ m
Distance covered: 6.0m
99%


Sign in and get two free posts every week.
You have used all your free posts for this week.
You have {{post.freePostsRemaining === 1 ? 'one free post' : post.freePostsRemaining + ' free posts'}} remaining this week.
Posted to Live in {{post.channel.name}} {{post.liveIn}}
This post requires a subscription to {{post.channel.name}}.
The price of {{post.channel.name}} has increased. You must accept the new price to continue accessing this channel.
Sign in and get two free posts every week.
You have used all your free posts for this week.
You have {{post.freePostsRemaining === 1 ? 'one free post' : post.freePostsRemaining + ' free posts'}} remaining this week.
This is one of your free posts.
{{block.source.fileName}}.{{block.source.fileExtension}} {{block.source.fileName}}.{{block.source.fileExtension}} {{block.source.readableSize}}
⁂


Milbon Deesee's Hair Treatment is part of the Linkage Meu system, which is a quick 3-step salon treatment system whcih includes a weekly homecare component that improves the quality of hair without a greasy feel. Linkage Meu is designed to be provided as an additional service to salons' normal offering of cut, colour, blow dry, and other chemical services.
- 4+ for normal/ medium hair.
- 4X for coarse & think hair.
How to use
- Step 1: After shampoo, squeeze out excess water and apply from the ends.
- Step 2: Massage Hair
- Step 3: Rinse and Blow Dry
- Step 4: Apply once a week for 4 weeks


--- layout: page title: About header-img: "img/about-bg.png" ---
Audrey is currently a full-time student in Flatiron's online software engineering bootcamp.