SQL Alchemy Tutorial
Table of Contents
This is a walk through of the SQL Alchemy Tutorial. There's nothing original here, I'm just trying to re-acquaint myself with SQL Alchemy.
Imports
from sqlalchemy import (
create_engine,
Column,
Integer,
String,
)
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
Create the Engine
This is going to connect to SQLite (in memory).
engine = create_engine("sqlite:///:memory:", echo=True)
The echo
parameter tells SQLAlchemy to start logging.
Declare a Mapping
The Base
This creates a base-class that our classes will inherit from.
Base = declarative_base()
A User
First we're going to create a User class that maps to a user-table in the database.
class User(Base):
__tablename__ = "users"
id = Column(Integer, primary_key=True)
name = Column(String)
fullname = Column(String)
password = Column(String)
def __repr__(self):
return "<User (name={} fullname={} password={})".format(self.name,
self.fullname,
self.password)
Create a Schema
SQL Alchemy automatically creates a Table object for us.
User.__table__
# Out[5]:
Table('users', MetaData(bind=None), Column('id', Integer(), table=<users>, primary_key=True, nullable=False), Column('name', String(), table=<users>), Column('fullname', String(), table=<users>), Column('password', String(), table=<users>), schema=None)
If you try and print it you will only get the table-name 'users'.
Create the Table
Now we actually create the table using the Base object.
Base.metadata.create_all(engine)
2018-11-30 18:05:27,009 INFO sqlalchemy.engine.base.Engine SELECT CAST('test plain returns' AS VARCHAR(60)) AS anon_1 2018-11-30 18:05:27,010 INFO sqlalchemy.engine.base.Engine () 2018-11-30 18:05:27,011 INFO sqlalchemy.engine.base.Engine SELECT CAST('test unicode returns' AS VARCHAR(60)) AS anon_1 2018-11-30 18:05:27,011 INFO sqlalchemy.engine.base.Engine () 2018-11-30 18:05:27,013 INFO sqlalchemy.engine.base.Engine PRAGMA table_info("users") 2018-11-30 18:05:27,014 INFO sqlalchemy.engine.base.Engine () 2018-11-30 18:05:27,015 INFO sqlalchemy.engine.base.Engine CREATE TABLE users ( id INTEGER NOT NULL, name VARCHAR, fullname VARCHAR, password VARCHAR, PRIMARY KEY (id) ) 2018-11-30 18:05:27,016 INFO sqlalchemy.engine.base.Engine () 2018-11-30 18:05:27,017 INFO sqlalchemy.engine.base.Engine COMMIT
Create a User
bob = User(name="bob", fullname="Bob Dobolina", password="bob spelled backwards")
print(bob.name)
print(bob.fullname)
print(bob.id)
bob Bob Dobolina None
Create a Session
So far we've only been working with python objects, you need a session to actually talk to a database.
Session = sessionmaker(bind=engine)
session = Session()
Add Bob to the Session
session.add(bob)
This still doesn't actually add it to the database, we need to commit it. This is useful because you can continue to create objects and update them without continuously hitting the database.
Now we actually do our first communication with the database.
session.commit()
2018-12-03 14:39:51,652 INFO sqlalchemy.engine.base.Engine BEGIN (implicit) 2018-12-03 14:39:51,655 INFO sqlalchemy.engine.base.Engine INSERT INTO users (name, fullname, password) VALUES (?, ?, ?) 2018-12-03 14:39:51,656 INFO sqlalchemy.engine.base.Engine ('bob', 'Bob Dobolina', 'bob spelled backwards') 2018-12-03 14:39:51,658 INFO sqlalchemy.engine.base.Engine COMMIT
print("Bob's ID: {}".format(bob.id))
Bob's ID: 1
Even though we didn't specify the ID, it gets added when the entry is committed to the database.
More Users
Instead of adding them one at a time you can pass in a list of users.
session.add_all([
User(name="ted", fullname="Ted Thompson", password="wordpass"),
User(name="tom", fullname="Tom Tuttle", password="tacoma")
])
session.commit()
2018-12-03 14:46:48,764 INFO sqlalchemy.engine.base.Engine INSERT INTO users (name, fullname, password) VALUES (?, ?, ?) 2018-12-03 14:46:48,765 INFO sqlalchemy.engine.base.Engine ('ted', 'Ted Thompson', 'wordpass') 2018-12-03 14:46:48,766 INFO sqlalchemy.engine.base.Engine INSERT INTO users (name, fullname, password) VALUES (?, ?, ?) 2018-12-03 14:46:48,767 INFO sqlalchemy.engine.base.Engine ('tom', 'Tom Tuttle', 'tacoma') 2018-12-03 14:46:48,768 INFO sqlalchemy.engine.base.Engine COMMIT
Now we can make a query to see what's there.
for row in session.query(User).order_by(User.id):
print(row.id, row.fullname)
2018-12-03 14:48:53,556 INFO sqlalchemy.engine.base.Engine SELECT users.id AS users_id, users.name AS users_name, users.fullname AS users_fullname, users.password AS users_password FROM users ORDER BY users.id 2018-12-03 14:48:53,557 INFO sqlalchemy.engine.base.Engine () 1 Bob Dobolina 2 Ted Thompson 3 Tom Tuttle


In this configuration, we will connect two VMs using an OVS bridge. The VMs will solely be connected to each other via the bridge without any connectivity to the dom0. Hence , the VMs will only be able to communicate with each other.
Creating and Setting up an OVS bridge.
We will create an OVS bridge named ovsbr1. ovsbr1 will be connected to vm-1, vm-2 and interface eth1.
Create the bridge using the command :
sudo ovs-vsctl add-br ovsbr1
Make sure you have installed ovs using apt-get package.
By default, the Linux bridge is connected to the VMs. To remove this connection and add OVS bridge to your VM, edit your VM config file by adding parameters to the vif:
vif = 'script=vif-openvswitch,bridge=ovsbr1'
To connect your bridge to both the VMs add this line to both the VM config files.
When no parameters are set for vif, the VM is by default connected to the Linux bridge. When you specify the name of the bridge in your config file, you are specifying that this particular bridge (ovsbr1) should be connected to eth0 of your VM. Don’t worry about which ovsbr1 port will be connection VM’s eth0. This will be taken care of by Xen.
Now that ovsbr1 is connected to both the VMs, we can proceed to connecting the bridge to the interface(eth1 here). For this, create a port and connect it to the interface to complete the setup.
sudo ovs-vsctl add-port ovsbr1 eth1
Restart the network by using either of the two ways:
sudo service network-manager restart
sudo ifconfig eth1 down && sudo ifconfig eth1 up
sudo ip link set eth1 down && sudo ip link set eth1 up
In case this does not work either, restart the server/system.
Setting up the VM network manually.
Now that the VMs are not connected to the Linux bridge, they do not have any ip address. We will set up local ip addresses for both the VMs so that they can communicate with each other.
For any network configuration changes to the Ubuntu system, you need to edit file /etc/network/interfaces.
I am using <IP_ADDRESS> and <IP_ADDRESS> for vm-1 and vm-2 respectively. The subnet mask is <IP_ADDRESS>. Make sure that the subnet mask you are using is the same as that of being used for the Linux Bridge (in other words, to the subnet mask on eth0 of your server/system).
Edit /etc/network/interfaces on vm-1:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address <IP_ADDRESS>
netmask <IP_ADDRESS>
network <IP_ADDRESS>
broadcast <IP_ADDRESS>
gateway <IP_ADDRESS>
dns-nameservers <IP_ADDRESS> <IP_ADDRESS>
Make similar changes to vm-2 using ip address <IP_ADDRESS> and save it.
Restart the two VMs. Test the connectivity between the two using ping command. The two VM’s should be able to ping each other and no other address.
ping <IP_ADDRESS>
should work on vm-1 but
ping www.google.com
or
ping <ip_address_of_eth0_on_server>
should not.
You will have to restart the whole server to see the changes as resetting the network doesn’t reflect the changes
The final network looks like this
|------------------------------------------------------|
| |
| |--------| |----------| |--------| |
| | vm-1 |--------| ovsbr1 |---------| vm-2 | |
| |--------| |----------| |--------| |
| | |
| | |
|-----------------| | |
| Linux Bridge | | |
| |-------| | |-------| |
|----| eth0 |---------| eth1 |-----------------------|
|-------| |-------|


收集Electron的常见问题
Main Process, Renderer Process and Pages
- Main Process: the process that runs package.json's main script. An Electron app always has one main process, but never more.
- Renderer Process: Each web page in Electron runs in its own process, which is called the renderer process.
- Relationship with Pages: The main process creates web pages by creating BrowserWindow instances. Each BrowserWindow instance runs the web page in its own renderer process. When a BrowserWindow instance is destroyed, the corresponding renderer process is also terminated.
Additional Tips
- If you want to perform GUI operations in a web page, the renderer process of the web page must communicate with the main process to request that the main process perform those operations.


|
This
Is The Place
(Red Hot Chili Peppers) |
|
This
is the place where all
The junkies go Where time gets fast But everything gets slow Can I get some vaseline Step into a modern scene Take a chance of that Which seems to be The making of a dream I don't want to do it Like my daddy did I don't want to give it To my baby's kid This is my calling... This is the place where all The devils plead Their case to take from you What they need Can I isolate your gene Can I kiss your dopamine In a way I wonder If she's living in a magazine I don't want to say it If it isn't so I don't want to weigh it But i've got to know This is my calling...


I work in the field of digital media with a focus on video production. Currently, I am studying Integrated Digital Media at New York University. Here you can find various works of mine ranging from video and photo to coding and 3D modeling.


jsFO / Info
jsFO is an open-source port of Interplay's Fallout2 for the browser, written in Javascript, with conversion of assets from the original Fallout2 handled in Python. jsFO uses the HTML5 canvas API for rendering, and should be compatible with all modern browsers.
For more information, as well as access to the source-code, head over to the project's
Github Page.


