David Puerto
UX Engineer / UI Designer / CSS Specialist
About Me
Over the last decade I've distinguished my career through the mastery of meaningful, interactive media design. Dedicated to creating refined, yet innovative ecosystems, I synthesize complex workflows into pattern libraries expressing the underlying design language. Experienced in web-based screen design and nimble along the modern web development tool chain; I'm as a seasoned, hands-on UX leader that delivers the highest-level of fit and finish. "I thrive on props from brainchild to launch."
Coming up in the days of Flash I was heavily immersed in interaction and time-based animation along with thinking in terms of scalability and portability. I chose Flash because at the time it was the go-to solution for cross-browser websites with 90% of computers running Flash by default. Along with vector graphics and some ActionScript, Flash was the no-brainer tool for the rich-interactive web experiences of the early and mid-2000s. With the advent of smart devices and tablets I've chosen to fall back to traditional web technologies but I still think in terms of how I can deliver the same scalable, device agnostic experience that I strove for with Flash.
Today I am looking beyond the web as design technology becomes standard in our homes and in our lives. What can I dream up that can help make everyone's lives simpler so that we spend less time hooking things up and more time enjoying the fruits of our labors? You'll see. My hopes are you'll enjoy using it too.
My Methodology
I've been a web hobbyist, enthusiast, and tinkerer for as long as I can remember. I'm all about custom home enhancement projects and I do all my own vehicle repairs and even built my own car. Design is all about identifying a problem and offering improvements. Next on the list is buy a wrecked Tesla and mate it to the Mustang Body that I dynacorned into a fastback Eleanor so that I can respect the heritage and enjoy the aesthetics. It'll happen.
Prototyping
Design in the BrowserI practice a lean style of UX, close to the metal, working alongside engineers and checking in with design teams for review as iterate over ideas by creating failing fast and filling in those pitfalls often. Prototypes allow for rapidly producing proofs of concept that are functional where UI decisions can be tested and verified. HTML serves as my information architecture, my wireframe, the place where I frame the MVP - that's why it was created. CSS and JavaScript helps craft design around technology enabling me to craft an experience by observing how it all lives together in its natural ecosystem. Oftentimes we make discoveries early on in our prototyping that lend to a better overall user experience and becomes a creative solution we otherwise may have missed designing a static document, especially when designing for big data problems where we might need to test 100 columns and 100000 rows of data. You cannot mock that up in static design software. You can't. You wouldn't even try. Right tool for the right job.
Visual Design
Design Implementation
This is where I get my hands dirty and put it all together with HTML5 and CSS3, the gold standard for web design. Being able to demonstrate how the end product should look and feel also lends the added benefit of helping out with engineering and hopefully carrying over into a harmonious work environment. Oftentimes there are things that I can do with CSS that would typically take hundreds of lines of a classical programming language to accomplish and when I can be an asset to engineering and get applause for a clever solution that saves lots of engineering overhead I feel great satisfaction.


Gophers: a multispecies coalescent model consisting of 8 species, 27 taxa, and 3 gene trees, using the Gopher data from Belfiore et al. 2008. There are 361 species/gene tree samples from the posterior distribution.
Belfiore, N. M., Liu, L., and Moritz, C. (2008). Multilocus phylogenetics of a rapid radiation in the genus thomomys (rodentia: Geomyidae). Systematic Biology, 57(2), 294–310.
Simulated: a moderate sized test session simulated using BEAST2. This multispecies coalescent model consists of 20 species, 60 taxa, and 100 gene trees.
Bouckaert, Remco, et al. "BEAST 2.5: An advanced software platform for Bayesian evolutionary analysis." PLoS computational biology 15.4 (2019): e1006650.
A large number of gene trees have been detected. Use the up/down arrows below to cycle through gene trees. Open the 'Gene trees' top menu for advanced options.


--- title: About description: Dana Yakoobinsky's Bad Baby Bakery Blog social: name: Dana Yakoobinsky links: - https://www.facebook.com/dana.yakoobinsky - https://instagram.com/swtlifeofdana/ ---
A little about me... I started baking in high school to make sweet treats for my friends on their birthdays. In the beginning it was just an occasional fun thing to do. When I got to college, I made a friend who was also into baking and we would have regular cupcake baking sessions (we only accidentally lit something on fire once or twice). I started getting more and more into baking and experimenting with different flavors and techniques. Eventually, I graduated to other types of baked goodies - even though cupcakes will always hold a spot in my heart. Today, I work full time as a software engineer but seem to bake full time too... Unclear how that works out. Here, I share some of my experiments! Hope you enjoy these recipes, and if you have any questions, please feel free to message me through the contact form.
Thanks for stopping by!
Dana


Submitted Patches
[[${session.loginUsername}]]
Pathes
[[${map.ipfsHash}]]
Name:
[[${map.patchName}]]
Submit Date:
[[${map.releaseDate}]]
Score:
[[${map.score}]]
View
Patch Information
[[${map.patchName}]]
Patch Publisher:
[[${map.username}]]
Patch Hash:
[[${map.ipfsHash}]]
Vulnerability Hash:
[[${map.vulnerabilityHash}]]
Patch Submit Date:
[[${map.releaseDate}]]
Star:
[[${map.star}]]
Score:
[[${map.score}]]
Patch Description:
Download


KEDU!
Free
$0. 00 trial
- Try for one month.
- Cancel anytime.
- Full package excluded.
- Integrate with your system.
- Live support not included.
Basic
$199. 99 monthly
- Covers a team of up to 10.
- Live support included.
- Software update included.
- Free onboarding tutorials.
- 24 hours customer support.
Medium
$399. 99 monthly
- Covers a team of up to 25.
- Live support included.
- Software update customizable.
- Free update tutorials.
- 24 hours support.
Premium
$799. 99 monthly
- Covers a team more than 25.
- Priority support provided.
- Software re-customizable.
- Participation in trade fair.
- 24 hours support.


Linux Samba
#!/bin/sh
#Author: rewardone
#Description:
# Requires root or enough permissions to use tcpdump
# Will listen for the first 8 packets of a null login
# and grab the SMB Version
#Notes:
# Will sometimes not capture or will print multiple
# lines. May need to run a second time for success.
if [ -z $1 ]; then echo "Usage: ./smbver.sh RHOST {RPORT}" && exit; else rhost=$1; fi
if [ ! -z $2 ]; then rport=$2; else rport=139; fi
tcpdump -s0 -n -i tap0 src $rhost and port $rport -A -c 10 2>/dev/null | grep -i "samba\|s.a.m" | tr -d '.' | grep -oP 'UnixSamba.*[0-9a-z]' | tr -d '\n' & echo -n "$rhost: " &
echo "exit" | smbclient -L $rhost 1>/dev/null 2>/dev/null
echo "" && sleep .1
Wireshark should be able to discern dialect: https://wiki.wireshark.org/SMB2
Though this may be authenticated sessions only


acl acl2010 acl2010-36 acl2010-36-reference knowledge-graph by maker-knowledge-mining
Source: pdf
Author: Jian-Cheng Wu ; Yu-Chia Chang ; Teruko Mitamura ; Jason S. Chang
Abstract: In recent years, collocation has been widely acknowledged as an essential characteristic to distinguish native speakers from non-native speakers. Research on academic writing has also shown that collocations are not only common but serve a particularly important discourse function within the academic community. In our study, we propose a machine learning approach to implementing an online collocation writing assistant. We use a data-driven classifier to provide collocation suggestions to improve word choices, based on the result of classifica- tion. The system generates and ranks suggestions to assist learners’ collocation usages in their academic writing with satisfactory results. 1


--- layout: archive title: Zulip Chat Archive permalink: /stream/113488-general/topic/caching.20proofs.html ---
So I'm moving it here.
Thanks.
Yes, that second pass is just unavoidably slow.
So I'm fine if Travis does that, and I never do it.
But I think there's still useful information for the user in seeing the first pass succeed.
Or almost never...
Yes.
What exactly are you guys referring to when you say “proof cache”?
The point of course is to get back as quickly as possible to responsive editing.
 :-)
Of course, olean files _are_ a proof cache.
So the idea might be merely this:
if Lean notices that an olean file is outdated (i.e. the source file, or a dependency source file, is newer)
Do you know about https://github.com/leanprover/lean/issues/1601? Fixing this issue is part of the Lean 4 plan ifI understand correctly
before disposing of the olean file it loads it one last time
and tries to use existing proofs for the current set of lemmas, ignoring on the first pass the actual proof term written in the source file (whether generated in term or tactic mode)
but of course eventually there does have to be a second pass that reverifies what the user has written and constructs a new olean.
 :-)
