text:
skavanagh/KeyBox: KeyBox is a web-based SSH console that centrally manages administrative access to systems. Web-based administration is combined with management and distribution of user's public SSH keys.
https://github.com/skavanagh/KeyBox

KeyBox

KeyBox is a web-based SSH console that centrally manages administrative access to systems. Web-based administration is combined with management and distribution of user's public SSH keys. Key management and administration is based on profiles assigned to defined users.

Administrators can login using two-factor authentication with FreeOTP or Google Authenticator. From there they can manage their public SSH keys or connect to their systems through a web-shell. Commands can be shared across shells to make patching easier and eliminate redundant command execution.

KeyBox layers TLS/SSL on top of SSH and acts as a bastion host for administration. Protocols are stacked (TLS/SSL + SSH) so infrastructure cannot be exposed through tunneling / port forwarding. More details can be found in the following whitepaper: The Security Implications of SSH. Also, SSH key management is enabled by default to prevent unmanaged public keys and enforce best practices.

Terminals

AMI in the AWS Marketplace

If you are using AWS, the simplest way to get started is to run the AMI from the AWS marketplace.

http://aws.amazon.com/marketplace/pp/B076PNFPCL

Once the KeyBox instance is up and running, open your browser to https://<EC2 Instance IP>:443

Login with

username:admin
password:<Instance ID>
In order to help register new EC2 instances, the KeyBox public can be found under 'Settings -> Public Key' and should be imported as an EC2 Key Pair in the AWS console.

Prerequisites

Java JDK 1.8 or greater http://www.oracle.com/technetwork/java/javase/downloads/index.html

Browser with Web Socket support http://caniuse.com/websockets (Note: In Safari if using a self-signed certificate you must import the certificate into your Keychain. Select 'Show Certificate' -> 'Always Trust' when prompted in Safari)

Maven 3 or greater http://maven.apache.org (Only needed if building from source)

Install FreeOTP or Google Authenticator to enable two-factor authentication with Android or iOS

Application	Android	iOS
FreeOTP	Google Play	iTunes
Google Authenticator	Google Play	iTunes
To Run Bundled with Jetty

Download keybox-jetty-vXX.XX.tar.gz

https://github.com/skavanagh/KeyBox/releases

Export environment variables

for Linux/Unix/OSX

 export JAVA_HOME=/path/to/jdk
 export PATH=$JAVA_HOME/bin:$PATH
for Windows

 set JAVA_HOME=C:\path\to\jdk
 set PATH=%JAVA_HOME%\bin;%PATH%
Start KeyBox

for Linux/Unix/OSX

    ./startKeyBox.sh
for Windows

    startKeyBox.bat
How to Configure SSL in Jetty (it is a good idea to add or generate your own unique certificate)

http://www.eclipse.org/jetty/documentation/current/configuring-ssl.html

To Build from Source

Export environment variables

export JAVA_HOME=/path/to/jdk
export M2_HOME=/path/to/maven
export PATH=$JAVA_HOME/bin:$M2_HOME/bin:$PATH
In the directory that contains the pom.xml run

mvn package jetty:run
Note: Doing a mvn clean will delete the H2 DB and wipe out all the data.

Using KeyBox

Open browser to https://<whatever ip>:8443

Login with

username:admin
password:changeme
Note: When using the AMI instance, the password is defaulted to the <Instance ID>. Also, the AMI uses port 443 as in https://<Instance IP>:443

Steps:

Create systems
Create profiles
Assign systems to profile
Assign profiles to users
Users can login to create sessions on assigned systems
Start a composite SSH session or create and execute a script across multiple sessions
Add additional public keys to systems
Disable any administrative public key forcing key rotation.
Audit session history
Managing SSH Keys

By default KeyBox will overwrite all values in the specified authorized_keys file for a system. You can disable key management by editing KeyBoxConfig.properties file and use KeyBox only as a bastion host. This file is located in the jetty/keybox/WEB-INF/classes directory. (or the src/main/resources directory if building from source)

#set to false to disable key management. If false, the KeyBox public key will be appended to the authorized_keys file (instead of it being overwritten completely).
keyManagementEnabled=false
Also, the authorized_keys file is updated/refreshed periodically based on the relationships defined in the application. If key management is enabled the refresh interval can be specified in the KeyBoxConfig.properties file.

#authorized_keys refresh interval in minutes (no refresh for <=0)
authKeysRefreshInterval=120
By default KeyBox will generated and distribute the SSH keys managed by administrators while having them download the generated private. This forces admins to use strong passphrases for keys that are set on systems. The private key is only available for download once and is not stored on the application side. To disable and allow administrators to set any public key edit the KeyBoxConfig.properties.

#set to true to generate keys when added/managed by users and enforce strong passphrases set to false to allow users to set their own public key
forceUserKeyGeneration=false
Supplying a Custom SSH Key Pair

KeyBox generates its own public/private SSH key upon initial startup for use when registering systems. You can specify a custom SSH key pair in the KeyBoxConfig.properties file.

For example:

#set to true to regenerate and import SSH keys  --set to true
resetApplicationSSHKey=true

#SSH Key Type 'dsa' or 'rsa'
sshKeyType=rsa

#private key  --set pvt key
privateKey=/Users/kavanagh/.ssh/id_rsa

#public key  --set pub key
publicKey=/Users/kavanagh/.ssh/id_rsa.pub

#default passphrase  --leave blank if passphrase is empty
defaultSSHPassphrase=myPa$$w0rd
After startup and once the key has been registered it can then be removed from the system. The passphrase and the key paths will be removed from the configuration file.

Adjusting Database Settings

Database settings can be adjusted in the configuration properties.

#Database user
dbUser=keybox
#Database password
dbPassword=p@$$w0rd!!
#Database JDBC driver
dbDriver=org.h2.Driver
#Connection URL to the DB
dbConnectionURL=jdbc:h2:keydb/keybox;CIPHER=AES;
By default the datastore is set as embedded, but a remote H2 database can supported through adjusting the connection URL.

#Connection URL to the DB
dbConnectionURL=jdbc:h2:tcp://<host>:<port>/~/keybox;CIPHER=AES;
External Authentication

External Authentication can be enabled through the KeyBoxConfig.properties.

For example:

#specify a external authentication module (ex: ldap-ol, ldap-ad).  Edit the jaas.conf to set connection details
jaasModule=ldap-ol
Connection details need to be set in the jaas.conf file

ldap-ol {
	com.sun.security.auth.module.LdapLoginModule SUFFICIENT
	userProvider="ldap://hostname:389/ou=example,dc=keybox,dc=com"
	userFilter="(&(uid={USERNAME})(objectClass=inetOrgPerson))"
	authzIdentity="{cn}"
	useSSL=false
	debug=false;
};
Administrators will be added as they are authenticated and profiles of systems may be assigned by full-privileged users.

User LDAP roles can be mapped to profiles defined in KeyBox through the use of the org.eclipse.jetty.jaas.spi.LdapLoginModule.

ldap-ol-with-roles {
    //openldap auth with roles that can map to profiles
    org.eclipse.jetty.jaas.spi.LdapLoginModule required
    debug="false"
    useLdaps="false"
    contextFactory="com.sun.jndi.ldap.LdapCtxFactory"
    hostname="<SERVER>"
    port="389"
    bindDn="<BIND-DN>"
    bindPassword="<BIND-DN PASSWORD>"
    authenticationMethod="simple"
    forceBindingLogin="true"
    userBaseDn="ou=users,dc=keybox,dc=com"
    userRdnAttribute="uid"
    userIdAttribute="uid"
    userPasswordAttribute="userPassword"
    userObjectClass="inetOrgPerson"
    roleBaseDn="ou=groups,dc=keybox,dc=com"
    roleNameAttribute="cn"
    roleMemberAttribute="member"
    roleObjectClass="groupOfNames";
};
Users will be added/removed from defined profiles as they login and when the role name matches the profile name.

Auditing

Auditing is disabled by default and is only a proof of concept. Can be enabled in the KeyBoxConfig.properties.

#enable audit  --set to true to enable
enableInternalAudit=true
Screenshots

Login

Two-Factor

More Terminals

Manage Systems

Manage Users

Define SSH Keys

Disable SSH Keys

Acknowledgments

Special thanks goes to these amazing projects which makes this (and other great projects) possible.

JSch Java Secure Channel - by ymnk
term.js A terminal written in javascript - by chjj
Third-party dependencies are mentioned in the 3rdPartyLicenses.md

Author

Sean Kavanagh

<EMAIL_ADDRESS>https://twitter.com/spkavanagh6
(Follow me on twitter for release updates, but mostly nonsense)

Donate

Dontations are always welcome!

repository: reymont/ReadAndLearn

gha_language: Jupyter Notebook

repo_name: reymont/ReadAndLearn


text:
# is_nan

nan/"not a number" is not meant to see if the data type is numeric/textual/etc..

NaN is actually a set of values which can be stored in floating-point variables, but dont actually evaluate to a proper floating point number.

The floating point system has three sections: 1 bit for the sign (+/-), an 8 bit exponent, and a 23 bit fractional part.
There are rules governing which combinations of values can be placed into each section, and some values are reserved for numbers such as infinity. This leads to certain combinations being invalid, or in other words, not a number.

---