Komodo
talk-trading
A channel to discuss trading. For useful links and more info click the pinned messages to the right.
100 messages
Before 05-Dec-19 12:00 AM
jorian
30-May-19 05:19 PM
7.5k is quite low
8350 has 2 supports
if it breaks there, we don't know how low
Alexfrog
30-May-19 05:20 PM
it was above 9000 only for the length of time it took to post one dragonball meme, then tanked
jorian
30-May-19 05:20 PM
if it breaks there, we don't know how low
Markus
30-May-19 05:21 PM
would like to see a red weekly candle
cant see how this rise is sustainable if it keeps going parabolic without pullbacks or sideways going
차미숙
30-May-19 05:22 PM
It is a weird chart indeed
jorian
30-May-19 05:22 PM
you are a bear, therefore we will be bullish
차미숙
30-May-19 05:22 PM
I have never seen a chart like this
Markus
30-May-19 05:23 PM
im not a bear but come on i dont see how this is sustainable at all, if this was in a bull market this would soon be in euphoria stage
1
Caglio
30-May-19 05:23 PM
I just read the news
charlize theron is ready to find a love of her life
ComputerGenie 👴👴👴
30-May-19 05:24 PM
mind-melt: Charlize Theron is an African-American
차미숙
30-May-19 05:24 PM
But then if you think about how much things have fallen for a long time, it's merely a slight recovery
Caglio
30-May-19 05:24 PM
she is from south africa
I heard they do ass to mouth
ComputerGenie 👴👴👴
30-May-19 05:25 PM
She holds dual citizenship
Caglio
30-May-19 05:25 PM
She is good looking I must admit
I would still rather bone vintage Sharon Stone
But its ok, step by step
So people, when Lambo ?
Lol
I would never buy myself Lambo honestly
I would rather buy Ford Ranger, so when I drive drunk and drugged to be sure I do not kill myself
safety first
@Deleted User
I am at work rn, and I am about to start drinking
I have 3 litres of white wine, and 2 litres of cola
Its gonna be a wonderful shift
1
Markus
30-May-19 05:29 PM
I would buy a tesla
mrlynch
30-May-19 05:29 PM
hope u don't operate heavy machinery
Alexfrog
30-May-19 05:30 PM
only thing that can tank KMD more than btc going up or down? BTC going up and then down!
mrlynch
30-May-19 05:30 PM
pfft tesla.. good luck on trips longer than 200 miles
Lumbi
30-May-19 05:31 PM
https://www.instagram.com/p/ByGCYORHsyR/
Lumberscout on Instagram: “To celebrate our partnership with Bar...
2 Likes, 0 Comments - Lumberscout (@lumberscoutcom) on Instagram: “To celebrate our partnership with Barterlly, we're offering a one-time 2000 LUMBER swap in…”
1
Caglio
30-May-19 05:31 PM
mr lynch, I work as a security guard
Nah, I work @ sport center
Mostly I just check out handball and volleyball chicks that are here
1
And chat while I am bored, I am gonna start drinking today cos I feel totally tilted
I lost fiancees wedding ring @ pokerstarts live casino
Fuck their live dealers
Im gonna beat em up when I visit Malta this summer
I wont
they will throw me out of a casino, and then I wasted my trip there
Markus
30-May-19 05:35 PM
i can live with 200 miles range...i dont drive long distances and if needed i can take a break 30 min or whatever it takes to recharge tesla
1
JimD
30-May-19 05:35 PM
9K new solid resistance it would seem
Caglio
30-May-19 05:35 PM
Cheers dudes
I would like to have tesla
Emmanuel, is it true there are teslas that drive you ?