Q1 What's "offline"? Q2 why can't you write code offline? What is interactive mode?
I think "offline" here means: Writing code without Lean responding to what you write. (Just using your internal elaborater/kernel to verify your own code.)
eew.
In particular @Simon Hudon appears to have written working code for me without ever running Lean...!
(Sometimes I've been able to tell because of some minor typo, meaning it just barely missed actually compiling. :-)
In Orsay I witnessed Mario writing half a proof while Lean was thinking. He didn't need to go back and change those 5 lines after Lean caught up with him.
It's terrifying, isn't it?  :-)
I don't use interactive mode, so I just see walls of errors, not yellow bars.
I don't use interactive mode, so I just see walls of errors, not yellow bars.
Wait... do you mean that you write Lean the way I would write C or Python?
Edit file → Save → Compile/run the file in terminal → Parse errors → Go back to step 1
Well... presumably he doesn't actually ever execute any code.
Yep.
Well, Sean might, actually. :-)
:big_smile:
Aaahrg... :scream: you guys are really crazy...
Anyway, I'm not sure if it's the same problem as in interactive mode: I'd like to speed up lean --make
.
So, it would be nice if I had all of the generated proof terms for, say, mathlib. So, if I make one change, lean
doesn't have to recheck entire files.
I guess it is the same bottleneck that we are hitting.
On the other hand, as Scott said, one small change can change tactics. But I think that should be checked at “release” time.
... as opposed to “interactive” time.
So, at the very least, I know proof works. But I may need to go back and check a tactic somewhere afterwards.
I envision it like having a --fast
mode and a --release
mode. Names up for debate.
We already have trust levels...
Or --fast
and --full
to use alliteration.
How do trust levels come into the picture here?
Well, you are putting "trust" in the cache, right?
I could envision a new trust level, that will trust cached proofs.
Does that make sense?
Perhaps. I don't have a clear picture of what that means.
I'm not thinking of trust. I'm thinking of checking only what changed within a single file (to simplify the problem).
Here's something that doesn't work for all changes, but might work for some: run a quick pass over the interfaces of a file's cached proof terms, check if they differ from the source file, build the ones that differ or are not found in the cache.
After that, perhaps you could more lazily regenerate the other proof terms of the file.
Also, perhaps the generated proof cache could keep track of failed proofs and Lean would try to rebuild those first.
That might improve interactive responsiveness.
I wouldn't mind if Lean did low-priority (in the sense of CPU scheduler) checks to see if my new @[simp]
lemma broke a proof by tidy
in some files that I didn't have open. But as soon as I make a change in my file the --fast
Lean should do a high-priority check to get me back to responsive editing as soon as possible.
Yeah, that's the idea, though I was actually thinking --fast
wouldn't even try to check the effect of @[simp]
lemmas or other things that change how tactics work. But I could see it going either way.
Do you know about https://github.com/leanprover/lean/issues/1601? Fixing this issue is part of the Lean 4 plan ifI understand correctly
That definitely looks relevant! Thanks @Patrick Massot
Here are two possibilities:
1. An interactive mode that optimizes for checking work-in-progress proofs and reduces the priority of full-file and full-library builds.
2. A fast mode that only checks for work-in-progress proofs and builds a single file at a time and a full mode that builds everything.
@Sean Leather Isn't that already what the ideas do? I feel like lean-mode does it at least.
@Scott Morrison I do use the interactive modes but sometimes I'm too lazy to go back to emacs to write my code snippets. I'm glad I don't have too bad a track record :)
Isn't that already what the ideas do? I feel like lean-mode does it at least.
@Simon Hudon What are “the ideas”?
I don't know exactly what does what, so I'm just throwing out some thoughts. I do know that if I make a change in a large file in mathlib and build with lean --make
, I see that the entire file has to be built before it gets to my change. That's what I would propose improving.
As I said above, I don't use the interactive approach, and I don't know if the problem I have is the same problem others are discussing.
I misspelled IDE
So what is your workflow like if you don't use them?
Edit in vim
, run leanpkg build
.
That sounds painful
:shrug: Works well for me.
I print the files out, cross out some lines in pencil and add others in, then compile in my head.
that's how we did it in the old days before computers
How did you print files without computers? :computer: :right: :printer:
I use my typewriter
Oh, they usually refer to that as typing, not printing, right?
He has a printing press à la Gutenberg in his cellar (-;
I guess they call it that nowadays.
Amateurs. Here's my workflow: https://xkcd.com/378/
C-x M-c M-butterfly
@Sean Leather I think this is a case in which, before you see what you're missing out on, you don't know that you're missing out. I find it incredibly useful when writing tactic that, as I type and change my scripts, I can see the print out of the example I'm using the tactic on. That save a whole lot of time
{% endraw %}Last updated: Apr 24 2020 at 19:02 UTC


An easy as pie jekyll plug-in for creating bibliographic references the Linked Research way
Abstract
Linked Research is the new black. A paper written in PDF is so last century. With Linked Research, you can create much richer references to other articles, which this plug-in is intended for.
Afraid that your references won't be indexed by the common crawlers today? No worries, thanks to the fact that we just print normal references anyway, this should not be a problem. However, the crawlers really should learn how to use Linked Data, and the more of us that will start annotating or papers with Linked Data the more this will start happening.
Introduction
Jekyll is a static site generator. It allows you to program a couple of rules in order to generate your HTML pages.
Bibliographic references in [RDFa](https://en.wikipedia.org/wiki/RDFa) using the [cito vocabulary](http:/purl.org/spar/cito/) and the [bibo ontology](http://purl.org/ontology/bibo/)
This makes sure you can write papers, blog posts or books in HTML using jekyll to generate the references for you by describing the references once in a [JSON-LD](http://json-ld.org) file.
Related work
This related work also tries to take Linked Research to the next level:How it works
See the README.md on our github repository to see it in action.
Conclusion
We can now have references that work on the web with a similar convenience to the latex workflow. e.g., check out us citing the {% sc citesAsAuthority https://tools.ietf.org/html/rfc4180 %}csv spec{% ec %}.


Effective date: January 09, 2019
Gradebook ("us", "we", or "our") operates the Gradebook mobile application (the "Service").
This page informs you of our policies regarding the collection, use, and disclosure of personal data when you use our Service and the choices you have associated with that data. Our Privacy Policy for Gradebook is based on the Free Privacy Policy Template Website.
We use your data to provide and improve the Service. By using the Service, you agree to the collection and use of information in accordance with this policy. Unless otherwise defined in this Privacy Policy, terms used in this Privacy Policy have the same meanings as in our Terms and Conditions.
We collect several different types of information for various purposes to provide and improve our Service to you.
Personal Data
While using our Service, we may ask you to provide us with certain personally identifiable information that can be used to contact or identify you ("Personal Data"). Personally identifiable information may include, but is not limited to: cookies.
Usage Data
When you access the Service by or through a mobile device, we may collect certain information automatically, including, but not limited to, the type of mobile device you use, your mobile device unique ID, the IP address of your mobile device, your mobile operating system, the type of mobile Internet browser you use, unique device identifiers and other diagnostic data ("Usage Data").
Tracking & Cookies Data
We use cookies and similar tracking technologies to track the activity on our Service and hold certain information.
Cookies are files with small amount of data which may include an anonymous unique identifier. Cookies are sent to your browser from a website and stored on your device. Tracking technologies also used are beacons, tags, and scripts to collect and track information and to improve and analyze our Service.
You can instruct your browser to refuse all cookies or to indicate when a cookie is being sent. However, if you do not accept cookies, you may not be able to use some portions of our Service.
Examples of Cookies we use:
Session Cookies. We use Session Cookies to operate our Service.
Preference Cookies. We use Preference Cookies to remember your preferences and various settings.
Security Cookies. We use Security Cookies for security purposes.
Gradebook uses the collected data for various purposes:
To provide and maintain the Service
To notify you about changes to our Service
To allow you to participate in interactive features of our Service when you choose to do so
To provide customer care and support
To provide analysis or valuable information so that we can improve the Service
To monitor the usage of the Service
To detect, prevent and address technical issues
Your information, including Personal Data, may be transferred to — and maintained on — computers located outside of your state, province, country or other governmental jurisdiction where the data protection laws may differ than those from your jurisdiction.
If you are located outside United States and choose to provide information to us, please note that we transfer the data, including Personal Data, to United States and process it there.
Your consent to this Privacy Policy followed by your submission of such information represents your agreement to that transfer.
Gradebook will take all steps reasonably necessary to ensure that your data is treated securely and in accordance with this Privacy Policy and no transfer of your Personal Data will take place to an organization or a country unless there are adequate controls in place including the security of your data and other personal information.
Gradebook may disclose your Personal Data in the good faith belief that such action is necessary to:
To comply with a legal obligation
To protect and defend the rights or property of Gradebook
To prevent or investigate possible wrongdoing in connection with the Service
To protect the personal safety of users of the Service or the public
To protect against legal liability
The security of your data is important to us, but remember that no method of transmission over the Internet, or method of electronic storage is 100% secure. While we strive to use commercially acceptable means to protect your Personal Data, we cannot guarantee its absolute security.
We may employ third party companies and individuals to facilitate our Service ("Service Providers"), to provide the Service on our behalf, to perform Service-related services or to assist us in analyzing how our Service is used. These third parties have access to your Personal Data only to perform these tasks on our behalf and are obligated not to disclose or use it for any other purpose.
Our Service may contain links to other sites that are not operated by us. If you click on a third party link, you will be directed to that third party's site. We strongly advise you to review the Privacy Policy of every site you visit. We have no control over and assume no responsibility for the content, privacy policies or practices of any third party sites or services.
We are committed to protecting the privacy of children who use our sites and applications. The context and purpose of Gradebook is in a secondary educational setting; most users are under the age of 18. Thus, we take the privacy of minor users very seriously.
We limit collection of personal information from children to no more than is reasonably necessary for the function our applications
Most collected data is held ephemerally, only for the duration at which the user is using the data
We provide our users the ability to, at any time, effectively and permanently delete their personally identifiable data from our services.
We may update our Privacy Policy from time to time. We will notify you of any changes by posting the new Privacy Policy on this page.
We will let you know via email and/or a prominent notice on our Service, prior to the change becoming effective and update the "effective date" at the top of this Privacy Policy.
You are advised to review this Privacy Policy periodically for any changes. Changes to this Privacy Policy are effective when they are posted on this page.
If you have any questions about this Privacy Policy, please contact us by visiting this page on our website: https://goo.gl/forms/mvqfiryCfjJGrZ5u2


'Twas in the year 1983 I spent Christmas in Manchester with the ex-Mrs Key's sister and her husband, a Mexican anthropologist with a particular interest in textiles. We were all young and achingly right-on in a very 1980s way, which is why we thought very carefully before buying our Christmas crackers. Not for us the crass commercialism of the masses with their false consciousness and weird tendency to vote for the hated Thatcher. No, we would make the purchase of crackers a political gesture. We bought them from CND.
Oh how we failed to laugh around the Christmas dinner table as we pulled our ideologically sound crackers. Out fell the expected paper hat and printed slip—and on the latter, there was not a terrible and groanworthy joke, but a sobering fact about nuclear weapons and the inevitable worldwide holocaust they would cause. We donned our paper hats and read out these visions of mass destruction, smug in our righteousness. Then we ate and drank our fill and had precisely the same kind of Christmas as the lumpenproletariat we so despised.


Please, no beef here: Cut out beef, or even better, go full vegetarian
As delicious as a nice juicy hamburger tastes at a summer barbeque, helping out your black-and-white-spotted friends by reducing or fully eliminating your beef consumption can drastically reduce the size of your environmental footprint. The cattle industry is an environmental disaster. Eighty percent of deforestation in the Amazon rainforest has been linked to clearing land for cattle ranching, and cattle ranches use millions of pounds of dangerous pesticides and fertilizers for maintenance. Organically, cattle release methaneーa greenhouse gas twenty-five times stronger than carbon dioxideーwhen they burp or fart, generating about twenty percent of US methane emissions and exacerbating the inset of climate change as cattle production increases. Other types of meat, such as pork and chicken, have their own negative, although less severe, environmental impacts, so cutting out all forms of meat is a great way to go green.
UNPLUG outlets when you aren’t using them or buy a powerstrip
Even when your iPhone is not plugged in or charging, your charger is still pulling (and wasting) electricity from the energy grid. Unplug your charger or other outlets when you are not using them to save money on your utility bills and reduce energy waste. Buying a powerstrip and plugging all of your outlets into the strip is an easier solution to the same problem. Simply flip the switch on the powerstrip in the “off” direction when you are not using your electronic accessories to cut energy use.
DITCH any and all single-use plastic and paper you can and think REUSABLE
When the cashier at the grocery store asks if you want paper or plastic, the answer is neither. As much as single-use plastic bags should be avoided (and as bad as they are for the environment in terms of ocean and land pollution), per bag, single-use paper bags actually have a higher environmental footprint. Unlike plastic, a positive to paper bags is that they are biodegradable. However, paper bags require a lot more energy to produce than plastic. In theory, if everyone replaced their use of plastic bags with paper bags, greenhouse gas emissions would increase. Therefore, simply not asking for a bag or bringing a reusable bag are better solutions.
Many eco-friendly consumers have resorted to cloth bags to decrease their use of plastic bags, but given the amount of energy required to produce a cloth bag, you would have to use the cloth bag 131 times before it was better for the planet to use than single-use plastic. Those ten cent reusable plastic bags you can buy at the grocery store are a great answer to a complicated issue.
Little story: When I, Sophia, volunteered with my brother and dad to package groceries at Shoprite and raise money for a halfway house, it was astonishing how many plastic bags we used. Eggs took up their own plastic bag. Some had to be doubled. Meanwhile, the customers who came with their own bags I thought they were cool and trendy!  So be cool and use your own bags.
Two simple steps: Recycle and start composting
Recycling and composting are great community-centric ways to reduce the amount of waste sent to landfills, limit individual wastefulness, and help out the planet in an easy way. However, be sure to look into your town’s recycling policies, as they all have different rules about what materials can and cannot be recycled. Also, be sure to clean out whatever you are recycling, such as an empty yogurt container, by rinsing it out with water. Materials cannot be recycled if they are not clean!
LIGHTS OFF: Turn off the lights when you leave the room
It is easy. It saves you money. It saves energy. Maybe even make it into a competition with roommates and yell at them whenever they forget to turn off the lights. You will find yourself turning into your dad in no time.
Spread the WORD to help the WORLD
A psychological study has proven that the greatest motivator for getting households to reduce energy consumption is not the potential for financial savings or moral guilt, but social pressure. Neighbors can influence neighbors. One may be paying lower energy bills each month and the domino effect begins. Neighbors see the environmental benefits to not feel good about yourself but feel good about what you’re doing to help everyone else and they soon install reduced energy appliances. The same psychology applies to broader lifestyle changes to be more eco-friendly. If you take action to reduce your environmental footprint by going vegetarian or recycling, tell your friends and family about it, and maybe they will join you!
Sources:
Reach out to share your reccomendations!


Puppet Class: mcollective::defaults
- Inherited by:
-
mcollective
- Defined in:
- manifests/defaults.pp
Overview
private class This class is for setting the few platform defaults that need branching; all other configuration should be defaulted using the class paramaters to the mcollective class. Never refer to $mcollective::defaults::foo values outside of a parameter list, it's leak and prevents users from actually having control.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'manifests/defaults.pp', line 7
class mcollective::defaults {
if versioncmp($::puppetversion, '4') < 0 {
$confdir = '/etc/mcollective'
$_core_libdir = $::osfamily ? {
'Debian' => '/usr/share/mcollective/plugins',
'OpenBSD' => '/usr/local/libexec/mcollective',
default => '/usr/libexec/mcollective',
}
# Where this module will sync file-managed plugins to.
# These paths may need revisiting by someone who understands FHS and
# distribution standards for site-specific application-specific
# library paths.
$site_libdir = $::osfamily ? {
'Debian' => '/usr/local/share/mcollective',
'OpenBSD' => regsubst($::rubyversion, '^(\d+)\.(\d+)\.(\d+)$', '/usr/local/lib/ruby/vendor_ruby/\1.\2/mcollective'),
default => '/usr/local/libexec/mcollective',
}
} else {
$confdir = '/etc/puppetlabs/mcollective'
$_core_libdir = '/opt/puppetlabs/mcollective/plugins'
$site_libdir = '/opt/puppetlabs/mcollective'
}
# Since mcollective version 2.8, there is no core libdir
# https://docs.puppetlabs.com/mcollective/releasenotes.html#libdirloadpath-changes-and-core-plugins
$mco_assumed_version = '2.8.5'
$_mco_version = defined('$mco_version') ? {
true => $::mco_version,
default => $mco_assumed_version,
}
if versioncmp($_mco_version, '2.8') >= 0 {
$core_libdir = undef
} else {
$core_libdir = $_core_libdir
}
if ($::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease, '14.10') <= 0){
$server_daemonize = false # See https://tickets.puppetlabs.com/browse/MCO-167
} else {
$server_daemonize = true
}
if defined('$is_pe') and str2bool($::is_pe) {
$ruby_interpreter = '/opt/puppet/bin/ruby'
} else {
case $::operatingsystem {
'OpenBSD': {
$ruby_interpreter = regsubst($::rubyversion, '^(\d+)\.(\d+)\.(\d+)$', '/usr/local/bin/ruby\1\2')
}
default: {
$ruby_interpreter = '/usr/bin/env ruby'
}
}
}
}
|


Leveling Up
2015.10.12Oh the Whirlwind…
Since my last post I think it’s fair to say that I have Leveled Up, both in Ruby and in Rails.
Leveling Up Rails with TDD
Since my last post I have been working on a new App, the catch is that this one is being built from the ground up with Test Driven Development practice of writing the tests first and then coding the feature. This makes incremental changes less likely to break any necessary features, it also seems to increase the time it takes to build anything by orders of magnitude.
Granted, the first set of features took the longest to build the tests for first, by the second and third I was starting to get the hang of it. Still, the essential process is 1) Build tests that fail because the feature isn’t built yet. 2) Build out the feature until the tests pass. Generally speaking this includes multiple Assertions per test to account for facets of the feature in question, such that as the feature is built in stages, the test for that feature goes from Failing, to Erring on successive Assertions, to passing all Assertions, at which point the feature SHOULD be built as designed.
By the third set of Tests/Build-outs I was really starting to feel comfortable with the process. I know I have a lot to learn, but going from building apps haphazardly to building with TDD seems like a solid case of Leveling Up. That was my Rails breakthrough.
Leveling Up Ruby with Coding Challenges
I also successfully completed about 3 dozen CodeWars Kata. I think technically that has me Leveled up twice… I went from 8kyu to 6kyu… I have that much-coveted score of “69” … SO not kidding. Yeah moving on. What a brilliant learning tool! Form of a game, form of a challenge, form of a competition… however you take it, CodeWars can help anyone Level Up their programming skills… I was working in Ruby but they also have Clojure, CoffeeScript, C#, Haskell, Java, JavaScript and Python. I am considering myself well-informed at this moment because I have at least HEARD of the majority of those languages. Yikes. This is what I get for dropping out of programming for two and a half decades. I have a WEE bit of catching up to do. Thankfully CodeWars can help!
In the meantime I also completed a coding challenge in FHP that certainly WAS a challenge. I beat my head against the wall for hours at a time for two days and then in the wee hours of the morning when I should have been sleeping a new approach occurred to me and sure enough on day three I was able to tackle the challenge from a different direction. The change in perspective allowed me to solve the problem that had me pulling my hair out for two days. This harkens back to my days working at the Center for Creative Learning and some of the techniques I encountered there. Essentially, if you can’t get in the front door, try climbing in a window around the side. But I feel pretty strongly that I Leveled Up my Ruby capabilities along the way.
I am finding that breakthroughs in skill level tend to follow shortly on the heels of feeling frustrated to the breaking point, and/or beating my head against a brick wall. I take my skills as far as they can go and then I have to Level Up in order to progress further, unlocking both capacity and potential in the process. There is a distinctive feeling of that “click”… the intangible sensation that pieces of the puzzle have just moved into place and the picture has become more clear. It is a good feeling. Gives me just the right surge of energy to start tackling the next level.
~AMP


Abstract
Secure coding practices prescribe to use RSA to generate key pairs.
Description
Asymmetric encryption requires a pair of keys, a private and a public key. This enables authenticity on top of confidentiality in the encryption algorithm. Authenticity is a requirement for some secure communication channels. That means that asymmetric cryptography is typically used in a scheme for signatures or a key agreement and not for bulk encryption of data.
It is recommended to use RSA for key pair generation.
Correct code example:
keyPairGenerator = KeyPairGenerator.getInstance("RSA");;
Violating this guideline can cause
Mobile vulnerabilities
- Broken Cryptography - Use Of Insecure/Deprecated Algorithms. Learn more
Web vulnerabilities
- Insecure Cryptography - Weak Algorithm Use. Learn more
Sensei quick fix
Use the Sensei® Quick Fix technology: Hit {{{ qfshortcut }}} to fix this guideline violation automatically.


This is Words and Buttons Online — a collection of interactive #tutorials, #demos, and #quizzes about #mathematics, #algorithms and #programming.
Previously we only talked about Bézier-like spline interpolation and a special case of local quadratic splines, which is essentially an interpolation as well.
Interpolation is simple. You set some control points and you expect a curve to run through all of them. It is intuitive. But it is also limiting. What if you want to control a curve between the control points? What if you want some points to denote a sharp angle and some not? What if you want some points to attract a curve more than the other?
NURBS is one way to answer these questions. Basis spline that is non-uniform and rational.
NURBS = Non
Uniform
Rational
Basis
Spline
Let's go through these concept one in a time.
The idea here is: for each parameter t we can get a pair of (x, y), that will form a nice continuous curve, by mixing our control points in different proportions determined by some function of t. For the basis spline, these proportions are determined by the basis polynomials of a certain degree.
Just like with the polynomial interpolation, you need a certain amount of points to set a polynomial. 2 points for linear, 3 for quadratic, 4 for cubic, etc. This means that if we have 5 control points, and we want to turn them into a piecewise polynomial function, we should expect a 4-piece piecewise linear, 3-piece piecewise quadratic, 2-piece piecewise cubic, or a single polynomial of a degree 4.
Here is the example or NURBS-curve built by de Boor's algorithm. You can select the basis polynomial degree, and you can move control points around as well. For now, it consists of parametrically equal pieces, each one having its own color. The higher the degree — the shorter the curve you get. It's ok, you get fewer basis polynomials — ergo fewer pieces, and we keep them equal for now.
The very basic input for NURBS is a set of control points and a basis polynomial degree. But that's not all.
Having equal parametric pieces may not always be the best. That's why we need our spline to be non-uniform. Being able to select how long we want our pieces to be, and where to start, and where to end, — it all adds another level of control.
Here is the same spline, but beneath it, there is a rainbow stripe. Every color represents a parametric piece. You can drag them left and right to change their lengths.
The input for a NURBS therefore also consists of a knot vector. Every knot is a number in parametric space. As you can see, there are usually more knots than the control points because the higher the degree of basis polynomials, the more knots affect every single piece. Even invisible pieces of the stripe affect the visible pieces of the spline.
This may be tricky if you are not familiar with the concept of homogeneous coordinates. Long story short, there is a less popular way to denote points on a plane. Usually, we do it like this:
P = (x, y)
But we may as well add a third coordinate keeping a correspondence between the two by dividing the first two by the third. That's where the rational spline comes from.
P = (xh, yh, wh)
x = xh / wh
y = yh / wh
Not getting into the rationale for that in the general case, for us this affects the polynomial weighting scheme in a rather pragmatic way. The points with greater w “attract” the curve more. This is yet again another way to control our output.
These are the weights of points. You can drag them up and down.
Of course, you don't see this, but under the hood, the points' x and
wh: (x, y) = (xhwh, yhwh, wh).
This completes the input for NURBS.
To build a NURBS curve you need:
But why bother? Why do we need all this control? What's wrong with simple Bézier splines?
For one, you can't do this with Bézier:
This is a real circle, not a model. The NURBS recipe is:
degree = 2; xs = [1, √2/2, 0, -√2/2, -1, -√2/2, 0, √2/2, 1] ys = [0, √2/2, 1, √2/2, 0, -√2/2, -1, -√2/2, 0] ws = [1, √2/2, 1, √2/2, 1, √2/2, 1, √2/2, 1] knots = [0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 4]
Ok, I also had to scale and translate it to make it bigger and fit a plot canvas nicer. But that's irrelevant. What is important, with NURBS you can do analytical curves: lines, circles, conics, etc. And, of course, you can do Bézier curves as well. You don't need special kinds of objects for all that, they all play by the same rules, they all are representable with knots and points.
That's why NURBS are so popular in CAD systems. Not because they are complicated, but because they make computational geometry simpler.
All the source code for this site is available on GitHub. This particular page is: https://github.com/.../pages/nurbs_is_just_an_acronym.html. If you want to play with NURBS more extensively than this page allows you, please do.
| Index #mathematics #tutorials | ← there's more. |
+
So You Think You Know C (free book) + Geometry for Programmers (paid book) + Github & RSS |


title = "Employer Incentive Programs" url = "/employers/incentives" layout = "default" is_hidden = 0 child_of = "default" hide_crumb = 0 crumb_title = "Incentives" remove_crumb_trail = 0 crumb_disabled = 0 ==
As an employer you are eligible for a number of incentive programs for working with a former felon. Your business may qualify for tax credits, our clients are fully bondable at no cost to you, and there are new grants to help pay for on-the-job training. Additionally, many of our clients are WorkREADY! Certified, meaning they come ready with the knowledge, skills, and abilities needed to fulfil your candidacy requirements.
The Work Opportunity Tax Credit (WOTC) provides tax relief to employers who hire full-time, part-time or temporary employees from specifically targeted groups that have employment barriers.
Read details below to learn more about WOTC.
The Federal Bonding Program (FBP) provides important support for justice-involved individuals and other challenged job seekers, helping them secure employment and stay employed. Learn about this and other strategies which help protect your assets and improve employment outcomes.
Read details below to learn more about FBP.
Are you in the process of growing your business and looking for employees who are dedicated, committed, and enthusiastic? How do bonded employees – at no cost to you – sound? Through your state and local workforce system, you can gain access to individuals who are ready and eager to go to work, and through the Federal Bonding Program – an initiative that provides $5000 worth of fidelity bond coverage for the first six months of employment for a select group of employees – you can meet your hiring requirements and protect your assets. Here’s how it works.
Request your bond {% if user %} Read more {% endif %}
The Workforce Innovation Fund (WIF) in an on-the-job training program that provides reimbursement to employers who train new hires.
Eligible job seekers will have a team to support their career goals. The support is specific to the jobseeker's needs and goals but is an added benefit to ensure success on the job.
Read details below to learn more about FBP.
Up to $7,200 in training funds reimbursed to employers for each eligible new hire
Employers will be reimbursed 50% on new hires wages during training
OJT Participants receive training for up to 24 weeks


| default_fonts {gt} | R Documentation |
The vector of fonts given by default_fonts()
should be used with a gt
table that is rendered to HTML. We can specify additional fonts to use but
this default set should be placed after that to act as fallbacks. This is
useful when specifying font
values in the cell_text()
function (itself
used in the tab_style()
function). If using opt_table_font()
(which also
has a font
argument) we probably don't need to specify this vector of fonts
since it is handled by its add
option (which is TRUE
by default).
default_fonts()
A character vector of font names.
7-23
Other Helper Functions:
adjust_luminance()
,
cell_borders()
,
cell_fill()
,
cell_text()
,
cells_body()
,
cells_column_labels()
,
cells_column_spanners()
,
cells_footnotes()
,
cells_grand_summary()
,
cells_row_groups()
,
cells_source_notes()
,
cells_stub_grand_summary()
,
cells_stub_summary()
,
cells_stubhead()
,
cells_stub()
,
cells_summary()
,
cells_title()
,
currency()
,
escape_latex()
,
google_font()
,
gt_latex_dependencies()
,
html()
,
md()
,
pct()
,
px()
,
random_id()
# Use `exibble` to create a gt table; # attempting to modify the fonts used # for the `time` column is much safer # if `default_fonts()` is appended to # the end of the `font` listing in the # `cell_text()` call (the "Comic Sansa" # and "Menloa" fonts don't exist, but, # we'll get the first available font # from the `default_fonts()` set) tab_1 <- exibble %>% dplyr::select(char, time) %>% gt() %>% tab_style( style = cell_text( font = c( "Comic Sansa", "Menloa", default_fonts() ) ), locations = cells_body(columns = time) )


So how to generate such a beautiful fractal? In short:
for every pixel, iterate znew =
zold² + c on the complex plane until it leaves the circle
around the origin with radius 2. The number of iterations it the
color of the pixel.
The screen will be representing a part of the complex plane, inside the circle with radius 2 around the origin. For a pixel, the x coordinate will represent the real part of it's complex coordinates, and the y coordinate will be the imaginary part.
For a julia set, for each pixel apply an iterated complex
function. This function is newz = oldz² + c, with z and c both
being complex numbers. Z is initially the coordinates of the pixel,
and will then constantly be updated through every iteration: each
iteration, the "newz" of the previous iteration is now used as
"oldz".
If you keep iterating this function, depending on the initial
condition (the pixel), z will either go to infinity, or remain in
the circle with radius 2 around the origin of the complex plane
forever. The points that remain in the circle forever, are the ones
that belong to the Julia Set. So keep iterating the function until
the distance of z to the origin (0,0) is greater than 2. Also give
a maximum number of iterations, for example 256, or the computer
would be stuck in an endless loop.
The color value of the pixel will then become the number of
times we had to iterate the function before the distance of z to
the origin got larger than 2. The constant c in the formula can be
anything really, as long as it's also inside the circle with radius
2. Different values of c give different Julia Sets. Some Julia Sets
are connected, others aren't. The Mandelbrot Set is the collection
of all points c that generate a connected Julia
Set.
First, you can choose a constant c for the function, which one
you choose will determinate the shape of the fractal. Let's take c
= (-0.5,0.5) in this example, so -0.5 is the real part and 0.5 the
imaginary part.
Imagine we're currently calculating the color of pixel (256,192) on a 256*256 screen. First, we transform the coordinates so it lies between -1 and 1 (if you zoom or move around in the fractal a different transformation is required): the coordinates become (1,0.5) so p = 1 + 0.5i.
Now we apply the function for the first time:
z = p² + cSo z = (0.25,1.5), and the distance of z to the origin =
sqrt(0.25*0.25 + 1.5*1.5) = 1.52069... is still smaller than
2.
Now you take this calculated z and put it in the function again
to calculate the next z, so now we get
The more iterations, the more detailed the Julia set will look
when zooming in deeply, but the more calculations are needed. The
higher the precision of the numbers, the longer you can zoom in
without encountering blocky pixels.
int main(int argc, char *argv[])
{
screen(400, 300, 0, "Julia Set"); //make larger to see more detail!
//each iteration, it calculates: new = old*old + c, where c is a constant and old starts at current pixel
double cRe, cIm; //real and imaginary part of the constant c, determinate shape of the Julia Set
double newRe, newIm, oldRe, oldIm; //real and imaginary parts of new and old
double zoom = 1, moveX = 0, moveY = 0; //you can change these to zoom and change position
ColorRGB color; //the RGB color value for the pixel
int maxIterations = 300; //after how much iterations the function should stop
//pick some values for the constant c, this determines the shape of the Julia Set
cRe = -0.7;
cIm = 0.27015;
//loop through every pixel
for(int x = 0; x < w; x++)
for(int y = 0; y < h; y++)
{
//calculate the initial real and imaginary part of z, based on the pixel location and zoom and position values
newRe = 1.5 * (x - w / 2) / (0.5 * zoom * w) + moveX;
newIm = (y - h / 2) / (0.5 * zoom * h) + moveY;
//i will represent the number of iterations
int i;
//start the iteration process
for(i = 0; i < maxIterations; i++)
{
//remember value of previous iteration
oldRe = newRe;
oldIm = newIm;
//the actual iteration, the real and imaginary part are calculated
newRe = oldRe * oldRe - oldIm * oldIm + cRe;
newIm = 2 * oldRe * oldIm + cIm;
//if the point is outside the circle with radius 2: stop
if((newRe * newRe + newIm * newIm) > 4) break;
}
//use color model conversion to get rainbow palette, make brightness black if maxIterations reached
color = HSVtoRGB(ColorHSV(i % 256, 255, 255 * (i < maxIterations)));
//draw the pixel
pset(x, y, color);
}
//make the Julia Set visible and wait to exit
redraw();
sleep();
return 0;
}
|
int main(int argc, char *argv[])
{
screen(320, 240, 0, "Julia Explorer");
//each iteration, it calculates: new = old*old + c, where c is a constant and old starts at current pixel
double cRe, cIm; //real and imaginary part of the constant c, determines shape of the Julia Set
double newRe, newIm, oldRe, oldIm; //real and imaginary parts of new and old
double zoom=1, moveX=0, moveY=0; //you can change these to zoom and change position
ColorRGB color; //the RGB color value for the pixel
int maxIterations=128; //after how much iterations the function should stop
double time, oldTime, frameTime; //current and old time, and their difference (for input)
bool keyReleased, keyPressed; //two bools for keys
int showText=0;
//pick some values for the constant c, this determines the shape of the Julia Set
cRe = -0.7;
cIm = 0.27015;
//begin the program loop
while(!done())
{
//draw the fractal
for(int x = 0; x < w; x++)
for(int y = 0; y < h; y++)
{
//calculate the initial real and imaginary part of z, based on the pixel location and zoom and position values
newRe = 1.5 * (x - w / 2) / (0.5 * zoom * w) + moveX;
newIm = (y - h / 2) / (0.5 * zoom * h) + moveY;
//i will represent the number of iterations
int i;
//start the iteration process
for(i = 0; i < maxIterations; i++)
{
//remember value of previous iteration
oldRe = newRe;
oldIm = newIm;
//the actual iteration, the real and imaginary part are calculated
newRe = oldRe * oldRe - oldIm * oldIm + cRe;
newIm = 2 * oldRe * oldIm + cIm;
//if the point is outside the circle with radius 2: stop
if((newRe * newRe + newIm * newIm) > 4) break;
}
//use color model conversion to get rainbow palette, make brightness black if maxIterations reached
color = HSVtoRGB(ColorHSV(i % 256, 255, 255 * (i < maxIterations)));
//draw the pixel
pset(x, y, color);
}
//print the values of all variables on screen if that option is enabled
if(showText <= 1)
{
print("X:", 1, 1, RGB_White, 1); print(moveX, 0, 17, 1, RGB_White, 1);
print("Y:", 1, 9, RGB_White, 1); print(moveY, 0, 17, 9, RGB_White, 1);
print("Z:", 1, 17, RGB_White, 1); print(zoom, 0, 17, 17, RGB_White, 1);
print("R:", 1, 25, RGB_White, 1); print(cRe, 0, 17, 25, RGB_White, 1);
print("I:", 1, 33, RGB_White, 1); print(cIm, 0, 17, 33, RGB_White, 1);
print("N:", 1, 41, RGB_White, 1); print(maxIterations, 0, 17, 41, RGB_White, 1);
}
//print the help text on screen if that option is enabled
if(showText == 0)
{
print("Arrows move (X,Y), Keypad +,- zooms (Z)", 1, h - 33, RGB_White, 1);
print("Keypad arrows change shape (R,I) ", 1, h - 25, RGB_White, 1);
print("Keypad *,/ changes iterations (N) ", 1, h - 17, RGB_White, 1);
print("a to z=presets (qwerty), F1=cycle texts", 1, h - 9, RGB_White, 1);
}
redraw();
//get the time and old time for time dependent input
oldTime = time;
time = getTicks();
frameTime = time - oldTime;
//no key was pressed yet
keyPressed = 0;
readKeys();
//ZOOM keys
if(inkeys[SDLK_KP_PLUS]) {zoom *= pow(1.001, frameTime); keyPressed = 1;}
if(inkeys[SDLK_KP_MINUS]) {zoom /= pow(1.001, frameTime); keyPressed = 1;}
//MOVE keys
if(inkeys[SDLK_DOWN]) {moveY += 0.0003 * frameTime / zoom; keyPressed = 1;}
if(inkeys[SDLK_UP]) {moveY -= 0.0003 * frameTime / zoom; keyPressed = 1;}
if(inkeys[SDLK_RIGHT]) {moveX += 0.0003 * frameTime / zoom; keyPressed = 1;}
if(inkeys[SDLK_LEFT]) {moveX -= 0.0003 * frameTime / zoom; keyPressed = 1;}
//CHANGE SHAPE keys
if(inkeys[SDLK_KP2]) {cIm += 0.0002 * frameTime / zoom; keyPressed = 1;}
if(inkeys[SDLK_KP8]) {cIm -= 0.0002 * frameTime / zoom; keyPressed = 1;}
if(inkeys[SDLK_KP6]) {cRe += 0.0002 * frameTime / zoom; keyPressed = 1;}
if(inkeys[SDLK_KP4]) {cRe -= 0.0002 * frameTime / zoom; keyPressed = 1;}
//keys to change number of iterations
if(inkeys[SDLK_KP_MULTIPLY] && keyReleased) {maxIterations *= 2; keyReleased = 0;}
if(inkeys[SDLK_KP_DIVIDE] && keyReleased) {if(maxIterations > 2) maxIterations /= 2; keyReleased = 0;}
//key to change the text options
if(inkeys[SDLK_F1] && keyReleased) {showText++; showText %= 3; keyReleased = 0;}
//enable keyReleased again if the keys above are released
if(!inkeys[SDLK_KP_MULTIPLY] && !inkeys[SDLK_KP_DIVIDE] && !inkeys[SDLK_F1]) keyReleased = 1;
}
}
|
int main(int argc, char *argv[])
{
screen(400, 300, 0, "Mandelbrot Set"); //make larger to see more detail!
//each iteration, it calculates: newz = oldz*oldz + p, where p is the current pixel, and oldz stars at the origin
double pr, pi; //real and imaginary part of the pixel p
double newRe, newIm, oldRe, oldIm; //real and imaginary parts of new and old z
double zoom = 1, moveX = -0.5, moveY = 0; //you can change these to zoom and change position
ColorRGB color; //the RGB color value for the pixel
int maxIterations = 300;//after how much iterations the function should stop
//loop through every pixel
for(int x = 0; x < w; x++)
for(int y = 0; y < h; y++)
{
//calculate the initial real and imaginary part of z, based on the pixel location and zoom and position values
pr = 1.5 * (x - w / 2) / (0.5 * zoom * w) + moveX;
pi = (y - h / 2) / (0.5 * zoom * h) + moveY;
newRe = newIm = oldRe = oldIm = 0; //these should start at 0,0
//"i" will represent the number of iterations
int i;
//start the iteration process
for(i = 0; i < maxIterations; i++)
{
//remember value of previous iteration
oldRe = newRe;
oldIm = newIm;
//the actual iteration, the real and imaginary part are calculated
newRe = oldRe * oldRe - oldIm * oldIm + pr;
newIm = 2 * oldRe * oldIm + pi;
//if the point is outside the circle with radius 2: stop
if((newRe * newRe + newIm * newIm) > 4) break;
}
//use color model conversion to get rainbow palette, make brightness black if maxIterations reached
color = HSVtoRGB(ColorHSV(i % 256, 255, 255 * (i < maxIterations)));
//draw the pixel
pset(x, y, color);
}
//make the Mandelbrot Set visible and wait to exit
redraw();
sleep();
return 0;
}
|
int main(int argc, char *argv[])
{
screen(320, 240, 0, "Mandelbrot Explorer");
//each iteration, it calculates: new = old*old + c, where c is a constant and old starts at current pixel
double pr, pi; //real and imaginary part of the pixel p
double newRe, newIm, oldRe, oldIm; //real and imaginary parts of new and old
double zoom = 1, moveX = -0.5, moveY = 0; //you can change these to zoom and change position
ColorRGB color; //the RGB color value for the pixel
int maxIterations = 128; //after how much iterations the function should stop
double time, oldTime, frameTime; //current and old time, and their difference (for input)
bool keyReleased, keyPressed; //two bools for keys
int showText = 0;
//begin main program loop
while(!done())
{
//draw the fractal
for(int x = 0; x < w; x++)
for(int y = 0; y < h; y++)
{
//calculate the initial real and imaginary part of z, based on the pixel location and zoom and position values
pr = 1.5 * (x - w / 2) / (0.5 * zoom * w) + moveX;
pi = (y - h / 2) / (0.5 * zoom * h) + moveY;
newRe = newIm = oldRe = oldIm = 0; //these should start at 0,0
//i will represent the number of iterations
int i;
//start the iteration process
for(i = 0; i < maxIterations; i++)
{
//remember value of previous iteration
oldRe = newRe;
oldIm = newIm;
//the actual iteration, the real and imaginary part are calculated
newRe = oldRe * oldRe - oldIm * oldIm + pr;
newIm = 2 * oldRe * oldIm + pi;
//if the point is outside the circle with radius 2: stop
if((newRe * newRe + newIm * newIm) > 4) break;
}
//use color model conversion to get rainbow palette, make brightness black if maxIterations reached
color = HSVtoRGB(ColorHSV(i % 256, 255, 255 * (i < maxIterations)));
//draw the pixel
pset(x, y, color);
}
//print the values of all variables on screen if that option is enabled
if(showText <= 1)
{
print("X:", 1, 1, RGB_White, 1); print(moveX, 0, 17, 1, RGB_White, 1);
print("Y:", 1, 9, RGB_White, 1); print(moveY, 0, 17, 9, RGB_White, 1);
print("Z:", 1, 17, RGB_White, 1); print(zoom, 0, 17, 17, RGB_White, 1);
print("N:", 1, 25, RGB_White, 1); print(maxIterations, 0, 17, 25, RGB_White, 1);
}
//print the help text on screen if that option is enabled
if(showText == 0)
{
print("Arrows move (X,Y), Keypad +,- zooms (Z)", 1, h - 25, RGB_White, 1);
print("Keypad *,/ changes iterations (N) ", 1, h - 17, RGB_White, 1);
print("a to z=presets (qwerty), F1=cycle texts", 1, h - 9, RGB_White, 1);
}
redraw();
//get the time and old time for time dependent input
oldTime = time;
time = getTicks();
frameTime = time - oldTime;
//no key was pressed yet
keyPressed = 0;
readKeys();
//ZOOM keys
if(inkeys[SDLK_KP_PLUS]) {zoom *= pow(1.001, frameTime); keyPressed = 1;}
if(inkeys[SDLK_KP_MINUS]) {zoom /= pow(1.001, frameTime); keyPressed = 1;}
//MOVE keys
if(inkeys[SDLK_DOWN]) {moveY += 0.0003 * frameTime / zoom; keyPressed = 1;}
if(inkeys[SDLK_UP]) {moveY -= 0.0003 * frameTime / zoom; keyPressed = 1;}
if(inkeys[SDLK_RIGHT]) {moveX += 0.0003 * frameTime / zoom; keyPressed = 1;}
if(inkeys[SDLK_LEFT]) {moveX -= 0.0003 * frameTime / zoom; keyPressed = 1;}
//keys to change number of iterations
if(inkeys[SDLK_KP_MULTIPLY] && keyReleased) {maxIterations *= 2; keyReleased = 0;}
if(inkeys[SDLK_KP_DIVIDE] && keyReleased) {if(maxIterations > 2) maxIterations /= 2; keyReleased = 0;}
//key to change the text options
if(inkeys[SDLK_F1] && keyReleased) {showText++; showText %= 3; keyReleased = 0;}
//enable keyReleased again if the keys above are released
if(!inkeys[SDLK_KP_MULTIPLY] && !inkeys[SDLK_KP_DIVIDE] && !inkeys[SDLK_F1]) keyReleased = 1;
}
return 0;
}
|


import torch
import torch.nn as nn
import torch.nn.functional as F
[docs]class SumAggregator(nn.Module):
def __init__(self, num_classes, **kwargs):
"""Basic Sum Aggregator that joins the concepts and relevances by summing their products.
"""
super().__init__()
self.num_classes = num_classes
[docs] def forward(self, concepts, relevances):
"""Forward pass of Sum Aggregator.
Aggregates concepts and relevances and returns the predictions for each class.
Parameters
----------
concepts : torch.Tensor
Contains the output of the conceptizer with shape (BATCH, NUM_CONCEPTS, DIM_CONCEPT=1).
relevances : torch.Tensor
Contains the output of the parameterizer with shape (BATCH, NUM_CONCEPTS, NUM_CLASSES).
Returns
-------
class_predictions : torch.Tensor
Predictions for each class. Shape - (BATCH, NUM_CLASSES)
"""
aggregated = torch.bmm(relevances.permute(0, 2, 1), concepts).squeeze(-1)
return F.log_softmax(aggregated, dim=1)


Sign Out
responsibility the fun way
Home
Tasks
View Tasks
Assign New Task
Prizes
View Prizes
Add New Prize
Robert
Points Earned: 200
Tasks Completed: 05
Tasks Assigned: 05
Enrique
Points Earned: 400
Tasks Completed: 09
Tasks Assigned: 01
Austin
Points Earned: 500
Tasks Completed: 10
Tasks Assigned: 0
Mitchell
Points Earned: 350
Tasks Completed: 04
Tasks Assigned: 06
Terms & Conditions | Privacy Policy | Support


Delete a word.
More...
Delete a word.
Call: delete_word.php?wid=[wordid]&tid=[textid]
- Author
- LWT Project lwt-p.nosp@m.roje.nosp@m.ct@ho.nosp<EMAIL_ADDRESS>- Since
- 1.0.3
◆ delete_word_from_database()
| delete_word_from_database |
( |
|
$wid | ) |
|
Edit the word from the database.
- Parameters
-
| string | $wid | ID of the word to delete |
- Returns
- string Some edit message, number of affected rows or error message
@global string $tbpref
◆ delete_word_javascript()
| delete_word_javascript |
( |
|
$wid, |
|
|
|
$tid |
|
) |
| |
Do the JavaScript action for changing display of the word.
- Parameters
-
| string | $wid | ID of the word to delete |
| int | $tid | Text ID |
- Returns
- void
Make the visual effects to delete a word from the page.
- Parameters
-
- Returns
- {undefined}
◆ delete_word_page_content()
| delete_word_page_content |
( |
|
$tid, |
|
|
|
$wid, |
|
|
|
$term, |
|
|
|
$m1 |
|
) |
| |
Make the HTML content of the page when deleting a word.
- Parameters
-
| int | $tid | Text ID |
| string | $wid | ID of the word to delete |
| string | $term | The deleted word |
| string | $m1 | Some edit message, number of affected rows or error message |
- Returns
- void
◆ do_delete_word()
| do_delete_word |
( |
|
$textid, |
|
|
|
$wordid |
|
) |
| |
Complete workflow for deleting a word. It edits the database, show the success message and do JavaScript action to change its display.
- Parameters
-
| int | $textid | ID of the affected text |
| string | $wordid | ID of the word to delete |
- Returns
- void
- Since
- 2.0.4-fork
◆ get_term()
Return the term corresponding to the ID.
- Parameters
-
- Returns
- string A word
@global string $tbpref


Please enter your Wordoku puzzle details
Puzzle Size
2x2
3x3
4x4
Puzzle Difficulty
Beginner
Advanced
Expert
Enter Characters
4 characters for a 2x2 puzzle
Hidden Puzzle Characters:
*Updates to default value when changing size or difficulty. You can also set your own value.
Show solution on creation?


About
The SchoolGuru website can help you figure out when to study for the many assignments that you have planned over the next week.
You can enter all the assignment information in "SchoolGuru" main website in the second section below the calendar view.
With the information you gave to us about the tasks, the site will prioritize when you should work on each task throughout the week.
You can then see your assignments in the week view by clicking the "Enter" button.
Note: You must put in all known assignments, as you cannot recall data from a previous session on this site.


Coding Dojo What is:a programming session based around a simple coding challenge Why joining:improving hard skills and soft skills
Principles and Rules Promote continuous learning in a safe environment There are no silly questions Collaborative approach Be nice :)
Three Laws of TDD You must write a failing test before you write any production code. You must not write more of a test than is sufficient to fail, or fail to compile. You must not write more production code than is sufficient to make the currently failing test pass.
Red-Green-Refactor Create a unit tests that fails. Write production code that makes that test pass. Clean up the mess you just made.