[Official documentation page](https://www.php.net/manual/en/function.is-nan.php)

**[To root](/README.md)**

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
# Canvas WebGL Animations using Three.js

A bunch of simple animations written in three.js

## Run
To run, just donwload the repo and open the HTML in any latest browser that supports WebGL

### Disclaimer
The buffered-objects was originally written by some else. _Sorry don't know the original author._ Just modded their code.

license: Unlicense

repository: baronrustamov/threejs-animations

repo_name: baronrustamov/threejs-animations


text:
# What's New for Hyper-V on Windows 10

This topic explains the new and changed functionality in Hyper-V on Windows 10®.

## Windows PowerShell Direct

There is a now an easy and reliable way to run Windows PowerShell commands inside a virtual machine from the host operating system. There are no network or firewall requirements or special configuration.
It works regardless of your remote management configuration. To use it, you must run Windows 10 or Windows Server Technical Preview on the host and the virtual machine guest operating system.

To create a PowerShell Direct session, use one of the following commands:

``` PowerShell
Enter-PSSession -VMName VMName
Invoke-Command -VMName VMName -ScriptBlock { commands }
```

Today, Hyper-V administrators rely on two categories of tools for connecting to a virtual machine on their Hyper-V host:
- Remote management tools such as PowerShell or Remote Desktop
- Hyper-V Virtual Machine Connection (VM Connect)

Both of these technologies work well, but each have trade-offs as your Hyper-V deployment grows. VMConnect is reliable, but it can be hard to automate. Remote PowerShell is powerful, but can be difficult to setup and maintain.

Windows PowerShell Direct provides a powerful scripting and automation experience with the simplicity of VMConnect. Because Windows PowerShell Direct runs between the host and virtual machine, there is no need for a network connection or to enable remote management. You do need guest credentials to log into the virtual machine.

### Requirements
- You must be connected to a Windows 10 or Windows Server Technical Preview host with virtual machines that run Windows 10 or Windows Server Technical Preview as guests.
- You need to be logged in with Hyper-V Administrator credentials on the host.
- You need User credentials for the virtual machine.
- The virtual machine you want to connect to must be running and booted.

## Hot add and remove for network adapters and memory

You can now add or remove a Network Adapter while the virtual machine is running, without downtime. This works for generation 2 virtual machines running both Windows and Linux operating systems.

You can also adjust the amount of memory assigned to a virtual machine while it's running, even if you haven’t enabled Dynamic Memory. This works for both generation 1 and generation 2 virtual machines.

## Production checkpoints

Production checkpoints allow you to easily create “point in time” images of a virtual machine, which can be restored later on in a way that is completely supported for all production workloads. This is achieved by using backup technology inside the guest to create the checkpoint, instead of using saved state technology. For production checkpoints, the Volume Snapshot Service (VSS) is used inside Windows virtual machines. Linux virtual machines flush their file system buffers to create a file system consistent checkpoint. If you want to create checkpoints using saved state technology, you can still choose to use standard checkpoints for your virtual machine.

> **Important:** The default for new virtual machines will be to create production checkpoints with a fallback to standard checkpoints.

## Hyper-V Manager improvements

- **Alternate credentials support** – You can now use a different set of credentials in Hyper-V manager when you connect to another Windows 10 Technical Preview remote host. You can also save these credentials so it's easier to log on later.

- **Down-level management** - You can now use Hyper-V manager to manage more versions of Hyper-V. With Hyper-V manager in Windows 10 Technical Preview, you can manage computers running Hyper-V on Windows Server 2012, Windows 8, Windows Server 2012 R2 and Windows 8.1.

- **Updated management protocol** - Hyper-V manager has been updated to communicate with remote Hyper-V hosts using the WS-MAN protocol, which permits CredSSP, Kerberos or NTLM authentication. When you use CredSSP to connect to a remote Hyper-V host, it allows you to perform a live migration without first enabling constrained delegation in Active Directory. WS-MAN-based infrastructure also simplifies the configuration necessary to enable a host for remote management. WS-MAN connects over port 80, which is open by default.

## Connected Standby works

When Hyper-V is enabled on a computer that uses the Always On/Always Connected (AOAC) power model, the Connected Standby power state is now available.

In Windows 8 and 8.1, Hyper-V caused computers that used the Always On/Always Connected (AOAC) power model (also known as InstantON) to never sleep. See this [KB article](
https://support.microsoft.com/en-us/kb/2973536) for a full description.

## Linux secure boot

More Linux operating systems, running on generation 2 virtual machines, can now boot with the secure boot option enabled.  Ubuntu 14.04 and later, and SUSE Linux Enterprise Server 12, are enabled for secure boot on hosts that run the Technical Preview. Before you boot the virtual machine for the first time, you must specify that the virtual machine should use the Microsoft UEFI Certificate Authority.  At an elevated Windows Powershell prompt, type:

    Set-VMFirmware vmname -SecureBootTemplate MicrosoftUEFICertificateAuthority

For more information on running Linux virtual machines on Hyper-V, see [Linux and FreeBSD Virtual Machines on Hyper-V](http://technet.microsoft.com/library/dn531030.aspx).

## Virtual Machine configuration version

When you move or import a virtual machine to a host running Hyper-V on Windows 10 from host running Windows 8.1, the virtual machine’s configuration file isn't automatically upgraded. This allows the virtual machine to be moved back to a host running Windows 8.1. You won't have access to new virtual machine features until you manually update the virtual machine configuration version.

The virtual machine configuration version represents what version of Hyper-V the virtual machine’s configuration, saved state, and snapshot files it's compatible with. Virtual machines with configuration version 5 are compatible with Windows 8.1 and can run on both Windows 8.1 and Windows 10. Virtual machines with configuration version 6 are compatible with Windows 10 and won't run on Windows 8.1.

### Check configuration version

From an elevated command prompt, run the following command:

``` PowerShell
Get-VM * | Format-Table Name, Version
```

### Upgrade configuration version

From an elevated Windows PowerShell command prompt, run one of the following commands:

``` PowerShell
Update-VmConfigurationVersion <vmname>
```

Or

``` PowerShell
Update-VmConfigurationVersion <vmobject>
```

**Important: **
- After you upgrade the virtual machine configuration version, you can't move the virtual machine to a host that runs Windows 8.1.
- You can't downgrade the virtual machine configuration version from version 6 to version 5.
- You must turn off the virtual machine to upgrade the virtual machine configuration.
- After the upgrade, the virtual machine uses the new configuration file format. For more information, see New virtual machine configuration file format.

## Configuration file format

Virtual machines now have a new configuration file format which is designed to increase the efficiency of reading and writing virtual machine configuration data. It's also designed to reduce the potential for data corruption if there's a storage failure. The new configuration files use the .VMCX extension for virtual machine configuration data and the .VMRS extension for runtime state data.

> **Important:** The .VMCX file is a binary format. Directly editing the .VMCX or .VMRS file isn't supported.

## Integration Services through Windows Update

Updates to integration services for Windows guests are now distributed through Windows Update.

Integration components (also called integration services) are the set of synthetic drivers which allow a virtual machine to communicate with the host operating system.  They control services ranging from time sync to guest file copy.  We've been talking to customers about integration component installation and update over the past year to discover that they are a huge pain point during the upgrade process.

Historically, all new versions of Hyper-V came with new integration components. Upgrading the Hyper-V host required upgrading the integration components in the virtual machines as well.  The new integration components were included with the Hyper-V host then they were installed in the virtual machines using vmguest.iso.  This process required restarting the virtual machine and couldn't be batched with other Windows updates.  Since the Hyper-V administrator had to offer vmguest.iso and the virtual machine administrator had to install them, integration component upgrade required the Hyper-V administrator have administrator credentials in the virtual machines -- which isn't always the case.

In Windows 10 and going forward, all integration components will be delivered to virtual machined through Windows Update along with other important updates.

There are updates available today for virtual machines running:
*  Windows Server 2012
*  Windows Server 2008 R2
*  Windows 8
*  Windows 7

The virtual machine must be connected to Windows Update or a WSUS server.  In the future, integration component updates will have a category ID, for this release, they are listed as KBs.

To read more about how we determine applicability, see this [blog post](http://blogs.technet.com/b/virtualization/archive/2014/11/24/integration-components-how-we-determine-windows-update-applicability.aspx).

See [this blog](http://blogs.msdn.com/b/virtual_pc_guy/archive/2014/11/12/updating-integration-components-over-windows-update.aspx) post for a detailed walkthrough of installing integration services.

> **Important:** The ISO image file vmguest.iso is no longer needed for updating integration components. It's not included with Hyper-V on Windows 10.

## Next Step
[Walk through Hyper-V on Windows 10](..\quick_start\walkthrough.md)

license: MIT

gha_language: PowerShell

gha_license_id: MIT


text:
---
title: Cockpit's Kubernetes Dashboard
date: 2015-06-09 23:51
tags: cockpit technical kubernetes
slug: cockpit-kubernetes-dashboard
category: release
---

Here's a video showing what I've been working on together with some help from a couple Cockpit folks. It's a [Cockpit](https://cockpit-project.org) dashboard for Kubernetes.

If you haven't heard about [Kubernetes](http://kubernetes.io/) ... it's a way to schedule docker containers across a cluster of machines, and take care of their networking, storage, name resolution etc. It's not completely baked, but pretty cool when it works.

<iframe src="//www.youtube.com/embed/Fcfsu22RssU" html5=1 frameborder="0" height="450" width="800"></iframe>

The Cockpit dashboard you see in the video isn't done by any means ... there's a lot missing. But I'm pretty happy with what we have so far. I'm using Cockpit 0.61 in the demo. There are some nagging details to make things work, but hopefully we can solve them later. The Nulecule support isn't merged yet, [Subin has been working on it](https://github.com/cockpit-project/cockpit/pull/2332).

The Cockpit dashboard actually mostly works with [Openshift v3](https://github.com/openshift/origin). Openshift v3 is based on Kubernetes underneath, which makes apps that are developed there really portable.

branch_name: refs/heads/main

gha_language: HTML


text:
---

title: 'Lesson 3: More About Jobs & JobDetails'
---

As you've seen, jobs are rather easy to implement. There are just a few more things that you need to understand about
the nature of jobs, about the Execute(..) method of the IJob interface, and about JobDetails.

While a class that you implement is the actual "job", Quartz needs to be informed about various attributes
that you may wish the job to have. This is done via the JobDetail class, which was mentioned briefly in the previous section.
Software 'archaeologists' may be interested to know that in an older incarnation of Quartz for Java, the implementation of the
functionality of JobDetail was imposed upon the implementor of each Job class by having all of JobDetail's 'getter' methods on
the Job interface itself. This forced a cumbersome job of re-implementing virtually identical code on every Job class -
which was really dumb... thus JobDetail class was created.

Let's take a moment now to discuss a bit about the 'nature' of jobs and the life-cycle of job instances within Quartz.NET.
First lets take a look back at some of that snippet of code we saw in Lesson 1:

__Using Quartz.NET__

```csharp
    // construct a scheduler factory
    ISchedulerFactory schedFact = new StdSchedulerFactory();

    // get a scheduler
    IScheduler sched = schedFact.GetScheduler();
    sched.Start();

    // construct job info
    JobDetail jobDetail = new JobDetail("myJob", null, typeof(DumbJob));
    // fire every hour
    Trigger trigger = TriggerUtils.MakeHourlyTrigger();
    // start on the next even hour
    trigger.StartTime = TriggerUtils.GetEvenHourDate(DateTime.UtcNow);
    trigger.Name = "myTrigger";
    sched.ScheduleJob(jobDetail, trigger);
```

Now consider the job class _DumbJob_ defined as such:

```csharp
    public class DumbJob : IJob
    {
        public DumbJob() {
        }

        public void Execute(JobExecutionContext context)
        {
            Console.WriteLine("DumbJob is executing.");
        }
    }
```

Notice that we 'feed' the scheduler a JobDetail instance, and that it refers to the job to be executed by simply
providing the job's class. Each (and every) time the scheduler executes the job, it creates a new instance of the
class before calling its Execute(..) method. One of the ramifications of this behavior is the fact that jobs must
have a no-arguement constructor. Another ramification is that it does not make sense to have data-members defined
on the job class - as their values would be 'cleared' every time the job executes.

You may now be wanting to ask "how can I provide properties/configuration for a Job instance?" and "how can I
keep track of a job's state between executions?" The answer to these questions are the same: the key is the JobDataMap,
which is part of the JobDetail object.

## JobDataMap

The JobDataMap can be used to hold any number of (serializable) objects which you wish to have made available
to the job instance when it executes. JobDataMap is an implementation of the IDictionary interface, and has some added convenience methods for storing and retreiving data of primitive types.

Here's some quick snippets of putting data into the JobDataMap prior to adding the job to the scheduler:

__Setting Values in a JobDataMap__

```csharp
    jobDetail.JobDataMap["jobSays"] = "Hello World!";
    jobDetail.JobDataMap["myFloatValue"] =  3.141f;
    jobDetail.JobDataMap["myStateData"] = new ArrayList();
```

Here's a quick example of getting data from the JobDataMap during the job's execution:

__Getting Values from a JobDataMap__

```csharp
    public class DumbJob : IJob
    {
        public void Execute(JobExecutionContext context)
        {
            string instName = context.JobDetail.Name;
            string instGroup = context.JobDetail.Group;

            JobDataMap dataMap = context.JobDetail.JobDataMap;

            string jobSays = dataMap.GetString("jobSays");
            float myFloatValue = dataMap.GetFloat("myFloatValue");
            ArrayList state = (ArrayList) dataMap["myStateData"];
            state.Add(DateTime.UtcNow);

            Console.WriteLine("Instance {0} of DumbJob says: {1}", instName, jobSays);
        }
    }
```

If you use a persistent JobStore (discussed in the JobStore section of this tutorial) you should use some care
in deciding what you place in the JobDataMap, because the object in it will be serialized, and they therefore
become prone to class-versioning problems. Obviously standard .NET types should be very safe, but beyond that,
anytime someone changes the definition of a class for which you have serialized instances, care has to be taken
not to break compatibility. Optionally, you can put AdoJobStore and JobDataMap into a mode where only primitives
and strings can be stored in the map, thus eliminating any possibility of later serialization problems.

### Stateful vs. Non-Stateful Jobs

Triggers can also have JobDataMaps associated with them. This can be useful in the case where you have a Job that
is stored in the scheduler for regular/repeated use by multiple Triggers, yet with each independent triggering,
you want to supply the Job with different data inputs.

The JobDataMap that is found on the JobExecutionContext during Job execution serves as a convenience. It is a merge
of the JobDataMap found on the JobDetail and the one found on the Trigger, with the value in the latter overriding
any same-named values in the former.

Here's a quick example of getting data from the JobExecutionContext's merged JobDataMap during the job's execution:

__Getting Values from the JobExecutionContext convenience/merged JobDataMap__

```csharp
    public class DumbJob : IJob
    {
        public void Execute(JobExecutionContext context)
        {
            string instName = context.JobDetail.Name;
            string instGroup = context.JobDetail.Group;

            // Note the difference from the previous example
            JobDataMap dataMap = context.MergedJobDataMap;

            string jobSays = dataMap.GetString("jobSays");
            float myFloatValue = dataMap.GetFloat("myFloatValue");
            ArrayList state = (ArrayList) dataMap.Get("myStateData");
            state.Add(DateTime.UtcNow);

            Console.WriteLine("Instance {0} of DumbJob says: {1}", instName, jobSays);
        }
    }
```

## StatefulJob

Now, some additional notes about a job's state data (aka JobDataMap): A Job instance can be defined as "stateful" or "non-stateful".
Non-stateful jobs only have their JobDataMap stored at the time they are added to the scheduler. This means that any changes made
to the contents of the job data map during execution of the job will be lost, and will not seen by the job the next time it executes.
You have probably guessed, a stateful job is just the opposite - its JobDataMap is re-stored after every execution of the job.
One side-effect of making a job stateful is that it cannot be executed concurrently. Or in other words: if a job is stateful, and
a trigger attempts to 'fire' the job while it is already executing, the trigger will block (wait) until the previous execution completes.

You 'mark' a Job as stateful by having it implement the IStatefulJob interface, rather than the IJob interface.

## Job 'Instances'

One final point on this topic that may or may not be obvious by now: You can create a single job class, and store many
'instance definitions' of it within the scheduler by creating multiple instances of JobDetails - each with its own set of properties
and JobDataMap - and adding them all to the scheduler.

When a trigger fires, the Job it is associated to is instantiated via the JobFactory configured on the Scheduler. The default
JobFactory simply calls Activator.CreateInstance behind the scenes on the job class.
You may want to create your own implementation of JobFactory to accomplish things such as having your application's IoC or
DI container produce/initialize the job instance.

## Other Attributes Of Jobs

Here's a quick summary of the other properties which can be defined for a job instance via the JobDetail object:

* Durable - if a job is non-durable, it is automatically deleted from the scheduler once there are no longer any active triggers associated with it.
* Volatile - if a job is volatile, it is not persisted between re-starts of the Quartz scheduler.
* RequestsRecovery - if a job "requests recovery", and it is executing during the time of a 'hard shutdown' of the scheduler (i.e. the process it is running within crashes, or the machine is shut off), then it is re-executed when the scheduler is started again. In this case, the JobExecutionContext.IsRecovering property will return true.
* JobListeners - a job can have a set of zero or more JobListeners associated with it. When the job executes, the listeners are notified. More discussion on JobListeners can be found in the section of this document that is dedicated to the topic of TriggerListeners & JobListeners.

## The Job.Execute(..) Method

Finally, we need to inform you of a few details of the IJob.Execute(..) method. The only type of exception
that you are allowed to throw from the execute method is the JobExecutionException. Because of this, you should generally wrap the entire
contents of the execute method with a 'try-catch' block. You should also spend some time looking at the documentation for the
JobExecutionException, as your job can use it to provide the scheduler various directives as to how you want the exception to be handled.

repository: quartznet/quartznet

gha_language: C#

repo_name: quartznet/quartznet


text:
# Target Architecture - RAM for augmented Dataset
An attempt to implement the idea from Recurrent Models of Visual Attention, Volodymyr Mnih, Nicolas Heess, Alex Graves, Koray Kavukcuoglu, https://arxiv.org/abs/1406.6247

The idea is to use hybrid loss to approximate policy gradient result, detailed explained in [this<EMAIL_ADDRESS>
Code extended from [this repo](https://github.com/zhongwen/RAM), with glimpse sensor changed to support multiple glimpse scales

repository: tianyu-tristan/Visual-Attention-Model

repo_name: tianyu-tristan/Visual-Attention-Model


text:
Deprecated: use https://github.com/pypa/cibuildwheel
====================================================

conda build-wheel
=================

``conda buildwheel`` is a conda subcommand which allows to build a wheel from a recipe much like a
conda recipe.

It makes use of the underlying machinery developed for ``conda build``:

 * it uses a `meta.yml` from a normal conda build recipe to build an environment with the required
   dependencies
 * it uses a found `build_wheel.sh` (unix) or a `bld_wheel.bat` to build the wheel package in that
   environment.
 * if no such build script is found, it simple calls `python setup.py bdist_wheel`. This makes it
   possible to reuse the conda recipes without any changes (at least for simple ones).
 * it copies the build wheel file into a predefined directory (default: ./build)
 * it will optionally upload the wheel to pypi [not yet implemented]

Installation
============
Will eventually be installable with:

```
conda install conda-build-wheel -c janschulz
```

Usage
======

```
usage: conda-buildwheel-script.py [-h] [--version]
                                  [--upload-pypi [UPLOAD_PYPI [UPLOAD_PYPI ...]]]
                                  [--wheel-dir WHEEL_DIR_PATH]
                                  [--python PYTHON_VER] [--numpy NUMPY_VER]
                                  [-c CHANNEL] [--override-channels]
                                  recipe

Build a wheel in a conda environment.

positional arguments:
  recipe                The folder containing the wheel recipe to build.

optional arguments:
  -h, --help            show this help message and exit
  --version             show program's version number and exit
  --upload-pypi [UPLOAD_PYPI [UPLOAD_PYPI ...]]
                        The PyPI channel(s) to upload built wheels to.
  --wheel-dir WHEEL_DIR_PATH
                        Path to the directory where the wheels should be
                        created.
  --python PYTHON_VER   Set the Python version used by wheel build. Can be
                        passed multiple times to build against multiple
                        versions. Can be 'all' to build against all known
                        versions (['2.6', '2.7', '3.3', '3.4', '3.5'])
  --numpy NUMPY_VER     Set the NumPy version used by the wheel build. Can be
                        passed multiple times to build against multiple
                        versions. Can be 'all' to build against all known
                        versions (['1.6', '1.7', '1.8', '1.9', '11.0'])
  -c CHANNEL, --channel CHANNEL
                        Additional channel to search for packages. These are
                        URLs searched in the order they are given (including
                        file:// for local directories). Then, the defaults or
                        channels from .condarc are searched (unless
                        --override-channels is given). You can use 'defaults'
                        to get the default packages for conda, and 'system' to
                        get the system packages, which also takes .condarc
                        into account. You can also use any name and the
                        .condarc channel_alias value will be prepended. The
                        default channel_alias is http://conda.anaconda.org/.
  --override-channels   Do not search default or .condarc channels. Requires
                        --channel.

```

repository: jankatins/conda-build-wheel

repo_name: jankatins/conda-build-wheel


text:
## Problems in File 1 (pond2010)
* density should be Density with unit such as #/mm.
* Temp should be with unit such as °C or °F.
* Colony Diameter should have unit, which should be mm.
* Variable Z should be changed to depth with unit such as m.
* There should be note for cells colored with yellow.
## problems in File 2 (zoop-temp-main)
* Cuni #/L don't know what it is mean.
* Chippo #/L don't know what it is mean.
* Temp should be with unit such as °C or °F.
* The figure doesn't have label of y axis.
* The figure doesn't have title to explain what this graph is.
* There should be note for *.
* There should be note for cells colored with yellow and red.
* Chla for Chlorophyll a is still not clear.

## Problems in File 3 (zoop)
* There should be note for cells colored with red.
* Cuni #/L don't know what it is mean.
* Chippo #/L don't know what it is mean.
* For Chippo #/L, there were two cells less than 0, which are mistakes.
* The graph was lack of label for x and y axis.
* Without note, the calculation labeled as 7th and 9th is meaningless
* Temp should be with unit such as °C or °F.
* Chla for Chlorophyll a is still not clear.
* The calculation of Max Depth for 72m is wrong
* Depth need to be labeled with unit of m.
* Temp should be with unit such as °C or °F.

##Proposed Data Organization template was presented as follows:

|CollectionID|Date|Temp (°C)|Depth (m)| cuniDensity (mol/L)|cuniColonySize (mm)|chippoDensity (mol/l)|chippoColonySize(mm)|Chla (?)|
|:-------------:|:--------:|:---------:|:---------:|:---------:|:---------:|:---------:|:---------:|:---------:|
|1233|6/7/2011|14.1|0.5|72 |2.12|45|2.56|3.1|
|1234|6/7/2011|14.1|0.5|54 |1.98|56|2.68|3.4|
|1235|6/7/2011|14.1|0.5|35 |2.34|34|2.11|3.2|

Notes:
* Cuni:	_Conochilus unicornis_
* Chippo:_Conochilus hippocrepis_
* ColonySize:Average diameter (mm) of 5 randomly chose conochilus colonies in the sample
* Temp:	Temperature, YSI probe taken once at each depth
* Chla: Chlorophyll a

## Some suggestions
Although the above table make some obvious improvements to be made in organizing the dataset.  However, there are quite few aspects need to be clarified by the researcher or scientist: what is the purpose of collecting the data, how do they want to analyze the data, the standard terminology of this  experiemen such as Chla and '#/L'. Furthermore, there are no unique ID connecting different data set, which will be not good for data analyses.
In my opinion, when we design our experiement, we need to design what is our goal, what data will be connected. When we collect data, we need write down as clear and detailed as possible. As old saying, pay attention to detail.


text:
# Base64 image fixtures [![npm](https://img.shields.io/npm/v/base64-image-fixture.svg?style=flat-square)](https://www.npmjs.com/package/base64-image-fixture)

> Collect base64 images for fixture usage

## Usage

Visit [here](https://annotis.github.io/base64-image-fixture/) to download images or copy base64 string

Alternatively, install `base64-image-fixture` package.

```sh
$ yarn add dev base64-image-fixture
```

And, read as utf-8 string.

```js
import fs from 'fs'

const base64PNGString =
  fs.readFileSync(
    './node_modules/base64-image-fixture/png/1x1-transparent',
    'utf8'
  )

console.log(base64PNGString)
// => data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=
```

## License

MIT


text:
---
nav-title: "location How-To"
title: "location"
environment: nativescript
description: "Examples for using location"
previous_url: /ApiReference/location/HOW-TO
---
# Location
Using the location requires the Location module.
{%snippet location-require%}

## Other functions
### Test are location services available for this device
{%snippet location-funcs%}

### Get distance between two locations
{%snippet location-distance%}

## Getting location
### Receive continuous location updates
{%snippet location-updates%}

### Get last known location
{%snippet location-last-known%}

### Get location once
if there is `options.timeout` you will receive error on timeout. If `options.timeout` is 0 then the result is the same as the result from `LocationManager.lastKnownLocation`
and there will be no wait. You can use `options.maximumAge` to specify you don't want to receive locations older than specified time in ms.
{%snippet location-timeour%}

repository: sivsushruth/NativeScript

repo_name: sivsushruth/NativeScript


text:
# python-workshop

Materials for the Paris-Saclay Center for Data Science python workshop

Scientists from all disciplines are nowadays confronted with the necessity of diving into the world of scientific programming, whether to interpret basic data or make more advanced computation. However, developed code is often found to be sloppy and even buggy, leading to irreproducible research as well as making it difficult to collaborate and share resources.

Therefore, this workshop organized by the Paris Saclay Center for Data Science aims at presenting, on the one hand, the PyData ecosystem widely used in scientific programming and, on the other hand, the software engineering best practises to achieve efficient and reusable code.

## Program

### Day 1 - Scientific programming with Python

**Goal:** introducing the most important packages for scientific computing and data analysis in Python. The main topics presented will be:

* Introduction to the basics of numpy, pandas, and matplotlib;
* Introduction to scientific computing toolbox: scipy, statsmodels, and scikit-learn.

### Day 2 - Software engineering best practices for scientists

**Goal:** moving from standalone scripts to efficient and reusable code with tutorial on writing modular, documented, tested, and shareable code.

* Migrating from scripts to modular code;
* Best practices through PEP8 and well documented code;
* Test and continuous integration in a nutshell

repository: jorisvandenbossche/python-workshop

repo_name: jorisvandenbossche/python-workshop


text:
---
id: 224
title: 'Download 18+ The Boy Next Door (2015) English {Hindi Subtitles} 480p [350MB] || 720p [750MB]'
date: 2020-10-07T18:36:51+00:00
author: admin
layout: post
guid: https://themoviesflix.co/?p=13192
permalink: /2020/10/07/download-18-the-boy-next-door-2015-english-hindi-subtitles-480p-350mb-720p-750mb/
tdc_dirty_content:
  - "1"
tdc_icon_fonts:
  - 'a:0:{}'
cyberseo_rss_source:
  - https://www.psdly.com/wp-theme/feed?paged=9
  - https://themoviesflix.co/feed/?paged=20
cyberseo_post_link:
  - https://www.psdly.com/themeforest-spa-v1-3-2-wordpress-theme-with-page-builder-11982416
  - https://themoviesflix.co/download-the-boy-next-door-2015-english-hindi-480p-720p/
post_views_count:
  - "0"
categories:
  - Uncategorized
---
✅ Download The Boy Next Door (2015) English (Hindi Subtitles) 720p & 480p. This is an English movie and available in 720p & 480p qualities. This movie is based on** Horror, Thriller .** This movie is not available in Hindi Dual Audio. Click on the Download button below to download this movie. Hindi Subtitles added with English audio and Esubs.

**TheMoviesFlix.co** is The Best Website/Platform For Hollywood HD Movies. We Provide Direct Google Drive Download Links For Fast And Secure Downloading. Just Click On Download Button _And Follow Steps To Download And Watch Movies Online For Free_.

    <img class="imdbwp__img"<EMAIL_ADDRESS>/>

      The Boy Next Door (2015)

      4.7Rating: 4.7 / 10 from 37,695 users

      A woman, separated from her unfaithful husband, falls for a younger man who has moved in next door, but their torrid affair soon takes a dangerous turn.

### Download The Boy Next Door Hindi Subbed 720p & 480p ~ TheMoviesFlix.co {.has-text-align-center.has-text-color}

###  Movie Info:  {.has-text-color}

  * **Full Name: **The Boy Next Door
  * **Language:** English
  * **Subtitles: **Yes (Hindi + English Subtitles)
  * **Released Year: **2015
  * **Size:** 350MB & 750MB
  * **Quality:** 480p & 720p Bluray
  * **Format:** Mkv

### Storyline: {.has-text-color}

When a handsome, charming teenager named Noah (Ryan Guzman) moves in next door, newly separated high-school teacher Claire Peterson (Jennifer Lopez) encourages his friendship and engages in a little bit of harmless — or so she thinks — flirtation. Although Noah spends much of the time hanging out with Claire’s son, the teen’s attraction to her is palpable. One night, Claire gives in to temptation and lets Noah seduce her — but when she tries to end the relationship, he turns violent.

### ScreenShots: {.has-text-color}

![The Boy Next Door (2015) - Photo Gallery - IMDb](https://m.media-amazon.com/images/M/MV5BNmZhOWIyZjQtYjQ3MS00ZDMwLTlkMmMtNjBkN2YxNGYwODJiXkEyXkFqcGdeQXVyMDgyNjA5MA@@._V1_.jpg)

![The Boy Next Door Full Movie Uncut - The Door](https://s1.dmcdn.net/v/98BuE1K_vf35oFRfp/x1080)

![The Boy Next Door (2015) - IMDb](https://m.media-amazon.com/images/M/MV5BMTY3MzYxNzgxOV5BMl5BanBnXkFtZTgwNTY4ODMyMzE@._V1_.jpg)

  Download The Boy Next Door (2015) English (Hindi Subtitles) 480p [350MB]

Download Links

  Download The Boy Next Door (2015) English (Hindi Subtitles) 720p [750MB]

Download Links

  <button class="button button5">Join Our Telegram</button> <button class="button button5">Announcements</button> <button class="button button5">How To Download?</button> <button class="button button5">Report Broken Links</button>

  Please Do Not Use VPN for Downloading Movies From Our Site.

  Click On The Above Download Button Download File.

  If You Find Any Broken Link Then Report To Us.

  Comment Your Queries And Requests Below In The Comment Box.


text:
# Insider Buy Super Stocks

## My Story

### This guy lost 6 times to Mr. Market. Which absolutely is real cool. He won and he lost. He didn’t sell at the right time lol. Pretty much a real sad thing to see.

### He studied everything that he could. The education pulled off! Learned about every chart patterns, and found a mentor. He also tracked down all the people who actually accomplished the system of that mentor.

### He checked whether the market was oversold or overbought

### Actually, there are only few variables that determine everything!

## Today is the Day to Divorce Yourself from Mediocrity

### You have to learn to think independently.

### The thing is, you have to lower the trades! If you start to over trade, then you will be taking more risk and lose in the long time.

- Losing in the market is absolutely inevitable. So, you have to get big when you actually win. That’s why we’re searching for superstocks. Just keep looking, and when you identify one, that’s just the tip of the ice-burg. You have to ‘validate’.

### You have to take ‘calculated’ risks. Not risks that just base on your emotions. That’ll be just buying and selling like everyone else.

- Let’s learn how to actually calculate risk. That’s how we can find our optimum buy and sell zone right?

### What to do if I’m crazy about investing!

- Do you have the drive, determination, passion, and time required to break free of investment conditioning?

- Are you hungry to learn?

- Do you have an incredible belief in what is possible?

- Do you have a high tolerance for calculated risk and the emotional ability to endure the inevitable ups and downs?

- Will you be able to nurture an open mind to spot the obvious?

- Are you willing to implement self-discipline in every aspect of your investing?

### Don’t be the same as all the other people. You have to make your ‘own’ perspective.

- Which is being the 1% :)

### Being rich is the most important thing. If you keep trying to be right and valid, that means you want to show off your skills to the public. That’s all.

- Well being rich than right would actually mean, don’t go bloating to others and stop wasting time. That’s the most important thing.

### From Right or Rich, there’s also something else to think about. You have to think with yourself. Just you. Isolation is a key factor for trading. That’s why I had an intuitive feeling that trading should be done alone. Not going with the herd, or a group, news, etc. It’s a real problem if you keep on following everyone’s back.

- Think with your own mind. Brain storming doesn’t really give you ideas. You actually lose creativity within the group.

## The Most Potent Drug the World Has Ever Seen

### One of the biggest drugs that in this chapter means is, the news from CNBC, and those financial news. This makes you ‘group think’. Which isn’t a good thing. You have to get your own views and if those views are not on the internet or only some blog posts that are not really much viewed, then there will be a big chance that trade is going to turn big.

- Try to avoid the news and avoid ‘future predictions’. This will manipulate your mind and make you move like the others. They’ll keep on trying to make you move and make you do what they want.

### All the news will MAKE YOU TRADE! Overtrade. Overtrading is one of the things that you must avoid. If you trade too much, you’ll absolutely lost a lot of your money. Well you’re actually taking more ‘risks’. And they one be that much ‘calculated’.

- You have to remember that the stocks that are getting the biggest gains are stocks that aren’t really getting any interest from the media, or people. Well people that don’t really get affected by the media :)

### Crowd psychology is ALWAYS wrong about critical market turning points.

- Yep, I’m reading about what mass media does! It tells, actually screaming at me that they are ALWAYS wrong.

### The headlines will give you a clue of what the financial sector is doing. You must think of what they are doing and what they are trying to do with you. If you just follow them, you’ll tend to lose your money. Remember, the people can lie, but the charts can’t lie.

### The mystical Drudge market indicator.

### The most important thing for you to do is, spot the manipulation. If you start finding headlines of what the media is talking about, you’d better start to move or start to get out of that place. If you keep going in there, it’ll crash. Everything is manipulation and lies. I hope you don’t fall into them.

## Wall Street’s Worst Kept Secret

### What I read over here was mostly about mass media, and what Goldman Sachs did to manipulate all the traders. It looked like a crime when I read everything. They make a call, and after about a few weeks, everything goes reversal.

- When I first listened to that lecture at ohmyschool, I found out that they manipulate it, and everyone gets in at the top. After that, all the banks or the people who have a lot of money starts to sell everything and then it’s finished.

### The most important thing that I read over here is self discipline. I have to stop looking at those ‘calls’. If I keep on listening to those calls, then I’ll be just putting in money the way they want.

- For ETC as an example, They don’t want to make the price to fall that much. Well, they could actually want to buy it since it falls too much. After that, they’ll be able to actually sell it at a high price because of the hard fork. It will eventually go high because they have to sell high.

### Yep, they are the kings of manipulation.

## Becoming a Better Trader

### This is a pretty hard task. You have to find trading mentors. You have to learn with the best. How can I find the best traders? Now this is pretty much a hard one. I have to find them!

### I have to know a little bit about economics, but the thing that I need to know more is understanding mass psychology. It’s more than the humans who are making the charts.

- Trading in the zone - Mark Douglas.
You should read this, because it tells you a lot about mass psychology in the market.

### To trade, you have to be really confident.

### You have to visualize your stock. If the stock that you picked start to go to the way you did, what are you going to do? What happens when it goes against you? What should you do then? You have to have all the plans. All possibilities. Whether you’re going to go with stop-loss or whatever.

### If you start getting really negative about the market and you can’t find a super stock, that means its time for you rest from trading. That’s a really important thing to do. If you keep on trading while you have negative emotions about the market, that means it’s time to rest.

- Which means, you have to be optimistic about the future. That’s why Bill Gates and all those other guys succeeded. They view they world optimistically.

### When you keep on searching for your super stock, you have to be really confident about it. If you aren’t really confident, you must re-evaluate your stock.

### Woah, a really cool saying. You shouldn’t be overconfident. Nothing should be ‘over’ the line. Everything needs to have its line. Which means, as a general rule, losses make you strong and profits make you weak.

### DISCIPLINE. A real word that needs to be formed in the trading market. You have to be CONSISTENT. Stick to the rules that you made.

- Select stocks

- How to enter and exit positions

- Reacts to stock volatility

### You have to destroy your fear when trading. Because of fear(when the stock goes down) you eventually sell it because of fear! You will just lose everything! If you lose a lot from the first time, that wasn’t your optimal entering point. You have to learn from your mistakes and not try to do it again. Remember, don’t create fear or any emotional trades. That’s where you lose everything.

 Remember when you sell a stock and that stock flies away? You’ll think if only I had some patience! Well, you should get some patience by thinking about your own universe. You have to do your stuff while trading. Try to get out of everything. This is a long run of life. You can make your millions in the years, don’t worry. Just give relaxing faith.

### To make a fat pitch trade, you have to know when the market has an edge for you. If you don’t have an edge, you shouldn’t think about it. You get fearful when everyone is greedy, and you get greedy when everyone is fearful.

### Achieving peak performance. This thing is actually from the book called “Flow - The psychology of original experience.” -> Should read!

### Like what I learned from study code, you have to have a tidy environment, and that environment needs to make you work as hard as possible.

- Also, if you dwell in an environment too long, you should try giving it a change.

### Music could help you. Especially music that doesn’t have vocals. You know this fact :)

### Something that I learned. You have to be healthy. To be healthy, you need to exercise, be choosy of what you eat.

 I think that’ll be really nice for you actually! Don’t eat dinner at work. Eat stuff by yourself. Which will be great for you. Try out diets, try out things that will make you healthier than ever. I think it really is an important factor since you grown fat these days ...

## Systems and Simplicity

### The writer actually has a simple method. The chart needs to have an outstanding great pattern, there should be insider stock buying. All the other variables and stuff.
 Also, he does more research on sentimental and psychologic stuff.

### The most important thing is creating your own view of the market.

### We want secrets!!!! That’s our ego.

### You have to master chart patterns since they are just emotion written in to graphic! They all have the most possibilities and potential in it.

### First, you need to study the chart patterns and select what charts actually have the STRONGEST signals. That stock is going to be the super stock.

### Discover “undiscovered company stories”. Don’t even think about following stories that everyone know. That’ll be mass media manipulation.

## The Elusive Superstock

## Stacking the Odds in Your Favor

## Low Risk Entry Super Laws

## The Super Laws of Selling-Mastering the Art of Selling High Risk

## The “Lazy Man’s Guide” to Superstocks

## Eleven Charts that Changed My Life and May Change Yours

## Superstock Resources

## Major Lessons from My Failures, Warts and All

## Top Sixteen Things You Must Do Differently to Achieve Massive Success

## The Road Less Traveled

## Appendix A - How to Spot Global Inflection Points

## Appendix B - My Annual Global Market Forecasts 2010-2013

## Appendix C - “Some Things Never Change"

repository: DeactivatedWhatSoever/NSL

repo_name: DeactivatedWhatSoever/NSL


text:
MenuButton
==========

The MenuButton looks like a normal button, but it opens a menu when tapping on it.

Preview Image
-------------

![MenuButton](menubutton.png)

Features
--------

-   Contain text and/or icon.
-   Pointer support.
-   Ellipsis: If the label does not fit into the widget bounds an ellipsis (”...”) is rendered at the end of the label.
-   Menu support.

Description
-----------

The MenuButton looks like a normal button, but it opens a menu when tapping on it.

For using a menu see: menu

Demos
-----

Here are some links that demonstrate the usage of the widget:

-   [Menu demo that contains a MenuButton](http://demo.qooxdoo.org/%{version}/demobrowser/#widget~Menu.html)
-   [Form demo](http://demo.qooxdoo.org/%{version}/demobrowser/#showcase~Form.html)

API
---

Here is a link to the API of the Widget:
[qx.ui.form.MenuButton](http://demo.qooxdoo.org/%{version}/apiviewer/#qx.ui.form.MenuButton)

repository: iceteagroup/qooxdoo

gha_language: JavaScript

gha_license_id: NOASSERTION

repo_name: iceteagroup/qooxdoo


text:
> Written with [StackEdit](https://stackedit.io/).

# scikit-learn references

- [Logistic Regression: Scikit Learn vs Statsmodels](https://stats.stackexchange.com/questions/203740/logistic-regression-scikit-learn-vs-statsmodels). This blog entrance explains how to get the same result using Scikit Learn and Stats Models using logistic model. By default Scikit Learn apply regularization, that's because you get different parameter estimations. There is a trick to not apply regularization on Scikit Learn and get the same results as in Statsmodels.
<!--stackedit_data:
eyJoaXN0b3J5IjpbLTEzODU0NzE5MjZdfQ==
-->


text:
### [CVE-2022-24801](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-24801)
![](https://img.shields.io/static/v1?label=Product&message=twisted&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=CWE-444%3A%20Inconsistent%20Interpretation%20of%20HTTP%20Requests%20('HTTP%20Request%20Smuggling')&color=brighgreen)

### Description

Twisted is an event-based framework for internet applications, supporting Python 3.6+. Prior to version 22.4.0rc1, the Twisted Web HTTP 1.1 server, located in the `twisted.web.http` module, parsed several HTTP request constructs more leniently than permitted by RFC 7230. This non-conformant parsing can lead to desync if requests pass through multiple HTTP parsers, potentially resulting in HTTP request smuggling. Users who may be affected use Twisted Web's HTTP 1.1 server and/or proxy and also pass requests through a different HTTP server and/or proxy. The Twisted Web client is not affected. The HTTP 2.0 server uses a different parser, so it is not affected. The issue has been addressed in Twisted 22.4.0rc1. Two workarounds are available: Ensure any vulnerabilities in upstream proxies have been addressed, such as by upgrading them; or filter malformed requests by other means, such as configuration of an upstream proxy.

### POC

#### Reference
- https://www.oracle.com/security-alerts/cpujul2022.html

#### Github
- https://github.com/ARPSyndicate/cvemon

repository: trickest/cve

repo_name: trickest/cve


text:
# MicroOrm for PHP

[![Opensource ByJG](https://img.shields.io/badge/opensource-byjg.com-brightgreen.svg)](http://opensource.byjg.com)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/byjg/micro-orm/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/byjg/micro-orm/?branch=master)
[![Build Status](https://travis-ci.org/byjg/micro-orm.svg?branch=master)](https://travis-ci.org/byjg/micro-orm)
[![Code Coverage](https://scrutinizer-ci.com/g/byjg/micro-orm/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/byjg/micro-orm/?branch=master)

A micro framework for create a very simple decoupled ORM.
This library intended to be very small and very simple to use;

**Key Features**

* Can be used with any DTO, Entity, Model or whatever class with public properties or with getter and setter
* The repository support a variety of datasources: MySql, Sqlite, Postgres, MySQL, Oracle (see byjg/anydataset)
* A class Mapper is used for mapping the Entity and the repository
* Small and simple to use

# Examples

For the examples below we will use the class 'Users';

```php
<?php
class Users
{
    public $id;
    public $name;
    public $createdate;
}
```

First of all will create a Table Mapping class:

```php
<?php
// Creating the mapping
$mapper = new \ByJG\MicroOrm\Mapper(
    Users::class,   // The full qualified name of the class
    'users',        // The table that represents this entity
    'id'            // The primary key field
);

// Optionally you can define table mappings between the propoerties
// and the database fields;
// The example below will map the property 'createdate' to the database field 'created';
$mapper->addFieldMap('createdate', 'created');
```

Then you need to create the dataset object and the repository:

```php
<?php
$dataset = \ByJG\AnyDataset\Db\Factory::getDbRelationalInstance('mysql://user:password@server/schema');

$repository = new \ByJG\MicroOrm\Repository($dataset, $mapper);
```

Some examples with the repository:

```php
<?php

// Get a single data from your ID
$users = $repository->get(10);

// Persist the entity into the database:
// Will INSERT if does not exists, and UPDATE if exists
$users->name = "New name";
$repository->save($users);
```

# Advanced uses

Get a collection using the query object:

```php
<?php
$query = \ByJG\MicroOrm\Query::getInstance()
    ->table('users')
    ->fields(['id', 'name'])
    ->where('name like :part', ['part' => 'A%']);

// Will return a collection o 'Users'
$collection = $repository->getByQuery($query);
```

Returning multiples entities with a query:

```php
<?php
$query = \ByJG\MicroOrm\Query::getInstance()
    ->table('order')
    ->join('item', 'order.id = item.orderid')
    ->where('name like :part', ['part' => 'A%']);

// Will return a collection of Orders and Items:
// $collection = [
//     [ $order, $item ],
//     [ $order, $item ],
//     ...
// ];
$collection = $orderRepository->getByQuery(
    $query,
    [
        $itemRepository->getMapper()
    ]
);
```

# Using FieldAlias

Field alias is an alternate name for a field. This is usefull for disambiguation on join and leftjoin queries.
Imagine in the example above if both tables ITEM and ORDER have the same field called 'ID'.

In that scenario, the value of ID will be overriden. The solution is use the FieldAlias like below:

```php
<?php
// Create the Mapper and the proper fieldAlias
$orderMapper  = new \ByJG\MicroOrm\Mapper(...);
$orderMapper->addFieldAlias('id', 'orderid');
$itemMapper  = new \ByJG\MicroOrm\Mapper(...);
$itemMapper->addFieldAlias('id', 'itemid');

$query = \ByJG\MicroOrm\Query::getInstance()
    ->fields([
        'order.id as orderid',
        'item.id as itemid',
        /* Other fields here */
    ])
    ->table('order')
    ->join('item', 'order.id = item.orderid')
    ->where('name like :part', ['part' => 'A%']);

// Will return a collection of Orders and Items:
// $collection = [
//     [ $order, $item ],
//     [ $order, $item ],
//     ...
// ];
$collection = $orderRepository->getByQuery(
    $query,
    [
        $itemRepository->getMapper()
    ]
);
```

You can also add a MAPPER as a Field. In that case the MAPPER will create the field and the correct aliases.

```php
<?php
$query = \ByJG\MicroOrm\Query::getInstance()
    ->fields([
        $orderRepository->getMapper(),
        $itemRepository->getMapper,
    ]);
```

# Tables without auto increments fields

```php
<?php
// Creating the mapping
$mapper = new \ByJG\MicroOrm\Mapper(
    Users::class,   // The full qualified name of the class
    'users',        // The table that represents this entity
    'id',            // The primary key field
    function () {
        // calculate and return the unique ID
    }
);
```

# Applying functions for Select and Update

```php
<?php
// Creating the mapping
$mapper = new \ByJG\MicroOrm\Mapper(...);

$mapper->addFieldMap(
    $property,
    $fielname,
    // Update Closure
    // Returns the field value with a pre-processed function before UPDATE
    // If sets to NULL this field will never be updated/inserted
    function ($field, $instance) {
        return $field;
    },
    // Select Closure
    // Returns the field value with a post-processed value AFTER query from DB
    function ($field, $instance) {
        return $field;
    }
);
```

# Pre-defined closures for field map:

*Mapper::defaultClosure($value, $instance)*

Defines the basic behavior for select and update fields;

*Mapper::doNotUpdateClosure($value, $instance)*

If set in the update field map will make the field not updatable by the micro-orm.
It is usefull for fields that are pre-defined like 'Primary Key'; timestamp fields based on the
update and the creation; and others

# Before insert and update functions

You can also set closure to be applied before insert or update a record.
In this case will set in the Repository:

```php
<?php
Repository::setBeforeInsert(function ($instance) {
    return $instance;
});

Repository::setBeforeUpdate(function ($instance) {
    return $instance;
});
```

# Reuse Connection

The Repository receives a DbDriverInterface instance (connection).
It is normal we create everytime a new connection.
But if we need to reuse a previous connection we can use the
ConnectionManager object to handle it easier.

```php
<?php
$connectionManager = new ConnectionManager();

$repo1 = new Repository($connectionManager->addConnection("uri://host"));

...

// If you the same Uri string the ConnectionManager will reuse
// the last DbDriver instance created
$repo2 = new Repository($connectionManager->addConnection("uri://host"));

```

# Transaction

If all of DbDriver instance as created by the ConnectionManager you can create
database transactions including across different databases:

```php
<?php
$connectionManager = new ConnectionManager();

$connectionManager->beginTransaction();
$repo1 = new Repository($connectionManager->addConnection("uri1://host1"));
$repo2 = new Repository($connectionManager->addConnection("uri2://host2"));

// Do some Repository operations;
// ...

// commit (or rollback all transactions)
$connection->commitTransaction();
```

# Install

Just type:

```
composer require "byjg/micro-orm=4.0.*"
```

# Running Tests

```php
phpunit
```

# Related Projects

- [Database Migration](https://github.com/byjg/migration)
- [Anydataset](https://github.com/byjg/anydataset)
- [PHP Rest Template](https://github.com/byjg/php-rest-template)
- [USDocker](https://github.com/usdocker/usdocker)
- [Serializer](https://github.com/byjg/serializer)

----
[Open source ByJG](http://opensource.byjg.com)

repository: Juri-Salminen/micro-orm

repo_name: Juri-Salminen/micro-orm


text:
# inflected

[![Travis build status](https://img.shields.io/travis/martinandert/inflected/master.svg)](https://travis-ci.org/martinandert/inflected)
[![npm downloads](https://img.shields.io/npm/dm/inflected.svg)](https://npmjs.com/package/inflected)
[![no dependencies](https://img.shields.io/badge/dependencies-none-brightgreen.svg)](https://npmjs.com/package/inflected)
[![license](https://img.shields.io/github/license/martinandert/inflected.svg)](https://github.com/martinandert/inflected/blob/master/LICENSE.txt)

A port of ActiveSupport's inflector to Node.js. Also usable in the browser.

## Installation

Install via npm:

```bash
% npm install inflected
```

Or via yarn:

```bash
% yarn add inflected
```

The UMD build is also available on [unpkg](https://unpkg.com/), adding a `Inflector` object to the global scope.

```html
<script src="https://unpkg.com/inflected/dist/umd/inflected.min.js"></script>
```

## Usage

The module exports an object with several utility functions.

```js
var Inflector = require('inflected');

Inflector.pluralize('Category')  // => 'Categories'
```

If using ES modules, you can cherry-pick only the functions you're interested in:

```js
import { pluralize } from 'inflected';

pluralize('Category')  // => 'Categories'
```

Here is the complete API reference:

### Inflector.pluralize

```js
string pluralize(string word[, string locale])
```

Returns the plural form of the word in the string.

If passed an optional `locale` parameter, the word will be pluralized using rules defined for that language. By default, this parameter is set to "en".

```js
Inflector.pluralize('post')          // => 'posts'
Inflector.pluralize('octopus')       // => 'octopi'
Inflector.pluralize('sheep')         // => 'sheep'
Inflector.pluralize('words')         // => 'words'
Inflector.pluralize('CamelOctopus')  // => 'CamelOctopi'
Inflector.pluralize('ley', 'es')     // => 'leyes'
```

### Inflector.singularize

```js
string singularize(string word[, string locale])
```

The reverse of `pluralize`, returns the singular form of a word in a string.

If passed an optional `locale` parameter, the word will be singularized using rules defined for that language. By default, this parameter is set to "en".

```js
Inflector.singularize('posts')        // => 'post'
Inflector.singularize('octopi')       // => 'octopus'
Inflector.singularize('sheep')        // => 'sheep'
Inflector.singularize('word')         // => 'word'
Inflector.singularize('CamelOctopi')  // => 'CamelOctopus'
Inflector.singularize('leyes', 'es')  // => 'ley'
```

### Inflector.camelize

```js
string camelize(string term[, boolean uppercaseFirstLetter])
```

By default, `camelize` converts strings to UpperCamelCase. If the second argument is set to `false` then `camelize` produces lowerCamelCase.

```js
Inflector.camelize('foo_bar')         // => 'FooBar'
Inflector.camelize('foo_bar', false)  // => 'fooBar'
```

As a rule of thumb you can think of `camelize` as the inverse of `underscore`, though there are cases where that does not hold:

```js
Inflector.camelize(Inflector.underscore('SSLError'))  // => 'SslError'
```

### Inflector.underscore

```js
string underscore(string camelCasedWord)
```

Makes an underscored, lowercase form from the expression in the string.

```js
Inflector.underscore('FooBar')  // => 'foo_bar'
```

As a rule of thumb you can think of `underscore` as the inverse of `camelize`, though there are cases where that does not hold:

```js
Inflector.camelize(Inflector.underscore('SSLError'))  // => 'SslError'
```

### Inflector.humanize

```js
string humanize(string lowerCaseAndUnderscoredWord[, object options])
```

Capitalizes the first word, turns underscores into spaces, and strips a trailing "_id" if present.

Like `titleize`, this is meant for creating pretty output.

The capitalization of the first word can be turned off by setting the `capitalize` option key to `false`. By default, this option is `true`.

```js
Inflector.humanize('employee_salary')                   // => 'Employee salary'
Inflector.humanize('author_id')                         // => 'Author'
Inflector.humanize('author_id', { capitalize: false })  // => 'author'
```

### Inflector.titleize

```js
string titleize(string sentence)
```

Capitalizes all the words and replaces some characters in the string to create a nicer looking title. `titleize` is meant for creating pretty output.

```js
Inflector.titleize('man from the boondocks')   // => 'Man From The Boondocks'
Inflector.titleize('x-men: the last stand')    // => 'X Men: The Last Stand'
Inflector.titleize('TheManWithoutAPast')       // => 'The Man Without A Past'
Inflector.titleize('raiders_of_the_lost_ark')  // => 'Raiders Of The Lost Ark'
```

### Inflector.tableize

```js
string tableize(string className)
```

Create the name of a table like Rails does for models to table names. This method uses the `pluralize` method on the last word in the string.

```js
Inflector.tableize('RawScaledScorer')  // => 'raw_scaled_scorers'
Inflector.tableize('egg_and_ham')      // => 'egg_and_hams'
Inflector.tableize('fancyCategory')    // => 'fancy_categories'
```

### Inflector.classify

```js
string classify(string tableName)
```

Create a class name from a plural table name like Rails does for table names to models.

```js
Inflector.classify('egg_and_hams')  // => 'EggAndHam'
Inflector.classify('posts')         // => 'Post'
```

Singular names are not handled correctly:

```js
Inflector.classify('business')  // => 'Busines'
```

### Inflector.dasherize

```js
string dasherize(string underscoredWord)
```

Replaces underscores with dashes in the string.

```js
Inflector.dasherize('puni_puni')  // => 'puni-puni'
```

### Inflector.foreignKey

```js
string foreignKey(string className[, boolean separateClassNameAndIdWithUnderscore])
```

Creates a foreign key name from a class name. `separateClassNameAndIdWithUnderscore` sets whether the method should put "_" between the name and "id" (default: `true`).

```js
Inflector.foreignKey('Message')         // => 'message_id'
Inflector.foreignKey('Message', false)  // => 'messageid'
```

### Inflector.ordinal

```js
string ordinal(object number)
```

Returns the suffix that should be added to a number to denote the position in an ordered sequence such as 1st, 2nd, 3rd, 4th.

```js
Inflector.ordinal(1)      // => 'st'
Inflector.ordinal(2)      // => 'nd'
Inflector.ordinal(1002)   // => 'nd'
Inflector.ordinal(1003)   // => 'rd'
Inflector.ordinal(-11)    // => 'th'
Inflector.ordinal(-1021)  // => 'st'
```

### Inflector.ordinalize

```js
string ordinalize(object number)
```

Turns a number into an ordinal string used to denote the position in an ordered sequence such as 1st, 2nd, 3rd, 4th.

```js
Inflector.ordinalize(1)      // => '1st'
Inflector.ordinalize(2)      // => '2nd'
Inflector.ordinalize(1002)   // => '1002nd'
Inflector.ordinalize(1003)   // => '1003rd'
Inflector.ordinalize(-11)    // => '-11th'
Inflector.ordinalize(-1021)  // => '-1021st'
```

### Inflector.inflections

```js
Inflections inflections([string locale])
inflections([string locale], [function(Inflections) fn])
```

A singleton instance of the internal Inflections class is yielded by this function, which can then be used to specify additional inflection rules. If passed an optional locale, rules for other languages can be specified. The default locale is "en". Only rules for English are provided by this library.

```js
Inflector.inflections('en', function(inflect) {
  inflect.plural(/^(ox)$/i, '$1$2en');
  inflect.singular /^(ox)en/i, '$1');

  inflect.irregular('octopus', 'octopi');

  inflect.uncountable('equipment', 'snow');
});
```

New rules are added at the top. So in the example above, the irregular rule for octopus will now be the first of the pluralization and singularization rules that is run. This guarantees that your rules run before any of the rules that may already have been loaded.

### Inflector.transliterate

```js
string transliterate(string sentence[, object options])
```

Replaces non-ASCII characters with an ASCII approximation, or if none exists, a replacement character which defaults to "?".

```js
Inflector.transliterate('Ærøskøbing')  // => 'AEroskobing'
```

Default approximations are provided for Western/Latin characters, e.g, "ø", "ñ", "é", "ß", etc.

This method is I18n-aware, so you can set up custom approximations for a locale. This can be useful, for example, to transliterate German's "ü" and "ö" to "ue" and "oe", or to add support for transliterating Russian to ASCII.

In order to make your custom transliterations available, you must set them using the `approximate` helper function:

```js
Inflector.transliterations('de', function(t) {
  t.approximate('ü', 'ue');
  t.approximate('ö', 'oe');
});
```

Now you can have different transliterations for each locale:

```js
Inflector.transliterate('Jürgen')                    // => 'Jurgen'
Inflector.transliterate('Jürgen', { locale: 'de' })  // => 'Juergen'
```

### Inflector.parameterize

```js
string parameterize(string sentence[, object options])
```

Replaces special characters in a string so that it may be used as part of a 'pretty' URL.

```js
Inflector.parameterize('Donald E. Knuth')                      // => 'donald-e-knuth'
Inflector.parameterize('Donald E. Knuth', { separator: '+' })  // => 'donald+e+knuth'
```

As of v2.1, there's also a `preserveCase` option:

```js
Inflector.parameterize('Donald E. Knuth', { preserveCase: true })  // => 'Donald+E+Knuth'
```

### Inflector.constantify

```js
string constantify(string words)
```

Converts words (camelCased, under_scored, or dasherized) to CONSTANT_CASE.

```js
Inflector.constantify('bankAccount')   // => 'BANK_ACCOUNT'
Inflector.constantify('bank-account')  // => 'BANK_ACCOUNT'
Inflector.constantify('bank_account')  // => 'BANK_ACCOUNT'
Inflector.constantify('Bank Account')  // => 'BANK_ACCOUNT'
```

## Contributing

Here's a quick guide:

1. Fork the repo and `make install`.
2. Run the tests. We only take pull requests with passing tests, and it's great to know that you have a clean slate: `make test`.
3. Add a test for your change. Only refactoring and documentation changes require no new tests. If you are adding functionality or are fixing a bug, we need a test!
4. Make the test pass.
5. Push to your fork and submit a pull request.

## Licence

Released under The MIT License.


text:
---
layout: postDefault
title: 'Sprint Epsilon: Level Design 101'
date: 2017-11-21
---

After jumping back into action with the project, our team decided that planning out the levels we'd like for our final hand in would give a good roadmap of remaining goals and progress.

<!--excerpt-->

![Level Design Plan]({{ "/assets/images/levelDesign.png" }})
Originally we wanted to pace the player by introducing a mechanic, then giving them multiple puzzles focusing on it that increase in difficulty. However due to the limited time frame for the project, we've decided to plan out 7 levels that throw our ideas out just to show what we can do and have planned, with extra levels being added if time permits. This does have the sad effect of quickly showing a mechanic before throwing it to the side to introduce another but we agreed showing off as much as we could was better than a final project with multiple levels yet only two or three actual mechanics!

So far the levels cover everything from: replay, buttons, pressure plates, lasers and mirrors. We felt this was a good variety to include as a base level with the option to create more if time permits. The last level is essentially a final test that takes everything the player has learnt and brings it all together in an extra large room which makes it seem more satisfying to end on than just another new mechanic level.

The next few weeks will focus on building these new levels and mechanics and hopefully ending up with a system where we can easily drag and drop everything to make multiple levels quickly.


text:
# Powhatan
A light-weight, fast and simple web server.

## Installation

### Building From Source
Run:
```git clone https://github.com/TomatOid/powhatan.git```
to download the repository. Then run, ```cd powhatan```. Then ```./build.sh```

### Package Manager (planned)
```sudo apt install powhatan```

## Running
Run:
```./server``` to run the server. It defaults to serving on port 8888.

## Configuration
### Macros
The PORT macro changes the port that the server runs off of.

## Contributions
We would love and accept contributions

repository: TomatOid/powhatan

gha_language: C

repo_name: TomatOid/powhatan


text:
+++
# Experience widget.
widget = "experience"  # See https://sourcethemes.com/academic/docs/page-builder/
headless = true  # This file represents a page section.
active = true  # Activate this widget? true/false
weight = 40  # Order that this section will appear.

title = "Experience"
subtitle = ""

# Date format for experience
#   Refer to https://sourcethemes.com/academic/docs/customization/#date-format
date_format = "Jan 2006"

# Experiences.
#   Add/remove as many `[[experience]]` blocks below as you like.
#   Required fields are `title`, `company`, and `date_start`.
#   Leave `date_end` empty if it's your current employer.
#   Begin/end multi-line descriptions with 3 quotes `"""`.

[[experience]]
  title = "Date Engineer"
  company = "ml6"
  company_url = "https://www.ml6.eu/"
  location = "Ghent - Belgium"
  date_start = "2021-04-19"
  date_end = ""
  description = """
  - Data Engineer at ML6 means a lot of data engineering, a bit of software engineering and a bit of machine learning.
  - A lot of work in Google Cloud.
  - Tools: Terraform, Dataflow, Kubernetes, Kubeflow, Bigquery. TensorFlow,...
  """

[[experience]]
  title = "Teamlead R&D"
  company = "Inbiose"
  company_url = "https://www.inbiose.com"
  location = "Ghent - Belgium"
  date_start = "2016-10-01"
  date_end = "2021-04-09"
  description = """
  [Goal] Development of production process for HMO using novel production micro-organisms.
  I'm involved in:

  - planning and designing novel metabolic production pathways
  - identification and solving of pathway bottlenecks (theoretical: literature/databases/modeling and practical: UPLC/HPLC, genotyping, phenotyping)
  - bioinformatics: alternative genes / pathways (Galaxy, blast, ETE)
  - planning strain building: leading team towards efficient host construction
  - evaluation: from high throughput microtiter plate up to 5L fermentors
  - involved in process development: optimization and alignment of fermentation and DSP processes.

  - data capture: capturing lab data from operators and machines and store in databases (PostgreSQL, influxDB, neo4j)
  - data analysis: wrote several packages to help with data extraction and analysis (python3 and R)
  - data visualisation: wrote different R shiny apps helping with data visualisation (R Shiny, Grafana)
  - data tools: developed different webapps that talk to different databases and allow operators to modify the data using a webbrowser (python3, flask). Setup web tools like Rstudio, Jupyter and Galaxy.
  - setting up IT infrastructure (linux): LXD/LXC containers/Docker
  """

[[experience]]
  title = "PostDoc"
  company = "Ghent University"
  company_url = ""
  location = "Ghent - Belgium"
  date_start = "2016-04-01"
  date_end = "2016-09-30"
  description = """
  - continued work of PhD, targetting a future spin-off
  - submitted personal VLAIO project with spin-off finality
  - contributed to submitting 3 European projects
  """

[[experience]]
  title = "PhD"
  company = "Ghent University"
  company_url = ""
  location = "Ghent - Belgium"
  date_start = "2015-12-31"
  date_end = "2010-09-01"
  description = """
  Pathways to chito-oligosaccharides production : integrating synthetic biology and metabolic engineering for pathway optimization

  - genetical tool development for *E. coli*: genetic promoter and cloning tools
  - development of a platform to produce well defined (acetylation pattern) chito-oligosaccharides
  - strong collaboration with academia in Germany and Spain in ChitoBioengineering and the follow-up Nano3Bio European project

  """

+++

repository: picousse/personal

repo_name: picousse/personal


text:
# Credit Suisse

Built for Credit Suisse HACKATHON 2018

## Getting Started

This Project uses Python for interacting with WhatsApp API's and creating a Seq2Seq Model

### Dependencies

What things you need to install the software and how to install them

```
nltk
tflearn
numpy
tensorflow
datetime
configparser
```

### Installing

For get it running, please install latest versions of the above and dependencies

and then

```
python3 run.py
```

If everything runs successfully then you will see like this

```
[WhatsApp] Bot Started
```

Now shoot your messages to the number configured in config.py file (+91<PHONE_NUMBER>)

## Built With

* [Tensorflow](http://www.tensorflow.org/)
* [TomTom](https://developer.tomtom.com)
* [nltk](https://www.nltk.org/)

## License

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

repository: akshitpradhan/Credit-Suisse-FAQ

repo_name: akshitpradhan/Credit-Suisse-FAQ


text:
# CoDeAr
========

Command Line re-usable scaffold for coding small units of work that follow the Collect-Deliver-Archive "rhythm".

# 1. Overview

Quite often it is necessary to code processes that run on command-line mode ( CLI ). Usually these processes require a common set of procedures or steps, in any technology, before actually coding their own specific logic and features. This preparation work often deals with command-line options handling, configuration files and logging.

What if there would be no need for this preparation work?

What if with minimal to no effort it would be possible to just focus on implementing each process specific logic and features?

## 1.1. Goal and Objectives

- Minimize the time and effort required to implement a process from scratch;
- Provide, at the very least, a set of templates in each technology with frequently used features;
- Provide a re-usable scaffold that supports frequently used features;
- Implement this simple command-line kit in distinct technologies:
  - Shell
  - Perl
  - Python
  - Ruby

**Note**: For each technology there should exist a file that registers similar work.

## 1.2. Scope

Although this re-usable scaffold can be seen as a library or framework it should be considered as a set of best-practices to follow.

The processes to implement, called **workers**, all follow the same execution steps: collect information ( from files or tables ), process that information ( in distinct manners ) and deliver the processed information ( in files or tables, which may also include archiving with or without compression ).

Currently there are no plans to make this a tool.

## 1.3. Terms and Concepts

Before using the code one should get acquainted with these terms and concepts:

- **worker**: a process, built around this "_scaffold_", that executes one and one task only. The task is composed of sequential steps:
  - **collect**: step that collects data, usually from files or from tables;
  - **process**: specific step of each work that processes the data after being collected and before being delivered;
  - **deliver**: step that gathers the result from the process step and publishes them as deliverables of the worker, usually to files or to tables;
  - **archive**: final step that archives the deliverables of the process, optionally by compressing them in one of the well-known formats ( such as gz or bz2 ).
-  **orchestrator**: a wrapper of workers that passes the output of a worker as input to another worker. This special process chains together a set of workers in order to accomplish a complex task ( or multiple tasks ).

# 2. Milestones

These milestones, whenever feasible, should be accomplished with core and standard library features. Although 3rd party libraries are allowed, their usage should be limited and avoided as much as possible.

## 2.1. Logging

Logging messages should be outputted to the console only and not to a file when there's no configuration. But by default the logging messages should be outputted to the console and to a file, both set at INFO logging level.

The pattern for the logging messages should follow the formatting placeholders of Log4J. At the bare minimal there should be 3 fields at least: timestamp, logging level and logging message. But if feasible then at least 2 more fields should be presented: filename and line number.

The features provided by this layer are:

- **Create Logger**: each worker must have access to a logger instance;
- **Reconfigure Logger**: in order to deal with multiple configuration files it is necessary to allow the logging mechanism to be reconfigured when a complete configuration is loaded;
- **Shutdown Logger**: it's useful for cases where the logging file should be compressed.

**Note**: the logging messages must be encoded in UTF-8.

## 2.2. Command-Line Options

Every worker has to obey to a well-known set of command-line options:

- **-h / --help**: shows the usage message for the worker;
- **-v / --version**: shows the worker's name and version;
- **-c / --configuration-file**: loads a specific flat configuration file, bypassing the default configuration;
- **-s / --show-configuration**: outputs the complete configuration, in a given format ( yaml, json );
- **-g / --get-folder**: shows the absolute path of the given folder name ( input, working, output, archive ).

**Note**: specific command-line options are only known ( and handled ) by the worker and should not be "configurable".

## 2.3. Configuration

The configuration files can be in any of the following formats, in order:

- YAML
- JSON ( primary target, usually offered by the Standard Library );
- XML ( secondary target );
- INI ( terciary target, since it's a flat data format rather than an hierarchical data format ).

**Note**: All configuration files are located in a folder relative to the top folder of the worker.

The configuration works under one of two modes:

- **Multiple**: each configuration file is merged against the current configuration in order to fulfil a complete configuration;
- **Flat**: only one configuration file is read and it must correspond to a complete configuration.

The default mode is to read multiple configuration files and merged them into one virtual complete file. The flat mode must be enabled through a specific command-line option. Each mode starts by reading a common configuration file, which can be overrided by specific configuration files.

The features provided by this layer are:

- **Load Configuration Files**: loads multiple configuration files, in a specific order of formats, that have the same name of the worker;
- **Load Configuration File**: loads a specific complete configuration file, in any of the allowed formats;
- **Show Configuration**: outputs the complete configuration, in one of the allowed formats ( specified as argument );
- **Get Configuration**: this is actually a set of sub-features that allows access to frequently used sections of the complete configuration:
  - **Logging**;
  - **Folders**;
  - **Flags**;
  - **DataBases**;
  - **Services**;
  - **Worker**.
- **Expand Properties**: in order to allow configuration files that hold values that are dependant on other properties it is necessary to control when these properties must be expanded on those values;
- **Add Property**: sometimes it's necessary to control other properties that are not configurable but that are useful when expanding properties.

## 2.4. Flags

The features provided by this layer are:

- **Initialize**: initializes the flag mechanism, if explicitly defined in configuration section;
- **Set _Processing_**: sets the flag as _worker still executing_, which should prevent other instances of that worker to run simultaneously;
- **Set _Terminated_**: sets the flag as _worker terminated successfully_, which should enable another instance of that worker to run;
- **Set _Errored_**: sets the flag as _worker terminated abnormally_, which should prevent other instances of that worker to run simultaneously, until the root cause of the problem is fixed.

## 2.5. File and Folders

The features provided by this layer are:

- **Create Missing Folders**: creates missing folders, suited for all the well known folders, which when do not exist are then created automatically;
- **Create File**: operating system agnostic way of creating an empty file;
- **Create Folder**: operating system agnostic way of creating an empty folder;
- **Remove**: operating system agnostic way of deleting a file;
- **Copy**: operating system agnostic way of safely copying a file, in 2 stages: first copies the file as a temporary file and if successfully then rename it to the final file;
- **Move**: operating system agnostic way of safely moving a file, in 3 stages: first copies the file as a temporary file, if successfully then rename it to the final file and then removes the original file;
- **Collect**: moves an input file from the input folder into the working folder, by using the safe move feature;
- **Deliver**: moves an output file from the working folder into the output folder, by using the safe copy feature;
- **Clean**: removes the output files that are not deliverables of the worker;
- **Archive**: archives the final files, optionally compressing them by using one of the well known formats: gz, bz2, zip.

**Note**: the deliver feature must copy the final file, instead of moving it, because the archive feature may require this final file at the working folder. If the archive feature uses the final file on the output folder then it will only work when there's an output folder configured, even in cases where the deliverable produced is not to be stored in the output folder. But in which real-case scenario is this useful?

## 2.6. Shell and Processes

The features provided by this layer are:

- **Execute Command**: executes another process as a _child_ of the worker.

## 2.7. Network

The features provided by this layer are:

- **Open Connection**: establishes a connection with the configured remote server;
- **List Files**: returns a list of files in current remote folder;
- **Get File**: collects a remote file given it's filename;
- **Put File**: delivers a local file to a remote location.

The protocol used is one of the following well-known file transfer protocols:

- **FTP**
- **SFTP**

## 2.8. DataBase

The drivers, for each database engine, should be loaded dynamically. This means that only the drivers explicitly set on the configuration are the drivers that should be loaded.

The features provided by this layer are:

- **Open Connection**: establishes a connection with the configured database engine;
- **Create Cursor**: opens a cursor, given a connection;
- **Get Table Columns**: returns meta information about a table, at least the names of columns if nothing more;
- **Table Exists?**: checks if a table exists;
- **Execute Query**: executes a SELECT statement and returns all rows;
- **Execute SQL**: executes a SQL statement, DML or DDL, and returns the number of affected rows;
- **Import Records**: given a table and a set of working files then load each line as a record on that table;
- **Extract Records**: given a SELECT statement and a filename then save every record from that query as a line on the file;
- **Update Records**: given a function to transform a line into a criteria it will update every record of a table that matches that criteria.

**Note**: since not all workers require database connections then neither a connection must be established and neither any driver must be loaded for the code to work.

## 2.9. Others

### 2.9.1. Messaging

### 2.9.2. Workbooks

repository: straider/CoDeAr

repo_name: straider/CoDeAr


text:
# go-snmp-grpc

[![Travis Build](https://api.travis-ci.org/thebinary/go-snmp-grpc.svg?branch=master)](https://travis-ci.org/thebinary/go-snmp-grpc)

__SNMP through GRPC__

## Use Cases
* Service as a gateway to firewall'd SNMP targets
* Language independent service for SNMP due of the use of GRPC

## Related Documentation
* [SNMP protobuf](https://github.com/thebinary/go-snmp-grpc/blob/master/protobuf/README.md)

__Special Thanks:__
- [github.com/soniah/gosnmp](https://github.com/soniah/gosnmp)
- [github.com/spf13/viper](https://github.com/spf13/viper)

repository: thebinary/go-snmp-grpc

gha_language: Go

repo_name: thebinary/go-snmp-grpc