Caglio
30-May-19 05:38 PM
Would someone sell me some ARRR maybe ?
FlyingDutchman
30-May-19 05:38 PM
im tryna buy some
Tek
30-May-19 05:38 PM
@Deleted User
this one
FlyingDutchman
30-May-19 05:38 PM
but coinbase froze my funds for a week
and its mooning
Caglio
30-May-19 05:38 PM
Dutchman, is it cos you are 16 ?
Markus
30-May-19 05:39 PM
why would u drive drunk anyway lol....then its totaly ur fault not the cars fault lol
FlyingDutchman
30-May-19 05:39 PM
nah i use the account under my dads info
it is just coinbase policy
Caglio
30-May-19 05:39 PM
Ohh
FlyingDutchman
30-May-19 05:39 PM
whenever you load new money you have to wait a week
Tek
30-May-19 05:39 PM
@Deleted User
m thinking bout back to like 8k or 7600 for a lil of consolidating
Caglio
30-May-19 05:39 PM
tek, is that jesus christ the java script guy @ your pic ?
1
Tek
30-May-19 05:40 PM
uh oh
Caglio
30-May-19 05:40 PM
My picture is still way better, however they are kicking me out of discord servers cos of it
Tek
30-May-19 05:40 PM
i use irc mode
tfw
FlyingDutchman
30-May-19 05:41 PM
i never realize what your pic was
@Caglio
I always just thought it was a random dude. then i expanded it
Caglio
30-May-19 05:41 PM
@FlyingDutchman
its a random dude who killed his family cos his wife served him dinner not properly cooked
work of art in ms paint ( :
FlyingDutchman
30-May-19 05:42 PM
insiprational
Tek
30-May-19 05:42 PM
whats the target for KMD bois
FlyingDutchman
30-May-19 05:42 PM
$10k
Tek
30-May-19 05:42 PM
~17k sats?
16k?
Caglio
30-May-19 05:42 PM
I wanted to sell it @ 19 today
And hoped for 18
But I am too pussy to do it
FlyingDutchman
30-May-19 05:42 PM
im not making day trades
im hodling for 5 years
accumulating all the while
Caglio
30-May-19 05:43 PM
5 years is too much for me
I would be so happy if I manage to reach 10+ on kmd
Markus
30-May-19 05:43 PM
bull market will already have ended in 5 years and u would of lost ur profits
Caglio
30-May-19 05:43 PM
It wouldnt make me rich or anything, but I would be able to repay my debts to ukranian mobsters
So I would be able to keep both of my legs working
FlyingDutchman
30-May-19 05:43 PM
@Markus
im waiting for adoption + institutional investors + high quality, mature products
so that kmd ecossytem can be used to its full potential
Caglio
30-May-19 05:44 PM
I think institutional investors are just a myth
Tek
30-May-19 05:44 PM
target is 16k26
lets go bois
LETS GO


Before Change
decay_rate=decay_rate,
staircase=params.staircase)
elif decay_type == "piecewise_constant_with_warmup":
logging.info("Using Piecewise constant decay with warmup. "
"Parameters: batch_size: %d, epoch_size: %d, "
"warmup_epochs: %d, boundaries: %s, multipliers: %s",
batch_size, params.examples_per_epoch,
params.warmup_epochs, params.boundaries,
params.multipliers)
lr = learning_rate.PiecewiseConstantDecayWithWarmup(
batch_size=batch_size,
epoch_size=params.examples_per_epoch,
warmup_epochs=params.warmup_epochs,
After Change
staircase=params.staircase)
elif decay_type == "stepwise":
steps_per_epoch = params.examples_per_epoch // batch_size
boundaries = [boundary * steps_per_epoch for boundary in params.boundaries]
multipliers = [batch_size * multiplier for multiplier in params.multipliers]
logging.info("Using stepwise learning rate. Parameters: "
"boundaries: %s, values: %s",
boundaries, multipliers)
lr = tf.keras.optimizers.schedules.PiecewiseConstantDecay(
boundaries=boundaries,
values=multipliers)
elif decay_type == "cosine_with_warmup":
lr = learning_rate.CosineDecayWithWarmup(
batch_size=batch_size,
total_steps=train_epochs * train_steps,


--- layout: default ---
The Hub and Hideaway always require a UCSF ID card. Mission Bay Library open until midnight M—Th with UCSF ID.


API Documentation¶
MinHash¶
-
class
datasketch.
MinHash
(num_perm=128, seed=1, hashobj=<built-in function openssl_sha1>, hashvalues=None, permutations=None)[source]¶ MinHash is a probabilistic data structure for computing Jaccard similarity between sets.
Parameters: - num_perm (int, optional) – Number of random permutation functions. It will be ignored if hashvalues is not None.
- seed (int, optional) – The random seed controls the set of random permutation functions generated for this MinHash.
- hashobj (optional) – The hash function used by this MinHash. It must implements the digest() method similar to hashlib hash functions, such as hashlib.sha1.
- hashvalues (numpy.array or list, optional) – The hash values is the internal state of the MinHash. It can be specified for faster initialization using the existing state from another MinHash.
- permutations (optional) – The permutation function parameters. This argument can be specified for faster initialization using the existing state from another MinHash.
Note
To save memory usage, consider using
datasketch.LeanMinHash
.Note
Since version 1.1.1, MinHash will only support serialization using pickle.
serialize
anddeserialize
methods are removed, and are supported indatasketch.LeanMinHash
instead. MinHash serialized before version 1.1.1 cannot be deserialized properly in newer versions (need to migrate?).Note
Since version 1.1.3, MinHash uses Numpy’s random number generator instead of Python’s built-in random package. This change makes the hash values consistent across different Python versions. The side-effect is that now MinHash created before version 1.1.3 won’t work (i.e.,
jaccard
,merge
andunion
) with those created after.-
update
(b)[source]¶ Update this MinHash with a new value.
Parameters: b (bytes) – The value of type bytes. Example
To update with a new string value:
minhash.update("new value".encode('utf-8'))
-
jaccard
(other)[source]¶ Estimate the Jaccard similarity (resemblance) between the sets represented by this MinHash and the other.
Parameters: other (datasketch.MinHash) – The other MinHash. Returns: The Jaccard similarity, which is between 0.0 and 1.0. Return type: float
-
count
()[source]¶ Estimate the cardinality count based on the technique described in this paper.
Returns: The estimated cardinality of the set represented by this MinHash. Return type: int
-
merge
(other)[source]¶ Merge the other MinHash with this one, making this one the union of both.
Parameters: other (datasketch.MinHash) – The other MinHash.
-
digest
()[source]¶ Export the hash values, which is the internal state of the MinHash.
Returns: The hash values which is a Numpy array. Return type: numpy.array
-
is_empty
()[source]¶ Returns: - If the current MinHash is empty - at the state of just
- initialized.
Return type: bool
-
copy
()[source]¶ Returns: - A copy of this MinHash by exporting its
- state.
Return type: datasketch.MinHash
-
__eq__
(other)[source]¶ Returns: - If their seeds and hash values are both equal then two
- are equivalent.
Return type: bool
-
__weakref__
¶ list of weak references to the object (if defined)
-
classmethod
union
(*mhs)[source]¶ Create a MinHash which is the union of the MinHash objects passed as arguments.
Parameters: *mhs – The MinHash objects to be united. The argument list length is variable, but must be at least 2. Returns: A new union MinHash. Return type: datasketch.MinHash
Lean MinHash¶
-
class
datasketch.
LeanMinHash
(minhash)[source]¶ Lean MinHash is MinHash with a smaller memory footprint and faster deserialization, but with its internal state frozen – no update().
Lean MinHash inherits all methods from
datasketch.MinHash
. It does not store the permutations and the hashobj needed for updating. If a MinHash does not need further updates, convert it into a lean MinHash to save memory.Example
To create a lean MinHash from an existing MinHash:
lean_minhash = LeanMinHash(minhash) # You can compute the Jaccard similarity between two lean MinHash lean_minhash.jaccard(lean_minhash2) # Or between a lean MinHash and a MinHash lean_minhash.jaccard(minhash2)
To create a MinHash from a lean MinHash:
minhash = MinHash(seed=lean_minhash.seed, hashvalues=lean_minhash.hashvalues) # Or if you want to prevent further updates on minhash # from affecting the state of lean_minhash minhash = MinHash(seed=lean_minhash.seed, hashvalues=lean_minhash.digest())
Note
Lean MinHash can also be used in
datasketch.MinHashLSH
,datasketch.MinHashLSHForest
, anddatasketch.MinHashLSHEnsemble
.Parameters: minhash – The datasketch.MinHash
object used to initialize the LeanMinHash.-
bytesize
(byteorder='@')[source]¶ Compute the byte size after serialization.
Parameters: byteorder (str, optional) – This is byte order of the serialized data. Use one of the byte order characters: @
,=
,<
,>
, and!
. Default is@
– the native order.Returns: Size in number of bytes after serialization. Return type: int
-
serialize
(buf, byteorder='@')[source]¶ Serialize this lean MinHash and store the result in an allocated buffer.
Parameters: - buf (buffer) – buf must implement the buffer interface. One such example is the built-in bytearray class.
- byteorder (str, optional) –
This is byte order of the serialized data. Use one of the byte order characters:
@
,=
,<
,>
, and!
. Default is@
– the native order.
This is preferred over using pickle if the serialized lean MinHash needs to be used by another program in a different programming language.
- The serialization schema:
- The first 8 bytes is the seed integer
- The next 4 bytes is the number of hash values
- The rest is the serialized hash values, each uses 4 bytes
Example
To serialize a single lean MinHash into a bytearray buffer.
buf = bytearray(lean_minhash.bytesize()) lean_minhash.serialize(buf)
To serialize multiple lean MinHash into a bytearray buffer.
# assuming lean_minhashs is a list of LeanMinHash with the same size size = lean_minhashs[0].bytesize() buf = bytearray(size*len(lean_minhashs)) for i, lean_minhash in enumerate(lean_minhashs): lean_minhash.serialize(buf[i*size:])
-
classmethod
deserialize
(buf, byteorder='@')[source]¶ Deserialize a lean MinHash from a buffer.
Parameters: - buf (buffer) – buf must implement the buffer interface. One such example is the built-in bytearray class.
- byteorder (str. optional) –
This is byte order of the serialized data. Use one of the byte order characters:
@
,=
,<
,>
, and!
. Default is@
– the native order.
Returns: The deserialized lean MinHash
Return type: Example
To deserialize a lean MinHash from a buffer.
lean_minhash = LeanMinHash.deserialize(buf)
-
Weighted MinHash¶
-
class
datasketch.
WeightedMinHashGenerator
(dim, sample_size=128, seed=1)[source]¶ The weighted MinHash generator is used for creating new
datasketch.WeightedMinHash
objects.This weighted MinHash implementation is based on Sergey Ioffe’s paper, Improved Consistent Sampling, Weighted Minhash and L1 Sketching
Parameters: - dim (int) – The number of dimensions of the input Jaccard vectors.
- sample_size (int, optional) – The number of samples to use for creating weighted MinHash.
- seed (int) – The random seed to use for generating permutation functions.
-
minhash
(v)[source]¶ Create a new weighted MinHash given a weighted Jaccard vector. Each dimension is an integer frequency of the corresponding element in the multi-set represented by the vector.
Parameters: v (numpy.array) – The Jaccard vector.
-
__weakref__
¶ list of weak references to the object (if defined)
-
class
datasketch.
WeightedMinHash
(seed, hashvalues)[source]¶ New weighted MinHash is generated by
datasketch.WeightedMinHashGenerator
. You can also initialize weighted MinHash by using the state from an existing one.Parameters: - seed (int) – The random seed used to generate this weighted MinHash.
- hashvalues – The internal state of this weighted MinHash.
-
jaccard
(other)[source]¶ Estimate the weighted Jaccard similarity between the multi-sets represented by this weighted MinHash and the other.
Parameters: other (datasketch.WeightedMinHash) – The other weighted MinHash. Returns: The weighted Jaccard similarity between 0.0 and 1.0. Return type: float
-
digest
()[source]¶ Export the hash values, which is the internal state of the weighted MinHash.
Returns: The hash values which is a Numpy array. Return type: numpy.array
-
copy
()[source]¶ Returns: A copy of this weighted MinHash by exporting its state. Return type: datasketch.WeightedMinHash
-
__eq__
(other)[source]¶ Returns: If their seeds and hash values are both equal then two are equivalent. Return type: bool
-
__weakref__
¶ list of weak references to the object (if defined)
MinHash LSH¶
-
class
datasketch.
MinHashLSH
(threshold=0.9, num_perm=128, weights=(0.5, 0.5), params=None, storage_config={'type': 'dict'}, prepickle=None)[source]¶ The MinHash LSH index. It supports query with Jaccard similarity threshold. Reference: Chapter 3, Mining of Massive Datasets.
Parameters: - threshold (float) – The Jaccard similarity threshold between 0.0 and 1.0. The initialized MinHash LSH will be optimized for the threshold by minizing the false positive and false negative.
- num_perm (int, optional) – The number of permutation functions used by the MinHash to be indexed. For weighted MinHash, this is the sample size (sample_size).
- weights (tuple, optional) – Used to adjust the relative importance of
minizing false positive and false negative when optimizing
for the Jaccard similarity threshold.
weights is a tuple in the format of
(false_positive_weight, false_negative_weight)
. - params (tuple, optional) – The LSH parameters (i.e., number of bands and size of each bands). This is used to bypass the parameter optimization step in the constructor. threshold and weights will be ignored if this is given.
- storage_config (dict, optional) – Type of storage service to use for storing hashtables and keys.
- prepickle (bool, optional) – If True, all keys are pickled to bytes before insertion. If None, a default value is chosen based on the storage_config.
Note
weights must sum to 1.0, and the format is (false positive weight, false negative weight). For example, if minizing false negative (or maintaining high recall) is more important, assign more weight toward false negative: weights=(0.4, 0.6). Try to live with a small difference between weights (i.e. < 0.5).
-
insert
(key, minhash)[source]¶ Insert a unique key to the index, together with a MinHash (or weighted MinHash) of the set referenced by the key.
Parameters: - key (hashable) – The unique identifier of the set.
- minhash (datasketch.MinHash) – The MinHash of the set.
-
insertion_session
()[source]¶ Create a context manager for fast insertion into this index.
Returns: datasketch.lsh.MinHashLSHInsertionSession
-
query
(minhash)[source]¶ Giving the MinHash of the query set, retrieve the keys that references sets with Jaccard similarities greater than the threshold.
Parameters: minhash (datasketch.MinHash) – The MinHash of the query set. Returns: list of keys.
-
__contains__
(key)[source]¶ Parameters: key (hashable) – The unique identifier of a set. Returns: True only if the key exists in the index. Return type: bool
-
remove
(key)[source]¶ Remove the key from the index.
Parameters: key (hashable) – The unique identifier of a set.
-
get_counts
()[source]¶ Returns a list of length
self.b
with elements representing the number of keys stored under each bucket for the given permutation.
-
get_subset_counts
(*keys)[source]¶ Returns the bucket allocation counts (see get_counts above) restricted to the list of keys given.
Parameters: keys (hashable) – the keys for which to get the bucket allocation counts
-
__weakref__
¶ list of weak references to the object (if defined)
MinHash LSH Forest¶
-
class
datasketch.
MinHashLSHForest
(num_perm=128, l=8)[source]¶ The LSH Forest for MinHash. It supports top-k query in Jaccard similarity. Instead of using prefix trees as the original paper, I use a sorted array to store the hash values in every hash table.
Parameters: - num_perm (int, optional) – The number of permutation functions used by the MinHash to be indexed. For weighted MinHash, this is the sample size (sample_size).
- l (int, optional) – The number of prefix trees as described in the paper.
Note
The MinHash LSH Forest also works with weighted Jaccard similarity and weighted MinHash without modification.
-
add
(key, minhash)[source]¶ Add a unique key, together with a MinHash (or weighted MinHash) of the set referenced by the key.
Note
The key won’t be searchbale until the
datasketch.MinHashLSHForest.index()
method is called.Parameters: - key (hashable) – The unique identifier of the set.
- minhash (datasketch.MinHash) – The MinHash of the set.
-
query
(minhash, k)[source]¶ Return the approximate top-k keys that have the highest Jaccard similarities to the query set.
Parameters: - minhash (datasketch.MinHash) – The MinHash of the query set.
- k (int) – The maximum number of keys to return.
Returns: list of at most k keys.
-
is_empty
()[source]¶ Check whether there is any searchable keys in the index. Note that keys won’t be searchable until index is called.
Returns: True if there is no searchable key in the index. Return type: bool
-
__contains__
(key)[source]¶ Returns: True only if the key has been added to the index. Return type: bool
-
__weakref__
¶ list of weak references to the object (if defined)
MinHash LSH Ensemble¶
-
class
datasketch.
MinHashLSHEnsemble
(threshold=0.9, num_perm=128, num_part=16, m=8, weights=(0.5, 0.5))[source]¶ The MinHash LSH Ensemble index. It supports Containment queries. The implementation is based on E. Zhu et al..
Parameters: - threshold (float) – The Containment threshold between 0.0 and 1.0. The initialized LSH Ensemble will be optimized for the threshold by minizing the false positive and false negative.
- num_perm (int, optional) – The number of permutation functions used by the MinHash to be indexed. For weighted MinHash, this is the sample size (sample_size).
- num_part (int, optional) – The number of partitions in LSH Ensemble.
- m (int, optional) – The memory usage factor: an LSH Ensemble uses approximately m times more memory space than a MinHash LSH with the same number of sets indexed. The higher the m the better the accuracy.
- weights (tuple, optional) – Used to adjust the relative importance of
minizing false positive and false negative when optimizing
for the Containment threshold. Similar to the weights parameter
in
datasketch.MinHashLSH
.
Note
Using more partitions (num_part) leads to better accuracy, at the expense of slower query performance. This is different from the paper and the Go implementation, in which more partitions leads to better accuracy AND faster query performance, due to parallelism.
Note
More information about the parameter m can be found in the Go implementation of LSH Ensemble, in which m is named MaxK.
-
index
(entries)[source]¶ Index all sets given their keys, MinHashes, and sizes. It can be called only once after the index is created.
Parameters: entries (iterable of tuple) – An iterable of tuples, each must be in the form of (key, minhash, size), where key is the unique identifier of a set, minhash is the MinHash of the set, and size is the size or number of unique items in the set. Note
size must be positive.
-
query
(minhash, size)[source]¶ Giving the MinHash and size of the query set, retrieve keys that references sets with containment with respect to the query set greater than the threshold.
Parameters: - minhash (datasketch.MinHash) – The MinHash of the query set.
- size (int) – The size (number of unique items) of the query set.
Returns: iterator of keys.
-
__contains__
(key)[source]¶ Parameters: key (hashable) – The unique identifier of a set. Returns: True only if the key exists in the index. Return type: bool
-
__weakref__
¶ list of weak references to the object (if defined)
HyperLogLog¶
-
class
datasketch.
HyperLogLog
(p=8, reg=None, hashobj=<built-in function openssl_sha1>)[source]¶ The HyperLogLog data sketch for estimating cardinality of very large dataset in a single pass. The original HyperLogLog is described here.
This HyperLogLog implementation is based on: https://github.com/svpcom/hyperloglog
Parameters: - p (int, optional) – The precision parameter. It is ignored if the reg is given.
- reg (numpy.array, optional) – The internal state. This argument is for initializing the HyperLogLog from an existing one.
- hashobj (optional) – The hash function used. It must implements the digest() method similar to hashlib hash functions, such as hashlib.sha1.
-
update
(b)[source]¶ Update the HyperLogLog with a new data value in bytes.
Parameters: b (bytes) – A value of type bytes. Example
To update with a new string value:
hyperloglog.update("new value".encode('utf-8'))
-
count
()[source]¶ Estimate the cardinality of the data values seen so far.
Returns: The estimated cardinality. Return type: int
-
merge
(other)[source]¶ Merge the other HyperLogLog with this one, making this the union of the two.
Parameters: other (datasketch.HyperLogLog) –
-
copy
()[source]¶ Create a copy of the current HyperLogLog by exporting its state.
Returns: Return type: datasketch.HyperLogLog
-
is_empty
()[source]¶ Returns: True if the current HyperLogLog is empty - at the state of just initialized. Return type: bool
-
__eq__
(other)[source]¶ Check equivalence between two HyperLogLogs
Parameters: other (datasketch.HyperLogLog) – Returns: True if both have the same internal state. Return type: bool
HyperLogLog++¶
-
class
datasketch.
HyperLogLogPlusPlus
(p=8, reg=None, hashobj=<built-in function openssl_sha1>)[source]¶ HyperLogLog++ is an enhanced HyperLogLog from Google. Main changes from the original HyperLogLog:
- Use 64 bits instead of 32 bits for hash function
- A new small-cardinality estimation scheme
- Sparse representation (not implemented here)
This class has the same set of methods as
datasketch.HyperLogLog
.-
__weakref__
¶ list of weak references to the object (if defined)


WWAN DriverTestApp Development Tool
The Wireless WAN DriverTestApp tool is an application to help developers verify that their WWAN miniport driver is providing correct responses to various WWAN operations. The application allows developers to progressively test their WWAN miniport driver by selecting its device interface and displaying the values and data structures of all Wireless WAN OIDs sent to the driver.
The application is a single executable and does not require any special installation or un-installation procedure.
Note that launching the application will automatically stop the Wireless Wan Service (Wwansvc). The application will automatically restart the Wwansvc when you exit.
Use the following procedure to test your WWAN miniport driver:
1. Double-click on the WwanDriverTestApp icon to launch the application. Note that WwanDriverTestApp requires administrative privileges. Therefore allow it to run at the appropriate level of privilege, if you are prompted.
2. Click the GetInterfaces button to refresh the list of WWAN interfaces. Note that you must manually click the GetInterfaces button to refresh the list every time you add or remove a WWAN device to the system.
3. Select the interface on which you want to perform test operations by double-clicking on it in the center-pane.
4. To test QUERY/SET operations, double-click on the individual QUERY OID_Xxx or SET OID_Xxx operation from the list in left-side pane. WwanDriverTestApp then displays the request it sends to the miniport driver and the miniport driver's response in right-side pane. Note: For SET operations, WwanDriverTestApp prompts you for input parameters to pass with the SET request. Also note that no QUERY operations prompt you for any input parameters except for QUERY OID_WWAN_SMS_READ.
5. To test PIN operations, double-click on the individual PIN1 or PIN2 operation from the list in the left-side pane.
6. To collect log information, select the text of the WWAN miniport driver's response from the right-side pane and save it into a text editor, such as Notepad.
By default, all QUERY/SET/PIN1/PIN2 operations performed by WwanDriverTestApp are time-stamped. You can disable time-stamping by unselecting Show TimeStamps from the Options menu.
|
File |
Description |
|
WwanDriverTestApp.exe |
The development test tool. |
|
readme.htm |
This file. |


View Layouts
CodeIgniter supports a simple, yet very flexible, layout system that makes it simple to use one or more base page layouts across your application. Layouts support sections of content that can be inserted from any view being rendered. You could create different layouts to support one-column, two-column, blog archive pages, and more. Layouts are never directly rendered. Instead, you render a view, which specifies the layout that it wants to extend.
Creating A Layout
Layouts are views like any other. The only difference is their intended usage. Layouts are the only view
files that would make use of the renderSection()
method. This method acts as a placeholder for content.
E.g. app/Views/default.php:
<!doctype html>

<title>My Layout</title>

<?= $this->renderSection('content') ?>

The renderSection()
method has two arguments: $sectionName
and $saveData
. $sectionName
is the name of
the section used by any child view to name the content section. If the boolean argument $saveData
is set to true,
the method saves data for subsequent calls. Otherwise, the method cleans the data after displaying the contents.
E.g. app/Views/welcome_message.php:
<!doctype html>

<title><?= $this->renderSection('page_title', true) ?></title>

<?= $this->renderSection('page_title') ?>

<?= $this->renderSection('content') ?>

Note
$saveData
can be used since v4.4.0.
Using Layouts in Views
Whenever a view wants to be inserted into a layout, it must use the extend()
method at the top of the file:
<?= $this->extend('default') ?>
The extend()
method takes the name of any view file that you wish to use. Since they are standard views, they will
be located just like a view. By default, it will look in the application’s View directory, but will also scan
other PSR-4 defined namespaces. You can include a namespace to locate the view in particular namespace View directory:
<?= $this->extend('Blog\Views\default') ?>
All content within a view that extends a layout must be included within section($name)
and endSection()
method calls.
Any content between these calls will be inserted into the layout wherever the renderSection($name)
call that
matches the section name exists.
E.g. app/Views/some_view.php:
<?= $this->extend('default') ?>
<?= $this->section('content') ?>

Hello World!

<?= $this->endSection() ?>
The endSection()
does not need the section name. It automatically knows which one to close.
Sections can contain nested sections:
<?= $this->extend('default') ?>
<?= $this->section('content') ?>

Hello World!

<?= $this->section('javascript') ?>
let a = 'a';
<?= $this->endSection() ?>
<?= $this->endSection() ?>
Rendering the View
Rendering the view and it’s layout is done exactly as any other view would be displayed within a controller:
<?php
namespace App\Controllers;
class MyController extends BaseController
{
public function index()
{
return view('some_view');
}
}
It renders the View app/Views/some_view.php and if it extends default
,
the Layout app/Views/default.php is also used automatically.
The renderer is smart enough to detect whether the view should be rendered on its own, or if it needs a layout.
Including View Partials
View partials are view files that do not extend any layout. They typically include content that can be reused from
view to view. When using view layouts you must use $this->include()
to include any view partials.
<?= $this->extend('default') ?>
<?= $this->section('content') ?>

Hello World!

<?= $this->include('sidebar') ?>
<?= $this->endSection() ?>
When calling the include()
method, you can pass it all of the same options that can when rendering a normal view, including
cache directives, etc.


Politicks
Well, given that I'm in the Westmount-Ville Marie riding, I can vote any way I want and it doesn't matter:
In 2004, Liberal Lucienne Robillard won a third term in Westmount-Ville Marie with 56 per cent of the vote. She was first elected in a 1995 byelection in St-Henri-Westmount. [...]
The former St-Henri riding was Liberal from 1925 to 1974. Westmount was Liberal from 1940 to 1974, except for a PC win in 1958. In the newly configured St-Henri-Westmount, Liberal Don Johnston, incumbent from Westmount, won in 1979, 1980 and 1984. [...] . He left the Liberal caucus in 1988 to sit as an Independent. Liberal David Berger won in 1988 and 1993 but resigned in 1994.
Except for once in ‘58, and then when an MP left the caucus, never to be re-elected, was the riding non-Liberal. Westmount. So it shouldn't surprise you I'm probably going to vote Green. (Whatever happened to the Rhino party?) Although I do find it strange that my candidate was born in 1980. 1980!
I still have to go through the platform, but I'm pretty sure I can live with it. Some of the things I heard on the CBC this morning sounded reasonable, in at least their spin sounded like the right things to do (e.g. remove subsidies to the (extremely profitable) petroleum industry (I love giving a succesful industry more money); raise taxes on first-stage oil and gas production) even if they never would soon come to pass.
I understand the position that adding taxes to industries is supposed to stifle development. I'd rather say it stifles 'easy development', or lowest-common-denominator development, the kind of industry the US is very good at doing. High taxation and total/full-cost-accounting requires that the industry innovates, something I think North American society is less and less capable of doing.
It would be all well and good if the resources were renewable and the toxic effects of doing easy business were only minimal. But they aren't and it's time the industry, the government and the people grew up and started paying the real price.
About this entry
You"re currently reading "Politicks," an entry on a crick in the net
- Published:
- 01.12.06 / 2pm
- Category:
- Circular File, Enviroh-oh-Oh!
ummm... the green platform... seriously, what does it matter the platform if they never get a member elected?
However, vote your conscience. If somebody votes liberal they don't have a concience - they are unconscious!


Markaz Fahm-E-Deen
A Hadith about the forewarning of the day of Judgement states that, when no Aalim would be left, then people will appoint the uneducated as their pious religious guides. These guides when asked about something would give 'Fataawa' without knowledge and thus would mislead themselves and others. Our Holy Prophet (SAW) declared lack of knowledge and appointing of uneducated people as guides to be one of the major Fitnah near the day of Judgement. The light of knowledge is the only answer to the shadows of ignorance. Hence there is an urgent need to seek guidance from authentic scholars so that our lives are managed according to the Shariah. This was the way of the Sahabah (RAA) and Alhamdulilah is still practised till this day. To achieve this objective our website www.fahmedeen.org offers a service of regularly updated audio bayans which include Juma Bayans, Islahi Majlis Held on Sunday at Masjid Bait us Salam, (Defence, Phase IV, Karachi) and other bayans of Maulana Abdus Sattar (Imam and Khateeb Masjid Bait us Salam) and special bayans by other eminent religious scholars like Shaikh ul Islam Mufti Taqi Usmani Sahab. The site also provides access to the Ramdhan Bayans by Maulana Abdus Sattar and offers a beautiful collection of Nazams. We pray to Almighty Allah to accept this effort from our behalf and make it a source of guidance for those who are astray and a source of reward for us in the Hereafter. Ameen


Technical expertise
I am proficient in a number of Web-related technologies, and primarily work with JavaScript on both front-end and back-end.
I do Full Stack development and consulting work. contribute to the open-source community and enjoy writing and talking about my discoveries on the Web Platform.
II am proficient in a number of Web-related technologies, and primarily work with JavaScript on both front-end and back-end.
I help clients define their needs and walk through the ever-changing Web landscape. I combine the best tools with the wisdom of my Software Engineering forefathers.
In my free time, I love to play with new tools and technologies to create interesting Web experiments. I also enjoy contributing to open-source projects with Pull Requests.
Discovery is not about seeking new landscapes, but about having new eyes. I travel to cultivate my open-mindedness and satisfy my curiosity. The journey just started.
Freestyle skaters perform tricks around a straight line of cones. This highly technical sport requires balance, rhythm, agility — plus a pair of inline skates. I love it!
I'm passionate about what I do and love discovering new topics. I like to share my knowledge and passion by talking at events, blogging, and giving programming courses.
Zori is the best real-time music sharer ever built. Uses Firebase as its back-end and AngularJS on the front-end.
My entry into the JS1K 2014 code golfing contest. Dragonsnake is a cross of Fruit Ninja and Snake, made in 1K of JavaScript.
A public transportation app for Montpellier. Built with Sencha Touch and Node.js during the first Hackathon Opendata, 2nd prize.
A series of self-guided workshops to discover JavaScript and Node.js, in French. Built with Workshopper, inspired by Nodeschool.
A data visualization experiment. Built with d3.js, it helps visualizing RDF Data Cube statistical datasets and their metadata.
SDMX2DataCube is a Datalift module which converts SDMX data to RDF using the Data Cube ontology. Built in JEE with KnockoutJS.


{% block title %} Avian Influenza Investigation Form {% endblock %}
{% endblock %}
{% block content %}
Avian Influenza Investigation Form
{#
#}
{#
#}
{#
#}
BANGLADESH U2C INITIATIVE
AVIAN INFLUENZA INVESTIGATION FORM
Reporting Unit: Village/Farm
Village/Farm profile
INVESTIGATION ID (as provided by software):
{{ data.investigation_id }}
FARM ID (if previously assessed):
{{ data.farm_id }}
*1. Date Completed
(dd-mm-yyyy)
*2. Division (block letters)
*3. District (block letters)
*4. Upazila (block letters)
{{ data.date_completed }}
{{ data.division }}
{{ data.district }}
{{ data.upazila }}
*5. Union (block letters)
6. Mouza (block
letters)(optional)
*7. Village (block letters)
{{ data.xunion }}
{{ data.mouza }}
{{ data.village }}
*8. Name of farmer (block
letters)
*10. Phone number of the
contact
person
*11. Sex
{{ data.farmer_name }}
{{ data.mobile_contact_person }}
Female Male
*9. Title/position
{{ data.title_position }}
12. Latitude (optional)
Decimal
Degree(number)
13. Longitude (optional) Decimal Degree(number)
{{ data.gps_lattitude }}
{{ data.gps_longitude }}
Meeting Information
*14. Were
the
investigators called out to the community to investigate sick/dead birds?
Yes No
*15. Did
the
investigators conduct a meeting to build network or to raise community
awareness on
avian influenza control?
Yes No
*16. Did
the
investigators search for sick/dead birds?
Yes No
*17. Were there any sick/dead birds
found?
Yes No
Outbreak Investigation
18. Date when your team
received
information on sick/dead birds (dd-mm-yyyy)
19. Estimated date of onset (dd-mm-yyyy)
{{ data.date_received_sick_dead_info }}
{{ data.date_estimated_onset }}
20. In
what type of
production system did the cases occur? (check one)
Farm
Has a farm
assessment
been conducted previously?
Yes
Approximate date (dd-mm-yyyy){{ data.date_previously_assessed }}
No
Backyard
Wild Bird
21. What
clinical signs were observed?
(block letters and comma separated)
{{ data.clinical_sign_observed }}
22.
Affected poultry (check
all that apply)
Number of
DEAD BIRDS
Number of
SICK BIRDS
Total population on farm
(or estimated village population for backyard poultry)
Deshi
(backyard) chicken
{{ data.deshi_chicken_dead }}
{{ data.deshi_chicken_sick }}
{{ data.deshi_chicken_population }}
Sonali
chicken
{{ data.sonali_chicken_dead }}
{{ data.sonali_chicken_sick }}
{{ data.sonali_chicken_total_population }}
Brown
commercial chicken
{{ data.brown_comm_chicken_dead }}
{{ data.brown_comm_chicken_sick }}
{{ data.brown_comm_chicken_population }}
White
commercial chicken
{{ data.white_comm_chicken_dead }}
{{ data.white_comm_chicken_sick }}
{{ data.white_comm_chicken_population }}
Duck
{{ data.duck_dead }}
{{ data.duck_sick }}
{{ data.duck_population }}
Other,
specify
{{ data.other_affected_dead }}
{{ data.other_affected_sick }}
{{ data.other_affected_population }}
23. Number of sick/dead
birds tested
by the rapid test (number) {{ data.sick_dead_tested_by_rapid_test }} birds
24. What is the name of
the rapid test
used? (check one)
Bionote Anigen AIV testOther, specify{% if data.used_rapid_test_name != 'Bionote Anigen AIV test' %}
{{ data.used_rapid_test_name }}{% endif %}
25. Rapid Test Result
(check
one) PositiveNegativeNot performed
26. VTM
samples
collected and sent to the lab? (check one)
Yes
Date samples
collected
(dd-mm-yyyy) {{ data.date_vtm_sample_collected }}
PCR Result (check one)
PositiveNegativeTest not performed
No lab report received
No
Why? (check one)
No VTMNot necessary
27. What
kind of
culling was performed
(check one)
Focal culling ( culling of all birds in affected flock)
Number of birds culled
{{ data.number_birds_culled }}
No culling performed
Why? (explain reason)
{{ data.why_not_culled }}
28. Additional investigation information
{{ data.additional_investigation_information }}
*Investigator(s)
Name
Designation
Contact Number
1. {{ data.investigator_name1 }}
{{ data.investigator_designation1 }}
{{ data.investogator_contact_number1 }}
2. {{ data.investigator_name2 }}
{{ data.investigator_designation2 }}
{{ data.investigator_contact_number2 }}
*Administration
Name
Working
day (dd-mm-yyyy)
Overnight
(dd-mm-yyyy)
Signature
1.{{ data.admin_name1 }}
{{ data.admin_working_date11 }}
{{ data.admin_overnight_date11 }}
1.
{{ data.admin_working_date12 }}
{{ data.admin_overnight_date12 }}
{{ data.admin_working_date13 }}
{{ data.admin_overnight_date13 }}
2. {{ data.admin_name2 }}
{{ data.admin_working_date21 }}
{{ data.admin_overnight_date21 }}
2.
{{ data.admin_working_date22 }}
{{ data.admin_overnight_date22 }}
{{ data.admin_working_date23 }}
{{ data.admin_overnight_date23 }}
Acknowledged
by:
Approved
by:
Name: {{ data.acknowledge_by }}
Signature:
Name: {{ data.approved_by }}
Signature:
ATTENTION: Check that you have all the information
required to
complete this form before you leave the village.
ALWAYS CLEAN AND DISINFECT YOUR BOOTS, VEHICLE AND
EQUIPMENT


Tour & Travel Reservation Booking Form
About this page
This is a list of notable travelers, consisting of people that are known for their travels or explorations. Travel is the movement of people between relatively distant geographical locations, and can involve travel by foot, bicycle, automobile, train, boat, airplane, or other means, and can be one way or round trip.Travel can also include relatively short stays between successive movements.
Traveller video
Our Customer
Happy Clients
Travel Agency
Clients
What Kind Of Services We Offer
Our services
Airlines Service
Travel agencies can provide outdoor recreation activities, airlines, car rentals, cruise lines, hotels, railways, travel insurance, package tours, insurance, guide books, public transport timetables, car rentals, and bureau de change services.
Bus Sevice
Travel agencies can provide outdoor recreation activities, airlines, car rentals, cruise lines, hotels, railways, travel insurance, package tours, insurance, guide books, public transport timetables, car rentals, and bureau de change services.
Train Service
Travel agencies can provide outdoor recreation activities, airlines, car rentals, cruise lines, hotels, railways, travel insurance, package tours, insurance, guide books, public transport timetables, car rentals, and bureau de change services.
Hotel Service
Travel agencies can provide outdoor recreation activities, airlines, car rentals, cruise lines, hotels, railways, travel insurance, package tours, insurance, guide books, public transport timetables, car rentals, and bureau de change services.
Car Service
Travel agencies can provide outdoor recreation activities, airlines, car rentals, cruise lines, hotels, railways, travel insurance, package tours, insurance, guide books, public transport timetables, car rentals, and bureau de change services.
Subway Service
Travel agencies can provide outdoor recreation activities, airlines, car rentals, cruise lines, hotels, railways, travel insurance, package tours, insurance, guide books, public transport timetables, car rentals, and bureau de change services
India
India (Hindi: Bhārat), officially the Republic of India (Hindi: Bhārat Gaṇarājya),[23] is a country in South Asia.It is the second-most populous country.Modern humans arrived on the Indian subcontinent from Africa
ReadAustralia
Australia–India relations are the foreign relations and both shared this as "Comprehensive Strategic Partnership" between the Commonwealth of Australia and the Republic of India. Before independence, .
ReadNewzeland
New Zealand (Māori: Aotearoa [aɔˈtɛaɾɔa]) is an island country in the southwestern Pacific Ocean. It consists of two main landmasses—the North Island (Te Ika-a-Māui) and the South Island (Te Waipounamu)
ReadJapan
Japan (Japanese: 日本, Nippon [ɲippoꜜɴ] (About this soundlisten) or Nihon [ɲihoꜜɴ] (About this soundlisten)) is an island country in East Asia located in the northwest Pacific Ocean. It is bordered by the Sea of Japan
ReadOur Great Team
“One’s destination is never a place, but a new way of seeing things.”
Ipsita D
Shriya D
Rahul Roy
Priyanka M
Our Pricing
Awesome Deals !According to Your Selection.
One Day
$150/Person
- Hotels
- Luxury room
- Unlimited Food
- Community Access
- Unlimited Private Visits
- Dedicated Phone Support
- Free Unlimited Calls
- Good Customer Handling
One Day
$200/Person
- Appartments
- Luxury room
- Unlimited Food
- Community Access
- Unlimited Private Visits
- Dedicated Phone Support
- Free unlimited Calls
- Good Customer Handling
One Day
$250/Person
- Resorts
- Luxury room
- Unlimited Food
- Community Access
- Unlimited Private Visits
- Dedicated Phone Support
- Free unlimited Calls
- Good Customer Handling
One Day
$250/Person
- Villas
- Luxury room
- Unlimited Food
- Community Access
- Unlimited Private Visits
- Dedicated Phone Support
- Free unlimited Calls
- Good Customer Handling
Our Clients Say
Don't Miss The Chance Of Booking Your Destination From Lotus Traveller
Shriya Dae
Software developerExcellent Arrangements made for our family. Our booking for Delhi- Budapest-Vienna- Salzburg - Delhi was handled by Ms. Neetu Bhatia. She did excellent job in getting us best hotels at best locations at reasonable rates. Local arrangements like sightseeing etc were also very good. The best part was that she guided us very well also. Excellent job done experience.
Monohar Josa
Sales executiveI would like to take this opportunity to convey our thanks to you for making our holiday experience in Norway & Netherlands a truly memorable one. The hotels, pickups, tour sights , guides & other arrangements made by Lotus team were superb & very well executed. We were lucky to see the Northern Lights 3 times - thanks to cloud breaks. The Snowdrome & sledge ride was a grand experience..
Rimmy Anderson
Sales ManagerAs always, Lotus Travel has delivered a truly wonderful travel experience for us. Norway was a great travel destination. The parts of the country we visited were beautiful, people were friendly, everything we ate was delicious, and there were many fun things to see and do. The hotels we stayed at in Oslo, Svolvar and Tromso were all great and each excursion we took was memorable and fun.
Paresh Anderson
Sales ManagerI would like to thank Harsha & Paresh for designing such a wonderful trip to Coorg. It was a great and well-arranged trip. I shall surely consider my future trips through Lotus Traveller. The best part of the tour was stay at Club Lotus, Madikeri. This resort is definitely far better and beautiful than other stay arrangements at Coorg. The concept of rainforest, excellent restaurants and large variety of dishes offered in breakfast, this resort truly makes for a memorable holiday.
CONTACT US
dove siamo
(+39) 123456(+39) 123456
<EMAIL_ADDRESS>Piazza del Colosseo, 1, 00184 Roma
Piazza del Colosseo, 1, 00184 Roma


class Capybara::Driver::Base
Attributes
Public Instance Methods
Execute the block, and then accept the modal opened. @param type [:alert, :confirm, :prompt] @option options [Numeric] :wait How long to wait for the modal to appear after executing the block. @option options [String, Regexp] :text Text to verify is in the message shown in the modal @option options [String] :with Text to fill in in the case of a prompt @return [String] the message shown in the modal @raise [Capybara::ModalNotFound] if modal dialog hasn't been found
# File lib/capybara/driver/base.rb, line 119 def accept_modal(type, options={}, &blk) raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#accept_modal' end
@deprecated This method is being removed
# File lib/capybara/driver/base.rb, line 156 def browser_initialized? warn "DEPRECATED: #browser_initialized? is deprecated and will be removed in the next version of Capybara" true end
# File lib/capybara/driver/base.rb, line 84 def close_window(handle) raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#close_window' end
# File lib/capybara/driver/base.rb, line 4 def current_url raise NotImplementedError end
# File lib/capybara/driver/base.rb, line 68 def current_window_handle raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#current_window_handle' end
Execute the block, and then dismiss the modal opened. @param type [:alert, :confirm, :prompt] @option options [Numeric] :wait How long to wait for the modal to appear after executing the block. @option options [String, Regexp] :text Text to verify is in the message shown in the modal @return [String] the message shown in the modal @raise [Capybara::ModalNotFound] if modal dialog hasn't been found
# File lib/capybara/driver/base.rb, line 132 def dismiss_modal(type, options={}, &blk) raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#dismiss_modal' end
# File lib/capybara/driver/base.rb, line 44 def evaluate_async_script(script, *args) raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#evaluate_script_asnyc' end
# File lib/capybara/driver/base.rb, line 40 def evaluate_script(script, *args) raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#evaluate_script' end
# File lib/capybara/driver/base.rb, line 36 def execute_script(script, *args) raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#execute_script' end
# File lib/capybara/driver/base.rb, line 20 def find_css(query) raise NotImplementedError end
# File lib/capybara/driver/base.rb, line 16 def find_xpath(query) raise NotImplementedError end
# File lib/capybara/driver/base.rb, line 28 def go_back raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#go_back' end
# File lib/capybara/driver/base.rb, line 32 def go_forward raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#go_forward' end
# File lib/capybara/driver/base.rb, line 24 def html raise NotImplementedError end
# File lib/capybara/driver/base.rb, line 136 def invalid_element_errors [] end
# File lib/capybara/driver/base.rb, line 80 def maximize_window(handle) raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#maximize_current_window' end
# File lib/capybara/driver/base.rb, line 147 def needs_server? false end
# File lib/capybara/driver/base.rb, line 104 def no_such_window_error raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#no_such_window_error' end
# File lib/capybara/driver/base.rb, line 92 def open_new_window raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#open_new_window' end
# File lib/capybara/driver/base.rb, line 12 def refresh raise NotImplementedError end
# File lib/capybara/driver/base.rb, line 144 def reset! end
# File lib/capybara/driver/base.rb, line 76 def resize_window_to(handle, width, height) raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#resize_window_to' end
# File lib/capybara/driver/base.rb, line 52 def response_headers raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#response_headers' end
# File lib/capybara/driver/base.rb, line 48 def save_screenshot(path, options={}) raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#save_screenshot' end
# File lib/capybara/driver/base.rb, line 151 def session_options (@session && @session.config) || Capybara.session_options end
# File lib/capybara/driver/base.rb, line 56 def status_code raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#status_code' end
@param frame [Capybara::Node::Element, :parent, :top] The iframe element to switch to
# File lib/capybara/driver/base.rb, line 64 def switch_to_frame(frame) raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#switch_to_frame' end
# File lib/capybara/driver/base.rb, line 96 def switch_to_window(handle) raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#switch_to_window' end
# File lib/capybara/driver/base.rb, line 8 def visit(path) raise NotImplementedError end
# File lib/capybara/driver/base.rb, line 140 def wait? false end
# File lib/capybara/driver/base.rb, line 88 def window_handles raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#window_handles' end
# File lib/capybara/driver/base.rb, line 72 def window_size(handle) raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#window_size' end
# File lib/capybara/driver/base.rb, line 100 def within_window(locator) raise Capybara::NotSupportedByDriverError, 'Capybara::Driver::Base#within_window' end


Below you find a very brief summary about the Concealed Information Test that is implemented in this app. To properly understand the test, please read the online
documentation.
The standard and enhanced versions aim to reveal whether or not a certain information detail – the "probe" – is known to the tested person. The "irrelevant" and "target" items must be similar to the probe, and indistinguishable
for a person who does not know the relevance of the probe (e.g. the probe is a stolen suitcase, and the irrelevant and targets are other suitcases). In this app, the input requires no designated "irrelevant" items: all items are potential
probes, and the real probe can be given as any of these items. In the end, each of the items (except the target) will be automatically evaluated as potential probes (in each case with the given other four items, excluding the target, being
irrelevants).
The enhanced version is much more effective than the standard; the latter is only for experimental purposes. The no-target version is a tentative approach in development to make the test applicable in cases where the
probe is actually known to the participant.
At the end of the test there are no instructions or button, but only the text "Test completed." (in the selected language). This is to prevent subjects to see the results without permission. To show results, swipe right on the
text.
Demo
For demonstration's sake, take a situation in which you want to reveal whether a person is aware of a certain date. For example, someone is suspected to be concealing the knowledge of an upcoming terrorist attack on May 9. In this
case, five
different, additional dates should be chosen randomly. For example, June 14, December 5, August 25, February 12, and October 23. From among these, one should be chosen randomly as target, for example, August
25. These should be filled in
accordingly on the starting page: AUG 25 as Target, and the other dates as Probes (1-5). (In this case, the real "probe" is MAY 09, but the app automatically evaluates all items as potential probes.) The Subject ID could be "CIT_demo_suspect_01".
All these data can be filled in automatically for a demonstration using the following button:
Demo data loaded.
If you would like to do a pilot test to see that the method truly detects a relevant detail, one good way is to enter your own personal name (e.g. family name) as one probe and, as target and other probes, enter other, randomly chosen names.
If you then
complete the test in the enhanced version with, say, two blocks, it is very likely that you will be detected. (Personal names are typically highly personally relevant, and thus appear highly salient in the task.) For a control test, to show
a no effect (simulating innocence), you may enter random names for all items. Note that, in this case, the person tested should not know which item is the presumed real probe item! The mere knowledge of the
relevance of this item (as the probe to be tested) can cause different responding.
Results
Path to files on the device(tap to show)(tap to hide)
{{citP.path}}
{{citres.v.subj_id}} ({{citres.v.date}})
Summary CIT results for {{citP.cit_results.subj_id}}
Overall accuracy rates (number of correct responses per number of all trials): {{citP.cit_results.ar_overall}}.
Description of variables(tap to show)(tap to hide)
Response times (for all correct responses, in milliseconds): probe RT mean minus irrelevant RT mean (RTP vs I), probe RT mean and standard deviation (RTP (SD)), irrelevant RT mean and standard
deviation (RTI (SD)),
uncorrected Cohen's d between all probe and all irrelevant RTs (dCIT). Accuracy rates (ratio of correct responses compared to incorrect and too slow responses, in percentage): probe accuracy rate minus irrelevant
accuracy
rate (ARP vs I), probe accuracy rate (ARP), irrelevant accuracy rate (ARI). Responses with RT below 150 ms are excluded from all RT and AR analysis, except for the overall accuracy rate
calculation. Trials (i.e., responses) from practice rounds are not included in any of the statistics above.
Evaluation using dCIT(tap to show)(tap to hide)
The dCIT measure might be used to evaluate whether or not a given probe was recognized. The dCIT typically falls between around −0.3 and 0.8, where a larger number always indicates a larger likelihood
of
the
recognition of the given probe. As of yet, there is no established optimal cut-off value for the evaluation, but, based on a rough approximation in view of previous results, the following table depicts some possible evaluative labels for
given boundaries.
dCIT > 0.4
strong indication of recognition
dCIT > 0.3 and dCIT
<= 0.4
fair indication of recognition
dCIT > 0.1 and dCIT
<= 0.3
weak indication of recognition
dCIT > 0 and dCIT
<= 0.1
indeterminate
dCIT > −0.1 and dCIT
<= 0
weak indication of non-recognition
dCIT
<= −0.1
fair indication of non-recognition
(There is no strong indication of innocence: a very fast probe response is no more expected in case of innocence than in case of guilt.)


|
pico]OS
1.0.4
|
Functions | |
| POSFROMEXT UVAR_t POSCALL | p_pos_findbit (const UVAR_t bitfield) |
| POSFROMEXT UVAR_t POSCALL | p_pos_findbit (const UVAR_t bitfield, UVAR_t rrOffset) |
| POSFROMEXT void POSCALL | p_pos_initArch (void) |
| POSFROMEXT void POSCALL | p_pos_initTask (POSTASK_t task, void *stackstart, POSTASKFUNC_t funcptr, void *funcarg) |
| POSFROMEXT VAR_t POSCALL | p_pos_initTask (POSTASK_t task, UINT_t stacksize, POSTASKFUNC_t funcptr, void *funcarg) |
| POSFROMEXT void POSCALL | p_pos_freeStack (POSTASK_t task) |
| POSFROMEXT void POSCALL | p_pos_lock (void) |
| POSFROMEXT void POSCALL | p_pos_unlock (void) |
| POSFROMEXT VAR_t POSCALL | p_pos_initTask (POSTASK_t task, POSTASKFUNC_t funcptr, void *funcarg) |
| POSFROMEXT void POSCALL | p_pos_startFirstContext (void) |
| POSFROMEXT void POSCALL | p_pos_softContextSwitch (void) |
| POSFROMEXT void POSCALL | p_pos_intContextSwitch (void) |
| POSFROMEXT void POSCALL | p_pos_intContextSwitchPending (void) |
| POSEXTERN void POSCALL | c_pos_intEnter (void) |
| POSEXTERN void POSCALL | c_pos_intExit (void) |
| POSEXTERN void POSCALL | c_pos_intExitQuick (void) |
| POSEXTERN void POSCALL | c_pos_timerInterrupt (void) |
The operating system can be easily ported to other architectures, it can be ported to very small 8 bit architectures with low memory and to 32 bit architectures with lots of memory. To keep the porting as simple as possible, there are only a couple of functions that must be adapted to the architecute. Before you start porting the operating system to your architecture, you must choose a stack management type. You have the choice between:
POSCFG_TASKSTACKTYPE = 0
The stack memory is provided by the user. This is the best choice for very small architectures with low memory.
POSCFG_TASKSTACKTYPE = 1
The stack memory is dynamically allocated by the architecture dependent code of the operating system. The size of the stack frame is variable and can be choosen by the user who creates the task. This is the best choice for big architectures with lots of memory.
POSCFG_TASKSTACKTYPE = 2
The stack memory is dynamically allocated by the architecture dependent code of the operating system. The size of the stack frame is fixed and can not be changed by the user. This may be an alternative to type 0, it is a little bit more user friendly.
Here is a list of the functions that are architecture specific and must be ported:
p_pos_initTask, p_pos_startFirstContext, p_pos_softContextSwitch, p_pos_intContextSwitch.
If you choose POSCFG_TASKSTACKTYPE = 2 or 3, you must also provide the function p_pos_freeStack.
If your application is critical in performance, you may also provide an assembler version of the function "findbit". There are two different function prototypes possible. The simple prototype for the standard scheduling scheme (POSCFG_ROUNDROBIN = 0) is
UVAR_t p_pos_findbit(const UVAR_t bitfield);
The prototype for a findbit function that supports round robin scheduling (POSCFG_ROUNDROBIN = 1) is
UVAR_t p_pos_findbit(const UVAR_t bitfield, UVAR_t rrOffset);
The function gets a bitfield as input, and returns the number of the right most set bit (that is the number of the first lsb that is set). If round robin is enabled, the function takes an offset as second parameter. The offset is the position where the function starts to search the first set bit. The function scans the bitfield always from right to left, starting with the bit denoted by the offset. The bitfield is seen as circle, when the rightmost bit is not set the function must continue scanning the leftmost bit (wrap around), so all bits of the field are scanned.
It is possible to implement the findbit mechanism as look up table. For this purpose you can define the macro FINDBIT. Please see the header file picoos.h (search for the word POSCFG_FBIT_USE_LUTABLE) and the source file fbit_gen.c for details.
Unfortunately, not the whole operating system can be written in C. The platform port must be written in assembly language. I tried to keep the assembly part of the RTOS as small as possible. But there are three assembly functions left, that are needed for doing the context switching:
The operating system requires also a timer interrupt that is used to cut the task execution time into slices. Hardware interrupts must comply with some conventions to be compatible to pico]OS. So the fourth thing you need to write in assember is a framework for hardware interrupts.
The diagram shows the assembler functions in logical structure. At the left side I have drawn a normal interrupt service routine for reference.
The context switching (multitasking) is done by simply swaping the stack frame when an interrupt service routine (eg. the timer interrupt) is left. But it must also be possible for a task to give of processing time without the need of an interrupt. This is done by the function p_pos_softContextSwitch at the right side in the diagram. Since this function is not called by a processor interrupt, it must build up an ISR compatible stack frame by itself. Note that the second part of this function is equal to the function p_pos_intContextSwitch, so the function must be terminated by an return-from-interrupt instruction, even if the function was called from a C-routine.
For completeness, the next diagram shows at its left side how the function p_pos_startFirstContext works. Again, this function looks like the lower part of the funtion p_pos_intContextSwitch in the diagram above. In the middle you can see how the timer interrupt routine must look like.
There is a special interrupt handling needed when interrupts are interruptable on your system. To prevent a deadlock situation (that is, an ISR would be called again and again until the stack flows over), a counting flag variable is exported by pico]OS: posInInterrupt_g. This variable contains the value zero if no interrupt is running yet. And only if no other interrupt is running, the ISR must save the stack pointer to the task environment structure where posCurrentTask_g points to. This behaviour is shown at the right side in the diagram above.
Note that interrupt service routines need some stack space to be able to do their work - in the discussed configuration every ISR would take some stack memory from the stack frame of the currently active task. But this may be a problem at platforms that are low on memory - it would be to expensive to increase every tasks stack frame by the count of bytes an ISR would need. In this case, you can set up a special stackframe that is only used by interrupt service routines. The diagram below shows the small changes to the ISRs discussed above. But attention - this method is only applicable on platforms where interrupts can not interrupt each other.
| POSEXTERN void POSCALL c_pos_intEnter | ( | void | ) |
Interrupt control function. This function must be called from an interrupt service routine to show the operating system that an ISR is currently running. This function must be called first before other operating system functions can be called from within the ISR.
| POSEXTERN void POSCALL c_pos_intExit | ( | void | ) |
Interrupt control function. This function must be called from an interrupt service routine to show the operating system that the ISR is going to complete its work and no operating system functions will be called any more from within the ISR.
| POSEXTERN void POSCALL c_pos_intExitQuick | ( | void | ) |
Interrupt control function. Similar to c_pos_intExit, except that context switch is not performed. Instead, a call to p_pos_intContextSwitchQueue is performed if it is necessary to perform task scheduling. p_pos_intContextSwitchQueue should "queue" context switch to occur at later time.
This was needed for Arm Cortex-M cpus, which need to use PendSV exception for context switching.
| POSEXTERN void POSCALL c_pos_timerInterrupt | ( | void | ) |
Timer interrupt control function. This function must be called periodically from within a timer interrupt service routine. The whole system timing is derived from this timer interrupt.
A timer ISR could look like this:
Bit finding function. This function is called by the operating system to find the first set bit in a bitfield. See the file fbit_gen.c for an example.
| bitfield | This is the bitfield that shall be scanned. |
Bit finding function. This function is called by the operating system to find the first set bit in a bitfield. See the file fbit_gen.c for an example.
| bitfield | This is the bitfield that shall be scanned. |
| rrOffset | Offset into the bitfield. Scanning begins here. |
| POSFROMEXT void POSCALL p_pos_freeStack | ( | POSTASK_t | task | ) |
Stack free function. This function is called by the operating system to free a stack frame that was set up by the function p_pos_initTask. See the available port source files for an example on how to write this function.
| task | pointer to the task environment structure. |
Stack free function. This function is called by the operating system to free a stack frame that was set up by the function p_pos_initTask. See the available port source files for an example on how to write this function.
| task | pointer to the task environment structure. |
| POSFROMEXT void POSCALL p_pos_initArch | ( | void | ) |
Architecture port initialization. This function is called from the posInit function to initialize the architecture specific part of the operating system.
| POSFROMEXT void POSCALL p_pos_initTask | ( | POSTASK_t | task, |
| void * | stackstart, | ||
| POSTASKFUNC_t | funcptr, | ||
| void * | funcarg | ||
| ) |
Task initialization function. This function is called by the operating system to initialize the stack frame of a new task. See the available port source files for an example on how to write this function.
| task | pointer to the task environment structure. |
| stackstart | pointer to the start of the stack memory. |
| funcptr | pointer to the first function that shall be executed by the new task. |
| funcarg | argument that should be passed to the first function. |
| POSFROMEXT VAR_t POSCALL p_pos_initTask | ( | POSTASK_t | task, |
| UINT_t | stacksize, | ||
| POSTASKFUNC_t | funcptr, | ||
| void * | funcarg | ||
| ) |
Task initialization function. This function is called by the operating system to initialize the stack frame of a new task. See the available port source files for an example on how to write this function.
| task | pointer to the task environment structure. |
| stacksize | size of the stack memory for the new task. The stack memory may be allocated dynamically from within this function. |
| funcptr | pointer to the first function that shall be executed by the new task. |
| funcarg | argument that should be passed to the first function. |
| POSFROMEXT VAR_t POSCALL p_pos_initTask | ( | POSTASK_t | task, |
| POSTASKFUNC_t | funcptr, | ||
| void * | funcarg | ||
| ) |
Task initialization function. This function is called by the operating system to initialize the stack frame of a new task. This function is responsible to allocate the stack memory and to store the pointer of the stack frame into the task environment. See the available port source files for an example on how to write this function.
| task | pointer to the task environment structure. |
| funcptr | pointer to the first function that shall be executed by the new task. |
| funcarg | argument that should be passed to the first function. |
| POSFROMEXT void POSCALL p_pos_intContextSwitch | ( | void | ) |
Context switch function. This function is called by the operating system to initiate a context switch from interrupt level. This function has then to switch the context variable and restore the new context from stack memory. See the available port source files for an example on how to write this function.
| POSFROMEXT void POSCALL p_pos_intContextSwitchPending | ( | void | ) |
Context switch function. Called by c_pos_intExitQuick if task scheduling is needed. This function should queue context switch somehow, for example in Arm Cortex-M CPU:s a PendSV exception can be set pending.
| POSFROMEXT void POSCALL p_pos_lock | ( | void | ) |
Port lock. In some really special cases it may be required that Pico]OS must acquire a mutex before it can call the functions p_pos_initTask and p_pos_freeStack. If you need such a mutex for your port, please define POSCFG_PORTMUTEX to 1. Then implement the both functions p_pos_lock and p_pos_unlock in your arch_c.c file.
| POSFROMEXT void POSCALL p_pos_softContextSwitch | ( | void | ) |
Context switch function. This function is called by the operating system to initiate a software context switch. This function has then to save all volatile processor registers to stack memory, switch the context variable and restore the new context from stack memory. See the available port source files for an example on how to write this function.
| POSFROMEXT void POSCALL p_pos_startFirstContext | ( | void | ) |
Context switch function. This function is called by the operating system to start the multitasking. The function has to restore the first context from stack memory. See the available port source files for an example on how to write this function.
| POSFROMEXT void POSCALL p_pos_unlock | ( | void | ) |
Port unlock. Counterpart of function p_pos_lock.