Neil Humphreys: Five areas Jose Mourinho needs to address at Spurs
After Tottenham hired arguably the wrong manager for the wrong club, our columnist examines what Mourinho needs to do to pull off a Spurs miracle
by Neil Humphreys1. CONVINCE SULKY ONES TO STAY
It's not just Jose Mourinho. Many managers emphasise the cyclical nature of a dressing room, which is usually around three to five years.
Players are groomed, reach a peak and win silverware or they manipulate a move to a club where they will win trophies.
Mauricio Pochettino hit that plateau and paid the price.
Danny Rose, Jan Vertonghen and Toby Alderweireld indulged in the kind of internal plotting that once brought down Roman emperors.
Rose undermined Pochettino's authority, so his mission has been accomplished. Expect a fullback resurrection.
And Mourinho reveres dependable centre-back pairings.
For three years, he lamented their absence at Manchester United, and was eager to sign a bloke called Alderweireld.
Now he has the 30-year-old, alongside his Belgian colleague, Vertonghen, 32.
Mourinho finally has the experienced duo that he has craved for years.
Age is not on their side.
But Mourinho treats young players with the kind of disdain reserved for the mess dogs leave on pavements.
He prefers his defenders to be older, tougher and telepathic.
He simply cannot build a dour side without experienced centre-backs.
Creative midfielders on the other hand…
2. KICK-START ERIKSEN OR KICK HIM OUT
Christian Eriksen does not need a list of reasons to stop his one-man protest and return to work.
A roll call would do.
If Iker Casillas, Sergio Ramos, Eden Hazard, Kevin de Bruyne, Paul Pogba, Anthony Martial and even Marcus Rashford are together in a WhatsApp group, the group's name would be "We Hate Jose".
Mourinho will recognise Eriksen's temperament and struggle to contain his recent indifference. The control freak has little patience with the uncontrollable.
Eriksen might as well be wearing a scapegoat sign.
At 27, the Dane's value depreciates as long as his petulance endures, an intolerable situation for both Mourinho and Tottenham chairman Daniel Levy, who treats every pound lost for a potential sale like a lost limb.
Since Mourinho is unlikely to be given any cash for the January transfer window, he will need to generate his own.
Eriksen will get until Christmas to re-establish his Spurs career and then the miserable one will discover what a real Grinch looks like.
3. MAKE KEY DECISION ON KANE
Harry Kane will make or break Mourinho's Tottenham tenure, so let's deal with the 200 million elephants in the room.
Kane comes with a £200 million (S$351.6 million) price tag and turns 27 next year.
The price will not be right for much longer and Levy sacked Pochettino for financial reasons.
Forget whimsical notions of stale football and Danish dynamos going off the boil.
Levy's stadium rebuild depends upon regular Champions League football.
Missing out is a financial hit that Levy does not want to contemplate, hence Pochettino's panicky sacking.
Selling Kane would offer a Band-Aid for at least a season or so, plus a chance to buy premium replacements.
However, Mourinho remains one of the few elite managers wedded to the nostalgic imagery of a big man up front.
At Chelsea, Didier Drogba defined a generation of totemic No.9s, and he was built in Mourinho's image.
Kane is one of the best No.9s around and too good for Tottenham. Mourinho will insist on keeping him.
He's likely to build a team around Kane and rely on Dele Alli and Harry Winks to feed him at every opportunity.
Whatever happens, the next stage in Kane's career will also define Mourinho's time at Tottenham.
4. WALK THE TALK
In recent years, Mourinho's decline was measured in more than results and trophies.
He had lost the knack for improving players.
By the pragmatist's own admission, there's no grand Pep Guardiola-like "project", no Louis van Gaal "philosophy" or Juergen Klopp "style", there's just a regimented game-by-game approach.
The classic Mourinho quick-fix lacks the patience to nurture players.
He buys the finished article, plugs holes and moves on.
As a result, his United players stagnated. Hardly any improved.
But Tottenham's regular top-four finishes under Pochettino were a tribute to his piecemeal youth development.
Ryan Sessegnon, 19, Davinson Sanchez, 23, Juan Foyth, 21, Winks, 23, Giovani Lo Celso, 23, and Tanguy Ndombele, 22, either signed for Pochettino because of his proven track record with guiding young players, or he promoted them from within the academy.
Mourinho doesn't typically do either. That must change.
He said he was keen on Tottenham's youth. It is time to prove it.
5. NOT SAFE TO PLAY SAFE
Mourinho's Red Devils produced the stodgiest football witnessed at Old Trafford in a generation.
Pochettino's Tottenham reached the Champions League final in exciting fashion.
Mourinho must update his style of play if he is to avoid looking like an analogue manager in a digital world.
His common lament at United was a lack of talent.
He now has a superior back four behind the likes of Kane, Alli, Eriksen, Winks, Son Heung Min, Lucas Moura, Erik Lamela and Moussa Sissoko.
He has no excuses to play it safe.
A better starting XI presents Mourinho with a better starting point.
The endgame must be an entertaining spectacle rather than a remedy for insomnia.


