text:
---
title: UI-UX
permalink: /about/uiux/
---
![1](/images/ui-ux/UI-UX_Banner_1440-x-435-V4.png)

    Looking to transform the User Interface/User Experience (UI/UX) of your products and services?

Natural and intuitive interfaces and experiences are key to customer-centric innovation. PIXEL helps companies to enhance the user experience of their digital products or services, including web, mobile applications, immersive media, game consoles and emerging interfaces.

Our support includes: (1) Workshops and Masterclasses on how to develop and refine the UI/UX as part of the digital innovation process (2) Project-based coaching with an expert to transform the UI/UX of a digital product, and build capabilities in your team (3) a fully-equipped Usability Testing Lab to conduct usability interviews.

To find out more, download the brochure here.

  Check out our e-book to learn how your company can benefit from UI/UX.

    Create Intuitive User Interfaces And Experiences

    Interested to join our workshops or masterclasses? Check out our event schedule here.

         Keen on transforming the UI/UX of your digital products? Through PIXEL’s Project-based coaching, your company will be connected with a design consultant on our panel, to deliver on an agreed UI/UX project scope, and build capabilities within your team. This Project-based coaching programme is for Singapore-based, Tech & Media Start-ups, SME’s, LLE’s. Approved projects will be supported up to 70% of the total cost, capped at $70,000. It supports UI/UX projects that may require up to 24 man-days of consultant engagement, for up to 6 months. Stand to benefit from this through a simple 3 step application process:

(i) Share an Executive Summary of the project with us via this link.

(ii) Meet with us/the consultant to scope deliverables & duration

(iii) Submit an Application Form and commence project when approved. All projects will be evaluated based on its innovation, scalability, the commitment to project (team, funding, relevance to core business), and capability building it brings to the organisation.

Thinking of conducting usability testing on your prototype, website or mobile app? Usability testing involves observing real users as they attempt to complete given tasks. PIXEL’s Usability Testing Lab allows companies to organise usability testing interviews to gather quantitative and qualitative feedback on effectiveness, efficiency, and user satisfaction. Our facility is equipped with hardware such as cameras, screen-based and wearable eye-tracking equipment, galvanic skin response sensors, as well as software to collect and analyse data from the interviews. Enquire about or book the facilities/equipment via this link

FACILITIES AND EQUIPMENT

Usability Testing Lab

Test out your digital prototypes here to gather feedback from your users

Immersive Experiences Lab

Visit our Immersive Experience Lab to try out the different equipment available and explore how you may use these to develop a powerful immersive experience

Game Testing and Play Area

Chill out with some of the latest console games or test your prototypes at this zone.

branch_name: refs/heads/staging

gha_license_id: NOASSERTION


text:
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## Unreleased

## 0.0.1 - 2018-05-15
### Release notes
Initial files release (mostly settings and setups)

### Added
- .gitignore
- .eslint.json
- GitHub templates for submitting bugs and feature requests, and for opening pull requests
- README.md
- package.json
- CHANGELOG.md

license: MIT

repository: fossabot/mememachine

branch_name: refs/heads/master

extension: md

gha_license_id: MIT

license_type: permissive

repo_name: fossabot/mememachine


text:
## Getting Started with the Melbourne Research Cloud

Dr. David Perry

<EMAIL_ADDRESS>/   @dwjperry

---

Pre-Requisites

* Laptop
* Working SSH Client
* University Email Address
* Basic Linux Commands

Note: These were circulated prior to this class. If you don't have all of these, you'll miss out a little, but if you work with others you can probably get by.

---

Training Outcomes

* Understand what cloud computing is about
* Submit an allocation request
* Create and operate a computer in the cloud
* Understand cloud data storage
* Know where to go for help

Note: Here's an outline of what we're going to cover. We're going to keep things mostly conceptual, with a bit of hands on content. The reality is there is more to this than I can cover in one-day, and even if I could cover it, you'd probably forget the details once you need it!

---

PDF Slides: http://go.unimelb.edu.au/mm56

---

## Part 1: Background

---

### A boring cloud taxonomy:

			Infrastructure as a Service (IaaS)	Platform as a Service (PaaS)	Software as a Service (SaaS)

Amazon Web Services

Microsoft Azure

Nectar

Heroku

Google App Engine

Dropbox

Google Docs

Note: You've probably heard of Dropbox, but what about Amazon Web Services (AWS)? They provide IaaS, which is what we mean  when we talk about 'cloud' in todays session. Some years back, Amazon figured they were good at running data centres, and should rent out spare capacity to others. Users could simply rent a computer for an hour at a time, rather than buy and maintain their own. Amazon actually make more money from AWS these days than retailing! IaaS is what we're talking about today.

---

No really, what is it?

---

*Computing on tap...*

---

Note: An analogy. A water bottle is portable, often convenient, but it has a limited size. Water on tap is abundant, practically unlimited. You pay per unit of usage, and usually much less than for bottled water.

---

Note: In this analogy, the 'reservoir' is the data centre. When you're using the research cloud, you're tapping into a reservoir of thousands of computers in the university data centre that are managed for you, and available on-demand.

---

Do these apply to you?

- I want a *faster* computer
- I want *lots* of computers
- I want a *special* kind of computer
- I want to *share* my computer with collaborators
- I want my computer to *host* a web service

---

...and you want them all right now.

Note: This is the important bit, you need a computer, but you don't want the trouble and delay of buying one.

---

Then maybe you need cloud computing!

---

Some (Brief) Case Studies

Note: This is a challenging course to give because the benefits of cloud computing are so abstract and the applications diverse. I can't possibly enumerate all the situations in which it might be useful, and I bet you'll come up with ideas I haven't. For the sake of something concrete, here are a couple real case studies of how the Melbourne Research Cloud is being used.

---

### Rendering Artwork

* Rendering animation works; takes too long on desktop computer!
* Run on a large computer in the cloud instead.

Note: Brendan Lee is doing a Masters of Fine Art, and his works are generated in a 3D rendering package called Carrera. This was getting slow! We helped him provision a powerful computer in the cloud, and install Windows and Carrera. The work was able to be completed more quickly, could be left running unattended, and freed up his computer for other work.

---

### Analyse Brain Function

* A desktop environment, with MRI analysis software pre-installed.
* Easy for new students to get started.