ESP32 Environment Monitor v1.2
Temperature: %.2f°C Humidity: %.2f%
Up since %02d:%02d:%02d
Last updated: 2021-11-02 Copyright (C) 2021 Syed Furquan Ahmad


The Diffie-Hellman key exchange protocol was developed by Whitfield Diffie, Martin E. Hellman and Ralph Merkle in 1976.
CrypTool contains a visualization of the Diffie-Hellman key exchange protocol. You can access it via the menu item Individual Procedures / Diffie-Hellman Demonstration. For the dialog Diffie-Hellman Visualization online help is offered too.
Furthermore CrypTool offers an exemplary execution of the key exchange protocol with small numbers in order to ease your understanding.
Despite communicating via a non-secure line, the protocol enables two or more parties to negotiate on a secret key which is solely known to the participating parties.
For better comprehension the two participating parties will be described as Alice and Bob. The following drawing is to give a quick overview of the Diffie-Hellman key exchange protocol:
The secret and common key, often described as session key, depends on the following parameters:
The protocol is based on the discrete logarithm problem, that is making use of a so-called one-way-function property: Whereas the computation of a mathematical one-way-function is of low complexity, the inverse operation is extremely hard to accomplish.
The creation of the session key at the end of the protocol is based on such a one-way-function: Even if a potential attacker has knowledge of the shared keys of both Alice and Bob, it is hardly possible for him to compute the session key; depending on the key length, it can easily turn out as impossible for the attacker to calculate the session key.
Increasing the prime module p directly affects the complexity to compute the session key. Anyhow, the additional expenses to compute the exponential function are bearable for Alice and Bob.
Contrary to the situation of Alice and Bob, the attacker needs to compute the discrete logarithm, which is the inversion of the exponential function. This effort increases much more than the effort necessary for the two communication partners.
For this reason the safety of the Diffie-Hellman key exchange protocol depends essentially on the size of the prime module p. In practical prime module numbers are considered safe if their bit length has at least 1024 bit, which complies with a 300-digit decimal number.
Besides the prime module p, the secret numbers of Alice and Bob need to be of a certain length in order to prevent the attacker from correctly guessing the session key by chance. Thus, in practice secrets should be at least 80 bit long (25-digit decimal number).
Remark 1:
The key exchange protocol according to Diffie-Hellman is NOT an encryption method, it is merely used to agree on a secret and common key.
Remark 2:
The Diffie-Hellman protocol is vulnerable against "Man-In-The-Middle" attacks:
The attacker attempts to personate as Alice for Bob and at the same time to personate as Bob against Alice (the attacker stands in the middle of the communication between Alice and Bob). If he is successful then he obtains via the Diffie-Hellman protocol a common secret key with Alice and a second common secret key with Bob.
This attack can be prevented via digital certificates by the secure identification of the communication partners.
Remark 3:
Additional information on the mathematical background can be found