Farewell 2016, Hello 2017
It’s been forever since I last updated my blog. In this post, I reflect on my experiences during my sophomore year, and set personal goals for 2017.
2016 in Review
Summary
Here’s a brief recap of my 2016:
- I was on 14 one-way flights, doubling my previous lifetime total of 7 flights
- I interned at Addepar twice, 4 months in California, 4 months in New York
- I maintained my lazy habits in school, but gained an appreciation for learning
- I gained new friends, strengthened some friendships, and lost a few as well
- I started lifting weights in October and have been going consistently
2A School
During 2A, I lived in the Velocity residence, which markets itself as an opportunity for students to live in an innovative and entrepreneurial environment. Though I didn’t work on any entrepreneurial ventures, I had a blast living there, primarily because of the other Velocity residents. They were all super driven people and they had interests and passions in various fields. I was motivated by them to work harder and succeed.
I spent the entirety of August 2015 preparing and optimizing for my upcoming internship application process. I really wanted to work in Mountain View, but for the wrong reasons, which I won’t mention here. To keep myself accountable, I decided to do a risky move and blogged daily about my 2A Jobmine experience. Looking back, it probably wasn’t the smartest idea, but it sure did push me. A month later, I ended up accepting my offer to Addepar in Mountain View, California. I was beyond happy that I was able to set a goal, work my butt off, and get rewarded.
I took 6 courses in 2A: CHE102, CS241, ECE222, SE212, STAT206, and SPCOM223. I maintained my terrible habit of attending very few classes and procrastinating a lot. I often questioned why a SE student has to take chemistry. Though SE212 and CS241 were interesting courses, I still wasn’t particularly excited about the term. The highlight of the term was definitely the public speaking course I chose as my elective. I contemplated switching to CS many times, so that I could have more flexibility with electives, and not take some of the required SE courses. At the end of the term, I decided to stick with SE to the end.
Other highlights included:
- Going to my first semi-formal in university
- Handing off Enactus presidency
- Learned how to cook
- Skated for the first time
- Montreal trip with the boys
2A Co-op
In my first flight of 2016, I almost missed my transfer from LA to SF.  Anyways, I eventually arrived at the Addepalace (Addepar’s corporate apartment).
Silicon Valley companies tend to treat employees extremely well with respect to compensation and perks. This is something that I feel is lacking comparatively in many Canadian companies; however, I won’t discuss this heated topic today. At Addepar, the Operations team absolutely nailed down the perks part. They provided me with an awesome corporate apartment, which was only a 3 minute walk from the office. Addepar provided daily catered breakfast, lunch, and dinner. Other perks included a fitness stipend, free laundry, weekly house cleaning, and etc. Furthermore, the Ops team were all amazing people and would gladly help out with anything!
From day one, it was clear that this internship wouldn’t be a traditional internship. In my first two weeks, I think I had over 20 one on one’s, including one with the CEO. The Product team gave me a list of 8 possible projects that I could work on. Looking back, I worked on 0 out of the 8 items on that list. This wasn’t necessarily a bad thing because I’ve learned that, sometimes, the best thing is to not work on something, rather than working on the wrong thing. I determined the 8 projects were not a good fit for me, at the time, because of business priorities, value provided, self interest, and a few other criteria.
After on-boarding, I eventually figured out what I’d work on for the next few months. While I won’t discuss the specific details of the projects, I can definitely say they weren’t “intern projects”. One of the major projects I worked on, RepGen2, was shipped, providing huge value to our clients’ reporting workflows.
The culture at Addepar was the #1 highlight of my internship. Addeparvians are some of the most intelligent, hard-working, and chill people I’ve met in my life. Though every company will have flaws, including Addepar, I was quite pleased with my internship experience. It was an easy decision to return to Addepar for another internship, or what some people coined “re-ternship”. I wanted to return for two reasons: the amazing culture and a role with expanded responsibilities and learning opportunities.
Every university student has that period in their life where they’re overly sad about something that’s not really a big deal. At the beginning of 2016, that kid was me. Thankfully, Mountain View was the perfect, peaceful and quiet environment I needed in my life. People say that there’s not much to do in Mountain View. Sadly, I agree with them; however, I still had a great time. I had a bike that I took everywhere, from Steven Creeks trail to even biking all the way to San Francisco. I enjoyed all the little things the “city” had to offer: delicious meals at Zareen’s, chilling out at Red Rock, long walks to Walmart, strolling through the RV encampment near Rengstorff Park, In-N-Out Burger, and etc. Most importantly, it was the people I met that made my experience so memorable. By the end of my time in Mountain View, I had peace of mind.
I normally try to avoid shoutouts on my blog, but I have to make an exception for Rosanne, who was like a big sister to me. Thank you so much for your presence and advice throughout the months.
Other highlights included:
- Thursday night basketball despite the fact we got crushed every game
- Seattle & Portland trip, being vegan for the long weekend
- Watching Purple Rain the movie
- Company Winter Retreat at Lake Tahoe
- LA Road Trip, Highway 1 scenic route
2B School
New term, same old habits. The usual skipping classes, procrastinating on assignments and cramming for tests. It feels like I’ve told my friends the same thing every single term, “this is the term where I develop good study habits and attend all classes”, but frankly things haven’t changed. I had 6 courses in 2B: CS240, CS247, MSCI261, MATH213, MATH239, and SCI238. For the first time in university, I enjoyed most of the courses this term. I think I’ve slowly developed a genuine interest in learning and academics. The course content has become more interesting to me, especially CS240. Overall, it was a tough term, but felt like the usual term to me. Some of my friends didn’t enjoy 2B, so a signifcant number of them have transferred to CS for more course flexibility. This has been coined as the “SExit of Summer 16”.
As it was the spring term, the weather was splendid most of the time. In the first week, I hosted a house party, went bar hopping, and attended my first Bomber Wednesday (never waiting 2 hrs again). The amazing weather was the perfect excuse to just go outdoors, walk in the park, and explore places in Waterloo. I joined two intramural teams: ultimate frisbee and basketball. I also borrowed my friend’s Fitbit, gained a new interest in long walks, and was able to lose much of the weight I had gained at Addepar. Overall, social life was great this term. Spring terms are the best!
Other highlights included:
- First time being in Vancouver
- Meeting a friend I haven’t seen in 3 years and probably won’t see for another 3
- Going to Art Gallery of Ontario for the first time
- Tennis with old high school friends
- Watching the NBA Finals Game 7
- Countless games of Settlers of Catan
- The endless memes
- I learned how to flip a water bottle such that it lands vertically
2B Co-op
Hands down, my second internship at Addepar in NYC was the best co-op term I’ve had. The beginning of the internship was rough, as it was difficult to onboard into the Data Build org. This experience was quite different from my previous internship, where I was working on the more client-facing org. As my manager had put it, “Bo had a difficult technical project with a team that initially had skepticism of his role and value. His work is being implemented and the team he worked with will definitely feel his absence”. Again, without going into details of what I actually worked on, I was able to solve the ambiguous problem I was assigned to. I built great relationships with my fellow co-workers and especially enjoyed being at the office 7AM, and working closely with Data Recon. Finally, the New York City office had an energetic and exciting working environment that I enjoyed.
Outside of work, there was plenty of things to do in New York City. Fall is also my favorite time of the year, not too cold, and not too hot. Once again, what made this term special was the people.
Things I did in Fall 2016:
- All of the touristy places (Times Square, Central Park, World Trade Center, …)
- Watched 5 broadway shows (Aladdin, Phantom of the Opera, Wicked, On Your Feet, Chicago). Only paid ~$30 for each show, sometimes getting great seats!
- Got a haircut from a new barber for the first time in 5+ years
- Watched a Yankees game live. Walk-off home run win & bobblehead giveaway
- Watched a NBA basketball and NHL hockey game live (both firsts)
- Attended a couple comedy shows
- Ate Halal guys too many times. The usual weekend ramen
- Road trip to Philadelphia & Boston
- One week visit to the beautiful Mountain View
- Walked on several bridges (Brooklyn, Manhattan, Queen Elizabeth, Williamsburg, George Washington, Pulaski)
- Visited several art galleries/museums
- Lined up Macy’s Black Friday, first 50 in line.
- Several EDM concerts
The list goes on and on…
In my opinion, New York City is the place to be. During this time, I believe I really found myself and gained the utmost confidence. To put it simply, I’ve never been more happy in my life.
2017 Goals
2016 was a huge year, 2017 is going to be even bigger.
Here are some things I want to achieve for 2017:
- Attend over 90% of my classes, work on assignments early. No excuses this time.
- Travel a lot in August (Japan? Singapore? Hong Kong?)
- Continue gym consistency 3x a week, new PRs, leaner body
- Seek mentorship and follow through with it, gain significant value from it
- Waking up and getting out of bed, rather than playing with phone in bed
- Stay accountable to my progress, acknowledge when things are going downhill
- Set aside dedicated time for productive time, where I must stay focused
- Don’t criticize others, don’t blame others, avoid arguing, less negativity
- Remembering to listen to others, put myself in other people’s contexts
- Get G2 driver’s license
- Be on time for everything
- Significantly reduce my use of plastic water bottles