Note: Scott Kolbe and his group at the Florey use neuroimaging to study the brain. They do much of their work on cloud-based computers, using a customised environment with all the necessary specialist software pre-installed. As you might imagine, this software is fiddly to setup and so this saves a bunch of time, makes sure everyone can work consistently, and access powerful computation when needed (they also use HPC on occasion, which I'll talk about in a bit). Since they are using computers in the university data centre, this also means they can access their data stores much more quickly than if they had to go through their local network to upload/download.

---

### What about high-performance computing (HPC)?

i.e. Use a supercomputer!

Note: Another service we provide is HPC via our local cluster, called Spartan. HPC is suited to big analysis jobs, especially for software that can run in Linux. In the cloud you can get your own private resources, whereas in HPC you submit work to a shared system. That could be a good thing or a bad thing depending on your needs.

---

### High-Performance vs. Cloud Computing

Need complete control? Don't like sharing/waiting? Hosting a web service? Need Windows? ➡ Cloud

Don't want to manage a system yourself? Need enormous scale? ➡ HPC

Note: Here are some guidelines on which to choose. Some researchers use both. We run 1-day training on HPC if you're interested in finding out more, or visit our documentation page.

---

For more info, visit: http://dashboard.hpc.unimelb.edu.au

Note: If you'd like to know more, visit Spartan's homepage which includes details on getting started and training, or feel free to come chat to me.

---

### Virtual Laboratories

Domain-specific environments built upon the research cloud.

* Genomics Virtual Laboratory
* All-Sky Virtual Observatory
* Virtual Geophysics Lab
* ... and more: https://nectar.org.au/labs-and-tools/

Note: So, in the research cloud we're mostly creating our own environment from scratch. But several groups have built their own specialist platforms ontop, and perhaps there is one to suit you? These include pre-built software, datasets and an established user community.

---

## Part 1: Introduction to the Research Cloud

---

## Oh no, jargon!

* Instance
* Image
* Volume Storage
* Object Storage
* Security Groups
* Flavor
* Availability Zone
* Keypairs

Note: Unfortunately there is some jargon we have to get through. Let's work through these concepts one at a time, and see how they link together. I don't expect it will make sense right away; we'll sketch out these concepts and then work through some concrete examples with some repetition.

---

Instance

Note: Describe each of these concepts, and put them altogether by drawing on whiteboard (todo: pre-design diagram, print icons to use on whiteboard)

---

Image

---

Volume Storage

---

Object Storage

---

Security Group

---

Flavor

---

Availability Zone

---

Key Pair

---

SSH (Secure SHell)

---

Nectar

---

## Part 2: Create an Instance

---

Demo: Let's create an instance.

---

Recap:

* Trial project with 2 CPU-Months of compute time available immediately.
* Create an  __Instance__, with a particular __Flavor__.
* Use an __Image__ to load an operating system (and perhaps software) onto it.
* Select a __Keypair__ to use with the __Instance__, allowing us to login.
* Set some __Security Groups__ to allow network access in/out of the __Instance__.
* Choose an __Availability Zone__ (data centre) within the Nectar network where our __Instance__ will reside.
* We connect to our __Instance__ via __SSH__, which authenticates us using our __Keypair__.

---

### Your turn!

Challenge 1: Create an instance and connect to it.

Instructions: http://go.unimelb.edu.au/j7d6

Note: Now it's your turn to have a go! Work in groups; I suggest one person has the instructions open on their computer, while another drives the dashboard and SSH client through their computer.

---

Where to go for help?

Note: So, I can't cover every aspect of the research cloud today, and even if I could, you wouldn't remember it all. Today is about getting the basic concepts down, but at some point you're going to need help, either from online resources, or from our support team. This is what distinguishes us from commercial cloud providers (other than being free!), we're here to support you and don't expect you to go it alone.

---

Self-Paced Training: http://training.nectar.org.au/

General Documentation: http://support.nectar.org.au/

Helpdesk<EMAIL_ADDRESS>or call 1300 080 431 (9am-7pm).

Note: (To be updated when local Melbourne docs and queue online) We have a few options -- you can check out Nectar's self-paced training which goes over everything in detail, and just pick up sections you need. Or there is specific documentation. Failing that, you're very welcome to contact us via our helpdesk.

---

Note: In fact, you can contact the helpdesk right inside the dashboard by clicking here.

---

Note: ... you can access the documentation from here, or submit a ticket.

---

Challenge 2: Find out about Object Storage

* Use the training/documentation/Google to figure out:
    * How to upload a file to object storage from the dashboard?
    * How many copies of your data does the object store keep to ensure integrity?

Hint: http://training.nectar.org.au/package07/sections/objectStorage.html

Note: So I've described roughly what object storage is about, have a go at trying to upload a file from your computer to object storage, referring to whatever online documentation you can find. If you can't find what you need, that's perfectly okay, just let me know and I'll help.

---

Recap: Object Store

Note: Ask what resources people found. Did you figure it out, or was something missing? Show how to upload something to the dashboard, and go through the documentation, which outlines other options -- we can also upload files via GUI and command line tools.

---

## Part 3: Security

---

Note: Now a few words on security. Unlike your official university computer, which is locked down by central IT, we give you a lot of freedom on the research cloud. But with this comes some security hazards which you need to be aware of.

---

### Joint responsibility

* We protect the cloud backend
* But you are responsible for what runs on it

Note: We have joint responsibility; the research cloud has a team working on keeping the infrastructure operational and secure; but we don't control (or necessarily know) what you're running inside it. For example, if you run some very old blogging software with known vulnerabilities, it's possible your instances will be taken over, and we won't notice until someone else on the web makes a complaint. This doesn't happen often (perhaps once a month), but does occur. The hackers aren't out to get you exactly, there are some just bad actors that scan the internet for every single machine that exhibits a particular known vulnerability.

---

## Basic Security Principles

Note: It's not possible to eliminate all security risks, but there are some simple steps you can take which don't require a bunch of specialist know-how.

---

### Minimise Means of Access

* Only allow access from necessary ports/addresses.
* Power off or terminate resources you don't need.
* Don't run services you don't need.

Note: The first step is to provide only the bare minimum means of access to do your work. Ideally, power off or suspend your machine when you're not using it (can't hack a machine that's turned off!) Don't add security groups you don't need (ideally just stick to SSH, and keep your private key safe), and if possible lock down access to particular IP address ranges. For example, you could limit access to addresses used by the University virtual private network (VPN; staff: <IP_ADDRESS>/22, student: <IP_ADDRESS>/22). In reality though, you might to run a web server or similar, in which case you have to take a more active role.

---

### Keep OS and Software Up-To-Date

Subscribe to relevant updates/advisorsies for your software and operating system.

Note: If you're running something like a web app, database or other service that's possible for others to access, you have to be a bit more diligent. This includes keeping both your operating system (OS) up to date, as well as the software running on it. Over time security flaws are discovered in various packages, and if you hold onto an old version for too long, it's possible it could be compromised.

---

Note: Here's an example of the sort of thing I'm talking about. Wordpress is a really popular blogging platform, and the sort of software you might like to host yourself on the research cloud. Much sure you subscribe to their newsletter or similar so you can be kept up to date about new versions. Some of these will be about fixing bugs or adding features, but others will be around fixing security flaws that have been discovered.

---

### Sensitive Data?

* Be aware of ethics, funding and institution requirements.
* Encrypt sensitive data, and secure the decryption key/password.

Note: Let's say your instance has been compromised somehow, even after being very careful. Unfortunately it still happens despite best intentions, for example through social engineering, physical theft or human error. How can you limit the resulting damage? If you're working with potentially sensitive data, it's worth considering an extra layer of protection, including encrypting files.

---

### Backup

Things can still go wrong ☹

Note: Say there has been a security issue, hardware failure, or you have just goofed somehow, and you need to recover. The Research Cloud makes it easy to create backups so you can do so.

---

## Part 4: Snapshots

---

Introducing Snapshots

* Like an image, but copied from an existing instance.
* Includes: Everything - OS, Software, Data
* Use for backup, duplicating instances, and more!

Note: You can make a copy of your instance, including the OS, your data, and any software you've installed, and this is called a snapshot. You can then use that snapshot to create a new instance with the exact same setup. This can be used to roll back to an earlier setup, or clone an existing one (i.e. have multiple identical instances).

---

Don't forget the object store

Automatically keeps three copies of your data ➡ Free backup!

Note: Data in the object store is quite safe, as at least three copies are kept at any one time, including a copy off-site. So if you can, it's really handy to keep your data there, and you can access it from your desktop, instances, anywhere really. Keep in mind though that it won't protect against human error, i.e. accidental deletion!

---

Challenge 3: Clone your instance using a snapshot

Instructions: http://go.unimelb.edu.au/43v6

---

## Part 5: Storage

---

### Volume Storage

---

---

Demo: Create a volume, connect it to instance, format it, and write to it.

Note: So, I'll show you how to create a volume and attach it to your instance. Unfortunately we can't do this together as trial projects don't include any volume storage quota :-(

---

sudo mkfs.ext4 /dev/vdc # Format the volume
sudo mkdir /my_volume # Create a mount point
sudo mount /dev/vdc /my_volume -t auto # Mount the volume
sudo chown ubuntu /volume_name # Make sure our ubuntu user can access it
sudo du -sh /my_volume # Show how much of the volume is used

Note: I'll create the volume and attach it to my instance in the dashboard, and then on my instance I'll run these commands so I can actually use it.

---

### Catch all of that?

Don't worry, instructions for doing this at:
https://support.ehelp.edu.au/support/solutions/articles/6000055382-introduction-to-cloud-storage

Note: I know that's a bit to take in, but don't worry, you can refer to the documentation as needed (I certainly don't remember all of this of the top of my head!)

---

### Ephemeral Storage

* Special type of storage included with some instance flavours.
* Not included in snapshots, and lost on reboot.
* Handy for 'scratch space': Temporary storage for files you don't need to keep.

Note: Another type of storage I'll mention is ephermal storage -- you might notice this is available for some of the larger flavours. Say you need to save some intermediate results while you're doing some data analysis, but don't need to keep them -- ephemeral storage is ideal for this. Just take care that you don't storage anything crucial there, everything will disappear when you reboot your instance!

---

### Object Storage

* Files, stored in 'containers'
* Can organise into (pseudo) folders
* Can keep container private, or make public (readable by everyone)
* Resilient: At least 3 copies of everything retained.

---

            Volume
			Ephemeral
            Object

            Access
            From attached instance
			From attached instance
            Anywhere

            Resilience
            Low
			Low
            High

            Transferring Files
            Like any other folder on your computer.
			Like any other folder on your computer.
            Web interface, or command line or GUI client

            Persistent
            Yes
			No
            Yes

Note: So here's a comparison of all the storage options at once. Volume storage is just like a USB HDD. Ephemeral storage is similar, but gets wiped after a reboot so is just for temporary files. Object storage is more abstract, maybe a little like Dropbox. You can upload/download files from anywhere, using a GUI, web or command line client, and it is inherently resilient (i.e. resistent data corruption due to hard drive crashes, etc.).

---

### Need managed data services?

Visit: https://research.unimelb.edu.au/infrastructure/research-platform-services/services/data-storage-management

Note: I've talked about quite low-level storage infrastructure, which you can use to build more complex systems like databases yourself. But our department (ResPlat) also offers some more specialised managed services, such as systems for managing instrument data. Get in touch and we can help you decide if they might work for you.

---

## Part 6: Resource Allocations

---

Automatic trial allocation: ~2 small instances for 2 months.

---

### Requesting More Resources

---

---

## Part 7: Wrapping Up

Note: We're getting near the end, just a few little items to wrap up.

---

## Terminating Instances

Note: So, when we are done with an instance, we can terminate it.  However, any snapshots will be preserved, as will anything stored in a separate storage volume.

---

Final Challenge: Terminate your instance!

Note: Go ahead and terminate the instance(s) you created in the first challenge. You'll lose your work, but you can always re-build from scratch, or using the snapshot you created. Once this is done, you'll no longer be consuming your trial quota, saving it for more useful things.

---

## Special Bonus Topics

---

### Windows Instances

Possible, but a bit complicated for now.

See: https://github.com/resbaz/HOWTO-Nectar-Windows-VM

---

### Software Licensing

* You can BYO license
* Or use a University site license, provided you select a Melbourne availability zone.

Note: You might be wondering about commercial software. Well, just about anything you can run on your own computer will work in the cloud too, and most software licenses allow for that. You're welcome to bring your own license for a piece of software if you already have it, or the University has an extensive range of licensed software already available, including things like MATLAB, and almost every Microsoft product. Keep in mind is that University-licensed software generally has to run on University hardware, in which case you must select a Melbourne Availability Zone for your instance.

---

### GPU Instances

NVIDA M10 GPUs available for Graphics Work

e.g. CAD, neuroimaging

Contact us, or checkout this for more: https://github.com/resbaz/HOWTO-Nectar-GPU

---

Need general-purpose GPU resources (e.g. for deep learning)?

Try our HPC cluster Spartan: https://dashboard.hpc.unimelb.edu.au/gpu/

---

### Linux Desktop Access

---

To get started with a Linux desktop: http://training.nectar.org.au/package07/sections/connectWithX2Go.html

---

## The End

Questions?

PDF Slides: http://go.unimelb.edu.au/mm56

---

repository: crawley/Research-Cloud-Training

repo_name: crawley/Research-Cloud-Training


text:
# Find Anagrams In List

Given a **long** list of words, and a *target word*, find and return all words from the list that are an anagram of the target.

This function will be run many times so aim for a solution that is efficient when run over and over again on the same list.

#### Note: Technical Interview question at Zendesk (Undergraduate Internship)

```python
lst = ['dog','apple','odg','pen'] # list will be much longer
find_anagrams( 'god', lst )
> ['dog', 'odg']
find_anagrams( 'pelap', lst)
> ['apple']
# etc, etc

```


text:
# Real World OCaml Exercises
Exercises from [Real World OCaml](https://dev.realworldocaml.org/index.html) book (2nd edition - in progress).

repository: jeremy-miller/real-world-ocaml

repo_name: jeremy-miller/real-world-ocaml


text:
Custom fonts from `SETFONT`
---------------------------

These are custom fonts for the Amstrad PCW from the `SETFONT` package. See http://www.seasip.info/Unix/PSF/Amstrad/Setfont/index.html.

repository: robhagemans/hoard-of-bitfonts

gha_language: Pascal

repo_name: robhagemans/hoard-of-bitfonts


text:
# README

ConvictVote was inspired by the opportunity created by Florida State's Amendment #4. This is for demonstrating
features and is a concept. This is not for use in production or even testing. Read over the documentation.

* [GitHub](https://github.com/Code-for-Miami/ConvictVotee)
* [Requirements](https://docs.google.com/document/d/1YtDDQB9NOGCZwL41C9LuRzZ93Zs0vEEkQVf6Xyf1PO4/edit?usp=sharing)
* [Concept](https://docs.google.com/presentation/d/1A3oVPrTeL112xp4hUIJohRgrn_EYuKAvdy5CiIdOwek/edit?usp=sharing4)

## Documentation

Documentation is contained in Markdown files within the repository

| File          | Purpose |
| ------------- | -----------|
| [README.md](README.md) | This root document |


text:
# Change Log
All notable changes to the "hotline" extension will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.1.6] - 2019-03-11
### Added
- Whitespace foreground color -- Just found out that you can show the whitespace!
- Multiline comments in Python are greyed out now
### Changed
- Darkened the inactive line numbers
- Darkended colors in comments
- No more tabs, all spaces

## [0.1.5] - 2019-03-11
### Added
- Updated readme to include screenshots. Thanks @nohwnd for the suggestion!

## [0.1.4] - 2019-03-07
- Initial release

repository: kel/Hotline-Theme-VSCode

repo_name: kel/Hotline-Theme-VSCode


text:
# Prework-CodeChallenges
The pre-work code challenges for Code 401: ASP.NET Core

## Problem 1

**Name of Challenge: Array Max Result**

Instructions of Challenge:

**Problem Statement**

Given an array select a number that exists, and output the computated “score”. The method you create should take in both an array of integers and the integer the user selected.

Create a Console application that requests 5 numbers between 1-10 from the user. Output the array to the console and ask the user to select a number. After the selection, output the “score” of the number chosen.

**Selection and Scoring Algorithm**

You can select any number from the list, however your scoring will be depend on the frequency of that number in the list. E.g for [2,2,3,5,4] if you pick 2 your score will be 4 (2 * 2) but if you pick 5 your score will be 5 (5 * 1)

**Input Format**
An array of integers, and the number chosen.

**Sample Input**
[6,4,4,1,3] , 4

**Sample Output**
8

Screen capture of successful output:
![problem1](https://github.com/NaamaBarIlan/Prework-CodeChallenges/blob/master/PreworkCodeChallenges/PreworkCodeChallenges/images/problem1.png)

## Problem 2

**Name of Challenge: Leap Year Calculator**

Instructions of Challenge:

**Problem Statement**
Given a year, report if it is a leap year.

The tricky thing here is that a leap year in the Gregorian calendar occurs:

on every year that is evenly divisible by 4
except every year that is evenly divisible by 100
unless the year is also evenly divisible by 400

For example, 1997 is not a leap year, but 1996 is. 1900 is not a leap year, but 2000 is.

Note: This is not a trick problem. Edge cases do not need to be taken into consideration when creating a solution.

Screen capture of successful output:
![problem2](https://github.com/NaamaBarIlan/Prework-CodeChallenges/blob/master/PreworkCodeChallenges/PreworkCodeChallenges/images/problem2.png)

## Problem 3

**Name of Challenge: Perfect Sequence**

Instructions of Challenge:

**Problem Statement**
Given an array, return “Yes” if the sequence is considered a perfect sequence. Otherwise, return “No”

**Perfect Sequences**
A perfect sequence is a sequence such that all of its elements are non-negative integers and the product of all of them is equal to their sum. For example: [2,2], [1,3,2] and [0,0,0,0] are perfect sequences and [4,5,6] and [0,2,-2] are not perfect sequences. Negative numbers of any kind are not valid in a perfect sequence

**Input Format**
An array of integers (may not be sorted)

**Sample Input**
[1,3,2]

**Sample Output**
Yes

**Explanation**
1 * 3 * 2 = 6 && 1 + 3 + 2 = 6

Screen capture of successful output:
![problem3](https://github.com/NaamaBarIlan/Prework-CodeChallenges/blob/master/PreworkCodeChallenges/PreworkCodeChallenges/images/problem3.png)

## Problem 4

**Name of Challenge: Sum of Rows**

Instructions of Challenge:

**Problem Statement**
Given a matrix of integers. Return the sum of each row in a single dimensional array.

**Input Format**
a multidimensional array with the dimensions of m x n (m = rows, n = columns).

duplicate integers are possible.
Negative numbers are possible
both m and n can vary in length
The user should specify the length and the width of the array within the console. To populate the numbers, you may randomly generate them, or have the user input one by one.

The method should take in the multidimensional array and return the single dimensional array with the sums

**Sample Input**
int[,] myArray = new int[3, 5] { { 1, 2, 3, 4, 5 }, { 6, 7, 8, 9, 10 }, { 11, 12, 13, 14, 15 } };
^^ The actual input would just be myArray, but the above code shows the pre-initialization before the method is called.

**Sample Output**
{15,40,65} <– an integer array

Screen capture of successful output:
![problem4](https://github.com/NaamaBarIlan/Prework-CodeChallenges/blob/master/PreworkCodeChallenges/PreworkCodeChallenges/images/problem4.png)

repository: NaamaBarIlan/Prework-CodeChallenges

gha_language: C#

repo_name: NaamaBarIlan/Prework-CodeChallenges


text:
---
layout: base
title:  'Statistics of OblTop in UD_Tupinamba-TuDeT'
udver: '2'
---

## Treebank Statistics: UD_Tupinamba-TuDeT: Features: `OblTop`

This feature is language-specific.
It occurs with 1 different values: `Yes`.

42 tokens (3%) have a non-empty value of `OblTop`.
30 types (4%) occur at least once with a non-empty value of `OblTop`.
25 lemmas (5%) occur at least once with a non-empty value of `OblTop`.
The feature is used with 1 part-of-speech tags: <tt>NOUN</tt> (42; 3% instances).

### `NOUN`

42 <tt>NOUN</tt> tokens (7% of all `NOUN` tokens) have a non-empty value of `OblTop`.

The most frequent other feature values with which `NOUN` and `OblTop` co-occurred: <tt>Case</tt><tt>=EMPTY</tt> (42; 100%), <tt>Nomzr</tt><tt>=EMPTY</tt> (42; 100%), <tt>Number</tt><tt>=EMPTY</tt> (42; 100%), <tt>Person</tt><tt>=EMPTY</tt> (42; 100%).

`NOUN` tokens may have the following values of `OblTop`:

* `Yes` (42; 100% of non-empty `OblTop`): sereków, iʔew, rereków, seków, joβasáβi, kutúki, mondoki, nongi, potɨrõw, reków

`OblTop` seems to be **lexical feature** of `NOUN`. 100% lemmas (25) occur only with one value of `OblTop`.

repository: UniversalDependencies/docs

branch_name: refs/heads/pages-source

gha_language: HTML

repo_name: UniversalDependencies/docs


text:
# artifacts.transform MultipleArtifact in Kotlin
This sample show how to add new classes to the set that will be used to create the dex files.
There are two lists that need to be used to obtain the complete set of classes because some
classes are present as .class files in directories and others are present in jar files.
Therefore, you must query both [ListProperty] of [Directory] and [RegularFile] to get the full list.

In this example, we only add classes the [ListProperty] of [Directory].

The [onVariants] block will wire the [AddClassesTask] [output] folder using
`wiredWith(AddClassesTask::output)`
to add classes to [MultipleArtifact.ALL_CLASSES_DIRS]

## To Run
./gradlew :app:assembleDebug
expected result : an APK with added types in its dex files.

repository: android/gradle-recipes

gha_language: Kotlin

repo_name: android/gradle-recipes


text:
# Migration Guide

## Migrating from v3 to v4

Version 4 of both the Authentication API SDK as well as the Management API SDK include breaking changes. This document will discuss the reason for these changes, as well as instructions on how to migrate to the new version.

### OIDC Conformance

The main reason for the breaking changes is related to improved OIDC compliance which was added to the Authentication API. Because of this, the behaviour of some of the existing Authentication API endpoints have changed, and other endpoints are being deprecated.

For a full background and other details please refer to the official [OIDC-conformant authentication migration guide](https://auth0.com/docs/api-auth/tutorials/adoption).

### Better separation of the Authentication and Management API

Because of the changes to the Authentication pipeline for OIDC conformance, some breaking changes were introduced and we are therefore required to increase the version number of the Authentication API SDK. One problem however was that some classes were shared in between the Authentication API SDK and the Management API SDK, in particular the information returned from the `/userinfo` endpoint.

In the new OIDC conformant pipeline this is not the case anymore, as the endpoint return claims which conform to the [OIDC standard](http://openid.net/specs/openid-connect-core-1_0.html#StandardClaims).

Because of this single instance of shared data between the Authentication and Management API SDKs, a lot of the _Models_ returned by the various methods has been stored in the [Auth0.Core NuGet package](https://www.nuget.org/packages/Auth0.Core). With version 4 this is not the case anymore.

All model classes are now stored in the NuGet package which they relate to. So all Authentication API SDK model classes are stored in the [Auth0.AuthenticationAPI NuGet package](https://www.nuget.org/packages/Auth0.AuthenticationApi). Likewise, all Management API SDK model classes are stored in the [Auth0.ManagementAPI NuGet package](https://www.nuget.org/packages/Auth0.ManagementApi).

The [Auth0.Core NuGet package](https://www.nuget.org/packages/Auth0.Core) only contains some shared classes used for communicating with the actual APIs, Exception classes etc.

The separation allows us to evolve these 2 packages in the future more easily in a separate directions.

## Difference between Version 3 and Version 4

Version 3 of the Auth0.NET SDK can still be used for applications which do not use the OIDC-conformant pipeline. For these applications you must install the following NuGet packages:

* [Auth0.AuthenticationAPI](https://www.nuget.org/packages/Auth0.AuthenticationApi) Version 3.x
* [Auth0.ManagementAPI](https://www.nuget.org/packages/Auth0.ManagementApi) Version 3.x
* [Auth0.Core](https://www.nuget.org/packages/Auth0.Core) Version 3.x

Version 4 of the Auth0.NET SDK **must be used** for applications which use the OIDC-conformant pipeline. For these applications you must install the following NuGet packages:

* [Auth0.AuthenticationAPI](https://www.nuget.org/packages/Auth0.AuthenticationApi) Version 4.x
* [Auth0.ManagementAPI](https://www.nuget.org/packages/Auth0.ManagementApi) Version 4.x
* [Auth0.Core](https://www.nuget.org/packages/Auth0.Core) Version 4.x

## List of changes

Here follows the list of changes made from Version 3 to Version 4 of the Auth0.NET SDK, with guidance on how to change your applications.

### Authentication API

* **Removed** all members previously marked as obsolete. This relates mostly to the methods which did not conform to the *Async naming convention for .NET `async` methods.

* **Deprecated** the `AuthenticateAsync()` method as the legacy `oauth/ro` endpoint has been disabled. You should use `GetTokenAsync(ResourceOwnerTokenRequest)` instead. `AuthenticateAsync()` has been changed to simply call the new `GetTokenAsync(ResourceOwnerTokenRequest)` method. Note that confidential clients will need to provide a `ClientSecret` in addition to the `ClientId`. For more information see the [Resource Owner Password grant type](https://auth0.com/docs/api/authentication#resource-owner-password).

* **Changed** the response of `AuthenticateAsync()` to now return an `AccessTokenResponse` instead of `AuthorizationResponse`.

* **Renamed** the `Connection` property in `AuthenticationRequest` class to `Realm`. It is also now optional. If the Connection is not provided in the `Realm` property, the Authentication API will use the connection specified as the Default Directory in the [Account Settings](https://manage.auth0.com/#/account). **As noted above however**, you should use `GetTokenAsync(ResourceOwnerTokenRequest)` instead.

* **Deprecated** the `GetDelegationTokenAsync(RefreshTokenDelegationRequest)` method. The token refresh exchange must be done using the `GetTokenAsync(RefreshTokenRequest)` method.

* **Renamed** the `AccessToken` class returned by authentication and token methods to `AccessTokenResponse`.

* **Changed** the response of the `GetUserInfoAsync()` method to return a `UserInfo` class instead of `User`. This is in order to conform to the [OIDC Specification](https://openid.net/specs/openid-connect-core-1_0.html#UserInfoResponse).

* **Removed** the `GetTokenInfoAsync()` method, based on the deprecated `/tokeninfo` endpoint.

* **Removed** the `GetAccessTokenAsync` method, based on the deprecated `/oauth/access_token` endpoint.

* **Removed** the `WithDevice()` method from `AuthorizationUrlBuilder`, because of obsoleted `device` parameter.

* **Added** support for adding `nonce`, `audience`, `response_mode` and multiple `response_type` parameters to the `/authorize` URL when using the `AuthorizationUrlBuilder` class. This was done by adding the `WithNonce()`, `WithAudience()`, `WithResponseMode()` and `WithResponseType()` methods.

* **Changed** `LogoutUrlBuilder` to now use the `v2/logout` endpoint.

* **Added** support for adding `federated` and `clientId` parameters to the `v2/logout` endpoint when using the `LogoutUrlBuilder` class. This was done by adding the `Federated()` and `WithClientId()` methods.

* **Removed** the unused `OAuthToken` class.

* **Moved** all model classes from the `Auth0.Core` NuGet package to the `Auth0.AuthenticationApi` NuGet package. For more information see the list of Core Classes which has been affected below.

### Management API

* **Moved** all model classes from the `Auth0.Core` NuGet package to the `Auth0.ManagementApi` NuGet package. For more information see the list of Core Classes which has been affected below.

### Core Classes

The following types have been moved from the `Auth0.Core` NuGet package. Below you can see the list of classes with their old and new namespaces. Please update your code accordingly.

Class | Old Namespace | New Namespace
---------|----------|---------
Addons | Auth0.Core | Auth0.ManagementApi.Models
BlacklistedTokenBase | Auth0.Core | Auth0.ManagementApi.Models
Client | Auth0.Core | Auth0.ManagementApi.Models
ClientApplicationType | Auth0.Core | Auth0.ManagementApi.Models
ClientBase | Auth0.Core | Auth0.ManagementApi.Models
ClientGrant | Auth0.Core | Auth0.ManagementApi.Models
ClientGrantBase | Auth0.Core | Auth0.ManagementApi.Models
Connection | Auth0.Core | Auth0.ManagementApi.Models
ConnectionBase | Auth0.Core | Auth0.ManagementApi.Models
DailyStatistics | Auth0.Core | Auth0.ManagementApi.Models
DeviceCredential | Auth0.Core | Auth0.ManagementApi.Models
DeviceCredentialBase | Auth0.Core | Auth0.ManagementApi.Models
EmailProvider | Auth0.Core | Auth0.ManagementApi.Models
EmailProviderBase | Auth0.Core | Auth0.ManagementApi.Models
EmailProviderCredentials | Auth0.Core | Auth0.ManagementApi.Models
EncryptionKey | Auth0.Core | Auth0.ManagementApi.Models
Identity | Auth0.Core | Auth0.ManagementApi.Models
Job | Auth0.Core | Auth0.ManagementApi.Models
JwtConfiguration | Auth0.Core | Auth0.ManagementApi.Models
LogEntry | Auth0.Core | Auth0.ManagementApi.Models
Mobile | Auth0.Core | Auth0.ManagementApi.Models
ResourceServer | Auth0.Core | Auth0.ManagementApi.Models
ResourceServerBase | Auth0.Core | Auth0.ManagementApi.Models
ResourceServerScope | Auth0.Core | Auth0.ManagementApi.Models
Rule | Auth0.Core | Auth0.ManagementApi.Models
RuleBase | Auth0.Core | Auth0.ManagementApi.Models
LoginRequest | Auth0.Core.Rules | Auth0.ManagementApi.Models.Rules
LoginRequestGeography | Auth0.Core.Rules | Auth0.ManagementApi.Models.Rules
LoginRequestQuery | Auth0.Core.Rules | Auth0.ManagementApi.Models.Rules
RulesContext | Auth0.Core.Rules | Auth0.ManagementApi.Models.Rules
RulesContextSsoConfiguration | Auth0.Core.Rules | Auth0.ManagementApi.Models.Rules
RulesContextStats | Auth0.Core.Rules | Auth0.ManagementApi.Models.Rules
RulesRequest | Auth0.Core.Rules | Auth0.ManagementApi.Models.Rules
ScopeEntry | Auth0.Core | Auth0.ManagementApi.Models
Scopes | Auth0.Core | Auth0.ManagementApi.Models
SigningAlgorithm | Auth0.Core | Auth0.ManagementApi.Models
SigningKey | Auth0.Core | Auth0.ManagementApi.Models
TenantErrorPage | Auth0.Core | Auth0.ManagementApi.Models
TenantSettings | Auth0.Core | Auth0.ManagementApi.Models
TenantSettingsBase | Auth0.Core | Auth0.ManagementApi.Models
Ticket | Auth0.Core | Auth0.ManagementApi.Models
TokenEndpointAuthMethod | Auth0.Core | Auth0.ManagementApi.Models
User | Auth0.Core | Auth0.ManagementApi.Models
UserBase | Auth0.Core | Auth0.ManagementApi.Models
UserBlock | Auth0.Core | Auth0.ManagementApi.Models
UserBlocks | Auth0.Core | Auth0.ManagementApi.Models


text:
Surveyo

    A One-Click Deployable App with

    A fully-managed GraphQL backend service

Deploy Now for free!

Surveyo is a sample app that provides users with a survey tool that they can use to quickly create and respond to surveys. Advanced users can use Surveyo’s GraphQL endpoint to run complex queries on survey results. This app demonstrates how to use React hooks with Apollo client to create surveys, collect responses, visualize responses with charts, export responses into CSV, and delete surveys. Deploying this app on Slash GraphQL deploys both the back-end database service and a front-end React app in a single click, no credit card required. To learn about this sample app, see: [Building a Survey Forms App with GraphQL](https://dgraph.io/blog/post/surveyo-into/).

### Features

- Supports Short Answer, Multiple-Choice Question, Date Query and Rating type of questions
- Visualize responses collected as Pie Chart, Word Cloud and Bar chart
- Provides inline GraphiQL IDE to make GraphQL queries to chart data directly
- Export survey responses into CSV.

### Front-end

- [React](https://reactjs.org/) (3.4.1)—a JavaScript library for building user interfaces.
- [Apollo Client](https://www.npmjs.com/package/apollo-client) (3.1.1)—a comprehensive state management library for JavaScript that enables you to manage both local and remote data with GraphQL.
- [Auth0 React](https://github.com/auth0/auth0-react)—Auth0 SDK for React Single Page Applications (SPA).
- [AntDesign](https://ant.design/)—a design system for enterprise-level products.
- [Chart.js](https://www.chartjs.org/)—a simple yet flexible JavaScript charting for designers & developers
- [TypeScript](https://www.typescriptlang.org/)—extends JavaScript by adding types.
- [GraphiQL](https://github.com/graphql/graphiql)—a graphical interactive in-browser GraphQL IDE

### Back-end

- [Slash GraphQL](https://dgraph.io/slash-graphql)—a fully managed GraphQL backend service
- [Auth0](https://auth0.com/)—Secure access for everyone.

### Links

- [Deploy Now](https://slash.dgraph.io/_/one-click?app=surveyo)
- [Blog: Building a Survey Forms App with GraphQL](https://dgraph.io/blog/post/surveyo-into/)
- [Demo](https://surveyo.one-click.cloud.dgraph.io/)
- [Community Support](https://discuss.dgraph.io/)

### Screenshots

#### Creating a form

#### Visualizations of responses

## Forking and running locally

### Environment variables

- To configure Surveyo with Slash GraphQL, create a `.env` file and add `REACT_APP_GRAPHQL_ENDPOINT` to the endpoint of your Slash cluster.

- In Slash GraphQl, Load the schema from schema.graphql present in this repo

- Start the frontend

### Auth0 Configuration

We use Auth0 for authorisation. The snippets for auth0 configuration are checked in the code [here](https://github.com/rahulgurnani/surveyo/tree/master/auth0_snippets). The steps of configuring Auth0 dashboard are mentioned in the blog post [here](https://dgraph.io/blog/post/surveyo-into/).
After configuring Auth0 dashboard, update the Auth0 config used in the code present in src/AuthConfig.json.


text:
# Painting in Clojure

by @tombooth

   - Picked up as an early 'learn clojure' project
   - Not a web project
   - Not just programming, reminded me of some basic physics

# Jackson Pollock

![Jackson Pollock: Number 8](img/number-8.jpg)

   - Famous 20th century abstract painter
   - Made 'drip painting' famous, a form of action paiting
   - Drips paints off brushes, sticks or bits of wood onto the cavnas
   - We are going to start our model by considering a single point of paint, rather than a path

# Defining our space - I

![](img/facts.jpg)

   - We need a space to work in and some basic physical details

# Defining our space - II

```{.clojure}
(def space [8   ;; width
            5   ;; height
            6]) ;; depth

(def gravity [0 -9.8 0])

(def canvas-normal [0 1 0])
```

   - Facts defined using def and given a name
   - These are composed of basic clojure types
   - All our measurements are in SI units with pixel conversion in drawing

# Picking a starting point

A gesture has to start somewhere inside of our defined space.

![](img/starting-point.jpg)

```{.clojure}
(defn starting-point []
  (map rand space))
```

   - A gesture has to start somewhere
   - A very expressive set of characters

# Projection - I

![](img/projection.jpg)

   - Our point needs to hit the canvas
   - Using basic equations of motion
   - We know the the canvas is at y = 0
   - We need ot find time to impact in order to find other values

# Projection - II

```{.clojure}
(defn time-to-canvas [position velocity acceleration]
  (let [a acceleration
        b (* 2 velocity)
        c (* 2 position)
        discriminant (- (* b b) (* 4 a c))
        minus-b (- 0 b)
        add-sqrt (/ (+ minus-b (Math/sqrt discriminant)) (* 2 a))
        minus-sqrt (/ (- minus-b (Math/sqrt discriminant)) (* 2 a))]
    (max add-sqrt minus-sqrt)))
```

   - Solved nicely using Quadratic Equation
   - One value will be negative so always pick the max

# Projection - III

```{.clojure}
(defn position-at [time initial-position initial-velocity acceleration]
  (+ initial-position
     (* initial-velocity time)
     (/ (* acceleration time time) 2)))

(defn velocity-at [time initial-velocity acceleration]
  (+ (* acceleration time) initial-velocity))

(defn project-point [position velocity]
  (let [[i j k]            position
        [vi vj vk]         velocity
        [ai aj ak]         gravity
        time               (time-to-canvas j vj aj)
        projected-position [(position-at time i vi ai)
                            0
                            (position-at time k vk ak)]
        projected-velocity [(velocity-at time vi ai)
                            (velocity-at time vj aj)
                            (velocity-at time vk ak)]]
    [projected-position
     projected-velocity]))
```

   - Now we have time to impact it is easy to derive everything else
   - For the position we can use the same function as we derieved the time with:
      + $r = r0 + v0 * t + \frac{at^2}{2}$
   - For velocity we can use: $v = at + v0$

   - An important aspect of Pollock's paintings is the splatter made
     as he flicks paint against the canvas, we are now going to look
     at how to work out whether this impact should splatter

# Splatter - I

![](img/impact.jpg)

   - We need to work out whether an impact should splatter
      + look at the impact force
      + Impact force derived from work-energy principle:
         * W=\Delta E_k=\tfrac12mv_2^2-\tfrac12mv_1^2,
   - We need to define a cutoff for this
   - If it does splatter we need to bounce the vector
   - Collision is inelastic so it should absorb some of the vector
      + inelastic means conservation of energy is not maintained and energy is lost
        through various means

# Splatter - II

```{.clojure}
;; B = V - (2 * (V.N) * N)

(defn dot-product [vector1 vector2]
  (reduce + (map * vector1 vector2)))

(defn vector-subtraction [vector1 vector2]
  (map - vector1 vector2))

(defn vector-multiply-by-constant [vector constant]
  (map #(* % constant) vector))

(defn bounce-vector [vector normal]
  (let [vector-dot-normal (dot-product vector normal)
        extreme (vector-multiply-by-constant normal (* 2 vector-dot-normal))]
    (vector-subtraction vector extreme)))
```

The equation to bounce a vector, $V$, off a plane with normal, $N$, is:

   - $N$ is the normal vector of the plane
   - $V$ = the incoming vector
   - $B$ is the outgoing, bounced, vector

$B = V - (2 * (V.N) * N)$

# Paths - I

![](img/bezier.jpg)

   - Parametric curves used in vector graphics because they scale indefinitely
   - Gives nice smooth curves
   - We need anchor, or control, points to calculate a bezier curve
   - Do a random walk in a random direction to define these

# Paths - II

```{.clojure}
(defn random-path [position step-vector bounds]
  (cons position
        (lazy-seq (random-path (vector-add (vector-add position step-vector)
                                           (random-vector-between (- 0 bounds) bounds))
                               step-vector bounds))))

(defn anchor-points [position min-distance max-distance min-steps max-steps variation]
  (let [direction        (random-unit-vector)
        distance         (random-between min-distance max-distance)
        steps            (random-between min-steps max-steps)
        step-vector      (vector-multiply-by-constant direction (/ distance steps))
        random-positions (take steps (random-path position step-vector variation))
        end-position     (vector-add position
                                     (vector-multiply-by-constant step-vector steps))]
    (conj (vec random-positions) end-position)))
```

   - Lazy seqs, they are aces
   - Random total distance and number of steps
   - These are then used to work out the anchor points
   - A known end point is used

# Paths - III

![](img/de-casteljau.jpg)

   - De casteljau is a recursive method for evaluating Bezier curves
   - Finding a point between two points (along a line)
   - De casteljau is just that on mainly lines in parallel

# Paths - IV

```{.clojure}
(defn recur-relation [t a b]
  (+ (* t b) (* a (- 1 t))))

(defn for-component [t component-vals]
  (if (= (count component-vals) 1)
    (first component-vals)
    (for-component t
      (map #(recur-relation t %1 %2) component-vals (rest component-vals)))))

(defn for-t [t components]
  (map #(for-component t %) components))

(defn de-casteljau [control-points step-amount]
  (let [x-vals (map first control-points)
        y-vals (map second control-points)
        z-vals (map #(nth % 2) control-points)
        points (map #(for-t % [x-vals y-vals z-vals]) (range 0 1 step-amount))]
    points))
```

   - Considers each dimension on its own
   - recur-relation is the weighted point calc

# A sense of motion - I

![](img/motion.jpg)

   - Linear model for paint volume and velocity
   - Sectors of path won't be even so need to consider velocity in sector

# A sense of motion - II

```{.clojure}
(defn velocity-between [point1 point2 total-time total-distance]
  (let [difference-vector (vector-subtraction point1 point2)
        time-between (* total-time (/ (distance-between-points point1 point2)
                                      total-distance))]
    (vector-divide-by-const difference-vector time-between)))

(defn path-velocities [path total-time]
  (let [total-distance   (path-length path)
        number-of-points (count path)]
    (conj (vec (map-2 #(velocity-between %1 %2
                                         total-time
                                         total-distance)
                      path))
          [0 0 0])))

(defn path-masses [path initial-mass]
  (let [number-of-points (count path)
        step (- 0 (/ initial-mass number-of-points))]
    (take number-of-points (range initial-mass 0 step))))
```

   - map-2 runs over pairs of numbers

# Pull it all together

<canvas id="pollock" style="width:80%"></canvas>

<button id="add">Add a stroke</button>
<button id="fill">Fill canvas</button>

repository: tombooth/painting-in-clojure

repo_name: tombooth/painting-in-clojure


text:
# Reddit-Purge
Simple python script using praw API to mass delete reddit submissions and/or comments.

## Features
* Supports login without password (OAuth), no need to disable 2FA
* Multiprocessing
* Redacts your messages (edit to something else) before deletion to prevent archiving.
* Requires only [praw](https://praw.readthedocs.io/en/latest/) and Python 3.5+ (runs on Windows/macOS/Linux). This project is intended to use minimum dependencies to offer longevity, better support and compatibility

## Installation

1. `git clone https://github.com/jogerj/reddit-purge.git`
2. `cd reddit-purge`
3. `pip -r install requirements.txt`
4. Configure `run.py` (see below)

## Getting API keys

1. Goto [User Settings > Privacy & Security > App Authorization > 'Create App'](https://old.reddit.com/prefs/apps/) ([Preview](https://user-images.githubusercontent.com/30559735/85273407-da069e80-b47d-11ea-93ba-02fe69e2016f.png))
2. Enter any name for your script (default = `PurgeBot`)
3. Set type to `script`
4. Enter `http://localhost:8080` as redirect url. (You can leave the rest blank)
5. Click Create

Use the script name, 14 chars client ID, and 30 chars key you're shown, enter them in `run.py`.

![image](https://user-images.githubusercontent.com/30559735/85273897-7df04a00-b47e-11ea-8b35-0e827d3d0cec.png)

```
username = '' # optional
password = '' # optional
user_agent = 'PurgeBot'
client_id = 'CLIENTIDq00zTA'
client_secret = 'SECRETswQ_r0u7ftiKlVojc4SECRET'
```
If username and/or password are left blank, OAuth will be used to acquire an access token.

If you encounter issues with secret key length (due to updating), delete the app from reddit and grab new API keys. Reddit recently changed secret key length from 27 to 30 chars.

<sup>**Disclaimer**: Configuration above is only an example. You will need to setup your own configuration!</sup>

## Usage
Run with `python3 run.py`

## Purge options
| Options                                               | Description                                                                                |
|-------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------|
| `limitation = None`                                   | Number of recent comments/submissions to delete. Set to None if no limits (purge ALL comments/submissions). Set to 10 will purge recent 10, etc. |
| `purge_comments = True`  `purge_submissions = True`   | Set to False to not purge comments/submissions.                                                                                |
| `redact_msg = "[redacted]"`                           | Edit comments/submissions to this before deletion. This prevents archiving.                                                                      |
| `redact_only = False`                                 | Set to True to only edit posts to `redact_msg` without deleting them.                                                                            |
| `use_multiprocessing = True`                          | Use multiprocessing. Set to False if problems occur                                                                                |
| `show_comment = True`                                 | Show comment body                                                                                |
| `show_title = True`                                   | Show submission titles                                                                                |
| `controversial_first = True`                          | Start purge from controversial first instead of newest                                                                                |
| `max_score = None`                                    | Only purge posts with `score <= max_score`. Set to None if no threshold                                                                          |
| `no_prompt = False`                                   | Set to True to not prompt at all. Use with EXTRA caution!                                                                                |
| `comment_whitelist = []` `submissions_whitelist = []` | Whitelist by ID e.g. `['id1', 'id2', 'id3']`                                                                                |
| `debug = False`                                       | Debug mode                                                                                |
## To-Do
* ~~Add whitelisting~~ Use `whitelist.txt`
* Use `.cfg` file
* Logging deleted posts

## More info
* [Request your reddit data](https://www.reddit.com/settings/data-request) (if you want to backup before deletion)
* [pip installation](https://pip.pypa.io/en/stable/installing/)
* [praw](https://praw.readthedocs.io/en/latest/)
* Original code based on [this post in r/learnpython](https://www.reddit.com/r/learnpython/comments/aoq9yj/reddit_script_to_delete_all_comments_and/)

repository: jogerj/reddit-purge

gha_language: Python

repo_name: jogerj/reddit-purge


text:
## PhotoAlbum

# Overview

This days most of us take hundreds of pictures weekly. With this numbers it's almost impossible to keep track of our best moment in life. Pictures need to be organized to be accessible; at the same time this isn't a trivial matter and could result in a tedious activity for the user.
Our web app intend to solve this issues, in particular is going to offer a way to classify pictures or groups of pictures by date, location, event, author and people in the picture. The classification will allow the user to retrieve the pictures using a search features and to create thematic albums. We already mention that this activity could be tedious so we would help the user by offering a auto-classification through a facial recognition feature and through a album suggestion feature.

# Features

* Pictures upload

* Photo gallery
* Access to pictures metadata

* Form submission for picture classification

* Search database by date, location, events and people

* Creation and visualization of photo albums
##Facial recognition

* Album suggestion feature

repository: RalfFV/PhotoAlbum

repo_name: RalfFV/PhotoAlbum


text:
## HTTP API
Permission management and maintenance, having the well defined suie of scripts can be easily automated using the Continous Integration approach.

The automation is particulary useful for the [[check actions|CheckActions]] based scripts. This way an auto health-check for permission scheme can inform about a critical misconfiguration.

### Operations

- [script list](#how-to-get-list-of-scripts)
- [upload script](#how-to-upload-script)
- [run script](#how-to-run-script)
- [run script asynchronously](#how-to-run-script-asynchronously)
- [validate script](#how-to-validate-script)
- [remove script](#how-to-remove-script)
- [history](#how-to-get-history-of-executed-scripts)

#### How to get list of scripts?

**Request**
```bash
curl -i -u admin:admin http://localhost:4502/bin/cqsm/list
```
Request has no available parameters to set.

**Response**
```bash
[
  {
  "fileName": "filename.cqsm",
  "author": "admin",
  "executionEnabled": true,
  "lastExecuted": "Oct 3, 2016 8:20:52 AM",
  "lastModified": "Sep 30, 2016 10:15:24 AM",
  "valid": true,
  "path": "/etc/cqsm/import/jcr:content/cqsmImport/filename.cqsm",
  "dryRunExecuted": true,
  "dryRunSuccessful": true,
  "executionMode": "ON_DEMAND"
  },
  {
  "fileName": "filename-2.cqsm",
  "author": "admin",
  "executionEnabled": true,
  "lastExecuted": "Oct 3, 2016 8:21:04 AM",
  "lastModified": "Sep 30, 2016 10:15:06 AM",
  "valid": true,
  "path": "/etc/cqsm/import/jcr:content/cqsmImport/filename-2.cqsm",
  "dryRunExecuted": true,
  "dryRunSuccessful": false,
  "executionMode": "ON_DEMAND"
  }
]
```
Response returns every properties set on the request:
* General node properties (i.e author, fileName, lastModified, path)
* Script specific properties:
  * dryRunExecuted - (Boolean) if dry run was executed
  * dryRunSuccessful - (Boolean) if script succeeded dry run
  * executionEnabled - (Boolean) if automated script execution is enabled
  * executionMode - (ON_DEMAND, ON_START, ON_MODIFY, ON_SCHEDULE). To get more information about automatic script execution modes read  [documentation](https://github.com/Cognifide/APM/wiki/Autorun) to get more information about
  * lastExecuted - (Date) - last time script was executed
  * valid - (Boolean) if script passes validation

#### How to upload script?
**Request**
```bash
curl -i -u admin:admin -H "file=permissions.cqsm" -X POST http://localhost:4502/bin/cqsm/fileUpload -F file=@"misc/example scripts/permissions.cqsm"
```
**Response**
```bash
[
  {
    "verified": true,
    "executionEnabled": true,
    "path": "/etc/cqsm/cqsmImport/jcr:content/cqsmImport/permissions.cqsm",
    "executionMode": "ON_DEMAND"
  }
]
```
#### How to run script?
**Request**

```bash
curl -i -u admin:admin -d "file=permissions.cqsm&mode=DRY_RUN" -X POST http://localhost:4502/bin/cqsm/run
```
Available modes to use:
* DRY_RUN,
* RUN,
* VALIDATION

```bash
[
  ...
  {
    "authorizable": "test_group",
    "actionName": "com.cognifide.cq.cqsm.foundation.actions.deny.Deny",
    "parameters": "/content/geometrixx/it /* ALL",
    "messages": [
      {
        "text": "Added deny privilege for test_group on /content/geometrixx/it",
        "type": "info"
      }
    ],
    "status": "SUCCESS"
  }
]
```

> This operation on large content may last few minutes and in that case it may result in network read timeout exception. If such error occurs please change to asynchronous model.

#### How to run script asynchronously?
To run asynchronously a user has to make `POST` request to `/bin/cqsm/run-background`. In the result there will be `id` of the job, which could be used later to ask for the job status.

To ask for a job status user have to make `GET` request to `/bin/cqsm/run-background` with `id` parameter. If the job is still running in the result the json object has type property with running value. After another requests the json object with type property finished should be returned, the result will contain also all messages for each instruction execution.

**Request**
```bash
curl -i -u admin:admin -d "file=permissions.cqsm&mode=DRY_RUN" -X POST http://localhost:4502/bin/cqsm/run-background
```
**Response**
```bash
{
  "id": "2016/4/22/9/42/0ea10a55-2dbb-4c1b-979c-98b9f1f7a73d_20",
  "type": "background",
  "message": "background"
}
```

**Request**
```bash
curl -i -u admin:admin -d "id=2016/4/22/9/42/0ea10a55-2dbb-4c1b-979c-98b9f1f7a73d_20" -X GET http://localhost:4502/bin/cqsm/run-background
```
**Response**
```bash
{
  "type": "running"
}
```

**Request**
```bash
curl -i -u admin:admin -d "id=2016/4/22/9/42/0ea10a55-2dbb-4c1b-979c-98b9f1f7a73d_20" -X GET http://localhost:4502/bin/cqsm/run-background
```
**Response**
```bash
{
  "type": "finished",
  "entries": [
    {
      "actionName": "Define",
      "command": "DEFINE path /content",
      "parameters": "path /content",
      "messages": [
        {
          "text": "Definition saved",
          "type": "info"
        }
      ],
      "status": "SUCCESS"
    },
    {
      "actionName": "CreateAuthorizable",
      "command": "CREATE USER author secret",
      "parameters": "author secret",
      "messages": [
        {
          "text": "Authorizable with id: author already exists, and is a User",
          "type": "error"
        }
      ],
      "status": "ERROR"
    }
  ]
}
```

> Job details are stored in memory only for 10 minutes after successful run. After that the json object with type: "unknown" will be returned.

#### How to validate script?
**Request**
```bash
curl -i -u admin:admin -d "content=CREATE USER foo" -X POST http://localhost:4502/bin/cqsm/validate
```
**Response**
```bash
{
  "message": "Script passes validation",
  "type": "success"
}
```

**Request**
```bash
curl -i -u admin:admin -d "content=IMPORT nonexisting.cqsm" -X POST http://localhost:4502/bin/cqsm/validate
```
**Response**
```bash
{
  "message": "Script does not pass validation",
  "error": "Included script: \u0027nonexisting.cqsm\u0027 does not exists.",
  "type": "error"
}
```

#### How to remove script?
**Request**
```bash
curl -i -u admin:admin -d "file=permissions.cqsm" -X POST http://localhost:4502/bin/cqsm/remove
```
**Response**
```bash
{
  "message": "Script removed successfully: /etc/cqsm/cqsmImport/jcr:content/cqsmImport/permissions.cqsm",
  "type": "success"
}
```

**Request**
```bash
curl -i -u admin:admin -d "confirmation=true" -X POST http://localhost:4502/bin/cqsm/remove
```
**Response**
```bash
{
  "message": "Scripts removed successfully, total: 1",
  "paths": [
    "/etc/cqsm/cqsmImport/jcr:content/cqsmImport/permissions.cqsm"
  ],
  "type": "success"
}
```

#### How to get history of executed scripts?
History can be filtered using optional **filter** parameter. Available filters:
* automatic run - for script executed [automatically](https://github.com/Cognifide/APM/wiki/Autorun) (automatic%20run)
* author - for script executed on author
* publish - for script executed on publish

**Request**
```bash
curl -i -u admin:admin -X GET http://localhost:4502/bin/cqsm/history?filter=publish
```
**Response**
```bash
[{
   "fileName": "filename.cqsm",
   "executionTime": "Sep 29, 2016 12:35:23 PM",
   "author": "admin",
   "uploadTime": "Sep 29, 2016 11:29:17 AM",
   "instanceType": "publish",
   "instanceHostname": "PUIG",
   "mode": "AUTOMATIC_RUN",
   "executor": "automatic run",
   "executionSummary": [
     {
       "messages": [
         {
           "text": "Definition saved",
           "type": "info"
         }
       ],
       "status": "SUCCESS"
     },
     {
       "messages": [
         {
           "text": "Authorizable with id: author already exists, and is a User",
           "type": "error"
         }
       ],
       "status": "ERROR"
     }
   ],
   "path": "/etc/cqsm/history/jcr:content/cqsmHistory/filename.cqsm1",
   "filePath": "/etc/cqsm/history/jcr:content/cqsmHistory/filename.cqsm1/script"
}]
```

repository: shwinnbin/APM

repo_name: shwinnbin/APM


text:
# Rolex

[![Build Status](https://travis-ci.org/hut8labs/rolex.svg?branch=master)](https://travis-ci.org/hut8labs/rolex)

`rolex` is a better `watch(1)`. It can run a command periodically, displaying
its output in the full width and height of the terminal, but it can also:

* run multiple commands in split panes, independently configured, that adjust
  to changes in terminal size
* dynamically change the time between runs of individual commands
* dynamically add and remove new commands
* pause and unpause command runs
* highlight differences in a command's output from the previous run ("diff
  last" mode) or against the output at a particular point in time ("diff mark"
  mode)
* highlight matches of a pattern in a command's output
* manually rerun a command
* render a time-series ASCII bar graph of the numerical values in a command's
  output

# Quick start

`rolex` is implemented in Python, in a single executable script, and has no
dependencies beyond the Python standard library.

    $ curl -L https://github.com/hut8labs/rolex/raw/master/rolex.py > rolex
    $ chmod +x rolex
    $ ./rolex command1 arg1 arg2 -- command2 arg1

Pressing "?" or "h" in `rolex` will display keybindings in `less` (or
`$PAGER`).

# A screenshot

![Rolex Screenshot](https://github.com/hut8labs/rolex/blob/master/doc/rolex.png?raw=true)

# Todo

Some work in progress and feature ideas:

* pane resizing/moving
* 256-color support
* graph mode
* friendly time ("2h23m ago")
* better configuration
* pausing/resuming individual commands

repository: mpapi/rolex

repo_name: mpapi/rolex


text:
# 5 - [Purpose](Purpose.md)

Ethereum’s purpose is not primarily to be a digital currency payment network. While the digital currency ether is both integral to and necessary for the operation of Ethereum, ether is intended as a utility currency to pay for use of the Ethereum platform as the world computer.

___
## Slide Screenshot
![005.png](../../images/1.%20Ethereum%20101/005.png)
___
## Slide Text
- Not currency
- Not Payment Network
- Ether -> Operation
- Necessary & Integral
- Utility Token
- Use -> Ethereum
- Pay -> Ether
___
## References
- [Ethereum Book: Chapter 01 - What is Ethereum](https://github.com/ethereumbook/ethereumbook/blob/develop/01what-is.asciidoc)
- [Youtube Reference](https://youtu.be/44qhIBMGMoM?t=1129)

path: /content/1. Ethereum101/Purpose.md


text:
---
hrs_structure:
  division: '2'
  volume: '8'
  title: '22'
  chapter: '412'
  section: '412:10-703'
type: hrs_section
tags:
  - Business
menu:
  hrs:
    identifier: HRS_0412-0010-0703
    parent: HRS0412
    name: '412:10-703 Money-type instruments'
weight: 24825
title: Money-type instruments
full_title: '412:10-703 Money-type instruments'
---
**§412:10-703 Money-type instruments**. A credit union may collect, receive and disburse monies in connection with the providing of negotiable checks, money orders, travelers checks, and other money-type instruments, and the providing of services through automated teller machines and for such other purposes as may provide benefit or convenience to its members. A credit union may charge fees for such services. [L 1993, c 350, pt of §1]

repository: SamMade/BlueAndKrabby

repo_name: SamMade/BlueAndKrabby


text:
# kindle-clippings

Parse Kindle My Clippings files as a Transform Stream

[![build status](https://secure.travis-ci.org/eugeneware/kindle-clippings.png)](http://travis-ci.org/eugeneware/kindle-clippings)

## Installation

This module is installed via npm:

``` bash
$ npm install kindle-clippings
```

## Example Usage

Copy the `My Clippings.txt` file from your Kindle and then use this module to parse it.

It will be parsed into `highlight`, `bookmark` and `note` entries:

``` js
var path = require('path'),
    fs = require('fs'),
    kindleClippings = require('kindle-clippings');

fs.createReadStream('./My Clippings.txt')
  .pipe(kindleClippings())
  .on('data', console.log);

/*
{ title: 'Better Than Before: Mastering the Habits of Our Everyday Lives (Rubin, Gretchen)',
  details:
   { type: 'highlight',
     location: { from: 1041, to: 1044 },
     time: Sat Jul 11 2015 16:27:48 GMT+1000 (AEST) },
  snippet: 'Outer disorder may act as a broken window. The “broken windows” theory of crime prevention was introduced in the 1980s by social scientists who observed that when a community tolerates disorder and petty crime, such as breaking of windows, graffiti, turnstile jumping, or drinking in public, people are more likely to commit more serious crimes. As a law enforcement theory, it’s controversial; but whether or not it’s true on a community-wide level, it’s true on a personal level.' }

  ...

{ title: 'Better Than Before: Mastering the Habits of Our Everyday Lives (Rubin, Gretchen)',
  details:
   { type: 'bookmark',
     page: { from: 91, to: 91 },
     location: { from: 1409, to: 1409 },
     time: Sat Jul 11 2015 19:51:11 GMT+1000 (AEST) },
  snippet: '' }

 ...

{ title: 'The Shallows: What the Internet Is Doing to Our Brains (Carr, Nicholas)',
  details:
   { type: 'note',
     location: { from: 1908, to: 1908 },
     time: Tue Jul 14 2015 16:26:26 GMT+1000 (AEST) },
  snippet: 'It\'s interesting that in most of history, there has always been a great disparity between th number of content creators and content consumers. Thus, those who posess the skils and will to create content have influnce over those who choose only to consume. Perhaps this is changing somewhat with social media, but the fragment of thought are not persuasive as an article or video which has the structure of a beginning, middle and end.' }
*/
```

repository: eugeneware/kindle-clippings

repo_name: eugeneware/kindle-clippings


text:
# VSLR UI Kit for React Native

This project was bootstrapped with [CRNA](https://github.com/react-community/create-react-native-app), [Storybook](https://github.com/storybooks/storybook/tree/master/app/react-native), & [Lerna](https://lernajs.io/).

You can find the expo community app [here](https://expo.io/@vivintsolar/vslr-ui-kit) or if you already have [expo](https://expo.io/) installed on your phone then scan the QR code down below 👇🏼

<img  alt="Expo QR Code" src="https://raw.githubusercontent.com/vivintsolar-oss/react-native-components/master/assets/QR.png" width="300" />

repository: fozzylyon/react-native-components

repo_name: fozzylyon/react-native-components


text:
[![DOI](https://zenodo.org/badge/538743822.svg)](https://zenodo.org/badge/latestdoi/538743822)

# Setup from Scratch for Ubuntu

This is how I would set up the tool to run on a fresh Ubuntu instance.
Everything I download that isn't an apt package is downloaded to the
home directory: `/home/ubuntu/`.

- Clone this Repo
  - https://github.com/cvick32/ConditionalHistory.git
- Update Apt
  - `sudo apt update`
- Install IC3IA
  - `wget https://es-static.fbk.eu/people/griggio/ic3ia/ic3ia-22.07.tar.gz`
  - `tar -xvf ic3ia-22.07.tar.gz`
  - `mv ic3ia-22.07.tar.gz ic3ia`
  - Install MathSAT
    - `wget https://mathsat.fbk.eu/download.php?file=mathsat-5.6.8-linux-x86_64.tar.gz`
    - `tar -xvf 'download.php?file=mathsat-5.6.8-linux-x86_64.tar.gz'`
  - Install Cmake
    - `sudo apt install cmake`
  - Install g++
    - `sudo apt install g++`
    - `export CXX=g++`
  - Install gmp
    - `sudo apt install libgmp3-dev`
  - `cd ic3ia`
  - `mkdir build`
  - `cd build`
  - `cmake .. -DMATHSAT_DIR=/home/ubuntu/mathsat -DCMAKE_BUILD_TYPE=Release`
  - `make`
  - Copy IC3IA to `/usr/bin/`
    - `sudo cp ic3ia /usr/bin/`
- Install Python3
  - `sudo apt install python3 python3-pip python3.10-venv`
- Install Java 11 or greater
  - `sudo apt install openjdk-17-jre-headless`
- Change directory to ConditionalHistory
  - `cd ConditionalHistory`
- Create a virtual environment
  - `python3 -m venv ch`
- Activate environment
  - `source ch/bin/activate`
- Install requirements
  - `python -m pip install -r requirements.txt`
- Test that everything is working
  - `cd src`
  - `python run_benchmarks.py CondHist multiple --only_run=array_hybr_sum.smt2`

These steps must be done in order to run the tool! Make sure that in
the terminal there is an environment that precedes the command line.
For instance, for a virtual environment named `ch`, after the
environment is activated the command line of the terminal should be
preceded by `(ch)`.

# Paper Results
To see the result of each benchmark set on each tool you can look at
the corresponding python script. For example, if you want to see how
CondHist performed on the single loop benchmarks set you would open
the file:
`ConditionalHistory/paper-results/CondHist/aeval-single-results.py`.

To see the numbers from the paper for each tool, benchmark combination
run the `showPaperResults.sh` script in the top-level directory.

# Running Experiments
There are 3 different branches in this git repository. The main branch
contains the code to run the following tools: CondHist, GSpacer, and
Quic3. The UnCondHist1 branch contains the code for the UnCondHist1
variant and the branch UnCondHist1 contains the code for the
UnCondHist2 variant.

Everytime an experiment is run it will update the python script that
logs the results of that run in `./results/{tool_name}/`.

- Change directories to `src`
  - `cd src`
- Run all benchmarks on our tool
  - `python run_benchmarks.py CondHist all`
- Run 20 single-loop benchmarks on our tool
  - `python run_benchmarks.py CondHist single --subset=20`
- Run 5 multi-loop benchmarks on Quic3
  - `python run_benchmarks.py Quic3 multiple --subset=5`
- Run the `array_copy.smt2` benchmark on our tool
  - `python run_benchmarks.py CondHist single --only_run=array_copy.smt2`

All results will be in python files that can be viewed in the
top-level directory under `results/{tool_name}/`.

## Watching Results

If at any point a certain benchmarks hangs, you can C-c out of that
particular benchmark run and continue with the rest. The alternative
is to close the entire shell session which will kill the entire
benchmark run.

## run_benchmarks.py Arguments

- Tool Name
  - one of {CondHist, Quic3, GSpacer, UnCondHist1, UnCondHist2}
- Benchmark set
  - one of {all, single, multiple}
- Subset of benchmarks
  - defaults to all
  - run specified number of benchmarks
- Only run a particular file

## Other Branches

The versions of our tool that introduce unconditional history
variables are on separate branches. To run `UnCondHist1`, which is our
implementation of the algorithm described
[here](https://cs.stanford.edu/~padon/arrays-prophecy-tacas2021.pdf),
run the following command: `git switch UnCondHist1`.

To run `UnCondHist2`, which uses our algorithm for finding axiom
violations but unconditional history variables, run: `git switch
UnCondHist2`.

Once you have switched branches, you can use the `run_benchmark.py`
script detailed above to try the tool with the different benchmark
sets.

To get back to the main branch run: `git switch main`.

## Output Files

To view the output of our tool, first run a benchmark: `python
run_benchmark.py CondHist single --only_run=array_copy.smt2`.

Then, after that command terminates, view the `out.vmt` file in the
`src` directory. This file is runnable in `ic3ia` like so: `ic3ia
out.vmt`.

## "Interesting" Benchmarks

To find a benchmark that requires synthesizing a history condition you
can look in the `interp` dictionary of
`paper-results/CondHist/aeval-multiple-results.py`.

Then, to run that benchmark, for instance `array_hybr_sum.smt2`, run:

`python run_benchmarks.py CondHist multiple --only_run=array_hybr_sum.smt2`

# Reproducing Results
To reproduce all the results from the paper in full you will need to
run the following commands:

- on branch `main`
  - `python run_benchmarks.py CondHist all`
  - `python run_benchmarks.py GSpacer all`
  - `python run_benchmarks.py Quic3 all`

- on branch `UnCondHist1`
  - `python run_benchmarks.py UnCondHist1 all`

- on branch `UnCondHist2`
  - `python run_benchmarks.py UnCondHist2 all`

Note that each of these commands will take from 1 to 2 hours to
complete. To run a subset of the benchmarks, use the `--subset`
command line argument, demonstrated above.

branch_name: refs/heads/main


text:
# SwordRPC - A Discord Rich Presence Library for Swift

[![Swift Version](https://img.shields.io/badge/Swift-4.0-orange.svg?style=flat-square)](https://swift.org) [![Tag](https://img.shields.io/github/tag/Azoy/SwordRPC.svg?style=flat-square&label=release&colorB=)](https://github.com/Azoy/SwordRPC/releases)

## Requirements
1. macOS, Linux
2. Swift 4.0

## Adding SwordRP
### CocoaPods
Edit your Podfile to add this dependency:

```ruby
platform :osx, '10.11'

target 'yourappnamehere' do
  use_frameworks!
  pod 'SwordRPC'
end
```

## Example
### Callbacks
```swift
import SwordRPC

/// Additional arguments:
/// handlerInterval: Int = 1000 (decides how fast to check discord for updates, 1000ms = 1s)
/// autoRegister: Bool = true (automatically registers your application to discord's url scheme (discord-appid://))
/// steamId: String? = nil (this is for steam games on these platforms)
let rpc = SwordRPC(appId: "123")

rpc.onConnect { rpc in
  var presence = RichPresence()
  presence.details = "Ranked | Mode: \(mode)"
  presence.state = "In a Group"
  presence.timestamps.start = Date()
  presence.timestamps.end = Date() + 600 // 600s = 10m
  presence.assets.largeImage = "map1"
  presence.assets.largeText = "Map 1"
  presence.assets.smallImage = "character1"
  presence.assets.smallText = "Character 1"
  presence.party.max = 5
  presence.party.size = 3
  presence.party.id = "partyId"
  presence.secrets.match = "matchSecret"
  presence.secrets.join = "joinSecret"
  presence.secrets.joinRequest = "joinRequestSecret"

  rpc.setPresence(presence)
}

rpc.onDisconnect { rpc, code, msg in
  print("It appears we have disconnected from Discord")
}

rpc.onError { rpc, code, msg in
  print("It appears we have discovered an error!")
}

rpc.onJoinGame { rpc, secret in
  print("We have found us a join game secret!")
}

rpc.onSpectateGame { rpc, secret in
  print("Our user wants to spectate!")
}

rpc.onJoinRequest { rpc, request, secret in
  print("Some user wants to play with us!")
  print(request.username)
  print(request.avatar)
  print(request.discriminator)
  print(request.userId)

  rpc.reply(to: request, with: .yes) // or .no or .ignore
}

rpc.connect()
```

### Delegation
```swift
import SwordRPC

class ViewController {
  override func viewDidLoad() {
    let rpc = SwordRPC(appId: "123")
    rpc.delegate = self
    rpc.connect()
  }
}

extension ViewController: SwordRPCDelegate {
  func swordRPCDidConnect(
    _ rpc: SwordRPC
  ) {}

  func swordRPCDidDisconnect(
    _ rpc: SwordRPC,
    code: Int?,
    message msg: String?
  ) {}

  func swordRPCDidReceiveError(
    _ rpc: SwordRPC,
    code: Int,
    message msg: String
  ) {}

  func swordRPCDidJoinGame(
    _ rpc: SwordRPC,
    secret: String
  ) {}

  func swordRPCDidSpectateGame(
    _ rpc: SwordRPC,
    secret: String
  ) {}

  func swordRPCDidReceiveJoinRequest(
    _ rpc: SwordRPC,
    request: JoinRequest,
    secret: String
  ) {}
}
```

## Links
Join the [API Channel](https://discord.gg/99a3xNk) to ask questions!

repository: spotlightishere/SwordRPC

repo_name: spotlightishere/SwordRPC


text:
SpriteJS creates a scene, which is used to manage the Layer, dispatch events, and implement screen adaptation.

## Create Scene

SpriteJS create a Scene with a DOM container.

```js
import { Scene } from 'spritejs'

const scene = new Scene('#container')
```

Scene supports some configuration parameters. The supported parameters are as follows:

##### resolution

Specifies the resolution to create the Scene. This parameter can be an array `[width, height]` or a special string `'flex'`.

```js
const scene = new Scene('#container', {
  resolution: [700, 700],
  viewport: [350, 350],
})
```

#### flexible resolution

The resolution can be set to `'flex'`, when the viewport changes, the `flex` resolution is automatically set to twice the width of the viewport.

The effect of setting resolution to `flex`, see [this example](http://spritejs.org/demo/#proton_position)

##### stickMode

SpritJS can adapting to different devices and can be set to 12 different stick modes.

| Property Name | Property Type | Value | Description |
| --- | --- | --- | --- |
| stickMode | Enum | `"width"`,`"height"`,`"top"`,`"bottom"`,`"left"`,`"right"` | 6 stick mode to adapt different containers |
| stickExtend | Boolean | `true`,`false` | If `stickExtend` is set to true, the Canvas width and height are expand to fit the width and height of the container. |

height: <input id="heightBtn" type="range" value="0"></input>

stickExtend：<input id="extendBtn" type="checkbox"></input>

#### viewport

Setting the viewport will affect the canvas's style width and height.

Viewport can set to be `auto`, if the viewport is `auto`, SpriteJS will automatelly register a `resize` event to the current window.

## appendChild()

`appendChild(layer)` Add a layer to the scene.

## appendLayer()

`appendLayer(layer)` The same as appendChild.

## delegateEvent()

`delegateEvent(event, receiver = this.container)` Delegate a DOM event to the corresponding element.

## dispatchEvent()

`dispatchEvent(type, event)` Dispatch custom events. The event will be dispatched to the scene itself immediately, and the browser will create a CustomEvent object and dispatch it to the Container.

## hasLayer()

`hasLayer(layer)` Determine if the layer is on the current scene.

## insertBefore()

`insertBefore(newLayer, refLayer)` Insert a Layer before the specified Layer.

## layer()

`layer(id = default, options = {})` Create a layer with the corresponding id. See [Layer](/en/doc/layer) for details.

## layers()

Get all the layers on the scene.

## preload()

`await scene.preload(...resources)` preloads resources. This is an asynchronous method that can accept urls or frame array or resource objects, and the browser will preload the resource of sprites.

## removerChild()

`removeChild(layer)` Remove a Layer from the Scene.

## removeLayer()

`removeLayer(layer)` The same as removeChild.

## resolution

Get or set resolution.

## snapshot()

`await scene.snapshot()` Asynchronous method, returns a canvas object for the current scene screenshot.

```js
const canvas = await scene.snapshot()
fs.writeFileSync('snap.png', canvas.toBuffer())
```

## viewport

Get or set viewport.

license: ISC,MIT

repository: hamger/spritejs

detected_licenses: ISC MIT

repo_name: hamger/spritejs


text:
---
title: "Toolmaking"
date: 2018-11-28T15:14:39+10:00
featured: true
draft: false
weight: 2
---

Our toolroom enables us to manufacture new and repair existing tooling on site. Consisting of a large array of technology to keep new tooling and press repair to its optimum time scales. The toolroom consists of Lathe’s for turned parts, Jig borer’s for milling and precision hole drilling and tapping as well as various grinding machines (surface, CNC, diaform and cylindrical), CNC milling machinery for fast and accurate milling. We also have a Charmille Wire erosion machine, capable of cutting extremely complex shapes and with extreme accuracy.


text:
swift-compress-encrypt-middleware
=======================

Code for OpenStack Swift middleware. When an object is uploaded, we compress and then encrypt the object in the background. This can save space in the backend, and secure the data.

This compression and encryption is transparent to end users.

Install:

Install the middleware first:

    pip install -r requirements.txt
    python setup.py install

Compress middleware and encrypt middleware can be used separately or combined.

Configure:

For example, put the compress and/or encrypt before the app proxy-server

    pipeline = catch_errors gatekeeper healthcheck proxy-logging cache bulk tempurl ratelimit crossdomain container_sync tempauth staticweb container-quotas account-quotas slo dlo versioned_writes proxy-logging compress encrypt proxy-server

Then add the filters here:

    [filter:encrypt]
    use = egg:myswift#encrypt
    encrypt_suffix = .encryptF4ASqYLMzx
    password = password123456

    [filter:compress]
    use = egg:myswift#compress
    compress_suffix = .compressF4ASqYLMzx

Make the encrypt_suffix and compress_suffix unique by adding random characters. This is an identifier indicating the object type(compressed or encrypted).


text:
# Brooglie

This software solves the time-independent Schödinger equation for the
1D, 2D and 3D cases employing a finite difference method. For example,
to solve the 1D quantum harmonic oscillator one can use the following
snippet:

```julia
using Brooglie

m = 1
ω = 1
a,b = -10,10 # Limits of the box

# Use atomic units!
V(x) = 0.5*m*ω*x^2

# Find the first 5 eigenstates
E, v = solve1D(V, a=a, b=b, m=m, nev=5)
```

`E` will be in Hartree (atomic units), remember that one Hartree is
equivalent to 27.21 eV. As expected, we obtain E≃ω(n+½) noticing that
ℏ=1 in these units:

|  Analytical     | Numerical  |
| :-------------: | :--------: |
|  0.5            |  0.500952  |
|  1.5            |  1.50275   |
|  2.5            |  2.50436   |
|  3.5            |  3.50576   |
|  4.5            |  4.50696   |

In the array `v` we find 5 vectors, one for each eigenstate:

![alt text](https://github.com/RedPointyJackson/Brooglie/blob/master/harmonic_eigen.png "Eigenstates of the harmonic oscillator")

Read the help of `solve1D`, `solve2D` and `solve3D` to see all the
available options.

### TODO

- [ ] Fix all the tests, some will need to tweak `N` or `maxiters` after the last commits.
- [ ] Add an hydrogen atom to the tests.

repository: frssp/Brooglie

repo_name: frssp/Brooglie


text:
# VincentAugugliaro_6_07042021

Repository for project 6 of the web developer path at OpenClassrooms

## Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

### Prerequisites

To make this API work, you need to have access to a MongoDB Atlas account ( https://www.mongodb.com/cloud/atlas/signup ) in read/write mode.
You need to run the frontend server that you can find on the following repository:

```
https://github.com/OpenClassrooms-Student-Center/dwj-projet6
```

### Installing

From the root folder of the clone project locally on your machine, install all :

```
npm install
```

Create your own ```.env``` file from the ```.env.example``` file to set up your environment variables.
Follow the template on the right:

```
# App
APP_PORT=yourPortNumberHere

# DB
DB_NAME=yourDataBaseNameHere
DB_USER=yourUserNameHere
DB_PASSWORD=yourPasswordHere

# Token
TOKEN_KEY=yourSecretKey
TOKEN_DURATION=yourTokenTimeLife
```

Then start the backend server:

```
node server.js
```

## Built With

* [Mongo](https://docs.atlas.mongodb.com/) - a fully-managed cloud database
* [Express](https://expressjs.com/en/starter/installing.html) - a minimal and flexible Node.js web application framework
* [Node](https://nodejs.org/en/docs/) - a JavaScript runtime

## Versioning

I use [GitHub](https://github.com/) for versioning. For the versions available, see the [tags on this repository](https://github.com/AVincent06/VincentAugugliaro_6_20210408/tags).

## Author

* **Vincent Augugliaro** - *Initial work* - [My GitHub Profile](https://github.com/AVincent06)

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details

## Acknowledgments

* Thanks to Will Alexander and his course "Go Full Stack with Node.js, Express and MongoDB" which allowed me to set up the right structure. https://openclassrooms.com/fr/courses/6390246-passez-au-full-stack-avec-node-js-express-et-mongodb
* Thanks to my mentor Guillaume Gasperi for his support.

gha_language: JavaScript


text:
vim-wakatime
============

Quantify your coding inside Vim.

Installation
------------

1. Install [Vundle](https://github.com/gmarik/vundle), the Vim plugin manager.

2. Using [Vundle](https://github.com/gmarik/vundle):

  `echo "Bundle 'wakatime/vim-wakatime'" >> ~/.vimrc && vim +BundleInstall`

  or using [Pathogen](https://github.com/tpope/vim-pathogen):

  `cd ~/.vim/bundle && git clone git://github.com/wakatime/vim-wakatime.git`

3. Enter your [api key](https://wakatime.com/settings#apikey), then press `enter`.

4. Use Vim and your coding activity will be displayed on your [WakaTime dashboard](https://wakatime.com).

Note: WakaTime depends on [Python](http://www.python.org/getit/) being installed to work correctly.

Screen Shots
------------

![Project Overview](https://wakatime.com/static/img/ScreenShots/Screen-Shot-2016-03-21.png)

Configuring
-----------

#### Custom Commands:

* `:WakaTimeApiKey` - change the api key saved in your `~/.wakatime.cfg`
* `:WakaTimeDebugEnable` - enable debug mode (may slow down Vim so disable when finished debugging)
* `:WakaTimeDebugDisable` - disable debug mode
* `:WakaTimeScreenRedrawEnable` - temporarily enable screen redraw to prevent artifacts
* `:WakaTimeScreenRedrawDisable` - disable screen redraw for performance

#### Vimrc Settings:

    let g:wakatime_PythonBinary = '/usr/bin/python'

Tells the plugin to use a custom python binary.
The default is to use `python` from your system PATH.

    let g:wakatime_ScreenRedraw = 1

Enables redrawing the screen after sending heartbeats, to prevent screen artifacts in case a key was pressed while the plugin executed.

WakaTime plugins share a common config file located in your user home folder at `~/.wakatime.cfg` with [common plugin settings][wakatime-cli-config].

Troubleshooting
---------------

Run `:WakaTimeDebugEnable` in Vim then run this Terminal command:

`tail -f ~/.wakatime.log`

Enabling Debug Mode writes Vim Script errors to your Vim Status Bar and tells [wakatime-cli][wakatime-cli] to write verbose logs to `$WAKATIME_HOME/.wakatime.log`.

Debug mode can make it hard to find the real error because of all the extra logging, so also try disabling Debug Mode while tailing `~/.wakatime.log` and editing files in Vim.
With Debug Mode enabled, the plugin sends data synchronously so disable it when finished debugging with `:WakaTimeDebugDisable`.

The [How to Debug Plugins][how to debug] guide shows how to check when coding activity was last received from Vim use the [User Agents API][user agents api].
For more general troubleshooting info, see the [wakatime-cli Troubleshooting Section][wakatime-cli-help].

Uninstalling
------------

Remove `Bundle 'wakatime/vim-wakatime'` from your `.vimrc` file, then delete your `~/.wakatime.cfg` config file.

[wakatime-cli]: https://github.com/wakatime/wakatime
[wakatime-cli-config]: https://github.com/wakatime/wakatime#configuring
[wakatime-cli-help]: https://github.com/wakatime/wakatime#troubleshooting
[how to debug]: https://wakatime.com/faq#debug-plugins
[user agents api]: https://wakatime.com/developers#user_agents

repository: neverlock/golang

repo_name: neverlock/golang