Starting the File List Editor on a Topic not Marked as Having a File List
If you attempt to start the file list editor, or switch topics within the editor, to a topic not marked in Ameol as having a file list, the following dialog is displayed:
Select the radio button that is appropriate and click on OK, or click on Cancel if you have made a mistake.
{bmlwd RARROW.BMP}Switch to another topic if you have chosen the wrong topic. Moderate will display a forum/topic selector.
{bmlwd RARROW.BMP}Create file list if the topic has no file list and you wish to create one.
{bmlwd RARROW.BMP}Assume and download if the topic has been erroneously marked as having no file list in Ameol. Moderate will attempt to download the moderator's file list and file directory on your next blink.


{% assets "css_all" %} {% endassets %}
{% include 'nav.html' %}You are seeing this page because you don't have any data collected. Don't worry, the system will check for data every 20 minutes and update the page when data is received.
You can manually by reloading the page or pressing the "Check for data" button below.


My Experience
Specialist in need. Generalist at heart.
Front-end
- HTML5
- CSS3
- JAVASCRIPT
- BOOTSTRAP
- SEMANTIC-UI
Back-end
- SQL
- FIREBASE
- PYTHON
Tools
- GIT || GITHUB
- VS CODE || ATOM
- ADOBE
What can i do?
Web Development
Web Design
Mobile Development
Testimonials
A hardworking man, pays attention to the smallest details of work, helps those around him, at the expense of his time, enthusiastic to work with him.
- Msallam DaasA wonderful, efficient man with a love of learning and problem-solving ability.
- Azmi Al TammamBad programmers worry about the code. Good programmers worry about data structures and their relationships.
- Abdulaziz Quranfoleh