This part prescribes the policies, procedures, solicitation provisions, and contract clauses pertaining to patents, data, and copyrights.
“United States,” as used in this part, means the 50 States and the District of Columbia, U.S. territories and possessions, Puerto Rico, and the Northern Mariana Islands.
This part applies to all agencies. However, agencies are authorized to adopt alternative policies, procedures, solicitation provisions, and contract clauses to the extent necessary to meet the specific requirements of laws, executive orders, treaties, or international agreements. Any agency adopting alternative policies, procedures, solicitation provisions, and contract clauses should include them in the agency’s published regulations.
(a) The Government encourages the maximum practical commercial use of inventions made under Government contracts.
(b) Generally, the Government will not refuse to award a contract on the grounds that the prospective contractor may infringe a patent. The Government may authorize and consent to the use of inventions in the performance of certain contracts, even though the inventions may be covered by U.S. patents.
(c) Generally, contractors providing commercial items should indemnify the Government against liability for the infringement of U.S. patents.
(d) The Government recognizes rights in data developed at private expense, and limits its demands for delivery of that data. When such data is delivered, the Government will acquire only those rights essential to its needs.
(e) Generally, the Government requires that contractors obtain permission from copyright owners before including copyrighted works, owned by others, in data to be delivered to the Government.


BIN / User input
All user input parsing is separeted into bin layer. This layer glues together configuration, fs tools and compiler itself.
All user input parsing is separeted into bin layer. This layer glues together configuration, fs tools and compiler itself.