Accessibility App for Roku
Accessibility Control Guide
Space Bar = Play/Pause
Up Arrow = Volume Up
Down Arrow = Volume Down
Left Arrow = Seek Back
Right Arrow = Seek Forward
Left Square Bracket = Slow Speed
Right Square Bracket = Fast Speed
c = Show Captions
D = Hide Captions
A = Show Transcript
B = Hide Transcript


All hail “The Bookninja Messiah”!
Earlier this week I’d heard that Bookninja had been hijacked, they needed some help to get their WordPress back in working order. Mark suggested that I offered my services, so I did.
George explained what the problems since the hijack:
- Unable to publish blog posts and pages; (a blank page appeared when he tried to publish)
- All the pages had been delete, or disappeared.
- Akismet was turned off… opening the floodgates to lots of unwanted casino and porn comment spam!
Previously, Bookninja was running an earlier version of WordPress – one that had a known exploit/vulnerability – so George quickly upgraded to the latest version. (This is all beside the point now).
George sorted out the comment spam and got Askimet back up and running.
The blank page after publishing took a while to figure out, but I got there in the end! (It was a rogue URL in the notification/ping-list).
With the mysteriously vanishing pages (as opposed to posts), my initial reaction was that they had been deleted from the database. I was about to break the bad news to George, but I thought I’d take a quick look at the database to make doubly-sure.
Low-and-behold, I found them! But something weird had happened… All the WordPress pages had been converted into blog posts! This caused an issue because the permalink structure was using “?page_id=
” querystring – which meant that all the page links would be broken.
I needed to find a way of bulk converting them back to proper “pages”. Good old Google pointed me towards a blog post by Jesse Caulfield that had a bit of SQL that would Convert a Post to Page.
I adapted the SQL to fit my needs:
UPDATE wp_posts SET post_type = "page" WHERE guid LIKE "%?page_id=%";
With that, Bookninja was back to normal… George has dubbed me “The Bookninja Messiah“! [Cue: Monty Python gag]
Now the hunt is on for the hijacker!