Swift, Python, Java, C, C++, Linux, Latex, HTML, CSS, R, Verilog, Derby Database
English(fluent), Korean(Native), Chinese(intermediate)
Data Structure and Algorithm with Python and Java
Creating simple GUI program with Java (Netbeans)
Construct and manage Derby database in Java
Scraping data table from the Internet by using Python
Build website by using HTML and CSS
Identify IP and MAC addresses using DHCP, DNS, ARP
Constructing the MIPS CPU with Verilog
Currently taking an introduction of Linux at EDX (web-based course)


Embedding Ring Language in C/C++ Programs¶
We can use the Ring language from C/C++ programs using the next functions
RingState *ring_state_init();
ring_state_runcode(RingState *pState,const char *cCode);
ring_state_delete(RingState *pState);
Ring State¶
The idea is to use the ring_state_init() to create new state for the Ring Language then call the ring_state_runcode() function to execut Ring code using the same state. When we are done, we call the ring_state_delete() to free the memory.
Example:
#include "ring.h"
#include "stdlib.h"
int main(int argc, char *argv[])
{
RingState *pState = ring_state_init();
printf("welcome\n");
ring_state_runcode(pState,"see 'hello world from the ring programming language'+nl");
ring_state_delete(pState);
}
Output:
welcome
hello world from the ring programming language
Ring State Functions¶
The Ring API comes with the next functions to create and delete the state. Also we have functions to create new variables and get variables values.
RingState * ring_state_init ( void ) ;
RingState * ring_state_delete ( RingState *pRingState ) ;
void ring_state_runcode ( RingState *pRingState,const char *cStr ) ;
List * ring_state_findvar ( RingState *pRingState,const char *cStr ) ;
List * ring_state_newvar ( RingState *pRingState,const char *cStr ) ;
void ring_state_main ( int argc, char *argv[] ) ;
void ring_state_runfile ( RingState *pRingState,const char *cFileName ) ;
void ring_state_runobjectfile ( RingState *pRingState,const char *cFileName ) ;
Ring State Variables¶
We can create more than one ring state in the same program and we can create and modify variable values.
To get the variable list we can use the ring_state_findvar() function.
To create new variable we can use the ring_state_newvar() function.
Example:
#include "ring.h"
#include "stdlib.h"
int main(int argc, char *argv[])
{
List *pList;
RingState *pState = ring_state_init();
RingState *pState2 = ring_state_init();
printf("welcome\n");
ring_state_runcode(pState,"see 'hello world from the ring programming language'+nl");
printf("Again from C we will call ring code\n");
ring_state_runcode(pState,"for x = 1 to 10 see x + nl next");
ring_state_runcode(pState2,"for x = 1 to 5 see x + nl next");
printf("Now we will display the x variable value from ring code\n");
ring_state_runcode(pState,"see 'x value : ' + x + nl ");
ring_state_runcode(pState2,"see 'x value : ' + x + nl ");
pList = ring_state_findvar(pState,"x");
printf("Printing Ring variable value from C , %.0f\n",
ring_list_getdouble(pList,RING_VAR_VALUE));
printf("now we will set the ring variable value from C\n");
ring_list_setdouble(pList,RING_VAR_VALUE,20);
ring_state_runcode(pState,"see 'x value after update : ' + x + nl ");
pList = ring_state_newvar(pState,"v1");
ring_list_setdouble(pList,RING_VAR_VALUE,10);
pList = ring_state_newvar(pState,"v2");
ring_list_setdouble(pList,RING_VAR_VALUE,20);
ring_state_runcode(pState,"see 'v1 + v2 = ' see v1+v2 see nl");
ring_state_runcode(pState,"see 'end of test' + nl");
ring_state_delete(pState);
ring_state_delete(pState2);
}
Output:
welcome
hello world from the ring programming language
Again from C we will call ring code
1
2
3
4
5
6
7
8
9
10
1
2
3
4
5
Now we will display the x variable value from ring code
x value : 11
x value : 6
Printing Ring variable value from C , 11
now we will set the ring variable value from C
x value after update : 20
v1 + v2 = 30
end of test


We are international online gift seller.We represent our best services all over the world. There are defferent gift which best suited to ur pocket budget and convinient.


Most astronomers think that during the Big Bang, the Universe was created, They believe that a giant explosion hurled matter in all directions and caused space itself to expand. And as the Universe cooled, the material in it combined to form galaxies, stars, and planets. But no one actually knows how the universe was created becuase, no humans were alive during the time the universe was created.
I think being a human being means to have a mind, heart, body, brain, and soul.


toyz package¶
Subpackages¶
Submodules¶
toyz.version module¶
- toyz.version.debug = False¶
- try:
- from ._compiler import compiler
- except ImportError:
- compiler = “unknown”
- try:
- from .cython_version import cython_version
- except ImportError:
- cython_version = “unknown”
- toyz.version.get_git_devstr(sha=False, show_warning=True, path=None)¶
Determines the number of revisions in this repository.
- sha : bool
- If True, the full SHA1 hash will be returned. Otherwise, the total count of commits in the repository will be used as a “revision number”.
- show_warning : bool
- If True, issue a warning if git returns an error code, otherwise errors pass silently.
- path : str or None
- If a string, specifies the directory to look in to find the git repository. If None, the current working directory is used. If given a filename it uses the directory containing that file.
- devversion : str
- Either a string with the revsion number (if sha is False), the SHA1 hash of the current commit (if sha is True), or an empty string if git version info could not be identified.
- toyz.version.update_git_devstr(version, path=None)¶
Updates the git revision string if and only if the path is being imported directly from a git working copy. This ensures that the revision number in the version string is accurate.


I'm sorry, no recipes match that name
Recipe Results
Search by Name of Recipe:
Search by Name of Author:
All Authors


{% extends 'base_test.html' %} {% load i18n %} {% block additional-headers %} {% endblock %} {% block content %}
| Facility Name | Execution Date | Average Score Adolescents | Average Score Service Providers | Major Comments Adolescents | Major Comments Service Providers |
|---|