| Multiverse Levels | Size | Updated |
| adult.json | Private | Private |
| fps.json | ~4kb | 2023-07-11 |
| lanovka.json | ~5kb | 2023-02-20 |
| platform.json | ~1kb | 2023-07-11 |
| racing.json | ~1kb | 2023-07-11 |
| rpg.json | ~1kb | 2023-07-11 |
| rts.json | ~1kb | 2023-07-11 |
| spooky.json | ~3kb | 2023-02-12 |
| thalassophobia.json | ~3kb | 2023-04-15 |
| util-copypasta.json | ~6kb | 2023-02-19 |


Kirklan:
My impressive counting abilities reveal that you don't have enough. We can't make an exchange like this. In order to exchange
Mounted Troop Charm
, you need
5 Mounted Troop Totems
.


How to Support More Queues in RocketMQ?
Summary
Kafka is a distributed streaming platform, which was born from logging aggregation cases. It does not need too high concurrency. In some large scale cases in alibaba, we found that the original model has been unable to meet our actual needs. So, we developed a messaging middleware, named RocketMQ, which can handle a broad set of use cases, ranging from traditional publish/subscribe scenario to demandingly high volume realtime transaction system that tolerates no message loss. Now, in alibaba, RocketMQ clusters process more than 500 billion events every day, provide services for more than 3000 core applications.
Partition design in kafka
- Producer parallelism of writing is bounded by the number of partitions.
- The degree of consumer consumption parallelism, also is bounded by the number of partitions being consumed. Assuming that the number of partitions is 20, then the maximum concurrent consumption of Consumer is 20.
- Each Topic consists of a number of fixed number of partitions. Partition number determines the number of Topic that single Broker can support.
More details please refer to here.
Why Kafka can’t support more partitions
- Each partition stores the whole message data, although each partition is written to the disk is in order, but a number of sequential partition writing at the same time from the aspect of operating system become a random writing.
- Due to the scattered data files, it is difficult to use the linux IO Group Commit mechanism.
How to support more partition in RocketMQ?
- All message data are stored in CommmitLog files. Complete sequential writing and random read.
- ConsumeQueue stores the actual user consumption location information, they are flushed to disk in sequential mode.
pros：
- A very small amount of data on a single consume queue. Lightweight.
- Sequential access in disk, avoid disk lock contention, and not incur high disk iowait when more and more queues created.
cons：
- Message consumption will read ConsumeQueue firstly, then read CommitLog if not found.This process brings a certain cost in the worst cases.
- CommitLog and ConsumeQueue must be keep completely consistent, increasing the complexity of programming model.
Design Motivation：
- Random read. Read as much as possible to increase the PAGECACHE hit rate, and reduce read io operations. So bigger memory is still better. If too much message accumulation happened, whether the read performance will fall very badly? the answer is negative, reasons are as follows:
- PAGECACHE prefetch, even if the 1K message, the system will read more data in advance. You may hit the memory in the next read operation.
- Random access CommitLog from disk. If set the I/O scheduler to noop in SSD, the read qps will greatly accelerate than others scheduler algorithm.
- Because ConsumeQueue stores little information, mainly associated with consumption locations.also, supports random read. Under PAGECACHE prefetch control, read performance almost keep consistent with the main memory, even if in the message accumulation cases. In this particular case，ConsumeQueue will not hinder the read performance.
- CommitLog stores all the meta information, including the message data. similar db’s redolog. So as long as CommitLog exists, even if the ConsumeQueue data is lost, data can be recovered.
Leave a Comment


The Foreign Account Tax Compliance Act (FATCA) is a piece of US tax regulation that aims to combat tax evasion by US persons opening accounts offshore. FATCA became effective July 1, 2014. It enhances due diligence and information reporting requirements for both individual and entity accounts. On 9 July 2015, India signed Model 1 Inter-Governmental Agreement (IGA) with the US IRS for implementation of FATCA.
follow the standard procedures of Nationalized Bank