{% extends "header.html" %} {% block body %}
Now let's cover how to visually show the results, try some more examples, and then talk about some ideas for moving forward.
Here is the modified script to include matplotlib, and I will also copy and paste everything, so this is the full script for this series:
from PIL import Image import numpy as np import matplotlib.pyplot as plt import time from collections import Counter from matplotlib import style style.use("ggplot") def createExamples(): numberArrayExamples = open('numArEx.txt','a') numbersWeHave = range(1,10) for eachNum in numbersWeHave: for furtherNum in numbersWeHave: imgFilePath = 'images/numbers/'+str(eachNum)+'.'+str(furtherNum)+'.png' ei = Image.open(imgFilePath) eiar = np.array(ei) eiarl = str(eiar.tolist()) lineToWrite = str(eachNum)+'::'+eiarl+'\n' numberArrayExamples.write(lineToWrite) def threshold(imageArray): balanceAr = [] newAr = imageArray for eachPart in imageArray: for theParts in eachPart: # for the reduce(lambda x, y: x + y, theParts[:3]) / len(theParts[:3]) # in Python 3, just use: from statistics import mean # then do avgNum = mean(theParts[:3]) avgNum = reduce(lambda x, y: x + y, theParts[:3]) / len(theParts[:3]) balanceAr.append(avgNum) balance = reduce(lambda x, y: x + y, balanceAr) / len(balanceAr) for eachRow in newAr: for eachPix in eachRow: if reduce(lambda x, y: x + y, eachPix[:3]) / len(eachPix[:3]) > balance: eachPix[0] = 255 eachPix[1] = 255 eachPix[2] = 255 eachPix[3] = 255 else: eachPix[0] = 0 eachPix[1] = 0 eachPix[2] = 0 eachPix[3] = 255 return newAr def whatNumIsThis(filePath): matchedAr = [] loadExamps = open('numArEx.txt','r').read() loadExamps = loadExamps.split('\n') i = Image.open(filePath) iar = np.array(i) iarl = iar.tolist() inQuestion = str(iarl) for eachExample in loadExamps: try: splitEx = eachExample.split('::') currentNum = splitEx[0] currentAr = splitEx[1] eachPixEx = currentAr.split('],') eachPixInQ = inQuestion.split('],') x = 0 while x < len(eachPixEx): if eachPixEx[x] == eachPixInQ[x]: matchedAr.append(int(currentNum)) x+=1 except Exception as e: print(str(e)) x = Counter(matchedAr) print(x) graphX = [] graphY = [] ylimi = 0 for eachThing in x: graphX.append(eachThing) graphY.append(x[eachThing]) ylimi = x[eachThing] fig = plt.figure() ax1 = plt.subplot2grid((4,4),(0,0), rowspan=1, colspan=4) ax2 = plt.subplot2grid((4,4),(1,0), rowspan=3,colspan=4) ax1.imshow(iar) ax2.bar(graphX,graphY,align='center') plt.ylim(400) xloc = plt.MaxNLocator(12) ax2.xaxis.set_major_locator(xloc) plt.show() whatNumIsThis('images/test.png')
I encourage you to open up paint or something similar, create an 8 x 8 square, and draw your own numbers. You could use some of the training set, but this is highly improper.
Try drawing numbers and then shifting them a bit left or right, or up and down.
You should find some pretty decent success here, though there are obviously many problems moving forward from here.  You wont always be this lucky, but you can indeed resize. The thickness of our characters was also very standard.
The main objective of this series was to teach you that, while image recognition is a somewhat complex topic in layers, each problem can be broken down and solved with very simple, easily understood, code. I hope you enjoyed.
That is the end of this series. Want more tutorials? Head to the


summary
- I am a habitual researcher who loves discovering, tinkering with, implementing, and contributing to new technologies. 5 years of DevOps Engineering experience advocating for deployment consistency, implementing task automation, planning version control strategies, and improving Developer visibility.
education
University of Illinois at Urbana-Champaign
August 2005 - August 2011
Bachelor of Arts in Anthropology
experience
-
Upgrade
San Francisco, CA
Senior DevOps Engineer
April 2018 - Current
- Developed Python 3 Modules for interfacing with Metro 2® formatted files to apply corrections
- Increased throughput of Python 3 code using asyncio for sending AWS CloudTrail events to Open Policy Agent for auditing
- Constructed Kubernetes CronJobs for data replication from vendors to AWS S3 storage
- Created Python application (Reforemast) for imperative in-place updating of Spinnaker Pipeline configurations
- Maintained financial loan servicing system ensuring 24 hour uptime, responding to alerts, and identifying improvements
- Promoted automation of daily tasks through iterative documentation and scripting
- Managed AWS infrastructure using Terraform
-
Gogo
Chicago, IL
DevOps Engineer
August 2015 - March 2018
- Contributed to modernizing the embedded system build platform using Jenkins Pipelines
- Collaborated on Python application (Foremast) for configuring Spinnaker applications and AWS infrastructure
- Maintained and provided training for Git SCM and GitLab EE
- Established build and deployment environments in AWS using boto3, Terraform, and automation scripts
-
Riverbed Technology, Inc.
Champaign, IL
DevOps Engineer
January 2015 - July 2015
- Implemented Python CLI using Click for automating common tasks
- Deployed containerized Icinga instance for monitoring
- Determined necessary Server configurations and managed using SaltStack
- Controlled SaltStack incompatible Servers with Python scripts using Fabric
-
Riverbed Technology, Inc.
Champaign, IL
Laboratory Engineer
April 2012 - July 2015
- Laboratory administration of heterogeneous hardware and virtual machines
- Resolved issues in Bugzilla for hardware upgrade requests, hardware failure, and software configurations
- Administered infrastructure and test environments including Linux, Mac, Solaris, and Windows systems
- Researched infrastructure technologies such as distributed storage, KVM Hypervisor, OpenStack, SaltStack, and Ubuntu MaaS
-
Riverbed Technology, Inc.
Champaign, IL
QA Associate
October 2011 - August 2014
- Tested Microsoft Exchange Server, Active Directory, NFS, CIFS/SMB, and other protocols
- Diagnosed network including routing table and switch configurations
- Maintained documentation for internal development, processes, and tool usage
-
Illini Tech Center
Champaign, IL
Certified Technician
May 2008 - August 2011
- Diagnosed malfunctioning computers and equipment
- Repaired machines needing replacement parts based on damage assessments
- Communicated with manufacturer to diagnose or order parts
- Managed Service Assistants to ensure work efficiency and proper recommendations
- Completed sales of hardware and software, and resolved software issues and questions
-
University of Illinois at Urbana-Champaign
Urbana, IL
Peer Computer Consultant
August 2006 - May 2008
- Assisted in closing network support tickets
- Maintained two University Residence Housing computer laboratories
- Solved hardware and software technical support queries such as application issues, failing components, and malware
- Generated and routed support tickets when necessary
skills
-
Cloud Providers
- Amazon Web Services (AWS)
-
GNU\Linux
- Debian
- Fedora
- Ubuntu
-
Hypervisors
- KVM
- Oracle VM VirtualBox
- Parallels
- VMware ESXi
- VMware Fusion
- VMware Player
- VMware Workstation
-
macOS
- 10.15 Catalina
-
Mobile
- Android
- iOS
-
Network
- Cisco CatOS
- Cisco IOS
-
Programming
- C++
- CSS
- HTML
- Python 3.6
- SASS
- Shell script
-
Protocols
- CIFS/SMB
- DHCP
- DNS
- HTTP
- NFS
- TCP
-
Software
- Ansible
- Artifactory
- Docker Containers
- Git
- GitHub
- GitLab
- GlusterFS
- Grafana
- Jenkins
- Kubernetes
- LVM
- LXD
- MooseFS
- MySQL
- Read the Docs
- SaltStack
- Sphinx
- Terraform
- Ubuntu MaaS
- Vim


Magic Trick
问题描述 :
Warning! This problem statement contains a serious spoiler. It shows the trick behind a magic trick. So if you still want to be amazed in case somebody shows this trick to you then do NOT read the rest of this problem statement. Stop reading… NOW!
Problem
Well, you’re still reading, so obviously you have no respect for magic tricks. Be ashamed, please. Ok,here’s what happens. The magician shows you a text with three paragraphs like this one:
It was a horribly dark night.
The moon was shining, but not much.
A suspicious stranger entered the
bar and went straight to John Doe.
“I’m searching for aliens, can I
borrow your computer?”, he said.
He then asks you to secretly pick a word in the first paragraph. Then you shall do this:
1. Count the number of characters in your word (call that number X).
2. From your word move on X words.
Repeat these two steps until you reach the third paragraph. Then tell the magician that you’re done.After some hocus pocus he tells you the word you ended up with.
For our purposes, a “word” is defined as consecutive letters (A-Z,a-z). For example, “I’m” is regarded as two separate words.
For example, let’s say you choose “night” in the above example. It has 5 characters, so you move on five words: “The”, “moon”, “was”, “shining”, “but”. Our new word is “but”. You move on 3 words to “A”,then 1 to “suspicious”, then 10 to “Doe” and then 3 to “searching”. Now you tell the magician that you’re ready. He says that you’ve reached “searching”.
How can he know? Well, it doesn’t matter where you start in the first paragraph, you’ll always end up at “searching”. The magician needs new texts and asks you to help him to find all possible outcomes (in the above example, “searching” is the only one). Apart from words, a possible outcome is “-outside-”,which means it’s possible to jump behind the third paragraph. Also, he’s not interested if more than three outcomes are possible.
输入:
输出:
样例输入:
4 It was a horribly dark night. The moon was shining, but not much. A suspicious stranger entered the bar and went straight to John Doe. "I'm searching for aliens, can I borrow your computer?", he said. !pablo espanol! !pablo espanol! !pablo espanol! c'mon howLongOrShortCanASingleWordBe? a b c d e f g f e d c b a 54254#@%$^%^@4626^#^%^$hahaha#$@%#$@63456326 Hello buddy dance tango! PleaseOhPleaseJumpOverMe This is too much for me...
样例输出:
Scenario #1: searching Scenario #2: -outside- espanol Scenario #3: -outside- hahaha Scenario #4: -too many-
解题代码:
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.*; public class Main { public static void main(String[] args) throws NumberFormatException, IOException { BufferedReader re=new BufferedReader(new InputStreamReader(System.in) ); int T=Integer.parseInt(re.readLine()); for(int i=1;i<=T;i++) { int n=0,last=0; boolean[] use=new boolean[300010]; Set strset=new TreeSet(); for(int p=0;p< 3;p++) { String str=re.readLine().toLowerCase(); str=str.replaceAll("[^a-zA-Z]+"," ").trim();//"[^a-zA-Z]+"匹配非字母字符串 String[] sa=str.split(" "); for(int j=0;j< sa.length&&strset.size()<=3;j++,n++) { String te=sa[j]; if(p==0||p==1&&use[n]) { int next=n+te.length(); use[next]=true; last=Math.max(last,next); } if(p==2&&use[n]) { strset.add(te); } } } System.out.println("Scenario #"+i+":"); if(last>=n) strset.add("-outside-"); if(strset.size()>3) System.out.println("-too many-"); else { Iterator it=strset.iterator(); while(it.hasNext()) System.out.println(it.next()); } System.out.println(); } } }
#pragma pack(2) 这个用法太坑爹
顺利测试通过了，多谢
为避免精度问题，PI值请使用arccos(-1)。应该是acos
代码过于复杂了吧
swap写成内联函数会不会好一些
第一句可以忽略不计了吧。从第二句开始分析，说明这个花色下的所有牌都会在其它里面出现，那么还剩下♠和♦。第三句，可以排除2和7，因为在两种花色里有。现在是第四句，因为♠还剩下多个，只有是♦B才能知道答案。
红绯鱼：
这模板神了
没有对题目进行一番分析，真是美中不足啊
第一句可以忽略不计了吧。从第二句开始分析，说明这个花色下的所有牌都会在其它里面出现，那么还剩下♠和♦。第三句，可以排除2和7，因为在两种花色里有。现在是第四句，因为♠还剩下多个，只有是♦B才能知道答案。
分析的很详细！赞一个
辛苦了，顶
不错
&这是C语言？
赞一个！权限已更新:）


--- layout: default title: GECODE logo headline: Logo ---
The Gecode logo has been designed by Christian Lindig. Please feel free to use it for linking to our web site. You can download the logo in different formats and sizes: